Index: mojo/public/cpp/bindings/tests/versioning_test_service.cc |
diff --git a/mojo/public/cpp/bindings/tests/versioning_test_service.cc b/mojo/public/cpp/bindings/tests/versioning_test_service.cc |
index 313a6249e212f5d4f33c80e10ae5e11cd48837a4..8f93331ea2a16ae0cd4d35d1674c3f6f46567248 100644 |
--- a/mojo/public/cpp/bindings/tests/versioning_test_service.cc |
+++ b/mojo/public/cpp/bindings/tests/versioning_test_service.cc |
@@ -11,6 +11,7 @@ |
#include "mojo/public/cpp/bindings/strong_binding.h" |
#include "mojo/public/interfaces/bindings/tests/versioning_test_service.mojom.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/service.h" |
#include "services/service_manager/public/cpp/service_runner.h" |
@@ -98,12 +99,16 @@ class HumanResourceSystemServer |
: public service_manager::Service, |
public InterfaceFactory<HumanResourceDatabase> { |
public: |
- HumanResourceSystemServer() {} |
+ HumanResourceSystemServer() { |
+ registry_.AddInterface<HumanResourceDatabase>(this); |
+ } |
// service_manager::Service implementation. |
- bool OnConnect(Connection* connection) override { |
- connection->AddInterface<HumanResourceDatabase>(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)); |
} |
// InterfaceFactory<HumanResourceDatabase> implementation. |
@@ -113,6 +118,9 @@ class HumanResourceSystemServer |
// connection error. |
new HumanResourceDatabaseImpl(std::move(request)); |
} |
+ |
+ private: |
+ service_manager::BinderRegistry registry_; |
}; |
} // namespace versioning |