Update to Chromium version 98.0.4758.0 (#950365)

This commit is contained in:
Marshall Greenblatt
2021-12-16 17:35:54 -05:00
parent b76badd958
commit dfc0131516
109 changed files with 785 additions and 798 deletions

View File

@@ -1,5 +1,5 @@
diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc
index 50654aa1cecba..4e545d447109e 100644
index cd9b3030c6f3a..1dfa03db19ca8 100644
--- chrome/app/chrome_main_delegate.cc
+++ chrome/app/chrome_main_delegate.cc
@@ -30,6 +30,7 @@
@@ -10,7 +10,7 @@ index 50654aa1cecba..4e545d447109e 100644
#include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/chrome_resource_bundle_helper.h"
#include "chrome/browser/defaults.h"
@@ -388,6 +389,8 @@ struct MainFunction {
@@ -389,6 +390,8 @@ struct MainFunction {
// Initializes the user data dir. Must be called before InitializeLocalState().
void InitializeUserDataDir(base::CommandLine* command_line) {
@@ -19,7 +19,7 @@ index 50654aa1cecba..4e545d447109e 100644
#if defined(OS_WIN)
// Reach out to chrome_elf for the truth on the user data directory.
// Note that in tests, this links to chrome_elf_test_stubs.
@@ -714,7 +717,9 @@ void ChromeMainDelegate::PostFieldTrialInitialization() {
@@ -720,7 +723,9 @@ void ChromeMainDelegate::PostFieldTrialInitialization() {
}
#if defined(OS_WIN)
@@ -29,7 +29,7 @@ index 50654aa1cecba..4e545d447109e 100644
base::sequence_manager::internal::ThreadControllerPowerMonitor::
InitializeOnMainThread();
#endif
@@ -1012,6 +1017,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1018,6 +1023,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
std::string process_type =
command_line.GetSwitchValueASCII(switches::kProcessType);
@@ -37,7 +37,7 @@ index 50654aa1cecba..4e545d447109e 100644
crash_reporter::InitializeCrashKeys();
#if defined(OS_POSIX)
@@ -1022,6 +1028,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1028,6 +1034,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
InitMacCrashReporter(command_line, process_type);
SetUpInstallerPreferences(command_line);
#endif
@@ -45,7 +45,7 @@ index 50654aa1cecba..4e545d447109e 100644
#if defined(OS_WIN)
child_process_logging::Init();
@@ -1148,6 +1155,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1154,6 +1161,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
locale;
}
@@ -53,7 +53,7 @@ index 50654aa1cecba..4e545d447109e 100644
#if defined(OS_POSIX) && !defined(OS_MAC)
// Zygote needs to call InitCrashReporter() in RunZygote().
if (process_type != switches::kZygoteProcess) {
@@ -1180,6 +1188,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1186,6 +1194,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
// After all the platform Breakpads have been initialized, store the command
// line for crash reporting.
crash_keys::SetCrashKeysFromCommandLine(command_line);
@@ -61,7 +61,7 @@ index 50654aa1cecba..4e545d447109e 100644
#if BUILDFLAG(ENABLE_PDF)
MaybePatchGdiGetFontData();
@@ -1278,6 +1287,7 @@ void ChromeMainDelegate::ZygoteForked() {
@@ -1284,6 +1293,7 @@ void ChromeMainDelegate::ZygoteForked() {
SetUpProfilingShutdownHandler();
}
@@ -69,7 +69,7 @@ index 50654aa1cecba..4e545d447109e 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 =
@@ -1294,6 +1304,7 @@ void ChromeMainDelegate::ZygoteForked() {
@@ -1300,6 +1310,7 @@ void ChromeMainDelegate::ZygoteForked() {
// Reset the command line for the newly spawned process.
crash_keys::SetCrashKeysFromCommandLine(*command_line);
@@ -78,10 +78,10 @@ index 50654aa1cecba..4e545d447109e 100644
#endif // defined(OS_LINUX) || defined(OS_CHROMEOS)
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
index 98cc7f60b50f1..21d5ef9c23c7b 100644
index a0e5e4fd7d01d..dc1fc12234d59 100644
--- chrome/browser/chrome_browser_main.cc
+++ chrome/browser/chrome_browser_main.cc
@@ -50,6 +50,7 @@
@@ -51,6 +51,7 @@
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "cc/base/switches.h"
@@ -89,19 +89,7 @@ index 98cc7f60b50f1..21d5ef9c23c7b 100644
#include "chrome/browser/about_flags.h"
#include "chrome/browser/active_use_util.h"
#include "chrome/browser/after_startup_task_utils.h"
@@ -919,8 +920,10 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
#if !defined(OS_ANDROID)
// Create the RunLoop for MainMessageLoopRun() to use, and pass a copy of
// its QuitClosure to the BrowserProcessImpl to call when it is time to exit.
+ // CEF with the Chrome runtime will create and manage its own RunLoop.
DCHECK(!GetMainRunLoopInstance());
- GetMainRunLoopInstance() = std::make_unique<base::RunLoop>();
+ if (!cef::IsChromeRuntimeEnabled())
+ GetMainRunLoopInstance() = std::make_unique<base::RunLoop>();
// These members must be initialized before returning from this function.
// Android doesn't use StartupBrowserCreator.
@@ -1692,11 +1695,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1700,11 +1701,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// This step is costly and is already measured in
// Startup.StartupBrowserCreator_Start.
// See the comment above for an explanation of |process_command_line|.
@@ -117,8 +105,20 @@ index 98cc7f60b50f1..21d5ef9c23c7b 100644
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
// of lacros-chrome is complete.
#if defined(OS_WIN) || (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
@@ -1739,8 +1743,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Create the RunLoop for MainMessageLoopRun() to use and transfer
// ownership of the browser's lifetime to the BrowserProcess.
+ // CEF with the Chrome runtime will create and manage its own RunLoop.
DCHECK(!GetMainRunLoopInstance());
- GetMainRunLoopInstance() = std::make_unique<base::RunLoop>();
+ if (!cef::IsChromeRuntimeEnabled())
+ GetMainRunLoopInstance() = std::make_unique<base::RunLoop>();
browser_process_->SetQuitClosure(
GetMainRunLoopInstance()->QuitWhenIdleClosure());
}
diff --git chrome/browser/chrome_browser_main_mac.mm chrome/browser/chrome_browser_main_mac.mm
index 95d1ebc190910..13cdfa52db108 100644
index 97afd5b1ba753..40672e7c4fdf3 100644
--- chrome/browser/chrome_browser_main_mac.mm
+++ chrome/browser/chrome_browser_main_mac.mm
@@ -16,6 +16,7 @@
@@ -156,7 +156,7 @@ index 95d1ebc190910..13cdfa52db108 100644
+#endif
}
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
index c640ba0cc074e..0f099b6a88b40 100644
index d0eaa02d9f955..ce5d9aaaf4509 100644
--- chrome/browser/chrome_content_browser_client.cc
+++ chrome/browser/chrome_content_browser_client.cc
@@ -28,6 +28,7 @@
@@ -167,7 +167,7 @@ index c640ba0cc074e..0f099b6a88b40 100644
#include "chrome/browser/accessibility/accessibility_labels_service.h"
#include "chrome/browser/accessibility/accessibility_labels_service_factory.h"
#include "chrome/browser/after_startup_task_utils.h"
@@ -3672,9 +3673,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
@@ -3695,9 +3696,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
&search::HandleNewTabURLReverseRewrite);
#endif // defined(OS_ANDROID)
@@ -179,7 +179,7 @@ index c640ba0cc074e..0f099b6a88b40 100644
}
base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
@@ -5302,7 +5305,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
@@ -5312,7 +5315,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
network_service);
}
@@ -188,8 +188,8 @@ index c640ba0cc074e..0f099b6a88b40 100644
content::BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -5320,6 +5323,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
network_context_params->user_agent = GetUserAgent();
@@ -5330,6 +5333,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
network_context_params->accept_language = GetApplicationLocale();
}
+
@@ -198,10 +198,10 @@ index c640ba0cc074e..0f099b6a88b40 100644
std::vector<base::FilePath>
diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h
index 99ab233c779f3..0813b9156c3b5 100644
index ba04ad2b43f10..8a557d83b4339 100644
--- chrome/browser/chrome_content_browser_client.h
+++ chrome/browser/chrome_content_browser_client.h
@@ -545,7 +545,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -552,7 +552,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
override;
void OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) override;
@@ -211,7 +211,7 @@ index 99ab233c779f3..0813b9156c3b5 100644
bool in_memory,
const base::FilePath& relative_partition_path,
diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc
index a55c24300b40b..47369c7079e6f 100644
index f2a12d0545a6d..44f49da8fd22e 100644
--- chrome/browser/prefs/browser_prefs.cc
+++ chrome/browser/prefs/browser_prefs.cc
@@ -11,6 +11,7 @@
@@ -222,7 +222,7 @@ index a55c24300b40b..47369c7079e6f 100644
#include "chrome/browser/about_flags.h"
#include "chrome/browser/accessibility/accessibility_labels_service.h"
#include "chrome/browser/accessibility/accessibility_ui.h"
@@ -164,6 +165,10 @@
@@ -163,6 +164,10 @@
#include "chrome/browser/background/background_mode_manager.h"
#endif
@@ -233,7 +233,7 @@ index a55c24300b40b..47369c7079e6f 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/accessibility/animation_policy_prefs.h"
#include "chrome/browser/apps/platform_apps/shortcut_manager.h"
@@ -1214,6 +1219,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
@@ -1203,6 +1208,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
SessionDataService::RegisterProfilePrefs(registry);
#endif