| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 // Callback for a boolean pref change histogram. | 81 // Callback for a boolean pref change histogram. |
| 82 void LogBooleanPrefChange(const std::string& histogram_name, | 82 void LogBooleanPrefChange(const std::string& histogram_name, |
| 83 const Value* value); | 83 const Value* value); |
| 84 | 84 |
| 85 // Callback for an integer pref change histogram. | 85 // Callback for an integer pref change histogram. |
| 86 void LogIntegerPrefChange(int boundary_value, | 86 void LogIntegerPrefChange(int boundary_value, |
| 87 const std::string& histogram_name, | 87 const std::string& histogram_name, |
| 88 const Value* value); | 88 const Value* value); |
| 89 | 89 |
| 90 // Callback for a list pref change. Each item in the list | 90 // Callback for a startup URLs pref change. |
| 91 // is logged using the given histogram callback. | 91 void LogStartupURLsPrefChange(const std::string& histogram_name, |
| 92 void LogListPrefChange(const LogHistogramValueCallback& item_callback, | 92 const Value* value); |
| 93 const std::string& histogram_name, | |
| 94 const Value* value); | |
| 95 | 93 |
| 96 // Callback to receive a unique device_id. | 94 // Callback to receive a unique device_id. |
| 97 void GetDeviceIdCallback(const std::string& device_id); | 95 void GetDeviceIdCallback(const std::string& device_id); |
| 98 | 96 |
| 99 // Checks the tracked preferences against their last known values and reports | 97 // Checks the tracked preferences against their last known values and reports |
| 100 // any discrepancies. This must be called after |device_id| has been set. | 98 // any discrepancies. This must be called after |device_id| has been set. |
| 101 void CheckTrackedPreferences(); | 99 void CheckTrackedPreferences(); |
| 102 | 100 |
| 103 // Updates the hash of the tracked preference in local state. This must be | 101 // Updates the hash of the tracked preference in local state. This must be |
| 104 // called after |device_id| has been set. | 102 // called after |device_id| has been set. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 125 | 123 |
| 126 PrefChangeRegistrar pref_registrar_; | 124 PrefChangeRegistrar pref_registrar_; |
| 127 scoped_ptr<SyncedPrefChangeRegistrar> synced_pref_change_registrar_; | 125 scoped_ptr<SyncedPrefChangeRegistrar> synced_pref_change_registrar_; |
| 128 | 126 |
| 129 base::WeakPtrFactory<PrefMetricsService> weak_factory_; | 127 base::WeakPtrFactory<PrefMetricsService> weak_factory_; |
| 130 | 128 |
| 131 DISALLOW_COPY_AND_ASSIGN(PrefMetricsService); | 129 DISALLOW_COPY_AND_ASSIGN(PrefMetricsService); |
| 132 }; | 130 }; |
| 133 | 131 |
| 134 #endif // CHROME_BROWSER_PREFS_PREF_METRICS_SERVICE_H_ | 132 #endif // CHROME_BROWSER_PREFS_PREF_METRICS_SERVICE_H_ |
| OLD | NEW |