#ifndef COMPONENTS_COMMERCE_CORE_METRICS_METRICS_UTILS_H_
#define COMPONENTS_COMMERCE_CORE_METRICS_METRICS_UTILS_H_
#include "components/optimization_guide/core/optimization_guide_util.h"
#include "components/optimization_guide/core/optimization_metadata.h"
#include "components/optimization_guide/proto/hints.pb.h"
#include "components/prefs/pref_service.h"
#include "services/metrics/public/cpp/ukm_source_id.h"
class GURL;
namespace commerce {
class AccountChecker;
}
namespace commerce::metrics {
extern const char kPDPNavShoppingListEligibleHistogramName[];
extern const char kPDPStateHistogramName[];
extern const char kPDPStateWithLocalMetaName[];
extern const char kShoppingListIneligibleHistogramName[];
enum class ShoppingPDPState { … };
enum class ShoppingPDPDetectionMethod { … };
enum class ShoppingFeatureIneligibilityReason { … };
enum class ShoppingAction { … };
enum class ShoppingContextualFeature { … };
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,
AccountChecker* account_checker,
bool is_off_the_record,
bool supported_country);
void RecordShoppingActionUKM(ukm::SourceId ukm_source_id,
ShoppingAction action);
}
#endif