Chromium Code Reviews| Index: chrome/browser/autofill/autofill_ie_toolbar_import_win.cc |
| diff --git a/chrome/browser/autofill/autofill_ie_toolbar_import_win.cc b/chrome/browser/autofill/autofill_ie_toolbar_import_win.cc |
| index cec09d668c4e9747953c6cf8b29fdb111863c879..d0bb6f8f0a9dfd2c1f17552e595a788a569924e9 100644 |
| --- a/chrome/browser/autofill/autofill_ie_toolbar_import_win.cc |
| +++ b/chrome/browser/autofill/autofill_ie_toolbar_import_win.cc |
| @@ -101,9 +101,6 @@ struct { |
| { PHONE_HOME_NUMBER, L"phone_home_number" }, |
| { PHONE_HOME_CITY_CODE, L"phone_home_city_code" }, |
| { PHONE_HOME_COUNTRY_CODE, L"phone_home_country_code" }, |
| - { PHONE_FAX_NUMBER, L"phone_fax_number" }, |
| - { PHONE_FAX_CITY_CODE, L"phone_fax_city_code" }, |
| - { PHONE_FAX_COUNTRY_CODE, L"phone_fax_country_code" }, |
| { ADDRESS_HOME_LINE1, L"address_home_line1" }, |
| { ADDRESS_HOME_LINE2, L"address_home_line2" }, |
| { ADDRESS_HOME_CITY, L"address_home_city" }, |
| @@ -136,8 +133,7 @@ bool ImportSingleProfile(FormGroup* profile, |
| bool has_non_empty_fields = false; |
| // Phones need to be rebuilt. |
| - PhoneNumber::PhoneCombineHelper home(AutofillType::PHONE_HOME); |
| - PhoneNumber::PhoneCombineHelper fax(AutofillType::PHONE_FAX); |
| + PhoneNumber::PhoneCombineHelper phone; |
| for (uint32 value_index = 0; value_index < key->ValueCount(); ++value_index) { |
| std::wstring value_name; |
| @@ -149,27 +145,21 @@ bool ImportSingleProfile(FormGroup* profile, |
| string16 field_value = ReadAndDecryptValue(key, value_name.c_str()); |
| if (!field_value.empty()) { |
| has_non_empty_fields = true; |
| - if (it->second == CREDIT_CARD_NUMBER) { |
| + if (it->second == CREDIT_CARD_NUMBER) |
| field_value = DecryptCCNumber(field_value); |
| - } |
| + |
| // We need to store phone data in the variables, before building the whole |
|
Ilya Sherman
2011/09/16 05:03:53
nit: "the variables" -> "|phone|"
James Hawkins
2011/09/17 00:03:47
Done.
|
| // number at the end. The rest of the fields are set "as is". |
| - if (!home.SetInfo(it->second, field_value) && |
| - !fax.SetInfo(it->second, field_value)) { |
| + if (!phone.SetInfo(it->second, field_value)) |
| profile->SetInfo(it->second, field_value); |
| - } |
| } |
| } |
| // Now re-construct the phones if needed. |
| string16 constructed_number; |
| - if (!home.IsEmpty() && |
| - home.ParseNumber(std::string("US"), &constructed_number)) { |
| + if (!phone.IsEmpty() && |
| + phone.ParseNumber(std::string("US"), &constructed_number)) { |
| profile->SetCanonicalizedInfo(PHONE_HOME_WHOLE_NUMBER, constructed_number); |
| } |
| - if (!fax.IsEmpty() && |
| - fax.ParseNumber(std::string("US"), &constructed_number)) { |
| - profile->SetCanonicalizedInfo(PHONE_FAX_WHOLE_NUMBER, constructed_number); |
| - } |
| return has_non_empty_fields; |
| } |