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

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

Issue 2917343003: Merge-60 [Payments] Move the SelectedPaymentMethod metric to native. (Closed)
Patch Set: Created 3 years, 6 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') | no next file » | 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 2e76c2248e9ccc83956c0c42fc5830b793a190bd..66344a896fb2f10733ae34e0be2e6e4fe474b62f 100644
--- a/components/payments/core/journey_logger.cc
+++ b/components/payments/core/journey_logger.cc
@@ -137,6 +137,11 @@ void JourneyLogger::SetEventOccurred(Event event) {
events_ |= event;
}
+void JourneyLogger::SetSelectedPaymentMethod(
+ SelectedPaymentMethod payment_method) {
+ payment_method_ = payment_method;
+}
+
void JourneyLogger::RecordJourneyStatsHistograms(
CompletionStatus completion_status) {
DCHECK(!has_recorded_);
@@ -144,6 +149,8 @@ void JourneyLogger::RecordJourneyStatsHistograms(
RecordCheckoutFlowMetrics();
+ RecordPaymentMethodMetric();
+
RecordSectionSpecificStats(completion_status);
// Record the CanMakePayment metrics based on whether the transaction was
@@ -170,6 +177,11 @@ void JourneyLogger::RecordCheckoutFlowMetrics() {
UMA_HISTOGRAM_BOOLEAN("PaymentRequest.CheckoutFunnel.SkippedShow", true);
}
+void JourneyLogger::RecordPaymentMethodMetric() {
+ base::UmaHistogramEnumeration("PaymentRequest.SelectedPaymentMethod",
+ payment_method_, SELECTED_PAYMENT_METHOD_MAX);
+}
+
void JourneyLogger::RecordSectionSpecificStats(
CompletionStatus completion_status) {
// Record whether the user had suggestions for each requested information.
« no previous file with comments | « components/payments/core/journey_logger.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698