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 47eea7e0fcfb594dde1365ee3cff2912a8ff6806..15c9e60c668be6e9dc13c7986895e33ac6587b67 100644 |
--- a/chrome/browser/chromeos/login/lock/screen_locker.cc |
+++ b/chrome/browser/chromeos/login/lock/screen_locker.cc |
@@ -205,17 +205,13 @@ void ScreenLocker::OnAuthSuccess(const UserContext& user_context) { |
const user_manager::User* user = |
user_manager::UserManager::Get()->FindUser(user_context.GetUserID()); |
if (user) { |
- if (user->is_active()) { |
- DCHECK(saved_ime_state_); |
- input_method::InputMethodManager::Get()->SetState(saved_ime_state_); |
- } else { |
+ if (!user->is_active()) { |
user_manager::UserManager::Get()->SwitchActiveUser( |
user_context.GetUserID()); |
} |
} else { |
NOTREACHED() << "Logged in user not found."; |
} |
- saved_ime_state_ = NULL; |
authentication_capture_.reset(new AuthenticationParametersCapture()); |
authentication_capture_->user_context = user_context; |
@@ -463,6 +459,10 @@ ScreenLocker::~ScreenLocker() { |
VLOG(1) << "Calling session manager's HandleLockScreenDismissed D-Bus method"; |
DBusThreadManager::Get()->GetSessionManagerClient()-> |
NotifyLockScreenDismissed(); |
+ |
+ if (saved_ime_state_) { |
+ input_method::InputMethodManager::Get()->SetState(saved_ime_state_); |
+ } |
} |
void ScreenLocker::SetAuthenticator(Authenticator* authenticator) { |
@@ -482,8 +482,7 @@ void ScreenLocker::ScreenLockReady() { |
input_method::InputMethodManager* imm = |
input_method::InputMethodManager::Get(); |
- saved_ime_state_ = imm->GetActiveIMEState(); |
- imm->SetState(saved_ime_state_->Clone()); |
+ saved_ime_state_ = imm->GetActiveIMEState()->Clone(); |
imm->GetActiveIMEState()->EnableLockScreenLayouts(); |
Alexander Alekseev
2014/09/01 12:24:43
Why do you need this change?
This breaks "User def
Shu Chen
2014/09/01 13:37:53
I've reverted the change here. My original intenti
Alexander Alekseev
2014/09/01 13:50:05
SetState will not call ChangeInputMethodInternal()
|
bool state = true; |