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

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

Issue 1477733003: Replace xmllite with libxml in autofill (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@556433_remove_dead_code
Patch Set: Just rebased Created 5 years, 1 month 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 941600d6cd3ebc187bb2e127d0c951432cf858d9..670f1c239f1a70f3d18c24e5b53025fa6b2720bd 100644
--- a/components/autofill/core/browser/form_structure.h
+++ b/components/autofill/core/browser/form_structure.h
@@ -19,6 +19,8 @@
#include "components/autofill/core/browser/field_types.h"
#include "url/gurl.h"
+class XmlWriter;
+
enum UploadRequired {
UPLOAD_NOT_REQUIRED,
UPLOAD_REQUIRED,
@@ -82,7 +84,7 @@ class FormStructure {
// Parses the field types from the server query response. |forms| must be the
// same as the one passed to EncodeQueryRequest when constructing the query.
// |rappor_service| may be null.
- static void ParseQueryResponse(const std::string& response_xml,
+ static void ParseQueryResponse(std::string response_xml,
const std::vector<FormStructure*>& forms,
rappor::RapporService* rappor_service);
@@ -222,10 +224,14 @@ class FormStructure {
FIELD_ASSIGNMENTS,
};
- // Adds form info to |encompassing_xml_element|. |request_type| indicates if
- // it is a query or upload.
+ // Returns true if the form has no fields, or too many.
+ bool IsMalformed() const;
+
+ // Takes |xml_writer| and writes description for |fields_|, according to
+ // |request_type|. Returns false on failure, including when there are no
+ // fields, and true on success.
bool EncodeFormRequest(EncodeRequestType request_type,
- buzz::XmlElement* encompassing_xml_element) const;
+ XmlWriter* xml_writer) const;
// Classifies each field in |fields_| into a logical section.
// Sections are identified by the heuristic that a logical section should not
« no previous file with comments | « components/autofill/core/browser/autofill_xml_parser_unittest.cc ('k') | components/autofill/core/browser/form_structure.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698