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

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

Issue 2435153004: Change Service contract to pass ServiceInfo instead of Identity (Closed)
Patch Set: . Created 4 years, 2 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/service_manager/tests/connect/connect_test_package.cc
diff --git a/services/service_manager/tests/connect/connect_test_package.cc b/services/service_manager/tests/connect/connect_test_package.cc
index 4ed515366424c2785ec037eeb79017d96fade569..664fa383f7bfe2da10f7509c248a06153af5155a 100644
--- a/services/service_manager/tests/connect/connect_test_package.cc
+++ b/services/service_manager/tests/connect/connect_test_package.cc
@@ -61,25 +61,25 @@ class ProvidedService
private:
// service_manager::Service:
- void OnStart(const Identity& identity) override {
- identity_ = identity;
+ void OnStart(const ServiceInfo& info) override {
+ identity_ = info.identity;
bindings_.set_connection_error_handler(
base::Bind(&ProvidedService::OnConnectionError,
base::Unretained(this)));
}
- bool OnConnect(const Identity& remote_identity,
+ bool OnConnect(const ServiceInfo& remote_info,
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 = remote_identity.name();
- state->connection_remote_userid = remote_identity.user_id();
+ state->connection_remote_name = remote_info.identity.name();
+ state->connection_remote_userid = remote_info.identity.user_id();
state->initialize_local_name = identity_.name();
state->initialize_userid = identity_.user_id();
- connector()->ConnectToInterface(remote_identity, &caller_);
+ connector()->ConnectToInterface(remote_info.identity, &caller_);
caller_->ConnectionAccepted(std::move(state));
return true;
@@ -169,13 +169,13 @@ class ConnectTestService
private:
// service_manager::Service:
- void OnStart(const Identity& identity) override {
- identity_ = identity;
+ void OnStart(const ServiceInfo& info) override {
+ identity_ = info.identity;
bindings_.set_connection_error_handler(
base::Bind(&ConnectTestService::OnConnectionError,
base::Unretained(this)));
}
- bool OnConnect(const Identity& remote_identity,
+ bool OnConnect(const ServiceInfo& remote_info,
InterfaceRegistry* registry) override {
registry->AddInterface<ServiceFactory>(this);
registry->AddInterface<test::mojom::ConnectTestService>(this);

Powered by Google App Engine
This is Rietveld 408576698