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

Side by Side Diff: components/autofill/browser/autofill_xml_parser.h

Issue 12434004: Move remaining Autofill code to //components/autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix long lines Created 7 years, 9 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 CHROME_BROWSER_AUTOFILL_AUTOFILL_XML_PARSER_H_ 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_XML_PARSER_H_
6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_XML_PARSER_H_ 6 #define COMPONENTS_AUTOFILL_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 "chrome/browser/autofill/autofill_server_field_info.h" 14 #include "components/autofill/browser/autofill_server_field_info.h"
15 #include "chrome/browser/autofill/field_types.h" 15 #include "components/autofill/browser/field_types.h"
16 #include "chrome/browser/autofill/form_structure.h" 16 #include "components/autofill/browser/form_structure.h"
17 #include "components/autofill/common/web_element_descriptor.h" 17 #include "components/autofill/common/web_element_descriptor.h"
18 #include "third_party/libjingle/source/talk/xmllite/xmlparser.h" 18 #include "third_party/libjingle/source/talk/xmllite/xmlparser.h"
19 19
20 // The base class that contains common functionality between 20 // The base class that contains common functionality between
21 // AutofillQueryXmlParser and AutofillUploadXmlParser. 21 // AutofillQueryXmlParser and AutofillUploadXmlParser.
22 class AutofillXmlParser : public buzz::XmlParseHandler { 22 class AutofillXmlParser : public buzz::XmlParseHandler {
23 public: 23 public:
24 AutofillXmlParser(); 24 AutofillXmlParser();
25 virtual ~AutofillXmlParser(); 25 virtual ~AutofillXmlParser();
26 26
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // response looks like: 59 // response looks like:
60 // 60 //
61 // <autofillqueryresponse experimentid="1"> 61 // <autofillqueryresponse experimentid="1">
62 // <field autofilltype="0" /> 62 // <field autofilltype="0" />
63 // <field autofilltype="1" /> 63 // <field autofilltype="1" />
64 // <field autofilltype="3" /> 64 // <field autofilltype="3" />
65 // <field autofilltype="2" /> 65 // <field autofilltype="2" />
66 // </autofillqueryresponse> 66 // </autofillqueryresponse>
67 // 67 //
68 // Fields are returned in the same order they were sent to the server. 68 // Fields are returned in the same order they were sent to the server.
69 // autofilltype: The server's guess at what type of field this is. 0 is 69 // autofilltype: The server's guess at what type of field this is. 0
70 // unknown, other types are documented in chrome/browser/autofill/field_types.h. 70 // is unknown, other types are documented in
71 // components/autofill/browser/field_types.h.
71 class AutofillQueryXmlParser : public AutofillXmlParser { 72 class AutofillQueryXmlParser : public AutofillXmlParser {
72 public: 73 public:
73 AutofillQueryXmlParser(std::vector<AutofillServerFieldInfo>* field_infos, 74 AutofillQueryXmlParser(std::vector<AutofillServerFieldInfo>* field_infos,
74 UploadRequired* upload_required, 75 UploadRequired* upload_required,
75 std::string* experiment_id); 76 std::string* experiment_id);
76 virtual ~AutofillQueryXmlParser(); 77 virtual ~AutofillQueryXmlParser();
77 78
78 int current_page_number() const { return current_page_number_; } 79 int current_page_number() const { return current_page_number_; }
79 80
80 int total_pages() const { return total_pages_; } 81 int total_pages() const { return total_pages_; }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 157
157 // True if parsing succeeded. 158 // True if parsing succeeded.
158 bool succeeded_; 159 bool succeeded_;
159 160
160 double* positive_upload_rate_; 161 double* positive_upload_rate_;
161 double* negative_upload_rate_; 162 double* negative_upload_rate_;
162 163
163 DISALLOW_COPY_AND_ASSIGN(AutofillUploadXmlParser); 164 DISALLOW_COPY_AND_ASSIGN(AutofillUploadXmlParser);
164 }; 165 };
165 166
166 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_XML_PARSER_H_ 167 #endif // COMPONENTS_AUTOFILL_BROWSER_AUTOFILL_XML_PARSER_H_
OLDNEW
« no previous file with comments | « components/autofill/browser/autofill_type_unittest.cc ('k') | components/autofill/browser/autofill_xml_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698