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

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

Issue 126093007: Introduce a hash_of_hashes dictionary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +missing histogram Created 6 years, 11 months 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
Index: chrome/browser/prefs/pref_hash_filter.cc
diff --git a/chrome/browser/prefs/pref_hash_filter.cc b/chrome/browser/prefs/pref_hash_filter.cc
index 3d13a5a298ec953b5bf367616d0b66cb7ccbc606..524fbe2aa77e28a232a039f7083286540309a8f7 100644
--- a/chrome/browser/prefs/pref_hash_filter.cc
+++ b/chrome/browser/prefs/pref_hash_filter.cc
@@ -31,10 +31,14 @@ void ReportValidationResult(PrefHashStore::ValueState value_state,
UMA_HISTOGRAM_ENUMERATION("Settings.TrackedPreferenceChanged",
value_index, num_values);
return;
- case PrefHashStore::UNKNOWN_VALUE:
+ case PrefHashStore::UNTRUSTED_UNKNOWN_VALUE:
UMA_HISTOGRAM_ENUMERATION("Settings.TrackedPreferenceInitialized",
value_index, num_values);
return;
+ case PrefHashStore::TRUSTED_UNKNOWN_VALUE:
+ UMA_HISTOGRAM_ENUMERATION("Settings.TrackedPreferenceTrustedInitialized",
+ value_index, num_values);
+ return;
}
NOTREACHED() << "Unexpected PrefHashStore::ValueState: " << value_state;
}
@@ -99,10 +103,13 @@ void PrefHashFilter::FilterOnLoad(base::DictionaryValue* pref_store_contents) {
case PrefHashStore::CLEARED:
// Unfortunate case, but there is nothing we can do.
break;
+ case PrefHashStore::TRUSTED_UNKNOWN_VALUE:
+ // It is okay to seed the hash in this case.
+ break;
case PrefHashStore::MIGRATED:
reset_state = no_migration_ ? DO_RESET : WANTED_RESET;
break;
- case PrefHashStore::UNKNOWN_VALUE:
+ case PrefHashStore::UNTRUSTED_UNKNOWN_VALUE:
reset_state = no_seeding_ ? DO_RESET : WANTED_RESET;
break;
case PrefHashStore::CHANGED:
« no previous file with comments | « no previous file | chrome/browser/prefs/pref_hash_filter_unittest.cc » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698