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

Unified Diff: components/autofill/core/browser/personal_data_manager.cc

Issue 1014743002: Remove incorrect DCHECK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ret 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/personal_data_manager.cc
diff --git a/components/autofill/core/browser/personal_data_manager.cc b/components/autofill/core/browser/personal_data_manager.cc
index 252b03b9db22274ba3edc3a3f2eb6f3ac07e8c3f..8b23c9266811e01d4f8347695a8af8bf65ca4fa3 100644
--- a/components/autofill/core/browser/personal_data_manager.cc
+++ b/components/autofill/core/browser/personal_data_manager.cc
@@ -511,12 +511,16 @@ void PersonalDataManager::RecordUseOf(const AutofillDataModel& data_model) {
if (credit_card) {
credit_card->RecordUse();
- if (credit_card->record_type() == CreditCard::LOCAL_CARD)
+ if (credit_card->record_type() == CreditCard::LOCAL_CARD) {
database_->UpdateCreditCard(*credit_card);
- else if (credit_card->record_type() == CreditCard::FULL_SERVER_CARD)
+ } else if (credit_card->record_type() == CreditCard::FULL_SERVER_CARD) {
database_->UpdateUnmaskedCardUsageStats(*credit_card);
- else
- NOTREACHED() << " A MASKED_SERVER_CARD can't be used.";
+ } else {
+ // It's possible to get a masked server card here if the user decides not
+ // to store a card while verifying it. We don't currently track usage
+ // of masked cards, so no-op.
+ return;
+ }
Refresh();
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698