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

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

Issue 2136453003: [Autofill] Improve support for various credit card expiration dates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: final nits Created 4 years, 5 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/validation.cc
diff --git a/components/autofill/core/browser/validation.cc b/components/autofill/core/browser/validation.cc
index 22a3c91fca1b0ef16eeb2e847a57b9e1182948ea..a063ab2fa004e3227bc6e46e16f91a82282148a8 100644
--- a/components/autofill/core/browser/validation.cc
+++ b/components/autofill/core/browser/validation.cc
@@ -17,26 +17,6 @@
namespace autofill {
-bool IsValidCreditCardExpirationDate(const base::string16& year,
- const base::string16& month,
- const base::Time& now) {
- base::string16 year_cleaned, month_cleaned;
- base::TrimWhitespace(year, base::TRIM_ALL, &year_cleaned);
- base::TrimWhitespace(month, base::TRIM_ALL, &month_cleaned);
- if (year_cleaned.length() != 4)
- return false;
-
- int cc_year;
- if (!base::StringToInt(year_cleaned, &cc_year))
- return false;
-
- int cc_month;
- if (!base::StringToInt(month_cleaned, &cc_month))
- return false;
-
- return IsValidCreditCardExpirationDate(cc_year, cc_month, now);
-}
-
bool IsValidCreditCardExpirationDate(int year,
int month,
const base::Time& now) {
« no previous file with comments | « components/autofill/core/browser/validation.h ('k') | components/autofill/core/browser/validation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698