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

Unified Diff: chrome/browser/chromeos/input_method/input_method_manager.cc

Issue 8569011: Update |current_input_method_| before notifying observers to fix Aura browser_tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 9 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/input_method/input_method_manager.cc
diff --git a/chrome/browser/chromeos/input_method/input_method_manager.cc b/chrome/browser/chromeos/input_method/input_method_manager.cc
index ea489f9f3eb63ca5b544c33ac7c501e804232209..ac8a99d832b37f0e56ee98b1f85eefc361b7360b 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager.cc
+++ b/chrome/browser/chromeos/input_method/input_method_manager.cc
@@ -685,12 +685,16 @@ class InputMethodManagerImpl : public HotkeyManager::Observer,
const ImeConfigValue& value) {
if (section == language_prefs::kGeneralSectionName &&
config_name == language_prefs::kPreloadEnginesConfigName) {
- if (value.string_list_value.size() == 1) {
+ if (value.string_list_value.size() == 1 ||
+ (value.string_list_value.size() != 0 &&
+ current_input_method_.id().empty())) {
// This is necessary to initialize current_input_method_. This is also
// necessary when the current layout (e.g. INTL) out of two (e.g. US and
// INTL) is disabled.
ChangeCurrentInputMethodFromId(value.string_list_value[0]);
}
+ DCHECK(!current_input_method_.id().empty());
+
// Update the indicator.
// TODO(yusukes): Remove ActiveInputMethodsChanged notification in
// FlushImeConfig().
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698