chromium/components/privacy_sandbox/tracking_protection_prefs.h

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_PRIVACY_SANDBOX_TRACKING_PROTECTION_PREFS_H_
#define COMPONENTS_PRIVACY_SANDBOX_TRACKING_PROTECTION_PREFS_H_

class PrefRegistrySimple;

namespace prefs {
// Tracking protection Onboarding Prefs

// Onboarding

// Unsynced pref that indicates what status the profile is at with regards to
// tracking protections (3PCD Onboarding Notice).
inline constexpr char kTrackingProtectionOnboardingStatus[] =;

// Unsynced pref that indicates when the profile has been marked eligible for
// tracking protection.
inline constexpr char kTrackingProtectionEligibleSince[] =;

// Unsynced pref that indicates when the profile has been onboarded onto
// tracking protection.
inline constexpr char kTrackingProtectionOnboardedSince[] =;

// Unsynced pref that indicates when the onboarding notice was last shown.
inline constexpr char kTrackingProtectionNoticeLastShown[] =;

// Unsynced pref that indicates when the profile acknowledged the onboarding.
inline constexpr char kTrackingProtectionOnboardingAckedSince[] =;

// Unsynced boolean that indicates whether or not the user has acknowledged the
// onboarding message. This is kept separate from the onboardingStatus
// intentionally.
inline constexpr char kTrackingProtectionOnboardingAcked[] =;

// Unsynced pref that indicates the action taken to acknowledge the Onboarding
// Notice.
inline constexpr char kTrackingProtectionOnboardingAckAction[] =;

// Silent onboarding

// Unsynced pref that indicates what status the profile is at with regards to
// tracking protections (Silent Onboarding Notice for control groups).
inline constexpr char kTrackingProtectionSilentOnboardingStatus[] =;

// Unsynced pref that indicates when the profile has been marked eligible for
// silent onboarding tracking protection control groups.
inline constexpr char kTrackingProtectionSilentEligibleSince[] =;

// Unsynced pref that indicates when the profile has been silently onboarded
// onto tracking protection control groups.
inline constexpr char kTrackingProtectionSilentOnboardedSince[] =;

// Tracking Protection Settings Prefs.

// Synced boolean that indicates whether the "block all 3pc" toggle on the
// tracking protection page is enabled.
inline constexpr char kBlockAll3pcToggleEnabled[] =;

// Synced boolean that indicates whether 3PC are allowed for a user post-3PCD.
// Can only be set via the BlockThirdPartyCookies enterprise policy.
// Takes precedence over kBlockAll3pcToggleEnabled.
inline constexpr char kAllowAll3pcToggleEnabled[] =;

// Synced enum that indicates the level of tracking protection the user has
// selected on the tracking protection page.
inline constexpr char kTrackingProtectionLevel[] =;

// Unsynced boolean that indicates whether 3PCD tracking protection (prefs + UI)
// are enabled on the current device.
inline constexpr char kTrackingProtection3pcdEnabled[] =;

// Synced boolean that indicates whether the user has enabled IP protection
// using either the UI setting or enterprise policy.
inline constexpr char kIpProtectionEnabled[] =;

// Synced boolean that indicates whether the user has had their IP protection
// pref initialized. Used ONLY for Google dogfood.
inline constexpr char kIpProtectionInitializedByDogfood[] =;

// Synced boolean that indicates whether the user has enabled the
// fingerprinting protection setting.
inline constexpr char kFingerprintingProtectionEnabled[] =;

// Whether to send the DNT header.
inline constexpr char kEnableDoNotTrack[] =;

// Whether User Bypass 3PC exceptions have been migrated to Tracking Protection
// exceptions.
inline constexpr char kUserBypass3pcExceptionsMigrated[] =;

}  // namespace prefs

namespace privacy_sandbox::tracking_protection {

// Different levels of tracking protection available to the user.
// Values are persisted, don't renumber or reuse.
enum class TrackingProtectionLevel {};

// Different tracking protection onboarding statuses stored in the pref above.
enum class TrackingProtectionOnboardingStatus {};

// Different tracking protection onboarding ack actions stored in the pref
// above.
enum class TrackingProtectionOnboardingAckAction {};

void RegisterProfilePrefs(PrefRegistrySimple* registry);

}  // namespace privacy_sandbox::tracking_protection

#endif  // COMPONENTS_PRIVACY_SANDBOX_TRACKING_PROTECTION_PREFS_H_