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

Unified Diff: components/autofill/core/browser/address.cc

Issue 1582353006: CountryNames: Separate data creation from usage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@571610_exposeCountryNamesToTesting
Patch Set: More Android fixes Created 4 years, 11 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: components/autofill/core/browser/address.cc
diff --git a/components/autofill/core/browser/address.cc b/components/autofill/core/browser/address.cc
index 88d6dfdde0163ba4f0f5a03c1a05f303c9ac8f49..428d9f5283efe815adacbcd2901d5d59f181acf6 100644
--- a/components/autofill/core/browser/address.cc
+++ b/components/autofill/core/browser/address.cc
@@ -170,8 +170,7 @@ bool Address::SetInfo(const AutofillType& type,
ServerFieldType storable_type = type.GetStorableType();
if (storable_type == ADDRESS_HOME_COUNTRY && !value.empty()) {
- country_code_ =
- CountryNames::GetInstance()->GetCountryCode(value, app_locale);
+ country_code_ = CountryNames::GetInstance()->GetCountryCode(value);
return !country_code_.empty();
}
@@ -196,8 +195,7 @@ void Address::GetMatchingTypes(const base::string16& text,
FormGroup::GetMatchingTypes(text, app_locale, matching_types);
// Check to see if the |text| canonicalized as a country name is a match.
- std::string country_code =
- CountryNames::GetInstance()->GetCountryCode(text, app_locale);
+ std::string country_code = CountryNames::GetInstance()->GetCountryCode(text);
if (!country_code.empty() && country_code_ == country_code)
matching_types->insert(ADDRESS_HOME_COUNTRY);
}

Powered by Google App Engine
This is Rietveld 408576698