| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 // Used for iterating over the fields. | 96 // Used for iterating over the fields. |
| 97 std::vector<AutoFillField*>::const_iterator begin() const { | 97 std::vector<AutoFillField*>::const_iterator begin() const { |
| 98 return fields_.begin(); | 98 return fields_.begin(); |
| 99 } | 99 } |
| 100 std::vector<AutoFillField*>::const_iterator end() const { | 100 std::vector<AutoFillField*>::const_iterator end() const { |
| 101 return fields_.end(); | 101 return fields_.end(); |
| 102 } | 102 } |
| 103 | 103 |
| 104 const GURL& source_url() const { return source_url_; } | 104 const GURL& source_url() const { return source_url_; } |
| 105 const GURL& target_url() const { return target_url_; } |
| 106 const std::string& locale() const { return locale_; } |
| 107 void set_locale(const std::string& locale) { locale_ = locale; } |
| 105 | 108 |
| 106 bool operator==(const webkit_glue::FormData& form) const; | 109 bool operator==(const webkit_glue::FormData& form) const; |
| 107 bool operator!=(const webkit_glue::FormData& form) const; | 110 bool operator!=(const webkit_glue::FormData& form) const; |
| 108 | 111 |
| 109 private: | 112 private: |
| 110 enum EncodeRequestType { | 113 enum EncodeRequestType { |
| 111 QUERY, | 114 QUERY, |
| 112 UPLOAD, | 115 UPLOAD, |
| 113 }; | 116 }; |
| 114 | 117 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 126 | 129 |
| 127 // The name of the form. | 130 // The name of the form. |
| 128 string16 form_name_; | 131 string16 form_name_; |
| 129 | 132 |
| 130 // The source URL. | 133 // The source URL. |
| 131 GURL source_url_; | 134 GURL source_url_; |
| 132 | 135 |
| 133 // The target URL. | 136 // The target URL. |
| 134 GURL target_url_; | 137 GURL target_url_; |
| 135 | 138 |
| 139 // The form's locale. |
| 140 std::string locale_; |
| 141 |
| 136 bool has_credit_card_field_; | 142 bool has_credit_card_field_; |
| 137 bool has_autofillable_field_; | 143 bool has_autofillable_field_; |
| 138 bool has_password_fields_; | 144 bool has_password_fields_; |
| 139 | 145 |
| 140 // The number of fields able to be auto-filled. | 146 // The number of fields able to be auto-filled. |
| 141 size_t autofill_count_; | 147 size_t autofill_count_; |
| 142 | 148 |
| 143 // A vector of all the input fields in the form. The vector is terminated by | 149 // A vector of all the input fields in the form. The vector is terminated by |
| 144 // a NULL entry. | 150 // a NULL entry. |
| 145 ScopedVector<AutoFillField> fields_; | 151 ScopedVector<AutoFillField> fields_; |
| 146 | 152 |
| 147 // The names of the form input elements, that are part of the form signature. | 153 // The names of the form input elements, that are part of the form signature. |
| 148 // The string starts with "&" and the names are also separated by the "&" | 154 // The string starts with "&" and the names are also separated by the "&" |
| 149 // character. E.g.: "&form_input1_name&form_input2_name&...&form_inputN_name" | 155 // character. E.g.: "&form_input1_name&form_input2_name&...&form_inputN_name" |
| 150 std::string form_signature_field_names_; | 156 std::string form_signature_field_names_; |
| 151 | 157 |
| 152 // GET or POST. | 158 // GET or POST. |
| 153 RequestMethod method_; | 159 RequestMethod method_; |
| 154 | 160 |
| 155 DISALLOW_COPY_AND_ASSIGN(FormStructure); | 161 DISALLOW_COPY_AND_ASSIGN(FormStructure); |
| 156 }; | 162 }; |
| 157 | 163 |
| 158 #endif // CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ | 164 #endif // CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ |
| OLD | NEW |