disable-privacy-sandbox.patch 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. --- a/chrome/browser/privacy_sandbox/privacy_sandbox_settings_delegate.cc
  2. +++ b/chrome/browser/privacy_sandbox/privacy_sandbox_settings_delegate.cc
  3. @@ -16,25 +16,7 @@
  4. namespace {
  5. bool PrivacySandboxRestrictedByAcccountCapability(Profile* profile) {
  6. - auto* identity_manager = IdentityManagerFactory::GetForProfile(profile);
  7. -
  8. - if (!identity_manager ||
  9. - !identity_manager->HasPrimaryAccount(signin::ConsentLevel::kSignin)) {
  10. - // The user isn't signed in so we can't apply any capabilties-based
  11. - // restrictions.
  12. - return false;
  13. - }
  14. -
  15. - const auto core_account_info =
  16. - identity_manager->GetPrimaryAccountInfo(signin::ConsentLevel::kSignin);
  17. - const AccountInfo account_info =
  18. - identity_manager->FindExtendedAccountInfo(core_account_info);
  19. - auto capability =
  20. - account_info.capabilities.can_run_chrome_privacy_sandbox_trials();
  21. -
  22. - // The Privacy Sandbox is not considered restricted unless the capability
  23. - // has a definitive false signal.
  24. - return capability == signin::Tribool::kFalse;
  25. + return true;
  26. }
  27. } // namespace
  28. --- a/components/privacy_sandbox/privacy_sandbox_prefs.cc
  29. +++ b/components/privacy_sandbox/privacy_sandbox_prefs.cc
  30. @@ -101,7 +101,7 @@ namespace privacy_sandbox {
  31. void RegisterProfilePrefs(PrefRegistrySimple* registry) {
  32. registry->RegisterBooleanPref(
  33. - prefs::kPrivacySandboxApisEnabled, true,
  34. + prefs::kPrivacySandboxApisEnabled, false,
  35. user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
  36. registry->RegisterBooleanPref(prefs::kPrivacySandboxApisEnabledV2, false);
  37. registry->RegisterBooleanPref(prefs::kPrivacySandboxM1ConsentDecisionMade,
  38. --- a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc
  39. +++ b/components/privacy_sandbox/privacy_sandbox_settings_impl.cc
  40. @@ -63,7 +63,7 @@ base::Value CreateBlockedTopicEntry(cons
  41. // static
  42. bool PrivacySandboxSettingsImpl::IsAllowed(Status status) {
  43. - return status == Status::kAllowed;
  44. + return false;
  45. }
  46. PrivacySandboxSettingsImpl::PrivacySandboxSettingsImpl(
  47. @@ -465,20 +465,7 @@ bool PrivacySandboxSettingsImpl::IsPriva
  48. }
  49. bool PrivacySandboxSettingsImpl::IsPrivacySandboxEnabled() const {
  50. - PrivacySandboxSettingsImpl::Status status = GetPrivacySandboxAllowedStatus();
  51. - if (!IsAllowed(status)) {
  52. - return false;
  53. - }
  54. -
  55. - // For Measurement and Relevance APIs, we explicitly do not require the
  56. - // underlying pref to be enabled if there is a local flag enabling the APIs to
  57. - // allow for local testing.
  58. - if (base::FeatureList::IsEnabled(
  59. - privacy_sandbox::kOverridePrivacySandboxSettingsLocalTesting)) {
  60. - return true;
  61. - }
  62. -
  63. - return pref_service_->GetBoolean(prefs::kPrivacySandboxApisEnabledV2);
  64. + return false;
  65. }
  66. void PrivacySandboxSettingsImpl::SetAllPrivacySandboxAllowedForTesting() {
  67. @@ -503,7 +490,6 @@ void PrivacySandboxSettingsImpl::SetTopi
  68. }
  69. void PrivacySandboxSettingsImpl::SetPrivacySandboxEnabled(bool enabled) {
  70. - pref_service_->SetBoolean(prefs::kPrivacySandboxApisEnabledV2, enabled);
  71. }
  72. bool PrivacySandboxSettingsImpl::IsPrivacySandboxRestricted() const {
  73. --- a/content/browser/aggregation_service/aggregation_service_features.cc
  74. +++ b/content/browser/aggregation_service/aggregation_service_features.cc
  75. @@ -9,7 +9,7 @@ namespace content {
  76. // Enables the Aggregation Service. See crbug.com/1207974.
  77. BASE_FEATURE(kPrivacySandboxAggregationService,
  78. "PrivacySandboxAggregationService",
  79. - base::FEATURE_ENABLED_BY_DEFAULT);
  80. + base::FEATURE_DISABLED_BY_DEFAULT);
  81. const base::FeatureParam<std::string>
  82. kPrivacySandboxAggregationServiceTrustedServerUrlAwsParam{
  83. --- a/third_party/blink/common/features.cc
  84. +++ b/third_party/blink/common/features.cc
  85. @@ -129,7 +129,7 @@ BASE_FEATURE(kBlockingDownloadsInAdFrame
  86. // Controls whether the Conversion Measurement API infrastructure is enabled.
  87. BASE_FEATURE(kConversionMeasurement,
  88. "ConversionMeasurement",
  89. - base::FEATURE_ENABLED_BY_DEFAULT);
  90. + base::FEATURE_DISABLED_BY_DEFAULT);
  91. // Controls whether LCP calculations should exclude low-entropy images. If
  92. // enabled, then the associated parameter sets the cutoff, expressed as the