Chromium Code Reviews| Index: chrome/browser/autofill/autofill_xml_parser.cc |
| diff --git a/chrome/browser/autofill/autofill_xml_parser.cc b/chrome/browser/autofill/autofill_xml_parser.cc |
| index 92a1ede91c0f94dbc96794d4060b2c51af488145..6cdc45dbd1455b9bb2be407036975f4311a8b26a 100644 |
| --- a/chrome/browser/autofill/autofill_xml_parser.cc |
| +++ b/chrome/browser/autofill/autofill_xml_parser.cc |
| @@ -33,6 +33,7 @@ AutofillQueryXmlParser::AutofillQueryXmlParser( |
| std::string* experiment_id) |
| : field_types_(field_types), |
| upload_required_(upload_required), |
| + page_number_(-1), total_pages_(-1), |
|
ahutter
2012/12/17 17:35:39
separate lines.
Raman Kakilate
2013/01/10 00:54:40
Done.
|
| experiment_id_(experiment_id) { |
| DCHECK(upload_required_); |
| DCHECK(experiment_id_); |
| @@ -89,6 +90,19 @@ void AutofillQueryXmlParser::StartElement(buzz::XmlParseContext* context, |
| // Record this field type. |
| field_types_->push_back(field_type); |
| + } else if (element.compare("wallet_data") == 0) { |
| + // |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(); |
| + if (attribute_name.compare("page_no") == 0) { |
|
ahutter
2012/12/17 17:35:39
Can't you use == instead of compare?
Raman Kakilate
2013/01/10 00:54:40
being consistent with other uses in the file.
|
| + page_number_ = GetIntValue(context, *attrs); |
| + } else if (attribute_name.compare("total_pages") == 0) { |
| + total_pages_ = GetIntValue(context, *attrs); |
| + } |
| + ++attrs; |
| + } |
| } |
| } |