| Index: components/payments/core/journey_logger.cc
|
| diff --git a/components/payments/core/journey_logger.cc b/components/payments/core/journey_logger.cc
|
| index 66344a896fb2f10733ae34e0be2e6e4fe474b62f..0ec4e3df51e08728840f521cee4f101529e71cfc 100644
|
| --- a/components/payments/core/journey_logger.cc
|
| +++ b/components/payments/core/journey_logger.cc
|
| @@ -142,6 +142,20 @@ void JourneyLogger::SetSelectedPaymentMethod(
|
| payment_method_ = payment_method;
|
| }
|
|
|
| +void JourneyLogger::SetRequestedInformation(bool requested_shipping,
|
| + bool requested_email,
|
| + bool requested_phone,
|
| + bool requested_name) {
|
| + // This method should only be called once per Payment Request.
|
| + DCHECK(requested_information_ == REQUESTED_INFORMATION_MAX);
|
| +
|
| + requested_information_ =
|
| + (requested_shipping ? REQUESTED_INFORMATION_SHIPPING : 0) |
|
| + (requested_email ? REQUESTED_INFORMATION_EMAIL : 0) |
|
| + (requested_phone ? REQUESTED_INFORMATION_PHONE : 0) |
|
| + (requested_name ? REQUESTED_INFORMATION_NAME : 0);
|
| +}
|
| +
|
| void JourneyLogger::RecordJourneyStatsHistograms(
|
| CompletionStatus completion_status) {
|
| DCHECK(!has_recorded_);
|
| @@ -151,6 +165,8 @@ void JourneyLogger::RecordJourneyStatsHistograms(
|
|
|
| RecordPaymentMethodMetric();
|
|
|
| + RecordRequestedInformationMetrics();
|
| +
|
| RecordSectionSpecificStats(completion_status);
|
|
|
| // Record the CanMakePayment metrics based on whether the transaction was
|
| @@ -182,6 +198,11 @@ void JourneyLogger::RecordPaymentMethodMetric() {
|
| payment_method_, SELECTED_PAYMENT_METHOD_MAX);
|
| }
|
|
|
| +void JourneyLogger::RecordRequestedInformationMetrics() {
|
| + UMA_HISTOGRAM_ENUMERATION("PaymentRequest.RequestedInformation",
|
| + requested_information_, REQUESTED_INFORMATION_MAX);
|
| +}
|
| +
|
| void JourneyLogger::RecordSectionSpecificStats(
|
| CompletionStatus completion_status) {
|
| // Record whether the user had suggestions for each requested information.
|
|
|