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

Side by Side Diff: chrome/browser/prefs/pref_metrics_service.h

Issue 79013003: Introduce a temporary workaround to ensure tracked preferences set to empty list/dict are not confu… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mark in constructor Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « base/prefs/pref_service.cc ('k') | chrome/browser/prefs/pref_metrics_service.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 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 const Value* value); 88 const Value* value);
89 89
90 // Callback for an integer pref change histogram. 90 // Callback for an integer pref change histogram.
91 void LogIntegerPrefChange(int boundary_value, 91 void LogIntegerPrefChange(int boundary_value,
92 const std::string& histogram_name, 92 const std::string& histogram_name,
93 const Value* value); 93 const Value* value);
94 94
95 // Callback to receive a unique device_id. 95 // Callback to receive a unique device_id.
96 void GetDeviceIdCallback(const std::string& device_id); 96 void GetDeviceIdCallback(const std::string& device_id);
97 97
98 // Marks all tracked preferences as required to save their values even if
99 // empty.
100 void MarkNeedsEmptyValueForTrackedPreferences();
101
98 // Checks the tracked preferences against their last known values and reports 102 // Checks the tracked preferences against their last known values and reports
99 // any discrepancies. This must be called after |device_id| has been set. 103 // any discrepancies. This must be called after |device_id| has been set.
100 void CheckTrackedPreferences(); 104 void CheckTrackedPreferences();
101 105
102 // Updates the hash of the tracked preference in local state. This must be 106 // Updates the hash of the tracked preference in local state. This must be
103 // called after |device_id| has been set. 107 // called after |device_id| has been set.
104 void UpdateTrackedPreference(const char* path); 108 void UpdateTrackedPreference(const char* path);
105 109
106 // Computes an MD5 hash for the given preference value. |value| can be 110 // Computes an MD5 hash for the given preference value. |value| can be
107 // NULL which will result in the unique hash representing NULL for the pref 111 // NULL which will result in the unique hash representing NULL for the pref
(...skipping 17 matching lines...) Expand all
125 129
126 PrefChangeRegistrar pref_registrar_; 130 PrefChangeRegistrar pref_registrar_;
127 scoped_ptr<SyncedPrefChangeRegistrar> synced_pref_change_registrar_; 131 scoped_ptr<SyncedPrefChangeRegistrar> synced_pref_change_registrar_;
128 132
129 base::WeakPtrFactory<PrefMetricsService> weak_factory_; 133 base::WeakPtrFactory<PrefMetricsService> weak_factory_;
130 134
131 DISALLOW_COPY_AND_ASSIGN(PrefMetricsService); 135 DISALLOW_COPY_AND_ASSIGN(PrefMetricsService);
132 }; 136 };
133 137
134 #endif // CHROME_BROWSER_PREFS_PREF_METRICS_SERVICE_H_ 138 #endif // CHROME_BROWSER_PREFS_PREF_METRICS_SERVICE_H_
OLDNEW
« no previous file with comments | « base/prefs/pref_service.cc ('k') | chrome/browser/prefs/pref_metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698