| OLD | NEW |
| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // indicates whether this method is called as a result of observing a | 125 // indicates whether this method is called as a result of observing a |
| 126 // submission event (otherwise, it may be that an upload was triggered after | 126 // submission event (otherwise, it may be that an upload was triggered after |
| 127 // a form was unfocused or a navigation occurred). | 127 // a form was unfocused or a navigation occurred). |
| 128 void LogQualityMetrics(const base::TimeTicks& load_time, | 128 void LogQualityMetrics(const base::TimeTicks& load_time, |
| 129 const base::TimeTicks& interaction_time, | 129 const base::TimeTicks& interaction_time, |
| 130 const base::TimeTicks& submission_time, | 130 const base::TimeTicks& submission_time, |
| 131 rappor::RapporService* rappor_service, | 131 rappor::RapporService* rappor_service, |
| 132 bool did_show_suggestions, | 132 bool did_show_suggestions, |
| 133 bool observed_submission) const; | 133 bool observed_submission) const; |
| 134 | 134 |
| 135 // Log the quality of the heuristics and server predictions for this form |
| 136 // structure, if autocomplete attributes are present on the fields (they are |
| 137 // used as golden truths). |
| 138 void LogQualityMetricsBasedOnAutocomplete() const; |
| 139 |
| 135 // Classifies each field in |fields_| based upon its |autocomplete| attribute, | 140 // Classifies each field in |fields_| based upon its |autocomplete| attribute, |
| 136 // if the attribute is available. The association is stored into the field's | 141 // if the attribute is available. The association is stored into the field's |
| 137 // |heuristic_type|. | 142 // |heuristic_type|. |
| 138 // Fills |has_author_specified_types_| with |true| if the attribute is | 143 // Fills |has_author_specified_types_| with |true| if the attribute is |
| 139 // available and neither empty nor set to the special values "on" or "off" for | 144 // available and neither empty nor set to the special values "on" or "off" for |
| 140 // at least one field. | 145 // at least one field. |
| 141 // Fills |has_author_specified_sections_| with |true| if the attribute | 146 // Fills |has_author_specified_sections_| with |true| if the attribute |
| 142 // specifies a section for at least one field. | 147 // specifies a section for at least one field. |
| 143 void ParseFieldTypesFromAutocompleteAttributes(); | 148 void ParseFieldTypesFromAutocompleteAttributes(); |
| 144 | 149 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 | 315 |
| 311 // True if all form fields are password fields. | 316 // True if all form fields are password fields. |
| 312 bool all_fields_are_passwords_; | 317 bool all_fields_are_passwords_; |
| 313 | 318 |
| 314 DISALLOW_COPY_AND_ASSIGN(FormStructure); | 319 DISALLOW_COPY_AND_ASSIGN(FormStructure); |
| 315 }; | 320 }; |
| 316 | 321 |
| 317 } // namespace autofill | 322 } // namespace autofill |
| 318 | 323 |
| 319 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_ | 324 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_ |
| OLD | NEW |