| OLD | NEW |
| 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 COMPONENTS_USER_PREFS_TRACKED_PREF_HASH_STORE_TRANSACTION_H_ | 5 #ifndef COMPONENTS_USER_PREFS_TRACKED_PREF_HASH_STORE_TRANSACTION_H_ |
| 6 #define COMPONENTS_USER_PREFS_TRACKED_PREF_HASH_STORE_TRANSACTION_H_ | 6 #define COMPONENTS_USER_PREFS_TRACKED_PREF_HASH_STORE_TRANSACTION_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 CHANGED, | 31 CHANGED, |
| 32 // No stored hash exists for the preference value. | 32 // No stored hash exists for the preference value. |
| 33 UNTRUSTED_UNKNOWN_VALUE, | 33 UNTRUSTED_UNKNOWN_VALUE, |
| 34 // No stored hash exists for the preference value, but the current set of | 34 // No stored hash exists for the preference value, but the current set of |
| 35 // hashes stored is trusted and thus this value can safely be seeded. This | 35 // hashes stored is trusted and thus this value can safely be seeded. This |
| 36 // happens when all hashes are already properly seeded and a newly | 36 // happens when all hashes are already properly seeded and a newly |
| 37 // tracked value needs to be seeded). | 37 // tracked value needs to be seeded). |
| 38 TRUSTED_UNKNOWN_VALUE, | 38 TRUSTED_UNKNOWN_VALUE, |
| 39 // NULL values are inherently trusted. | 39 // NULL values are inherently trusted. |
| 40 TRUSTED_NULL_VALUE, | 40 TRUSTED_NULL_VALUE, |
| 41 // This transaction's store type is not supported. |
| 42 UNSUPPORTED, |
| 41 }; | 43 }; |
| 42 | 44 |
| 43 // Finalizes any remaining work after the transaction has been performed. | 45 // Finalizes any remaining work after the transaction has been performed. |
| 44 virtual ~PrefHashStoreTransaction() {} | 46 virtual ~PrefHashStoreTransaction() {} |
| 45 | 47 |
| 46 // Returns the suffix to be appended to UMA histograms for the store contained | 48 // Returns the suffix to be appended to UMA histograms for the store contained |
| 47 // in this transaction. | 49 // in this transaction. |
| 48 virtual base::StringPiece GetStoreUMASuffix() const = 0; | 50 virtual base::StringPiece GetStoreUMASuffix() const = 0; |
| 49 | 51 |
| 50 // Checks |initial_value| against the existing stored value hash. | 52 // Checks |initial_value| against the existing stored value hash. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // Indicates whether the super MAC was successfully verified at the beginning | 93 // Indicates whether the super MAC was successfully verified at the beginning |
| 92 // of this transaction. | 94 // of this transaction. |
| 93 virtual bool IsSuperMACValid() const = 0; | 95 virtual bool IsSuperMACValid() const = 0; |
| 94 | 96 |
| 95 // Forces a valid super MAC to be stored when this transaction terminates. | 97 // Forces a valid super MAC to be stored when this transaction terminates. |
| 96 // Returns true if this results in a change to the store contents. | 98 // Returns true if this results in a change to the store contents. |
| 97 virtual bool StampSuperMac() = 0; | 99 virtual bool StampSuperMac() = 0; |
| 98 }; | 100 }; |
| 99 | 101 |
| 100 #endif // COMPONENTS_USER_PREFS_TRACKED_PREF_HASH_STORE_TRANSACTION_H_ | 102 #endif // COMPONENTS_USER_PREFS_TRACKED_PREF_HASH_STORE_TRANSACTION_H_ |
| OLD | NEW |