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

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

Issue 2396443002: Revert of Integrate registry_hash_store_contents with the rest of tracked prefs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « components/user_prefs/tracked/tracked_split_preference.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/user_prefs/tracked/tracked_split_preference.cc
diff --git a/components/user_prefs/tracked/tracked_split_preference.cc b/components/user_prefs/tracked/tracked_split_preference.cc
index 979f90b2388202740da64264b73c400bf01560ff..7e151e2022f247a955e50341f5abc2f5568ff98c 100644
--- a/components/user_prefs/tracked/tracked_split_preference.cc
+++ b/components/user_prefs/tracked/tracked_split_preference.cc
@@ -27,10 +27,6 @@
delegate_(delegate) {
}
-TrackedPreferenceType TrackedSplitPreference::GetType() const {
- return TrackedPreferenceType::SPLIT;
-}
-
void TrackedSplitPreference::OnNewValue(
const base::Value* value,
PrefHashStoreTransaction* transaction) const {
@@ -44,8 +40,7 @@
bool TrackedSplitPreference::EnforceAndReport(
base::DictionaryValue* pref_store_contents,
- PrefHashStoreTransaction* transaction,
- PrefHashStoreTransaction* external_validation_transaction) const {
+ PrefHashStoreTransaction* transaction) const {
base::DictionaryValue* dict_value = NULL;
if (!pref_store_contents->GetDictionary(pref_path_, &dict_value) &&
pref_store_contents->Get(pref_path_, NULL)) {
@@ -63,26 +58,12 @@
helper_.ReportValidationResult(value_state, transaction->GetStoreUMASuffix());
- PrefHashStoreTransaction::ValueState external_validation_value_state =
- PrefHashStoreTransaction::UNCHANGED;
- if (external_validation_transaction) {
- std::vector<std::string> invalid_external_validation_keys;
- external_validation_value_state =
- external_validation_transaction->CheckSplitValue(
- pref_path_, dict_value, &invalid_external_validation_keys);
- helper_.ReportValidationResult(
- external_validation_value_state,
- external_validation_transaction->GetStoreUMASuffix());
-
- // TODO(proberge): Call delegate_->OnSplitPreferenceValidation.
- }
-
+ TrackedPreferenceHelper::ResetAction reset_action =
+ helper_.GetAction(value_state);
if (delegate_) {
delegate_->OnSplitPreferenceValidation(pref_path_, dict_value, invalid_keys,
value_state, helper_.IsPersonal());
}
- TrackedPreferenceHelper::ResetAction reset_action =
- helper_.GetAction(value_state);
helper_.ReportAction(reset_action);
bool was_reset = false;
@@ -107,16 +88,5 @@
transaction->StoreSplitHash(pref_path_, new_dict_value);
}
- // Update MACs in the external store if there is one and there either was a
- // reset or external validation failed.
- if (external_validation_transaction &&
- (was_reset ||
- external_validation_value_state !=
- PrefHashStoreTransaction::UNCHANGED)) {
- const base::DictionaryValue* new_dict_value = nullptr;
- pref_store_contents->GetDictionary(pref_path_, &new_dict_value);
- external_validation_transaction->StoreSplitHash(pref_path_, new_dict_value);
- }
-
return was_reset;
}
« no previous file with comments | « components/user_prefs/tracked/tracked_split_preference.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698