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

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

Issue 1138033002: [Autofill] No longer send form name at query time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 b789e5d28928f98b1faf98a9d2ca89dd445bef0e..c8d218465ff5f1f6d9bc9061097613dcdbc5e103 100644
--- a/components/autofill/core/browser/form_structure.cc
+++ b/components/autofill/core/browser/form_structure.cc
@@ -524,8 +524,7 @@ bool FormStructure::EncodeQueryRequest(
for (ScopedVector<FormStructure>::const_iterator it = forms.begin();
it != forms.end();
++it) {
- FormStructure* form = *it;
- std::string signature(form->FormSignature());
+ std::string signature((*it)->FormSignature());
if (processed_forms.find(signature) != processed_forms.end())
continue;
processed_forms.insert(signature);
@@ -533,13 +532,9 @@ bool FormStructure::EncodeQueryRequest(
new buzz::XmlElement(buzz::QName(kXMLElementForm)));
encompassing_xml_element->SetAttr(buzz::QName(kAttributeSignature),
signature);
- if (!form->form_name().empty()) {
- encompassing_xml_element->SetAttr(buzz::QName(kAttributeName),
- base::UTF16ToUTF8(form->form_name()));
- }
- if (!form->EncodeFormRequest(FormStructure::QUERY,
- encompassing_xml_element.get()))
+ if (!(*it)->EncodeFormRequest(FormStructure::QUERY,
+ encompassing_xml_element.get()))
continue; // Malformed form, skip it.
autofill_request_xml.AddElement(encompassing_xml_element.release());
« 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