chromium/components/privacy_sandbox/privacy_sandbox_prefs.h

// Copyright 2020 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_PRIVACY_SANDBOX_PREFS_H_
#define COMPONENTS_PRIVACY_SANDBOX_PRIVACY_SANDBOX_PREFS_H_

class PrefRegistrySimple;

namespace prefs {

// Un-synced boolean pref indicating whether the consent decision was made.
inline constexpr char kPrivacySandboxM1ConsentDecisionMade[] =;

// Un-synced boolean pref indicating whether the notice was acknowledged.
inline constexpr char kPrivacySandboxM1EEANoticeAcknowledged[] =;

// Un-synced boolean pref indicating whether the notice shown in ROW was
// acknowledged.
inline constexpr char kPrivacySandboxM1RowNoticeAcknowledged[] =;

// Un-synced boolean pref indicating whether the restricted notice was
// acknowledged.
inline constexpr char kPrivacySandboxM1RestrictedNoticeAcknowledged[] =;

// Un-synced integer pref indicating PromptSuppressedReason for the prompt.
inline constexpr char kPrivacySandboxM1PromptSuppressed[] =;

// Un-synced boolean pref indicating if Topics API is enabled.
inline constexpr char kPrivacySandboxM1TopicsEnabled[] =;

// Un-synced boolean pref indicating if Fledge API is enabled.
inline constexpr char kPrivacySandboxM1FledgeEnabled[] =;

// Un-synced boolean pref indicating if Ad measurement API is enabled.
inline constexpr char kPrivacySandboxM1AdMeasurementEnabled[] =;

// Un-synced boolean pref indicating if the Privacy Sandbox was ever indicated
// as restricted by account capabilities.
inline constexpr char kPrivacySandboxM1Restricted[] =;

// The point in time from which history is eligible to be used when calculating
// a user's Topics API topics.
inline constexpr char kPrivacySandboxTopicsDataAccessibleSince[] =;

// List of entries representing Topics API topics which are blocked for
// the profile. Blocked topics cannot be provided to site, or considered as
// part of the profile's "top topics". Entries in the list are dictionaries
// containing the CanonicalTopic and the time the setting was created.
inline constexpr char kPrivacySandboxBlockedTopics[] =;

// Dictionary of entries representing top frame origins on which the profile
// cannot be joined to an interest group. Keys are the blocked origins, and
// values are the time the setting was applied.
inline constexpr char kPrivacySandboxFledgeJoinBlocked[] =;

// Boolean that indicates that the Privacy Sandbox notice was shown to the
// profile.
inline constexpr char kPrivacySandboxNoticeDisplayed[] =;

// Boolean that indicates that this profile has made a decision on the Privacy
// Sandbox consent.
inline constexpr char kPrivacySandboxConsentDecisionMade[] =;

// Boolean that indicates a Privacy Sandbox confirmation was not shown to the
// profile because the profile had already disabled the Privacy Sandbox.
inline constexpr char kPrivacySandboxNoConfirmationSandboxDisabled[] =;

// Boolean that indicates a Privacy Sandbox confirmation was not shown to the
// profile because the Privacy Sandbox was being restricted.
inline constexpr char kPrivacySandboxNoConfirmationSandboxRestricted[] =;

// Boolean that indicates a Privacy Sandbox confirmation was not shown to the
// profile because the Privacy Sandbox was being managed.
inline constexpr char kPrivacySandboxNoConfirmationSandboxManaged[] =;

// Boolean that indicates a Privacy Sandbox confirmation was not shown to the
// profile because the third party cookies were being blocked.
inline constexpr char kPrivacySandboxNoConfirmationThirdPartyCookiesBlocked[] =;

// Boolean that indicates a Privacy Sandbox confirmation was not shown to the
// profile because the Privacy Sandbox is being manually controlled.
inline constexpr char kPrivacySandboxNoConfirmationManuallyControlled[] =;

// Boolean that indicates the user's Privacy Sandbox setting was disabled
// automatically because they do not have the correct level of confirmation.
inline constexpr char kPrivacySandboxDisabledInsufficientConfirmation[] =;

// Boolean that indicates the user's FPS data access preference has been init,
// so named because of the user intent it intends to represent. Currently there
// is no distinction between FPS for data access, and FPS for other purposes, so
// this init is applied to the "privacy_sandbox.first_party_sets_enabled" pref.
inline constexpr char
    kPrivacySandboxFirstPartySetsDataAccessAllowedInitialized[] =;

// Boolean that indicates whether Related Website Sets is enabled. Exposed to
// the user via Chrome UI, and to enterprises via enterprise policy.
// "first_party_sets" in the string name is kept for historic reasons to avoid
// migration of a synced Pref.
inline constexpr char kPrivacySandboxRelatedWebsiteSetsEnabled[] =;

// Boolean that stores the users Topics consent status, true when the user has
// an active Topics consent, false otherwise. This is specifically separate
// from the kPrivacySandboxM1TopicsEnabled preference, which may be overridden
// by policy or extensions.
inline constexpr char kPrivacySandboxTopicsConsentGiven[] =;

// Timestamp that stores the last time the user made a consent decision for
// Topics, in either settings or as part of a confirmation moment.
inline constexpr char kPrivacySandboxTopicsConsentLastUpdateTime[] =;

// Enum that stores the reason that the Topics consent is in the current state,
// stores one of the values of `TopicsConsentUpdateSource`.
inline constexpr char kPrivacySandboxTopicsConsentLastUpdateReason[] =;

// String that stores the complete, localized, text of the consent moment which
// resulted in the current Topics consent state.
inline constexpr char kPrivacySandboxTopicsConsentTextAtLastUpdate[] =;

// TODO(crbug.com/348369971): Clean up old pref.
// Pref which contains a list of the activity type from the last 100 chrome
// launches
inline constexpr char kPrivacySandboxActivityTypeRecord[] =;

// Pref which contains a list of the activity type from recent chrome launches.
// Version 2 after enum values changed.
inline constexpr char kPrivacySandboxActivityTypeRecord2[] =;

// Pref that records the timestamp of when a profile was shown a sentiment
// survey.
inline constexpr char kPrivacySandboxSentimentSurveyLastSeen[] =;

}  // namespace prefs

namespace privacy_sandbox {

// Represents the different ways in which the Topics consent state could be
// updated.
enum class TopicsConsentUpdateSource {};

// Registers user preferences related to privacy sandbox.
void RegisterProfilePrefs(PrefRegistrySimple* registry);

}  // namespace privacy_sandbox

#endif  // COMPONENTS_PRIVACY_SANDBOX_PRIVACY_SANDBOX_PREFS_H_