489 lines
25 KiB
Diff
489 lines
25 KiB
Diff
From: uazo <uazo@users.noreply.github.com>
|
|
Date: Sat, 13 Nov 2021 09:17:06 +0000
|
|
Subject: Disable privacy sandbox
|
|
|
|
Remove UI from the settings and set the flags to inactive
|
|
Permanently removes FLoC support, disabling the download of LSH clusters,
|
|
the marking the history navigation and the javascript API and permission policies.
|
|
Also disable FirstPartySets and StorageAccessAPI.
|
|
|
|
Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
|
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
|
---
|
|
chrome/android/BUILD.gn | 1 -
|
|
.../browser/chrome_content_browser_client.cc | 5 ++++-
|
|
.../first_party_sets_navigation_throttle.cc | 2 +-
|
|
.../first_party_sets_policy_service.cc | 3 ++-
|
|
chrome/browser/privacy_sandbox/BUILD.gn | 1 -
|
|
.../privacy_sandbox_service_impl.cc | 3 ++-
|
|
.../privacy_sandbox_settings_delegate.cc | 1 +
|
|
.../settings/privacy_page/cookies_page.ts | 2 +-
|
|
chrome/test/BUILD.gn | 2 --
|
|
.../site_settings/RwsCookieSettings.java | 4 ++--
|
|
.../history/core/browser/history_backend.cc | 13 +------------
|
|
.../privacy_sandbox_attestations/BUILD.gn | 4 ----
|
|
.../preload/BUILD.gn | 2 +-
|
|
.../privacy_sandbox_attestations.cc | 8 +++-----
|
|
.../privacy_sandbox_features.cc | 3 +++
|
|
.../privacy_sandbox/privacy_sandbox_prefs.cc | 4 ++--
|
|
.../privacy_sandbox_settings_impl.cc | 19 ++++++++++++++-----
|
|
.../tracking_protection_prefs.cc | 4 ++--
|
|
.../identity_manager/account_capabilities.cc | 2 +-
|
|
.../shared_storage_document_service_impl.cc | 9 +++++++++
|
|
.../public/browser/content_browser_client.cc | 2 +-
|
|
.../features_cc/Disable-privacy-sandbox.inc | 1 +
|
|
.../Disable-privacy-sandbox.inc | 1 +
|
|
.../features_cc/Disable-privacy-sandbox.inc | 1 +
|
|
.../features_cc/Disable-privacy-sandbox.inc | 1 +
|
|
third_party/blink/common/features.cc | 1 +
|
|
26 files changed, 55 insertions(+), 44 deletions(-)
|
|
create mode 100644 cromite_flags/content/common/features_cc/Disable-privacy-sandbox.inc
|
|
create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-privacy-sandbox.inc
|
|
create mode 100644 cromite_flags/services/network/public/cpp/features_cc/Disable-privacy-sandbox.inc
|
|
create mode 100644 cromite_flags/third_party/blink/common/features_cc/Disable-privacy-sandbox.inc
|
|
|
|
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
|
|
--- a/chrome/android/BUILD.gn
|
|
+++ b/chrome/android/BUILD.gn
|
|
@@ -1655,7 +1655,6 @@ if (_is_default_toolchain) {
|
|
java_group("chrome_public_non_pak_assets") {
|
|
deps = [
|
|
"//chrome/android/webapk/libs/runtime_library:runtime_library_assets",
|
|
- "//components/privacy_sandbox/privacy_sandbox_attestations/preload:privacy_sandbox_attestations_assets",
|
|
]
|
|
}
|
|
|
|
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
|
|
--- a/chrome/browser/chrome_content_browser_client.cc
|
|
+++ b/chrome/browser/chrome_content_browser_client.cc
|
|
@@ -3446,6 +3446,9 @@ bool ChromeContentBrowserClient::IsAttributionReportingOperationAllowed(
|
|
const url::Origin* destination_origin,
|
|
const url::Origin* reporting_origin,
|
|
bool* can_bypass) {
|
|
+ // make sure that this is always disabled in Bromite even if privacy sandbox is already disabled in the prefs
|
|
+ if ((true))
|
|
+ return false;
|
|
Profile* profile = Profile::FromBrowserContext(browser_context);
|
|
|
|
auto* privacy_sandbox_settings =
|
|
@@ -7880,7 +7883,7 @@ bool ChromeContentBrowserClient::ShouldDisableOriginAgentClusterDefault(
|
|
}
|
|
|
|
bool ChromeContentBrowserClient::WillProvidePublicFirstPartySets() {
|
|
- return !is_minimal_mode_ &&
|
|
+ return ((false)) && !is_minimal_mode_ &&
|
|
!base::CommandLine::ForCurrentProcess()->HasSwitch(
|
|
switches::kDisableComponentUpdate);
|
|
}
|
|
diff --git a/chrome/browser/first_party_sets/first_party_sets_navigation_throttle.cc b/chrome/browser/first_party_sets/first_party_sets_navigation_throttle.cc
|
|
--- a/chrome/browser/first_party_sets/first_party_sets_navigation_throttle.cc
|
|
+++ b/chrome/browser/first_party_sets/first_party_sets_navigation_throttle.cc
|
|
@@ -77,7 +77,7 @@ void FirstPartySetsNavigationThrottle::MaybeCreateAndAdd(
|
|
// The `service` might be null for some irregular profiles.
|
|
// TODO(crbug.com/40233408): regular profiles and guest sessions
|
|
// aren't mutually exclusive on ChromeOS.
|
|
- if (!profile->IsRegularProfile() || profile->IsGuestSession()) {
|
|
+ if (((true)) || !profile->IsRegularProfile() || profile->IsGuestSession()) {
|
|
return;
|
|
}
|
|
|
|
diff --git a/chrome/browser/first_party_sets/first_party_sets_policy_service.cc b/chrome/browser/first_party_sets/first_party_sets_policy_service.cc
|
|
--- a/chrome/browser/first_party_sets/first_party_sets_policy_service.cc
|
|
+++ b/chrome/browser/first_party_sets/first_party_sets_policy_service.cc
|
|
@@ -60,6 +60,7 @@ const base::Value::Dict* GetOverridesPolicyForProfile(
|
|
}
|
|
|
|
ServiceState GetServiceState(Profile* profile, bool pref_enabled) {
|
|
+ if ((true)) return ServiceState::kPermanentlyDisabled;
|
|
if (profile->IsSystemProfile() || profile->IsGuestSession() ||
|
|
profile->IsOffTheRecord()) {
|
|
return ServiceState::kPermanentlyDisabled;
|
|
@@ -103,7 +104,7 @@ void FirstPartySetsPolicyService::Init() {
|
|
|
|
service_state_ = GetServiceState(
|
|
profile, privacy_sandbox_settings_->AreRelatedWebsiteSetsEnabled());
|
|
-
|
|
+ service_state_ = ServiceState::kPermanentlyDisabled;
|
|
if (service_state_ == ServiceState::kPermanentlyDisabled) {
|
|
OnReadyToNotifyDelegates(net::FirstPartySetsContextConfig(),
|
|
net::FirstPartySetsCacheFilter());
|
|
diff --git a/chrome/browser/privacy_sandbox/BUILD.gn b/chrome/browser/privacy_sandbox/BUILD.gn
|
|
--- a/chrome/browser/privacy_sandbox/BUILD.gn
|
|
+++ b/chrome/browser/privacy_sandbox/BUILD.gn
|
|
@@ -166,7 +166,6 @@ if (!is_android) {
|
|
"//components/privacy_sandbox:test_support",
|
|
"//components/privacy_sandbox/privacy_sandbox_attestations",
|
|
"//components/privacy_sandbox/privacy_sandbox_attestations:metrics",
|
|
- "//components/privacy_sandbox/privacy_sandbox_attestations/preload",
|
|
"//components/privacy_sandbox/privacy_sandbox_attestations/proto",
|
|
"//content/test:test_support",
|
|
]
|
|
diff --git a/chrome/browser/privacy_sandbox/privacy_sandbox_service_impl.cc b/chrome/browser/privacy_sandbox/privacy_sandbox_service_impl.cc
|
|
--- a/chrome/browser/privacy_sandbox/privacy_sandbox_service_impl.cc
|
|
+++ b/chrome/browser/privacy_sandbox/privacy_sandbox_service_impl.cc
|
|
@@ -793,6 +793,7 @@ bool PrivacySandboxServiceImpl::UpdateAndGetSuppressionReason() {
|
|
// TODO(crbug.com/352575567): Use the SurfaceType passed in.
|
|
PromptType PrivacySandboxServiceImpl::GetRequiredPromptType(
|
|
SurfaceType surface_type) {
|
|
+ if ((true)) return PromptType::kNone;
|
|
// We delay emitting the metrics here so the profile manager can finish
|
|
// setting up and retrieving the profile buckets.
|
|
if (should_emit_dark_launch_startup_metrics_) {
|
|
@@ -1116,7 +1117,7 @@ bool PrivacySandboxServiceImpl::IsRestrictedNoticeEnabled() {
|
|
void PrivacySandboxServiceImpl::SetRelatedWebsiteSetsDataAccessEnabled(
|
|
bool enabled) {
|
|
pref_service_->SetBoolean(prefs::kPrivacySandboxRelatedWebsiteSetsEnabled,
|
|
- enabled);
|
|
+ false);
|
|
}
|
|
|
|
bool PrivacySandboxServiceImpl::IsRelatedWebsiteSetsDataAccessEnabled() const {
|
|
diff --git a/chrome/browser/privacy_sandbox/privacy_sandbox_settings_delegate.cc b/chrome/browser/privacy_sandbox/privacy_sandbox_settings_delegate.cc
|
|
--- a/chrome/browser/privacy_sandbox/privacy_sandbox_settings_delegate.cc
|
|
+++ b/chrome/browser/privacy_sandbox/privacy_sandbox_settings_delegate.cc
|
|
@@ -155,6 +155,7 @@ bool PrivacySandboxSettingsDelegate::HasAppropriateTopicsConsent() const {
|
|
|
|
bool PrivacySandboxSettingsDelegate::PrivacySandboxRestrictedNoticeRequired()
|
|
const {
|
|
+ if ((true)) return true;
|
|
auto* identity_manager = IdentityManagerFactory::GetForProfile(profile_);
|
|
|
|
if (!identity_manager ||
|
|
diff --git a/chrome/browser/resources/settings/privacy_page/cookies_page.ts b/chrome/browser/resources/settings/privacy_page/cookies_page.ts
|
|
--- a/chrome/browser/resources/settings/privacy_page/cookies_page.ts
|
|
+++ b/chrome/browser/resources/settings/privacy_page/cookies_page.ts
|
|
@@ -249,7 +249,7 @@ export class SettingsCookiesPageElement extends SettingsCookiesPageElementBase {
|
|
}
|
|
|
|
private relatedWebsiteSetsToggleDisabled_() {
|
|
- return this.getPref('profile.cookie_controls_mode').value !==
|
|
+ return ((true)) || this.getPref('profile.cookie_controls_mode').value !==
|
|
CookieControlsMode.BLOCK_THIRD_PARTY;
|
|
}
|
|
|
|
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
|
--- a/chrome/test/BUILD.gn
|
|
+++ b/chrome/test/BUILD.gn
|
|
@@ -1821,8 +1821,6 @@ if (is_android) {
|
|
"//components/privacy_sandbox/privacy_sandbox_attestations",
|
|
"//components/privacy_sandbox/privacy_sandbox_attestations:metrics",
|
|
"//components/privacy_sandbox/privacy_sandbox_attestations:test_support",
|
|
- "//components/privacy_sandbox/privacy_sandbox_attestations/preload:preload",
|
|
- "//components/privacy_sandbox/privacy_sandbox_attestations/preload:privacy_sandbox_attestations_assets",
|
|
"//components/privacy_sandbox/privacy_sandbox_attestations/proto:proto",
|
|
"//components/qr_code_generator:bitmap_generator",
|
|
"//components/safe_browsing/content/common:interfaces",
|
|
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/RwsCookieSettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/RwsCookieSettings.java
|
|
--- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/RwsCookieSettings.java
|
|
+++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/RwsCookieSettings.java
|
|
@@ -148,7 +148,7 @@ public class RwsCookieSettings extends BaseSiteSettingsFragment
|
|
mAllowRwsPreference.setChecked(
|
|
getSiteSettingsDelegate().isRelatedWebsiteSetsDataAccessEnabled());
|
|
|
|
- if (!isBlockThirdPartyCookieSelected()) {
|
|
+ if (((true)) || !isBlockThirdPartyCookieSelected()) {
|
|
mAllowRwsPreference.setEnabled(false);
|
|
}
|
|
mAllowRwsPreference.setOnPreferenceChangeListener(this);
|
|
@@ -164,7 +164,7 @@ public class RwsCookieSettings extends BaseSiteSettingsFragment
|
|
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
|
String key = preference.getKey();
|
|
if (ALLOW_RWS_COOKIE_PREFERENCE.equals(key)) {
|
|
- getSiteSettingsDelegate().setRelatedWebsiteSetsDataAccessEnabled((boolean) newValue);
|
|
+ getSiteSettingsDelegate().setRelatedWebsiteSetsDataAccessEnabled((boolean) false);
|
|
} else {
|
|
assert false : "Should not be reached";
|
|
}
|
|
diff --git a/components/history/core/browser/history_backend.cc b/components/history/core/browser/history_backend.cc
|
|
--- a/components/history/core/browser/history_backend.cc
|
|
+++ b/components/history/core/browser/history_backend.cc
|
|
@@ -664,18 +664,7 @@ void HistoryBackend::SetBrowsingTopicsAllowed(ContextID context_id,
|
|
if (!visit_id)
|
|
return;
|
|
|
|
- // Only add to the annotations table if the visit_id exists in the visits
|
|
- // table.
|
|
- VisitContentAnnotations annotations;
|
|
- if (db_->GetContentAnnotationsForVisit(visit_id, &annotations)) {
|
|
- annotations.annotation_flags |=
|
|
- VisitContentAnnotationFlag::kBrowsingTopicsEligible;
|
|
- db_->UpdateContentAnnotationsForVisit(visit_id, annotations);
|
|
- } else {
|
|
- annotations.annotation_flags |=
|
|
- VisitContentAnnotationFlag::kBrowsingTopicsEligible;
|
|
- db_->AddContentAnnotationsForVisit(visit_id, annotations);
|
|
- }
|
|
+ // in Bromite disallow marking anything in history related to topics
|
|
ScheduleCommit();
|
|
}
|
|
|
|
diff --git a/components/privacy_sandbox/privacy_sandbox_attestations/BUILD.gn b/components/privacy_sandbox/privacy_sandbox_attestations/BUILD.gn
|
|
--- a/components/privacy_sandbox/privacy_sandbox_attestations/BUILD.gn
|
|
+++ b/components/privacy_sandbox/privacy_sandbox_attestations/BUILD.gn
|
|
@@ -25,10 +25,6 @@ if (use_blink) {
|
|
"//content/public/browser",
|
|
]
|
|
|
|
- if (is_android) {
|
|
- deps += [ "//components/privacy_sandbox/privacy_sandbox_attestations/preload:preload" ]
|
|
- }
|
|
-
|
|
public_deps = [
|
|
"//base",
|
|
"//build:buildflag_header_h",
|
|
diff --git a/components/privacy_sandbox/privacy_sandbox_attestations/preload/BUILD.gn b/components/privacy_sandbox/privacy_sandbox_attestations/preload/BUILD.gn
|
|
--- a/components/privacy_sandbox/privacy_sandbox_attestations/preload/BUILD.gn
|
|
+++ b/components/privacy_sandbox/privacy_sandbox_attestations/preload/BUILD.gn
|
|
@@ -23,7 +23,7 @@ if (is_mac) {
|
|
}
|
|
}
|
|
|
|
-if (is_android) {
|
|
+if (((false)) && is_android) {
|
|
import("//build/config/android/rules.gni")
|
|
|
|
# Bundle the preload attestations list to Android APK assets.
|
|
diff --git a/components/privacy_sandbox/privacy_sandbox_attestations/privacy_sandbox_attestations.cc b/components/privacy_sandbox/privacy_sandbox_attestations/privacy_sandbox_attestations.cc
|
|
--- a/components/privacy_sandbox/privacy_sandbox_attestations/privacy_sandbox_attestations.cc
|
|
+++ b/components/privacy_sandbox/privacy_sandbox_attestations/privacy_sandbox_attestations.cc
|
|
@@ -41,7 +41,7 @@
|
|
#include "net/base/schemeful_site.h"
|
|
#include "url/gurl.h"
|
|
|
|
-#if BUILDFLAG(IS_ANDROID)
|
|
+#if ((false)) && BUILDFLAG(IS_ANDROID)
|
|
#include "base/android/apk_assets.h"
|
|
#include "base/containers/span.h"
|
|
#include "base/files/memory_mapped_file.h"
|
|
@@ -141,7 +141,7 @@ LoadAttestationsInternal(base::FilePath installed_file_path) {
|
|
return ParseAttestationsMap(proto_str);
|
|
}
|
|
|
|
-#if BUILDFLAG(IS_ANDROID)
|
|
+#if ((false)) && BUILDFLAG(IS_ANDROID)
|
|
|
|
void RecordLoadAPKAssetStatusHistogram(LoadAPKAssetStatus status) {
|
|
base::UmaHistogramEnumeration(kAttestationsLoadAPKAssetStatusUMA, status);
|
|
@@ -467,8 +467,6 @@ void PrivacySandboxAttestations::OnAttestationsParsed(
|
|
if (attestations_map.has_value() &&
|
|
(!file_version_.IsValid() || file_version_.CompareTo(version) < 0)) {
|
|
// Parsing succeeded and the attestations file has newer version.
|
|
- file_version_ = std::move(version);
|
|
- attestations_map_ = std::move(attestations_map.value());
|
|
}
|
|
|
|
SetIsPreInstalled(is_pre_installed);
|
|
@@ -494,7 +492,7 @@ void PrivacySandboxAttestations::OnAttestationsFileCheckComplete() {
|
|
// the in-memory attestations map.
|
|
// TODO(crbug.com/406020732): Consider also loading the attestations component
|
|
// from APK assets if the parsing has finished with error.
|
|
-#if BUILDFLAG(IS_ANDROID)
|
|
+#if ((false)) && BUILDFLAG(IS_ANDROID)
|
|
if (attestations_parse_progress_ == Progress::kNotStarted &&
|
|
base::FeatureList::IsEnabled(
|
|
privacy_sandbox::kPrivacySandboxAttestationsLoadFromAPKAsset)) {
|
|
diff --git a/components/privacy_sandbox/privacy_sandbox_features.cc b/components/privacy_sandbox/privacy_sandbox_features.cc
|
|
--- a/components/privacy_sandbox/privacy_sandbox_features.cc
|
|
+++ b/components/privacy_sandbox/privacy_sandbox_features.cc
|
|
@@ -261,4 +261,7 @@ BASE_FEATURE(kPrivacySandboxMigratePrefsToSchemaV2,
|
|
BASE_FEATURE(kPrivacySandboxNoticeFramework,
|
|
"PrivacySandboxNoticeFramework",
|
|
base::FEATURE_DISABLED_BY_DEFAULT);
|
|
+SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxSettings4);
|
|
+SET_CROMITE_FEATURE_ENABLED(kDisablePrivacySandboxPrompts);
|
|
+SET_CROMITE_FEATURE_DISABLED(kEnforcePrivacySandboxAttestations);
|
|
} // namespace privacy_sandbox
|
|
diff --git a/components/privacy_sandbox/privacy_sandbox_prefs.cc b/components/privacy_sandbox/privacy_sandbox_prefs.cc
|
|
--- a/components/privacy_sandbox/privacy_sandbox_prefs.cc
|
|
+++ b/components/privacy_sandbox/privacy_sandbox_prefs.cc
|
|
@@ -24,7 +24,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
|
|
registry->RegisterBooleanPref(prefs::kPrivacySandboxM1FledgeEnabled, false);
|
|
registry->RegisterBooleanPref(prefs::kPrivacySandboxM1AdMeasurementEnabled,
|
|
false);
|
|
- registry->RegisterBooleanPref(prefs::kPrivacySandboxM1Restricted, false);
|
|
+ registry->RegisterBooleanPref(prefs::kPrivacySandboxM1Restricted, true);
|
|
|
|
registry->RegisterTimePref(prefs::kPrivacySandboxTopicsDataAccessibleSince,
|
|
base::Time());
|
|
@@ -49,7 +49,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
|
|
prefs::kPrivacySandboxRelatedWebsiteSetsDataAccessAllowedInitialized,
|
|
false);
|
|
registry->RegisterBooleanPref(
|
|
- prefs::kPrivacySandboxRelatedWebsiteSetsEnabled, true,
|
|
+ prefs::kPrivacySandboxRelatedWebsiteSetsEnabled, false, // must be disabled
|
|
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
|
registry->RegisterTimePref(
|
|
prefs::kPrivacySandboxFakeNoticePromptShownTimeSync, base::Time(),
|
|
diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/components/privacy_sandbox/privacy_sandbox_settings_impl.cc
|
|
--- a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc
|
|
+++ b/components/privacy_sandbox/privacy_sandbox_settings_impl.cc
|
|
@@ -134,7 +134,7 @@ std::set<browsing_topics::Topic> GetTopicsSetFromString(
|
|
|
|
// static
|
|
bool PrivacySandboxSettingsImpl::IsAllowed(Status status) {
|
|
- return status == Status::kAllowed;
|
|
+ return false;
|
|
}
|
|
|
|
// static
|
|
@@ -257,7 +257,8 @@ PrivacySandboxSettingsImpl::GetFinchPrioritizedTopics() {
|
|
return finch_prioritized_topics_;
|
|
}
|
|
|
|
-bool PrivacySandboxSettingsImpl::IsTopicsAllowed() const {
|
|
+bool PrivacySandboxSettingsImpl::IsTopicsAllowed() const { // disabled in Bromite
|
|
+ if ((true)) return false;
|
|
Status status = GetM1TopicAllowedStatus();
|
|
JoinHistogram(kIsTopicsAllowedHistogram, status);
|
|
return IsAllowed(status);
|
|
@@ -289,7 +290,8 @@ bool PrivacySandboxSettingsImpl::IsTopicsAllowedForContext(
|
|
return IsAllowed(status);
|
|
}
|
|
|
|
-bool PrivacySandboxSettingsImpl::IsTopicAllowed(const CanonicalTopic& topic) {
|
|
+bool PrivacySandboxSettingsImpl::IsTopicAllowed(const CanonicalTopic& topic) { // disabled in Bromite
|
|
+ if ((true)) return false;
|
|
const auto& blocked_topics =
|
|
pref_service_->GetList(prefs::kPrivacySandboxBlockedTopics);
|
|
|
|
@@ -513,6 +515,7 @@ bool PrivacySandboxSettingsImpl::
|
|
void PrivacySandboxSettingsImpl::SetFledgeJoiningAllowed(
|
|
const std::string& top_frame_etld_plus1,
|
|
bool allowed) {
|
|
+ if ((true)) return;
|
|
ScopedDictPrefUpdate scoped_pref_update(
|
|
pref_service_, prefs::kPrivacySandboxFledgeJoinBlocked);
|
|
|
|
@@ -582,7 +585,8 @@ void PrivacySandboxSettingsImpl::ClearFledgeJoiningAllowedSettings(
|
|
}
|
|
|
|
bool PrivacySandboxSettingsImpl::IsFledgeJoiningAllowed(
|
|
- const url::Origin& top_frame_origin) const {
|
|
+ const url::Origin& top_frame_origin) const { // disabled in Bromite
|
|
+ if ((true)) return false;
|
|
ScopedDictPrefUpdate scoped_pref_update(
|
|
pref_service_, prefs::kPrivacySandboxFledgeJoinBlocked);
|
|
auto& pref_data = scoped_pref_update.Get();
|
|
@@ -926,7 +930,10 @@ void PrivacySandboxSettingsImpl::SetDelegateForTesting(
|
|
delegate_ = std::move(delegate);
|
|
}
|
|
|
|
-void PrivacySandboxSettingsImpl::SetTopicsDataAccessibleFromNow() const {
|
|
+void PrivacySandboxSettingsImpl::SetTopicsDataAccessibleFromNow() const { // disabled in Bromite
|
|
+ pref_service_->ClearPref(prefs::kPrivacySandboxTopicsDataAccessibleSince);
|
|
+ if ((true)) return;
|
|
+
|
|
pref_service_->SetTime(prefs::kPrivacySandboxTopicsDataAccessibleSince,
|
|
base::Time::Now());
|
|
|
|
@@ -939,6 +946,7 @@ PrivacySandboxSettingsImpl::Status
|
|
PrivacySandboxSettingsImpl::GetSiteAccessAllowedStatus(
|
|
const url::Origin& top_frame_origin,
|
|
const GURL& url) const {
|
|
+ if ((true)) return Status::kSiteDataAccessBlocked;
|
|
// Relying on |host_content_settings_map_| instead of |cookie_settings_|
|
|
// allows to query whether the site associated with the |url| is allowed to
|
|
// access Site data (aka ContentSettingsType::COOKIES) without considering any
|
|
@@ -953,6 +961,7 @@ PrivacySandboxSettingsImpl::GetSiteAccessAllowedStatus(
|
|
PrivacySandboxSettingsImpl::Status
|
|
PrivacySandboxSettingsImpl::GetPrivacySandboxAllowedStatus(
|
|
bool should_ignore_restriction /*=false*/) const {
|
|
+ if ((true)) return Status::kRestricted;
|
|
if (delegate_->IsIncognitoProfile()) {
|
|
return Status::kIncognitoProfile;
|
|
}
|
|
diff --git a/components/privacy_sandbox/tracking_protection_prefs.cc b/components/privacy_sandbox/tracking_protection_prefs.cc
|
|
--- a/components/privacy_sandbox/tracking_protection_prefs.cc
|
|
+++ b/components/privacy_sandbox/tracking_protection_prefs.cc
|
|
@@ -24,9 +24,9 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
|
|
// TODO(https://b/333527273): The following prefs should be deprecated.
|
|
// Still in use for Mode B.
|
|
registry->RegisterBooleanPref(
|
|
- prefs::kBlockAll3pcToggleEnabled, false,
|
|
+ prefs::kBlockAll3pcToggleEnabled, false, // with true enables FPS
|
|
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
|
- registry->RegisterBooleanPref(prefs::kTrackingProtection3pcdEnabled, false);
|
|
+ registry->RegisterBooleanPref(prefs::kTrackingProtection3pcdEnabled, false); // with true enables FPS
|
|
registry->RegisterIntegerPref(
|
|
prefs::kTrackingProtectionOnboardingStatus,
|
|
static_cast<int>(TrackingProtectionOnboardingStatus::kIneligible));
|
|
diff --git a/components/signin/public/identity_manager/account_capabilities.cc b/components/signin/public/identity_manager/account_capabilities.cc
|
|
--- a/components/signin/public/identity_manager/account_capabilities.cc
|
|
+++ b/components/signin/public/identity_manager/account_capabilities.cc
|
|
@@ -88,7 +88,7 @@ signin::Tribool AccountCapabilities::
|
|
|
|
signin::Tribool AccountCapabilities::can_run_chrome_privacy_sandbox_trials()
|
|
const {
|
|
- return GetCapabilityByName(kCanRunChromePrivacySandboxTrialsCapabilityName);
|
|
+ return signin::Tribool::kFalse;
|
|
}
|
|
|
|
signin::Tribool AccountCapabilities::is_opted_in_to_parental_supervision()
|
|
diff --git a/content/browser/shared_storage/shared_storage_document_service_impl.cc b/content/browser/shared_storage/shared_storage_document_service_impl.cc
|
|
--- a/content/browser/shared_storage/shared_storage_document_service_impl.cc
|
|
+++ b/content/browser/shared_storage/shared_storage_document_service_impl.cc
|
|
@@ -131,6 +131,15 @@ void SharedStorageDocumentServiceImpl::CreateWorklet(
|
|
render_frame_host().GetLastCommittedOrigin().IsSameOriginWith(
|
|
data_origin);
|
|
|
|
+ // A document can only create cross-origin worklets with
|
|
+ // `kSharedStorageAPIM125` enabled.
|
|
+ if (!is_same_origin) {
|
|
+ // This could indicate a compromised renderer, so let's terminate it.
|
|
+ receiver_.ReportBadMessage(
|
|
+ "Attempted to load a cross-origin module script.");
|
|
+ return;
|
|
+ }
|
|
+
|
|
// `CreateWorklet()` cannot differentiate between calls from addModule() and
|
|
// createWorklet(). Hence, we skip the mojom validation for opaque origin
|
|
// context for addModule().
|
|
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
|
|
--- a/content/public/browser/content_browser_client.cc
|
|
+++ b/content/public/browser/content_browser_client.cc
|
|
@@ -1700,7 +1700,7 @@ bool ContentBrowserClient::ShouldPreconnectNavigation(
|
|
}
|
|
|
|
bool ContentBrowserClient::IsFirstPartySetsEnabled() {
|
|
- return true;
|
|
+ return false;
|
|
}
|
|
|
|
bool ContentBrowserClient::WillProvidePublicFirstPartySets() {
|
|
diff --git a/cromite_flags/content/common/features_cc/Disable-privacy-sandbox.inc b/cromite_flags/content/common/features_cc/Disable-privacy-sandbox.inc
|
|
new file mode 100644
|
|
--- /dev/null
|
|
+++ b/cromite_flags/content/common/features_cc/Disable-privacy-sandbox.inc
|
|
@@ -0,0 +1 @@
|
|
+SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxAdsAPIsM1Override);
|
|
diff --git a/cromite_flags/content/public/common/content_features_cc/Disable-privacy-sandbox.inc b/cromite_flags/content/public/common/content_features_cc/Disable-privacy-sandbox.inc
|
|
new file mode 100644
|
|
--- /dev/null
|
|
+++ b/cromite_flags/content/public/common/content_features_cc/Disable-privacy-sandbox.inc
|
|
@@ -0,0 +1 @@
|
|
+SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxAdsAPIsOverride);
|
|
diff --git a/cromite_flags/services/network/public/cpp/features_cc/Disable-privacy-sandbox.inc b/cromite_flags/services/network/public/cpp/features_cc/Disable-privacy-sandbox.inc
|
|
new file mode 100644
|
|
--- /dev/null
|
|
+++ b/cromite_flags/services/network/public/cpp/features_cc/Disable-privacy-sandbox.inc
|
|
@@ -0,0 +1 @@
|
|
+SET_CROMITE_FEATURE_DISABLED(kSharedStorageAPI);
|
|
diff --git a/cromite_flags/third_party/blink/common/features_cc/Disable-privacy-sandbox.inc b/cromite_flags/third_party/blink/common/features_cc/Disable-privacy-sandbox.inc
|
|
new file mode 100644
|
|
--- /dev/null
|
|
+++ b/cromite_flags/third_party/blink/common/features_cc/Disable-privacy-sandbox.inc
|
|
@@ -0,0 +1 @@
|
|
+SET_CROMITE_FEATURE_DISABLED(kFencedFrames);
|
|
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
|
|
--- a/third_party/blink/common/features.cc
|
|
+++ b/third_party/blink/common/features.cc
|
|
@@ -2856,6 +2856,7 @@ BASE_FEATURE(kNoReferrerForPreloadFromSubresource,
|
|
// constants for features in the section above.
|
|
|
|
bool IsAllowURNsInIframeEnabled() {
|
|
+ if ((true)) return false; // see https://chromium-review.googlesource.com/c/chromium/src/+/3690741
|
|
return base::FeatureList::IsEnabled(blink::features::kAllowURNsInIframes);
|
|
}
|
|
|
|
--
|