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

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

Issue 2870153002: [Payments] Record navigations that close the Payment Request as aborts. (Closed)
Patch Set: Fixed Windows error 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.h
diff --git a/components/payments/content/payment_request.h b/components/payments/content/payment_request.h
index 4613add27328af0b17270804ab8cdfe4fca24a78..f29c0c2106a8dad25fd4484e3731136723f641e0 100644
--- a/components/payments/content/payment_request.h
+++ b/components/payments/content/payment_request.h
@@ -79,6 +79,10 @@ class PaymentRequest : public mojom::PaymentRequest,
// OnConnectionTerminated).
void UserCancelled();
+ // Called when the frame attached to this PaymentRequest is navigating away,
+ // but before the PaymentRequest is destroyed.
+ void DidStartNavigation(bool is_user_initiated);
+
// As a result of a browser-side error or renderer-initiated mojo channel
// closure (e.g. there was an error on the renderer side, or payment was
// successful), this method is called. It is responsible for cleaning up,
@@ -94,6 +98,9 @@ class PaymentRequest : public mojom::PaymentRequest,
PaymentRequestState* state() { return state_.get(); }
private:
+ void RecordFirstCompletionStatus(
+ JourneyLogger::CompletionStatus completion_status);
+
content::WebContents* web_contents_;
std::unique_ptr<PaymentRequestDelegate> delegate_;
// |manager_| owns this PaymentRequest.
@@ -113,6 +120,8 @@ class PaymentRequest : public mojom::PaymentRequest,
JourneyLogger journey_logger_;
+ bool has_recorded_abort_reason_ = false;
+
DISALLOW_COPY_AND_ASSIGN(PaymentRequest);
};

Powered by Google App Engine
This is Rietveld 408576698