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

Unified Diff: ash/system/tray/test_system_tray_delegate.cc

Issue 14295008: Add ash SessionStateDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ready for review. Created 7 years, 8 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: ash/system/tray/test_system_tray_delegate.cc
diff --git a/ash/system/tray/test_system_tray_delegate.cc b/ash/system/tray/test_system_tray_delegate.cc
index 30e63e4fab10db903f95f3328c7d7c7402c0dad4..b02f2086d08641033516e6d6867eb44bcc1e6d56 100644
--- a/ash/system/tray/test_system_tray_delegate.cc
+++ b/ash/system/tray/test_system_tray_delegate.cc
@@ -6,8 +6,8 @@
#include <string>
+#include "ash/session_state_delegate.h"
#include "ash/shell.h"
-#include "ash/shell_delegate.h"
#include "ash/volume_control_delegate.h"
#include "base/utf_string_conversions.h"
#include "base/message_loop.h"
@@ -90,9 +90,12 @@ const gfx::ImageSkia& TestSystemTrayDelegate::GetUserImage() const {
user::LoginStatus TestSystemTrayDelegate::GetUserLoginStatus() const {
// At new user image screen manager->IsUserLoggedIn() would return true
// but there's no browser session available yet so use SessionStarted().
- if (!Shell::GetInstance()->delegate()->IsSessionStarted())
+ SessionStateDelegate* delegate =
+ Shell::GetInstance()->session_state_delegate();
+
+ if (!delegate->IsActiveUserSessionStarted())
return ash::user::LOGGED_IN_NONE;
- if (Shell::GetInstance()->IsScreenLocked())
+ if (delegate->IsScreenLocked())
return user::LOGGED_IN_LOCKED;
// TODO(nkostylev): Support LOGGED_IN_OWNER, LOGGED_IN_GUEST, LOGGED_IN_KIOSK,
// LOGGED_IN_PUBLIC.

Powered by Google App Engine
This is Rietveld 408576698