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

Unified Diff: services/identity/identity_service.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 | « services/identity/identity_service.h ('k') | services/navigation/navigation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/identity/identity_service.cc
diff --git a/services/identity/identity_service.cc b/services/identity/identity_service.cc
index 1e780b4efc3654b0c8afe12f43a7ae29cb9bee13..1cb95dc9d2db726999d388361bed75e60fad97c5 100644
--- a/services/identity/identity_service.cc
+++ b/services/identity/identity_service.cc
@@ -6,22 +6,25 @@
#include "services/identity/identity_manager.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"
namespace identity {
IdentityService::IdentityService(SigninManagerBase* signin_manager)
- : signin_manager_(signin_manager) {}
+ : signin_manager_(signin_manager) {
+ registry_.AddInterface<mojom::IdentityManager>(this);
+}
IdentityService::~IdentityService() {}
void IdentityService::OnStart() {}
-bool IdentityService::OnConnect(const service_manager::ServiceInfo& remote_info,
- service_manager::InterfaceRegistry* registry) {
- registry->AddInterface<mojom::IdentityManager>(this);
- return true;
+void IdentityService::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 IdentityService::Create(const service_manager::Identity& remote_identity,
« no previous file with comments | « services/identity/identity_service.h ('k') | services/navigation/navigation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698