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

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

Issue 493393003: [Autofill] Autofill incorrectly fills credit card expiration year in 2-digit fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | « no previous file | components/autofill/core/browser/credit_card_field_unittest.cc » ('j') | 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 09dab1e48d796800fda5065ee6cb54075fd5697a..976ee392fca01530399e6d982cbb3c30674adac6 100644
--- a/components/autofill/core/browser/credit_card_field.cc
+++ b/components/autofill/core/browser/credit_card_field.cc
@@ -107,6 +107,8 @@ FormField* CreditCardField::Parse(AutofillScanner* scanner) {
pattern = base::UTF8ToUTF16(autofill::kExpirationYearRe);
if (ParseFieldSpecifics(scanner, pattern, MATCH_DEFAULT | MATCH_SELECT,
&credit_card_field->expiration_year_)) {
Evan Stade 2014/08/22 17:30:18 nit: could you fix the indent here
Pritam Nikam 2014/08/23 08:27:35 Done. Applied git cl format on entire content.
+ if (credit_card_field->expiration_year_->max_length == 2)
+ credit_card_field->is_two_digit_year_ = true;
Evan Stade 2014/08/22 17:30:18 I kinda think a more general way to tackle this (m
Pritam Nikam 2014/08/23 08:27:35 +1 Added, ServerFieldType GetExpirationYearType()
continue;
}
}
« no previous file with comments | « no previous file | components/autofill/core/browser/credit_card_field_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698