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

Unified Diff: services/shell/service_manager.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/shell/service_manager.h ('k') | services/shell/tests/connect/connect_test_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/service_manager.cc
diff --git a/services/shell/service_manager.cc b/services/shell/service_manager.cc
index 28faee3bb537ac225b591c60bd2246718907cdf1..aa096e64e53d52a3a21c4a3c5aab7bf96824f40d 100644
--- a/services/shell/service_manager.cc
+++ b/services/shell/service_manager.cc
@@ -245,8 +245,9 @@ class ServiceManager::Instance
uint32_t id() const { return id_; }
// Service:
- bool OnConnect(Connection* connection) override {
- connection->AddInterface<mojom::ServiceManager>(this);
+ bool OnConnect(const Identity& remote_identity,
+ InterfaceRegistry* registry) override {
+ registry->AddInterface<mojom::ServiceManager>(this);
return true;
}
@@ -531,20 +532,21 @@ mojom::ServiceRequest ServiceManager::StartEmbedderService(
////////////////////////////////////////////////////////////////////////////////
// ServiceManager, Service implementation:
-bool ServiceManager::OnConnect(Connection* connection) {
+bool ServiceManager::OnConnect(const Identity& remote_identity,
+ InterfaceRegistry* registry) {
// The only interface we expose is mojom::ServiceManager, and access to this
// interface is brokered by a policy specific to each caller, managed by the
// caller's instance. Here we look to see who's calling, and forward to the
// caller's instance to continue.
Instance* instance = nullptr;
for (const auto& entry : identity_to_instance_) {
- if (entry.first == connection->GetRemoteIdentity()) {
+ if (entry.first == remote_identity) {
instance = entry.second;
break;
}
}
DCHECK(instance);
- return instance->OnConnect(connection);
+ return instance->OnConnect(remote_identity, registry);
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « services/shell/service_manager.h ('k') | services/shell/tests/connect/connect_test_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698