Index: components/payments/core/journey_logger.cc |
diff --git a/components/payments/core/journey_logger.cc b/components/payments/core/journey_logger.cc |
index dc25cf6f1bf460dd3d7f797e7100f60d914ffbb8..4406d5961de151e340e0a041f11ae45beb008f02 100644 |
--- a/components/payments/core/journey_logger.cc |
+++ b/components/payments/core/journey_logger.cc |
@@ -67,10 +67,7 @@ std::string GetHistogramNameSuffix( |
JourneyLogger::JourneyLogger(bool is_incognito, |
const GURL& url, |
ukm::UkmService* ukm_service) |
- : was_can_make_payments_used_(false), |
- could_make_payment_(false), |
- was_show_called_(false), |
- is_incognito_(is_incognito), |
+ : is_incognito_(is_incognito), |
events_(EVENT_INITIATED), |
url_(url), |
ukm_service_(ukm_service) {} |
@@ -113,6 +110,13 @@ void JourneyLogger::SetEventOccurred(Event event) { |
void JourneyLogger::RecordJourneyStatsHistograms( |
CompletionStatus completion_status) { |
+ // TODO(crbug.com/717741): Replace if by DCHECK once we make sure it's not |
+ // called more than once. |
+ if (has_recorded_) |
+ return; |
+ |
+ has_recorded_ = true; |
+ |
RecordSectionSpecificStats(completion_status); |
// Record the CanMakePayment metrics based on whether the transaction was |