Index: services/catalog/catalog.cc |
diff --git a/services/catalog/catalog.cc b/services/catalog/catalog.cc |
index bdcb40af1034e9ba05c56f15afec7eb26adc75e8..b062eb41ca042b56fa5304799e740e4dc3184a9c 100644 |
--- a/services/catalog/catalog.cc |
+++ b/services/catalog/catalog.cc |
@@ -24,8 +24,8 @@ |
#include "services/catalog/constants.h" |
#include "services/catalog/entry_cache.h" |
#include "services/catalog/instance.h" |
+#include "services/service_manager/public/cpp/binder_registry.h" |
#include "services/service_manager/public/cpp/connection.h" |
-#include "services/service_manager/public/cpp/interface_registry.h" |
#include "services/service_manager/public/cpp/service_context.h" |
namespace catalog { |
@@ -112,20 +112,24 @@ void LoadCatalogManifestIntoCache(const base::Value* root, EntryCache* cache) { |
class Catalog::ServiceImpl : public service_manager::Service { |
public: |
- explicit ServiceImpl(Catalog* catalog) : catalog_(catalog) {} |
+ explicit ServiceImpl(Catalog* catalog) : catalog_(catalog) { |
+ registry_.AddInterface<mojom::Catalog>(catalog_); |
+ registry_.AddInterface<filesystem::mojom::Directory>(catalog_); |
+ registry_.AddInterface<service_manager::mojom::Resolver>(catalog_); |
+ } |
~ServiceImpl() override {} |
// service_manager::Service: |
- bool OnConnect(const service_manager::ServiceInfo& remote_info, |
- service_manager::InterfaceRegistry* registry) override { |
- registry->AddInterface<mojom::Catalog>(catalog_); |
- registry->AddInterface<filesystem::mojom::Directory>(catalog_); |
- registry->AddInterface<service_manager::mojom::Resolver>(catalog_); |
- 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)); |
} |
private: |
Catalog* const catalog_; |
+ service_manager::BinderRegistry registry_; |
DISALLOW_COPY_AND_ASSIGN(ServiceImpl); |
}; |