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

Side by Side Diff: chrome/browser/prefs/pref_hash_store.h

Issue 324493002: Move preference MACs to the protected preference stores. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pull some stuff from Persistent to WriteablePrefStore. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_H_ 5 #ifndef CHROME_BROWSER_PREFS_PREF_HASH_STORE_H_
6 #define CHROME_BROWSER_PREFS_PREF_HASH_STORE_H_ 6 #define CHROME_BROWSER_PREFS_PREF_HASH_STORE_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 9
10 class PrefHashStoreTransaction; 10 class PrefHashStoreTransaction;
11 11
12 // Stores hashes of and verifies preference values via 12 // Stores hashes of and verifies preference values via
13 // PrefHashStoreTransactions. 13 // PrefHashStoreTransactions.
14 class PrefHashStore { 14 class PrefHashStore {
15 public: 15 public:
16 virtual ~PrefHashStore() {} 16 virtual ~PrefHashStore() {}
17 17
18 // Returns a PrefHashStoreTransaction which can be used to perform a series 18 // Returns a PrefHashStoreTransaction which can be used to perform a series
19 // of checks/transformations on the hash store. 19 // of checks/transformations on the hash store.
20 virtual scoped_ptr<PrefHashStoreTransaction> BeginTransaction() = 0; 20 virtual scoped_ptr<PrefHashStoreTransaction> BeginTransaction() = 0;
21 21
22 // Determines if the hash store has been initialized (contains any values).
23 virtual bool IsInitialized() const = 0;
24
25 // Clears the contents of this PrefHashStore. |IsInitialized()| will return
26 // false after this call.
27 virtual void Reset() = 0;
28
22 // Commits this store to disk if it has changed since the last call to this 29 // Commits this store to disk if it has changed since the last call to this
23 // method. 30 // method.
24 virtual void CommitPendingWrite() = 0; 31 virtual void CommitPendingWrite() = 0;
25 }; 32 };
26 33
27 #endif // CHROME_BROWSER_PREFS_PREF_HASH_STORE_H_ 34 #endif // CHROME_BROWSER_PREFS_PREF_HASH_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698