Chromium Code Reviews| Index: components/payments/core/journey_logger.cc |
| diff --git a/components/payments/core/journey_logger.cc b/components/payments/core/journey_logger.cc |
| index c7d08f2cf5d36bf09fa360e853b327ff09bf32e4..db1c516b87d0f3d3dc011f149c07544168afc0ed 100644 |
| --- a/components/payments/core/journey_logger.cc |
| +++ b/components/payments/core/journey_logger.cc |
| @@ -57,7 +57,8 @@ std::string GetHistogramNameSuffix( |
| JourneyLogger::JourneyLogger() |
| : was_can_make_payments_used_(false), |
| could_make_payment_(false), |
| - was_show_called_(false) {} |
| + was_show_called_(false), |
| + is_incognito_(false) {} |
| JourneyLogger::~JourneyLogger() {} |
| @@ -91,6 +92,10 @@ void JourneyLogger::SetShowCalled() { |
| was_show_called_ = true; |
| } |
| +void JourneyLogger::SetIsIncognito() { |
| + is_incognito_ = true; |
| +} |
| + |
| void JourneyLogger::RecordJourneyStatsHistograms( |
| CompletionStatus completion_status) { |
| RecordSectionSpecificStats(completion_status); |
| @@ -150,6 +155,11 @@ void JourneyLogger::RecordSectionSpecificStats( |
| void JourneyLogger::RecordCanMakePaymentStats( |
| CompletionStatus completion_status) { |
| + // CanMakePayment always returns true in incognito mode. Don't log the |
| + // metrics. |
|
Mathieu
2017/04/03 20:19:30
*metric
sebsg
2017/04/03 21:04:26
There are more than one :)
|
| + if (is_incognito_) |
| + return; |
| + |
| // Record CanMakePayment usage. |
| UMA_HISTOGRAM_ENUMERATION("PaymentRequest.CanMakePayment.Usage", |
| was_can_make_payments_used_ |