Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Side by Side Diff: chrome/browser/plugins/plugin_prefs_factory.h

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/plugins/plugin_finder.cc ('k') | chrome/browser/plugins/plugin_prefs_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_FACTORY_H_ 5 #ifndef CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_FACTORY_H_
6 #define CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_FACTORY_H_ 6 #define CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_FACTORY_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "components/keyed_service/content/refcounted_browser_context_keyed_serv ice_factory.h" 10 #include "components/keyed_service/content/refcounted_browser_context_keyed_serv ice_factory.h"
11 11
12 class PluginPrefs; 12 class PluginPrefs;
13 class Profile; 13 class Profile;
14 14
15 class PluginPrefsFactory : public RefcountedBrowserContextKeyedServiceFactory { 15 class PluginPrefsFactory : public RefcountedBrowserContextKeyedServiceFactory {
16 public: 16 public:
17 static scoped_refptr<PluginPrefs> GetPrefsForProfile(Profile* profile); 17 static scoped_refptr<PluginPrefs> GetPrefsForProfile(Profile* profile);
18 18
19 static PluginPrefsFactory* GetInstance(); 19 static PluginPrefsFactory* GetInstance();
20 20
21 private: 21 private:
22 friend class PluginPrefs; 22 friend class PluginPrefs;
23 friend struct DefaultSingletonTraits<PluginPrefsFactory>; 23 friend struct base::DefaultSingletonTraits<PluginPrefsFactory>;
24 24
25 // Helper method for PluginPrefs::GetForTestingProfile. 25 // Helper method for PluginPrefs::GetForTestingProfile.
26 static scoped_refptr<RefcountedKeyedService> CreateForTestingProfile( 26 static scoped_refptr<RefcountedKeyedService> CreateForTestingProfile(
27 content::BrowserContext* profile); 27 content::BrowserContext* profile);
28 28
29 PluginPrefsFactory(); 29 PluginPrefsFactory();
30 ~PluginPrefsFactory() override; 30 ~PluginPrefsFactory() override;
31 31
32 // RefcountedBrowserContextKeyedServiceFactory methods: 32 // RefcountedBrowserContextKeyedServiceFactory methods:
33 scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor( 33 scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor(
34 content::BrowserContext* context) const override; 34 content::BrowserContext* context) const override;
35 35
36 // BrowserContextKeyedServiceFactory methods: 36 // BrowserContextKeyedServiceFactory methods:
37 void RegisterProfilePrefs( 37 void RegisterProfilePrefs(
38 user_prefs::PrefRegistrySyncable* registry) override; 38 user_prefs::PrefRegistrySyncable* registry) override;
39 content::BrowserContext* GetBrowserContextToUse( 39 content::BrowserContext* GetBrowserContextToUse(
40 content::BrowserContext* context) const override; 40 content::BrowserContext* context) const override;
41 bool ServiceIsNULLWhileTesting() const override; 41 bool ServiceIsNULLWhileTesting() const override;
42 bool ServiceIsCreatedWithBrowserContext() const override; 42 bool ServiceIsCreatedWithBrowserContext() const override;
43 }; 43 };
44 44
45 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_FACTORY_H_ 45 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_FACTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_finder.cc ('k') | chrome/browser/plugins/plugin_prefs_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698