OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EXTENSIONS_SETTINGS_SETTINGS_LEVELDB_STORAGE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_LEVELDB_STORAGE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_LEVELDB_STORAGE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_LEVELDB_STORAGE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 private: | 32 private: |
33 // SettingsStorageFactory is refcounted. | 33 // SettingsStorageFactory is refcounted. |
34 virtual ~Factory() {} | 34 virtual ~Factory() {} |
35 }; | 35 }; |
36 | 36 |
37 // Must be deleted on the FILE thread. | 37 // Must be deleted on the FILE thread. |
38 virtual ~SettingsLeveldbStorage(); | 38 virtual ~SettingsLeveldbStorage(); |
39 | 39 |
40 // SettingsStorage implementation. | 40 // SettingsStorage implementation. |
| 41 virtual size_t GetBytesInUse(const std::string& key) OVERRIDE; |
| 42 virtual size_t GetBytesInUse(const std::vector<std::string>& keys) OVERRIDE; |
| 43 virtual size_t GetBytesInUse() OVERRIDE; |
41 virtual ReadResult Get(const std::string& key) OVERRIDE; | 44 virtual ReadResult Get(const std::string& key) OVERRIDE; |
42 virtual ReadResult Get(const std::vector<std::string>& keys) OVERRIDE; | 45 virtual ReadResult Get(const std::vector<std::string>& keys) OVERRIDE; |
43 virtual ReadResult Get() OVERRIDE; | 46 virtual ReadResult Get() OVERRIDE; |
44 virtual WriteResult Set( | 47 virtual WriteResult Set( |
45 WriteOptions options, | 48 WriteOptions options, |
46 const std::string& key, | 49 const std::string& key, |
47 const Value& value) OVERRIDE; | 50 const Value& value) OVERRIDE; |
48 virtual WriteResult Set( | 51 virtual WriteResult Set( |
49 WriteOptions options, const DictionaryValue& values) OVERRIDE; | 52 WriteOptions options, const DictionaryValue& values) OVERRIDE; |
50 virtual WriteResult Remove(const std::string& key) OVERRIDE; | 53 virtual WriteResult Remove(const std::string& key) OVERRIDE; |
(...skipping 22 matching lines...) Expand all Loading... |
73 | 76 |
74 // leveldb backend. | 77 // leveldb backend. |
75 scoped_ptr<leveldb::DB> db_; | 78 scoped_ptr<leveldb::DB> db_; |
76 | 79 |
77 DISALLOW_COPY_AND_ASSIGN(SettingsLeveldbStorage); | 80 DISALLOW_COPY_AND_ASSIGN(SettingsLeveldbStorage); |
78 }; | 81 }; |
79 | 82 |
80 } // namespace extensions | 83 } // namespace extensions |
81 | 84 |
82 #endif // CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_LEVELDB_STORAGE_H_ | 85 #endif // CHROME_BROWSER_EXTENSIONS_SETTINGS_SETTINGS_LEVELDB_STORAGE_H_ |
OLD | NEW |