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

Unified Diff: components/payments/content/payment_request.cc

Issue 2870153002: [Payments] Record navigations that close the Payment Request as aborts. (Closed)
Patch Set: 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 68da7ff714a86963414c53c99fe4d04bb5fcbb54..30f69f3d235e0a14f5985bdd121b4ef436dfca3b 100644
--- a/components/payments/content/payment_request.cc
+++ b/components/payments/content/payment_request.cc
@@ -193,12 +193,20 @@ void PaymentRequest::UserCancelled() {
manager_->DestroyRequest(this);
}
+void PaymentRequest::NavigatedAway(bool is_user_initiated) {
+ journey_logger_.RecordJourneyStatsHistograms(
+ is_user_initiated ? JourneyLogger::COMPLETION_STATUS_USER_ABORTED
+ : JourneyLogger::COMPLETION_STATUS_OTHER_ABORTED);
+}
+
void PaymentRequest::OnConnectionTerminated() {
// We are here because of a browser-side error, or likely as a result of the
// connection_error_handler on |binding_|, which can mean that the renderer
// has decided to close the pipe for various reasons (see all uses of
// PaymentRequest::clearResolversAndCloseMojoConnection() in Blink). We close
// the binding and the dialog, and ask to be deleted.
+ journey_logger_.RecordJourneyStatsHistograms(
+ JourneyLogger::COMPLETION_STATUS_OTHER_ABORTED);
Mathieu 2017/05/09 18:12:19 I don't think this line should be here, because it
sebsg 2017/05/10 14:58:48 I still feel like we should log something here. Wo
client_.reset();
binding_.Close();
delegate_->CloseDialog();

Powered by Google App Engine
This is Rietveld 408576698