| 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 |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/memory/singleton.h" | 12 #include "base/memory/singleton.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "chrome/browser/prefs/synced_pref_change_registrar.h" | |
| 15 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 16 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 15 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
| 17 #include "components/keyed_service/core/keyed_service.h" | 16 #include "components/keyed_service/core/keyed_service.h" |
| 17 #include "components/syncable_prefs/synced_pref_change_registrar.h" |
| 18 | 18 |
| 19 class PrefRegistrySimple; | 19 class PrefRegistrySimple; |
| 20 | 20 |
| 21 // PrefMetricsService is responsible for recording prefs-related UMA stats. | 21 // PrefMetricsService is responsible for recording prefs-related UMA stats. |
| 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 { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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_ |
| OLD | NEW |