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

Unified Diff: mash/init/init.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
« 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 2789820606aafbc6b9bc61d0b38fcac32d48cce1..a167bf7c4af2010a3d06e4c64faaabc9447e1e6a 100644
--- a/mash/init/init.cc
+++ b/mash/init/init.cc
@@ -19,9 +19,8 @@ namespace init {
Init::Init() {}
Init::~Init() {}
-void Init::OnStart(service_manager::ServiceContext* context) {
- context_ = context;
- context->connector()->Connect("service:ui");
+void Init::OnStart() {
+ context()->connector()->Connect("service:ui");
StartTracing();
StartLogin();
}
@@ -37,7 +36,7 @@ void Init::StartService(const std::string& name, const std::string& user_id) {
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);
@@ -62,11 +61,11 @@ void Init::UserServiceQuit(const std::string& user_id) {
}
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