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

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

Issue 12721004: Autofill:Autocomplete: Enable autocheckout of input elements of type password. This will support fi… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. 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) 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 COMPONENTS_AUTOFILL_BROWSER_FORM_STRUCTURE_H_ 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_FORM_STRUCTURE_H_
6 #define COMPONENTS_AUTOFILL_BROWSER_FORM_STRUCTURE_H_ 6 #define COMPONENTS_AUTOFILL_BROWSER_FORM_STRUCTURE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // Fills |found_types| with |true| if the attribute is available and neither 129 // Fills |found_types| with |true| if the attribute is available and neither
130 // empty nor set to the special values "on" or "off" for at least one field. 130 // empty nor set to the special values "on" or "off" for at least one field.
131 // Fills |found_sections| with |true| if the attribute specifies a section for 131 // Fills |found_sections| with |true| if the attribute specifies a section for
132 // at least one field. 132 // at least one field.
133 void ParseFieldTypesFromAutocompleteAttributes(bool* found_types, 133 void ParseFieldTypesFromAutocompleteAttributes(bool* found_types,
134 bool* found_sections); 134 bool* found_sections);
135 135
136 const AutofillField* field(size_t index) const; 136 const AutofillField* field(size_t index) const;
137 AutofillField* field(size_t index); 137 AutofillField* field(size_t index);
138 size_t field_count() const; 138 size_t field_count() const;
139 size_t checkable_field_count() const; 139 size_t active_field_count() const;
Ilya Sherman 2013/03/18 22:33:46 Does this need to be a public method?
Raman Kakilate 2013/03/18 23:01:54 Moved to private.
140 140
141 // Returns the number of fields that are able to be autofilled. 141 // Returns the number of fields that are able to be autofilled.
142 size_t autofill_count() const { return autofill_count_; } 142 size_t autofill_count() const { return autofill_count_; }
143 143
144 // Used for iterating over the fields. 144 // Used for iterating over the fields.
145 std::vector<AutofillField*>::const_iterator begin() const { 145 std::vector<AutofillField*>::const_iterator begin() const {
146 return fields_.begin(); 146 return fields_.begin();
147 } 147 }
148 std::vector<AutofillField*>::const_iterator end() const { 148 std::vector<AutofillField*>::const_iterator end() const {
149 return fields_.end(); 149 return fields_.end();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 201
202 // The target URL. 202 // The target URL.
203 GURL target_url_; 203 GURL target_url_;
204 204
205 // The number of fields able to be auto-filled. 205 // The number of fields able to be auto-filled.
206 size_t autofill_count_; 206 size_t autofill_count_;
207 207
208 // A vector of all the input fields in the form. 208 // A vector of all the input fields in the form.
209 ScopedVector<AutofillField> fields_; 209 ScopedVector<AutofillField> fields_;
210 210
211 // The number of fields able to be checked. 211 // The number of fields counted towards form signature and request to Autofill
212 size_t checkable_field_count_; 212 // server.
213 size_t active_field_count_;
213 214
214 // The names of the form input elements, that are part of the form signature. 215 // The names of the form input elements, that are part of the form signature.
215 // The string starts with "&" and the names are also separated by the "&" 216 // The string starts with "&" and the names are also separated by the "&"
216 // character. E.g.: "&form_input1_name&form_input2_name&...&form_inputN_name" 217 // character. E.g.: "&form_input1_name&form_input2_name&...&form_inputN_name"
217 std::string form_signature_field_names_; 218 std::string form_signature_field_names_;
218 219
219 // Whether the server expects us to always upload, never upload, or default 220 // Whether the server expects us to always upload, never upload, or default
220 // to the stored upload rates. 221 // to the stored upload rates.
221 UploadRequired upload_required_; 222 UploadRequired upload_required_;
222 223
223 // The server experiment corresponding to the server types returned for this 224 // The server experiment corresponding to the server types returned for this
224 // form. 225 // form.
225 std::string server_experiment_id_; 226 std::string server_experiment_id_;
226 227
227 // GET or POST. 228 // GET or POST.
228 RequestMethod method_; 229 RequestMethod method_;
229 230
230 // Whether the form includes any field types explicitly specified by the site 231 // Whether the form includes any field types explicitly specified by the site
231 // author, via the |autocompletetype| attribute. 232 // author, via the |autocompletetype| attribute.
232 bool has_author_specified_types_; 233 bool has_author_specified_types_;
233 234
234 // The URL prefix matched in autocheckout whitelist. An empty string implies 235 // The URL prefix matched in autocheckout whitelist. An empty string implies
235 // autocheckout is not enabled for this form. 236 // autocheckout is not enabled for this form.
236 std::string autocheckout_url_prefix_; 237 std::string autocheckout_url_prefix_;
237 238
238 DISALLOW_COPY_AND_ASSIGN(FormStructure); 239 DISALLOW_COPY_AND_ASSIGN(FormStructure);
239 }; 240 };
240 241
241 #endif // COMPONENTS_AUTOFILL_BROWSER_FORM_STRUCTURE_H_ 242 #endif // COMPONENTS_AUTOFILL_BROWSER_FORM_STRUCTURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698