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

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

Issue 1885773002: [Autofill] Don't fill expiration date of expired credit cards. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit Created 4 years, 8 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/credit_card.cc
diff --git a/components/autofill/core/browser/credit_card.cc b/components/autofill/core/browser/credit_card.cc
index b98790d101b84b03c8c3266bb601ddfbfa1a5cde..4683c5e8d021c95fb281a161990ecdbd85d0842e 100644
--- a/components/autofill/core/browser/credit_card.cc
+++ b/components/autofill/core/browser/credit_card.cc
@@ -771,6 +771,11 @@ bool CreditCard::ConvertMonth(const base::string16& month,
return false;
}
+bool CreditCard::IsExpired(const base::Time& current_time) const {
+ return !IsValidCreditCardExpirationDate(expiration_year_, expiration_month_,
+ current_time);
+}
+
// So we can compare CreditCards with EXPECT_EQ().
std::ostream& operator<<(std::ostream& os, const CreditCard& credit_card) {
return os << base::UTF16ToUTF8(credit_card.Label()) << " "
« no previous file with comments | « components/autofill/core/browser/credit_card.h ('k') | components/autofill/core/browser/personal_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698