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

Unified Diff: content/public/test/test_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 | « content/public/test/test_service.h ('k') | mash/package/mash_packaged_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/test_service.cc
diff --git a/content/public/test/test_service.cc b/content/public/test/test_service.cc
index 685479853bec28bd05c8c54ee32ee4bb8fbdd91a..4e45f2113c955f0ce13573ed1c23e8deae23964d 100644
--- a/content/public/test/test_service.cc
+++ b/content/public/test/test_service.cc
@@ -10,23 +10,25 @@
#include "base/message_loop/message_loop.h"
#include "services/service_manager/public/cpp/connection.h"
#include "services/service_manager/public/cpp/connector.h"
-#include "services/service_manager/public/cpp/interface_registry.h"
namespace content {
const char kTestServiceUrl[] = "system:content_test_service";
TestService::TestService() : service_binding_(this) {
+ registry_.AddInterface<mojom::TestService>(this);
}
TestService::~TestService() {
}
-bool TestService::OnConnect(const service_manager::ServiceInfo& remote_info,
- service_manager::InterfaceRegistry* registry) {
- requestor_name_ = remote_info.identity.name();
- registry->AddInterface<mojom::TestService>(this);
- return true;
+void TestService::OnBindInterface(
+ const service_manager::ServiceInfo& source_info,
+ const std::string& interface_name,
+ mojo::ScopedMessagePipeHandle interface_pipe) {
+ requestor_name_ = source_info.identity.name();
+ registry_.BindInterface(source_info.identity, interface_name,
+ std::move(interface_pipe));
}
void TestService::Create(const service_manager::Identity& remote_identity,
« no previous file with comments | « content/public/test/test_service.h ('k') | mash/package/mash_packaged_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698