[email protected] | 2366a3a | 2012-10-02 20:41:14 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 | // Use of this source code is governed by a BSD-style license that can be | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
[email protected] | 97eddfe | 2013-02-12 19:16:30 | [diff] [blame] | 5 | #ifndef CHROME_BROWSER_PLUGINS_PLUGINS_RESOURCE_SERVICE_H_ |
6 | #define CHROME_BROWSER_PLUGINS_PLUGINS_RESOURCE_SERVICE_H_ | ||||
[email protected] | 2366a3a | 2012-10-02 20:41:14 | [diff] [blame] | 7 | |
avi | b896c71 | 2015-12-26 02:10:43 | [diff] [blame] | 8 | #include "base/macros.h" |
droger | 73a6070 | 2015-08-25 08:45:20 | [diff] [blame] | 9 | #include "components/web_resource/web_resource_service.h" |
[email protected] | 2366a3a | 2012-10-02 20:41:14 | [diff] [blame] | 10 | |
[email protected] | 5b19952 | 2012-12-22 17:24:44 | [diff] [blame] | 11 | class PrefService; |
[email protected] | b1de2c7 | 2013-02-06 02:45:47 | [diff] [blame] | 12 | class PrefRegistrySimple; |
[email protected] | 5b19952 | 2012-12-22 17:24:44 | [diff] [blame] | 13 | |
tommycli | e86b298 | 2015-03-16 20:16:45 | [diff] [blame] | 14 | // This resource service periodically fetches plugin metadata |
[email protected] | 2366a3a | 2012-10-02 20:41:14 | [diff] [blame] | 15 | // from a remote server and updates local state and PluginFinder. |
droger | 73a6070 | 2015-08-25 08:45:20 | [diff] [blame] | 16 | class PluginsResourceService : public web_resource::WebResourceService { |
[email protected] | 2366a3a | 2012-10-02 20:41:14 | [diff] [blame] | 17 | public: |
18 | explicit PluginsResourceService(PrefService* local_state); | ||||
droger | 13cf36de | 2015-01-27 10:20:23 | [diff] [blame] | 19 | ~PluginsResourceService() override; |
[email protected] | 2366a3a | 2012-10-02 20:41:14 | [diff] [blame] | 20 | |
[email protected] | 97eddfe | 2013-02-12 19:16:30 | [diff] [blame] | 21 | void Init(); |
22 | |||||
[email protected] | b1de2c7 | 2013-02-06 02:45:47 | [diff] [blame] | 23 | static void RegisterPrefs(PrefRegistrySimple* registry); |
[email protected] | 2366a3a | 2012-10-02 20:41:14 | [diff] [blame] | 24 | |
25 | private: | ||||
[email protected] | 2366a3a | 2012-10-02 20:41:14 | [diff] [blame] | 26 | // WebResourceService override to process the parsed information. |
dcheng | 99b1bc2 | 2014-10-22 18:47:42 | [diff] [blame] | 27 | void Unpack(const base::DictionaryValue& parsed_json) override; |
[email protected] | 2366a3a | 2012-10-02 20:41:14 | [diff] [blame] | 28 | |
29 | DISALLOW_COPY_AND_ASSIGN(PluginsResourceService); | ||||
30 | }; | ||||
31 | |||||
[email protected] | 97eddfe | 2013-02-12 19:16:30 | [diff] [blame] | 32 | #endif // CHROME_BROWSER_PLUGINS_PLUGINS_RESOURCE_SERVICE_H_ |