| Index: components/autofill/core/browser/autofill_field.cc
|
| diff --git a/components/autofill/core/browser/autofill_field.cc b/components/autofill/core/browser/autofill_field.cc
|
| index 9e72054792e900d349acf3755d05f0ddb893d657..5d192324000f6c0d00f1ad79f16b5797903b2c76 100644
|
| --- a/components/autofill/core/browser/autofill_field.cc
|
| +++ b/components/autofill/core/browser/autofill_field.cc
|
| @@ -8,6 +8,7 @@
|
| #include "base/sha1.h"
|
| #include "base/strings/string_number_conversions.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| +#include "components/autofill/core/browser/autofill_type.h"
|
|
|
| namespace {
|
|
|
| @@ -44,7 +45,7 @@ AutofillField::AutofillField(const FormFieldData& field,
|
|
|
| AutofillField::~AutofillField() {}
|
|
|
| -void AutofillField::set_heuristic_type(AutofillFieldType type) {
|
| +void AutofillField::set_heuristic_type(ServerFieldType type) {
|
| if (type >= 0 && type < MAX_VALID_FIELD_TYPE &&
|
| type != FIELD_WITH_DEFAULT_VALUE) {
|
| heuristic_type_ = type;
|
| @@ -56,7 +57,7 @@ void AutofillField::set_heuristic_type(AutofillFieldType type) {
|
| }
|
| }
|
|
|
| -void AutofillField::set_server_type(AutofillFieldType type) {
|
| +void AutofillField::set_server_type(ServerFieldType type) {
|
| // Chrome no longer supports fax numbers, but the server still does.
|
| if (type >= PHONE_FAX_NUMBER && type <= PHONE_FAX_WHOLE_NUMBER)
|
| return;
|
| @@ -64,11 +65,11 @@ void AutofillField::set_server_type(AutofillFieldType type) {
|
| server_type_ = type;
|
| }
|
|
|
| -AutofillFieldType AutofillField::type() const {
|
| +AutofillType AutofillField::Type() const {
|
| if (server_type_ != NO_SERVER_DATA)
|
| - return server_type_;
|
| + return AutofillType(server_type_);
|
|
|
| - return heuristic_type_;
|
| + return AutofillType(heuristic_type_);
|
| }
|
|
|
| bool AutofillField::IsEmpty() const {
|
| @@ -82,7 +83,7 @@ std::string AutofillField::FieldSignature() const {
|
| }
|
|
|
| bool AutofillField::IsFieldFillable() const {
|
| - return type() != UNKNOWN_TYPE;
|
| + return Type().server_type() != UNKNOWN_TYPE;
|
| }
|
|
|
| } // namespace autofill
|
|
|