v116 merge SSPI patch

This commit is contained in:
Carmelo Messina
2023-08-05 13:42:55 +02:00
parent 7e088a9a52
commit 9063dd14a6
3 changed files with 36 additions and 53 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ translate-disable-fetching-of-languages-from-server.patch
Offer-builtin-autocomplete-for-chrome-flags.patch
Use-4-tile-rows-never-show-logo.patch
Disable-various-metrics.patch
Enable-SPPI-for-devices-with-enough-memory.patch
Enable-StrictOriginIsolation-and-SitePerProcess.patch
Use-64-bit-WebView-processes.patch
prefs-always-prompt-for-download-directory.patch
@@ -1,44 +0,0 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Sun, 17 Mar 2019 19:09:00 +0100
Subject: Enable SPPI for devices with enough memory
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
chrome/common/chrome_features.cc | 8 ++------
components/site_isolation/features.cc | 4 ++--
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
--- a/chrome/common/chrome_features.cc
+++ b/chrome/common/chrome_features.cc
@@ -1083,12 +1083,8 @@ BASE_FEATURE(kSecurityKeyAttestationPrompt,
// TODO(alexmos): Move this and the other site isolation features below to
// browser_features, as they are only used on the browser side.
BASE_FEATURE(kSitePerProcess,
- "SitePerProcess",
-#if BUILDFLAG(IS_ANDROID)
- base::FEATURE_DISABLED_BY_DEFAULT
-#else
- base::FEATURE_ENABLED_BY_DEFAULT
-#endif
+ "SitePerProcess", // enabled by default
+ base::FEATURE_ENABLED_BY_DEFAULT // in Bromite
);
#if BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/components/site_isolation/features.cc b/components/site_isolation/features.cc
--- a/components/site_isolation/features.cc
+++ b/components/site_isolation/features.cc
@@ -60,8 +60,8 @@ BASE_FEATURE(kSiteIsolationForOAuthSites,
// kSitePerProcess won't be checked at all, and field trials won't activate
// either the control or the experiment group.
BASE_FEATURE(kSiteIsolationMemoryThresholds,
- "SiteIsolationMemoryThresholds",
- base::FEATURE_DISABLED_BY_DEFAULT);
+ "SiteIsolationMemoryThresholds", // must be enabled
+ base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite
const char kStrictSiteIsolationMemoryThresholdParamName[] =
"strict_site_isolation_threshold_mb";
const char kPartialSiteIsolationMemoryThresholdParamName[] =
--
2.25.1
@@ -11,14 +11,15 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
chrome/browser/about_flags.cc | 3 ---
chrome/browser/chrome_content_browser_client.cc | 4 ++--
components/site_isolation/site_isolation_policy.cc | 2 ++
chrome/common/chrome_features.cc | 8 ++------
components/site_isolation/site_isolation_policy.cc | 3 +++
content/public/common/content_features.cc | 4 ++--
4 files changed, 6 insertions(+), 7 deletions(-)
5 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -4773,9 +4773,6 @@ const FeatureEntry kFeatureEntries[] = {
@@ -4768,9 +4768,6 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kSiteIsolationForPasswordSitesDescription, kOsAndroid,
FEATURE_VALUE_TYPE(
site_isolation::features::kSiteIsolationForPasswordSites)},
@@ -31,7 +32,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
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
@@ -1575,7 +1575,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
@@ -1572,7 +1572,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
registry->RegisterFilePathPref(prefs::kDiskCacheDir, base::FilePath());
registry->RegisterIntegerPref(prefs::kDiskCacheSize, 0);
registry->RegisterStringPref(prefs::kIsolateOrigins, std::string());
@@ -40,7 +41,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
registry->RegisterBooleanPref(prefs::kTabFreezingEnabled, true);
registry->RegisterIntegerPref(prefs::kSCTAuditingHashdanceReportCount, 0);
registry->RegisterBooleanPref(
@@ -1597,7 +1597,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs(
@@ -1594,7 +1594,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());
@@ -49,10 +50,36 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
registry->RegisterListPref(
site_isolation::prefs::kUserTriggeredIsolatedOrigins);
registry->RegisterDictionaryPref(
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
--- a/chrome/common/chrome_features.cc
+++ b/chrome/common/chrome_features.cc
@@ -1076,12 +1076,8 @@ BASE_FEATURE(kSecurityKeyAttestationPrompt,
// TODO(alexmos): Move this and the other site isolation features below to
// browser_features, as they are only used on the browser side.
BASE_FEATURE(kSitePerProcess,
- "SitePerProcess",
-#if BUILDFLAG(IS_ANDROID)
- base::FEATURE_DISABLED_BY_DEFAULT
-#else
- base::FEATURE_ENABLED_BY_DEFAULT
-#endif
+ "SitePerProcess", // enabled by default
+ base::FEATURE_ENABLED_BY_DEFAULT // in Bromite
);
#if BUILDFLAG(IS_CHROMEOS_ASH)
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
@@ -164,6 +164,7 @@ bool SiteIsolationPolicy::IsIsolationForOAuthSitesEnabled() {
@@ -38,6 +38,7 @@ struct IsolationDisableDecisions {
bool ShouldDisableSiteIsolationDueToMemorySlow(
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
@@ -164,6 +165,7 @@ bool SiteIsolationPolicy::IsIsolationForOAuthSitesEnabled() {
// static
bool SiteIsolationPolicy::IsEnterprisePolicyApplicable() {
@@ -60,7 +87,7 @@ diff --git a/components/site_isolation/site_isolation_policy.cc b/components/sit
#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
@@ -179,6 +180,7 @@ bool SiteIsolationPolicy::IsEnterprisePolicyApplicable() {
@@ -179,6 +181,7 @@ bool SiteIsolationPolicy::IsEnterprisePolicyApplicable() {
// static
bool SiteIsolationPolicy::ShouldDisableSiteIsolationDueToMemoryThreshold(
content::SiteIsolationMode site_isolation_mode) {
@@ -71,7 +98,7 @@ diff --git a/components/site_isolation/site_isolation_policy.cc b/components/sit
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
@@ -1269,8 +1269,8 @@ BASE_FEATURE(kStopVideoCaptureOnScreenLock,
@@ -1255,8 +1255,8 @@ BASE_FEATURE(kStopVideoCaptureOnScreenLock,
// Controls whether site isolation should use origins instead of scheme and
// eTLD+1.
BASE_FEATURE(kStrictOriginIsolation,