| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mash/login/login.h" | 5 #include "mash/login/login.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/guid.h" | 9 #include "base/guid.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 public mojo::InterfaceFactory<mojom::Login>, | 132 public mojo::InterfaceFactory<mojom::Login>, |
| 133 public mojom::Login { | 133 public mojom::Login { |
| 134 public: | 134 public: |
| 135 Login() {} | 135 Login() {} |
| 136 ~Login() override {} | 136 ~Login() override {} |
| 137 | 137 |
| 138 void LoginAs(const std::string& user_id) { | 138 void LoginAs(const std::string& user_id) { |
| 139 user_access_manager_->SetActiveUser(user_id); | 139 user_access_manager_->SetActiveUser(user_id); |
| 140 mash::init::mojom::InitPtr init; | 140 mash::init::mojom::InitPtr init; |
| 141 connector_->ConnectToInterface("mojo:mash_init", &init); | 141 connector_->ConnectToInterface("mojo:mash_init", &init); |
| 142 init->StartService("mojo:mash_shell", user_id); | 142 init->StartService("mojo:mash_session", user_id); |
| 143 } | 143 } |
| 144 | 144 |
| 145 private: | 145 private: |
| 146 // mojo::ShellClient: | 146 // mojo::ShellClient: |
| 147 void Initialize(mojo::Connector* connector, const mojo::Identity& identity, | 147 void Initialize(mojo::Connector* connector, const mojo::Identity& identity, |
| 148 uint32_t id) override { | 148 uint32_t id) override { |
| 149 connector_ = connector; | 149 connector_ = connector; |
| 150 tracing_.Initialize(connector, identity.name()); | 150 tracing_.Initialize(connector, identity.name()); |
| 151 | 151 |
| 152 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); | 152 aura_init_.reset(new views::AuraInit(connector, "views_mus_resources.pak")); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 } | 198 } |
| 199 | 199 |
| 200 } // namespace | 200 } // namespace |
| 201 | 201 |
| 202 mojo::ShellClient* CreateLogin() { | 202 mojo::ShellClient* CreateLogin() { |
| 203 return new Login; | 203 return new Login; |
| 204 } | 204 } |
| 205 | 205 |
| 206 } // namespace login | 206 } // namespace login |
| 207 } // namespace main | 207 } // namespace main |
| OLD | NEW |