Index: components/user_prefs/tracked/pref_hash_store.h |
diff --git a/components/user_prefs/tracked/pref_hash_store.h b/components/user_prefs/tracked/pref_hash_store.h |
index 2fdc617301ae1fea64526ae16fe5d6621c272406..e465a6daa502ebe0a66855cabc368512887cc7a1 100644 |
--- a/components/user_prefs/tracked/pref_hash_store.h |
+++ b/components/user_prefs/tracked/pref_hash_store.h |
@@ -7,6 +7,8 @@ |
#include <memory> |
+#include "base/values.h" |
gab
2016/09/01 21:21:56
fwd-decl instead:
namespace base {
class Dictiona
proberge
2016/09/06 18:43:38
Done. This whole include vs fwd-decl is still very
gab
2016/09/06 20:08:04
The concept is known as IWUY (include-what-you-use
|
+ |
class HashStoreContents; |
class PrefHashStoreTransaction; |
@@ -23,6 +25,21 @@ class PrefHashStore { |
// related transactions should correspond to the same underlying data store. |
virtual std::unique_ptr<PrefHashStoreTransaction> BeginTransaction( |
std::unique_ptr<HashStoreContents> storage) = 0; |
+ |
+ // Computes the MAC to be associated with |path| and |value| in this store. |
+ // PrefHashStoreTransaction typically uses this internally but it's also |
+ // exposed for users that want to compute MACs ahead of time for asynchronous |
+ // operations. |
+ virtual std::string ComputeMac(const std::string& path, |
gab
2016/09/01 21:21:56
#include <string>
(can't fwd-decl lib types)
proberge
2016/09/06 18:43:39
Done.
|
+ const base::Value* value) = 0; |
+ |
+ // Computes the MAC to be associated with |path| and |split_values| in this |
+ // store. PrefHashStoreTransaction typically uses this internally but it's |
+ // also exposed for users that want to compute MACs ahead of time for |
+ // asynchronous operations. |
+ virtual std::unique_ptr<base::DictionaryValue> ComputeSplitMacs( |
gab
2016/09/06 20:08:04
Also, based on above discussion I just realized th
proberge
2016/09/07 18:00:56
Done.
|
+ const std::string& path, |
+ const base::DictionaryValue* split_values) = 0; |
}; |
#endif // COMPONENTS_PREFS_TRACKED_PREF_HASH_STORE_H_ |