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

Unified Diff: mash/login/login.cc

Issue 2179023004: Make Service own ServiceContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 months 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_application.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 6bb0c19225f578923246bdff16e3b991296999d4..1de37d9a893c7f604034c601f8ef047ba7b94e29 100644
--- a/mash/login/login.cc
+++ b/mash/login/login.cc
@@ -142,22 +142,20 @@ class Login : public shell::Service,
void LoginAs(const std::string& user_id) {
user_access_manager_->SetActiveUser(user_id);
mash::init::mojom::InitPtr init;
- connector_->ConnectToInterface("mojo:mash_init", &init);
+ connector()->ConnectToInterface("mojo:mash_init", &init);
init->StartService("mojo:mash_session", user_id);
}
private:
// shell::Service:
- void OnStart(shell::Connector* connector,
- const shell::Identity& identity,
- uint32_t id) override {
- connector_ = connector;
+ void OnStart(const shell::Identity& identity) override {
identity_ = identity;
- tracing_.Initialize(connector, identity.name());
+ tracing_.Initialize(connector(), identity.name());
- aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak"));
+ aura_init_.reset(
+ new views::AuraInit(connector(), "views_mus_resources.pak"));
- connector_->ConnectToInterface("mojo:ui", &user_access_manager_);
+ connector()->ConnectToInterface("mojo:ui", &user_access_manager_);
user_access_manager_->SetActiveUser(identity.user_id());
}
bool OnConnect(shell::Connection* connection) override {
@@ -172,12 +170,15 @@ class Login : public shell::Service,
}
// mojom::Login:
- void ShowLoginUI() override { UI::Show(connector_, identity_, this); }
- void SwitchUser() override { UI::Show(connector_, identity_, this); }
+ void ShowLoginUI() override {
+ UI::Show(connector(), identity_, this);
+ }
+ void SwitchUser() override {
+ UI::Show(connector(), identity_, this);
+ }
void StartWindowManager();
- shell::Connector* connector_;
shell::Identity identity_;
mojo::TracingImpl tracing_;
std::unique_ptr<views::AuraInit> aura_init_;
« no previous file with comments | « mash/init/init.cc ('k') | mash/quick_launch/quick_launch_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698