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

Unified Diff: components/payments/core/journey_logger.cc

Issue 2899313002: [Payments] Move the logging for checkout flow to native. (Closed)
Patch Set: Addressed comments Created 3 years, 7 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
« no previous file with comments | « components/payments/core/journey_logger.h ('k') | components/payments/core/journey_logger_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/payments/core/journey_logger.cc
diff --git a/components/payments/core/journey_logger.cc b/components/payments/core/journey_logger.cc
index 986f7bcafc5b769384c51a8849fbc2b82c319e90..af815ccd203ec74af8f78ef08cf01088c44b2b09 100644
--- a/components/payments/core/journey_logger.cc
+++ b/components/payments/core/journey_logger.cc
@@ -106,6 +106,33 @@ void JourneyLogger::SetShowCalled() {
was_show_called_ = true;
}
+void JourneyLogger::SetCompleted() {
+ UMA_HISTOGRAM_BOOLEAN("PaymentRequest.CheckoutFunnel.Completed", true);
+
+ RecordJourneyStatsHistograms(COMPLETION_STATUS_COMPLETED);
+}
+
+void JourneyLogger::SetAborted(AbortReason reason) {
+ base::UmaHistogramEnumeration("PaymentRequest.CheckoutFunnel.Aborted", reason,
+ ABORT_REASON_MAX);
+
+ if (reason == ABORT_REASON_ABORTED_BY_USER)
+ RecordJourneyStatsHistograms(COMPLETION_STATUS_USER_ABORTED);
+ else
+ RecordJourneyStatsHistograms(COMPLETION_STATUS_OTHER_ABORTED);
+}
+
+#ifdef OS_ANDROID
+void JourneyLogger::SetNotShown(NotShownReason reason) {
+ base::UmaHistogramEnumeration("PaymentRequest.CheckoutFunnel.NoShow", reason,
+ NOT_SHOWN_REASON_MAX);
+
+ // Record that that Payment Request was initiated here, because nothing else
+ // will be recorded for a Payment Request that was not shown to the user.
+ UMA_HISTOGRAM_BOOLEAN("PaymentRequest.CheckoutFunnel.Initiated", true);
+}
+#endif
+
void JourneyLogger::SetEventOccurred(Event event) {
events_ |= event;
}
« no previous file with comments | « components/payments/core/journey_logger.h ('k') | components/payments/core/journey_logger_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698