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

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

Issue 381613005: [Autofill] Autofill fails to fill credit card number when split across fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Modified according to review comments and fixed DCHECK() abort in form_field.cc. Created 6 years, 3 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
Index: components/autofill/core/browser/credit_card_field.h
diff --git a/components/autofill/core/browser/credit_card_field.h b/components/autofill/core/browser/credit_card_field.h
index 64fa4edc941f65057427305c90a025d65b0191bb..5ed32ab737611b214ebfb7eb8a7856693cf32b3c 100644
--- a/components/autofill/core/browser/credit_card_field.h
+++ b/components/autofill/core/browser/credit_card_field.h
@@ -20,6 +20,7 @@ class AutofillScanner;
class CreditCardField : public FormField {
public:
+ virtual ~CreditCardField();
static FormField* Parse(AutofillScanner* scanner);
protected:
@@ -36,7 +37,7 @@ class CreditCardField : public FormField {
// |CREDIT_CARD_EXP_2_DIGIT_YEAR|; otherwise |CREDIT_CARD_EXP_4_DIGIT_YEAR|.
ServerFieldType GetExpirationYearType() const;
- const AutofillField* cardholder_; // Optional.
+ AutofillField* cardholder_; // Optional.
// Occasionally pages have separate fields for the cardholder's first and
// last names; for such pages |cardholder_| holds the first name field and
@@ -45,26 +46,30 @@ class CreditCardField : public FormField {
// because the text patterns for matching a cardholder name are different
// than for ordinary names, and because cardholder names never have titles,
// middle names or suffixes.)
- const AutofillField* cardholder_last_;
+ AutofillField* cardholder_last_;
// TODO(jhawkins): Parse the select control.
- const AutofillField* type_; // Optional.
- const AutofillField* number_; // Required.
+ AutofillField* type_; // Optional.
+ std::vector<AutofillField*> numbers_; // Required.
// The 3-digit card verification number; we don't currently fill this.
- const AutofillField* verification_;
+ AutofillField* verification_;
// Either |expiration_date_| or both |expiration_month_| and
// |expiration_year_| are required.
- const AutofillField* expiration_month_;
- const AutofillField* expiration_year_;
- const AutofillField* expiration_date_;
+ AutofillField* expiration_month_;
+ AutofillField* expiration_year_;
+ AutofillField* expiration_date_;
// For combined expiration field having year as 2-digits we store here
// |CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR|; otherwise we store
// |CREDIT_CARD_EXP_DATE_4_DIGIT_YEAR|.
ServerFieldType exp_year_type_;
+ // True if credit card number field splits do not exceed
+ // |kMaxValidCardNumberSize|; false otherwise.
+ bool is_valid_card_number_split_;
+
DISALLOW_COPY_AND_ASSIGN(CreditCardField);
};

Powered by Google App Engine
This is Rietveld 408576698