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

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

Issue 81183005: Remove JsonPrefStore pruning of empty values on write. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove else Created 7 years 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
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
102 // Checks the tracked preferences against their last known values and reports 98 // Checks the tracked preferences against their last known values and reports
103 // any discrepancies. This must be called after |device_id| has been set. 99 // any discrepancies. This must be called after |device_id| has been set.
104 void CheckTrackedPreferences(); 100 void CheckTrackedPreferences();
105 101
106 // Updates the hash of the tracked preference in local state. This must be 102 // Updates the hash of the tracked preference in local state. This must be
107 // called after |device_id| has been set. 103 // called after |device_id| has been set.
108 void UpdateTrackedPreference(const char* path); 104 void UpdateTrackedPreference(const char* path);
109 105
110 // Computes an MD5 hash for the given preference value. |value| can be 106 // Computes an MD5 hash for the given preference value. |value| can be
111 // NULL which will result in the unique hash representing NULL for the pref 107 // NULL which will result in the unique hash representing NULL for the pref
(...skipping 20 matching lines...) Expand all
132 128
133 PrefChangeRegistrar pref_registrar_; 129 PrefChangeRegistrar pref_registrar_;
134 scoped_ptr<SyncedPrefChangeRegistrar> synced_pref_change_registrar_; 130 scoped_ptr<SyncedPrefChangeRegistrar> synced_pref_change_registrar_;
135 131
136 base::WeakPtrFactory<PrefMetricsService> weak_factory_; 132 base::WeakPtrFactory<PrefMetricsService> weak_factory_;
137 133
138 DISALLOW_COPY_AND_ASSIGN(PrefMetricsService); 134 DISALLOW_COPY_AND_ASSIGN(PrefMetricsService);
139 }; 135 };
140 136
141 #endif // CHROME_BROWSER_PREFS_PREF_METRICS_SERVICE_H_ 137 #endif // CHROME_BROWSER_PREFS_PREF_METRICS_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/prefs/chrome_pref_service_unittest.cc ('k') | chrome/browser/prefs/pref_metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698