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

Unified Diff: chrome/browser/prefs/pref_hash_filter.h

Issue 324493002: Move preference MACs to the protected preference stores. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment typo. Created 6 years, 6 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 | « base/prefs/writeable_pref_store.h ('k') | chrome/browser/prefs/pref_hash_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « base/prefs/writeable_pref_store.h ('k') | chrome/browser/prefs/pref_hash_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698