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

Unified Diff: components/autofill/browser/autofill_xml_parser.h

Issue 15487004: Autocheckout: parse multiple clicks setting in autofill response. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address Ilya's comments. Created 7 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/browser/autofill_xml_parser.h
diff --git a/components/autofill/browser/autofill_xml_parser.h b/components/autofill/browser/autofill_xml_parser.h
index 4d1498fb5b1d1a2be6cce113262de991183cb3f3..17622d6759ba5d58dcb71485bd0e002745e6956d 100644
--- a/components/autofill/browser/autofill_xml_parser.h
+++ b/components/autofill/browser/autofill_xml_parser.h
@@ -89,6 +89,20 @@ class AutofillQueryXmlParser : public AutofillXmlParser {
const char* name,
const char** attrs) OVERRIDE;
+ // A helper function to parse a <click_elements_before_formfill> or
+ // <click_elements_after_formfill>. A new |WebElementDescriptor| object will
+ // be appended to |click_elements|.
+ void HandleClickElement(std::vector<WebElementDescriptor>* click_elements);
+
+ // A helper function to parse a |WebElementDescriptor|.
+ // |context| is the current parsing context.
+ // |attrs| is the list of attributes (names and values) for the element.
+ // |element_descriptor| will be populated by this function.
+ WebElementDescriptor* ParseElementDescriptor(
+ buzz::XmlParseContext* context,
+ const char* const* attrs,
+ WebElementDescriptor* element_descriptor);
+
// A helper function to retrieve integer values from strings. Raises an
// XML parse error if it fails.
// |context| is the current parsing context.
@@ -109,6 +123,9 @@ class AutofillQueryXmlParser : public AutofillXmlParser {
// Page metadata for multipage autofill flow.
AutocheckoutPageMetaData* page_meta_data_;
+ // The click element the parser is currently processing.
+ WebElementDescriptor* current_click_element_;
+
DISALLOW_COPY_AND_ASSIGN(AutofillQueryXmlParser);
};

Powered by Google App Engine
This is Rietveld 408576698