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

Unified Diff: mash/login/login.cc

Issue 2494303002: 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.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 67954443ffb69c85f7eac07a0c90d49bc67c6e62..deec2e09ee9556e7106f11370a1cf797b6adc7a7 100644
--- a/mash/login/login.cc
+++ b/mash/login/login.cc
@@ -144,22 +144,22 @@
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() override {
- tracing_.Initialize(context()->connector(), context()->identity().name());
+ void OnStart(service_manager::ServiceContext* context) override {
+ context_ = context;
+ tracing_.Initialize(context->connector(), context->identity().name());
aura_init_ = base::MakeUnique<views::AuraInit>(
- context()->connector(), context()->identity(),
- "views_mus_resources.pak");
-
- context()->connector()->ConnectToInterface(
+ context->connector(), context->identity(), "views_mus_resources.pak");
+
+ 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,13 +176,15 @@
// 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_;
« 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