summaryrefslogtreecommitdiff
path: root/www/chromium-uc/patches/core/ungoogled-chromium/disable-privacy-sandbox.patch
diff options
context:
space:
mode:
Diffstat (limited to 'www/chromium-uc/patches/core/ungoogled-chromium/disable-privacy-sandbox.patch')
-rw-r--r--www/chromium-uc/patches/core/ungoogled-chromium/disable-privacy-sandbox.patch116
1 files changed, 41 insertions, 75 deletions
diff --git a/www/chromium-uc/patches/core/ungoogled-chromium/disable-privacy-sandbox.patch b/www/chromium-uc/patches/core/ungoogled-chromium/disable-privacy-sandbox.patch
index ad36006..a4e7e8b 100644
--- a/www/chromium-uc/patches/core/ungoogled-chromium/disable-privacy-sandbox.patch
+++ b/www/chromium-uc/patches/core/ungoogled-chromium/disable-privacy-sandbox.patch
@@ -1,87 +1,53 @@
1--- a/chrome/browser/resources/settings/privacy_page/privacy_page.html 1--- chrome/browser/privacy_sandbox/privacy_sandbox_settings.cc.orig
2+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html 2+++ chrome/browser/privacy_sandbox/privacy_sandbox_settings.cc
3@@ -85,21 +85,6 @@ 3@@ -378,7 +378,7 @@ std::vector<GURL> PrivacySandboxSettings
4 }
5
6 bool PrivacySandboxSettings::IsPrivacySandboxAllowed() {
7- return pref_service_->GetBoolean(prefs::kPrivacySandboxApisEnabled);
8+ return false;
9 }
10
11 bool PrivacySandboxSettings::IsPrivacySandboxEnabled() {
12@@ -390,8 +390,6 @@ bool PrivacySandboxSettings::IsPrivacySa
13 }
14
15 void PrivacySandboxSettings::SetPrivacySandboxEnabled(bool enabled) {
16- pref_service_->SetBoolean(prefs::kPrivacySandboxManuallyControlled, true);
17- pref_service_->SetBoolean(prefs::kPrivacySandboxApisEnabled, enabled);
18 }
19
20 void PrivacySandboxSettings::OnCookiesCleared() {
21--- chrome/browser/resources/settings/privacy_page/privacy_page.html.orig
22+++ chrome/browser/resources/settings/privacy_page/privacy_page.html
23@@ -64,19 +64,6 @@
4 sub-label="$i18n{permissionsPageDescription}" 24 sub-label="$i18n{permissionsPageDescription}"
5 on-click="onPermissionsPageClick_" 25 on-click="onPermissionsPageClick_"
6 role-description="$i18n{subpageArrowRoleDescription}"></cr-link-row> 26 role-description="$i18n{subpageArrowRoleDescription}"></cr-link-row>
7- <template is="dom-if" if="[[!isPrivacySandboxRestricted_]]"> 27- <cr-link-row id="privacySandboxLinkRow"
8- <cr-link-row id="privacySandboxLinkRow" 28- start-icon="settings20:experiment"
9- start-icon="settings20:experiment" 29- class="hr"
10- class="hr" 30- label="$i18n{privacySandboxTitle}"
11- label="$i18n{privacySandboxTitle}" 31- sub-label="[[computePrivacySandboxSublabel_(
12- sub-label="[[computePrivacySandboxSublabel_( 32- prefs.privacy_sandbox.apis_enabled.*)]]"
13- prefs.privacy_sandbox.*)]]" 33- on-click="onPrivacySandboxClick_"
14- on-click="onPrivacySandboxClick_" 34- external
15- external 35- role-description="$i18n{subpageArrowRoleDescription}">
16- role-description="$i18n{subpageArrowRoleDescription}"> 36- </cr-link-row>
17- </cr-link-row> 37- <a id="privacySandboxLink" href="privacySandbox"
18- <a id="privacySandboxLink" href="privacySandbox" 38- target="_blank" tabindex="-1" aria-disabled="true"
19- target="_blank" tabindex="-1" aria-disabled="true" 39- role="none"></a>
20- role="none"></a>
21- </template>
22 </div> 40 </div>
23 41
24 <if expr="use_nss_certs"> 42 <if expr="use_nss_certs">
25--- a/components/privacy_sandbox/privacy_sandbox_prefs.cc 43--- components/privacy_sandbox/privacy_sandbox_prefs.cc.orig
26+++ b/components/privacy_sandbox/privacy_sandbox_prefs.cc 44+++ components/privacy_sandbox/privacy_sandbox_prefs.cc
27@@ -71,7 +71,7 @@ namespace privacy_sandbox { 45@@ -31,7 +31,7 @@ namespace privacy_sandbox {
28 46
29 void RegisterProfilePrefs(PrefRegistrySimple* registry) { 47 void RegisterProfilePrefs(PrefRegistrySimple* registry) {
30 registry->RegisterBooleanPref( 48 registry->RegisterBooleanPref(
31- prefs::kPrivacySandboxApisEnabled, true, 49- prefs::kPrivacySandboxApisEnabled, true,
32+ prefs::kPrivacySandboxApisEnabled, false, 50+ prefs::kPrivacySandboxApisEnabled, false,
33 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 51 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
34 registry->RegisterBooleanPref(prefs::kPrivacySandboxApisEnabledV2, false); 52 registry->RegisterBooleanPref(
35 registry->RegisterBooleanPref(prefs::kPrivacySandboxApisEnabledV2Init, false); 53 prefs::kPrivacySandboxManuallyControlled, false,
36--- a/components/privacy_sandbox/privacy_sandbox_settings.cc
37+++ b/components/privacy_sandbox/privacy_sandbox_settings.cc
38@@ -339,48 +339,10 @@ std::vector<GURL> PrivacySandboxSettings
39 }
40
41 bool PrivacySandboxSettings::IsPrivacySandboxEnabled() const {
42- // If the delegate is restricting access, or indicates confirmation has not
43- // occurred, the Privacy Sandbox is disabled.
44- if (delegate_->IsPrivacySandboxRestricted() ||
45- !delegate_->IsPrivacySandboxConfirmed()) {
46- return false;
47- }
48-
49- // For Measurement and Relevance APIs, we explicitly do not require the
50- // underlying pref to be enabled if there is a local flag enabling the APIs to
51- // allow for local testing.
52- bool should_override_setting_for_local_testing = base::FeatureList::IsEnabled(
53- privacy_sandbox::kOverridePrivacySandboxSettingsLocalTesting);
54-
55- // Which preference is consulted is dependent on whether release 3 of the
56- // settings is available.
57- if (base::FeatureList::IsEnabled(privacy_sandbox::kPrivacySandboxSettings3)) {
58- // For Privacy Sandbox Settings 3, APIs are disabled in incognito.
59- if (incognito_profile_)
60- return false;
61-
62- if (should_override_setting_for_local_testing) {
63- return true;
64- }
65-
66- // For Privacy Sandbox Settings 3, APIs may be restricted via the delegate.
67- // The V2 pref was introduced with the 3rd Privacy Sandbox release.
68- return pref_service_->GetBoolean(prefs::kPrivacySandboxApisEnabledV2);
69- }
70-
71- if (should_override_setting_for_local_testing)
72- return true;
73-
74- return pref_service_->GetBoolean(prefs::kPrivacySandboxApisEnabled);
75+ return false;
76 }
77
78 void PrivacySandboxSettings::SetPrivacySandboxEnabled(bool enabled) {
79- // Only apply the decision to the appropriate preference.
80- if (base::FeatureList::IsEnabled(privacy_sandbox::kPrivacySandboxSettings3)) {
81- pref_service_->SetBoolean(prefs::kPrivacySandboxApisEnabledV2, enabled);
82- } else {
83- pref_service_->SetBoolean(prefs::kPrivacySandboxApisEnabled, enabled);
84- }
85 }
86
87 bool PrivacySandboxSettings::IsTrustTokensAllowed() {