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

Unified Diff: components/autofill/core/browser/form_structure.cc

Issue 1422853003: [Autofill] Send the form name in Autofill uploads where metadata is collected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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.cc
diff --git a/components/autofill/core/browser/form_structure.cc b/components/autofill/core/browser/form_structure.cc
index c0e250723b26f94a9218daf3a11e6c83ab8f004f..8703ff97085ad42b66c8052ec3e64a61e54a22f9 100644
--- a/components/autofill/core/browser/form_structure.cc
+++ b/components/autofill/core/browser/form_structure.cc
@@ -47,6 +47,7 @@ const char kAttributeFieldType[] = "fieldtype";
const char kAttributeFieldLabel[] = "label";
const char kAttributeFormSignature[] = "formsignature";
const char kAttributeFormActionHostSignature[] = "actionsignature";
+const char kAttributeFormName[] = "formname";
const char kAttributeName[] = "name";
const char kAttributeSignature[] = "signature";
const char kAttributeControlType[] = "type";
@@ -484,6 +485,10 @@ bool FormStructure::EncodeUploadRequest(
if (IsAutofillFieldMetadataEnabled()) {
autofill_request_xml.SetAttr(buzz::QName(kAttributeFormActionHostSignature),
Hash64Bit(target_url_.host()));
+ if(!form_name().empty()) {
+ autofill_request_xml.SetAttr(buzz::QName(kAttributeFormName),
+ base::UTF16ToUTF8(form_name()));
+ }
}
if (!login_form_signature.empty()) {
« no previous file with comments | « chrome/browser/autofill/autofill_server_browsertest.cc ('k') | components/autofill/core/browser/form_structure_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698