Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Unified Diff: components/autofill/core/browser/autofill_metrics.h

Issue 2849753002: Logs all reasons card upload was not offered in UKM and UMA. (Closed)
Patch Set: Encodes enum metrics as bitmask. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/autofill/core/browser/autofill_metrics.h
diff --git a/components/autofill/core/browser/autofill_metrics.h b/components/autofill/core/browser/autofill_metrics.h
index ac50c90e59d8e6c4efb4dc79b92b03dc1c7722c0..9810bc4c6c21742300290100c83ec3e7b4ae71eb 100644
--- a/components/autofill/core/browser/autofill_metrics.h
+++ b/components/autofill/core/browser/autofill_metrics.h
@@ -95,8 +95,10 @@ class AutofillMetrics {
};
enum CardUploadDecisionMetric {
- // All the required conditions were satisfied and the card upload prompt was
- // triggered.
+ // Card upload prompt was triggered either because all the conditions were
+ // automatically satisfied or because we can potentially fix fields to
+ // satisfy some conditions. For example, requesting user to input CVC when
+ // CVC was missing. See |UPLOAD_OFFERED_NO_CVC|.
UPLOAD_OFFERED,
// No CVC was detected. We don't know whether any addresses were available
// nor whether we would have been able to get upload details.
@@ -128,6 +130,9 @@ class AutofillMetrics {
// No CVC was detected, but valid addresses and names were. Upload is still
// possible if the user manually enters CVC, so upload was offered.
UPLOAD_OFFERED_NO_CVC,
+ // One or more of the required conditions were not satisfied and the card
+ // upload prompt was not triggered.
+ UPLOAD_NOT_OFFERED,
NUM_CARD_UPLOAD_DECISION_METRICS,
};
@@ -804,19 +809,19 @@ class AutofillMetrics {
// suggestion to show an explanation of the warning.
static void LogShowedHttpNotSecureExplanation();
- // Logs the card upload decision ukm based on the specified |url| and
- // |upload_decision|.
- static void LogCardUploadDecisionUkm(
- ukm::UkmService* ukm_service,
- const GURL& url,
- AutofillMetrics::CardUploadDecisionMetric upload_decision);
+ // Logs the card upload decisions ukm for the specified |url|.
+ // |upload_decision_metrics| is a bitmask of
+ // |AutofillMetrics::CardUploadDecisionMetric|.
+ static void LogCardUploadDecisionsUkm(ukm::UkmService* ukm_service,
+ const GURL& url,
+ int upload_decision_metrics);
// Logs the developer engagement ukm for the specified |url| and autofill
- // fields in the form structure.
- static void LogDeveloperEngagementUkm(
- ukm::UkmService* ukm_service,
- const GURL& url,
- std::vector<AutofillMetrics::DeveloperEngagementMetric> metrics);
+ // fields in the form structure. |developer_engagement_metrics| is a bitmask
+ // of |AutofillMetrics::DeveloperEngagementMetric|.
+ static void LogDeveloperEngagementUkm(ukm::UkmService* ukm_service,
+ const GURL& url,
+ int developer_engagement_metrics);
// Logs the the |ukm_entry_name| with the specified |url| and the specified
// |metrics|. Returns whether the ukm was sucessfully logged.

Powered by Google App Engine
This is Rietveld 408576698