| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_XML_PARSER_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_XML_PARSER_H_ |
| 6 #define COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_XML_PARSER_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_XML_PARSER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "components/autofill/browser/autofill_server_field_info.h" | 14 #include "components/autofill/core/browser/autofill_server_field_info.h" |
| 15 #include "components/autofill/browser/field_types.h" | 15 #include "components/autofill/core/browser/field_types.h" |
| 16 #include "components/autofill/browser/form_structure.h" | 16 #include "components/autofill/core/browser/form_structure.h" |
| 17 #include "third_party/libjingle/source/talk/xmllite/xmlparser.h" | 17 #include "third_party/libjingle/source/talk/xmllite/xmlparser.h" |
| 18 | 18 |
| 19 namespace autofill { | 19 namespace autofill { |
| 20 | 20 |
| 21 struct AutocheckoutPageMetaData; | 21 struct AutocheckoutPageMetaData; |
| 22 | 22 |
| 23 // The base class that contains common functionality between | 23 // The base class that contains common functionality between |
| 24 // AutofillQueryXmlParser and AutofillUploadXmlParser. | 24 // AutofillQueryXmlParser and AutofillUploadXmlParser. |
| 25 class AutofillXmlParser : public buzz::XmlParseHandler { | 25 class AutofillXmlParser : public buzz::XmlParseHandler { |
| 26 public: | 26 public: |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // <autofillqueryresponse experimentid="1"> | 64 // <autofillqueryresponse experimentid="1"> |
| 65 // <field autofilltype="0" /> | 65 // <field autofilltype="0" /> |
| 66 // <field autofilltype="1" /> | 66 // <field autofilltype="1" /> |
| 67 // <field autofilltype="3" /> | 67 // <field autofilltype="3" /> |
| 68 // <field autofilltype="2" /> | 68 // <field autofilltype="2" /> |
| 69 // </autofillqueryresponse> | 69 // </autofillqueryresponse> |
| 70 // | 70 // |
| 71 // Fields are returned in the same order they were sent to the server. | 71 // Fields are returned in the same order they were sent to the server. |
| 72 // autofilltype: The server's guess at what type of field this is. 0 | 72 // autofilltype: The server's guess at what type of field this is. 0 |
| 73 // is unknown, other types are documented in | 73 // is unknown, other types are documented in |
| 74 // components/autofill/browser/field_types.h. | 74 // components/autofill/core/browser/field_types.h. |
| 75 class AutofillQueryXmlParser : public AutofillXmlParser { | 75 class AutofillQueryXmlParser : public AutofillXmlParser { |
| 76 public: | 76 public: |
| 77 AutofillQueryXmlParser(std::vector<AutofillServerFieldInfo>* field_infos, | 77 AutofillQueryXmlParser(std::vector<AutofillServerFieldInfo>* field_infos, |
| 78 UploadRequired* upload_required, | 78 UploadRequired* upload_required, |
| 79 std::string* experiment_id, | 79 std::string* experiment_id, |
| 80 AutocheckoutPageMetaData* page_meta_data); | 80 AutocheckoutPageMetaData* page_meta_data); |
| 81 virtual ~AutofillQueryXmlParser(); | 81 virtual ~AutofillQueryXmlParser(); |
| 82 | 82 |
| 83 private: | 83 private: |
| 84 // A callback for the beginning of a new <element>, called by Expat. | 84 // A callback for the beginning of a new <element>, called by Expat. |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 bool succeeded_; | 158 bool succeeded_; |
| 159 | 159 |
| 160 double* positive_upload_rate_; | 160 double* positive_upload_rate_; |
| 161 double* negative_upload_rate_; | 161 double* negative_upload_rate_; |
| 162 | 162 |
| 163 DISALLOW_COPY_AND_ASSIGN(AutofillUploadXmlParser); | 163 DISALLOW_COPY_AND_ASSIGN(AutofillUploadXmlParser); |
| 164 }; | 164 }; |
| 165 | 165 |
| 166 } // namespace autofill | 166 } // namespace autofill |
| 167 | 167 |
| 168 #endif // COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_XML_PARSER_H_ | 168 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_XML_PARSER_H_ |
| OLD | NEW |