Chromium Code Reviews| Index: components/autofill/core/browser/autofill_country.cc |
| diff --git a/components/autofill/core/browser/autofill_country.cc b/components/autofill/core/browser/autofill_country.cc |
| index 52428d6440bfb70ba7a9f7f4cf81680fba2cdd8e..ee042615baa92330e1af8f2b150baea512fd4493 100644 |
| --- a/components/autofill/core/browser/autofill_country.cc |
| +++ b/components/autofill/core/browser/autofill_country.cc |
| @@ -45,6 +45,9 @@ struct StaticCountryData { |
| // Maps country codes to localized label string identifiers. |
| const StaticCountryData kCountryData[] = { |
| + { "AC", { IDS_AUTOFILL_FIELD_LABEL_POSTAL_CODE, |
| + IDS_AUTOFILL_FIELD_LABEL_PROVINCE, |
| + ADDRESS_REQUIRES_CITY } }, |
|
please use gerrit instead
2014/06/26 00:35:16
These countries are added because they are in liba
|
| { "AD", { IDS_AUTOFILL_FIELD_LABEL_POSTAL_CODE, |
| IDS_AUTOFILL_FIELD_LABEL_PARISH, |
| ADDRESS_REQUIRES_STATE } }, |
| @@ -66,9 +69,6 @@ const StaticCountryData kCountryData[] = { |
| { "AM", { IDS_AUTOFILL_FIELD_LABEL_POSTAL_CODE, |
| IDS_AUTOFILL_FIELD_LABEL_PROVINCE, |
| ADDRESS_REQUIREMENTS_UNKNOWN } }, |
| - { "AN", { IDS_AUTOFILL_FIELD_LABEL_POSTAL_CODE, |
| - IDS_AUTOFILL_FIELD_LABEL_PROVINCE, |
| - ADDRESS_REQUIREMENTS_UNKNOWN } }, |
|
please use gerrit instead
2014/06/26 00:35:16
This country no longer exists.
|
| { "AO", { IDS_AUTOFILL_FIELD_LABEL_POSTAL_CODE, |
| IDS_AUTOFILL_FIELD_LABEL_PROVINCE, |
| ADDRESS_REQUIREMENTS_UNKNOWN } }, |
| @@ -663,6 +663,9 @@ const StaticCountryData kCountryData[] = { |
| { "SZ", { IDS_AUTOFILL_FIELD_LABEL_POSTAL_CODE, |
| IDS_AUTOFILL_FIELD_LABEL_PROVINCE, |
| ADDRESS_REQUIREMENTS_UNKNOWN } }, |
| + { "TA", { IDS_AUTOFILL_FIELD_LABEL_POSTAL_CODE, |
| + IDS_AUTOFILL_FIELD_LABEL_PROVINCE, |
| + ADDRESS_REQUIRES_CITY } }, |
| { "TC", { IDS_AUTOFILL_FIELD_LABEL_POSTAL_CODE, |
| IDS_AUTOFILL_FIELD_LABEL_PROVINCE, |
| ADDRESS_REQUIRES_CITY_ZIP } }, |
| @@ -756,6 +759,9 @@ const StaticCountryData kCountryData[] = { |
| { "WS", { IDS_AUTOFILL_FIELD_LABEL_POSTAL_CODE, |
| IDS_AUTOFILL_FIELD_LABEL_PROVINCE, |
| ADDRESS_REQUIREMENTS_UNKNOWN } }, |
| + { "XK", { IDS_AUTOFILL_FIELD_LABEL_POSTAL_CODE, |
| + IDS_AUTOFILL_FIELD_LABEL_PROVINCE, |
| + ADDRESS_REQUIREMENTS_UNKNOWN } }, |
| { "YE", { IDS_AUTOFILL_FIELD_LABEL_POSTAL_CODE, |
| IDS_AUTOFILL_FIELD_LABEL_PROVINCE, |
| ADDRESS_REQUIRES_CITY } }, |
| @@ -904,11 +910,14 @@ CountryNames::CountryNames() { |
| it != CountryDataMap::End(); |
| ++it) { |
| const std::string& country_code = it->first; |
| + common_names_.insert(std::make_pair(country_code, country_code)); |
| + |
| std::string iso3_country_code = |
| icu::Locale(NULL, country_code.c_str()).getISO3Country(); |
| - common_names_.insert(std::make_pair(country_code, country_code)); |
| - common_names_.insert(std::make_pair(iso3_country_code, country_code)); |
| + // ICU list of countries can be out-of-date with CLDR. |
| + if (!iso3_country_code.empty()) |
| + common_names_.insert(std::make_pair(iso3_country_code, country_code)); |
|
please use gerrit instead
2014/06/26 00:35:16
ICU uses data from CLDR, but is out-of-date from t
|
| } |
| // Add a few other common synonyms. |