privacy_sandbox_prefs.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_PRIVACY_SANDBOX_PRIVACY_SANDBOX_PREFS_H_
  5. #define COMPONENTS_PRIVACY_SANDBOX_PRIVACY_SANDBOX_PREFS_H_
  6. class PrefRegistrySimple;
  7. namespace prefs {
  8. // Synced boolean pref. Privacy Sandbox APIs may only be enabled when this is
  9. // enabled, but each API will respect its own enabling logic if this pref is
  10. // true. When this pref is false ALL Privacy Sandbox APIs are disabled.
  11. // TODO(crbug.com/1292898): Deprecate this preference once all users have been
  12. // migrated to the V2 pref.
  13. extern const char kPrivacySandboxApisEnabled[];
  14. // Un-synced boolean pref. This is a replacement for the synced preference
  15. // above. It performs the exact same functionality, but is unsynced. This
  16. // preference is only consulted when the kPrivacySandboxSettings3 feature is
  17. // enabled.
  18. extern const char kPrivacySandboxApisEnabledV2[];
  19. // Synced boolean that indicates if a user has manually toggled the settings
  20. // associated with the PrivacySandboxSettings feature.
  21. // TODO(crbug.com/1292898): Deprecate this preference once all users have been
  22. // migrated to the V2 pref.
  23. extern const char kPrivacySandboxManuallyControlled[];
  24. // Un-synced boolean pref. This is a replacement for the synced preference
  25. // above. It it set to true when the user manually toggles the setting on the
  26. // updated settings page.
  27. extern const char kPrivacySandboxManuallyControlledV2[];
  28. // Boolean that indicates whether the privacy sandbox desktop page at
  29. // chrome://settings/privacySandbox has been viewed.
  30. extern const char kPrivacySandboxPageViewed[];
  31. // The point in time from which history is eligible to be used when calculating
  32. // a user's Topics API topics.
  33. extern const char kPrivacySandboxTopicsDataAccessibleSince[];
  34. // List of entries representing Topics API topics which are blocked for
  35. // the profile. Blocked topics cannot be provided to site, or considered as
  36. // part of the profile's "top topics". Entries in the list are dictionaries
  37. // containing the CanonicalTopic and the time the setting was created.
  38. extern const char kPrivacySandboxBlockedTopics[];
  39. // Dictionary of entries representing top frame origins on which the profile
  40. // cannot be joined to an interest group. Keys are the blocked origins, and
  41. // values are the time the setting was applied.
  42. extern const char kPrivacySandboxFledgeJoinBlocked[];
  43. // Boolean that indicates that the Privacy Sandbox notice was shown to the
  44. // profile.
  45. extern const char kPrivacySandboxNoticeDisplayed[];
  46. // Boolean that indicates that this profile has made a decision on the Privacy
  47. // Sandbox consent.
  48. extern const char kPrivacySandboxConsentDecisionMade[];
  49. // Boolean that indicates a Privacy Sandbox confirmation was not shown to the
  50. // profile because the profile had already disabled the Privacy Sandbox.
  51. extern const char kPrivacySandboxNoConfirmationSandboxDisabled[];
  52. // Boolean that indicates a Privacy Sandbox confirmation was not shown to the
  53. // profile because the Privacy Sandbox was being restricted.
  54. extern const char kPrivacySandboxNoConfirmationSandboxRestricted[];
  55. // Boolean that indicates a Privacy Sandbox confirmation was not shown to the
  56. // profile because the Privacy Sandbox was being managed.
  57. extern const char kPrivacySandboxNoConfirmationSandboxManaged[];
  58. // Boolean that indicates a Privacy Sandbox confirmation was not shown to the
  59. // profile because the third party cookies were being blocked.
  60. extern const char kPrivacySandboxNoConfirmationThirdPartyCookiesBlocked[];
  61. // Boolean that indicates a Privacy Sandbox confirmation was not shown to the
  62. // profile because the Privacy Sandbox is being manually controlled.
  63. extern const char kPrivacySandboxNoConfirmationManuallyControlled[];
  64. // Boolean that indicates the user's Privacy Sandbox setting was disabled
  65. // automatically because they do not have the correct level of confirmation.
  66. extern const char kPrivacySandboxDisabledInsufficientConfirmation[];
  67. // Synced boolean pref. Controls whether First Party Set enabled data access is
  68. // enabled, e.g. Storage Access API auto grants, or partitioning access by FPS.
  69. extern const char kPrivacySandboxFirstPartySetsDataAccessAllowed[];
  70. // Boolean that indicates the user's FPS data access preference has been init.
  71. extern const char kPrivacySandboxFirstPartySetsDataAccessAllowedInitialized[];
  72. } // namespace prefs
  73. namespace privacy_sandbox {
  74. // Registers user preferences related to privacy sandbox.
  75. void RegisterProfilePrefs(PrefRegistrySimple* registry);
  76. } // namespace privacy_sandbox
  77. #endif // COMPONENTS_PRIVACY_SANDBOX_PRIVACY_SANDBOX_PREFS_H_