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

Unified Diff: chrome/browser/autofill/credit_card_field.cc

Issue 12260054: [Autofill] Enable heuristic detection of credit card issuer fields. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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/browser/autofill/credit_card_field.h ('k') | chrome/browser/autofill/credit_card_field_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/credit_card_field.cc
diff --git a/chrome/browser/autofill/credit_card_field.cc b/chrome/browser/autofill/credit_card_field.cc
index f9b843b5154f2c469971442f151939b549795fdf..1d9a296d7326ae27f75b8600c65c49f488c32da2 100644
--- a/chrome/browser/autofill/credit_card_field.cc
+++ b/chrome/browser/autofill/credit_card_field.cc
@@ -18,8 +18,7 @@
#include "ui/base/l10n/l10n_util.h"
// static
-FormField* CreditCardField::Parse(AutofillScanner* scanner,
- bool parse_new_field_types) {
+FormField* CreditCardField::Parse(AutofillScanner* scanner) {
if (scanner->IsEnd())
return NULL;
@@ -68,14 +67,12 @@ FormField* CreditCardField::Parse(AutofillScanner* scanner,
}
// Check for a credit card type (Visa, MasterCard, etc.) field.
- if (parse_new_field_types) {
- string16 type_pattern = UTF8ToUTF16(autofill::kCardTypeRe);
- if (!credit_card_field->type_ &&
- ParseFieldSpecifics(scanner, type_pattern,
- MATCH_DEFAULT | MATCH_SELECT,
- &credit_card_field->type_)) {
- continue;
- }
+ string16 type_pattern = UTF8ToUTF16(autofill::kCardTypeRe);
+ if (!credit_card_field->type_ &&
+ ParseFieldSpecifics(scanner, type_pattern,
+ MATCH_DEFAULT | MATCH_SELECT,
+ &credit_card_field->type_)) {
+ continue;
}
// We look for a card security code before we look for a credit
« no previous file with comments | « chrome/browser/autofill/credit_card_field.h ('k') | chrome/browser/autofill/credit_card_field_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698