| Index: components/autofill/core/browser/address.cc
|
| diff --git a/components/autofill/core/browser/address.cc b/components/autofill/core/browser/address.cc
|
| index 3a44121606db624caf2320cff7e3a38693ea1e75..813d61556914a761913f715715e3ee06bed498b5 100644
|
| --- a/components/autofill/core/browser/address.cc
|
| +++ b/components/autofill/core/browser/address.cc
|
| @@ -7,13 +7,11 @@
|
| #include <stddef.h>
|
| #include <algorithm>
|
|
|
| -#include "base/i18n/case_conversion.h"
|
| #include "base/logging.h"
|
| #include "base/strings/string_split.h"
|
| #include "base/strings/string_util.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "components/autofill/core/browser/autofill_country.h"
|
| -#include "components/autofill/core/browser/autofill_data_util.h"
|
| #include "components/autofill/core/browser/autofill_field.h"
|
| #include "components/autofill/core/browser/autofill_profile.h"
|
| #include "components/autofill/core/browser/autofill_profile_comparator.h"
|
| @@ -136,8 +134,8 @@
|
|
|
| case ADDRESS_HOME_COUNTRY:
|
| DCHECK(value.empty() ||
|
| - data_util::IsValidCountryCode(base::i18n::ToUpper(value)));
|
| - country_code_ = base::ToUpperASCII(base::UTF16ToASCII(value));
|
| + (value.length() == 2u && base::IsStringASCII(value)));
|
| + country_code_ = base::UTF16ToASCII(value);
|
| break;
|
|
|
| case ADDRESS_HOME_ZIP:
|
| @@ -175,7 +173,7 @@
|
| const base::string16& value,
|
| const std::string& app_locale) {
|
| if (type.html_type() == HTML_TYPE_COUNTRY_CODE) {
|
| - if (!data_util::IsValidCountryCode(base::i18n::ToUpper(value))) {
|
| + if (!value.empty() && (value.size() != 2u || !base::IsStringASCII(value))) {
|
| country_code_ = std::string();
|
| return false;
|
| }
|
|
|