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

Unified Diff: services/service_manager/tests/lifecycle/parent.cc

Issue 2487573002: Service Manager: Remove ServiceContext* arg from Service::OnStart() (Closed)
Patch Set: rebase 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 3659159bd3e1a7caca6874effc573e9b055a6afe..4c656eced06adbb7e5c3a2c43551722db9a3cb8a 100644
--- a/services/service_manager/tests/lifecycle/parent.cc
+++ b/services/service_manager/tests/lifecycle/parent.cc
@@ -36,10 +36,6 @@ class Parent : public service_manager::Service,
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);
@@ -55,7 +51,7 @@ class Parent : public service_manager::Service,
// 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);
{
@@ -71,7 +67,6 @@ class Parent : public service_manager::Service,
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