| Index: chrome/browser/chromeos/preferences.cc
|
| diff --git a/chrome/browser/chromeos/preferences.cc b/chrome/browser/chromeos/preferences.cc
|
| index cc4828f4cf436b0d98f25b4b3bb3537f47c85f65..3c259c52e549a72cb29e0754038c4b6d7748b81e 100644
|
| --- a/chrome/browser/chromeos/preferences.cc
|
| +++ b/chrome/browser/chromeos/preferences.cc
|
| @@ -134,13 +134,6 @@ void Preferences::RegisterUserPrefs(PrefService* prefs) {
|
| prefs->RegisterStringPref(prefs::kLanguagePreviousInputMethod,
|
| "",
|
| PrefService::UNSYNCABLE_PREF);
|
| - // We don't sync input method hotkeys since they're not configurable.
|
| - prefs->RegisterStringPref(prefs::kLanguageHotkeyNextEngineInMenu,
|
| - language_prefs::kHotkeyNextEngineInMenu,
|
| - PrefService::UNSYNCABLE_PREF);
|
| - prefs->RegisterStringPref(prefs::kLanguageHotkeyPreviousEngine,
|
| - language_prefs::kHotkeyPreviousEngine,
|
| - PrefService::UNSYNCABLE_PREF);
|
| // We don't sync the list of input methods and preferred languages since a
|
| // user might use two or more devices with different hardware keyboards.
|
| // crosbug.com/15181
|
| @@ -278,10 +271,6 @@ void Preferences::InitUserPrefs(PrefService* prefs) {
|
| prefs, this);
|
| primary_mouse_button_right_.Init(prefs::kPrimaryMouseButtonRight,
|
| prefs, this);
|
| - hotkey_next_engine_in_menu_.Init(
|
| - prefs::kLanguageHotkeyNextEngineInMenu, prefs, this);
|
| - hotkey_previous_engine_.Init(
|
| - prefs::kLanguageHotkeyPreviousEngine, prefs, this);
|
| preferred_languages_.Init(prefs::kLanguagePreferredLanguages,
|
| prefs, this);
|
| preload_engines_.Init(prefs::kLanguagePreloadEngines, prefs, this);
|
| @@ -422,18 +411,6 @@ void Preferences::NotifyPrefChanged(const std::string* pref_name) {
|
| UMA_HISTOGRAM_BOOLEAN("Mouse.PrimaryButtonRight.Started", right);
|
| }
|
|
|
| - if (!pref_name || *pref_name == prefs::kLanguageHotkeyNextEngineInMenu) {
|
| - SetLanguageConfigStringListAsCSV(
|
| - language_prefs::kHotKeySectionName,
|
| - language_prefs::kNextEngineInMenuConfigName,
|
| - hotkey_next_engine_in_menu_.GetValue());
|
| - }
|
| - if (!pref_name || *pref_name == prefs::kLanguageHotkeyPreviousEngine) {
|
| - SetLanguageConfigStringListAsCSV(
|
| - language_prefs::kHotKeySectionName,
|
| - language_prefs::kPreviousEngineConfigName,
|
| - hotkey_previous_engine_.GetValue());
|
| - }
|
| if (!pref_name || *pref_name == prefs::kLanguagePreferredLanguages) {
|
| // Unlike kLanguagePreloadEngines and some other input method
|
| // preferencs, we don't need to send this to ibus-daemon.
|
| @@ -623,6 +600,12 @@ void Preferences::SetLanguageConfigStringListAsCSV(const char* section,
|
| if (!value.empty())
|
| base::SplitString(value, ',', &split_values);
|
|
|
| + if (section == std::string(language_prefs::kGeneralSectionName) &&
|
| + name == std::string(language_prefs::kPreloadEnginesConfigName)) {
|
| + input_method_manager_->EnableInputMethods(split_values);
|
| + return;
|
| + }
|
| +
|
| // We should call the cros API even when |value| is empty, to disable default
|
| // config.
|
| SetLanguageConfigStringList(section, name, split_values);
|
| @@ -699,10 +682,7 @@ void Preferences::UpdateVirturalKeyboardPreference(PrefService* prefs) {
|
| prefs->GetDictionary(prefs::kLanguagePreferredVirtualKeyboard);
|
| DCHECK(virtual_keyboard_pref);
|
|
|
| - input_method::InputMethodManager* input_method_manager =
|
| - input_method::InputMethodManager::GetInstance();
|
| - input_method_manager->ClearAllVirtualKeyboardPreferences();
|
| -
|
| + // TODO(yusukes): Clear all virtual keyboard preferences here.
|
| std::string url;
|
| std::vector<std::string> layouts_to_remove;
|
| for (DictionaryValue::key_iterator iter = virtual_keyboard_pref->begin_keys();
|
| @@ -711,14 +691,7 @@ void Preferences::UpdateVirturalKeyboardPreference(PrefService* prefs) {
|
| const std::string& layout_id = *iter; // e.g. "us", "handwriting-vk"
|
| if (!virtual_keyboard_pref->GetString(layout_id, &url))
|
| continue;
|
| - if (!input_method_manager->SetVirtualKeyboardPreference(
|
| - layout_id, GURL(url))) {
|
| - // Either |layout_id| or |url| is invalid. Remove the key from |prefs|
|
| - // later.
|
| - layouts_to_remove.push_back(layout_id);
|
| - LOG(ERROR) << "Removing invalid virtual keyboard pref: layout="
|
| - << layout_id;
|
| - }
|
| + // TODO(yusukes): add the virtual keyboard preferences here.
|
| }
|
|
|
| // Remove invalid prefs.
|
|
|