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..cab44ad5642e3129702d6639c77c945ba9001f49 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,8 @@ void TrackedPreferenceHelper::ReportValidationResult( |
histogram_name = |
user_prefs::tracked::kTrackedPrefHistogramNullInitialized; |
break; |
+ case PrefHashStoreTransaction::UNSUPPORTED: |
+ return; |
gab
2016/10/03 21:03:58
This should be NOTREACHED() as well
proberge
2016/10/05 15:36:40
Done.
|
default: |
gab
2016/10/03 21:03:58
And while you're here if you don't mind: remove de
proberge
2016/10/05 15:36:40
I think default:foo is slightly cleaner than addin
gab
2016/10/05 17:23:21
No, the presence of the default prevents clang fro
proberge
2016/10/05 17:53:26
Done, but can't use empty() on a char*. Initialize
|
NOTREACHED() << "Unexpected PrefHashStoreTransaction::ValueState: " |
<< value_state; |