| Index: chrome/browser/ui/webui/chromeos/login/l10n_util.cc
|
| diff --git a/chrome/browser/ui/webui/chromeos/login/l10n_util.cc b/chrome/browser/ui/webui/chromeos/login/l10n_util.cc
|
| index 49a7aa84aa29c766d4ed94e545adcc4172df417c..41389aa027ee5175e78e0faf1a99030303a8e0f4 100644
|
| --- a/chrome/browser/ui/webui/chromeos/login/l10n_util.cc
|
| +++ b/chrome/browser/ui/webui/chromeos/login/l10n_util.cc
|
| @@ -155,7 +155,7 @@ std::unique_ptr<base::ListValue> GetLanguageList(
|
| if (lang.empty() || lang == language_id)
|
| continue;
|
|
|
| - if (ContainsValue(base_language_codes, language_id)) {
|
| + if (base::ContainsValue(base_language_codes, language_id)) {
|
| // Language is supported. No need to replace
|
| continue;
|
| }
|
| @@ -163,7 +163,7 @@ std::unique_ptr<base::ListValue> GetLanguageList(
|
| if (!l10n_util::CheckAndResolveLocale(language_id, &resolved_locale))
|
| continue;
|
|
|
| - if (!ContainsValue(base_language_codes, resolved_locale)) {
|
| + if (!base::ContainsValue(base_language_codes, resolved_locale)) {
|
| // Resolved locale is not supported.
|
| continue;
|
| }
|
| @@ -186,26 +186,25 @@ std::unique_ptr<base::ListValue> GetLanguageList(
|
| it != language_codes.end(); ++it) {
|
| // Exclude the language which is not in |base_langauge_codes| even it has
|
| // input methods.
|
| - if (!ContainsValue(base_language_codes, *it))
|
| - continue;
|
| -
|
| - const base::string16 display_name =
|
| - l10n_util::GetDisplayNameForLocale(*it, app_locale, true);
|
| - const base::string16 native_display_name =
|
| - l10n_util::GetDisplayNameForLocale(*it, *it, true);
|
| -
|
| - language_map[display_name] =
|
| - std::make_pair(*it, native_display_name);
|
| -
|
| - const std::map<std::string, int>::const_iterator index_pos =
|
| - language_index.find(*it);
|
| - if (index_pos != language_index.end()) {
|
| - base::string16& stored_display_name =
|
| - most_relevant_locales_display_names[index_pos->second];
|
| - if (stored_display_name.empty()) {
|
| - stored_display_name = display_name;
|
| - ++most_relevant_locales_count;
|
| - }
|
| + if (!base::ContainsValue(base_language_codes, *it))
|
| + continue;
|
| +
|
| + const base::string16 display_name =
|
| + l10n_util::GetDisplayNameForLocale(*it, app_locale, true);
|
| + const base::string16 native_display_name =
|
| + l10n_util::GetDisplayNameForLocale(*it, *it, true);
|
| +
|
| + language_map[display_name] = std::make_pair(*it, native_display_name);
|
| +
|
| + const std::map<std::string, int>::const_iterator index_pos =
|
| + language_index.find(*it);
|
| + if (index_pos != language_index.end()) {
|
| + base::string16& stored_display_name =
|
| + most_relevant_locales_display_names[index_pos->second];
|
| + if (stored_display_name.empty()) {
|
| + stored_display_name = display_name;
|
| + ++most_relevant_locales_count;
|
| + }
|
| } else {
|
| display_names.push_back(display_name);
|
| }
|
|
|