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

Unified Diff: chrome/browser/autofill/select_control_handler.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/select_control_handler.cc
diff --git a/chrome/browser/autofill/select_control_handler.cc b/chrome/browser/autofill/select_control_handler.cc
index dc44e7273c0c69c77561368c139a0c7a076c32d2..d97a8516702121ab8a89731265d069511cef8a01 100644
--- a/chrome/browser/autofill/select_control_handler.cc
+++ b/chrome/browser/autofill/select_control_handler.cc
@@ -199,7 +199,7 @@ bool FillExpirationMonthSelectControl(const string16& value,
namespace autofill {
void FillSelectControl(const FormGroup& form_group,
- AutofillType type,
+ AutofillFieldType type,
webkit_glue::FormField* field) {
DCHECK(field);
DCHECK_EQ(ASCIIToUTF16("select-one"), field->form_control_type);
@@ -229,15 +229,12 @@ void FillSelectControl(const FormGroup& form_group,
return;
}
- if (type.field_type() == ADDRESS_HOME_STATE ||
- type.field_type() == ADDRESS_BILLING_STATE) {
+ if (type == ADDRESS_HOME_STATE || type == ADDRESS_BILLING_STATE)
FillStateSelectControl(field_text, field);
- } else if (type.field_type() == ADDRESS_HOME_COUNTRY ||
- type.field_type() == ADDRESS_BILLING_COUNTRY) {
+ else if (type == ADDRESS_HOME_COUNTRY || type == ADDRESS_BILLING_COUNTRY)
FillCountrySelectControl(form_group, field);
- } else if (type.field_type() == CREDIT_CARD_EXP_MONTH) {
+ else if (type == CREDIT_CARD_EXP_MONTH)
FillExpirationMonthSelectControl(field_text, field);
- }
return;
}
« no previous file with comments | « chrome/browser/autofill/select_control_handler.h ('k') | chrome/browser/autofill/select_control_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698