| OLD | NEW | 
|---|
| 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 19 matching lines...) Expand all  Loading... | 
| 30     static Factory* GetInstance(); | 30     static Factory* GetInstance(); | 
| 31     static PrefMetricsService* GetForProfile(Profile* profile); | 31     static PrefMetricsService* GetForProfile(Profile* profile); | 
| 32    private: | 32    private: | 
| 33     friend struct DefaultSingletonTraits<Factory>; | 33     friend struct DefaultSingletonTraits<Factory>; | 
| 34 | 34 | 
| 35     Factory(); | 35     Factory(); | 
| 36     virtual ~Factory(); | 36     virtual ~Factory(); | 
| 37 | 37 | 
| 38     // BrowserContextKeyedServiceFactory implementation | 38     // BrowserContextKeyedServiceFactory implementation | 
| 39     virtual KeyedService* BuildServiceInstanceFor( | 39     virtual KeyedService* BuildServiceInstanceFor( | 
| 40         content::BrowserContext* profile) const OVERRIDE; | 40         content::BrowserContext* profile) const override; | 
| 41     virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE; | 41     virtual bool ServiceIsCreatedWithBrowserContext() const override; | 
| 42     virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; | 42     virtual bool ServiceIsNULLWhileTesting() const override; | 
| 43     virtual content::BrowserContext* GetBrowserContextToUse( | 43     virtual content::BrowserContext* GetBrowserContextToUse( | 
| 44         content::BrowserContext* context) const OVERRIDE; | 44         content::BrowserContext* context) const override; | 
| 45   }; | 45   }; | 
| 46 | 46 | 
| 47  private: | 47  private: | 
| 48   friend class PrefMetricsServiceTest; | 48   friend class PrefMetricsServiceTest; | 
| 49 | 49 | 
| 50   // Function to log a Value to a histogram | 50   // Function to log a Value to a histogram | 
| 51   typedef base::Callback<void(const std::string&, const base::Value*)> | 51   typedef base::Callback<void(const std::string&, const base::Value*)> | 
| 52       LogHistogramValueCallback; | 52       LogHistogramValueCallback; | 
| 53 | 53 | 
| 54   // For unit testing only. | 54   // For unit testing only. | 
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 86 | 86 | 
| 87   PrefChangeRegistrar pref_registrar_; | 87   PrefChangeRegistrar pref_registrar_; | 
| 88   scoped_ptr<SyncedPrefChangeRegistrar> synced_pref_change_registrar_; | 88   scoped_ptr<SyncedPrefChangeRegistrar> synced_pref_change_registrar_; | 
| 89 | 89 | 
| 90   base::WeakPtrFactory<PrefMetricsService> weak_factory_; | 90   base::WeakPtrFactory<PrefMetricsService> weak_factory_; | 
| 91 | 91 | 
| 92   DISALLOW_COPY_AND_ASSIGN(PrefMetricsService); | 92   DISALLOW_COPY_AND_ASSIGN(PrefMetricsService); | 
| 93 }; | 93 }; | 
| 94 | 94 | 
| 95 #endif  // CHROME_BROWSER_PREFS_PREF_METRICS_SERVICE_H_ | 95 #endif  // CHROME_BROWSER_PREFS_PREF_METRICS_SERVICE_H_ | 
| OLD | NEW | 
|---|