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

Unified Diff: components/autofill/core/browser/webdata/autofill_table.cc

Issue 982203002: Autofill - Move test only code to a test util file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include vector Created 5 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: components/autofill/core/browser/webdata/autofill_table.cc
diff --git a/components/autofill/core/browser/webdata/autofill_table.cc b/components/autofill/core/browser/webdata/autofill_table.cc
index f05a739e7c905e15bfed9dc2c66a0fa74ca64604..59929d2019b1f3efd3dd259a55a342d82e900d24 100644
--- a/components/autofill/core/browser/webdata/autofill_table.cc
+++ b/components/autofill/core/browser/webdata/autofill_table.cc
@@ -1234,13 +1234,8 @@ void AutofillTable::SetServerCreditCards(
"exp_month," // 4
"exp_year) " // 5
"VALUES (?,?,?,?,?,?,?)"));
- sql::Statement unmasked_insert(db_->GetUniqueStatement(
- "INSERT INTO unmasked_credit_cards("
- "id," // 0
- "card_number_encrypted)" // 1
- "VALUES (?,?)"));
for (const CreditCard& card : credit_cards) {
- DCHECK(card.record_type() != CreditCard::LOCAL_CARD);
+ DCHECK_EQ(CreditCard::MASKED_SERVER_CARD, card.record_type());
masked_insert.BindString(0, card.server_id());
masked_insert.BindString(1, card.type());
@@ -1254,17 +1249,6 @@ void AutofillTable::SetServerCreditCards(
masked_insert.Run();
masked_insert.Reset(true);
-
- if (card.record_type() == CreditCard::FULL_SERVER_CARD) {
- // Unmasked cards also get an entry in the unmasked table. Note that the
- // input card could be MASKED but if we have an UNMASKED entry for that
- // card already, it will be preserved.
- unmasked_insert.BindString(0, card.server_id());
- BindEncryptedCardToColumn(&unmasked_insert, 1,
- card.GetRawInfo(CREDIT_CARD_NUMBER));
- unmasked_insert.Run();
- unmasked_insert.Reset(true);
- }
}
}

Powered by Google App Engine
This is Rietveld 408576698