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

Side by Side Diff: components/payments/core/journey_logger.cc

Issue 2929133004: Merge-60 [Payments] Record abort reasons on desktop. (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 unified diff | Download patch
« no previous file with comments | « components/payments/core/journey_logger.h ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #include "components/payments/core/journey_logger.h" 5 #include "components/payments/core/journey_logger.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/metrics/histogram_functions.h" 9 #include "base/metrics/histogram_functions.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 void JourneyLogger::SetCompleted() { 109 void JourneyLogger::SetCompleted() {
110 UMA_HISTOGRAM_BOOLEAN("PaymentRequest.CheckoutFunnel.Completed", true); 110 UMA_HISTOGRAM_BOOLEAN("PaymentRequest.CheckoutFunnel.Completed", true);
111 111
112 RecordJourneyStatsHistograms(COMPLETION_STATUS_COMPLETED); 112 RecordJourneyStatsHistograms(COMPLETION_STATUS_COMPLETED);
113 } 113 }
114 114
115 void JourneyLogger::SetAborted(AbortReason reason) { 115 void JourneyLogger::SetAborted(AbortReason reason) {
116 base::UmaHistogramEnumeration("PaymentRequest.CheckoutFunnel.Aborted", reason, 116 base::UmaHistogramEnumeration("PaymentRequest.CheckoutFunnel.Aborted", reason,
117 ABORT_REASON_MAX); 117 ABORT_REASON_MAX);
118 118
119 if (reason == ABORT_REASON_ABORTED_BY_USER) 119 if (reason == ABORT_REASON_ABORTED_BY_USER ||
120 reason == ABORT_REASON_USER_NAVIGATION)
120 RecordJourneyStatsHistograms(COMPLETION_STATUS_USER_ABORTED); 121 RecordJourneyStatsHistograms(COMPLETION_STATUS_USER_ABORTED);
121 else 122 else
122 RecordJourneyStatsHistograms(COMPLETION_STATUS_OTHER_ABORTED); 123 RecordJourneyStatsHistograms(COMPLETION_STATUS_OTHER_ABORTED);
123 } 124 }
124 125
125 #ifdef OS_ANDROID 126 #ifdef OS_ANDROID
126 void JourneyLogger::SetNotShown(NotShownReason reason) { 127 void JourneyLogger::SetNotShown(NotShownReason reason) {
127 base::UmaHistogramEnumeration("PaymentRequest.CheckoutFunnel.NoShow", reason, 128 base::UmaHistogramEnumeration("PaymentRequest.CheckoutFunnel.NoShow", reason,
128 NOT_SHOWN_REASON_MAX); 129 NOT_SHOWN_REASON_MAX);
129 130
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 ukm_recorder_->UpdateSourceURL(source_id, url_); 311 ukm_recorder_->UpdateSourceURL(source_id, url_);
311 std::unique_ptr<ukm::UkmEntryBuilder> builder = 312 std::unique_ptr<ukm::UkmEntryBuilder> builder =
312 ukm_recorder_->GetEntryBuilder(source_id, 313 ukm_recorder_->GetEntryBuilder(source_id,
313 internal::kUKMCheckoutEventsEntryName); 314 internal::kUKMCheckoutEventsEntryName);
314 builder->AddMetric(internal::kUKMCompletionStatusMetricName, 315 builder->AddMetric(internal::kUKMCompletionStatusMetricName,
315 completion_status); 316 completion_status);
316 builder->AddMetric(internal::kUKMEventsMetricName, events_); 317 builder->AddMetric(internal::kUKMEventsMetricName, events_);
317 } 318 }
318 319
319 } // namespace payments 320 } // namespace payments
OLDNEW
« no previous file with comments | « components/payments/core/journey_logger.h ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698