diff --git a/BUILD.gn b/BUILD.gn index 175c3cd05..3b4fd4134 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -835,8 +835,7 @@ static_library("libcef_static") { "//base:base_static", "//base/third_party/dynamic_annotations", "//cc", - "//chrome:browser_dependencies", - "//chrome:child_dependencies", + "//chrome:dependencies", "//chrome:packed_resources", "//chrome:resources", "//chrome:strings", diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 01ab68509..6202e93c7 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/100.0.4896.0' + 'chromium_checkout': 'refs/tags/101.0.4951.0' } diff --git a/include/base/cef_cxx17_backports.h b/include/base/cef_cxx17_backports.h index 665a674a8..9b66beb96 100644 --- a/include/base/cef_cxx17_backports.h +++ b/include/base/cef_cxx17_backports.h @@ -35,17 +35,9 @@ #if defined(USING_CHROMIUM_INCLUDES) // When building CEF include the Chromium header directly. -// TODO(cef): Change to "base/cxx17_backports.h" in M93. -#include "base/stl_util.h" +#include "base/cxx17_backports.h" #else // !USING_CHROMIUM_INCLUDES -// The following is substantially similar to the Chromium implementation. -// If the Chromium implementation diverges the below implementation should be -// updated to match. - -#include -#include -#include -#include +// The following was removed from Chromium in https://crrev.com/78734f77be. namespace base { @@ -61,71 +53,6 @@ constexpr size_t size(const T (&array)[N]) noexcept { return N; } -// C++14 implementation of C++17's std::empty(): -// http://en.cppreference.com/w/cpp/iterator/empty -template -constexpr auto empty(const Container& c) -> decltype(c.empty()) { - return c.empty(); -} - -template -constexpr bool empty(const T (&array)[N]) noexcept { - return false; -} - -template -constexpr bool empty(std::initializer_list il) noexcept { - return il.size() == 0; -} - -// C++14 implementation of C++17's std::data(): -// http://en.cppreference.com/w/cpp/iterator/data -template -constexpr auto data(Container& c) -> decltype(c.data()) { - return c.data(); -} - -// std::basic_string::data() had no mutable overload prior to C++17 [1]. -// Hence this overload is provided. -// Note: str[0] is safe even for empty strings, as they are guaranteed to be -// null-terminated [2]. -// -// [1] http://en.cppreference.com/w/cpp/string/basic_string/data -// [2] http://en.cppreference.com/w/cpp/string/basic_string/operator_at -template -CharT* data(std::basic_string& str) { - return std::addressof(str[0]); -} - -template -constexpr auto data(const Container& c) -> decltype(c.data()) { - return c.data(); -} - -template -constexpr T* data(T (&array)[N]) noexcept { - return array; -} - -template -constexpr const T* data(std::initializer_list il) noexcept { - return il.begin(); -} - -// std::array::data() was not constexpr prior to C++17 [1]. -// Hence these overloads are provided. -// -// [1] https://en.cppreference.com/w/cpp/container/array/data -template -constexpr T* data(std::array& array) noexcept { - return !array.empty() ? &array[0] : nullptr; -} - -template -constexpr const T* data(const std::array& array) noexcept { - return !array.empty() ? &array[0] : nullptr; -} - } // namespace base #endif // !USING_CHROMIUM_INCLUDES diff --git a/include/cef_api_hash.h b/include/cef_api_hash.h index ab5e71ba7..a56cf26c8 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 "b48260d601003581ec2c9e73c929334503fcde08" +#define CEF_API_HASH_UNIVERSAL "34a42688778747c68f31e0194fea8323bc5388dc" #if defined(OS_WIN) -#define CEF_API_HASH_PLATFORM "e65308c28b7ee4ac8f381ae05ab8a7032530c802" +#define CEF_API_HASH_PLATFORM "c78306ad4768dc6c4ca1c376fa4c3799db8fd0eb" #elif defined(OS_MAC) -#define CEF_API_HASH_PLATFORM "969a1ae6e43f5b11a67a38a54ce2fc885a1f234d" +#define CEF_API_HASH_PLATFORM "c25d8bb5b7118a8f50c84e8a2746b2a14d7193ef" #elif defined(OS_LINUX) -#define CEF_API_HASH_PLATFORM "a4814c14fa26251da02fd92ebbb3db8f07646110" +#define CEF_API_HASH_PLATFORM "742fc8a47e757e34a87c7c814fc884591d5e9f98" #endif #ifdef __cplusplus diff --git a/include/internal/cef_types.h b/include/internal/cef_types.h index 2fd450c4b..6761698ea 100644 --- a/include/internal/cef_types.h +++ b/include/internal/cef_types.h @@ -1199,6 +1199,12 @@ typedef enum { /// TT_EXPLICIT = 1, + /// + // User got to this page through a suggestion in the UI (for example, via the + // destinations page). Chrome runtime only. + /// + TT_AUTO_BOOKMARK = 2, + /// // Source is a subframe navigation. This is any content that is automatically // loaded in a non-toplevel frame. For example, if a page consists of several @@ -1217,6 +1223,25 @@ typedef enum { /// TT_MANUAL_SUBFRAME = 4, + /// + // User got to this page by typing in the URL bar and selecting an entry + // that did not look like a URL. For example, a match might have the URL + // of a Google search result page, but appear like "Search Google for ...". + // These are not quite the same as EXPLICIT navigations because the user + // didn't type or see the destination URL. Chrome runtime only. + // See also TT_KEYWORD. + /// + TT_GENERATED = 5, + + /// + // This is a toplevel navigation. This is any content that is automatically + // loaded in a toplevel frame. For example, opening a tab to show the ASH + // screen saver, opening the devtools window, opening the NTP after the safe + // browsing warning, opening web-based dialog boxes are examples of + // AUTO_TOPLEVEL navigations. Chrome runtime only. + /// + TT_AUTO_TOPLEVEL = 6, + /// // Source is a form submission by the user. NOTE: In some situations // submitting a form does not result in this transition type. This can happen @@ -1231,6 +1256,25 @@ typedef enum { /// TT_RELOAD = 8, + /// + // The url was generated from a replaceable keyword other than the default + // search provider. If the user types a keyword (which also applies to + // tab-to-search) in the omnibox this qualifier is applied to the transition + // type of the generated url. TemplateURLModel then may generate an + // additional visit with a transition type of TT_KEYWORD_GENERATED against the + // url 'http://' + keyword. For example, if you do a tab-to-search against + // wikipedia the generated url has a transition qualifer of TT_KEYWORD, and + // TemplateURLModel generates a visit for 'wikipedia.org' with a transition + // type of TT_KEYWORD_GENERATED. Chrome runtime only. + /// + TT_KEYWORD = 9, + + /// + // Corresponds to a visit generated for a keyword. See description of + // TT_KEYWORD for more details. Chrome runtime only. + /// + TT_KEYWORD_GENERATED = 10, + /// // General mask defining the bits used for the source values. /// @@ -1256,6 +1300,18 @@ typedef enum { /// TT_DIRECT_LOAD_FLAG = 0x02000000, + /// + // User is navigating to the home page. Chrome runtime only. + /// + TT_HOME_PAGE_FLAG = 0x04000000, + + /// + // The transition originated from an external application; the exact + // definition of this is embedder dependent. Chrome runtime and + // extension system only. + /// + TT_FROM_API_FLAG = 0x08000000, + /// // The beginning of a navigation chain. /// diff --git a/libcef/browser/alloy/alloy_content_browser_client.cc b/libcef/browser/alloy/alloy_content_browser_client.cc index 94d210fff..5cc616d20 100644 --- a/libcef/browser/alloy/alloy_content_browser_client.cc +++ b/libcef/browser/alloy/alloy_content_browser_client.cc @@ -690,7 +690,7 @@ void AlloyContentBrowserClient::AppendExtraCommandLineSwitches( switches::kUserAgentProductAndVersion, }; command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames, - base::size(kSwitchNames)); + std::size(kSwitchNames)); } const std::string& process_type = @@ -709,7 +709,7 @@ void AlloyContentBrowserClient::AppendExtraCommandLineSwitches( network::switches::kUnsafelyTreatInsecureOriginAsSecure, }; command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames, - base::size(kSwitchNames)); + std::size(kSwitchNames)); if (extensions::ExtensionsEnabled()) { content::RenderProcessHost* process = @@ -738,7 +738,7 @@ void AlloyContentBrowserClient::AppendExtraCommandLineSwitches( switches::kLang, }; command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames, - base::size(kSwitchNames)); + std::size(kSwitchNames)); } // Necessary to populate DIR_USER_DATA in sub-processes. @@ -764,7 +764,7 @@ void AlloyContentBrowserClient::AppendExtraCommandLineSwitches( switches::kLogFile, }; command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames, - base::size(kSwitchNames)); + std::size(kSwitchNames)); } if (crash_reporting::Enabled()) { @@ -1324,10 +1324,10 @@ AlloyContentBrowserClient::GetNetworkContextsParentDirectory() { bool AlloyContentBrowserClient::HandleExternalProtocol( const GURL& url, content::WebContents::Getter web_contents_getter, - int child_id, int frame_tree_node_id, content::NavigationUIData* navigation_data, - bool is_main_frame, + bool is_primary_main_frame, + bool is_in_fenced_frame_tree, network::mojom::WebSandboxFlags sandbox_flags, ui::PageTransition page_transition, bool has_user_gesture, @@ -1342,6 +1342,8 @@ bool AlloyContentBrowserClient::HandleExternalProtocol( content::WebContents::Getter web_contents_getter, int frame_tree_node_id, content::NavigationUIData* navigation_data, + bool is_primary_main_frame, + bool is_in_fenced_frame_tree, network::mojom::WebSandboxFlags sandbox_flags, const network::ResourceRequest& resource_request, const absl::optional& initiating_origin, @@ -1420,7 +1422,7 @@ AlloyContentBrowserClient::GetSandboxedStorageServiceDataDirectory() { } std::string AlloyContentBrowserClient::GetProduct() { - return embedder_support::GetProduct(); + return GetChromeProduct(); } std::string AlloyContentBrowserClient::GetChromeProduct() { @@ -1461,8 +1463,7 @@ AlloyContentBrowserClient::GetPluginMimeTypesWithExternalHandlers( auto map = PluginUtils::GetMimeTypeToExtensionIdMap(browser_context); for (const auto& pair : map) mime_types.insert(pair.first); - if (pdf::IsInternalPluginExternallyHandled()) - mime_types.insert(pdf::kInternalPluginMimeType); + mime_types.insert(pdf::kInternalPluginMimeType); return mime_types; } @@ -1503,8 +1504,7 @@ bool AlloyContentBrowserClient::IsFindInPageDisabledForOrigin( const url::Origin& origin) { // For PDF viewing with the PPAPI-free PDF Viewer, find-in-page should only // display results from the PDF content, and not from the UI. - return base::FeatureList::IsEnabled(chrome_pdf::features::kPdfUnseasoned) && - IsPdfExtensionOrigin(origin); + return IsPdfExtensionOrigin(origin); } CefRefPtr AlloyContentBrowserClient::request_context() diff --git a/libcef/browser/alloy/alloy_content_browser_client.h b/libcef/browser/alloy/alloy_content_browser_client.h index 06fd29e88..bcb254655 100644 --- a/libcef/browser/alloy/alloy_content_browser_client.h +++ b/libcef/browser/alloy/alloy_content_browser_client.h @@ -195,10 +195,10 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient { bool HandleExternalProtocol( const GURL& url, content::WebContents::Getter web_contents_getter, - int child_id, int frame_tree_node_id, content::NavigationUIData* navigation_data, - bool is_main_frame, + bool is_primary_main_frame, + bool is_in_fenced_frame_tree, network::mojom::WebSandboxFlags sandbox_flags, ui::PageTransition page_transition, bool has_user_gesture, @@ -210,6 +210,8 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient { content::WebContents::Getter web_contents_getter, int frame_tree_node_id, content::NavigationUIData* navigation_data, + bool is_primary_main_frame, + bool is_in_fenced_frame_tree, network::mojom::WebSandboxFlags sandbox_flags, const network::ResourceRequest& request, const absl::optional& initiating_origin, diff --git a/libcef/browser/browser_message_loop.cc b/libcef/browser/browser_message_loop.cc index 797dd4e44..8596d0463 100644 --- a/libcef/browser/browser_message_loop.cc +++ b/libcef/browser/browser_message_loop.cc @@ -53,8 +53,10 @@ class MessagePumpExternal : public base::MessagePumpForUI { void ScheduleWork() override { handler_->OnScheduleMessagePumpWork(0); } - void ScheduleDelayedWork(const base::TimeTicks& delayed_work_time) override { - const base::TimeDelta& delta = delayed_work_time - base::TimeTicks::Now(); + void ScheduleDelayedWork( + const Delegate::NextWorkInfo& next_work_info) override { + const base::TimeDelta& delta = + next_work_info.delayed_run_time - next_work_info.recent_now; handler_->OnScheduleMessagePumpWork(delta.InMilliseconds()); } diff --git a/libcef/browser/chrome/chrome_content_browser_client_cef.cc b/libcef/browser/chrome/chrome_content_browser_client_cef.cc index ea0070d41..88343873c 100644 --- a/libcef/browser/chrome/chrome_content_browser_client_cef.cc +++ b/libcef/browser/chrome/chrome_content_browser_client_cef.cc @@ -48,6 +48,8 @@ void HandleExternalProtocolHelper( content::WebContents::Getter web_contents_getter, int frame_tree_node_id, content::NavigationUIData* navigation_data, + bool is_primary_main_frame, + bool is_in_fenced_frame_tree, network::mojom::WebSandboxFlags sandbox_flags, const network::ResourceRequest& resource_request, const absl::optional& initiating_origin, @@ -61,11 +63,8 @@ void HandleExternalProtocolHelper( // Match the logic of the original call in // NavigationURLLoaderImpl::PrepareForNonInterceptedRequest. self->HandleExternalProtocol( - resource_request.url, web_contents_getter, - content::ChildProcessHost::kInvalidUniqueID, frame_tree_node_id, - navigation_data, - resource_request.resource_type == - static_cast(blink::mojom::ResourceType::kMainFrame), + resource_request.url, web_contents_getter, frame_tree_node_id, + navigation_data, is_primary_main_frame, is_in_fenced_frame_tree, sandbox_flags, static_cast(resource_request.transition_type), resource_request.has_user_gesture, initiating_origin, initiator_rfh, @@ -114,7 +113,7 @@ void ChromeContentBrowserClientCef::AppendExtraCommandLineSwitches( switches::kUserAgentProductAndVersion, }; command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames, - base::size(kSwitchNames)); + std::size(kSwitchNames)); } const std::string& process_type = @@ -126,7 +125,7 @@ void ChromeContentBrowserClientCef::AppendExtraCommandLineSwitches( switches::kUncaughtExceptionStackSize, }; command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames, - base::size(kSwitchNames)); + std::size(kSwitchNames)); } CefRefPtr app = CefAppManager::Get()->GetApplication(); @@ -248,10 +247,10 @@ bool ChromeContentBrowserClientCef::WillCreateURLLoaderFactory( bool ChromeContentBrowserClientCef::HandleExternalProtocol( const GURL& url, content::WebContents::Getter web_contents_getter, - int child_id, int frame_tree_node_id, content::NavigationUIData* navigation_data, - bool is_main_frame, + bool is_primary_main_frame, + bool is_in_fenced_frame_tree, network::mojom::WebSandboxFlags sandbox_flags, ui::PageTransition page_transition, bool has_user_gesture, @@ -269,15 +268,18 @@ bool ChromeContentBrowserClientCef::HandleExternalProtocol( // HandleExternalProtocolHelper. Forward to the chrome layer for default // handling. return ChromeContentBrowserClient::HandleExternalProtocol( - url, web_contents_getter, child_id, frame_tree_node_id, navigation_data, - is_main_frame, sandbox_flags, page_transition, has_user_gesture, - initiating_origin, initiator_document, nullptr); + url, web_contents_getter, frame_tree_node_id, navigation_data, + is_primary_main_frame, is_in_fenced_frame_tree, sandbox_flags, + page_transition, has_user_gesture, initiating_origin, initiator_document, + nullptr); } bool ChromeContentBrowserClientCef::HandleExternalProtocol( content::WebContents::Getter web_contents_getter, int frame_tree_node_id, content::NavigationUIData* navigation_data, + bool is_primary_main_frame, + bool is_in_fenced_frame_tree, network::mojom::WebSandboxFlags sandbox_flags, const network::ResourceRequest& resource_request, const absl::optional& initiating_origin, @@ -295,8 +297,9 @@ bool ChromeContentBrowserClientCef::HandleExternalProtocol( web_contents_getter, frame_tree_node_id, resource_request, base::BindRepeating(HandleExternalProtocolHelper, base::Unretained(this), web_contents_getter, frame_tree_node_id, - navigation_data, sandbox_flags, resource_request, - initiating_origin, + navigation_data, is_primary_main_frame, + is_in_fenced_frame_tree, sandbox_flags, + resource_request, initiating_origin, std::move(weak_initiator_document))); net_service::ProxyURLLoaderFactory::CreateProxy( diff --git a/libcef/browser/chrome/chrome_content_browser_client_cef.h b/libcef/browser/chrome/chrome_content_browser_client_cef.h index 0d24768d6..81d4996d3 100644 --- a/libcef/browser/chrome/chrome_content_browser_client_cef.h +++ b/libcef/browser/chrome/chrome_content_browser_client_cef.h @@ -63,10 +63,10 @@ class ChromeContentBrowserClientCef : public ChromeContentBrowserClient { bool HandleExternalProtocol( const GURL& url, content::WebContents::Getter web_contents_getter, - int child_id, int frame_tree_node_id, content::NavigationUIData* navigation_data, - bool is_main_frame, + bool is_primary_main_frame, + bool is_in_fenced_frame_tree, network::mojom::WebSandboxFlags sandbox_flags, ui::PageTransition page_transition, bool has_user_gesture, @@ -78,6 +78,8 @@ class ChromeContentBrowserClientCef : public ChromeContentBrowserClient { content::WebContents::Getter web_contents_getter, int frame_tree_node_id, content::NavigationUIData* navigation_data, + bool is_primary_main_frame, + bool is_in_fenced_frame_tree, network::mojom::WebSandboxFlags sandbox_flags, const network::ResourceRequest& request, const absl::optional& initiating_origin, diff --git a/libcef/browser/download_manager_delegate.cc b/libcef/browser/download_manager_delegate.cc index e63281daf..ed89976fd 100644 --- a/libcef/browser/download_manager_delegate.cc +++ b/libcef/browser/download_manager_delegate.cc @@ -159,7 +159,7 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback { suggested_path, DownloadItem::TARGET_DISPOSITION_OVERWRITE, download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, download::DownloadItem::MixedContentStatus::UNKNOWN, suggested_path, - absl::nullopt /*download_schedule*/, + base::FilePath(), absl::nullopt /*download_schedule*/, download::DOWNLOAD_INTERRUPT_REASON_NONE); } } @@ -178,7 +178,8 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback { std::move(callback).Run(path, DownloadItem::TARGET_DISPOSITION_OVERWRITE, download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, download::DownloadItem::MixedContentStatus::UNKNOWN, - path, absl::nullopt /*download_schedule*/, + path, base::FilePath(), + absl::nullopt /*download_schedule*/, download::DOWNLOAD_INTERRUPT_REASON_NONE); } @@ -366,7 +367,8 @@ bool CefDownloadManagerDelegate::DetermineDownloadTarget( item->GetForcedFilePath(), DownloadItem::TARGET_DISPOSITION_OVERWRITE, download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, download::DownloadItem::MixedContentStatus::UNKNOWN, - item->GetForcedFilePath(), absl::nullopt /*download_schedule*/, + item->GetForcedFilePath(), base::FilePath(), + absl::nullopt /*download_schedule*/, download::DOWNLOAD_INTERRUPT_REASON_NONE); return true; } diff --git a/libcef/browser/extensions/extensions_api_client.cc b/libcef/browser/extensions/extensions_api_client.cc index 97976cdeb..99f4ffc5f 100644 --- a/libcef/browser/extensions/extensions_api_client.cc +++ b/libcef/browser/extensions/extensions_api_client.cc @@ -65,8 +65,7 @@ void CefExtensionsAPIClient::AttachWebContentsHelpers( void CefExtensionsAPIClient::AddAdditionalValueStoreCaches( content::BrowserContext* context, const scoped_refptr& factory, - const scoped_refptr>& - observers, + SettingsChangedCallback observer, std::map* caches) { // Add support for chrome.storage.sync. // Because we don't support syncing with Google, we follow the behavior of diff --git a/libcef/browser/extensions/extensions_api_client.h b/libcef/browser/extensions/extensions_api_client.h index 4aee37473..f1760a376 100644 --- a/libcef/browser/extensions/extensions_api_client.h +++ b/libcef/browser/extensions/extensions_api_client.h @@ -34,8 +34,7 @@ class CefExtensionsAPIClient : public ExtensionsAPIClient { void AddAdditionalValueStoreCaches( content::BrowserContext* context, const scoped_refptr& factory, - const scoped_refptr>& - observers, + SettingsChangedCallback observer, std::map* caches) override; diff --git a/libcef/browser/image_impl.cc b/libcef/browser/image_impl.cc index d249ffb7f..9d82331f8 100644 --- a/libcef/browser/image_impl.cc +++ b/libcef/browser/image_impl.cc @@ -9,8 +9,10 @@ #include "skia/ext/skia_utils_base.h" #include "ui/gfx/codec/jpeg_codec.h" #include "ui/gfx/codec/png_codec.h" +#include "ui/gfx/geometry/size.h" #include "ui/gfx/image/image_png_rep.h" #include "ui/gfx/image/image_skia.h" +#include "ui/gfx/image/image_skia_rep.h" namespace { diff --git a/libcef/browser/native/file_dialog_runner_mac.mm b/libcef/browser/native/file_dialog_runner_mac.mm index 193ca806b..00d15645d 100644 --- a/libcef/browser/native/file_dialog_runner_mac.mm +++ b/libcef/browser/native/file_dialog_runner_mac.mm @@ -37,7 +37,7 @@ std::u16string GetDescriptionFromMimeType(const std::string& mime_type) { {"video", IDS_VIDEO_FILES}, }; - for (size_t i = 0; i < base::size(kWildCardMimeTypes); ++i) { + for (size_t i = 0; i < std::size(kWildCardMimeTypes); ++i) { if (mime_type == std::string(kWildCardMimeTypes[i].mime_type) + "/*") return l10n_util::GetStringUTF16(kWildCardMimeTypes[i].string_id); } diff --git a/libcef/browser/native/file_dialog_runner_win.cc b/libcef/browser/native/file_dialog_runner_win.cc index 14d1bbb58..b4b0f39e5 100644 --- a/libcef/browser/native/file_dialog_runner_win.cc +++ b/libcef/browser/native/file_dialog_runner_win.cc @@ -167,7 +167,7 @@ std::wstring GetDescriptionFromMimeType(const std::string& mime_type) { {"video", IDS_VIDEO_FILES}, }; - for (size_t i = 0; i < base::size(kWildCardMimeTypes); ++i) { + for (size_t i = 0; i < std::size(kWildCardMimeTypes); ++i) { if (mime_type == std::string(kWildCardMimeTypes[i].mime_type) + "/*") { return base::UTF16ToWide( l10n_util::GetStringUTF16(kWildCardMimeTypes[i].string_id)); @@ -259,7 +259,7 @@ bool RunOpenFileDialog(const CefFileDialogRunner::FileChooserParams& params, } else { // The value is a file name and possibly a directory. base::wcslcpy(filename, params.default_file_name.value().c_str(), - base::size(filename)); + std::size(filename)); directory = params.default_file_name.DirName().value(); } } @@ -480,7 +480,7 @@ bool RunSaveFileDialog(const CefFileDialogRunner::FileChooserParams& params, } else { // The value is a file name and possibly a directory. base::wcslcpy(filename, params.default_file_name.value().c_str(), - base::size(filename)); + std::size(filename)); directory = params.default_file_name.DirName().value(); } } diff --git a/libcef/browser/net/throttle_handler.cc b/libcef/browser/net/throttle_handler.cc index bd235f62c..687027923 100644 --- a/libcef/browser/net/throttle_handler.cc +++ b/libcef/browser/net/throttle_handler.cc @@ -11,7 +11,6 @@ #include "libcef/common/request_impl.h" #include "components/navigation_interception/intercept_navigation_throttle.h" -#include "components/navigation_interception/navigation_params.h" #include "content/public/browser/navigation_handle.h" #include "content/public/browser/navigation_throttle.h" #include "content/public/browser/page_navigator.h" @@ -20,29 +19,32 @@ namespace throttle { namespace { -// TODO(cef): We can't currently trust NavigationParams::is_main_frame() because -// it's always set to true in -// InterceptNavigationThrottle::CheckIfShouldIgnoreNavigation. Remove the -// |is_main_frame| argument once this problem is fixed. -bool NavigationOnUIThread( - bool is_main_frame, - bool is_pdf, - const content::GlobalRenderFrameHostId& global_id, - const content::GlobalRenderFrameHostId& parent_global_id, - content::WebContents* source, - const navigation_interception::NavigationParams& params) { +bool NavigationOnUIThread(content::NavigationHandle* navigation_handle) { CEF_REQUIRE_UIT(); - content::OpenURLParams open_params( - params.url(), params.referrer(), WindowOpenDisposition::CURRENT_TAB, - params.transition_type(), params.is_renderer_initiated()); - open_params.user_gesture = params.has_user_gesture(); - open_params.initiator_origin = params.initiator_origin(); - open_params.is_pdf = is_pdf; + const bool is_main_frame = navigation_handle->IsInMainFrame(); + const auto global_id = frame_util::GetGlobalId(navigation_handle); + + // Identify the RenderFrameHost that originated the navigation. + const auto parent_global_id = + !is_main_frame ? navigation_handle->GetParentFrame()->GetGlobalId() + : frame_util::InvalidGlobalId(); + + const content::Referrer referrer(navigation_handle->GetReferrer().url, + navigation_handle->GetReferrer().policy); + + content::OpenURLParams open_params(navigation_handle->GetURL(), referrer, + WindowOpenDisposition::CURRENT_TAB, + navigation_handle->GetPageTransition(), + navigation_handle->IsRendererInitiated()); + open_params.user_gesture = navigation_handle->HasUserGesture(); + open_params.initiator_origin = navigation_handle->GetInitiatorOrigin(); + open_params.is_pdf = navigation_handle->IsPdf(); CefRefPtr browser; if (!CefBrowserInfoManager::GetInstance()->MaybeAllowNavigation( - source->GetMainFrame(), open_params, browser)) { + navigation_handle->GetWebContents()->GetMainFrame(), open_params, + browser)) { // Cancel the navigation. return true; } @@ -65,16 +67,17 @@ bool NavigationOnUIThread( } CefRefPtr request = new CefRequestImpl(); - request->Set(params, is_main_frame); + request->Set(navigation_handle); request->SetReadOnly(true); // Initiating a new navigation in OnBeforeBrowse will delete the // InterceptNavigationThrottle that currently owns this callback, // resulting in a crash. Use the lock to prevent that. auto navigation_lock = browser->browser_info()->CreateNavigationLock(); - ignore_navigation = handler->OnBeforeBrowse( - browser.get(), frame, request.get(), params.has_user_gesture(), - params.is_redirect()); + ignore_navigation = + handler->OnBeforeBrowse(browser.get(), frame, request.get(), + navigation_handle->HasUserGesture(), + navigation_handle->WasServerRedirect()); } } } @@ -88,22 +91,11 @@ void CreateThrottlesForNavigation(content::NavigationHandle* navigation_handle, NavigationThrottleList& throttles) { CEF_REQUIRE_UIT(); - const bool is_main_frame = navigation_handle->IsInMainFrame(); - const bool is_pdf = navigation_handle->IsPdf(); - const auto global_id = frame_util::GetGlobalId(navigation_handle); - - // Identify the RenderFrameHost that originated the navigation. - const auto parent_global_id = - !is_main_frame ? navigation_handle->GetParentFrame()->GetGlobalId() - : frame_util::InvalidGlobalId(); - // Must use SynchronyMode::kSync to ensure that OnBeforeBrowse is always // called before OnBeforeResourceLoad. std::unique_ptr throttle = std::make_unique( - navigation_handle, - base::BindRepeating(&NavigationOnUIThread, is_main_frame, is_pdf, - global_id, parent_global_id), + navigation_handle, base::BindRepeating(&NavigationOnUIThread), navigation_interception::SynchronyMode::kSync); throttles.push_back(std::move(throttle)); } diff --git a/libcef/browser/net_service/proxy_url_loader_factory.cc b/libcef/browser/net_service/proxy_url_loader_factory.cc index 3f7d8a862..07eb9b57e 100644 --- a/libcef/browser/net_service/proxy_url_loader_factory.cc +++ b/libcef/browser/net_service/proxy_url_loader_factory.cc @@ -1209,7 +1209,7 @@ InterceptedRequestHandler::OnFilterResponseBody( ProxyURLLoaderFactory::ProxyURLLoaderFactory( mojo::PendingReceiver factory_receiver, - network::mojom::URLLoaderFactoryPtrInfo target_factory_info, + mojo::PendingRemote target_factory_remote, mojo::PendingReceiver header_client_receiver, std::unique_ptr request_handler) @@ -1218,8 +1218,8 @@ ProxyURLLoaderFactory::ProxyURLLoaderFactory( DCHECK(request_handler_); // Actual creation of the factory. - if (target_factory_info) { - target_factory_.Bind(std::move(target_factory_info)); + if (target_factory_remote) { + target_factory_.Bind(std::move(target_factory_remote)); target_factory_.set_disconnect_handler(base::BindOnce( &ProxyURLLoaderFactory::OnTargetFactoryError, base::Unretained(this))); } @@ -1238,14 +1238,14 @@ ProxyURLLoaderFactory::~ProxyURLLoaderFactory() { // static void ProxyURLLoaderFactory::CreateOnIOThread( mojo::PendingReceiver factory_receiver, - network::mojom::URLLoaderFactoryPtrInfo target_factory_info, + mojo::PendingRemote target_factory, mojo::PendingReceiver header_client_receiver, content::ResourceContext* resource_context, std::unique_ptr request_handler) { CEF_REQUIRE_IOT(); auto proxy = new ProxyURLLoaderFactory( - std::move(factory_receiver), std::move(target_factory_info), + std::move(factory_receiver), std::move(target_factory), std::move(header_client_receiver), std::move(request_handler)); ResourceContextData::AddProxy(proxy, resource_context); } @@ -1269,8 +1269,8 @@ void ProxyURLLoaderFactory::CreateProxy( DCHECK(request_handler); auto proxied_receiver = std::move(*factory_receiver); - network::mojom::URLLoaderFactoryPtrInfo target_factory_info; - *factory_receiver = mojo::MakeRequest(&target_factory_info); + mojo::PendingRemote target_factory_remote; + *factory_receiver = target_factory_remote.InitWithNewPipeAndPassReceiver(); mojo::PendingReceiver header_client_receiver; @@ -1285,7 +1285,7 @@ void ProxyURLLoaderFactory::CreateProxy( CEF_IOT, base::BindOnce( &ProxyURLLoaderFactory::CreateOnIOThread, std::move(proxied_receiver), - std::move(target_factory_info), std::move(header_client_receiver), + std::move(target_factory_remote), std::move(header_client_receiver), base::Unretained(resource_context), std::move(request_handler))); } @@ -1305,7 +1305,8 @@ void ProxyURLLoaderFactory::CreateProxy( } auto proxy = new ProxyURLLoaderFactory( - std::move(loader_receiver), nullptr, + std::move(loader_receiver), + mojo::PendingRemote(), mojo::PendingReceiver(), std::move(request_handler)); CEF_POST_TASK(CEF_UIT, diff --git a/libcef/browser/net_service/proxy_url_loader_factory.h b/libcef/browser/net_service/proxy_url_loader_factory.h index 15b39054f..3c8dba270 100644 --- a/libcef/browser/net_service/proxy_url_loader_factory.h +++ b/libcef/browser/net_service/proxy_url_loader_factory.h @@ -185,14 +185,16 @@ class ProxyURLLoaderFactory ProxyURLLoaderFactory( mojo::PendingReceiver factory_receiver, - network::mojom::URLLoaderFactoryPtrInfo target_factory_info, + mojo::PendingRemote + target_factory_remote, mojo::PendingReceiver header_client_receiver, std::unique_ptr request_handler); static void CreateOnIOThread( mojo::PendingReceiver factory_receiver, - network::mojom::URLLoaderFactoryPtrInfo target_factory_info, + mojo::PendingRemote + target_factory_remote, mojo::PendingReceiver header_client_receiver, content::ResourceContext* resource_context, diff --git a/libcef/browser/net_service/url_loader_factory_getter.cc b/libcef/browser/net_service/url_loader_factory_getter.cc index 1ff5e75bd..b6a4c3f76 100644 --- a/libcef/browser/net_service/url_loader_factory_getter.cc +++ b/libcef/browser/net_service/url_loader_factory_getter.cc @@ -19,7 +19,7 @@ namespace net_service { -// Based on CreateDownloadURLLoaderFactoryGetter from +// Based on CreatePendingSharedURLLoaderFactory from // content/browser/download/download_manager_impl.cc. // static scoped_refptr URLLoaderFactoryGetter::Create( @@ -35,14 +35,17 @@ scoped_refptr URLLoaderFactoryGetter::Create( auto loader_factory = browser_context->GetDefaultStoragePartition() ->GetURLLoaderFactoryForBrowserProcess(); - network::mojom::URLLoaderFactoryPtrInfo proxy_factory_ptr_info; - network::mojom::URLLoaderFactoryRequest proxy_factory_request; + mojo::PendingRemote proxy_factory_remote; + mojo::PendingReceiver + proxy_factory_receiver; // Create an intermediate pipe that can be used to proxy the request's // URLLoaderFactory. - network::mojom::URLLoaderFactoryPtrInfo maybe_proxy_factory_ptr_info; + mojo::PendingRemote + maybe_proxy_factory_remote; mojo::PendingReceiver - maybe_proxy_factory_request = MakeRequest(&maybe_proxy_factory_ptr_info); + maybe_proxy_factory_receiver = + maybe_proxy_factory_remote.InitWithNewPipeAndPassReceiver(); bool should_proxy = false; int render_process_id = -1; @@ -55,7 +58,7 @@ scoped_refptr URLLoaderFactoryGetter::Create( content::devtools_instrumentation::WillCreateURLLoaderFactory( static_cast(render_frame_host), false /* is_navigation */, false /* is_download */, - &maybe_proxy_factory_request, nullptr /* factory_override */); + &maybe_proxy_factory_receiver, nullptr /* factory_override */); } auto browser_client = CefAppManager::Get()->GetContentClient()->browser(); @@ -65,24 +68,24 @@ scoped_refptr URLLoaderFactoryGetter::Create( browser_context, render_frame_host, render_process_id, content::ContentBrowserClient::URLLoaderFactoryType::kDocumentSubResource, url::Origin(), absl::nullopt /* navigation_id */, ukm::SourceIdObj(), - &maybe_proxy_factory_request, nullptr /* header_client */, + &maybe_proxy_factory_receiver, nullptr /* header_client */, nullptr /* bypass_redirect_checks */, nullptr /* disable_secure_dns */, nullptr /* factory_override */); // If anyone above indicated that they care about proxying, pass the // intermediate pipe along to the URLLoaderFactoryGetter. if (should_proxy) { - proxy_factory_ptr_info = std::move(maybe_proxy_factory_ptr_info); - proxy_factory_request = std::move(maybe_proxy_factory_request); + proxy_factory_remote = std::move(maybe_proxy_factory_remote); + proxy_factory_receiver = std::move(maybe_proxy_factory_receiver); } return base::WrapRefCounted(new URLLoaderFactoryGetter( - loader_factory->Clone(), std::move(proxy_factory_ptr_info), - std::move(proxy_factory_request))); + loader_factory->Clone(), std::move(proxy_factory_remote), + std::move(proxy_factory_receiver))); } -// Based on NetworkDownloadURLLoaderFactoryGetter from -// content/browser/download/network_download_url_loader_factory_getter.cc. +// Based on CreateFactory from +// content/browser/download/network_download_pending_url_loader_factory.cc. scoped_refptr URLLoaderFactoryGetter::GetURLLoaderFactory() { // On first call we associate with the current thread. @@ -99,11 +102,11 @@ URLLoaderFactoryGetter::GetURLLoaderFactory() { auto loader_factory = network::SharedURLLoaderFactory::Create(std::move(loader_factory_info_)); - if (proxy_factory_request_.is_pending()) { - loader_factory->Clone(std::move(proxy_factory_request_)); + if (proxy_factory_receiver_.is_valid()) { + loader_factory->Clone(std::move(proxy_factory_receiver_)); lazy_factory_ = base::MakeRefCounted( - std::move(proxy_factory_ptr_info_)); + std::move(proxy_factory_remote_)); } else { lazy_factory_ = loader_factory; } @@ -112,11 +115,12 @@ URLLoaderFactoryGetter::GetURLLoaderFactory() { URLLoaderFactoryGetter::URLLoaderFactoryGetter( std::unique_ptr loader_factory_info, - network::mojom::URLLoaderFactoryPtrInfo proxy_factory_ptr_info, - network::mojom::URLLoaderFactoryRequest proxy_factory_request) + mojo::PendingRemote proxy_factory_remote, + mojo::PendingReceiver + proxy_factory_receiver) : loader_factory_info_(std::move(loader_factory_info)), - proxy_factory_ptr_info_(std::move(proxy_factory_ptr_info)), - proxy_factory_request_(std::move(proxy_factory_request)) {} + proxy_factory_remote_(std::move(proxy_factory_remote)), + proxy_factory_receiver_(std::move(proxy_factory_receiver)) {} URLLoaderFactoryGetter::~URLLoaderFactoryGetter() = default; diff --git a/libcef/browser/net_service/url_loader_factory_getter.h b/libcef/browser/net_service/url_loader_factory_getter.h index c91baca8a..554c81594 100644 --- a/libcef/browser/net_service/url_loader_factory_getter.h +++ b/libcef/browser/net_service/url_loader_factory_getter.h @@ -50,19 +50,21 @@ class URLLoaderFactoryGetter URLLoaderFactoryGetterDeleter>; friend struct URLLoaderFactoryGetterDeleter; - URLLoaderFactoryGetter( - std::unique_ptr - loader_factory_info, - network::mojom::URLLoaderFactoryPtrInfo proxy_factory_ptr_info, - network::mojom::URLLoaderFactoryRequest proxy_factory_request); + URLLoaderFactoryGetter(std::unique_ptr + loader_factory_info, + mojo::PendingRemote + proxy_factory_remote, + mojo::PendingReceiver + proxy_factory_receiver); ~URLLoaderFactoryGetter(); void DeleteOnCorrectThread() const; std::unique_ptr loader_factory_info_; scoped_refptr lazy_factory_; - network::mojom::URLLoaderFactoryPtrInfo proxy_factory_ptr_info_; - network::mojom::URLLoaderFactoryRequest proxy_factory_request_; + mojo::PendingRemote proxy_factory_remote_; + mojo::PendingReceiver + proxy_factory_receiver_; scoped_refptr task_runner_; }; diff --git a/libcef/browser/osr/osr_accessibility_util.cc b/libcef/browser/osr/osr_accessibility_util.cc index 96663e4d8..d96a286d1 100644 --- a/libcef/browser/osr/osr_accessibility_util.cc +++ b/libcef/browser/osr/osr_accessibility_util.cc @@ -200,7 +200,7 @@ struct PopulateAxNodeAttributes { CefRefPtr list = CefListValue::Create(); int index = 0; // Iterate and find which states are set. - for (unsigned i = 0; i < base::size(textStyleArr); i++) { + for (unsigned i = 0; i < std::size(textStyleArr); i++) { if (attr.second & static_cast(textStyleArr[i])) list->SetString(index++, ToString(textStyleArr[i])); } @@ -260,7 +260,7 @@ struct PopulateAxNodeAttributes { ax::mojom::MarkerType::kTextMatch}; // Iterate and find which markers are set. - for (unsigned j = 0; j < base::size(marktypeArr); j++) { + for (unsigned j = 0; j < std::size(marktypeArr); j++) { if (attr.second[i] & static_cast(marktypeArr[j])) list->SetString(index++, ToString(marktypeArr[j])); } diff --git a/libcef/browser/osr/software_output_device_proxy.cc b/libcef/browser/osr/software_output_device_proxy.cc index 73a25c610..883bb5783 100644 --- a/libcef/browser/osr/software_output_device_proxy.cc +++ b/libcef/browser/osr/software_output_device_proxy.cc @@ -7,6 +7,7 @@ #include "base/memory/shared_memory_mapping.h" #include "base/trace_event/trace_event.h" #include "components/viz/common/resources/resource_sizes.h" +#include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/system/platform_handle.h" #include "skia/ext/platform_canvas.h" #include "third_party/skia/include/core/SkCanvas.h" @@ -24,7 +25,7 @@ namespace viz { SoftwareOutputDeviceProxy::~SoftwareOutputDeviceProxy() = default; SoftwareOutputDeviceProxy::SoftwareOutputDeviceProxy( - mojom::LayeredWindowUpdaterPtr layered_window_updater) + mojo::PendingRemote layered_window_updater) : layered_window_updater_(std::move(layered_window_updater)) { DCHECK(layered_window_updater_.is_bound()); } diff --git a/libcef/browser/osr/software_output_device_proxy.h b/libcef/browser/osr/software_output_device_proxy.h index c9f8c8394..125d25fb0 100644 --- a/libcef/browser/osr/software_output_device_proxy.h +++ b/libcef/browser/osr/software_output_device_proxy.h @@ -5,7 +5,7 @@ #include "base/threading/thread_checker.h" #include "components/viz/service/display/software_output_device.h" #include "components/viz/service/viz_service_export.h" -#include "services/viz/privileged/mojom/compositing/display_private.mojom.h" +#include "mojo/public/cpp/bindings/remote.h" #include "services/viz/privileged/mojom/compositing/layered_window_updater.mojom.h" namespace viz { @@ -18,7 +18,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputDeviceProxy : public SoftwareOutputDevice { public: explicit SoftwareOutputDeviceProxy( - mojom::LayeredWindowUpdaterPtr layered_window_updater); + mojo::PendingRemote layered_window_updater); SoftwareOutputDeviceProxy(const SoftwareOutputDeviceProxy&) = delete; SoftwareOutputDeviceProxy& operator=(const SoftwareOutputDeviceProxy&) = @@ -39,7 +39,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputDeviceProxy // Runs |swap_ack_callback_| after draw has happened. void DrawAck(); - mojom::LayeredWindowUpdaterPtr layered_window_updater_; + mojo::Remote layered_window_updater_; std::unique_ptr canvas_; bool waiting_on_draw_ack_ = false; diff --git a/libcef/browser/simple_menu_model_impl.h b/libcef/browser/simple_menu_model_impl.h index 66a1625ef..c9e638dde 100644 --- a/libcef/browser/simple_menu_model_impl.h +++ b/libcef/browser/simple_menu_model_impl.h @@ -12,6 +12,7 @@ #include "include/cef_menu_model.h" #include "base/threading/platform_thread.h" +#include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/base/models/simple_menu_model.h" // Implementation of CefMenuModel that wraps an existing ui::SimpleMenuModel. diff --git a/libcef/common/alloy/alloy_main_delegate.cc b/libcef/common/alloy/alloy_main_delegate.cc index 32e8dc8b5..c3599d380 100644 --- a/libcef/common/alloy/alloy_main_delegate.cc +++ b/libcef/common/alloy/alloy_main_delegate.cc @@ -41,7 +41,6 @@ #include "content/public/common/url_constants.h" #include "extensions/common/constants.h" #include "net/base/features.h" -#include "pdf/pdf_ppapi.h" #include "sandbox/policy/switches.h" #include "services/network/public/cpp/features.h" #include "third_party/blink/public/common/switches.h" @@ -66,7 +65,7 @@ const char* const kNonWildcardDomainNonPortSchemes[] = { extensions::kExtensionScheme, content::kChromeDevToolsScheme, content::kChromeUIScheme, content::kChromeUIUntrustedScheme}; const size_t kNonWildcardDomainNonPortSchemesSize = - base::size(kNonWildcardDomainNonPortSchemes); + std::size(kNonWildcardDomainNonPortSchemes); } // namespace @@ -381,12 +380,6 @@ void AlloyMainDelegate::PreSandboxStartup() { MaybePatchGdiGetFontData(); } -void AlloyMainDelegate::SandboxInitialized(const std::string& process_type) { - AlloyContentClient::SetPDFEntryFunctions(chrome_pdf::PPP_GetInterface, - chrome_pdf::PPP_InitializeModule, - chrome_pdf::PPP_ShutdownModule); -} - absl::variant AlloyMainDelegate::RunProcess( const std::string& process_type, content::MainFunctionParams main_function_params) { diff --git a/libcef/common/alloy/alloy_main_delegate.h b/libcef/common/alloy/alloy_main_delegate.h index 217f2a258..8549b8e0b 100644 --- a/libcef/common/alloy/alloy_main_delegate.h +++ b/libcef/common/alloy/alloy_main_delegate.h @@ -45,7 +45,6 @@ class AlloyMainDelegate : public content::ContentMainDelegate, void PreBrowserMain() override; bool BasicStartupComplete(int* exit_code) override; void PreSandboxStartup() override; - void SandboxInitialized(const std::string& process_type) override; absl::variant RunProcess( const std::string& process_type, content::MainFunctionParams main_function_params) override; diff --git a/libcef/common/crash_reporter_client.cc b/libcef/common/crash_reporter_client.cc index 171546dfa..89b293b14 100644 --- a/libcef/common/crash_reporter_client.cc +++ b/libcef/common/crash_reporter_client.cc @@ -495,14 +495,14 @@ bool CefCrashReporterClient::ReadCrashConfigFile() { }; // Make sure we can fit all possible name/value pairs. - static_assert(base::size(ids) * crashpad::Annotation::kValueMaxSize >= + static_assert(std::size(ids) * crashpad::Annotation::kValueMaxSize >= 3 * 26 /* sizes (small, medium, large) * slots (A to Z) */ * (3 + 2 /* key size ("S-A") + delim size ("=,") */ + crashpad::Annotation::kNameMaxLength), "Not enough storage for key map"); size_t offset = 0; - for (size_t i = 0; i < base::size(ids); ++i) { + for (size_t i = 0; i < std::size(ids); ++i) { size_t length = std::min(map_keys.size() - offset, crashpad::Annotation::kValueMaxSize); ids[i].Set(base::StringPiece(map_keys.data() + offset, length)); @@ -718,7 +718,7 @@ bool CefCrashReporterClient::EnableBrowserCrashForwarding() { bool Set##name##Annotation(size_t index, const base::StringPiece& value) { \ using IDKey = crash_reporter::CrashKeyString; \ static IDKey ids[] = {IDKEY_ENTRIES(#name)}; \ - if (index < base::size(ids)) { \ + if (index < std::size(ids)) { \ if (value.empty()) { \ ids[index].Clear(); \ } else { \ diff --git a/libcef/common/crash_reporting.cc b/libcef/common/crash_reporting.cc index 2aa5f47bf..877852d52 100644 --- a/libcef/common/crash_reporting.cc +++ b/libcef/common/crash_reporting.cc @@ -159,7 +159,7 @@ bool IsBoringCEFSwitch(const std::string& flag) { size_t end = flag.find("="); size_t len = (end == std::string::npos) ? flag.length() - 2 : end - 2; - for (size_t i = 0; i < base::size(kIgnoreSwitches); ++i) { + for (size_t i = 0; i < std::size(kIgnoreSwitches); ++i) { if (flag.compare(2, len, kIgnoreSwitches[i]) == 0) return true; } diff --git a/libcef/common/mojom/cef.mojom b/libcef/common/mojom/cef.mojom index f555f00a4..bd710c35f 100644 --- a/libcef/common/mojom/cef.mojom +++ b/libcef/common/mojom/cef.mojom @@ -53,7 +53,7 @@ interface RenderFrame { FrameAttachedAck(); // Send a message to the render process. - SendMessage(string name, mojo_base.mojom.ListValue arguments); + SendMessage(string name, mojo_base.mojom.Value arguments); // Send a command. SendCommand(string command); @@ -82,7 +82,7 @@ interface RenderFrame { // Interface for communicating with a frame in the browser process. interface BrowserFrame { // Send a message to the browser process. - SendMessage(string name, mojo_base.mojom.ListValue arguments); + SendMessage(string name, mojo_base.mojom.Value arguments); // The render frame is ready to begin handling actions. FrameAttached(pending_remote render_frame, @@ -111,7 +111,7 @@ struct NewBrowserInfo { bool is_popup; bool is_windowless; bool is_guest_view; - mojo_base.mojom.DictionaryValue? extra_info; + mojo_base.mojom.Value? extra_info; }; // Interface for communicating with browser management in the browser process. diff --git a/libcef/common/request_impl.cc b/libcef/common/request_impl.cc index fcb40950f..fdf5c14dd 100644 --- a/libcef/common/request_impl.cc +++ b/libcef/common/request_impl.cc @@ -17,8 +17,8 @@ #include "base/strings/string_split.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" -#include "components/navigation_interception/navigation_params.h" #include "content/public/browser/browser_thread.h" +#include "content/public/browser/navigation_handle.h" #include "content/public/common/content_switches.h" #include "net/base/elements_upload_data_stream.h" #include "net/base/load_flags.h" @@ -518,26 +518,25 @@ void CefRequestImpl::Set(const net::HttpRequestHeaders& headers) { ::GetHeaderMap(headers, headermap_); } -void CefRequestImpl::Set( - const navigation_interception::NavigationParams& params, - bool is_main_frame) { +void CefRequestImpl::Set(content::NavigationHandle* navigation_handle) { base::AutoLock lock_scope(lock_); CHECK_READONLY_RETURN_VOID(); Reset(); - url_ = params.url(); - method_ = params.is_post() ? "POST" : "GET"; + url_ = navigation_handle->GetURL(); + method_ = navigation_handle->IsPost() ? "POST" : "GET"; - const auto& sanitized_referrer = - content::Referrer::SanitizeForRequest(params.url(), params.referrer()); - referrer_url_ = sanitized_referrer.url; + const auto& sanitized_referrer = content::Referrer::SanitizeForRequest( + navigation_handle->GetURL(), navigation_handle->GetReferrer()); + referrer_url_ = sanitized_referrer->url; referrer_policy_ = - BlinkReferrerPolicyToNetReferrerPolicy(sanitized_referrer.policy); + BlinkReferrerPolicyToNetReferrerPolicy(sanitized_referrer->policy); - resource_type_ = is_main_frame ? RT_MAIN_FRAME : RT_SUB_FRAME; - transition_type_ = - static_cast(params.transition_type()); + resource_type_ = + navigation_handle->IsInMainFrame() ? RT_MAIN_FRAME : RT_SUB_FRAME; + transition_type_ = static_cast( + navigation_handle->GetPageTransition()); } // static diff --git a/libcef/common/request_impl.h b/libcef/common/request_impl.h index cdd167e69..ba0a8c094 100644 --- a/libcef/common/request_impl.h +++ b/libcef/common/request_impl.h @@ -22,9 +22,9 @@ namespace blink { class WebURLRequest; } // namespace blink -namespace navigation_interception { -class NavigationParams; -} +namespace content { +class NavigationHandle; +} // namespace content namespace net { class HttpRequestHeaders; @@ -96,11 +96,8 @@ class CefRequestImpl : public CefRequest { void Set(const net::HttpRequestHeaders& headers); // Populate this object from the NavigationParams object. - // TODO(cef): Remove the |is_main_frame| argument once NavigationParams is - // reliable in reporting that value. - // Called from content_browser_client.cc NavigationOnUIThread(). - void Set(const navigation_interception::NavigationParams& params, - bool is_main_frame); + // Called from throttle_handler.cc NavigationOnUIThread(). + void Set(content::NavigationHandle* navigation_handle); // Populate the WebURLRequest object based on the contents of |params|. // Called from CefBrowserImpl::LoadRequest(). diff --git a/libcef/common/resource_bundle_delegate.cc b/libcef/common/resource_bundle_delegate.cc index 6b2833600..a98d1dbf5 100644 --- a/libcef/common/resource_bundle_delegate.cc +++ b/libcef/common/resource_bundle_delegate.cc @@ -28,7 +28,7 @@ gfx::Image CefResourceBundleDelegate::GetNativeImageNamed(int resource_id) { return gfx::Image(); } -base::RefCountedStaticMemory* CefResourceBundleDelegate::LoadDataResourceBytes( +base::RefCountedMemory* CefResourceBundleDelegate::LoadDataResourceBytes( int resource_id, ui::ResourceScaleFactor scale_factor) { return nullptr; diff --git a/libcef/common/resource_bundle_delegate.h b/libcef/common/resource_bundle_delegate.h index f3ad50d18..7c8acefba 100644 --- a/libcef/common/resource_bundle_delegate.h +++ b/libcef/common/resource_bundle_delegate.h @@ -29,7 +29,7 @@ class CefResourceBundleDelegate : public ui::ResourceBundle::Delegate { const std::string& locale) override; gfx::Image GetImageNamed(int resource_id) override; gfx::Image GetNativeImageNamed(int resource_id) override; - base::RefCountedStaticMemory* LoadDataResourceBytes( + base::RefCountedMemory* LoadDataResourceBytes( int resource_id, ui::ResourceScaleFactor scale_factor) override; absl::optional LoadDataResourceString(int resource_id) override; diff --git a/libcef/renderer/alloy/alloy_content_renderer_client.cc b/libcef/renderer/alloy/alloy_content_renderer_client.cc index 7a6dce863..3eca469c0 100644 --- a/libcef/renderer/alloy/alloy_content_renderer_client.cc +++ b/libcef/renderer/alloy/alloy_content_renderer_client.cc @@ -53,8 +53,7 @@ #include "chrome/renderer/chrome_content_renderer_client.h" #include "chrome/renderer/extensions/chrome_extensions_renderer_client.h" #include "chrome/renderer/loadtimes_extension_bindings.h" -#include "chrome/renderer/pepper/chrome_pdf_print_client.h" -#include "chrome/renderer/pepper/pepper_helper.h" +#include "chrome/renderer/media/chrome_key_systems.h" #include "chrome/renderer/plugins/chrome_plugin_placeholder.h" #include "components/content_settings/core/common/content_settings_types.h" #include "components/nacl/common/nacl_constants.h" @@ -231,11 +230,6 @@ void AlloyContentRendererClient::RenderThreadStarted() { } #endif // BUILDFLAG(IS_MAC) - if (extensions::PdfExtensionEnabled()) { - pdf_print_client_.reset(new ChromePDFPrintClient()); - pdf::PepperPDFHost::SetPrintClient(pdf_print_client_.get()); - } - if (extensions::ExtensionsEnabled()) extensions_renderer_client_->RenderThreadStarted(); } @@ -275,8 +269,6 @@ void AlloyContentRendererClient::RenderFrameCreated( content::RenderFrame* render_frame) { auto render_frame_observer = new CefRenderFrameObserver(render_frame); - new PepperHelper(render_frame); - if (extensions::ExtensionsEnabled()) { extensions_renderer_client_->RenderFrameCreated( render_frame, render_frame_observer->registry()); @@ -352,8 +344,7 @@ bool AlloyContentRendererClient::IsPluginHandledExternally( plugin_element); return false; } - if (plugin_info->actual_mime_type == pdf::kInternalPluginMimeType && - pdf::IsInternalPluginExternallyHandled()) { + if (plugin_info->actual_mime_type == pdf::kInternalPluginMimeType) { // Only actually treat the internal PDF plugin as externally handled if // used within an origin allowed to create the internal PDF plugin; // otherwise, let Blink try to create the in-process PDF plugin. @@ -421,11 +412,7 @@ bool AlloyContentRendererClient::IsOriginIsolatedPepperPlugin( void AlloyContentRendererClient::GetSupportedKeySystems( media::GetSupportedKeySystemsCB cb) { - key_systems_provider_.GetSupportedKeySystems(std::move(cb)); -} - -bool AlloyContentRendererClient::IsKeySystemsUpdateNeeded() { - return key_systems_provider_.IsKeySystemsUpdateNeeded(); + GetChromeKeySystems(std::move(cb)); } void AlloyContentRendererClient::RunScriptsAtDocumentStart( diff --git a/libcef/renderer/alloy/alloy_content_renderer_client.h b/libcef/renderer/alloy/alloy_content_renderer_client.h index 372fe1607..d96761eab 100644 --- a/libcef/renderer/alloy/alloy_content_renderer_client.h +++ b/libcef/renderer/alloy/alloy_content_renderer_client.h @@ -18,7 +18,6 @@ #include "base/task/current_thread.h" #include "base/task/single_thread_task_runner.h" #include "chrome/common/plugin.mojom.h" -#include "chrome/renderer/media/chrome_key_systems_provider.h" #include "content/public/renderer/content_renderer_client.h" #include "content/public/renderer/render_thread.h" #include "mojo/public/cpp/bindings/generic_pending_receiver.h" @@ -43,7 +42,6 @@ class WebCacheImpl; class AlloyRenderThreadObserver; class CefRenderManager; -class ChromePDFPrintClient; class SpellCheck; class AlloyContentRendererClient @@ -101,7 +99,6 @@ class AlloyContentRendererClient bool IsLinkVisited(uint64_t link_hash) override; bool IsOriginIsolatedPepperPlugin(const base::FilePath& plugin_path) override; void GetSupportedKeySystems(media::GetSupportedKeySystemsCB cb) override; - bool IsKeySystemsUpdateNeeded() override; void RunScriptsAtDocumentStart(content::RenderFrame* render_frame) override; void RunScriptsAtDocumentEnd(content::RenderFrame* render_frame) override; void RunScriptsAtDocumentIdle(content::RenderFrame* render_frame) override; @@ -140,16 +137,10 @@ class AlloyContentRendererClient std::unique_ptr spellcheck_; std::unique_ptr visited_link_slave_; - std::unique_ptr pdf_print_client_; - std::unique_ptr extensions_client_; std::unique_ptr extensions_renderer_client_; - // Used to refresh the list of supported key systems after Widevine is - // installed as a component update. - ChromeKeySystemsProvider key_systems_provider_; - // Used in single-process mode to test when cleanup is complete. // Access must be protected by |single_process_cleanup_lock_|. bool single_process_cleanup_complete_ = false; diff --git a/libcef/renderer/browser_impl.cc b/libcef/renderer/browser_impl.cc index d5efcc35c..75b18a4a5 100644 --- a/libcef/renderer/browser_impl.cc +++ b/libcef/renderer/browser_impl.cc @@ -16,9 +16,9 @@ #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" -#include "content/public/renderer/document_state.h" #include "content/public/renderer/render_frame.h" #include "content/public/renderer/render_view.h" +#include "content/renderer/document_state.h" #include "content/renderer/navigation_state.h" #include "third_party/blink/public/platform/web_string.h" #include "third_party/blink/public/platform/web_url_error.h" diff --git a/libcef/renderer/extensions/print_render_frame_helper_delegate.cc b/libcef/renderer/extensions/print_render_frame_helper_delegate.cc index 71d8a8438..614149d34 100644 --- a/libcef/renderer/extensions/print_render_frame_helper_delegate.cc +++ b/libcef/renderer/extensions/print_render_frame_helper_delegate.cc @@ -17,7 +17,6 @@ #include "content/public/renderer/render_frame.h" #include "extensions/common/constants.h" #include "extensions/renderer/guest_view/mime_handler_view/post_message_support.h" -#include "pdf/pdf_features.h" #include "services/service_manager/public/cpp/interface_provider.h" #include "third_party/blink/public/web/web_document.h" #include "third_party/blink/public/web/web_element.h" @@ -35,25 +34,8 @@ CefPrintRenderFrameHelperDelegate::~CefPrintRenderFrameHelperDelegate() = // Return the PDF object element if |frame| is the out of process PDF extension. blink::WebElement CefPrintRenderFrameHelperDelegate::GetPdfElement( blink::WebLocalFrame* frame) { - if (IsPdfInternalPluginAllowedOrigin(frame->GetSecurityOrigin())) { - DCHECK(!base::FeatureList::IsEnabled(chrome_pdf::features::kPdfUnseasoned)); - // with id="plugin" is created in - // chrome/browser/resources/pdf/pdf_viewer_base.js. - auto viewer_element = frame->GetDocument().GetElementById("viewer"); - if (!viewer_element.IsNull() && !viewer_element.ShadowRoot().IsNull()) { - auto plugin_element = - viewer_element.ShadowRoot().QuerySelector("#plugin"); - if (!plugin_element.IsNull()) { - return plugin_element; - } - } - NOTREACHED(); - return blink::WebElement(); - } - if (frame->Parent() && IsPdfInternalPluginAllowedOrigin(frame->Parent()->GetSecurityOrigin())) { - DCHECK(base::FeatureList::IsEnabled(chrome_pdf::features::kPdfUnseasoned)); auto plugin_element = frame->GetDocument().QuerySelector("embed"); DCHECK(!plugin_element.IsNull()); return plugin_element; diff --git a/libcef/renderer/render_manager.cc b/libcef/renderer/render_manager.cc index 18510adfa..31db12268 100644 --- a/libcef/renderer/render_manager.cc +++ b/libcef/renderer/render_manager.cc @@ -41,6 +41,7 @@ #include "services/network/public/mojom/cors_origin_pattern.mojom.h" #include "third_party/blink/public/platform/web_string.h" #include "third_party/blink/public/platform/web_url.h" +#include "third_party/blink/public/web/web_frame.h" #include "third_party/blink/public/web/web_security_policy.h" #include "third_party/blink/public/web/web_view.h" #include "third_party/blink/public/web/web_view_observer.h" diff --git a/libcef/resources/cef_strings.grd b/libcef/resources/cef_strings.grd index 876ec0006..9bf51f214 100644 --- a/libcef/resources/cef_strings.grd +++ b/libcef/resources/cef_strings.grd @@ -12,6 +12,7 @@ need to be translated for each locale.--> + @@ -100,6 +101,7 @@ need to be translated for each locale.--> + diff --git a/patch/patch.cfg b/patch/patch.cfg index cceabb687..d36783159 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -539,16 +539,5 @@ patches = [ # Remove DCHECK that triggers while loading DevTools resources. # https://bugs.chromium.org/p/chromium/issues/detail?id=1289230 'name': 'blink_security_policy_1289230', - }, - { - # Fix missing lock.h include causing build failure with Windows sandbox. - # https://chromium-review.googlesource.com/c/chromium/src/+/3479396 - 'name': 'base_debug_3479396', - }, - { - # Disable the "Histogram: has bad minimum: 0" warning which is - # spamming the debug log. - # https://bugs.chromium.org/p/chromium/issues/detail?id=1288842#c29 - 'name': 'base_metrics_1288842', } ] diff --git a/patch/patches/base_command_line_1872.patch b/patch/patches/base_command_line_1872.patch index 3ceca0070..785ee1e2a 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 8f26e95cc6c57..141eea233470a 100644 +index b59bc4b1b6041..b76a5f69952b8 100644 --- base/command_line.cc +++ base/command_line.cc @@ -337,11 +337,10 @@ void CommandLine::AppendSwitchPath(StringPiece switch_string, diff --git a/patch/patches/base_debug_3479396.patch b/patch/patches/base_debug_3479396.patch deleted file mode 100644 index 0af1e9a1f..000000000 --- a/patch/patches/base_debug_3479396.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git base/debug/dump_without_crashing.cc base/debug/dump_without_crashing.cc -index b9858dc0a7a33..302774bfd773c 100644 ---- base/debug/dump_without_crashing.cc -+++ base/debug/dump_without_crashing.cc -@@ -7,6 +7,7 @@ - #include "base/check.h" - #include "base/metrics/histogram_functions.h" - #include "base/no_destructor.h" -+#include "base/synchronization/lock.h" - #include "base/trace_event/base_tracing.h" - - namespace { diff --git a/patch/patches/base_metrics_1288842.patch b/patch/patches/base_metrics_1288842.patch deleted file mode 100644 index 11eab4ef8..000000000 --- a/patch/patches/base_metrics_1288842.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git base/metrics/histogram.cc base/metrics/histogram.cc -index aa8973128e806..884723c48c552 100644 ---- base/metrics/histogram.cc -+++ base/metrics/histogram.cc -@@ -442,7 +442,8 @@ bool Histogram::InspectConstructionArguments(StringPiece name, - - // Defensive code for backward compatibility. - if (*minimum < 1) { -- DLOG(ERROR) << "Histogram: " << name << " has bad minimum: " << *minimum; -+ // TODO(crbug.com/1288842): Temporarily disabled during cleanup. -+ // DLOG(ERROR) << "Histogram: " << name << " has bad minimum: " << *minimum; - *minimum = 1; - if (*maximum < 1) - *maximum = 1; diff --git a/patch/patches/base_sandbox_2743.patch b/patch/patches/base_sandbox_2743.patch index 460d47079..8e27f4e2a 100644 --- a/patch/patches/base_sandbox_2743.patch +++ b/patch/patches/base_sandbox_2743.patch @@ -1,5 +1,5 @@ diff --git base/BUILD.gn base/BUILD.gn -index 8243e7ad76529..a013002ac9d1e 100644 +index 29f74fb8bedaa..2608ea2a70aca 100644 --- base/BUILD.gn +++ base/BUILD.gn @@ -37,6 +37,7 @@ import("//build/nocompile.gni") @@ -10,7 +10,7 @@ index 8243e7ad76529..a013002ac9d1e 100644 import("//testing/libfuzzer/fuzzer_test.gni") import("//testing/test.gni") import("//third_party/icu/config.gni") -@@ -1883,7 +1884,11 @@ mixed_component("base") { +@@ -1896,7 +1897,11 @@ mixed_component("base") { "hash/md5_constexpr_internal.h", "hash/sha1.h", ] @@ -23,7 +23,7 @@ index 8243e7ad76529..a013002ac9d1e 100644 sources += [ "hash/md5_nacl.cc", "hash/md5_nacl.h", -@@ -2136,6 +2141,12 @@ mixed_component("base") { +@@ -2150,6 +2155,12 @@ mixed_component("base") { defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ] } diff --git a/patch/patches/blink_security_policy_1289230.patch b/patch/patches/blink_security_policy_1289230.patch index 8a51bc4f6..234c1891e 100644 --- a/patch/patches/blink_security_policy_1289230.patch +++ b/patch/patches/blink_security_policy_1289230.patch @@ -1,5 +1,5 @@ diff --git third_party/blink/renderer/platform/weborigin/security_policy.cc third_party/blink/renderer/platform/weborigin/security_policy.cc -index 4ae902d39a8f5..adfc8d91f9829 100644 +index e0527ec908014..5ea849a975818 100644 --- third_party/blink/renderer/platform/weborigin/security_policy.cc +++ third_party/blink/renderer/platform/weborigin/security_policy.cc @@ -90,7 +90,7 @@ Referrer SecurityPolicy::GenerateReferrer( diff --git a/patch/patches/browser_scheduler.patch b/patch/patches/browser_scheduler.patch index d138f87fd..4621eca06 100644 --- a/patch/patches/browser_scheduler.patch +++ b/patch/patches/browser_scheduler.patch @@ -1,8 +1,8 @@ diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc -index b23609c41a5d8..7d5f58d3ae197 100644 +index 243e8830a3369..17416baa5fbf3 100644 --- content/browser/scheduler/browser_task_executor.cc +++ content/browser/scheduler/browser_task_executor.cc -@@ -309,7 +309,7 @@ BrowserTaskExecutor::OnUserInputStart() { +@@ -301,7 +301,7 @@ BrowserTaskExecutor::OnUserInputStart() { // static void BrowserTaskExecutor::Shutdown() { diff --git a/patch/patches/browser_security_policy_1081397.patch b/patch/patches/browser_security_policy_1081397.patch index b5cacd4e8..4126f6020 100644 --- a/patch/patches/browser_security_policy_1081397.patch +++ b/patch/patches/browser_security_policy_1081397.patch @@ -1,8 +1,8 @@ diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc -index ec3262207e626..910e0b6a9ff89 100644 +index f5b91aa9fc965..65319cceb358c 100644 --- content/browser/child_process_security_policy_impl.cc +++ content/browser/child_process_security_policy_impl.cc -@@ -1736,6 +1736,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForMaybeOpaqueOrigin( +@@ -1739,6 +1739,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForMaybeOpaqueOrigin( // DeclarativeApiTest.PersistRules. if (actual_process_lock.matches_scheme(url::kDataScheme)) return true; @@ -20,10 +20,10 @@ index ec3262207e626..910e0b6a9ff89 100644 // TODO(wjmaclean): We should update the ProcessLock comparison API diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc -index 5a7fa871f7b26..71fa1b1bcd8fd 100644 +index dad72b675ef23..e5afb8080f074 100644 --- content/browser/renderer_host/navigation_request.cc +++ content/browser/renderer_host/navigation_request.cc -@@ -5940,6 +5940,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryWithoutFinalFrameHost( +@@ -6053,6 +6053,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryWithoutFinalFrameHost( network::mojom::WebSandboxFlags sandbox_flags) { // Calculate an approximation of the origin. The sandbox/csp are ignored. url::Origin origin = GetOriginForURLLoaderFactoryUnchecked(this); @@ -36,7 +36,7 @@ index 5a7fa871f7b26..71fa1b1bcd8fd 100644 // Apply sandbox flags. // See https://html.spec.whatwg.org/#sandboxed-origin-browsing-context-flag -@@ -5973,6 +5979,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryWithFinalFrameHost() { +@@ -6086,6 +6092,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryWithFinalFrameHost() { if (IsSameDocument() || IsPageActivation()) return GetRenderFrameHost()->GetLastCommittedOrigin(); diff --git a/patch/patches/build.patch b/patch/patches/build.patch index 010ae9e06..05b962e45 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 7b9ce0172eedf..d27fe315a3b1a 100644 +index 60165f14531c4..5695b04b0a28f 100644 --- build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn -@@ -1842,8 +1842,6 @@ config("thin_archive") { +@@ -1857,8 +1857,6 @@ config("thin_archive") { # confuses lldb. if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) { arflags = [ "-T" ] diff --git a/patch/patches/chrome_browser.patch b/patch/patches/chrome_browser.patch index ff07e0c6f..b5d48de7e 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 560930c0979ca..e99dcad7a2e5d 100644 +index fbceb85450c53..1141aa50698fe 100644 --- chrome/browser/BUILD.gn +++ chrome/browser/BUILD.gn @@ -12,6 +12,7 @@ import("//build/config/features.gni") @@ -10,7 +10,7 @@ index 560930c0979ca..e99dcad7a2e5d 100644 import("//chrome/browser/buildflags.gni") import("//chrome/browser/downgrade/buildflags.gni") import("//chrome/common/features.gni") -@@ -1904,6 +1905,7 @@ static_library("browser") { +@@ -1916,6 +1917,7 @@ static_library("browser") { "//build:chromeos_buildflags", "//build/config/compiler:compiler_buildflags", "//cc", @@ -18,7 +18,7 @@ index 560930c0979ca..e99dcad7a2e5d 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -2546,6 +2548,10 @@ static_library("browser") { +@@ -2572,6 +2574,10 @@ static_library("browser") { deps += [ "//chrome/browser/ui/webui/connectors_internals:mojo_bindings" ] } diff --git a/patch/patches/chrome_browser_background_mode_1100085.patch b/patch/patches/chrome_browser_background_mode_1100085.patch index 8da3a7f7b..27ecaea63 100644 --- a/patch/patches/chrome_browser_background_mode_1100085.patch +++ b/patch/patches/chrome_browser_background_mode_1100085.patch @@ -14,10 +14,10 @@ index d7b9aa164f161..a042abaecbce7 100644 std::unique_ptr manager) = 0; #endif diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc -index c414951896de4..dee7534789e09 100644 +index 0084eeb6ec160..8f5794588fe8a 100644 --- chrome/browser/browser_process_impl.cc +++ chrome/browser/browser_process_impl.cc -@@ -1003,18 +1003,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { +@@ -1001,18 +1001,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { return download_request_limiter_.get(); } @@ -38,10 +38,10 @@ index c414951896de4..dee7534789e09 100644 std::unique_ptr manager) { background_mode_manager_ = std::move(manager); diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h -index a40df2ac3065c..6ba9442b19f09 100644 +index 8fd6e51b8f078..fb09ea0eb6ba1 100644 --- chrome/browser/browser_process_impl.h +++ chrome/browser/browser_process_impl.h -@@ -183,8 +183,8 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -182,8 +182,8 @@ class BrowserProcessImpl : public BrowserProcess, void SetApplicationLocale(const std::string& actual_locale) override; DownloadStatusUpdater* download_status_updater() override; DownloadRequestLimiter* download_request_limiter() override; diff --git a/patch/patches/chrome_browser_browser.patch b/patch/patches/chrome_browser_browser.patch index b1de19d6e..9f8bcea50 100644 --- a/patch/patches/chrome_browser_browser.patch +++ b/patch/patches/chrome_browser_browser.patch @@ -13,7 +13,7 @@ index 9e534ff1683f1..de406f5879be0 100644 return false; } diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc -index 04e327d970b87..f79b861fe6966 100644 +index 3284c6c6353cc..6694f9000c14a 100644 --- chrome/browser/ui/browser.cc +++ chrome/browser/ui/browser.cc @@ -262,6 +262,25 @@ @@ -56,7 +56,7 @@ index 04e327d970b87..f79b861fe6966 100644 location_bar_model_ = std::make_unique( location_bar_model_delegate_.get(), content::kMaxURLDisplayChars); -@@ -1327,6 +1353,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( +@@ -1322,6 +1348,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( if (exclusive_access_manager_->HandleUserKeyEvent(event)) return content::KeyboardEventProcessingResult::HANDLED; @@ -71,7 +71,7 @@ index 04e327d970b87..f79b861fe6966 100644 return window()->PreHandleKeyboardEvent(event); } -@@ -1334,8 +1368,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, +@@ -1329,8 +1363,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, const NativeWebKeyboardEvent& event) { DevToolsWindow* devtools_window = DevToolsWindow::GetInstanceForInspectedWebContents(source); @@ -92,7 +92,7 @@ index 04e327d970b87..f79b861fe6966 100644 } bool Browser::TabsNeedBeforeUnloadFired() { -@@ -1540,6 +1584,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source, +@@ -1535,6 +1579,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source, return window->OpenURLFromTab(source, params); } @@ -107,7 +107,7 @@ index 04e327d970b87..f79b861fe6966 100644 NavigateParams nav_params(this, params.url, params.transition); nav_params.FillNavigateParamsFromOpenURLParams(params); nav_params.source_contents = source; -@@ -1639,6 +1691,15 @@ void Browser::AddNewContents(WebContents* source, +@@ -1642,6 +1694,15 @@ void Browser::AddNewContents(WebContents* source, source, disposition); } @@ -123,7 +123,7 @@ index 04e327d970b87..f79b861fe6966 100644 chrome::AddWebContents(this, source, std::move(new_contents), target_url, disposition, initial_rect); } -@@ -1657,6 +1718,8 @@ void Browser::LoadingStateChanged(WebContents* source, +@@ -1660,6 +1721,8 @@ void Browser::LoadingStateChanged(WebContents* source, bool should_show_loading_ui) { ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD); UpdateWindowForLoadingStateChanged(source, should_show_loading_ui); @@ -132,7 +132,7 @@ index 04e327d970b87..f79b861fe6966 100644 } void Browser::CloseContents(WebContents* source) { -@@ -1684,6 +1747,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { +@@ -1687,6 +1750,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { } void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { @@ -141,7 +141,7 @@ index 04e327d970b87..f79b861fe6966 100644 if (!GetStatusBubble()) return; -@@ -1691,6 +1756,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { +@@ -1694,6 +1759,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { GetStatusBubble()->SetURL(url); } @@ -159,7 +159,7 @@ index 04e327d970b87..f79b861fe6966 100644 void Browser::ContentsMouseEvent(WebContents* source, bool motion, bool exited) { -@@ -1715,6 +1791,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) { +@@ -1718,6 +1794,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) { return false; } @@ -179,7 +179,7 @@ index 04e327d970b87..f79b861fe6966 100644 void Browser::BeforeUnloadFired(WebContents* web_contents, bool proceed, bool* proceed_to_fire_unload) { -@@ -1807,6 +1896,10 @@ void Browser::WebContentsCreated(WebContents* source_contents, +@@ -1810,6 +1899,10 @@ void Browser::WebContentsCreated(WebContents* source_contents, // Make the tab show up in the task manager. task_manager::WebContentsTags::CreateForTabContents(new_contents); @@ -190,7 +190,7 @@ index 04e327d970b87..f79b861fe6966 100644 } void Browser::PortalWebContentsCreated(WebContents* portal_web_contents) { -@@ -1851,6 +1944,8 @@ void Browser::RendererResponsive( +@@ -1854,6 +1947,8 @@ void Browser::RendererResponsive( void Browser::DidNavigatePrimaryMainFramePostCommit(WebContents* web_contents) { if (web_contents == tab_strip_model_->GetActiveWebContents()) UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); @@ -199,7 +199,7 @@ index 04e327d970b87..f79b861fe6966 100644 } content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager( -@@ -1906,11 +2001,15 @@ void Browser::EnterFullscreenModeForTab( +@@ -1909,11 +2004,15 @@ void Browser::EnterFullscreenModeForTab( const blink::mojom::FullscreenOptions& options) { exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab( requesting_frame, options.display_id); @@ -215,7 +215,7 @@ index 04e327d970b87..f79b861fe6966 100644 } bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) { -@@ -2620,13 +2719,20 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { +@@ -2623,13 +2722,20 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { // Browser, Getters for UI (private): StatusBubble* Browser::GetStatusBubble() { @@ -237,7 +237,7 @@ index 04e327d970b87..f79b861fe6966 100644 return window_ ? window_->GetStatusBubble() : nullptr; } -@@ -2753,6 +2859,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { +@@ -2756,6 +2862,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { content_translate_driver->RemoveTranslationObserver(this); BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this); } @@ -247,7 +247,7 @@ index 04e327d970b87..f79b861fe6966 100644 void Browser::TabDetachedAtImpl(content::WebContents* contents, diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h -index a63ba24be314e..8eb344f1daeb8 100644 +index 5edda102ff59c..f2cccff5a5c56 100644 --- chrome/browser/ui/browser.h +++ chrome/browser/ui/browser.h @@ -21,6 +21,7 @@ @@ -328,7 +328,7 @@ index a63ba24be314e..8eb344f1daeb8 100644 void BeforeUnloadFired(content::WebContents* source, bool proceed, bool* proceed_to_fire_unload) override; -@@ -1196,6 +1227,8 @@ class Browser : public TabStripModelObserver, +@@ -1191,6 +1222,8 @@ class Browser : public TabStripModelObserver, const std::string initial_workspace_; bool initial_visible_on_all_workspaces_state_; @@ -337,7 +337,7 @@ index a63ba24be314e..8eb344f1daeb8 100644 CreationSource creation_source_ = CreationSource::kUnknown; UnloadController unload_controller_; -@@ -1257,6 +1290,10 @@ class Browser : public TabStripModelObserver, +@@ -1252,6 +1285,10 @@ class Browser : public TabStripModelObserver, extension_browser_window_helper_; #endif @@ -349,10 +349,10 @@ index a63ba24be314e..8eb344f1daeb8 100644 // The following factory is used for chrome update coalescing. diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc -index b7b60c8f9a0c6..bb5b09e9c081d 100644 +index a5d8ce8641968..b57d9ebb5734d 100644 --- chrome/browser/ui/browser_navigator.cc +++ chrome/browser/ui/browser_navigator.cc -@@ -497,6 +497,13 @@ std::unique_ptr CreateTargetContents( +@@ -498,6 +498,13 @@ std::unique_ptr CreateTargetContents( std::unique_ptr target_contents = WebContents::Create(create_params); diff --git a/patch/patches/chrome_browser_content_settings.patch b/patch/patches/chrome_browser_content_settings.patch index 704d35968..3d7ab40f1 100644 --- a/patch/patches/chrome_browser_content_settings.patch +++ b/patch/patches/chrome_browser_content_settings.patch @@ -56,10 +56,10 @@ index 242f244a6d3b5..d037f2dfd9987 100644 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) SupervisedUserSettingsService* supervised_service = diff --git components/content_settings/renderer/content_settings_agent_impl.cc components/content_settings/renderer/content_settings_agent_impl.cc -index e11724a73a2f7..ad818bc3ae082 100644 +index 4ba853105dcd0..28a742fa327c8 100644 --- components/content_settings/renderer/content_settings_agent_impl.cc +++ components/content_settings/renderer/content_settings_agent_impl.cc -@@ -166,7 +166,7 @@ ContentSetting GetContentSettingFromRulesImpl( +@@ -164,7 +164,7 @@ ContentSetting GetContentSettingFromRulesImpl( return rule.GetContentSetting(); } } diff --git a/patch/patches/chrome_browser_context_menus.patch b/patch/patches/chrome_browser_context_menus.patch index 52e4be4b1..6755b3248 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 1301f3baf5b7f..bebc86d812313 100644 +index 5e4b07cda7100..420badf9841e9 100644 --- chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ chrome/browser/renderer_context_menu/render_view_context_menu.cc @@ -292,6 +292,13 @@ base::OnceCallback* GetMenuShownCallback() { @@ -27,7 +27,7 @@ index 1301f3baf5b7f..bebc86d812313 100644 id = CollapseCommandsForUMA(id); const auto& map = GetIdcToUmaMap(type); auto it = map.find(id); -@@ -695,6 +706,14 @@ RenderViewContextMenu::RenderViewContextMenu( +@@ -690,6 +701,14 @@ RenderViewContextMenu::RenderViewContextMenu( system_app_ = GetBrowser() && GetBrowser()->app_controller() ? GetBrowser()->app_controller()->system_app() : nullptr; @@ -42,7 +42,7 @@ index 1301f3baf5b7f..bebc86d812313 100644 } RenderViewContextMenu::~RenderViewContextMenu() = default; -@@ -1062,6 +1081,12 @@ void RenderViewContextMenu::InitMenu() { +@@ -1055,6 +1074,12 @@ void RenderViewContextMenu::InitMenu() { // menu, meaning that each menu item added/removed in this function will cause // it to visibly jump on the screen (see b/173569669). AppendQuickAnswersItems(); @@ -55,7 +55,7 @@ index 1301f3baf5b7f..bebc86d812313 100644 } Profile* RenderViewContextMenu::GetProfile() const { -@@ -2832,6 +2857,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting( +@@ -2782,6 +2807,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting( execute_plugin_action_callback_ = std::move(cb); } @@ -69,10 +69,10 @@ index 1301f3baf5b7f..bebc86d812313 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 72d55de086c14..039d28af436d7 100644 +index 5ef77d88c8990..5b236d4c6be2e 100644 --- chrome/browser/renderer_context_menu/render_view_context_menu.h +++ chrome/browser/renderer_context_menu/render_view_context_menu.h -@@ -126,6 +126,12 @@ class RenderViewContextMenu +@@ -125,6 +125,12 @@ class RenderViewContextMenu base::OnceCallback cb); @@ -85,7 +85,7 @@ index 72d55de086c14..039d28af436d7 100644 protected: Profile* GetProfile() const; -@@ -334,6 +340,9 @@ class RenderViewContextMenu +@@ -333,6 +339,9 @@ class RenderViewContextMenu // built. bool is_protocol_submenu_valid_ = false; @@ -96,10 +96,10 @@ index 72d55de086c14..039d28af436d7 100644 // "Use enhanced spell check" items. std::unique_ptr spelling_suggestions_menu_observer_; 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 8202df66af332..c412b59df6db9 100644 +index 4c5d58479aee4..04f23ed98bebd 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 -@@ -137,6 +137,9 @@ void RenderViewContextMenuViews::RunMenuAt(views::Widget* parent, +@@ -138,6 +138,9 @@ void RenderViewContextMenuViews::RunMenuAt(views::Widget* parent, bool RenderViewContextMenuViews::GetAcceleratorForCommandId( int command_id, ui::Accelerator* accel) const { @@ -110,10 +110,10 @@ index 8202df66af332..c412b59df6db9 100644 // that Ctrl+C, Ctrl+V, Ctrl+X, Ctrl-A, etc do what they normally do. switch (command_id) { diff --git components/renderer_context_menu/render_view_context_menu_base.cc components/renderer_context_menu/render_view_context_menu_base.cc -index 3dfc21fddd982..3f93f06532ed7 100644 +index 0b1b12a3bb350..b2197ccda45a9 100644 --- components/renderer_context_menu/render_view_context_menu_base.cc +++ components/renderer_context_menu/render_view_context_menu_base.cc -@@ -377,6 +377,17 @@ bool RenderViewContextMenuBase::IsCommandIdChecked(int id) const { +@@ -378,6 +378,17 @@ bool RenderViewContextMenuBase::IsCommandIdChecked(int id) const { return false; } diff --git a/patch/patches/chrome_browser_extensions.patch b/patch/patches/chrome_browser_extensions.patch index fc397ba05..ef55835a1 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 38c468115fc1a..3517c3a121f65 100644 +index c5a6b1acb7b08..c5726c8a6b39f 100644 --- chrome/browser/extensions/api/chrome_extensions_api_client.cc +++ chrome/browser/extensions/api/chrome_extensions_api_client.cc @@ -14,6 +14,7 @@ @@ -21,7 +21,7 @@ index 38c468115fc1a..3517c3a121f65 100644 #if BUILDFLAG(ENABLE_PDF) #include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h" #include "components/pdf/browser/pdf_web_contents_helper.h" -@@ -296,6 +301,9 @@ ChromeExtensionsAPIClient::CreateGuestViewManagerDelegate( +@@ -295,6 +300,9 @@ ChromeExtensionsAPIClient::CreateGuestViewManagerDelegate( std::unique_ptr ChromeExtensionsAPIClient::CreateMimeHandlerViewGuestDelegate( MimeHandlerViewGuest* guest) const { diff --git a/patch/patches/chrome_browser_net_export.patch b/patch/patches/chrome_browser_net_export.patch index 293b4de42..8ad20dc0f 100644 --- a/patch/patches/chrome_browser_net_export.patch +++ b/patch/patches/chrome_browser_net_export.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn -index d0335e2fb75e2..8ffd1efa13703 100644 +index 936021a313995..2dd2554f8a7c5 100644 --- chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn @@ -10,6 +10,7 @@ import("//build/config/features.gni") @@ -10,7 +10,7 @@ index d0335e2fb75e2..8ffd1efa13703 100644 import("//chrome/browser/buildflags.gni") import("//chrome/common/features.gni") import("//chromeos/assistant/assistant.gni") -@@ -355,6 +356,10 @@ static_library("ui") { +@@ -353,6 +354,10 @@ static_library("ui") { "//build/config/compiler:wexit_time_destructors", ] @@ -21,7 +21,7 @@ index d0335e2fb75e2..8ffd1efa13703 100644 # Since browser and browser_ui actually depend on each other, # we must omit the dependency from browser_ui to browser. # However, this means browser_ui and browser should more or less -@@ -377,6 +382,7 @@ static_library("ui") { +@@ -375,6 +380,7 @@ static_library("ui") { "//build:branding_buildflags", "//build:chromeos_buildflags", "//cc/paint", @@ -29,7 +29,7 @@ index d0335e2fb75e2..8ffd1efa13703 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -5293,6 +5299,7 @@ static_library("ui") { +@@ -5301,6 +5307,7 @@ static_library("ui") { if (enable_basic_printing) { deps += [ "//components/printing/browser", diff --git a/patch/patches/chrome_browser_profile_menu.patch b/patch/patches/chrome_browser_profile_menu.patch index 942cf8b8c..ee3cf212d 100644 --- a/patch/patches/chrome_browser_profile_menu.patch +++ b/patch/patches/chrome_browser_profile_menu.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/profiles/profile_window.cc chrome/browser/profiles/profile_window.cc -index 9e15e9ba100cd..d4388c060a18f 100644 +index fdc911e5aeb83..724ef4429f14f 100644 --- chrome/browser/profiles/profile_window.cc +++ chrome/browser/profiles/profile_window.cc -@@ -280,7 +280,9 @@ void BubbleViewModeFromAvatarBubbleMode(BrowserWindow::AvatarBubbleMode mode, +@@ -282,7 +282,9 @@ void BubbleViewModeFromAvatarBubbleMode(BrowserWindow::AvatarBubbleMode mode, *bubble_view_mode = BUBBLE_VIEW_MODE_PROFILE_CHOOSER; return; case BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT: @@ -14,10 +14,10 @@ index 9e15e9ba100cd..d4388c060a18f 100644 : profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER; } diff --git chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc -index 142a9b12a734f..2055d03def80c 100644 +index 37294dc0d6da0..5995be5955fcf 100644 --- chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc +++ chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc -@@ -28,6 +28,9 @@ IncognitoClearBrowsingDataDialog* g_incognito_cbd_dialog = nullptr; +@@ -30,6 +30,9 @@ IncognitoClearBrowsingDataDialog* g_incognito_cbd_dialog = nullptr; void IncognitoClearBrowsingDataDialog::Show(views::View* anchor_view, Profile* incognito_profile, Type type) { @@ -27,8 +27,8 @@ index 142a9b12a734f..2055d03def80c 100644 g_incognito_cbd_dialog = new IncognitoClearBrowsingDataDialog( anchor_view, incognito_profile, type); views::Widget* const widget = -@@ -69,7 +72,9 @@ IncognitoClearBrowsingDataDialog::IncognitoClearBrowsingDataDialog( - : BubbleDialogDelegateView(anchor_view, views::BubbleBorder::TOP_RIGHT), +@@ -72,7 +75,9 @@ IncognitoClearBrowsingDataDialog::IncognitoClearBrowsingDataDialog( + dialog_type_(type), incognito_profile_(incognito_profile) { DCHECK(incognito_profile_); - DCHECK(incognito_profile_->IsIncognitoProfile()); @@ -54,7 +54,7 @@ index 98617c979713b..1fac2a76ce097 100644 chrome::RecordDialogCreation( diff --git chrome/browser/ui/views/profiles/profile_menu_view_base.cc chrome/browser/ui/views/profiles/profile_menu_view_base.cc -index 63d663a749c77..1c9376a64c623 100644 +index 0fe5235b7655f..a1d559458f0df 100644 --- chrome/browser/ui/views/profiles/profile_menu_view_base.cc +++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc @@ -512,7 +512,9 @@ void ProfileMenuViewBase::ShowBubble(profiles::BubbleViewMode view_mode, diff --git a/patch/patches/chrome_browser_profiles.patch b/patch/patches/chrome_browser_profiles.patch index 5b87928ca..70c8b801c 100644 --- a/patch/patches/chrome_browser_profiles.patch +++ b/patch/patches/chrome_browser_profiles.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/profiles/off_the_record_profile_impl.cc chrome/browser/profiles/off_the_record_profile_impl.cc -index 5e634ca7e08b1..3cfd301688e33 100644 +index fa75e0580e3c5..f7a13da171372 100644 --- chrome/browser/profiles/off_the_record_profile_impl.cc +++ chrome/browser/profiles/off_the_record_profile_impl.cc -@@ -629,7 +629,9 @@ std::unique_ptr Profile::CreateOffTheRecordProfile( +@@ -637,7 +637,9 @@ std::unique_ptr Profile::CreateOffTheRecordProfile( #endif if (!profile) profile = std::make_unique(parent, otr_profile_id); @@ -14,10 +14,10 @@ index 5e634ca7e08b1..3cfd301688e33 100644 } diff --git chrome/browser/profiles/profile.cc chrome/browser/profiles/profile.cc -index 779971a744754..c35a4eba3f2d9 100644 +index f89b024a0d565..298cd2a82c850 100644 --- chrome/browser/profiles/profile.cc +++ chrome/browser/profiles/profile.cc -@@ -82,6 +82,7 @@ base::LazyInstance>::Leaky +@@ -83,6 +83,7 @@ base::LazyInstance>::Leaky namespace { @@ -25,7 +25,7 @@ index 779971a744754..c35a4eba3f2d9 100644 const char kDevToolsOTRProfileIDPrefix[] = "Devtools::BrowserContext"; const char kMediaRouterOTRProfileIDPrefix[] = "MediaRouter::Presentation"; const char kTestOTRProfileIDPrefix[] = "Test::OTR"; -@@ -96,6 +97,8 @@ bool Profile::OTRProfileID::AllowsBrowserWindows() const { +@@ -97,6 +98,8 @@ bool Profile::OTRProfileID::AllowsBrowserWindows() const { // DevTools::BrowserContext and MediaRouter::Presentation are an // exception to this ban. return *this == PrimaryID() || @@ -34,7 +34,7 @@ index 779971a744754..c35a4eba3f2d9 100644 base::StartsWith(profile_id_, kDevToolsOTRProfileIDPrefix, base::CompareCase::SENSITIVE) || base::StartsWith(profile_id_, kMediaRouterOTRProfileIDPrefix, -@@ -117,6 +120,16 @@ Profile::OTRProfileID Profile::OTRProfileID::CreateUnique( +@@ -118,6 +121,16 @@ Profile::OTRProfileID Profile::OTRProfileID::CreateUnique( base::GUID::GenerateRandomV4().AsLowercaseString().c_str())); } @@ -85,10 +85,10 @@ index ca2561e412621..febd52df6c971 100644 virtual bool IsSignedIn() = 0; diff --git chrome/browser/profiles/profile_impl.cc chrome/browser/profiles/profile_impl.cc -index bd0c693804407..c4a62b0dae176 100644 +index fca66c2bf16ec..a44efeea30d44 100644 --- chrome/browser/profiles/profile_impl.cc +++ chrome/browser/profiles/profile_impl.cc -@@ -1002,7 +1002,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, +@@ -1001,7 +1001,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, otr_profiles_[otr_profile_id] = std::move(otr_profile); @@ -100,10 +100,10 @@ index bd0c693804407..c4a62b0dae176 100644 return raw_otr_profile; } diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc -index 6ad6467c59f58..57f35c3c6150f 100644 +index 8072c84fc1e92..c62c8c0d3978c 100644 --- chrome/browser/profiles/profile_manager.cc +++ chrome/browser/profiles/profile_manager.cc -@@ -494,7 +494,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) +@@ -510,7 +510,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) base::Unretained(this))); #endif @@ -113,10 +113,10 @@ index 6ad6467c59f58..57f35c3c6150f 100644 zombie_metrics_timer_.Start(FROM_HERE, base::Minutes(30), this, diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h -index 18c384da45b1e..606d60152ebb8 100644 +index cc3c0dfb5be1b..89a35c2f914c4 100644 --- chrome/browser/profiles/profile_manager.h +++ chrome/browser/profiles/profile_manager.h -@@ -150,7 +150,7 @@ class ProfileManager : public Profile::Delegate { +@@ -151,7 +151,7 @@ class ProfileManager : public Profile::Delegate { // acceptable. Returns null if creation of the new profile fails. // TODO(bauerb): Migrate calls from other code to GetProfileByPath(), then // make this method private. @@ -125,7 +125,7 @@ index 18c384da45b1e..606d60152ebb8 100644 // Returns regular or off-the-record profile given its profile key. static Profile* GetProfileFromProfileKey(ProfileKey* profile_key); -@@ -182,7 +182,7 @@ class ProfileManager : public Profile::Delegate { +@@ -183,7 +183,7 @@ class ProfileManager : public Profile::Delegate { // Returns true if the profile pointer is known to point to an existing // profile. @@ -135,7 +135,7 @@ index 18c384da45b1e..606d60152ebb8 100644 // Returns the directory where the first created profile is stored, // relative to the user data directory currently in use. diff --git chrome/browser/profiles/renderer_updater.cc chrome/browser/profiles/renderer_updater.cc -index a2c7b9c45e334..18017a6181a1e 100644 +index 290b0e3e352ea..6fa4420236c13 100644 --- chrome/browser/profiles/renderer_updater.cc +++ chrome/browser/profiles/renderer_updater.cc @@ -8,6 +8,7 @@ @@ -146,16 +146,14 @@ index a2c7b9c45e334..18017a6181a1e 100644 #include "chrome/browser/content_settings/content_settings_manager_delegate.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/profiles/profile.h" -@@ -60,8 +61,12 @@ void GetGuestViewDefaultContentSettingRules( - } // namespace - - RendererUpdater::RendererUpdater(Profile* profile) : profile_(profile) { -+ if (cef::IsAlloyRuntimeEnabled()) { -+ identity_manager_ = nullptr; -+ } else { - identity_manager_ = IdentityManagerFactory::GetForProfile(profile); - identity_manager_observation_.Observe(identity_manager_.get()); +@@ -85,8 +86,10 @@ RendererUpdater::RendererUpdater(Profile* profile) + : profile_(profile), + is_off_the_record_(profile_->IsOffTheRecord()), + original_profile_(profile->GetOriginalProfile()) { ++ if (!cef::IsAlloyRuntimeEnabled()) { + identity_manager_observation_.Observe( + IdentityManagerFactory::GetForProfile(original_profile_)); + } + #if BUILDFLAG(IS_CHROMEOS_ASH) oauth2_login_manager_ = - ash::OAuth2LoginManagerFactory::GetForProfile(profile_); diff --git a/patch/patches/chrome_browser_safe_browsing.patch b/patch/patches/chrome_browser_safe_browsing.patch index f43851c75..6d050be16 100644 --- a/patch/patches/chrome_browser_safe_browsing.patch +++ b/patch/patches/chrome_browser_safe_browsing.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn -index 9a4e6cd87b872..18bb0f897fd76 100644 +index 9dcd2757e06d9..91c7a10daf62c 100644 --- chrome/browser/safe_browsing/BUILD.gn +++ chrome/browser/safe_browsing/BUILD.gn -@@ -26,6 +26,7 @@ static_library("safe_browsing") { +@@ -27,6 +27,7 @@ static_library("safe_browsing") { "//chrome/common:constants", "//components/browser_sync", "//components/enterprise/common:strings", diff --git a/patch/patches/chrome_browser_themes.patch b/patch/patches/chrome_browser_themes.patch index 9e5574871..8b83c187e 100644 --- a/patch/patches/chrome_browser_themes.patch +++ b/patch/patches/chrome_browser_themes.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/themes/theme_service.cc chrome/browser/themes/theme_service.cc -index 9de247b3f04df..e05535fd40788 100644 +index e921b7e8be8dc..414358c5191f1 100644 --- chrome/browser/themes/theme_service.cc +++ chrome/browser/themes/theme_service.cc -@@ -31,6 +31,7 @@ +@@ -32,6 +32,7 @@ #include "base/threading/thread_task_runner_handle.h" #include "base/trace_event/trace_event.h" #include "build/build_config.h" @@ -10,7 +10,7 @@ index 9de247b3f04df..e05535fd40788 100644 #include "chrome/browser/browser_features.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/theme_installed_infobar_delegate.h" -@@ -67,6 +68,10 @@ +@@ -68,6 +69,10 @@ #include "ui/color/color_id.h" #include "ui/color/color_provider.h" @@ -21,7 +21,7 @@ index 9de247b3f04df..e05535fd40788 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "base/scoped_observation.h" #include "extensions/browser/extension_registry_observer.h" -@@ -359,11 +364,19 @@ void ThemeService::Init() { +@@ -573,11 +578,19 @@ void ThemeService::Init() { // OnExtensionServiceReady. Otherwise, the ThemeObserver won't be // constructed in time to observe the corresponding events. #if BUILDFLAG(ENABLE_EXTENSIONS) diff --git a/patch/patches/chrome_plugins.patch b/patch/patches/chrome_plugins.patch index 0adf458c8..c993e6711 100644 --- a/patch/patches/chrome_plugins.patch +++ b/patch/patches/chrome_plugins.patch @@ -125,10 +125,10 @@ index 8b72897491669..546919dd70afc 100644 // that the X-Frame-Options protection mechanism is set to either DENY or // SAMEORIGIN. diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc -index 34d8a9b2ff94e..fe67d6b068bf6 100644 +index bbac287647477..3179dc62bf1d2 100644 --- chrome/renderer/chrome_content_renderer_client.cc +++ chrome/renderer/chrome_content_renderer_client.cc -@@ -926,6 +926,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -920,6 +920,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( if ((status == chrome::mojom::PluginStatus::kUnauthorized || status == chrome::mojom::PluginStatus::kBlocked) && @@ -136,7 +136,7 @@ index 34d8a9b2ff94e..fe67d6b068bf6 100644 content_settings_agent_delegate->IsPluginTemporarilyAllowed( identifier)) { status = chrome::mojom::PluginStatus::kAllowed; -@@ -1127,7 +1128,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1121,7 +1122,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( render_frame->GetRemoteAssociatedInterfaces()->GetInterface( plugin_auth_host.BindNewEndpointAndPassReceiver()); plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier); @@ -146,7 +146,7 @@ index 34d8a9b2ff94e..fe67d6b068bf6 100644 break; } case chrome::mojom::PluginStatus::kBlocked: { -@@ -1136,7 +1138,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1130,7 +1132,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); placeholder->AllowLoading(); RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked")); @@ -156,7 +156,7 @@ index 34d8a9b2ff94e..fe67d6b068bf6 100644 break; } case chrome::mojom::PluginStatus::kBlockedByPolicy: { -@@ -1146,7 +1149,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1140,7 +1143,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( group_name)); RenderThread::Get()->RecordAction( UserMetricsAction("Plugin_BlockedByPolicy")); @@ -166,7 +166,7 @@ index 34d8a9b2ff94e..fe67d6b068bf6 100644 break; } case chrome::mojom::PluginStatus::kBlockedNoLoading: { -@@ -1154,7 +1158,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1148,7 +1152,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( IDR_BLOCKED_PLUGIN_HTML, l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING, group_name)); diff --git a/patch/patches/chrome_renderer.patch b/patch/patches/chrome_renderer.patch index 8f0ab1672..f2f0b8292 100644 --- a/patch/patches/chrome_renderer.patch +++ b/patch/patches/chrome_renderer.patch @@ -1,5 +1,5 @@ diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn -index 176314411db58..9dc533e9ef13d 100644 +index 1528c9fd8ad56..82099ac89bf57 100644 --- chrome/renderer/BUILD.gn +++ chrome/renderer/BUILD.gn @@ -5,6 +5,7 @@ @@ -10,7 +10,7 @@ index 176314411db58..9dc533e9ef13d 100644 import("//chrome/common/features.gni") import("//components/nacl/features.gni") import("//components/offline_pages/buildflags/features.gni") -@@ -120,6 +121,7 @@ static_library("renderer") { +@@ -118,6 +119,7 @@ static_library("renderer") { deps = [ "//base/allocator:buildflags", "//build:chromeos_buildflags", @@ -18,7 +18,7 @@ index 176314411db58..9dc533e9ef13d 100644 "//chrome:resources", "//chrome:strings", "//chrome/common", -@@ -210,6 +212,10 @@ static_library("renderer") { +@@ -207,6 +209,10 @@ static_library("renderer") { configs += [ "//build/config/compiler:wexit_time_destructors" ] diff --git a/patch/patches/chrome_runtime.patch b/patch/patches/chrome_runtime.patch index 47df67072..da34112db 100644 --- a/patch/patches/chrome_runtime.patch +++ b/patch/patches/chrome_runtime.patch @@ -1,5 +1,5 @@ diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc -index 7c710c515361c..bb61507a3f5d1 100644 +index cc6167f7767ed..c5e33cba1c6d9 100644 --- chrome/app/chrome_main_delegate.cc +++ chrome/app/chrome_main_delegate.cc @@ -32,6 +32,7 @@ @@ -10,7 +10,7 @@ index 7c710c515361c..bb61507a3f5d1 100644 #include "chrome/browser/chrome_content_browser_client.h" #include "chrome/browser/chrome_resource_bundle_helper.h" #include "chrome/browser/defaults.h" -@@ -391,6 +392,8 @@ struct MainFunction { +@@ -387,6 +388,8 @@ struct MainFunction { // Initializes the user data dir. Must be called before InitializeLocalState(). void InitializeUserDataDir(base::CommandLine* command_line) { @@ -19,7 +19,7 @@ index 7c710c515361c..bb61507a3f5d1 100644 #if BUILDFLAG(IS_WIN) // Reach out to chrome_elf for the truth on the user data directory. // Note that in tests, this links to chrome_elf_test_stubs. -@@ -713,7 +716,9 @@ void ChromeMainDelegate::PostFieldTrialInitialization() { +@@ -709,7 +712,9 @@ void ChromeMainDelegate::PostFieldTrialInitialization() { } #if BUILDFLAG(IS_WIN) @@ -29,7 +29,7 @@ index 7c710c515361c..bb61507a3f5d1 100644 base::sequence_manager::internal::ThreadControllerPowerMonitor:: InitializeOnMainThread(); #endif -@@ -1024,6 +1029,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1022,6 +1027,7 @@ void ChromeMainDelegate::PreSandboxStartup() { std::string process_type = command_line.GetSwitchValueASCII(switches::kProcessType); @@ -37,7 +37,7 @@ index 7c710c515361c..bb61507a3f5d1 100644 crash_reporter::InitializeCrashKeys(); #if BUILDFLAG(IS_POSIX) -@@ -1034,6 +1040,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1032,6 +1038,7 @@ void ChromeMainDelegate::PreSandboxStartup() { InitMacCrashReporter(command_line, process_type); SetUpInstallerPreferences(command_line); #endif @@ -45,7 +45,7 @@ index 7c710c515361c..bb61507a3f5d1 100644 #if BUILDFLAG(IS_WIN) child_process_logging::Init(); -@@ -1161,6 +1168,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1159,6 +1166,7 @@ void ChromeMainDelegate::PreSandboxStartup() { locale; } @@ -53,7 +53,7 @@ index 7c710c515361c..bb61507a3f5d1 100644 #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) // Zygote needs to call InitCrashReporter() in RunZygote(). if (process_type != switches::kZygoteProcess) { -@@ -1193,6 +1201,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1191,6 +1199,7 @@ void ChromeMainDelegate::PreSandboxStartup() { // After all the platform Breakpads have been initialized, store the command // line for crash reporting. crash_keys::SetCrashKeysFromCommandLine(command_line); @@ -61,7 +61,7 @@ index 7c710c515361c..bb61507a3f5d1 100644 #if BUILDFLAG(ENABLE_PDF) MaybePatchGdiGetFontData(); -@@ -1284,6 +1293,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1276,6 +1285,7 @@ void ChromeMainDelegate::ZygoteForked() { SetUpProfilingShutdownHandler(); } @@ -69,7 +69,7 @@ index 7c710c515361c..bb61507a3f5d1 100644 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets // this up for the browser process in a different manner. const base::CommandLine* command_line = -@@ -1300,6 +1310,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1292,6 +1302,7 @@ void ChromeMainDelegate::ZygoteForked() { // Reset the command line for the newly spawned process. crash_keys::SetCrashKeysFromCommandLine(*command_line); @@ -78,7 +78,7 @@ index 7c710c515361c..bb61507a3f5d1 100644 #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc -index 3d59014db49e9..f96b79c02fd92 100644 +index 566535f74acf1..4b435553575b0 100644 --- chrome/browser/chrome_browser_main.cc +++ chrome/browser/chrome_browser_main.cc @@ -52,6 +52,7 @@ @@ -89,7 +89,7 @@ index 3d59014db49e9..f96b79c02fd92 100644 #include "chrome/browser/about_flags.h" #include "chrome/browser/active_use_util.h" #include "chrome/browser/after_startup_task_utils.h" -@@ -1579,11 +1580,13 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1578,11 +1579,13 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { browser_process_->local_state()); } @@ -103,7 +103,7 @@ index 3d59014db49e9..f96b79c02fd92 100644 #if BUILDFLAG(IS_ANDROID) page_info::SetPageInfoClient(new ChromePageInfoClient()); -@@ -1760,11 +1763,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1745,11 +1748,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { // This step is costly and is already measured in // Startup.StartupBrowserCreator_Start. // See the comment above for an explanation of |process_command_line|. @@ -119,7 +119,7 @@ index 3d59014db49e9..f96b79c02fd92 100644 // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) -@@ -1792,8 +1798,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1777,8 +1783,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { // Create the RunLoop for MainMessageLoopRun() to use and transfer // ownership of the browser's lifetime to the BrowserProcess. @@ -170,7 +170,7 @@ index 831d7173873d1..594aee58331a7 100644 +#endif } diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc -index d590b2d42f416..0e8067890c203 100644 +index 019fd68040dc5..794765646efc7 100644 --- chrome/browser/chrome_content_browser_client.cc +++ chrome/browser/chrome_content_browser_client.cc @@ -28,6 +28,7 @@ @@ -181,7 +181,7 @@ index d590b2d42f416..0e8067890c203 100644 #include "chrome/browser/accessibility/accessibility_labels_service.h" #include "chrome/browser/accessibility/accessibility_labels_service_factory.h" #include "chrome/browser/after_startup_task_utils.h" -@@ -1252,6 +1253,8 @@ bool IsTopChromeWebUIURL(const GURL& url) { +@@ -1272,6 +1273,8 @@ bool IsTopChromeWebUIURL(const GURL& url) { } // namespace ChromeContentBrowserClient::ChromeContentBrowserClient() { @@ -190,7 +190,7 @@ index d590b2d42f416..0e8067890c203 100644 #if BUILDFLAG(ENABLE_PLUGINS) extra_parts_.push_back(new ChromeContentBrowserClientPluginsPart); #endif -@@ -1277,6 +1280,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() { +@@ -1297,6 +1300,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() { extra_parts_.clear(); } @@ -202,7 +202,7 @@ index d590b2d42f416..0e8067890c203 100644 // static void ChromeContentBrowserClient::RegisterLocalStatePrefs( PrefRegistrySimple* registry) { -@@ -3705,9 +3713,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated( +@@ -3725,9 +3733,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated( &search::HandleNewTabURLReverseRewrite); #endif // BUILDFLAG(IS_ANDROID) @@ -214,7 +214,7 @@ index d590b2d42f416..0e8067890c203 100644 } base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { -@@ -5340,7 +5350,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated( +@@ -5354,7 +5364,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated( network_service); } @@ -223,7 +223,7 @@ index d590b2d42f416..0e8067890c203 100644 content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -5358,6 +5368,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams( +@@ -5372,6 +5382,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams( network_context_params->user_agent = GetUserAgentBasedOnPolicy(context); network_context_params->accept_language = GetApplicationLocale(); } @@ -232,7 +232,7 @@ index d590b2d42f416..0e8067890c203 100644 } std::vector -@@ -6202,10 +6214,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted( +@@ -6212,10 +6224,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted( const auto now = base::TimeTicks::Now(); const auto timeout = GetKeepaliveTimerTimeout(context); keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout); @@ -245,7 +245,7 @@ index d590b2d42f416..0e8067890c203 100644 FROM_HERE, keepalive_deadline_ - now, base::BindOnce( &ChromeContentBrowserClient::OnKeepaliveTimerFired, -@@ -6224,7 +6236,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() { +@@ -6234,7 +6246,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() { --num_keepalive_requests_; if (num_keepalive_requests_ == 0) { DVLOG(1) << "Stopping the keepalive timer"; @@ -255,7 +255,7 @@ index d590b2d42f416..0e8067890c203 100644 // This deletes the keep alive handle attached to the timer function and // unblock the shutdown sequence. } -@@ -6333,7 +6346,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired( +@@ -6342,7 +6355,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired( const auto now = base::TimeTicks::Now(); const auto then = keepalive_deadline_; if (now < then) { @@ -265,10 +265,10 @@ index d590b2d42f416..0e8067890c203 100644 base::BindOnce(&ChromeContentBrowserClient::OnKeepaliveTimerFired, weak_factory_.GetWeakPtr(), diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h -index f2a7fdf291652..d086be4c88f56 100644 +index 4aa99834bd6c7..cd932dd3cacf4 100644 --- chrome/browser/chrome_content_browser_client.h +++ chrome/browser/chrome_content_browser_client.h -@@ -121,6 +121,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -120,6 +120,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { ~ChromeContentBrowserClient() override; @@ -277,7 +277,7 @@ index f2a7fdf291652..d086be4c88f56 100644 // TODO(https://crbug.com/787567): This file is about calls from content/ out // to chrome/ to get values or notify about events, but both of these // functions are from chrome/ to chrome/ and don't involve content/ at all. -@@ -557,7 +559,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -561,7 +563,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { override; void OnNetworkServiceCreated( network::mojom::NetworkService* network_service) override; @@ -286,7 +286,7 @@ index f2a7fdf291652..d086be4c88f56 100644 content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -909,7 +911,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -913,7 +915,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { #if !BUILDFLAG(IS_ANDROID) uint64_t num_keepalive_requests_ = 0; @@ -296,7 +296,7 @@ index f2a7fdf291652..d086be4c88f56 100644 #endif diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc -index 94cf3615137ad..369983be86323 100644 +index a265ff6d1cf43..cebf6e611c84d 100644 --- chrome/browser/prefs/browser_prefs.cc +++ chrome/browser/prefs/browser_prefs.cc @@ -11,6 +11,7 @@ @@ -318,7 +318,7 @@ index 94cf3615137ad..369983be86323 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/browser/accessibility/animation_policy_prefs.h" #include "chrome/browser/apps/platform_apps/shortcut_manager.h" -@@ -1273,6 +1278,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -1264,6 +1269,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, SessionDataService::RegisterProfilePrefs(registry); #endif diff --git a/patch/patches/chrome_runtime_views.patch b/patch/patches/chrome_runtime_views.patch index 59361e670..f50e1cf03 100644 --- a/patch/patches/chrome_runtime_views.patch +++ b/patch/patches/chrome_runtime_views.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc -index cff1df2490bb6..864a03a2e29c9 100644 +index f9d291e52bc70..288d8ea2b3d72 100644 --- chrome/browser/ui/browser_command_controller.cc +++ chrome/browser/ui/browser_command_controller.cc -@@ -371,8 +371,10 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( +@@ -377,8 +377,10 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( // CommandUpdaterDelegate and CommandUpdater declare this function so we // choose to not implement CommandUpdaterDelegate inside this class and // therefore command_updater_ doesn't have the delegate set). @@ -14,7 +14,7 @@ index cff1df2490bb6..864a03a2e29c9 100644 // No commands are enabled if there is not yet any selected tab. // TODO(pkasting): It seems like we should not need this, because either -@@ -387,6 +389,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( +@@ -393,6 +395,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( DCHECK(command_updater_.IsCommandEnabled(id)) << "Invalid/disabled command " << id; @@ -28,7 +28,7 @@ index cff1df2490bb6..864a03a2e29c9 100644 // The order of commands in this switch statement must match the function // declaration order in browser.h! switch (id) { -@@ -985,11 +994,13 @@ void BrowserCommandController::TabRestoreServiceLoaded( +@@ -995,11 +1004,13 @@ void BrowserCommandController::TabRestoreServiceLoaded( // BrowserCommandController, private: bool BrowserCommandController::IsShowingMainUI() { @@ -45,7 +45,7 @@ index cff1df2490bb6..864a03a2e29c9 100644 bool BrowserCommandController::IsWebAppOrCustomTab() const { diff --git chrome/browser/ui/views/frame/browser_frame.cc chrome/browser/ui/views/frame/browser_frame.cc -index 6b644bf006532..4b5082a6a2dfe 100644 +index 42ce84a750319..a0e5ead15263b 100644 --- chrome/browser/ui/views/frame/browser_frame.cc +++ chrome/browser/ui/views/frame/browser_frame.cc @@ -74,15 +74,23 @@ bool IsUsingGtkTheme(Profile* profile) { @@ -120,14 +120,23 @@ index 6b644bf006532..4b5082a6a2dfe 100644 @@ -246,6 +270,8 @@ const ui::ThemeProvider* BrowserFrame::GetThemeProvider() const { - ui::ColorProviderManager::InitializerSupplier* BrowserFrame::GetCustomTheme() - const { + ui::ColorProviderManager::ThemeInitializerSupplier* + BrowserFrame::GetCustomTheme() const { + if (!browser_view_) + return nullptr; Browser* browser = browser_view_->browser(); // If this is an incognito profile, there should never be a custom theme. if (browser->profile()->IsIncognitoProfile()) -@@ -374,7 +400,8 @@ void BrowserFrame::SelectNativeTheme() { +@@ -352,6 +378,8 @@ void BrowserFrame::SetTabDragKind(TabDragKind tab_drag_kind) { + + ui::ColorProviderManager::Key BrowserFrame::GetColorProviderKey() const { + auto key = Widget::GetColorProviderKey(); ++ if (!browser_view_) ++ return key; + auto* app_controller = browser_view_->browser()->app_controller(); + key.app_controller = + app_controller ? app_controller->get_weak_ref() : nullptr; +@@ -382,7 +410,8 @@ void BrowserFrame::SelectNativeTheme() { // Select between regular, dark and GTK theme. ui::NativeTheme* native_theme = ui::NativeTheme::GetInstanceForNativeUi(); @@ -137,7 +146,7 @@ index 6b644bf006532..4b5082a6a2dfe 100644 // No matter if we are using the default theme or not we always use the dark // ui instance. SetNativeTheme(ui::NativeTheme::GetInstanceForDarkUI()); -@@ -387,7 +414,8 @@ void BrowserFrame::SelectNativeTheme() { +@@ -395,7 +424,8 @@ void BrowserFrame::SelectNativeTheme() { // display_override so the web contents can blend with the overlay by using // the developer-provided theme color for a better experience. Context: // https://crbug.com/1219073. @@ -148,7 +157,7 @@ index 6b644bf006532..4b5082a6a2dfe 100644 } #endif diff --git chrome/browser/ui/views/frame/browser_frame.h chrome/browser/ui/views/frame/browser_frame.h -index 67496d7ab6c50..fa97b9abe6253 100644 +index d42661a633fcd..85b03452d4dc3 100644 --- chrome/browser/ui/views/frame/browser_frame.h +++ chrome/browser/ui/views/frame/browser_frame.h @@ -53,7 +53,9 @@ enum class TabDragKind { @@ -162,10 +171,10 @@ index 67496d7ab6c50..fa97b9abe6253 100644 BrowserFrame(const BrowserFrame&) = delete; BrowserFrame& operator=(const BrowserFrame&) = delete; diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc -index 0f9a2e8b91715..355bdf6fa9074 100644 +index 39cef285ed27c..e08ec72ba9c85 100644 --- chrome/browser/ui/views/frame/browser_view.cc +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -297,11 +297,10 @@ using content::WebContents; +@@ -300,11 +300,10 @@ using content::WebContents; using views::ColumnSet; using web_modal::WebContentsModalDialogHost; @@ -201,10 +210,10 @@ index 0f9a2e8b91715..355bdf6fa9074 100644 + + immersive_mode_controller_ = chrome::CreateImmersiveModeController(); + - SetShowIcon(::ShouldShowWindowIcon(browser_.get())); + SetShowIcon( + ::ShouldShowWindowIcon(browser_.get(), AppUsesWindowControlsOverlay())); - // In forced app mode, all size controls are always disabled. Otherwise, use -@@ -727,7 +737,6 @@ BrowserView::BrowserView(std::unique_ptr browser) +@@ -728,7 +738,6 @@ BrowserView::BrowserView(std::unique_ptr browser) } browser_->tab_strip_model()->AddObserver(this); @@ -212,7 +221,7 @@ index 0f9a2e8b91715..355bdf6fa9074 100644 // Top container holds tab strip region and toolbar and lives at the front of // the view hierarchy. -@@ -770,8 +779,15 @@ BrowserView::BrowserView(std::unique_ptr browser) +@@ -771,8 +780,15 @@ BrowserView::BrowserView(std::unique_ptr browser) contents_container->SetLayoutManager(std::make_unique( devtools_web_view_, contents_web_view_)); @@ -230,7 +239,7 @@ index 0f9a2e8b91715..355bdf6fa9074 100644 contents_separator_ = top_container_->AddChildView(std::make_unique()); -@@ -1646,6 +1662,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const { +@@ -1644,6 +1660,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const { if (immersive_mode_controller_->IsEnabled()) return false; @@ -239,7 +248,7 @@ index 0f9a2e8b91715..355bdf6fa9074 100644 return frame_->GetFrameView()->ShouldHideTopUIForFullscreen(); } -@@ -2824,7 +2842,8 @@ BrowserView::GetNativeViewHostsForTopControlsSlide() const { +@@ -2814,7 +2832,8 @@ BrowserView::GetNativeViewHostsForTopControlsSlide() const { } void BrowserView::ReparentTopContainerForEndOfImmersive() { @@ -249,7 +258,7 @@ index 0f9a2e8b91715..355bdf6fa9074 100644 top_container()->DestroyLayer(); AddChildViewAt(top_container(), 0); EnsureFocusOrder(); -@@ -3313,8 +3332,10 @@ void BrowserView::Layout() { +@@ -3334,8 +3353,10 @@ void BrowserView::Layout() { // TODO(jamescook): Why was this in the middle of layout code? toolbar_->location_bar()->omnibox_view()->SetFocusBehavior( @@ -262,7 +271,7 @@ index 0f9a2e8b91715..355bdf6fa9074 100644 // Some of the situations when the BrowserView is laid out are: // - Enter/exit immersive fullscreen mode. -@@ -3380,6 +3401,11 @@ void BrowserView::AddedToWidget() { +@@ -3401,6 +3422,11 @@ void BrowserView::AddedToWidget() { SetThemeProfileForWindow(GetNativeWindow(), browser_->profile()); #endif @@ -274,7 +283,7 @@ index 0f9a2e8b91715..355bdf6fa9074 100644 toolbar_->Init(); // TODO(pbos): Manage this either inside SidePanel or the corresponding button -@@ -3432,13 +3458,9 @@ void BrowserView::AddedToWidget() { +@@ -3459,13 +3485,9 @@ void BrowserView::AddedToWidget() { EnsureFocusOrder(); @@ -290,7 +299,7 @@ index 0f9a2e8b91715..355bdf6fa9074 100644 using_native_frame_ = frame_->ShouldUseNativeFrame(); MaybeInitializeWebUITabStrip(); -@@ -3859,7 +3881,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, +@@ -3894,7 +3916,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, // Undo our anti-jankiness hacks and force a re-layout. in_process_fullscreen_ = false; ToolbarSizeChanged(false); @@ -300,7 +309,7 @@ index 0f9a2e8b91715..355bdf6fa9074 100644 } bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const { -@@ -4186,6 +4209,8 @@ Profile* BrowserView::GetProfile() { +@@ -4221,6 +4244,8 @@ Profile* BrowserView::GetProfile() { } void BrowserView::UpdateUIForTabFullscreen() { @@ -309,7 +318,7 @@ index 0f9a2e8b91715..355bdf6fa9074 100644 frame()->GetFrameView()->UpdateFullscreenTopUI(); } -@@ -4208,6 +4233,8 @@ void BrowserView::HideDownloadShelf() { +@@ -4243,6 +4268,8 @@ void BrowserView::HideDownloadShelf() { } bool BrowserView::CanUserExitFullscreen() const { @@ -319,7 +328,7 @@ index 0f9a2e8b91715..355bdf6fa9074 100644 } diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h -index a8abae057e699..c237aae395be8 100644 +index 69f92ec5228c4..b6100283f81d0 100644 --- chrome/browser/ui/views/frame/browser_view.h +++ chrome/browser/ui/views/frame/browser_view.h @@ -127,11 +127,16 @@ class BrowserView : public BrowserWindow, @@ -339,7 +348,7 @@ index a8abae057e699..c237aae395be8 100644 void set_frame(BrowserFrame* frame) { frame_ = frame; } BrowserFrame* frame() const { return frame_; } -@@ -723,6 +728,12 @@ class BrowserView : public BrowserWindow, +@@ -732,6 +737,12 @@ class BrowserView : public BrowserWindow, const std::map& extra_data) override; #endif @@ -353,10 +362,10 @@ index a8abae057e699..c237aae395be8 100644 // Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate // interface to keep these two classes decoupled and testable. diff --git chrome/browser/ui/views/frame/browser_view_layout.cc chrome/browser/ui/views/frame/browser_view_layout.cc -index 5f8af5f46bf46..54aba6eb904d6 100644 +index a6f15f3436bef..5e2ab8373458b 100644 --- chrome/browser/ui/views/frame/browser_view_layout.cc +++ chrome/browser/ui/views/frame/browser_view_layout.cc -@@ -40,6 +40,10 @@ +@@ -42,6 +42,10 @@ #include "ui/views/widget/widget.h" #include "ui/views/window/client_view.h" @@ -367,7 +376,7 @@ index 5f8af5f46bf46..54aba6eb904d6 100644 using views::View; using web_modal::WebContentsModalDialogHost; using web_modal::ModalDialogHostObserver; -@@ -458,6 +462,11 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) { +@@ -467,6 +471,11 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) { int BrowserViewLayout::LayoutToolbar(int top) { TRACE_EVENT0("ui", "BrowserViewLayout::LayoutToolbar"); @@ -380,10 +389,10 @@ index 5f8af5f46bf46..54aba6eb904d6 100644 bool toolbar_visible = delegate_->IsToolbarVisible(); int height = toolbar_visible ? toolbar_->GetPreferredSize().height() : 0; diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc -index 9a42c3bd2207b..4de0fb1b33bce 100644 +index 7475765f4b514..25c59d942782b 100644 --- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc +++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc -@@ -563,37 +563,53 @@ gfx::Range BrowserTabStripController::ListTabsInGroup( +@@ -551,33 +551,47 @@ gfx::Range BrowserTabStripController::ListTabsInGroup( } bool BrowserTabStripController::IsFrameCondensed() const { @@ -424,12 +433,6 @@ index 9a42c3bd2207b..4de0fb1b33bce 100644 return GetFrameView()->GetFrameColor(active_state); } - SkColor BrowserTabStripController::GetToolbarTopSeparatorColor() const { -+ if (!GetFrameView()) -+ return SK_ColorWHITE; - return GetFrameView()->GetToolbarTopSeparatorColor(); - } - absl::optional BrowserTabStripController::GetCustomBackgroundId( BrowserFrameActiveState active_state) const { + if (!GetFrameView()) @@ -438,10 +441,10 @@ index 9a42c3bd2207b..4de0fb1b33bce 100644 } diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc -index 5ea77d3196bc0..1be02aea8cec6 100644 +index ef42774da13f6..840b7aa893ca8 100644 --- chrome/browser/ui/views/toolbar/toolbar_view.cc +++ chrome/browser/ui/views/toolbar/toolbar_view.cc -@@ -169,12 +169,13 @@ auto& GetViewCommandMap() { +@@ -172,12 +172,13 @@ auto& GetViewCommandMap() { //////////////////////////////////////////////////////////////////////////////// // ToolbarView, public: @@ -457,7 +460,7 @@ index 5ea77d3196bc0..1be02aea8cec6 100644 SetID(VIEW_ID_TOOLBAR); UpgradeDetector::GetInstance()->AddObserver(this); -@@ -209,7 +210,7 @@ void ToolbarView::Init() { +@@ -212,7 +213,7 @@ void ToolbarView::Init() { #endif auto location_bar = std::make_unique( browser_, browser_->profile(), browser_->command_controller(), this, diff --git a/patch/patches/component_build.patch b/patch/patches/component_build.patch index 2bd3c1fa6..b10f31d7e 100644 --- a/patch/patches/component_build.patch +++ b/patch/patches/component_build.patch @@ -1,5 +1,5 @@ diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h -index 29416cec2eb48..ff152e4b04a0a 100644 +index e9ba4490665df..a42717a23f067 100644 --- content/browser/devtools/devtools_instrumentation.h +++ content/browser/devtools/devtools_instrumentation.h @@ -97,7 +97,7 @@ bool ApplyUserAgentMetadataOverrides( @@ -68,7 +68,7 @@ index 57072bf1263ae..0a93446e4d21c 100644 blink::mojom::V8CacheOptions GetV8CacheOptions(); diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn -index a789586193e94..234a687dd1c23 100644 +index 8fd0fb4ad9c26..bee26fdf9cf51 100644 --- third_party/blink/renderer/controller/BUILD.gn +++ third_party/blink/renderer/controller/BUILD.gn @@ -32,6 +32,7 @@ component("controller") { diff --git a/patch/patches/content_2015.patch b/patch/patches/content_2015.patch index 24e47afe7..5ba86c702 100644 --- a/patch/patches/content_2015.patch +++ b/patch/patches/content_2015.patch @@ -12,17 +12,20 @@ index fc87fd9a6ffca..99c6b27018e13 100644 GetContentClient()->browser()->GetUserAgent()); version.SetString("V8-Version", V8_VERSION_STRING); diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc -index b5c2dc992fb19..868661c86c39a 100644 +index 3f06e6b8cd335..257d3f20f92d7 100644 --- content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc -@@ -665,6 +665,14 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest( +@@ -672,6 +672,17 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest( resource_request_->has_user_gesture, initiating_origin, initiator_document_.AsRenderFrameHostIfValid(), &loader_factory); + if (!handled) { + handled = GetContentClient()->browser()->HandleExternalProtocol( + web_contents_getter_, frame_tree_node_id_, -+ navigation_ui_data_.get(), request_info_->sandbox_flags, ++ navigation_ui_data_.get(), request_info_->is_primary_main_frame, ++ FrameTreeNode::GloballyFindByID(frame_tree_node_id_) ++ ->IsInFencedFrameTree(), ++ request_info_->sandbox_flags, + *resource_request_, initiating_origin, + initiator_document_.AsRenderFrameHostIfValid(), &loader_factory); + } @@ -31,19 +34,19 @@ index b5c2dc992fb19..868661c86c39a 100644 factory = base::MakeRefCounted( std::move(loader_factory)); diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc -index 0e2c7f92937f1..31bb164e25bf6 100644 +index 2ba5cc555c691..a092c6ba09112 100644 --- content/public/browser/content_browser_client.cc +++ content/public/browser/content_browser_client.cc @@ -11,7 +11,7 @@ // declarations instead of including more headers. If that is infeasible, adjust // the limit. For more info, see // https://chromium.googlesource.com/chromium/src/+/HEAD/docs/wmax_tokens.md --#pragma clang max_tokens_here 850000 -+// #pragma clang max_tokens_here 850000 +-#pragma clang max_tokens_here 880000 ++// #pragma clang max_tokens_here 880000 #include -@@ -883,7 +883,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload( +@@ -892,7 +892,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload( void ContentBrowserClient::OnNetworkServiceCreated( network::mojom::NetworkService* network_service) {} @@ -52,7 +55,7 @@ index 0e2c7f92937f1..31bb164e25bf6 100644 BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -892,6 +892,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams( +@@ -901,6 +901,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams( cert_verifier_creation_params) { network_context_params->user_agent = GetUserAgentBasedOnPolicy(context); network_context_params->accept_language = "en-us,en"; @@ -61,7 +64,7 @@ index 0e2c7f92937f1..31bb164e25bf6 100644 std::vector diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h -index aa125be3640fe..bf5dec73a5287 100644 +index 5c757ff4b622d..1286b9c26f427 100644 --- content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h @@ -34,6 +34,7 @@ @@ -72,7 +75,7 @@ index aa125be3640fe..bf5dec73a5287 100644 #include "content/public/browser/web_ui_browser_interface_broker_registry.h" #include "content/public/common/alternative_error_page_override_info.mojom.h" #include "content/public/common/main_function_params.h" -@@ -1658,7 +1659,7 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1668,7 +1669,7 @@ class CONTENT_EXPORT ContentBrowserClient { // // If |relative_partition_path| is the empty string, it means this needs to // create the default NetworkContext for the BrowserContext. @@ -81,7 +84,7 @@ index aa125be3640fe..bf5dec73a5287 100644 BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -1859,6 +1860,17 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1875,6 +1876,19 @@ class CONTENT_EXPORT ContentBrowserClient { RenderFrameHost* initiator_document, mojo::PendingRemote* out_factory); @@ -90,6 +93,8 @@ index aa125be3640fe..bf5dec73a5287 100644 + WebContents::Getter web_contents_getter, + int frame_tree_node_id, + NavigationUIData* navigation_data, ++ bool is_primary_main_frame, ++ bool is_in_fenced_frame_tree, + network::mojom::WebSandboxFlags sandbox_flags, + const network::ResourceRequest& request, + const absl::optional& initiating_origin, @@ -99,7 +104,7 @@ index aa125be3640fe..bf5dec73a5287 100644 // Creates an OverlayWindow to be used for video or document // Picture-in-Picture respectively. This window will house the content shown // when in Picture-in-Picture mode. This will return a new OverlayWindow. -@@ -1920,6 +1932,10 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1936,6 +1950,10 @@ class CONTENT_EXPORT ContentBrowserClient { // Used as part of the user agent string. virtual std::string GetProduct(); @@ -111,7 +116,7 @@ index aa125be3640fe..bf5dec73a5287 100644 // on blink::features::kUserAgentReduction. Content may cache this value. virtual std::string GetUserAgent(); diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h -index 63ead7f8ab838..11f606368d9e8 100644 +index eb8968c2a8610..143c3aaeda88e 100644 --- content/public/renderer/content_renderer_client.h +++ content/public/renderer/content_renderer_client.h @@ -88,6 +88,9 @@ class CONTENT_EXPORT ContentRendererClient { @@ -124,7 +129,7 @@ index 63ead7f8ab838..11f606368d9e8 100644 // Notifies that a new RenderFrame has been created. virtual void RenderFrameCreated(RenderFrame* render_frame) {} -@@ -303,6 +306,10 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -298,6 +301,10 @@ class CONTENT_EXPORT ContentRendererClient { // This method may invalidate the frame. virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {} @@ -136,10 +141,10 @@ index 63ead7f8ab838..11f606368d9e8 100644 // started. virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {} diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc -index 0b42cba866722..d2f0841bd9069 100644 +index 707a469b90696..095e396218812 100644 --- content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc -@@ -656,6 +656,8 @@ void RenderThreadImpl::Init() { +@@ -658,6 +658,8 @@ void RenderThreadImpl::Init() { GetContentClient()->renderer()->CreateURLLoaderThrottleProvider( blink::URLLoaderThrottleProviderType::kFrame); @@ -149,10 +154,10 @@ index 0b42cba866722..d2f0841bd9069 100644 &RenderThreadImpl::OnRendererInterfaceReceiver, base::Unretained(this))); diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc -index a64d78c9d8112..0551db7f7d4cc 100644 +index 3d551f3d74e22..b2495b1d26391 100644 --- content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc -@@ -1090,6 +1090,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() { +@@ -1113,6 +1113,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() { //------------------------------------------------------------------------------ @@ -169,10 +174,10 @@ index a64d78c9d8112..0551db7f7d4cc 100644 RendererBlinkPlatformImpl::GetCodeCacheHost() { base::AutoLock lock(code_cache_host_lock_); diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h -index 10c96d3915e64..060087d2436ea 100644 +index 7255ac218c8fd..858a6d83e315e 100644 --- content/renderer/renderer_blink_platform_impl.h +++ content/renderer/renderer_blink_platform_impl.h -@@ -261,6 +261,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -262,6 +262,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { blink::WebVector* csp) override; base::PlatformThreadId GetIOThreadId() const override; diff --git a/patch/patches/content_main_654986.patch b/patch/patches/content_main_654986.patch index b53f882cb..f296c4267 100644 --- a/patch/patches/content_main_654986.patch +++ b/patch/patches/content_main_654986.patch @@ -1,8 +1,8 @@ diff --git content/app/content_main.cc content/app/content_main.cc -index 332b7d026e036..0d63ad05fde4e 100644 +index bb2d3e9911958..7af313040906e 100644 --- content/app/content_main.cc +++ content/app/content_main.cc -@@ -226,16 +226,10 @@ ContentMainParams::~ContentMainParams() = default; +@@ -227,11 +227,8 @@ ContentMainParams::~ContentMainParams() = default; ContentMainParams::ContentMainParams(ContentMainParams&&) = default; ContentMainParams& ContentMainParams::operator=(ContentMainParams&&) = default; @@ -13,6 +13,11 @@ index 332b7d026e036..0d63ad05fde4e 100644 - ContentMainRunner* content_main_runner) { +int ContentMainInitialize(ContentMainParams params, + ContentMainRunner* content_main_runner) { + #if BUILDFLAG(IS_CHROMEOS_LACROS) + // Lacros is launched with inherited priority. Revert to normal priority + // before spawning more processes. +@@ -239,9 +236,6 @@ RunContentProcess(ContentMainParams params, + #endif int exit_code = -1; base::debug::GlobalActivityTracker* tracker = nullptr; -#if BUILDFLAG(IS_MAC) @@ -21,7 +26,7 @@ index 332b7d026e036..0d63ad05fde4e 100644 // A flag to indicate whether Main() has been called before. On Android, we // may re-run Main() without restarting the browser process. This flag -@@ -320,12 +314,6 @@ RunContentProcess(ContentMainParams params, +@@ -326,12 +320,6 @@ RunContentProcess(ContentMainParams params, #endif #if BUILDFLAG(IS_MAC) @@ -34,7 +39,7 @@ index 332b7d026e036..0d63ad05fde4e 100644 InitializeMac(); #endif -@@ -398,8 +386,18 @@ RunContentProcess(ContentMainParams params, +@@ -404,8 +392,18 @@ RunContentProcess(ContentMainParams params, if (IsSubprocess()) CommonSubprocessInit(); @@ -54,7 +59,7 @@ index 332b7d026e036..0d63ad05fde4e 100644 if (tracker) { if (exit_code == 0) { tracker->SetProcessPhaseIfEnabled( -@@ -411,14 +409,41 @@ RunContentProcess(ContentMainParams params, +@@ -417,14 +415,41 @@ RunContentProcess(ContentMainParams params, } } @@ -100,7 +105,7 @@ index 332b7d026e036..0d63ad05fde4e 100644 } diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc -index 9d22238878e32..dd231b0d55422 100644 +index abb29771ee9b8..998747bb905cc 100644 --- content/app/content_main_runner_impl.cc +++ content/app/content_main_runner_impl.cc @@ -44,6 +44,7 @@ diff --git a/patch/patches/crashpad_1995.patch b/patch/patches/crashpad_1995.patch index 5a11400ac..3fa43d86f 100644 --- a/patch/patches/crashpad_1995.patch +++ b/patch/patches/crashpad_1995.patch @@ -81,7 +81,7 @@ index 886372e114899..ad3bc2242883b 100644 g_crash_helper_enabled = true; return true; diff --git chrome/common/crash_keys.cc chrome/common/crash_keys.cc -index f6850e85411ab..4f5500d8fa1ea 100644 +index 3a954d5ce176c..7054e98ddf539 100644 --- chrome/common/crash_keys.cc +++ chrome/common/crash_keys.cc @@ -4,6 +4,8 @@ @@ -92,8 +92,8 @@ index f6850e85411ab..4f5500d8fa1ea 100644 + #include "base/base_switches.h" #include "base/command_line.h" - #include "base/cxx17_backports.h" -@@ -46,8 +48,10 @@ void HandleEnableDisableFeatures(const base::CommandLine& command_line) { + #include "base/strings/string_number_conversions.h" +@@ -45,8 +47,10 @@ void HandleEnableDisableFeatures(const base::CommandLine& command_line) { } #endif @@ -105,7 +105,7 @@ index f6850e85411ab..4f5500d8fa1ea 100644 static const char* const kIgnoreSwitches[] = { switches::kEnableLogging, switches::kFlagSwitchesBegin, -@@ -107,13 +111,11 @@ bool IsBoringSwitch(const std::string& flag) { +@@ -106,13 +110,11 @@ bool IsBoringSwitch(const std::string& flag) { return false; } @@ -278,7 +278,7 @@ index 6da6be46cee4a..5e3067c081867 100644 ->set_system_crash_reporter_forwarding(crashpad::TriState::kDisabled); } diff --git components/crash/core/app/crashpad_linux.cc components/crash/core/app/crashpad_linux.cc -index dc2b18b322350..be84c0d0d1d7a 100644 +index 32e2038e15ada..bf72a94fcc167 100644 --- components/crash/core/app/crashpad_linux.cc +++ components/crash/core/app/crashpad_linux.cc @@ -23,6 +23,7 @@ @@ -289,7 +289,7 @@ index dc2b18b322350..be84c0d0d1d7a 100644 #include "sandbox/linux/services/namespace_sandbox.h" #include "third_party/crashpad/crashpad/client/crashpad_client.h" #include "third_party/crashpad/crashpad/client/crashpad_info.h" -@@ -117,11 +118,10 @@ bool PlatformCrashpadInitialization( +@@ -107,11 +108,10 @@ bool PlatformCrashpadInitialization( crash_reporter_client->GetCrashDumpLocation(database_path); crash_reporter_client->GetCrashMetricsLocation(&metrics_path); @@ -304,7 +304,7 @@ index dc2b18b322350..be84c0d0d1d7a 100644 // When --use-cros-crash-reporter is set (below), the handler passes dumps // to ChromeOS's /sbin/crash_reporter which in turn passes the dump to -@@ -138,8 +138,8 @@ bool PlatformCrashpadInitialization( +@@ -128,8 +128,8 @@ bool PlatformCrashpadInitialization( &product_version, &channel); std::map annotations; @@ -315,7 +315,7 @@ index dc2b18b322350..be84c0d0d1d7a 100644 #if BUILDFLAG(GOOGLE_CHROME_BRANDING) // Empty means stable. -@@ -156,7 +156,20 @@ bool PlatformCrashpadInitialization( +@@ -146,7 +146,20 @@ bool PlatformCrashpadInitialization( annotations["channel"] = channel; } @@ -337,7 +337,7 @@ index dc2b18b322350..be84c0d0d1d7a 100644 #if BUILDFLAG(IS_CHROMEOS_LACROS) // "build_time_millis" is used on LaCros chrome to determine when to stop -@@ -201,6 +214,12 @@ bool PlatformCrashpadInitialization( +@@ -191,6 +204,12 @@ bool PlatformCrashpadInitialization( } #endif @@ -454,10 +454,10 @@ index dc041c43371fd..1d060ae55c586 100644 handler_path, *database_path, metrics_path, url, GetProcessSimpleAnnotations(), arguments, true, false); diff --git components/crash/core/app/crashpad_win.cc components/crash/core/app/crashpad_win.cc -index 1a8f42cb4e2ea..fbdeab5d54584 100644 +index d2354b84f3a18..f0d5b76a7e61a 100644 --- components/crash/core/app/crashpad_win.cc +++ components/crash/core/app/crashpad_win.cc -@@ -36,8 +36,8 @@ void GetPlatformCrashpadAnnotations( +@@ -35,8 +35,8 @@ void GetPlatformCrashpadAnnotations( std::wstring product_name, version, special_build, channel_name; crash_reporter_client->GetProductNameAndVersion( exe_file, &product_name, &version, &special_build, &channel_name); @@ -468,7 +468,7 @@ index 1a8f42cb4e2ea..fbdeab5d54584 100644 #if BUILDFLAG(GOOGLE_CHROME_BRANDING) // Empty means stable. const bool allow_empty_channel = true; -@@ -54,9 +54,11 @@ void GetPlatformCrashpadAnnotations( +@@ -53,9 +53,11 @@ void GetPlatformCrashpadAnnotations( if (!special_build.empty()) (*annotations)["special"] = base::WideToUTF8(special_build); #if defined(ARCH_CPU_X86) @@ -482,7 +482,7 @@ index 1a8f42cb4e2ea..fbdeab5d54584 100644 #endif } -@@ -71,7 +73,9 @@ bool PlatformCrashpadInitialization( +@@ -70,7 +72,9 @@ bool PlatformCrashpadInitialization( base::FilePath metrics_path; // Only valid in the browser process. const char kPipeNameVar[] = "CHROME_CRASHPAD_PIPE_NAME"; @@ -492,7 +492,7 @@ index 1a8f42cb4e2ea..fbdeab5d54584 100644 std::unique_ptr env(base::Environment::Create()); CrashReporterClient* crash_reporter_client = GetCrashReporterClient(); -@@ -92,9 +96,11 @@ bool PlatformCrashpadInitialization( +@@ -91,9 +95,11 @@ bool PlatformCrashpadInitialization( std::string url = crash_reporter_client->GetUploadUrl(); @@ -504,7 +504,7 @@ index 1a8f42cb4e2ea..fbdeab5d54584 100644 base::FilePath exe_file(exe_path); if (exe_file.empty()) { -@@ -105,13 +111,14 @@ bool PlatformCrashpadInitialization( +@@ -104,13 +110,14 @@ bool PlatformCrashpadInitialization( exe_file = base::FilePath(exe_file_path); } @@ -524,7 +524,7 @@ index 1a8f42cb4e2ea..fbdeab5d54584 100644 if (!user_data_dir.empty()) { start_arguments.push_back(std::string("--user-data-dir=") + user_data_dir); -@@ -122,9 +129,12 @@ bool PlatformCrashpadInitialization( +@@ -121,9 +128,12 @@ bool PlatformCrashpadInitialization( start_arguments.push_back("/prefetch:7"); } else { base::FilePath exe_dir = exe_file.DirName(); diff --git a/patch/patches/crashpad_tp_1995.patch b/patch/patches/crashpad_tp_1995.patch index 171d2f116..f096eb7fa 100644 --- a/patch/patches/crashpad_tp_1995.patch +++ b/patch/patches/crashpad_tp_1995.patch @@ -184,10 +184,10 @@ index 0fe4760db7fe2..042af7247712c 100644 if (crashpad_is_win) { diff --git third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc -index c691361494b16..c2a2a9059c5ca 100644 +index efbeab7804c44..44fd31e58175c 100644 --- third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc +++ third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc -@@ -261,6 +261,8 @@ CrashReportUploadThread::UploadResult CrashReportUploadThread::UploadReport( +@@ -269,6 +269,8 @@ CrashReportUploadThread::UploadResult CrashReportUploadThread::UploadReport( if (minidump_process_snapshot.Initialize(reader)) { parameters = BreakpadHTTPFormParametersFromMinidump(&minidump_process_snapshot); diff --git a/patch/patches/embedder_product_override.patch b/patch/patches/embedder_product_override.patch index f9a820a16..0d10fde80 100644 --- a/patch/patches/embedder_product_override.patch +++ b/patch/patches/embedder_product_override.patch @@ -1,5 +1,5 @@ diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc -index 958a61892a19d..e137ebe5a4146 100644 +index ca9de380c4a07..b893e1a0590fd 100644 --- components/embedder_support/user_agent_utils.cc +++ components/embedder_support/user_agent_utils.cc @@ -15,6 +15,7 @@ @@ -10,16 +10,16 @@ index 958a61892a19d..e137ebe5a4146 100644 #include "components/embedder_support/pref_names.h" #include "components/embedder_support/switches.h" #include "components/policy/core/common/policy_pref_names.h" -@@ -318,6 +319,12 @@ std::string GetMajorVersionForUserAgentString( +@@ -329,6 +330,12 @@ std::string GetMajorVersionForUserAgentString( - std::string GetProduct(const bool allow_version_override, - ForceMajorVersionToMinorPosition force_major_to_minor) { + std::string GetProductAndVersion( + ForceMajorVersionToMinorPosition force_major_to_minor) { + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); + if (command_line->HasSwitch(switches::kUserAgentProductAndVersion)) { + return command_line->GetSwitchValueASCII( + switches::kUserAgentProductAndVersion); + } + - // Force major version to 99 and minor version to major position. - if (allow_version_override && - ShouldForceMajorVersionToMinorPosition(force_major_to_minor)) + if (ShouldForceMajorVersionToMinorPosition(force_major_to_minor)) { + // Force major version to 99 and major version to minor version position. + if (base::FeatureList::IsEnabled( diff --git a/patch/patches/extensions_1947.patch b/patch/patches/extensions_1947.patch index 1df79fb8b..e44e8be44 100644 --- a/patch/patches/extensions_1947.patch +++ b/patch/patches/extensions_1947.patch @@ -161,18 +161,18 @@ index dd22bbc07fb52..c695ece6b1a47 100644 // A pointer to the current or speculative main frame in `host_contents_`. We // can't access this frame through the `host_contents_` directly as it does diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h -index 1fa1e67dddcfd..7af2a0e231824 100644 +index c3e25378bbaf8..0959392a4cb29 100644 --- extensions/browser/extensions_browser_client.h +++ extensions/browser/extensions_browser_client.h -@@ -27,6 +27,7 @@ - #include "ui/base/page_transition_types.h" +@@ -28,6 +28,7 @@ + #include "url/gurl.h" class ExtensionFunctionRegistry; +class GURL; class PrefService; namespace base { -@@ -66,6 +67,7 @@ class ComponentExtensionResourceManager; +@@ -67,6 +68,7 @@ class ComponentExtensionResourceManager; class Extension; class ExtensionCache; class ExtensionError; @@ -180,7 +180,7 @@ index 1fa1e67dddcfd..7af2a0e231824 100644 class ExtensionHostDelegate; class ExtensionSet; class ExtensionSystem; -@@ -207,6 +209,14 @@ class ExtensionsBrowserClient { +@@ -208,6 +210,14 @@ class ExtensionsBrowserClient { virtual std::unique_ptr CreateExtensionHostDelegate() = 0; diff --git a/patch/patches/gn_config.patch b/patch/patches/gn_config.patch index c383bc515..b4dec627c 100644 --- a/patch/patches/gn_config.patch +++ b/patch/patches/gn_config.patch @@ -1,8 +1,8 @@ diff --git .gn .gn -index 1810cebef9aa4..06618025b84b0 100644 +index 5356717746edd..6345b837a6ea6 100644 --- .gn +++ .gn -@@ -154,6 +154,8 @@ exec_script_whitelist = +@@ -151,6 +151,8 @@ exec_script_whitelist = "//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn", @@ -12,7 +12,7 @@ index 1810cebef9aa4..06618025b84b0 100644 # https://crbug.com/474506. "//clank/java/BUILD.gn", diff --git BUILD.gn BUILD.gn -index fae950dfa67de..5c4f17deed94c 100644 +index f686fc6368936..37848e164aeb0 100644 --- BUILD.gn +++ BUILD.gn @@ -17,6 +17,7 @@ import("//build/config/sanitizers/sanitizers.gni") @@ -23,7 +23,7 @@ index fae950dfa67de..5c4f17deed94c 100644 import("//chrome/browser/buildflags.gni") import("//chrome/browser/media/router/features.gni") import("//components/nacl/features.gni") -@@ -269,6 +270,9 @@ group("gn_all") { +@@ -252,6 +253,9 @@ group("gn_all") { deps += [ "//chrome/test:telemetry_perf_unittests${_target_suffix}" ] } } @@ -79,7 +79,7 @@ index f8f71ef369c08..7a2ed5da7bda3 100644 +_OBJC_METACLASS_$_UnderlayOpenGLHostingWindow + diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni -index cd468f580cb63..66a06d303580d 100644 +index 10acea1dbb8db..ff419de6494ce 100644 --- chrome/chrome_paks.gni +++ chrome/chrome_paks.gni @@ -5,6 +5,7 @@ @@ -102,7 +102,7 @@ index cd468f580cb63..66a06d303580d 100644 sources += [ "$root_gen_dir/extensions/extensions_browser_resources_${percent}_percent.pak" ] deps += [ "//extensions:extensions_browser_resources" ] diff --git chrome/chrome_repack_locales.gni chrome/chrome_repack_locales.gni -index d969da6550bcb..97a5d2b843af5 100644 +index 936a5422f92fa..5743f4a03aa4f 100644 --- chrome/chrome_repack_locales.gni +++ chrome/chrome_repack_locales.gni @@ -6,6 +6,7 @@ import("//build/config/chrome_build.gni") @@ -113,7 +113,7 @@ index d969da6550bcb..97a5d2b843af5 100644 import("//extensions/buildflags/buildflags.gni") import("//tools/grit/repack.gni") -@@ -90,6 +91,10 @@ template("chrome_repack_locales") { +@@ -93,6 +94,10 @@ template("chrome_repack_locales") { [ "${root_gen_dir}/chromeos/strings/chromeos_strings_" ] deps += [ "//chromeos/strings" ] } diff --git a/patch/patches/gritsettings.patch b/patch/patches/gritsettings.patch index 863bf40d1..a5dc47928 100644 --- a/patch/patches/gritsettings.patch +++ b/patch/patches/gritsettings.patch @@ -1,8 +1,8 @@ diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec -index 77f77f2deb13f..09939369a62d0 100644 +index 22896db086972..014ac14f680c0 100644 --- tools/gritsettings/resource_ids.spec +++ tools/gritsettings/resource_ids.spec -@@ -955,6 +955,15 @@ +@@ -958,6 +958,15 @@ # END "everything else" section. # Everything but chrome/, components/, content/, and ios/ diff --git a/patch/patches/libxml_visibility.patch b/patch/patches/libxml_visibility.patch index de2fbfae3..be9e12756 100644 --- a/patch/patches/libxml_visibility.patch +++ b/patch/patches/libxml_visibility.patch @@ -1,8 +1,8 @@ diff --git third_party/libxml/BUILD.gn third_party/libxml/BUILD.gn -index b8752f6295ab6..641c507e96bfd 100644 +index 9f6403fa49078..1422961ed0c75 100644 --- third_party/libxml/BUILD.gn +++ third_party/libxml/BUILD.gn -@@ -137,6 +137,7 @@ static_library("libxml") { +@@ -138,6 +138,7 @@ static_library("libxml") { ":libxml_utils", ":xml_reader", ":xml_writer", diff --git a/patch/patches/linux_assets_path_1936.patch b/patch/patches/linux_assets_path_1936.patch index f726a698c..9176b4a46 100644 --- a/patch/patches/linux_assets_path_1936.patch +++ b/patch/patches/linux_assets_path_1936.patch @@ -12,10 +12,10 @@ index f60ad777ab769..5c585569da117 100644 base::File file(exe_dir.Append(path), base::File::FLAG_OPEN | base::File::FLAG_READ); diff --git sandbox/linux/suid/client/setuid_sandbox_host.cc sandbox/linux/suid/client/setuid_sandbox_host.cc -index 7022a65e03578..c9aaf5d76e4a1 100644 +index e79a6e0b31091..9626ec1b9a922 100644 --- sandbox/linux/suid/client/setuid_sandbox_host.cc +++ sandbox/linux/suid/client/setuid_sandbox_host.cc -@@ -120,7 +120,7 @@ bool SetuidSandboxHost::IsDisabledViaEnvironment() { +@@ -119,7 +119,7 @@ bool SetuidSandboxHost::IsDisabledViaEnvironment() { base::FilePath SetuidSandboxHost::GetSandboxBinaryPath() { base::FilePath sandbox_binary; base::FilePath exe_dir; diff --git a/patch/patches/linux_ui_ozone.patch b/patch/patches/linux_ui_ozone.patch index 26c99fb61..91bf78340 100644 --- a/patch/patches/linux_ui_ozone.patch +++ b/patch/patches/linux_ui_ozone.patch @@ -1,8 +1,8 @@ diff --git ui/ozone/BUILD.gn ui/ozone/BUILD.gn -index d85d01f06f021..1e77d60e2592e 100644 +index 3d21581e2d7f9..cd07bcb130de2 100644 --- ui/ozone/BUILD.gn +++ ui/ozone/BUILD.gn -@@ -381,6 +381,8 @@ action("generate_test_support_constructor_list") { +@@ -394,6 +394,8 @@ action("generate_test_support_constructor_list") { ] deps = [ ":generate_ozone_platform_list" ] diff --git a/patch/patches/mac_gpu.patch b/patch/patches/mac_gpu.patch index dedd4d1b6..cb3920413 100644 --- a/patch/patches/mac_gpu.patch +++ b/patch/patches/mac_gpu.patch @@ -1,5 +1,5 @@ diff --git ui/gl/init/gl_initializer_mac.cc ui/gl/init/gl_initializer_mac.cc -index 98f3c5a43da3b..55bef97cfc336 100644 +index 4c78f4c18ee15..e573f78e4e475 100644 --- ui/gl/init/gl_initializer_mac.cc +++ ui/gl/init/gl_initializer_mac.cc @@ -46,11 +46,8 @@ bool InitializeOneOffForSandbox() { diff --git a/patch/patches/message_loop.patch b/patch/patches/message_loop.patch index fd6a61aaf..b46127d17 100644 --- a/patch/patches/message_loop.patch +++ b/patch/patches/message_loop.patch @@ -1,5 +1,5 @@ diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc -index 1bfea3ac4470c..75a3695c2cfd5 100644 +index d746e7aebfa9f..538b398b049cb 100644 --- base/message_loop/message_pump_win.cc +++ base/message_loop/message_pump_win.cc @@ -2,6 +2,7 @@ @@ -10,7 +10,7 @@ index 1bfea3ac4470c..75a3695c2cfd5 100644 #include "base/message_loop/message_pump_win.h" #include -@@ -497,7 +498,17 @@ bool MessagePumpForUI::ProcessNextWindowsMessage() { +@@ -491,7 +492,17 @@ bool MessagePumpForUI::ProcessNextWindowsMessage() { ctx.event()->set_chrome_message_pump(); msg_pump_data->set_sent_messages_in_queue(more_work_is_plausible); }); diff --git a/patch/patches/message_pump_mac_2495.patch b/patch/patches/message_pump_mac_2495.patch index 8dc768486..9624e0bb2 100644 --- a/patch/patches/message_pump_mac_2495.patch +++ b/patch/patches/message_pump_mac_2495.patch @@ -1,8 +1,8 @@ diff --git base/message_loop/message_pump_mac.mm base/message_loop/message_pump_mac.mm -index 36836673e97e5..96414c7bf97ee 100644 +index 234c7dbffb1f3..5bd908eb1f7a3 100644 --- base/message_loop/message_pump_mac.mm +++ base/message_loop/message_pump_mac.mm -@@ -696,7 +696,8 @@ void MessagePumpUIApplication::Detach() { +@@ -697,7 +697,8 @@ void MessagePumpUIApplication::Detach() { #else ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() { @@ -12,7 +12,7 @@ index 36836673e97e5..96414c7bf97ee 100644 DCHECK_EQ(kNSApplicationModalSafeModeMask, g_app_pump->GetModeMask()); // Pumping events in private runloop modes is known to interact badly with // app modal windows like NSAlert. -@@ -706,7 +707,8 @@ ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() { +@@ -707,7 +708,8 @@ ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() { } ScopedPumpMessagesInPrivateModes::~ScopedPumpMessagesInPrivateModes() { diff --git a/patch/patches/mime_handler_view_guest_1565_2727.patch b/patch/patches/mime_handler_view_guest_1565_2727.patch index 29f8ab38a..bd62715ec 100644 --- a/patch/patches/mime_handler_view_guest_1565_2727.patch +++ b/patch/patches/mime_handler_view_guest_1565_2727.patch @@ -12,10 +12,10 @@ index 2c29b5c5c96b9..9ba3aaa327478 100644 virtual ~WebContentsView() = default; diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc -index 0b01120f6a605..d957af9b94e94 100644 +index 56b6d5d28fe21..42d417f80b19c 100644 --- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc +++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc -@@ -210,6 +210,8 @@ void MimeHandlerViewGuest::CreateWebContents( +@@ -224,6 +224,8 @@ void MimeHandlerViewGuest::CreateWebContents( WebContents::CreateParams params(browser_context(), guest_site_instance.get()); params.guest_delegate = this; @@ -24,7 +24,7 @@ index 0b01120f6a605..d957af9b94e94 100644 // TODO(erikchen): Fix ownership semantics for guest views. // https://crbug.com/832879. std::move(callback).Run( -@@ -220,6 +222,10 @@ void MimeHandlerViewGuest::CreateWebContents( +@@ -234,6 +236,10 @@ void MimeHandlerViewGuest::CreateWebContents( } void MimeHandlerViewGuest::DidAttachToEmbedder() { @@ -35,7 +35,7 @@ index 0b01120f6a605..d957af9b94e94 100644 DCHECK(stream_->handler_url().SchemeIs(extensions::kExtensionScheme)); web_contents()->GetController().LoadURL( stream_->handler_url(), content::Referrer(), -@@ -250,6 +256,11 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const { +@@ -264,6 +270,11 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const { return true; } diff --git a/patch/patches/net_cookie_flags.patch b/patch/patches/net_cookie_flags.patch index 69aab8868..e176f30e6 100644 --- a/patch/patches/net_cookie_flags.patch +++ b/patch/patches/net_cookie_flags.patch @@ -10,10 +10,10 @@ index 96d1a51ec1078..e8120a818b1f2 100644 +// This load will not send any cookies. For CEF usage. +LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 17) diff --git net/url_request/url_request_http_job.cc net/url_request/url_request_http_job.cc -index 3faca2e98f4ac..c6729030a53cc 100644 +index 93a60c910726a..efb9b8e4793ed 100644 --- net/url_request/url_request_http_job.cc +++ net/url_request/url_request_http_job.cc -@@ -1750,7 +1750,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const { +@@ -1774,7 +1774,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const { // Read cookies whenever allow_credentials() is true, even if the PrivacyMode // is being overridden by NetworkDelegate and will eventually block them, as // blocked cookies still need to be logged in that case. diff --git a/patch/patches/osr_fling_2745.patch b/patch/patches/osr_fling_2745.patch index 1c13a3ee2..c2cff1465 100644 --- a/patch/patches/osr_fling_2745.patch +++ b/patch/patches/osr_fling_2745.patch @@ -41,10 +41,10 @@ index cc4b13a7b9c67..84f3b9ed7cf49 100644 } // namespace content diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc -index 03e318b14025f..0428c5d4b92b1 100644 +index d6b7b2533b80d..f36ec7fcb9fb9 100644 --- content/browser/renderer_host/render_widget_host_impl.cc +++ content/browser/renderer_host/render_widget_host_impl.cc -@@ -3112,6 +3112,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() { +@@ -3130,6 +3130,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() { GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE); } diff --git a/patch/patches/print_preview_123.patch b/patch/patches/print_preview_123.patch index 569156a3a..0f219cc18 100644 --- a/patch/patches/print_preview_123.patch +++ b/patch/patches/print_preview_123.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/download/download_prefs.cc chrome/browser/download/download_prefs.cc -index 673ed00dc33c8..e7c82dc4dddb0 100644 +index 04679ec67bf2e..864f08b030ccb 100644 --- chrome/browser/download/download_prefs.cc +++ chrome/browser/download/download_prefs.cc @@ -24,6 +24,7 @@ @@ -21,7 +21,7 @@ index 673ed00dc33c8..e7c82dc4dddb0 100644 using content::BrowserContext; using content::BrowserThread; using content::DownloadManager; -@@ -340,6 +345,11 @@ DownloadPrefs* DownloadPrefs::FromDownloadManager( +@@ -342,6 +347,11 @@ DownloadPrefs* DownloadPrefs::FromDownloadManager( // static DownloadPrefs* DownloadPrefs::FromBrowserContext( content::BrowserContext* context) { @@ -34,7 +34,7 @@ index 673ed00dc33c8..e7c82dc4dddb0 100644 } diff --git chrome/browser/printing/print_preview_dialog_controller.cc chrome/browser/printing/print_preview_dialog_controller.cc -index 332fbc21aa0e3..1286fc203d6cd 100644 +index d656ccabc3899..a4b7ce6a7dcd8 100644 --- chrome/browser/printing/print_preview_dialog_controller.cc +++ chrome/browser/printing/print_preview_dialog_controller.cc @@ -15,6 +15,7 @@ @@ -46,27 +46,26 @@ index 332fbc21aa0e3..1286fc203d6cd 100644 #include "chrome/browser/printing/print_view_manager.h" #include "chrome/browser/task_manager/web_contents_tags.h" diff --git chrome/browser/printing/print_view_manager_base.cc chrome/browser/printing/print_view_manager_base.cc -index 9ed04fffa69c2..f2a3402b9ba6a 100644 +index 1f37c11047d47..eea8a9944ec3e 100644 --- chrome/browser/printing/print_view_manager_base.cc +++ chrome/browser/printing/print_view_manager_base.cc -@@ -219,12 +219,13 @@ void UpdatePrintSettingsOnIO( +@@ -222,12 +222,12 @@ void UpdatePrintSettingsOnIO( mojom::PrintManagerHost::UpdatePrintSettingsCallback callback, scoped_refptr queue, base::Value job_settings, - base::WeakPtr manager) { + base::WeakPtr manager, -+ int process_id, -+ int routing_id) { ++ const content::GlobalRenderFrameHostId& global_id) { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); std::unique_ptr printer_query = queue->PopPrinterQuery(cookie); if (!printer_query) { -- printer_query = queue->CreatePrinterQuery( -- content::ChildProcessHost::kInvalidUniqueID, MSG_ROUTING_NONE); -+ printer_query = queue->CreatePrinterQuery(process_id, routing_id); +- printer_query = +- queue->CreatePrinterQuery(content::GlobalRenderFrameHostId()); ++ printer_query = queue->CreatePrinterQuery(global_id); } auto* printer_query_ptr = printer_query.get(); printer_query_ptr->SetSettings( -@@ -646,6 +647,7 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -646,6 +646,7 @@ void PrintViewManagerBase::UpdatePrintSettings( job_settings.SetIntKey(kSettingRasterizePdfDpi, value); } @@ -74,14 +73,13 @@ index 9ed04fffa69c2..f2a3402b9ba6a 100644 auto callback_wrapper = base::BindOnce(&PrintViewManagerBase::UpdatePrintSettingsReply, weak_ptr_factory_.GetWeakPtr(), std::move(callback)); -@@ -653,7 +655,9 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -653,7 +654,8 @@ void PrintViewManagerBase::UpdatePrintSettings( FROM_HERE, base::BindOnce(&UpdatePrintSettingsOnIO, cookie, std::move(callback_wrapper), queue_, - std::move(job_settings), weak_ptr_factory_.GetWeakPtr())); + std::move(job_settings), weak_ptr_factory_.GetWeakPtr(), -+ render_frame_host->GetProcess()->GetID(), -+ render_frame_host->GetRoutingID())); ++ render_frame_host->GetGlobalId())); } #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) @@ -138,7 +136,7 @@ index f6098966f5b34..da78289b66155 100644 } diff --git chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc -index e5dfa76d26d86..b7dcf7a11479f 100644 +index 86e16795ce43d..9053975ad42f6 100644 --- chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc +++ chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc @@ -21,6 +21,7 @@ @@ -291,7 +289,7 @@ index 46c8b1d08b075..1ee95cd7c3240 100644 base::FilePath GetSaveLocation() const; diff --git chrome/browser/ui/webui/print_preview/print_preview_ui.cc chrome/browser/ui/webui/print_preview/print_preview_ui.cc -index b32c9d1760b69..ad65de16ba0d2 100644 +index eba14d78d87ff..7901f000a44b5 100644 --- chrome/browser/ui/webui/print_preview/print_preview_ui.cc +++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc @@ -22,6 +22,7 @@ @@ -302,7 +300,7 @@ index b32c9d1760b69..ad65de16ba0d2 100644 #include "chrome/browser/browser_process.h" #include "chrome/browser/pdf/pdf_extension_util.h" #include "chrome/browser/printing/background_printing_manager.h" -@@ -97,6 +98,13 @@ const char16_t kBasicPrintShortcut[] = u"\u0028\u21e7\u2318\u0050\u0029"; +@@ -96,6 +97,13 @@ const char16_t kBasicPrintShortcut[] = u"\u0028\u21e7\u2318\u0050\u0029"; const char16_t kBasicPrintShortcut[] = u"(Ctrl+Shift+P)"; #endif @@ -316,7 +314,7 @@ index b32c9d1760b69..ad65de16ba0d2 100644 constexpr char kInvalidArgsForDidStartPreview[] = "Invalid arguments for DidStartPreview"; constexpr char kInvalidPageNumberForDidPreviewPage[] = -@@ -342,7 +350,7 @@ void AddPrintPreviewStrings(content::WebUIDataSource* source) { +@@ -339,7 +347,7 @@ void AddPrintPreviewStrings(content::WebUIDataSource* source) { chrome::kCloudPrintCertificateErrorLearnMoreURL); #if !BUILDFLAG(IS_CHROMEOS) diff --git a/patch/patches/printing_context_2196.patch b/patch/patches/printing_context_2196.patch index 0a7594127..dc41ba9b1 100644 --- a/patch/patches/printing_context_2196.patch +++ b/patch/patches/printing_context_2196.patch @@ -1,12 +1,12 @@ diff --git chrome/browser/printing/print_job_worker.cc chrome/browser/printing/print_job_worker.cc -index 7dbb9aea759e4..b1485a731f559 100644 +index 27305997182f0..c97a5b89bf831 100644 --- chrome/browser/printing/print_job_worker.cc +++ chrome/browser/printing/print_job_worker.cc -@@ -136,6 +136,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id, int render_frame_id) +@@ -131,6 +131,7 @@ PrintJobWorker::PrintJobWorker(content::GlobalRenderFrameHostId rfh_id) ShouldPrintingContextSkipSystemCalls())), thread_("Printing_Worker") { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); -+ printing_context_->set_render_ids(render_process_id, render_frame_id); ++ printing_context_->set_render_ids(rfh_id.child_id, rfh_id.frame_routing_id); } PrintJobWorker::~PrintJobWorker() { diff --git a/patch/patches/renderer_host_1070713.patch b/patch/patches/renderer_host_1070713.patch index 44e7f8579..5a1d4c43f 100644 --- a/patch/patches/renderer_host_1070713.patch +++ b/patch/patches/renderer_host_1070713.patch @@ -1,8 +1,8 @@ diff --git content/browser/renderer_host/render_view_host_impl.cc content/browser/renderer_host/render_view_host_impl.cc -index 56c08919ab626..f8b7f586e2dd8 100644 +index f6bcef150f4d3..c1d121271c5c1 100644 --- content/browser/renderer_host/render_view_host_impl.cc +++ content/browser/renderer_host/render_view_host_impl.cc -@@ -644,6 +644,8 @@ bool RenderViewHostImpl::IsRenderViewLive() { +@@ -646,6 +646,8 @@ bool RenderViewHostImpl::IsRenderViewLive() { } void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { diff --git a/patch/patches/resource_bundle_2512.patch b/patch/patches/resource_bundle_2512.patch index d1c0134b0..73256050c 100644 --- a/patch/patches/resource_bundle_2512.patch +++ b/patch/patches/resource_bundle_2512.patch @@ -1,8 +1,8 @@ diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc -index fff568d679b89..7b5f224b390a0 100644 +index 2888b12d19d4b..c11ee9978a69e 100644 --- ui/base/resource/resource_bundle.cc +++ ui/base/resource/resource_bundle.cc -@@ -902,6 +902,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate) +@@ -906,6 +906,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate) : delegate_(delegate), locale_resources_data_lock_(new base::Lock), max_scale_factor_(k100Percent) { @@ -15,7 +15,7 @@ index fff568d679b89..7b5f224b390a0 100644 mangle_localized_strings_ = base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kMangleLocalizedStrings); } -@@ -911,6 +917,11 @@ ResourceBundle::~ResourceBundle() { +@@ -915,6 +921,11 @@ ResourceBundle::~ResourceBundle() { UnloadLocaleResources(); } @@ -28,7 +28,7 @@ index fff568d679b89..7b5f224b390a0 100644 void ResourceBundle::InitSharedInstance(Delegate* delegate) { DCHECK(g_shared_instance_ == nullptr) << "ResourceBundle initialized twice"; diff --git ui/base/resource/resource_bundle.h ui/base/resource/resource_bundle.h -index f2728d3dd9f10..00836556951b4 100644 +index 7cfaa60b7be42..db3e452189a4c 100644 --- ui/base/resource/resource_bundle.h +++ ui/base/resource/resource_bundle.h @@ -216,6 +216,11 @@ class COMPONENT_EXPORT(UI_BASE) ResourceBundle { diff --git a/patch/patches/runhooks.patch b/patch/patches/runhooks.patch index f5415bfa7..87dd289e6 100644 --- a/patch/patches/runhooks.patch +++ b/patch/patches/runhooks.patch @@ -1,5 +1,5 @@ diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py -index ec9e9eeda7cb7..b58e1900de059 100644 +index d692fc94dab73..87e71e627ce75 100644 --- build/toolchain/win/setup_toolchain.py +++ build/toolchain/win/setup_toolchain.py @@ -157,13 +157,17 @@ def _LoadToolchainEnv(cpu, toolchain_root, sdk_dir, target_store): @@ -26,7 +26,7 @@ index ec9e9eeda7cb7..b58e1900de059 100644 if (cpu != 'x64'): # x64 is default target CPU thus any other CPU requires a target set diff --git build/vs_toolchain.py build/vs_toolchain.py -index e759bd6ca2afe..c146bfea59fc8 100755 +index 93b79a3cf04bf..9a93667f78b65 100755 --- build/vs_toolchain.py +++ build/vs_toolchain.py @@ -107,9 +107,16 @@ def SetEnvironmentAndGetRuntimeDllDirs(): diff --git a/patch/patches/services_network_2622.patch b/patch/patches/services_network_2622.patch index 19580b5fc..c61c44ba2 100644 --- a/patch/patches/services_network_2622.patch +++ b/patch/patches/services_network_2622.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc -index 86cb596c6a4f2..e4f45f5b1c2fa 100644 +index de5084629f6a1..c6ad2d22e1191 100644 --- chrome/browser/net/profile_network_context_service.cc +++ chrome/browser/net/profile_network_context_service.cc @@ -22,6 +22,7 @@ @@ -10,7 +10,7 @@ index 86cb596c6a4f2..e4f45f5b1c2fa 100644 #include "chrome/browser/browser_features.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/content_settings/cookie_settings_factory.h" -@@ -734,7 +735,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( +@@ -741,7 +742,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( // Configure on-disk storage for non-OTR profiles. OTR profiles just use // default behavior (in memory storage, default sizes). @@ -31,7 +31,7 @@ index 86cb596c6a4f2..e4f45f5b1c2fa 100644 PrefService* local_state = g_browser_process->local_state(); // Configure the HTTP cache path and size. base::FilePath base_cache_path; -@@ -747,7 +760,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( +@@ -754,7 +767,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( base_cache_path.Append(chrome::kCacheDirname); network_context_params->http_cache_max_size = local_state->GetInteger(prefs::kDiskCacheSize); @@ -42,7 +42,7 @@ index 86cb596c6a4f2..e4f45f5b1c2fa 100644 ::network::mojom::NetworkContextFilePaths::New(); diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc -index 2885d39d1f6e5..bd373d28498c7 100644 +index 73172c5c88463..9bce28bd24de8 100644 --- net/cookies/cookie_monster.cc +++ net/cookies/cookie_monster.cc @@ -547,6 +547,25 @@ void CookieMonster::SetCookieableSchemes( @@ -72,10 +72,10 @@ index 2885d39d1f6e5..bd373d28498c7 100644 void CookieMonster::SetPersistSessionCookies(bool persist_session_cookies) { DCHECK(thread_checker_.CalledOnValidThread()); diff --git net/cookies/cookie_monster.h net/cookies/cookie_monster.h -index 5ba0bcac86588..8efbece455f2b 100644 +index 659a346d80d58..af8c88c5671aa 100644 --- net/cookies/cookie_monster.h +++ net/cookies/cookie_monster.h -@@ -207,6 +207,8 @@ class NET_EXPORT CookieMonster : public CookieStore { +@@ -209,6 +209,8 @@ class NET_EXPORT CookieMonster : public CookieStore { CookieChangeDispatcher& GetChangeDispatcher() override; void SetCookieableSchemes(const std::vector& schemes, SetCookieableSchemesCallback callback) override; @@ -85,10 +85,10 @@ index 5ba0bcac86588..8efbece455f2b 100644 // Enables writing session cookies into the cookie database. If this this // method is called, it must be called before first use of the instance diff --git net/cookies/cookie_store.h net/cookies/cookie_store.h -index 4dbe5fd1b2c11..ef797ae9b858c 100644 +index c143a7381df95..da14e2b0b1c81 100644 --- net/cookies/cookie_store.h +++ net/cookies/cookie_store.h -@@ -161,6 +161,11 @@ class NET_EXPORT CookieStore { +@@ -163,6 +163,11 @@ class NET_EXPORT CookieStore { // Transfer ownership of a CookieAccessDelegate. void SetCookieAccessDelegate(std::unique_ptr delegate); @@ -101,7 +101,7 @@ index 4dbe5fd1b2c11..ef797ae9b858c 100644 // reset to null. const CookieAccessDelegate* cookie_access_delegate() const { diff --git services/network/cookie_manager.cc services/network/cookie_manager.cc -index f5df9b6c27e9f..ea02e2b379f3a 100644 +index 49c53dc75789f..07c204a826877 100644 --- services/network/cookie_manager.cc +++ services/network/cookie_manager.cc @@ -366,14 +366,9 @@ void CookieManager::FlushCookieStore(FlushCookieStoreCallback callback) { @@ -123,10 +123,10 @@ index f5df9b6c27e9f..ea02e2b379f3a 100644 void CookieManager::SetForceKeepSessionState() { diff --git services/network/network_context.cc services/network/network_context.cc -index 8ff62f92ed6ef..9af2e737a9c01 100644 +index 6564e1dda47a9..d7d67a96a3a64 100644 --- services/network/network_context.cc +++ services/network/network_context.cc -@@ -2286,17 +2286,21 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2300,17 +2300,21 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( network_service_->network_quality_estimator()); } @@ -157,10 +157,10 @@ index 8ff62f92ed6ef..9af2e737a9c01 100644 trust_token_store_ = std::make_unique(); diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom -index 3d5779c980ff7..9d0e0a58ec64d 100644 +index 560fb1abef486..65f58306c848a 100644 --- services/network/public/mojom/network_context.mojom +++ services/network/public/mojom/network_context.mojom -@@ -330,6 +330,9 @@ struct NetworkContextParams { +@@ -331,6 +331,9 @@ struct NetworkContextParams { // cookies. Otherwise it should be false. bool persist_session_cookies = false; diff --git a/patch/patches/services_network_2718.patch b/patch/patches/services_network_2718.patch index 43fa955ea..1be61e334 100644 --- a/patch/patches/services_network_2718.patch +++ b/patch/patches/services_network_2718.patch @@ -1,8 +1,8 @@ diff --git content/browser/storage_partition_impl.cc content/browser/storage_partition_impl.cc -index 4104bde55093c..8992ed51a47d1 100644 +index 2c0c05a740a29..0181a957ca7bc 100644 --- content/browser/storage_partition_impl.cc +++ content/browser/storage_partition_impl.cc -@@ -494,10 +494,6 @@ class LoginHandlerDelegate { +@@ -497,10 +497,6 @@ class LoginHandlerDelegate { } WebContents* web_contents = web_contents_getter_.Run(); @@ -13,7 +13,7 @@ index 4104bde55093c..8992ed51a47d1 100644 // WeakPtr is not strictly necessary here due to OnRequestCancelled. creating_login_delegate_ = true; -@@ -549,12 +545,6 @@ void OnAuthRequiredContinuation( +@@ -552,12 +548,6 @@ void OnAuthRequiredContinuation( mojo::PendingRemote auth_challenge_responder, base::RepeatingCallback web_contents_getter) { @@ -26,7 +26,7 @@ index 4104bde55093c..8992ed51a47d1 100644 new LoginHandlerDelegate( std::move(auth_challenge_responder), std::move(web_contents_getter), auth_info, is_request_for_primary_main_frame, process_id, request_id, url, -@@ -2737,8 +2727,12 @@ void StoragePartitionImpl::GetQuotaSettings( +@@ -2764,8 +2754,12 @@ void StoragePartitionImpl::GetQuotaSettings( return; } @@ -40,7 +40,7 @@ index 4104bde55093c..8992ed51a47d1 100644 storage::GetDefaultDeviceInfoHelper(), std::move(callback)); } -@@ -2748,9 +2742,12 @@ void StoragePartitionImpl::InitNetworkContext() { +@@ -2775,9 +2769,12 @@ void StoragePartitionImpl::InitNetworkContext() { cert_verifier::mojom::CertVerifierCreationParamsPtr cert_verifier_creation_params = cert_verifier::mojom::CertVerifierCreationParams::New(); diff --git a/patch/patches/storage_incognito_2289.patch b/patch/patches/storage_incognito_2289.patch index 488131adc..1e6d273a2 100644 --- a/patch/patches/storage_incognito_2289.patch +++ b/patch/patches/storage_incognito_2289.patch @@ -13,7 +13,7 @@ index a74178f2d4246..8098034a38333 100644 {base::MayBlock(), base::TaskPriority::USER_VISIBLE, base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}); diff --git content/browser/browser_context.cc content/browser/browser_context.cc -index b0ebdaa0156cf..45ea1eba1cb79 100644 +index 323ffab7c0b25..dbc1a50064361 100644 --- content/browser/browser_context.cc +++ content/browser/browser_context.cc @@ -129,7 +129,7 @@ StoragePartition* BrowserContext::GetStoragePartition( diff --git a/patch/patches/trace_event.patch b/patch/patches/trace_event.patch index 65d5cfcec..347d0abe6 100644 --- a/patch/patches/trace_event.patch +++ b/patch/patches/trace_event.patch @@ -1,8 +1,8 @@ diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h -index 107516329273e..d55bdef0a8e63 100644 +index 083a46a96bf96..968a1ff27fca4 100644 --- base/trace_event/builtin_categories.h +++ base/trace_event/builtin_categories.h -@@ -61,6 +61,8 @@ +@@ -63,6 +63,8 @@ X("cc") \ X("cc.debug") \ X("cdp.perf") \ diff --git a/patch/patches/views_1749_2102.patch b/patch/patches/views_1749_2102.patch index fb3cc79ac..00512c615 100644 --- a/patch/patches/views_1749_2102.patch +++ b/patch/patches/views_1749_2102.patch @@ -43,7 +43,7 @@ index 11f1421cc79c1..c5dbc643ae7c8 100644 virtual void MenuWillShow() {} diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc -index de5999c5252f3..97d08b4d3b7f9 100644 +index 27888933871f1..79e34b4a07416 100644 --- ui/gfx/render_text.cc +++ ui/gfx/render_text.cc @@ -659,6 +659,14 @@ void RenderText::SetWhitespaceElision(absl::optional whitespace_elision) { @@ -61,7 +61,7 @@ index de5999c5252f3..97d08b4d3b7f9 100644 void RenderText::SetDisplayRect(const Rect& r) { if (r != display_rect_) { display_rect_ = r; -@@ -2003,6 +2011,19 @@ void RenderText::OnTextAttributeChanged() { +@@ -2004,6 +2012,19 @@ void RenderText::OnTextAttributeChanged() { layout_text_up_to_date_ = false; @@ -308,7 +308,7 @@ index 7101143c63803..058da34d3499e 100644 virtual int GetMaxWidthForMenu(MenuItemView* menu); diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc -index 497b0af4513c0..475046fe5f0c8 100644 +index 9f8112be1c949..6649111b2e04e 100644 --- ui/views/controls/menu/menu_item_view.cc +++ ui/views/controls/menu/menu_item_view.cc @@ -1091,6 +1091,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas, @@ -465,7 +465,7 @@ index 7706c76090589..980de1f486d0c 100644 content_view_->GetMenuItem()->GetMenuController()->GetAnchorPosition()); diff --git ui/views/view.h ui/views/view.h -index 837eb95c28b04..7dc148522b5ef 100644 +index f3b4c946e102e..0bd810a18c8ae 100644 --- ui/views/view.h +++ ui/views/view.h @@ -21,6 +21,7 @@ diff --git a/patch/patches/views_widget.patch b/patch/patches/views_widget.patch index 74ed1e85c..1036e7020 100644 --- a/patch/patches/views_widget.patch +++ b/patch/patches/views_widget.patch @@ -1,8 +1,8 @@ diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc -index 5fd8cb63f589d..cabf4b90d8078 100644 +index 6944f34edbfb7..36379a96dde89 100644 --- content/browser/renderer_host/render_widget_host_view_base.cc +++ content/browser/renderer_host/render_widget_host_view_base.cc -@@ -617,6 +617,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() const { +@@ -619,6 +619,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() const { return screen_infos_.current().device_scale_factor; } @@ -152,10 +152,10 @@ index d213587450f06..3fde9a9ce47d5 100644 // Set the view's active state (i.e., tint state of controls). virtual void SetActive(bool active) = 0; diff --git ui/ozone/platform/x11/x11_window.cc ui/ozone/platform/x11/x11_window.cc -index 15b5f6ff21d3f..2e2a89424cc3e 100644 +index 8e096dc664b5e..587363b31681d 100644 --- ui/ozone/platform/x11/x11_window.cc +++ ui/ozone/platform/x11/x11_window.cc -@@ -1710,7 +1710,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) { +@@ -1711,7 +1711,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) { req.border_pixel = 0; bounds_in_pixels_ = SanitizeBounds(bounds); @@ -309,7 +309,7 @@ index 444581249014a..5defa787d25cd 100644 // a reference. raw_ptr tooltip_; diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc -index 71300e03598b2..45622129b15ea 100644 +index 35cb9c39c6740..4208536fb9cc3 100644 --- ui/views/widget/widget.cc +++ ui/views/widget/widget.cc @@ -338,7 +338,8 @@ void Widget::Init(InitParams params) { @@ -345,7 +345,7 @@ index 71300e03598b2..45622129b15ea 100644 } native_theme_observation_.Observe(GetNativeTheme()); -@@ -1411,10 +1420,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) { +@@ -1435,10 +1444,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) { } gfx::Size Widget::GetMinimumSize() const { @@ -363,10 +363,10 @@ index 71300e03598b2..45622129b15ea 100644 } diff --git ui/views/widget/widget.h ui/views/widget/widget.h -index a5718171b5e40..b2695eb41b65a 100644 +index 1e5665b9c4777..7e251b0f84d84 100644 --- ui/views/widget/widget.h +++ ui/views/widget/widget.h -@@ -336,6 +336,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, +@@ -337,6 +337,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, // the concept with bubble anchoring a la BubbleDialogDelegateView. gfx::NativeView parent = nullptr; @@ -391,7 +391,7 @@ index 3375d6c362923..24f36f6e5587a 100644 bool enable_arrow_key_traversal() const { return params_.enable_arrow_key_traversal; diff --git ui/views/widget/widget_hwnd_utils.cc ui/views/widget/widget_hwnd_utils.cc -index b10784dce1f69..4a6acf542dece 100644 +index b3a3efd0e526f..8590a98eaf0b2 100644 --- ui/views/widget/widget_hwnd_utils.cc +++ ui/views/widget/widget_hwnd_utils.cc @@ -67,7 +67,7 @@ void CalculateWindowStylesFromInitParams( @@ -404,7 +404,7 @@ index b10784dce1f69..4a6acf542dece 100644 if (native_widget_delegate->IsDialogBox()) { *style |= DS_MODALFRAME; diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc -index bf32a083d0f08..156b257d6fb75 100644 +index 51ac070553d08..09287f6e3f888 100644 --- ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc @@ -3133,10 +3133,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, diff --git a/patch/patches/viz_osr_2575.patch b/patch/patches/viz_osr_2575.patch index 9789749d8..88b026daf 100644 --- a/patch/patches/viz_osr_2575.patch +++ b/patch/patches/viz_osr_2575.patch @@ -80,7 +80,7 @@ index 309422bcf8581..759549f3046f4 100644 private: const HWND hwnd_; diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn -index 03a9986ff94bc..5a5c35c35db25 100644 +index 15a66c6a1e761..71ebc2dc5e787 100644 --- components/viz/service/BUILD.gn +++ components/viz/service/BUILD.gn @@ -221,6 +221,8 @@ viz_component("service") { @@ -93,7 +93,7 @@ index 03a9986ff94bc..5a5c35c35db25 100644 defines = [ "VIZ_SERVICE_IMPLEMENTATION" ] diff --git components/viz/service/display_embedder/output_surface_provider_impl.cc components/viz/service/display_embedder/output_surface_provider_impl.cc -index 8a277c6337d44..c857919b010c6 100644 +index 8a277c6337d44..e427d41be01c1 100644 --- components/viz/service/display_embedder/output_surface_provider_impl.cc +++ components/viz/service/display_embedder/output_surface_provider_impl.cc @@ -17,6 +17,7 @@ @@ -114,9 +114,9 @@ index 8a277c6337d44..c857919b010c6 100644 + bool use_proxy_output_device = false; + if (display_client->UseProxyOutputDevice(&use_proxy_output_device) && + use_proxy_output_device) { -+ mojom::LayeredWindowUpdaterPtr layered_window_updater; ++ mojo::PendingRemote layered_window_updater; + display_client->CreateLayeredWindowUpdater( -+ mojo::MakeRequest(&layered_window_updater)); ++ layered_window_updater.InitWithNewPipeAndPassReceiver()); + return std::make_unique( + std::move(layered_window_updater)); + } @@ -214,7 +214,7 @@ index 6b7fbb6cf13dc..e2af75168cb91 100644 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git ui/compositor/compositor.h ui/compositor/compositor.h -index 8b74e1d2a4631..e0a68b5265af7 100644 +index b30b9460889b9..19d7967f4ef96 100644 --- ui/compositor/compositor.h +++ ui/compositor/compositor.h @@ -30,7 +30,9 @@ @@ -226,7 +226,7 @@ index 8b74e1d2a4631..e0a68b5265af7 100644 +#include "components/viz/service/display/software_output_device.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "services/viz/privileged/mojom/compositing/vsync_parameter_observer.mojom-forward.h" - #include "skia/ext/skia_matrix_44.h" + #include "third_party/skia/include/core/SkColor.h" @@ -137,6 +139,14 @@ class COMPOSITOR_EXPORT ContextFactory { virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0; }; @@ -242,7 +242,7 @@ index 8b74e1d2a4631..e0a68b5265af7 100644 // Compositor object to take care of GPU painting. // A Browser compositor object is responsible for generating the final // displayable form of pixels comprising a single widget's contents. It draws an -@@ -177,6 +187,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -178,6 +188,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, // Schedules a redraw of the layer tree associated with this compositor. void ScheduleDraw(); @@ -252,7 +252,7 @@ index 8b74e1d2a4631..e0a68b5265af7 100644 // Sets the root of the layer tree drawn by this Compositor. The root layer // must have no parent. The compositor's root layer is reset if the root layer // is destroyed. NULL can be passed to reset the root layer, in which case the -@@ -467,6 +480,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -466,6 +479,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, std::unique_ptr pending_begin_frame_args_; diff --git a/patch/patches/web_contents_1257_1565.patch b/patch/patches/web_contents_1257_1565.patch index 8c4b52a0d..1b463cbb9 100644 --- a/patch/patches/web_contents_1257_1565.patch +++ b/patch/patches/web_contents_1257_1565.patch @@ -1,8 +1,8 @@ diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc -index 96ced4715eed9..1094a4e9ec0a4 100644 +index 62818b1c709b7..43da09b31210c 100644 --- content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc -@@ -3040,6 +3040,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3030,6 +3030,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, site_instance.get(), params.renderer_initiated_creation, params.main_frame_name, GetOriginalOpener(), primary_main_frame_policy); @@ -15,7 +15,7 @@ index 96ced4715eed9..1094a4e9ec0a4 100644 WebContentsViewDelegate* delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3050,6 +3056,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3040,6 +3046,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_.reset(CreateWebContentsView(this, delegate, &render_view_host_delegate_view_)); } @@ -23,7 +23,7 @@ index 96ced4715eed9..1094a4e9ec0a4 100644 CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -3915,6 +3922,15 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3906,6 +3913,15 @@ FrameTree* WebContentsImpl::CreateNewWindow( // objects. create_params.renderer_initiated_creation = !is_new_browsing_instance; @@ -39,7 +39,7 @@ index 96ced4715eed9..1094a4e9ec0a4 100644 std::unique_ptr new_contents; if (!is_guest) { create_params.context = view_->GetNativeView(); -@@ -7726,6 +7742,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, +@@ -7733,6 +7749,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, // frames). SetFocusedFrameTree(node->frame_tree()); } @@ -50,7 +50,7 @@ index 96ced4715eed9..1094a4e9ec0a4 100644 void WebContentsImpl::DidCallFocus() { diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h -index ad5c13965f1cc..169a309335ea0 100644 +index cb672eb5276e8..0f2f8f9a57fcc 100644 --- content/public/browser/web_contents.h +++ content/public/browser/web_contents.h @@ -93,10 +93,12 @@ class BrowserContext; @@ -78,7 +78,7 @@ index ad5c13965f1cc..169a309335ea0 100644 // the value that'll be returned by GetLastActiveTime(). If this is left // default initialized then the value is not passed on to the WebContents diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h -index f889d0bf33cf2..db7a1c6f736ca 100644 +index 9c70cc90402dd..0e0daeb27e880 100644 --- content/public/browser/web_contents_delegate.h +++ content/public/browser/web_contents_delegate.h @@ -57,10 +57,12 @@ class EyeDropperListener; diff --git a/patch/patches/web_url_loader_cancel_1617042.patch b/patch/patches/web_url_loader_cancel_1617042.patch index d9481390a..28ca63190 100644 --- a/patch/patches/web_url_loader_cancel_1617042.patch +++ b/patch/patches/web_url_loader_cancel_1617042.patch @@ -1,8 +1,8 @@ diff --git third_party/blink/public/platform/web_url_loader.h third_party/blink/public/platform/web_url_loader.h -index 3894775930095..aef157bc50b79 100644 +index 6ba4364c434fa..6400e5b34b65a 100644 --- third_party/blink/public/platform/web_url_loader.h +++ third_party/blink/public/platform/web_url_loader.h -@@ -152,12 +152,14 @@ class BLINK_PLATFORM_EXPORT WebURLLoader { +@@ -153,12 +153,14 @@ class BLINK_PLATFORM_EXPORT WebURLLoader { void SetResourceRequestSenderForTesting( std::unique_ptr resource_request_sender); diff --git a/patch/patches/webkit_plugin_info_2015.patch b/patch/patches/webkit_plugin_info_2015.patch index beb208af7..f62be04c4 100644 --- a/patch/patches/webkit_plugin_info_2015.patch +++ b/patch/patches/webkit_plugin_info_2015.patch @@ -1,8 +1,8 @@ diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h -index d188491afffbd..a68b78b5132f1 100644 +index 1d7c9a8e62a68..5d71c71d39167 100644 --- third_party/blink/public/platform/platform.h +++ third_party/blink/public/platform/platform.h -@@ -872,6 +872,11 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -873,6 +873,11 @@ class BLINK_PLATFORM_EXPORT Platform { const WebURL& url, blink::WebVector* csp) {} diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index 0c2b05424..eeab21bb6 100644 --- a/patch/patches/webkit_popups.patch +++ b/patch/patches/webkit_popups.patch @@ -1,8 +1,8 @@ diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h -index 14d4a00293ab0..fc574edaaa2ad 100644 +index 560b72dfbc701..b63918a20ed0a 100644 --- third_party/blink/public/web/web_view.h +++ third_party/blink/public/web/web_view.h -@@ -340,6 +340,7 @@ class WebView { +@@ -341,6 +341,7 @@ class WebView { // Sets whether select popup menus should be rendered by the browser. BLINK_EXPORT static void SetUseExternalPopupMenus(bool); @@ -11,7 +11,7 @@ index 14d4a00293ab0..fc574edaaa2ad 100644 // Cancels and hides the current popup (datetime, select...) if any. virtual void CancelPagePopup() = 0; diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc -index d8f8d3114361d..01879d8feceea 100644 +index 6aa72717b2576..c05663723089a 100644 --- third_party/blink/renderer/core/exported/web_view_impl.cc +++ third_party/blink/renderer/core/exported/web_view_impl.cc @@ -247,8 +247,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { diff --git a/patch/patches/win_sandbox_3210.patch b/patch/patches/win_sandbox_3210.patch index 7d27b6c34..d034d2270 100644 --- a/patch/patches/win_sandbox_3210.patch +++ b/patch/patches/win_sandbox_3210.patch @@ -1,8 +1,8 @@ diff --git sandbox/policy/win/sandbox_win.cc sandbox/policy/win/sandbox_win.cc -index 197e66eeb5b3b..f92f0659aa13f 100644 +index d916c59c1d4fe..7cc9401e19800 100644 --- sandbox/policy/win/sandbox_win.cc +++ sandbox/policy/win/sandbox_win.cc -@@ -1155,6 +1155,13 @@ ResultCode SandboxWin::StartSandboxedProcess( +@@ -1154,6 +1154,13 @@ ResultCode SandboxWin::StartSandboxedProcess( const base::HandlesToInheritVector& handles_to_inherit, SandboxDelegate* delegate, base::Process* process) { diff --git a/tools/make_distrib.py b/tools/make_distrib.py index 8e38d0bb0..2b860e019 100644 --- a/tools/make_distrib.py +++ b/tools/make_distrib.py @@ -887,6 +887,7 @@ if platform == 'windows': 'obj\\base\\third_party\\dynamic_annotations\\dynamic_annotations.lib', 'obj\\base\\win\\pe_image.lib', cef_sandbox_lib, + 'obj\\sandbox\\common\\*.obj', 'obj\\sandbox\\win\\sandbox.lib', 'obj\\third_party\\abseil-cpp\\absl\\base\\**\\*.obj', 'obj\\third_party\\abseil-cpp\\absl\\debugging\\**\\*.obj',