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

Unified Diff: mash/login/login.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.cc ('k') | mash/quick_launch/quick_launch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/login/login.cc
diff --git a/mash/login/login.cc b/mash/login/login.cc
index deec2e09ee9556e7106f11370a1cf797b6adc7a7..67954443ffb69c85f7eac07a0c90d49bc67c6e62 100644
--- a/mash/login/login.cc
+++ b/mash/login/login.cc
@@ -144,22 +144,22 @@ class Login : public service_manager::Service,
void LoginAs(const std::string& user_id) {
user_access_manager_->SetActiveUser(user_id);
mash::init::mojom::InitPtr init;
- context_->connector()->ConnectToInterface("service:mash_init", &init);
+ context()->connector()->ConnectToInterface("service:mash_init", &init);
init->StartService("service:mash_session", user_id);
}
private:
// service_manager::Service:
- void OnStart(service_manager::ServiceContext* context) override {
- context_ = context;
- tracing_.Initialize(context->connector(), context->identity().name());
+ void OnStart() override {
+ tracing_.Initialize(context()->connector(), context()->identity().name());
aura_init_ = base::MakeUnique<views::AuraInit>(
- context->connector(), context->identity(), "views_mus_resources.pak");
+ context()->connector(), context()->identity(),
+ "views_mus_resources.pak");
- context->connector()->ConnectToInterface(
+ context()->connector()->ConnectToInterface(
"service:ui", &user_access_manager_);
- user_access_manager_->SetActiveUser(context->identity().user_id());
+ user_access_manager_->SetActiveUser(context()->identity().user_id());
}
bool OnConnect(const service_manager::ServiceInfo& remote_info,
@@ -176,16 +176,14 @@ class Login : public service_manager::Service,
// mojom::Login:
void ShowLoginUI() override {
- UI::Show(context_->connector(), context_->identity(), this);
+ UI::Show(context()->connector(), context()->identity(), this);
}
void SwitchUser() override {
- UI::Show(context_->connector(), context_->identity(), this);
+ UI::Show(context()->connector(), context()->identity(), this);
}
void StartWindowManager();
- service_manager::ServiceContext* context_ = nullptr;
-
tracing::Provider tracing_;
std::unique_ptr<views::AuraInit> aura_init_;
mojo::BindingSet<mojom::Login> bindings_;
« no previous file with comments | « mash/init/init.cc ('k') | mash/quick_launch/quick_launch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698