diff options
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.patch | 70 |
1 files changed, 42 insertions, 28 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..824e4e5 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,26 +1,6 @@ | |||
| 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 | @@ -80,19 +80,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> |
| @@ -29,7 +9,7 @@ | |||
| 29 | - class="hr" | 9 | - class="hr" |
| 30 | - label="$i18n{privacySandboxTitle}" | 10 | - label="$i18n{privacySandboxTitle}" |
| 31 | - sub-label="[[computePrivacySandboxSublabel_( | 11 | - sub-label="[[computePrivacySandboxSublabel_( |
| 32 | - prefs.privacy_sandbox.apis_enabled.*)]]" | 12 | - prefs.privacy_sandbox.*)]]" |
| 33 | - on-click="onPrivacySandboxClick_" | 13 | - on-click="onPrivacySandboxClick_" |
| 34 | - external | 14 | - external |
| 35 | - role-description="$i18n{subpageArrowRoleDescription}"> | 15 | - role-description="$i18n{subpageArrowRoleDescription}"> |
| @@ -40,14 +20,48 @@ | |||
| 40 | </div> | 20 | </div> |
| 41 | 21 | ||
| 42 | <if expr="use_nss_certs"> | 22 | <if expr="use_nss_certs"> |
| 43 | --- components/privacy_sandbox/privacy_sandbox_prefs.cc.orig | 23 | --- a/components/privacy_sandbox/privacy_sandbox_prefs.cc |
| 44 | +++ components/privacy_sandbox/privacy_sandbox_prefs.cc | 24 | +++ b/components/privacy_sandbox/privacy_sandbox_prefs.cc |
| 45 | @@ -31,7 +31,7 @@ namespace privacy_sandbox { | 25 | @@ -48,7 +48,7 @@ namespace privacy_sandbox { |
| 46 | 26 | ||
| 47 | void RegisterProfilePrefs(PrefRegistrySimple* registry) { | 27 | void RegisterProfilePrefs(PrefRegistrySimple* registry) { |
| 48 | registry->RegisterBooleanPref( | 28 | registry->RegisterBooleanPref( |
| 49 | - prefs::kPrivacySandboxApisEnabled, true, | 29 | - prefs::kPrivacySandboxApisEnabled, true, |
| 50 | + prefs::kPrivacySandboxApisEnabled, false, | 30 | + prefs::kPrivacySandboxApisEnabled, false, |
| 51 | user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 31 | user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 32 | registry->RegisterBooleanPref(prefs::kPrivacySandboxApisEnabledV2, false); | ||
| 52 | registry->RegisterBooleanPref( | 33 | registry->RegisterBooleanPref( |
| 53 | prefs::kPrivacySandboxManuallyControlled, false, | 34 | --- a/components/privacy_sandbox/privacy_sandbox_settings.cc |
| 35 | +++ b/components/privacy_sandbox/privacy_sandbox_settings.cc | ||
| 36 | @@ -290,31 +290,10 @@ std::vector<GURL> PrivacySandboxSettings | ||
| 37 | } | ||
| 38 | |||
| 39 | bool PrivacySandboxSettings::IsPrivacySandboxEnabled() const { | ||
| 40 | - // Which preference is consulted is dependent on whether release 3 of the | ||
| 41 | - // settings is available. | ||
| 42 | - if (base::FeatureList::IsEnabled(privacy_sandbox::kPrivacySandboxSettings3)) { | ||
| 43 | - // For Privacy Sandbox Settings 3, APIs are disabled in incognito. | ||
| 44 | - if (incognito_profile_) | ||
| 45 | return false; | ||
| 46 | - | ||
| 47 | - // The V2 pref was introduced with the 3rd Privacy Sandbox release. | ||
| 48 | - return pref_service_->GetBoolean(prefs::kPrivacySandboxApisEnabledV2); | ||
| 49 | - } | ||
| 50 | - | ||
| 51 | - return pref_service_->GetBoolean(prefs::kPrivacySandboxApisEnabled); | ||
| 52 | } | ||
| 53 | |||
| 54 | void PrivacySandboxSettings::SetPrivacySandboxEnabled(bool enabled) { | ||
| 55 | - pref_service_->SetBoolean(prefs::kPrivacySandboxManuallyControlled, true); | ||
| 56 | - | ||
| 57 | - // Only apply the decision to the appropriate preference. Confirmation logic | ||
| 58 | - // DCHECKS that the user has not been able to enable the V2 preference | ||
| 59 | - // without seeing a dialog. | ||
| 60 | - if (base::FeatureList::IsEnabled(privacy_sandbox::kPrivacySandboxSettings3)) { | ||
| 61 | - pref_service_->SetBoolean(prefs::kPrivacySandboxApisEnabledV2, enabled); | ||
| 62 | - } else { | ||
| 63 | - pref_service_->SetBoolean(prefs::kPrivacySandboxApisEnabled, enabled); | ||
| 64 | - } | ||
| 65 | } | ||
| 66 | |||
| 67 | bool PrivacySandboxSettings::IsTrustTokensAllowed() { | ||
