| Index: components/autofill/core/browser/autofill_type.cc
|
| diff --git a/components/autofill/core/browser/autofill_type.cc b/components/autofill/core/browser/autofill_type.cc
|
| index c0266ec44b2371782199ae22e737a66f93ed7232..a6c972499f29d8f6c00a7d96401a64b3c1014abf 100644
|
| --- a/components/autofill/core/browser/autofill_type.cc
|
| +++ b/components/autofill/core/browser/autofill_type.cc
|
| @@ -9,8 +9,7 @@
|
| namespace autofill {
|
|
|
| AutofillType::AutofillType(ServerFieldType field_type)
|
| - : html_type_(HTML_TYPE_UNKNOWN),
|
| - html_mode_(HTML_MODE_NONE) {
|
| + : html_type_(HTML_TYPE_UNSPECIFIED), html_mode_(HTML_MODE_NONE) {
|
| if ((field_type < NO_SERVER_DATA || field_type >= MAX_VALID_FIELD_TYPE) ||
|
| (field_type >= 15 && field_type <= 19) ||
|
| (field_type >= 25 && field_type <= 29) ||
|
| @@ -201,7 +200,7 @@ FieldTypeGroup AutofillType::group() const {
|
| case HTML_TYPE_EMAIL:
|
| return EMAIL;
|
|
|
| - case HTML_TYPE_UNKNOWN:
|
| + case HTML_TYPE_UNSPECIFIED:
|
| break;
|
| }
|
|
|
| @@ -209,7 +208,8 @@ FieldTypeGroup AutofillType::group() const {
|
| }
|
|
|
| bool AutofillType::IsUnknown() const {
|
| - return server_type_ == UNKNOWN_TYPE && html_type_ == HTML_TYPE_UNKNOWN;
|
| + return server_type_ == UNKNOWN_TYPE && (html_type_ == HTML_TYPE_UNSPECIFIED ||
|
| + html_type_ == HTML_TYPE_UNRECOGNIZED);
|
| }
|
|
|
| ServerFieldType AutofillType::GetStorableType() const {
|
| @@ -289,7 +289,7 @@ ServerFieldType AutofillType::GetStorableType() const {
|
| }
|
|
|
| switch (html_type_) {
|
| - case HTML_TYPE_UNKNOWN:
|
| + case HTML_TYPE_UNSPECIFIED:
|
| return UNKNOWN_TYPE;
|
|
|
| case HTML_TYPE_NAME:
|
| @@ -399,6 +399,9 @@ ServerFieldType AutofillType::GetStorableType() const {
|
| case HTML_TYPE_TRANSACTION_AMOUNT:
|
| case HTML_TYPE_TRANSACTION_CURRENCY:
|
| return UNKNOWN_TYPE;
|
| +
|
| + case HTML_TYPE_UNRECOGNIZED:
|
| + return UNKNOWN_TYPE;
|
| }
|
|
|
| NOTREACHED();
|
| @@ -636,7 +639,7 @@ std::string AutofillType::ToString() const {
|
| }
|
|
|
| switch (html_type_) {
|
| - case HTML_TYPE_UNKNOWN:
|
| + case HTML_TYPE_UNSPECIFIED:
|
| NOTREACHED();
|
| break;
|
| case HTML_TYPE_NAME:
|
| @@ -715,6 +718,8 @@ std::string AutofillType::ToString() const {
|
| return "HTML_TRANSACTION_AMOUNT";
|
| case HTML_TYPE_TRANSACTION_CURRENCY:
|
| return "HTML_TRANSACTION_CURRENCY";
|
| + case HTML_TYPE_UNRECOGNIZED:
|
| + return "HTML_TYPE_UNRECOGNIZED";
|
| }
|
|
|
| NOTREACHED();
|
|
|