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

Unified Diff: components/payments/content/payment_request.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
Index: components/payments/content/payment_request.cc
diff --git a/components/payments/content/payment_request.cc b/components/payments/content/payment_request.cc
index 9e8950018cae22684c9d4d5bfb21a303f2d2b177..852d877f889932c288f0aa0fff98927d9600cc65 100644
--- a/components/payments/content/payment_request.cc
+++ b/components/payments/content/payment_request.cc
@@ -174,8 +174,7 @@ void PaymentRequest::Complete(mojom::PaymentComplete result) {
if (result != mojom::PaymentComplete::SUCCESS) {
delegate_->ShowErrorMessage();
} else {
- journey_logger_.RecordJourneyStatsHistograms(
- JourneyLogger::COMPLETION_STATUS_COMPLETED);
+ journey_logger_.SetCompleted();
delegate_->GetPrefService()->SetBoolean(kPaymentsFirstTransactionCompleted,
true);
// When the renderer closes the connection,
@@ -276,7 +275,12 @@ void PaymentRequest::RecordFirstCompletionStatus(
JourneyLogger::CompletionStatus completion_status) {
if (!has_recorded_abort_reason_) {
has_recorded_abort_reason_ = true;
- journey_logger_.RecordJourneyStatsHistograms(completion_status);
+ // TODO(crbug.com/716546): Record more abort reasons.
+ if (completion_status == JourneyLogger::COMPLETION_STATUS_USER_ABORTED) {
+ journey_logger_.SetAborted(JourneyLogger::ABORT_REASON_ABORTED_BY_USER);
+ } else {
+ journey_logger_.SetAborted(JourneyLogger::ABORT_REASON_OTHER);
+ }
}
}
« no previous file with comments | « chrome/browser/payments/android/journey_logger_android.cc ('k') | components/payments/core/journey_logger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698