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

Unified Diff: chrome/browser/ui/autofill/data_model_wrapper.cc

Issue 17099006: Validate saved credit card number in interactive autocomplete (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Move credit card validation to credit card class Created 7 years, 6 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: chrome/browser/ui/autofill/data_model_wrapper.cc
diff --git a/chrome/browser/ui/autofill/data_model_wrapper.cc b/chrome/browser/ui/autofill/data_model_wrapper.cc
index eadecfbb82a1b82d92727fd13908b08f52263699..9559b6e802ae2b268f728baedf68939f69e03982 100644
--- a/chrome/browser/ui/autofill/data_model_wrapper.cc
+++ b/chrome/browser/ui/autofill/data_model_wrapper.cc
@@ -140,12 +140,8 @@ gfx::Image AutofillCreditCardWrapper::GetIcon() {
}
string16 AutofillCreditCardWrapper::GetDisplayText() {
- if (!autofill::IsValidCreditCardExpirationDate(
- card_->GetRawInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR),
- card_->GetRawInfo(CREDIT_CARD_EXP_MONTH),
- base::Time::Now())) {
+ if (!card_->IsValid())
return string16();
- }
return card_->TypeAndLastFourDigits();
}
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/data_model_wrapper_unittest.cc » ('j') | components/autofill/browser/credit_card.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698