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

Unified Diff: mash/init/init.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 | « mash/init/init.h ('k') | mash/login/login.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/init/init.cc
diff --git a/mash/init/init.cc b/mash/init/init.cc
index a167bf7c4af2010a3d06e4c64faaabc9447e1e6a..2789820606aafbc6b9bc61d0b38fcac32d48cce1 100644
--- a/mash/init/init.cc
+++ b/mash/init/init.cc
@@ -19,8 +19,9 @@
Init::Init() {}
Init::~Init() {}
-void Init::OnStart() {
- context()->connector()->Connect("service:ui");
+void Init::OnStart(service_manager::ServiceContext* context) {
+ context_ = context;
+ context->connector()->Connect("service:ui");
StartTracing();
StartLogin();
}
@@ -36,7 +37,7 @@
service_manager::Connector::ConnectParams params(
service_manager::Identity(name, user_id));
std::unique_ptr<service_manager::Connection> connection =
- context()->connector()->Connect(&params);
+ context_->connector()->Connect(&params);
connection->SetConnectionLostClosure(
base::Bind(&Init::UserServiceQuit, base::Unretained(this), user_id));
user_services_[user_id] = std::move(connection);
@@ -61,11 +62,11 @@
}
void Init::StartTracing() {
- context()->connector()->Connect("service:tracing");
+ context_->connector()->Connect("service:tracing");
}
void Init::StartLogin() {
- login_connection_ = context()->connector()->Connect("service:login");
+ login_connection_ = context_->connector()->Connect("service:login");
mash::login::mojom::LoginPtr login;
login_connection_->GetInterface(&login);
login->ShowLoginUI();
« no previous file with comments | « mash/init/init.h ('k') | mash/login/login.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698