OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "components/autofill/browser/autofill_xml_parser.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "chrome/browser/autofill/autofill_server_field_info.h" | 11 #include "components/autofill/browser/autofill_server_field_info.h" |
12 #include "third_party/libjingle/source/talk/xmllite/qname.h" | 12 #include "third_party/libjingle/source/talk/xmllite/qname.h" |
13 | 13 |
14 AutofillXmlParser::AutofillXmlParser() | 14 AutofillXmlParser::AutofillXmlParser() |
15 : succeeded_(true) { | 15 : succeeded_(true) { |
16 } | 16 } |
17 | 17 |
18 AutofillXmlParser::~AutofillXmlParser() {} | 18 AutofillXmlParser::~AutofillXmlParser() {} |
19 | 19 |
20 void AutofillXmlParser::CharacterData( | 20 void AutofillXmlParser::CharacterData( |
21 buzz::XmlParseContext* context, const char* text, int len) { | 21 buzz::XmlParseContext* context, const char* text, int len) { |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 double AutofillUploadXmlParser::GetDoubleValue(buzz::XmlParseContext* context, | 188 double AutofillUploadXmlParser::GetDoubleValue(buzz::XmlParseContext* context, |
189 const char* attribute) { | 189 const char* attribute) { |
190 char* attr_end = NULL; | 190 char* attr_end = NULL; |
191 double value = strtod(attribute, &attr_end); | 191 double value = strtod(attribute, &attr_end); |
192 if (attr_end != NULL && attr_end == attribute) { | 192 if (attr_end != NULL && attr_end == attribute) { |
193 context->RaiseError(XML_ERROR_SYNTAX); | 193 context->RaiseError(XML_ERROR_SYNTAX); |
194 return 0.0; | 194 return 0.0; |
195 } | 195 } |
196 return value; | 196 return value; |
197 } | 197 } |
OLD | NEW |