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

Side by Side Diff: chrome/browser/prefs/tracked/pref_hash_store_transaction.h

Issue 617183005: Split the NullInitialized signal out of TrustedInitialized. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@c1_move_to_tracked
Patch Set: fix PrefHashBrowserTest Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_TRACKED_PREF_HASH_STORE_TRANSACTION_H_ 5 #ifndef CHROME_BROWSER_PREFS_TRACKED_PREF_HASH_STORE_TRANSACTION_H_
6 #define CHROME_BROWSER_PREFS_TRACKED_PREF_HASH_STORE_TRANSACTION_H_ 6 #define CHROME_BROWSER_PREFS_TRACKED_PREF_HASH_STORE_TRANSACTION_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 14 matching lines...) Expand all
25 // calculated using a deprecated hash algorithm which is just as safe as 25 // calculated using a deprecated hash algorithm which is just as safe as
26 // the current one. 26 // the current one.
27 SECURE_LEGACY, 27 SECURE_LEGACY,
28 // The preference value has been changed since the last hash. 28 // The preference value has been changed since the last hash.
29 CHANGED, 29 CHANGED,
30 // No stored hash exists for the preference value. 30 // No stored hash exists for the preference value.
31 UNTRUSTED_UNKNOWN_VALUE, 31 UNTRUSTED_UNKNOWN_VALUE,
32 // No stored hash exists for the preference value, but the current set of 32 // No stored hash exists for the preference value, but the current set of
33 // hashes stored is trusted and thus this value can safely be seeded. This 33 // hashes stored is trusted and thus this value can safely be seeded. This
34 // happens when all hashes are already properly seeded and a newly 34 // happens when all hashes are already properly seeded and a newly
35 // tracked value needs to be seeded). NULL values are inherently trusted as 35 // tracked value needs to be seeded).
36 // well.
37 TRUSTED_UNKNOWN_VALUE, 36 TRUSTED_UNKNOWN_VALUE,
37 // NULL values are inherently trusted.
38 TRUSTED_NULL_VALUE,
38 }; 39 };
39 40
40 // Finalizes any remaining work after the transaction has been performed. 41 // Finalizes any remaining work after the transaction has been performed.
41 virtual ~PrefHashStoreTransaction() {} 42 virtual ~PrefHashStoreTransaction() {}
42 43
43 // Checks |initial_value| against the existing stored value hash. 44 // Checks |initial_value| against the existing stored value hash.
44 virtual ValueState CheckValue( 45 virtual ValueState CheckValue(
45 const std::string& path, const base::Value* initial_value) const = 0; 46 const std::string& path, const base::Value* initial_value) const = 0;
46 47
47 // Stores a hash of the current |value| of the preference at |path|. 48 // Stores a hash of the current |value| of the preference at |path|.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // Indicates whether the super MAC was successfully verified at the beginning 87 // Indicates whether the super MAC was successfully verified at the beginning
87 // of this transaction. 88 // of this transaction.
88 virtual bool IsSuperMACValid() const = 0; 89 virtual bool IsSuperMACValid() const = 0;
89 90
90 // Forces a valid super MAC to be stored when this transaction terminates. 91 // Forces a valid super MAC to be stored when this transaction terminates.
91 // Returns true if this results in a change to the store contents. 92 // Returns true if this results in a change to the store contents.
92 virtual bool StampSuperMac() = 0; 93 virtual bool StampSuperMac() = 0;
93 }; 94 };
94 95
95 #endif // CHROME_BROWSER_PREFS_TRACKED_PREF_HASH_STORE_TRANSACTION_H_ 96 #endif // CHROME_BROWSER_PREFS_TRACKED_PREF_HASH_STORE_TRANSACTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698