| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_PREFS_TRACKED_PREF_SERVICE_HASH_STORE_CONTENTS_H_ | 5 #ifndef CHROME_BROWSER_PREFS_TRACKED_PREF_SERVICE_HASH_STORE_CONTENTS_H_ |
| 6 #define CHROME_BROWSER_PREFS_TRACKED_PREF_SERVICE_HASH_STORE_CONTENTS_H_ | 6 #define CHROME_BROWSER_PREFS_TRACKED_PREF_SERVICE_HASH_STORE_CONTENTS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // Registers required preferences. | 42 // Registers required preferences. |
| 43 static void RegisterPrefs(PrefRegistrySimple* registry); | 43 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 44 | 44 |
| 45 // Deletes stored hashes for all profiles from |pref_service|. | 45 // Deletes stored hashes for all profiles from |pref_service|. |
| 46 static void ResetAllPrefHashStores(PrefService* pref_service); | 46 static void ResetAllPrefHashStores(PrefService* pref_service); |
| 47 | 47 |
| 48 // HashStoreContents implementation | 48 // HashStoreContents implementation |
| 49 virtual std::string hash_store_id() const OVERRIDE; | 49 virtual std::string hash_store_id() const OVERRIDE; |
| 50 virtual void Reset() OVERRIDE; | 50 virtual void Reset() OVERRIDE; |
| 51 virtual bool IsInitialized() const OVERRIDE; | 51 virtual bool IsInitialized() const OVERRIDE; |
| 52 virtual bool GetVersion(int* version) const OVERRIDE; | |
| 53 virtual void SetVersion(int version) OVERRIDE; | |
| 54 virtual const base::DictionaryValue* GetContents() const OVERRIDE; | 52 virtual const base::DictionaryValue* GetContents() const OVERRIDE; |
| 55 virtual scoped_ptr<MutableDictionary> GetMutableContents() OVERRIDE; | 53 virtual scoped_ptr<MutableDictionary> GetMutableContents() OVERRIDE; |
| 56 virtual std::string GetSuperMac() const OVERRIDE; | 54 virtual std::string GetSuperMac() const OVERRIDE; |
| 57 virtual void SetSuperMac(const std::string& super_mac) OVERRIDE; | 55 virtual void SetSuperMac(const std::string& super_mac) OVERRIDE; |
| 58 virtual void CommitPendingWrite() OVERRIDE; | 56 virtual void CommitPendingWrite() OVERRIDE; |
| 59 | 57 |
| 60 private: | 58 private: |
| 61 const std::string hash_store_id_; | 59 const std::string hash_store_id_; |
| 62 PrefService* pref_service_; | 60 PrefService* pref_service_; |
| 63 | 61 |
| 64 DISALLOW_COPY_AND_ASSIGN(PrefServiceHashStoreContents); | 62 DISALLOW_COPY_AND_ASSIGN(PrefServiceHashStoreContents); |
| 65 }; | 63 }; |
| 66 | 64 |
| 67 #endif // CHROME_BROWSER_PREFS_TRACKED_PREF_SERVICE_HASH_STORE_CONTENTS_H_ | 65 #endif // CHROME_BROWSER_PREFS_TRACKED_PREF_SERVICE_HASH_STORE_CONTENTS_H_ |
| OLD | NEW |