From 0bf212cf9bc9ad5c0ff8886115a99d29f4f6c7d9 Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Tue, 19 May 2026 10:48:25 +0200 Subject: [PATCH] Patches for v148 --- .../Add-bookmark-import-export-actions.patch | 8 +- ...nfigure-maximum-connections-per-host.patch | 9 +- ...tting-to-enable-Credman-for-passkeys.patch | 24 +- .../patches/Android-Pixel-Perfect-Mode.patch | 4 +- ...roid-fonts-fingerprinting-mitigation.patch | 25 +- .../patches/Chrome-web-store-protection.patch | 4 +- ...romite-Branding--improve-settings-ui.patch | 11 +- build/patches/Disable-Compose-feature.patch | 33 +- build/patches/Disable-TLS-resumption.patch | 38 +- build/patches/Disable-UA-full-version.patch | 2 +- .../patches/Disable-all-predictors-code.patch | 1372 +++++++++++++++-- .../Disable-integration-with-Gemini.patch | 359 ++++- build/patches/Disable-privacy-sandbox.patch | 4 +- .../Enable-Certificate-Transparency.patch | 7 +- .../Enable-extension-in-incognito.patch | 563 ++++--- .../patches/Enable-gwp-asan-on-Android.patch | 16 +- ...al-support-for-extensions-on-Android.patch | 364 ++++- .../Experimental-user-scripts-support.patch | 6 +- build/patches/Eyeo-Adblock-for-Cromite.patch | 103 +- .../patches/Improve-the-browser-sandbox.patch | 71 +- build/patches/Keyboard-protection-flag.patch | 4 +- .../Move-navigation-bar-to-bottom.patch | 126 +- .../patches/Partition-HSTS-cache-by-NAK.patch | 6 +- ...ning-all-cookies-by-top-frame-domain.patch | 8 +- ...redential-fingerprinting-mitigations.patch | 33 +- .../Remove-binary-blob-integrations.patch | 68 +- .../Restore-Simplified-NTP-launch.patch | 19 +- ...-button-in-top-toolbar-customization.patch | 48 +- .../Restore-chrome-password-store.patch | 6 +- build/patches/Show-NTP-at-startup.patch | 131 +- .../Use-list-mode-for-tab-switcher.patch | 55 +- .../eyeo-133.0.6943.49-extension_api.patch | 12 +- ...romium-Disable-translate-integration.patch | 229 ++- ...ed-chromium-no-special-hosts-domains.patch | 30 +- 34 files changed, 3148 insertions(+), 650 deletions(-) diff --git a/build/patches/Add-bookmark-import-export-actions.patch b/build/patches/Add-bookmark-import-export-actions.patch index b19a4fad..06d0c6cc 100644 --- a/build/patches/Add-bookmark-import-export-actions.patch +++ b/build/patches/Add-bookmark-import-export-actions.patch @@ -137,7 +137,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/bookmarks/B BackPressHelper.create( this, getOnBackPressedDispatcher(), mBookmarkManagerCoordinator); + -+ mBookmarkManagerCoordinator.setWindow(mWindowAndroid, ++ mBookmarkManagerCoordinator.setWindow(getWindowAndroid(), + getModalDialogManagerSupplier().get()); } @@ -150,13 +150,13 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/bookmarks/B + protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); + -+ mWindowAndroid.getIntentRequestTracker().saveInstanceState(outState); ++ getWindowAndroid().getIntentRequestTracker().saveInstanceState(outState); + } + + @Override + public void onRequestPermissionsResult( + int requestCode, String[] permissions, int[] grantResults) { -+ if (mWindowAndroid.handlePermissionResult(requestCode, permissions, grantResults)) ++ if (getWindowAndroid().handlePermissionResult(requestCode, permissions, grantResults)) + return; + super.onRequestPermissionsResult(requestCode, permissions, grantResults); + } @@ -232,7 +232,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse +#include "chrome/browser/bookmarks/bookmark_html_writer.h" +#include "chrome/browser/importer/profile_writer.h" +#include "chrome/browser/platform_util.h" -+#include "chrome/browser/ui/chrome_select_file_policy.h" ++#include "chrome/browser/ui/select_file_policy/chrome_select_file_policy.h" +#include "components/user_data_importer/common/imported_bookmark_entry.h" +#include "components/user_data_importer/content/content_bookmark_parser.h" +#include "components/user_data_importer/content/content_bookmark_parser_utils.h" diff --git a/build/patches/Add-flag-to-configure-maximum-connections-per-host.patch b/build/patches/Add-flag-to-configure-maximum-connections-per-host.patch index 73955d63..ff809cd2 100644 --- a/build/patches/Add-flag-to-configure-maximum-connections-per-host.patch +++ b/build/patches/Add-flag-to-configure-maximum-connections-per-host.patch @@ -11,8 +11,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../common/network_switch_list.h | 4 ++++ .../spoof_checks/top_domains/BUILD.gn | 1 + ...o-configure-maximum-connections-per-host.inc | 17 +++++++++++++++++ - net/socket/client_socket_pool_manager.cc | 17 +++++++++++++++++ - 4 files changed, 39 insertions(+) + net/socket/client_socket_pool_manager.cc | 16 ++++++++++++++++ + 4 files changed, 38 insertions(+) create mode 100644 cromite_flags/chrome/browser/about_flags_cc/add-flag-to-configure-maximum-connections-per-host.inc diff --git a/components/network_session_configurator/common/network_switch_list.h b/components/network_session_configurator/common/network_switch_list.h @@ -76,12 +76,11 @@ diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket #include "net/ssl/ssl_config.h" #include "url/gurl.h" #include "url/scheme_host_port.h" -@@ -169,6 +173,19 @@ void ClientSocketPoolManager::set_socket_soft_cap_per_pool_for_test( +@@ -169,6 +173,18 @@ void ClientSocketPoolManager::set_socket_soft_cap_per_pool_for_test( // static size_t ClientSocketPoolManager::max_sockets_per_group( HttpNetworkSession::SocketPoolType pool_type) { -+ -+ if (pool_type == HttpNetworkSession::NORMAL_SOCKET_POOL) { ++ if (pool_type == net::HttpNetworkSession::SocketPoolType::kNormal) { + int maxConnectionsPerHost = 0; + auto value = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kMaxConnectionsPerHost); + if (!value.empty() && !base::StringToInt(value, &maxConnectionsPerHost)) { diff --git a/build/patches/Add-setting-to-enable-Credman-for-passkeys.patch b/build/patches/Add-setting-to-enable-Credman-for-passkeys.patch index d7ab7342..dc53c66d 100644 --- a/build/patches/Add-setting-to-enable-Credman-for-passkeys.patch +++ b/build/patches/Add-setting-to-enable-Credman-for-passkeys.patch @@ -19,9 +19,9 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../webauthn/android/webauthn_feature_map.cc | 1 + components/webauthn/features.cc | 4 +++ components/webauthn/features.h | 3 +++ - device/fido/public/features.cc | 2 ++ + device/fido/public/features.cc | 1 + .../authentication_credentials_container.cc | 5 ++++ - 11 files changed, 74 insertions(+), 33 deletions(-) + 11 files changed, 73 insertions(+), 33 deletions(-) create mode 100644 chrome/browser/ui/android/strings/cromite_android_chrome_strings_grd/Add-setting-to-enable-Credman-for-passkeys.grdp diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java @@ -317,22 +317,14 @@ diff --git a/components/webauthn/features.h b/components/webauthn/features.h diff --git a/device/fido/public/features.cc b/device/fido/public/features.cc --- a/device/fido/public/features.cc +++ b/device/fido/public/features.cc -@@ -130,6 +130,7 @@ BASE_FEATURE(kWebAuthnPublishPrelinkingInfo, - "WebAuthenticationPublishPrelinkingInfo", - base::FEATURE_DISABLED_BY_DEFAULT); - #endif // BUILDFLAG(IS_ANDROID) +@@ -183,6 +183,7 @@ BASE_FEATURE_PARAM(int, + BASE_FEATURE(kWebAuthnImmediateGet, + "WebAuthenticationImmediateGet", + base::FEATURE_ENABLED_BY_DEFAULT); +SET_CROMITE_FEATURE_DISABLED(kWebAuthnImmediateGet); - // Disabled by default. - BASE_FEATURE(kWebAuthnHelloSignal, -@@ -189,6 +190,7 @@ BASE_FEATURE_PARAM(int, - &kWebAuthnImmediateGet, - "timeout_ms", - kDefaultImmediateMediationTimeoutMs); -+SET_CROMITE_FEATURE_DISABLED(kWebAuthnImmediateGetAutoselect); - - // Deprecation flag. Disabled by default in M142. Remove in or after M145. - BASE_FEATURE(kWebAuthnSendPinGeneration, + BASE_FEATURE_PARAM(int, + kWebAuthnImmediateMediationTimeoutMilliseconds, diff --git a/third_party/blink/renderer/modules/credentialmanagement/authentication_credentials_container.cc b/third_party/blink/renderer/modules/credentialmanagement/authentication_credentials_container.cc --- a/third_party/blink/renderer/modules/credentialmanagement/authentication_credentials_container.cc +++ b/third_party/blink/renderer/modules/credentialmanagement/authentication_credentials_container.cc diff --git a/build/patches/Android-Pixel-Perfect-Mode.patch b/build/patches/Android-Pixel-Perfect-Mode.patch index 6905fe5d..0a5dd54f 100644 --- a/build/patches/Android-Pixel-Perfect-Mode.patch +++ b/build/patches/Android-Pixel-Perfect-Mode.patch @@ -485,7 +485,7 @@ diff --git a/cc/trees/property_tree.cc b/cc/trees/property_tree.cc diff --git a/chrome/android/java/res/xml/developer_preferences.xml b/chrome/android/java/res/xml/developer_preferences.xml --- a/chrome/android/java/res/xml/developer_preferences.xml +++ b/chrome/android/java/res/xml/developer_preferences.xml -@@ -40,4 +40,8 @@ found in the LICENSE file. +@@ -45,4 +45,8 @@ found in the LICENSE file. android:summary="@string/android_fonts_fingerprinting_mitigation_summary" app:featureName="android-fonts-fingerprinting-mitigation" app:needRestart="true" /> @@ -851,7 +851,7 @@ diff --git a/components/thin_webview/internal/thin_webview.cc b/components/thin_ web_contents_->GetNativeView()->OnPhysicalBackingSizeChanged(size); - web_contents_->GetNativeView()->OnSizeChanged(size.width(), size.height()); -+ web_contents_->GetNativeView()->OnSizeChanged(size.width(), size.height(), size.height()); ++ web_contents_->GetNativeView()->OnSizeChanged(size.width(), size.height(), size.width(), size.height()); } } // namespace android diff --git a/build/patches/Android-fonts-fingerprinting-mitigation.patch b/build/patches/Android-fonts-fingerprinting-mitigation.patch index dc8b4271..e6f95916 100644 --- a/build/patches/Android-fonts-fingerprinting-mitigation.patch +++ b/build/patches/Android-fonts-fingerprinting-mitigation.patch @@ -46,9 +46,9 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../skia/src/ports/SkFontMgr_android.cpp | 286 ++- .../skia/src/ports/SkFontMgr_android_data.cpp | 1641 +++++++++++++++++ .../skia/src/ports/SkFontMgr_android_ndk.cpp | 2 +- - .../src/ports/SkFontMgr_android_parser.cpp | 66 +- + .../src/ports/SkFontMgr_android_parser.cpp | 69 +- .../skia/src/ports/SkFontMgr_android_parser.h | 5 +- - 42 files changed, 2449 insertions(+), 88 deletions(-) + 42 files changed, 2451 insertions(+), 89 deletions(-) create mode 100644 chrome/browser/ui/android/strings/cromite_android_chrome_strings_grd/Android-fonts-fingerprinting-mitigation.grdp create mode 100644 components/component_updater/installer_policies/fonts_pack_component_installer.cc create mode 100644 components/component_updater/installer_policies/fonts_pack_component_installer.h @@ -109,10 +109,10 @@ diff --git a/build/config/freetype/freetype.gni b/build/config/freetype/freetype diff --git a/chrome/android/java/res/xml/developer_preferences.xml b/chrome/android/java/res/xml/developer_preferences.xml --- a/chrome/android/java/res/xml/developer_preferences.xml +++ b/chrome/android/java/res/xml/developer_preferences.xml -@@ -23,4 +23,9 @@ found in the LICENSE file. - android:title="Hint: You can also enable Developer options on Beta/Stable channels by tapping the Chrome version in "Settings > About Chrome" multiple times." - app:allowDividerAbove="false" - app:allowDividerBelow="false" /> +@@ -28,4 +28,9 @@ found in the LICENSE file. + android:summary="@string/android_gpu_sandbox_summary" + app:featureName="android-gpu-sandbox" + app:needRestart="true" /> + + // Therefore, we only attempt to parse them on modern devices (Android Lollipop+). + // Pre-21 systems fall through to the legacy fallback fonts handling below. ++ if (!custom) + SkFontMgr_Android_Parser::GetCustomFontFamilies( +- fontFamilies, basePath, PRODUCT_CUSTOMIZATION_FILE, nullptr, nullptr); ++ fontFamilies, basePath, custom, PRODUCT_CUSTOMIZATION_FILE, nullptr, nullptr); + return; + } // Append all the fallback fonts to system fonts std::vector> fallbackFonts; @@ -3276,7 +3285,7 @@ diff --git a/third_party/skia/src/ports/SkFontMgr_android_parser.cpp b/third_par fontFamilies.insert(fontFamilies.end(), std::make_move_iterator(fallbackFonts.begin()), std::make_move_iterator(fallbackFonts.end())); -@@ -898,15 +933,16 @@ void SkFontMgr_Android_Parser::GetSystemFontFamilies( +@@ -898,15 +934,16 @@ void SkFontMgr_Android_Parser::GetSystemFontFamilies( void SkFontMgr_Android_Parser::GetCustomFontFamilies( std::vector>& fontFamilies, const SkString& basePath, diff --git a/build/patches/Chrome-web-store-protection.patch b/build/patches/Chrome-web-store-protection.patch index 197b8975..73235d47 100644 --- a/build/patches/Chrome-web-store-protection.patch +++ b/build/patches/Chrome-web-store-protection.patch @@ -339,8 +339,8 @@ diff --git a/chrome/browser/extensions/updater/extension_updater.cc b/chrome/bro } // Remove extensions that aren't in an autoupdatable location. if (!Manifest::IsAutoUpdateableLocation(extension->location())) { -+ LOG(INFO) << "Extension " << extension.id() << " is not auto updateable: " -+ << "location=" << extension.location(); ++ LOG(INFO) << "Extension " << extension->id() << " is not auto updateable: " ++ << "location=" << extension->location(); return true; } } else { diff --git a/build/patches/Cromite-Branding--improve-settings-ui.patch b/build/patches/Cromite-Branding--improve-settings-ui.patch index 1fc07554..a5606811 100644 --- a/build/patches/Cromite-Branding--improve-settings-ui.patch +++ b/build/patches/Cromite-Branding--improve-settings-ui.patch @@ -8,10 +8,10 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- chrome/android/chrome_java_resources.gni | 2 +- .../android/java/res/xml/main_preferences.xml | 4 +- - .../res/xml/privacy_preferences_cromite.xml | 191 ++++++++++++++++++ + .../res/xml/privacy_preferences_cromite.xml | 196 ++++++++++++++++++ .../privacy/settings/PrivacySettings.java | 6 +- .../Cromite-settings-ui.grdp | 15 ++ - 5 files changed, 213 insertions(+), 5 deletions(-) + 5 files changed, 218 insertions(+), 5 deletions(-) create mode 100644 chrome/android/java/res/xml/privacy_preferences_cromite.xml create mode 100644 chrome/browser/ui/android/strings/cromite_android_chrome_strings_grd/Cromite-settings-ui.grdp @@ -52,7 +52,7 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences_cromite.xml b/chrom new file mode 100644 --- /dev/null +++ b/chrome/android/java/res/xml/privacy_preferences_cromite.xml -@@ -0,0 +1,191 @@ +@@ -0,0 +1,196 @@ +