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

Unified Diff: chrome/browser/prefs/tracked/dictionary_hash_store_contents.h

Issue 324493002: Move preference MACs to the protected preference stores. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove some now unnecessary changes. 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
Index: chrome/browser/prefs/tracked/dictionary_hash_store_contents.h
diff --git a/chrome/browser/prefs/tracked/dictionary_hash_store_contents.h b/chrome/browser/prefs/tracked/dictionary_hash_store_contents.h
new file mode 100644
index 0000000000000000000000000000000000000000..e9d3ff5f853098a15db106f76f98d6cba5a36779
--- /dev/null
+++ b/chrome/browser/prefs/tracked/dictionary_hash_store_contents.h
@@ -0,0 +1,48 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_PREFS_TRACKED_DICTIONARY_HASH_STORE_CONTENTS_H_
+#define CHROME_BROWSER_PREFS_TRACKED_DICTIONARY_HASH_STORE_CONTENTS_H_
+
+#include <string>
+#include "base/compiler_specific.h"
+#include "base/macros.h"
+#include "chrome/browser/prefs/tracked/hash_store_contents.h"
+
+namespace base {
+class DictionaryValue;
+} // namespace base
+
+namespace user_prefs {
+class PrefRegistrySyncable;
+} // namespace user_prefs
+
+class DictionaryHashStoreContents : public HashStoreContents {
+ public:
+ // A super MAC used to validate the hash store contents when determining
+ // whether an unknown value is to be trusted is stored as a string under
+ // |kSuperMacPref|
gab 2014/06/13 01:57:43 I'd add brackets here to make this slightly more r
erikwright (departed) 2014/06/16 20:51:27 Done.
+ static const char kSuperMacPref[];
+
+ explicit DictionaryHashStoreContents(base::DictionaryValue* storage);
+
+ // Registers required preferences.
+ static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
+
+ // HashStoreContents implementation
+ virtual std::string hash_store_id() const OVERRIDE;
+ virtual void Reset() OVERRIDE;
+ virtual bool IsInitialized() const OVERRIDE;
+ virtual const base::DictionaryValue* GetContents() const OVERRIDE;
+ virtual scoped_ptr<MutableDictionary> GetMutableContents() OVERRIDE;
+ virtual std::string GetSuperMac() const OVERRIDE;
+ virtual void SetSuperMac(const std::string& super_mac) OVERRIDE;
+
+ private:
+ base::DictionaryValue* storage_;
+
+ DISALLOW_COPY_AND_ASSIGN(DictionaryHashStoreContents);
+};
+
+#endif // CHROME_BROWSER_PREFS_TRACKED_DICTIONARY_HASH_STORE_CONTENTS_H_

Powered by Google App Engine
This is Rietveld 408576698