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

Side by Side 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: merge up to r248367 Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_PREFS_PREF_HASH_STORE_H_ 5 #ifndef CHROME_BROWSER_PREFS_PREF_HASH_STORE_H_
6 #define CHROME_BROWSER_PREFS_PREF_HASH_STORE_H_ 6 #define CHROME_BROWSER_PREFS_PREF_HASH_STORE_H_
7 7
8 #include <string> 8 #include <string>
9 9 #include <vector>
10 #include "base/memory/scoped_ptr.h"
11 10
12 namespace base { 11 namespace base {
12 class DictionaryValue;
13 class Value; 13 class Value;
14 } // namespace base 14 } // namespace base
15 15
16 namespace internals { 16 namespace internals {
17 17
18 // Hash of hashes for each profile, used to validate the existing hashes when 18 // Hash of hashes for each profile, used to validate the existing hashes when
19 // debating whether an unknown value is to be trusted, will be stored as a 19 // debating whether an unknown value is to be trusted, will be stored as a
20 // string under 20 // string under
21 // |kProfilePreferenceHashes|.|kHashOfHashesPref|.|hash_stored_id_|. 21 // |kProfilePreferenceHashes|.|kHashOfHashesPref|.|hash_stored_id_|.
22 const char kHashOfHashesPref[] = "hash_of_hashes"; 22 const char kHashOfHashesPref[] = "hash_of_hashes";
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // Determines if the hash store has been initialized (contains any values). 54 // Determines if the hash store has been initialized (contains any values).
55 virtual bool IsInitialized() const = 0; 55 virtual bool IsInitialized() const = 0;
56 56
57 // Checks |initial_value| against the existing stored value hash. 57 // Checks |initial_value| against the existing stored value hash.
58 virtual ValueState CheckValue( 58 virtual ValueState CheckValue(
59 const std::string& path, const base::Value* initial_value) const = 0; 59 const std::string& path, const base::Value* initial_value) const = 0;
60 60
61 // Stores a hash of the current |value| of the preference at |path|. 61 // Stores a hash of the current |value| of the preference at |path|.
62 virtual void StoreHash(const std::string& path, 62 virtual void StoreHash(const std::string& path,
63 const base::Value* value) = 0; 63 const base::Value* value) = 0;
64
65 // Checks |initial_value| against the existing stored hashes for the split
66 // preference at |path|. |initial_split_value| being an empty dictionary or
67 // NULL is equivalent. |invalid_keys| must initially be empty. |invalid_keys|
68 // will not be modified unless the return value is CHANGED, in which case it
69 // will be filled with the keys that are considered invalid (unknown or
70 // changed).
71 virtual ValueState CheckSplitValue(
72 const std::string& path,
73 const base::DictionaryValue* initial_split_value,
74 std::vector<std::string>* invalid_keys) const = 0;
75
76 // Stores hashes for the |value| of the split preference at |path|.
77 // |split_value| being an empty dictionary or NULL is equivalent.
78 virtual void StoreSplitHash(
79 const std::string& path,
80 const base::DictionaryValue* split_value) = 0;
64 }; 81 };
65 82
66 #endif // CHROME_BROWSER_PREFS_PREF_HASH_STORE_H_ 83 #endif // CHROME_BROWSER_PREFS_PREF_HASH_STORE_H_
OLDNEW
« no previous file with comments | « chrome/browser/prefs/pref_hash_filter_unittest.cc ('k') | chrome/browser/prefs/pref_hash_store_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698