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

Unified Diff: components/user_prefs/tracked/tracked_preference_helper.cc

Issue 2384213002: Send a TrackedPreference incident when registry pref validation fails. (Closed)
Patch Set: Improve split preference handling and address comments on #3 Created 4 years, 2 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: components/user_prefs/tracked/tracked_preference_helper.cc
diff --git a/components/user_prefs/tracked/tracked_preference_helper.cc b/components/user_prefs/tracked/tracked_preference_helper.cc
index 2d39749cf53c27f70741bdbe308e5c0ecfb9a20b..f7668286fae22080e167830a565373836688aaa8 100644
--- a/components/user_prefs/tracked/tracked_preference_helper.cc
+++ b/components/user_prefs/tracked/tracked_preference_helper.cc
@@ -38,6 +38,10 @@ TrackedPreferenceHelper::ResetAction TrackedPreferenceHelper::GetAction(
case PrefHashStoreTransaction::SECURE_LEGACY:
// Accept secure legacy device ID based hashes.
return DONT_RESET;
+ case PrefHashStoreTransaction::UNSUPPORTED:
+ NOTREACHED()
+ << "GetAction should not be called with an UNSUPPORTED value state";
+ return DONT_RESET;
case PrefHashStoreTransaction::UNTRUSTED_UNKNOWN_VALUE: // Falls through.
case PrefHashStoreTransaction::CHANGED:
return enforce_ ? DO_RESET : WANTED_RESET;
@@ -80,6 +84,10 @@ void TrackedPreferenceHelper::ReportValidationResult(
histogram_name =
user_prefs::tracked::kTrackedPrefHistogramNullInitialized;
break;
+ case PrefHashStoreTransaction::UNSUPPORTED:
+ NOTREACHED() << "ReportValidationResult should not be called with an "
+ "UNSUPPORTED value state";
+ return;
default:
NOTREACHED() << "Unexpected PrefHashStoreTransaction::ValueState: "
<< value_state;

Powered by Google App Engine
This is Rietveld 408576698