OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CONTENT_BROWSER_LEVELDB_WRAPPER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_LEVELDB_WRAPPER_IMPL_H_ |
6 #define CONTENT_BROWSER_LEVELDB_WRAPPER_IMPL_H_ | 6 #define CONTENT_BROWSER_LEVELDB_WRAPPER_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 const std::vector<uint8_t>& value, | 96 const std::vector<uint8_t>& value, |
97 const std::string& source, | 97 const std::string& source, |
98 const PutCallback& callback) override; | 98 const PutCallback& callback) override; |
99 void Delete(const std::vector<uint8_t>& key, | 99 void Delete(const std::vector<uint8_t>& key, |
100 const std::string& source, | 100 const std::string& source, |
101 const DeleteCallback& callback) override; | 101 const DeleteCallback& callback) override; |
102 void DeleteAll(const std::string& source, | 102 void DeleteAll(const std::string& source, |
103 const DeleteAllCallback& callback) override; | 103 const DeleteAllCallback& callback) override; |
104 void Get(const std::vector<uint8_t>& key, | 104 void Get(const std::vector<uint8_t>& key, |
105 const GetCallback& callback) override; | 105 const GetCallback& callback) override; |
106 void GetAll(const std::string& source, | 106 void GetAll( |
107 const GetAllCallback& callback) override; | 107 mojom::LevelDBWrapperGetAllCallbackAssociatedPtrInfo complete_callback, |
| 108 const GetAllCallback& callback) override; |
108 | 109 |
109 void OnConnectionError(); | 110 void OnConnectionError(); |
110 void LoadMap(const base::Closure& completion_callback); | 111 void LoadMap(const base::Closure& completion_callback); |
111 void OnLoadComplete(leveldb::mojom::DatabaseError status, | 112 void OnLoadComplete(leveldb::mojom::DatabaseError status, |
112 std::vector<leveldb::mojom::KeyValuePtr> data); | 113 std::vector<leveldb::mojom::KeyValuePtr> data); |
113 void CreateCommitBatchIfNeeded(); | 114 void CreateCommitBatchIfNeeded(); |
114 void StartCommitTimer(); | 115 void StartCommitTimer(); |
115 base::TimeDelta ComputeCommitDelay() const; | 116 base::TimeDelta ComputeCommitDelay() const; |
116 void CommitChanges(); | 117 void CommitChanges(); |
117 void OnCommitComplete(leveldb::mojom::DatabaseError error); | 118 void OnCommitComplete(leveldb::mojom::DatabaseError error); |
(...skipping 16 matching lines...) Expand all Loading... |
134 base::WeakPtrFactory<LevelDBWrapperImpl> weak_ptr_factory_; | 135 base::WeakPtrFactory<LevelDBWrapperImpl> weak_ptr_factory_; |
135 | 136 |
136 static bool s_aggressive_flushing_enabled_; | 137 static bool s_aggressive_flushing_enabled_; |
137 | 138 |
138 DISALLOW_COPY_AND_ASSIGN(LevelDBWrapperImpl); | 139 DISALLOW_COPY_AND_ASSIGN(LevelDBWrapperImpl); |
139 }; | 140 }; |
140 | 141 |
141 } // namespace content | 142 } // namespace content |
142 | 143 |
143 #endif // CONTENT_BROWSER_LEVELDB_WRAPPER_IMPL_H_ | 144 #endif // CONTENT_BROWSER_LEVELDB_WRAPPER_IMPL_H_ |
OLD | NEW |