Chromium Code Reviews| 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 CHROME_BROWSER_PREFS_PREF_HASH_STORE_TRANSACTION_H_ | 5 #ifndef CHROME_BROWSER_PREFS_PREF_HASH_STORE_TRANSACTION_H_ |
| 6 #define CHROME_BROWSER_PREFS_PREF_HASH_STORE_TRANSACTION_H_ | 6 #define CHROME_BROWSER_PREFS_PREF_HASH_STORE_TRANSACTION_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 44 virtual ~PrefHashStoreTransaction() {} | 44 virtual ~PrefHashStoreTransaction() {} |
| 45 | 45 |
| 46 // Checks |initial_value| against the existing stored value hash. | 46 // Checks |initial_value| against the existing stored value hash. |
| 47 virtual ValueState CheckValue( | 47 virtual ValueState CheckValue( |
| 48 const std::string& path, const base::Value* initial_value) const = 0; | 48 const std::string& path, const base::Value* initial_value) const = 0; |
| 49 | 49 |
| 50 // Stores a hash of the current |value| of the preference at |path|. | 50 // Stores a hash of the current |value| of the preference at |path|. |
| 51 virtual void StoreHash(const std::string& path, | 51 virtual void StoreHash(const std::string& path, |
| 52 const base::Value* value) = 0; | 52 const base::Value* value) = 0; |
| 53 | 53 |
| 54 virtual const base::Value* GetHash(const std::string& path) const = 0; | |
| 55 virtual void ImportHash(const std::string& path, const base::Value* hash) = 0; | |
| 56 virtual void ClearHash(const std::string& path) = 0; | |
| 57 virtual bool StampSuperMac() = 0; | |
|
gab
2014/06/06 21:54:59
Add those methods at the bottom of this file (keep
erikwright (departed)
2014/06/10 20:27:47
Done.
| |
| 58 | |
| 54 // Checks |initial_value| against the existing stored hashes for the split | 59 // Checks |initial_value| against the existing stored hashes for the split |
| 55 // preference at |path|. |initial_split_value| being an empty dictionary or | 60 // preference at |path|. |initial_split_value| being an empty dictionary or |
| 56 // NULL is equivalent. |invalid_keys| must initially be empty. |invalid_keys| | 61 // NULL is equivalent. |invalid_keys| must initially be empty. |invalid_keys| |
| 57 // will not be modified unless the return value is CHANGED, in which case it | 62 // will not be modified unless the return value is CHANGED, in which case it |
| 58 // will be filled with the keys that are considered invalid (unknown or | 63 // will be filled with the keys that are considered invalid (unknown or |
| 59 // changed). | 64 // changed). |
| 60 virtual ValueState CheckSplitValue( | 65 virtual ValueState CheckSplitValue( |
| 61 const std::string& path, | 66 const std::string& path, |
| 62 const base::DictionaryValue* initial_split_value, | 67 const base::DictionaryValue* initial_split_value, |
| 63 std::vector<std::string>* invalid_keys) const = 0; | 68 std::vector<std::string>* invalid_keys) const = 0; |
| 64 | 69 |
| 65 // Stores hashes for the |value| of the split preference at |path|. | 70 // Stores hashes for the |value| of the split preference at |path|. |
| 66 // |split_value| being an empty dictionary or NULL is equivalent. | 71 // |split_value| being an empty dictionary or NULL is equivalent. |
| 67 virtual void StoreSplitHash( | 72 virtual void StoreSplitHash( |
| 68 const std::string& path, | 73 const std::string& path, |
| 69 const base::DictionaryValue* split_value) = 0; | 74 const base::DictionaryValue* split_value) = 0; |
| 70 }; | 75 }; |
| 71 | 76 |
| 72 #endif // CHROME_BROWSER_PREFS_PREF_HASH_STORE_TRANSACTION_H_ | 77 #endif // CHROME_BROWSER_PREFS_PREF_HASH_STORE_TRANSACTION_H_ |
| OLD | NEW |