#include "chrome/browser/tpcd/experiment/eligibility_service.h"
#include <optional>
#include "base/check.h"
#include "base/functional/bind.h"
#include "base/metrics/histogram_functions.h"
#include "chrome/browser/tpcd/experiment/eligibility_service_factory.h"
#include "chrome/browser/tpcd/experiment/experiment_manager.h"
#include "chrome/browser/tpcd/experiment/tpcd_experiment_features.h"
#include "components/privacy_sandbox/privacy_sandbox_settings.h"
#include "components/privacy_sandbox/tpcd_experiment_eligibility.h"
#include "components/privacy_sandbox/tracking_protection_onboarding.h"
#include "content/public/browser/cookie_deprecation_label_manager.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/common/content_features.h"
#include "services/network/public/mojom/network_context.mojom.h"
namespace tpcd::experiment {
inline void UmaHistogramProfileEligibilityMismatch(
bool is_profile_eligible,
bool is_client_in_experiment) { … }
EligibilityService::EligibilityService(
Profile* profile,
privacy_sandbox::TrackingProtectionOnboarding*
tracking_protection_onboarding,
privacy_sandbox::PrivacySandboxSettings* privacy_sandbox_settings,
ExperimentManager* experiment_manager)
: … { … }
EligibilityService::~EligibilityService() = default;
EligibilityService* EligibilityService::Get(Profile* profile) { … }
void EligibilityService::Shutdown() { … }
void EligibilityService::BroadcastProfileEligibility() { … }
void EligibilityService::MarkProfileEligibility(bool is_client_eligible) { … }
privacy_sandbox::TpcdExperimentEligibility
EligibilityService::ProfileEligibility() { … }
void EligibilityService::UpdateCookieDeprecationLabel() { … }
void EligibilityService::MaybeNotifyManagerTrackingProtectionOnboarded(
privacy_sandbox::TrackingProtectionOnboarding::OnboardingStatus
onboarding_status) { … }
void EligibilityService::MaybeNotifyManagerTrackingProtectionSilentOnboarded(
privacy_sandbox::TrackingProtectionOnboarding::SilentOnboardingStatus
onboarding_status) { … }
}