#include "components/commerce/core/metrics/metrics_utils.h"
#include "base/metrics/histogram_functions.h"
#include "components/commerce/core/account_checker.h"
#include "components/commerce/core/commerce_feature_list.h"
#include "components/commerce/core/proto/price_tracking.pb.h"
#include "components/optimization_guide/core/optimization_guide_decision.h"
#include "components/optimization_guide/core/optimization_guide_permissions_util.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_recorder.h"
#include "url/gurl.h"
namespace commerce::metrics {
const char kPDPNavShoppingListEligibleHistogramName[] = …;
const char kPDPStateHistogramName[] = …;
const char kPDPStateWithLocalMetaName[] = …;
const char kShoppingListIneligibleHistogramName[] = …;
const char kPDPNavURLSize[] = …;
void RecordPDPStateToUma(ShoppingPDPState state) { … }
void RecordPDPNavShoppingListEligible(ShoppingPDPState state,
bool is_shopping_list_eligible) { … }
void RecordUrlSizeforPDP(
optimization_guide::OptimizationGuideDecision decision,
const optimization_guide::OptimizationMetadata& metadata,
const GURL& url) { … }
ShoppingPDPState ComputeStateForOptGuideResult(
optimization_guide::OptimizationGuideDecision decision,
const optimization_guide::OptimizationMetadata& metadata) { … }
void RecordPDPMetrics(optimization_guide::OptimizationGuideDecision decision,
const optimization_guide::OptimizationMetadata& metadata,
PrefService* pref_service,
bool is_off_the_record,
bool is_shopping_list_eligible,
const GURL& url) { … }
void RecordPDPStateWithLocalMeta(bool detected_by_server,
bool detected_by_client,
ukm::SourceId source_id) { … }
void RecordShoppingListIneligibilityReasons(
PrefService* pref_service,
commerce::AccountChecker* account_checker,
bool is_off_the_record,
bool supported_country) { … }
void RecordShoppingActionUKM(ukm::SourceId ukm_source_id,
ShoppingAction action) { … }
}