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

Side by Side Diff: chrome/browser/autofill/form_structure.h

Issue 7613015: Add preliminary Autofill support for 'autocompletetype' sections. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Line unwrapping Created 9 years, 4 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) 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 #ifndef CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_
6 #define CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ 6 #define CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 enum EncodeRequestType { 148 enum EncodeRequestType {
149 QUERY, 149 QUERY,
150 UPLOAD, 150 UPLOAD,
151 }; 151 };
152 152
153 // Adds form info to |encompassing_xml_element|. |request_type| indicates if 153 // Adds form info to |encompassing_xml_element|. |request_type| indicates if
154 // it is a query or upload. 154 // it is a query or upload.
155 bool EncodeFormRequest(EncodeRequestType request_type, 155 bool EncodeFormRequest(EncodeRequestType request_type,
156 buzz::XmlElement* encompassing_xml_element) const; 156 buzz::XmlElement* encompassing_xml_element) const;
157 157
158 // Classifies each field in |fields_| based upon its |autocompletetype|
159 // attribute, if the attribute is available. The association is stored into
160 // |map|. Fills |found_attribute| with |true| if the attribute is available
161 // (and non-empty) for at least one field. Fills |found_sections| with |true|
162 // if the attribute specifies a section for at least one field.
163 void ParseAutocompletetypeAttributes(bool* found_attribute,
164 bool* found_sections);
165
166 // Classifies each field in |fields_| into a logical section.
167 // Sections are identified by the heuristic that a logical section should not
168 // include multiple fields of the same autofill type (with some exceptions, as
169 // described in the implementation).
170 void IdentifySections();
171
158 // The name of the form. 172 // The name of the form.
159 string16 form_name_; 173 string16 form_name_;
160 174
161 // The source URL. 175 // The source URL.
162 GURL source_url_; 176 GURL source_url_;
163 177
164 // The target URL. 178 // The target URL.
165 GURL target_url_; 179 GURL target_url_;
166 180
167 // The number of fields able to be auto-filled. 181 // The number of fields able to be auto-filled.
(...skipping 19 matching lines...) Expand all
187 RequestMethod method_; 201 RequestMethod method_;
188 202
189 // Whether the form includes any field types explicitly specified by the site 203 // Whether the form includes any field types explicitly specified by the site
190 // author, via the |autocompletetype| attribute. 204 // author, via the |autocompletetype| attribute.
191 bool has_author_specified_types_; 205 bool has_author_specified_types_;
192 206
193 DISALLOW_COPY_AND_ASSIGN(FormStructure); 207 DISALLOW_COPY_AND_ASSIGN(FormStructure);
194 }; 208 };
195 209
196 #endif // CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ 210 #endif // CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_manager_unittest.cc ('k') | chrome/browser/autofill/form_structure.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698