Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / plugins / plugin_prefs_factory.h
bloba4dd05bb96b4a1774fcc3abb6525dc0fc1de3290
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.
5 #ifndef CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_FACTORY_H_
6 #define CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_FACTORY_H_
8 #include "base/compiler_specific.h"
9 #include "base/memory/singleton.h"
10 #include "components/keyed_service/content/refcounted_browser_context_keyed_service_factory.h"
12 class PluginPrefs;
13 class Profile;
15 class PluginPrefsFactory : public RefcountedBrowserContextKeyedServiceFactory {
16 public:
17 static scoped_refptr<PluginPrefs> GetPrefsForProfile(Profile* profile);
19 static PluginPrefsFactory* GetInstance();
21 private:
22 friend class PluginPrefs;
23 friend struct DefaultSingletonTraits<PluginPrefsFactory>;
25 // Helper method for PluginPrefs::GetForTestingProfile.
26 static scoped_refptr<RefcountedKeyedService> CreateForTestingProfile(
27 content::BrowserContext* profile);
29 PluginPrefsFactory();
30 ~PluginPrefsFactory() override;
32 // RefcountedBrowserContextKeyedServiceFactory methods:
33 scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor(
34 content::BrowserContext* context) const override;
36 // BrowserContextKeyedServiceFactory methods:
37 void RegisterProfilePrefs(
38 user_prefs::PrefRegistrySyncable* registry) override;
39 content::BrowserContext* GetBrowserContextToUse(
40 content::BrowserContext* context) const override;
41 bool ServiceIsNULLWhileTesting() const override;
42 bool ServiceIsCreatedWithBrowserContext() const override;
45 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_FACTORY_H_