Update to Chromium version 113.0.5672.0 (#1121455)

This commit is contained in:
Marshall Greenblatt
2023-04-04 14:00:13 -04:00
parent c83b3cda24
commit 4b3c3132cb
76 changed files with 617 additions and 645 deletions

View File

@@ -74,7 +74,7 @@
#endif
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
#include "components/os_crypt/os_crypt.h"
#include "components/os_crypt/sync/os_crypt.h"
#endif
#if BUILDFLAG(IS_LINUX)
@@ -83,7 +83,7 @@
#include "chrome/browser/ui/views/theme_profile_key.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/grit/chromium_strings.h"
#include "components/os_crypt/key_storage_config_linux.h"
#include "components/os_crypt/sync/key_storage_config_linux.h"
#include "libcef/browser/printing/print_dialog_linux.h"
#include "ui/base/cursor/cursor_factory.h"
#include "ui/base/ime/input_method.h"

View File

@@ -89,6 +89,7 @@
#include "components/pdf/browser/pdf_url_loader_request_interceptor.h"
#include "components/pdf/browser/pdf_web_contents_helper.h"
#include "components/pdf/common/internal_plugin_helpers.h"
#include "components/policy/core/common/policy_pref_names.h"
#include "components/spellcheck/common/spellcheck.mojom.h"
#include "components/version_info/version_info.h"
#include "content/browser/plugin_service_impl.h"
@@ -923,8 +924,10 @@ AlloyContentBrowserClient::CreateURLLoaderThrottles(
Profile* profile = Profile::FromBrowserContext(browser_context);
chrome::mojom::DynamicParams dynamic_params = {
profile->GetPrefs()->GetBoolean(prefs::kForceGoogleSafeSearch),
profile->GetPrefs()->GetInteger(prefs::kForceYouTubeRestrict),
profile->GetPrefs()->GetBoolean(
policy::policy_prefs::kForceGoogleSafeSearch),
profile->GetPrefs()->GetInteger(
policy::policy_prefs::kForceYouTubeRestrict),
profile->GetPrefs()->GetString(prefs::kAllowedDomainsForApps)};
result.push_back(
std::make_unique<GoogleURLLoaderThrottle>(std::move(dynamic_params)));

View File

@@ -32,6 +32,7 @@
#include "content/public/browser/network_service_instance.h"
#include "content/public/common/content_switches.h"
#include "net/log/net_log_capture_mode.h"
#include "services/device/public/cpp/geolocation/geolocation_manager.h"
#include "services/network/public/cpp/network_switches.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
@@ -143,6 +144,11 @@ void ChromeBrowserProcessAlloy::FlushLocalStateAndReply(
NOTREACHED();
}
device::GeolocationManager* ChromeBrowserProcessAlloy::geolocation_manager() {
NOTREACHED();
return nullptr;
}
metrics_services_manager::MetricsServicesManager*
ChromeBrowserProcessAlloy::GetMetricsServicesManager() {
NOTREACHED();
@@ -222,6 +228,11 @@ ChromeBrowserProcessAlloy::notification_platform_bridge() {
return nullptr;
}
void ChromeBrowserProcessAlloy::SetGeolocationManager(
std::unique_ptr<device::GeolocationManager> geolocation_manager) {
NOTREACHED();
}
policy::ChromeBrowserPolicyConnector*
ChromeBrowserProcessAlloy::browser_policy_connector() {
if (!browser_policy_connector_) {
@@ -416,12 +427,6 @@ ChromeBrowserProcessAlloy::hid_policy_allowed_devices() {
return nullptr;
}
breadcrumbs::BreadcrumbPersistentStorageManager*
ChromeBrowserProcessAlloy::GetBreadcrumbPersistentStorageManager() {
NOTREACHED();
return nullptr;
}
HidSystemTrayIcon* ChromeBrowserProcessAlloy::hid_system_tray_icon() {
NOTREACHED();
return nullptr;

View File

@@ -51,6 +51,7 @@ class ChromeBrowserProcessAlloy : public BrowserProcess {
// BrowserProcess implementation.
void EndSession() override;
void FlushLocalStateAndReply(base::OnceClosure reply) override;
device::GeolocationManager* geolocation_manager() override;
metrics_services_manager::MetricsServicesManager* GetMetricsServicesManager()
override;
metrics::MetricsService* metrics_service() override;
@@ -65,6 +66,8 @@ class ChromeBrowserProcessAlloy : public BrowserProcess {
extensions::EventRouterForwarder* extension_event_router_forwarder() override;
NotificationUIManager* notification_ui_manager() override;
NotificationPlatformBridge* notification_platform_bridge() override;
void SetGeolocationManager(
std::unique_ptr<device::GeolocationManager> geolocation_manager) override;
policy::ChromeBrowserPolicyConnector* browser_policy_connector() override;
policy::PolicyService* policy_service() override;
IconManager* icon_manager() override;
@@ -107,8 +110,6 @@ class ChromeBrowserProcessAlloy : public BrowserProcess {
BuildState* GetBuildState() override;
SerialPolicyAllowedPorts* serial_policy_allowed_ports() override;
HidPolicyAllowedDevices* hid_policy_allowed_devices() override;
breadcrumbs::BreadcrumbPersistentStorageManager*
GetBreadcrumbPersistentStorageManager() override;
HidSystemTrayIcon* hid_system_tray_icon() override;
private:

View File

@@ -69,9 +69,9 @@ ExtensionFunction::ResponseAction TabsGetFunction::Run() {
TabsCreateFunction::TabsCreateFunction() : cef_details_(this) {}
ExtensionFunction::ResponseAction TabsCreateFunction::Run() {
std::unique_ptr<tabs::Create::Params> params(
tabs::Create::Params::Create(args()));
EXTENSION_FUNCTION_VALIDATE(params.get());
absl::optional<tabs::Create::Params> params =
tabs::Create::Params::Create(args());
EXTENSION_FUNCTION_VALIDATE(params);
CefExtensionFunctionDetails::OpenTabParams options;
options.window_id = params->create_properties.window_id;
@@ -108,9 +108,9 @@ content::WebContents* BaseAPIFunction::GetWebContents(int tab_id) {
}
ExtensionFunction::ResponseAction TabsUpdateFunction::Run() {
std::unique_ptr<tabs::Update::Params> params(
tabs::Update::Params::Create(args()));
EXTENSION_FUNCTION_VALIDATE(params.get());
absl::optional<tabs::Update::Params> params =
tabs::Update::Params::Create(args());
EXTENSION_FUNCTION_VALIDATE(params);
tab_id_ = params->tab_id ? *params->tab_id : -1;
content::WebContents* web_contents = GetWebContents(tab_id_);
@@ -195,8 +195,8 @@ bool TabsUpdateFunction::UpdateURL(const std::string& url_string,
int tab_id,
std::string* error) {
GURL url;
auto url_expected =
ExtensionTabUtil::PrepareURLForNavigation(url_string, extension());
auto url_expected = ExtensionTabUtil::PrepareURLForNavigation(
url_string, extension(), browser_context());
if (url_expected.has_value()) {
url = *url_expected;
} else {
@@ -278,7 +278,7 @@ ExecuteCodeFunction::InitResult ExecuteCodeInTabFunction::Init() {
return set_init_result(VALIDATION_FAILURE);
}
std::unique_ptr<InjectDetails> details(new InjectDetails());
if (!InjectDetails::Populate(details_value, details.get())) {
if (!InjectDetails::Populate(details_value.GetDict(), *details)) {
return set_init_result(VALIDATION_FAILURE);
}
@@ -419,8 +419,8 @@ bool TabsRemoveCSSFunction::ShouldRemoveCSS() const {
}
ExtensionFunction::ResponseAction TabsSetZoomFunction::Run() {
std::unique_ptr<tabs::SetZoom::Params> params(
tabs::SetZoom::Params::Create(args()));
absl::optional<tabs::SetZoom::Params> params =
tabs::SetZoom::Params::Create(args());
EXTENSION_FUNCTION_VALIDATE(params);
int tab_id = params->tab_id ? *params->tab_id : -1;
@@ -451,8 +451,8 @@ ExtensionFunction::ResponseAction TabsSetZoomFunction::Run() {
}
ExtensionFunction::ResponseAction TabsGetZoomFunction::Run() {
std::unique_ptr<tabs::GetZoom::Params> params(
tabs::GetZoom::Params::Create(args()));
absl::optional<tabs::GetZoom::Params> params =
tabs::GetZoom::Params::Create(args());
EXTENSION_FUNCTION_VALIDATE(params);
int tab_id = params->tab_id ? *params->tab_id : -1;
@@ -471,8 +471,8 @@ ExtensionFunction::ResponseAction TabsGetZoomFunction::Run() {
ExtensionFunction::ResponseAction TabsSetZoomSettingsFunction::Run() {
using api::tabs::ZoomSettings;
std::unique_ptr<tabs::SetZoomSettings::Params> params(
tabs::SetZoomSettings::Params::Create(args()));
absl::optional<tabs::SetZoomSettings::Params> params =
tabs::SetZoomSettings::Params::Create(args());
EXTENSION_FUNCTION_VALIDATE(params);
int tab_id = params->tab_id ? *params->tab_id : -1;
@@ -522,8 +522,8 @@ ExtensionFunction::ResponseAction TabsSetZoomSettingsFunction::Run() {
}
ExtensionFunction::ResponseAction TabsGetZoomSettingsFunction::Run() {
std::unique_ptr<tabs::GetZoomSettings::Params> params(
tabs::GetZoomSettings::Params::Create(args()));
absl::optional<tabs::GetZoomSettings::Params> params =
tabs::GetZoomSettings::Params::Create(args());
EXTENSION_FUNCTION_VALIDATE(params);
int tab_id = params->tab_id ? *params->tab_id : -1;

View File

@@ -325,7 +325,7 @@ std::unique_ptr<api::tabs::Tab> CefExtensionFunctionDetails::OpenTab(
GURL url;
if (params.url.has_value()) {
auto url_expected = ExtensionTabUtil::PrepareURLForNavigation(
*params.url, function()->extension());
*params.url, function()->extension(), function()->browser_context());
if (url_expected.has_value()) {
url = *url_expected;
} else {

View File

@@ -385,9 +385,13 @@ int CefMainRunner::ContentMainInitialize(const CefMainArgs& args,
bool CefMainRunner::ContentMainRun(bool* initialized,
base::OnceClosure context_initialized) {
main_delegate_->BeforeMainThreadRun();
main_delegate_->BeforeMainThreadRun(multi_threaded_message_loop_);
if (multi_threaded_message_loop_) {
// Detach the CommandLine from the main thread so that it can be
// attached and modified from the UI thread going forward.
base::CommandLine::ForCurrentProcess()->DetachFromCurrentSequence();
base::WaitableEvent uithread_startup_event(
base::WaitableEvent::ResetPolicy::AUTOMATIC,
base::WaitableEvent::InitialState::NOT_SIGNALED);

View File

@@ -23,7 +23,6 @@
#include "third_party/blink/public/common/input/web_input_event.h"
#include "third_party/blink/public/common/input/web_mouse_event.h"
#include "third_party/blink/public/common/input/web_mouse_wheel_event.h"
#import "ui/base/cocoa/cocoa_base_utils.h"
#import "ui/base/cocoa/underlay_opengl_hosting_window.h"
#include "ui/display/screen.h"
#include "ui/events/base_event_utils.h"
@@ -439,8 +438,7 @@ gfx::Point CefBrowserPlatformDelegateNativeMac::GetScreenPoint(
NSPoint view_pt = {static_cast<CGFloat>(view.x()),
bounds.size.height - static_cast<CGFloat>(view.y())};
NSPoint window_pt = [nsview convertPoint:view_pt toView:nil];
NSPoint screen_pt =
ui::ConvertPointFromWindowToScreen([nsview window], window_pt);
NSPoint screen_pt = [[nsview window] convertPointToScreen:window_pt];
return gfx::Point(screen_pt.x, screen_pt.y);
}
return gfx::Point();

View File

@@ -35,7 +35,6 @@
#include "chrome/browser/ui/webui/print_preview/policy_settings.h"
#include "chrome/common/buildflags.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/net/safe_search_util.h"
#include "chrome/common/pref_names.h"
#include "chrome/grit/locale_settings.h"
#include "components/certificate_transparency/pref_names.h"
@@ -48,6 +47,7 @@
#include "components/language/core/browser/language_prefs.h"
#include "components/language/core/browser/pref_names.h"
#include "components/permissions/permission_actions_history.h"
#include "components/policy/core/common/policy_pref_names.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/json_pref_store.h"
#include "components/prefs/pref_filter.h"
@@ -57,6 +57,7 @@
#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
#include "components/proxy_config/proxy_config_dictionary.h"
#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
#include "components/safe_search_api/safe_search_util.h"
#include "components/spellcheck/browser/pref_names.h"
#include "components/sync_preferences/pref_service_syncable.h"
#include "components/sync_preferences/pref_service_syncable_factory.h"
@@ -69,7 +70,7 @@
#include "ui/base/ui_base_switches.h"
#if BUILDFLAG(IS_WIN)
#include "components/os_crypt/os_crypt.h"
#include "components/os_crypt/sync/os_crypt.h"
#endif
#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
@@ -281,9 +282,10 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile,
// Print preferences.
// Based on ProfileImpl::RegisterProfilePrefs.
registry->RegisterBooleanPref(prefs::kForceGoogleSafeSearch, false);
registry->RegisterIntegerPref(prefs::kForceYouTubeRestrict,
safe_search_util::YOUTUBE_RESTRICT_OFF);
registry->RegisterBooleanPref(policy::policy_prefs::kForceGoogleSafeSearch,
false);
registry->RegisterIntegerPref(policy::policy_prefs::kForceYouTubeRestrict,
safe_search_api::YOUTUBE_RESTRICT_OFF);
registry->RegisterStringPref(prefs::kAllowedDomainsForApps, std::string());
registry->RegisterBooleanPref(prefs::kPrintingEnabled, true);
registry->RegisterBooleanPref(prefs::kPrintPreviewDisabled,