summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autofill/address_field.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/autofill/address_field.cc')
-rw-r--r--chrome/browser/autofill/address_field.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/autofill/address_field.cc b/chrome/browser/autofill/address_field.cc
index 52e5193..41a1a1d 100644
--- a/chrome/browser/autofill/address_field.cc
+++ b/chrome/browser/autofill/address_field.cc
@@ -91,12 +91,10 @@ AddressField* AddressField::Parse(
if (ParseCompany(&q, is_ecml, address_field.get()) ||
ParseAddressLines(&q, is_ecml, address_field.get()) ||
ParseCity(&q, is_ecml, address_field.get()) ||
+ ParseState(&q, is_ecml, address_field.get()) ||
ParseZipCode(&q, is_ecml, address_field.get()) ||
ParseCountry(&q, is_ecml, address_field.get())) {
continue;
- } else if ((!address_field->state_ || address_field->state_->IsEmpty()) &&
- address_field->ParseState(&q, is_ecml, address_field.get())) {
- continue;
} else if (ParseText(&q, ASCIIToUTF16("attention|attn.")) ||
ParseText(&q, ASCIIToUTF16("province|region|other"))) {
// We ignore the following:
@@ -339,9 +337,13 @@ bool AddressField::ParseCity(
return true;
}
+// static
bool AddressField::ParseState(
std::vector<AutoFillField*>::const_iterator* iter,
bool is_ecml, AddressField* address_field) {
+ if (address_field->state_)
+ return false;
+
string16 pattern;
if (is_ecml)
pattern = GetEcmlPattern(kEcmlShipToStateProv, kEcmlBillToStateProv, '|');