blob: 29452d53ff30dd255e52da932bf32c15a49ec558 [file] [log] [blame]
[email protected]2366a3a2012-10-02 20:41:141// 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]97eddfe2013-02-12 19:16:305#ifndef CHROME_BROWSER_PLUGINS_PLUGINS_RESOURCE_SERVICE_H_
6#define CHROME_BROWSER_PLUGINS_PLUGINS_RESOURCE_SERVICE_H_
[email protected]2366a3a2012-10-02 20:41:147
avib896c712015-12-26 02:10:438#include "base/macros.h"
droger73a60702015-08-25 08:45:209#include "components/web_resource/web_resource_service.h"
[email protected]2366a3a2012-10-02 20:41:1410
[email protected]5b199522012-12-22 17:24:4411class PrefService;
[email protected]b1de2c72013-02-06 02:45:4712class PrefRegistrySimple;
[email protected]5b199522012-12-22 17:24:4413
tommyclie86b2982015-03-16 20:16:4514// This resource service periodically fetches plugin metadata
[email protected]2366a3a2012-10-02 20:41:1415// from a remote server and updates local state and PluginFinder.
droger73a60702015-08-25 08:45:2016class PluginsResourceService : public web_resource::WebResourceService {
[email protected]2366a3a2012-10-02 20:41:1417 public:
18 explicit PluginsResourceService(PrefService* local_state);
droger13cf36de2015-01-27 10:20:2319 ~PluginsResourceService() override;
[email protected]2366a3a2012-10-02 20:41:1420
[email protected]97eddfe2013-02-12 19:16:3021 void Init();
22
[email protected]b1de2c72013-02-06 02:45:4723 static void RegisterPrefs(PrefRegistrySimple* registry);
[email protected]2366a3a2012-10-02 20:41:1424
25 private:
[email protected]2366a3a2012-10-02 20:41:1426 // WebResourceService override to process the parsed information.
dcheng99b1bc22014-10-22 18:47:4227 void Unpack(const base::DictionaryValue& parsed_json) override;
[email protected]2366a3a2012-10-02 20:41:1428
29 DISALLOW_COPY_AND_ASSIGN(PluginsResourceService);
30};
31
[email protected]97eddfe2013-02-12 19:16:3032#endif // CHROME_BROWSER_PLUGINS_PLUGINS_RESOURCE_SERVICE_H_