| 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 <memory> | 10 #include <memory> |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 const base::TimeTicks& interaction_time, | 140 const base::TimeTicks& interaction_time, |
| 141 const base::TimeTicks& submission_time, | 141 const base::TimeTicks& submission_time, |
| 142 rappor::RapporServiceImpl* rappor_service, | 142 rappor::RapporServiceImpl* rappor_service, |
| 143 AutofillMetrics::FormInteractionsUkmLogger* form_interactions_ukm_logger, | 143 AutofillMetrics::FormInteractionsUkmLogger* form_interactions_ukm_logger, |
| 144 bool did_show_suggestions, | 144 bool did_show_suggestions, |
| 145 bool observed_submission) const; | 145 bool observed_submission) const; |
| 146 | 146 |
| 147 // Log the quality of the heuristics and server predictions for this form | 147 // Log the quality of the heuristics and server predictions for this form |
| 148 // structure, if autocomplete attributes are present on the fields (they are | 148 // structure, if autocomplete attributes are present on the fields (they are |
| 149 // used as golden truths). | 149 // used as golden truths). |
| 150 void LogQualityMetricsBasedOnAutocomplete() const; | 150 void LogQualityMetricsBasedOnAutocomplete( |
| 151 AutofillMetrics::FormInteractionsUkmLogger* form_interactions_ukm_logger) |
| 152 const; |
| 151 | 153 |
| 152 // Classifies each field in |fields_| based upon its |autocomplete| attribute, | 154 // Classifies each field in |fields_| based upon its |autocomplete| attribute, |
| 153 // if the attribute is available. The association is stored into the field's | 155 // if the attribute is available. The association is stored into the field's |
| 154 // |heuristic_type|. | 156 // |heuristic_type|. |
| 155 // Fills |has_author_specified_types_| with |true| if the attribute is | 157 // Fills |has_author_specified_types_| with |true| if the attribute is |
| 156 // available and neither empty nor set to the special values "on" or "off" for | 158 // available and neither empty nor set to the special values "on" or "off" for |
| 157 // at least one field. | 159 // at least one field. |
| 158 // Fills |has_author_specified_sections_| with |true| if the attribute | 160 // Fills |has_author_specified_sections_| with |true| if the attribute |
| 159 // specifies a section for at least one field. | 161 // specifies a section for at least one field. |
| 160 void ParseFieldTypesFromAutocompleteAttributes(); | 162 void ParseFieldTypesFromAutocompleteAttributes(); |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 // The unique signature for this form, composed of the target url domain, | 344 // The unique signature for this form, composed of the target url domain, |
| 343 // the form name, and the form field names in a 64-bit hash. | 345 // the form name, and the form field names in a 64-bit hash. |
| 344 FormSignature form_signature_; | 346 FormSignature form_signature_; |
| 345 | 347 |
| 346 DISALLOW_COPY_AND_ASSIGN(FormStructure); | 348 DISALLOW_COPY_AND_ASSIGN(FormStructure); |
| 347 }; | 349 }; |
| 348 | 350 |
| 349 } // namespace autofill | 351 } // namespace autofill |
| 350 | 352 |
| 351 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_ | 353 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_FORM_STRUCTURE_H_ |
| OLD | NEW |