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

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

Issue 1474973002: Remove WebElementDescriptor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix BUILD files 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/autofill_xml_parser.cc
diff --git a/components/autofill/core/browser/autofill_xml_parser.cc b/components/autofill/core/browser/autofill_xml_parser.cc
index 6059b57791bdbd7c240941848a4592809b1fc064..acfa4c07f3daa5d7b1f2eb77aa34d65d540c10b7 100644
--- a/components/autofill/core/browser/autofill_xml_parser.cc
+++ b/components/autofill/core/browser/autofill_xml_parser.cc
@@ -100,33 +100,6 @@ void AutofillQueryXmlParser::StartElement(buzz::XmlParseContext* context,
}
}
-void AutofillQueryXmlParser::ParseElementDescriptor(
- buzz::XmlParseContext* context,
- const char* const* attrs,
- WebElementDescriptor* element_descriptor) {
- // If both id and css_selector are set, the first one to appear will take
- // precedence.
- // |attrs| is a NULL-terminated list of (attribute, value) pairs.
- while (*attrs) {
- buzz::QName attribute_qname = context->ResolveQName(*attrs, true);
- ++attrs;
- const std::string& attribute_name = attribute_qname.LocalPart();
- buzz::QName value_qname = context->ResolveQName(*attrs, true);
- ++attrs;
- const std::string& attribute_value = value_qname.LocalPart();
- if (attribute_name.compare("id") == 0 && !attribute_value.empty()) {
- element_descriptor->retrieval_method = WebElementDescriptor::ID;
- element_descriptor->descriptor = attribute_value;
- break;
- } else if (attribute_name.compare("css_selector") == 0 &&
- !attribute_value.empty()) {
- element_descriptor->retrieval_method = WebElementDescriptor::CSS_SELECTOR;
- element_descriptor->descriptor = attribute_value;
- break;
- }
- }
-}
-
int AutofillQueryXmlParser::GetIntValue(buzz::XmlParseContext* context,
const char* attribute) {
int value = 0;
« no previous file with comments | « components/autofill/core/browser/autofill_xml_parser.h ('k') | components/autofill/core/browser/form_structure.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698