Chromium Code Reviews| Index: components/user_prefs/tracked/hash_store_contents.h |
| diff --git a/components/user_prefs/tracked/hash_store_contents.h b/components/user_prefs/tracked/hash_store_contents.h |
| index b55a6ebe83807cc82da064c9236f7f153d31e2a0..858664691abf7cf44fa08ca98d70e3998f717b38 100644 |
| --- a/components/user_prefs/tracked/hash_store_contents.h |
| +++ b/components/user_prefs/tracked/hash_store_contents.h |
| @@ -14,6 +14,11 @@ class DictionaryValue; |
| class Value; |
| } // namespace base |
| +enum class HashStoreContentsType : int32_t { |
|
gab
2016/08/08 04:37:45
Can get rid of this now?
proberge
2016/08/31 17:30:16
Done.
|
| + DICTIONARY_HASH_STORE_CONTENTS = 1, |
| + REGISTRY_HASH_STORE_CONTENTS = 2 |
| +}; |
| + |
| // Provides access to the contents of a preference hash store. The store |
| // contains the following data: |
| // Contents: a client-defined dictionary that should map preference names to |
| @@ -24,6 +29,17 @@ class HashStoreContents { |
| public: |
| virtual ~HashStoreContents() {} |
| + // Helper function to make a clone of this object. |
| + // NOTE: this is intended to be used as a lightweight alternative to making |
| + // this class RefCountedThreadSafe. Do not make copies of this object unless |
| + // you can't avoid it. |
|
gab
2016/08/08 04:37:45
In order to make this API cleaner, I'd like us to
proberge
2016/08/31 17:30:16
Done.
|
| + virtual std::unique_ptr<HashStoreContents> MakeCopy() const = 0; |
| + |
| + // Returns the string to append to UMA histograms for this store type. |
|
gab
2016/08/08 04:37:45
"Returns the suffix to be appended"
(the fact tha
proberge
2016/08/31 17:30:16
Done.
|
| + // The returned value must either be an empty string or one of the values in |
| + // histograms.xml's TrackedPreferencesExternalValidators. |
| + virtual std::string GetUMASuffix() const = 0; |
|
gab
2016/08/08 04:37:45
Return a base::StringPiece instead of an std::stri
proberge
2016/08/31 17:30:16
Done.
|
| + |
| // Discards all data related to this hash store. |
| virtual void Reset() = 0; |