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

Unified Diff: services/service_manager/tests/lifecycle/parent.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
Index: services/service_manager/tests/lifecycle/parent.cc
diff --git a/services/service_manager/tests/lifecycle/parent.cc b/services/service_manager/tests/lifecycle/parent.cc
index 4c656eced06adbb7e5c3a2c43551722db9a3cb8a..3659159bd3e1a7caca6874effc573e9b055a6afe 100644
--- a/services/service_manager/tests/lifecycle/parent.cc
+++ b/services/service_manager/tests/lifecycle/parent.cc
@@ -36,6 +36,10 @@
private:
// Service:
+ void OnStart(service_manager::ServiceContext* context) override {
+ context_ = context;
+ }
+
bool OnConnect(const service_manager::ServiceInfo& remote_info,
service_manager::InterfaceRegistry* registry) override {
registry->AddInterface<service_manager::test::mojom::Parent>(this);
@@ -51,7 +55,7 @@
// service_manager::test::mojom::Parent:
void ConnectToChild(const ConnectToChildCallback& callback) override {
child_connection_ =
- context()->connector()->Connect("service:lifecycle_unittest_app");
+ context_->connector()->Connect("service:lifecycle_unittest_app");
service_manager::test::mojom::LifecycleControlPtr lifecycle;
child_connection_->GetInterface(&lifecycle);
{
@@ -67,6 +71,7 @@
base::MessageLoop::current()->QuitWhenIdle();
}
+ service_manager::ServiceContext* context_ = nullptr;
std::unique_ptr<service_manager::Connection> child_connection_;
mojo::BindingSet<service_manager::test::mojom::Parent> parent_bindings_;
« no previous file with comments | « services/service_manager/tests/lifecycle/package.cc ('k') | services/service_manager/tests/service_manager/target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698