| Index: components/autofill/content/browser/autocheckout_manager.cc
|
| diff --git a/components/autofill/content/browser/autocheckout_manager.cc b/components/autofill/content/browser/autocheckout_manager.cc
|
| index 01f656bd349aedc8cd9a2d7b8bba26c5c7f73455..ee1c4576afc691f99b0a23782a99563ed5d0926b 100644
|
| --- a/components/autofill/content/browser/autocheckout_manager.cc
|
| +++ b/components/autofill/content/browser/autocheckout_manager.cc
|
| @@ -15,8 +15,8 @@
|
| #include "components/autofill/core/browser/autofill_manager.h"
|
| #include "components/autofill/core/browser/autofill_metrics.h"
|
| #include "components/autofill/core/browser/autofill_profile.h"
|
| +#include "components/autofill/core/browser/autofill_type.h"
|
| #include "components/autofill/core/browser/credit_card.h"
|
| -#include "components/autofill/core/browser/field_types.h"
|
| #include "components/autofill/core/browser/form_structure.h"
|
| #include "components/autofill/core/common/autofill_messages.h"
|
| #include "components/autofill/core/common/form_data.h"
|
| @@ -354,27 +354,27 @@ void AutocheckoutManager::ReturnAutocheckoutData(
|
| billing_address_.reset(new AutofillProfile());
|
|
|
| for (size_t i = 0; i < result->field_count(); ++i) {
|
| - AutofillFieldType type = result->field(i)->type();
|
| + const AutofillType& type = result->field(i)->Type();
|
| const base::string16& value = result->field(i)->value;
|
| - if (type == CREDIT_CARD_VERIFICATION_CODE) {
|
| + if (type.server_type() == CREDIT_CARD_VERIFICATION_CODE) {
|
| cvv_ = result->field(i)->value;
|
| continue;
|
| }
|
| - FieldTypeGroup group = AutofillType(type).group();
|
| + FieldTypeGroup group = type.group();
|
| if (group == CREDIT_CARD) {
|
| - credit_card_->SetRawInfo(type, value);
|
| + credit_card_->SetRawInfo(type.server_type(), value);
|
| // TODO(dgwallinga): Find a way of cleanly deprecating CREDIT_CARD_NAME.
|
| // code.google.com/p/chromium/issues/detail?id=263498
|
| - if (type == CREDIT_CARD_NAME)
|
| + if (type.server_type() == CREDIT_CARD_NAME)
|
| billing_address_->SetRawInfo(NAME_BILLING_FULL, value);
|
| - } else if (type == ADDRESS_HOME_COUNTRY) {
|
| + } else if (type.server_type() == ADDRESS_HOME_COUNTRY) {
|
| profile_->SetInfo(type, value, autofill_manager_->app_locale());
|
| - } else if (type == ADDRESS_BILLING_COUNTRY) {
|
| + } else if (type.server_type() == ADDRESS_BILLING_COUNTRY) {
|
| billing_address_->SetInfo(type, value, autofill_manager_->app_locale());
|
| } else if (IsBillingGroup(group)) {
|
| - billing_address_->SetRawInfo(type, value);
|
| + billing_address_->SetRawInfo(type.server_type(), value);
|
| } else {
|
| - profile_->SetRawInfo(type, value);
|
| + profile_->SetRawInfo(type.server_type(), value);
|
| }
|
| }
|
|
|
| @@ -452,9 +452,9 @@ void AutocheckoutManager::SetValue(const AutofillField& field,
|
| if (field.server_type() == NO_SERVER_DATA)
|
| return;
|
|
|
| - AutofillFieldType type = field.type();
|
| + const AutofillType& type = field.Type();
|
|
|
| - if (type == FIELD_WITH_DEFAULT_VALUE) {
|
| + if (type.server_type() == FIELD_WITH_DEFAULT_VALUE) {
|
| // For a form with radio buttons, like:
|
| // <form>
|
| // <input type="radio" name="sex" value="male">Male<br>
|
| @@ -488,15 +488,15 @@ void AutocheckoutManager::SetValue(const AutofillField& field,
|
| }
|
|
|
| // Handle verification code directly.
|
| - if (type == CREDIT_CARD_VERIFICATION_CODE) {
|
| + if (type.server_type() == CREDIT_CARD_VERIFICATION_CODE) {
|
| field_to_fill->value = cvv_;
|
| return;
|
| }
|
|
|
| - if (AutofillType(type).group() == CREDIT_CARD) {
|
| + if (type.group() == CREDIT_CARD) {
|
| credit_card_->FillFormField(
|
| field, 0, autofill_manager_->app_locale(), field_to_fill);
|
| - } else if (IsBillingGroup(AutofillType(type).group())) {
|
| + } else if (IsBillingGroup(type.group())) {
|
| billing_address_->FillFormField(
|
| field, 0, autofill_manager_->app_locale(), field_to_fill);
|
| } else {
|
|
|