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

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

Issue 7063031: Heuristics for grabber-continental.com.out (select-one) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 9 years, 7 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/autofill_resources.grd ('k') | chrome/browser/autofill/email_field.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 a8afc852c30439f03683ffb09740ff0725eb6afb..18a479678572af6ff64f9dcd6ba2ea4c42ed090f 100644
--- a/chrome/browser/autofill/credit_card_field.cc
+++ b/chrome/browser/autofill/credit_card_field.cc
@@ -122,14 +122,15 @@ CreditCardField* CreditCardField::Parse(AutofillScanner* scanner,
if ((!credit_card_field->expiration_month_ ||
credit_card_field->expiration_month_->IsEmpty()) &&
- ParseField(scanner, pattern, &credit_card_field->expiration_month_)) {
+ ParseFieldSpecifics(scanner, pattern, MATCH_DEFAULT | MATCH_SELECT,
+ &credit_card_field->expiration_month_)) {
if (is_ecml)
pattern = GetEcmlPattern(kEcmlCardExpireYear);
else
pattern = l10n_util::GetStringUTF16(IDS_AUTOFILL_EXPIRATION_DATE_RE);
- if (!ParseField(scanner, pattern,
- &credit_card_field->expiration_year_)) {
+ if (!ParseFieldSpecifics(scanner, pattern, MATCH_DEFAULT | MATCH_SELECT,
+ &credit_card_field->expiration_year_)) {
scanner->Rewind();
return NULL;
}
@@ -137,8 +138,10 @@ CreditCardField* CreditCardField::Parse(AutofillScanner* scanner,
}
}
- if (ParseField(scanner, GetEcmlPattern(kEcmlCardExpireDay), NULL))
+ if (ParseFieldSpecifics(scanner, GetEcmlPattern(kEcmlCardExpireDay),
+ MATCH_DEFAULT | MATCH_SELECT, NULL)) {
continue;
+ }
// Some pages (e.g. ExpediaBilling.html) have a "card description"
// field; we parse this field but ignore it.
« no previous file with comments | « chrome/browser/autofill/autofill_resources.grd ('k') | chrome/browser/autofill/email_field.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698