From 75f4d525b0a26d61558b49cb7684509f39fdd36c Mon Sep 17 00:00:00 2001 From: Mario Sanchez Prada Date: Thu, 2 Sep 2021 12:52:40 +0200 Subject: [PATCH 01/71] Updated patches from Chromium 94.0.4606.71 to Chromium 95.0.4612.0. --- patches/base-BUILD.gn.patch | 4 +- ...base-threading-thread_restrictions.h.patch | 4 +- ...d-android-gyp-util-resource_utils.py.patch | 2 +- patches/build-config-android-rules.gni.patch | 2 +- patches/build-config-compiler-BUILD.gn.patch | 4 +- patches/chrome-android-BUILD.gn.patch | 26 +++++------ ...me-browser-ChromeTabbedActivity.java.patch | 6 +-- ...document-ChromeLauncherActivity.java.patch | 4 +- ...me-browser-ntp-NewTabPageLayout.java.patch | 2 +- ...rivacy-settings-PrivacySettings.java.patch | 8 ++-- patches/chrome-app-BUILD.gn.patch | 2 +- patches/chrome-browser-BUILD.gn.patch | 6 +-- patches/chrome-browser-about_flags.cc.patch | 8 ++-- ...hrome-browser-browser_process_impl.h.patch | 4 +- ...ome_browsing_data_remover_delegate.h.patch | 2 +- ...wser-chrome_content_browser_client.h.patch | 4 +- ...flags-android-chrome_feature_list.cc.patch | 6 +-- ...ser-global_keyboard_shortcuts_mac.mm.patch | 2 +- ...et-system_network_context_manager.cc.patch | 4 +- ...hrome-browser-prefs-browser_prefs.cc.patch | 12 ++--- ...ome-browser-profiles-profile_impl.cc.patch | 6 +-- ...ext_menu-render_view_context_menu.cc.patch | 6 +-- ...-browser-resources-settings-BUILD.gn.patch | 2 +- ...tings-privacy_page-privacy_page.html.patch | 8 ++-- ...ettings-privacy_page-privacy_page.js.patch | 2 +- ...-browser-resources-settings-route.js.patch | 4 +- ...chrome-browser-themes-theme_helper.h.patch | 2 +- patches/chrome-browser-ui-BUILD.gn.patch | 6 +-- ...-browser-ui-android-toolbar-BUILD.gn.patch | 2 +- patches/chrome-browser-ui-browser.cc.patch | 8 ++-- ...rome-browser-ui-browser_navigator.cc.patch | 2 +- .../chrome-browser-ui-tab_helpers.cc.patch | 4 +- ...views-bookmarks-bookmark_bar_view.cc.patch | 4 +- ...ble-permission_prompt_bubble_view.cc.patch | 2 +- ...ws-profiles-profile_menu_view_base.h.patch | 2 +- ...ws-tabs-tab_hover_card_bubble_view.h.patch | 4 +- ...-chrome_web_ui_controller_factory.cc.patch | 6 +-- ...-ui-webui-settings-people_handler.cc.patch | 8 ++-- ...ttings_localized_strings_provider.cc.patch | 4 +- ...me-installer-mac-signing-pipeline.py.patch | 4 +- ...aller-util-google_update_settings.cc.patch | 2 +- patches/chrome-test-BUILD.gn.patch | 4 +- ...-build-mac-infoplist_strings_util.cc.patch | 2 +- patches/chrome-utility-BUILD.gn.patch | 2 +- ...derer-content_settings_agent_impl.cc.patch | 4 +- ...mnibox-browser-omnibox_edit_model.cc.patch | 4 +- .../components-page_info-page_info.cc.patch | 6 +-- ...s-permissions-permission_uma_util.cc.patch | 4 +- ...mponents-permissions-request_type.cc.patch | 4 +- ...licy-tools-generate_policy_source.py.patch | 4 +- ...ser-safe_browsing_network_context.cc.patch | 2 +- ...vice_info-device_info_sync_bridge.cc.patch | 6 +-- ...-renderer_host-navigation_request.cc.patch | 10 ++--- ...lic-browser-content_browser_client.h.patch | 4 +- ...ontent-renderer-render_frame_impl.cc.patch | 6 +-- ...r-api-web_request-web_request_api.cc.patch | 4 +- .../ios-chrome-app-main_controller.mm.patch | 4 +- patches/net-BUILD.gn.patch | 4 +- patches/net-base-host_port_pair.cc.patch | 2 +- patches/net-base-proxy_server.cc.patch | 6 +-- patches/net-cookies-canonical_cookie.cc.patch | 2 +- patches/net-dns-host_cache.cc.patch | 4 +- ...ices-network-public-cpp-cors-cors.cc.patch | 4 +- ...-common-client_hints-client_hints.cc.patch | 4 +- .../third_party-blink-renderer-BUILD.gn.patch | 2 +- ...d_party-blink-renderer-core-BUILD.gn.patch | 2 +- ...e-html-canvas-html_canvas_element.cc.patch | 2 +- ...anvas2d-base_rendering_context_2d.cc.patch | 14 +++--- ...vas2d-canvas_rendering_context_2d.cc.patch | 4 +- ...ebgl-webgl_rendering_context_base.cc.patch | 44 +++++++++---------- ...tools-gritsettings-resource_ids.spec.patch | 4 +- patches/ui-base-BUILD.gn.patch | 2 +- 72 files changed, 185 insertions(+), 185 deletions(-) diff --git a/patches/base-BUILD.gn.patch b/patches/base-BUILD.gn.patch index 03709847701e..a63e94951f06 100644 --- a/patches/base-BUILD.gn.patch +++ b/patches/base-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/base/BUILD.gn b/base/BUILD.gn -index bafc85477602d8829665e5e780ef57f15a1d7cf6..6d396eebae43f960ea5e22f10ee35059324924f3 100644 +index d273dae18a596ac14b05d1eb8f4f3b4d9e39652a..f905982e08689442718231d050429e2b0eceba2d 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -3987,6 +3987,7 @@ if (is_android) { +@@ -3993,6 +3993,7 @@ if (is_android) { "android/java/src/org/chromium/base/task/TaskTraits.java", "android/java/src/org/chromium/base/task/TaskTraitsExtensionDescriptor.java", ] diff --git a/patches/base-threading-thread_restrictions.h.patch b/patches/base-threading-thread_restrictions.h.patch index 084685ac58cd..560477cc83a3 100644 --- a/patches/base-threading-thread_restrictions.h.patch +++ b/patches/base-threading-thread_restrictions.h.patch @@ -1,8 +1,8 @@ diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h -index 088e966c9948d55fbb22daf4acd21072b220920d..86f6bbbd4c209ae911fab9e3a4f03f5ed9329a8b 100644 +index 67f44e5762bf38f28bec9c7ee57f604a13adc276..3ccbb78c18bd0e5c03caec7f5278983ee8907783 100644 --- a/base/threading/thread_restrictions.h +++ b/base/threading/thread_restrictions.h -@@ -478,6 +478,7 @@ INLINE_IF_DCHECK_IS_OFF void DisallowBaseSyncPrimitives() +@@ -482,6 +482,7 @@ INLINE_IF_DCHECK_IS_OFF void DisallowBaseSyncPrimitives() EMPTY_BODY_IF_DCHECK_IS_OFF; class BASE_EXPORT ScopedAllowBaseSyncPrimitives { diff --git a/patches/build-android-gyp-util-resource_utils.py.patch b/patches/build-android-gyp-util-resource_utils.py.patch index 905a243e9d02..f5cfa886b248 100644 --- a/patches/build-android-gyp-util-resource_utils.py.patch +++ b/patches/build-android-gyp-util-resource_utils.py.patch @@ -1,5 +1,5 @@ diff --git a/build/android/gyp/util/resource_utils.py b/build/android/gyp/util/resource_utils.py -index 263b7c23484c6225ef4fa410674d54863a58809a..c28f8a638be678353ee049acc096e624b18e66ef 100644 +index 4f64174193be3ea59e072787408f83360aa1674a..6554092c896b80e64effb319cf7f10613d54ca8e 100644 --- a/build/android/gyp/util/resource_utils.py +++ b/build/android/gyp/util/resource_utils.py @@ -257,6 +257,7 @@ class ResourceInfoFile(object): diff --git a/patches/build-config-android-rules.gni.patch b/patches/build-config-android-rules.gni.patch index fb43d6514918..d97fb8d0fcf8 100644 --- a/patches/build-config-android-rules.gni.patch +++ b/patches/build-config-android-rules.gni.patch @@ -1,5 +1,5 @@ diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni -index 1099c49fbff99028319f7ad2a66b717701d27e0f..07e9b140abd90596ff7c00f96f3e1d6b4e760506 100644 +index 7cbfb33e417c899827151dcb7578e985b9b8d059..e26b5dbaffad14395d0ac759e7d75d5f89e63fc2 100644 --- a/build/config/android/rules.gni +++ b/build/config/android/rules.gni @@ -476,6 +476,7 @@ if (enable_java_templates) { diff --git a/patches/build-config-compiler-BUILD.gn.patch b/patches/build-config-compiler-BUILD.gn.patch index 31fc58d78942..906b43dd4c52 100644 --- a/patches/build-config-compiler-BUILD.gn.patch +++ b/patches/build-config-compiler-BUILD.gn.patch @@ -1,8 +1,8 @@ diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn -index d7073ad38f0bfa55524691e701d7b25fef2f5116..b031841c169c0dc17274afccf3aa6bac29326b2d 100644 +index a97032d327f8ca4a71d9366476d0e65c43e991a4..fe95fc6e4225af70667632148cf208496cb57532 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn -@@ -1737,6 +1737,7 @@ config("chromium_code") { +@@ -1742,6 +1742,7 @@ config("chromium_code") { cflags += [ "-Wextra-semi" ] } } diff --git a/patches/chrome-android-BUILD.gn.patch b/patches/chrome-android-BUILD.gn.patch index 782003b693e4..09f3b86a1160 100644 --- a/patches/chrome-android-BUILD.gn.patch +++ b/patches/chrome-android-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn -index dd4823f8558180d92cd2ab165130f64918b85a68..91cae183db61c4b1812b5cfc0af17eede25452cb 100644 +index e00fca59c012e723ab93dbfd0256f4c12c8cd77d..2c981fcead5d3ea31b084402aeccc99c1f578094 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn @@ -252,6 +252,7 @@ android_resources("chrome_app_java_resources") { @@ -8,31 +8,31 @@ index dd4823f8558180d92cd2ab165130f64918b85a68..91cae183db61c4b1812b5cfc0af17eed ] + deps += brave_chrome_app_java_resources_deps sources += brave_java_resources resource_overlay = true } - + if (enable_vr) { -@@ -603,6 +604,7 @@ android_library("chrome_java") { - +@@ -604,6 +605,7 @@ android_library("chrome_java") { + deps += feed_deps deps += web_feed_deps + deps += brave_chrome_java_deps - + srcjar_deps = [ ":autofill_verification_status_generated_enum", -@@ -634,6 +636,7 @@ android_library("chrome_java") { +@@ -635,6 +637,7 @@ android_library("chrome_java") { "//components/offline_pages/core:offline_page_model_enums_java", "//net:effective_connection_type_java", ] + srcjar_deps += brave_chrome_java_srcjar_deps - + # From java_sources.gni. sources = chrome_java_sources + [ app_hooks_impl ] -@@ -754,6 +757,7 @@ java_group("chrome_all_java") { +@@ -755,6 +758,7 @@ java_group("chrome_all_java") { "//chrome/android/features/tab_ui:module_desc_java", ] } + deps += brave_chrome_all_java_deps } - + # This is a list of all base module jni headers. New features should add their @@ -797,6 +801,7 @@ group("jni_headers") { "//components/ukm/android:jni_headers", @@ -40,9 +40,9 @@ index dd4823f8558180d92cd2ab165130f64918b85a68..91cae183db61c4b1812b5cfc0af17eed ] + public_deps += ["//brave/build/android:jni_headers"] } - + action_with_pydeps("chrome_android_java_google_api_keys_srcjar") { -@@ -2078,6 +2083,7 @@ if (current_toolchain == default_toolchain) { +@@ -2125,6 +2130,7 @@ if (current_toolchain == default_toolchain) { ":${_variant}_locale_pak_assets", ":${_variant}_paks", ] @@ -50,11 +50,11 @@ index dd4823f8558180d92cd2ab165130f64918b85a68..91cae183db61c4b1812b5cfc0af17eed if (_is_monochrome) { deps += [ "//android_webview:locale_pak_assets" ] if (webview_includes_weblayer && !_is_bundle_module) { -@@ -2474,6 +2480,7 @@ android_library("base_module_java") { +@@ -2521,6 +2527,7 @@ android_library("base_module_java") { "//components/payments/content/android:service_java", "//third_party/androidx:androidx_browser_browser_java", ] + sources += brave_java_base_module_sources deps += brave_java_base_module_deps - + # More deps for DFMs. if (dfmify_dev_ui) { diff --git a/patches/chrome-android-java-src-org-chromium-chrome-browser-ChromeTabbedActivity.java.patch b/patches/chrome-android-java-src-org-chromium-chrome-browser-ChromeTabbedActivity.java.patch index a341bf9969c5..bda975ce9654 100644 --- a/patches/chrome-android-java-src-org-chromium-chrome-browser-ChromeTabbedActivity.java.patch +++ b/patches/chrome-android-java-src-org-chromium-chrome-browser-ChromeTabbedActivity.java.patch @@ -1,10 +1,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java -index 5aa0e513bef79ee77130e4d46662b9d6403abe72..0ab3eeb3582ec6b7cf9e140b45f1078e9938a5e1 100644 +index fc40ac6a45b8009767a6fe65e5d08175cee96335..25ef22d9ed99197c5935a5015af7c41d2b6c0b85 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java -@@ -2340,6 +2340,7 @@ public class ChromeTabbedActivity extends ChromeActivity& GetShortcutsNotPresentInMainMenu() { diff --git a/patches/chrome-browser-net-system_network_context_manager.cc.patch b/patches/chrome-browser-net-system_network_context_manager.cc.patch index 1177d662954c..76f102bf324d 100644 --- a/patches/chrome-browser-net-system_network_context_manager.cc.patch +++ b/patches/chrome-browser-net-system_network_context_manager.cc.patch @@ -1,8 +1,8 @@ diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc -index f483a6b0cbc8005203109b35ff0a45a4de275c60..4105cd79a0eee9c82b6d6c79e68a453a2c0d1dac 100644 +index e6caf4f3fb98596eb8665b7d2eeea7bed767367a..6aefd75b1c809f6f3711e9688534fbc0bc9bdf3a 100644 --- a/chrome/browser/net/system_network_context_manager.cc +++ b/chrome/browser/net/system_network_context_manager.cc -@@ -236,7 +236,7 @@ class SystemNetworkContextManager::URLLoaderFactoryForSystem +@@ -235,7 +235,7 @@ class SystemNetworkContextManager::URLLoaderFactoryForSystem if (!manager_) return; manager_->GetURLLoaderFactory()->CreateLoaderAndStart( diff --git a/patches/chrome-browser-prefs-browser_prefs.cc.patch b/patches/chrome-browser-prefs-browser_prefs.cc.patch index 45e1d9f4cfda..1d3685c81766 100644 --- a/patches/chrome-browser-prefs-browser_prefs.cc.patch +++ b/patches/chrome-browser-prefs-browser_prefs.cc.patch @@ -1,20 +1,20 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc -index 8cdb9027574ef553a3b9c37859423ddc60310525..3e5a85300e0675ced82f75ec2d122254342f6159 100644 +index 3c745be551e12f1a61ef56ff6f048bdff3a576e1..07b2e092f55f0d5becdd24cf40b97d8c420bf816 100644 --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc -@@ -1056,6 +1056,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) { +@@ -1057,6 +1057,7 @@ void RegisterLocalState(PrefRegistrySimple* registry) { #if defined(TOOLKIT_VIEWS) RegisterBrowserViewLocalPrefs(registry); #endif + brave::RegisterLocalStatePrefs(registry); - + // This is intentionally last. RegisterLocalStatePrefsForMigration(registry); -@@ -1359,6 +1360,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -1360,6 +1361,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, #endif - + RegisterProfilePrefsForMigration(registry); + brave::RegisterProfilePrefs(registry); } - + void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { diff --git a/patches/chrome-browser-profiles-profile_impl.cc.patch b/patches/chrome-browser-profiles-profile_impl.cc.patch index 4ab82ffa8689..6fa163833da5 100644 --- a/patches/chrome-browser-profiles-profile_impl.cc.patch +++ b/patches/chrome-browser-profiles-profile_impl.cc.patch @@ -1,11 +1,11 @@ diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc -index 3a757e266d7f3bcde5a381b37ecc8f7b0161bf28..6d77545cd626d1b33290bbd85e4d1cfd46327a62 100644 +index e9c1bb1588ec9ef5c3711cafc23a5015237cf91a..87d72918b395791690874dce7beea2b08dd7eccb 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc -@@ -380,7 +380,7 @@ std::unique_ptr Profile::CreateProfile(const base::FilePath& path, +@@ -383,7 +383,7 @@ std::unique_ptr Profile::CreateProfile(const base::FilePath& path, NOTREACHED(); } - + - std::unique_ptr profile = base::WrapUnique(new ProfileImpl( + std::unique_ptr profile = base::WrapUnique(new BraveProfileImpl( path, delegate, create_mode, creation_time, io_task_runner)); diff --git a/patches/chrome-browser-renderer_context_menu-render_view_context_menu.cc.patch b/patches/chrome-browser-renderer_context_menu-render_view_context_menu.cc.patch index 76b17c4ae4f5..3c73522a73e6 100644 --- a/patches/chrome-browser-renderer_context_menu-render_view_context_menu.cc.patch +++ b/patches/chrome-browser-renderer_context_menu-render_view_context_menu.cc.patch @@ -1,12 +1,12 @@ diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.cc b/chrome/browser/renderer_context_menu/render_view_context_menu.cc -index 5d5704536562b329098da2ce3a2b115f6703e49b..452b0c77f72efb920e0cbdbbe65cc63f1191c3be 100644 +index f9237e83afc92846eed44a436a8b0d7e1f39d1a3..20fd384a22ad512eea5d05414e000e940aee20fa 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc -@@ -1834,6 +1834,7 @@ void RenderViewContextMenu::AppendSearchProvider() { +@@ -1837,6 +1837,7 @@ void RenderViewContextMenu::AppendSearchProvider() { selection_navigation_url_ = match.destination_url; if (!selection_navigation_url_.is_valid()) return; + BRAVE_APPEND_SEARCH_PROVIDER - + std::u16string printable_selection_text = PrintableSelectionText(); EscapeAmpersands(&printable_selection_text); diff --git a/patches/chrome-browser-resources-settings-BUILD.gn.patch b/patches/chrome-browser-resources-settings-BUILD.gn.patch index 0eaa589808e7..bb08ea7a9545 100644 --- a/patches/chrome-browser-resources-settings-BUILD.gn.patch +++ b/patches/chrome-browser-resources-settings-BUILD.gn.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/settings/BUILD.gn b/chrome/browser/resources/settings/BUILD.gn -index bad0412e514359f2d16e3ada97e6764fd47cfe79..20ed910811a994093b68b1675725fb2697ee9506 100644 +index cf6bd0e20511c09c25b34585c9c5f1a0c27ac450..0cf37435faef53a5eecb4d96efb2d1dd010ef83a 100644 --- a/chrome/browser/resources/settings/BUILD.gn +++ b/chrome/browser/resources/settings/BUILD.gn @@ -53,6 +53,7 @@ if (optimize_webui) { diff --git a/patches/chrome-browser-resources-settings-privacy_page-privacy_page.html.patch b/patches/chrome-browser-resources-settings-privacy_page-privacy_page.html.patch index c65cd6880cd0..ce12ff322616 100644 --- a/patches/chrome-browser-resources-settings-privacy_page-privacy_page.html.patch +++ b/patches/chrome-browser-resources-settings-privacy_page-privacy_page.html.patch @@ -1,5 +1,5 @@ diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/chrome/browser/resources/settings/privacy_page/privacy_page.html -index 56a342be7add7a2227d9f66c0eb2d2e9d19337d6..80ac5a517f8a1b1d0fc3fe1f1d3cdccd8281dea4 100644 +index aec277e499a74cf00aac986dbe10b9399148c49e..42436ace5cec6dc1bf29841f995e91f293e625d8 100644 --- a/chrome/browser/resources/settings/privacy_page/privacy_page.html +++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html @@ -35,6 +35,7 @@ @@ -10,7 +10,7 @@ index 56a342be7add7a2227d9f66c0eb2d2e9d19337d6..80ac5a517f8a1b1d0fc3fe1f1d3cdccd @@ -18,7 +18,7 @@ index 56a342be7add7a2227d9f66c0eb2d2e9d19337d6..80ac5a517f8a1b1d0fc3fe1f1d3cdccd @@ -26,7 +26,7 @@ index 56a342be7add7a2227d9f66c0eb2d2e9d19337d6..80ac5a517f8a1b1d0fc3fe1f1d3cdccd