aboutsummaryrefslogtreecommitdiff
path: root/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.cc
diff options
context:
space:
mode:
Diffstat (limited to 'www/iridium/files/patch-chrome_browser_chrome__content__browser__client.cc')
-rw-r--r--www/iridium/files/patch-chrome_browser_chrome__content__browser__client.cc142
1 files changed, 110 insertions, 32 deletions
diff --git a/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.cc b/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.cc
index 86a62da911fe..23047fa87aad 100644
--- a/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.cc
+++ b/www/iridium/files/patch-chrome_browser_chrome__content__browser__client.cc
@@ -1,6 +1,6 @@
---- chrome/browser/chrome_content_browser_client.cc.orig 2025-09-11 13:19:19 UTC
+--- chrome/browser/chrome_content_browser_client.cc.orig 2025-11-06 10:11:34 UTC
+++ chrome/browser/chrome_content_browser_client.cc
-@@ -467,7 +467,7 @@
+@@ -479,7 +479,7 @@
#include "components/user_manager/user_manager.h"
#include "services/service_manager/public/mojom/interface_provider_spec.mojom.h"
#include "storage/browser/file_system/external_mount_points.h"
@@ -9,16 +9,16 @@
#include "chrome/browser/chrome_browser_main_linux.h"
#include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h"
#elif BUILDFLAG(IS_ANDROID)
-@@ -565,7 +565,7 @@
- #include "services/network/public/mojom/permissions_policy/permissions_policy_feature.mojom.h"
- #endif // !BUILDFLAG(IS_ANDROID)
+@@ -577,7 +577,7 @@
+ #include "third_party/cros_system_api/switches/chrome_switches.h"
+ #endif // BUILDFLAG(IS_CHROMEOS)
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
#include "components/crash/core/app/crash_switches.h"
#include "components/crash/core/app/crashpad.h"
#endif
-@@ -574,7 +574,7 @@
+@@ -587,12 +587,12 @@
#include "components/crash/content/browser/crash_handler_host_linux.h"
#endif
@@ -27,7 +27,13 @@
#include "chrome/browser/enterprise/chrome_browser_main_extra_parts_enterprise.h"
#endif
-@@ -582,7 +582,7 @@
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+- BUILDFLAG(IS_CHROMEOS)
++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ #include "components/webapps/isolated_web_apps/scheme.h"
+ #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+ // BUILDFLAG(IS_CHROMEOS)
+@@ -601,7 +601,7 @@
#include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h"
#endif
@@ -36,7 +42,7 @@
#include "chrome/browser/chrome_browser_main_extra_parts_linux.h"
#elif BUILDFLAG(IS_OZONE)
#include "chrome/browser/chrome_browser_main_extra_parts_ozone.h"
-@@ -1406,7 +1406,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre
+@@ -1426,7 +1426,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre
registry->RegisterBooleanPref(prefs::kDataURLWhitespacePreservationEnabled,
true);
registry->RegisterBooleanPref(prefs::kEnableUnsafeSwiftShader, false);
@@ -45,7 +51,7 @@
registry->RegisterBooleanPref(prefs::kOutOfProcessSystemDnsResolutionEnabled,
true);
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)
-@@ -1628,7 +1628,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo
+@@ -1649,7 +1649,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo
#elif BUILDFLAG(IS_CHROMEOS)
main_parts = std::make_unique<ash::ChromeBrowserMainPartsAsh>(
is_integration_test, &startup_data_);
@@ -54,7 +60,7 @@
main_parts = std::make_unique<ChromeBrowserMainPartsLinux>(
is_integration_test, &startup_data_);
#elif BUILDFLAG(IS_ANDROID)
-@@ -1659,7 +1659,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo
+@@ -1680,7 +1680,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo
// Construct additional browser parts. Stages are called in the order in
// which they are added.
#if defined(TOOLKIT_VIEWS)
@@ -63,7 +69,7 @@
main_parts->AddParts(
std::make_unique<ChromeBrowserMainExtraPartsViewsLinux>());
#else
-@@ -1676,7 +1676,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo
+@@ -1697,7 +1697,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo
main_parts->AddParts(std::make_unique<ChromeBrowserMainExtraPartsAsh>());
#endif
@@ -72,7 +78,7 @@
main_parts->AddParts(std::make_unique<ChromeBrowserMainExtraPartsLinux>());
#elif BUILDFLAG(IS_OZONE)
main_parts->AddParts(std::make_unique<ChromeBrowserMainExtraPartsOzone>());
-@@ -1695,7 +1695,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo
+@@ -1716,7 +1716,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo
chrome::AddMetricsExtraParts(main_parts.get());
@@ -81,7 +87,25 @@
main_parts->AddParts(
std::make_unique<
enterprise_util::ChromeBrowserMainExtraPartsEnterprise>());
-@@ -2703,7 +2703,9 @@ void MaybeAppendBlinkSettingsSwitchForFieldTrial(
+@@ -1789,7 +1789,7 @@ ChromeContentBrowserClient::GetStoragePartitionConfigF
+
+ #if BUILDFLAG(ENABLE_EXTENSIONS)
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+- BUILDFLAG(IS_CHROMEOS)
++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ if (content::SiteIsolationPolicy::ShouldUrlUseApplicationIsolationLevel(
+ browser_context, site)) {
+ CHECK(url::Origin::Create(site).scheme() == webapps::kIsolatedAppScheme);
+@@ -2663,7 +2663,7 @@ bool ChromeContentBrowserClient::ShouldUrlUseApplicati
+ const GURL& url) {
+ #if BUILDFLAG(ENABLE_EXTENSIONS)
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+- BUILDFLAG(IS_CHROMEOS)
++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+
+ if (!content::AreIsolatedWebAppsEnabled(browser_context)) {
+ return false;
+@@ -2781,7 +2781,9 @@ void MaybeAppendBlinkSettingsSwitchForFieldTrial(
void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
base::CommandLine* command_line,
int child_process_id) {
@@ -91,7 +115,7 @@
#if BUILDFLAG(IS_MAC)
std::unique_ptr<metrics::ClientInfo> client_info =
GoogleUpdateSettings::LoadMetricsClientInfo();
-@@ -2712,7 +2714,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin
+@@ -2790,7 +2792,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin
client_info->client_id);
}
#elif BUILDFLAG(IS_POSIX)
@@ -100,7 +124,7 @@
pid_t pid;
if (crash_reporter::GetHandlerSocket(nullptr, &pid)) {
command_line->AppendSwitchASCII(
-@@ -3044,7 +3046,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin
+@@ -3123,7 +3125,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin
}
}
@@ -109,25 +133,25 @@
// Opt into a hardened stack canary mitigation if it hasn't already been
// force-disabled.
if (!browser_command_line.HasSwitch(switches::kChangeStackGuardOnFork)) {
-@@ -4109,7 +4111,7 @@ bool UpdatePreferredColorScheme(WebPreferences* web_pr
- return old_preferred_color_scheme != web_prefs->preferred_color_scheme;
- }
-
--#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
-+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
- // Sets the `root_scrollbar_theme_color` web pref if the user has enabled a
- // custom colored frame for the UI.
- void UpdateRootScrollbarThemeColor(Profile* profile,
-@@ -4752,7 +4754,7 @@ void ChromeContentBrowserClient::OverrideWebPreference
+@@ -4182,7 +4184,7 @@ GetPreferredColorScheme(const WebPreferences& web_pref
- UpdatePreferredColorScheme(web_prefs, main_frame_site.GetSiteURL(),
- web_contents, GetWebTheme());
+ std::optional<SkColor> GetRootScrollbarThemeColor(WebContents* web_contents) {
+ bool root_scrollbar_follows_browser_theme = false;
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_BSD)
- UpdateRootScrollbarThemeColor(profile, web_contents, web_prefs);
- #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)
-
-@@ -5030,7 +5032,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst
+ root_scrollbar_follows_browser_theme = base::FeatureList::IsEnabled(
+ blink::features::kRootScrollbarFollowsBrowserTheme);
+ #endif
+@@ -5071,7 +5073,7 @@ void ChromeContentBrowserClient::GetAdditionalAllowedS
+ additional_allowed_schemes->push_back(content::kChromeUIScheme);
+ additional_allowed_schemes->push_back(content::kChromeUIUntrustedScheme);
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+- BUILDFLAG(IS_CHROMEOS)
++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ additional_allowed_schemes->push_back(webapps::kIsolatedAppScheme);
+ #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
+ // BUILDFLAG(IS_CHROMEOS)
+@@ -5126,7 +5128,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst
}
}
@@ -136,7 +160,43 @@
void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
const base::CommandLine& command_line,
int child_process_id,
-@@ -7174,7 +7176,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS
+@@ -6002,7 +6004,7 @@ ChromeContentBrowserClient::CreateNonNetworkNavigation
+ }
+ #endif // BUILDFLAG(IS_CHROMEOS)
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+- BUILDFLAG(IS_CHROMEOS)
++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ if (scheme == webapps::kIsolatedAppScheme) {
+ if (content::AreIsolatedWebAppsEnabled(browser_context) &&
+ !browser_context->ShutdownStarted()) {
+@@ -6028,7 +6030,7 @@ void ChromeContentBrowserClient::
+ DCHECK(factories);
+
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+- BUILDFLAG(IS_CHROMEOS)
++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ if (content::AreIsolatedWebAppsEnabled(browser_context) &&
+ !browser_context->ShutdownStarted()) {
+ factories->emplace(webapps::kIsolatedAppScheme,
+@@ -6057,7 +6059,7 @@ void ChromeContentBrowserClient::
+ DCHECK(factories);
+
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+- BUILDFLAG(IS_CHROMEOS)
++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ if (content::AreIsolatedWebAppsEnabled(browser_context) &&
+ !browser_context->ShutdownStarted()) {
+ factories->emplace(webapps::kIsolatedAppScheme,
+@@ -6332,7 +6334,7 @@ void ChromeContentBrowserClient::
+ #endif // BUILDFLAG(IS_CHROMEOS)
+
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+- BUILDFLAG(IS_CHROMEOS)
++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ {
+ auto* rph = content::RenderProcessHost::FromID(render_process_id);
+ content::BrowserContext* browser_context = rph->GetBrowserContext();
+@@ -7302,7 +7304,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS
bool ChromeContentBrowserClient::ShouldRunOutOfProcessSystemDnsResolution() {
// This enterprise policy is supported on Android, but the feature will not be
// launched there.
@@ -145,3 +205,21 @@
// This is possibly called before `g_browser_process` is initialized.
PrefService* local_state;
if (g_browser_process) {
+@@ -7725,7 +7727,7 @@ void ChromeContentBrowserClient::
+ GrantAdditionalRequestPrivilegesToWorkerProcess(int child_id,
+ const GURL& script_url) {
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+- BUILDFLAG(IS_CHROMEOS)
++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ // IWA Service Workers need to be explicitly granted access to their origin
+ // because isolated-app: isn't a web-safe scheme that can be accessed by
+ // default.
+@@ -8102,7 +8104,7 @@ ChromeContentBrowserClient::GetAlternativeErrorPageOve
+ content::BrowserContext* browser_context,
+ int32_t error_code) {
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
+- BUILDFLAG(IS_CHROMEOS)
++ BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_BSD)
+ if (content::AreIsolatedWebAppsEnabled(browser_context) &&
+ url.SchemeIs(webapps::kIsolatedAppScheme)) {
+ content::mojom::AlternativeErrorPageOverrideInfoPtr