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

Unified Diff: chrome/browser/prefs/pref_metrics_service.cc

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: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/prefs/pref_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/pref_metrics_service.cc
diff --git a/chrome/browser/prefs/pref_metrics_service.cc b/chrome/browser/prefs/pref_metrics_service.cc
index a4a4f33294c741b278a76ac116e2e02da40d3f0f..47eca5b09ca9dfbf7903ebe9bf0f4d93944374d7 100644
--- a/chrome/browser/prefs/pref_metrics_service.cc
+++ b/chrome/browser/prefs/pref_metrics_service.cc
@@ -287,6 +287,11 @@ void PrefMetricsService::CheckTrackedPreferences() {
if (!prefs_->FindPreference(tracked_pref_paths_[i]))
continue;
+ // Make sure tracked prefs are saved to disk even if empty.
+ // TODO(gab): Guarantee this for all prefs at a lower level and remove this
+ // hack.
+ prefs_->MarkUserStoreNeedsEmptyValue(tracked_pref_paths_[i]);
battre 2013/11/22 13:01:57 I think I would move this into the constructor. Ot
gab 2013/11/22 18:24:37 Done, thanks.
+
const base::Value* value = prefs_->GetUserPrefValue(tracked_pref_paths_[i]);
std::string last_hash;
// First try to get the stored expected hash...
« no previous file with comments | « base/prefs/pref_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698