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

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

Issue 1001193002: Autofill: Better recognize credit card fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments 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..7d0ee17b09f484b821b7b1a4f0b66d21b631f3f3 100644
--- a/components/autofill/core/browser/credit_card_field.h
+++ b/components/autofill/core/browser/credit_card_field.h
@@ -31,6 +31,19 @@ class CreditCardField : public FormField {
private:
friend class CreditCardFieldTest;
+ // Examines the current field pointed to by |scanner|, if it exists, and
+ // returns true if the field has a high chance of being of a given type.
+ static bool LikelyCardNumberField(AutofillScanner* scanner);
+ static bool LikelyCardType(AutofillScanner* scanner);
+
+ // Same as above, but a bit less likely since what looks like a CVC field may
+ // also be part of a credit card field.
+ static bool MayBeCardCVCField(AutofillScanner* scanner);
+
+ // A couple common arguments used for match types.
+ static const int kMatchNumAndTel;
+ static const int kMatchNumTelAndPass;
+
CreditCardField();
// Parses the expiration month/year/date fields. Returns true if it finds

Powered by Google App Engine
This is Rietveld 408576698