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

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

Issue 853523004: Autofill: Set requirements for number of recognized fields in an autofillable form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert files without relevant changes Created 5 years, 11 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_CORE_BROWSER_FORM_STRUCTURE_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 25 matching lines...) Expand all
36 36
37 namespace autofill { 37 namespace autofill {
38 38
39 struct FormData; 39 struct FormData;
40 struct FormDataPredictions; 40 struct FormDataPredictions;
41 41
42 // FormStructure stores a single HTML form together with the values entered 42 // FormStructure stores a single HTML form together with the values entered
43 // in the fields along with additional information needed by Autofill. 43 // in the fields along with additional information needed by Autofill.
44 class FormStructure { 44 class FormStructure {
45 public: 45 public:
46 FormStructure(const FormData& form); 46 explicit FormStructure(const FormData& form);
47 virtual ~FormStructure(); 47 virtual ~FormStructure();
48 48
49 // Runs several heuristics against the form fields to determine their possible 49 // Runs several heuristics against the form fields to determine their possible
50 // types. 50 // types.
51 void DetermineHeuristicTypes(); 51 void DetermineHeuristicTypes();
52 52
53 // Encodes the XML upload request from this FormStructure. 53 // Encodes the XML upload request from this FormStructure.
54 bool EncodeUploadRequest(const ServerFieldTypeSet& available_field_types, 54 bool EncodeUploadRequest(const ServerFieldTypeSet& available_field_types,
55 bool form_was_autofilled, 55 bool form_was_autofilled,
56 std::string* encoded_xml) const; 56 std::string* encoded_xml) const;
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 // to the stored upload rates. 247 // to the stored upload rates.
248 UploadRequired upload_required_; 248 UploadRequired upload_required_;
249 249
250 // Whether the form includes any field types explicitly specified by the site 250 // Whether the form includes any field types explicitly specified by the site
251 // author, via the |autocompletetype| attribute. 251 // author, via the |autocompletetype| attribute.
252 bool has_author_specified_types_; 252 bool has_author_specified_types_;
253 253
254 // True if the form contains at least one password field. 254 // True if the form contains at least one password field.
255 bool has_password_field_; 255 bool has_password_field_;
256 256
257 // True if the form is in a <form>.
Evan Stade 2015/01/26 17:59:45 more like is-a form, right?
Lei Zhang 2015/01/28 01:37:35 sure.
258 bool is_in_form_tag_;
259
257 DISALLOW_COPY_AND_ASSIGN(FormStructure); 260 DISALLOW_COPY_AND_ASSIGN(FormStructure);
258 }; 261 };
259 262
260 } // namespace autofill 263 } // namespace autofill
261 264
262 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_ 265 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_
OLDNEW
« no previous file with comments | « components/autofill/core/browser/form_field_unittest.cc ('k') | components/autofill/core/browser/form_structure.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698