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

Unified Diff: chrome/browser/autofill/form_structure.cc

Issue 6213002: Propagate correct data to the Toolbar servers (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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: chrome/browser/autofill/form_structure.cc
===================================================================
--- chrome/browser/autofill/form_structure.cc (revision 71495)
+++ chrome/browser/autofill/form_structure.cc (working copy)
@@ -105,6 +105,7 @@
FormStructure::~FormStructure() {}
bool FormStructure::EncodeUploadRequest(bool auto_fill_used,
+ char const* data_presence,
std::string* encoded_xml) const {
DCHECK(encoded_xml);
encoded_xml->clear();
@@ -113,31 +114,30 @@
if (!auto_fillable)
return false;
- buzz::XmlElement autofil_request_xml(buzz::QName("autofillupload"));
+ buzz::XmlElement autofill_request_xml(buzz::QName("autofillupload"));
// Attributes for the <autofillupload> element.
//
// TODO(jhawkins): Work with toolbar devs to make a spec for autofill clients.
// For now these values are hacked from the toolbar code.
- autofil_request_xml.SetAttr(buzz::QName(kAttributeClientVersion),
- "6.1.1715.1442/en (GGLL)");
+ autofill_request_xml.SetAttr(buzz::QName(kAttributeClientVersion),
+ "6.1.1715.1442/en (GGLL)");
- autofil_request_xml.SetAttr(buzz::QName(kAttributeFormSignature),
- FormSignature());
+ autofill_request_xml.SetAttr(buzz::QName(kAttributeFormSignature),
+ FormSignature());
- autofil_request_xml.SetAttr(buzz::QName(kAttributeAutoFillUsed),
- auto_fill_used ? "true" : "false");
+ autofill_request_xml.SetAttr(buzz::QName(kAttributeAutoFillUsed),
+ auto_fill_used ? "true" : "false");
- // TODO(jhawkins): Hook this up to the personal data manager.
- // personaldata_manager_->GetDataPresent();
- autofil_request_xml.SetAttr(buzz::QName(kAttributeDataPresent), "");
+ autofill_request_xml.SetAttr(buzz::QName(kAttributeDataPresent),
+ data_presence);
- if (!EncodeFormRequest(FormStructure::UPLOAD, &autofil_request_xml))
+ if (!EncodeFormRequest(FormStructure::UPLOAD, &autofill_request_xml))
return false; // Malformed form, skip it.
// Obtain the XML structure as a string.
*encoded_xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
- *encoded_xml += autofil_request_xml.Str().c_str();
+ *encoded_xml += autofill_request_xml.Str().c_str();
return true;
}
@@ -151,13 +151,13 @@
encoded_xml->clear();
encoded_signatures->clear();
encoded_signatures->reserve(forms.size());
- buzz::XmlElement autofil_request_xml(buzz::QName("autofillquery"));
+ buzz::XmlElement autofill_request_xml(buzz::QName("autofillquery"));
// Attributes for the <autofillquery> element.
//
// TODO(jhawkins): Work with toolbar devs to make a spec for autofill clients.
// For now these values are hacked from the toolbar code.
- autofil_request_xml.SetAttr(buzz::QName(kAttributeClientVersion),
- "6.1.1715.1442/en (GGLL)");
+ autofill_request_xml.SetAttr(buzz::QName(kAttributeClientVersion),
+ "6.1.1715.1442/en (GGLL)");
// Some badly formatted web sites repeat forms - detect that and encode only
// one form as returned data would be the same for all the repeated forms.
std::set<std::string> processed_forms;
@@ -177,7 +177,7 @@
encompassing_xml_element.get()))
continue; // Malformed form, skip it.
- autofil_request_xml.AddElement(encompassing_xml_element.release());
+ autofill_request_xml.AddElement(encompassing_xml_element.release());
encoded_signatures->push_back(signature);
}
@@ -186,7 +186,7 @@
// Obtain the XML structure as a string.
*encoded_xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
- *encoded_xml += autofil_request_xml.Str().c_str();
+ *encoded_xml += autofill_request_xml.Str().c_str();
return true;
}

Powered by Google App Engine
This is Rietveld 408576698