summaryrefslogtreecommitdiffstats
path: root/chrome/browser/webdata
diff options
context:
space:
mode:
authorisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-26 22:52:54 +0000
committerisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-26 22:52:54 +0000
commit2a13edde1666eda54128b60789823e86049d1fea (patch)
treede1f6e4fc4b828e38f3fee6f9fca6387af3ad74f /chrome/browser/webdata
parent03c8a79efcec77699f77ced8c25c056967a9f241 (diff)
downloadchromium_src-2a13edde1666eda54128b60789823e86049d1fea.zip
chromium_src-2a13edde1666eda54128b60789823e86049d1fea.tar.gz
chromium_src-2a13edde1666eda54128b60789823e86049d1fea.tar.bz2
Autofill address and credit card data separately.
Our autofill UI for filling the billing address and credit card information simultaneously quickly gets out of hand for users with multiple address and credit card profiles. We want a clean, simple UI; so we will just fill one part of the form or the other; but not both. This cl also removes the billing address drop down from the Autofill preferences "Add credit card" dialog. BUG=57976 TEST=unit_tests --gtest_filter=*AutoFill* unit_tests --gtest_filter=*Autofill* Review URL: http://codereview.chromium.org/3961004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63964 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/webdata')
-rw-r--r--chrome/browser/webdata/web_database.cc5
-rw-r--r--chrome/browser/webdata/web_database_unittest.cc3
2 files changed, 3 insertions, 5 deletions
diff --git a/chrome/browser/webdata/web_database.cc b/chrome/browser/webdata/web_database.cc
index 138fc7c2..c40bfca 100644
--- a/chrome/browser/webdata/web_database.cc
+++ b/chrome/browser/webdata/web_database.cc
@@ -365,7 +365,8 @@ void BindCreditCardToStatement(const CreditCard& credit_card,
s->BindString16(6, LimitDataSize(text));
text.clear();
s->BindString16(7, LimitDataSize(text));
- s->BindInt(8, credit_card.billing_address_id());
+ // We don't store the billing address id anymore.
+ s->BindInt(8, 0);
// We don't store the shipping address anymore.
text.clear();
s->BindString16(9, LimitDataSize(text));
@@ -408,7 +409,7 @@ CreditCard* CreditCardFromStatement(const sql::Statement& s) {
string16 credit_card_verification_code = s.ColumnString16(7);
// We don't store the CVV anymore.
- credit_card->set_billing_address_id(s.ColumnInt(8));
+ // We don't store the billing address anymore.
// We don't store the shipping address anymore.
// Column 10 is processed above.
// We don't store the encrypted CVV anymore.
diff --git a/chrome/browser/webdata/web_database_unittest.cc b/chrome/browser/webdata/web_database_unittest.cc
index f9df633..89cda5a 100644
--- a/chrome/browser/webdata/web_database_unittest.cc
+++ b/chrome/browser/webdata/web_database_unittest.cc
@@ -1394,7 +1394,6 @@ TEST_F(WebDatabaseTest, CreditCard) {
ASCIIToUTF16("04"));
work_creditcard.SetInfo(AutoFillType(CREDIT_CARD_EXP_4_DIGIT_YEAR),
ASCIIToUTF16("2013"));
- work_creditcard.set_billing_address_id(1);
Time pre_creation_time = Time::Now();
EXPECT_TRUE(db.AddCreditCard(work_creditcard));
@@ -1425,7 +1424,6 @@ TEST_F(WebDatabaseTest, CreditCard) {
ASCIIToUTF16("06"));
target_creditcard.SetInfo(AutoFillType(CREDIT_CARD_EXP_4_DIGIT_YEAR),
ASCIIToUTF16("2012"));
- target_creditcard.set_billing_address_id(1);
pre_creation_time = Time::Now();
EXPECT_TRUE(db.AddCreditCard(target_creditcard));
@@ -1478,7 +1476,6 @@ TEST_F(WebDatabaseTest, CreditCard) {
ASCIIToUTF16("07"));
guid_creditcard.SetInfo(AutoFillType(CREDIT_CARD_EXP_4_DIGIT_YEAR),
ASCIIToUTF16("2013"));
- guid_creditcard.set_billing_address_id(1);
EXPECT_TRUE(db.AddCreditCard(guid_creditcard));
ASSERT_TRUE(db.GetCreditCardForGUID(guid_creditcard.guid(),