| 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 d31ac6c1a0a659168f8552145e5643d0d0bbdf38..2e0be52843a617c61ca2c336ba0535196068086f 100644
|
| --- a/components/autofill/core/browser/autofill_country.cc
|
| +++ b/components/autofill/core/browser/autofill_country.cc
|
| @@ -1044,15 +1044,18 @@ const std::string CountryNames::GetSortKey(const icu::Collator& collator,
|
|
|
| AutofillCountry::AutofillCountry(const std::string& country_code,
|
| const std::string& locale) {
|
| - const CountryDataMap::Iterator result = CountryDataMap::Find(country_code);
|
| - DCHECK(result != CountryDataMap::End());
|
| - const CountryData& data = result->second;
|
| -
|
| country_code_ = country_code;
|
| name_ = l10n_util::GetDisplayNameForCountry(country_code, locale);
|
| - postal_code_label_ = l10n_util::GetStringUTF16(data.postal_code_label_id);
|
| - state_label_ = l10n_util::GetStringUTF16(data.state_label_id);
|
| - address_required_fields_ = data.address_required_fields;
|
| +
|
| + const CountryDataMap::Iterator result = CountryDataMap::Find(country_code);
|
| + if (result != CountryDataMap::End()) {
|
| + const CountryData& data = result->second;
|
| + postal_code_label_ = l10n_util::GetStringUTF16(data.postal_code_label_id);
|
| + state_label_ = l10n_util::GetStringUTF16(data.state_label_id);
|
| + address_required_fields_ = data.address_required_fields;
|
| + } else {
|
| + postal_code_label_ = state_label_ = base::ASCIIToUTF16("[UNKNOWN]");
|
| + }
|
| }
|
|
|
| AutofillCountry::~AutofillCountry() {
|
|
|