Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Unified Diff: chrome/browser/autofill/address_field.h

Issue 7043027: Autofill refactor form_field.h/cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OVERRIDE glitch. Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/autofill/address_field.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « no previous file | chrome/browser/autofill/address_field.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698