| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 void Delete(mojo::Array<uint8_t> key, | 93 void Delete(mojo::Array<uint8_t> key, |
| 94 const mojo::String& source, | 94 const mojo::String& source, |
| 95 const DeleteCallback& callback) override; | 95 const DeleteCallback& callback) override; |
| 96 void DeleteAll(const mojo::String& source, | 96 void DeleteAll(const mojo::String& source, |
| 97 const DeleteAllCallback& callback) override; | 97 const DeleteAllCallback& callback) override; |
| 98 void Get(mojo::Array<uint8_t> key, const GetCallback& callback) override; | 98 void Get(mojo::Array<uint8_t> key, const GetCallback& callback) override; |
| 99 void GetAll(const mojo::String& source, | 99 void GetAll(const mojo::String& source, |
| 100 const GetAllCallback& callback) override; | 100 const GetAllCallback& callback) override; |
| 101 | 101 |
| 102 void OnConnectionError(); | 102 void OnConnectionError(); |
| 103 void LoadMap(); | 103 void LoadMap(const base::Closure& completion_callback); |
| 104 void OnLoadComplete(leveldb::DatabaseError status, | 104 void OnLoadComplete(leveldb::DatabaseError status, |
| 105 mojo::Array<leveldb::KeyValuePtr> data); | 105 mojo::Array<leveldb::KeyValuePtr> data); |
| 106 void CreateCommitBatchIfNeeded(); | 106 void CreateCommitBatchIfNeeded(); |
| 107 void StartCommitTimer(); | 107 void StartCommitTimer(); |
| 108 base::TimeDelta ComputeCommitDelay() const; | 108 base::TimeDelta ComputeCommitDelay() const; |
| 109 void CommitChanges(); | 109 void CommitChanges(); |
| 110 void OnCommitComplete(leveldb::DatabaseError error); | 110 void OnCommitComplete(leveldb::DatabaseError error); |
| 111 | 111 |
| 112 std::string prefix_; | 112 std::string prefix_; |
| 113 mojo::BindingSet<mojom::LevelDBWrapper> bindings_; | 113 mojo::BindingSet<mojom::LevelDBWrapper> bindings_; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 127 base::WeakPtrFactory<LevelDBWrapperImpl> weak_ptr_factory_; | 127 base::WeakPtrFactory<LevelDBWrapperImpl> weak_ptr_factory_; |
| 128 | 128 |
| 129 static bool s_aggressive_flushing_enabled_; | 129 static bool s_aggressive_flushing_enabled_; |
| 130 | 130 |
| 131 DISALLOW_COPY_AND_ASSIGN(LevelDBWrapperImpl); | 131 DISALLOW_COPY_AND_ASSIGN(LevelDBWrapperImpl); |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 } // namespace content | 134 } // namespace content |
| 135 | 135 |
| 136 #endif // CONTENT_BROWSER_LEVELDB_WRAPPER_IMPL_H_ | 136 #endif // CONTENT_BROWSER_LEVELDB_WRAPPER_IMPL_H_ |
| OLD | NEW |