| 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 2024a7d9ce79da0046a03efe515e9a0711979d87..3e5cc262ae719bf00d5ca3a33f8e5fb91f8bae8f 100644
|
| --- a/components/user_prefs/tracked/pref_hash_store.h
|
| +++ b/components/user_prefs/tracked/pref_hash_store.h
|
| @@ -6,9 +6,12 @@
|
| #define COMPONENTS_PREFS_TRACKED_PREF_HASH_STORE_H_
|
|
|
| #include <memory>
|
| +#include <string>
|
| +
|
| +#include "base/values.h"
|
| +#include "components/user_prefs/tracked/pref_hash_store_transaction.h"
|
|
|
| class HashStoreContents;
|
| -class PrefHashStoreTransaction;
|
|
|
| // Holds the configuration and implementation used to calculate and verify
|
| // preference MACs.
|
| @@ -24,6 +27,21 @@ class PrefHashStore {
|
| // |storage| must outlive the returned transaction.
|
| virtual std::unique_ptr<PrefHashStoreTransaction> BeginTransaction(
|
| 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,
|
| + 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(
|
| + const std::string& path,
|
| + const base::DictionaryValue* split_values) = 0;
|
| };
|
|
|
| #endif // COMPONENTS_PREFS_TRACKED_PREF_HASH_STORE_H_
|
|
|