Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(817)

Unified Diff: services/shell/tests/connect/connect_test_package.cc

Issue 2215133002: Change signature of OnConnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
Patch Set: . Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: services/shell/tests/connect/connect_test_package.cc
diff --git a/services/shell/tests/connect/connect_test_package.cc b/services/shell/tests/connect/connect_test_package.cc
index cc5d73a7f0f41c09e235af2107ba3accbd5c5326..e913c1edcb1c0fd60252c44cdbbcf0d0d4698a6e 100644
--- a/services/shell/tests/connect/connect_test_package.cc
+++ b/services/shell/tests/connect/connect_test_package.cc
@@ -67,18 +67,19 @@ class ProvidedService
base::Bind(&ProvidedService::OnConnectionError,
base::Unretained(this)));
}
- bool OnConnect(Connection* connection) override {
- connection->AddInterface<test::mojom::ConnectTestService>(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::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;
@@ -174,9 +175,10 @@ class ConnectTestService
base::Bind(&ConnectTestService::OnConnectionError,
base::Unretained(this)));
}
- bool OnConnect(Connection* connection) override {
- connection->AddInterface<ServiceFactory>(this);
- connection->AddInterface<test::mojom::ConnectTestService>(this);
+ bool OnConnect(const Identity& remote_identity,
+ InterfaceRegistry* registry) override {
+ registry->AddInterface<ServiceFactory>(this);
+ registry->AddInterface<test::mojom::ConnectTestService>(this);
return true;
}
« no previous file with comments | « services/shell/tests/connect/connect_test_exe.cc ('k') | services/shell/tests/connect/connect_test_singleton_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698