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

Unified Diff: services/service_manager/tests/shutdown/shutdown_client_app.cc

Issue 2500683002: Revert of Service Manager: Remove ServiceContext* arg from Service::OnStart() (Closed)
Patch Set: Created 4 years, 1 month 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/service_manager/tests/service_manager/target.cc ('k') | services/ui/demo/mus_demo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/service_manager/tests/shutdown/shutdown_client_app.cc
diff --git a/services/service_manager/tests/shutdown/shutdown_client_app.cc b/services/service_manager/tests/shutdown/shutdown_client_app.cc
index b91e8f686f37cfb2a80ec42652cb626080a660b4..bc222d6f8977030a9a7faed056bf3cf7221f70cc 100644
--- a/services/service_manager/tests/shutdown/shutdown_client_app.cc
+++ b/services/service_manager/tests/shutdown/shutdown_client_app.cc
@@ -27,6 +27,10 @@
private:
// service_manager::Service:
+ void OnStart(ServiceContext* context) override {
+ context_ = context;
+ }
+
bool OnConnect(const ServiceInfo& remote_info,
InterfaceRegistry* registry) override {
registry->AddInterface<mojom::ShutdownTestClientController>(this);
@@ -42,7 +46,7 @@
// mojom::ShutdownTestClientController:
void ConnectAndWait(const ConnectAndWaitCallback& callback) override {
mojom::ShutdownTestServicePtr service;
- context()->connector()->ConnectToInterface(
+ context_->connector()->ConnectToInterface(
"service:shutdown_service", &service);
mojo::Binding<mojom::ShutdownTestClient> client_binding(this);
@@ -61,6 +65,7 @@
callback.Run();
}
+ ServiceContext* context_ = nullptr;
mojo::BindingSet<mojom::ShutdownTestClientController> bindings_;
DISALLOW_COPY_AND_ASSIGN(ShutdownClientApp);
« no previous file with comments | « services/service_manager/tests/service_manager/target.cc ('k') | services/ui/demo/mus_demo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698