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

Unified Diff: chrome/browser/ui/ash/network_connect_delegate_chromeos.cc

Issue 2111443002: mash: Migrate SessionStateDelegate access to WmShell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 6 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
Index: chrome/browser/ui/ash/network_connect_delegate_chromeos.cc
diff --git a/chrome/browser/ui/ash/network_connect_delegate_chromeos.cc b/chrome/browser/ui/ash/network_connect_delegate_chromeos.cc
index 80e647b95e609ec542cc2d9687832b71d2999d14..ed5de7544a10ce596924a28e8ec803a758c30f55 100644
--- a/chrome/browser/ui/ash/network_connect_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/network_connect_delegate_chromeos.cc
@@ -18,23 +18,22 @@
namespace {
bool IsUIAvailable() {
- return ash::Shell::GetInstance() &&
- !ash::Shell::GetInstance()->session_state_delegate()->IsScreenLocked();
+ return ash::WmShell::HasInstance() &&
+ !ash::WmShell::Get()->GetSessionStateDelegate()->IsScreenLocked();
}
gfx::NativeWindow GetNativeWindow() {
- bool session_started = ash::Shell::GetInstance()
- ->session_state_delegate()
- ->IsActiveUserSessionStarted();
- ash::LoginStatus login_status =
- ash::WmShell::Get()->system_tray_delegate()->GetUserLoginStatus();
- bool isUserAddingRunning = ash::Shell::GetInstance()
- ->session_state_delegate()
- ->IsInSecondaryLoginScreen();
+ ash::WmShell* wm_shell = ash::WmShell::Get();
+ const bool session_started =
+ wm_shell->GetSessionStateDelegate()->IsActiveUserSessionStarted();
+ const ash::LoginStatus login_status =
+ wm_shell->system_tray_delegate()->GetUserLoginStatus();
+ const bool is_in_secondary_login_screen =
sky 2016/06/29 23:20:21 Nice! much better name choice.
msw 2016/06/29 23:21:55 Acknowledged.
+ wm_shell->GetSessionStateDelegate()->IsInSecondaryLoginScreen();
int container_id =
(!session_started || login_status == ash::LoginStatus::NOT_LOGGED_IN ||
- login_status == ash::LoginStatus::LOCKED || isUserAddingRunning)
+ login_status == ash::LoginStatus::LOCKED || is_in_secondary_login_screen)
? ash::kShellWindowId_LockSystemModalContainer
: ash::kShellWindowId_SystemModalContainer;
return ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(),

Powered by Google App Engine
This is Rietveld 408576698