Index: services/preferences/pref_service_factory_unittest.cc |
diff --git a/services/preferences/pref_service_factory_unittest.cc b/services/preferences/pref_service_factory_unittest.cc |
index a2a34dd2c1edbee33138bbf1e4fee8fffd7e2d35..21094e823adff98799081d2455d458a8237ad647 100644 |
--- a/services/preferences/pref_service_factory_unittest.cc |
+++ b/services/preferences/pref_service_factory_unittest.cc |
@@ -17,8 +17,8 @@ |
#include "services/preferences/public/cpp/pref_service_main.h" |
#include "services/preferences/public/cpp/pref_store_impl.h" |
#include "services/preferences/public/interfaces/preferences.mojom.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_context.h" |
#include "services/service_manager/public/cpp/service_test.h" |
#include "services/service_manager/public/interfaces/service_factory.mojom.h" |
@@ -34,13 +34,16 @@ class ServiceTestClient : public service_manager::test::ServiceTestClient, |
ServiceTestClient(service_manager::test::ServiceTest* test, |
scoped_refptr<base::SequencedWorkerPool> worker_pool) |
: service_manager::test::ServiceTestClient(test), |
- worker_pool_(std::move(worker_pool)) {} |
+ worker_pool_(std::move(worker_pool)) { |
+ registry_.AddInterface<service_manager::mojom::ServiceFactory>(this); |
+ } |
protected: |
- bool OnConnect(const service_manager::ServiceInfo& remote_info, |
- service_manager::InterfaceRegistry* registry) override { |
- registry->AddInterface<service_manager::mojom::ServiceFactory>(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)); |
} |
void CreateService(service_manager::mojom::ServiceRequest request, |
@@ -63,6 +66,7 @@ class ServiceTestClient : public service_manager::test::ServiceTestClient, |
private: |
scoped_refptr<base::SequencedWorkerPool> worker_pool_; |
+ service_manager::BinderRegistry registry_; |
mojo::BindingSet<service_manager::mojom::ServiceFactory> |
service_factory_bindings_; |
std::unique_ptr<service_manager::ServiceContext> pref_service_context_; |