Index: examples/indirect_service/indirect_integer_service.cc |
diff --git a/examples/indirect_service/indirect_integer_service.cc b/examples/indirect_service/indirect_integer_service.cc |
index 137eb10df5c58580f10f81cd132989dbf8cb3019..c5bff99eec7ef985caff483f4384efbd095140a1 100644 |
--- a/examples/indirect_service/indirect_integer_service.cc |
+++ b/examples/indirect_service/indirect_integer_service.cc |
@@ -49,22 +49,17 @@ private: |
StrongBinding<IndirectIntegerService> binding_; |
}; |
-class IndirectIntegerServiceAppDelegate |
- : public ApplicationDelegate, |
- public InterfaceFactory<IndirectIntegerService> { |
+class IndirectIntegerServiceAppDelegate : public ApplicationDelegate { |
public: |
bool ConfigureIncomingConnection( |
ApplicationConnection* connection) override { |
- connection->AddService(this); |
+ connection->GetServiceProviderImpl().AddService<IndirectIntegerService>( |
+ [](const ConnectionContext& connection_context, |
+ InterfaceRequest<IndirectIntegerService> request) { |
+ new IndirectIntegerServiceImpl(request.Pass()); |
+ }); |
return true; |
} |
- |
- private: |
- // InterfaceFactory<IndirectIntegerService> |
- void Create(const mojo::ConnectionContext& connection_context, |
- InterfaceRequest<IndirectIntegerService> request) override { |
- new IndirectIntegerServiceImpl(request.Pass()); |
- } |
}; |
} // namespace examples |