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

Unified Diff: services/shell/tests/connect/connect_test_app.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
« no previous file with comments | « services/shell/service_manager.cc ('k') | services/shell/tests/connect/connect_test_class_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « services/shell/service_manager.cc ('k') | services/shell/tests/connect/connect_test_class_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698