Chromium Code Reviews| Index: components/autofill/core/browser/form_structure.h |
| diff --git a/components/autofill/core/browser/form_structure.h b/components/autofill/core/browser/form_structure.h |
| index 1777e50a42cebbd82f8ca9bd71f8e257d32db4e3..9b2367435c296bc855f97b6f098bf10ef51502ec 100644 |
| --- a/components/autofill/core/browser/form_structure.h |
| +++ b/components/autofill/core/browser/form_structure.h |
| @@ -132,12 +132,12 @@ class FormStructure { |
| // Classifies each field in |fields_| based upon its |autocomplete| attribute, |
| // if the attribute is available. The association is stored into the field's |
| // |heuristic_type|. |
| - // Fills |found_types| with |true| if the attribute is available and neither |
| - // empty nor set to the special values "on" or "off" for at least one field. |
| - // Fills |found_sections| with |true| if the attribute specifies a section for |
| + // Fills |has_author_specified_types_| with |true| if the attribute is |
| + // available and neither empty nor set to the special values "on" or "off" for |
| // at least one field. |
| - void ParseFieldTypesFromAutocompleteAttributes(bool* found_types, |
| - bool* found_sections); |
| + // Fills |has_author_specified_sections_| with |true| if the attribute |
| + // specifies a section for at least one field. |
| + void ParseFieldTypesFromAutocompleteAttributes(); |
| // Determines whether |type| and |field| match. |
| typedef base::Callback<bool(ServerFieldType type, |
| @@ -192,6 +192,12 @@ class FormStructure { |
| bool has_password_field() const { return has_password_field_; } |
| + bool has_author_specified_types() { return has_author_specified_types_; } |
| + |
| + bool has_author_specified_sections() { |
| + return has_author_specified_sections_; |
| + } |
| + |
| void set_upload_required(UploadRequired required) { |
| upload_required_ = required; |
| } |
| @@ -265,6 +271,15 @@ class FormStructure { |
| // author, via the |autocompletetype| attribute. |
| bool has_author_specified_types_; |
| + // Whether the form includes any sections explicitly specified by the site |
| + // author, via the |autocompletetype| attribute. |
|
Mathieu
2015/10/20 21:03:11
nit: "via the autocomplete attribute"
sebsg
2015/10/21 18:20:50
Done.
|
| + bool has_author_specified_sections_; |
| + |
| + // Whether the form was parsed for autocomplete attribute, thus assigning |
| + // the real values of |has_author_specified_types_| and |
| + // |has_author_specified_sections_|. |
| + bool was_parsed_for_autocomplete_attributes_; |
| + |
| // True if the form contains at least one password field. |
| bool has_password_field_; |