Index: chrome/browser/prefs/pref_hash_filter.h |
diff --git a/chrome/browser/prefs/pref_hash_filter.h b/chrome/browser/prefs/pref_hash_filter.h |
index 217396fdcb77733007ef3b9332822dc548d54bea..f3945571cb9362d4b49ccc99f7c0d5d6bff8387f 100644 |
--- a/chrome/browser/prefs/pref_hash_filter.h |
+++ b/chrome/browser/prefs/pref_hash_filter.h |
@@ -12,10 +12,11 @@ |
#include "base/basictypes.h" |
#include "base/compiler_specific.h" |
#include "base/containers/scoped_ptr_hash_map.h" |
+#include "base/memory/scoped_ptr.h" |
#include "chrome/browser/prefs/interceptable_pref_filter.h" |
-#include "chrome/browser/prefs/pref_hash_store.h" |
#include "chrome/browser/prefs/tracked/tracked_preference.h" |
+class PrefHashStore; |
class PrefService; |
class PrefStore; |
class TrackedPreferenceValidationDelegate; |
@@ -60,12 +61,15 @@ class PrefHashFilter : public InterceptablePrefFilter { |
// using |pref_hash_store| to check/store hashes. An optional |delegate| is |
// notified of the status of each preference as it is checked. |
// |reporting_ids_count| is the count of all possible IDs (possibly greater |
- // than |tracked_preferences.size()|). |
+ // than |tracked_preferences.size()|). If |report_super_mac_validity| is true, |
+ // the state of the super MAC will be reported via UMA during |
+ // FinalizeFilterOnLoad. |
PrefHashFilter( |
scoped_ptr<PrefHashStore> pref_hash_store, |
const std::vector<TrackedPreferenceMetadata>& tracked_preferences, |
TrackedPreferenceValidationDelegate* delegate, |
- size_t reporting_ids_count); |
+ size_t reporting_ids_count, |
+ bool report_super_mac_validity); |
virtual ~PrefHashFilter(); |
@@ -81,13 +85,14 @@ class PrefHashFilter : public InterceptablePrefFilter { |
static void ClearResetTime(PrefService* user_prefs); |
// Initializes the PrefHashStore with hashes of the tracked preferences in |
- // |pref_store|. |
- void Initialize(const PrefStore& pref_store); |
+ // |pref_store_contents|. |pref_store_contents| will be the |storage| passed |
+ // to PrefHashStore::BeginTransaction(). |
+ void Initialize(base::DictionaryValue* pref_store_contents); |
// PrefFilter remaining implementation. |
virtual void FilterUpdate(const std::string& path) OVERRIDE; |
virtual void FilterSerializeData( |
- const base::DictionaryValue* pref_store_contents) OVERRIDE; |
+ base::DictionaryValue* pref_store_contents) OVERRIDE; |
private: |
// InterceptablePrefFilter implementation. |
@@ -117,6 +122,9 @@ class PrefHashFilter : public InterceptablePrefFilter { |
// FilterSerializeData. |
ChangedPathsMap changed_paths_; |
+ // Whether to report the validity of the super MAC at load time (via UMA). |
+ bool report_super_mac_validity_; |
+ |
DISALLOW_COPY_AND_ASSIGN(PrefHashFilter); |
}; |