privacy_sandbox_features.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // Copyright 2022 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. #include "base/feature_list.h"
  5. #include "base/metrics/field_trial_params.h"
  6. #ifndef COMPONENTS_PRIVACY_SANDBOX_PRIVACY_SANDBOX_FEATURES_H_
  7. #define COMPONENTS_PRIVACY_SANDBOX_PRIVACY_SANDBOX_FEATURES_H_
  8. namespace privacy_sandbox {
  9. // Enables the third release of the Privacy Sandbox settings.
  10. extern const base::Feature kPrivacySandboxSettings3;
  11. // When true, the user will be shown a consent to enable the Privacy Sandbox
  12. // release 3, if they accept the APIs will become active. Only one of this and
  13. // the below notice feature should be enabled at any one time.
  14. extern const base::FeatureParam<bool> kPrivacySandboxSettings3ConsentRequired;
  15. // When true, the user will be shown a notice, after which the Privacy Sandbox
  16. // 3 APIs will become active. Only one of this and the above consent feature
  17. // should be enabled at any one time.
  18. extern const base::FeatureParam<bool> kPrivacySandboxSettings3NoticeRequired;
  19. // Determines whether the user will be shown a new version of the notice UI.
  20. // The notice will be shown only if `kPrivacySandboxSettings3NoticeRequired` is
  21. // true. This parameter only determines which UI version will be shown.
  22. extern const base::FeatureParam<bool> kPrivacySandboxSettings3NewNotice;
  23. // Feature parameters which should exclusively be used for testing purposes.
  24. // Enabling any of these parameters may result in the Privacy Sandbox prefs
  25. // (unsynced) entering an unexpected state, requiring profile deletion to
  26. // resolve.
  27. extern const base::FeatureParam<bool>
  28. kPrivacySandboxSettings3ForceShowConsentForTesting;
  29. extern const base::FeatureParam<bool>
  30. kPrivacySandboxSettings3ForceShowNoticeForTesting;
  31. extern const base::FeatureParam<bool>
  32. kPrivacySandboxSettings3ShowSampleDataForTesting;
  33. // This parameter will suppress all Privacy Sandbox prompts, but is supersceeded
  34. // by the kDisablePrivacySandboxPrompts feature below, and will be removed when
  35. // the PrivacySandboxSettings3 feature is fully launched & solidified.
  36. extern const base::FeatureParam<bool>
  37. kPrivacySandboxSettings3DisableDialogForTesting;
  38. extern const base::Feature kOverridePrivacySandboxSettingsLocalTesting;
  39. // Disables any Privacy Sandbox related prompts. Should only be used for testing
  40. // purposes. This feature is used to support external automated testing using
  41. // Chrome, where additional prompts break behavior expectations.
  42. extern const base::Feature kDisablePrivacySandboxPrompts;
  43. // Enables the First Party Sets UI.
  44. extern const base::Feature kPrivacySandboxFirstPartySetsUI;
  45. // Populates First Party Sets information with sample membership information,
  46. // for testing purposes only.
  47. extern const base::FeatureParam<bool> kPrivacySandboxFirstPartySetsUISampleSets;
  48. } // namespace privacy_sandbox
  49. #endif // COMPONENTS_PRIVACY_SANDBOX_PRIVACY_SANDBOX_FEATURES_H_