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

Unified Diff: chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc

Issue 382973002: ChromeOS: should not show "Language changed" notification for certain languages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bugfix. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc
index 3c31fccf733cf60ed4d0e8b06112999b837e375c..e203ed04bb524e7c99f995728eee56d13ff8dd8e 100644
--- a/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc
@@ -249,10 +249,10 @@ base::ListValue* CrosLanguageOptionsHandler::GetLanguageListInternal(
const std::string& language_id = iter->first;
const int language_idx = iter->second;
- const size_t dash_pos = language_id.find_first_of('-');
+ const std::string lang = l10n_util::GetLanguage(language_id);
// Ignore non-specific codes.
- if (dash_pos == std::string::npos || dash_pos == 0)
+ if (lang.empty() || lang == language_id)
continue;
if (std::find(base_language_codes.begin(),

Powered by Google App Engine
This is Rietveld 408576698