| 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 d348cf7191dd51143175218e2b923defee512e88..29f00d6ba370f83b8422d16df7d24fd56b60ec24 100644
|
| --- a/chrome/browser/ui/webui/options/autofill_options_handler.cc
|
| +++ b/chrome/browser/ui/webui/options/autofill_options_handler.cc
|
| @@ -488,12 +488,12 @@ void AutofillOptionsHandler::LoadAddressEditor(const ListValue* args) {
|
| scoped_ptr<ListValue> list;
|
| GetNameList(*profile, &list);
|
| address.Set("fullName", list.release());
|
| - address.SetString("companyName", profile->GetInfo(COMPANY_NAME));
|
| - address.SetString("addrLine1", profile->GetInfo(ADDRESS_HOME_LINE1));
|
| - address.SetString("addrLine2", profile->GetInfo(ADDRESS_HOME_LINE2));
|
| - address.SetString("city", profile->GetInfo(ADDRESS_HOME_CITY));
|
| - address.SetString("state", profile->GetInfo(ADDRESS_HOME_STATE));
|
| - address.SetString("postalCode", profile->GetInfo(ADDRESS_HOME_ZIP));
|
| + address.SetString("companyName", profile->GetRawInfo(COMPANY_NAME));
|
| + address.SetString("addrLine1", profile->GetRawInfo(ADDRESS_HOME_LINE1));
|
| + address.SetString("addrLine2", profile->GetRawInfo(ADDRESS_HOME_LINE2));
|
| + address.SetString("city", profile->GetRawInfo(ADDRESS_HOME_CITY));
|
| + address.SetString("state", profile->GetRawInfo(ADDRESS_HOME_STATE));
|
| + address.SetString("postalCode", profile->GetRawInfo(ADDRESS_HOME_ZIP));
|
| address.SetString("country", profile->CountryCode());
|
| GetValueList(*profile, PHONE_HOME_WHOLE_NUMBER, &list);
|
| address.Set("phone", list.release());
|
| @@ -525,14 +525,14 @@ 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->GetInfo(CREDIT_CARD_NAME));
|
| + credit_card->GetRawInfo(CREDIT_CARD_NAME));
|
| credit_card_data.SetString("creditCardNumber",
|
| - credit_card->GetInfo(CREDIT_CARD_NUMBER));
|
| + credit_card->GetRawInfo(CREDIT_CARD_NUMBER));
|
| credit_card_data.SetString("expirationMonth",
|
| - credit_card->GetInfo(CREDIT_CARD_EXP_MONTH));
|
| + credit_card->GetRawInfo(CREDIT_CARD_EXP_MONTH));
|
| credit_card_data.SetString(
|
| "expirationYear",
|
| - credit_card->GetInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR));
|
| + credit_card->GetRawInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR));
|
|
|
| web_ui()->CallJavascriptFunction("AutofillOptions.editCreditCard",
|
| credit_card_data);
|
| @@ -555,22 +555,31 @@ void AutofillOptionsHandler::SetAddress(const ListValue* args) {
|
| const ListValue* list_value;
|
| if (args->GetList(1, &list_value))
|
| SetNameList(list_value, &profile);
|
| +
|
| if (args->GetString(2, &value))
|
| - profile.SetInfo(COMPANY_NAME, value);
|
| + profile.SetRawInfo(COMPANY_NAME, value);
|
| +
|
| if (args->GetString(3, &value))
|
| - profile.SetInfo(ADDRESS_HOME_LINE1, value);
|
| + profile.SetRawInfo(ADDRESS_HOME_LINE1, value);
|
| +
|
| if (args->GetString(4, &value))
|
| - profile.SetInfo(ADDRESS_HOME_LINE2, value);
|
| + profile.SetRawInfo(ADDRESS_HOME_LINE2, value);
|
| +
|
| if (args->GetString(5, &value))
|
| - profile.SetInfo(ADDRESS_HOME_CITY, value);
|
| + profile.SetRawInfo(ADDRESS_HOME_CITY, value);
|
| +
|
| if (args->GetString(6, &value))
|
| - profile.SetInfo(ADDRESS_HOME_STATE, value);
|
| + profile.SetRawInfo(ADDRESS_HOME_STATE, value);
|
| +
|
| if (args->GetString(7, &value))
|
| - profile.SetInfo(ADDRESS_HOME_ZIP, value);
|
| + profile.SetRawInfo(ADDRESS_HOME_ZIP, value);
|
| +
|
| if (args->GetString(8, &country_code))
|
| profile.SetCountryCode(country_code);
|
| +
|
| if (args->GetList(9, &list_value))
|
| SetValueList(list_value, PHONE_HOME_WHOLE_NUMBER, &profile);
|
| +
|
| if (args->GetList(10, &list_value))
|
| SetValueList(list_value, EMAIL_ADDRESS, &profile);
|
|
|
| @@ -596,13 +605,16 @@ void AutofillOptionsHandler::SetCreditCard(const ListValue* args) {
|
|
|
| string16 value;
|
| if (args->GetString(1, &value))
|
| - credit_card.SetInfo(CREDIT_CARD_NAME, value);
|
| + credit_card.SetRawInfo(CREDIT_CARD_NAME, value);
|
| +
|
| if (args->GetString(2, &value))
|
| - credit_card.SetInfo(CREDIT_CARD_NUMBER, value);
|
| + credit_card.SetRawInfo(CREDIT_CARD_NUMBER, value);
|
| +
|
| if (args->GetString(3, &value))
|
| - credit_card.SetInfo(CREDIT_CARD_EXP_MONTH, value);
|
| + credit_card.SetRawInfo(CREDIT_CARD_EXP_MONTH, value);
|
| +
|
| if (args->GetString(4, &value))
|
| - credit_card.SetInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR, value);
|
| + credit_card.SetRawInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR, value);
|
|
|
| if (!base::IsValidGUID(credit_card.guid())) {
|
| credit_card.set_guid(base::GenerateGUID());
|
|
|