Index: chrome/browser/prefs/pref_hash_filter.cc |
diff --git a/chrome/browser/prefs/pref_hash_filter.cc b/chrome/browser/prefs/pref_hash_filter.cc |
index e35df37edb45769367d2673f109a1097ab88b4e1..e42d52a9db61ca2875028526edf0c265827cdfb3 100644 |
--- a/chrome/browser/prefs/pref_hash_filter.cc |
+++ b/chrome/browser/prefs/pref_hash_filter.cc |
@@ -16,6 +16,7 @@ |
#include "base/values.h" |
#include "chrome/browser/prefs/pref_hash_store_transaction.h" |
#include "chrome/browser/prefs/tracked/tracked_atomic_preference.h" |
+#include "chrome/browser/prefs/tracked/tracked_preference_validation_observer.h" |
#include "chrome/browser/prefs/tracked/tracked_split_preference.h" |
#include "chrome/common/pref_names.h" |
#include "components/user_prefs/pref_registry_syncable.h" |
@@ -23,8 +24,9 @@ |
PrefHashFilter::PrefHashFilter( |
scoped_ptr<PrefHashStore> pref_hash_store, |
const std::vector<TrackedPreferenceMetadata>& tracked_preferences, |
+ scoped_ptr<TrackedPreferenceValidationObserver> observer, |
size_t reporting_ids_count) |
- : pref_hash_store_(pref_hash_store.Pass()) { |
+ : pref_hash_store_(pref_hash_store.Pass()), observer_(observer.Pass()) { |
DCHECK(pref_hash_store_); |
DCHECK_GE(reporting_ids_count, tracked_preferences.size()); |
@@ -111,7 +113,8 @@ void PrefHashFilter::MigrateValues(PersistentPrefStore* source, |
temp_dictionary.Set(it->first, source_value->DeepCopy()); |
// Check whether the value is correct according to our MAC. May remove |
// the value from |temp_dictionary|. |
- it->second->EnforceAndReport(&temp_dictionary, transaction.get()); |
+ it->second->EnforceAndReport( |
+ &temp_dictionary, transaction.get(), observer_.get()); |
// Now take the value as it appears in |temp_dictionary| and put it in |
// |destination|. |
scoped_ptr<base::Value> checked_value; |
@@ -163,7 +166,8 @@ bool PrefHashFilter::FilterOnLoad(base::DictionaryValue* pref_store_contents) { |
for (TrackedPreferencesMap::const_iterator it = tracked_paths_.begin(); |
it != tracked_paths_.end(); ++it) { |
if (it->second->EnforceAndReport(pref_store_contents, |
- hash_store_transaction.get())) { |
+ hash_store_transaction.get(), |
+ observer_.get())) { |
did_reset = true; |
} |
} |