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

Unified Diff: chrome/browser/sync/glue/autofill_model_associator.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/sync/glue/autofill_model_associator.cc
diff --git a/chrome/browser/sync/glue/autofill_model_associator.cc b/chrome/browser/sync/glue/autofill_model_associator.cc
index bd96ea57141f5a6664da3d82ccbbf12cc6ed49ee..067f92a8add44edbaccd33119a7e264d28f58ded 100644
--- a/chrome/browser/sync/glue/autofill_model_associator.cc
+++ b/chrome/browser/sync/glue/autofill_model_associator.cc
@@ -243,8 +243,8 @@ bool AutofillModelAssociator::TraverseAndAssociateAllSyncNodes(
all_profiles_from_db.begin(); ix != all_profiles_from_db.end(); ++ix) {
AutofillProfile* p = *ix;
VLOG(2) << "[AUTOFILL MIGRATION] "
- << p->GetFieldText(AutofillType(NAME_FIRST))
- << p->GetFieldText(AutofillType(NAME_LAST));
+ << p->GetFieldText(NAME_FIRST)
+ << p->GetFieldText(NAME_LAST);
}
}
@@ -498,9 +498,9 @@ bool AutofillModelAssociator::MergeTimestamps(
// the local value if they differ, and return whether the merge happened.
bool MergeField(FormGroup* f, AutofillFieldType t,
const std::string& specifics_field) {
- if (UTF16ToUTF8(f->GetFieldText(AutofillType(t))) == specifics_field)
+ if (UTF16ToUTF8(f->GetFieldText(t)) == specifics_field)
return false;
- f->SetInfo(AutofillType(t), UTF8ToUTF16(specifics_field));
+ f->SetInfo(t, UTF8ToUTF16(specifics_field));
return true;
}

Powered by Google App Engine
This is Rietveld 408576698