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 COMPONENTS_PREFS_TRACKED_PREF_HASH_STORE_H_ | 5 #ifndef COMPONENTS_PREFS_TRACKED_PREF_HASH_STORE_H_ |
6 #define COMPONENTS_PREFS_TRACKED_PREF_HASH_STORE_H_ | 6 #define COMPONENTS_PREFS_TRACKED_PREF_HASH_STORE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 class HashStoreContents; | 10 class HashStoreContents; |
11 class PrefHashStoreTransaction; | 11 class PrefHashStoreTransaction; |
12 | 12 |
13 // Holds the configuration and implementation used to calculate and verify | 13 // Holds the configuration and implementation used to calculate and verify |
14 // preference MACs. | 14 // preference MACs. |
15 // TODO(gab): Rename this class as it is no longer a store. | 15 // TODO(gab): Rename this class as it is no longer a store. |
16 class PrefHashStore { | 16 class PrefHashStore { |
17 public: | 17 public: |
18 virtual ~PrefHashStore() {} | 18 virtual ~PrefHashStore() {} |
19 | 19 |
20 // Returns a PrefHashStoreTransaction which can be used to perform a series | 20 // Returns a PrefHashStoreTransaction which can be used to perform a series |
21 // of operations on the hash store. |storage| MAY be used as the backing store | 21 // of operations on the hash store. |storage| MAY be used as the backing store |
22 // depending on the implementation. Therefore the HashStoreContents used for | 22 // depending on the implementation. Therefore the HashStoreContents used for |
23 // related transactions should correspond to the same underlying data store. | 23 // related transactions should correspond to the same underlying data store. |
24 // Does not own the HashStoreContents; callers must ensure transaction must | |
25 // not outlive |storage|. | |
gab
2016/09/01 20:31:50
Raw pointer in Chromium always implies lack of own
proberge
2016/09/06 19:24:10
Done.
| |
24 virtual std::unique_ptr<PrefHashStoreTransaction> BeginTransaction( | 26 virtual std::unique_ptr<PrefHashStoreTransaction> BeginTransaction( |
25 std::unique_ptr<HashStoreContents> storage) = 0; | 27 HashStoreContents* storage) = 0; |
26 }; | 28 }; |
27 | 29 |
28 #endif // COMPONENTS_PREFS_TRACKED_PREF_HASH_STORE_H_ | 30 #endif // COMPONENTS_PREFS_TRACKED_PREF_HASH_STORE_H_ |
OLD | NEW |