Index: services/shell/tests/connect/connect_test_app.cc |
diff --git a/services/shell/tests/connect/connect_test_app.cc b/services/shell/tests/connect/connect_test_app.cc |
index 02992a66a54f2c9b3457d1d8ccef4e246590eb34..e367e0c0fa2cf8ef9269bd4d4fdf667cb73071b0 100644 |
--- a/services/shell/tests/connect/connect_test_app.cc |
+++ b/services/shell/tests/connect/connect_test_app.cc |
@@ -13,6 +13,7 @@ |
#include "services/shell/public/c/main.h" |
#include "services/shell/public/cpp/connector.h" |
#include "services/shell/public/cpp/interface_factory.h" |
+#include "services/shell/public/cpp/interface_registry.h" |
#include "services/shell/public/cpp/service.h" |
#include "services/shell/public/cpp/service_runner.h" |
#include "services/shell/public/interfaces/connector.mojom.h" |
@@ -61,19 +62,20 @@ class ConnectTestApp : public Service, |
base::Bind(&ConnectTestApp::OnConnectionError, |
base::Unretained(this))); |
} |
- bool OnConnect(Connection* connection) override { |
- connection->AddInterface<test::mojom::ConnectTestService>(this); |
- connection->AddInterface<test::mojom::StandaloneApp>(this); |
- connection->AddInterface<test::mojom::BlockedInterface>(this); |
- connection->AddInterface<test::mojom::UserIdTest>(this); |
+ bool OnConnect(const Identity& remote_identity, |
+ InterfaceRegistry* registry) override { |
+ registry->AddInterface<test::mojom::ConnectTestService>(this); |
+ registry->AddInterface<test::mojom::StandaloneApp>(this); |
+ registry->AddInterface<test::mojom::BlockedInterface>(this); |
+ registry->AddInterface<test::mojom::UserIdTest>(this); |
test::mojom::ConnectionStatePtr state(test::mojom::ConnectionState::New()); |
- state->connection_remote_name = connection->GetRemoteIdentity().name(); |
- state->connection_remote_userid = connection->GetRemoteIdentity().user_id(); |
+ state->connection_remote_name = remote_identity.name(); |
+ state->connection_remote_userid = remote_identity.user_id(); |
state->initialize_local_name = identity_.name(); |
state->initialize_userid = identity_.user_id(); |
- connector()->ConnectToInterface(connection->GetRemoteIdentity(), &caller_); |
+ connector()->ConnectToInterface(remote_identity, &caller_); |
caller_->ConnectionAccepted(std::move(state)); |
return true; |