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

Unified Diff: chrome/browser/ui/webui/chromeos/login/l10n_util.cc

Issue 471403005: Revert of ChromeOS: should not show "Language changed" notification for certain languages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « chrome/browser/chromeos/locale_change_guard_unittest.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b981f8b67cccae04432ebb83aff6085a18cda441..34a690dcedd22a20ce269d68ee05312756be3294 100644
--- a/chrome/browser/ui/webui/chromeos/login/l10n_util.cc
+++ b/chrome/browser/ui/webui/chromeos/login/l10n_util.cc
@@ -126,10 +126,10 @@
it != language_index.end(); ++it) {
const std::string& language_id = it->first;
- const std::string lang = l10n_util::GetLanguage(language_id);
+ const size_t dash_pos = language_id.find_first_of('-');
// Ignore non-specific codes.
- if (lang.empty() || lang == language_id)
+ if (dash_pos == std::string::npos || dash_pos == 0)
continue;
if (std::find(base_language_codes.begin(),
« no previous file with comments | « chrome/browser/chromeos/locale_change_guard_unittest.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698