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

Unified Diff: components/autofill/core/browser/form_structure.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: tests 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/form_structure.h
diff --git a/components/autofill/core/browser/form_structure.h b/components/autofill/core/browser/form_structure.h
index 9f86d560c5d3761382790aaf647f74de7a6e93d0..cc9fce0f4dbf0f5be2f02c5278f9f69a98f2facc 100644
--- a/components/autofill/core/browser/form_structure.h
+++ b/components/autofill/core/browser/form_structure.h
@@ -215,6 +215,7 @@ class FormStructure {
private:
friend class FormStructureTest;
FRIEND_TEST_ALL_PREFIXES(AutofillDownloadTest, QueryAndUploadTest);
+ FRIEND_TEST_ALL_PREFIXES(FormStructureTest, FindLongestCommonPrefix);
// Encodes information about this form and its fields into |query_form|.
void EncodeFormForQuery(
@@ -243,6 +244,13 @@ class FormStructure {
// Returns true if field should be skipped when talking to Autofill server.
bool ShouldSkipField(const FormFieldData& field) const;
+ // Further processes the extracted |fields_|.
+ void ProcessExtractedFields();
+
+ // Returns the longest common prefix found within |strings|.
+ static base::string16 FindLongestCommonPrefix(
vabr (Chromium) 2016/01/25 10:10:26 optional: This could return a StringPiece, saving
Mathieu 2016/01/25 15:52:53 Done.
+ const std::vector<base::string16>& strings);
+
// The name of the form.
base::string16 form_name_;

Powered by Google App Engine
This is Rietveld 408576698