Files
cromite/build/patches/Enable-StrictOriginIsolation-and-SitePerProcess-flags.patch
T
CarlandGitHub 73886eac62 Patches for v100 (#1930)
* Patches for v100

* Remove unused patches
2022-03-29 15:58:56 +02:00

65 lines
3.4 KiB
Diff

From: uazo <uazo@users.noreply.github.com>
Date: Sat, 29 Jan 2022 15:25:19 +0000
Subject: Enable StrictOriginIsolation and SitePerProcess flags
---
chrome/browser/chrome_content_browser_client.cc | 4 ++--
components/site_isolation/site_isolation_policy.cc | 2 ++
content/public/common/content_features.cc | 2 +-
3 files changed, 5 insertions(+), 3 deletions(-)
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
@@ -1273,7 +1273,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
registry->RegisterFilePathPref(prefs::kDiskCacheDir, base::FilePath());
registry->RegisterIntegerPref(prefs::kDiskCacheSize, 0);
registry->RegisterStringPref(prefs::kIsolateOrigins, std::string());
- registry->RegisterBooleanPref(prefs::kSitePerProcess, false);
+ registry->RegisterBooleanPref(prefs::kSitePerProcess, true);
registry->RegisterBooleanPref(prefs::kTabFreezingEnabled, true);
registry->RegisterIntegerPref(prefs::kSCTAuditingHashdanceReportCount, 0);
}
@@ -1287,7 +1287,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs(
// user policy in addition to the same named ones in Local State (which are
// used for mapping the command-line flags).
registry->RegisterStringPref(prefs::kIsolateOrigins, std::string());
- registry->RegisterBooleanPref(prefs::kSitePerProcess, false);
+ registry->RegisterBooleanPref(prefs::kSitePerProcess, true);
registry->RegisterListPref(
site_isolation::prefs::kUserTriggeredIsolatedOrigins);
registry->RegisterDictionaryPref(
diff --git a/components/site_isolation/site_isolation_policy.cc b/components/site_isolation/site_isolation_policy.cc
--- a/components/site_isolation/site_isolation_policy.cc
+++ b/components/site_isolation/site_isolation_policy.cc
@@ -86,6 +86,7 @@ bool SiteIsolationPolicy::IsIsolationForOAuthSitesEnabled() {
// static
bool SiteIsolationPolicy::IsEnterprisePolicyApplicable() {
+ if ((true)) return true;
#if BUILDFLAG(IS_ANDROID)
// https://crbug.com/844118: Limiting policy to devices with > 1GB RAM.
// Using 1077 rather than 1024 because 1) it helps ensure that devices with
@@ -101,6 +102,7 @@ bool SiteIsolationPolicy::IsEnterprisePolicyApplicable() {
// static
bool SiteIsolationPolicy::ShouldDisableSiteIsolationDueToMemoryThreshold(
content::SiteIsolationMode site_isolation_mode) {
+ if ((true)) return false;
// The memory threshold behavior differs for desktop and Android:
// - Android uses a 1900MB default threshold for partial site isolation modes
// and a 3200MB default threshold for strict site isolation. See docs in
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -936,7 +936,7 @@ const base::Feature kStorageServiceOutOfProcess{
// Controls whether site isolation should use origins instead of scheme and
// eTLD+1.
const base::Feature kStrictOriginIsolation{"StrictOriginIsolation",
- base::FEATURE_DISABLED_BY_DEFAULT};
+ base::FEATURE_ENABLED_BY_DEFAULT};
// Enables subresource loading with Web Bundles.
const base::Feature kSubresourceWebBundles{"SubresourceWebBundles",
--
2.25.1