Index: chrome/browser/ui/webui/options/autofill_options_handler.cc |
diff --git a/chrome/browser/ui/webui/options/autofill_options_handler.cc b/chrome/browser/ui/webui/options/autofill_options_handler.cc |
index e02eb25178520b65df62ff8b0a42905f454fa4d6..d5962ede1fa73502fdb0928d47d64a327cf72e1e 100644 |
--- a/chrome/browser/ui/webui/options/autofill_options_handler.cc |
+++ b/chrome/browser/ui/webui/options/autofill_options_handler.cc |
@@ -266,30 +266,17 @@ void AutoFillOptionsHandler::LoadAddressEditor(const ListValue* args) { |
DictionaryValue address; |
address.SetString("guid", profile->guid()); |
- address.SetString("fullName", |
- profile->GetFieldText(AutofillType(NAME_FULL))); |
- address.SetString("companyName", |
- profile->GetFieldText(AutofillType(COMPANY_NAME))); |
- address.SetString("addrLine1", |
- profile->GetFieldText(AutofillType(ADDRESS_HOME_LINE1))); |
- address.SetString("addrLine2", |
- profile->GetFieldText(AutofillType(ADDRESS_HOME_LINE2))); |
- address.SetString("city", |
- profile->GetFieldText(AutofillType(ADDRESS_HOME_CITY))); |
- address.SetString("state", |
- profile->GetFieldText(AutofillType(ADDRESS_HOME_STATE))); |
- address.SetString("postalCode", |
- profile->GetFieldText(AutofillType(ADDRESS_HOME_ZIP))); |
- address.SetString("country", |
- profile->CountryCode()); |
- address.SetString( |
- "phone", |
- profile->GetFieldText(AutofillType(PHONE_HOME_WHOLE_NUMBER))); |
- address.SetString( |
- "fax", |
- profile->GetFieldText(AutofillType(PHONE_FAX_WHOLE_NUMBER))); |
- address.SetString("email", |
- profile->GetFieldText(AutofillType(EMAIL_ADDRESS))); |
+ address.SetString("fullName", profile->GetFieldText(NAME_FULL)); |
+ address.SetString("companyName", profile->GetFieldText(COMPANY_NAME)); |
+ address.SetString("addrLine1", profile->GetFieldText(ADDRESS_HOME_LINE1)); |
+ address.SetString("addrLine2", profile->GetFieldText(ADDRESS_HOME_LINE2)); |
+ address.SetString("city", profile->GetFieldText(ADDRESS_HOME_CITY)); |
+ address.SetString("state", profile->GetFieldText(ADDRESS_HOME_STATE)); |
+ address.SetString("postalCode", profile->GetFieldText(ADDRESS_HOME_ZIP)); |
+ address.SetString("country", profile->CountryCode()); |
+ address.SetString("phone", profile->GetFieldText(PHONE_HOME_WHOLE_NUMBER)); |
+ address.SetString("fax", profile->GetFieldText(PHONE_FAX_WHOLE_NUMBER)); |
+ address.SetString("email", profile->GetFieldText(EMAIL_ADDRESS)); |
web_ui_->CallJavascriptFunction("AutoFillOptions.editAddress", address); |
} |
@@ -315,18 +302,15 @@ void AutoFillOptionsHandler::LoadCreditCardEditor(const ListValue* args) { |
DictionaryValue credit_card_data; |
credit_card_data.SetString("guid", credit_card->guid()); |
- credit_card_data.SetString( |
- "nameOnCard", |
- credit_card->GetFieldText(AutofillType(CREDIT_CARD_NAME))); |
- credit_card_data.SetString( |
- "creditCardNumber", |
- credit_card->GetFieldText(AutofillType(CREDIT_CARD_NUMBER))); |
- credit_card_data.SetString( |
- "expirationMonth", |
- credit_card->GetFieldText(AutofillType(CREDIT_CARD_EXP_MONTH))); |
+ credit_card_data.SetString("nameOnCard", |
+ credit_card->GetFieldText(CREDIT_CARD_NAME)); |
+ credit_card_data.SetString("creditCardNumber", |
+ credit_card->GetFieldText(CREDIT_CARD_NUMBER)); |
+ credit_card_data.SetString("expirationMonth", |
+ credit_card->GetFieldText(CREDIT_CARD_EXP_MONTH)); |
credit_card_data.SetString( |
"expirationYear", |
- credit_card->GetFieldText(AutofillType(CREDIT_CARD_EXP_4_DIGIT_YEAR))); |
+ credit_card->GetFieldText(CREDIT_CARD_EXP_4_DIGIT_YEAR)); |
web_ui_->CallJavascriptFunction("AutoFillOptions.editCreditCard", |
credit_card_data); |
@@ -347,27 +331,27 @@ void AutoFillOptionsHandler::SetAddress(const ListValue* args) { |
std::string country_code; |
string16 value; |
if (args->GetString(1, &value)) |
- profile.SetInfo(AutofillType(NAME_FULL), value); |
+ profile.SetInfo(NAME_FULL, value); |
if (args->GetString(2, &value)) |
- profile.SetInfo(AutofillType(COMPANY_NAME), value); |
+ profile.SetInfo(COMPANY_NAME, value); |
if (args->GetString(3, &value)) |
- profile.SetInfo(AutofillType(ADDRESS_HOME_LINE1), value); |
+ profile.SetInfo(ADDRESS_HOME_LINE1, value); |
if (args->GetString(4, &value)) |
- profile.SetInfo(AutofillType(ADDRESS_HOME_LINE2), value); |
+ profile.SetInfo(ADDRESS_HOME_LINE2, value); |
if (args->GetString(5, &value)) |
- profile.SetInfo(AutofillType(ADDRESS_HOME_CITY), value); |
+ profile.SetInfo(ADDRESS_HOME_CITY, value); |
if (args->GetString(6, &value)) |
- profile.SetInfo(AutofillType(ADDRESS_HOME_STATE), value); |
+ profile.SetInfo(ADDRESS_HOME_STATE, value); |
if (args->GetString(7, &value)) |
- profile.SetInfo(AutofillType(ADDRESS_HOME_ZIP), value); |
+ profile.SetInfo(ADDRESS_HOME_ZIP, value); |
if (args->GetString(8, &country_code)) |
profile.SetCountryCode(country_code); |
if (args->GetString(9, &value)) |
- profile.SetInfo(AutofillType(PHONE_HOME_WHOLE_NUMBER), value); |
+ profile.SetInfo(PHONE_HOME_WHOLE_NUMBER, value); |
if (args->GetString(10, &value)) |
- profile.SetInfo(AutofillType(PHONE_FAX_WHOLE_NUMBER), value); |
+ profile.SetInfo(PHONE_FAX_WHOLE_NUMBER, value); |
if (args->GetString(11, &value)) |
- profile.SetInfo(AutofillType(EMAIL_ADDRESS), value); |
+ profile.SetInfo(EMAIL_ADDRESS, value); |
if (!guid::IsValidGUID(profile.guid())) { |
profile.set_guid(guid::GenerateGUID()); |
@@ -391,13 +375,13 @@ void AutoFillOptionsHandler::SetCreditCard(const ListValue* args) { |
string16 value; |
if (args->GetString(1, &value)) |
- credit_card.SetInfo(AutofillType(CREDIT_CARD_NAME), value); |
+ credit_card.SetInfo(CREDIT_CARD_NAME, value); |
if (args->GetString(2, &value)) |
- credit_card.SetInfo(AutofillType(CREDIT_CARD_NUMBER), value); |
+ credit_card.SetInfo(CREDIT_CARD_NUMBER, value); |
if (args->GetString(3, &value)) |
- credit_card.SetInfo(AutofillType(CREDIT_CARD_EXP_MONTH), value); |
+ credit_card.SetInfo(CREDIT_CARD_EXP_MONTH, value); |
if (args->GetString(4, &value)) |
- credit_card.SetInfo(AutofillType(CREDIT_CARD_EXP_4_DIGIT_YEAR), value); |
+ credit_card.SetInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR, value); |
if (!guid::IsValidGUID(credit_card.guid())) { |
credit_card.set_guid(guid::GenerateGUID()); |