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

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

Issue 1875463002: Remove unused fields from //content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scythe-root
Patch Set: Fixed Ozone build. Created 4 years, 8 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
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 #include "content/browser/leveldb_wrapper_impl.h" 5 #include "content/browser/leveldb_wrapper_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "mojo/common/common_type_converters.h" 8 #include "mojo/common/common_type_converters.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 LevelDBWrapperImpl::LevelDBWrapperImpl( 12 LevelDBWrapperImpl::LevelDBWrapperImpl(
13 leveldb::LevelDBDatabase* database,
14 const std::string& prefix, 13 const std::string& prefix,
15 size_t max_size, 14 size_t max_size,
16 const base::Closure& no_bindings_callback) 15 const base::Closure& no_bindings_callback)
17 : prefix_(prefix), 16 : prefix_(prefix),
18 no_bindings_callback_(no_bindings_callback), 17 no_bindings_callback_(no_bindings_callback),
19 database_(database),
20 bytes_used_(0), 18 bytes_used_(0),
21 max_size_(max_size) { 19 max_size_(max_size) {
22 bindings_.set_connection_error_handler(base::Bind( 20 bindings_.set_connection_error_handler(base::Bind(
23 &LevelDBWrapperImpl::OnConnectionError, base::Unretained(this))); 21 &LevelDBWrapperImpl::OnConnectionError, base::Unretained(this)));
24 } 22 }
25 23
26 void LevelDBWrapperImpl::Bind(mojom::LevelDBWrapperRequest request) { 24 void LevelDBWrapperImpl::Bind(mojom::LevelDBWrapperRequest request) {
27 bindings_.AddBinding(this, std::move(request)); 25 bindings_.AddBinding(this, std::move(request));
28 } 26 }
29 27
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } 132 }
135 133
136 void LevelDBWrapperImpl::OnConnectionError() { 134 void LevelDBWrapperImpl::OnConnectionError() {
137 if (!bindings_.empty()) 135 if (!bindings_.empty())
138 return; 136 return;
139 137
140 no_bindings_callback_.Run(); 138 no_bindings_callback_.Run();
141 } 139 }
142 140
143 } // namespace content 141 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698