Index: services/service_manager/tests/connect/connect_test_exe.cc |
diff --git a/services/service_manager/tests/connect/connect_test_exe.cc b/services/service_manager/tests/connect/connect_test_exe.cc |
index 128eacd844b51a4f4989b24b5e21f417223695f1..bfede0fe2ece50d2469581a76faec48f8fd4e99d 100644 |
--- a/services/service_manager/tests/connect/connect_test_exe.cc |
+++ b/services/service_manager/tests/connect/connect_test_exe.cc |
@@ -8,8 +8,8 @@ |
#include "base/memory/ptr_util.h" |
#include "mojo/public/cpp/bindings/binding_set.h" |
#include "services/service_manager/public/c/main.h" |
+#include "services/service_manager/public/cpp/binder_registry.h" |
#include "services/service_manager/public/cpp/interface_factory.h" |
-#include "services/service_manager/public/cpp/interface_registry.h" |
#include "services/service_manager/public/cpp/service.h" |
#include "services/service_manager/public/cpp/service_context.h" |
#include "services/service_manager/public/cpp/service_runner.h" |
@@ -24,15 +24,16 @@ class Target : public service_manager::Service, |
public service_manager::InterfaceFactory<ConnectTestService>, |
public ConnectTestService { |
public: |
- Target() {} |
+ Target() { registry_.AddInterface<ConnectTestService>(this); } |
~Target() override {} |
private: |
// service_manager::Service: |
- bool OnConnect(const service_manager::ServiceInfo& remote_info, |
- service_manager::InterfaceRegistry* registry) override { |
- registry->AddInterface<ConnectTestService>(this); |
- return true; |
+ void OnBindInterface(const service_manager::ServiceInfo& source_info, |
+ const std::string& interface_name, |
+ mojo::ScopedMessagePipeHandle interface_pipe) override { |
+ registry_.BindInterface(source_info.identity, interface_name, |
+ std::move(interface_pipe)); |
} |
// service_manager::InterfaceFactory<ConnectTestService>: |
@@ -50,6 +51,7 @@ class Target : public service_manager::Service, |
callback.Run(context()->identity().instance()); |
} |
+ service_manager::BinderRegistry registry_; |
mojo::BindingSet<ConnectTestService> bindings_; |
DISALLOW_COPY_AND_ASSIGN(Target); |