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

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

Issue 1754793003: [Autofill] Fix heuristics to detect cc-number on united.com. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added TODO Created 4 years, 10 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/27_checkout_cc_keurig.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 2fa9f6581db83a03e398c2d847a3bd143b633bac..d268b7380dcb65efc14585cea4e6779833d70fff 100644
--- a/components/autofill/core/browser/credit_card_field.cc
+++ b/components/autofill/core/browser/credit_card_field.cc
@@ -146,10 +146,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/27_checkout_cc_keurig.com.out ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698