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

Unified Diff: chrome/browser/autofill/autofill_country.cc

Issue 6626070: Fix the settings page for es-419 locale: Spanish (Latin America). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed Created 9 years, 9 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 | « no previous file | chrome/browser/autofill/autofill_country_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_country.cc
diff --git a/chrome/browser/autofill/autofill_country.cc b/chrome/browser/autofill/autofill_country.cc
index 7cc8a45b6a949e03be8aed391c997a63bcc7225b..3a5c947050b2862e4680512d81c41c31925bb42c 100644
--- a/chrome/browser/autofill/autofill_country.cc
+++ b/chrome/browser/autofill/autofill_country.cc
@@ -387,7 +387,9 @@ const std::string AutofillCountry::CountryCodeForLocale(
std::string country_code = icu::Locale(likely_locale.c_str()).getCountry();
// Default to the United States if we have no better guess.
- return !country_code.empty() ? country_code : "US";
+ if (!AutofillCountries::countries().count(country_code))
+ return "US";
+ return country_code;
}
// static
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_country_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698