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 COMPONENTS_USER_PREFS_TRACKED_HASH_STORE_CONTENTS_H_ | 5 #ifndef COMPONENTS_USER_PREFS_TRACKED_HASH_STORE_CONTENTS_H_ |
6 #define COMPONENTS_USER_PREFS_TRACKED_HASH_STORE_CONTENTS_H_ | 6 #define COMPONENTS_USER_PREFS_TRACKED_HASH_STORE_CONTENTS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 class MutableDictionary { | 29 class MutableDictionary { |
30 public: | 30 public: |
31 virtual ~MutableDictionary() {} | 31 virtual ~MutableDictionary() {} |
32 // Returns the DictionaryValue, which will be created if it does not already | 32 // Returns the DictionaryValue, which will be created if it does not already |
33 // exist. | 33 // exist. |
34 virtual base::DictionaryValue* operator->() = 0; | 34 virtual base::DictionaryValue* operator->() = 0; |
35 }; | 35 }; |
36 | 36 |
37 virtual ~HashStoreContents() {} | 37 virtual ~HashStoreContents() {} |
38 | 38 |
39 // Returns the hash-store ID. May be empty. | |
40 virtual std::string hash_store_id() const = 0; | |
41 | |
42 // Discards all data related to this hash store. | 39 // Discards all data related to this hash store. |
43 virtual void Reset() = 0; | 40 virtual void Reset() = 0; |
44 | 41 |
45 // Indicates whether any data is currently stored for this hash store. | 42 // Indicates whether any data is currently stored for this hash store. |
46 virtual bool IsInitialized() const = 0; | 43 virtual bool IsInitialized() const = 0; |
47 | 44 |
48 // Retrieves the contents of this hash store. May return NULL if the hash | 45 // Retrieves the contents of this hash store. May return NULL if the hash |
49 // store has not been initialized. | 46 // store has not been initialized. |
50 virtual const base::DictionaryValue* GetContents() const = 0; | 47 virtual const base::DictionaryValue* GetContents() const = 0; |
51 | 48 |
52 // Provides mutable access to the contents of this hash store. | 49 // Provides mutable access to the contents of this hash store. |
53 virtual std::unique_ptr<MutableDictionary> GetMutableContents() = 0; | 50 virtual std::unique_ptr<MutableDictionary> GetMutableContents() = 0; |
54 | 51 |
55 // Retrieves the super MAC value previously stored by SetSuperMac. May be | 52 // Retrieves the super MAC value previously stored by SetSuperMac. May be |
56 // empty if no super MAC has been stored. | 53 // empty if no super MAC has been stored. |
57 virtual std::string GetSuperMac() const = 0; | 54 virtual std::string GetSuperMac() const = 0; |
58 | 55 |
59 // Stores a super MAC value for this hash store. | 56 // Stores a super MAC value for this hash store. |
60 virtual void SetSuperMac(const std::string& super_mac) = 0; | 57 virtual void SetSuperMac(const std::string& super_mac) = 0; |
61 }; | 58 }; |
62 | 59 |
63 #endif // COMPONENTS_USER_PREFS_TRACKED_HASH_STORE_CONTENTS_H_ | 60 #endif // COMPONENTS_USER_PREFS_TRACKED_HASH_STORE_CONTENTS_H_ |
OLD | NEW |