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

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: remove wait_time_ms 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..c68d0e5c52e03d82412ebfc566ba31623dc40891 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 ParseClickElement(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** attrs,
Ilya Sherman 2013/05/23 09:04:42 Please document that |attrs| will be modified by c
benquan 2013/05/24 00:45:11 Nope, the function only changes |attrs| itself (++
+ 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