| Index: chrome/browser/autofill/address_field.h
|
| diff --git a/chrome/browser/autofill/address_field.h b/chrome/browser/autofill/address_field.h
|
| index f2cc08a1b48e493eba1e3d8b9898729ea7bf267b..cceb63a988e8ef35ffdfc28e58a85305f2f75a6a 100644
|
| --- a/chrome/browser/autofill/address_field.h
|
| +++ b/chrome/browser/autofill/address_field.h
|
| @@ -10,6 +10,7 @@
|
|
|
| #include "base/basictypes.h"
|
| #include "base/compiler_specific.h"
|
| +#include "base/gtest_prod_util.h"
|
| #include "base/string16.h"
|
| #include "chrome/browser/autofill/autofill_type.h"
|
| #include "chrome/browser/autofill/field_types.h"
|
| @@ -20,18 +21,36 @@ class AutofillScanner;
|
|
|
| class AddressField : public FormField {
|
| public:
|
| - virtual bool GetFieldInfo(FieldTypeMap* field_type_map) const OVERRIDE;
|
| -
|
| static AddressField* Parse(AutofillScanner* scanner, bool is_ecml);
|
|
|
| // Tries to determine the billing/shipping type of this address.
|
| AddressType FindType() const;
|
|
|
| - // Returns true if this is a full address as opposed to an address fragment
|
| - // such as a stand-alone ZIP code.
|
| - bool IsFullAddress();
|
| + protected:
|
| + // FormField:
|
| + virtual bool ClassifyField(FieldTypeMap* map) const OVERRIDE;
|
|
|
| private:
|
| + FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseOneLineAddress);
|
| + FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseOneLineAddressBilling);
|
| + FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseOneLineAddressShipping);
|
| + FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseOneLineAddressEcml);
|
| + FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseTwoLineAddress);
|
| + FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseThreeLineAddress);
|
| + FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseTwoLineAddressEcml);
|
| + FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseCity);
|
| + FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseCityEcml);
|
| + FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseState);
|
| + FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseStateEcml);
|
| + FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseZip);
|
| + FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseZipEcml);
|
| + FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseStateAndZipOneLabel);
|
| + FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseCountry);
|
| + FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseCountryEcml);
|
| + FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseTwoLineAddressMissingLabel);
|
| + FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseCompany);
|
| + FRIEND_TEST_ALL_PREFIXES(AddressFieldTest, ParseCompanyEcml);
|
| +
|
| AddressField();
|
|
|
| static bool ParseCompany(AutofillScanner* scanner,
|
|
|