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

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 inputs. 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/autofill_field.h
diff --git a/components/autofill/core/browser/autofill_field.h b/components/autofill/core/browser/autofill_field.h
index b810e76010cef8ce961ae903adce385e093dc2d3..d32b972f8a981c2979775753e823075bcd01ac73 100644
--- a/components/autofill/core/browser/autofill_field.h
+++ b/components/autofill/core/browser/autofill_field.h
@@ -65,6 +65,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_offset(size_t position) {
+ credit_card_number_offset_ = position;
+ }
+ size_t credit_card_number_offset() const {
+ return credit_card_number_offset_;
+ }
+
// 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,
@@ -105,6 +112,10 @@ class AutofillField : public FormFieldData {
// The default value returned by the Autofill server.
std::string default_value_;
+ // Used to hold the position of the first digit to be copied as a substring
+ // from credit card number.
+ size_t credit_card_number_offset_;
+
DISALLOW_COPY_AND_ASSIGN(AutofillField);
};
« no previous file with comments | « components/autofill/core/browser/address_field_unittest.cc ('k') | components/autofill/core/browser/autofill_field.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698