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

Unified Diff: components/autofill/core/browser/autofill_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: Incorporated review comments. 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
Index: components/autofill/core/browser/autofill_field.h
diff --git a/components/autofill/core/browser/autofill_field.h b/components/autofill/core/browser/autofill_field.h
index b810e76010cef8ce961ae903adce385e093dc2d3..a3568570628c430a78e7b8571d96b427b763ffd7 100644
--- a/components/autofill/core/browser/autofill_field.h
+++ b/components/autofill/core/browser/autofill_field.h
@@ -24,6 +24,13 @@ class AutofillField : public FormFieldData {
PHONE_SUFFIX = 2,
};
+ // This structure holds the credit card number split information on the html
+ // form structure.
+ struct CreditCardNumberInfo {
+ int part_;
+ int start_index_;
Ilya Sherman 2014/08/07 20:57:25 Why do you need the part in addition to the index?
Pritam Nikam 2014/08/08 14:14:34 Done. Removed this structure and instead book-keep
+ };
+
AutofillField();
AutofillField(const FormFieldData& field, const base::string16& unique_name);
virtual ~AutofillField();
@@ -65,6 +72,13 @@ class AutofillField : public FormFieldData {
void set_default_value(const std::string& value) { default_value_ = value; }
const std::string& default_value() const { return default_value_; }
+ void set_credit_card_number_info(CreditCardNumberInfo* card_number_info) {
+ credit_card_number_info_ = card_number_info;
+ }
+ CreditCardNumberInfo* credit_card_number_info() const {
+ return credit_card_number_info_;
+ }
+
// Set |field_data|'s value to |value|. Uses |field|, |address_language_code|,
// and |app_locale| as hints when filling exceptional cases like phone number
// values and <select> fields. Returns |true| if the field has been filled,
@@ -102,6 +116,10 @@ class AutofillField : public FormFieldData {
// Used to track whether this field is a phone prefix or suffix.
PhonePart phone_part_;
+ // Used to track whether this field is a credit card number along with split
+ // information.
+ CreditCardNumberInfo* credit_card_number_info_;
+
// The default value returned by the Autofill server.
std::string default_value_;
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_field.cc » ('j') | components/autofill/core/browser/autofill_field.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698