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

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

Issue 1859633002: [Autofill] Fix heuristics to detect cc-number on united.com. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: 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
« no previous file with comments | « chrome/test/data/autofill/heuristics/output/138_cc_checkout_united.com.out ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/credit_card_field.cc
diff --git a/components/autofill/core/browser/credit_card_field.cc b/components/autofill/core/browser/credit_card_field.cc
index 89d356351bd6493671cf5d69ea54cf7306f3c0ec..f28206836de9e12a69552be6ca1fa7ab7cf7db38 100644
--- a/components/autofill/core/browser/credit_card_field.cc
+++ b/components/autofill/core/browser/credit_card_field.cc
@@ -136,10 +136,11 @@ scoped_ptr<FormField> CreditCardField::Parse(AutofillScanner* scanner) {
continue;
}
+ // TODO(crbug.com/591816): Make sure parsing cc-numbers of type password
+ // doesn't have bad side effects.
AutofillField* current_number_field;
- if (ParseFieldSpecifics(scanner,
- base::UTF8ToUTF16(kCardNumberRe),
- kMatchNumAndTel,
+ if (ParseFieldSpecifics(scanner, base::UTF8ToUTF16(kCardNumberRe),
+ kMatchNumAndTel | MATCH_PASSWORD,
&current_number_field)) {
// Avoid autofilling any credit card number field having very low or high
// |start_index| on the HTML form.
« no previous file with comments | « chrome/test/data/autofill/heuristics/output/138_cc_checkout_united.com.out ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698