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

Unified Diff: chrome/browser/chromeos/power/power_button_observer.cc

Issue 2058173002: mash: Move SystemTrayDelegate ownership to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review feedback 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/chromeos/power/power_button_observer.cc
diff --git a/chrome/browser/chromeos/power/power_button_observer.cc b/chrome/browser/chromeos/power/power_button_observer.cc
index 1ae37bcca8c68770b19a45cb248cb63b65c372ea..4565a3f278ec9bd2899ba8b8f249c6d904f501c8 100644
--- a/chrome/browser/chromeos/power/power_button_observer.cc
+++ b/chrome/browser/chromeos/power/power_button_observer.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/chromeos/power/power_button_observer.h"
#include "ash/common/system/tray/system_tray_delegate.h"
+#include "ash/common/wm_shell.h"
#include "ash/shell.h"
#include "ash/system/user/login_status.h"
#include "ash/wm/power_button_controller.h"
@@ -24,10 +25,10 @@ namespace chromeos {
namespace {
ash::LoginStatus GetCurrentLoginStatus() {
- if (!ash::Shell::GetInstance()->system_tray_delegate())
- return ash::LoginStatus::NOT_LOGGED_IN;
- return ash::Shell::GetInstance()->system_tray_delegate()->
- GetUserLoginStatus();
+ if (ash::WmShell::Get()->system_tray_delegate())
+ return ash::WmShell::Get()->system_tray_delegate()->GetUserLoginStatus();
+
+ return ash::LoginStatus::NOT_LOGGED_IN;
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698