Update to Chromium version 121.0.6167.0 (#1233107)

This commit is contained in:
Marshall Greenblatt
2023-12-06 15:16:15 -05:00
parent 2f0b00f8f5
commit 80c65f25a3
122 changed files with 1044 additions and 986 deletions

View File

@@ -77,7 +77,7 @@ const char* const kNonWildcardDomainNonPortSchemes[] = {
const size_t kNonWildcardDomainNonPortSchemesSize =
std::size(kNonWildcardDomainNonPortSchemes);
absl::optional<int> AcquireProcessSingleton(
std::optional<int> AcquireProcessSingleton(
const base::FilePath& user_data_dir) {
// Take the Chrome process singleton lock. The process can become the
// Browser process if it succeed to take the lock. Otherwise, the
@@ -114,7 +114,7 @@ absl::optional<int> AcquireProcessSingleton(
return chrome::RESULT_CODE_PROFILE_IN_USE;
}
return absl::nullopt;
return std::nullopt;
}
} // namespace
@@ -130,17 +130,17 @@ AlloyMainDelegate::AlloyMainDelegate(CefMainRunnerHandler* runner,
AlloyMainDelegate::~AlloyMainDelegate() {}
absl::optional<int> AlloyMainDelegate::PreBrowserMain() {
std::optional<int> AlloyMainDelegate::PreBrowserMain() {
runner_->PreBrowserMain();
return absl::nullopt;
return std::nullopt;
}
absl::optional<int> AlloyMainDelegate::PostEarlyInitialization(
std::optional<int> AlloyMainDelegate::PostEarlyInitialization(
InvokedIn invoked_in) {
const auto* invoked_in_browser =
absl::get_if<InvokedInBrowserProcess>(&invoked_in);
if (!invoked_in_browser) {
return absl::nullopt;
return std::nullopt;
}
// Based on ChromeMainDelegate::PostEarlyInitialization.
@@ -161,10 +161,10 @@ absl::optional<int> AlloyMainDelegate::PostEarlyInitialization(
return process_singleton_result;
}
return absl::nullopt;
return std::nullopt;
}
absl::optional<int> AlloyMainDelegate::BasicStartupComplete() {
std::optional<int> AlloyMainDelegate::BasicStartupComplete() {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
std::string process_type =
command_line->GetSwitchValueASCII(switches::kProcessType);
@@ -510,7 +510,7 @@ absl::optional<int> AlloyMainDelegate::BasicStartupComplete() {
util_mac::BasicStartupComplete();
#endif
return absl::nullopt;
return std::nullopt;
}
void AlloyMainDelegate::PreSandboxStartup() {

View File

@@ -46,9 +46,9 @@ class AlloyMainDelegate : public content::ContentMainDelegate,
~AlloyMainDelegate() override;
// content::ContentMainDelegate overrides.
absl::optional<int> PreBrowserMain() override;
absl::optional<int> PostEarlyInitialization(InvokedIn invoked_in) override;
absl::optional<int> BasicStartupComplete() override;
std::optional<int> PreBrowserMain() override;
std::optional<int> PostEarlyInitialization(InvokedIn invoked_in) override;
std::optional<int> BasicStartupComplete() override;
void PreSandboxStartup() override;
absl::variant<int, content::MainFunctionParams> RunProcess(
const std::string& process_type,

View File

@@ -56,7 +56,7 @@ ChromeMainDelegateCef::ChromeMainDelegateCef(CefMainRunnerHandler* runner,
ChromeMainDelegateCef::~ChromeMainDelegateCef() = default;
absl::optional<int> ChromeMainDelegateCef::BasicStartupComplete() {
std::optional<int> ChromeMainDelegateCef::BasicStartupComplete() {
// Returns no value if startup should proceed.
auto result = ChromeMainDelegate::BasicStartupComplete();
if (result.has_value()) {
@@ -165,7 +165,7 @@ absl::optional<int> ChromeMainDelegateCef::BasicStartupComplete() {
util_mac::BasicStartupComplete();
#endif
return absl::nullopt;
return std::nullopt;
}
void ChromeMainDelegateCef::PreSandboxStartup() {
@@ -195,15 +195,15 @@ void ChromeMainDelegateCef::PreSandboxStartup() {
crash_reporting::PreSandboxStartup(*command_line, process_type);
}
absl::optional<int> ChromeMainDelegateCef::PreBrowserMain() {
std::optional<int> ChromeMainDelegateCef::PreBrowserMain() {
// The parent ChromeMainDelegate implementation creates the NSApplication
// instance on macOS, and we intentionally don't want to do that here.
// TODO(macos): Do we need l10n_util::OverrideLocaleWithCocoaLocale()?
runner_->PreBrowserMain();
return absl::nullopt;
return std::nullopt;
}
absl::optional<int> ChromeMainDelegateCef::PostEarlyInitialization(
std::optional<int> ChromeMainDelegateCef::PostEarlyInitialization(
InvokedIn invoked_in) {
// Configure this before ChromeMainDelegate::PostEarlyInitialization triggers
// ChromeBrowserPolicyConnector creation.

View File

@@ -36,10 +36,10 @@ class ChromeMainDelegateCef : public ChromeMainDelegate,
~ChromeMainDelegateCef() override;
// ChromeMainDelegate overrides.
absl::optional<int> BasicStartupComplete() override;
std::optional<int> BasicStartupComplete() override;
void PreSandboxStartup() override;
absl::optional<int> PreBrowserMain() override;
absl::optional<int> PostEarlyInitialization(InvokedIn invoked_in) override;
std::optional<int> PreBrowserMain() override;
std::optional<int> PostEarlyInitialization(InvokedIn invoked_in) override;
absl::variant<int, content::MainFunctionParams> RunProcess(
const std::string& process_type,
content::MainFunctionParams main_function_params) override;

View File

@@ -10,7 +10,7 @@
#include "include/cef_version.h"
#include "base/strings/string_piece_forward.h"
#include "base/strings/string_piece.h"
#include "base/synchronization/lock.h"
#include "build/build_config.h"
#include "components/crash/core/app/crash_reporter_client.h"

View File

@@ -4,7 +4,7 @@
#include <string>
#include "base/strings/string_piece_forward.h"
#include "base/strings/string_piece.h"
#include "build/build_config.h"
namespace base {

View File

@@ -6,7 +6,7 @@
#include "include/internal/cef_string_list.h"
#include "base/logging.h"
#include "base/check_op.h"
namespace {
using StringList = std::vector<CefString>;

View File

@@ -7,7 +7,7 @@
#include "include/internal/cef_string_map.h"
#include "base/logging.h"
#include "base/check_op.h"
namespace {

View File

@@ -7,7 +7,7 @@
#include "include/internal/cef_string_multimap.h"
#include "base/logging.h"
#include "base/check_op.h"
namespace {

View File

@@ -180,16 +180,10 @@ CEF_EXPORT int cef_string_utf16_cmp(const cef_string_utf16_t* str1,
if (str1->length == 0 && str2->length == 0) {
return 0;
}
#if defined(WCHAR_T_IS_UTF32)
int r = std::char_traits<std::u16string::value_type>::compare(
reinterpret_cast<std::u16string::value_type*>(str1->str),
reinterpret_cast<std::u16string::value_type*>(str2->str),
std::min(str1->length, str2->length));
#else
int r = wcsncmp(reinterpret_cast<wchar_t*>(str1->str),
reinterpret_cast<wchar_t*>(str2->str),
std::min(str1->length, str2->length));
#endif
if (r == 0) {
if (str1->length > str2->length) {
return 1;