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

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

Issue 324493002: Move preference MACs to the protected preference stores. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to CR comments. 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_impl.h
diff --git a/chrome/browser/prefs/pref_hash_store_impl.h b/chrome/browser/prefs/pref_hash_store_impl.h
index c6483277832c5fc97b4f6c62466d6a779c6d5694..0f420e963d64bb4c8d748759fb868199fbb365c3 100644
--- a/chrome/browser/prefs/pref_hash_store_impl.h
+++ b/chrome/browser/prefs/pref_hash_store_impl.h
@@ -36,33 +36,34 @@ class PrefHashStoreImpl : public PrefHashStore {
};
// Constructs a PrefHashStoreImpl that calculates hashes using
- // |seed| and |device_id| and stores them in |contents|.
- //
- // The same |seed| and |device_id| must be used to load and validate
- // previously stored hashes in |contents|.
+ // |seed| and |device_id|
PrefHashStoreImpl(const std::string& seed,
const std::string& device_id,
- scoped_ptr<HashStoreContents> contents);
+ bool use_super_mac);
virtual ~PrefHashStoreImpl();
- // Clears the contents of this PrefHashStore. |IsInitialized()| will return
- // false after this call.
- void Reset();
+ // Configures this |PrefHashStoreImpl| to store MACs in and retrieve MACs from
+ // |contents|.
+ void SetHashStoreContents(scoped_ptr<HashStoreContents> contents);
// PrefHashStore implementation.
+ virtual bool IsInitialized() const OVERRIDE;
+ virtual void Reset() OVERRIDE;
virtual scoped_ptr<PrefHashStoreTransaction> BeginTransaction() OVERRIDE;
virtual void CommitPendingWrite() OVERRIDE;
- // Returns the current version of this hash store.
- StoreVersion GetCurrentVersion() const;
-
private:
class PrefHashStoreTransactionImpl;
+ bool CheckSuperMac();
+
const PrefHashCalculator pref_hash_calculator_;
scoped_ptr<HashStoreContents> contents_;
- const bool initial_hashes_dictionary_trusted_;
+ bool use_super_mac_;
+
+ bool checked_super_mac_;
+ bool initial_hashes_dictionary_trusted_;
// True if hashes have been modified since the last call to
// CommitPendingWriteIfRequired().

Powered by Google App Engine
This is Rietveld 408576698