| Index: chrome/browser/chromeos/login/lock/screen_locker.cc
|
| diff --git a/chrome/browser/chromeos/login/lock/screen_locker.cc b/chrome/browser/chromeos/login/lock/screen_locker.cc
|
| index fdcc514647b652267ed7b1ada1aeace0d121b3c9..5e776cf3b48bea30104f8a2d77d5a633e8dacc9a 100644
|
| --- a/chrome/browser/chromeos/login/lock/screen_locker.cc
|
| +++ b/chrome/browser/chromeos/login/lock/screen_locker.cc
|
| @@ -202,10 +202,10 @@ void ScreenLocker::OnLoginSuccess(const UserContext& user_context) {
|
| UMA_HISTOGRAM_TIMES("ScreenLocker.AuthenticationSuccessTime", delta);
|
| }
|
|
|
| - const User* user = UserManager::Get()->FindUser(user_context.GetUserID());
|
| + const User* user = GetUserManager()->FindUser(user_context.GetUserID());
|
| if (user) {
|
| if (!user->is_active())
|
| - UserManager::Get()->SwitchActiveUser(user_context.GetUserID());
|
| + GetUserManager()->SwitchActiveUser(user_context.GetUserID());
|
| } else {
|
| NOTREACHED() << "Logged in user not found.";
|
| }
|
| @@ -253,7 +253,7 @@ void ScreenLocker::Authenticate(const UserContext& user_context) {
|
| // Special case: supervised users. Use special authenticator.
|
| if (const User* user = FindUnlockUser(user_context.GetUserID())) {
|
| if (user->GetType() == user_manager::USER_TYPE_LOCALLY_MANAGED) {
|
| - UserContext updated_context = UserManager::Get()
|
| + UserContext updated_context = GetUserManager()
|
| ->GetSupervisedUserManager()
|
| ->GetAuthentication()
|
| ->TransformKey(user_context);
|
| @@ -345,7 +345,7 @@ void ScreenLocker::HandleLockScreenRequest() {
|
| return;
|
| }
|
| if (g_screen_lock_observer->session_started() &&
|
| - UserManager::Get()->CanCurrentUserLock()) {
|
| + GetUserManager()->CanCurrentUserLock()) {
|
| ScreenLocker::Show();
|
| ash::Shell::GetInstance()->lock_state_controller()->OnStartingLock();
|
| } else {
|
| @@ -367,8 +367,8 @@ void ScreenLocker::Show() {
|
| // Check whether the currently logged in user is a guest account and if so,
|
| // refuse to lock the screen (crosbug.com/23764).
|
| // For a demo user, we should never show the lock screen (crosbug.com/27647).
|
| - if (UserManager::Get()->IsLoggedInAsGuest() ||
|
| - UserManager::Get()->IsLoggedInAsDemoUser()) {
|
| + if (GetUserManager()->IsLoggedInAsGuest() ||
|
| + GetUserManager()->IsLoggedInAsDemoUser()) {
|
| VLOG(1) << "Refusing to lock screen for guest/demo account";
|
| return;
|
| }
|
| @@ -386,8 +386,7 @@ void ScreenLocker::Show() {
|
| }
|
|
|
| if (!screen_locker_) {
|
| - ScreenLocker* locker =
|
| - new ScreenLocker(UserManager::Get()->GetUnlockUsers());
|
| + ScreenLocker* locker = new ScreenLocker(GetUserManager()->GetUnlockUsers());
|
| VLOG(1) << "Created ScreenLocker " << locker;
|
| locker->Init();
|
| } else {
|
| @@ -402,8 +401,8 @@ void ScreenLocker::Show() {
|
| void ScreenLocker::Hide() {
|
| DCHECK(base::MessageLoopForUI::IsCurrent());
|
| // For a guest/demo user, screen_locker_ would have never been initialized.
|
| - if (UserManager::Get()->IsLoggedInAsGuest() ||
|
| - UserManager::Get()->IsLoggedInAsDemoUser()) {
|
| + if (GetUserManager()->IsLoggedInAsGuest() ||
|
| + GetUserManager()->IsLoggedInAsDemoUser()) {
|
| VLOG(1) << "Refusing to hide lock screen for guest/demo account";
|
| return;
|
| }
|
|
|