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

Unified Diff: chrome/browser/prefs/tracked/tracked_preference_helper.cc

Issue 147053005: Coarser levels for the SettingsEnforcement field trial. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: constantify trial/group names Created 6 years, 10 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
« no previous file with comments | « chrome/browser/prefs/tracked/tracked_preference_helper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/tracked/tracked_preference_helper.cc
diff --git a/chrome/browser/prefs/tracked/tracked_preference_helper.cc b/chrome/browser/prefs/tracked/tracked_preference_helper.cc
index 3cec59bb98c9c31480ed3b96579bdc9c94569392..a9cec9cbed2ccf07d71a0761a1736f9320e898cf 100644
--- a/chrome/browser/prefs/tracked/tracked_preference_helper.cc
+++ b/chrome/browser/prefs/tracked/tracked_preference_helper.cc
@@ -14,10 +14,7 @@ TrackedPreferenceHelper::TrackedPreferenceHelper(
PrefHashFilter::EnforcementLevel enforcement_level)
: pref_path_(pref_path),
reporting_id_(reporting_id), reporting_ids_count_(reporting_ids_count),
- allow_changes_(enforcement_level < PrefHashFilter::ENFORCE),
- allow_seeding_(enforcement_level < PrefHashFilter::ENFORCE_NO_SEEDING),
- allow_migration_(enforcement_level <
- PrefHashFilter::ENFORCE_NO_SEEDING_NO_MIGRATION) {
+ enforce_(enforcement_level == PrefHashFilter::ENFORCE_ON_LOAD) {
}
TrackedPreferenceHelper::ResetAction TrackedPreferenceHelper::GetAction(
@@ -32,12 +29,10 @@ TrackedPreferenceHelper::ResetAction TrackedPreferenceHelper::GetAction(
case PrefHashStoreTransaction::TRUSTED_UNKNOWN_VALUE:
// It is okay to seed the hash in this case.
return DONT_RESET;
- case PrefHashStoreTransaction::MIGRATED:
- return allow_migration_ ? WANTED_RESET : DO_RESET;
- case PrefHashStoreTransaction::UNTRUSTED_UNKNOWN_VALUE:
- return allow_seeding_ ? WANTED_RESET : DO_RESET;
+ case PrefHashStoreTransaction::MIGRATED: // Falls through.
+ case PrefHashStoreTransaction::UNTRUSTED_UNKNOWN_VALUE: // Falls through.
case PrefHashStoreTransaction::CHANGED:
- return allow_changes_ ? WANTED_RESET : DO_RESET;
+ return enforce_ ? DO_RESET : WANTED_RESET;
}
NOTREACHED() << "Unexpected PrefHashStoreTransaction::ValueState: "
<< value_state;
« no previous file with comments | « chrome/browser/prefs/tracked/tracked_preference_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698