| 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;
|
| }
|
|
|