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

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

Issue 1622073002: [Autofill] Remove longest common prefix from field names when running heuristics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: std::move Created 4 years, 11 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 9aaf9fcdfae7d89471df1c46d6e319e2a99e993b..6c9d5231eb044735c0be8b3720a9e6ca1504cd7d 100644
--- a/components/autofill/core/browser/autofill_field.h
+++ b/components/autofill/core/browser/autofill_field.h
@@ -40,6 +40,7 @@ class AutofillField : public FormFieldData {
const ServerFieldTypeSet& possible_types() const { return possible_types_; }
PhonePart phone_part() const { return phone_part_; }
bool previously_autofilled() const { return previously_autofilled_; }
+ const base::string16& parseable_name() const { return parseable_name_; }
// Setters for the detected type and section for this field.
void set_section(const std::string& section) { section_ = section; }
@@ -52,6 +53,9 @@ class AutofillField : public FormFieldData {
void set_previously_autofilled(bool previously_autofilled) {
previously_autofilled_ = previously_autofilled;
}
+ void set_parseable_name(base::string16 parseable_name) {
+ parseable_name_ = std::move(parseable_name);
+ }
// This function automatically chooses between server and heuristic autofill
// type, depending on the data available.
@@ -139,6 +143,11 @@ class AutofillField : public FormFieldData {
// Whether the field was autofilled then later edited.
bool previously_autofilled_;
+ // The parseable name attribute, with unnecessary information removed (such as
+ // a common prefix shared with other fields). Will be used for heuristics
+ // parsing.
+ base::string16 parseable_name_;
+
DISALLOW_COPY_AND_ASSIGN(AutofillField);
};
« no previous file with comments | « chrome/test/data/autofill/heuristics/output/bug_497850.out ('k') | components/autofill/core/browser/autofill_field.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698