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

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

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/content/payment_request.cc ('k') | components/payments/core/journey_logger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/payments/core/journey_logger.h
diff --git a/components/payments/core/journey_logger.h b/components/payments/core/journey_logger.h
index 201602c726c097991b5c44b4904ece1349c0ce77..711e585d3d0d9e7bc82744ffa6a8cc6cfde805c2 100644
--- a/components/payments/core/journey_logger.h
+++ b/components/payments/core/journey_logger.h
@@ -69,6 +69,29 @@ class JourneyLogger {
EVENT_ENUM_MAX = 16,
};
+ enum AbortReason {
+ ABORT_REASON_ABORTED_BY_USER = 0,
+ ABORT_REASON_ABORTED_BY_MERCHANT = 1,
+ ABORT_REASON_INVALID_DATA_FROM_RENDERER = 2,
+ ABORT_REASON_MOJO_CONNECTION_ERROR = 3,
+ ABORT_REASON_MOJO_RENDERER_CLOSING = 4,
+ ABORT_REASON_INSTRUMENT_DETAILS_ERROR = 5,
+ ABORT_REASON_NO_MATCHING_PAYMENT_METHOD = 6, // Deprecated.
+ ABORT_REASON_NO_SUPPORTED_PAYMENT_METHOD = 7, // Deprecated.
+ ABORT_REASON_OTHER = 8,
+ ABORT_REASON_MAX,
+ };
+
+#ifdef OS_ANDROID
+ enum NotShownReason {
+ NOT_SHOWN_NO_MATCHING_PAYMENT_METHOD = 0,
+ NOT_SHOWN_NO_SUPPORTED_PAYMENT_METHOD = 1,
+ NOT_SHOWN_CONCURRENT_REQUESTS = 2,
+ NOT_SHOWN_REASON_OTHER = 3,
+ NOT_SHOWN_REASON_MAX = 4,
+ };
+#endif
+
// Used to mesure the impact of the CanMakePayment return value on whether the
// Payment Request is shown to the user.
static const int CMP_SHOW_COULD_NOT_MAKE_PAYMENT_AND_DID_NOT_SHOW = 0;
@@ -103,11 +126,19 @@ class JourneyLogger {
// Records that an event occurred.
void SetEventOccurred(Event event);
- // Records the histograms for all the sections that were requested by the
- // merchant and for the usage of the CanMakePayment method and its effect on
- // the transaction. This method should be called when the Payment Request has
- // either been completed or aborted.
- void RecordJourneyStatsHistograms(CompletionStatus completion_status);
+ // Records that the Payment Request was completed successfully, and starts the
+ // logging of all the journey metrics.
+ void SetCompleted();
+
+ // Records that the Payment Request was aborted along with the reason. Also
+ // starts the logging of all the journey metrics.
+ void SetAborted(AbortReason reason);
+
+#ifdef OS_ANDROID
+ // Records that the Payment Request was not shown to the user, along with the
+ // reason.
+ void SetNotShown(NotShownReason reason);
+#endif
private:
static const int NUMBER_OF_SECTIONS = 3;
@@ -136,6 +167,12 @@ class JourneyLogger {
bool is_requested_;
};
+ // Records the histograms for all the sections that were requested by the
+ // merchant and for the usage of the CanMakePayment method and its effect on
+ // the transaction. This method should be called when the Payment Request has
+ // either been completed or aborted.
+ void RecordJourneyStatsHistograms(CompletionStatus completion_status);
+
// Records the histograms for all the steps of a complete checkout flow that
// were reached.
void RecordCheckoutFlowMetrics();
« no previous file with comments | « components/payments/content/payment_request.cc ('k') | components/payments/core/journey_logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698