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

Unified Diff: components/user_prefs/tracked/hash_store_contents.h

Issue 2204943002: Integrate registry_hash_store_contents with the rest of tracked prefs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased and added important_file_writer CL as dependent patchset Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698