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

Unified Diff: components/leveldb/leveldb_app.cc

Issue 2795883002: Eliminate OnConnect usage (Closed)
Patch Set: . Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/leveldb/leveldb_app.h ('k') | components/nacl/common/nacl_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/leveldb/leveldb_app.cc
diff --git a/components/leveldb/leveldb_app.cc b/components/leveldb/leveldb_app.cc
index cb15293d59ea608eba41728f235ce9f8708929c2..93086f77aa5f23a3b6f3c29c9e643a8f6d1303a1 100644
--- a/components/leveldb/leveldb_app.cc
+++ b/components/leveldb/leveldb_app.cc
@@ -5,12 +5,13 @@
#include "components/leveldb/leveldb_app.h"
#include "components/leveldb/leveldb_service_impl.h"
-#include "services/service_manager/public/cpp/interface_registry.h"
#include "services/service_manager/public/cpp/service_context.h"
namespace leveldb {
-LevelDBApp::LevelDBApp() : file_thread_("LevelDBFile") {}
+LevelDBApp::LevelDBApp() : file_thread_("LevelDBFile") {
+ registry_.AddInterface<mojom::LevelDBService>(this);
+}
LevelDBApp::~LevelDBApp() {}
@@ -18,10 +19,12 @@ void LevelDBApp::OnStart() {
tracing_.Initialize(context()->connector(), context()->identity().name());
}
-bool LevelDBApp::OnConnect(const service_manager::ServiceInfo& remote_info,
- service_manager::InterfaceRegistry* registry) {
- registry->AddInterface<mojom::LevelDBService>(this);
- return true;
+void LevelDBApp::OnBindInterface(
+ const service_manager::ServiceInfo& source_info,
+ const std::string& interface_name,
+ mojo::ScopedMessagePipeHandle interface_pipe) {
+ registry_.BindInterface(source_info.identity, interface_name,
+ std::move(interface_pipe));
}
void LevelDBApp::Create(const service_manager::Identity& remote_identity,
« no previous file with comments | « components/leveldb/leveldb_app.h ('k') | components/nacl/common/nacl_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698