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

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: Apply comments from patch set 27 Created 4 years, 2 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..9cc8abba09093e979833ef030a19b20e3195d05d 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
+ // 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.
« no previous file with comments | « components/user_prefs/tracked/dictionary_hash_store_contents.cc ('k') | components/user_prefs/tracked/pref_hash_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698