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 ef9f8074594280d13e302ef58b26a98dcc7d3a28..2f7c8405472735753c8d8adf41e5b0f75af54ce7 100644 |
--- a/chrome/browser/ui/ash/session_state_delegate_chromeos.cc |
+++ b/chrome/browser/ui/ash/session_state_delegate_chromeos.cc |
@@ -12,7 +12,6 @@ |
#include "chrome/browser/chromeos/login/lock/screen_locker.h" |
#include "chrome/browser/chromeos/login/ui/user_adding_screen.h" |
#include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h" |
-#include "chrome/browser/chromeos/login/users/user_manager.h" |
#include "chrome/browser/chromeos/profiles/profile_helper.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/profiles/profile_manager.h" |
@@ -23,11 +22,12 @@ |
#include "chromeos/dbus/session_manager_client.h" |
#include "chromeos/login/login_state.h" |
#include "components/user_manager/user.h" |
+#include "components/user_manager/user_manager.h" |
#include "google_apis/gaia/gaia_auth_util.h" |
SessionStateDelegateChromeos::SessionStateDelegateChromeos() |
: session_state_(SESSION_STATE_LOGIN_PRIMARY) { |
- chromeos::UserManager::Get()->AddSessionStateObserver(this); |
+ user_manager::UserManager::Get()->AddSessionStateObserver(this); |
chromeos::UserAddingScreen::Get()->AddObserver(this); |
// LoginState is not initialized in unit_tests. |
@@ -39,7 +39,7 @@ SessionStateDelegateChromeos::SessionStateDelegateChromeos() |
} |
SessionStateDelegateChromeos::~SessionStateDelegateChromeos() { |
- chromeos::UserManager::Get()->RemoveSessionStateObserver(this); |
+ user_manager::UserManager::Get()->RemoveSessionStateObserver(this); |
chromeos::UserAddingScreen::Get()->RemoveObserver(this); |
// LoginState is not initialized in unit_tests. |
@@ -51,7 +51,7 @@ content::BrowserContext* SessionStateDelegateChromeos::GetBrowserContextByIndex( |
ash::MultiProfileIndex index) { |
DCHECK_LT(index, NumberOfLoggedInUsers()); |
user_manager::User* user = |
- chromeos::UserManager::Get()->GetLRULoggedInUsers()[index]; |
+ user_manager::UserManager::Get()->GetLRULoggedInUsers()[index]; |
DCHECK(user); |
return chromeos::ProfileHelper::Get()->GetProfileByUserUnsafe(user); |
} |
@@ -62,7 +62,7 @@ SessionStateDelegateChromeos::GetBrowserContextForWindow( |
const std::string& user_id = |
chrome::MultiUserWindowManager::GetInstance()->GetWindowOwner(window); |
const user_manager::User* user = |
- chromeos::UserManager::Get()->FindUser(user_id); |
+ user_manager::UserManager::Get()->FindUser(user_id); |
DCHECK(user); |
return chromeos::ProfileHelper::Get()->GetProfileByUserUnsafe(user); |
} |
@@ -77,16 +77,16 @@ int SessionStateDelegateChromeos::GetMaximumNumberOfLoggedInUsers() const { |
} |
int SessionStateDelegateChromeos::NumberOfLoggedInUsers() const { |
- return chromeos::UserManager::Get()->GetLoggedInUsers().size(); |
+ return user_manager::UserManager::Get()->GetLoggedInUsers().size(); |
} |
bool SessionStateDelegateChromeos::IsActiveUserSessionStarted() const { |
- return chromeos::UserManager::Get()->IsSessionStarted(); |
+ return user_manager::UserManager::Get()->IsSessionStarted(); |
} |
bool SessionStateDelegateChromeos::CanLockScreen() const { |
const user_manager::UserList unlock_users = |
- chromeos::UserManager::Get()->GetUnlockUsers(); |
+ user_manager::UserManager::Get()->GetUnlockUsers(); |
return !unlock_users.empty(); |
} |
@@ -97,7 +97,7 @@ bool SessionStateDelegateChromeos::IsScreenLocked() const { |
bool SessionStateDelegateChromeos::ShouldLockScreenBeforeSuspending() const { |
const user_manager::UserList logged_in_users = |
- chromeos::UserManager::Get()->GetLoggedInUsers(); |
+ user_manager::UserManager::Get()->GetLoggedInUsers(); |
for (user_manager::UserList::const_iterator it = logged_in_users.begin(); |
it != logged_in_users.end(); |
++it) { |
@@ -140,7 +140,7 @@ SessionStateDelegateChromeos::GetSessionState() const { |
const user_manager::UserInfo* SessionStateDelegateChromeos::GetUserInfo( |
ash::MultiProfileIndex index) const { |
DCHECK_LT(index, NumberOfLoggedInUsers()); |
- return chromeos::UserManager::Get()->GetLRULoggedInUsers()[index]; |
+ return user_manager::UserManager::Get()->GetLRULoggedInUsers()[index]; |
} |
const user_manager::UserInfo* SessionStateDelegateChromeos::GetUserInfo( |
@@ -162,9 +162,9 @@ void SessionStateDelegateChromeos::SwitchActiveUser( |
// Also check that we got a user id and not an email address. |
DCHECK_EQ(user_id, |
gaia::CanonicalizeEmail(gaia::SanitizeEmail(user_id))); |
- if (user_id == chromeos::UserManager::Get()->GetActiveUser()->email()) |
+ if (user_id == user_manager::UserManager::Get()->GetActiveUser()->email()) |
return; |
- chromeos::UserManager::Get()->SwitchActiveUser(user_id); |
+ user_manager::UserManager::Get()->SwitchActiveUser(user_id); |
} |
void SessionStateDelegateChromeos::CycleActiveUser(CycleUser cycle_user) { |
@@ -173,9 +173,10 @@ void SessionStateDelegateChromeos::CycleActiveUser(CycleUser cycle_user) { |
return; |
const user_manager::UserList& logged_in_users = |
- chromeos::UserManager::Get()->GetLoggedInUsers(); |
+ user_manager::UserManager::Get()->GetLoggedInUsers(); |
- std::string user_id = chromeos::UserManager::Get()->GetActiveUser()->email(); |
+ std::string user_id = |
+ user_manager::UserManager::Get()->GetActiveUser()->email(); |
// Get an iterator positioned at the active user. |
user_manager::UserList::const_iterator it; |
@@ -206,7 +207,7 @@ void SessionStateDelegateChromeos::CycleActiveUser(CycleUser cycle_user) { |
} |
// Switch using the transformed |user_id|. |
- chromeos::UserManager::Get()->SwitchActiveUser(user_id); |
+ user_manager::UserManager::Get()->SwitchActiveUser(user_id); |
} |
bool SessionStateDelegateChromeos::IsMultiProfileAllowedByPrimaryUserPolicy() |