diff --git a/BUILD.gn b/BUILD.gn index d4a3962c4..06cdda6ce 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -891,7 +891,6 @@ source_set("libcef_static") { "//chrome:strings", "//chrome/common:buildflags", "//chrome/services/printing:lib", - "//components/cdm/renderer", "//components/certificate_transparency", "//components/component_updater", "//components/content_settings/core/browser", @@ -1344,6 +1343,7 @@ make_pack_header("strings") { "$root_gen_dir/extensions/strings/grit/extensions_strings.h", "$root_gen_dir/services/strings/grit/services_strings.h", "$root_gen_dir/third_party/blink/public/strings/grit/blink_strings.h", + "$root_gen_dir/third_party/blink/public/strings/grit/permission_element_generated_strings.h", "$root_gen_dir/third_party/blink/public/strings/grit/permission_element_strings.h", "$root_gen_dir/ui/strings/grit/app_locale_settings.h", "$root_gen_dir/ui/strings/grit/auto_image_annotation_strings.h", @@ -1363,6 +1363,7 @@ make_pack_header("strings") { "//extensions/strings", "//services/strings", "//third_party/blink/public/strings", + "//third_party/blink/public/strings:permission_element_generated_strings", "//third_party/blink/public/strings:permission_element_strings", "//ui/strings:app_locale_settings", "//ui/strings:auto_image_annotation_strings", diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index dfe19a5b1..6a93d6224 100644 --- a/CHROMIUM_BUILD_COMPATIBILITY.txt +++ b/CHROMIUM_BUILD_COMPATIBILITY.txt @@ -7,5 +7,5 @@ # https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding { - 'chromium_checkout': 'refs/tags/132.0.6834.0' + 'chromium_checkout': 'refs/tags/133.0.6886.0' } diff --git a/include/cef_api_hash.h b/include/cef_api_hash.h index bf3d1cff0..8070b5601 100644 --- a/include/cef_api_hash.h +++ b/include/cef_api_hash.h @@ -42,13 +42,13 @@ // way that may cause binary incompatibility with other builds. The universal // hash value will change if any platform is affected whereas the platform hash // values will change only if that particular platform is affected. -#define CEF_API_HASH_UNIVERSAL "fc1554b64e963371717ccf0a2a5e686ef06dca88" +#define CEF_API_HASH_UNIVERSAL "e52a54bfb4cfc13366fe52766756180fc7d3d1b2" #if defined(OS_WIN) -#define CEF_API_HASH_PLATFORM "3df9884666f0de7427ab99cb64c85b0e303d071e" +#define CEF_API_HASH_PLATFORM "ce7bfedc905e90407eb975eebf2f419a347b27cd" #elif defined(OS_MAC) -#define CEF_API_HASH_PLATFORM "031cd25d4dfccd19e70133c4ed0efb6b7441b503" +#define CEF_API_HASH_PLATFORM "8bb21c09270905fe64b8c31f744e0cbf7bc39ff5" #elif defined(OS_LINUX) -#define CEF_API_HASH_PLATFORM "9c32d35cea06c04ed0cff861ff873fea08bf5295" +#define CEF_API_HASH_PLATFORM "a8198f66f731c8ac91bba1e45847807bffca7b01" #endif #ifdef __cplusplus diff --git a/include/internal/cef_types.h b/include/internal/cef_types.h index 394de0218..f439b8e45 100644 --- a/include/internal/cef_types.h +++ b/include/internal/cef_types.h @@ -3478,20 +3478,21 @@ typedef enum { CEF_CPAIT_SAVE_CARD, CEF_CPAIT_SEND_TAB_TO_SELF_DEPRECATED, CEF_CPAIT_SHARING_HUB, - CEF_CPAIT_SIDE_SEARCH, + CEF_CPAIT_SIDE_SEARCH_DEPRECATED, CEF_CPAIT_SMS_REMOTE_FETCHER, CEF_CPAIT_TRANSLATE, CEF_CPAIT_VIRTUAL_CARD_ENROLL, - CEF_CPAIT_VIRTUAL_CARD_MANUAL_FALLBACK, + CEF_CPAIT_VIRTUAL_CARD_INFORMATION, CEF_CPAIT_ZOOM, CEF_CPAIT_SAVE_IBAN, CEF_CPAIT_MANDATORY_REAUTH, CEF_CPAIT_PRICE_INSIGHTS, - CEF_CPAIT_PRICE_READ_ANYTHING, + CEF_CPAIT_READ_ANYTHING_DEPRECATED, CEF_CPAIT_PRODUCT_SPECIFICATIONS, CEF_CPAIT_LENS_OVERLAY, CEF_CPAIT_DISCOUNTS, - CEF_CPAIT_MAX_VALUE = CEF_CPAIT_DISCOUNTS, + CEF_CPAIT_OPTIMIZATION_GUIDE, + CEF_CPAIT_MAX_VALUE = CEF_CPAIT_OPTIMIZATION_GUIDE, } cef_chrome_page_action_icon_type_t; /// diff --git a/include/internal/cef_types_content_settings.h b/include/internal/cef_types_content_settings.h index cad99d1d2..94bc18cbc 100644 --- a/include/internal/cef_types_content_settings.h +++ b/include/internal/cef_types_content_settings.h @@ -478,6 +478,11 @@ typedef enum { /// Content settings for private network access in the context of the /// Direct Sockets API. CEF_CONTENT_SETTING_TYPE_DIRECT_SOCKETS_PRIVATE_NETWORK_ACCESS, + + /// Content settings for legacy cookie scope. + /// Checks whether cookies scope is handled according to origin-bound cookies + /// or legacy behavior. + CEF_CONTENT_SETTING_TYPE_LEGACY_COOKIE_SCOPE, } cef_content_setting_types_t; /// diff --git a/libcef/browser/audio_capturer.cc b/libcef/browser/audio_capturer.cc index a642a80c9..9711bd074 100644 --- a/libcef/browser/audio_capturer.cc +++ b/libcef/browser/audio_capturer.cc @@ -40,7 +40,7 @@ void StreamCreatorHelper( mojo::PendingRemote stream, mojo::PendingReceiver client_receiver, - media::mojom::ReadOnlyAudioDataPipePtr data_pipe) { + media::mojom::ReadWriteAudioDataPipePtr data_pipe) { mojo::Remote audio_client(std::move(client)); audio_client->StreamCreated(std::move(stream), @@ -100,8 +100,7 @@ void CefAudioCapturer::OnCaptureStarted() { void CefAudioCapturer::Capture(const media::AudioBus* source, base::TimeTicks audio_capture_time, const media::AudioGlitchInfo& /*glitch_info*/, - double /*volume*/, - bool /*key_pressed*/) { + double /*volume*/) { const int channels = source->channels(); std::array data; DCHECK(channels == channels_); diff --git a/libcef/browser/audio_capturer.h b/libcef/browser/audio_capturer.h index 017da514c..bd3f529de 100644 --- a/libcef/browser/audio_capturer.h +++ b/libcef/browser/audio_capturer.h @@ -33,8 +33,7 @@ class CefAudioCapturer : public media::AudioCapturerSource::CaptureCallback { void Capture(const media::AudioBus* audio_source, base::TimeTicks audio_capture_time, const media::AudioGlitchInfo& glitch_info, - double volume, - bool key_pressed) override; + double volume) override; void OnCaptureError(media::AudioCapturerSource::ErrorCode code, const std::string& message) override; void OnCaptureMuted(bool is_muted) override {} diff --git a/libcef/browser/audio_loopback_stream_creator.cc b/libcef/browser/audio_loopback_stream_creator.cc index f5d48771f..3f699b445 100644 --- a/libcef/browser/audio_loopback_stream_creator.cc +++ b/libcef/browser/audio_loopback_stream_creator.cc @@ -16,7 +16,6 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_frame_host.h" #include "media/audio/audio_device_description.h" -#include "media/base/user_input_monitor.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/bindings/self_owned_receiver.h" #include "third_party/blink/public/mojom/media/renderer_audio_input_stream_factory.mojom.h" @@ -46,7 +45,7 @@ class StreamCreatedCallbackAdapter final mojo::PendingRemote stream, mojo::PendingReceiver client_receiver, - media::mojom::ReadOnlyAudioDataPipePtr data_pipe, + media::mojom::ReadWriteAudioDataPipePtr data_pipe, bool initially_muted, const std::optional& stream_id) override { DCHECK(!initially_muted); // Loopback streams shouldn't be started muted. @@ -90,13 +89,7 @@ void CreateSystemWideLoopbackStreamHelper( } // namespace CefAudioLoopbackStreamCreator::CefAudioLoopbackStreamCreator() - : factory_(nullptr, - content::BrowserMainLoop::GetInstance() - ? static_cast( - content::BrowserMainLoop::GetInstance() - ->user_input_monitor()) - : nullptr, - content::AudioStreamBrokerFactory::CreateImpl()) { + : factory_(nullptr, content::AudioStreamBrokerFactory::CreateImpl()) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); } diff --git a/libcef/browser/audio_loopback_stream_creator.h b/libcef/browser/audio_loopback_stream_creator.h index 1887832a2..2c810f739 100644 --- a/libcef/browser/audio_loopback_stream_creator.h +++ b/libcef/browser/audio_loopback_stream_creator.h @@ -36,7 +36,7 @@ class CefAudioLoopbackStreamCreator final { mojo::PendingRemote stream, mojo::PendingReceiver client_receiver, - media::mojom::ReadOnlyAudioDataPipePtr data_pipe)>; + media::mojom::ReadWriteAudioDataPipePtr data_pipe)>; // Creates a loopback stream that captures the audio from |loopback_source|, // or the default system playback if |loopback_source| is null. Local output diff --git a/libcef/browser/chrome/chrome_content_browser_client_cef.cc b/libcef/browser/chrome/chrome_content_browser_client_cef.cc index d3acfd64f..2ab135af0 100644 --- a/libcef/browser/chrome/chrome_content_browser_client_cef.cc +++ b/libcef/browser/chrome/chrome_content_browser_client_cef.cc @@ -599,6 +599,7 @@ ChromeContentBrowserClientCef::CreateLoginDelegate( const GURL& url, scoped_refptr response_headers, bool first_auth_attempt, + content::GuestPageHolder* guest, LoginAuthRequiredCallback auth_required_callback) { // |web_contents| is nullptr for CefURLRequests without an associated frame. if (!web_contents || base::CommandLine::ForCurrentProcess()->HasSwitch( @@ -612,7 +613,7 @@ ChromeContentBrowserClientCef::CreateLoginDelegate( return ChromeContentBrowserClient::CreateLoginDelegate( auth_info, web_contents, browser_context, request_id, is_request_for_primary_main_frame_navigation, is_request_for_navigation, - url, response_headers, first_auth_attempt, + url, response_headers, first_auth_attempt, guest, std::move(auth_required_callback)); } diff --git a/libcef/browser/chrome/chrome_content_browser_client_cef.h b/libcef/browser/chrome/chrome_content_browser_client_cef.h index 5cd736999..67b989df6 100644 --- a/libcef/browser/chrome/chrome_content_browser_client_cef.h +++ b/libcef/browser/chrome/chrome_content_browser_client_cef.h @@ -132,6 +132,7 @@ class ChromeContentBrowserClientCef : public ChromeContentBrowserClient { const GURL& url, scoped_refptr response_headers, bool first_auth_attempt, + content::GuestPageHolder* guest, LoginAuthRequiredCallback auth_required_callback) override; void ExposeInterfacesToRenderer( service_manager::BinderRegistry* registry, diff --git a/libcef/browser/chrome/views/chrome_browser_frame.cc b/libcef/browser/chrome/views/chrome_browser_frame.cc index 346e90828..7e955b8bb 100644 --- a/libcef/browser/chrome/views/chrome_browser_frame.cc +++ b/libcef/browser/chrome/views/chrome_browser_frame.cc @@ -187,6 +187,13 @@ void ChromeBrowserFrame::Activate() { } void ChromeBrowserFrame::OnNativeWidgetDestroyed() { + // Remove the listener registration added in BrowserView::InitBrowser(). + if (browser_view()) { + if (auto focus_manager = browser_view()->GetFocusManager()) { + focus_manager->RemoveFocusChangeListener(browser_view()); + } + } + window_view_ = nullptr; SetBrowserView(nullptr); BrowserFrame::OnNativeWidgetDestroyed(); diff --git a/libcef/browser/devtools/devtools_controller.cc b/libcef/browser/devtools/devtools_controller.cc index 18bf94b70..d45829368 100644 --- a/libcef/browser/devtools/devtools_controller.cc +++ b/libcef/browser/devtools/devtools_controller.cc @@ -34,8 +34,8 @@ bool CefDevToolsController::SendDevToolsMessage( return false; } - agent_host_->DispatchProtocolMessage( - this, base::as_bytes(base::make_span(message))); + agent_host_->DispatchProtocolMessage(this, + base::as_bytes(base::span(message))); return true; } @@ -69,7 +69,7 @@ int CefDevToolsController::ExecuteDevToolsMethod( } agent_host_->DispatchProtocolMessage( - this, base::as_bytes(base::make_span(protocol_message))); + this, base::as_bytes(base::span(protocol_message))); return message_id; } diff --git a/libcef/browser/menu_manager.cc b/libcef/browser/menu_manager.cc index 6bdf880e6..f4e65137a 100644 --- a/libcef/browser/menu_manager.cc +++ b/libcef/browser/menu_manager.cc @@ -284,7 +284,7 @@ void CefMenuManager::MenuClosed(CefRefPtr source) { // Notify the host after closing the context menu. web_contents()->SetShowingContextMenu(false); - web_contents()->NotifyContextMenuClosed(params_.link_followed); + web_contents()->NotifyContextMenuClosed(params_.link_followed, std::nullopt); } bool CefMenuManager::FormatLabel(CefRefPtr source, diff --git a/libcef/browser/net/crlset_file_util_impl.cc b/libcef/browser/net/crlset_file_util_impl.cc index de6684eaa..1ea310c6f 100644 --- a/libcef/browser/net/crlset_file_util_impl.cc +++ b/libcef/browser/net/crlset_file_util_impl.cc @@ -15,7 +15,7 @@ namespace { void UpdateCRLSet(const std::string& crl_set_bytes) { CEF_REQUIRE_UIT(); content::GetCertVerifierServiceFactory()->UpdateCRLSet( - base::as_bytes(base::make_span(crl_set_bytes)), base::DoNothing()); + base::as_bytes(base::span(crl_set_bytes)), base::DoNothing()); } void LoadFromDisk(const base::FilePath& path) { diff --git a/libcef/browser/net_service/cookie_helper.cc b/libcef/browser/net_service/cookie_helper.cc index 472d8bfe7..5dcfa9d3a 100644 --- a/libcef/browser/net_service/cookie_helper.cc +++ b/libcef/browser/net_service/cookie_helper.cc @@ -201,10 +201,10 @@ void SaveCookiesOnUIThread( cookie)); } - SetCanonicalCookieCallback( - progress, net::CanonicalCookie(), - net::CookieAccessResult(net::CookieInclusionStatus( - net::CookieInclusionStatus::EXCLUDE_UNKNOWN_ERROR))); + net::CookieInclusionStatus status; + status.AddExclusionReason(net::CookieInclusionStatus::EXCLUDE_UNKNOWN_ERROR); + SetCanonicalCookieCallback(progress, net::CanonicalCookie(), + net::CookieAccessResult(std::move(status))); } } // namespace diff --git a/libcef/browser/net_service/cookie_manager_impl.cc b/libcef/browser/net_service/cookie_manager_impl.cc index ff07e0116..19495e4ce 100644 --- a/libcef/browser/net_service/cookie_manager_impl.cc +++ b/libcef/browser/net_service/cookie_manager_impl.cc @@ -305,9 +305,10 @@ bool CefCookieManagerImpl::SetCookieInternal( /*partition_key=*/std::nullopt, /*status=*/nullptr); if (!canonical_cookie) { - SetCookieCallbackImpl( - callback, net::CookieAccessResult(net::CookieInclusionStatus( - net::CookieInclusionStatus::EXCLUDE_UNKNOWN_ERROR))); + net::CookieInclusionStatus status; + status.AddExclusionReason( + net::CookieInclusionStatus::EXCLUDE_UNKNOWN_ERROR); + SetCookieCallbackImpl(callback, net::CookieAccessResult(std::move(status))); return true; } diff --git a/libcef/common/crash_reporter_client.cc b/libcef/common/crash_reporter_client.cc index 7b89c9139..732c2260e 100644 --- a/libcef/common/crash_reporter_client.cc +++ b/libcef/common/crash_reporter_client.cc @@ -633,17 +633,9 @@ bool CefCrashReporterClient::GetCrashDumpLocation(std::wstring* crash_dir) { #elif BUILDFLAG(IS_POSIX) -void CefCrashReporterClient::GetProductNameAndVersion(const char** product_name, - const char** version) { - *product_name = product_name_.c_str(); - *version = product_version_.c_str(); -} - -void CefCrashReporterClient::GetProductNameAndVersion(std::string* product_name, - std::string* version, - std::string* channel) { - *product_name = product_name_; - *version = product_version_; +void CefCrashReporterClient::GetProductInfo(ProductInfo* product_info) { + product_info->product_name = product_name_; + product_info->version = product_version_; } bool CefCrashReporterClient::GetCrashDumpLocation(base::FilePath* crash_dir) { diff --git a/libcef/common/crash_reporter_client.h b/libcef/common/crash_reporter_client.h index 6e8a3ef39..97f2cfe3b 100644 --- a/libcef/common/crash_reporter_client.h +++ b/libcef/common/crash_reporter_client.h @@ -50,11 +50,7 @@ class CefCrashReporterClient : public crash_reporter::CrashReporterClient { std::wstring* channel_name) override; bool GetCrashDumpLocation(std::wstring* crash_dir) override; #elif BUILDFLAG(IS_POSIX) - void GetProductNameAndVersion(const char** product_name, - const char** version) override; - void GetProductNameAndVersion(std::string* product_name, - std::string* version, - std::string* channel) override; + void GetProductInfo(ProductInfo* product_info) override; bool GetCrashDumpLocation(base::FilePath* crash_dir) override; #endif // BUILDFLAG(IS_POSIX) diff --git a/libcef/common/request_impl.cc b/libcef/common/request_impl.cc index b75e37543..986ca30d1 100644 --- a/libcef/common/request_impl.cc +++ b/libcef/common/request_impl.cc @@ -1165,7 +1165,8 @@ void CefPostDataElementImpl::Get(network::ResourceRequestBody& body) const { base::AutoLock lock_scope(lock_); if (type_ == PDE_TYPE_BYTES) { - body.AppendBytes(static_cast(data_.bytes.bytes), data_.bytes.size); + body.AppendCopyOfBytes( + base::span(static_cast(data_.bytes.bytes), data_.bytes.size)); } else if (type_ == PDE_TYPE_FILE) { base::FilePath path = base::FilePath(CefString(&data_.filename)); body.AppendFileRange(path, 0, std::numeric_limits::max(), diff --git a/libcef/common/values_impl.cc b/libcef/common/values_impl.cc index bb6ab801b..54455caa7 100644 --- a/libcef/common/values_impl.cc +++ b/libcef/common/values_impl.cc @@ -494,7 +494,7 @@ CefRefPtr CefBinaryValue::Create(const void* data, } const auto ptr = static_cast(data); - return new CefBinaryValueImpl(base::make_span(ptr, data_size)); + return new CefBinaryValueImpl(base::span(ptr, data_size)); } // static diff --git a/patch/patches/base_command_line_1872.patch b/patch/patches/base_command_line_1872.patch index 1d949eafe..a8e94c26d 100644 --- a/patch/patches/base_command_line_1872.patch +++ b/patch/patches/base_command_line_1872.patch @@ -1,5 +1,5 @@ diff --git base/command_line.cc base/command_line.cc -index fd6792a0599e2..4cf7bb3ceb226 100644 +index 3631cee09fa31..475a144c1bb5b 100644 --- base/command_line.cc +++ base/command_line.cc @@ -389,11 +389,10 @@ void CommandLine::AppendSwitchNative(std::string_view switch_string, diff --git a/patch/patches/base_sandbox_2743.patch b/patch/patches/base_sandbox_2743.patch index 5c2be268d..b3b506923 100644 --- a/patch/patches/base_sandbox_2743.patch +++ b/patch/patches/base_sandbox_2743.patch @@ -1,8 +1,8 @@ diff --git base/BUILD.gn base/BUILD.gn -index 5dee8a9226d24..a8215969e3494 100644 +index 64189952b8b44..ef392991ed526 100644 --- base/BUILD.gn +++ base/BUILD.gn -@@ -43,6 +43,7 @@ import("//build/rust/rust_static_library.gni") +@@ -42,6 +42,7 @@ import("//build/rust/rust_static_library.gni") import("//build/timestamp.gni") import("//build/util/process_version.gni") import("//build_overrides/build.gni") @@ -10,7 +10,7 @@ index 5dee8a9226d24..a8215969e3494 100644 import("//testing/libfuzzer/fuzzer_test.gni") import("//testing/test.gni") -@@ -1483,7 +1484,11 @@ component("base") { +@@ -1493,7 +1494,11 @@ component("base") { "hash/md5_constexpr_internal.h", "hash/sha1.h", ] @@ -23,7 +23,7 @@ index 5dee8a9226d24..a8215969e3494 100644 sources += [ "hash/md5_nacl.cc", "hash/md5_nacl.h", -@@ -1916,6 +1921,12 @@ component("base") { +@@ -1935,6 +1940,12 @@ component("base") { defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ] } @@ -88,7 +88,7 @@ index 2158b648ca58a..8a8cb13b2fd74 100644 #else #include "base/hash/sha1_boringssl.h" diff --git base/json/json_reader.cc base/json/json_reader.cc -index b3db0dea0fff6..e53ff0049559a 100644 +index af1d4f46d02c9..953585804c177 100644 --- base/json/json_reader.cc +++ base/json/json_reader.cc @@ -12,8 +12,9 @@ @@ -111,7 +111,7 @@ index b3db0dea0fff6..e53ff0049559a 100644 namespace { using serde_json_lenient::ContextPointer; -@@ -134,16 +135,16 @@ JSONReader::Result DecodeJSONInRust(std::string_view json, +@@ -129,16 +130,16 @@ JSONReader::Result DecodeJSONInRust(std::string_view json, } // anonymous namespace @@ -131,7 +131,7 @@ index b3db0dea0fff6..e53ff0049559a 100644 SCOPED_UMA_HISTOGRAM_TIMER_MICROS(kSecurityJsonParsingTime); if (UsingRust()) { JSONReader::Result result = DecodeJSONInRust(json, options, max_depth); -@@ -155,7 +156,7 @@ std::optional JSONReader::Read(std::string_view json, +@@ -150,7 +151,7 @@ std::optional JSONReader::Read(std::string_view json, internal::JSONParser parser(options, max_depth); return parser.Parse(json); } @@ -140,7 +140,7 @@ index b3db0dea0fff6..e53ff0049559a 100644 } // static -@@ -173,7 +174,7 @@ std::optional JSONReader::ReadDict(std::string_view json, +@@ -168,7 +169,7 @@ std::optional JSONReader::ReadDict(std::string_view json, JSONReader::Result JSONReader::ReadAndReturnValueWithError( std::string_view json, int options) { @@ -149,7 +149,7 @@ index b3db0dea0fff6..e53ff0049559a 100644 internal::JSONParser parser(options); auto value = parser.Parse(json); if (!value) { -@@ -185,7 +186,7 @@ JSONReader::Result JSONReader::ReadAndReturnValueWithError( +@@ -180,7 +181,7 @@ JSONReader::Result JSONReader::ReadAndReturnValueWithError( } return std::move(*value); @@ -158,7 +158,7 @@ index b3db0dea0fff6..e53ff0049559a 100644 SCOPED_UMA_HISTOGRAM_TIMER_MICROS(kSecurityJsonParsingTime); if (UsingRust()) { return DecodeJSONInRust(json, options, internal::kAbsoluteMaxDepth); -@@ -202,7 +203,7 @@ JSONReader::Result JSONReader::ReadAndReturnValueWithError( +@@ -197,7 +198,7 @@ JSONReader::Result JSONReader::ReadAndReturnValueWithError( return std::move(*value); } @@ -167,7 +167,7 @@ index b3db0dea0fff6..e53ff0049559a 100644 } // static -@@ -213,7 +214,7 @@ bool JSONReader::UsingRust() { +@@ -208,7 +209,7 @@ bool JSONReader::UsingRust() { if (!base::FeatureList::GetInstance()) { return false; } @@ -177,7 +177,7 @@ index b3db0dea0fff6..e53ff0049559a 100644 #else return base::FeatureList::IsEnabled(base::features::kUseRustJsonParser); diff --git base/logging.cc base/logging.cc -index 508ce135131aa..4158b7d5273b0 100644 +index 59826a95b518e..d6728112294fd 100644 --- base/logging.cc +++ base/logging.cc @@ -60,6 +60,7 @@ diff --git a/patch/patches/base_test_4396276.patch b/patch/patches/base_test_4396276.patch index b1919aa70..9579c0161 100644 --- a/patch/patches/base_test_4396276.patch +++ b/patch/patches/base_test_4396276.patch @@ -88,10 +88,10 @@ index f5191b804bc07..aadb7d66ba4c3 100644 + #endif // BASE_TEST_TEST_TRACE_PROCESSOR_EXPORT_H_ diff --git content/shell/BUILD.gn content/shell/BUILD.gn -index 14192d15579a2..d6affd97970d5 100644 +index 16f1d673591f4..4d485a4f6fd24 100644 --- content/shell/BUILD.gn +++ content/shell/BUILD.gn -@@ -914,7 +914,6 @@ if (is_mac) { +@@ -916,7 +916,6 @@ if (is_mac) { # Specify a sensible install_name for static builds. The library is # dlopen()ed so this is not used to resolve the module. ldflags = [ "-Wl,-install_name,@executable_path/../Frameworks/$output_name.framework/$output_name" ] diff --git a/patch/patches/browser_security_policy_1081397.patch b/patch/patches/browser_security_policy_1081397.patch index 248b61aed..bdf90a0bb 100644 --- a/patch/patches/browser_security_policy_1081397.patch +++ b/patch/patches/browser_security_policy_1081397.patch @@ -20,10 +20,10 @@ index d4d1572304587..35fa3abc12213 100644 // Make an exception to allow most visited tiles to commit in third-party diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc -index f8e18b15a1951..68c9991a962f7 100644 +index e919dcd7acf87..93fc464c57ca5 100644 --- content/browser/renderer_host/navigation_request.cc +++ content/browser/renderer_host/navigation_request.cc -@@ -8255,10 +8255,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo( +@@ -8278,10 +8278,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo( bool use_opaque_origin = (sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) == network::mojom::WebSandboxFlags::kOrigin; @@ -47,7 +47,7 @@ index f8e18b15a1951..68c9991a962f7 100644 } return origin_and_debug_info; -@@ -8366,11 +8378,20 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { +@@ -8389,11 +8401,20 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { DetermineInitiatorRelationship(initiator_rfh, frame_tree_node_->current_frame_host())); diff --git a/patch/patches/build.patch b/patch/patches/build.patch index b9bdaeec0..10ddf4511 100644 --- a/patch/patches/build.patch +++ b/patch/patches/build.patch @@ -1,8 +1,8 @@ diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn -index f58320b88f207..261181781fc72 100644 +index 9c9f616b2a4e1..448cc18a076ac 100644 --- build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn -@@ -133,6 +133,9 @@ declare_args() { +@@ -132,6 +132,9 @@ declare_args() { # The cache can lead to non-determinism: https://crbug.com/1486045 thin_lto_enable_cache = true @@ -12,7 +12,7 @@ index f58320b88f207..261181781fc72 100644 # Initialize all local variables with a pattern. This flag will fill # uninitialized floating-point types (and 32-bit pointers) with 0xFF and the # rest with 0xAA. This makes behavior of uninitialized memory bugs consistent, -@@ -2306,6 +2309,7 @@ config("export_dynamic") { +@@ -2303,6 +2306,7 @@ config("export_dynamic") { # 2. Remove the thin_archive config, so that the .a file actually contains all # .o files, instead of just references to .o files in the build directoy config("thin_archive") { @@ -20,7 +20,7 @@ index f58320b88f207..261181781fc72 100644 if ((is_apple && use_lld) || (is_linux && !is_clang)) { # The macOS and iOS linker ld64.ldd doesn't support thin archive without # symbol table, gcc on linux also throws the error `archive has no index`. -@@ -2323,6 +2327,7 @@ config("thin_archive") { +@@ -2320,6 +2324,7 @@ config("thin_archive") { } else if (is_win && use_lld) { arflags = [ "/llvmlibthin" ] } diff --git a/patch/patches/chrome_browser.patch b/patch/patches/chrome_browser.patch index 3c454c16f..2201a2774 100644 --- a/patch/patches/chrome_browser.patch +++ b/patch/patches/chrome_browser.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn -index 1a136cdeb8aea..27238c9fccc56 100644 +index 5d5e14b0d8053..1f8101d8269e9 100644 --- chrome/browser/BUILD.gn +++ chrome/browser/BUILD.gn @@ -12,6 +12,7 @@ import("//build/config/compiler/pgo/pgo.gni") @@ -10,15 +10,15 @@ index 1a136cdeb8aea..27238c9fccc56 100644 import("//chrome/browser/buildflags.gni") import("//chrome/browser/downgrade/buildflags.gni") import("//chrome/browser/request_header_integrity/buildflags.gni") -@@ -1835,6 +1836,7 @@ static_library("browser") { - "//build/config/chromebox_for_meetings:buildflags", +@@ -1841,6 +1842,7 @@ static_library("browser") { "//build/config/compiler:compiler_buildflags", + "//build/config/linux/dbus:buildflags", "//cc", + "//cef/libcef/features", "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -2508,6 +2510,10 @@ static_library("browser") { +@@ -2520,6 +2522,10 @@ static_library("browser") { sources += [ "net/net_error_diagnostics_dialog_stub.cc" ] } diff --git a/patch/patches/chrome_browser_browser.patch b/patch/patches/chrome_browser_browser.patch index ca789cbca..692cc95b4 100644 --- a/patch/patches/chrome_browser_browser.patch +++ b/patch/patches/chrome_browser_browser.patch @@ -13,7 +13,7 @@ index 2480282a19d12..dbd1fbf8a15b5 100644 return false; } diff --git chrome/browser/devtools/devtools_window.cc chrome/browser/devtools/devtools_window.cc -index faead4388ac00..ce1cc050c94b0 100644 +index 4aaba212926f4..e8aadb2c97fe9 100644 --- chrome/browser/devtools/devtools_window.cc +++ chrome/browser/devtools/devtools_window.cc @@ -38,6 +38,7 @@ @@ -24,7 +24,7 @@ index faead4388ac00..ce1cc050c94b0 100644 #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_tabstrip.h" #include "chrome/browser/ui/browser_window.h" -@@ -1230,6 +1231,13 @@ DevToolsWindow* DevToolsWindow::Create( +@@ -1221,6 +1222,13 @@ DevToolsWindow* DevToolsWindow::Create( !browser->is_type_normal()) { can_dock = false; } @@ -38,7 +38,7 @@ index faead4388ac00..ce1cc050c94b0 100644 } // Create WebContents with devtools. -@@ -1689,9 +1697,13 @@ void DevToolsWindow::OpenInNewTab(const GURL& url) { +@@ -1680,9 +1688,13 @@ void DevToolsWindow::OpenInNewTab(const GURL& url) { if (!inspected_web_contents || !inspected_web_contents->OpenURL(params, /*navigation_handle_callback=*/{})) { @@ -52,7 +52,7 @@ index faead4388ac00..ce1cc050c94b0 100644 } } -@@ -1854,12 +1866,28 @@ void DevToolsWindow::CreateDevToolsBrowser() { +@@ -1845,12 +1857,28 @@ void DevToolsWindow::CreateDevToolsBrowser() { Browser::CreationStatus::kOk) { return; } @@ -88,7 +88,7 @@ index faead4388ac00..ce1cc050c94b0 100644 } diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn -index df9b0eed07761..a984511be272a 100644 +index 977b3222c8f7c..ee71bf3a1a463 100644 --- chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn @@ -8,6 +8,7 @@ import("//build/config/compiler/compiler.gni") @@ -99,7 +99,7 @@ index df9b0eed07761..a984511be272a 100644 import("//chrome/browser/buildflags.gni") import("//chrome/common/features.gni") import("//chromeos/ash/components/assistant/assistant.gni") -@@ -297,6 +298,10 @@ static_library("ui") { +@@ -303,6 +304,10 @@ static_library("ui") { "//build/config/compiler:wexit_time_destructors", ] @@ -110,15 +110,15 @@ index df9b0eed07761..a984511be272a 100644 public_deps = [ # WARNING WARNING WARNING # New dependencies outside of //chrome/browser should be added to -@@ -323,6 +328,7 @@ static_library("ui") { - "//build:chromeos_buildflags", +@@ -331,6 +336,7 @@ static_library("ui") { "//build/config/chromebox_for_meetings:buildflags", + "//build/config/linux/dbus:buildflags", "//cc/paint", + "//cef/libcef/features", "//chrome:resources", "//chrome:strings", "//chrome/app:chrome_dll_resources", -@@ -688,6 +694,10 @@ static_library("ui") { +@@ -699,6 +705,10 @@ static_library("ui") { deps += [ "//components/plus_addresses/resources:vector_icons" ] } @@ -129,7 +129,7 @@ index df9b0eed07761..a984511be272a 100644 # TODO(crbug.com/41437292): Remove this circular dependency. # Any circular includes must depend on the target "//chrome/browser:browser_public_dependencies". # These are all-platform circular includes. -@@ -5479,6 +5489,7 @@ static_library("ui") { +@@ -5487,6 +5497,7 @@ static_library("ui") { if (enable_printing) { deps += [ "//components/printing/browser", @@ -138,10 +138,10 @@ index df9b0eed07761..a984511be272a 100644 ] } diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc -index f313979ca1b0a..c1f63c4a1cda5 100644 +index a62c82aab7a35..cbd8c87aba959 100644 --- chrome/browser/ui/browser.cc +++ chrome/browser/ui/browser.cc -@@ -270,6 +270,25 @@ +@@ -269,6 +269,25 @@ #include "components/captive_portal/content/captive_portal_tab_helper.h" #endif @@ -167,7 +167,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/browser/extensions/extension_browser_window_helper.h" #endif -@@ -559,6 +578,10 @@ Browser::Browser(const CreateParams& params) +@@ -558,6 +577,10 @@ Browser::Browser(const CreateParams& params) type_(params.type), profile_(params.profile), window_(nullptr), @@ -178,7 +178,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644 tab_strip_model_delegate_( std::make_unique(this)), tab_strip_model_(std::make_unique( -@@ -789,6 +812,12 @@ Browser::~Browser() { +@@ -788,6 +811,12 @@ Browser::~Browser() { // away so they don't try and call back to us. if (select_file_dialog_.get()) select_file_dialog_->ListenerDestroyed(); @@ -191,7 +191,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644 } /////////////////////////////////////////////////////////////////////////////// -@@ -1375,6 +1404,8 @@ void Browser::WindowFullscreenStateChanged() { +@@ -1407,6 +1436,8 @@ void Browser::WindowFullscreenStateChanged() { ->WindowFullscreenStateChanged(); command_controller_->FullscreenStateChanged(); UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN); @@ -200,7 +200,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644 } void Browser::FullscreenTopUIStateChanged() { -@@ -1694,6 +1725,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( +@@ -1726,6 +1757,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( if (exclusive_access_manager_->HandleUserKeyEvent(event)) return content::KeyboardEventProcessingResult::HANDLED; @@ -215,7 +215,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644 return window()->PreHandleKeyboardEvent(event); } -@@ -1701,8 +1740,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, +@@ -1733,8 +1772,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, const NativeWebKeyboardEvent& event) { DevToolsWindow* devtools_window = DevToolsWindow::GetInstanceForInspectedWebContents(source); @@ -236,7 +236,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644 } bool Browser::TabsNeedBeforeUnloadFired() const { -@@ -1795,9 +1844,14 @@ bool Browser::IsBackForwardCacheSupported(content::WebContents& web_contents) { +@@ -1826,9 +1875,14 @@ bool Browser::IsBackForwardCacheSupported(content::WebContents& web_contents) { content::PreloadingEligibility Browser::IsPrerender2Supported( content::WebContents& web_contents) { @@ -251,7 +251,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644 } bool Browser::ShouldShowStaleContentOnEviction(content::WebContents* source) { -@@ -1857,6 +1911,14 @@ WebContents* Browser::OpenURLFromTab( +@@ -1888,6 +1942,14 @@ WebContents* Browser::OpenURLFromTab( std::move(navigation_handle_callback)); } @@ -266,7 +266,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644 NavigateParams nav_params(this, params.url, params.transition); nav_params.FillNavigateParamsFromOpenURLParams(params); nav_params.source_contents = source; -@@ -2023,6 +2085,8 @@ void Browser::LoadingStateChanged(WebContents* source, +@@ -2054,6 +2116,8 @@ void Browser::LoadingStateChanged(WebContents* source, bool should_show_loading_ui) { ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD); UpdateWindowForLoadingStateChanged(source, should_show_loading_ui); @@ -275,7 +275,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644 } void Browser::CloseContents(WebContents* source) { -@@ -2051,6 +2115,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { +@@ -2082,6 +2146,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { } void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { @@ -284,7 +284,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644 if (!GetStatusBubble()) return; -@@ -2058,6 +2124,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { +@@ -2089,6 +2155,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { GetStatusBubble()->SetURL(url); } @@ -302,7 +302,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644 void Browser::ContentsMouseEvent(WebContents* source, const ui::Event& event) { const ui::EventType type = event.type(); const bool exited = type == ui::EventType::kMouseExited; -@@ -2086,6 +2163,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) { +@@ -2117,6 +2194,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) { return false; } @@ -322,10 +322,10 @@ index f313979ca1b0a..c1f63c4a1cda5 100644 void Browser::BeforeUnloadFired(WebContents* web_contents, bool proceed, bool* proceed_to_fire_unload) { -@@ -2185,12 +2275,24 @@ void Browser::WebContentsCreated(WebContents* source_contents, - - // Make the tab show up in the task manager. - task_manager::WebContentsTags::CreateForTabContents(new_contents); +@@ -2213,12 +2303,24 @@ void Browser::WebContentsCreated(WebContents* source_contents, + // will later be inserted into this browser using Browser::Navigate via + // AddNewContents. + TabHelpers::AttachTabHelpers(new_contents); + + CALL_CEF_DELEGATE(WebContentsCreated, source_contents, + opener_render_process_id, opener_render_frame_id, @@ -347,7 +347,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644 // Don't show the page hung dialog when a HTML popup hangs because // the dialog will take the focus and immediately close the popup. RenderWidgetHostView* view = render_widget_host->GetView(); -@@ -2203,6 +2305,13 @@ void Browser::RendererUnresponsive( +@@ -2231,6 +2333,13 @@ void Browser::RendererUnresponsive( void Browser::RendererResponsive( WebContents* source, content::RenderWidgetHost* render_widget_host) { @@ -361,7 +361,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644 RenderWidgetHostView* view = render_widget_host->GetView(); if (view && !render_widget_host->GetView()->IsHTMLFormPopup()) { TabDialogs::FromWebContents(source)->HideHungRendererDialog( -@@ -2212,6 +2321,15 @@ void Browser::RendererResponsive( +@@ -2240,6 +2349,15 @@ void Browser::RendererResponsive( content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager( WebContents* source) { @@ -377,7 +377,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644 return javascript_dialogs::TabModalDialogManager::FromWebContents(source); } -@@ -2247,6 +2365,11 @@ void Browser::DraggableRegionsChanged( +@@ -2275,6 +2393,11 @@ void Browser::DraggableRegionsChanged( if (app_controller_) { app_controller_->DraggableRegionsChanged(regions, contents); } @@ -389,7 +389,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644 } void Browser::DidFinishNavigation( -@@ -2327,11 +2450,15 @@ void Browser::EnterFullscreenModeForTab( +@@ -2355,11 +2478,15 @@ void Browser::EnterFullscreenModeForTab( const blink::mojom::FullscreenOptions& options) { exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab( requesting_frame, options.display_id); @@ -405,7 +405,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644 } bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) { -@@ -2534,6 +2661,15 @@ void Browser::RequestMediaAccessPermission( +@@ -2562,6 +2689,15 @@ void Browser::RequestMediaAccessPermission( content::WebContents* web_contents, const content::MediaStreamRequest& request, content::MediaResponseCallback callback) { @@ -421,7 +421,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644 const extensions::Extension* extension = GetExtensionForOrigin(profile_, request.security_origin); MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( -@@ -3086,9 +3222,10 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { +@@ -3114,9 +3250,10 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { // Browser, Getters for UI (private): StatusBubble* Browser::GetStatusBubble() { @@ -433,7 +433,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644 } // We hide the status bar for web apps windows as this matches native -@@ -3096,6 +3233,12 @@ StatusBubble* Browser::GetStatusBubble() { +@@ -3124,6 +3261,12 @@ StatusBubble* Browser::GetStatusBubble() { // mode, as the minimal browser UI includes the status bar. if (web_app::AppBrowserController::IsWebApp(this) && !app_controller()->HasMinimalUiButtons()) { @@ -446,7 +446,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644 return nullptr; } -@@ -3241,6 +3384,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { +@@ -3269,6 +3412,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this); web_contents_collection_.StopObserving(web_contents); } @@ -455,7 +455,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644 } void Browser::TabDetachedAtImpl(content::WebContents* contents, -@@ -3398,6 +3543,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature( +@@ -3426,6 +3571,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature( bool Browser::SupportsWindowFeatureImpl(WindowFeature feature, bool check_can_support) const { @@ -471,7 +471,7 @@ index f313979ca1b0a..c1f63c4a1cda5 100644 case TYPE_NORMAL: return NormalBrowserSupportsWindowFeature(feature, check_can_support); diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h -index 8057f6fcc87c4..14bf2073b170b 100644 +index 1455dcab97edb..eb86532470a75 100644 --- chrome/browser/ui/browser.h +++ chrome/browser/ui/browser.h @@ -25,6 +25,7 @@ @@ -536,7 +536,7 @@ index 8057f6fcc87c4..14bf2073b170b 100644 // Get the FindBarController for this browser, creating it if it does not // yet exist. FindBarController* GetFindBarController(); -@@ -961,10 +988,18 @@ class Browser : public TabStripModelObserver, +@@ -964,10 +991,18 @@ class Browser : public TabStripModelObserver, void SetContentsBounds(content::WebContents* source, const gfx::Rect& bounds) override; void UpdateTargetURL(content::WebContents* source, const GURL& url) override; @@ -555,7 +555,7 @@ index 8057f6fcc87c4..14bf2073b170b 100644 void BeforeUnloadFired(content::WebContents* source, bool proceed, bool* proceed_to_fire_unload) override; -@@ -1303,6 +1338,10 @@ class Browser : public TabStripModelObserver, +@@ -1306,6 +1341,10 @@ class Browser : public TabStripModelObserver, // This Browser's window. raw_ptr window_; @@ -566,7 +566,7 @@ index 8057f6fcc87c4..14bf2073b170b 100644 std::unique_ptr const tab_strip_model_delegate_; std::unique_ptr const tab_strip_model_; -@@ -1369,6 +1408,8 @@ class Browser : public TabStripModelObserver, +@@ -1372,6 +1411,8 @@ class Browser : public TabStripModelObserver, const std::string initial_workspace_; bool initial_visible_on_all_workspaces_state_; @@ -576,10 +576,10 @@ index 8057f6fcc87c4..14bf2073b170b 100644 UnloadController unload_controller_; diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc -index 61a46e74464e0..d5978661b222e 100644 +index d26f6e2bdefd8..6c37714cc328f 100644 --- chrome/browser/ui/browser_navigator.cc +++ chrome/browser/ui/browser_navigator.cc -@@ -271,6 +271,10 @@ std::tuple GetBrowserAndTabForDisposition( +@@ -260,6 +260,10 @@ std::tuple GetBrowserAndTabForDisposition( browser_params.pip_options = pip_options; @@ -590,10 +590,14 @@ index 61a46e74464e0..d5978661b222e 100644 const BrowserWindow* const browser_window = params.browser->window(); const gfx::NativeWindow native_window = browser_window ? browser_window->GetNativeWindow() -@@ -561,6 +565,13 @@ std::unique_ptr CreateTargetContents( - std::unique_ptr target_contents = - WebContents::Create(create_params); +@@ -547,7 +551,17 @@ std::unique_ptr CreateTargetContents( + } + #endif +- return WebContents::Create(create_params); ++ std::unique_ptr target_contents = ++ WebContents::Create(create_params); ++ +#if BUILDFLAG(ENABLE_CEF) + auto cef_delegate = params.browser->cef_delegate(); + if (cef_delegate) { @@ -601,9 +605,10 @@ index 61a46e74464e0..d5978661b222e 100644 + } +#endif + - // New tabs can have WebUI URLs that will make calls back to arbitrary - // tab helpers, so the entire set of tab helpers needs to be set up - // immediately. ++ return target_contents; + } + + bool IsHostAllowedInIncognito(const GURL& url) { diff --git chrome/browser/ui/browser_tabstrip.cc chrome/browser/ui/browser_tabstrip.cc index 1f84235515463..82942fb06b5f3 100644 --- chrome/browser/ui/browser_tabstrip.cc diff --git a/patch/patches/chrome_browser_content_settings.patch b/patch/patches/chrome_browser_content_settings.patch index ffc650954..8d3b479c4 100644 --- a/patch/patches/chrome_browser_content_settings.patch +++ b/patch/patches/chrome_browser_content_settings.patch @@ -1,13 +1,13 @@ diff --git components/content_settings/renderer/content_settings_agent_impl.cc components/content_settings/renderer/content_settings_agent_impl.cc -index ba73101c05be3..f30ed2f3e9ab1 100644 +index 0897668803c2e..12cdbd7642ffd 100644 --- components/content_settings/renderer/content_settings_agent_impl.cc +++ components/content_settings/renderer/content_settings_agent_impl.cc @@ -146,7 +146,7 @@ ContentSetting GetContentSettingFromRules( return rule.GetContentSetting(); } } -- NOTREACHED_IN_MIGRATION(); -+ // NOTREACHED_IN_MIGRATION(); - return CONTENT_SETTING_DEFAULT; +- NOTREACHED(); ++ return CONTENT_SETTING_DEFAULT; } } // namespace + diff --git a/patch/patches/chrome_browser_context_menus.patch b/patch/patches/chrome_browser_context_menus.patch index ad98adc83..fc5aa71d5 100644 --- a/patch/patches/chrome_browser_context_menus.patch +++ b/patch/patches/chrome_browser_context_menus.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/renderer_context_menu/render_view_context_menu.cc chrome/browser/renderer_context_menu/render_view_context_menu.cc -index a1564ffe50f30..bfafcad73a2a2 100644 +index 419bf206081ba..d0b299714a5eb 100644 --- chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ chrome/browser/renderer_context_menu/render_view_context_menu.cc @@ -359,6 +359,18 @@ base::OnceCallback* GetMenuShownCallback() { @@ -32,7 +32,7 @@ index a1564ffe50f30..bfafcad73a2a2 100644 id = CollapseCommandsForUMA(id); const auto& map = GetIdcToUmaMap(type); auto it = map.find(id); -@@ -908,6 +924,14 @@ RenderViewContextMenu::RenderViewContextMenu( +@@ -931,6 +947,14 @@ RenderViewContextMenu::RenderViewContextMenu( : nullptr; #endif // BUILDFLAG(IS_CHROMEOS_ASH) @@ -47,7 +47,7 @@ index a1564ffe50f30..bfafcad73a2a2 100644 observers_.AddObserver(&autofill_context_menu_manager_); } -@@ -1364,6 +1388,12 @@ void RenderViewContextMenu::InitMenu() { +@@ -1387,6 +1411,12 @@ void RenderViewContextMenu::InitMenu() { autofill_client->HideAutofillSuggestions( autofill::SuggestionHidingReason::kContextMenuOpened); } @@ -60,7 +60,7 @@ index a1564ffe50f30..bfafcad73a2a2 100644 } Profile* RenderViewContextMenu::GetProfile() const { -@@ -3630,6 +3660,26 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting( +@@ -3656,6 +3686,26 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting( execute_plugin_action_callback_ = std::move(cb); } @@ -88,10 +88,10 @@ index a1564ffe50f30..bfafcad73a2a2 100644 RenderViewContextMenu::GetHandlersForLinkUrl() { custom_handlers::ProtocolHandlerRegistry::ProtocolHandlerList handlers = diff --git chrome/browser/renderer_context_menu/render_view_context_menu.h chrome/browser/renderer_context_menu/render_view_context_menu.h -index b9ab5b1295599..7ad5bcb00ff8b 100644 +index e31912f931c11..dac994a1958b1 100644 --- chrome/browser/renderer_context_menu/render_view_context_menu.h +++ chrome/browser/renderer_context_menu/render_view_context_menu.h -@@ -153,7 +153,21 @@ class RenderViewContextMenu +@@ -155,7 +155,21 @@ class RenderViewContextMenu } #endif @@ -113,7 +113,7 @@ index b9ab5b1295599..7ad5bcb00ff8b 100644 Profile* GetProfile() const; // This may return nullptr (e.g. for WebUI dialogs). Virtual to allow tests to -@@ -475,6 +489,9 @@ class RenderViewContextMenu +@@ -481,6 +495,9 @@ class RenderViewContextMenu // built. bool is_protocol_submenu_valid_ = false; @@ -189,10 +189,10 @@ index 9f6c5fd44f206..dc50bc909897f 100644 runner_->Cancel(); } diff --git chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc -index a269d358300b8..bf31a3cecdee7 100644 +index a0a564cbef528..f804cffc6944f 100644 --- chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc +++ chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc -@@ -150,6 +150,9 @@ void RenderViewContextMenuViews::RunMenuAt(views::Widget* parent, +@@ -149,6 +149,9 @@ void RenderViewContextMenuViews::RunMenuAt(views::Widget* parent, bool RenderViewContextMenuViews::GetAcceleratorForCommandId( int command_id, ui::Accelerator* accel) const { @@ -202,7 +202,7 @@ index a269d358300b8..bf31a3cecdee7 100644 // There are no formally defined accelerators we can query so we assume // that Ctrl+C, Ctrl+V, Ctrl+X, Ctrl-A, etc do what they normally do. switch (command_id) { -@@ -386,6 +389,10 @@ void RenderViewContextMenuViews::AppendPlatformEditableItems() { +@@ -383,6 +386,10 @@ void RenderViewContextMenuViews::AppendPlatformEditableItems() { } void RenderViewContextMenuViews::Show() { @@ -213,7 +213,7 @@ index a269d358300b8..bf31a3cecdee7 100644 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode)) return; -@@ -428,6 +435,11 @@ void RenderViewContextMenuViews::Show() { +@@ -425,6 +432,11 @@ void RenderViewContextMenuViews::Show() { } } @@ -305,10 +305,10 @@ index 042428f77f4ad..e4efd98ca45d5 100644 raw_ptr web_contents_ = nullptr; }; diff --git components/renderer_context_menu/render_view_context_menu_base.cc components/renderer_context_menu/render_view_context_menu_base.cc -index edf3c0f19409e..3a194411201fe 100644 +index 2c4065b89fd0b..b978ebc839209 100644 --- components/renderer_context_menu/render_view_context_menu_base.cc +++ components/renderer_context_menu/render_view_context_menu_base.cc -@@ -392,6 +392,17 @@ bool RenderViewContextMenuBase::IsCommandIdChecked(int id) const { +@@ -396,6 +396,17 @@ bool RenderViewContextMenuBase::IsCommandIdChecked(int id) const { return false; } diff --git a/patch/patches/chrome_browser_devtools_osr.patch b/patch/patches/chrome_browser_devtools_osr.patch index 9404d3eac..983f345dd 100644 --- a/patch/patches/chrome_browser_devtools_osr.patch +++ b/patch/patches/chrome_browser_devtools_osr.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/devtools/chrome_devtools_manager_delegate.cc chrome/browser/devtools/chrome_devtools_manager_delegate.cc -index 8c8d53b351c2f..c1fa3cd901335 100644 +index f49641db657c6..89419c039510e 100644 --- chrome/browser/devtools/chrome_devtools_manager_delegate.cc +++ chrome/browser/devtools/chrome_devtools_manager_delegate.cc @@ -15,6 +15,7 @@ @@ -10,7 +10,7 @@ index 8c8d53b351c2f..c1fa3cd901335 100644 #include "chrome/browser/browser_features.h" #include "chrome/browser/devtools/chrome_devtools_session.h" #include "chrome/browser/devtools/device/android_device_manager.h" -@@ -69,6 +70,10 @@ +@@ -70,6 +71,10 @@ #include "ash/constants/ash_switches.h" #endif @@ -21,7 +21,7 @@ index 8c8d53b351c2f..c1fa3cd901335 100644 using content::DevToolsAgentHost; const char ChromeDevToolsManagerDelegate::kTypeApp[] = "app"; -@@ -283,6 +288,12 @@ std::string ChromeDevToolsManagerDelegate::GetTargetType( +@@ -284,6 +289,12 @@ std::string ChromeDevToolsManagerDelegate::GetTargetType( return DevToolsAgentHost::kTypePage; } diff --git a/patch/patches/chrome_browser_dialogs_widget.patch b/patch/patches/chrome_browser_dialogs_widget.patch index a5d9fce65..2b5e962a6 100644 --- a/patch/patches/chrome_browser_dialogs_widget.patch +++ b/patch/patches/chrome_browser_dialogs_widget.patch @@ -12,7 +12,7 @@ index b169371e4d42f..509e4bda85b47 100644 // on the screen, we can't actually attach to it. parent_window = nullptr; diff --git components/constrained_window/constrained_window_views.cc components/constrained_window/constrained_window_views.cc -index b82cb011d2359..e224eef611704 100644 +index 34567d0940948..420d15acad367 100644 --- components/constrained_window/constrained_window_views.cc +++ components/constrained_window/constrained_window_views.cc @@ -102,10 +102,17 @@ class ModalDialogHostObserverViews : public ModalDialogHostObserver { @@ -279,10 +279,10 @@ index bc119f10f749e..d81c1ce4e786f 100644 // Web-modal (ui::mojom::ModalType::kChild) dialogs with parents are marked as // child widgets to prevent top-level window behavior (independent movement, diff --git ui/views/window/dialog_delegate.h ui/views/window/dialog_delegate.h -index 0777e2fe71f04..546994cad2b14 100644 +index 4b0c8249f3d91..056a5a92074e3 100644 --- ui/views/window/dialog_delegate.h +++ ui/views/window/dialog_delegate.h -@@ -106,13 +106,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate { +@@ -128,13 +128,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate { // your use case. static Widget* CreateDialogWidget(std::unique_ptr delegate, gfx::NativeWindow context, @@ -304,7 +304,7 @@ index 0777e2fe71f04..546994cad2b14 100644 // Returns the dialog widget InitParams for a given |context| or |parent|. // If |bounds| is not empty, used to initially place the dialog, otherwise -@@ -120,7 +125,9 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate { +@@ -142,7 +147,9 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate { static Widget::InitParams GetDialogWidgetInitParams(WidgetDelegate* delegate, gfx::NativeWindow context, gfx::NativeView parent, diff --git a/patch/patches/chrome_browser_download.patch b/patch/patches/chrome_browser_download.patch index 08748c7cb..9d891183c 100644 --- a/patch/patches/chrome_browser_download.patch +++ b/patch/patches/chrome_browser_download.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/download/chrome_download_manager_delegate.cc chrome/browser/download/chrome_download_manager_delegate.cc -index e07f9d6b5aabd..f57b5da7e9364 100644 +index c95b5e23f09b0..62c331a47ad2e 100644 --- chrome/browser/download/chrome_download_manager_delegate.cc +++ chrome/browser/download/chrome_download_manager_delegate.cc @@ -31,6 +31,7 @@ diff --git a/patch/patches/chrome_browser_extensions.patch b/patch/patches/chrome_browser_extensions.patch index 3287476f9..e570b2c75 100644 --- a/patch/patches/chrome_browser_extensions.patch +++ b/patch/patches/chrome_browser_extensions.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/extensions/api/chrome_extensions_api_client.cc chrome/browser/extensions/api/chrome_extensions_api_client.cc -index da9c9d7c0f458..a97fc4e019775 100644 +index f61ec524109fe..92ca490728855 100644 --- chrome/browser/extensions/api/chrome_extensions_api_client.cc +++ chrome/browser/extensions/api/chrome_extensions_api_client.cc @@ -15,6 +15,7 @@ @@ -34,10 +34,10 @@ index da9c9d7c0f458..a97fc4e019775 100644 WebViewGuestDelegate* ChromeExtensionsAPIClient::CreateWebViewGuestDelegate( diff --git chrome/browser/extensions/api/tabs/tabs_api.cc chrome/browser/extensions/api/tabs/tabs_api.cc -index f4fc8d090230a..0de22b5e1c0f1 100644 +index 708748407e8b8..9e91dd2b2f285 100644 --- chrome/browser/extensions/api/tabs/tabs_api.cc +++ chrome/browser/extensions/api/tabs/tabs_api.cc -@@ -1646,7 +1646,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { +@@ -1643,7 +1643,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { return RespondNow(Error(ExtensionTabUtil::kTabStripNotEditableError)); } @@ -46,7 +46,7 @@ index f4fc8d090230a..0de22b5e1c0f1 100644 tab_strip->ActivateTabAt(tab_index); DCHECK_EQ(contents, tab_strip->GetActiveWebContents()); } -@@ -1660,7 +1660,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { +@@ -1657,7 +1657,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { } bool highlighted = *params->update_properties.highlighted; @@ -55,7 +55,7 @@ index f4fc8d090230a..0de22b5e1c0f1 100644 tab_strip->ToggleSelectionAt(tab_index); } } -@@ -1672,7 +1672,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { +@@ -1669,7 +1669,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { kCannotUpdateMuteCaptured, base::NumberToString(tab_id)))); } @@ -64,7 +64,7 @@ index f4fc8d090230a..0de22b5e1c0f1 100644 int opener_id = *params->update_properties.opener_tab_id; WebContents* opener_contents = nullptr; if (opener_id == tab_id) { -@@ -1707,7 +1707,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { +@@ -1704,7 +1704,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { ->SetAutoDiscardable(state); } @@ -73,7 +73,7 @@ index f4fc8d090230a..0de22b5e1c0f1 100644 // Bug fix for crbug.com/1197888. Don't let the extension update the tab if // the user is dragging tabs. if (!ExtensionTabUtil::IsTabStripEditable()) { -@@ -1728,7 +1728,8 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { +@@ -1725,7 +1725,8 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { // Navigate the tab to a new location if the url is different. if (params->update_properties.url) { std::string updated_url = *params->update_properties.url; @@ -83,7 +83,7 @@ index f4fc8d090230a..0de22b5e1c0f1 100644 !IsURLAllowedInIncognito(GURL(updated_url))) { return RespondNow(Error(ErrorUtils::FormatErrorMessage( tabs_constants::kURLsNotAllowedInIncognitoError, updated_url))); -@@ -1743,7 +1744,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { +@@ -1740,7 +1741,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { return RespondNow(Error(std::move(error))); } @@ -93,20 +93,20 @@ index f4fc8d090230a..0de22b5e1c0f1 100644 current_url, updated_url, js_callstack()); } diff --git chrome/browser/extensions/extension_tab_util.cc chrome/browser/extensions/extension_tab_util.cc -index 4d2c067a06041..6943da2585d22 100644 +index 621e65fdf7666..93ec54e632930 100644 --- chrome/browser/extensions/extension_tab_util.cc +++ chrome/browser/extensions/extension_tab_util.cc -@@ -20,6 +20,7 @@ +@@ -35,6 +35,7 @@ #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "base/types/expected_macros.h" +#include "cef/libcef/features/features.h" - #include "chrome/browser/browser_process.h" + #include "chrome/browser/browser_process.h" // nogncheck #include "chrome/browser/extensions/browser_extension_window_controller.h" #include "chrome/browser/extensions/chrome_extension_function_details.h" -@@ -74,6 +75,10 @@ - #include "third_party/blink/public/common/features.h" +@@ -80,6 +81,10 @@ #include "url/gurl.h" + #endif +#if BUILDFLAG(ENABLE_CEF) +#include "cef/libcef/browser/chrome/extensions/chrome_extension_util.h" @@ -115,7 +115,7 @@ index 4d2c067a06041..6943da2585d22 100644 using content::NavigationEntry; using content::WebContents; using extensions::mojom::APIPermissionID; -@@ -714,6 +719,14 @@ bool ExtensionTabUtil::GetTabById(int tab_id, +@@ -731,6 +736,14 @@ bool ExtensionTabUtil::GetTabById(int tab_id, } } diff --git a/patch/patches/chrome_browser_frame_mac.patch b/patch/patches/chrome_browser_frame_mac.patch index a08992904..a157b70cf 100644 --- a/patch/patches/chrome_browser_frame_mac.patch +++ b/patch/patches/chrome_browser_frame_mac.patch @@ -33,7 +33,7 @@ index 2245c931fbe4f..761ea6b3a6afb 100644 ~BrowserFrameMac() override; diff --git chrome/browser/ui/views/frame/browser_frame_mac.mm chrome/browser/ui/views/frame/browser_frame_mac.mm -index 1e5c56c02cace..71e91ab4f3fb7 100644 +index ad9fe12425ad6..fa5840643f3a4 100644 --- chrome/browser/ui/views/frame/browser_frame_mac.mm +++ chrome/browser/ui/views/frame/browser_frame_mac.mm @@ -184,7 +184,14 @@ void BrowserFrameMac::OnWindowFullscreenTransitionComplete() { @@ -70,7 +70,7 @@ index 1e5c56c02cace..71e91ab4f3fb7 100644 if (is_before_first_responder) { // The specification for this private extensions API is incredibly vague. // For now, we avoid triggering chrome commands prior to giving the -@@ -339,11 +354,20 @@ bool BrowserFrameMac::ExecuteCommand( +@@ -340,11 +355,20 @@ bool BrowserFrameMac::ExecuteCommand( int32_t command, WindowOpenDisposition window_open_disposition, bool is_before_first_responder) { diff --git a/patch/patches/chrome_browser_permission_prompt.patch b/patch/patches/chrome_browser_permission_prompt.patch index d8a77d762..86afdc2ab 100644 --- a/patch/patches/chrome_browser_permission_prompt.patch +++ b/patch/patches/chrome_browser_permission_prompt.patch @@ -17,7 +17,7 @@ index fbce13c16ad10..0512b2f09937e 100644 std::unique_ptr CreatePermissionPrompt( content::WebContents* web_contents, diff --git chrome/browser/ui/views/permissions/permission_prompt_factory.cc chrome/browser/ui/views/permissions/permission_prompt_factory.cc -index 7f976b5bc5c44..ee2faa5c297a7 100644 +index d2328bfa93afa..c80206aecbcbf 100644 --- chrome/browser/ui/views/permissions/permission_prompt_factory.cc +++ chrome/browser/ui/views/permissions/permission_prompt_factory.cc @@ -222,11 +222,28 @@ std::unique_ptr CreateQuietPrompt( diff --git a/patch/patches/chrome_browser_policy.patch b/patch/patches/chrome_browser_policy.patch index a366ca4f1..093a3e2fa 100644 --- a/patch/patches/chrome_browser_policy.patch +++ b/patch/patches/chrome_browser_policy.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/policy/browser_dm_token_storage_linux.cc chrome/browser/policy/browser_dm_token_storage_linux.cc -index cbad74b559c07..f3b4f6261d7c0 100644 +index c609f9477c66c..19abd149b66dd 100644 --- chrome/browser/policy/browser_dm_token_storage_linux.cc +++ chrome/browser/policy/browser_dm_token_storage_linux.cc @@ -22,6 +22,7 @@ @@ -357,10 +357,10 @@ index 8dbf958c189dd..6eaccc6688eca 100644 *dir = base::FilePath(policy::path_parser::ExpandPathVariables(value)); return true; diff --git chrome/common/chrome_paths.cc chrome/common/chrome_paths.cc -index a467b25145684..8727050b93a35 100644 +index afc13e1b56f78..f80c5ed14051d 100644 --- chrome/common/chrome_paths.cc +++ chrome/common/chrome_paths.cc -@@ -525,7 +525,8 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -527,7 +527,8 @@ bool PathProvider(int key, base::FilePath* result) { break; } #endif @@ -371,7 +371,7 @@ index a467b25145684..8727050b93a35 100644 cur = base::FilePath(policy::kPolicyPath); break; diff --git chrome/common/chrome_paths.h chrome/common/chrome_paths.h -index fbfe597d09d9a..b8067f8d9ecd7 100644 +index 21dfe21a78eb9..20d8ea2709b99 100644 --- chrome/common/chrome_paths.h +++ chrome/common/chrome_paths.h @@ -8,6 +8,7 @@ diff --git a/patch/patches/chrome_browser_profiles.patch b/patch/patches/chrome_browser_profiles.patch index 645d62b90..ea71810b1 100644 --- a/patch/patches/chrome_browser_profiles.patch +++ b/patch/patches/chrome_browser_profiles.patch @@ -14,7 +14,7 @@ index cf4597e671afe..a9693c4e10d8e 100644 } diff --git chrome/browser/profiles/profile.cc chrome/browser/profiles/profile.cc -index 4385d5d90f9c8..88aca5519660e 100644 +index 0b37d2e8cc60f..0ed51eebe9f76 100644 --- chrome/browser/profiles/profile.cc +++ chrome/browser/profiles/profile.cc @@ -84,6 +84,7 @@ base::LazyInstance>::Leaky @@ -28,13 +28,13 @@ index 4385d5d90f9c8..88aca5519660e 100644 @@ -104,6 +105,8 @@ bool Profile::OTRProfileID::AllowsBrowserWindows() const { // DevTools::BrowserContext, MediaRouter::Presentation, and // CaptivePortal::Signin are exceptions to this ban. - if (*this == PrimaryID() || + if (*this == PrimaryID() || IsDevTools() || + base::StartsWith(profile_id_, kCEFOTRProfileIDPrefix, + base::CompareCase::SENSITIVE) || - base::StartsWith(profile_id_, kDevToolsOTRProfileIDPrefix, - base::CompareCase::SENSITIVE) || base::StartsWith(profile_id_, kMediaRouterOTRProfileIDPrefix, -@@ -141,6 +144,16 @@ Profile::OTRProfileID Profile::OTRProfileID::CreateUnique( + base::CompareCase::SENSITIVE)) { + return true; +@@ -144,6 +147,16 @@ Profile::OTRProfileID Profile::OTRProfileID::CreateUnique( base::Uuid::GenerateRandomV4().AsLowercaseString().c_str())); } @@ -52,7 +52,7 @@ index 4385d5d90f9c8..88aca5519660e 100644 Profile::OTRProfileID Profile::OTRProfileID::CreateUniqueForDevTools() { return CreateUnique(kDevToolsOTRProfileIDPrefix); diff --git chrome/browser/profiles/profile.h chrome/browser/profiles/profile.h -index 8e96e47754dc7..c65184775fba7 100644 +index 2fe342e49d3c1..559b2a676dab5 100644 --- chrome/browser/profiles/profile.h +++ chrome/browser/profiles/profile.h @@ -94,6 +94,10 @@ class Profile : public content::BrowserContext { @@ -66,7 +66,7 @@ index 8e96e47754dc7..c65184775fba7 100644 // Creates a unique OTR profile id to be used for DevTools browser contexts. static OTRProfileID CreateUniqueForDevTools(); -@@ -506,6 +510,9 @@ class Profile : public content::BrowserContext { +@@ -511,6 +515,9 @@ class Profile : public content::BrowserContext { static Profile* FromJavaObject(const jni_zero::JavaRef& obj); jni_zero::ScopedJavaLocalRef GetJavaObject() const; #endif // BUILDFLAG(IS_ANDROID) @@ -76,7 +76,7 @@ index 8e96e47754dc7..c65184775fba7 100644 protected: // Creates an OffTheRecordProfile which points to this Profile. static std::unique_ptr CreateOffTheRecordProfile( -@@ -517,7 +524,6 @@ class Profile : public content::BrowserContext { +@@ -522,7 +529,6 @@ class Profile : public content::BrowserContext { static PrefStore* CreateExtensionPrefStore(Profile*, bool incognito_pref_store); @@ -85,10 +85,10 @@ index 8e96e47754dc7..c65184775fba7 100644 // Returns whether the user has signed in this profile to an account. diff --git chrome/browser/profiles/profile_impl.cc chrome/browser/profiles/profile_impl.cc -index 3dd5f9818cfa0..7b3e3697f4ce3 100644 +index 03ca7ab9c372a..524facb62c672 100644 --- chrome/browser/profiles/profile_impl.cc +++ chrome/browser/profiles/profile_impl.cc -@@ -1038,7 +1038,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, +@@ -1041,7 +1041,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, otr_profiles_[otr_profile_id] = std::move(otr_profile); diff --git a/patch/patches/chrome_browser_safe_browsing.patch b/patch/patches/chrome_browser_safe_browsing.patch index 14e7eeed1..905646929 100644 --- a/patch/patches/chrome_browser_safe_browsing.patch +++ b/patch/patches/chrome_browser_safe_browsing.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn -index 949f93a7b032a..1c32ec4aa0b84 100644 +index e75f7bc2c574f..9dc127066abd6 100644 --- chrome/browser/safe_browsing/BUILD.gn +++ chrome/browser/safe_browsing/BUILD.gn @@ -39,6 +39,7 @@ static_library("safe_browsing") { diff --git a/patch/patches/chrome_browser_startup.patch b/patch/patches/chrome_browser_startup.patch index a60c24b87..716b89c7e 100644 --- a/patch/patches/chrome_browser_startup.patch +++ b/patch/patches/chrome_browser_startup.patch @@ -1,10 +1,10 @@ diff --git chrome/browser/ui/startup/startup_browser_creator.cc chrome/browser/ui/startup/startup_browser_creator.cc -index ba443f5e8838d..a3f3c250f8006 100644 +index 16f7438c6f112..c5568abce8917 100644 --- chrome/browser/ui/startup/startup_browser_creator.cc +++ chrome/browser/ui/startup/startup_browser_creator.cc -@@ -616,6 +616,13 @@ std::optional GetAppId(const base::CommandLine& command_line, +@@ -607,6 +607,13 @@ std::optional GetAppId(const base::CommandLine& command_line, } - #endif // BUILDFLAG(IS_CHROMEOS_ASH) + #endif // BUILDFLAG(IS_CHROMEOS) +StartupBrowserCreator::ProcessCommandLineCallback* +GetProcessCommandLineCallback() { @@ -16,7 +16,7 @@ index ba443f5e8838d..a3f3c250f8006 100644 } // namespace StartupProfileMode StartupProfileModeFromReason( -@@ -1479,6 +1486,12 @@ void StartupBrowserCreator::ProcessCommandLineWithProfile( +@@ -1467,6 +1474,12 @@ void StartupBrowserCreator::ProcessCommandLineWithProfile( {profile, mode}, last_opened_profiles); } @@ -29,7 +29,7 @@ index ba443f5e8838d..a3f3c250f8006 100644 // static void StartupBrowserCreator::ProcessCommandLineAlreadyRunning( const base::CommandLine& command_line, -@@ -1488,6 +1501,11 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning( +@@ -1476,6 +1489,11 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning( return; } @@ -42,7 +42,7 @@ index ba443f5e8838d..a3f3c250f8006 100644 StartupProfileMode mode = StartupProfileModeFromReason(profile_path_info.reason); diff --git chrome/browser/ui/startup/startup_browser_creator.h chrome/browser/ui/startup/startup_browser_creator.h -index 919bae5ccfeae..5c2dfbf955723 100644 +index 37957dc632d0c..735819e9ceb10 100644 --- chrome/browser/ui/startup/startup_browser_creator.h +++ chrome/browser/ui/startup/startup_browser_creator.h @@ -9,6 +9,7 @@ @@ -53,7 +53,7 @@ index 919bae5ccfeae..5c2dfbf955723 100644 #include "base/gtest_prod_util.h" #include "base/memory/raw_ptr.h" #include "build/build_config.h" -@@ -135,6 +136,13 @@ class StartupBrowserCreator { +@@ -134,6 +135,13 @@ class StartupBrowserCreator { StartupProfileInfo profile_info, const Profiles& last_opened_profiles); diff --git a/patch/patches/chrome_browser_webui_license.patch b/patch/patches/chrome_browser_webui_license.patch index 5e2f1bcfb..59a45509b 100644 --- a/patch/patches/chrome_browser_webui_license.patch +++ b/patch/patches/chrome_browser_webui_license.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/ui/webui/about/about_ui.cc chrome/browser/ui/webui/about/about_ui.cc -index e28af86de9298..fb182fa3f7c32 100644 +index d8205f05e45fb..fd867040ec470 100644 --- chrome/browser/ui/webui/about/about_ui.cc +++ chrome/browser/ui/webui/about/about_ui.cc -@@ -89,6 +89,10 @@ +@@ -90,6 +90,10 @@ #include "chrome/common/webui_url_constants.h" #endif // BUILDFLAG(IS_CHROMEOS) @@ -13,7 +13,7 @@ index e28af86de9298..fb182fa3f7c32 100644 using content::BrowserThread; namespace { -@@ -620,6 +624,11 @@ ChromeURLsUIConfig::ChromeURLsUIConfig() +@@ -541,6 +545,11 @@ ChromeURLsUIConfig::CreateWebUIController(content::WebUI* web_ui, CreditsUIConfig::CreditsUIConfig() : AboutUIConfigBase(chrome::kChromeUICreditsHost) {} @@ -25,7 +25,7 @@ index e28af86de9298..fb182fa3f7c32 100644 #if !BUILDFLAG(IS_ANDROID) TermsUIConfig::TermsUIConfig() : AboutUIConfigBase(chrome::kChromeUITermsHost) {} -@@ -721,6 +730,16 @@ void AboutUIHTMLSource::StartDataRequest( +@@ -642,6 +651,16 @@ void AboutUIHTMLSource::StartDataRequest( IDS_TERMS_HTML); #endif } @@ -43,7 +43,7 @@ index e28af86de9298..fb182fa3f7c32 100644 FinishDataRequest(response, std::move(callback)); } diff --git chrome/browser/ui/webui/about/about_ui.h chrome/browser/ui/webui/about/about_ui.h -index 6548d519c3da9..645163f69f822 100644 +index 1b8d354f098b8..e7ea1c3329918 100644 --- chrome/browser/ui/webui/about/about_ui.h +++ chrome/browser/ui/webui/about/about_ui.h @@ -11,6 +11,7 @@ @@ -54,7 +54,7 @@ index 6548d519c3da9..645163f69f822 100644 #include "content/public/browser/url_data_source.h" #include "content/public/browser/web_ui_controller.h" #include "content/public/browser/webui_config.h" -@@ -42,6 +43,13 @@ class CreditsUIConfig : public AboutUIConfigBase { +@@ -47,6 +48,13 @@ class CreditsUIConfig : public AboutUIConfigBase { CreditsUIConfig(); }; @@ -69,7 +69,7 @@ index 6548d519c3da9..645163f69f822 100644 // chrome://terms class TermsUIConfig : public AboutUIConfigBase { diff --git chrome/browser/ui/webui/chrome_web_ui_configs.cc chrome/browser/ui/webui/chrome_web_ui_configs.cc -index 8b877339c4179..dcb347ef1878f 100644 +index a2719d73bc701..3cc832d90e17a 100644 --- chrome/browser/ui/webui/chrome_web_ui_configs.cc +++ chrome/browser/ui/webui/chrome_web_ui_configs.cc @@ -6,6 +6,7 @@ @@ -80,7 +80,7 @@ index 8b877339c4179..dcb347ef1878f 100644 #include "chrome/browser/optimization_guide/optimization_guide_internals_ui.h" #include "chrome/browser/ui/webui/about/about_ui.h" #include "chrome/browser/ui/webui/accessibility/accessibility_ui.h" -@@ -215,6 +216,9 @@ void RegisterChromeWebUIConfigs() { +@@ -210,6 +211,9 @@ void RegisterChromeWebUIConfigs() { map.AddWebUIConfig(std::make_unique()); map.AddWebUIConfig(std::make_unique()); map.AddWebUIConfig(std::make_unique()); @@ -90,33 +90,11 @@ index 8b877339c4179..dcb347ef1878f 100644 map.AddWebUIConfig(std::make_unique()); map.AddWebUIConfig(std::make_unique()); map.AddWebUIConfig(std::make_unique()); -diff --git chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -index f9ca5f61c9c1f..a99993720a7ea 100644 ---- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -+++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -18,6 +18,7 @@ - #include "build/branding_buildflags.h" - #include "build/build_config.h" - #include "build/chromeos_buildflags.h" -+#include "cef/libcef/features/features.h" - #include "chrome/browser/about_flags.h" - #include "chrome/browser/buildflags.h" - #include "chrome/browser/devtools/devtools_ui_bindings.h" -@@ -485,6 +486,9 @@ ChromeWebUIControllerFactory::GetListOfAcceptableURLs() { - GURL(chrome::kChromeUIGpuURL), - GURL(chrome::kChromeUIHistogramsURL), - GURL(chrome::kChromeUIInspectURL), -+#if BUILDFLAG(ENABLE_CEF) -+ GURL(chrome::kChromeUILicenseURL), -+#endif - GURL(chrome::kChromeUIManagementURL), - GURL(chrome::kChromeUINetExportURL), - GURL(chrome::kChromeUIPrefsInternalsURL), diff --git chrome/common/webui_url_constants.cc chrome/common/webui_url_constants.cc -index 47932e80c59ea..805a9e8e3c3e6 100644 +index b04b8dc5c8781..f002f6178775e 100644 --- chrome/common/webui_url_constants.cc +++ chrome/common/webui_url_constants.cc -@@ -99,6 +99,9 @@ base::span ChromeURLHosts() { +@@ -96,6 +96,9 @@ base::span ChromeURLHosts() { kChromeUIHistoryHost, history_clusters_internals::kChromeUIHistoryClustersInternalsHost, kChromeUIInterstitialHost, @@ -127,21 +105,21 @@ index 47932e80c59ea..805a9e8e3c3e6 100644 #if !BUILDFLAG(IS_ANDROID) kChromeUIManagementHost, diff --git chrome/common/webui_url_constants.h chrome/common/webui_url_constants.h -index 9fa26adc16d4f..32635f37b8846 100644 +index 5b811889ae545..a118638e7e629 100644 --- chrome/common/webui_url_constants.h +++ chrome/common/webui_url_constants.h -@@ -18,6 +18,7 @@ +@@ -17,6 +17,7 @@ + #include "base/strings/cstring_view.h" #include "build/branding_buildflags.h" #include "build/build_config.h" - #include "build/chromeos_buildflags.h" +#include "cef/libcef/features/features.h" #include "chrome/common/buildflags.h" - #include "components/lens/buildflags.h" #include "components/signin/public/base/signin_buildflags.h" -@@ -157,6 +158,10 @@ inline constexpr char kChromeUILauncherInternalsURL[] = - inline constexpr char kChromeUILensSearchBubbleHost[] = "lens-search-bubble"; - inline constexpr char kChromeUILensSearchBubbleURL[] = - "chrome://lens-search-bubble/"; + #include "content/public/common/url_constants.h" +@@ -145,6 +146,10 @@ inline constexpr char kChromeUIInterstitialHost[] = "interstitials"; + inline constexpr char kChromeUIInterstitialURL[] = "chrome://interstitials/"; + inline constexpr char kChromeUIKillHost[] = "kill"; + inline constexpr char kChromeUILauncherInternalsHost[] = "launcher-internals"; +#if BUILDFLAG(ENABLE_CEF) +inline constexpr char kChromeUILicenseHost[] = "license"; +inline constexpr char kChromeUILicenseURL[] = "chrome://license/"; diff --git a/patch/patches/chrome_browser_webui_version.patch b/patch/patches/chrome_browser_webui_version.patch index c122cb78f..1ba2aceac 100644 --- a/patch/patches/chrome_browser_webui_version.patch +++ b/patch/patches/chrome_browser_webui_version.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/ui/webui/version/version_handler.cc chrome/browser/ui/webui/version/version_handler.cc -index 0ce1816cb372d..dfee4d62126b2 100644 +index 3c684382f63ca..f560d3c181730 100644 --- chrome/browser/ui/webui/version/version_handler.cc +++ chrome/browser/ui/webui/version/version_handler.cc -@@ -28,12 +28,23 @@ +@@ -29,12 +29,23 @@ #include "ui/base/l10n/l10n_util.h" #include "url/gurl.h" @@ -27,7 +27,7 @@ index 0ce1816cb372d..dfee4d62126b2 100644 base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, base::BlockingType::MAY_BLOCK); -@@ -49,6 +60,19 @@ void GetFilePaths(const base::FilePath& profile_path, +@@ -50,6 +61,19 @@ void GetFilePaths(const base::FilePath& profile_path, *profile_path_out = profile_path.LossyDisplayName(); else *profile_path_out = l10n_util::GetStringUTF16(IDS_VERSION_UI_PATH_NOTFOUND); @@ -47,7 +47,7 @@ index 0ce1816cb372d..dfee4d62126b2 100644 } } // namespace -@@ -115,23 +139,46 @@ void VersionHandler::HandleRequestPathInfo(const base::Value::List& args) { +@@ -121,23 +145,46 @@ void VersionHandler::HandleRequestPathInfo(const base::Value::List& args) { // OnGotFilePaths. std::u16string* exec_path_buffer = new std::u16string; std::u16string* profile_path_buffer = new std::u16string; @@ -124,10 +124,10 @@ index 2f8162d7491d1..b00f0d5bf26ae 100644 // Factory for the creating refs in callbacks. base::WeakPtrFactory weak_ptr_factory_{this}; diff --git chrome/browser/ui/webui/version/version_ui.cc chrome/browser/ui/webui/version/version_ui.cc -index d046b78cb5825..096c0c806cf85 100644 +index 6893542161a55..42238d843ce33 100644 --- chrome/browser/ui/webui/version/version_ui.cc +++ chrome/browser/ui/webui/version/version_ui.cc -@@ -22,6 +22,7 @@ +@@ -17,6 +17,7 @@ #include "base/time/time.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" @@ -135,7 +135,7 @@ index d046b78cb5825..096c0c806cf85 100644 #include "chrome/browser/browser_process_impl.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/webui/version/version_handler.h" -@@ -70,6 +71,10 @@ +@@ -64,6 +65,10 @@ #include "chrome/browser/ui/webui/version/version_util_win.h" #endif @@ -146,7 +146,7 @@ index d046b78cb5825..096c0c806cf85 100644 using content::WebUIDataSource; namespace { -@@ -90,6 +95,10 @@ void CreateAndAddVersionUIDataSource(Profile* profile) { +@@ -84,6 +89,10 @@ void CreateAndAddVersionUIDataSource(Profile* profile) { {version_ui::kCommandLineName, IDS_VERSION_UI_COMMAND_LINE}, {version_ui::kExecutablePathName, IDS_VERSION_UI_EXECUTABLE_PATH}, {version_ui::kProfilePathName, IDS_VERSION_UI_PROFILE_PATH}, @@ -157,7 +157,7 @@ index d046b78cb5825..096c0c806cf85 100644 {version_ui::kVariationsName, IDS_VERSION_UI_VARIATIONS}, {version_ui::kVariationsCmdName, IDS_VERSION_UI_VARIATIONS_CMD}, {version_ui::kCopyVariationsLabel, IDS_VERSION_UI_COPY_VARIATIONS_LABEL}, -@@ -130,6 +139,10 @@ void CreateAndAddVersionUIDataSource(Profile* profile) { +@@ -115,6 +124,10 @@ void CreateAndAddVersionUIDataSource(Profile* profile) { IDR_PRODUCT_LOGO_WHITE); #endif // BUILDFLAG(IS_ANDROID) html_source->SetDefaultResource(IDR_VERSION_UI_ABOUT_VERSION_HTML); @@ -168,7 +168,7 @@ index d046b78cb5825..096c0c806cf85 100644 } std::string GetProductModifier() { -@@ -247,6 +260,10 @@ void VersionUI::AddVersionDetailStrings(content::WebUIDataSource* html_source) { +@@ -232,6 +245,10 @@ void VersionUI::AddVersionDetailStrings(content::WebUIDataSource* html_source) { // blank. html_source->AddString(version_ui::kExecutablePath, std::string()); html_source->AddString(version_ui::kProfilePath, std::string()); @@ -202,10 +202,10 @@ index 913cf913dca7a..d79c330989149 100644 + } } diff --git components/version_ui/resources/about_version.css components/version_ui/resources/about_version.css -index 839526405ef3f..fb2d6f3a98c00 100644 +index bd41fd2492e79..04378e39332e1 100644 --- components/version_ui/resources/about_version.css +++ components/version_ui/resources/about_version.css -@@ -138,3 +138,7 @@ body { +@@ -135,3 +135,7 @@ body { position: fixed; width: 1px; } @@ -214,10 +214,10 @@ index 839526405ef3f..fb2d6f3a98c00 100644 + font-size: 0.8em; +} diff --git components/version_ui/resources/about_version.html components/version_ui/resources/about_version.html -index c04197bd7b397..7e461101115b1 100644 +index 1243b0cb31f59..723f9eedd2885 100644 --- components/version_ui/resources/about_version.html +++ components/version_ui/resources/about_version.html -@@ -62,9 +62,21 @@ about:version template page +@@ -48,9 +48,21 @@ about:version template page
$i18n{company}
@@ -240,7 +240,7 @@ index c04197bd7b397..7e461101115b1 100644 $i18n{application_label} -@@ -175,7 +187,15 @@ about:version template page +@@ -158,7 +170,15 @@ about:version template page $i18n{executable_path_name} $i18n{executable_path} @@ -257,7 +257,7 @@ index c04197bd7b397..7e461101115b1 100644 $i18n{profile_path} -@@ -208,6 +228,17 @@ about:version template page +@@ -191,6 +211,17 @@ about:version template page $i18n{sanitizer} @@ -276,10 +276,10 @@ index c04197bd7b397..7e461101115b1 100644