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

Unified Diff: chrome/browser/prefs/pref_hash_store.h

Issue 114223002: Multi-strategy based tracking. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review:erik Created 7 years 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: chrome/browser/prefs/pref_hash_store.h
diff --git a/chrome/browser/prefs/pref_hash_store.h b/chrome/browser/prefs/pref_hash_store.h
index ebef8c0b2bceba521a763fc6a0e75ea3d2ec893e..a6f4f303b61c2739a6ad80b66e4b9406a9c70316 100644
--- a/chrome/browser/prefs/pref_hash_store.h
+++ b/chrome/browser/prefs/pref_hash_store.h
@@ -6,12 +6,12 @@
#define CHROME_BROWSER_PREFS_PREF_HASH_STORE_H_
#include <string>
+#include <vector>
#include "base/memory/scoped_ptr.h"
-class PrefHashTracker;
-
namespace base {
+class DictionaryValue;
class Value;
} // namespace base
@@ -41,9 +41,24 @@ class PrefHashStore {
virtual ValueState CheckValue(
const std::string& path, const base::Value* initial_value) const = 0;
- // Stores a hash of the current value of the preference at |path|.
+ // Stores a hash of the current |value| of the preference at |path|.
virtual void StoreHash(const std::string& path,
const base::Value* value) = 0;
+
+ // Checks |initial_value| against the existing stored hashes for the split
+ // preference at |path|. |invalid_keys| must initially be empty.
Alexei Svitkine (slow) 2013/12/17 18:26:24 Nit: Remove repeated space.
gab 2013/12/17 22:08:08 Done.
+ // If the return value is CHANGED: |invalid_keys| will be filled with the keys
Alexei Svitkine (slow) 2013/12/17 18:26:24 Maybe document the valid return values here? (e.g.
gab 2013/12/17 22:08:08 CLEARED can be return by this; it's when iteration
+ // that are considered invalid (unknown or changed). |invalid_keys| will not
+ // be modified in all other cases.
+ virtual ValueState CheckSplitValue(
+ const std::string& path,
+ const base::DictionaryValue* initial_split_value,
+ std::vector<std::string>* invalid_keys) const = 0;
+
+ // Stores hashes for the |value| of the split preference at |path|.
+ virtual void StoreSplitHash(
+ const std::string& path,
+ const base::DictionaryValue* split_value) = 0;
};
#endif // CHROME_BROWSER_PREFS_PREF_HASH_STORE_H_

Powered by Google App Engine
This is Rietveld 408576698