| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 // attribute, if the attribute is available. The association is stored into | 166 // attribute, if the attribute is available. The association is stored into |
| 167 // |map|. Fills |found_attribute| with |true| if the attribute is available | 167 // |map|. Fills |found_attribute| with |true| if the attribute is available |
| 168 // (and non-empty) for at least one field. Fills |found_sections| with |true| | 168 // (and non-empty) for at least one field. Fills |found_sections| with |true| |
| 169 // if the attribute specifies a section for at least one field. | 169 // if the attribute specifies a section for at least one field. |
| 170 void ParseAutocompletetypeAttributes(bool* found_attribute, | 170 void ParseAutocompletetypeAttributes(bool* found_attribute, |
| 171 bool* found_sections); | 171 bool* found_sections); |
| 172 | 172 |
| 173 // Classifies each field in |fields_| into a logical section. | 173 // Classifies each field in |fields_| into a logical section. |
| 174 // Sections are identified by the heuristic that a logical section should not | 174 // Sections are identified by the heuristic that a logical section should not |
| 175 // include multiple fields of the same autofill type (with some exceptions, as | 175 // include multiple fields of the same autofill type (with some exceptions, as |
| 176 // described in the implementation). | 176 // described in the implementation). Sections are furthermore distinguished |
| 177 void IdentifySections(); | 177 // as either credit card or non-credit card sections. |
| 178 // If |has_author_specified_sections| is true, only the second pass -- |
| 179 // distinguishing credit card sections from non-credit card ones -- is made. |
| 180 void IdentifySections(bool has_author_specified_sections); |
| 178 | 181 |
| 179 // The name of the form. | 182 // The name of the form. |
| 180 string16 form_name_; | 183 string16 form_name_; |
| 181 | 184 |
| 182 // The source URL. | 185 // The source URL. |
| 183 GURL source_url_; | 186 GURL source_url_; |
| 184 | 187 |
| 185 // The target URL. | 188 // The target URL. |
| 186 GURL target_url_; | 189 GURL target_url_; |
| 187 | 190 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 208 RequestMethod method_; | 211 RequestMethod method_; |
| 209 | 212 |
| 210 // Whether the form includes any field types explicitly specified by the site | 213 // Whether the form includes any field types explicitly specified by the site |
| 211 // author, via the |autocompletetype| attribute. | 214 // author, via the |autocompletetype| attribute. |
| 212 bool has_author_specified_types_; | 215 bool has_author_specified_types_; |
| 213 | 216 |
| 214 DISALLOW_COPY_AND_ASSIGN(FormStructure); | 217 DISALLOW_COPY_AND_ASSIGN(FormStructure); |
| 215 }; | 218 }; |
| 216 | 219 |
| 217 #endif // CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ | 220 #endif // CHROME_BROWSER_AUTOFILL_FORM_STRUCTURE_H_ |
| OLD | NEW |