| Index: components/user_prefs/tracked/mock_validation_delegate.cc
|
| diff --git a/components/user_prefs/tracked/mock_validation_delegate.cc b/components/user_prefs/tracked/mock_validation_delegate.cc
|
| index d2936af55be33e3d98ce79ae1c526791cbe9f6f1..9429537d2ea1c63e332b8308c9f998b71702784a 100644
|
| --- a/components/user_prefs/tracked/mock_validation_delegate.cc
|
| +++ b/components/user_prefs/tracked/mock_validation_delegate.cc
|
| @@ -20,6 +20,16 @@ size_t MockValidationDelegate::CountValidationsOfState(
|
| return count;
|
| }
|
|
|
| +size_t MockValidationDelegate::CountExternalValidationsOfState(
|
| + PrefHashStoreTransaction::ValueState value_state) const {
|
| + size_t count = 0;
|
| + for (size_t i = 0; i < validations_.size(); ++i) {
|
| + if (validations_[i].external_validation_value_state == value_state)
|
| + ++count;
|
| + }
|
| + return count;
|
| +}
|
| +
|
| const MockValidationDelegate::ValidationEvent*
|
| MockValidationDelegate::GetEventForPath(const std::string& pref_path) const {
|
| for (size_t i = 0; i < validations_.size(); ++i) {
|
| @@ -33,9 +43,10 @@ void MockValidationDelegate::OnAtomicPreferenceValidation(
|
| const std::string& pref_path,
|
| const base::Value* value,
|
| PrefHashStoreTransaction::ValueState value_state,
|
| + PrefHashStoreTransaction::ValueState external_validation_value_state,
|
| bool is_personal) {
|
| - RecordValidation(pref_path, value_state, is_personal,
|
| - PrefHashFilter::TRACKING_STRATEGY_ATOMIC);
|
| + RecordValidation(pref_path, value_state, external_validation_value_state,
|
| + is_personal, PrefHashFilter::TRACKING_STRATEGY_ATOMIC);
|
| }
|
|
|
| void MockValidationDelegate::OnSplitPreferenceValidation(
|
| @@ -43,16 +54,19 @@ void MockValidationDelegate::OnSplitPreferenceValidation(
|
| const base::DictionaryValue* dict_value,
|
| const std::vector<std::string>& invalid_keys,
|
| PrefHashStoreTransaction::ValueState value_state,
|
| + PrefHashStoreTransaction::ValueState external_validation_value_state,
|
| bool is_personal) {
|
| - RecordValidation(pref_path, value_state, is_personal,
|
| - PrefHashFilter::TRACKING_STRATEGY_SPLIT);
|
| + RecordValidation(pref_path, value_state, external_validation_value_state,
|
| + is_personal, PrefHashFilter::TRACKING_STRATEGY_SPLIT);
|
| }
|
|
|
| void MockValidationDelegate::RecordValidation(
|
| const std::string& pref_path,
|
| PrefHashStoreTransaction::ValueState value_state,
|
| + PrefHashStoreTransaction::ValueState external_validation_value_state,
|
| bool is_personal,
|
| PrefHashFilter::PrefTrackingStrategy strategy) {
|
| - validations_.push_back(
|
| - ValidationEvent(pref_path, value_state, is_personal, strategy));
|
| + validations_.push_back(ValidationEvent(pref_path, value_state,
|
| + external_validation_value_state,
|
| + is_personal, strategy));
|
| }
|
|
|