OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/autofill/autofill_xml_parser.h" | 5 #include "chrome/browser/autofill/autofill_xml_parser.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
| 10 #include "base/logging.h" |
10 #include "chrome/browser/autofill/autofill_type.h" | 11 #include "chrome/browser/autofill/autofill_type.h" |
11 #include "third_party/libjingle/overrides/talk/xmllite/qname.h" | 12 #include "third_party/libjingle/overrides/talk/xmllite/qname.h" |
12 | 13 |
13 AutoFillXmlParser::AutoFillXmlParser() | 14 AutoFillXmlParser::AutoFillXmlParser() |
14 : succeeded_(true) { | 15 : succeeded_(true) { |
15 } | 16 } |
16 | 17 |
17 void AutoFillXmlParser::CharacterData( | 18 void AutoFillXmlParser::CharacterData( |
18 buzz::XmlParseContext* context, const char* text, int len) { | 19 buzz::XmlParseContext* context, const char* text, int len) { |
19 } | 20 } |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 double AutoFillUploadXmlParser::GetDoubleValue(buzz::XmlParseContext* context, | 124 double AutoFillUploadXmlParser::GetDoubleValue(buzz::XmlParseContext* context, |
124 const char* attribute) { | 125 const char* attribute) { |
125 char* attr_end = NULL; | 126 char* attr_end = NULL; |
126 double value = strtod(attribute, &attr_end); | 127 double value = strtod(attribute, &attr_end); |
127 if (attr_end != NULL && attr_end == attribute) { | 128 if (attr_end != NULL && attr_end == attribute) { |
128 context->RaiseError(XML_ERROR_SYNTAX); | 129 context->RaiseError(XML_ERROR_SYNTAX); |
129 return 0.0; | 130 return 0.0; |
130 } | 131 } |
131 return value; | 132 return value; |
132 } | 133 } |
OLD | NEW |