Index: services/shell/tests/connect/connect_test_class_app.cc |
diff --git a/services/shell/tests/connect/connect_test_class_app.cc b/services/shell/tests/connect/connect_test_class_app.cc |
index b7045b73d404aa698ecffb5208031c9d51e2ac8a..1431e5f52b1c7e8227b6d07fbcf31b11b770d912 100644 |
--- a/services/shell/tests/connect/connect_test_class_app.cc |
+++ b/services/shell/tests/connect/connect_test_class_app.cc |
@@ -10,6 +10,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" |
@@ -34,13 +35,14 @@ class ConnectTestClassApp |
void OnStart(const Identity& identity) override { |
identity_ = identity; |
} |
- bool OnConnect(Connection* connection) override { |
- connection->AddInterface<test::mojom::ConnectTestService>(this); |
- connection->AddInterface<test::mojom::ClassInterface>(this); |
- inbound_connections_.insert(connection); |
- connection->SetConnectionLostClosure( |
+ bool OnConnect(const Identity& remote_identity, |
+ InterfaceRegistry* registry) override { |
+ registry->AddInterface<test::mojom::ConnectTestService>(this); |
+ registry->AddInterface<test::mojom::ClassInterface>(this); |
+ inbound_connections_.insert(registry); |
+ registry->SetConnectionLostClosure( |
base::Bind(&ConnectTestClassApp::OnConnectionError, |
- base::Unretained(this), connection)); |
+ base::Unretained(this), registry)); |
return true; |
} |
@@ -69,8 +71,8 @@ class ConnectTestClassApp |
callback.Run("PONG"); |
} |
- void OnConnectionError(Connection* connection) { |
- auto it = inbound_connections_.find(connection); |
+ void OnConnectionError(InterfaceRegistry* registry) { |
+ auto it = inbound_connections_.find(registry); |
DCHECK(it != inbound_connections_.end()); |
inbound_connections_.erase(it); |
if (inbound_connections_.empty()) |
@@ -78,7 +80,7 @@ class ConnectTestClassApp |
} |
Identity identity_; |
- std::set<Connection*> inbound_connections_; |
+ std::set<InterfaceRegistry*> inbound_connections_; |
mojo::BindingSet<test::mojom::ConnectTestService> bindings_; |
mojo::BindingSet<test::mojom::ClassInterface> class_interface_bindings_; |