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

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

Issue 23297004: Remove ExtraLanguage entries from InputMethodUtil. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove obsolete tests. Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/input_method/input_method_util.cc
diff --git a/chrome/browser/chromeos/input_method/input_method_util.cc b/chrome/browser/chromeos/input_method/input_method_util.cc
index fc91b63217325fb175e117397108109038c2d3bd..e8ed45b41e8070000182b206007992b40efa8ce1 100644
--- a/chrome/browser/chromeos/input_method/input_method_util.cc
+++ b/chrome/browser/chromeos/input_method/input_method_util.cc
@@ -293,32 +293,6 @@ const struct EnglishToResouceId {
const size_t kEnglishToResourceIdArraySize =
arraysize(kEnglishToResourceIdArray);
-// The list of language that do not have associated input methods in IBus.
-// For these languages, we associate input methods here.
-const struct ExtraLanguage {
- const char* language_code;
- const char* input_method_id;
-} kExtraLanguages[] = {
- // Language Code Input Method ID
- { "en-AU", "xkb:us::eng" }, // For Austrailia, use US keyboard layout.
- { "id", "xkb:us::eng" }, // For Indonesian, use US keyboard layout.
- // The code "fil" comes from l10_util.cc.
- { "fil", "xkb:us::eng" }, // For Filipino, use US keyboard layout.
- // For Netherlands, use US international keyboard layout.
- { "nl", "xkb:us:intl:eng" },
- // The code "es-419" comes from l10_util.cc.
- // For Spanish in Latin America, use Latin American keyboard layout.
- { "es-419", "xkb:latam::spa" },
- // For Malay, use US keyboard layout. crosbug.com/p/8288
- { "ms", "xkb:us::eng" },
- // For Brazil, it is common to use US-international keyboard layout.
- { "pt-BR", "xkb:us:intl:eng" },
-
- // TODO(yusukes): Add {"sw", "xkb:us::eng"} once Swahili is removed from the
- // blacklist in src/ui/base/l10n/l10n_util_posix.cc.
-};
-const size_t kExtraLanguagesLength = arraysize(kExtraLanguages);
-
} // namespace
InputMethodUtil::InputMethodUtil(
@@ -509,23 +483,6 @@ const InputMethodDescriptor* InputMethodUtil::GetInputMethodDescriptorFromId(
return (iter == id_to_descriptor_.end()) ? NULL : &(iter->second);
}
-std::vector<std::string> InputMethodUtil::GetExtraLanguageCodesFromId(
- const std::string& input_method_id) const {
- std::vector<std::string> result;
- for (size_t i = 0; i < kExtraLanguagesLength; ++i) {
- if (input_method_id == kExtraLanguages[i].input_method_id)
- result.push_back(kExtraLanguages[i].language_code);
- }
- return result;
-}
-
-std::vector<std::string> InputMethodUtil::GetExtraLanguageCodeList() const {
- std::vector<std::string> result;
- for (size_t i = 0; i < kExtraLanguagesLength; ++i)
- result.push_back(kExtraLanguages[i].language_code);
- return result;
-}
-
bool InputMethodUtil::GetInputMethodIdsFromLanguageCode(
const std::string& normalized_language_code,
InputMethodType type,
@@ -715,21 +672,6 @@ void InputMethodUtil::ReloadInternalMaps() {
input_method));
}
}
-
- // Go through the languages listed in kExtraLanguages.
- for (size_t i = 0; i < kExtraLanguagesLength; ++i) {
- const char* language_code = kExtraLanguages[i].language_code;
- const char* input_method_id = kExtraLanguages[i].input_method_id;
- InputMethodIdToDescriptorMap::const_iterator iter =
- id_to_descriptor_.find(input_method_id);
- // If the associated input method descriptor is found, add the language
- // code and the input method.
- if (iter != id_to_descriptor_.end()) {
- const InputMethodDescriptor& input_method = iter->second;
- language_code_to_ids_.insert(
- std::make_pair(language_code, input_method.id()));
- }
- }
}
} // namespace input_method

Powered by Google App Engine
This is Rietveld 408576698