diff options
Diffstat (limited to 'www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.cc')
| -rw-r--r-- | www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.cc | 140 |
1 files changed, 109 insertions, 31 deletions
diff --git a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.cc b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.cc index fea4d42ebf5f..48454a160090 100644 --- a/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.cc +++ b/www/ungoogled-chromium/files/patch-chrome_browser_chrome__content__browser__client.cc @@ -1,6 +1,6 @@ ---- chrome/browser/chrome_content_browser_client.cc.orig 2025-09-10 13:22:16 UTC +--- chrome/browser/chrome_content_browser_client.cc.orig 2025-11-01 06:40:37 UTC +++ chrome/browser/chrome_content_browser_client.cc -@@ -466,7 +466,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) -@@ -564,7 +564,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 -@@ -573,7 +573,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 -@@ -581,7 +581,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" -@@ -1409,7 +1409,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePre +@@ -1430,7 +1430,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) -@@ -1631,7 +1631,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1653,7 +1653,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) -@@ -1662,7 +1662,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1684,7 +1684,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 -@@ -1679,7 +1679,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1701,7 +1701,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>()); -@@ -1698,7 +1698,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo +@@ -1720,7 +1720,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(boo chrome::AddMetricsExtraParts(main_parts.get()); @@ -81,7 +87,25 @@ main_parts->AddParts( std::make_unique< enterprise_util::ChromeBrowserMainExtraPartsEnterprise>()); -@@ -2706,7 +2706,9 @@ void MaybeAppendBlinkSettingsSwitchForFieldTrial( +@@ -1793,7 +1793,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); +@@ -2667,7 +2667,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; +@@ -2785,7 +2785,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(); -@@ -3029,7 +3031,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin +@@ -3109,7 +3111,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin } } @@ -100,25 +124,25 @@ // Opt into a hardened stack canary mitigation if it hasn't already been // force-disabled. if (!browser_command_line.HasSwitch(switches::kChangeStackGuardOnFork)) { -@@ -4094,7 +4096,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, -@@ -4737,7 +4739,7 @@ void ChromeContentBrowserClient::OverrideWebPreference +@@ -4168,7 +4170,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) - -@@ -5015,7 +5017,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst + root_scrollbar_follows_browser_theme = base::FeatureList::IsEnabled( + blink::features::kRootScrollbarFollowsBrowserTheme); + #endif +@@ -5057,7 +5059,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) +@@ -5112,7 +5114,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst } } @@ -127,7 +151,43 @@ void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( const base::CommandLine& command_line, int child_process_id, -@@ -7159,7 +7161,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS +@@ -5988,7 +5990,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()) { +@@ -6014,7 +6016,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, +@@ -6043,7 +6045,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, +@@ -6318,7 +6320,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(); +@@ -7288,7 +7290,7 @@ bool ChromeContentBrowserClient::ShouldSandboxNetworkS bool ChromeContentBrowserClient::ShouldRunOutOfProcessSystemDnsResolution() { // This enterprise policy is supported on Android, but the feature will not be // launched there. @@ -136,3 +196,21 @@ // This is possibly called before `g_browser_process` is initialized. PrefService* local_state; if (g_browser_process) { +@@ -7711,7 +7713,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. +@@ -8088,7 +8090,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 |
