81 lines
4.5 KiB
Diff
81 lines
4.5 KiB
Diff
From: uazo <uazo@users.noreply.github.com>
|
|
Date: Sat, 29 Jan 2022 15:25:19 +0000
|
|
Subject: Enable StrictOriginIsolation and SitePerProcess
|
|
|
|
Enable the StrictOriginIsolation feature and the SitePerProcess preference.
|
|
SitePerProcess: bypass any device memory size check.
|
|
SitePerProcess: always consider enterprise policies applicable.
|
|
|
|
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/browser/chrome_content_browser_client.cc | 4 ++--
|
|
components/site_isolation/site_isolation_policy.cc | 3 +++
|
|
.../Enable-StrictOriginIsolation-and-SitePerProcess.inc | 1 +
|
|
.../Enable-StrictOriginIsolation-and-SitePerProcess.inc | 1 +
|
|
4 files changed, 7 insertions(+), 2 deletions(-)
|
|
create mode 100644 cromite_flags/chrome/common/chrome_features_cc/Enable-StrictOriginIsolation-and-SitePerProcess.inc
|
|
create mode 100644 cromite_flags/content/public/common/content_features_cc/Enable-StrictOriginIsolation-and-SitePerProcess.inc
|
|
|
|
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
|
|
@@ -1521,7 +1521,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);
|
|
registry->RegisterBooleanPref(prefs::kDataURLWhitespacePreservationEnabled,
|
|
@@ -1545,7 +1545,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
|
|
@@ -37,6 +37,7 @@ struct IsolationDisableDecisions {
|
|
|
|
bool ShouldDisableSiteIsolationDueToMemorySlow(
|
|
content::SiteIsolationMode site_isolation_mode) {
|
|
+ if ((true)) return false;
|
|
#if BUILDFLAG(IS_ANDROID)
|
|
if (!base::FeatureList::IsEnabled(
|
|
features::kSiteIsolationEnableMemoryThresholdAndroid)) {
|
|
@@ -216,6 +217,7 @@ bool SiteIsolationPolicy::IsOriginIsolationForJsOptExceptionsSupported() {
|
|
|
|
// 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 it helps ensure that devices with
|
|
@@ -232,6 +234,7 @@ bool SiteIsolationPolicy::IsEnterprisePolicyApplicable() {
|
|
// static
|
|
bool SiteIsolationPolicy::ShouldDisableSiteIsolationDueToMemoryThreshold(
|
|
content::SiteIsolationMode site_isolation_mode) {
|
|
+ if ((true)) return false;
|
|
if (!g_disallow_memory_threshold_caching_for_testing) {
|
|
return CachedDisableSiteIsolation(site_isolation_mode);
|
|
}
|
|
diff --git a/cromite_flags/chrome/common/chrome_features_cc/Enable-StrictOriginIsolation-and-SitePerProcess.inc b/cromite_flags/chrome/common/chrome_features_cc/Enable-StrictOriginIsolation-and-SitePerProcess.inc
|
|
new file mode 100644
|
|
--- /dev/null
|
|
+++ b/cromite_flags/chrome/common/chrome_features_cc/Enable-StrictOriginIsolation-and-SitePerProcess.inc
|
|
@@ -0,0 +1 @@
|
|
+SET_CROMITE_FEATURE_ENABLED(kSitePerProcess);
|
|
diff --git a/cromite_flags/content/public/common/content_features_cc/Enable-StrictOriginIsolation-and-SitePerProcess.inc b/cromite_flags/content/public/common/content_features_cc/Enable-StrictOriginIsolation-and-SitePerProcess.inc
|
|
new file mode 100644
|
|
--- /dev/null
|
|
+++ b/cromite_flags/content/public/common/content_features_cc/Enable-StrictOriginIsolation-and-SitePerProcess.inc
|
|
@@ -0,0 +1 @@
|
|
+SET_CROMITE_FEATURE_ENABLED(kStrictOriginIsolation);
|
|
--
|