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

Side by Side Diff: chrome/browser/prefs/pref_metrics_service.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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_PREFS_PREF_METRICS_SERVICE_H_ 5 #ifndef CHROME_BROWSER_PREFS_PREF_METRICS_SERVICE_H_
6 #define CHROME_BROWSER_PREFS_PREF_METRICS_SERVICE_H_ 6 #define CHROME_BROWSER_PREFS_PREF_METRICS_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 11 matching lines...) Expand all
22 class PrefMetricsService : public KeyedService { 22 class PrefMetricsService : public KeyedService {
23 public: 23 public:
24 explicit PrefMetricsService(Profile* profile); 24 explicit PrefMetricsService(Profile* profile);
25 ~PrefMetricsService() override; 25 ~PrefMetricsService() override;
26 26
27 class Factory : public BrowserContextKeyedServiceFactory { 27 class Factory : public BrowserContextKeyedServiceFactory {
28 public: 28 public:
29 static Factory* GetInstance(); 29 static Factory* GetInstance();
30 static PrefMetricsService* GetForProfile(Profile* profile); 30 static PrefMetricsService* GetForProfile(Profile* profile);
31 private: 31 private:
32 friend struct DefaultSingletonTraits<Factory>; 32 friend struct base::DefaultSingletonTraits<Factory>;
33 33
34 Factory(); 34 Factory();
35 ~Factory() override; 35 ~Factory() override;
36 36
37 // BrowserContextKeyedServiceFactory implementation 37 // BrowserContextKeyedServiceFactory implementation
38 KeyedService* BuildServiceInstanceFor( 38 KeyedService* BuildServiceInstanceFor(
39 content::BrowserContext* profile) const override; 39 content::BrowserContext* profile) const override;
40 bool ServiceIsCreatedWithBrowserContext() const override; 40 bool ServiceIsCreatedWithBrowserContext() const override;
41 bool ServiceIsNULLWhileTesting() const override; 41 bool ServiceIsNULLWhileTesting() const override;
42 content::BrowserContext* GetBrowserContextToUse( 42 content::BrowserContext* GetBrowserContextToUse(
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 PrefService* local_state_; 84 PrefService* local_state_;
85 85
86 scoped_ptr<SyncedPrefChangeRegistrar> synced_pref_change_registrar_; 86 scoped_ptr<SyncedPrefChangeRegistrar> synced_pref_change_registrar_;
87 87
88 base::WeakPtrFactory<PrefMetricsService> weak_factory_; 88 base::WeakPtrFactory<PrefMetricsService> weak_factory_;
89 89
90 DISALLOW_COPY_AND_ASSIGN(PrefMetricsService); 90 DISALLOW_COPY_AND_ASSIGN(PrefMetricsService);
91 }; 91 };
92 92
93 #endif // CHROME_BROWSER_PREFS_PREF_METRICS_SERVICE_H_ 93 #endif // CHROME_BROWSER_PREFS_PREF_METRICS_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/prefs/incognito_mode_prefs.cc ('k') | chrome/browser/prefs/pref_metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698