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

Side by Side Diff: components/leveldb/leveldb_app.cc

Issue 2215133002: Change signature of OnConnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
Patch Set: . Created 4 years, 4 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/leveldb_app.h ('k') | content/browser/frame_host/render_frame_host_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 #include "components/leveldb/leveldb_app.h" 5 #include "components/leveldb/leveldb_app.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "components/leveldb/leveldb_service_impl.h" 8 #include "components/leveldb/leveldb_service_impl.h"
9 #include "services/shell/public/cpp/connection.h" 9 #include "services/shell/public/cpp/interface_registry.h"
10 10
11 namespace leveldb { 11 namespace leveldb {
12 12
13 LevelDBApp::LevelDBApp() {} 13 LevelDBApp::LevelDBApp() {}
14 14
15 LevelDBApp::~LevelDBApp() {} 15 LevelDBApp::~LevelDBApp() {}
16 16
17 void LevelDBApp::OnStart(const shell::Identity& identity) { 17 void LevelDBApp::OnStart(const shell::Identity& identity) {
18 tracing_.Initialize(connector(), identity.name()); 18 tracing_.Initialize(connector(), identity.name());
19 } 19 }
20 20
21 bool LevelDBApp::OnConnect(shell::Connection* connection) { 21 bool LevelDBApp::OnConnect(const shell::Identity& remote_identity,
22 connection->AddInterface<mojom::LevelDBService>(this); 22 shell::InterfaceRegistry* registry) {
23 registry->AddInterface<mojom::LevelDBService>(this);
23 return true; 24 return true;
24 } 25 }
25 26
26 void LevelDBApp::Create(const shell::Identity& remote_identity, 27 void LevelDBApp::Create(const shell::Identity& remote_identity,
27 leveldb::mojom::LevelDBServiceRequest request) { 28 leveldb::mojom::LevelDBServiceRequest request) {
28 if (!service_) 29 if (!service_)
29 service_.reset( 30 service_.reset(
30 new LevelDBServiceImpl(base::MessageLoop::current()->task_runner())); 31 new LevelDBServiceImpl(base::MessageLoop::current()->task_runner()));
31 bindings_.AddBinding(service_.get(), std::move(request)); 32 bindings_.AddBinding(service_.get(), std::move(request));
32 } 33 }
33 34
34 } // namespace leveldb 35 } // namespace leveldb
OLDNEW
« no previous file with comments | « components/leveldb/leveldb_app.h ('k') | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698