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

Side by Side 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: New approach. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_PREFS_TRACKED_DICTIONARY_HASH_STORE_CONTENTS_H_
6 #define CHROME_BROWSER_PREFS_TRACKED_DICTIONARY_HASH_STORE_CONTENTS_H_
7
8 #include <string>
9 #include "base/compiler_specific.h"
10 #include "base/macros.h"
11 #include "chrome/browser/prefs/tracked/hash_store_contents.h"
12
13 namespace base {
14 class DictionaryValue;
15 } // namespace base
16
17 namespace user_prefs {
18 class PrefRegistrySyncable;
19 } // namespace user_prefs
20
21 class DictionaryHashStoreContents : public HashStoreContents {
22 public:
23 // A super MAC used to validate the hash store contents when determining
24 // whether an unknown value is to be trusted is stored as a string under
25 // |kSuperMacPref|
26 static const char kSuperMacPref[];
27
28 explicit DictionaryHashStoreContents(base::DictionaryValue* storage);
29
30 // Registers required preferences.
31 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
32
33 // HashStoreContents implementation
34 virtual std::string hash_store_id() const OVERRIDE;
35 virtual void Reset() OVERRIDE;
36 virtual bool IsInitialized() const OVERRIDE;
37 virtual const base::DictionaryValue* GetContents() const OVERRIDE;
38 virtual scoped_ptr<MutableDictionary> GetMutableContents() OVERRIDE;
39 virtual std::string GetSuperMac() const OVERRIDE;
40 virtual void SetSuperMac(const std::string& super_mac) OVERRIDE;
41
42 private:
43 base::DictionaryValue* storage_;
44
45 DISALLOW_COPY_AND_ASSIGN(DictionaryHashStoreContents);
46 };
47
48 #endif // CHROME_BROWSER_PREFS_TRACKED_DICTIONARY_HASH_STORE_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698