Index: chrome/browser/webdata/autofill_table.cc |
diff --git a/chrome/browser/webdata/autofill_table.cc b/chrome/browser/webdata/autofill_table.cc |
index c237782f9f99ce01099412e4d1a1267eb3084c64..9008ef4b0c7f53f3dc87330224c24f29b2748389 100644 |
--- a/chrome/browser/webdata/autofill_table.cc |
+++ b/chrome/browser/webdata/autofill_table.cc |
@@ -54,19 +54,19 @@ void BindAutofillProfileToStatement(const AutofillProfile& profile, |
DCHECK(base::IsValidGUID(profile.guid())); |
s->BindString(0, profile.guid()); |
- string16 text = profile.GetInfo(COMPANY_NAME); |
+ string16 text = profile.GetRawInfo(COMPANY_NAME); |
s->BindString16(1, LimitDataSize(text)); |
- text = profile.GetInfo(ADDRESS_HOME_LINE1); |
+ text = profile.GetRawInfo(ADDRESS_HOME_LINE1); |
s->BindString16(2, LimitDataSize(text)); |
- text = profile.GetInfo(ADDRESS_HOME_LINE2); |
+ text = profile.GetRawInfo(ADDRESS_HOME_LINE2); |
s->BindString16(3, LimitDataSize(text)); |
- text = profile.GetInfo(ADDRESS_HOME_CITY); |
+ text = profile.GetRawInfo(ADDRESS_HOME_CITY); |
s->BindString16(4, LimitDataSize(text)); |
- text = profile.GetInfo(ADDRESS_HOME_STATE); |
+ text = profile.GetRawInfo(ADDRESS_HOME_STATE); |
s->BindString16(5, LimitDataSize(text)); |
- text = profile.GetInfo(ADDRESS_HOME_ZIP); |
+ text = profile.GetRawInfo(ADDRESS_HOME_ZIP); |
s->BindString16(6, LimitDataSize(text)); |
- text = profile.GetInfo(ADDRESS_HOME_COUNTRY); |
+ text = profile.GetRawInfo(ADDRESS_HOME_COUNTRY); |
s->BindString16(7, LimitDataSize(text)); |
std::string country_code = profile.CountryCode(); |
s->BindString(8, country_code); |
@@ -78,12 +78,12 @@ AutofillProfile* AutofillProfileFromStatement(const sql::Statement& s) { |
profile->set_guid(s.ColumnString(0)); |
DCHECK(base::IsValidGUID(profile->guid())); |
- profile->SetInfo(COMPANY_NAME, s.ColumnString16(1)); |
- profile->SetInfo(ADDRESS_HOME_LINE1, s.ColumnString16(2)); |
- profile->SetInfo(ADDRESS_HOME_LINE2, s.ColumnString16(3)); |
- profile->SetInfo(ADDRESS_HOME_CITY, s.ColumnString16(4)); |
- profile->SetInfo(ADDRESS_HOME_STATE, s.ColumnString16(5)); |
- profile->SetInfo(ADDRESS_HOME_ZIP, s.ColumnString16(6)); |
+ profile->SetRawInfo(COMPANY_NAME, s.ColumnString16(1)); |
+ profile->SetRawInfo(ADDRESS_HOME_LINE1, s.ColumnString16(2)); |
+ profile->SetRawInfo(ADDRESS_HOME_LINE2, s.ColumnString16(3)); |
+ profile->SetRawInfo(ADDRESS_HOME_CITY, s.ColumnString16(4)); |
+ profile->SetRawInfo(ADDRESS_HOME_STATE, s.ColumnString16(5)); |
+ profile->SetRawInfo(ADDRESS_HOME_ZIP, s.ColumnString16(6)); |
// Intentionally skip column 7, which stores the localized country name. |
profile->SetCountryCode(s.ColumnString(8)); |
// Intentionally skip column 9, which stores the profile's modification date. |
@@ -96,13 +96,13 @@ void BindCreditCardToStatement(const CreditCard& credit_card, |
DCHECK(base::IsValidGUID(credit_card.guid())); |
s->BindString(0, credit_card.guid()); |
- string16 text = credit_card.GetInfo(CREDIT_CARD_NAME); |
+ string16 text = credit_card.GetRawInfo(CREDIT_CARD_NAME); |
s->BindString16(1, LimitDataSize(text)); |
- text = credit_card.GetInfo(CREDIT_CARD_EXP_MONTH); |
+ text = credit_card.GetRawInfo(CREDIT_CARD_EXP_MONTH); |
s->BindString16(2, LimitDataSize(text)); |
- text = credit_card.GetInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR); |
+ text = credit_card.GetRawInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR); |
s->BindString16(3, LimitDataSize(text)); |
- text = credit_card.GetInfo(CREDIT_CARD_NUMBER); |
+ text = credit_card.GetRawInfo(CREDIT_CARD_NUMBER); |
std::string encrypted_data; |
Encryptor::EncryptString16(text, &encrypted_data); |
s->BindBlob(4, encrypted_data.data(), |
@@ -116,9 +116,9 @@ CreditCard* CreditCardFromStatement(const sql::Statement& s) { |
credit_card->set_guid(s.ColumnString(0)); |
DCHECK(base::IsValidGUID(credit_card->guid())); |
- credit_card->SetInfo(CREDIT_CARD_NAME, s.ColumnString16(1)); |
- credit_card->SetInfo(CREDIT_CARD_EXP_MONTH, s.ColumnString16(2)); |
- credit_card->SetInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR, s.ColumnString16(3)); |
+ credit_card->SetRawInfo(CREDIT_CARD_NAME, s.ColumnString16(1)); |
+ credit_card->SetRawInfo(CREDIT_CARD_EXP_MONTH, s.ColumnString16(2)); |
+ credit_card->SetRawInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR, s.ColumnString16(3)); |
int encrypted_number_len = s.ColumnByteLength(4); |
string16 credit_card_number; |
if (encrypted_number_len) { |
@@ -127,7 +127,7 @@ CreditCard* CreditCardFromStatement(const sql::Statement& s) { |
memcpy(&encrypted_number[0], s.ColumnBlob(4), encrypted_number_len); |
Encryptor::DecryptString16(encrypted_number, &credit_card_number); |
} |
- credit_card->SetInfo(CREDIT_CARD_NUMBER, credit_card_number); |
+ credit_card->SetRawInfo(CREDIT_CARD_NUMBER, credit_card_number); |
// Intentionally skip column 5, which stores the modification date. |
return credit_card; |
@@ -950,15 +950,15 @@ bool AutofillTable::UpdateAutofillProfile(const AutofillProfile& profile) { |
std::vector<string16> values; |
old_profile->GetMultiInfo(NAME_FULL, &values); |
- values[0] = new_profile.GetInfo(NAME_FULL); |
+ values[0] = new_profile.GetRawInfo(NAME_FULL); |
new_profile.SetMultiInfo(NAME_FULL, values); |
old_profile->GetMultiInfo(EMAIL_ADDRESS, &values); |
- values[0] = new_profile.GetInfo(EMAIL_ADDRESS); |
+ values[0] = new_profile.GetRawInfo(EMAIL_ADDRESS); |
new_profile.SetMultiInfo(EMAIL_ADDRESS, values); |
old_profile->GetMultiInfo(PHONE_HOME_WHOLE_NUMBER, &values); |
- values[0] = new_profile.GetInfo(PHONE_HOME_WHOLE_NUMBER); |
+ values[0] = new_profile.GetRawInfo(PHONE_HOME_WHOLE_NUMBER); |
new_profile.SetMultiInfo(PHONE_HOME_WHOLE_NUMBER, values); |
return UpdateAutofillProfileMulti(new_profile); |
@@ -1784,18 +1784,18 @@ bool AutofillTable::MigrateToVersion33ProfilesBasedOnFirstName() { |
profile.set_guid(s.ColumnString(0)); |
DCHECK(base::IsValidGUID(profile.guid())); |
- profile.SetInfo(NAME_FIRST, s.ColumnString16(1)); |
- profile.SetInfo(NAME_MIDDLE, s.ColumnString16(2)); |
- profile.SetInfo(NAME_LAST, s.ColumnString16(3)); |
- profile.SetInfo(EMAIL_ADDRESS, s.ColumnString16(4)); |
- profile.SetInfo(COMPANY_NAME, s.ColumnString16(5)); |
- profile.SetInfo(ADDRESS_HOME_LINE1, s.ColumnString16(6)); |
- profile.SetInfo(ADDRESS_HOME_LINE2, s.ColumnString16(7)); |
- profile.SetInfo(ADDRESS_HOME_CITY, s.ColumnString16(8)); |
- profile.SetInfo(ADDRESS_HOME_STATE, s.ColumnString16(9)); |
- profile.SetInfo(ADDRESS_HOME_ZIP, s.ColumnString16(10)); |
- profile.SetInfo(ADDRESS_HOME_COUNTRY, s.ColumnString16(11)); |
- profile.SetInfo(PHONE_HOME_WHOLE_NUMBER, s.ColumnString16(12)); |
+ profile.SetRawInfo(NAME_FIRST, s.ColumnString16(1)); |
+ profile.SetRawInfo(NAME_MIDDLE, s.ColumnString16(2)); |
+ profile.SetRawInfo(NAME_LAST, s.ColumnString16(3)); |
+ profile.SetRawInfo(EMAIL_ADDRESS, s.ColumnString16(4)); |
+ profile.SetRawInfo(COMPANY_NAME, s.ColumnString16(5)); |
+ profile.SetRawInfo(ADDRESS_HOME_LINE1, s.ColumnString16(6)); |
+ profile.SetRawInfo(ADDRESS_HOME_LINE2, s.ColumnString16(7)); |
+ profile.SetRawInfo(ADDRESS_HOME_CITY, s.ColumnString16(8)); |
+ profile.SetRawInfo(ADDRESS_HOME_STATE, s.ColumnString16(9)); |
+ profile.SetRawInfo(ADDRESS_HOME_ZIP, s.ColumnString16(10)); |
+ profile.SetRawInfo(ADDRESS_HOME_COUNTRY, s.ColumnString16(11)); |
+ profile.SetRawInfo(PHONE_HOME_WHOLE_NUMBER, s.ColumnString16(12)); |
int64 date_modified = s.ColumnInt64(13); |
sql::Statement s_insert(db_->GetUniqueStatement( |
@@ -1804,13 +1804,13 @@ bool AutofillTable::MigrateToVersion33ProfilesBasedOnFirstName() { |
" state, zipcode, country, date_modified)" |
"VALUES (?,?,?,?,?,?,?,?,?)")); |
s_insert.BindString(0, profile.guid()); |
- s_insert.BindString16(1, profile.GetInfo(COMPANY_NAME)); |
- s_insert.BindString16(2, profile.GetInfo(ADDRESS_HOME_LINE1)); |
- s_insert.BindString16(3, profile.GetInfo(ADDRESS_HOME_LINE2)); |
- s_insert.BindString16(4, profile.GetInfo(ADDRESS_HOME_CITY)); |
- s_insert.BindString16(5, profile.GetInfo(ADDRESS_HOME_STATE)); |
- s_insert.BindString16(6, profile.GetInfo(ADDRESS_HOME_ZIP)); |
- s_insert.BindString16(7, profile.GetInfo(ADDRESS_HOME_COUNTRY)); |
+ s_insert.BindString16(1, profile.GetRawInfo(COMPANY_NAME)); |
+ s_insert.BindString16(2, profile.GetRawInfo(ADDRESS_HOME_LINE1)); |
+ s_insert.BindString16(3, profile.GetRawInfo(ADDRESS_HOME_LINE2)); |
+ s_insert.BindString16(4, profile.GetRawInfo(ADDRESS_HOME_CITY)); |
+ s_insert.BindString16(5, profile.GetRawInfo(ADDRESS_HOME_STATE)); |
+ s_insert.BindString16(6, profile.GetRawInfo(ADDRESS_HOME_ZIP)); |
+ s_insert.BindString16(7, profile.GetRawInfo(ADDRESS_HOME_COUNTRY)); |
s_insert.BindInt64(8, date_modified); |
if (!s_insert.Run()) |