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

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

Issue 2416253004: ash: Use session_manager::SessionState (Closed)
Patch Set: fix compile Created 4 years, 2 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/session_state_delegate_chromeos.cc
diff --git a/chrome/browser/ui/ash/session_state_delegate_chromeos.cc b/chrome/browser/ui/ash/session_state_delegate_chromeos.cc
index 686996a3758047317a222a2fca01b4dcc0279039..c304af7405485fd660967b56cb4f74ec9f6c095c 100644
--- a/chrome/browser/ui/ash/session_state_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/session_state_delegate_chromeos.cc
@@ -34,15 +34,17 @@
#include "ui/gfx/image/image_skia.h"
SessionStateDelegateChromeos::SessionStateDelegateChromeos()
- : session_state_(SESSION_STATE_LOGIN_PRIMARY) {
+ : session_state_(ash::SessionState::LOGIN_PRIMARY) {
user_manager::UserManager::Get()->AddSessionStateObserver(this);
chromeos::UserAddingScreen::Get()->AddObserver(this);
// LoginState is not initialized in unit_tests.
if (chromeos::LoginState::IsInitialized()) {
chromeos::LoginState::Get()->AddObserver(this);
- SetSessionState(chromeos::LoginState::Get()->IsUserLoggedIn() ?
- SESSION_STATE_ACTIVE : SESSION_STATE_LOGIN_PRIMARY, true);
+ SetSessionState(chromeos::LoginState::Get()->IsUserLoggedIn()
+ ? ash::SessionState::ACTIVE
+ : ash::SessionState::LOGIN_PRIMARY,
+ true);
}
}
@@ -133,8 +135,7 @@ bool SessionStateDelegateChromeos::IsUserSessionBlocked() const {
chromeos::UserAddingScreen::Get()->IsRunning();
}
-ash::SessionStateDelegate::SessionState
-SessionStateDelegateChromeos::GetSessionState() const {
+ash::SessionState SessionStateDelegateChromeos::GetSessionState() const {
return session_state_;
}
@@ -231,8 +232,10 @@ void SessionStateDelegateChromeos::RemoveSessionStateObserver(
}
void SessionStateDelegateChromeos::LoggedInStateChanged() {
- SetSessionState(chromeos::LoginState::Get()->IsUserLoggedIn() ?
- SESSION_STATE_ACTIVE : SESSION_STATE_LOGIN_PRIMARY, false);
+ SetSessionState(chromeos::LoginState::Get()->IsUserLoggedIn()
+ ? ash::SessionState::ACTIVE
+ : ash::SessionState::LOGIN_PRIMARY,
+ false);
}
void SessionStateDelegateChromeos::ActiveUserChanged(
@@ -248,14 +251,14 @@ void SessionStateDelegateChromeos::UserAddedToSession(
}
void SessionStateDelegateChromeos::OnUserAddingStarted() {
- SetSessionState(SESSION_STATE_LOGIN_SECONDARY, false);
+ SetSessionState(ash::SessionState::LOGIN_SECONDARY, false);
}
void SessionStateDelegateChromeos::OnUserAddingFinished() {
- SetSessionState(SESSION_STATE_ACTIVE, false);
+ SetSessionState(ash::SessionState::ACTIVE, false);
}
-void SessionStateDelegateChromeos::SetSessionState(SessionState new_state,
+void SessionStateDelegateChromeos::SetSessionState(ash::SessionState new_state,
bool force) {
if (session_state_ == new_state && !force)
return;

Powered by Google App Engine
This is Rietveld 408576698