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_IMPL_H_ | 5 #ifndef CHROME_BROWSER_PREFS_PREF_HASH_STORE_IMPL_H_ |
6 #define CHROME_BROWSER_PREFS_PREF_HASH_STORE_IMPL_H_ | 6 #define CHROME_BROWSER_PREFS_PREF_HASH_STORE_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 virtual ~PrefHashStoreImpl(); | 47 virtual ~PrefHashStoreImpl(); |
48 | 48 |
49 // Clears the contents of this PrefHashStore. |IsInitialized()| will return | 49 // Clears the contents of this PrefHashStore. |IsInitialized()| will return |
50 // false after this call. | 50 // false after this call. |
51 void Reset(); | 51 void Reset(); |
52 | 52 |
53 // PrefHashStore implementation. | 53 // PrefHashStore implementation. |
54 virtual scoped_ptr<PrefHashStoreTransaction> BeginTransaction() OVERRIDE; | 54 virtual scoped_ptr<PrefHashStoreTransaction> BeginTransaction() OVERRIDE; |
55 virtual void CommitPendingWrite() OVERRIDE; | 55 virtual void CommitPendingWrite() OVERRIDE; |
56 | 56 |
57 // Returns the current version of this hash store. | |
58 StoreVersion GetCurrentVersion() const; | |
59 | |
60 private: | 57 private: |
61 class PrefHashStoreTransactionImpl; | 58 class PrefHashStoreTransactionImpl; |
62 | 59 |
63 const PrefHashCalculator pref_hash_calculator_; | 60 const PrefHashCalculator pref_hash_calculator_; |
64 scoped_ptr<HashStoreContents> contents_; | 61 scoped_ptr<HashStoreContents> contents_; |
65 const bool initial_hashes_dictionary_trusted_; | 62 const bool initial_hashes_dictionary_trusted_; |
66 | 63 |
67 // True if hashes have been modified since the last call to | 64 // True if hashes have been modified since the last call to |
68 // CommitPendingWriteIfRequired(). | 65 // CommitPendingWriteIfRequired(). |
69 bool has_pending_write_; | 66 bool has_pending_write_; |
70 | 67 |
71 DISALLOW_COPY_AND_ASSIGN(PrefHashStoreImpl); | 68 DISALLOW_COPY_AND_ASSIGN(PrefHashStoreImpl); |
72 }; | 69 }; |
73 | 70 |
74 #endif // CHROME_BROWSER_PREFS_PREF_HASH_STORE_IMPL_H_ | 71 #endif // CHROME_BROWSER_PREFS_PREF_HASH_STORE_IMPL_H_ |
OLD | NEW |