Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: content/browser/leveldb_wrapper_impl.h

Issue 2285623002: [Leveldb] Use std::{string,vector} instead of mojo::{String,Array}. (Closed)
Patch Set: Address comments from Yuzhu Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/leveldb/remote_iterator_unittest.cc ('k') | content/browser/leveldb_wrapper_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 void DeleteAll(const std::string& source, 100 void DeleteAll(const std::string& source,
101 const DeleteAllCallback& callback) override; 101 const DeleteAllCallback& callback) override;
102 void Get(const std::vector<uint8_t>& key, 102 void Get(const std::vector<uint8_t>& key,
103 const GetCallback& callback) override; 103 const GetCallback& callback) override;
104 void GetAll(const std::string& source, 104 void GetAll(const std::string& source,
105 const GetAllCallback& callback) override; 105 const GetAllCallback& callback) override;
106 106
107 void OnConnectionError(); 107 void OnConnectionError();
108 void LoadMap(const base::Closure& completion_callback); 108 void LoadMap(const base::Closure& completion_callback);
109 void OnLoadComplete(leveldb::mojom::DatabaseError status, 109 void OnLoadComplete(leveldb::mojom::DatabaseError status,
110 mojo::Array<leveldb::mojom::KeyValuePtr> data); 110 std::vector<leveldb::mojom::KeyValuePtr> data);
111 void CreateCommitBatchIfNeeded(); 111 void CreateCommitBatchIfNeeded();
112 void StartCommitTimer(); 112 void StartCommitTimer();
113 base::TimeDelta ComputeCommitDelay() const; 113 base::TimeDelta ComputeCommitDelay() const;
114 void CommitChanges(); 114 void CommitChanges();
115 void OnCommitComplete(leveldb::mojom::DatabaseError error); 115 void OnCommitComplete(leveldb::mojom::DatabaseError error);
116 116
117 std::string prefix_; 117 std::string prefix_;
118 mojo::BindingSet<mojom::LevelDBWrapper> bindings_; 118 mojo::BindingSet<mojom::LevelDBWrapper> bindings_;
119 mojo::InterfacePtrSet<mojom::LevelDBObserver> observers_; 119 mojo::InterfacePtrSet<mojom::LevelDBObserver> observers_;
120 base::Closure no_bindings_callback_; 120 base::Closure no_bindings_callback_;
(...skipping 11 matching lines...) Expand all
132 base::WeakPtrFactory<LevelDBWrapperImpl> weak_ptr_factory_; 132 base::WeakPtrFactory<LevelDBWrapperImpl> weak_ptr_factory_;
133 133
134 static bool s_aggressive_flushing_enabled_; 134 static bool s_aggressive_flushing_enabled_;
135 135
136 DISALLOW_COPY_AND_ASSIGN(LevelDBWrapperImpl); 136 DISALLOW_COPY_AND_ASSIGN(LevelDBWrapperImpl);
137 }; 137 };
138 138
139 } // namespace content 139 } // namespace content
140 140
141 #endif // CONTENT_BROWSER_LEVELDB_WRAPPER_IMPL_H_ 141 #endif // CONTENT_BROWSER_LEVELDB_WRAPPER_IMPL_H_
OLDNEW
« no previous file with comments | « components/leveldb/remote_iterator_unittest.cc ('k') | content/browser/leveldb_wrapper_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698