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

Unified Diff: components/autofill/core/browser/credit_card_field.h

Issue 1012363002: Autofill: Recognize month/year selects when searching for credit cards. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix out of bounds indexing 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
Index: components/autofill/core/browser/credit_card_field.h
diff --git a/components/autofill/core/browser/credit_card_field.h b/components/autofill/core/browser/credit_card_field.h
index 4647f2fc05847aed99e6547eab4a1a52c5e27c5d..2d8ba6f52c2c5cf665bc1a340c69681b8ee98c00 100644
--- a/components/autofill/core/browser/credit_card_field.h
+++ b/components/autofill/core/browser/credit_card_field.h
@@ -31,6 +31,15 @@ class CreditCardField : public FormField {
private:
friend class CreditCardFieldTest;
+ // Returns true if |scanner| points to a field that looks like a month
+ // <select>.
+ static bool LikelyCardMonthSelectField(AutofillScanner* scanner);
+
+ // Returns true if |scanner| points to a field that looks like a year
+ // <select> for a credit card. i.e. it contains the current year and
+ // the next few years.
+ static bool LikelyCardYearSelectField(AutofillScanner* scanner);
+
CreditCardField();
// Parses the expiration month/year/date fields. Returns true if it finds

Powered by Google App Engine
This is Rietveld 408576698