Index: components/autofill/core/browser/address_field.h |
diff --git a/components/autofill/core/browser/address_field.h b/components/autofill/core/browser/address_field.h |
index 1966ac490373a9b96a9c357789c57a9fd5c6209c..721545e036a2c3a4c6c6a336036040ea90359c43 100644 |
--- a/components/autofill/core/browser/address_field.h |
+++ b/components/autofill/core/browser/address_field.h |
@@ -41,6 +41,10 @@ class AddressField : public FormField { |
FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseTwoLineAddressMissingLabel); |
FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseCompany); |
+ static const int kZipCodeMatchType; |
+ static const int kCityMatchType; |
+ static const int kStateMatchType; |
+ |
AddressField(); |
bool ParseCompany(AutofillScanner* scanner); |
@@ -50,6 +54,17 @@ class AddressField : public FormField { |
bool ParseCity(AutofillScanner* scanner); |
bool ParseState(AutofillScanner* scanner); |
+ // Parses the current field pointed to by |scanner|, if it exists, and tries |
+ // to figure out whether the field's type: city, state, zip, or none of those. |
+ bool ParseCityStateZipCode(AutofillScanner* scanner); |
+ |
+ // Run matches on the name and label separately. If the return result is |
+ // RESULT_MATCH_NAME_LABEL, then |scanner| advances and the field is set. |
+ // Otherwise |scanner| rewinds and the field is cleared. |
+ ParseNameLabelResult ParseNameAndLabelForZipCode(AutofillScanner* scanner); |
+ ParseNameLabelResult ParseNameAndLabelForCity(AutofillScanner* scanner); |
+ ParseNameLabelResult ParseNameAndLabelForState(AutofillScanner* scanner); |
+ |
AutofillField* company_; |
AutofillField* address1_; |
AutofillField* address2_; |