OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_BROWSER_VALUE_STORE_VALUE_STORE_H_ | 5 #ifndef EXTENSIONS_BROWSER_VALUE_STORE_VALUE_STORE_H_ |
6 #define EXTENSIONS_BROWSER_VALUE_STORE_VALUE_STORE_H_ | 6 #define EXTENSIONS_BROWSER_VALUE_STORE_VALUE_STORE_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 |
8 #include <string> | 10 #include <string> |
9 #include <utility> | 11 #include <utility> |
10 #include <vector> | 12 #include <vector> |
11 | 13 |
| 14 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
13 #include "base/values.h" | 16 #include "base/values.h" |
14 #include "extensions/browser/value_store/value_store_change.h" | 17 #include "extensions/browser/value_store/value_store_change.h" |
15 | 18 |
16 // Interface for a storage area for Value objects. | 19 // Interface for a storage area for Value objects. |
17 class ValueStore { | 20 class ValueStore { |
18 public: | 21 public: |
19 // Status codes returned from storage methods. | 22 // Status codes returned from storage methods. |
20 enum StatusCode { | 23 enum StatusCode { |
21 OK, | 24 OK, |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 virtual WriteResult Remove(const std::string& key) = 0; | 202 virtual WriteResult Remove(const std::string& key) = 0; |
200 | 203 |
201 // Removes multiple keys from the storage. | 204 // Removes multiple keys from the storage. |
202 virtual WriteResult Remove(const std::vector<std::string>& keys) = 0; | 205 virtual WriteResult Remove(const std::vector<std::string>& keys) = 0; |
203 | 206 |
204 // Clears the storage. | 207 // Clears the storage. |
205 virtual WriteResult Clear() = 0; | 208 virtual WriteResult Clear() = 0; |
206 }; | 209 }; |
207 | 210 |
208 #endif // EXTENSIONS_BROWSER_VALUE_STORE_VALUE_STORE_H_ | 211 #endif // EXTENSIONS_BROWSER_VALUE_STORE_VALUE_STORE_H_ |
OLD | NEW |