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, 75 insertions, 41 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 a4e7e8b..ad36006 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,53 +1,87 @@
1--- chrome/browser/privacy_sandbox/privacy_sandbox_settings.cc.orig 1--- a/chrome/browser/resources/settings/privacy_page/privacy_page.html
2+++ chrome/browser/privacy_sandbox/privacy_sandbox_settings.cc 2+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html
3@@ -378,7 +378,7 @@ std::vector<GURL> PrivacySandboxSettings 3@@ -85,21 +85,6 @@
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 @@
24 sub-label="$i18n{permissionsPageDescription}" 4 sub-label="$i18n{permissionsPageDescription}"
25 on-click="onPermissionsPageClick_" 5 on-click="onPermissionsPageClick_"
26 role-description="$i18n{subpageArrowRoleDescription}"></cr-link-row> 6 role-description="$i18n{subpageArrowRoleDescription}"></cr-link-row>
27- <cr-link-row id="privacySandboxLinkRow" 7- <template is="dom-if" if="[[!isPrivacySandboxRestricted_]]">
28- start-icon="settings20:experiment" 8- <cr-link-row id="privacySandboxLinkRow"
29- class="hr" 9- start-icon="settings20:experiment"
30- label="$i18n{privacySandboxTitle}" 10- class="hr"
31- sub-label="[[computePrivacySandboxSublabel_( 11- label="$i18n{privacySandboxTitle}"
32- prefs.privacy_sandbox.apis_enabled.*)]]" 12- sub-label="[[computePrivacySandboxSublabel_(
33- on-click="onPrivacySandboxClick_" 13- prefs.privacy_sandbox.*)]]"
34- external 14- on-click="onPrivacySandboxClick_"
35- role-description="$i18n{subpageArrowRoleDescription}"> 15- external
36- </cr-link-row> 16- role-description="$i18n{subpageArrowRoleDescription}">
37- <a id="privacySandboxLink" href="privacySandbox" 17- </cr-link-row>
38- target="_blank" tabindex="-1" aria-disabled="true" 18- <a id="privacySandboxLink" href="privacySandbox"
39- role="none"></a> 19- target="_blank" tabindex="-1" aria-disabled="true"
20- role="none"></a>
21- </template>
40 </div> 22 </div>
41 23
42 <if expr="use_nss_certs"> 24 <if expr="use_nss_certs">
43--- components/privacy_sandbox/privacy_sandbox_prefs.cc.orig 25--- a/components/privacy_sandbox/privacy_sandbox_prefs.cc
44+++ components/privacy_sandbox/privacy_sandbox_prefs.cc 26+++ b/components/privacy_sandbox/privacy_sandbox_prefs.cc
45@@ -31,7 +31,7 @@ namespace privacy_sandbox { 27@@ -71,7 +71,7 @@ namespace privacy_sandbox {
46 28
47 void RegisterProfilePrefs(PrefRegistrySimple* registry) { 29 void RegisterProfilePrefs(PrefRegistrySimple* registry) {
48 registry->RegisterBooleanPref( 30 registry->RegisterBooleanPref(
49- prefs::kPrivacySandboxApisEnabled, true, 31- prefs::kPrivacySandboxApisEnabled, true,
50+ prefs::kPrivacySandboxApisEnabled, false, 32+ prefs::kPrivacySandboxApisEnabled, false,
51 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 33 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
52 registry->RegisterBooleanPref( 34 registry->RegisterBooleanPref(prefs::kPrivacySandboxApisEnabledV2, false);
53 prefs::kPrivacySandboxManuallyControlled, false, 35 registry->RegisterBooleanPref(prefs::kPrivacySandboxApisEnabledV2Init, 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() {