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

Unified Diff: chrome/browser/autofill/form_group.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
« no previous file with comments | « chrome/browser/autofill/form_group.h ('k') | chrome/browser/autofill/personal_data_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/form_group.cc
diff --git a/chrome/browser/autofill/form_group.cc b/chrome/browser/autofill/form_group.cc
index 3f77f8fa4c110354039b557506b15e5c25cfc16e..bd38d1ace8afc9c208e31851f03f24f38d5ea44a 100644
--- a/chrome/browser/autofill/form_group.cc
+++ b/chrome/browser/autofill/form_group.cc
@@ -8,7 +8,7 @@
#include <iterator>
-string16 FormGroup::GetPreviewText(const AutofillType& type) const {
+string16 FormGroup::GetPreviewText(AutofillFieldType type) const {
return GetFieldText(type);
}
@@ -35,8 +35,7 @@ bool FormGroup::IsSubsetOf(const FormGroup& form_group) const {
for (FieldTypeSet::const_iterator iter = types.begin(); iter != types.end();
++iter) {
- AutofillType type(*iter);
- if (GetFieldText(type) != form_group.GetFieldText(type))
+ if (GetFieldText(*iter) != form_group.GetFieldText(*iter))
return false;
}
@@ -58,8 +57,7 @@ bool FormGroup::IntersectionOfTypesHasEqualValues(
for (FieldTypeSet::const_iterator iter = intersection.begin();
iter != intersection.end(); ++iter) {
- AutofillType type(*iter);
- if (GetFieldText(type) != form_group.GetFieldText(type))
+ if (GetFieldText(*iter) != form_group.GetFieldText(*iter))
return false;
}
@@ -76,8 +74,7 @@ void FormGroup::MergeWith(const FormGroup& form_group) {
for (FieldTypeSet::const_iterator iter = intersection.begin();
iter != intersection.end(); ++iter) {
- AutofillType type(*iter);
- SetInfo(type, form_group.GetFieldText(type));
+ SetInfo(*iter, form_group.GetFieldText(*iter));
}
}
@@ -86,7 +83,6 @@ void FormGroup::OverwriteWith(const FormGroup& form_group) {
form_group.GetAvailableFieldTypes(&a);
for (FieldTypeSet::const_iterator iter = a.begin(); iter != a.end(); ++iter) {
- AutofillType type(*iter);
- SetInfo(type, form_group.GetFieldText(type));
+ SetInfo(*iter, form_group.GetFieldText(*iter));
}
}
« no previous file with comments | « chrome/browser/autofill/form_group.h ('k') | chrome/browser/autofill/personal_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698