| Index: chrome/browser/chromeos/dom_ui/language_options_handler.cc
|
| diff --git a/chrome/browser/chromeos/dom_ui/language_options_handler.cc b/chrome/browser/chromeos/dom_ui/language_options_handler.cc
|
| index a28eae1963f59b54a9286a2d5684e4651e551a02..7bbdbb8a644aea7b35a10f027a8e2297e05463dd 100644
|
| --- a/chrome/browser/chromeos/dom_ui/language_options_handler.cc
|
| +++ b/chrome/browser/chromeos/dom_ui/language_options_handler.cc
|
| @@ -45,15 +45,8 @@ void LanguageOptionsHandler::GetLocalizedValues(
|
| IDS_OPTIONS_SETTINGS_LANGUAGES_DISPLAY_IN_THIS_LANGUAGE,
|
| l10n_util::GetString(IDS_PRODUCT_OS_NAME)));
|
|
|
| - // Build mappings of locale code (language code) to display name
|
| - // (ex. "en-US" => "English (United States)".
|
| - const std::vector<std::string>& locales = l10n_util::GetAvailableLocales();
|
| - for (size_t i = 0; i < locales.size(); ++i) {
|
| - localized_strings->SetString(UTF8ToWide(locales[i]),
|
| - chromeos::input_method::GetLanguageDisplayNameFromCode(locales[i]));
|
| - }
|
| -
|
| localized_strings->Set(L"inputMethodList", GetInputMethodList());
|
| + localized_strings->Set(L"languageList", GetLanguageList());
|
| }
|
|
|
| ListValue* LanguageOptionsHandler::GetInputMethodList() {
|
| @@ -80,3 +73,18 @@ ListValue* LanguageOptionsHandler::GetInputMethodList() {
|
|
|
| return input_method_list;
|
| }
|
| +
|
| +ListValue* LanguageOptionsHandler::GetLanguageList() {
|
| + ListValue* language_list = new ListValue();
|
| +
|
| + const std::vector<std::string>& locales = l10n_util::GetAvailableLocales();
|
| + for (size_t i = 0; i < locales.size(); ++i) {
|
| + DictionaryValue* dictionary = new DictionaryValue();
|
| + dictionary->SetString(L"code", UTF8ToWide(locales[i]));
|
| + dictionary->SetString(L"displayName",
|
| + chromeos::input_method::GetLanguageDisplayNameFromCode(locales[i]));
|
| + language_list->Append(dictionary);
|
| + }
|
| +
|
| + return language_list;
|
| +}
|
|
|