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 91441c8fb91d5f904ece2420e6d8818e38fa9f17..7dc8680eef5e0a4e02f456257b6f734e2b7901c5 100644 |
| --- a/components/user_prefs/tracked/hash_store_contents.h |
| +++ b/components/user_prefs/tracked/hash_store_contents.h |
| @@ -26,6 +26,15 @@ class HashStoreContents { |
| public: |
| virtual ~HashStoreContents() {} |
| + // Returns true if this implementation of HashStoreContents can be copied via |
| + // MakeCopy(). |
| + virtual bool IsCopyable() const = 0; |
| + |
| + // Returns a copy of this HashStoreContents. Must only be called on |
| + // lightweight implementations(which return true from IsCopyable()) and only |
|
gab
2016/09/16 19:47:32
Space between word and '('
proberge
2016/09/20 21:35:44
Done.
|
| + // in scenarios where a copy cannot be avoided. |
| + virtual std::unique_ptr<HashStoreContents> MakeCopy() const = 0; |
| + |
| // Returns the suffix to be appended to UMA histograms for this store type. |
| // The returned value must either be an empty string or one of the values in |
| // histograms.xml's TrackedPreferencesExternalValidators. |