Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 36 } | 36 } |
| 37 | 37 |
| 38 namespace buzz { | 38 namespace buzz { |
| 39 class XmlElement; | 39 class XmlElement; |
| 40 } | 40 } |
| 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 explicit FormStructure(const FormData& form); | 46 FormStructure(const FormData& form, bool autocheckout_enabled = false); |
|
ahutter
2013/01/19 02:07:16
Can't use default arguments like this according to
benquan
2013/01/23 23:50:53
Done.
| |
| 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(const AutofillMetrics& metric_logger); | 51 void DetermineHeuristicTypes(const AutofillMetrics& metric_logger); |
| 52 | 52 |
| 53 // Encodes the XML upload request from this FormStructure. | 53 // Encodes the XML upload request from this FormStructure. |
| 54 bool EncodeUploadRequest(const FieldTypeSet& available_field_types, | 54 bool EncodeUploadRequest(const FieldTypeSet& 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 205 // form. | 205 // form. |
| 206 std::string server_experiment_id_; | 206 std::string server_experiment_id_; |
| 207 | 207 |
| 208 // GET or POST. | 208 // GET or POST. |
| 209 RequestMethod method_; | 209 RequestMethod method_; |
| 210 | 210 |
| 211 // Whether the form includes any field types explicitly specified by the site | 211 // Whether the form includes any field types explicitly specified by the site |
| 212 // author, via the |autocompletetype| attribute. | 212 // author, via the |autocompletetype| attribute. |
| 213 bool has_author_specified_types_; | 213 bool has_author_specified_types_; |
| 214 | 214 |
| 215 // Whether the autocheckout feature is enabled for the site which contains | |
| 216 // this form. | |
| 217 bool autocheckout_enabled_; | |
| 218 | |
| 215 DISALLOW_COPY_AND_ASSIGN(FormStructure); | 219 DISALLOW_COPY_AND_ASSIGN(FormStructure); |
| 216 }; | 220 }; |
| 217 | 221 |
| 218 #endif // CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ | 222 #endif // CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ |
| OLD | NEW |