Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(370)

Unified Diff: chrome/browser/autofill/autofill_ie_toolbar_import_win.cc

Issue 6673079: Reduce boxing and unboxing of AutofillFieldType (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 adc9a4af4664c43c366737df66c3571e397c7f5e..e8b9c297ad6399253a2045b0e01c9caed74ffd48 100644
--- a/chrome/browser/autofill/autofill_ie_toolbar_import_win.cc
+++ b/chrome/browser/autofill/autofill_ie_toolbar_import_win.cc
@@ -137,7 +137,7 @@ bool ImportSingleProfile(FormGroup* profile,
if (it->second == CREDIT_CARD_NUMBER) {
field_value = DecryptCCNumber(field_value);
}
- profile->SetInfo(AutofillType(it->second), field_value);
+ profile->SetInfo(it->second, field_value);
}
}
return has_non_empty_fields;
@@ -209,14 +209,14 @@ bool ImportCurrentUserProfiles(std::vector<AutofillProfile>* profiles,
if (ImportSingleProfile(&profile, &key, reg_to_field)) {
// Combine phones into whole phone #.
string16 phone;
- phone = profile.GetFieldText(AutofillType(PHONE_HOME_COUNTRY_CODE));
- phone.append(profile.GetFieldText(AutofillType(PHONE_HOME_CITY_CODE)));
- phone.append(profile.GetFieldText(AutofillType(PHONE_HOME_NUMBER)));
- profile.SetInfo(AutofillType(PHONE_HOME_WHOLE_NUMBER), phone);
- phone = profile.GetFieldText(AutofillType(PHONE_FAX_COUNTRY_CODE));
- phone.append(profile.GetFieldText(AutofillType(PHONE_FAX_CITY_CODE)));
- phone.append(profile.GetFieldText(AutofillType(PHONE_FAX_NUMBER)));
- profile.SetInfo(AutofillType(PHONE_FAX_WHOLE_NUMBER), phone);
+ phone = profile.GetFieldText(PHONE_HOME_COUNTRY_CODE);
+ phone.append(profile.GetFieldText(PHONE_HOME_CITY_CODE));
+ phone.append(profile.GetFieldText(PHONE_HOME_NUMBER));
+ profile.SetInfo(PHONE_HOME_WHOLE_NUMBER, phone);
+ phone = profile.GetFieldText(PHONE_FAX_COUNTRY_CODE);
+ phone.append(profile.GetFieldText(PHONE_FAX_CITY_CODE));
+ phone.append(profile.GetFieldText(PHONE_FAX_NUMBER));
+ profile.SetInfo(PHONE_FAX_WHOLE_NUMBER, phone);
profiles->push_back(profile);
}
}
@@ -239,8 +239,7 @@ bool ImportCurrentUserProfiles(std::vector<AutofillProfile>* profiles,
RegKey key(HKEY_CURRENT_USER, key_name.c_str(), KEY_READ);
CreditCard credit_card;
if (ImportSingleProfile(&credit_card, &key, reg_to_field)) {
- string16 cc_number = credit_card.GetFieldText(
- AutofillType(CREDIT_CARD_NUMBER));
+ string16 cc_number = credit_card.GetFieldText(CREDIT_CARD_NUMBER);
if (!cc_number.empty())
credit_cards->push_back(credit_card);
}
« no previous file with comments | « chrome/browser/autofill/autofill_field.cc ('k') | chrome/browser/autofill/autofill_ie_toolbar_import_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698