Commit 8e53e8ed authored by Shu Chen's avatar Shu Chen Committed by Commit Bot

The init of Preferences instance should affect the singleton...

The init of Preferences instance should affect the singleton InputMethodManager state only when the preferences belongs to the active user.

Bug: 841112
Change-Id: I7ed3cb2cbd8c0a27cab869f336c93c1a5becefa6
Reviewed-on: https://chromium-review.googlesource.com/1125646
Commit-Queue: Shu Chen <shuchen@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573595}
parent 24f87d0a
...@@ -567,6 +567,10 @@ void Preferences::Init(Profile* profile, const user_manager::User* user) { ...@@ -567,6 +567,10 @@ void Preferences::Init(Profile* profile, const user_manager::User* user) {
// SetState() is modifying |current_input_method_| (via // SetState() is modifying |current_input_method_| (via
// PersistUserInputMethod() ). This way SetState() here may be called only // PersistUserInputMethod() ). This way SetState() here may be called only
// after ApplyPreferences(). // after ApplyPreferences().
// As InputMethodManager only holds the active state for the active user,
// SetState() is only called if the preferences belongs to the active user.
// See https://crbug.com/841112.
if (user->is_active())
input_method_manager_->SetState(ime_state_); input_method_manager_->SetState(ime_state_);
input_method_syncer_.reset( input_method_syncer_.reset(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment