| Index: chrome/browser/autofill/name_field.h
|
| diff --git a/chrome/browser/autofill/name_field.h b/chrome/browser/autofill/name_field.h
|
| index 307b0760158c6d5a1b4e426020ab2a0f0308b12a..69f037ca1424a079bc210f7bc08d729641d801d2 100644
|
| --- a/chrome/browser/autofill/name_field.h
|
| +++ b/chrome/browser/autofill/name_field.h
|
| @@ -9,6 +9,7 @@
|
| #include <vector>
|
|
|
| #include "base/compiler_specific.h"
|
| +#include "base/gtest_prod_util.h"
|
| #include "chrome/browser/autofill/autofill_field.h"
|
| #include "chrome/browser/autofill/form_field.h"
|
|
|
| @@ -22,43 +23,22 @@ class NameField : public FormField {
|
| protected:
|
| NameField() {}
|
|
|
| - private:
|
| - DISALLOW_COPY_AND_ASSIGN(NameField);
|
| -};
|
| -
|
| -// A form field that can parse a full name field.
|
| -class FullNameField : public NameField {
|
| - public:
|
| - virtual bool GetFieldInfo(FieldTypeMap* field_type_map) const OVERRIDE;
|
| -
|
| - static FullNameField* Parse(AutofillScanner* scanner);
|
| + // FormField:
|
| + virtual bool ClassifyField(FieldTypeMap* map) const OVERRIDE;
|
|
|
| private:
|
| - explicit FullNameField(const AutofillField* field);
|
| -
|
| - const AutofillField* field_;
|
| - DISALLOW_COPY_AND_ASSIGN(FullNameField);
|
| -};
|
| + FRIEND_TEST_ALL_PREFIXES(NameFieldTest, FirstMiddleLast);
|
| + FRIEND_TEST_ALL_PREFIXES(NameFieldTest, FirstMiddleLast2);
|
| + FRIEND_TEST_ALL_PREFIXES(NameFieldTest, FirstLast);
|
| + FRIEND_TEST_ALL_PREFIXES(NameFieldTest, FirstLast2);
|
| + FRIEND_TEST_ALL_PREFIXES(NameFieldTest, FirstLastMiddleWithSpaces);
|
| + FRIEND_TEST_ALL_PREFIXES(NameFieldTest, FirstLastEmpty);
|
| + FRIEND_TEST_ALL_PREFIXES(NameFieldTest, FirstMiddleLastEmpty);
|
| + FRIEND_TEST_ALL_PREFIXES(NameFieldTest, MiddleInitial);
|
| + FRIEND_TEST_ALL_PREFIXES(NameFieldTest, MiddleInitialAtEnd);
|
| + FRIEND_TEST_ALL_PREFIXES(NameFieldTest, ECMLFirstMiddleLast);
|
|
|
| -// A form field that can parse a first and last name field.
|
| -class FirstLastNameField : public NameField {
|
| - public:
|
| - virtual bool GetFieldInfo(FieldTypeMap* field_type_map) const OVERRIDE;
|
| -
|
| - static FirstLastNameField* ParseSpecificName(AutofillScanner* scanner);
|
| - static FirstLastNameField* ParseComponentNames(AutofillScanner* scanner);
|
| - static FirstLastNameField* ParseEcmlName(AutofillScanner* scanner);
|
| - static FirstLastNameField* Parse(AutofillScanner* scanner, bool is_ecml);
|
| -
|
| - private:
|
| - FirstLastNameField();
|
| -
|
| - const AutofillField* first_name_;
|
| - const AutofillField* middle_name_; // Optional.
|
| - const AutofillField* last_name_;
|
| - bool middle_initial_; // True if middle_name_ is a middle initial.
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(FirstLastNameField);
|
| + DISALLOW_COPY_AND_ASSIGN(NameField);
|
| };
|
|
|
| #endif // CHROME_BROWSER_AUTOFILL_NAME_FIELD_H_
|
|
|