| Index: chrome/browser/autofill/address.cc
|
| diff --git a/chrome/browser/autofill/address.cc b/chrome/browser/autofill/address.cc
|
| index 6b2d3454ee43f2ea80a0394111144765272ab565..576a31477486735568284325ce42c91bb6594fdd 100644
|
| --- a/chrome/browser/autofill/address.cc
|
| +++ b/chrome/browser/autofill/address.cc
|
| @@ -17,17 +17,6 @@ namespace {
|
|
|
| const char16 kAddressSplitChars[] = {'-', ',', '#', '.', ' ', 0};
|
|
|
| -const AutofillType::FieldTypeSubGroup kAutofillAddressTypes[] = {
|
| - AutofillType::ADDRESS_LINE1,
|
| - AutofillType::ADDRESS_LINE2,
|
| - AutofillType::ADDRESS_CITY,
|
| - AutofillType::ADDRESS_STATE,
|
| - AutofillType::ADDRESS_ZIP,
|
| - AutofillType::ADDRESS_COUNTRY,
|
| -};
|
| -
|
| -const int kAutofillAddressLength = arraysize(kAutofillAddressTypes);
|
| -
|
| // Returns the country code corresponding to |country|, which should be a
|
| // localized country name.
|
| std::string ToCountryCode(const string16& country) {
|
| @@ -90,18 +79,18 @@ string16 Address::GetInfo(AutofillFieldType type) const {
|
| }
|
|
|
| void Address::SetInfo(AutofillFieldType type, const string16& value) {
|
| - FieldTypeSubGroup subgroup = AutofillType(type).subgroup();
|
| - if (subgroup == AutofillType::ADDRESS_LINE1)
|
| + type = AutofillType::GetEquivalentFieldType(type);
|
| + if (type == ADDRESS_HOME_LINE1)
|
| line1_ = value;
|
| - else if (subgroup == AutofillType::ADDRESS_LINE2)
|
| + else if (type == ADDRESS_HOME_LINE2)
|
| line2_ = value;
|
| - else if (subgroup == AutofillType::ADDRESS_CITY)
|
| + else if (type == ADDRESS_HOME_CITY)
|
| city_ = value;
|
| - else if (subgroup == AutofillType::ADDRESS_STATE)
|
| + else if (type == ADDRESS_HOME_STATE)
|
| state_ = value;
|
| - else if (subgroup == AutofillType::ADDRESS_COUNTRY)
|
| + else if (type == ADDRESS_HOME_COUNTRY)
|
| country_code_ = ToCountryCode(value);
|
| - else if (subgroup == AutofillType::ADDRESS_ZIP)
|
| + else if (type == ADDRESS_HOME_ZIP)
|
| zip_code_ = value;
|
| else
|
| NOTREACHED();
|
|
|