Chromium Code Reviews| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 88 enum AutofillFormSubmittedState { | 88 enum AutofillFormSubmittedState { |
| 89 NON_FILLABLE_FORM_OR_NEW_DATA, | 89 NON_FILLABLE_FORM_OR_NEW_DATA, |
| 90 FILLABLE_FORM_AUTOFILLED_ALL, | 90 FILLABLE_FORM_AUTOFILLED_ALL, |
| 91 FILLABLE_FORM_AUTOFILLED_SOME, | 91 FILLABLE_FORM_AUTOFILLED_SOME, |
| 92 FILLABLE_FORM_AUTOFILLED_NONE_DID_SHOW_SUGGESTIONS, | 92 FILLABLE_FORM_AUTOFILLED_NONE_DID_SHOW_SUGGESTIONS, |
| 93 FILLABLE_FORM_AUTOFILLED_NONE_DID_NOT_SHOW_SUGGESTIONS, | 93 FILLABLE_FORM_AUTOFILLED_NONE_DID_NOT_SHOW_SUGGESTIONS, |
| 94 AUTOFILL_FORM_SUBMITTED_STATE_ENUM_SIZE, | 94 AUTOFILL_FORM_SUBMITTED_STATE_ENUM_SIZE, |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 enum CardUploadDecisionMetric { | 97 enum CardUploadDecisionMetric { |
| 98 // All the required conditions were satisfied and the card upload prompt was | 98 // All the required conditions were satisfied using either the form fields |
| 99 // triggered. | 99 // or we prompted the user to fix one or more conditions in the card upload |
| 100 // prompt. | |
| 100 UPLOAD_OFFERED = 1 << 0, | 101 UPLOAD_OFFERED = 1 << 0, |
| 101 // No CVC was detected. We don't know whether any addresses were available | 102 // CVC field was not found in the form. |
| 102 // nor whether we would have been able to get upload details. | 103 CVC_FIELD_NOT_FOUND = 1 << 1, |
|
sebsg
2017/05/05 15:15:31
Please see the comment I wrote in the histograms p
csashi
2017/05/05 16:29:55
Acknowledged. That comment looks correct to me eve
sebsg
2017/05/05 16:46:30
Oh sorry it was not about the comment, it was abou
| |
| 103 UPLOAD_NOT_OFFERED_NO_CVC = 1 << 1, | 104 // CVC field was found, but field did not have a value. |
| 105 CVC_VALUE_NOT_FOUND = 1 << 2, | |
| 106 // CVC field had a value, but it was not valid for the card network. | |
| 107 INVALID_CVC_VALUE = 1 << 3, | |
| 104 // A CVC was detected but no recently created or used address was available. | 108 // A CVC was detected but no recently created or used address was available. |
| 105 // 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. |
| 106 UPLOAD_NOT_OFFERED_NO_ADDRESS = 1 << 2, | 110 UPLOAD_NOT_OFFERED_NO_ADDRESS = 1 << 4, |
| 107 // A CVC and one or more addresses were available but no name was found on | 111 // A CVC and one or more addresses were available but no name was found on |
| 108 // either the card or the adress(es). We don't know whether the address(es) | 112 // either the card or the address(es). We don't know whether the address(es) |
| 109 // were otherwise valid nor whether we would have been able to get upload | 113 // were otherwise valid nor whether we would have been able to get upload |
| 110 // details. | 114 // details. |
| 111 UPLOAD_NOT_OFFERED_NO_NAME = 1 << 3, | 115 UPLOAD_NOT_OFFERED_NO_NAME = 1 << 5, |
| 112 // A CVC, multiple addresses, and a name were available but the adresses had | 116 // A CVC, multiple addresses, and a name were available but the addresses |
| 117 // had | |
| 113 // conflicting zip codes. We don't know whether we would have been able to | 118 // conflicting zip codes. We don't know whether we would have been able to |
| 114 // get upload details. | 119 // get upload details. |
| 115 UPLOAD_NOT_OFFERED_CONFLICTING_ZIPS = 1 << 4, | 120 UPLOAD_NOT_OFFERED_CONFLICTING_ZIPS = 1 << 6, |
| 116 // A CVC, one or more addresses, and a name were available but no zip code | 121 // A CVC, one or more addresses, and a name were available but no zip code |
| 117 // was found on any of the adress(es). We don't know whether we would have | 122 // was found on any of the address(es). We don't know whether we would have |
| 118 // been able to get upload details. | 123 // been able to get upload details. |
| 119 UPLOAD_NOT_OFFERED_NO_ZIP_CODE = 1 << 5, | 124 UPLOAD_NOT_OFFERED_NO_ZIP_CODE = 1 << 7, |
| 120 // A CVC, one or more valid addresses, and a name were available but the | |
| 121 // request to Payments for upload details failed. | |
| 122 UPLOAD_NOT_OFFERED_GET_UPLOAD_DETAILS_FAILED = 1 << 6, | |
| 123 // A CVC and one or more addresses were available but the names on the card | 125 // A CVC and one or more addresses were available but the names on the card |
| 124 // and/or the addresses didn't match. We don't know whether the address(es) | 126 // and/or the addresses didn't match. We don't know whether the address(es) |
| 125 // were otherwise valid nor whether we would have been able to get upload | 127 // were otherwise valid nor whether we would have been able to get upload |
| 126 // details. | 128 // details. |
| 127 UPLOAD_NOT_OFFERED_CONFLICTING_NAMES = 1 << 7, | 129 UPLOAD_NOT_OFFERED_CONFLICTING_NAMES = 1 << 8, |
| 128 // No CVC was detected, but valid addresses and names were. Upload is still | 130 // A CVC, one or more valid addresses, and a name were available but the |
| 129 // possible if the user manually enters CVC, so upload was offered. | 131 // request to Payments for upload details failed. |
| 130 UPLOAD_OFFERED_NO_CVC = 1 << 8, | 132 UPLOAD_NOT_OFFERED_GET_UPLOAD_DETAILS_FAILED = 1 << 9, |
| 131 // Update |kNumCardUploadDecisionMetrics| when adding new enum here. | 133 // Update |kNumCardUploadDecisionMetrics| when adding new enum here. |
| 132 }; | 134 }; |
| 133 | 135 |
| 134 enum DeveloperEngagementMetric { | 136 enum DeveloperEngagementMetric { |
| 135 // Parsed a form that is potentially autofillable and does not contain any | 137 // Parsed a form that is potentially autofillable and does not contain any |
| 136 // web developer-specified field type hint. | 138 // web developer-specified field type hint. |
| 137 FILLABLE_FORM_PARSED_WITHOUT_TYPE_HINTS = 0, | 139 FILLABLE_FORM_PARSED_WITHOUT_TYPE_HINTS = 0, |
| 138 // Parsed a form that is potentially autofillable and contains at least one | 140 // Parsed a form that is potentially autofillable and contains at least one |
| 139 // web developer-specified field type hint, a la | 141 // web developer-specified field type hint, a la |
| 140 // http://is.gd/whatwg_autocomplete | 142 // http://is.gd/whatwg_autocomplete |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 879 bool logged_suggestion_filled_was_masked_server_card_; | 881 bool logged_suggestion_filled_was_masked_server_card_; |
| 880 | 882 |
| 881 // The last field that was polled for suggestions. | 883 // The last field that was polled for suggestions. |
| 882 FormFieldData last_polled_field_; | 884 FormFieldData last_polled_field_; |
| 883 | 885 |
| 884 FormInteractionsUkmLogger* | 886 FormInteractionsUkmLogger* |
| 885 form_interactions_ukm_logger_; // Weak reference. | 887 form_interactions_ukm_logger_; // Weak reference. |
| 886 }; | 888 }; |
| 887 | 889 |
| 888 private: | 890 private: |
| 889 static const int kNumCardUploadDecisionMetrics = 9; | 891 static const int kNumCardUploadDecisionMetrics = 10; |
| 890 | 892 |
| 891 DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics); | 893 DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics); |
| 892 }; | 894 }; |
| 893 | 895 |
| 894 } // namespace autofill | 896 } // namespace autofill |
| 895 | 897 |
| 896 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ | 898 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ |
| OLD | NEW |