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

Unified Diff: components/font_service/font_service_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/font_service/font_service_app.h ('k') | components/leveldb/leveldb_app.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/font_service/font_service_app.cc
diff --git a/components/font_service/font_service_app.cc b/components/font_service/font_service_app.cc
index 78f6d4a336bb295d2f6ffdf6bf90f2a7f1a360bb..57700b2c6b89d59c72d24538d5328b1ca855600b 100644
--- a/components/font_service/font_service_app.cc
+++ b/components/font_service/font_service_app.cc
@@ -10,7 +10,6 @@
#include "base/files/file_path.h"
#include "mojo/public/cpp/system/platform_handle.h"
#include "services/service_manager/public/cpp/connection.h"
-#include "services/service_manager/public/cpp/interface_registry.h"
#include "services/service_manager/public/cpp/service_context.h"
static_assert(
@@ -41,7 +40,9 @@ base::File GetFileForPath(const base::FilePath& path) {
namespace font_service {
-FontServiceApp::FontServiceApp() {}
+FontServiceApp::FontServiceApp() {
+ registry_.AddInterface(this);
+}
FontServiceApp::~FontServiceApp() {}
@@ -49,10 +50,12 @@ void FontServiceApp::OnStart() {
tracing_.Initialize(context()->connector(), context()->identity().name());
}
-bool FontServiceApp::OnConnect(const service_manager::ServiceInfo& remote_info,
- service_manager::InterfaceRegistry* registry) {
- registry->AddInterface(this);
- return true;
+void FontServiceApp::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 FontServiceApp::Create(
« no previous file with comments | « components/font_service/font_service_app.h ('k') | components/leveldb/leveldb_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698