summaryrefslogtreecommitdiffstats
path: root/chrome/browser/plugins/plugins_resource_service.h
blob: eb4074d10f85e6de5f5e5508e193e90d6a991a20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_PLUGINS_PLUGINS_RESOURCE_SERVICE_H_
#define CHROME_BROWSER_PLUGINS_PLUGINS_RESOURCE_SERVICE_H_

#include "chrome/browser/web_resource/chrome_web_resource_service.h"

class PrefService;
class PrefRegistrySimple;

// This resource service periodically fetches plug-in metadata
// from a remote server and updates local state and PluginFinder.
class PluginsResourceService : public ChromeWebResourceService {
 public:
  explicit PluginsResourceService(PrefService* local_state);
  ~PluginsResourceService() override;

  void Init();

  static void RegisterPrefs(PrefRegistrySimple* registry);

 private:
  // WebResourceService override to process the parsed information.
  void Unpack(const base::DictionaryValue& parsed_json) override;

  DISALLOW_COPY_AND_ASSIGN(PluginsResourceService);
};

#endif  // CHROME_BROWSER_PLUGINS_PLUGINS_RESOURCE_SERVICE_H_