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 #include "components/leveldb/leveldb_app.h" | 5 #include "components/leveldb/leveldb_app.h" |
6 | 6 |
7 #include "components/leveldb/leveldb_service_impl.h" | 7 #include "components/leveldb/leveldb_service_impl.h" |
8 #include "mojo/shell/public/cpp/connection.h" | 8 #include "mojo/shell/public/cpp/connection.h" |
9 | 9 |
10 namespace leveldb { | 10 namespace leveldb { |
11 | 11 |
12 LevelDBApp::LevelDBApp() {} | 12 LevelDBApp::LevelDBApp() {} |
13 | 13 |
14 LevelDBApp::~LevelDBApp() {} | 14 LevelDBApp::~LevelDBApp() {} |
15 | 15 |
16 void LevelDBApp::Initialize(mojo::Connector* connector, | 16 void LevelDBApp::Initialize(mojo::Connector* connector, |
17 const std::string& url, | 17 const mojo::Identity& identity, |
18 const std::string& user_id, | |
19 uint32_t id) { | 18 uint32_t id) { |
20 tracing_.Initialize(connector, url); | 19 tracing_.Initialize(connector, identity.name()); |
21 service_.reset(new LevelDBServiceImpl); | 20 service_.reset(new LevelDBServiceImpl); |
22 } | 21 } |
23 | 22 |
24 bool LevelDBApp::AcceptConnection(mojo::Connection* connection) { | 23 bool LevelDBApp::AcceptConnection(mojo::Connection* connection) { |
25 connection->AddInterface<LevelDBService>(this); | 24 connection->AddInterface<LevelDBService>(this); |
26 return true; | 25 return true; |
27 } | 26 } |
28 | 27 |
29 void LevelDBApp::Create(mojo::Connection* connection, | 28 void LevelDBApp::Create(mojo::Connection* connection, |
30 mojo::InterfaceRequest<LevelDBService> request) { | 29 mojo::InterfaceRequest<LevelDBService> request) { |
31 bindings_.AddBinding(service_.get(), std::move(request)); | 30 bindings_.AddBinding(service_.get(), std::move(request)); |
32 } | 31 } |
33 | 32 |
34 } // namespace leveldb | 33 } // namespace leveldb |
OLD | NEW |