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

Side by Side Diff: chrome/browser/chromeos/preferences.cc

Issue 18001004: Remove Hangul IME with migration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update Tests: Remove Ko/Kr entry and mozc-hangul Created 7 years, 5 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/preferences.h" 5 #include "chrome/browser/chromeos/preferences.h"
6 6
7 #include "ash/magnifier/magnifier_constants.h" 7 #include "ash/magnifier/magnifier_constants.h"
8 #include "ash/shell_delegate.h" 8 #include "ash/shell_delegate.h"
9 #include "base/chromeos/chromeos_version.h" 9 #include "base/chromeos/chromeos_version.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 std::vector<std::string> split_values; 728 std::vector<std::string> split_values;
729 if (!value.empty()) 729 if (!value.empty())
730 base::SplitString(value, ',', &split_values); 730 base::SplitString(value, ',', &split_values);
731 731
732 input_method_manager_->SetEnabledExtensionImes(&split_values); 732 input_method_manager_->SetEnabledExtensionImes(&split_values);
733 } 733 }
734 734
735 // Do not check |*pref_name| of the prefs for remembering current/previous 735 // Do not check |*pref_name| of the prefs for remembering current/previous
736 // input methods here. We're only interested in initial values of the prefs. 736 // input methods here. We're only interested in initial values of the prefs.
737 737
738 // TODO(nona): remove all IME preference entries. crbug.com/256102
738 for (size_t i = 0; i < language_prefs::kNumChewingBooleanPrefs; ++i) { 739 for (size_t i = 0; i < language_prefs::kNumChewingBooleanPrefs; ++i) {
739 if (!pref_name || 740 if (!pref_name ||
740 *pref_name == language_prefs::kChewingBooleanPrefs[i].pref_name) { 741 *pref_name == language_prefs::kChewingBooleanPrefs[i].pref_name) {
741 SetLanguageConfigBoolean( 742 SetLanguageConfigBoolean(
742 language_prefs::kChewingSectionName, 743 language_prefs::kChewingSectionName,
743 language_prefs::kChewingBooleanPrefs[i].ibus_config_name, 744 language_prefs::kChewingBooleanPrefs[i].ibus_config_name,
744 chewing_boolean_prefs_[i].GetValue()); 745 chewing_boolean_prefs_[i].GetValue());
745 } 746 }
746 } 747 }
747 for (size_t i = 0; i < language_prefs::kNumChewingMultipleChoicePrefs; ++i) { 748 for (size_t i = 0; i < language_prefs::kNumChewingMultipleChoicePrefs; ++i) {
(...skipping 17 matching lines...) Expand all
765 if (!pref_name || 766 if (!pref_name ||
766 *pref_name == language_prefs::kChewingIntegerPrefs[i].pref_name) { 767 *pref_name == language_prefs::kChewingIntegerPrefs[i].pref_name) {
767 SetLanguageConfigInteger( 768 SetLanguageConfigInteger(
768 language_prefs::kChewingSectionName, 769 language_prefs::kChewingSectionName,
769 language_prefs::kChewingIntegerPrefs[i].ibus_config_name, 770 language_prefs::kChewingIntegerPrefs[i].ibus_config_name,
770 chewing_integer_prefs_[i].GetValue()); 771 chewing_integer_prefs_[i].GetValue());
771 } 772 }
772 } 773 }
773 if (!pref_name || 774 if (!pref_name ||
774 *pref_name == prefs::kLanguageHangulKeyboard) { 775 *pref_name == prefs::kLanguageHangulKeyboard) {
775 SetLanguageConfigString(language_prefs::kHangulSectionName, 776 std::vector<std::string> new_input_method_ids;
776 language_prefs::kHangulKeyboardConfigName, 777 if (input_method_manager_->MigrateKoreanKeyboard(
777 hangul_keyboard_.GetValue()); 778 hangul_keyboard_.GetValue(),
779 &new_input_method_ids)) {
780 preload_engines_.SetValue(JoinString(new_input_method_ids, ','));
781 hangul_keyboard_.SetValue("dummy_value_already_migrated");
782 }
778 } 783 }
779 if (!pref_name || *pref_name == prefs::kLanguageHangulHanjaBindingKeys) { 784 if (!pref_name || *pref_name == prefs::kLanguageHangulHanjaBindingKeys) {
780 SetLanguageConfigString(language_prefs::kHangulSectionName, 785 SetLanguageConfigString(language_prefs::kHangulSectionName,
781 language_prefs::kHangulHanjaBindingKeysConfigName, 786 language_prefs::kHangulHanjaBindingKeysConfigName,
782 hangul_hanja_binding_keys_.GetValue()); 787 hangul_hanja_binding_keys_.GetValue());
783 } 788 }
784 for (size_t i = 0; i < language_prefs::kNumPinyinBooleanPrefs; ++i) { 789 for (size_t i = 0; i < language_prefs::kNumPinyinBooleanPrefs; ++i) {
785 if (!pref_name || 790 if (!pref_name ||
786 *pref_name == language_prefs::kPinyinBooleanPrefs[i].pref_name) { 791 *pref_name == language_prefs::kPinyinBooleanPrefs[i].pref_name) {
787 SetLanguageConfigBoolean( 792 SetLanguageConfigBoolean(
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 1018
1014 input_method::AutoRepeatRate rate; 1019 input_method::AutoRepeatRate rate;
1015 rate.initial_delay_in_ms = xkb_auto_repeat_delay_pref_.GetValue(); 1020 rate.initial_delay_in_ms = xkb_auto_repeat_delay_pref_.GetValue();
1016 rate.repeat_interval_in_ms = xkb_auto_repeat_interval_pref_.GetValue(); 1021 rate.repeat_interval_in_ms = xkb_auto_repeat_interval_pref_.GetValue();
1017 DCHECK(rate.initial_delay_in_ms > 0); 1022 DCHECK(rate.initial_delay_in_ms > 0);
1018 DCHECK(rate.repeat_interval_in_ms > 0); 1023 DCHECK(rate.repeat_interval_in_ms > 0);
1019 input_method::XKeyboard::SetAutoRepeatRate(rate); 1024 input_method::XKeyboard::SetAutoRepeatRate(rate);
1020 } 1025 }
1021 1026
1022 } // namespace chromeos 1027 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/input_method/mock_input_method_manager.cc ('k') | chromeos/ime/input_method_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698