#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/payments/core/journey_logger.h"
#include <algorithm>
#include <vector>
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/notreached.h"
#include "base/strings/string_number_conversions.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_recorder.h"
#include "third_party/re2/src/re2/re2.h"
namespace payments {
namespace {
std::string GetHistogramNameSuffix(
int section,
JourneyLogger::CompletionStatus completion_status) { … }
bool ValidateExclusiveBitVector(const std::vector<bool>& bit_vector) { … }
}
JourneyLogger::JourneyLogger(ukm::SourceId payment_request_source_id)
: … { … }
JourneyLogger::~JourneyLogger() { … }
void JourneyLogger::SetNumberOfSuggestionsShown(Section section,
int number,
bool has_complete_suggestion) { … }
void JourneyLogger::SetEvent2Occurred(Event2 event) { … }
void JourneyLogger::SetOptOutOffered() { … }
void JourneyLogger::SetActivationlessShow() { … }
void JourneyLogger::SetSkippedShow() { … }
void JourneyLogger::SetShown() { … }
void JourneyLogger::SetPayClicked() { … }
void JourneyLogger::SetSelectedMethod(PaymentMethodCategory category) { … }
void JourneyLogger::SetRequestedInformation(bool requested_shipping,
bool requested_email,
bool requested_phone,
bool requested_name) { … }
void JourneyLogger::SetRequestedPaymentMethods(
const std::vector<PaymentMethodCategory>& methods) { … }
void JourneyLogger::SetCompleted() { … }
void JourneyLogger::SetAborted(AbortReason reason) { … }
void JourneyLogger::SetNotShown() { … }
void JourneyLogger::SetNoMatchingCredentialsShown() { … }
void JourneyLogger::RecordCheckoutStep(CheckoutFunnelStep step) { … }
void JourneyLogger::RecordJourneyStatsHistograms(
CompletionStatus completion_status) { … }
void JourneyLogger::RecordSectionSpecificStats(
CompletionStatus completion_status) { … }
void JourneyLogger::RecordEventsMetric(CompletionStatus completion_status) { … }
bool JourneyLogger::WasOccurred(Event2 event) const { … }
void JourneyLogger::ValidateEventBits() const { … }
bool JourneyLogger::WasPaymentRequestTriggered() { … }
void JourneyLogger::SetPaymentAppUkmSourceId(
ukm::SourceId payment_app_source_id) { … }
base::WeakPtr<JourneyLogger> JourneyLogger::GetWeakPtr() { … }
}