Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 HashStoreContents; | |
| 10 class PrefHashStoreTransaction; | 11 class PrefHashStoreTransaction; |
| 11 | 12 |
| 12 // Stores hashes of and verifies preference values via | 13 // Holds the configuration and implementation used to calculate and verify |
| 13 // PrefHashStoreTransactions. | 14 // preference MACs. |
| 14 class PrefHashStore { | 15 class PrefHashStore { |
|
gab
2014/06/17 02:00:05
Add a TODO as such:
// TODO(gab): Rename this cla
erikwright (departed)
2014/06/17 19:07:23
Done.
| |
| 15 public: | 16 public: |
| 16 virtual ~PrefHashStore() {} | 17 virtual ~PrefHashStore() {} |
| 17 | 18 |
| 18 // Returns a PrefHashStoreTransaction which can be used to perform a series | 19 // Returns a PrefHashStoreTransaction which can be used to perform a series |
| 19 // of checks/transformations on the hash store. | 20 // of operations on the hash store. |storage| MAY be used as the backing store |
| 20 virtual scoped_ptr<PrefHashStoreTransaction> BeginTransaction() = 0; | 21 // depending on the implementation. Therefore the HashStoreContents used for |
| 21 | 22 // related transactions should correspond to the same underlying data store. |
| 22 // Commits this store to disk if it has changed since the last call to this | 23 virtual scoped_ptr<PrefHashStoreTransaction> BeginTransaction( |
| 23 // method. | 24 scoped_ptr<HashStoreContents> storage) = 0; |
| 24 virtual void CommitPendingWrite() = 0; | |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 #endif // CHROME_BROWSER_PREFS_PREF_HASH_STORE_H_ | 27 #endif // CHROME_BROWSER_PREFS_PREF_HASH_STORE_H_ |
| OLD | NEW |