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

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: Fix test name 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
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/data_model_wrapper_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..cd2c6e8e23213630ead64b374dbdf1d30464bdea 100644
--- a/chrome/browser/ui/autofill/data_model_wrapper.cc
+++ b/chrome/browser/ui/autofill/data_model_wrapper.cc
@@ -141,9 +141,11 @@ gfx::Image AutofillCreditCardWrapper::GetIcon() {
string16 AutofillCreditCardWrapper::GetDisplayText() {
if (!autofill::IsValidCreditCardExpirationDate(
Evan Stade 2013/06/14 22:29:49 I feel like this should be a function on card_
please use gerrit instead 2013/06/17 18:35:42 Done.
- card_->GetRawInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR),
- card_->GetRawInfo(CREDIT_CARD_EXP_MONTH),
- base::Time::Now())) {
+ card_->GetRawInfo(CREDIT_CARD_EXP_4_DIGIT_YEAR),
+ card_->GetRawInfo(CREDIT_CARD_EXP_MONTH),
+ base::Time::Now()) ||
+ !autofill::IsValidCreditCardNumber(
+ card_->GetRawInfo(CREDIT_CARD_NUMBER))) {
return string16();
}
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/data_model_wrapper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698