| 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_AUTOFILL_METRICS_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 // All the required conditions were satisfied using either the form fields | 98 // All the required conditions were satisfied using either the form fields |
| 99 // or we prompted the user to fix one or more conditions in the card upload | 99 // or we prompted the user to fix one or more conditions in the card upload |
| 100 // prompt. | 100 // prompt. |
| 101 UPLOAD_OFFERED = 1 << 0, | 101 UPLOAD_OFFERED = 1 << 0, |
| 102 // CVC field was not found in the form. | 102 // CVC field was not found in the form. |
| 103 CVC_FIELD_NOT_FOUND = 1 << 1, | 103 CVC_FIELD_NOT_FOUND = 1 << 1, |
| 104 // CVC field was found, but field did not have a value. | 104 // CVC field was found, but field did not have a value. |
| 105 CVC_VALUE_NOT_FOUND = 1 << 2, | 105 CVC_VALUE_NOT_FOUND = 1 << 2, |
| 106 // CVC field had a value, but it was not valid for the card network. | 106 // CVC field had a value, but it was not valid for the card network. |
| 107 INVALID_CVC_VALUE = 1 << 3, | 107 INVALID_CVC_VALUE = 1 << 3, |
| 108 // A CVC was detected but no recently created or used address was available. | 108 // No recently created or recently used address profile was available. |
| 109 // We don't know whether we would have been able to get upload details. | 109 // We don't know whether we would have been able to get upload details. |
| 110 UPLOAD_NOT_OFFERED_NO_ADDRESS = 1 << 4, | 110 UPLOAD_NOT_OFFERED_NO_RECENTLY_USED_ADDRESS = 1 << 4, |
| 111 // A CVC and one or more addresses were available but no name was found on | 111 // No address profile was available. |
| 112 // either the card or the address(es). We don't know whether the address(es) | 112 // We don't know whether we would have been able to get upload details. |
| 113 // were otherwise valid nor whether we would have been able to get upload | 113 UPLOAD_NOT_OFFERED_NO_ADDRESS_PROFILE = 1 << 5, |
| 114 // details. | 114 // One or more recently used addresses were available but no name was found |
| 115 UPLOAD_NOT_OFFERED_NO_NAME = 1 << 5, | 115 // on either the card or the address(es). We don't know whether the |
| 116 // A CVC, multiple addresses, and a name were available but the addresses | 116 // address(es) were otherwise valid nor whether we would have been able to |
| 117 // had | |
| 118 // conflicting zip codes. We don't know whether we would have been able to | |
| 119 // get upload details. | 117 // get upload details. |
| 120 UPLOAD_NOT_OFFERED_CONFLICTING_ZIPS = 1 << 6, | 118 UPLOAD_NOT_OFFERED_NO_NAME = 1 << 6, |
| 121 // A CVC, one or more addresses, and a name were available but no zip code | 119 // Multiple recently used addresses were available but the addresses had |
| 122 // was found on any of the address(es). We don't know whether we would have | 120 // conflicting zip codes.We don't know whether we would have been able to |
| 121 // get upload details. |
| 122 UPLOAD_NOT_OFFERED_CONFLICTING_ZIPS = 1 << 7, |
| 123 // One or more recently used addresses were available but no zip code was |
| 124 // found on any of the address(es). We don't know whether we would have |
| 123 // been able to get upload details. | 125 // been able to get upload details. |
| 124 UPLOAD_NOT_OFFERED_NO_ZIP_CODE = 1 << 7, | 126 UPLOAD_NOT_OFFERED_NO_ZIP_CODE = 1 << 8, |
| 125 // A CVC and one or more addresses were available but the names on the card | 127 // One or more recently used addresses were available but the names on the |
| 126 // and/or the addresses didn't match. We don't know whether the address(es) | 128 // card and/or the addresses didn't match. We don't know whether the |
| 127 // were otherwise valid nor whether we would have been able to get upload | 129 // address(es) were otherwise valid nor whether we would have been able to |
| 128 // details. | 130 // get upload details. |
| 129 UPLOAD_NOT_OFFERED_CONFLICTING_NAMES = 1 << 8, | 131 UPLOAD_NOT_OFFERED_CONFLICTING_NAMES = 1 << 9, |
| 130 // A CVC, one or more valid addresses, and a name were available but the | 132 // One or more valid addresses, and a name were available but the request to |
| 131 // request to Payments for upload details failed. | 133 // Payments for upload details failed. |
| 132 UPLOAD_NOT_OFFERED_GET_UPLOAD_DETAILS_FAILED = 1 << 9, | 134 UPLOAD_NOT_OFFERED_GET_UPLOAD_DETAILS_FAILED = 1 << 10, |
| 133 // Update |kNumCardUploadDecisionMetrics| when adding new enum here. | 135 // Update |kNumCardUploadDecisionMetrics| when adding new enum here. |
| 134 }; | 136 }; |
| 135 | 137 |
| 136 enum DeveloperEngagementMetric { | 138 enum DeveloperEngagementMetric { |
| 137 // Parsed a form that is potentially autofillable and does not contain any | 139 // Parsed a form that is potentially autofillable and does not contain any |
| 138 // web developer-specified field type hint. | 140 // web developer-specified field type hint. |
| 139 FILLABLE_FORM_PARSED_WITHOUT_TYPE_HINTS = 0, | 141 FILLABLE_FORM_PARSED_WITHOUT_TYPE_HINTS = 0, |
| 140 // Parsed a form that is potentially autofillable and contains at least one | 142 // Parsed a form that is potentially autofillable and contains at least one |
| 141 // web developer-specified field type hint, a la | 143 // web developer-specified field type hint, a la |
| 142 // http://is.gd/whatwg_autocomplete | 144 // http://is.gd/whatwg_autocomplete |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 bool logged_suggestion_filled_was_masked_server_card_; | 883 bool logged_suggestion_filled_was_masked_server_card_; |
| 882 | 884 |
| 883 // The last field that was polled for suggestions. | 885 // The last field that was polled for suggestions. |
| 884 FormFieldData last_polled_field_; | 886 FormFieldData last_polled_field_; |
| 885 | 887 |
| 886 FormInteractionsUkmLogger* | 888 FormInteractionsUkmLogger* |
| 887 form_interactions_ukm_logger_; // Weak reference. | 889 form_interactions_ukm_logger_; // Weak reference. |
| 888 }; | 890 }; |
| 889 | 891 |
| 890 private: | 892 private: |
| 891 static const int kNumCardUploadDecisionMetrics = 10; | 893 static const int kNumCardUploadDecisionMetrics = 11; |
| 892 | 894 |
| 893 DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics); | 895 DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics); |
| 894 }; | 896 }; |
| 895 | 897 |
| 896 } // namespace autofill | 898 } // namespace autofill |
| 897 | 899 |
| 898 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ | 900 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ |
| OLD | NEW |