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

Unified Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 6673079: Reduce boxing and unboxing of AutofillFieldType (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile on Windows. 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/automation/testing_automation_provider.cc
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 476f0ee594fae7a633d921ed024e025b4dfb4c75..4951cc9e4f91e373b8fd507e6e4689bd5b6032b9 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -4202,7 +4202,7 @@ ListValue* TestingAutomationProvider::GetListFromAutofillProfiles(
for (std::map<AutofillFieldType, std::string>::iterator
type_it = autofill_type_to_string.begin();
type_it != autofill_type_to_string.end(); ++type_it) {
- string16 value = profile->GetFieldText(AutofillType(type_it->first));
+ string16 value = profile->GetFieldText(type_it->first);
if (value.length()) { // If there was something stored for that value.
profile_info->SetString(type_it->second, value);
}
@@ -4230,7 +4230,7 @@ ListValue* TestingAutomationProvider::GetListFromCreditCards(
for (std::map<AutofillFieldType, std::string>::iterator type_it =
credit_card_type_to_string.begin();
type_it != credit_card_type_to_string.end(); ++type_it) {
- string16 value = card->GetFieldText(AutofillType(type_it->first));
+ string16 value = card->GetFieldText(type_it->first);
// If there was something stored for that value.
if (value.length()) {
card_info->SetString(type_it->second, value);
@@ -4263,7 +4263,7 @@ TestingAutomationProvider::GetAutofillProfilesFromList(
if (profile_info->HasKey(type_it->second)) {
if (profile_info->GetString(type_it->second,
&current_value)) {
- profile.SetInfo(AutofillType(type_it->first), current_value);
+ profile.SetInfo(type_it->first, current_value);
} else {
*error_message= "All values must be strings";
break;
@@ -4295,7 +4295,7 @@ std::vector<CreditCard> TestingAutomationProvider::GetCreditCardsFromList(
type_it != credit_card_type_to_string.end(); ++type_it) {
if (card_info->HasKey(type_it->second)) {
if (card_info->GetString(type_it->second, &current_value)) {
- card.SetInfo(AutofillType(type_it->first), current_value);
+ card.SetInfo(type_it->first, current_value);
} else {
*error_message= "All values must be strings";
break;

Powered by Google App Engine
This is Rietveld 408576698