#include "third_party/blink/public/common/privacy_budget/identifiability_study_settings.h"
#include <initializer_list>
#include <optional>
#include <random>
#include "base/check.h"
#include "base/compiler_specific.h"
#include "base/no_destructor.h"
#include "base/synchronization/atomic_flag.h"
#include "base/threading/sequence_local_storage_slot.h"
#include "base/trace_event/common/trace_event_common.h"
#include "base/trace_event/trace_event.h"
#include "third_party/blink/public/common/privacy_budget/identifiability_study_settings_provider.h"
#include "third_party/blink/public/common/privacy_budget/identifiable_surface.h"
namespace blink {
namespace {
bool IdentifiabilityTracingEnabled() { … }
class ThreadsafeSettingsWrapper { … };
}
IdentifiabilityStudySettingsProvider::~IdentifiabilityStudySettingsProvider() =
default;
IdentifiabilityStudySettings::IdentifiabilityStudySettings() = default;
IdentifiabilityStudySettings::IdentifiabilityStudySettings(
std::unique_ptr<IdentifiabilityStudySettingsProvider> provider)
: … { … }
IdentifiabilityStudySettings::~IdentifiabilityStudySettings() = default;
const IdentifiabilityStudySettings* IdentifiabilityStudySettings::Get() { … }
void IdentifiabilityStudySettings::SetGlobalProvider(
std::unique_ptr<IdentifiabilityStudySettingsProvider> provider) { … }
void IdentifiabilityStudySettings::ResetStateForTesting() { … }
bool IdentifiabilityStudySettings::IsActive() const { … }
bool IdentifiabilityStudySettings::ShouldSampleWebFeature(
mojom::WebFeature feature) const { … }
bool IdentifiabilityStudySettings::ShouldSampleSurface(
IdentifiableSurface surface) const { … }
bool IdentifiabilityStudySettings::ShouldSampleType(
IdentifiableSurface::Type type) const { … }
bool IdentifiabilityStudySettings::ShouldSampleAnyType(
std::initializer_list<IdentifiableSurface::Type> types) const { … }
bool IdentifiabilityStudySettings::ShouldSampleAnything() const { … }
}