#include "chrome/browser/tpcd/support/origin_trial_service.h"
#include "base/metrics/histogram_functions.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/document_user_data.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/origin_trials_controller_delegate.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/storage_partition.h"
#include "net/base/features.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_recorder.h"
#include "services/network/public/mojom/cookie_manager.mojom.h"
namespace tpcd::trial {
namespace {
const char kTrialName[] = …;
bool IsSameSite(const GURL& url1, const GURL& url2) { … }
}
OriginTrialService::OriginTrialService(content::BrowserContext* browser_context)
: … { … }
OriginTrialService::~OriginTrialService() = default;
void OriginTrialService::Shutdown() { … }
void OriginTrialService::UpdateTopLevelTrialSettingsForTesting(
const url::Origin& origin,
bool match_subdomains,
bool enabled) { … }
void OriginTrialService::UpdateTopLevelTrialSettings(const url::Origin& origin,
bool match_subdomains,
bool enabled) { … }
void OriginTrialService::ClearTopLevelTrialSettings() { … }
void OriginTrialService::OnStatusChanged(
const content::OriginTrialStatusChangeDetails& details) { … }
void OriginTrialService::OnPersistedTokensCleared() { … }
std::string OriginTrialService::trial_name() { … }
}