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

Unified Diff: chrome/browser/prefs/pref_hash_store_transaction.h

Issue 324493002: Move preference MACs to the protected preference stores. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment typo. Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/prefs/pref_hash_store_transaction.h
diff --git a/chrome/browser/prefs/pref_hash_store_transaction.h b/chrome/browser/prefs/pref_hash_store_transaction.h
index 10022aae836311844aca1cd31ea2769453f5ab4d..597cbcb3aef5ad052e8fd4841d8383409a60f92a 100644
--- a/chrome/browser/prefs/pref_hash_store_transaction.h
+++ b/chrome/browser/prefs/pref_hash_store_transaction.h
@@ -67,6 +67,32 @@ class PrefHashStoreTransaction {
virtual void StoreSplitHash(
const std::string& path,
const base::DictionaryValue* split_value) = 0;
+
+ // Indicates whether the store contains a hash for the preference at |path|.
+ virtual bool HasHash(const std::string& path) const = 0;
+
+ // Sets the hash for the preference at |path|.
+ // If |path| is a split preference |hash| must be a DictionaryValue whose
+ // keys are keys in the split preference and whose values are MACs of the
+ // corresponding values in the split preference.
+ // If |path| is an atomic preference |hash| must be a StringValue
+ // containing a MAC of the preference value.
+ // |hash| should originate from a PrefHashStore sharing the same MAC
+ // parameters as this transaction's store.
+ // The (in)validity of the super MAC will be maintained by this call.
+ virtual void ImportHash(const std::string& path, const base::Value* hash) = 0;
+
+ // Removes the hash stored at |path|. The (in)validity of the super MAC will
+ // be maintained by this call.
+ virtual void ClearHash(const std::string& path) = 0;
+
+ // Indicates whether the super MAC was successfully verified at the beginning
+ // of this transaction.
+ virtual bool IsSuperMACValid() const = 0;
+
+ // Forces a valid super MAC to be stored when this transaction terminates.
+ // Returns true if this results in a change to the store contents.
+ virtual bool StampSuperMac() = 0;
};
#endif // CHROME_BROWSER_PREFS_PREF_HASH_STORE_TRANSACTION_H_
« no previous file with comments | « chrome/browser/prefs/pref_hash_store_impl_unittest.cc ('k') | chrome/browser/prefs/profile_pref_store_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698