1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
|
// 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[] =
"tracking_protection.tracking_protection_onboarding_status";
// Unsynced pref that indicates when the profile has been marked eligible for
// tracking protection.
inline constexpr char kTrackingProtectionEligibleSince[] =
"tracking_protection.tracking_protection_eligible_since";
// Unsynced pref that indicates when the profile has been onboarded onto
// tracking protection.
inline constexpr char kTrackingProtectionOnboardedSince[] =
"tracking_protection.tracking_protection_onboarded_since";
// Unsynced pref that indicates when the onboarding notice was last shown.
inline constexpr char kTrackingProtectionNoticeLastShown[] =
"tracking_protection.tracking_protection_notice_last_shown";
// Unsynced pref that indicates when the profile acknowledged the onboarding.
inline constexpr char kTrackingProtectionOnboardingAckedSince[] =
"tracking_protection.tracking_protection_onboarding_acked_since";
// 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[] =
"tracking_protection.tracking_protection_onboarding_acked";
// Unsynced pref that indicates the action taken to acknowledge the Onboarding
// Notice.
inline constexpr char kTrackingProtectionOnboardingAckAction[] =
"tracking_protection.tracking_protection_onboarding_ack_action";
// 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[] =
"tracking_protection.tracking_protection_silent_onboarding_status";
// Unsynced pref that indicates when the profile has been marked eligible for
// silent onboarding tracking protection control groups.
inline constexpr char kTrackingProtectionSilentEligibleSince[] =
"tracking_protection.tracking_protection_silent_eligible_since";
// Unsynced pref that indicates when the profile has been silently onboarded
// onto tracking protection control groups.
inline constexpr char kTrackingProtectionSilentOnboardedSince[] =
"tracking_protection.tracking_protection_silent_onboarded_since";
// 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[] =
"tracking_protection.block_all_3pc_toggle_enabled";
// 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[] =
"tracking_protection.allow_all_3pc_toggle_enabled";
// Synced enum that indicates the level of tracking protection the user has
// selected on the tracking protection page.
inline constexpr char kTrackingProtectionLevel[] =
"tracking_protection.tracking_protection_level";
// Unsynced boolean that indicates whether 3PCD tracking protection (prefs + UI)
// are enabled on the current device.
inline constexpr char kTrackingProtection3pcdEnabled[] =
"tracking_protection.tracking_protection_3pcd_enabled";
// Synced boolean that indicates whether the user has enabled IP protection
// using either the UI setting or enterprise policy.
inline constexpr char kIpProtectionEnabled[] =
"tracking_protection.ip_protection_enabled";
// Synced boolean that indicates whether the user has had their IP protection
// pref initialized. Used ONLY for Google dogfood.
inline constexpr char kIpProtectionInitializedByDogfood[] =
"tracking_protection.ip_protection_initialized_by_dogfood";
// Synced boolean that indicates whether the user has enabled the
// fingerprinting protection setting.
inline constexpr char kFingerprintingProtectionEnabled[] =
"tracking_protection.fingerprinting_protection_enabled";
// Whether to send the DNT header.
inline constexpr char kEnableDoNotTrack[] = "enable_do_not_track";
// Whether User Bypass 3PC exceptions have been migrated to Tracking Protection
// exceptions.
inline constexpr char kUserBypass3pcExceptionsMigrated[] =
"tracking_protection.user_bypass_3pc_exceptions_migrated";
} // 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 {
kStandard = 0,
kCustom = 1,
kMaxValue = kCustom,
};
// Different tracking protection onboarding statuses stored in the pref above.
enum class TrackingProtectionOnboardingStatus {
kIneligible = 0,
kEligible = 1,
kOnboarded = 2,
kRequested = 3,
kMaxValue = kRequested,
};
// Different tracking protection onboarding ack actions stored in the pref
// above.
enum class TrackingProtectionOnboardingAckAction {
// No Ack Action set
kNotSet = 0,
// Ack recorded through some other way
kOther = 1,
// Acked using the GotIt button
kGotIt = 2,
// Acked using the Settings button
kSettings = 3,
// Acked using the learnmore button.
kLearnMore = 4,
// Acked by clicking the close button/ESC/Swipe away.
kClosed = 5,
kMaxValue = kClosed,
};
void RegisterProfilePrefs(PrefRegistrySimple* registry);
} // namespace privacy_sandbox::tracking_protection
#endif // COMPONENTS_PRIVACY_SANDBOX_TRACKING_PROTECTION_PREFS_H_
|