Chromium Code Reviews| Index: chrome/browser/autofill/address_field.cc |
| diff --git a/chrome/browser/autofill/address_field.cc b/chrome/browser/autofill/address_field.cc |
| index 52e5193609fe0e2111d481c026bcdf8a9af8e783..41a1a1dc3baf7b6583e1f5073623a6aeb2b602e3 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_) |
|
Ilya Sherman
2010/11/02 15:35:08
nit: Do we not want "&& !address_field->state_->Is
James Hawkins
2010/11/02 17:32:14
No. I don't know why it was written in the first p
|
| + return false; |
| + |
| string16 pattern; |
| if (is_ecml) |
| pattern = GetEcmlPattern(kEcmlShipToStateProv, kEcmlBillToStateProv, '|'); |