Update to Chromium version 133.0.6886.0 (#1393452)

This commit is contained in:
Marshall Greenblatt
2024-12-09 12:58:46 -05:00
parent 5fcb2d36e5
commit 7dd2398be2
81 changed files with 634 additions and 722 deletions

View File

@ -1,5 +1,5 @@
diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc
index 4569ff21cd37e..33749b8187efa 100644
index 901809233186a..be847ede0827b 100644
--- chrome/app/chrome_main_delegate.cc
+++ chrome/app/chrome_main_delegate.cc
@@ -42,6 +42,7 @@
@ -10,7 +10,7 @@ index 4569ff21cd37e..33749b8187efa 100644
#include "chrome/browser/buildflags.h"
#include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/chrome_resource_bundle_helper.h"
@@ -572,6 +573,7 @@ struct MainFunction {
@@ -571,6 +572,7 @@ struct MainFunction {
int (*function)(content::MainFunctionParams);
};
@ -18,7 +18,7 @@ index 4569ff21cd37e..33749b8187efa 100644
// Initializes the user data dir. Must be called before InitializeLocalState().
void InitializeUserDataDir(base::CommandLine* command_line) {
#if BUILDFLAG(IS_CHROMEOS_LACROS)
@@ -655,6 +657,7 @@ void InitializeUserDataDir(base::CommandLine* command_line) {
@@ -654,6 +656,7 @@ void InitializeUserDataDir(base::CommandLine* command_line) {
command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir);
#endif // BUILDFLAG(IS_WIN)
}
@ -26,7 +26,7 @@ index 4569ff21cd37e..33749b8187efa 100644
#if !BUILDFLAG(IS_ANDROID)
void InitLogging(const std::string& process_type) {
@@ -790,6 +793,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
@@ -789,6 +792,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
ChromeMainDelegate::~ChromeMainDelegate() = default;
#endif // !BUILDFLAG(IS_ANDROID)
@ -37,7 +37,7 @@ index 4569ff21cd37e..33749b8187efa 100644
std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
InvokedIn invoked_in) {
DUMP_WILL_BE_CHECK(base::ThreadPoolInstance::Get());
@@ -815,7 +822,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
@@ -814,7 +821,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
// future session's metrics.
DeferBrowserMetrics(user_data_dir);
@ -46,7 +46,7 @@ index 4569ff21cd37e..33749b8187efa 100644
// In the case the process is not the singleton process, the uninstall tasks
// need to be executed here. A window will be displayed asking to close all
// running instances.
@@ -962,7 +969,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
@@ -966,7 +973,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
// Initializes the resource bundle and determines the locale.
std::string actual_locale = LoadLocalState(
@ -56,7 +56,7 @@ index 4569ff21cd37e..33749b8187efa 100644
chrome_feature_list_creator->SetApplicationLocale(actual_locale);
chrome_feature_list_creator->OverrideCachedUIStrings();
@@ -979,6 +987,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
@@ -983,6 +991,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
new net::NetworkChangeNotifierFactoryAndroid());
#endif
@ -65,7 +65,7 @@ index 4569ff21cd37e..33749b8187efa 100644
if (base::FeatureList::IsEnabled(
features::kWriteBasicSystemProfileToPersistentHistogramsFile)) {
bool record = true;
@@ -989,6 +999,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
@@ -993,6 +1003,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
if (record)
chrome_content_browser_client_->startup_data()->RecordCoreSystemProfile();
}
@ -73,7 +73,7 @@ index 4569ff21cd37e..33749b8187efa 100644
#if BUILDFLAG(IS_ANDROID)
UmaSessionStats::OnStartup();
@@ -1032,8 +1043,8 @@ void ChromeMainDelegate::CreateThreadPool(std::string_view name) {
@@ -1036,8 +1047,8 @@ void ChromeMainDelegate::CreateThreadPool(std::string_view name) {
std::make_unique<ChromeThreadProfilerClient>());
// `ChromeMainDelegateAndroid::PreSandboxStartup` creates the profiler a little
@ -84,7 +84,7 @@ index 4569ff21cd37e..33749b8187efa 100644
// Start the sampling profiler as early as possible - namely, once the thread
// pool has been created.
sampling_profiler_ = std::make_unique<MainThreadStackSamplingProfiler>();
@@ -1431,6 +1442,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1435,6 +1446,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
std::string process_type =
command_line.GetSwitchValueASCII(switches::kProcessType);
@ -92,7 +92,7 @@ index 4569ff21cd37e..33749b8187efa 100644
crash_reporter::InitializeCrashKeys();
#if BUILDFLAG(IS_POSIX)
@@ -1446,6 +1458,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1450,6 +1462,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
if (chrome::ProcessNeedsProfileDir(process_type)) {
InitializeUserDataDir(base::CommandLine::ForCurrentProcess());
}
@ -100,7 +100,7 @@ index 4569ff21cd37e..33749b8187efa 100644
// Register component_updater PathProvider after DIR_USER_DATA overridden by
// command line flags. Maybe move the chrome PathProvider down here also?
@@ -1549,7 +1562,8 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1553,7 +1566,8 @@ void ChromeMainDelegate::PreSandboxStartup() {
#else
const std::string loaded_locale =
ui::ResourceBundle::InitSharedInstanceWithLocale(
@ -110,7 +110,7 @@ index 4569ff21cd37e..33749b8187efa 100644
base::FilePath resources_pack_path;
base::PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
@@ -1559,6 +1573,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1563,6 +1577,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale;
}
@ -118,7 +118,7 @@ index 4569ff21cd37e..33749b8187efa 100644
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
// Zygote needs to call InitCrashReporter() in RunZygote().
if (process_type != switches::kZygoteProcess &&
@@ -1595,6 +1610,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1599,6 +1614,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
// After all the platform Breakpads have been initialized, store the command
// line for crash reporting.
crash_keys::SetCrashKeysFromCommandLine(command_line);
@ -126,7 +126,7 @@ index 4569ff21cd37e..33749b8187efa 100644
#if BUILDFLAG(ENABLE_PDF)
MaybePatchGdiGetFontData();
@@ -1713,6 +1729,7 @@ void ChromeMainDelegate::ZygoteForked() {
@@ -1717,6 +1733,7 @@ void ChromeMainDelegate::ZygoteForked() {
SetUpProfilingShutdownHandler();
}
@ -134,7 +134,7 @@ index 4569ff21cd37e..33749b8187efa 100644
// Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets
// this up for the browser process in a different manner.
const base::CommandLine* command_line =
@@ -1725,6 +1742,7 @@ void ChromeMainDelegate::ZygoteForked() {
@@ -1729,6 +1746,7 @@ void ChromeMainDelegate::ZygoteForked() {
// Reset the command line for the newly spawned process.
crash_keys::SetCrashKeysFromCommandLine(*command_line);
@ -142,7 +142,7 @@ index 4569ff21cd37e..33749b8187efa 100644
}
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
@@ -1835,6 +1853,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
@@ -1839,6 +1857,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
: memory_system::DispatcherParameters::
AllocationTraceRecorderInclusion::kIgnore;
@ -150,7 +150,7 @@ index 4569ff21cd37e..33749b8187efa 100644
memory_system::Initializer()
.SetGwpAsanParameters(gwp_asan_boost_sampling, process_type)
.SetProfilingClientParameters(chrome::GetChannel(),
@@ -1842,5 +1861,5 @@ void ChromeMainDelegate::InitializeMemorySystem() {
@@ -1846,5 +1865,5 @@ void ChromeMainDelegate::InitializeMemorySystem() {
.SetDispatcherParameters(memory_system::DispatcherParameters::
PoissonAllocationSamplerInclusion::kEnforce,
allocation_recorder_inclusion, process_type)
@ -232,7 +232,7 @@ index 8f5c477acba39..ff2f90a8bf27b 100644
base::PathService::OverrideAndCreateIfNeeded(
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
index d202767ab4f3f..41106d7b31e43 100644
index efdb429cbe04e..17e949d631200 100644
--- chrome/browser/chrome_browser_main.cc
+++ chrome/browser/chrome_browser_main.cc
@@ -52,6 +52,7 @@
@ -393,7 +393,7 @@ index d202767ab4f3f..41106d7b31e43 100644
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
// Execute first run specific code after the PrefService has been initialized
// and preferences have been registered since some of the import code depends
@@ -1721,6 +1734,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1715,6 +1728,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
*base::CommandLine::ForCurrentProcess());
}
#endif // BUILDFLAG(IS_WIN)
@ -401,7 +401,7 @@ index d202767ab4f3f..41106d7b31e43 100644
// Configure modules that need access to resources.
net::NetModule::SetResourceProvider(ChromeNetResourceProvider);
@@ -1812,6 +1826,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1806,6 +1820,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
g_browser_process->profile_manager()->GetLastOpenedProfiles();
}
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
@ -413,7 +413,7 @@ index d202767ab4f3f..41106d7b31e43 100644
// This step is costly.
if (browser_creator_->Start(*base::CommandLine::ForCurrentProcess(),
base::FilePath(), profile_info,
@@ -1844,11 +1863,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1838,11 +1857,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Create the RunLoop for MainMessageLoopRun() to use and transfer
// ownership of the browser's lifetime to the BrowserProcess.
@ -465,7 +465,7 @@ index e26e3625c99c8..c0d4a95607e37 100644
+#endif
}
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
index 25b5c325f612d..76fdebb99df6c 100644
index e87d1bce19d63..43596857c5b8c 100644
--- chrome/browser/chrome_content_browser_client.cc
+++ chrome/browser/chrome_content_browser_client.cc
@@ -48,6 +48,7 @@
@ -474,9 +474,9 @@ index 25b5c325f612d..76fdebb99df6c 100644
#include "build/config/chromebox_for_meetings/buildflags.h" // PLATFORM_CFM
+#include "cef/libcef/features/features.h"
#include "chrome/browser/after_startup_task_utils.h"
#include "chrome/browser/ai/ai_manager_keyed_service_factory.h"
#include "chrome/browser/ai/ai_manager.h"
#include "chrome/browser/app_mode/app_mode_utils.h"
@@ -1516,6 +1517,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
@@ -1533,6 +1534,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
}
ChromeContentBrowserClient::ChromeContentBrowserClient() {
@ -485,7 +485,7 @@ index 25b5c325f612d..76fdebb99df6c 100644
#if BUILDFLAG(ENABLE_PLUGINS)
extra_parts_.push_back(
std::make_unique<ChromeContentBrowserClientPluginsPart>());
@@ -1553,6 +1556,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
@@ -1570,6 +1573,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
}
}
@ -497,7 +497,7 @@ index 25b5c325f612d..76fdebb99df6c 100644
// static
void ChromeContentBrowserClient::RegisterLocalStatePrefs(
PrefRegistrySimple* registry) {
@@ -4017,28 +4025,25 @@ bool UpdatePreferredColorScheme(WebPreferences* web_prefs,
@@ -4041,30 +4049,25 @@ bool UpdatePreferredColorScheme(WebPreferences* web_prefs,
web_prefs->preferred_color_scheme;
}
#else
@ -510,8 +510,10 @@ index 25b5c325f612d..76fdebb99df6c 100644
- Profile::FromBrowserContext(web_contents->GetBrowserContext())) {
- if (ThemeService* theme_service =
- ThemeServiceFactory::GetForProfile(profile)) {
- using_different_colored_frame = !theme_service->UsingDefaultTheme() ||
- theme_service->GetUserColor().has_value();
- using_different_colored_frame =
- !theme_service->UsingDefaultTheme() ||
- theme_service->GetUserColor().has_value() ||
- theme_service->UsingDeviceTheme();
- }
+ auto preferred_color_scheme = native_theme->GetPreferredColorScheme();
+
@ -543,7 +545,7 @@ index 25b5c325f612d..76fdebb99df6c 100644
#endif // BUILDFLAG(IS_ANDROID)
// Reauth WebUI doesn't support dark mode yet because it shares the dialog
@@ -4794,9 +4799,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
@@ -4820,9 +4823,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
&search::HandleNewTabURLReverseRewrite);
#endif // BUILDFLAG(IS_ANDROID)
@ -555,7 +557,7 @@ index 25b5c325f612d..76fdebb99df6c 100644
}
base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
@@ -6903,7 +6910,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
@@ -6933,7 +6938,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
#endif
}
@ -564,7 +566,7 @@ index 25b5c325f612d..76fdebb99df6c 100644
content::BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -6921,6 +6928,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
@@ -6951,6 +6956,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
network_context_params->accept_language = GetApplicationLocale();
}
@ -573,7 +575,7 @@ index 25b5c325f612d..76fdebb99df6c 100644
}
std::vector<base::FilePath>
@@ -8087,11 +8096,11 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
@@ -8078,11 +8085,11 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
const auto now = base::TimeTicks::Now();
const auto timeout = GetKeepaliveTimerTimeout(context);
keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout);
@ -587,7 +589,7 @@ index 25b5c325f612d..76fdebb99df6c 100644
FROM_HERE, keepalive_deadline_ - now,
base::BindOnce(
&ChromeContentBrowserClient::OnKeepaliveTimerFired,
@@ -8113,7 +8122,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
@@ -8104,7 +8111,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
--num_keepalive_requests_;
if (num_keepalive_requests_ == 0) {
DVLOG(1) << "Stopping the keepalive timer";
@ -597,7 +599,7 @@ index 25b5c325f612d..76fdebb99df6c 100644
// This deletes the keep alive handle attached to the timer function and
// unblock the shutdown sequence.
}
@@ -8288,7 +8298,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
@@ -8279,7 +8287,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
const auto now = base::TimeTicks::Now();
const auto then = keepalive_deadline_;
if (now < then) {
@ -607,10 +609,10 @@ index 25b5c325f612d..76fdebb99df6c 100644
base::BindOnce(&ChromeContentBrowserClient::OnKeepaliveTimerFired,
weak_factory_.GetWeakPtr(),
diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h
index 5d587e8473cb2..5fd83e7515ba5 100644
index 7317a435cae03..ce4826d7a6276 100644
--- chrome/browser/chrome_content_browser_client.h
+++ chrome/browser/chrome_content_browser_client.h
@@ -148,6 +148,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -156,6 +156,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
~ChromeContentBrowserClient() override;
@ -619,7 +621,7 @@ index 5d587e8473cb2..5fd83e7515ba5 100644
// TODO(crbug.com/41356866): This file is about calls from content/ out
// to chrome/ to get values or notify about events, but both of these
// functions are from chrome/ to chrome/ and don't involve content/ at all.
@@ -716,7 +718,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -727,7 +729,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
override;
void OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) override;
@ -628,7 +630,7 @@ index 5d587e8473cb2..5fd83e7515ba5 100644
content::BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -1274,7 +1276,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -1309,7 +1311,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
#if !BUILDFLAG(IS_ANDROID)
uint64_t num_keepalive_requests_ = 0;
@ -638,7 +640,7 @@ index 5d587e8473cb2..5fd83e7515ba5 100644
#endif
diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc
index a6002045888c4..6b96b3891822f 100644
index 39ec9e16a28b1..4f4a0307f5a9f 100644
--- chrome/browser/prefs/browser_prefs.cc
+++ chrome/browser/prefs/browser_prefs.cc
@@ -16,6 +16,7 @@
@ -660,7 +662,7 @@ index a6002045888c4..6b96b3891822f 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/accessibility/animation_policy_prefs.h"
#include "chrome/browser/apps/platform_apps/shortcut_manager.h"
@@ -1843,7 +1848,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
@@ -1929,7 +1934,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
#endif // BUILDFLAG(IS_WIN)
@ -670,7 +672,7 @@ index a6002045888c4..6b96b3891822f 100644
downgrade::RegisterPrefs(registry);
#endif
@@ -1896,6 +1902,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
@@ -1988,6 +1994,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
// This is intentionally last.
RegisterLocalStatePrefsForMigration(registry);
@ -682,7 +684,7 @@ index a6002045888c4..6b96b3891822f 100644
}
// Register prefs applicable to all profiles.
@@ -2344,6 +2355,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
@@ -2434,6 +2445,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
const std::string& locale) {
RegisterProfilePrefs(registry, locale);