Chromium Code Reviews| Index: chrome/browser/chromeos/input_method/input_method_manager_impl.cc |
| diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc |
| index 91f399329a424d4d64291328ea572ee443ee883c..e98c1239e036db28e366281b5803ba4202e46b2b 100644 |
| --- a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc |
| +++ b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc |
| @@ -113,10 +113,9 @@ void InputMethodManagerImpl::SetState(State new_state) { |
| scoped_ptr<InputMethodDescriptors> |
| InputMethodManagerImpl::GetSupportedInputMethods() const { |
| - scoped_ptr<InputMethodDescriptors> whitelist_imes = |
| - whitelist_.GetSupportedInputMethods(); |
| - if (!extension_ime_util::UseWrappedExtensionKeyboardLayouts()) |
| - return whitelist_imes.Pass(); |
| + if (!extension_ime_util::UseWrappedExtensionKeyboardLayouts() || |
| + !component_extension_ime_manager_->IsInitialized()) |
| + return whitelist_.GetSupportedInputMethods().Pass(); |
|
Yuki
2014/06/02 06:28:52
No need to call Pass() for temporary objects.
http
Shu Chen
2014/06/02 09:45:02
Done.
|
| return scoped_ptr<InputMethodDescriptors>(new InputMethodDescriptors).Pass(); |
| } |
| @@ -329,9 +328,7 @@ bool InputMethodManagerImpl::ChangeInputMethodInternal( |
| } |
| if (!component_extension_ime_manager_->IsInitialized() && |
| - (!InputMethodUtil::IsKeyboardLayout(input_method_id_to_switch) || |
| - extension_ime_util::IsKeyboardLayoutExtension( |
| - input_method_id_to_switch))) { |
| + !InputMethodUtil::IsKeyboardLayout(input_method_id_to_switch)) { |
| // We can't change input method before the initialization of |
| // component extension ime manager. ChangeInputMethod will be |
| // called with |pending_input_method_| when the initialization is |