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

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

Issue 2943433004: [Payments] Log multiple events in the journey logger. (Closed)
Patch Set: addressed comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/payments/payment_request_journey_logger_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/payments/content/payment_request.cc
diff --git a/components/payments/content/payment_request.cc b/components/payments/content/payment_request.cc
index 333af474cb41725326b8135478a3d33f3cc62699..75ae2bc83bbd3db157303f3fc5f726eeb3766480 100644
--- a/components/payments/content/payment_request.cc
+++ b/components/payments/content/payment_request.cc
@@ -140,6 +140,7 @@ void PaymentRequest::Show() {
}
journey_logger_.SetShowCalled();
+ journey_logger_.SetEventOccurred(JourneyLogger::EVENT_SHOWN);
journey_logger_.SetRequestedInformation(
spec_->request_shipping(), spec_->request_payer_email(),
spec_->request_payer_phone(), spec_->request_payer_name());
@@ -227,6 +228,8 @@ void PaymentRequest::CanMakePayment() {
void PaymentRequest::OnPaymentResponseAvailable(
mojom::PaymentResponsePtr response) {
+ journey_logger_.SetEventOccurred(
+ JourneyLogger::EVENT_RECEIVED_INSTRUMENT_DETAILS);
client_->OnPaymentResponse(std::move(response));
}
@@ -282,6 +285,7 @@ void PaymentRequest::OnConnectionTerminated() {
}
void PaymentRequest::Pay() {
+ journey_logger_.SetEventOccurred(JourneyLogger::EVENT_PAY_CLICKED);
journey_logger_.SetSelectedPaymentMethod(
JourneyLogger::SELECTED_PAYMENT_METHOD_CREDIT_CARD);
state_->GeneratePaymentResponse();
« no previous file with comments | « chrome/browser/ui/views/payments/payment_request_journey_logger_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698