From 81d5846fdc7dd0a79442ce67689f23622cae91fd Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Fri, 19 Jan 2024 15:25:09 +0100 Subject: [PATCH 1/5] Patches for 121 --- build/RELEASE | 2 +- ...Plus-add-blocking-in-service-workers.patch | 14 +- .../00Add-a-flag-to-disable-GamePad-API.patch | 6 +- .../patches/00Add-cromite-flags-support.patch | 150 +-- .../00Add-option-to-disable-snapshots.patch | 131 +-- .../00Add-setting-to-clear-data-on-exit.patch | 71 +- ...d-setting-to-invert-tap-and-long-tap.patch | 100 +- build/patches/00Add-support-to-jxl.patch | 32 +- ...PiP-if-PopupsAndRedirects-are-active.patch | 2 +- ...ays-open-browser-controls-in-new-tab.patch | 12 +- .../00Chrome-web-store-protection.patch | 58 +- ...ORS-Preflight-Cache-on-clearing-data.patch | 2 +- ...ress-libchrome-to-free-up-some-space.patch | 2 +- build/patches/00Cromite-Branding.patch | 8 +- .../patches/00Customize-selection-popup.patch | 190 ++-- ...0Deprecate-Data-URL-in-SVGUseElement.patch | 2 +- .../00Disable-Android-AppRestrictions.patch | 2 +- .../patches/00Disable-Component-Updates.patch | 6 +- ...ble-Compression-Dictionary-Transport.patch | 2 +- build/patches/00Disable-FedCm.patch | 2 +- .../patches/00Disable-Feeback-Collector.patch | 15 +- ...-FirstPartySets-and-StorageAccessAPI.patch | 2 +- build/patches/00Disable-GSA-by-default.patch | 32 +- ...0Disable-GetInstalledRelatedApps-API.patch | 8 +- build/patches/00Disable-Real-Box.patch | 6 +- ...vice-and-Shared-workers-on-3P-iframe.patch | 4 +- build/patches/00Disable-WebGPU.patch | 8 +- ...ers-reduced-transparency-media-query.patch | 2 +- ...e-privacy-issues-in-password-manager.patch | 8 +- ...ble-remote-altsvc-for-h3-connections.patch | 2 +- ...isable-speechSynthesis-getVoices-API.patch | 10 +- ...sallowing-MIDI-permission-by-default.patch | 23 +- ...ndroid-Dynamic-Performance-Framework.patch | 2 +- ...le-Document-Open-Inheritance-Removal.patch | 4 +- ...0Enable-ImprovedBookmarks-by-default.patch | 28 +- .../00Enable-gwp-asan-on-Android.patch | 67 +- ...le-search-engine-settings-desktop-ui.patch | 102 +- ...ivation-of-the-js-debugger-statement.patch | 18 +- ...ct-the-entire-FrameTree-like-desktop.patch | 2 +- ...00Eyeo-Adblock-Remove-Privacy-Issues.patch | 44 +- build/patches/00Fix-chromium-build-bugs.patch | 12 +- .../00Fonts-fingerprinting-mitigation.patch | 18 +- build/patches/00Internal-firewall.patch | 44 +- ...00Keep-Side-Panel-Companion-disabled.patch | 11 +- .../00Keep-disabled-FetchLaterAPI.patch | 2 +- .../patches/00Keyboard-protection-flag.patch | 2 +- ...ing-attributes-in-some-html-elements.patch | 20 +- .../00Partition-HSTS-cache-by-NAK.patch | 64 +- ...00Partition-MediaDeviceId-by-default.patch | 2 +- ...ning-all-cookies-by-top-frame-domain.patch | 26 +- .../00Remove-ChromiumNetworkAdapter.patch | 74 +- ...th-header-upon-cross-origin-redirect.patch | 2 +- ...0Remove-detection-of-captive-portals.patch | 2 +- ...t-for-device-memory-and-cpu-recovery.patch | 2 +- .../00Restore-LastTabStandingTracker.patch | 10 +- .../00Show-full-urls-for-bookmark.patch | 2 +- ...-Add-a-log-to-track-strange-behavior.patch | 2 +- ...formanceNavigationTiming-privacy-fix.patch | 2 +- ...ileSystemAccessPersistentPermissions.patch | 4 +- .../00Use-list-mode-for-tab-switcher.patch | 8 +- .../00WIN-Disable-TabHoverCard-images.patch | 2 +- build/patches/00WIN-Disable-sharing-hub.patch | 2 +- ...-enable-file-system-access-blocklist.patch | 28 +- build/patches/00WIN-enable-pdf-plugin.patch | 2 +- ...message-for-unsupported-hardware-aes.patch | 10 +- build/patches/00add-browser-policy.patch | 22 +- ...ot-block-build-incompatible-profiles.patch | 2 +- .../AImageReader-CFI-crash-mitigations.patch | 12 +- .../Add-AllowUserCertificates-flag.patch | 26 +- ...dd-Alt-D-hotkey-to-focus-address-bar.patch | 10 +- .../Add-a-proxy-configuration-page.patch | 34 +- .../Add-an-always-incognito-mode.patch | 330 +++---- build/patches/Add-autoplay-site-setting.patch | 10 +- .../Add-bookmark-import-export-actions.patch | 203 ++-- ...dd-custom-tab-intents-privacy-option.patch | 24 +- build/patches/Add-exit-menu-item.patch | 20 +- ...g-for-omnibox-autocomplete-filtering.patch | 6 +- ...nfigure-maximum-connections-per-host.patch | 2 +- .../Add-flag-to-disable-IPv6-probes.patch | 8 +- .../Add-flag-to-disable-vibration.patch | 4 +- ...-switch-for-unsupported-clangd-flags.patch | 6 +- ...Add-lifetime-options-for-permissions.patch | 122 +-- .../Add-menu-item-to-bookmark-all-tabs.patch | 103 +- .../Add-menu-item-to-view-source.patch | 10 +- .../Add-option-to-force-tablet-UI.patch | 66 +- ...-to-not-persist-tabs-across-sessions.patch | 12 +- .../Add-option-to-use-home-page-as-NTP.patch | 82 +- build/patches/Add-search-engine.patch | 4 +- build/patches/Add-site-engagement-flag.patch | 6 +- ...-support-for-ISupportHelpAndFeedback.patch | 14 +- .../Add-support-for-writing-URIs.patch | 8 +- build/patches/Add-webGL-site-setting.patch | 14 +- build/patches/Add-webRTC-site-settings.patch | 6 +- ...ow-building-without-enable_reporting.patch | 48 +- ...ow-building-without-supervised-users.patch | 96 +- .../Allow-playing-audio-in-background.patch | 4 +- ...e-new-tab-page-for-default-home-page.patch | 28 +- ...Block-gateway-attacks-via-websockets.patch | 4 +- .../Block-qjz9zk-or-trk-requests.patch | 8 +- build/patches/Bromite-auto-updater.patch | 137 ++- .../Bromite-subresource-adblocker.patch | 36 +- build/patches/Client-hints-overrides.patch | 12 +- .../Content-settings-infrastructure.patch | 297 +++--- ...ctionary-suggestions-for-the-Omnibox.patch | 6 +- ...ble-Accessibility-service-by-default.patch | 2 +- .../Disable-FLoC-and-privacy-sandbox.patch | 47 +- build/patches/Disable-PrivacyGuide.patch | 2 +- .../Disable-StartSurface-feature.patch | 8 +- build/patches/Disable-TLS-resumption.patch | 8 +- build/patches/Disable-UA-full-version.patch | 8 +- .../Disable-add-to-home-screen-prompt.patch | 29 +- .../patches/Disable-all-predictors-code.patch | 54 +- build/patches/Disable-all-promo-dialogs.patch | 18 +- .../Disable-conversion-measurement-api.patch | 338 ++++--- build/patches/Disable-crash-reporting.patch | 2 +- .../Disable-feeds-support-by-default.patch | 8 +- ...Disable-fetching-of-all-field-trials.patch | 57 +- build/patches/Disable-idle-detection.patch | 44 +- ...-lock-icon-in-address-bar-by-default.patch | 2 +- ...media-router-and-remoting-by-default.patch | 27 +- .../Disable-minidump-upload-scheduling.patch | 6 +- .../patches/Disable-plugins-enumeration.patch | 2 +- build/patches/Disable-safety-check.patch | 47 +- .../Disable-smart-selection-by-default.patch | 17 +- .../Disable-text-fragments-by-default.patch | 6 +- .../Disable-third-party-origin-trials.patch | 16 +- build/patches/Disable-update-scheduler.patch | 2 +- build/patches/Disable-various-metrics.patch | 16 +- .../Do-not-build-API-keys-infobar.patch | 2 +- .../Do-not-compile-QR-code-sharing.patch | 34 +- ...ore-download-location-prompt-setting.patch | 9 +- .../patches/Do-not-link-with-libatomic.patch | 2 +- build/patches/DoH-improvements.patch | 2 +- .../Enable-Certificate-Transparency.patch | 33 +- build/patches/Enable-HEVC-by-default.patch | 2 +- ...ctOriginIsolation-and-SitePerProcess.patch | 4 +- ...e-darken-websites-checkbox-in-themes.patch | 4 +- .../Enable-native-Android-autofill.patch | 144 ++- build/patches/Enable-share-intent.patch | 34 +- .../Experimental-user-scripts-support.patch | 79 +- .../Follow-only-system-dark-mode.patch | 6 +- .../Guard-for-user-agent-reduction.patch | 6 +- ...ing-against-incognito-mode-detection.patch | 2 +- ...story-number-of-days-privacy-setting.patch | 60 +- ...e-enterprise-policies-for-secure-DNS.patch | 26 +- .../patches/Improve-the-browser-sandbox.patch | 4 +- ...ripts-for-AMP-tracking-ads-and-video.patch | 12 +- .../Invalidate-components-public-key.patch | 2 +- build/patches/JIT-site-settings.patch | 4 +- .../Keep-empty-tabs-between-sessions.patch | 24 +- ...-allow-screenshots-in-Incognito-mode.patch | 12 +- build/patches/Logcat-crash-reports-UI.patch | 39 +- .../patches/Modify-default-preferences.patch | 26 +- .../Move-navigation-bar-to-bottom.patch | 883 +++++++++-------- ...nt-settings-back-to-privacy-settings.patch | 22 +- .../Multiple-fingerprinting-mitigations.patch | 52 +- ...HTTP-probes-for-connection-detection.patch | 2 +- build/patches/OpenSearch-miscellaneous.patch | 8 +- .../patches/Override-Navigator-Language.patch | 6 +- .../Partition-Blink-memory-cache.patch | 28 +- .../Partition-blobs-by-top-frame-URL.patch | 14 +- ...-modal-dialog-flag-to-close-all-tabs.patch | 14 +- ...e-introduce-override_build_timestamp.patch | 2 +- ...ders-in-DoH-requests-to-bare-minimum.patch | 2 +- build/patches/Remove-EV-certificates.patch | 2 +- ...referrals-in-cross-origin-navigation.patch | 32 +- build/patches/Remove-SMS-integration.patch | 221 +++-- .../Remove-binary-blob-integrations.patch | 911 ++++++++++-------- ...cklisted-URLs-upon-bookmark-creation.patch | 2 +- build/patches/Remove-help-menu-item.patch | 156 ++- ...load-of-com.google.android.gms.fonts.patch | 2 +- .../Remove-segmentation-platform.patch | 14 +- ...Remove-voice-recognition-integration.patch | 232 ++--- ...ndow-name-on-cross-origin-navigation.patch | 4 +- .../Restore-Search-Ready-Omnibox-flag.patch | 12 +- .../Restore-Simplified-NTP-launch.patch | 66 +- ...-button-in-top-toolbar-customization.patch | 81 +- .../Restore-classic-new-tab-page.patch | 40 +- .../Restore-offline-indicator-v2-flag.patch | 20 +- ...Delete-block-external-form-redirects.patch | 8 +- ...emove-disable-pull-to-refresh-effect.patch | 2 +- ...l-of-execution-context-address-space.patch | 4 +- ...-Note-9-SDK27-crazylinker-workaround.patch | 8 +- ...tings-for-cookies-javascript-and-ads.patch | 70 +- build/patches/Site-setting-for-images.patch | 2 +- build/patches/Timezone-customization.patch | 26 +- .../Use-4-tile-rows-never-show-logo.patch | 10 +- build/patches/Use-dummy-DFM-installer.patch | 205 ++-- build/patches/User-agent-customization.patch | 129 +-- build/patches/Viewport-Protection-flag.patch | 81 +- build/patches/Welcome-screen.patch | 89 +- build/patches/autofill-miscellaneous.patch | 110 +-- build/patches/bromite-build-utils.patch | 4 +- ...build-remove-calling-untrusted-hooks.patch | 12 +- .../disable-WebView-variations-support.patch | 4 +- ...IPv6-connectivity-probes-to-RIPE-DNS.patch | 2 +- .../eyeo-beta-118.0.5993.48-android_api.patch | 30 +- ...-beta-118.0.5993.48-android_settings.patch | 15 +- .../eyeo-beta-118.0.5993.48-base.patch | 72 +- ...eta-118.0.5993.48-chrome_integration.patch | 112 +-- ...yeo-beta-118.0.5993.48-extension_api.patch | 40 +- build/patches/kill-Auth.patch | 57 +- .../kill-Location-fall-back-to-system.patch | 25 +- build/patches/kill-Vision.patch | 4 +- ...net-cert-increase-default-key-length.patch | 2 +- ...always-prompt-for-download-directory.patch | 2 +- .../sharing-hub-always-use-visible-URL.patch | 2 +- ...le-fetching-of-languages-from-server.patch | 4 +- .../ungoogled-chromium-Disable-Gaia.patch | 4 +- ...gled-chromium-Disable-profile-avatar.patch | 2 +- ...romium-Disable-translate-integration.patch | 79 +- ...chromium-Disable-webRTC-log-uploader.patch | 4 +- ...ed-chromium-no-special-hosts-domains.patch | 83 +- ...RTC-do-not-expose-local-IP-addresses.patch | 4 +- ...iew-Hard-no-to-persistent-histograms.patch | 2 +- 215 files changed, 4567 insertions(+), 4284 deletions(-) diff --git a/build/RELEASE b/build/RELEASE index 38afa620d..6342d569c 100644 --- a/build/RELEASE +++ b/build/RELEASE @@ -1 +1 @@ -120.0.6099.230 +121.0.6167.75 \ No newline at end of file diff --git a/build/patches/00AdblockPlus-add-blocking-in-service-workers.patch b/build/patches/00AdblockPlus-add-blocking-in-service-workers.patch index 9207c3421..cf22fb52e 100644 --- a/build/patches/00AdblockPlus-add-blocking-in-service-workers.patch +++ b/build/patches/00AdblockPlus-add-blocking-in-service-workers.patch @@ -401,7 +401,7 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.h b/chrome/br diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc -@@ -6328,7 +6328,9 @@ ChromeContentBrowserClient:: +@@ -6305,7 +6305,9 @@ ChromeContentBrowserClient:: } bool ChromeContentBrowserClient::WillInterceptWebSocket( @@ -412,7 +412,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch #if BUILDFLAG(ENABLE_EXTENSIONS) if (!frame) { return false; -@@ -6349,9 +6351,11 @@ bool ChromeContentBrowserClient::WillInterceptWebSocket( +@@ -6328,9 +6330,11 @@ bool ChromeContentBrowserClient::WillInterceptWebSocket( } void ChromeContentBrowserClient::CreateWebSocket( @@ -427,7 +427,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch diff --git a/chrome/browser/chrome_content_browser_client.h b/chrome/browser/chrome_content_browser_client.h --- a/chrome/browser/chrome_content_browser_client.h +++ b/chrome/browser/chrome_content_browser_client.h -@@ -630,11 +630,15 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -642,11 +642,15 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { CreateURLLoaderHandlerForServiceWorkerNavigationPreload( int frame_tree_node_id, const network::ResourceRequest& resource_request) override; @@ -683,7 +683,7 @@ diff --git a/content/browser/websockets/websocket_connector_impl.cc b/content/br diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -1016,7 +1016,7 @@ bool ContentBrowserClient::WillCreateURLLoaderFactory( +@@ -1023,7 +1023,7 @@ bool ContentBrowserClient::WillCreateURLLoaderFactory( return false; } @@ -692,7 +692,7 @@ diff --git a/content/public/browser/content_browser_client.cc b/content/public/b return false; } -@@ -1025,9 +1025,11 @@ uint32_t ContentBrowserClient::GetWebSocketOptions(RenderFrameHost* frame) { +@@ -1032,9 +1032,11 @@ uint32_t ContentBrowserClient::GetWebSocketOptions(RenderFrameHost* frame) { } void ContentBrowserClient::CreateWebSocket( @@ -707,7 +707,7 @@ diff --git a/content/public/browser/content_browser_client.cc b/content/public/b diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -1842,7 +1842,7 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1859,7 +1859,7 @@ class CONTENT_EXPORT ContentBrowserClient { scoped_refptr navigation_response_task_runner); // Returns true when the embedder wants to intercept a websocket connection. @@ -716,7 +716,7 @@ diff --git a/content/public/browser/content_browser_client.h b/content/public/br // Returns the WebSocket creation options. virtual uint32_t GetWebSocketOptions(RenderFrameHost* frame); -@@ -1864,9 +1864,11 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1881,9 +1881,11 @@ class CONTENT_EXPORT ContentBrowserClient { // Always called on the UI thread and only when the Network Service is // enabled. virtual void CreateWebSocket( diff --git a/build/patches/00Add-a-flag-to-disable-GamePad-API.patch b/build/patches/00Add-a-flag-to-disable-GamePad-API.patch index 0b029af6e..7b7239b36 100644 --- a/build/patches/00Add-a-flag-to-disable-GamePad-API.patch +++ b/build/patches/00Add-a-flag-to-disable-GamePad-API.patch @@ -14,8 +14,8 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json -@@ -6884,9 +6884,9 @@ - "expiry_milestone": 121 +@@ -7058,9 +7058,9 @@ + "expiry_milestone": 123 }, { - "name": "restrict-gamepad-access", @@ -29,7 +29,7 @@ diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.js diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc -@@ -3001,7 +3001,7 @@ const char kResetShortcutCustomizationsDescription[] = +@@ -3078,7 +3078,7 @@ const char kResetShortcutCustomizationsDescription[] = const char kRestrictGamepadAccessName[] = "Restrict gamepad access"; const char kRestrictGamepadAccessDescription[] = diff --git a/build/patches/00Add-cromite-flags-support.patch b/build/patches/00Add-cromite-flags-support.patch index ad2e70e9d..7ed92c626 100644 --- a/build/patches/00Add-cromite-flags-support.patch +++ b/build/patches/00Add-cromite-flags-support.patch @@ -128,7 +128,7 @@ diff --git a/base/BUILD.gn b/base/BUILD.gn sources = [ "allocator/allocator_check.cc", "allocator/allocator_check.h", -@@ -1037,7 +1039,7 @@ component("base") { +@@ -1030,7 +1032,7 @@ component("base") { "//build/config/compiler:wglobal_constructors", ] @@ -160,7 +160,7 @@ diff --git a/base/android/feature_map.cc b/base/android/feature_map.cc diff --git a/base/feature_list.cc b/base/feature_list.cc --- a/base/feature_list.cc +++ b/base/feature_list.cc -@@ -29,6 +29,33 @@ +@@ -30,6 +30,33 @@ #include "base/strings/stringprintf.h" #include "build/build_config.h" @@ -194,7 +194,7 @@ diff --git a/base/feature_list.cc b/base/feature_list.cc namespace base { namespace { -@@ -436,6 +463,48 @@ bool FeatureList::IsEnabled(const Feature& feature) { +@@ -441,6 +468,48 @@ bool FeatureList::IsEnabled(const Feature& feature) { return g_feature_list_instance->IsFeatureEnabled(feature); } @@ -243,7 +243,7 @@ diff --git a/base/feature_list.cc b/base/feature_list.cc // static bool FeatureList::IsValidFeatureOrFieldTrialName(StringPiece name) { return IsStringASCII(name) && name.find_first_of(",<*") == std::string::npos; -@@ -616,6 +685,17 @@ void FeatureList::SetCachingContextForTesting(uint16_t caching_context) { +@@ -662,6 +731,17 @@ void FeatureList::AddEarlyAllowedFeatureForTesting(std::string feature_name) { void FeatureList::FinalizeInitialization() { DCHECK(!initialized_); @@ -264,7 +264,7 @@ diff --git a/base/feature_list.cc b/base/feature_list.cc diff --git a/base/feature_list.h b/base/feature_list.h --- a/base/feature_list.h +++ b/base/feature_list.h -@@ -93,8 +93,10 @@ enum FeatureState { +@@ -94,8 +94,10 @@ enum FeatureState { // [1]: // https://crsrc.org/c/docs/speed/binary_size/android_binary_size_trybot.md#Mutable-Constants struct BASE_EXPORT LOGICALLY_CONST Feature { @@ -277,7 +277,7 @@ diff --git a/base/feature_list.h b/base/feature_list.h #if BUILDFLAG(ENABLE_BANNED_BASE_FEATURE_PREFIX) if (StringPiece(name).find(BUILDFLAG(BANNED_BASE_FEATURE_PREFIX)) == 0) { LOG(FATAL) << "Invalid feature name " << name << " starts with " -@@ -120,6 +122,9 @@ struct BASE_EXPORT LOGICALLY_CONST Feature { +@@ -121,6 +123,9 @@ struct BASE_EXPORT LOGICALLY_CONST Feature { // command line switch. const FeatureState default_state; @@ -287,7 +287,7 @@ diff --git a/base/feature_list.h b/base/feature_list.h private: friend class FeatureList; -@@ -395,6 +400,11 @@ class BASE_EXPORT FeatureList { +@@ -396,6 +401,11 @@ class BASE_EXPORT FeatureList { // instance, which is checked in builds with DCHECKs enabled. static bool IsEnabled(const Feature& feature); @@ -299,7 +299,7 @@ diff --git a/base/feature_list.h b/base/feature_list.h // Some characters are not allowed to appear in feature names or the // associated field trial names, as they are used as special characters for // command-line serialization. This function checks that the strings are ASCII -@@ -616,4 +626,62 @@ class BASE_EXPORT FeatureList { +@@ -652,4 +662,62 @@ class BASE_EXPORT FeatureList { } // namespace base @@ -396,16 +396,16 @@ diff --git a/build/android/gyp/java_cpp_features.py b/build/android/gyp/java_cpp diff --git a/chrome/android/java/res/values/values.xml b/chrome/android/java/res/values/values.xml --- a/chrome/android/java/res/values/values.xml +++ b/chrome/android/java/res/values/values.xml -@@ -44,6 +44,9 @@ found in the LICENSE file. - - 0.95 +@@ -9,6 +9,9 @@ found in the LICENSE file. + xmlns:tools="http://schemas.android.com/tools" + tools:ignore="MissingTranslation"> + Open Cromite flags list + chrome://flags/cromite + - - 0.5 - 0 + + -@@ -2772,6 +2778,9 @@ To change this setting, <resetlink>reset sync

<resetlink>reset sync

Open in new Chrome tab @@ -239,7 +239,7 @@ diff --git a/components/browser_ui/accessibility/android/java/res/xml/accessibil diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java --- a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java +++ b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java -@@ -36,6 +36,7 @@ public class AccessibilitySettings extends PreferenceFragmentCompat +@@ -34,6 +34,7 @@ public class AccessibilitySettings extends PreferenceFragmentCompat private BooleanPreferenceDelegate mForceTabletUIDelegate; static final String PREF_FORCE_TABLET_UI = "force_tablet_ui"; static final String PREF_MOVE_TOOLBAR_TO_BOTTOM = "move_toolbar_bottom"; @@ -247,15 +247,15 @@ diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/c private TextScalePreference mTextScalePref; private PageZoomPreference mPageZoomDefaultZoomPref; private ChromeSwitchPreference mPageZoomAlwaysShowPref; -@@ -45,6 +46,7 @@ public class AccessibilitySettings extends PreferenceFragmentCompat +@@ -43,6 +44,7 @@ public class AccessibilitySettings extends PreferenceFragmentCompat private BooleanPreferenceDelegate mReaderForAccessibilityDelegate; private double mPageZoomLatestDefaultZoomPrefValue; private BooleanPreferenceDelegate mMoveTopToolbarToBottomDelegate; + private BooleanPreferenceDelegate mShowAlwaysContextMenuOnLinksDelegate; private FontSizePrefs mFontSizePrefs; - private FontSizePrefsObserver mFontSizePrefsObserver = new FontSizePrefsObserver() { -@@ -137,6 +139,12 @@ public class AccessibilitySettings extends PreferenceFragmentCompat + private FontSizePrefsObserver mFontSizePrefsObserver = +@@ -143,6 +145,12 @@ public class AccessibilitySettings extends PreferenceFragmentCompat mMoveToolbarToBottomPref.setChecked(mMoveTopToolbarToBottomDelegate.isEnabled()); mMoveToolbarToBottomPref.setOnPreferenceChangeListener(this); @@ -266,9 +266,9 @@ diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/c + mShowAlwaysContextMenuOnLinksPref.setOnPreferenceChangeListener(this); + Preference captions = findPreference(PREF_CAPTIONS); - captions.setOnPreferenceClickListener(preference -> { - Intent intent = new Intent(Settings.ACTION_CAPTIONING_SETTINGS); -@@ -210,6 +218,9 @@ public class AccessibilitySettings extends PreferenceFragmentCompat + captions.setOnPreferenceClickListener( + preference -> { +@@ -218,6 +226,9 @@ public class AccessibilitySettings extends PreferenceFragmentCompat } else if (PREF_MOVE_TOOLBAR_TO_BOTTOM.equals(preference.getKey())) { mMoveTopToolbarToBottomDelegate.setEnabled((Boolean) newValue); mDelegate.requestRestart(getActivity()); @@ -281,15 +281,15 @@ diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/c diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettingsDelegate.java b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettingsDelegate.java --- a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettingsDelegate.java +++ b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettingsDelegate.java -@@ -49,6 +49,8 @@ public interface AccessibilitySettingsDelegate { +@@ -43,6 +43,8 @@ public interface AccessibilitySettingsDelegate { BooleanPreferenceDelegate getMoveTopToolbarToBottomDelegate(); + BooleanPreferenceDelegate getShowAlwaysContextMenuOnLinksDelegate(); + - /** - * @return The BrowserContextHandle that should be used to read and update settings. - */ + /** @return The BrowserContextHandle that should be used to read and update settings. */ + BrowserContextHandle getBrowserContextHandle(); + diff --git a/cromite_flags/chrome/browser/about_flags_cc/Add-setting-to-invert-tap-and-long-tap.inc b/cromite_flags/chrome/browser/about_flags_cc/Add-setting-to-invert-tap-and-long-tap.inc new file mode 100644 --- /dev/null @@ -328,7 +328,7 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third #include "third_party/blink/renderer/core/page/page.h" #include "third_party/blink/renderer/core/speculation_rules/document_speculation_rules.h" #include "third_party/blink/renderer/platform/heap/garbage_collected.h" -@@ -456,6 +457,17 @@ void HTMLAnchorElement::NavigateToHyperlink(ResourceRequest request, +@@ -467,6 +468,17 @@ void HTMLAnchorElement::NavigateToHyperlink(ResourceRequest request, bool is_trusted, base::TimeTicks platform_time_stamp, KURL completed_url) { @@ -346,7 +346,7 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third LocalDOMWindow* window = GetDocument().domWindow(); if (!window) { return; -@@ -518,6 +530,15 @@ void HTMLAnchorElement::NavigateToHyperlink(ResourceRequest request, +@@ -527,6 +539,15 @@ void HTMLAnchorElement::NavigateToHyperlink(ResourceRequest request, /*element=*/this, request.HasUserGesture())); } @@ -362,7 +362,7 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third Frame* target_frame = frame->Tree().FindOrCreateFrameForNavigation(frame_request, target).frame; -@@ -541,7 +562,7 @@ void HTMLAnchorElement::SetHovered(bool hovered) { +@@ -559,7 +580,7 @@ void HTMLAnchorElement::SetHovered(bool hovered) { HTMLElement::SetHovered(hovered); } @@ -371,7 +371,7 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third event.SetDefaultHandled(); LocalDOMWindow* window = GetDocument().domWindow(); -@@ -641,13 +662,12 @@ void HTMLAnchorElement::HandleClick(Event& event) { +@@ -659,13 +680,12 @@ void HTMLAnchorElement::HandleClick(Event& event) { return; } @@ -389,7 +389,7 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third // We distinguish single/double click with some modifiers. // See the comment of `EventHandler.delayed_navigation_task_handle_`. auto task_handle = PostDelayedCancellableTask( -@@ -657,7 +677,9 @@ void HTMLAnchorElement::HandleClick(Event& event) { +@@ -675,7 +695,9 @@ void HTMLAnchorElement::HandleClick(Event& event) { frame->GetEventHandler().SetDelayedNavigationTaskHandle( std::move(task_handle)); } else { @@ -403,7 +403,7 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third diff --git a/third_party/blink/renderer/core/html/html_anchor_element.h b/third_party/blink/renderer/core/html/html_anchor_element.h --- a/third_party/blink/renderer/core/html/html_anchor_element.h +++ b/third_party/blink/renderer/core/html/html_anchor_element.h -@@ -104,6 +104,7 @@ class CORE_EXPORT HTMLAnchorElement : public HTMLElement, public DOMURLUtils { +@@ -106,6 +106,7 @@ class CORE_EXPORT HTMLAnchorElement : public HTMLElement, public DOMURLUtils { void SetHovered(bool hovered) override; void Trace(Visitor*) const override; @@ -411,7 +411,7 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.h b/third_ protected: void ParseAttribute(const AttributeModificationParams&) override; -@@ -126,12 +127,16 @@ class CORE_EXPORT HTMLAnchorElement : public HTMLElement, public DOMURLUtils { +@@ -130,12 +131,16 @@ class CORE_EXPORT HTMLAnchorElement : public HTMLElement, public DOMURLUtils { bool IsInteractiveContent() const final; InsertionNotificationRequest InsertedInto(ContainerNode&) override; void RemovedFrom(ContainerNode&) override; @@ -448,8 +448,8 @@ diff --git a/third_party/blink/renderer/core/html/html_image_element.cc b/third_ +#include "third_party/blink/renderer/core/page/context_menu_controller.h" #include "third_party/blink/renderer/core/paint/timing/paint_timing.h" #include "third_party/blink/renderer/core/probe/core_probes.h" - #include "third_party/blink/renderer/core/style/content_data.h" -@@ -753,6 +755,21 @@ void HTMLImageElement::DidFinishLifecycleUpdate( + #include "third_party/blink/renderer/core/resize_observer/resize_observer_entry.h" +@@ -794,6 +796,21 @@ void HTMLImageElement::DidFinishLifecycleUpdate( } } @@ -474,7 +474,7 @@ diff --git a/third_party/blink/renderer/core/html/html_image_element.cc b/third_ diff --git a/third_party/blink/renderer/core/html/html_image_element.h b/third_party/blink/renderer/core/html/html_image_element.h --- a/third_party/blink/renderer/core/html/html_image_element.h +++ b/third_party/blink/renderer/core/html/html_image_element.h -@@ -220,6 +220,8 @@ class CORE_EXPORT HTMLImageElement final +@@ -232,6 +232,8 @@ class CORE_EXPORT HTMLImageElement final void DidAddUserAgentShadowRoot(ShadowRoot&) override; void AdjustStyle(ComputedStyleBuilder&) override; @@ -486,7 +486,7 @@ diff --git a/third_party/blink/renderer/core/html/html_image_element.h b/third_p diff --git a/third_party/blink/renderer/core/page/context_menu_controller.cc b/third_party/blink/renderer/core/page/context_menu_controller.cc --- a/third_party/blink/renderer/core/page/context_menu_controller.cc +++ b/third_party/blink/renderer/core/page/context_menu_controller.cc -@@ -231,14 +231,16 @@ void ContextMenuController::DocumentDetached(Document* document) { +@@ -234,14 +234,16 @@ void ContextMenuController::DocumentDetached(Document* document) { } } @@ -506,7 +506,7 @@ diff --git a/third_party/blink/renderer/core/page/context_menu_controller.cc b/t mouse_event->SetDefaultHandled(); } -@@ -456,7 +458,8 @@ bool ContextMenuController::ShouldShowContextMenuFromTouch( +@@ -459,7 +461,8 @@ bool ContextMenuController::ShouldShowContextMenuFromTouch( bool ContextMenuController::ShowContextMenu(LocalFrame* frame, const PhysicalOffset& point, WebMenuSourceType source_type, @@ -516,7 +516,7 @@ diff --git a/third_party/blink/renderer/core/page/context_menu_controller.cc b/t // Displaying the context menu in this function is a big hack as we don't // have context, i.e. whether this is being invoked via a script or in // response to user input (Mouse event WM_RBUTTONDOWN, -@@ -479,6 +482,15 @@ bool ContextMenuController::ShowContextMenu(LocalFrame* frame, +@@ -482,6 +485,15 @@ bool ContextMenuController::ShowContextMenu(LocalFrame* frame, if (!result.InnerNodeOrImageMapImage()) return false; @@ -532,7 +532,7 @@ diff --git a/third_party/blink/renderer/core/page/context_menu_controller.cc b/t // Clear any previously set cached results if we are resetting the hit test // result. image_selection_cached_result_ = nullptr; -@@ -832,11 +844,13 @@ bool ContextMenuController::ShowContextMenu(LocalFrame* frame, +@@ -835,11 +847,13 @@ bool ContextMenuController::ShowContextMenu(LocalFrame* frame, SetAutofillData(result.InnerNode(), data); SetPasswordManagerData(result.InnerElement(), data); diff --git a/build/patches/00Add-support-to-jxl.patch b/build/patches/00Add-support-to-jxl.patch index d651138ed..3b128701a 100644 --- a/build/patches/00Add-support-to-jxl.patch +++ b/build/patches/00Add-support-to-jxl.patch @@ -83,7 +83,7 @@ Enabled by default diff --git a/DEPS b/DEPS --- a/DEPS +++ b/DEPS -@@ -504,6 +504,10 @@ vars = { +@@ -485,6 +485,10 @@ vars = { # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. @@ -94,7 +94,7 @@ diff --git a/DEPS b/DEPS 'highway_revision': '8f20644eca693cfb74aa795b0006b6779c370e7a', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ffmpeg -@@ -1134,6 +1138,9 @@ deps = { +@@ -1103,6 +1107,9 @@ deps = { 'src/third_party/dawn': Var('dawn_git') + '/dawn.git' + '@' + Var('dawn_revision'), @@ -328,7 +328,7 @@ diff --git a/media/media_options.gni b/media/media_options.gni diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc --- a/net/base/mime_util.cc +++ b/net/base/mime_util.cc -@@ -163,6 +163,7 @@ static const MimeInfo kPrimaryMappings[] = { +@@ -164,6 +164,7 @@ static const MimeInfo kPrimaryMappings[] = { {"image/avif", "avif"}, {"image/gif", "gif"}, {"image/jpeg", "jpeg,jpg"}, @@ -336,7 +336,7 @@ diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc {"image/png", "png"}, {"image/apng", "png,apng"}, {"image/svg+xml", "svg,svgz"}, -@@ -666,6 +667,7 @@ static const char* const kStandardImageTypes[] = {"image/avif", +@@ -667,6 +668,7 @@ static const char* const kStandardImageTypes[] = {"image/avif", "image/gif", "image/ief", "image/jpeg", @@ -466,7 +466,7 @@ diff --git a/third_party/blink/common/mime_util/mime_util_unittest.cc b/third_pa diff --git a/third_party/blink/public/devtools_protocol/browser_protocol.pdl b/third_party/blink/public/devtools_protocol/browser_protocol.pdl --- a/third_party/blink/public/devtools_protocol/browser_protocol.pdl +++ b/third_party/blink/public/devtools_protocol/browser_protocol.pdl -@@ -4218,6 +4218,7 @@ domain Emulation +@@ -4246,6 +4246,7 @@ domain Emulation experimental type DisabledImageType extends string enum avif @@ -491,7 +491,7 @@ diff --git a/third_party/blink/renderer/core/inspector/inspector_emulation_agent header.Replace(String(type + ","), ""); } return AtomicString(header); -@@ -842,6 +842,7 @@ protocol::Response InspectorEmulationAgent::setDisabledImageTypes( +@@ -843,6 +843,7 @@ protocol::Response InspectorEmulationAgent::setDisabledImageTypes( namespace DisabledImageTypeEnum = protocol::Emulation::DisabledImageTypeEnum; for (protocol::Emulation::DisabledImageType type : *disabled_types) { if (DisabledImageTypeEnum::Avif == type || @@ -607,7 +607,7 @@ diff --git a/third_party/blink/renderer/modules/webcodecs/image_decoder_fuzzer.c diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn -@@ -2256,6 +2256,10 @@ source_set("blink_platform_unittests_sources") { +@@ -2263,6 +2263,10 @@ source_set("blink_platform_unittests_sources") { sources += [ "text/locale_icu_test.cc" ] } @@ -618,7 +618,7 @@ diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/re sources += [ "testing/run_all_tests.cc" ] configs += [ -@@ -2299,6 +2303,7 @@ source_set("blink_platform_unittests_sources") { +@@ -2306,6 +2310,7 @@ source_set("blink_platform_unittests_sources") { "//third_party/blink/renderer/platform/scheduler:unit_tests", "//third_party/blink/renderer/platform/wtf", "//third_party/libavif:libavif", @@ -672,7 +672,7 @@ diff --git a/third_party/blink/renderer/platform/graphics/bitmap_image_metrics.h + kMaxValue = kJXL, }; - // Categories for the JPEG color space histogram. Synced with 'JpegColorSpace' + // |type| is the return value of ImageDecoder::FilenameExtension(). diff --git a/third_party/blink/renderer/platform/image-decoders/BUILD.gn b/third_party/blink/renderer/platform/image-decoders/BUILD.gn --- a/third_party/blink/renderer/platform/image-decoders/BUILD.gn +++ b/third_party/blink/renderer/platform/image-decoders/BUILD.gn @@ -2221,7 +2221,7 @@ diff --git a/third_party/blink/tools/commit_stats/git-dirs.txt b/third_party/bli diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations -@@ -4822,6 +4822,12 @@ crbug.com/1199522 http/tests/devtools/layers/layers-3d-view-hit-testing.js [ Fai +@@ -4852,6 +4852,12 @@ crbug.com/1199522 http/tests/devtools/layers/layers-3d-view-hit-testing.js [ Fai # Started failing after rolling new version of check-layout-th.js css3/flexbox/perpendicular-writing-modes-inside-flex-item.html [ Failure ] @@ -2231,13 +2231,13 @@ diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/we +crbug.com/1210658 virtual/jxl-enabled/images/jxl/jxl-images.html [ Crash Failure Pass Timeout ] +crbug.com/1358616 virtual/jxl-enabled/images/jxl/progressive.html [ Crash Failure Pass Timeout ] + - # Temporarily disabled to unblock https://crrev.com/c/3099011 - crbug.com/1199701 http/tests/devtools/console/console-big-array.js [ Crash Failure Pass Timeout ] + # Sheriff 2021-11-15 + crbug.com/1270362 http/tests/devtools/sources/debugger-ui/debugger-inline-values.js [ Failure Pass Timeout ] diff --git a/third_party/blink/web_tests/VirtualTestSuites b/third_party/blink/web_tests/VirtualTestSuites --- a/third_party/blink/web_tests/VirtualTestSuites +++ b/third_party/blink/web_tests/VirtualTestSuites -@@ -429,6 +429,15 @@ +@@ -441,6 +441,15 @@ "--disable-threaded-compositing", "--disable-threaded-animation"], "expires": "Jul 1, 2023" }, @@ -2652,7 +2652,7 @@ new file mode 100644 diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml -@@ -26859,7 +26859,7 @@ Called by update_debug_scenarios.py.--> +@@ -11344,7 +11344,7 @@ to ensure that the crash string is shown properly on the user-facing crash UI. @@ -2660,8 +2660,8 @@ diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums + - -@@ -66334,6 +66334,7 @@ from previous Chrome versions. + +@@ -34310,6 +34310,7 @@ from previous Chrome versions. diff --git a/build/patches/00Allow-DocumentPiP-if-PopupsAndRedirects-are-active.patch b/build/patches/00Allow-DocumentPiP-if-PopupsAndRedirects-are-active.patch index 50e79b2fb..1e47d0a32 100644 --- a/build/patches/00Allow-DocumentPiP-if-PopupsAndRedirects-are-active.patch +++ b/build/patches/00Allow-DocumentPiP-if-PopupsAndRedirects-are-active.patch @@ -12,7 +12,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/third_party/blink/renderer/modules/document_picture_in_picture/picture_in_picture_controller_impl.cc b/third_party/blink/renderer/modules/document_picture_in_picture/picture_in_picture_controller_impl.cc --- a/third_party/blink/renderer/modules/document_picture_in_picture/picture_in_picture_controller_impl.cc +++ b/third_party/blink/renderer/modules/document_picture_in_picture/picture_in_picture_controller_impl.cc -@@ -372,6 +372,13 @@ void PictureInPictureControllerImpl::CreateDocumentPictureInPictureWindow( +@@ -376,6 +376,13 @@ void PictureInPictureControllerImpl::CreateDocumentPictureInPictureWindow( return; } diff --git a/build/patches/00Always-open-browser-controls-in-new-tab.patch b/build/patches/00Always-open-browser-controls-in-new-tab.patch index 2d6610213..0e94cf0dc 100644 --- a/build/patches/00Always-open-browser-controls-in-new-tab.patch +++ b/build/patches/00Always-open-browser-controls-in-new-tab.patch @@ -9,7 +9,7 @@ Subject: Always open browser controls in new tab diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java -@@ -20,6 +20,7 @@ import org.chromium.base.IntentUtils; +@@ -21,6 +21,7 @@ import org.chromium.base.IntentUtils; import org.chromium.base.PackageManagerUtils; import org.chromium.base.metrics.RecordUserAction; import org.chromium.base.supplier.Supplier; @@ -17,7 +17,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextM import org.chromium.chrome.browser.DefaultBrowserInfo; import org.chromium.chrome.browser.IntentHandler; import org.chromium.chrome.browser.bookmarks.BookmarkModel; -@@ -34,6 +35,7 @@ import org.chromium.chrome.browser.multiwindow.MultiWindowUtils; +@@ -35,6 +36,7 @@ import org.chromium.chrome.browser.multiwindow.MultiWindowUtils; import org.chromium.chrome.browser.offlinepages.OfflinePageBridge; import org.chromium.chrome.browser.offlinepages.RequestCoordinatorBridge; import org.chromium.chrome.browser.profiles.Profile; @@ -25,15 +25,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextM import org.chromium.chrome.browser.tabmodel.TabModelSelector; import org.chromium.chrome.browser.tabmodel.document.ChromeAsyncTabLauncher; import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; -@@ -206,6 +208,7 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate { - @Override - public void onOpenInNewTab(GURL url, Referrer referrer, boolean navigateToTab, +@@ -212,6 +214,7 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate { + Referrer referrer, + boolean navigateToTab, @Nullable AdditionalNavigationParams additionalNavigationParams) { + TabBrowserControlsConstraintsHelper.get(mTab).update(BrowserControlsState.SHOWN, true); RecordUserAction.record("MobileNewTabOpened"); RecordUserAction.record("LinkOpenedInNewTab"); LoadUrlParams loadUrlParams = new LoadUrlParams(url.getSpec()); -@@ -219,6 +222,7 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate { +@@ -228,6 +231,7 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate { @Override public void onOpenInNewTabInGroup(GURL url, Referrer referrer) { diff --git a/build/patches/00Chrome-web-store-protection.patch b/build/patches/00Chrome-web-store-protection.patch index 817f0b4af..0d325d937 100644 --- a/build/patches/00Chrome-web-store-protection.patch +++ b/build/patches/00Chrome-web-store-protection.patch @@ -64,7 +64,7 @@ diff --git a/chrome/app/extensions_strings.grdp b/chrome/app/extensions_strings. diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.cc b/chrome/browser/extensions/api/developer_private/developer_private_api.cc --- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc +++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc -@@ -123,6 +123,12 @@ +@@ -125,6 +125,12 @@ #include "url/gurl.h" #include "url/origin.h" @@ -75,8 +75,8 @@ diff --git a/chrome/browser/extensions/api/developer_private/developer_private_a +#include "components/flags_ui/flags_storage.h" + #if BUILDFLAG(ENABLE_SUPERVISED_USERS) - #include "chrome/browser/supervised_user/supervised_user_service_factory.h" - #include "components/supervised_user/core/browser/supervised_user_service.h" + #include "components/supervised_user/core/browser/supervised_user_preferences.h" + #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) @@ -520,9 +526,32 @@ std::unique_ptr DeveloperPrivateAPI::CreateProfileInfo( info->can_load_unpacked = ExtensionManagementFactory::GetForBrowserContext(profile) @@ -110,7 +110,7 @@ diff --git a/chrome/browser/extensions/api/developer_private/developer_private_a template <> void BrowserContextKeyedAPIFactory< DeveloperPrivateAPI>::DeclareFactoryDependencies() { -@@ -950,6 +979,7 @@ ExtensionFunction::ResponseAction DeveloperPrivateAutoUpdateFunction::Run() { +@@ -951,6 +980,7 @@ ExtensionFunction::ResponseAction DeveloperPrivateAutoUpdateFunction::Run() { ExtensionUpdater::CheckParams params; params.fetch_priority = DownloadFetchPriority::kForeground; params.install_immediately = true; @@ -118,16 +118,16 @@ diff --git a/chrome/browser/extensions/api/developer_private/developer_private_a params.callback = base::BindOnce(&DeveloperPrivateAutoUpdateFunction::OnComplete, this); updater->CheckNow(std::move(params)); -@@ -1089,7 +1119,7 @@ DeveloperPrivateUpdateProfileConfigurationFunction::Run() { +@@ -1090,7 +1120,7 @@ DeveloperPrivateUpdateProfileConfigurationFunction::Run() { const developer::ProfileConfigurationUpdate& update = params->update; - if (update.in_developer_mode) { + if (update.in_developer_mode.has_value() && update.in_developer_mode) { Profile* profile = Profile::FromBrowserContext(browser_context()); - + CHECK(profile); #if BUILDFLAG(ENABLE_SUPERVISED_USERS) -@@ -1103,6 +1133,11 @@ DeveloperPrivateUpdateProfileConfigurationFunction::Run() { +@@ -1102,6 +1132,11 @@ DeveloperPrivateUpdateProfileConfigurationFunction::Run() { util::SetDeveloperModeForProfile(profile, *update.in_developer_mode); } @@ -163,7 +163,7 @@ diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api #include "extensions/common/manifest.h" #include "extensions/common/manifest_constants.h" #include "extensions/common/manifest_handlers/permissions_parser.h" -@@ -231,12 +232,16 @@ WebstorePrivateApi::Delegate* test_delegate = nullptr; +@@ -230,12 +231,16 @@ WebstorePrivateApi::Delegate* test_delegate = nullptr; // there was previously stored data, or an empty string otherwise. The Set will // overwrite any previous login. std::string GetWebstoreLogin(Profile* profile) { @@ -180,7 +180,7 @@ diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api profile->GetPrefs()->SetString(kWebstoreLogin, login); } -@@ -246,6 +251,8 @@ void RecordWebstoreExtensionInstallResult(bool success) { +@@ -245,6 +250,8 @@ void RecordWebstoreExtensionInstallResult(bool success) { api::webstore_private::ExtensionInstallStatus ConvertExtensionInstallStatusForAPI(ExtensionInstallStatus status) { @@ -188,8 +188,8 @@ diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api + return api::webstore_private::EXTENSION_INSTALL_STATUS_INSTALLABLE; switch (status) { case kCanRequest: - return api::webstore_private::ExtensionInstallStatus:: -@@ -1178,7 +1185,8 @@ ExtensionFunction::ResponseAction + return api::webstore_private::ExtensionInstallStatus::kCanRequest; +@@ -1163,7 +1170,8 @@ ExtensionFunction::ResponseAction WebstorePrivateIsInIncognitoModeFunction::Run() { Profile* profile = Profile::FromBrowserContext(browser_context()); return RespondNow(ArgumentList(IsInIncognitoMode::Results::Create( @@ -199,7 +199,7 @@ diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api } WebstorePrivateIsPendingCustodianApprovalFunction:: -@@ -1280,6 +1288,8 @@ WebstorePrivateGetReferrerChainFunction::Run() { +@@ -1263,6 +1271,8 @@ WebstorePrivateGetReferrerChainFunction::Run() { recent_navigations_to_collect); std::string serialized_referrer_proto = request.SerializeAsString(); @@ -211,7 +211,7 @@ diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api diff --git a/chrome/browser/extensions/extension_system_impl.cc b/chrome/browser/extensions/extension_system_impl.cc --- a/chrome/browser/extensions/extension_system_impl.cc +++ b/chrome/browser/extensions/extension_system_impl.cc -@@ -57,6 +57,7 @@ +@@ -56,6 +56,7 @@ #include "extensions/browser/updater/uninstall_ping_sender.h" #include "extensions/browser/user_script_manager.h" #include "extensions/common/constants.h" @@ -219,7 +219,7 @@ diff --git a/chrome/browser/extensions/extension_system_impl.cc b/chrome/browser #include "extensions/common/features/feature_channel.h" #include "extensions/common/manifest_url_handlers.h" #include "ui/message_center/public/cpp/notifier_id.h" -@@ -84,6 +85,7 @@ UninstallPingSender::FilterResult ShouldSendUninstallPing( +@@ -83,6 +84,7 @@ UninstallPingSender::FilterResult ShouldSendUninstallPing( Profile* profile, const Extension* extension, UninstallReason reason) { @@ -343,8 +343,8 @@ diff --git a/chrome/browser/extensions/updater/extension_updater.cc b/chrome/bro params.fetch_priority, &update_check_params); } else { @@ -518,7 +525,7 @@ void ExtensionUpdater::CheckNow(CheckParams params) { - const Extension* extension = registry_->GetExtensionById( - id, extensions::ExtensionRegistry::EVERYTHING); + const Extension* extension = + registry_->GetExtensionById(id, ExtensionRegistry::EVERYTHING); if (extension) { - if (CanUseUpdateService(id)) { + if ((false) && CanUseUpdateService(id)) { @@ -476,7 +476,7 @@ diff --git a/chrome/browser/resources/extensions/manager.ts b/chrome/browser/res diff --git a/chrome/browser/resources/extensions/service.ts b/chrome/browser/resources/extensions/service.ts --- a/chrome/browser/resources/extensions/service.ts +++ b/chrome/browser/resources/extensions/service.ts -@@ -283,6 +283,11 @@ export class Service implements ServiceInterface { +@@ -284,6 +284,11 @@ export class Service implements ServiceInterface { {inDeveloperMode: inDevMode}); } @@ -594,7 +594,7 @@ diff --git a/chrome/browser/resources/webstore_app/manifest.json b/chrome/browse diff --git a/chrome/browser/ui/webui/extensions/extensions_ui.cc b/chrome/browser/ui/webui/extensions/extensions_ui.cc --- a/chrome/browser/ui/webui/extensions/extensions_ui.cc +++ b/chrome/browser/ui/webui/extensions/extensions_ui.cc -@@ -56,6 +56,8 @@ +@@ -58,6 +58,8 @@ #include "chrome/browser/ui/webui/extensions/ash/kiosk_apps_handler.h" #endif @@ -603,7 +603,7 @@ diff --git a/chrome/browser/ui/webui/extensions/extensions_ui.cc b/chrome/browse namespace extensions { namespace { -@@ -338,6 +340,8 @@ content::WebUIDataSource* CreateAndAddExtensionsSource(Profile* profile, +@@ -340,6 +342,8 @@ content::WebUIDataSource* CreateAndAddExtensionsSource(Profile* profile, {"itemSuspiciousInstallLearnMore", IDS_EXTENSIONS_ADDED_WITHOUT_KNOWLEDGE_LEARN_MORE}, {"toolbarDevMode", IDS_EXTENSIONS_DEVELOPER_MODE}, @@ -612,7 +612,7 @@ diff --git a/chrome/browser/ui/webui/extensions/extensions_ui.cc b/chrome/browse {"toolbarLoadUnpacked", IDS_EXTENSIONS_TOOLBAR_LOAD_UNPACKED}, {"toolbarLoadUnpackedDone", IDS_EXTENSIONS_TOOLBAR_LOAD_UNPACKED_DONE}, {"toolbarPack", IDS_EXTENSIONS_TOOLBAR_PACK}, -@@ -415,6 +419,10 @@ content::WebUIDataSource* CreateAndAddExtensionsSource(Profile* profile, +@@ -417,6 +421,10 @@ content::WebUIDataSource* CreateAndAddExtensionsSource(Profile* profile, source->AddString("hostPermissionsLearnMoreLink", chrome_extension_constants::kRuntimeHostPermissionsHelpURL); source->AddBoolean(kInDevModeKey, in_dev_mode); @@ -767,7 +767,7 @@ diff --git a/extensions/browser/api/management/management_api.cc b/extensions/br iter != extensions.end(); ++iter) { const Extension& extension = **iter; @@ -306,10 +333,9 @@ ExtensionFunction::ResponseAction ManagementGetFunction::Run() { - absl::optional params = + std::optional params = management::Get::Params::Create(args()); EXTENSION_FUNCTION_VALIDATE(params); - ExtensionRegistry* registry = ExtensionRegistry::Get(browser_context()); @@ -1033,14 +1033,14 @@ diff --git a/extensions/browser/updater/extension_downloader.cc b/extensions/bro diff --git a/extensions/browser/updater/extension_downloader.h b/extensions/browser/updater/extension_downloader.h --- a/extensions/browser/updater/extension_downloader.h +++ b/extensions/browser/updater/extension_downloader.h -@@ -113,7 +113,6 @@ class ExtensionDownloader { +@@ -112,7 +112,6 @@ class ExtensionDownloader { } void set_ping_enabled_domain(const std::string& domain) { - ping_enabled_domain_ = domain; } - // Set backoff policy for manifest and extension queue. Set `absl::nullopt` to + // Set backoff policy for manifest and extension queue. Set `std::nullopt` to diff --git a/extensions/browser/updater/manifest_fetch_data.cc b/extensions/browser/updater/manifest_fetch_data.cc --- a/extensions/browser/updater/manifest_fetch_data.cc +++ b/extensions/browser/updater/manifest_fetch_data.cc @@ -1075,7 +1075,7 @@ diff --git a/extensions/browser/updater/manifest_fetch_data.cc b/extensions/brow diff --git a/extensions/browser/updater/safe_manifest_parser.cc b/extensions/browser/updater/safe_manifest_parser.cc --- a/extensions/browser/updater/safe_manifest_parser.cc +++ b/extensions/browser/updater/safe_manifest_parser.cc -@@ -203,6 +203,7 @@ void ParseXmlDone(ParseUpdateManifestCallback callback, +@@ -202,6 +202,7 @@ void ParseXmlDone(ParseUpdateManifestCallback callback, std::move(callback).Run(/*results=*/nullptr, std::move(error)); }); @@ -1086,8 +1086,8 @@ diff --git a/extensions/browser/updater/safe_manifest_parser.cc b/extensions/bro diff --git a/extensions/common/extension_features.cc b/extensions/common/extension_features.cc --- a/extensions/common/extension_features.cc +++ b/extensions/common/extension_features.cc -@@ -226,4 +226,19 @@ BASE_FEATURE(kDeclarativeNetRequestSafeRuleLimits, - "DeclarativeNetRequestSafeDynamicRules", +@@ -154,4 +154,19 @@ BASE_FEATURE(kDeclarativeNetRequestResponseHeaderMatching, + "DeclarativeNetRequestResponseHeaderMatching", base::FEATURE_DISABLED_BY_DEFAULT); +// Activates the auto update of extensions. @@ -1109,9 +1109,9 @@ diff --git a/extensions/common/extension_features.cc b/extensions/common/extensi diff --git a/extensions/common/extension_features.h b/extensions/common/extension_features.h --- a/extensions/common/extension_features.h +++ b/extensions/common/extension_features.h -@@ -108,6 +108,10 @@ BASE_DECLARE_FEATURE(kNewWebstoreURL); - - BASE_DECLARE_FEATURE(kDeclarativeNetRequestSafeRuleLimits); +@@ -193,6 +193,10 @@ BASE_DECLARE_FEATURE(kDeclarativeNetRequestSafeRuleLimits); + // matching condition. + BASE_DECLARE_FEATURE(kDeclarativeNetRequestResponseHeaderMatching); +BASE_DECLARE_FEATURE(kEnableExtensionAutoupdate); + diff --git a/build/patches/00Clear-CORS-Preflight-Cache-on-clearing-data.patch b/build/patches/00Clear-CORS-Preflight-Cache-on-clearing-data.patch index 2d90bcd50..96855f4a4 100644 --- a/build/patches/00Clear-CORS-Preflight-Cache-on-clearing-data.patch +++ b/build/patches/00Clear-CORS-Preflight-Cache-on-clearing-data.patch @@ -79,7 +79,7 @@ diff --git a/services/network/cors/preflight_result.cc b/services/network/cors/p diff --git a/services/network/network_context.cc b/services/network/network_context.cc --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1129,6 +1129,8 @@ void NetworkContext::ClearHttpCache(base::Time start_time, +@@ -1136,6 +1136,8 @@ void NetworkContext::ClearHttpCache(base::Time start_time, base::BindOnce(&NetworkContext::OnHttpCacheCleared, base::Unretained(this), std::move(callback)))); diff --git a/build/patches/00Compress-libchrome-to-free-up-some-space.patch b/build/patches/00Compress-libchrome-to-free-up-some-space.patch index ec3419fe6..33e1aafb2 100644 --- a/build/patches/00Compress-libchrome-to-free-up-some-space.patch +++ b/build/patches/00Compress-libchrome-to-free-up-some-space.patch @@ -13,7 +13,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/android/chrome_public_apk_tmpl.gni b/chrome/android/chrome_public_apk_tmpl.gni --- a/chrome/android/chrome_public_apk_tmpl.gni +++ b/chrome/android/chrome_public_apk_tmpl.gni -@@ -639,6 +639,7 @@ template("chrome_common_apk_or_module_tmpl") { +@@ -638,6 +638,7 @@ template("chrome_common_apk_or_module_tmpl") { [ "//components/crash/core/app:chrome_crashpad_handler_named_as_so" ] loadable_modules += [ "$root_out_dir/libchrome_crashpad_handler.so" ] library_always_compress += [ "libchrome_crashpad_handler.so" ] diff --git a/build/patches/00Cromite-Branding.patch b/build/patches/00Cromite-Branding.patch index 73cee2f04..9b1ecd0a2 100644 --- a/build/patches/00Cromite-Branding.patch +++ b/build/patches/00Cromite-Branding.patch @@ -13146,7 +13146,7 @@ e)fqMZZ`3a)Ds&5H @@ -13241,7 +13241,7 @@ diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h diff --git a/components/browser_ui/strings/android/browser_ui_strings.grd b/components/browser_ui/strings/android/browser_ui_strings.grd --- a/components/browser_ui/strings/android/browser_ui_strings.grd +++ b/components/browser_ui/strings/android/browser_ui_strings.grd -@@ -1009,7 +1009,7 @@ +@@ -1003,7 +1003,7 @@ diff --git a/build/patches/00Customize-selection-popup.patch b/build/patches/00Customize-selection-popup.patch index 2d34a44f3..817efb732 100644 --- a/build/patches/00Customize-selection-popup.patch +++ b/build/patches/00Customize-selection-popup.patch @@ -7,41 +7,41 @@ Opens tabs in foreground, Move web search to the top of items, Web search in tab group and Enable smart text selection License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - .../chrome/browser/ChromeTabbedActivity.java | 15 ++- + .../chrome/browser/ChromeTabbedActivity.java | 15 +- .../compositor/layouts/LayoutManagerImpl.java | 8 ++ .../chrome/browser/ui/RootUiCoordinator.java | 8 +- .../Customize-selection-popup.grdp | 34 +++++ .../res/xml/accessibility_preferences.xml | 24 ++++ - .../selection/SelectActionMenuHelper.java | 121 +++++++++++++----- + .../selection/SelectActionMenuHelper.java | 131 ++++++++++++------ .../selection/SmartSelectionClient.java | 4 + - 7 files changed, 177 insertions(+), 37 deletions(-) + 7 files changed, 177 insertions(+), 47 deletions(-) create mode 100644 chrome/browser/ui/android/strings/cromite_android_chrome_strings_grd/Customize-selection-popup.grdp diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java -@@ -658,10 +658,17 @@ public class ChromeTabbedActivity extends ChromeActivity menuItemBuilders = new ArrayList<>(); + menuItemBuilders.add(cut(delegate.canCut())); + menuItemBuilders.add(copy(delegate.canCopy())); +@@ -301,7 +348,7 @@ public class SelectActionMenuHelper { // these menu items. - SelectionMenuGroup secondaryAssistItems = new SelectionMenuGroup( -- android.R.id.textAssist, GroupItemOrder.SECONDARY_ASSIST_ITEMS); -+ android.R.id.textAssist, GroupItemOrderChromium.SECONDARY_ASSIST_ITEMS()); + SelectionMenuGroup secondaryAssistItems = + new SelectionMenuGroup( +- android.R.id.textAssist, GroupItemOrder.SECONDARY_ASSIST_ITEMS); ++ android.R.id.textAssist, GroupItemOrderChromium.SECONDARY_ASSIST_ITEMS()); // First action is reserved for primary action so start at index 1. final int startIndex = 1; -@@ -276,7 +333,7 @@ public class SelectActionMenuHelper { - } +@@ -334,7 +381,7 @@ public class SelectActionMenuHelper { SelectionMenuGroup textProcessingItems = - new SelectionMenuGroup(R.id.select_action_menu_text_processing_items, + new SelectionMenuGroup( + R.id.select_action_menu_text_processing_items, - GroupItemOrder.TEXT_PROCESSING_ITEMS); + GroupItemOrderChromium.TEXT_PROCESSING_ITEMS()); - final PackageManager packageManager = context.getPackageManager(); - for (int i = 0; i < supportedActivities.size(); i++) { - ResolveInfo resolveInfo = supportedActivities.get(i); -@@ -346,7 +403,7 @@ public class SelectActionMenuHelper { + if (isSelectionPassword || intentHandler == null) { + addAdditionalTextProcessingItems(textProcessingItems, selectionActionMenuDelegate); + return textProcessingItems; +@@ -430,7 +477,7 @@ public class SelectActionMenuHelper { .setId(R.id.select_action_menu_cut) .setIconAttr(android.R.attr.actionModeCutDrawable) .setAlphabeticShortcut(ItemKeyShortcuts.CUT) @@ -337,7 +347,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/select .setShowAsActionFlags( MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT) .setIsEnabled(isEnabled) -@@ -359,7 +416,7 @@ public class SelectActionMenuHelper { +@@ -442,7 +489,7 @@ public class SelectActionMenuHelper { .setId(R.id.select_action_menu_copy) .setIconAttr(android.R.attr.actionModeCopyDrawable) .setAlphabeticShortcut(ItemKeyShortcuts.COPY) @@ -346,7 +356,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/select .setShowAsActionFlags( MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT) .setIsEnabled(isEnabled) -@@ -372,7 +429,7 @@ public class SelectActionMenuHelper { +@@ -454,7 +501,7 @@ public class SelectActionMenuHelper { .setId(R.id.select_action_menu_paste) .setIconAttr(android.R.attr.actionModePasteDrawable) .setAlphabeticShortcut(ItemKeyShortcuts.PASTE) @@ -355,7 +365,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/select .setShowAsActionFlags( MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT) .setIsEnabled(isEnabled) -@@ -384,7 +441,7 @@ public class SelectActionMenuHelper { +@@ -465,7 +512,7 @@ public class SelectActionMenuHelper { return new SelectionMenuItem.Builder(R.string.actionbar_share) .setId(R.id.select_action_menu_share) .setIconAttr(android.R.attr.actionModeShareDrawable) @@ -364,7 +374,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/select .setShowAsActionFlags( MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT) .setIsEnabled(isEnabled) -@@ -397,7 +454,7 @@ public class SelectActionMenuHelper { +@@ -477,7 +524,7 @@ public class SelectActionMenuHelper { .setId(R.id.select_action_menu_select_all) .setIconAttr(android.R.attr.actionModeSelectAllDrawable) .setAlphabeticShortcut(ItemKeyShortcuts.SELECT_ALL) @@ -373,16 +383,16 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/select .setShowAsActionFlags( MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT) .setIsEnabled(isEnabled) -@@ -409,7 +466,7 @@ public class SelectActionMenuHelper { - private static SelectionMenuItem pasteAsPlainText(boolean isEnabled) { - return new SelectionMenuItem.Builder(android.R.string.paste_as_plain_text) - .setId(R.id.select_action_menu_paste_as_plain_text) -- .setOrderInCategory(DefaultItemOrder.PASTE_AS_PLAIN_TEXT) -+ .setOrderInCategory(DefaultItemOrderChromium.PASTE_AS_PLAIN_TEXT()) - .setShowAsActionFlags( - MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT) - .setIsEnabled(isEnabled) -@@ -420,7 +477,7 @@ public class SelectActionMenuHelper { +@@ -490,7 +537,7 @@ public class SelectActionMenuHelper { + SelectionMenuItem.Builder builder = + new SelectionMenuItem.Builder(android.R.string.paste_as_plain_text) + .setId(R.id.select_action_menu_paste_as_plain_text) +- .setOrderInCategory(DefaultItemOrder.PASTE_AS_PLAIN_TEXT) ++ .setOrderInCategory(DefaultItemOrderChromium.PASTE_AS_PLAIN_TEXT()) + .setShowAsActionFlags( + MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT) + .setIsEnabled(isEnabled); +@@ -506,7 +553,7 @@ public class SelectActionMenuHelper { return new SelectionMenuItem.Builder(R.string.actionbar_web_search) .setId(R.id.select_action_menu_web_search) .setIconAttr(android.R.attr.actionModeWebSearchDrawable) diff --git a/build/patches/00Deprecate-Data-URL-in-SVGUseElement.patch b/build/patches/00Deprecate-Data-URL-in-SVGUseElement.patch index 9edf5a40a..0c5ea50fd 100644 --- a/build/patches/00Deprecate-Data-URL-in-SVGUseElement.patch +++ b/build/patches/00Deprecate-Data-URL-in-SVGUseElement.patch @@ -10,7 +10,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -3232,8 +3232,8 @@ +@@ -3129,8 +3129,8 @@ status: "stable", }, { diff --git a/build/patches/00Disable-Android-AppRestrictions.patch b/build/patches/00Disable-Android-AppRestrictions.patch index 7a69914d7..46d94beec 100644 --- a/build/patches/00Disable-Android-AppRestrictions.patch +++ b/build/patches/00Disable-Android-AppRestrictions.patch @@ -19,7 +19,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/browser/flags/BUILD.gn b/chrome/browser/flags/BUILD.gn --- a/chrome/browser/flags/BUILD.gn +++ b/chrome/browser/flags/BUILD.gn -@@ -35,6 +35,7 @@ android_library("java") { +@@ -34,6 +34,7 @@ android_library("java") { "//build:chromeos_buildflags", "//build/android:build_java", "//chrome/browser/preferences:java", diff --git a/build/patches/00Disable-Component-Updates.patch b/build/patches/00Disable-Component-Updates.patch index e53c43e37..ad51c2ad1 100644 --- a/build/patches/00Disable-Component-Updates.patch +++ b/build/patches/00Disable-Component-Updates.patch @@ -12,7 +12,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/browser/component_updater/registration.cc b/chrome/browser/component_updater/registration.cc --- a/chrome/browser/component_updater/registration.cc +++ b/chrome/browser/component_updater/registration.cc -@@ -100,6 +100,7 @@ +@@ -102,6 +102,7 @@ namespace component_updater { void RegisterComponentsForUpdate() { @@ -23,7 +23,7 @@ diff --git a/chrome/browser/component_updater/registration.cc b/chrome/browser/c diff --git a/components/component_updater/component_installer.cc b/components/component_updater/component_installer.cc --- a/components/component_updater/component_installer.cc +++ b/components/component_updater/component_installer.cc -@@ -88,6 +88,7 @@ void ComponentInstaller::Register(RegisterCallback register_callback, +@@ -92,6 +92,7 @@ void ComponentInstaller::Register(RegisterCallback register_callback, base::OnceClosure callback, base::TaskPriority task_priority, const base::Version& registered_version) { @@ -34,7 +34,7 @@ diff --git a/components/component_updater/component_installer.cc b/components/co diff --git a/components/component_updater/component_updater_service.cc b/components/component_updater/component_updater_service.cc --- a/components/component_updater/component_updater_service.cc +++ b/components/component_updater/component_updater_service.cc -@@ -522,7 +522,7 @@ std::unique_ptr ComponentUpdateServiceFactory( +@@ -535,7 +535,7 @@ std::unique_ptr ComponentUpdateServiceFactory( // Register prefs required by the component update service. void RegisterComponentUpdateServicePrefs(PrefRegistrySimple* registry) { // The component updates are enabled by default, if the preference is not set. diff --git a/build/patches/00Disable-Compression-Dictionary-Transport.patch b/build/patches/00Disable-Compression-Dictionary-Transport.patch index 232b354cc..2c0d8cb37 100644 --- a/build/patches/00Disable-Compression-Dictionary-Transport.patch +++ b/build/patches/00Disable-Compression-Dictionary-Transport.patch @@ -10,7 +10,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -698,16 +698,18 @@ +@@ -721,16 +721,18 @@ status: "stable", }, { diff --git a/build/patches/00Disable-FedCm.patch b/build/patches/00Disable-FedCm.patch index abd02745a..5b989e11d 100644 --- a/build/patches/00Disable-FedCm.patch +++ b/build/patches/00Disable-FedCm.patch @@ -18,7 +18,7 @@ new file mode 100644 diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -1653,7 +1653,7 @@ +@@ -1591,7 +1591,7 @@ { name: "FedCm", public: true, diff --git a/build/patches/00Disable-Feeback-Collector.patch b/build/patches/00Disable-Feeback-Collector.patch index e3198574b..6b53e8cb1 100644 --- a/build/patches/00Disable-Feeback-Collector.patch +++ b/build/patches/00Disable-Feeback-Collector.patch @@ -4,8 +4,8 @@ Subject: Disable Feeback Collector License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - .../browser/feedback/FeedbackCollector.java | 27 +++---------------- - 1 file changed, 3 insertions(+), 24 deletions(-) + .../browser/feedback/FeedbackCollector.java | 28 ++----------------- + 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/chrome/browser/feedback/android/java/src/org/chromium/chrome/browser/feedback/FeedbackCollector.java b/chrome/browser/feedback/android/java/src/org/chromium/chrome/browser/feedback/FeedbackCollector.java --- a/chrome/browser/feedback/android/java/src/org/chromium/chrome/browser/feedback/FeedbackCollector.java @@ -18,9 +18,9 @@ diff --git a/chrome/browser/feedback/android/java/src/org/chromium/chrome/browse import java.util.List; import java.util.Map; -@@ -64,30 +65,8 @@ public abstract class FeedbackCollector implements Runnable { - // Subclasses must invoke init() at construction time. - protected void init(Activity activity, @Nullable ScreenshotSource screenshotTask, T initParams, +@@ -69,31 +70,8 @@ public abstract class FeedbackCollector implements Runnable { + @Nullable ScreenshotSource screenshotTask, + T initParams, Profile profile) { - // 1. Build all synchronous and asynchronous sources and determine the currently signed in - // account. @@ -29,8 +29,9 @@ diff --git a/chrome/browser/feedback/android/java/src/org/chromium/chrome/browse - IdentityManager identityManager = - IdentityServicesProvider.get().getIdentityManager(profile); - if (identityManager != null) { -- mAccountInUse = CoreAccountInfo.getEmailFrom( -- identityManager.getPrimaryAccountInfo(ConsentLevel.SIGNIN)); +- mAccountInUse = +- CoreAccountInfo.getEmailFrom( +- identityManager.getPrimaryAccountInfo(ConsentLevel.SIGNIN)); - } - - // Validation check in case a source is added to the wrong list. diff --git a/build/patches/00Disable-FirstPartySets-and-StorageAccessAPI.patch b/build/patches/00Disable-FirstPartySets-and-StorageAccessAPI.patch index 72b0e8d78..a2d8e1ff4 100644 --- a/build/patches/00Disable-FirstPartySets-and-StorageAccessAPI.patch +++ b/build/patches/00Disable-FirstPartySets-and-StorageAccessAPI.patch @@ -25,7 +25,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_prefs.cc b/components/pr diff --git a/components/privacy_sandbox/tracking_protection_prefs.cc b/components/privacy_sandbox/tracking_protection_prefs.cc --- a/components/privacy_sandbox/tracking_protection_prefs.cc +++ b/components/privacy_sandbox/tracking_protection_prefs.cc -@@ -58,13 +58,13 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) { +@@ -64,13 +64,13 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) { // Tracking Protection Settings Prefs registry->RegisterBooleanPref( diff --git a/build/patches/00Disable-GSA-by-default.patch b/build/patches/00Disable-GSA-by-default.patch index 0faae8407..ceedbd76c 100644 --- a/build/patches/00Disable-GSA-by-default.patch +++ b/build/patches/00Disable-GSA-by-default.patch @@ -22,7 +22,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.j import org.chromium.chrome.browser.omnibox.suggestions.AutocompleteControllerProvider; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.renderer_host.ChromeNavigationUIData; -@@ -265,8 +264,6 @@ public class IntentHandler { +@@ -239,8 +238,6 @@ public class IntentHandler { private static int sReferrerId; private static String sPendingIncognitoUrl; @@ -31,7 +31,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.j private static final String PACKAGE_GMAIL = "com.google.android.gm"; private static final String PACKAGE_PLUS = "com.google.android.apps.plus"; private static final String PACKAGE_HANGOUTS = "com.google.android.talk"; -@@ -457,8 +454,6 @@ public class IntentHandler { +@@ -456,8 +453,6 @@ public class IntentHandler { return ExternalAppId.LINE; } else if (packageName.equals(PACKAGE_WHATSAPP)) { return ExternalAppId.WHATSAPP; @@ -50,8 +50,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/share/LensUtils -import org.chromium.chrome.browser.gsa.GSAState; import org.chromium.components.externalauth.ExternalAuthUtils; - /** -@@ -59,12 +58,7 @@ public class LensUtils { + /** This class provides utilities for intenting into Google Lens. */ +@@ -55,12 +54,7 @@ public class LensUtils { if (context == null) { return ""; } @@ -64,7 +64,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/share/LensUtils } } -@@ -116,11 +110,7 @@ public class LensUtils { +@@ -112,11 +106,7 @@ public class LensUtils { * @return Whether the package is valid. */ public static boolean isValidAgsaPackage(final ExternalAuthUtils externalAuthUtils) { @@ -80,25 +80,25 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/share/LensUtils diff --git a/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAState.java b/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAState.java --- a/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAState.java +++ b/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAState.java -@@ -34,8 +34,6 @@ import java.util.regex.Pattern; - * A class responsible for representing the current state of Chrome's integration with GSA. - */ +@@ -32,8 +32,6 @@ import java.util.regex.Pattern; + + /** A class responsible for representing the current state of Chrome's integration with GSA. */ public class GSAState { - public static final String PACKAGE_NAME = "com.google.android.googlequicksearchbox"; - /** Used to observe state changes in the class. */ public interface Observer { /** Called when the GSA account name is set. */ -@@ -75,7 +73,7 @@ public class GSAState { - /** - * Caches the result of a computation on whether GSA is available. - */ +@@ -71,7 +69,7 @@ public class GSAState { + private final ObserverList mObserverList = new ObserverList<>(); + + /** Caches the result of a computation on whether GSA is available. */ - private Boolean mGsaAvailable; + private Boolean mGsaAvailable = false; /** * The Google account email address being used by GSA according to the latest update we have -@@ -156,7 +154,7 @@ public class GSAState { +@@ -153,7 +151,7 @@ public class GSAState { /** Returns whether the GSA package is installed on device. */ public boolean isGsaInstalled() { @@ -107,7 +107,7 @@ diff --git a/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAStat } /** -@@ -179,6 +177,7 @@ public class GSAState { +@@ -176,6 +174,7 @@ public class GSAState { */ public boolean isAgsaVersionBelowMinimum( String installedVersionName, String minimumVersionName) { @@ -115,7 +115,7 @@ diff --git a/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAStat if (TextUtils.isEmpty(installedVersionName) || TextUtils.isEmpty(minimumVersionName)) { return true; } -@@ -210,7 +209,7 @@ public class GSAState { +@@ -207,7 +206,7 @@ public class GSAState { * @return Whether the given intent can be handled by Agsa. */ public boolean canAgsaHandleIntent(@NonNull Intent intent) { @@ -124,7 +124,7 @@ diff --git a/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAStat ComponentName activity = intent.resolveActivity(ContextUtils.getApplicationContext().getPackageManager()); -@@ -224,7 +223,7 @@ public class GSAState { +@@ -221,7 +220,7 @@ public class GSAState { * @return The version name of the Agsa package or null if it can't be found. */ public @Nullable String getAgsaVersionName() { diff --git a/build/patches/00Disable-GetInstalledRelatedApps-API.patch b/build/patches/00Disable-GetInstalledRelatedApps-API.patch index b2028b0eb..1b1414378 100644 --- a/build/patches/00Disable-GetInstalledRelatedApps-API.patch +++ b/build/patches/00Disable-GetInstalledRelatedApps-API.patch @@ -14,9 +14,9 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/components/installedapp/android/java/src/org/chromium/components/installedapp/InstalledAppProviderImpl.java b/components/installedapp/android/java/src/org/chromium/components/installedapp/InstalledAppProviderImpl.java --- a/components/installedapp/android/java/src/org/chromium/components/installedapp/InstalledAppProviderImpl.java +++ b/components/installedapp/android/java/src/org/chromium/components/installedapp/InstalledAppProviderImpl.java -@@ -155,6 +155,7 @@ public class InstalledAppProviderImpl implements InstalledAppProvider { - @UiThread - public void filterInstalledApps(final RelatedApplication[] relatedApps, final Url manifestUrl, +@@ -153,6 +153,7 @@ public class InstalledAppProviderImpl implements InstalledAppProvider { + final RelatedApplication[] relatedApps, + final Url manifestUrl, final FilterInstalledApps_Response callback) { + assert false; GURL url = mRenderFrameHost.getLastCommittedURL(); @@ -43,7 +43,7 @@ new file mode 100644 diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -2221,9 +2221,9 @@ +@@ -2133,9 +2133,9 @@ status: {"Android": "test", "default": "stable"}, }, { diff --git a/build/patches/00Disable-Real-Box.patch b/build/patches/00Disable-Real-Box.patch index c1990297c..49466f9f1 100644 --- a/build/patches/00Disable-Real-Box.patch +++ b/build/patches/00Disable-Real-Box.patch @@ -26,7 +26,7 @@ diff --git a/chrome/browser/resources/new_tab_page/app.html b/chrome/browser/res diff --git a/components/search/ntp_features.cc b/components/search/ntp_features.cc --- a/components/search/ntp_features.cc +++ b/components/search/ntp_features.cc -@@ -135,7 +135,7 @@ BASE_FEATURE(kNtpHandleMostVisitedNavigationExplicitly, +@@ -166,7 +166,7 @@ BASE_FEATURE(kNtpHandleMostVisitedNavigationExplicitly, base::FEATURE_ENABLED_BY_DEFAULT); // If enabled, logo will be shown. @@ -35,7 +35,7 @@ diff --git a/components/search/ntp_features.cc b/components/search/ntp_features. // If enabled, logo will fill up less vertical space. BASE_FEATURE(kNtpReducedLogoSpace, -@@ -212,8 +212,8 @@ BASE_FEATURE(kNtpMostVisitedReflowOnOverflow, +@@ -243,8 +243,8 @@ BASE_FEATURE(kNtpMostVisitedReflowOnOverflow, // If enabled, OneGoogleBar will be shown. BASE_FEATURE(kNtpOneGoogleBar, @@ -46,7 +46,7 @@ diff --git a/components/search/ntp_features.cc b/components/search/ntp_features. // If enabled, Google Photos module will be shown. BASE_FEATURE(kNtpPhotosModule, -@@ -248,8 +248,8 @@ BASE_FEATURE(kNtpFeedModule, +@@ -279,8 +279,8 @@ BASE_FEATURE(kNtpFeedModule, // If enabled, Google Lens image search will be shown in the NTP Realbox. BASE_FEATURE(kNtpRealboxLensSearch, diff --git a/build/patches/00Disable-Service-and-Shared-workers-on-3P-iframe.patch b/build/patches/00Disable-Service-and-Shared-workers-on-3P-iframe.patch index 59687a77d..766f02969 100644 --- a/build/patches/00Disable-Service-and-Shared-workers-on-3P-iframe.patch +++ b/build/patches/00Disable-Service-and-Shared-workers-on-3P-iframe.patch @@ -51,7 +51,7 @@ diff --git a/components/embedder_support/content_settings_utils.cc b/components/ for (const auto& it : render_frames) { auto* rfh = content::RenderFrameHost::FromID(it); -@@ -109,19 +94,16 @@ content::AllowServiceWorkerResult AllowServiceWorker( +@@ -108,19 +93,16 @@ content::AllowServiceWorkerResult AllowServiceWorker( scope, site_for_cookies, top_frame_origin, cookie_settings->SettingOverridesForStorage(), &cookie_settings_metadata); @@ -75,7 +75,7 @@ diff --git a/components/embedder_support/content_settings_utils.cc b/components/ return content::AllowServiceWorkerResult::FromPolicy(!allow_javascript, !allow_cookies); -@@ -143,17 +125,16 @@ bool AllowSharedWorker( +@@ -142,17 +124,16 @@ bool AllowSharedWorker( worker_url, site_for_cookies, top_frame_origin, cookie_settings->SettingOverridesForStorage(), &cookie_settings_metadata); diff --git a/build/patches/00Disable-WebGPU.patch b/build/patches/00Disable-WebGPU.patch index e2363ec12..6da654839 100644 --- a/build/patches/00Disable-WebGPU.patch +++ b/build/patches/00Disable-WebGPU.patch @@ -11,10 +11,10 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc --- a/gpu/config/gpu_finch_features.cc +++ b/gpu/config/gpu_finch_features.cc -@@ -284,7 +284,7 @@ BASE_FEATURE(kForceGpuMainThreadToNormalPriorityDrDc, - // Enable WebGPU on gpu service side only. This is used with origin trial and +@@ -300,7 +300,7 @@ BASE_FEATURE(kForceGpuMainThreadToNormalPriorityDrDc, // enabled by default on supported platforms. - #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) + #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \ + BUILDFLAG(IS_ANDROID) -#define WEBGPU_ENABLED base::FEATURE_ENABLED_BY_DEFAULT +#define WEBGPU_ENABLED base::FEATURE_DISABLED_BY_DEFAULT #else @@ -23,7 +23,7 @@ diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc diff --git a/third_party/blink/renderer/modules/webgpu/gpu.cc b/third_party/blink/renderer/modules/webgpu/gpu.cc --- a/third_party/blink/renderer/modules/webgpu/gpu.cc +++ b/third_party/blink/renderer/modules/webgpu/gpu.cc -@@ -370,6 +370,7 @@ ScriptPromise GPU::requestAdapter(ScriptState* script_state, +@@ -369,6 +369,7 @@ ScriptPromise GPU::requestAdapter(ScriptState* script_state, "WebGPU is experimental on this platform. See " "https://github.com/gpuweb/gpuweb/wiki/" "Implementation-Status#implementation-status")); diff --git a/build/patches/00Disable-prefers-reduced-transparency-media-query.patch b/build/patches/00Disable-prefers-reduced-transparency-media-query.patch index e9c6f0b1c..bc59b9808 100644 --- a/build/patches/00Disable-prefers-reduced-transparency-media-query.patch +++ b/build/patches/00Disable-prefers-reduced-transparency-media-query.patch @@ -10,7 +10,7 @@ This feature can be used for fingerprinting as it exposes a user preference diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -3075,8 +3075,8 @@ +@@ -2957,8 +2957,8 @@ base_feature: "none", }, { diff --git a/build/patches/00Disable-privacy-issues-in-password-manager.patch b/build/patches/00Disable-privacy-issues-in-password-manager.patch index e71839366..87a6466ca 100644 --- a/build/patches/00Disable-privacy-issues-in-password-manager.patch +++ b/build/patches/00Disable-privacy-issues-in-password-manager.patch @@ -49,7 +49,7 @@ diff --git a/chrome/browser/password_manager/generated_password_leak_detection_p diff --git a/components/password_manager/core/browser/affiliation/affiliation_backend.cc b/components/password_manager/core/browser/affiliation/affiliation_backend.cc --- a/components/password_manager/core/browser/affiliation/affiliation_backend.cc +++ b/components/password_manager/core/browser/affiliation/affiliation_backend.cc -@@ -404,6 +404,7 @@ void AffiliationBackend::OnMalformedResponse( +@@ -409,6 +409,7 @@ void AffiliationBackend::OnMalformedResponse( } bool AffiliationBackend::OnCanSendNetworkRequest() { @@ -114,9 +114,9 @@ diff --git a/components/password_manager/core/browser/affiliation/facet_manager. diff --git a/components/password_manager/core/browser/features/password_features.cc b/components/password_manager/core/browser/features/password_features.cc --- a/components/password_manager/core/browser/features/password_features.cc +++ b/components/password_manager/core/browser/features/password_features.cc -@@ -209,4 +209,8 @@ BASE_FEATURE(kUsernameFirstFlowWithIntermediateValuesVoting, - "UsernameFirstFlowWithIntermediateValuesVoting", - base::FEATURE_ENABLED_BY_DEFAULT); +@@ -239,4 +239,8 @@ BASE_FEATURE(kUseGMSCoreForBrandingInfo, + base::FEATURE_DISABLED_BY_DEFAULT); + #endif +SET_CROMITE_FEATURE_ENABLED(kFillOnAccountSelect); +SET_CROMITE_FEATURE_DISABLED(kPasswordManagerEnableReceiverService); diff --git a/build/patches/00Disable-remote-altsvc-for-h3-connections.patch b/build/patches/00Disable-remote-altsvc-for-h3-connections.patch index 7d725131b..b7a27d6e6 100644 --- a/build/patches/00Disable-remote-altsvc-for-h3-connections.patch +++ b/build/patches/00Disable-remote-altsvc-for-h3-connections.patch @@ -52,7 +52,7 @@ diff --git a/net/http/http_stream_factory_job_controller.cc b/net/http/http_stre diff --git a/net/quic/quic_context.h b/net/quic/quic_context.h --- a/net/quic/quic_context.h +++ b/net/quic/quic_context.h -@@ -179,7 +179,7 @@ struct NET_EXPORT QuicParams { +@@ -183,7 +183,7 @@ struct NET_EXPORT QuicParams { bool allow_server_migration = false; // If true, allows QUIC to use alternative services with a different // hostname from the origin. diff --git a/build/patches/00Disable-speechSynthesis-getVoices-API.patch b/build/patches/00Disable-speechSynthesis-getVoices-API.patch index 757823dc9..d42b81db4 100644 --- a/build/patches/00Disable-speechSynthesis-getVoices-API.patch +++ b/build/patches/00Disable-speechSynthesis-getVoices-API.patch @@ -31,7 +31,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc -@@ -1605,7 +1605,7 @@ ChromeContentRendererClient::CreateWorkerContentSettingsClient( +@@ -1603,7 +1603,7 @@ ChromeContentRendererClient::CreateWorkerContentSettingsClient( std::unique_ptr ChromeContentRendererClient::CreateSpeechRecognitionClient( content::RenderFrame* render_frame) { @@ -43,7 +43,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc b/components/content_settings/renderer/content_settings_agent_impl.cc --- a/components/content_settings/renderer/content_settings_agent_impl.cc +++ b/components/content_settings/renderer/content_settings_agent_impl.cc -@@ -496,6 +496,14 @@ bool ContentSettingsAgentImpl::IsAllowlistedForContentSettings() const { +@@ -476,6 +476,14 @@ bool ContentSettingsAgentImpl::IsAllowlistedForContentSettings() const { return false; } @@ -58,7 +58,7 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc bool ContentSettingsAgentImpl::UpdateOverrides() { // Evaluate the content setting rules ContentSetting setting = CONTENT_SETTING_ALLOW; -@@ -506,7 +514,6 @@ bool ContentSettingsAgentImpl::UpdateOverrides() { +@@ -486,7 +494,6 @@ bool ContentSettingsAgentImpl::UpdateOverrides() { } return UpdateTimeZoneOverride( setting, content_setting_rules_->timezone_override_value); @@ -69,7 +69,7 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc diff --git a/components/content_settings/renderer/content_settings_agent_impl.h b/components/content_settings/renderer/content_settings_agent_impl.h --- a/components/content_settings/renderer/content_settings_agent_impl.h +++ b/components/content_settings/renderer/content_settings_agent_impl.h -@@ -117,6 +117,8 @@ class ContentSettingsAgentImpl +@@ -116,6 +116,8 @@ class ContentSettingsAgentImpl void SetRendererContentSettingRulesForTest( const RendererContentSettingRules& rules); @@ -139,7 +139,7 @@ new file mode 100644 diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/third_party/blink/public/platform/web_content_settings_client.h --- a/third_party/blink/public/platform/web_content_settings_client.h +++ b/third_party/blink/public/platform/web_content_settings_client.h -@@ -119,6 +119,8 @@ class WebContentSettingsClient { +@@ -115,6 +115,8 @@ class WebContentSettingsClient { // frame. virtual bool ShouldAutoupgradeMixedContent() { return true; } diff --git a/build/patches/00Disallowing-MIDI-permission-by-default.patch b/build/patches/00Disallowing-MIDI-permission-by-default.patch index a39666ea3..2bea479f0 100644 --- a/build/patches/00Disallowing-MIDI-permission-by-default.patch +++ b/build/patches/00Disallowing-MIDI-permission-by-default.patch @@ -4,20 +4,15 @@ Subject: Disallowing MIDI permission by default License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - components/permissions/features.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + .../Disallowing-MIDI-permission-by-default.inc | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 cromite_flags/content/public/common/content_features_cc/Disallowing-MIDI-permission-by-default.inc -diff --git a/components/permissions/features.cc b/components/permissions/features.cc ---- a/components/permissions/features.cc -+++ b/components/permissions/features.cc -@@ -157,7 +157,7 @@ BASE_FEATURE(kShowRelatedWebsiteSetsPermissionGrants, - // Enables disallowing MIDI permission by default. - BASE_FEATURE(kBlockMidiByDefault, - "BlockMidiByDefault", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ base::FEATURE_ENABLED_BY_DEFAULT); - - } // namespace features - namespace feature_params { +diff --git a/cromite_flags/content/public/common/content_features_cc/Disallowing-MIDI-permission-by-default.inc b/cromite_flags/content/public/common/content_features_cc/Disallowing-MIDI-permission-by-default.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_cc/Disallowing-MIDI-permission-by-default.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_ENABLED(kBlockMidiByDefault); -- 2.25.1 diff --git a/build/patches/00Enable-Android-Dynamic-Performance-Framework.patch b/build/patches/00Enable-Android-Dynamic-Performance-Framework.patch index 77c77c6c9..1c5893287 100644 --- a/build/patches/00Enable-Android-Dynamic-Performance-Framework.patch +++ b/build/patches/00Enable-Android-Dynamic-Performance-Framework.patch @@ -23,7 +23,7 @@ diff --git a/chrome/version.gni b/chrome/version.gni diff --git a/components/viz/common/features.cc b/components/viz/common/features.cc --- a/components/viz/common/features.cc +++ b/components/viz/common/features.cc -@@ -306,9 +306,10 @@ const base::FeatureParam kADPFMidFrameBoostDurationMultiplier{ +@@ -303,9 +303,10 @@ BASE_FEATURE(kDelegateTransforms, // If enabled, Chrome includes the Renderer Main thread(s) into the // ADPF(Android Dynamic Performance Framework) hint session. diff --git a/build/patches/00Enable-Document-Open-Inheritance-Removal.patch b/build/patches/00Enable-Document-Open-Inheritance-Removal.patch index 00dedad44..67a48b665 100644 --- a/build/patches/00Enable-Document-Open-Inheritance-Removal.patch +++ b/build/patches/00Enable-Document-Open-Inheritance-Removal.patch @@ -11,7 +11,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc --- a/third_party/blink/renderer/core/dom/document.cc +++ b/third_party/blink/renderer/core/dom/document.cc -@@ -3419,70 +3419,6 @@ void Document::open(LocalDOMWindow* entered_window, +@@ -3421,70 +3421,6 @@ void Document::open(LocalDOMWindow* entered_window, // https://chromestatus.com/metrics/feature/timeline/popularity/4375 CountUse(WebFeature::kDocumentOpenMutateSandbox); } @@ -85,7 +85,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -1490,7 +1490,6 @@ +@@ -1439,7 +1439,6 @@ { name: "DocumentOpenSandboxInheritanceRemoval", status: "stable", diff --git a/build/patches/00Enable-ImprovedBookmarks-by-default.patch b/build/patches/00Enable-ImprovedBookmarks-by-default.patch index 46a30cb47..ab5ae4912 100644 --- a/build/patches/00Enable-ImprovedBookmarks-by-default.patch +++ b/build/patches/00Enable-ImprovedBookmarks-by-default.patch @@ -5,10 +5,10 @@ Subject: Enable ImprovedBookmarks by default License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- chrome/android/java/res/layout/bookmark_search_box_row.xml | 4 ++-- - .../chromium/chrome/browser/bookmarks/BookmarkFeatures.java | 2 +- .../browser/bookmarks/BookmarkSearchBoxRowViewBinder.java | 2 ++ .../chromium/chrome/browser/bookmarks/BookmarkUiPrefs.java | 2 +- .../org/chromium/chrome/browser/bookmarks/BookmarkUtils.java | 3 ++- + .../org/chromium/chrome/browser/flags/ChromeFeatureList.java | 2 +- components/bookmarks/browser/bookmark_client.cc | 3 +-- .../Enable-ImprovedBookmarks-by-default.inc | 1 + 7 files changed, 10 insertions(+), 7 deletions(-) @@ -28,18 +28,6 @@ diff --git a/chrome/android/java/res/layout/bookmark_search_box_row.xml b/chrome android:orientation="horizontal"> GetSwitchValueASCII( switches::kProcessType); @@ -91,15 +90,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tracing/setting import org.chromium.components.browser_ui.settings.SettingsUtils; import org.chromium.components.version_info.Channel; import org.chromium.components.version_info.VersionConstants; -@@ -22,6 +25,7 @@ import org.chromium.components.version_info.VersionInfo; - */ +@@ -20,6 +23,7 @@ import org.chromium.components.version_info.VersionInfo; + /** Settings fragment containing preferences aimed at Chrome and web developers. */ public class DeveloperSettings extends PreferenceFragmentCompat { private static final String UI_PREF_BETA_STABLE_HINT = "beta_stable_hint"; + private static final String TEST_GWP_ASAN_KEY = "test_gwp_asan"; // Non-translated strings: private static final String MSG_DEVELOPER_OPTIONS_TITLE = "Developer options"; -@@ -56,5 +60,21 @@ public class DeveloperSettings extends PreferenceFragmentCompat { +@@ -54,5 +58,21 @@ public class DeveloperSettings extends PreferenceFragmentCompat { if (VersionInfo.isBetaBuild() || VersionInfo.isStableBuild()) { getPreferenceScreen().removePreference(findPreference(UI_PREF_BETA_STABLE_HINT)); } @@ -124,7 +123,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tracing/setting diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc --- a/chrome/app/chrome_main_delegate.cc +++ b/chrome/app/chrome_main_delegate.cc -@@ -1935,7 +1935,7 @@ void ChromeMainDelegate::InitializeMemorySystem() { +@@ -1939,7 +1939,7 @@ void ChromeMainDelegate::InitializeMemorySystem() { const version_info::Channel channel = chrome::GetChannel(); const bool is_canary_dev = (channel == version_info::Channel::CANARY || channel == version_info::Channel::DEV); @@ -183,7 +182,7 @@ diff --git a/chrome/browser/util/android/java/src/org/chromium/chrome/browser/ut import org.chromium.base.ContextUtils; import org.chromium.base.Log; -@@ -32,4 +33,13 @@ public class PlatformUtil { +@@ -30,4 +31,13 @@ public class PlatformUtil { Log.e(TAG, "cannot find activity to launch %s", url, e); } } @@ -200,42 +199,33 @@ diff --git a/chrome/browser/util/android/java/src/org/chromium/chrome/browser/ut diff --git a/components/gwp_asan/client/gwp_asan.cc b/components/gwp_asan/client/gwp_asan.cc --- a/components/gwp_asan/client/gwp_asan.cc +++ b/components/gwp_asan/client/gwp_asan.cc -@@ -38,7 +38,7 @@ namespace gwp_asan { - namespace internal { - namespace { - --constexpr bool kCpuIs64Bit = -+[[maybe_unused]] constexpr bool kCpuIs64Bit = - #if defined(ARCH_CPU_64_BITS) - true; - #else -@@ -72,7 +72,15 @@ constexpr int kDefaultMaxMetadata = 210; +@@ -76,21 +76,22 @@ constexpr int kDefaultMaxMetadata = 210; constexpr int kDefaultTotalPages = kCpuIs64Bit ? 2048 : kDefaultMaxMetadata * 2; constexpr int kDefaultAllocationSamplingMultiplier = 1500; constexpr int kDefaultAllocationSamplingRange = 16; -constexpr double kDefaultProcessSamplingProbability = 0.01; +constexpr double kDefaultProcessSamplingProbability = 0.5; +constexpr int kDefaultProcessSamplingBoost2 = 10; -+#elif BUILDFLAG(IS_ANDROID) -+constexpr int kDefaultMaxAllocations = 70; -+constexpr int kDefaultMaxMetadata = 255; -+constexpr int kDefaultTotalPages = 512; -+constexpr int kDefaultAllocationSamplingMultiplier = 2000; -+constexpr int kDefaultAllocationSamplingRange = 20; + #elif BUILDFLAG(IS_ANDROID) + constexpr int kDefaultMaxAllocations = 70; + constexpr int kDefaultMaxMetadata = 255; + constexpr int kDefaultTotalPages = 512; + constexpr int kDefaultAllocationSamplingMultiplier = 2000; + constexpr int kDefaultAllocationSamplingRange = 20; +-constexpr double kDefaultProcessSamplingProbability = 0.015; +constexpr double kDefaultProcessSamplingProbability = 0.5; - constexpr int kDefaultProcessSamplingBoost2 = 10; - #else // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + #else constexpr int kDefaultMaxAllocations = 70; -@@ -80,7 +88,7 @@ constexpr int kDefaultMaxMetadata = 255; + constexpr int kDefaultMaxMetadata = 255; constexpr int kDefaultTotalPages = kCpuIs64Bit ? 2048 : kDefaultMaxMetadata * 2; constexpr int kDefaultAllocationSamplingMultiplier = 1000; constexpr int kDefaultAllocationSamplingRange = 16; -constexpr double kDefaultProcessSamplingProbability = 0.015; +constexpr double kDefaultProcessSamplingProbability = 0.5; - constexpr int kDefaultProcessSamplingBoost2 = 10; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || // BUILDFLAG(IS_FUCHSIA) -@@ -288,7 +296,7 @@ void EnableForMalloc(bool boost_sampling, const char* process_type) { + constexpr int kDefaultProcessSamplingBoost2 = 10; +@@ -415,7 +416,7 @@ void EnableForMalloc(bool boost_sampling, const char* process_type) { std::ignore = init_once; #else std::ignore = internal::kGwpAsanMalloc; @@ -244,7 +234,7 @@ diff --git a/components/gwp_asan/client/gwp_asan.cc b/components/gwp_asan/client #endif // BUILDFLAG(USE_ALLOCATOR_SHIM) } -@@ -308,7 +316,7 @@ void EnableForPartitionAlloc(bool boost_sampling, const char* process_type) { +@@ -435,7 +436,7 @@ void EnableForPartitionAlloc(bool boost_sampling, const char* process_type) { std::ignore = init_once; #else std::ignore = internal::kGwpAsanPartitionAlloc; @@ -253,23 +243,10 @@ diff --git a/components/gwp_asan/client/gwp_asan.cc b/components/gwp_asan/client #endif // BUILDFLAG(USE_PARTITION_ALLOC) } -diff --git a/components/gwp_asan/client/gwp_asan_features.cc b/components/gwp_asan/client/gwp_asan_features.cc ---- a/components/gwp_asan/client/gwp_asan_features.cc -+++ b/components/gwp_asan/client/gwp_asan_features.cc -@@ -9,7 +9,8 @@ - namespace gwp_asan::internal { - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) -+ BUILDFLAG(IS_CHROMEOS) || \ -+ (BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_64_BITS)) - constexpr base::FeatureState kDefaultEnabled = base::FEATURE_ENABLED_BY_DEFAULT; - #else - constexpr base::FeatureState kDefaultEnabled = diff --git a/components/memory_system/memory_system.cc b/components/memory_system/memory_system.cc --- a/components/memory_system/memory_system.cc +++ b/components/memory_system/memory_system.cc -@@ -169,6 +169,7 @@ void MemorySystem::Impl::Initialize( +@@ -197,6 +197,7 @@ void MemorySystem::Impl::Initialize( if (gwp_asan_parameters) { InitializeGwpASan(*gwp_asan_parameters, initialization_data); diff --git a/build/patches/00Enable-search-engine-settings-desktop-ui.patch b/build/patches/00Enable-search-engine-settings-desktop-ui.patch index 602c6af8c..f07ea87af 100644 --- a/build/patches/00Enable-search-engine-settings-desktop-ui.patch +++ b/build/patches/00Enable-search-engine-settings-desktop-ui.patch @@ -51,7 +51,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../android/template_url_service_android.cc | 2 +- .../search_engines/template_url_service.cc | 8 +- .../search_engines/template_url_service.h | 6 +- - content/browser/webui/web_ui_impl.cc | 11 +- + content/browser/webui/web_ui_impl.cc | 16 +- content/browser/webui/web_ui_impl.h | 3 + content/public/browser/web_ui.h | 1 + ui/base/template_expressions.cc | 21 +- @@ -68,7 +68,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html ui/webui/resources/include_polymer.gni | 2 +- ui/webui/resources/js/BUILD.gn | 2 +- ui/webui/resources/js/load_time_data.ts | 17 +- - 61 files changed, 1088 insertions(+), 58 deletions(-) + 61 files changed, 1091 insertions(+), 60 deletions(-) create mode 100644 chrome/app/settings_strings_android.grdp create mode 100644 chrome/browser/search_engines/android/java/res/layout/search_engine_layout.xml create mode 100644 chrome/browser/ui/webui/settings/settings_localized_strings_provider_android.cc @@ -90,7 +90,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin import org.chromium.base.IntentUtils; import org.chromium.chrome.browser.autofill.settings.AutofillPaymentMethodsFragment; import org.chromium.chrome.browser.browsing_data.ClearBrowsingDataFragment; -@@ -27,6 +30,13 @@ import org.chromium.components.browser_ui.site_settings.SiteSettings; +@@ -25,6 +28,13 @@ import org.chromium.components.browser_ui.site_settings.SiteSettings; public class SettingsLauncherImpl implements SettingsLauncher { public SettingsLauncherImpl() {} @@ -107,7 +107,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd -@@ -311,6 +311,11 @@ are declared in tools/grit/grit_rule.gni. +@@ -314,6 +314,11 @@ are declared in tools/grit/grit_rule.gni. @@ -119,7 +119,7 @@ diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources -@@ -486,7 +491,7 @@ are declared in tools/grit/grit_rule.gni. +@@ -489,7 +494,7 @@ are declared in tools/grit/grit_rule.gni. Disable @@ -131,7 +131,7 @@ diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp --- a/chrome/app/settings_strings.grdp +++ b/chrome/app/settings_strings.grdp -@@ -2509,6 +2509,9 @@ +@@ -2427,6 +2427,9 @@ URL with %s in place of query @@ -406,7 +406,7 @@ new file mode 100644 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -3695,6 +3695,9 @@ static_library("browser") { +@@ -3668,6 +3668,9 @@ static_library("browser") { "//components/user_scripts/android", ] } @@ -447,7 +447,7 @@ diff --git a/chrome/browser/resources/settings/BUILD.gn b/chrome/browser/resourc diff --git a/chrome/browser/resources/settings/page_visibility.ts b/chrome/browser/resources/settings/page_visibility.ts --- a/chrome/browser/resources/settings/page_visibility.ts +++ b/chrome/browser/resources/settings/page_visibility.ts -@@ -46,7 +46,35 @@ export interface PrivacyPageVisibility { +@@ -47,7 +47,35 @@ export interface PrivacyPageVisibility { */ export let pageVisibility: PageVisibility; @@ -610,7 +610,7 @@ diff --git a/chrome/browser/resources/settings/search_engines_page/search_engine diff --git a/chrome/browser/resources/settings/search_page/search_page.html b/chrome/browser/resources/settings/search_page/search_page.html --- a/chrome/browser/resources/settings/search_page/search_page.html +++ b/chrome/browser/resources/settings/search_page/search_page.html -@@ -121,7 +121,11 @@ +@@ -129,7 +129,11 @@ associated-control="[[$$('#enginesSubpageTrigger')]]" page-title="$i18n{searchEnginesManageSiteSearch}" search-label="$i18n{searchEnginesSearch}" @@ -693,10 +693,10 @@ diff --git a/chrome/browser/resources/settings_shared/BUILD.gn b/chrome/browser/ diff --git a/chrome/browser/search_engines/android/BUILD.gn b/chrome/browser/search_engines/android/BUILD.gn --- a/chrome/browser/search_engines/android/BUILD.gn +++ b/chrome/browser/search_engines/android/BUILD.gn -@@ -75,6 +75,7 @@ android_resources("java_resources") { - sources = [ +@@ -79,6 +79,7 @@ android_resources("java_resources") { "java/res/drawable/search_sogou.xml", "java/res/layout/search_engine.xml", + "java/res/layout/search_engine_choice_header.xml", + "java/res/layout/search_engine_layout.xml", "java/res/layout/search_engine_choice_item.xml", "java/res/layout/search_engine_choice_view.xml", @@ -744,8 +744,8 @@ diff --git a/chrome/browser/search_engines/android/java/src/org/chromium/chrome/ + import androidx.fragment.app.ListFragment; - import org.chromium.chrome.browser.profiles.Profile; -@@ -25,6 +29,7 @@ import org.chromium.components.browser_ui.settings.SettingsLauncher; + import org.chromium.chrome.browser.flags.ChromeFeatureList; +@@ -27,6 +31,7 @@ import org.chromium.components.browser_ui.settings.SettingsLauncher; public class SearchEngineSettings extends ListFragment implements ProfileDependentSetting { private SearchEngineAdapter mSearchEngineAdapter; private Profile mProfile; @@ -753,7 +753,7 @@ diff --git a/chrome/browser/search_engines/android/java/src/org/chromium/chrome/ String getValueForTesting() { return mSearchEngineAdapter.getValueForTesting(); -@@ -46,6 +51,19 @@ public class SearchEngineSettings extends ListFragment implements ProfileDepende +@@ -48,6 +53,19 @@ public class SearchEngineSettings extends ListFragment implements ProfileDepende setListAdapter(mSearchEngineAdapter); } @@ -773,7 +773,7 @@ diff --git a/chrome/browser/search_engines/android/java/src/org/chromium/chrome/ @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); -@@ -81,6 +99,7 @@ public class SearchEngineSettings extends ListFragment implements ProfileDepende +@@ -90,6 +108,7 @@ public class SearchEngineSettings extends ListFragment implements ProfileDepende * @param settingsLauncher The SettingsLauncher that is injected. */ public void setSettingsLauncher(SettingsLauncher settingsLauncher) { @@ -784,7 +784,7 @@ diff --git a/chrome/browser/search_engines/android/java/src/org/chromium/chrome/ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn -@@ -1009,6 +1009,18 @@ static_library("ui") { +@@ -1022,6 +1022,18 @@ static_library("ui") { "//ui/android", "//url", ] @@ -986,7 +986,7 @@ diff --git a/chrome/browser/ui/search_engines/template_url_table_model.h b/chrom diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -133,6 +133,8 @@ +@@ -130,6 +130,8 @@ #include "chrome/browser/ui/webui/webapks/webapks_ui.h" #include "components/feed/buildflags.h" #include "components/feed/feed_feature_list.h" @@ -995,7 +995,7 @@ diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrom #else // BUILDFLAG(IS_ANDROID) #include "chrome/browser/media/router/discovery/access_code/access_code_cast_feature.h" #include "chrome/browser/media/router/media_router_feature.h" -@@ -664,6 +666,10 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, +@@ -649,6 +651,10 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, return &NewWebUI; } #endif // !BUILDFLAG(IS_ANDROID) @@ -1128,9 +1128,9 @@ diff --git a/chrome/browser/ui/webui/favicon_source.h b/chrome/browser/ui/webui/ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome/browser/ui/webui/settings/search_engines_handler.cc --- a/chrome/browser/ui/webui/settings/search_engines_handler.cc +++ b/chrome/browser/ui/webui/settings/search_engines_handler.cc -@@ -31,10 +31,12 @@ +@@ -30,10 +30,12 @@ + #include "components/search_engines/template_url.h" #include "components/search_engines/template_url_service.h" - #include "components/signin/public/base/signin_switches.h" #include "content/public/browser/web_ui.h" +#if !BUILDFLAG(IS_ANDROID) #include "extensions/browser/extension_registry.h" @@ -1141,7 +1141,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome #if BUILDFLAG(IS_CHROMEOS_ASH) #include "ash/public/cpp/new_window_delegate.h" -@@ -46,6 +48,7 @@ namespace { +@@ -45,6 +47,7 @@ namespace { const char kSearchEngineField[] = "searchEngine"; const char kKeywordField[] = "keyword"; const char kQueryUrlField[] = "queryUrl"; @@ -1149,7 +1149,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome // Dummy number used for indicating that a new search engine is added. const int kNewSearchEngineIndex = -1; -@@ -218,15 +221,17 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( +@@ -217,15 +220,17 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( IDS_SEARCH_ENGINES_EDITOR_DESCRIPTION_COLUMN)); dict.Set("keyword", table_model->GetText( index, IDS_SEARCH_ENGINES_EDITOR_KEYWORD_COLUMN)); @@ -1166,9 +1166,9 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome +#if !BUILDFLAG(IS_ANDROID) const bool is_search_engine_choice_settings_ui = - base::FeatureList::IsEnabled(switches::kSearchEngineChoiceSettingsUi) && search_engines::IsChoiceScreenFlagEnabled( -@@ -237,6 +242,7 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( + search_engines::ChoicePromo::kAny); +@@ -241,6 +246,7 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( template_url->keyword(), /*parent_directory_path=*/u"images/"); dict.Set("iconPath", icon_path); } @@ -1176,7 +1176,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome dict.Set("modelIndex", base::checked_cast(index)); -@@ -250,8 +256,10 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( +@@ -254,8 +260,10 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( list_controller_.ShouldConfirmDeletion(template_url)); TemplateURL::Type type = template_url->type(); dict.Set("isOmniboxExtension", type == TemplateURL::OMNIBOX_API_EXTENSION); @@ -1187,7 +1187,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome const extensions::Extension* extension = extensions::ExtensionRegistry::Get(profile)->GetExtensionById( template_url->GetExtensionId(), -@@ -266,6 +274,7 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( +@@ -270,6 +278,7 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( dict.Set("extension", std::move(ext_info)); } } @@ -1195,7 +1195,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome return dict; } -@@ -357,12 +366,13 @@ void SearchEnginesHandler::HandleSearchEngineEditStarted( +@@ -361,12 +370,13 @@ void SearchEnginesHandler::HandleSearchEngineEditStarted( void SearchEnginesHandler::OnEditedKeyword(TemplateURL* template_url, const std::u16string& title, const std::u16string& keyword, @@ -1212,7 +1212,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome edit_controller_.reset(); } -@@ -390,6 +400,8 @@ bool SearchEnginesHandler::CheckFieldValidity(const std::string& field_name, +@@ -394,6 +404,8 @@ bool SearchEnginesHandler::CheckFieldValidity(const std::string& field_name, is_valid = edit_controller_->IsKeywordValid(base::UTF8ToUTF16(field_value)); else if (field_name.compare(kQueryUrlField) == 0) is_valid = edit_controller_->IsURLValid(field_value); @@ -1221,7 +1221,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome else NOTREACHED(); -@@ -409,18 +421,20 @@ void SearchEnginesHandler::HandleSearchEngineEditCompleted( +@@ -413,18 +425,20 @@ void SearchEnginesHandler::HandleSearchEngineEditCompleted( if (!edit_controller_.get()) return; @@ -1261,7 +1261,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.h b/chrome/ diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc --- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc +++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -@@ -2502,6 +2502,8 @@ void AddSearchEnginesStrings(content::WebUIDataSource* html_source) { +@@ -2474,6 +2474,8 @@ void AddSearchEnginesStrings(content::WebUIDataSource* html_source) { {"searchEnginesQueryURL", IDS_SETTINGS_SEARCH_ENGINES_QUERY_URL}, {"searchEnginesQueryURLExplanation", IDS_SETTINGS_SEARCH_ENGINES_QUERY_URL_EXPLANATION}, @@ -1770,7 +1770,7 @@ new file mode 100644 diff --git a/chrome/browser/ui/webui/webui_util.cc b/chrome/browser/ui/webui/webui_util.cc --- a/chrome/browser/ui/webui/webui_util.cc +++ b/chrome/browser/ui/webui/webui_util.cc -@@ -94,6 +94,11 @@ void SetupChromeRefresh2023(content::WebUIDataSource* source) { +@@ -91,6 +91,11 @@ void SetupChromeRefresh2023(content::WebUIDataSource* source) { source->AddString( "chromeRefresh2023Attribute", features::IsChromeWebuiRefresh2023() ? "chrome-refresh-2023" : ""); @@ -1785,7 +1785,7 @@ diff --git a/chrome/browser/ui/webui/webui_util.cc b/chrome/browser/ui/webui/web diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni --- a/chrome/chrome_paks.gni +++ b/chrome/chrome_paks.gni -@@ -149,6 +149,17 @@ template("chrome_extra_paks") { +@@ -148,6 +148,17 @@ template("chrome_extra_paks") { sources += invoker.additional_paks } @@ -1806,7 +1806,7 @@ diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni diff --git a/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsLauncher.java b/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsLauncher.java --- a/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsLauncher.java +++ b/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsLauncher.java -@@ -40,6 +40,8 @@ public interface SettingsLauncher { +@@ -44,6 +44,8 @@ public interface SettingsLauncher { int ACCESSIBILITY = 6; } @@ -1841,7 +1841,7 @@ diff --git a/components/search_engines/android/template_url_service_android.cc b diff --git a/components/search_engines/template_url_service.cc b/components/search_engines/template_url_service.cc --- a/components/search_engines/template_url_service.cc +++ b/components/search_engines/template_url_service.cc -@@ -444,13 +444,15 @@ TemplateURL* TemplateURLService::AddWithOverrides( +@@ -466,13 +466,15 @@ TemplateURL* TemplateURLService::AddWithOverrides( std::unique_ptr template_url, const std::u16string& short_name, const std::u16string& keyword, @@ -1858,7 +1858,7 @@ diff --git a/components/search_engines/template_url_service.cc b/components/sear return Add(std::move(template_url)); } -@@ -628,7 +630,8 @@ void TemplateURLService::IncrementUsageCount(TemplateURL* url) { +@@ -650,7 +652,8 @@ void TemplateURLService::IncrementUsageCount(TemplateURL* url) { void TemplateURLService::ResetTemplateURL(TemplateURL* url, const std::u16string& title, const std::u16string& keyword, @@ -1868,7 +1868,7 @@ diff --git a/components/search_engines/template_url_service.cc b/components/sear DCHECK(!IsCreatedByExtension(url)); DCHECK(!keyword.empty()); DCHECK(!search_url.empty()); -@@ -640,6 +643,7 @@ void TemplateURLService::ResetTemplateURL(TemplateURL* url, +@@ -662,6 +665,7 @@ void TemplateURLService::ResetTemplateURL(TemplateURL* url, // The urls have changed, reset the favicon url. data.favicon_url = GURL(); } @@ -1879,7 +1879,7 @@ diff --git a/components/search_engines/template_url_service.cc b/components/sear diff --git a/components/search_engines/template_url_service.h b/components/search_engines/template_url_service.h --- a/components/search_engines/template_url_service.h +++ b/components/search_engines/template_url_service.h -@@ -193,7 +193,8 @@ class TemplateURLService : public WebDataServiceConsumer, +@@ -203,7 +203,8 @@ class TemplateURLService : public WebDataServiceConsumer, TemplateURL* AddWithOverrides(std::unique_ptr template_url, const std::u16string& short_name, const std::u16string& keyword, @@ -1889,7 +1889,7 @@ diff --git a/components/search_engines/template_url_service.h b/components/searc // Removes the keyword from the model. This deletes the supplied TemplateURL. // This fails if the supplied template_url is the default search provider. -@@ -246,7 +247,8 @@ class TemplateURLService : public WebDataServiceConsumer, +@@ -256,7 +257,8 @@ class TemplateURLService : public WebDataServiceConsumer, void ResetTemplateURL(TemplateURL* url, const std::u16string& title, const std::u16string& keyword, @@ -1913,17 +1913,21 @@ diff --git a/content/browser/webui/web_ui_impl.cc b/content/browser/webui/web_ui void WebUIImpl::ProcessWebUIMessage(const GURL& source_url, const std::string& message, base::Value::List args) { -@@ -268,8 +272,13 @@ void WebUIImpl::ProcessWebUIMessage(const GURL& source_url, +@@ -268,9 +272,15 @@ void WebUIImpl::ProcessWebUIMessage(const GURL& source_url, return; } -- NOTREACHED() << "Unhandled chrome.send(\"" << message << "\", " << args +- DUMP_WILL_BE_NOTREACHED_NORETURN() +- << "Unhandled chrome.send(\"" << message << "\", " << args << "); from " +- << source_url; + if (!do_not_crash_on_unhandled_message_) { -+ NOTREACHED() << "Unhandled chrome.send(\"" << message << "\", " << args -+ << "); from " << source_url; ++ DUMP_WILL_BE_NOTREACHED_NORETURN() ++ << "Unhandled chrome.send(\"" << message << "\", " << args << "); from " ++ << source_url; + } else { -+ DLOG(INFO) << "---Unhandled chrome.send(\"" << message << "\", " << args - << "); from " << source_url; ++ DLOG(INFO) ++ << "---Unhandled chrome.send(\"" << message << "\", " << args << "); from " ++ << source_url; + } } @@ -1931,7 +1935,7 @@ diff --git a/content/browser/webui/web_ui_impl.cc b/content/browser/webui/web_ui diff --git a/content/browser/webui/web_ui_impl.h b/content/browser/webui/web_ui_impl.h --- a/content/browser/webui/web_ui_impl.h +++ b/content/browser/webui/web_ui_impl.h -@@ -84,6 +84,7 @@ class CONTENT_EXPORT WebUIImpl : public WebUI, +@@ -82,6 +82,7 @@ class CONTENT_EXPORT WebUIImpl : public WebUI, public mojom::WebUIHost { void ProcessWebUIMessage(const GURL& source_url, const std::string& message, base::Value::List args) override; @@ -1939,7 +1943,7 @@ diff --git a/content/browser/webui/web_ui_impl.h b/content/browser/webui/web_ui_ bool CanCallJavascript() override; void CallJavascriptFunctionUnsafe(base::StringPiece function_name) override; void CallJavascriptFunctionUnsafe( -@@ -155,6 +156,8 @@ class CONTENT_EXPORT WebUIImpl : public WebUI, +@@ -153,6 +154,8 @@ class CONTENT_EXPORT WebUIImpl : public WebUI, public mojom::WebUIHost { std::unique_ptr controller_; @@ -2020,7 +2024,7 @@ diff --git a/ui/webui/BUILD.gn b/ui/webui/BUILD.gn diff --git a/ui/webui/resources/BUILD.gn b/ui/webui/resources/BUILD.gn --- a/ui/webui/resources/BUILD.gn +++ b/ui/webui/resources/BUILD.gn -@@ -73,6 +73,16 @@ generate_grd("build_grd") { +@@ -74,6 +74,16 @@ generate_grd("build_grd") { "$target_gen_dir/cr_components/most_visited/resources.grdp", "$target_gen_dir/cr_components/settings_prefs/resources.grdp", ] @@ -2035,8 +2039,8 @@ diff --git a/ui/webui/resources/BUILD.gn b/ui/webui/resources/BUILD.gn + ] + } - if (use_nss_certs) { - public_deps += [ "cr_components/certificate_manager:build_grdp" ] + if (!optimize_webui) { + public_deps += [ "//third_party/lit/v3_0:build_grdp" ] diff --git a/ui/webui/resources/cr_components/customize_color_scheme_mode/BUILD.gn b/ui/webui/resources/cr_components/customize_color_scheme_mode/BUILD.gn --- a/ui/webui/resources/cr_components/customize_color_scheme_mode/BUILD.gn +++ b/ui/webui/resources/cr_components/customize_color_scheme_mode/BUILD.gn diff --git a/build/patches/00Enables-deactivation-of-the-js-debugger-statement.patch b/build/patches/00Enables-deactivation-of-the-js-debugger-statement.patch index 83430190f..39ed3c598 100644 --- a/build/patches/00Enables-deactivation-of-the-js-debugger-statement.patch +++ b/build/patches/00Enables-deactivation-of-the-js-debugger-statement.patch @@ -101,7 +101,7 @@ diff --git a/third_party/devtools-frontend/src/front_end/core/sdk/sdk-meta.ts b/ diff --git a/third_party/devtools-frontend/src/front_end/generated/InspectorBackendCommands.js b/third_party/devtools-frontend/src/front_end/generated/InspectorBackendCommands.js --- a/third_party/devtools-frontend/src/front_end/generated/InspectorBackendCommands.js +++ b/third_party/devtools-frontend/src/front_end/generated/InspectorBackendCommands.js -@@ -1276,6 +1276,10 @@ inspectorBackend.registerCommand("Debugger.restartFrame", [{"name": "callFrameId +@@ -1280,6 +1280,10 @@ inspectorBackend.registerCommand("Debugger.restartFrame", [{"name": "callFrameId inspectorBackend.registerCommand("Debugger.resume", [{"name": "terminateOnResume", "type": "boolean", "optional": true, "description": "Set to true to terminate execution upon resuming execution. In contrast to Runtime.terminateExecution, this will allows to execute further JavaScript (i.e. via evaluation) until execution of the paused code is actually resumed, at which point termination is triggered. If execution is currently not paused, this parameter has no effect.", "typeRef": null}], [], "Resumes JavaScript execution."); inspectorBackend.registerCommand("Debugger.searchInContent", [{"name": "scriptId", "type": "string", "optional": false, "description": "Id of the script to search in.", "typeRef": "Runtime.ScriptId"}, {"name": "query", "type": "string", "optional": false, "description": "String to search for.", "typeRef": null}, {"name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive.", "typeRef": null}, {"name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex.", "typeRef": null}], ["result"], "Searches for given string in script content."); inspectorBackend.registerCommand("Debugger.setAsyncCallStackDepth", [{"name": "maxDepth", "type": "number", "optional": false, "description": "Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async call stacks (default).", "typeRef": null}], [], "Enables or disables async call stacks tracking."); @@ -115,7 +115,7 @@ diff --git a/third_party/devtools-frontend/src/front_end/generated/InspectorBack diff --git a/third_party/devtools-frontend/src/front_end/generated/protocol-mapping.d.ts b/third_party/devtools-frontend/src/front_end/generated/protocol-mapping.d.ts --- a/third_party/devtools-frontend/src/front_end/generated/protocol-mapping.d.ts +++ b/third_party/devtools-frontend/src/front_end/generated/protocol-mapping.d.ts -@@ -4417,6 +4417,10 @@ export namespace ProtocolMapping { +@@ -4404,6 +4404,10 @@ export namespace ProtocolMapping { paramsType: [Protocol.Debugger.SetAsyncCallStackDepthRequest]; returnType: void; }; @@ -129,7 +129,7 @@ diff --git a/third_party/devtools-frontend/src/front_end/generated/protocol-mapp diff --git a/third_party/devtools-frontend/src/front_end/generated/protocol-proxy-api.d.ts b/third_party/devtools-frontend/src/front_end/generated/protocol-proxy-api.d.ts --- a/third_party/devtools-frontend/src/front_end/generated/protocol-proxy-api.d.ts +++ b/third_party/devtools-frontend/src/front_end/generated/protocol-proxy-api.d.ts -@@ -3908,6 +3908,8 @@ declare namespace ProtocolProxyApi { +@@ -3897,6 +3897,8 @@ declare namespace ProtocolProxyApi { */ invoke_setAsyncCallStackDepth(params: Protocol.Debugger.SetAsyncCallStackDepthRequest): Promise; @@ -141,7 +141,7 @@ diff --git a/third_party/devtools-frontend/src/front_end/generated/protocol-prox diff --git a/third_party/devtools-frontend/src/front_end/generated/protocol.ts b/third_party/devtools-frontend/src/front_end/generated/protocol.ts --- a/third_party/devtools-frontend/src/front_end/generated/protocol.ts +++ b/third_party/devtools-frontend/src/front_end/generated/protocol.ts -@@ -16837,6 +16837,10 @@ export namespace Debugger { +@@ -16904,6 +16904,10 @@ export namespace Debugger { maxDepth: integer; } @@ -155,7 +155,7 @@ diff --git a/third_party/devtools-frontend/src/front_end/generated/protocol.ts b diff --git a/third_party/devtools-frontend/src/third_party/blink/public/devtools_protocol/browser_protocol.json b/third_party/devtools-frontend/src/third_party/blink/public/devtools_protocol/browser_protocol.json --- a/third_party/devtools-frontend/src/third_party/blink/public/devtools_protocol/browser_protocol.json +++ b/third_party/devtools-frontend/src/third_party/blink/public/devtools_protocol/browser_protocol.json -@@ -25238,8 +25238,17 @@ +@@ -25356,8 +25356,17 @@ "$ref": "WasmDisassemblyChunk" } ] @@ -175,7 +175,7 @@ diff --git a/third_party/devtools-frontend/src/third_party/blink/public/devtools "name": "nextWasmDisassemblyChunk", "description": "Disassemble the next chunk of lines for the module corresponding to the\nstream. If disassembly is complete, this API will invalidate the streamId\nand return an empty chunk. Any subsequent calls for the now invalid stream\nwill return errors.", "experimental": true, -@@ -28367,4 +28376,4 @@ +@@ -28485,4 +28494,4 @@ ] } ] @@ -199,7 +199,7 @@ diff --git a/v8/include/js_protocol.pdl b/v8/include/js_protocol.pdl diff --git a/v8/src/common/message-template.h b/v8/src/common/message-template.h --- a/v8/src/common/message-template.h +++ b/v8/src/common/message-template.h -@@ -729,6 +729,7 @@ namespace internal { +@@ -733,6 +733,7 @@ namespace internal { /* AggregateError */ \ T(AllPromisesRejected, "All promises were rejected") \ T(CannotDeepFreezeObject, "Cannot DeepFreeze object of type %") \ @@ -210,7 +210,7 @@ diff --git a/v8/src/common/message-template.h b/v8/src/common/message-template.h diff --git a/v8/src/debug/debug-interface.cc b/v8/src/debug/debug-interface.cc --- a/v8/src/debug/debug-interface.cc +++ b/v8/src/debug/debug-interface.cc -@@ -1013,6 +1013,11 @@ void SetAsyncEventDelegate(Isolate* v8_isolate, AsyncEventDelegate* delegate) { +@@ -1015,6 +1015,11 @@ void SetAsyncEventDelegate(Isolate* v8_isolate, AsyncEventDelegate* delegate) { reinterpret_cast(v8_isolate)->set_async_event_delegate(delegate); } @@ -260,7 +260,7 @@ diff --git a/v8/src/debug/debug.h b/v8/src/debug/debug.h diff --git a/v8/src/execution/messages.cc b/v8/src/execution/messages.cc --- a/v8/src/execution/messages.cc +++ b/v8/src/execution/messages.cc -@@ -497,6 +497,7 @@ MaybeHandle MessageFormatter::TryFormat( +@@ -500,6 +500,7 @@ MaybeHandle MessageFormatter::TryFormat( MessageTemplate::kUndefinedOrNullToObject, MessageTemplate::kUnexpectedStrictReserved, MessageTemplate::kUnexpectedTokenIdentifier, diff --git a/build/patches/00Evict-the-entire-FrameTree-like-desktop.patch b/build/patches/00Evict-the-entire-FrameTree-like-desktop.patch index 819997d56..b052cde31 100644 --- a/build/patches/00Evict-the-entire-FrameTree-like-desktop.patch +++ b/build/patches/00Evict-the-entire-FrameTree-like-desktop.patch @@ -12,7 +12,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/components/viz/common/features.cc b/components/viz/common/features.cc --- a/components/viz/common/features.cc +++ b/components/viz/common/features.cc -@@ -248,7 +248,7 @@ BASE_FEATURE(kRendererAllocatesImages, +@@ -252,7 +252,7 @@ BASE_FEATURE(kRendererAllocatesImages, // evicts itself. This differs from Destkop platforms which evict the entire // FrameTree along with the topmost viz::Surface. When this feature is enabled, // Android will begin also evicting the entire FrameTree. diff --git a/build/patches/00Eyeo-Adblock-Remove-Privacy-Issues.patch b/build/patches/00Eyeo-Adblock-Remove-Privacy-Issues.patch index 3eb996829..0418e39b1 100644 --- a/build/patches/00Eyeo-Adblock-Remove-Privacy-Issues.patch +++ b/build/patches/00Eyeo-Adblock-Remove-Privacy-Issues.patch @@ -167,7 +167,7 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -166,8 +166,6 @@ static_library("browser") { +@@ -157,8 +157,6 @@ static_library("browser") { "adblock/adblock_content_browser_client.h", "adblock/adblock_controller_factory.cc", "adblock/adblock_controller_factory.h", @@ -469,8 +469,8 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc #include "chrome/browser/adblock/content_security_policy_injector_factory.h" #include "chrome/browser/adblock/element_hider_factory.h" #include "chrome/browser/adblock/resource_classification_runner_factory.h" -@@ -781,7 +780,6 @@ void ChromeBrowserMainExtraPartsProfiles:: - ExitTypeServiceFactory::GetInstance(); +@@ -823,7 +822,6 @@ void ChromeBrowserMainExtraPartsProfiles:: + FakeSmartCardDeviceServiceFactory::GetInstance(); #endif adblock::AdblockControllerFactory::GetInstance(); - adblock::AdblockTelemetryServiceFactory::GetInstance(); @@ -481,14 +481,14 @@ diff --git a/chrome/browser/resources/settings/BUILD.gn b/chrome/browser/resourc --- a/chrome/browser/resources/settings/BUILD.gn +++ b/chrome/browser/resources/settings/BUILD.gn @@ -74,6 +74,7 @@ build_webui("build") { - web_component_files = [ "a11y_page/a11y_page.ts", "about_page/about_page.ts", + "ai_page/ai_page.ts", + "adblock_page/adblock_page.ts", "appearance_page/appearance_fonts_page.ts", "appearance_page/appearance_page.ts", "appearance_page/home_url_input.ts", -@@ -374,6 +375,7 @@ build_webui("build") { +@@ -371,6 +372,7 @@ build_webui("build") { ts_composite = true ts_definitions = [ "//tools/typescript/definitions/autofill_private.d.ts", @@ -1002,8 +1002,8 @@ new file mode 100644 diff --git a/chrome/browser/resources/settings/basic_page/basic_page.html b/chrome/browser/resources/settings/basic_page/basic_page.html --- a/chrome/browser/resources/settings/basic_page/basic_page.html +++ b/chrome/browser/resources/settings/basic_page/basic_page.html -@@ -24,6 +24,13 @@ - +@@ -31,6 +31,13 @@ + + @@ -147,7 +147,7 @@ diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/ diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.ts b/chrome/browser/resources/settings/privacy_page/privacy_page.ts --- a/chrome/browser/resources/settings/privacy_page/privacy_page.ts +++ b/chrome/browser/resources/settings/privacy_page/privacy_page.ts -@@ -72,7 +72,49 @@ export class SettingsPrivacyPageElement extends SettingsPrivacyPageElementBase { +@@ -71,7 +71,49 @@ export class SettingsPrivacyPageElement extends SettingsPrivacyPageElementBase { } static get template() { @@ -209,7 +209,7 @@ diff --git a/chrome/browser/resources/settings/route.ts b/chrome/browser/resourc /** * Add all of the child routes that originate from the privacy route, -@@ -139,6 +140,7 @@ function addPrivacyChildRoutes(r: Partial) { +@@ -136,6 +137,7 @@ function addPrivacyChildRoutes(r: Partial) { r.SITE_SETTINGS_STORAGE_ACCESS = r.SITE_SETTINGS.createChild('storageAccess'); } @@ -237,7 +237,7 @@ diff --git a/chrome/browser/resources/settings/site_settings/settings_category_d diff --git a/chrome/browser/resources/settings/site_settings/site_details.html b/chrome/browser/resources/settings/site_settings/site_details.html --- a/chrome/browser/resources/settings/site_settings/site_details.html +++ b/chrome/browser/resources/settings/site_settings/site_details.html -@@ -281,4 +281,5 @@ +@@ -279,4 +279,5 @@ label="$i18n{siteSettingsAutoPictureInPicture}"> @@ -272,7 +272,7 @@ diff --git a/chrome/browser/resources/settings/site_settings/site_details.ts b/c diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts --- a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts +++ b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts -@@ -44,7 +44,7 @@ function getCategoryItemMap(): Map { +@@ -45,7 +45,7 @@ function getCategoryItemMap(): Map { } // The following list is ordered alphabetically by |id|. The order in which // these appear in the UI is determined elsewhere in this file. @@ -281,7 +281,7 @@ diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_ { route: routes.SITE_SETTINGS_ADS, id: Id.ADS, -@@ -367,10 +367,34 @@ function getCategoryItemMap(): Map { +@@ -371,10 +371,34 @@ function getCategoryItemMap(): Map { disabledLabel: 'trackingProtectionLinkRowSubLabel', }); } @@ -316,7 +316,7 @@ diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_ function buildItemListFromIds(orderedIdList: ContentSettingsTypes[]): CategoryListItem[] { const map = getCategoryItemMap(); -@@ -460,7 +484,7 @@ export class SettingsSiteSettingsPageElement extends +@@ -465,7 +489,7 @@ export class SettingsSiteSettingsPageElement extends Id.IMAGES, Id.POPUPS, ]), @@ -383,7 +383,7 @@ diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_ /** * Determine localization string for i18n for a given content settings type. * Sorted alphabetically by |ContentSettingsType|. -@@ -89,6 +137,13 @@ export function getLocalizationStringForContentType( +@@ -90,6 +138,13 @@ export function getLocalizationStringForContentType( case ContentSettingsTypes.SITE_DATA: return null; default: @@ -400,7 +400,7 @@ diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn -@@ -2006,6 +2006,7 @@ static_library("ui") { +@@ -2047,6 +2047,7 @@ static_library("ui") { "//components/commerce/core/mojom:mojo_bindings", "//components/commerce/core/webui", "//components/endpoint_fetcher:endpoint_fetcher", @@ -420,7 +420,7 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.cc b/chrom #include "components/page_info/core/features.h" #include "components/page_info/core/proto/about_this_site_metadata.pb.h" #include "components/page_info/page_info.h" -@@ -509,6 +511,17 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon( +@@ -507,6 +509,17 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon( icon = &vector_icons::kPictureInPictureIcon; break; default: @@ -458,7 +458,7 @@ diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provide #include "components/password_manager/core/browser/leak_detection_dialog_utils.h" #include "components/password_manager/core/browser/manage_passwords_referrer.h" #include "components/password_manager/core/common/password_manager_features.h" -@@ -3687,6 +3690,42 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source, +@@ -3628,6 +3631,42 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source, policy_indicator::AddLocalizedStrings(html_source); AddSecurityKeysStrings(html_source); @@ -513,7 +513,7 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b #include "components/content_settings/core/common/content_settings.h" #include "components/content_settings/core/common/content_settings_pattern.h" #include "components/content_settings/core/common/content_settings_utils.h" -@@ -208,7 +210,7 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = { +@@ -209,7 +211,7 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = { static_assert(std::size(kContentSettingsTypeGroupNames) == // ContentSettingsType starts at -1, so add 1 here. @@ -522,7 +522,7 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b "kContentSettingsTypeGroupNames should have " "CONTENT_SETTINGS_NUM_TYPES elements"); -@@ -465,6 +467,13 @@ bool HasRegisteredGroupName(ContentSettingsType type) { +@@ -462,6 +464,13 @@ bool HasRegisteredGroupName(ContentSettingsType type) { return true; } } @@ -536,7 +536,7 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b return false; } -@@ -478,11 +487,24 @@ ContentSettingsType ContentSettingsTypeFromGroupName(base::StringPiece name) { +@@ -475,11 +484,24 @@ ContentSettingsType ContentSettingsTypeFromGroupName(base::StringPiece name) { return entry.type; } } @@ -562,7 +562,7 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b for (const auto& entry : kContentSettingsTypeGroupNames) { if (type == entry.type) { // Content setting types that aren't represented in the settings UI -@@ -497,7 +519,6 @@ base::StringPiece ContentSettingsTypeToGroupName(ContentSettingsType type) { +@@ -494,7 +516,6 @@ base::StringPiece ContentSettingsTypeToGroupName(ContentSettingsType type) { return entry.name ? entry.name : base::StringPiece(); } } @@ -570,7 +570,7 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b NOTREACHED() << static_cast(type) << " is not a recognized content settings type."; return base::StringPiece(); -@@ -578,6 +599,13 @@ const std::vector& GetVisiblePermissionCategories() { +@@ -574,6 +595,13 @@ const std::vector& GetVisiblePermissionCategories() { base_types->push_back(ContentSettingsType::MIDI_SYSEX); } @@ -587,7 +587,7 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/browser_ui/site_settings/android/BUILD.gn --- a/components/browser_ui/site_settings/android/BUILD.gn +++ b/components/browser_ui/site_settings/android/BUILD.gn -@@ -148,6 +148,23 @@ android_library("java") { +@@ -149,6 +149,23 @@ android_library("java") { ":site_settings_jni_headers", "//components/content_settings/android:java_pref_names_srcjar", ] @@ -611,7 +611,7 @@ diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/b } android_library("javatests") { -@@ -193,6 +210,7 @@ robolectric_library("junit") { +@@ -194,6 +211,7 @@ robolectric_library("junit") { } android_resources("java_resources") { @@ -622,17 +622,20 @@ diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/b diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/AllSiteSettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/AllSiteSettings.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/AllSiteSettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/AllSiteSettings.java -@@ -342,11 +342,14 @@ public class AllSiteSettings extends BaseSiteSettingsFragment - if (queryHasChanged) getInfoForOrigins(); - }); +@@ -366,7 +366,8 @@ public class AllSiteSettings extends BaseSiteSettingsFragment + if (queryHasChanged) getInfoForOrigins(); + }); - if (getSiteSettingsDelegate().isHelpAndFeedbackEnabled()) { + if (getSiteSettingsDelegate().isHelpAndFeedbackEnabled() || + BromiteCustomContentSettingImpl.isHelpAndFeedbackEnabled(mCategory)) { - MenuItem help = menu.add( - Menu.NONE, R.id.menu_id_site_settings_help, Menu.NONE, R.string.menu_help); - help.setIcon(TraceEventVectorDrawableCompat.create( - getResources(), R.drawable.ic_help_and_feedback, getContext().getTheme())); + MenuItem help = + menu.add( + Menu.NONE, +@@ -378,6 +379,8 @@ public class AllSiteSettings extends BaseSiteSettingsFragment + getResources(), + R.drawable.ic_help_and_feedback, + getContext().getTheme())); + if (!BromiteCustomContentSettingImpl.isHelpAndFeedbackEnabled(mCategory)) + help.setVisible(false); } @@ -1126,34 +1129,34 @@ new file mode 100644 diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java -@@ -39,7 +39,7 @@ public class ContentSettingsResources { - /** - * An inner class contains all the resources for a ContentSettingsType - */ +@@ -37,7 +37,7 @@ import org.chromium.device.DeviceFeatureMap; + @SuppressLint("UseSparseArrays") + public class ContentSettingsResources { + /** An inner class contains all the resources for a ContentSettingsType */ - private static class ResourceItem { + public static class ResourceItem { private final int mIcon; private final int mTitle; private final @ContentSettingValues @Nullable Integer mDefaultEnabledValue; -@@ -47,7 +47,7 @@ public class ContentSettingsResources { - private final int mEnabledSummary; +@@ -46,7 +46,7 @@ public class ContentSettingsResources { private final int mDisabledSummary; + private final int mSummaryOverrideForScreenReader; -- ResourceItem(int icon, int title, -+ public ResourceItem(int icon, int title, +- ResourceItem( ++ public ResourceItem( + int icon, + int title, @ContentSettingValues @Nullable Integer defaultEnabledValue, - @ContentSettingValues @Nullable Integer defaultDisabledValue, int enabledSummary, - int disabledSummary) { -@@ -303,6 +303,8 @@ public class ContentSettingsResources { - ContentSettingValues.BLOCK, R.string.website_settings_category_vr_ask, - R.string.website_settings_category_vr_blocked); +@@ -437,6 +437,8 @@ public class ContentSettingsResources { + R.string.website_settings_category_vr_blocked, + R.string.website_settings_category_vr_a11y); } + ResourceItem ri = BromiteCustomContentSettingImpl.getResourceItem(contentType); + if (ri != null) return ri; assert false; // NOTREACHED return null; } -@@ -468,6 +470,12 @@ public class ContentSettingsResources { +@@ -617,6 +619,12 @@ public class ContentSettingsResources { } } @@ -1166,7 +1169,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c /** * Returns the string resource id for a content type to show with a permission category. * @param enabled Whether the content type is enabled. -@@ -610,6 +618,8 @@ public class ContentSettingsResources { +@@ -769,6 +777,8 @@ public class ContentSettingsResources { * Blocked states, in that order. */ public static int[] getTriStateSettingDescriptionIDs(int contentType) { @@ -1174,14 +1177,14 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c + if (value != null) return value; if (contentType == ContentSettingsType.PROTECTED_MEDIA_IDENTIFIER) { int[] descriptionIDs = { - R.string.website_settings_category_protected_content_allowed_recommended, + R.string.website_settings_category_protected_content_allowed_recommended, diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java -@@ -313,6 +313,10 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment - @ContentSettingValues - Integer contentSetting = website.site().getContentSetting( - browserContextHandle, mCategory.getContentSettingsType()); +@@ -337,6 +337,10 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment + website.site() + .getContentSetting( + browserContextHandle, mCategory.getContentSettingsType()); + if (contentSetting != null && + BromiteCustomContentSettingImpl.processOnBlockList(contentSetting, contentSetting)) { + return BromiteCustomContentSettingImpl.isOnBlockList(contentSetting, website, contentSetting); @@ -1189,25 +1192,28 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (contentSetting != null) { return ContentSettingValues.BLOCK == contentSetting; } -@@ -472,6 +476,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment - ? new HashSet<>(getArguments().getStringArrayList(EXTRA_SELECTED_DOMAINS)) - : null; +@@ -501,6 +505,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment + ? new HashSet<>(getArguments().getStringArrayList(EXTRA_SELECTED_DOMAINS)) + : null; + BromiteCustomContentSettingImpl.onActivityCreated(this); configureGlobalToggles(); if (mCategory.getType() == SiteSettingsCategory.Type.REQUEST_DESKTOP_SITE) { RecordUserAction.record("DesktopSiteContentSetting.SettingsPage.Entered"); -@@ -496,17 +501,26 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment - if (queryHasChanged) getInfoForOrigins(); - }); +@@ -531,7 +536,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment + if (queryHasChanged) getInfoForOrigins(); + }); - if (getSiteSettingsDelegate().isHelpAndFeedbackEnabled()) { + if (getSiteSettingsDelegate().isHelpAndFeedbackEnabled() || + BromiteCustomContentSettingImpl.isHelpAndFeedbackEnabled(mCategory)) { - MenuItem help = menu.add( - Menu.NONE, R.id.menu_id_site_settings_help, Menu.NONE, R.string.menu_help); - help.setIcon(TraceEventVectorDrawableCompat.create( - getResources(), R.drawable.ic_help_and_feedback, getContext().getTheme())); + MenuItem help = + menu.add( + Menu.NONE, +@@ -543,12 +549,20 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment + getResources(), + R.drawable.ic_help_and_feedback, + getContext().getTheme())); + if (!BromiteCustomContentSettingImpl.isHelpAndFeedbackEnabled(mCategory)) + help.setVisible(false); } @@ -1223,9 +1229,9 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c + return true; + } if (mCategory.getType() == SiteSettingsCategory.Type.PROTECTED_MEDIA) { - getSiteSettingsDelegate().launchProtectedContentHelpAndFeedbackActivity( - getActivity()); -@@ -576,6 +590,11 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment + getSiteSettingsDelegate() + .launchProtectedContentHelpAndFeedbackActivity(getActivity()); +@@ -620,6 +634,11 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment BrowserContextHandle browserContextHandle = getSiteSettingsDelegate().getBrowserContextHandle(); PrefService prefService = UserPrefs.get(browserContextHandle); @@ -1237,8 +1243,8 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (BINARY_TOGGLE_KEY.equals(preference.getKey())) { assert !mCategory.isManaged(); boolean toggleValue = (boolean) newValue; -@@ -797,6 +816,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment - : R.string.website_settings_allowed_group_heading_request_desktop_site; +@@ -817,6 +836,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment + .website_settings_allowed_group_heading_request_desktop_site; break; } + if (resource == 0) @@ -1246,16 +1252,16 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c assert resource > 0; return getString(resource); } -@@ -915,6 +936,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -934,6 +955,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment default: break; } + Boolean allow = BromiteCustomContentSettingImpl.allowSpecifyingExceptions(mCategory); + if (allow != null) allowSpecifyingExceptions = (boolean)allow; if (allowSpecifyingExceptions) { - getPreferenceScreen().addPreference(new AddExceptionPreference(getStyledContext(), - ADD_EXCEPTION_KEY, getAddExceptionDialogMessage(), mCategory, this)); -@@ -1086,8 +1109,16 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment + getPreferenceScreen() + .addPreference( +@@ -1122,8 +1145,16 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment private boolean isBlocked() { switch (mGlobalToggleLayout) { case GlobalToggleLayout.TRI_STATE_TOGGLE: @@ -1270,9 +1276,9 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c getPreferenceScreen().findPreference(TRI_STATE_TOGGLE_KEY); + if (triStateToggle == null) return true; return (triStateToggle.getCheckedSetting() == ContentSettingValues.BLOCK); - case GlobalToggleLayout.FOUR_STATE_COOKIE_TOGGLE: - FourStateCookieSettingsPreference fourStateCookieToggle = -@@ -1166,7 +1197,11 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment + case GlobalToggleLayout.TRI_STATE_COOKIE_TOGGLE: + TriStateCookieSettingsPreference triStateCookieToggle = +@@ -1190,7 +1221,11 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment } else if (mCategory.getType() == SiteSettingsCategory.Type.STORAGE_ACCESS) { infoText.setSummary(getStorageAccessSummary()); } else { @@ -1285,7 +1291,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } // Hide the anti-abuse text preferences, as needed. -@@ -1190,6 +1225,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -1214,6 +1249,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment screen.removePreference(antiAbuseThingsToConsiderHeader); screen.removePreference(antiAbuseThingsToConsiderSectionOne); } @@ -1293,8 +1299,8 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (permissionBlockedByOs) { maybeShowOsWarning(screen); -@@ -1371,7 +1407,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment - getSiteSettingsDelegate().getBrowserContextHandle(), contentType); +@@ -1378,7 +1414,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment + getSiteSettingsDelegate().getBrowserContextHandle(), contentType); int[] descriptionIds = ContentSettingsResources.getTriStateSettingDescriptionIDs(contentType); - triStateToggle.initialize(setting, descriptionIds); @@ -1302,7 +1308,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } private void configureBinaryToggle(ChromeSwitchPreference binaryToggle, int contentType) { -@@ -1497,6 +1533,14 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -1517,6 +1553,14 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment @ContentSettingValues Integer value = site.getContentSetting(browserContextHandle, contentSettingsType); @@ -1316,19 +1322,19 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c + AlertDialog alertDialog = new AlertDialog.Builder(getContext(), R.style.ThemeOverlay_BrowserUI_AlertDialog) - .setTitle(getContext().getString( + .setTitle( diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java -@@ -47,6 +47,7 @@ import java.util.Collection; +@@ -49,6 +49,7 @@ import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.List; - /** - * Shows the permissions and other settings for a particular website. -@@ -172,7 +173,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment + /** Shows the permissions and other settings for a particular website. */ + public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -169,7 +170,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment case ContentSettingsType.CLIPBOARD_READ_WRITE: return "clipboard_permission_list"; default: @@ -1337,7 +1343,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } } -@@ -529,7 +530,8 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -544,7 +545,8 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment private void setupContentSettingsPreferences() { mMaxPermissionOrder = findPreference(PREF_PERMISSIONS_HEADER).getOrder(); @@ -1347,10 +1353,10 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c Preference preference = new ChromeSwitchPreference(getStyledContext()); preference.setKey(getPreferenceKey(type)); -@@ -1026,14 +1028,22 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment - - private void setupContentSettingsPreference(Preference preference, - @ContentSettingValues @Nullable Integer value, boolean isEmbargoed) { +@@ -1085,15 +1087,23 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment + Preference preference, + @ContentSettingValues @Nullable Integer value, + boolean isEmbargoed) { - if (value == null) return; + int content_type = getContentSettingsTypeFromPreferenceKey(preference.getKey()); + BromiteCustomContentSetting cs = @@ -1366,14 +1372,15 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c ChromeSwitchPreference switchPreference = (ChromeSwitchPreference) preference; - switchPreference.setChecked(value == ContentSettingValues.ALLOW); + switchPreference.setChecked(value != ContentSettingValues.BLOCK); - switchPreference.setSummary(isEmbargoed + switchPreference.setSummary( + isEmbargoed ? getString(R.string.automatically_blocked) - : getString(ContentSettingsResources.getCategorySummary(value))); + : getString(ContentSettingsResources.getCategorySummary(content_type, value))); switchPreference.setOnPreferenceChangeListener(this); @ContentSettingsType int contentType = getContentSettingsTypeFromPreferenceKey(preference.getKey()); -@@ -1186,7 +1196,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1256,7 +1266,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment public @ContentSettingsType int getContentSettingsTypeFromPreferenceKey(String preferenceKey) { if (mPreferenceMap == null) { mPreferenceMap = new HashMap<>(); @@ -1382,7 +1389,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c String key = getPreferenceKey(type); if (key != null) { mPreferenceMap.put(key, type); -@@ -1228,7 +1238,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1297,7 +1307,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment } mSite.setContentSetting(browserContextHandle, type, permission); @@ -1391,7 +1398,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c preference.setIcon(getContentSettingsIcon(type, permission)); if (mWebsiteSettingsObserver != null) { -@@ -1258,7 +1268,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1325,7 +1335,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment // TODO(mvanouwerkerk): Refactor this class so that it does not depend on the screen state // for its logic. This class should maintain its own data model, and only update the screen // after a change is made. @@ -1411,16 +1418,16 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c configurePreferences(); updatePreferenceStates(); } -@@ -54,7 +55,7 @@ public class SiteSettings extends BaseSiteSettingsFragment - } +@@ -55,7 +56,7 @@ public class SiteSettings extends BaseSiteSettingsFragment // Remove unsupported settings categories. -- for (@SiteSettingsCategory.Type int type = 0; type < SiteSettingsCategory.Type.NUM_ENTRIES; -+ for (@SiteSettingsCategory.Type int type = 0; type < BromiteCustomContentSettingImpl.NUM_ENTRIES(); + for (@SiteSettingsCategory.Type int type = 0; +- type < SiteSettingsCategory.Type.NUM_ENTRIES; ++ type < BromiteCustomContentSettingImpl.NUM_ENTRIES(); type++) { if (!getSiteSettingsDelegate().isCategoryVisible(type)) { getPreferenceScreen().removePreference(findPreference(type)); -@@ -70,7 +71,7 @@ public class SiteSettings extends BaseSiteSettingsFragment +@@ -71,7 +72,7 @@ public class SiteSettings extends BaseSiteSettingsFragment @CookieControlsMode int cookieControlsMode = UserPrefs.get(browserContextHandle).getInteger(COOKIE_CONTROLS_MODE); @@ -1429,7 +1436,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c Preference p = findPreference(prefCategory); int contentType = SiteSettingsCategory.contentSettingsType(prefCategory); // p can be null if the Preference was removed in configurePreferences. -@@ -135,10 +136,13 @@ public class SiteSettings extends BaseSiteSettingsFragment +@@ -139,10 +140,13 @@ public class SiteSettings extends BaseSiteSettingsFragment } else if (Type.ZOOM == prefCategory) { // Don't want to set a summary for Zoom because we don't want any message to display // under the Zoom row on site settings. @@ -1449,7 +1456,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java -@@ -73,7 +73,7 @@ public class SiteSettingsCategory { +@@ -70,7 +70,7 @@ public class SiteSettingsCategory { Type.ZOOM, Type.STORAGE_ACCESS, Type.TRACKING_PROTECTION, @@ -1458,16 +1465,16 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c }) @Retention(RetentionPolicy.SOURCE) public @interface Type { -@@ -113,7 +113,7 @@ public class SiteSettingsCategory { - int TRACKING_PROTECTION = 31; +@@ -109,7 +109,7 @@ public class SiteSettingsCategory { + int TRACKING_PROTECTION = 30; /** Number of handled categories used for calculating array sizes. */ -- int NUM_ENTRIES = 32; -+ int NUM_ENTRIES_CHROMIUM = 32; +- int NUM_ENTRIES = 31; ++ int NUM_ENTRIES_CHROMIUM = 31; } private final BrowserContextHandle mBrowserContextHandle; -@@ -157,6 +157,9 @@ public class SiteSettingsCategory { +@@ -154,6 +154,9 @@ public class SiteSettingsCategory { } else { permission = ""; } @@ -1477,7 +1484,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c return new SiteSettingsCategory(browserContextHandle, type, permission); } -@@ -165,7 +168,7 @@ public class SiteSettingsCategory { +@@ -162,7 +165,7 @@ public class SiteSettingsCategory { @ContentSettingsType int contentSettingsType) { assert contentSettingsType != -1; assert Type.ALL_SITES == 0; @@ -1486,7 +1493,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (contentSettingsType(i) == contentSettingsType) { return createFromType(browserContextHandle, i); } -@@ -176,7 +179,7 @@ public class SiteSettingsCategory { +@@ -173,7 +176,7 @@ public class SiteSettingsCategory { public static SiteSettingsCategory createFromPreferenceKey( BrowserContextHandle browserContextHandle, String preferenceKey) { assert Type.ALL_SITES == 0; @@ -1495,7 +1502,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (preferenceKey(i).equals(preferenceKey)) { return createFromType(browserContextHandle, i); } -@@ -250,8 +253,7 @@ public class SiteSettingsCategory { +@@ -244,8 +247,7 @@ public class SiteSettingsCategory { case Type.TRACKING_PROTECTION: return ContentSettingsType.DEFAULT; // Conversion unavailable. } @@ -1505,7 +1512,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } /** -@@ -340,8 +342,12 @@ public class SiteSettingsCategory { +@@ -330,8 +332,12 @@ public class SiteSettingsCategory { case Type.ZOOM: return "zoom"; default: @@ -1521,7 +1528,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsDelegate.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsDelegate.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsDelegate.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsDelegate.java -@@ -176,6 +176,8 @@ public interface SiteSettingsDelegate { +@@ -152,6 +152,8 @@ public interface SiteSettingsDelegate { */ String getFirstPartySetOwner(String memberOrigin); @@ -1539,9 +1546,9 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c import org.chromium.components.content_settings.ContentSettingValues; +import org.chromium.components.content_settings.ContentSettingsType; - /** - * A 3-state Allowed/Ask/Blocked radio group Preference used for SiteSettings. -@@ -25,6 +26,7 @@ public class TriStateSiteSettingsPreference + /** A 3-state Allowed/Ask/Blocked radio group Preference used for SiteSettings. */ + public class TriStateSiteSettingsPreference extends Preference +@@ -23,6 +24,7 @@ public class TriStateSiteSettingsPreference extends Preference private RadioButtonWithDescription mAsk; private RadioButtonWithDescription mBlocked; private RadioGroup mRadioGroup; @@ -1549,7 +1556,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c public TriStateSiteSettingsPreference(Context context, AttributeSet attrs) { super(context, attrs); -@@ -44,7 +46,9 @@ public class TriStateSiteSettingsPreference +@@ -42,7 +44,9 @@ public class TriStateSiteSettingsPreference extends Preference * @param descriptionIds An array of 3 resource IDs for descriptions for * Allowed, Ask and Blocked states, in that order. */ @@ -1560,7 +1567,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c mSetting = setting; mDescriptionIds = descriptionIds; } -@@ -79,6 +83,13 @@ public class TriStateSiteSettingsPreference +@@ -75,6 +79,13 @@ public class TriStateSiteSettingsPreference extends Preference mRadioGroup = (RadioGroup) holder.findViewById(R.id.radio_button_layout); mRadioGroup.setOnCheckedChangeListener(this); @@ -1577,11 +1584,11 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java -@@ -282,6 +282,12 @@ public final class Website implements WebsiteEntry { - exception = exceptions.get(0); +@@ -325,7 +325,11 @@ public final class Website implements WebsiteEntry { + RecordUserAction.record("SoundContentSetting.UnmuteBy.SiteSettings"); } } -+ +- + if (exception == null) { + exception = BromiteCustomContentSettingImpl.createCustomException(type, value, getAddress()); + if (exception != null) @@ -1593,16 +1600,16 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePermissionsFetcher.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePermissionsFetcher.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePermissionsFetcher.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePermissionsFetcher.java -@@ -106,7 +106,7 @@ public class WebsitePermissionsFetcher { - case ContentSettingsType.USB_GUARD: - return WebsitePermissionsType.CHOSEN_OBJECT_INFO; +@@ -114,7 +114,7 @@ public class WebsitePermissionsFetcher { + } + return null; default: - return null; + return BromiteCustomContentSettingImpl.getPermissionsType(contentSettingsType); } } -@@ -220,7 +220,7 @@ public class WebsitePermissionsFetcher { +@@ -228,7 +228,7 @@ public class WebsitePermissionsFetcher { if (SiteSettingsFeatureMap.isEnabled(SiteSettingsFeatureList.SITE_DATA_IMPROVEMENTS)) { queue.add(new CookiesInfoFetcher()); } @@ -1614,7 +1621,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java -@@ -266,7 +266,7 @@ public class WebsitePreferenceBridge { +@@ -283,7 +283,7 @@ public class WebsitePreferenceBridge { case ContentSettingsType.PROTECTED_MEDIA_IDENTIFIER: return true; default: @@ -1623,9 +1630,9 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } } -@@ -281,7 +281,6 @@ public class WebsitePreferenceBridge { - - public static boolean isCategoryEnabled(BrowserContextHandle browserContextHandle, +@@ -299,7 +299,6 @@ public class WebsitePreferenceBridge { + public static boolean isCategoryEnabled( + BrowserContextHandle browserContextHandle, @ContentSettingsType int contentSettingsType) { - assert !requiresTriStateContentSetting(contentSettingsType); return isContentSettingEnabled(browserContextHandle, contentSettingsType); @@ -1710,7 +1717,7 @@ diff --git a/components/content_settings/android/BUILD.gn b/components/content_s diff --git a/components/content_settings/core/browser/BUILD.gn b/components/content_settings/core/browser/BUILD.gn --- a/components/content_settings/core/browser/BUILD.gn +++ b/components/content_settings/core/browser/BUILD.gn -@@ -87,6 +87,13 @@ static_library("browser") { +@@ -89,6 +89,13 @@ static_library("browser") { } configs += [ "//build/config/compiler:wexit_time_destructors" ] @@ -1741,7 +1748,7 @@ diff --git a/components/content_settings/core/browser/content_settings_registry. namespace content_settings { -@@ -640,6 +641,7 @@ void ContentSettingsRegistry::Init() { +@@ -654,6 +655,7 @@ void ContentSettingsRegistry::Init() { WebsiteSettingsRegistry::DESKTOP, ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE, ContentSettingsInfo::EXCEPTIONS_ON_SECURE_ORIGINS_ONLY); @@ -1752,7 +1759,7 @@ diff --git a/components/content_settings/core/browser/content_settings_registry. diff --git a/components/content_settings/core/browser/content_settings_uma_util.cc b/components/content_settings/core/browser/content_settings_uma_util.cc --- a/components/content_settings/core/browser/content_settings_uma_util.cc +++ b/components/content_settings/core/browser/content_settings_uma_util.cc -@@ -179,8 +179,9 @@ void RecordContentSettingsHistogram(const std::string& name, +@@ -180,8 +180,9 @@ void RecordContentSettingsHistogram(const std::string& name, } int ContentSettingTypeToHistogramValue(ContentSettingsType content_setting) { @@ -1874,7 +1881,7 @@ diff --git a/components/content_settings/core/browser/website_settings_registry. diff --git a/components/content_settings/core/common/BUILD.gn b/components/content_settings/core/common/BUILD.gn --- a/components/content_settings/core/common/BUILD.gn +++ b/components/content_settings/core/common/BUILD.gn -@@ -50,6 +50,13 @@ static_library("common") { +@@ -52,6 +52,13 @@ static_library("common") { "//net", "//url", ] @@ -2067,9 +2074,9 @@ diff --git a/components/content_settings/core/common/content_settings_param_trai diff --git a/components/content_settings/core/common/content_settings_types.h b/components/content_settings/core/common/content_settings_types.h --- a/components/content_settings/core/common/content_settings_types.h +++ b/components/content_settings/core/common/content_settings_types.h -@@ -369,7 +369,9 @@ enum class ContentSettingsType : int32_t { - // heuristics. - TPCD_HEURISTICS_GRANTS, +@@ -371,7 +371,9 @@ enum class ContentSettingsType : int32_t { + // shown to the user, for a given origin. + FILE_SYSTEM_ACCESS_RESTORE_PERMISSION, - NUM_TYPES, + NUM_TYPES_CHROMIUM, @@ -2081,7 +2088,7 @@ diff --git a/components/content_settings/core/common/content_settings_types.h b/ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc b/components/content_settings/renderer/content_settings_agent_impl.cc --- a/components/content_settings/renderer/content_settings_agent_impl.cc +++ b/components/content_settings/renderer/content_settings_agent_impl.cc -@@ -201,6 +201,39 @@ void ContentSettingsAgentImpl::SendRendererContentSettingRules( +@@ -202,6 +202,39 @@ void ContentSettingsAgentImpl::SendRendererContentSettingRules( std::move(renderer_settings)); } @@ -2139,8 +2146,8 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.h diff --git a/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoPermissionsController.java b/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoPermissionsController.java --- a/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoPermissionsController.java +++ b/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoPermissionsController.java -@@ -169,6 +169,15 @@ public class PageInfoPermissionsController - : perm1.nameMidSentence.toString()); +@@ -177,6 +177,15 @@ public class PageInfoPermissionsController extends PageInfoPreferenceSubpageCont + : perm1.nameMidSentence.toString()); } + String value = ""; @@ -2154,7 +2161,7 @@ diff --git a/components/page_info/android/java/src/org/chromium/components/page_ + // More than 2 permissions. if (same) { - int resId = perm1.allowed ? R.plurals.page_info_permissions_summary_more_allowed + int resId = diff --git a/components/page_info/android/java/src/org/chromium/components/page_info/PermissionParamsListBuilder.java b/components/page_info/android/java/src/org/chromium/components/page_info/PermissionParamsListBuilder.java --- a/components/page_info/android/java/src/org/chromium/components/page_info/PermissionParamsListBuilder.java +++ b/components/page_info/android/java/src/org/chromium/components/page_info/PermissionParamsListBuilder.java @@ -2219,7 +2226,7 @@ diff --git a/components/page_info/page_info.cc b/components/page_info/page_info. #include "components/content_settings/browser/ui/cookie_controls_controller.h" #include "components/content_settings/core/browser/content_settings_registry.h" #include "components/content_settings/core/browser/content_settings_uma_util.h" -@@ -1250,6 +1251,14 @@ void PageInfo::PopulatePermissionInfo(PermissionInfo& permission_info, +@@ -1249,6 +1250,14 @@ void PageInfo::PopulatePermissionInfo(PermissionInfo& permission_info, // applies to permissions listed in |kPermissionType|. bool PageInfo::ShouldShowPermission( const PageInfo::PermissionInfo& info) const { @@ -2234,7 +2241,7 @@ diff --git a/components/page_info/page_info.cc b/components/page_info/page_info. // Note |ContentSettingsType::ADS| will show up regardless of its default // value when it has been activated on the current origin. if (info.type == ContentSettingsType::ADS) { -@@ -1377,7 +1386,19 @@ void PageInfo::PresentSitePermissions() { +@@ -1375,7 +1384,19 @@ void PageInfo::PresentSitePermissions() { HostContentSettingsMap* content_settings = GetContentSettings(); DCHECK(web_contents_); @@ -2266,7 +2273,7 @@ diff --git a/components/page_info/page_info_ui.cc b/components/page_info/page_in #include "components/page_info/core/features.h" #include "components/page_info/page_info.h" #include "components/page_info/page_info_ui_delegate.h" -@@ -619,6 +620,12 @@ PageInfoUI::~PageInfoUI() = default; +@@ -622,6 +623,12 @@ PageInfoUI::~PageInfoUI() = default; // static std::u16string PageInfoUI::PermissionTypeToUIString(ContentSettingsType type) { @@ -2279,7 +2286,7 @@ diff --git a/components/page_info/page_info_ui.cc b/components/page_info/page_in for (const PermissionUIInfo& info : GetContentSettingsUIInfo()) { if (info.type == type) return l10n_util::GetStringUTF16(info.string_id); -@@ -630,6 +637,12 @@ std::u16string PageInfoUI::PermissionTypeToUIString(ContentSettingsType type) { +@@ -633,6 +640,12 @@ std::u16string PageInfoUI::PermissionTypeToUIString(ContentSettingsType type) { // static std::u16string PageInfoUI::PermissionTypeToUIStringMidSentence( ContentSettingsType type) { @@ -2292,7 +2299,7 @@ diff --git a/components/page_info/page_info_ui.cc b/components/page_info/page_in for (const PermissionUIInfo& info : GetContentSettingsUIInfo()) { if (info.type == type) return l10n_util::GetStringUTF16(info.string_id_mid_sentence); -@@ -1064,6 +1077,11 @@ bool PageInfoUI::ContentSettingsTypeInPageInfo(ContentSettingsType type) { +@@ -1067,6 +1080,11 @@ bool PageInfoUI::ContentSettingsTypeInPageInfo(ContentSettingsType type) { if (info.type == type) return true; } @@ -2323,9 +2330,9 @@ diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/t #include "base/time/time.h" +#include "components/content_settings/core/common/content_settings_types.h" #include "third_party/blink/public/common/client_hints/enabled_client_hints.h" + #include "third_party/blink/public/mojom/navigation/renderer_content_settings.mojom.h" - namespace blink { -@@ -68,6 +69,10 @@ class WebContentSettingsClient { +@@ -51,6 +52,10 @@ class WebContentSettingsClient { return enabled_per_settings; } @@ -2333,8 +2340,8 @@ diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/t + return enabled_per_settings; + } + - // Controls whether auto dark web content is allowed for this frame. - virtual bool AllowAutoDarkWebContent(bool enabled_per_settings) { + // Controls whether scripts are allowed to execute for this frame. + virtual bool AllowScript(bool enabled_per_settings) { return enabled_per_settings; diff --git a/third_party/blink/renderer/core/execution_context/execution_context.cc b/third_party/blink/renderer/core/execution_context/execution_context.cc --- a/third_party/blink/renderer/core/execution_context/execution_context.cc diff --git a/build/patches/Dictionary-suggestions-for-the-Omnibox.patch b/build/patches/Dictionary-suggestions-for-the-Omnibox.patch index 561705d01..29d16b58c 100644 --- a/build/patches/Dictionary-suggestions-for-the-Omnibox.patch +++ b/build/patches/Dictionary-suggestions-for-the-Omnibox.patch @@ -27,7 +27,7 @@ diff --git a/chrome/android/java/res/layout/url_bar.xml b/chrome/android/java/re diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediator.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediator.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediator.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediator.java -@@ -290,8 +290,17 @@ class LocationBarMediator +@@ -288,8 +288,17 @@ class LocationBarMediator if (mNativeInitialized) RecordUserAction.record("FocusLocation"); // Don't clear Omnibox if the user just pasted text to NTP Omnibox. if (mShouldClearOmniboxOnFocus) { @@ -58,7 +58,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow import android.os.SystemClock; import android.text.Editable; import android.text.InputType; -@@ -104,6 +105,7 @@ public abstract class UrlBar extends AutocompleteEditText { +@@ -100,6 +101,7 @@ public abstract class UrlBar extends AutocompleteEditText { private boolean mFocused; private boolean mAllowFocus = true; @@ -66,7 +66,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow private boolean mPendingScroll; // Captures the current intended text scroll type. -@@ -304,6 +306,27 @@ public abstract class UrlBar extends AutocompleteEditText { +@@ -299,6 +301,27 @@ public abstract class UrlBar extends AutocompleteEditText { mPendingScroll = false; } fixupTextDirection(); diff --git a/build/patches/Disable-Accessibility-service-by-default.patch b/build/patches/Disable-Accessibility-service-by-default.patch index e178cea30..ff0272295 100644 --- a/build/patches/Disable-Accessibility-service-by-default.patch +++ b/build/patches/Disable-Accessibility-service-by-default.patch @@ -42,7 +42,7 @@ diff --git a/components/browser_ui/accessibility/android/java/res/xml/accessibil diff --git a/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java b/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java --- a/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java +++ b/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java -@@ -1024,6 +1024,11 @@ public class WebContentsAccessibilityImpl extends AccessibilityNodeProviderCompa +@@ -1044,6 +1044,11 @@ public class WebContentsAccessibilityImpl extends AccessibilityNodeProviderCompa structure.setChildCount(0); return; } diff --git a/build/patches/Disable-FLoC-and-privacy-sandbox.patch b/build/patches/Disable-FLoC-and-privacy-sandbox.patch index 09635ad4b..888be4ffe 100644 --- a/build/patches/Disable-FLoC-and-privacy-sandbox.patch +++ b/build/patches/Disable-FLoC-and-privacy-sandbox.patch @@ -22,7 +22,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc -@@ -3432,6 +3432,9 @@ bool ChromeContentBrowserClient::IsAttributionReportingOperationAllowed( +@@ -3381,6 +3381,9 @@ bool ChromeContentBrowserClient::IsAttributionReportingOperationAllowed( const url::Origin* destination_origin, const url::Origin* reporting_origin, bool* can_bypass) { @@ -46,14 +46,13 @@ diff --git a/chrome/browser/privacy_sandbox/privacy_sandbox_settings_delegate.cc diff --git a/chrome/browser/ui/privacy_sandbox/privacy_sandbox_prompt.cc b/chrome/browser/ui/privacy_sandbox/privacy_sandbox_prompt.cc --- a/chrome/browser/ui/privacy_sandbox/privacy_sandbox_prompt.cc +++ b/chrome/browser/ui/privacy_sandbox/privacy_sandbox_prompt.cc -@@ -8,6 +8,7 @@ +@@ -8,5 +8,6 @@ void ShowPrivacySandboxPrompt(Browser* browser, PrivacySandboxService::PromptType prompt_type) { -+ if ((true)) return; - if (prompt_type == PrivacySandboxService::PromptType::kNotice) { - ShowPrivacySandboxNoticeBubble(browser); - } else { ++ if ((true)) return; + ShowPrivacySandboxDialog(browser, prompt_type); + } diff --git a/components/history/core/browser/history_backend.cc b/components/history/core/browser/history_backend.cc --- a/components/history/core/browser/history_backend.cc +++ b/components/history/core/browser/history_backend.cc @@ -80,21 +79,21 @@ diff --git a/components/history/core/browser/history_backend.cc b/components/his diff --git a/components/privacy_sandbox/privacy_sandbox_attestations/privacy_sandbox_attestations.cc b/components/privacy_sandbox/privacy_sandbox_attestations/privacy_sandbox_attestations.cc --- a/components/privacy_sandbox/privacy_sandbox_attestations/privacy_sandbox_attestations.cc +++ b/components/privacy_sandbox/privacy_sandbox_attestations/privacy_sandbox_attestations.cc -@@ -389,8 +389,6 @@ void PrivacySandboxAttestations::OnAttestationsParsed( +@@ -405,8 +405,6 @@ void PrivacySandboxAttestations::OnAttestationsParsed( if (attestations_map.has_value() && (!file_version_.IsValid() || file_version_.CompareTo(version) < 0)) { // Parsing succeeded and the attestations file has newer version. - file_version_ = std::move(version); -- attestations_map_ = std::move(attestations_map); +- attestations_map_ = std::move(attestations_map.value()); } attestations_parse_progress_ = Progress::kFinished; diff --git a/components/privacy_sandbox/privacy_sandbox_features.cc b/components/privacy_sandbox/privacy_sandbox_features.cc --- a/components/privacy_sandbox/privacy_sandbox_features.cc +++ b/components/privacy_sandbox/privacy_sandbox_features.cc -@@ -144,4 +144,9 @@ BASE_FEATURE(kAttributionDebugReportingCookieDeprecationTesting, - "AttributionDebugReportingCookieDeprecationTesting", +@@ -152,4 +152,9 @@ BASE_FEATURE(kTrackingProtectionNoticeRequestTracking, base::FEATURE_DISABLED_BY_DEFAULT); + #endif // BUILDFLAG(IS_ANDROID) +SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxSettings4); +SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxSettings3); @@ -142,11 +141,11 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo -bool PrivacySandboxSettingsImpl::IsTopicsAllowed() const { +bool PrivacySandboxSettingsImpl::IsTopicsAllowed() const { // disabled in Bromite + if ((true)) return false; - // M1 specific - if (base::FeatureList::IsEnabled(privacy_sandbox::kPrivacySandboxSettings4)) { - Status status = GetM1TopicAllowedStatus(); -@@ -287,7 +288,8 @@ bool PrivacySandboxSettingsImpl::IsTopicsAllowedForContext( - IsPrivacySandboxEnabledForContext(top_frame_origin, url); + Status status = GetM1TopicAllowedStatus(); + JoinHistogram(kIsTopicsAllowedHistogram, status); + return IsAllowed(status); +@@ -262,7 +263,8 @@ bool PrivacySandboxSettingsImpl::IsTopicsAllowedForContext( + return IsAllowed(status); } -bool PrivacySandboxSettingsImpl::IsTopicAllowed(const CanonicalTopic& topic) { @@ -155,7 +154,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo const auto& blocked_topics = pref_service_->GetList(prefs::kPrivacySandboxBlockedTopics); -@@ -513,6 +515,7 @@ bool PrivacySandboxSettingsImpl:: +@@ -464,6 +466,7 @@ bool PrivacySandboxSettingsImpl:: void PrivacySandboxSettingsImpl::SetFledgeJoiningAllowed( const std::string& top_frame_etld_plus1, bool allowed) { @@ -163,7 +162,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo ScopedDictPrefUpdate scoped_pref_update( pref_service_, prefs::kPrivacySandboxFledgeJoinBlocked); -@@ -583,7 +586,8 @@ void PrivacySandboxSettingsImpl::ClearFledgeJoiningAllowedSettings( +@@ -534,7 +537,8 @@ void PrivacySandboxSettingsImpl::ClearFledgeJoiningAllowedSettings( } bool PrivacySandboxSettingsImpl::IsFledgeJoiningAllowed( @@ -173,8 +172,8 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo ScopedDictPrefUpdate scoped_pref_update( pref_service_, prefs::kPrivacySandboxFledgeJoinBlocked); auto& pref_data = scoped_pref_update.Get(); -@@ -752,7 +756,8 @@ bool PrivacySandboxSettingsImpl::IsPrivateAggregationDebugModeAllowed( - net::CookieSettingOverrides()); +@@ -693,7 +697,8 @@ bool PrivacySandboxSettingsImpl::IsPrivateAggregationDebugModeAllowed( + delegate_->AreThirdPartyCookiesBlockedByCookieDeprecationExperiment(); } -bool PrivacySandboxSettingsImpl::IsPrivacySandboxEnabled() const { @@ -183,8 +182,8 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo PrivacySandboxSettingsImpl::Status status = GetPrivacySandboxAllowedStatus(); if (!IsAllowed(status)) { return false; -@@ -790,7 +795,8 @@ void PrivacySandboxSettingsImpl::SetTopicsBlockedForTesting() { - pref_service_->SetBoolean(prefs::kPrivacySandboxApisEnabledV2, false); +@@ -720,7 +725,8 @@ void PrivacySandboxSettingsImpl::SetTopicsBlockedForTesting() { + pref_service_->SetBoolean(prefs::kPrivacySandboxM1TopicsEnabled, false); } -void PrivacySandboxSettingsImpl::SetPrivacySandboxEnabled(bool enabled) { @@ -193,8 +192,8 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo pref_service_->SetBoolean(prefs::kPrivacySandboxApisEnabledV2, enabled); } -@@ -851,7 +857,10 @@ bool PrivacySandboxSettingsImpl::IsPrivacySandboxEnabledForContext( - net::CookieSettingOverrides()); +@@ -767,7 +773,10 @@ void PrivacySandboxSettingsImpl::SetDelegateForTesting( + delegate_ = std::move(delegate); } -void PrivacySandboxSettingsImpl::SetTopicsDataAccessibleFromNow() const { @@ -205,7 +204,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo pref_service_->SetTime(prefs::kPrivacySandboxTopicsDataAccessibleSince, base::Time::Now()); -@@ -864,6 +873,7 @@ PrivacySandboxSettingsImpl::Status +@@ -780,6 +789,7 @@ PrivacySandboxSettingsImpl::Status PrivacySandboxSettingsImpl::GetSiteAccessAllowedStatus( const url::Origin& top_frame_origin, const GURL& url) const { diff --git a/build/patches/Disable-PrivacyGuide.patch b/build/patches/Disable-PrivacyGuide.patch index 27b3bae3d..bd37adaf6 100644 --- a/build/patches/Disable-PrivacyGuide.patch +++ b/build/patches/Disable-PrivacyGuide.patch @@ -12,7 +12,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/ui/webui/settings/settings_ui.cc b/chrome/browser/ui/webui/settings/settings_ui.cc --- a/chrome/browser/ui/webui/settings/settings_ui.cc +++ b/chrome/browser/ui/webui/settings/settings_ui.cc -@@ -347,7 +347,7 @@ SettingsUI::SettingsUI(content::WebUI* web_ui) +@@ -351,7 +351,7 @@ SettingsUI::SettingsUI(content::WebUI* web_ui) #endif // !BUILDFLAG(IS_CHROMEOS_LACROS) bool show_privacy_guide = diff --git a/build/patches/Disable-StartSurface-feature.patch b/build/patches/Disable-StartSurface-feature.patch index 65c76b53d..a52441539 100644 --- a/build/patches/Disable-StartSurface-feature.patch +++ b/build/patches/Disable-StartSurface-feature.patch @@ -14,12 +14,12 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java -@@ -632,7 +632,7 @@ public abstract class ChromeFeatureList { +@@ -631,7 +631,7 @@ public abstract class ChromeFeatureList { new CachedFlag(SHOW_NTP_AT_STARTUP_ANDROID, false); public static final CachedFlag sSpareTab = new CachedFlag(SPARE_TAB, false); - public static final CachedFlag sStartSurfaceAndroid = new CachedFlag( -- START_SURFACE_ANDROID, ChromePreferenceKeys.FLAGS_CACHED_START_SURFACE_ENABLED, true); -+ START_SURFACE_ANDROID, ChromePreferenceKeys.FLAGS_CACHED_START_SURFACE_ENABLED, false); + public static final CachedFlag sStartSurfaceAndroid = +- new CachedFlag(START_SURFACE_ANDROID, true); ++ new CachedFlag(START_SURFACE_ANDROID, false); public static final CachedFlag sStartSurfaceDisabledFeedImprovement = new CachedFlag(START_SURFACE_DISABLED_FEED_IMPROVEMENT, false); public static final CachedFlag sStartSurfaceOnTablet = diff --git a/build/patches/Disable-TLS-resumption.patch b/build/patches/Disable-TLS-resumption.patch index 942484af3..7ce1f498a 100644 --- a/build/patches/Disable-TLS-resumption.patch +++ b/build/patches/Disable-TLS-resumption.patch @@ -183,7 +183,7 @@ diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket Disconnect(); } -@@ -776,6 +802,8 @@ int SSLClientSocketImpl::Init() { +@@ -772,6 +798,8 @@ int SSLClientSocketImpl::Init() { } if (session) SSL_set_session(ssl_.get(), session.get()); @@ -192,7 +192,7 @@ diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket } const int kBufferSize = GetDefaultOpenSSLBufferSize(); -@@ -1067,6 +1095,35 @@ int SSLClientSocketImpl::DoHandshakeComplete(int result) { +@@ -1066,6 +1094,35 @@ int SSLClientSocketImpl::DoHandshakeComplete(int result) { : SSLHandshakeDetails::kTLS13Full; } } @@ -228,7 +228,7 @@ diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket UMA_HISTOGRAM_ENUMERATION("Net.SSLHandshakeDetails", details); // Measure TLS connections that implement the renegotiation_info extension. -@@ -1741,6 +1798,8 @@ bool SSLClientSocketImpl::IsRenegotiationAllowed() const { +@@ -1718,6 +1775,8 @@ bool SSLClientSocketImpl::IsRenegotiationAllowed() const { } bool SSLClientSocketImpl::IsCachingEnabled() const { @@ -240,7 +240,7 @@ diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket diff --git a/net/socket/ssl_client_socket_impl.h b/net/socket/ssl_client_socket_impl.h --- a/net/socket/ssl_client_socket_impl.h +++ b/net/socket/ssl_client_socket_impl.h -@@ -126,6 +126,8 @@ class SSLClientSocketImpl : public SSLClientSocket, +@@ -124,6 +124,8 @@ class SSLClientSocketImpl : public SSLClientSocket, friend class SSLClientSocket; friend class SSLContext; diff --git a/build/patches/Disable-UA-full-version.patch b/build/patches/Disable-UA-full-version.patch index 934d64ca3..39d59e366 100644 --- a/build/patches/Disable-UA-full-version.patch +++ b/build/patches/Disable-UA-full-version.patch @@ -22,8 +22,8 @@ diff --git a/third_party/blink/renderer/core/frame/navigator_ua_data.cc b/third_ #include "third_party/blink/public/common/privacy_budget/identifiability_metric_builder.h" #include "third_party/blink/public/common/privacy_budget/identifiability_study_settings.h" #include "third_party/blink/public/common/privacy_budget/identifiable_surface.h" -@@ -40,6 +42,16 @@ void MaybeRecordMetric(bool record_identifiability, - .Record(execution_context->UkmRecorder()); +@@ -64,6 +66,16 @@ void MaybeRecordMetric(bool record_identifiability, + execution_context); } +const String GetReducedVersionNumber(const std::string& fullVersion) { @@ -39,7 +39,7 @@ diff --git a/third_party/blink/renderer/core/frame/navigator_ua_data.cc b/third_ } // namespace NavigatorUAData::NavigatorUAData(ExecutionContext* context) -@@ -78,7 +90,7 @@ void NavigatorUAData::SetFullVersionList( +@@ -102,7 +114,7 @@ void NavigatorUAData::SetFullVersionList( const UserAgentBrandList& full_version_list) { for (const auto& brand_version : full_version_list) { AddBrandFullVersion(String::FromUTF8(brand_version.brand), @@ -48,7 +48,7 @@ diff --git a/third_party/blink/renderer/core/frame/navigator_ua_data.cc b/third_ } } -@@ -100,7 +112,7 @@ void NavigatorUAData::SetModel(const String& model) { +@@ -124,7 +136,7 @@ void NavigatorUAData::SetModel(const String& model) { } void NavigatorUAData::SetUAFullVersion(const String& ua_full_version) { diff --git a/build/patches/Disable-add-to-home-screen-prompt.patch b/build/patches/Disable-add-to-home-screen-prompt.patch index 94c2c85fb..2de50ccab 100644 --- a/build/patches/Disable-add-to-home-screen-prompt.patch +++ b/build/patches/Disable-add-to-home-screen-prompt.patch @@ -4,23 +4,24 @@ Subject: Disable add to home screen prompt License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - .../webapps/AddToHomescreenMostVisitedTileClickObserver.java | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) + .../AddToHomescreenMostVisitedTileClickObserver.java | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenMostVisitedTileClickObserver.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenMostVisitedTileClickObserver.java --- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenMostVisitedTileClickObserver.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenMostVisitedTileClickObserver.java -@@ -43,10 +43,7 @@ public class AddToHomescreenMostVisitedTileClickObserver implements MostVisitedT - ntp.addMostVisitedTileClickObserver( - AddToHomescreenMostVisitedTileClickObserver.this); - } else { -- // If it is a regular web page, and started from a most visited tile, show IPH. -- if (url.getOrigin().equals(mLastClickedMostVisitedTileUrl)) { -- addToHomescreenIPHController.showAddToHomescreenIPH(tab); -- } -+ // do not show any add to home screen IPH in Bromite - removeObserver(tab); - } - mLastClickedMostVisitedTileUrl = null; +@@ -48,11 +48,7 @@ public class AddToHomescreenMostVisitedTileClickObserver implements MostVisitedT + ntp.addMostVisitedTileClickObserver( + AddToHomescreenMostVisitedTileClickObserver.this); + } else { +- // If it is a regular web page, and started from a most visited +- // tile, show IPH. +- if (url.getOrigin().equals(mLastClickedMostVisitedTileUrl)) { +- addToHomescreenIPHController.showAddToHomescreenIPH(tab); +- } ++ // do not show any add to home screen IPH in Bromite + removeObserver(tab); + } + mLastClickedMostVisitedTileUrl = null; -- 2.25.1 diff --git a/build/patches/Disable-all-predictors-code.patch b/build/patches/Disable-all-predictors-code.patch index a17fac416..9a959e6e4 100644 --- a/build/patches/Disable-all-predictors-code.patch +++ b/build/patches/Disable-all-predictors-code.patch @@ -28,8 +28,9 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../Disable-all-predictors-code.inc | 7 +++++ .../Disable-all-predictors-code.inc | 4 +++ .../Disable-all-predictors-code.inc | 2 ++ - .../platform/runtime_enabled_features.json5 | 6 ++-- - 24 files changed, 78 insertions(+), 43 deletions(-) + .../document_speculation_rules.cc | 1 + + .../platform/runtime_enabled_features.json5 | 2 +- + 25 files changed, 77 insertions(+), 41 deletions(-) create mode 100644 cromite_flags/chrome/browser/browser_features_cc/Disable-all-predictors-code.inc create mode 100644 cromite_flags/chrome/common/chrome_features_cc/Disable-all-predictors-code.inc create mode 100644 cromite_flags/components/permissions/features_cc/Disable-all-predictors-code.inc @@ -38,7 +39,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -879,8 +879,6 @@ static_library("browser") { +@@ -840,8 +840,6 @@ static_library("browser") { "navigation_predictor/navigation_predictor_keyed_service_factory.h", "navigation_predictor/navigation_predictor_metrics_document_data.cc", "navigation_predictor/navigation_predictor_metrics_document_data.h", @@ -84,7 +85,7 @@ diff --git a/chrome/browser/optimization_guide/chrome_hints_manager.cc b/chrome/ diff --git a/chrome/browser/optimization_guide/optimization_guide_keyed_service.cc b/chrome/browser/optimization_guide/optimization_guide_keyed_service.cc --- a/chrome/browser/optimization_guide/optimization_guide_keyed_service.cc +++ b/chrome/browser/optimization_guide/optimization_guide_keyed_service.cc -@@ -347,7 +347,6 @@ void OptimizationGuideKeyedService::RemoveObserverForOptimizationTargetModel( +@@ -517,7 +517,6 @@ void OptimizationGuideKeyedService::RemoveObserverForOptimizationTargetModel( void OptimizationGuideKeyedService::RegisterOptimizationTypes( const std::vector& optimization_types) { @@ -95,7 +96,7 @@ diff --git a/chrome/browser/optimization_guide/optimization_guide_keyed_service. diff --git a/chrome/browser/predictors/loading_predictor.cc b/chrome/browser/predictors/loading_predictor.cc --- a/chrome/browser/predictors/loading_predictor.cc +++ b/chrome/browser/predictors/loading_predictor.cc -@@ -211,7 +211,7 @@ ResourcePrefetchPredictor* LoadingPredictor::resource_prefetch_predictor() { +@@ -212,7 +212,7 @@ ResourcePrefetchPredictor* LoadingPredictor::resource_prefetch_predictor() { } PreconnectManager* LoadingPredictor::preconnect_manager() { @@ -104,7 +105,7 @@ diff --git a/chrome/browser/predictors/loading_predictor.cc b/chrome/browser/pre return nullptr; } -@@ -227,7 +227,7 @@ PrefetchManager* LoadingPredictor::prefetch_manager() { +@@ -228,7 +228,7 @@ PrefetchManager* LoadingPredictor::prefetch_manager() { if (!base::FeatureList::IsEnabled(features::kLoadingPredictorPrefetch)) return nullptr; @@ -164,8 +165,8 @@ diff --git a/chrome/browser/predictors/predictors_features.cc b/chrome/browser/p diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc --- a/chrome/browser/ui/tab_helpers.cc +++ b/chrome/browser/ui/tab_helpers.cc -@@ -400,7 +400,6 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { - web_contents); +@@ -404,7 +404,6 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { + } MixedContentSettingsTabHelper::CreateForWebContents(web_contents); NavigationMetricsRecorder::CreateForWebContents(web_contents); - NavigationPredictorPreconnectClient::CreateForWebContents(web_contents); @@ -208,7 +209,7 @@ diff --git a/chrome/browser/ui/webui/omnibox/omnibox_page_handler.cc b/chrome/br if (auto* service = GetMlService()) { AutocompleteMatch::ScoringSignals signals = mojo::ConvertTo(mojom_signals); -@@ -525,6 +532,9 @@ void OmniboxPageHandler::StartMl(mojom::SignalsPtr mojom_signals, +@@ -526,6 +533,9 @@ void OmniboxPageHandler::StartMl(mojom::SignalsPtr mojom_signals, } else { std::move(callback).Run(-1); } @@ -218,7 +219,7 @@ diff --git a/chrome/browser/ui/webui/omnibox/omnibox_page_handler.cc b/chrome/br } std::unique_ptr OmniboxPageHandler::CreateController( -@@ -549,8 +559,12 @@ OmniboxPageHandler::GetAutocompleteControllerType( +@@ -550,8 +560,12 @@ OmniboxPageHandler::GetAutocompleteControllerType( } AutocompleteScoringModelService* OmniboxPageHandler::GetMlService() { @@ -342,7 +343,7 @@ diff --git a/components/optimization_guide/core/optimization_guide_features.cc b // Returns whether |locale| is a supported locale for |feature|. // -@@ -560,8 +548,7 @@ size_t MaxURLKeyedHintCacheSize() { +@@ -582,8 +570,7 @@ size_t MaxURLKeyedHintCacheSize() { } bool ShouldPersistHintsToDisk() { @@ -352,8 +353,8 @@ diff --git a/components/optimization_guide/core/optimization_guide_features.cc b } bool ShouldEnablePersonalizedMetadata(proto::RequestContext request_context) { -@@ -899,5 +886,19 @@ std::set GetOAuthScopesForModelExecution() { - return GetOauthScopesForFeature(kOptimizationGuideModelExecution); +@@ -1002,5 +989,19 @@ bool CanLaunchOnDeviceModelService() { + base::FeatureList::IsEnabled(kLogOnDeviceMetricsOnStartup); } +SET_CROMITE_FEATURE_DISABLED(kOptimizationHints); @@ -436,7 +437,7 @@ diff --git a/components/optimization_guide/features.gni b/components/optimizatio diff --git a/components/search/ntp_features.cc b/components/search/ntp_features.cc --- a/components/search/ntp_features.cc +++ b/components/search/ntp_features.cc -@@ -460,4 +460,7 @@ std::vector GetModulesOrder() { +@@ -499,4 +499,7 @@ std::vector GetModulesOrder() { base::SplitResult::SPLIT_WANT_NONEMPTY); } @@ -481,10 +482,21 @@ new file mode 100644 @@ -0,0 +1,2 @@ +SET_CROMITE_FEATURE_DISABLED(kNavigationPredictor); +SET_CROMITE_FEATURE_DISABLED(kPreloadingHeuristicsMLModel); +diff --git a/third_party/blink/renderer/core/speculation_rules/document_speculation_rules.cc b/third_party/blink/renderer/core/speculation_rules/document_speculation_rules.cc +--- a/third_party/blink/renderer/core/speculation_rules/document_speculation_rules.cc ++++ b/third_party/blink/renderer/core/speculation_rules/document_speculation_rules.cc +@@ -584,6 +584,7 @@ void DocumentSpeculationRules::UpdateSpeculationCandidates() { + return; + } + ++ if ((true)) return; + HeapVector> candidates; + auto push_candidates = [&candidates, &execution_context]( + mojom::blink::SpeculationAction action, diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -3087,7 +3087,7 @@ +@@ -2969,7 +2969,7 @@ { // https://crbug.com/1126305 name: "Prerender2", @@ -493,17 +505,5 @@ diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 }, { name: "Presentation", -@@ -3698,9 +3698,9 @@ - origin_trial_allows_third_party: true, - }, - { -- name: "SpeculationRulesPrefetchProxy", -+ name: "SpeculationRulesPrefetchProxy", // disabled -+ status: "test", // by default - origin_trial_feature_name: "SpeculationRulesPrefetch", -- status: "stable", - copied_from_base_feature_if: "overridden", - implied_by: ["SpeculationRulesPrefetchFuture", "NoVarySearchPrefetch"], - }, -- 2.25.1 diff --git a/build/patches/Disable-all-promo-dialogs.patch b/build/patches/Disable-all-promo-dialogs.patch index fd9864d8b..5e10a0ff4 100644 --- a/build/patches/Disable-all-promo-dialogs.patch +++ b/build/patches/Disable-all-promo-dialogs.patch @@ -17,18 +17,18 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java -@@ -956,6 +956,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { +@@ -1143,6 +1143,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { } - private boolean maybeShowPromo() { + private boolean maybeShowPromo(Profile profile) { + if ((true)) return false; - // Only one promo can be shown in one run to avoid nagging users too much. - if (FullScreenSyncPromoUtil.launchPromoIfNeeded(mActivity, - SyncConsentActivityLauncherImpl.get(), VersionInfo.getProductMajorVersion())) { + // NOTE: Only one promo can be shown in one run to avoid nagging users too much. + + // The PWA Restore promotion runs when we've detected that a user has switched to a new diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc --- a/chrome/browser/ui/browser_ui_prefs.cc +++ b/chrome/browser/ui/browser_ui_prefs.cc -@@ -144,7 +144,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { +@@ -143,7 +143,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref(prefs::kEnterpriseHardwarePlatformAPIEnabled, false); @@ -40,7 +40,7 @@ diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_u diff --git a/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc b/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc --- a/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc +++ b/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc -@@ -68,6 +68,7 @@ ui::ElementContext BrowserFeaturePromoController::GetAnchorContext() const { +@@ -129,6 +129,7 @@ ui::ElementContext BrowserFeaturePromoController::GetAnchorContext() const { bool BrowserFeaturePromoController::CanShowPromoForElement( ui::TrackedElement* anchor_element) const { @@ -58,11 +58,11 @@ diff --git a/chrome/browser/user_education/java/src/org/chromium/chrome/browser/ + if ((true)) return; // Activity was destroyed; don't show IPH. View anchorView = iphCommand.anchorView; - if (mActivity == null || mActivity.isFinishing() || mActivity.isDestroyed() + if (mActivity == null diff --git a/components/user_education/common/feature_promo_controller.cc b/components/user_education/common/feature_promo_controller.cc --- a/components/user_education/common/feature_promo_controller.cc +++ b/components/user_education/common/feature_promo_controller.cc -@@ -388,6 +388,7 @@ FeaturePromoResult FeaturePromoControllerCommon::CanShowPromoCommon( +@@ -433,6 +433,7 @@ FeaturePromoResult FeaturePromoControllerCommon::CanShowPromoCommon( const FeaturePromoSpecification** spec_out, std::unique_ptr* lifecycle_out, ui::TrackedElement** anchor_element_out) const { diff --git a/build/patches/Disable-conversion-measurement-api.patch b/build/patches/Disable-conversion-measurement-api.patch index 7c0c020c7..6ce3245c1 100644 --- a/build/patches/Disable-conversion-measurement-api.patch +++ b/build/patches/Disable-conversion-measurement-api.patch @@ -13,7 +13,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- .../browser/aw_content_browser_client.cc | 1 + chrome/android/java/AndroidManifest.xml | 4 - - components/attribution_reporting/features.cc | 1 + + components/attribution_reporting/features.cc | 2 + .../origin_trials/features.cc | 2 + .../render_view_context_menu_base.cc | 3 - .../aggregatable_report_sender.cc | 15 +- @@ -25,7 +25,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../attribution_storage_sql.cc | 8 +- content/browser/storage_partition_impl.cc | 9 - content/public/android/BUILD.gn | 2 - - .../browser/AttributionOsLevelManager.java | 229 +----------------- + .../browser/AttributionOsLevelManager.java | 291 +----------------- .../public/browser/content_browser_client.cc | 7 +- .../public/browser/navigation_controller.cc | 1 - .../Disable-conversion-measurement-api.inc | 1 + @@ -35,7 +35,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../network/public/cpp/attribution_utils.cc | 2 + third_party/blink/renderer/core/page/page.cc | 2 +- ui/events/android/motion_event_android.cc | 6 +- - 24 files changed, 63 insertions(+), 256 deletions(-) + 24 files changed, 66 insertions(+), 316 deletions(-) create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-conversion-measurement-api.inc create mode 100644 cromite_flags/services/network/public/cpp/features_cc/Disable-conversion-measurement-api.inc create mode 100644 cromite_flags/third_party/blink/common/features_cc/Disable-conversion-measurement-api.inc @@ -43,7 +43,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc --- a/android_webview/browser/aw_content_browser_client.cc +++ b/android_webview/browser/aw_content_browser_client.cc -@@ -1207,6 +1207,7 @@ network::mojom::AttributionSupport +@@ -1216,6 +1216,7 @@ network::mojom::AttributionSupport AwContentBrowserClient::GetAttributionSupport( AttributionReportingOsApiState state, content::WebContents* web_contents) { @@ -75,11 +75,12 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro diff --git a/components/attribution_reporting/features.cc b/components/attribution_reporting/features.cc --- a/components/attribution_reporting/features.cc +++ b/components/attribution_reporting/features.cc -@@ -17,4 +17,5 @@ BASE_FEATURE(kAttributionReportingTriggerConfig, - "AttributionReportingTriggerConfig", - base::FEATURE_DISABLED_BY_DEFAULT); +@@ -21,4 +21,6 @@ BASE_FEATURE(kAttributionReportingTriggerContextId, + "AttributionReportingTriggerContextId", + base::FEATURE_ENABLED_BY_DEFAULT); +SET_CROMITE_FEATURE_DISABLED(kConversionMeasurement); ++SET_CROMITE_FEATURE_DISABLED(kAttributionReportingTriggerContextId); } // namespace attribution_reporting::features diff --git a/components/embedder_support/origin_trials/features.cc b/components/embedder_support/origin_trials/features.cc --- a/components/embedder_support/origin_trials/features.cc @@ -107,7 +108,7 @@ diff --git a/components/renderer_context_menu/render_view_context_menu_base.cc b diff --git a/content/browser/aggregation_service/aggregatable_report_sender.cc b/content/browser/aggregation_service/aggregatable_report_sender.cc --- a/content/browser/aggregation_service/aggregatable_report_sender.cc +++ b/content/browser/aggregation_service/aggregatable_report_sender.cc -@@ -136,19 +136,18 @@ void AggregatableReportSender::SendReport(const GURL& url, +@@ -137,19 +137,18 @@ void AggregatableReportSender::SendReport(const GURL& url, // Allow bodies of non-2xx responses to be returned. simple_url_loader_ptr->SetAllowHttpErrorResults(true); @@ -133,7 +134,7 @@ diff --git a/content/browser/aggregation_service/aggregatable_report_sender.cc b + } RequestStatus status; - absl::optional http_response_code; + std::optional http_response_code; diff --git a/content/browser/aggregation_service/aggregation_service_features.cc b/content/browser/aggregation_service/aggregation_service_features.cc --- a/content/browser/aggregation_service/aggregation_service_features.cc +++ b/content/browser/aggregation_service/aggregation_service_features.cc @@ -146,18 +147,18 @@ diff --git a/content/browser/aggregation_service/aggregation_service_features.cc diff --git a/content/browser/attribution_reporting/attribution_data_host_manager_impl.cc b/content/browser/attribution_reporting/attribution_data_host_manager_impl.cc --- a/content/browser/attribution_reporting/attribution_data_host_manager_impl.cc +++ b/content/browser/attribution_reporting/attribution_data_host_manager_impl.cc -@@ -507,6 +507,7 @@ void AttributionDataHostManagerImpl::ParseSource( +@@ -833,6 +833,7 @@ void AttributionDataHostManagerImpl::ParseHeader( HeaderPendingDecode pending_decode, Registrar registrar) { DCHECK(it != registrations_.end()); + if ((true)) return; - network::mojom::AttributionSupport attribution_support = - AttributionManager::GetAttributionSupport( + switch (it->eligibility()) { + case RegistrationEligibility::kSourceOrTrigger: diff --git a/content/browser/attribution_reporting/attribution_host.cc b/content/browser/attribution_reporting/attribution_host.cc --- a/content/browser/attribution_reporting/attribution_host.cc +++ b/content/browser/attribution_reporting/attribution_host.cc -@@ -360,6 +360,7 @@ void AttributionHost::RegisterNavigationDataHost( +@@ -361,6 +361,7 @@ void AttributionHost::RegisterNavigationDataHost( return; } @@ -214,8 +215,8 @@ diff --git a/content/browser/attribution_reporting/attribution_report_network_se diff --git a/content/browser/attribution_reporting/attribution_storage_sql.cc b/content/browser/attribution_reporting/attribution_storage_sql.cc --- a/content/browser/attribution_reporting/attribution_storage_sql.cc +++ b/content/browser/attribution_reporting/attribution_storage_sql.cc -@@ -685,14 +685,16 @@ StorableSource::Result DestinationRateLimitResultToStorableSourceResult( - } +@@ -398,14 +398,16 @@ base::FilePath DatabasePath(const base::FilePath& user_data_directory) { + return user_data_directory.Append(kDatabasePath); } +bool g_run_in_memory = true; @@ -237,7 +238,7 @@ diff --git a/content/browser/attribution_reporting/attribution_storage_sql.cc b/ diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc --- a/content/browser/storage_partition_impl.cc +++ b/content/browser/storage_partition_impl.cc -@@ -1527,15 +1527,6 @@ void StoragePartitionImpl::Initialize( +@@ -1526,15 +1526,6 @@ void StoragePartitionImpl::Initialize( bucket_manager_ = std::make_unique(this); @@ -256,7 +257,7 @@ diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage diff --git a/content/public/android/BUILD.gn b/content/public/android/BUILD.gn --- a/content/public/android/BUILD.gn +++ b/content/public/android/BUILD.gn -@@ -179,8 +179,6 @@ android_library("content_full_java") { +@@ -180,8 +180,6 @@ android_library("content_full_java") { "//third_party/androidx:androidx_appcompat_appcompat_resources_java", "//third_party/androidx:androidx_collection_collection_java", "//third_party/androidx:androidx_core_core_java", @@ -295,7 +296,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib private static final String TAG = "AttributionManager"; // TODO: replace with constant in android.Manifest.permission once it becomes available in U. private static final String PERMISSION_ACCESS_ADSERVICES_ATTRIBUTION = -@@ -99,26 +90,11 @@ public class AttributionOsLevelManager { +@@ -116,63 +107,14 @@ public class AttributionOsLevelManager { } private static boolean supportsAttribution() { @@ -303,16 +304,78 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib + return false; } +- private static @OperationResult int convertToOperationResult(Throwable thrown) { +- if (thrown instanceof IllegalArgumentException) { +- return OperationResult.ERROR_ILLEGAL_ARGUMENT; +- } else if (thrown instanceof IOException) { +- return OperationResult.ERROR_IO; +- } else if (thrown instanceof IllegalStateException) { +- // The Android API doesn't break out this error as a separate exception so we +- // are forced to inspect the message for now. +- if (thrown.getMessage().toLowerCase(Locale.US).contains("background")) { +- return OperationResult.ERROR_BACKGROUND_CALLER; +- } else { +- return OperationResult.ERROR_ILLEGAL_STATE; +- } +- } else if (thrown instanceof SecurityException) { +- return OperationResult.ERROR_SECURITY; +- } else if (thrown instanceof TimeoutException) { +- return OperationResult.ERROR_TIMEOUT; +- } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R +- && thrown instanceof LimitExceededException) { +- return OperationResult.ERROR_LIMIT_EXCEEDED; +- } else { +- return OperationResult.ERROR_UNKNOWN; +- } ++ private MeasurementManagerFutures getManager() { ++ return null; + } + +- private static void recordOperationResult( +- @OperationType int type, @OperationResult int result) { +- String suffix = ""; +- switch (type) { +- case OperationType.REGISTER_SOURCE: +- suffix = "RegisterSource"; +- break; +- case OperationType.REGISTER_WEB_SOURCE: +- suffix = "RegisterWebSource"; +- break; +- case OperationType.REGISTER_TRIGGER: +- suffix = "RegisterTrigger"; +- break; +- case OperationType.REGISTER_WEB_TRIGGER: +- suffix = "RegisterWebTrigger"; +- break; +- case OperationType.GET_MEASUREMENT_API_STATUS: +- suffix = "GetMeasurementApiStatus"; +- break; +- case OperationType.DELETE_REGISTRATIONS: +- suffix = "DeleteRegistrations"; +- break; +- } + +- assert suffix.length() > 0; +- +- RecordHistogram.recordEnumeratedHistogram( +- "Conversions.AndroidOperationResult." + suffix, result, OperationResult.COUNT); +- } + + @CalledByNative + private AttributionOsLevelManager(long nativePtr) { +@@ -180,22 +122,7 @@ public class AttributionOsLevelManager { + } + private MeasurementManagerFutures getManager() { +- if (!supportsAttribution()) { +- return null; +- } - if (sManagerForTesting != null) { - return sManagerForTesting; - } - if (mManager != null) { - return mManager; - } -- if (!supportsAttribution()) { -- return null; -- } - try { - mManager = MeasurementManagerFutures.from(ContextUtils.getApplicationContext()); - } catch (Throwable t) { @@ -324,125 +387,110 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib } private void onRegistrationCompleted( -@@ -143,46 +119,6 @@ public class AttributionOsLevelManager { +@@ -214,21 +141,6 @@ public class AttributionOsLevelManager { + if (!supportsAttribution()) { + return; } - } - -- private void addRegistrationFutureCallback( -- int requestId, @RegistrationType int type, ListenableFuture future) { -- if (!supportsAttribution()) { -- return; -- } -- Futures.addCallback(future, new FutureCallback() { -- @Override -- public void onSuccess(Object result) { -- onRegistrationCompleted(requestId, type, RegistrationResult.SUCCESS); -- } -- @Override -- public void onFailure(Throwable thrown) { -- Log.w(TAG, "Failed to register", thrown); -- @RegistrationResult -- int result = RegistrationResult.ERROR_UNKNOWN; -- if (thrown instanceof IllegalArgumentException) { -- result = RegistrationResult.ERROR_ILLEGAL_ARGUMENT; -- } else if (thrown instanceof IOException) { -- result = RegistrationResult.ERROR_IO; -- } else if (thrown instanceof IllegalStateException) { -- // The Android API doesn't break out this error as a separate exception so we -- // are forced to inspect the message for now. -- if (thrown.getMessage().toLowerCase(Locale.US).contains("background")) { -- result = RegistrationResult.ERROR_BACKGROUND_CALLER; -- } else { -- result = RegistrationResult.ERROR_ILLEGAL_STATE; +- Futures.addCallback( +- future, +- new FutureCallback() { +- @Override +- public void onSuccess(Object result) { +- onRegistrationCompleted(requestId, type, OperationResult.SUCCESS); - } -- } else if (thrown instanceof SecurityException) { -- result = RegistrationResult.ERROR_SECURITY; -- } else if (thrown instanceof TimeoutException) { -- result = RegistrationResult.ERROR_TIMEOUT; -- } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R -- && thrown instanceof LimitExceededException) { -- result = RegistrationResult.ERROR_LIMIT_EXCEEDED; -- } -- onRegistrationCompleted(requestId, type, result); -- } -- }, ContextUtils.getApplicationContext().getMainExecutor()); -- } - +- @Override +- public void onFailure(Throwable thrown) { +- Log.w(TAG, "Failed to register", thrown); +- onRegistrationCompleted(requestId, type, convertToOperationResult(thrown)); +- } +- }, +- ContextUtils.getApplicationContext().getMainExecutor()); + } + /** - * Registers a web attribution source with native, see `registerWebSourceAsync()`: - * https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/java/measurement/MeasurementManagerFutures. -@@ -195,19 +131,6 @@ public class AttributionOsLevelManager { - requestId, RegistrationType.SOURCE, RegistrationResult.ERROR_INTERNAL); +@@ -249,25 +161,6 @@ public class AttributionOsLevelManager { + OperationResult.ERROR_VERSION_UNSUPPORTED); return; } - MeasurementManagerFutures mm = getManager(); - if (mm == null) { - onRegistrationCompleted( -- requestId, RegistrationType.SOURCE, RegistrationResult.ERROR_INTERNAL); +- requestId, OperationType.REGISTER_WEB_SOURCE, OperationResult.ERROR_INTERNAL); - return; - } -- ListenableFuture future = mm.registerWebSourceAsync(new WebSourceRegistrationRequest( -- Arrays.asList(new WebSourceParams( -- Uri.parse(registrationUrl.getSpec()), isDebugKeyAllowed)), -- Uri.parse(topLevelOrigin.getSpec()), /*inputEvent=*/event, -- /*appDestination=*/null, /*webDestination=*/null, -- /*verifiedDestination=*/null)); -- addRegistrationFutureCallback(requestId, RegistrationType.SOURCE, future); +- ListenableFuture future = +- mm.registerWebSourceAsync( +- new WebSourceRegistrationRequest( +- Arrays.asList( +- new WebSourceParams( +- Uri.parse(registrationUrl.getSpec()), +- isDebugKeyAllowed)), +- Uri.parse(topLevelOrigin.getSpec()), +- /* inputEvent= */ event, +- /* appDestination= */ null, +- /* webDestination= */ null, +- /* verifiedDestination= */ null)); +- addRegistrationFutureCallback(requestId, OperationType.REGISTER_WEB_SOURCE, future); } /** -@@ -221,15 +144,6 @@ public class AttributionOsLevelManager { - requestId, RegistrationType.SOURCE, RegistrationResult.ERROR_INTERNAL); +@@ -283,15 +176,6 @@ public class AttributionOsLevelManager { + OperationResult.ERROR_VERSION_UNSUPPORTED); return; } - MeasurementManagerFutures mm = getManager(); - if (mm == null) { - onRegistrationCompleted( -- requestId, RegistrationType.SOURCE, RegistrationResult.ERROR_INTERNAL); +- requestId, OperationType.REGISTER_SOURCE, OperationResult.ERROR_INTERNAL); - return; - } - ListenableFuture future = - mm.registerSourceAsync(Uri.parse(registrationUrl.getSpec()), event); -- addRegistrationFutureCallback(requestId, RegistrationType.SOURCE, future); +- addRegistrationFutureCallback(requestId, OperationType.REGISTER_SOURCE, future); } /** -@@ -244,18 +158,6 @@ public class AttributionOsLevelManager { - requestId, RegistrationType.TRIGGER, RegistrationResult.ERROR_INTERNAL); +@@ -308,22 +192,6 @@ public class AttributionOsLevelManager { + OperationResult.ERROR_VERSION_UNSUPPORTED); return; } - - MeasurementManagerFutures mm = getManager(); - if (mm == null) { - onRegistrationCompleted( -- requestId, RegistrationType.TRIGGER, RegistrationResult.ERROR_INTERNAL); +- requestId, OperationType.REGISTER_WEB_TRIGGER, OperationResult.ERROR_INTERNAL); - return; - } -- ListenableFuture future = mm.registerWebTriggerAsync(new WebTriggerRegistrationRequest( -- Arrays.asList(new WebTriggerParams( -- Uri.parse(registrationUrl.getSpec()), isDebugKeyAllowed)), -- Uri.parse(topLevelOrigin.getSpec()))); -- addRegistrationFutureCallback(requestId, RegistrationType.TRIGGER, future); +- ListenableFuture future = +- mm.registerWebTriggerAsync( +- new WebTriggerRegistrationRequest( +- Arrays.asList( +- new WebTriggerParams( +- Uri.parse(registrationUrl.getSpec()), +- isDebugKeyAllowed)), +- Uri.parse(topLevelOrigin.getSpec()))); +- addRegistrationFutureCallback(requestId, OperationType.REGISTER_WEB_TRIGGER, future); } /** -@@ -269,15 +171,6 @@ public class AttributionOsLevelManager { - requestId, RegistrationType.TRIGGER, RegistrationResult.ERROR_INTERNAL); +@@ -339,15 +207,6 @@ public class AttributionOsLevelManager { + OperationResult.ERROR_VERSION_UNSUPPORTED); return; } - - MeasurementManagerFutures mm = getManager(); - if (mm == null) { - onRegistrationCompleted( -- requestId, RegistrationType.TRIGGER, RegistrationResult.ERROR_INTERNAL); +- requestId, OperationType.REGISTER_TRIGGER, OperationResult.ERROR_INTERNAL); - return; - } - ListenableFuture future = mm.registerTriggerAsync(Uri.parse(registrationUrl.getSpec())); -- addRegistrationFutureCallback(requestId, RegistrationType.TRIGGER, future); +- addRegistrationFutureCallback(requestId, OperationType.REGISTER_TRIGGER, future); } private void onDataDeletionCompleted(int requestId) { -@@ -302,77 +195,7 @@ public class AttributionOsLevelManager { +@@ -382,96 +241,7 @@ public class AttributionOsLevelManager { onDataDeletionCompleted(requestId); return; } @@ -462,14 +510,20 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib - if (origins.length == 0 && domains.length == 0) { - switch (matchBehavior) { - case DeletionRequest.MATCH_BEHAVIOR_DELETE: +- recordOperationResult( +- OperationType.DELETE_REGISTRATIONS, OperationResult.SUCCESS); - onDataDeletionCompleted(requestId); - return; - case DeletionRequest.MATCH_BEHAVIOR_PRESERVE: -- matchBehaviors = ImmutableList.of(DeletionRequest.MATCH_BEHAVIOR_DELETE, -- DeletionRequest.MATCH_BEHAVIOR_PRESERVE); +- matchBehaviors = +- ImmutableList.of( +- DeletionRequest.MATCH_BEHAVIOR_DELETE, +- DeletionRequest.MATCH_BEHAVIOR_PRESERVE); - break; - default: - Log.e(TAG, "Received invalid match behavior: ", matchBehavior); +- recordOperationResult( +- OperationType.DELETE_REGISTRATIONS, OperationResult.ERROR_UNKNOWN); - onDataDeletionCompleted(requestId); - return; - } @@ -489,30 +543,43 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib - - int numCalls = matchBehaviors.size(); - -- FutureCallback callback = new FutureCallback() { -- private int mNumPendingCalls = numCalls; +- FutureCallback callback = +- new FutureCallback() { +- private int mNumPendingCalls = numCalls; - -- private void onCall() { -- if (--mNumPendingCalls == 0) { -- onDataDeletionCompleted(requestId); -- } -- } +- private void onCall() { +- if (--mNumPendingCalls == 0) { +- onDataDeletionCompleted(requestId); +- } +- } - -- @Override -- public void onSuccess(Object result) { -- onCall(); -- } -- @Override -- public void onFailure(Throwable thrown) { -- Log.w(TAG, "Failed to delete measurement API data", thrown); -- onCall(); -- } -- }; +- @Override +- public void onSuccess(Object result) { +- recordOperationResult( +- OperationType.DELETE_REGISTRATIONS, OperationResult.SUCCESS); +- onCall(); +- } +- +- @Override +- public void onFailure(Throwable thrown) { +- Log.w(TAG, "Failed to delete measurement API data", thrown); +- recordOperationResult( +- OperationType.DELETE_REGISTRATIONS, +- convertToOperationResult(thrown)); +- onCall(); +- } +- }; - - for (int currMatchBehavior : matchBehaviors) { -- ListenableFuture future = mm.deleteRegistrationsAsync(new DeletionRequest( -- deletionMode, currMatchBehavior, Instant.ofEpochMilli(startMs), -- Instant.ofEpochMilli(endMs), originUris, domainUris)); +- ListenableFuture future = +- mm.deleteRegistrationsAsync( +- new DeletionRequest( +- deletionMode, +- currMatchBehavior, +- Instant.ofEpochMilli(startMs), +- Instant.ofEpochMilli(endMs), +- originUris, +- domainUris)); - - Futures.addCallback( - future, callback, ContextUtils.getApplicationContext().getMainExecutor()); @@ -520,8 +587,8 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib + onDataDeletionCompleted(requestId); } - /** -@@ -383,6 +206,10 @@ public class AttributionOsLevelManager { + private static void onMeasurementStateReturned(int status, @OperationResult int result) { +@@ -487,6 +257,10 @@ public class AttributionOsLevelManager { private static void getMeasurementApiStatus() { ThreadUtils.assertOnBackgroundThread(); @@ -532,8 +599,8 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib if (sManagerForTesting != null) { AttributionOsLevelManagerJni.get().onMeasurementStateReturned(1); return; -@@ -399,44 +226,6 @@ public class AttributionOsLevelManager { - AttributionOsLevelManagerJni.get().onMeasurementStateReturned(0); +@@ -506,49 +280,6 @@ public class AttributionOsLevelManager { + onMeasurementStateReturned(/* status= */ 0, OperationResult.ERROR_PERMISSION_UNGRANTED); return; } - MeasurementManagerFutures mm = null; @@ -545,7 +612,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib - } - - if (mm == null) { -- AttributionOsLevelManagerJni.get().onMeasurementStateReturned(0); +- onMeasurementStateReturned(/* status= */ 0, OperationResult.ERROR_INTERNAL); - return; - } - @@ -559,28 +626,33 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib - } - - if (future == null) { -- AttributionOsLevelManagerJni.get().onMeasurementStateReturned(0); +- onMeasurementStateReturned(/* status= */ 0, OperationResult.ERROR_INTERNAL); - return; - } - -- Futures.addCallback(future, new FutureCallback() { -- @Override -- public void onSuccess(Integer status) { -- AttributionOsLevelManagerJni.get().onMeasurementStateReturned(status); -- } -- @Override -- public void onFailure(Throwable thrown) { -- Log.w(TAG, "Failed to get measurement API status", thrown); -- AttributionOsLevelManagerJni.get().onMeasurementStateReturned(0); -- } -- }, ContextUtils.getApplicationContext().getMainExecutor()); +- Futures.addCallback( +- future, +- new FutureCallback() { +- @Override +- public void onSuccess(Integer status) { +- onMeasurementStateReturned(status, OperationResult.SUCCESS); +- } +- +- @Override +- public void onFailure(Throwable thrown) { +- Log.w(TAG, "Failed to get measurement API status", thrown); +- onMeasurementStateReturned( +- /* status= */ 0, convertToOperationResult(thrown)); +- } +- }, +- ContextUtils.getApplicationContext().getMainExecutor()); } @CalledByNative diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -553,6 +553,7 @@ void ContentBrowserClient::OnAuctionComplete( +@@ -554,6 +554,7 @@ void ContentBrowserClient::OnAuctionComplete( network::mojom::AttributionSupport ContentBrowserClient::GetAttributionSupport( AttributionReportingOsApiState state, content::WebContents* web_contents) { @@ -588,7 +660,7 @@ diff --git a/content/public/browser/content_browser_client.cc b/content/public/b switch (state) { case AttributionReportingOsApiState::kDisabled: return network::mojom::AttributionSupport::kWeb; -@@ -569,17 +570,17 @@ bool ContentBrowserClient::IsAttributionReportingOperationAllowed( +@@ -570,17 +571,17 @@ bool ContentBrowserClient::IsAttributionReportingOperationAllowed( const url::Origin* destination_origin, const url::Origin* reporting_origin, bool* can_bypass) { @@ -679,7 +751,7 @@ diff --git a/services/network/public/cpp/attribution_utils.cc b/services/network diff --git a/third_party/blink/renderer/core/page/page.cc b/third_party/blink/renderer/core/page/page.cc --- a/third_party/blink/renderer/core/page/page.cc +++ b/third_party/blink/renderer/core/page/page.cc -@@ -1223,7 +1223,7 @@ void Page::UpdateBrowsingContextGroup( +@@ -1303,7 +1303,7 @@ void Page::UpdateBrowsingContextGroup( void Page::SetAttributionSupport( network::mojom::AttributionSupport attribution_support) { diff --git a/build/patches/Disable-crash-reporting.patch b/build/patches/Disable-crash-reporting.patch index 32b801fab..e8d9f7bbd 100644 --- a/build/patches/Disable-crash-reporting.patch +++ b/build/patches/Disable-crash-reporting.patch @@ -11,7 +11,7 @@ Subject: Disable crash reporting diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc -@@ -2649,6 +2649,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( +@@ -2622,6 +2622,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( base::NumberToString(pid)); } #endif diff --git a/build/patches/Disable-feeds-support-by-default.patch b/build/patches/Disable-feeds-support-by-default.patch index 16e0fea44..df7e266ee 100644 --- a/build/patches/Disable-feeds-support-by-default.patch +++ b/build/patches/Disable-feeds-support-by-default.patch @@ -13,8 +13,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc -@@ -1773,10 +1773,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, - supervised_user::SupervisedUserService::RegisterProfilePrefs(registry); +@@ -1840,10 +1840,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, + supervised_user::RegisterProfilePrefs(registry); #endif -#if BUILDFLAG(ENABLE_FEED_V2) @@ -64,8 +64,8 @@ diff --git a/components/feed/core/shared_prefs/pref_names.cc b/components/feed/c diff --git a/components/feed/feed_feature_list.cc b/components/feed/feed_feature_list.cc --- a/components/feed/feed_feature_list.cc +++ b/components/feed/feed_feature_list.cc -@@ -169,4 +169,6 @@ BASE_FEATURE(kFeedSportsCard, - "FeedSportsCard", +@@ -169,4 +169,6 @@ BASE_FEATURE(kRefreshFeedOnRestart, + "RefreshFeedOnRestart", base::FEATURE_DISABLED_BY_DEFAULT); +SET_CROMITE_FEATURE_DISABLED(kInterestFeedV2); diff --git a/build/patches/Disable-fetching-of-all-field-trials.patch b/build/patches/Disable-fetching-of-all-field-trials.patch index aa3adc2bd..30e5cc204 100644 --- a/build/patches/Disable-fetching-of-all-field-trials.patch +++ b/build/patches/Disable-fetching-of-all-field-trials.patch @@ -10,30 +10,30 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html android_webview/common/aw_features.cc | 4 +-- android_webview/nonembedded/BUILD.gn | 2 -- ...eddedFastVariationsSeedSafeModeAction.java | 2 -- - ...SafeModeVariationsSeedContentProvider.java | 2 -- + ...SafeModeVariationsSeedContentProvider.java | 5 --- .../services/VariationsSeedServer.java | 2 -- .../metrics/chrome_browser_sampling_trials.cc | 4 +++ .../net/system_network_context_manager.cc | 1 - components/ukm/ukm_recorder_impl.cc | 3 ++ .../firstrun/VariationsSeedBridge.java | 2 +- - .../firstrun/VariationsSeedFetcher.java | 32 +++---------------- + .../firstrun/VariationsSeedFetcher.java | 36 +++---------------- components/variations/net/BUILD.gn | 2 -- .../variations/net/omnibox_http_headers.cc | 4 +-- .../variations/net/variations_http_headers.cc | 3 ++ .../variations_field_trial_creator_base.cc | 8 ++--- - .../variations/service/variations_service.cc | 15 ++------- + .../variations/service/variations_service.cc | 15 ++------ .../browser/loader/url_loader_throttles.cc | 7 ---- .../origin_trials/origin_trials_utils.cc | 2 +- - .../variations_render_thread_observer.cc | 9 ------ + .../variations_render_thread_observer.cc | 9 ----- .../Disable-fetching-of-all-field-trials.inc | 1 + .../renderer/core/loader/document_loader.cc | 7 ---- - 20 files changed, 28 insertions(+), 84 deletions(-) + 20 files changed, 28 insertions(+), 91 deletions(-) create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-fetching-of-all-field-trials.inc diff --git a/android_webview/common/aw_features.cc b/android_webview/common/aw_features.cc --- a/android_webview/common/aw_features.cc +++ b/android_webview/common/aw_features.cc -@@ -106,8 +106,8 @@ BASE_FEATURE(kWebViewMetricsFiltering, +@@ -107,8 +107,8 @@ BASE_FEATURE(kWebViewMetricsFiltering, // Field trial feature for controlling support of Origin Trials on WebView. BASE_FEATURE(kWebViewOriginTrials, @@ -70,7 +70,7 @@ diff --git a/android_webview/nonembedded/java/src/org/chromium/android_webview/s @Override public boolean onActivate() { -- AwVariationsSeedFetcher.scheduleIfNeeded(/*requireFastMode=*/true); +- AwVariationsSeedFetcher.scheduleIfNeeded(/* requireFastMode= */ true); return true; } @@ -83,26 +83,29 @@ diff --git a/android_webview/nonembedded/java/src/org/chromium/android_webview/s diff --git a/android_webview/nonembedded/java/src/org/chromium/android_webview/services/SafeModeVariationsSeedContentProvider.java b/android_webview/nonembedded/java/src/org/chromium/android_webview/services/SafeModeVariationsSeedContentProvider.java --- a/android_webview/nonembedded/java/src/org/chromium/android_webview/services/SafeModeVariationsSeedContentProvider.java +++ b/android_webview/nonembedded/java/src/org/chromium/android_webview/services/SafeModeVariationsSeedContentProvider.java -@@ -83,8 +83,6 @@ public class SafeModeVariationsSeedContentProvider extends ContentProvider { +@@ -88,11 +88,6 @@ public class SafeModeVariationsSeedContentProvider extends ContentProvider { private Boolean awaitSeedResults() { CountDownLatch countDownLatch = new CountDownLatch(1); -- VariationsSeedHolder.getInstance().hasSeedUpdateCompletedAsync( -- () -> { countDownLatch.countDown(); }); +- VariationsSeedHolder.getInstance() +- .hasSeedUpdateCompletedAsync( +- () -> { +- countDownLatch.countDown(); +- }); try { return countDownLatch.await(TIMEOUT_IN_MILLIS, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { diff --git a/android_webview/nonembedded/java/src/org/chromium/android_webview/services/VariationsSeedServer.java b/android_webview/nonembedded/java/src/org/chromium/android_webview/services/VariationsSeedServer.java --- a/android_webview/nonembedded/java/src/org/chromium/android_webview/services/VariationsSeedServer.java +++ b/android_webview/nonembedded/java/src/org/chromium/android_webview/services/VariationsSeedServer.java -@@ -30,8 +30,6 @@ public class VariationsSeedServer extends Service { - @Override - public void getSeed(ParcelFileDescriptor newSeedFile, long oldSeedDate, - IVariationsSeedServerCallback callback) { -- maybeReportMetrics(callback); -- VariationsSeedHolder.getInstance().writeSeedIfNewer(newSeedFile, oldSeedDate); - } - }; +@@ -33,8 +33,6 @@ public class VariationsSeedServer extends Service { + ParcelFileDescriptor newSeedFile, + long oldSeedDate, + IVariationsSeedServerCallback callback) { +- maybeReportMetrics(callback); +- VariationsSeedHolder.getInstance().writeSeedIfNewer(newSeedFile, oldSeedDate); + } + }; diff --git a/chrome/browser/metrics/chrome_browser_sampling_trials.cc b/chrome/browser/metrics/chrome_browser_sampling_trials.cc --- a/chrome/browser/metrics/chrome_browser_sampling_trials.cc @@ -128,7 +131,7 @@ diff --git a/chrome/browser/metrics/chrome_browser_sampling_trials.cc b/chrome/b diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc --- a/chrome/browser/net/system_network_context_manager.cc +++ b/chrome/browser/net/system_network_context_manager.cc -@@ -827,7 +827,6 @@ void SystemNetworkContextManager::AddSSLConfigToNetworkContextParams( +@@ -815,7 +815,6 @@ void SystemNetworkContextManager::AddSSLConfigToNetworkContextParams( void SystemNetworkContextManager::ConfigureDefaultNetworkContextParams( network::mojom::NetworkContextParams* network_context_params) { @@ -152,7 +155,7 @@ diff --git a/components/ukm/ukm_recorder_impl.cc b/components/ukm/ukm_recorder_i diff --git a/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridge.java b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridge.java --- a/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridge.java +++ b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridge.java -@@ -52,7 +52,7 @@ public class VariationsSeedBridge { +@@ -53,7 +53,7 @@ public class VariationsSeedBridge { } @CalledByNative @@ -164,7 +167,7 @@ diff --git a/components/variations/android/java/src/org/chromium/components/vari diff --git a/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedFetcher.java b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedFetcher.java --- a/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedFetcher.java +++ b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedFetcher.java -@@ -453,35 +453,13 @@ public class VariationsSeedFetcher { +@@ -468,39 +468,13 @@ public class VariationsSeedFetcher { */ public void fetchSeed(String restrictMode, String milestone, String channel) { assert !ThreadUtils.runningOnUiThread(); @@ -193,8 +196,12 @@ diff --git a/components/variations/android/java/src/org/chromium/components/vari - SeedFetchInfo fetchInfo = downloadContent(params, null); - if (fetchInfo.seedInfo != null) { - SeedInfo info = fetchInfo.seedInfo; -- VariationsSeedBridge.setVariationsFirstRunSeed(info.seedData, info.signature, -- info.country, info.date, info.isGzipCompressed); +- VariationsSeedBridge.setVariationsFirstRunSeed( +- info.seedData, +- info.signature, +- info.country, +- info.date, +- info.isGzipCompressed); - } + SharedPreferences prefs = ContextUtils.getAppSharedPreferences(); // VARIATIONS_INITIALIZED_PREF should still be set to true when exceptions occur @@ -204,7 +211,7 @@ diff --git a/components/variations/android/java/src/org/chromium/components/vari } private void recordFetchResultOrCode(int resultOrCode) { -@@ -525,7 +503,7 @@ public class VariationsSeedFetcher { +@@ -552,7 +526,7 @@ public class VariationsSeedFetcher { * @param curSeedInfo optional currently saved seed info to set the `If-None-Match` header. * @return the object holds the request result and seed data with its related header fields. */ @@ -278,7 +285,7 @@ diff --git a/components/variations/service/variations_field_trial_creator_base.c @@ -581,6 +577,7 @@ bool VariationsFieldTrialCreatorBase::CreateTrialsFromSeed( const EntropyProviders& entropy_providers, base::FeatureList* feature_list, - SafeSeedManagerInterface* safe_seed_manager) { + SafeSeedManagerBase* safe_seed_manager) { + if ((true)) return false; // This histogram name uses "VariationsFieldTrialCreator" rather than // "VariationsFieldTrialCreatorBase" for consistency with historical data diff --git a/build/patches/Disable-idle-detection.patch b/build/patches/Disable-idle-detection.patch index 914c99a41..2389ddaba 100644 --- a/build/patches/Disable-idle-detection.patch +++ b/build/patches/Disable-idle-detection.patch @@ -4,9 +4,11 @@ Subject: Disable idle detection License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - .../common/content_features_cc/Disable-idle-detection.inc | 1 + - .../blink/renderer/platform/runtime_enabled_features.json5 | 7 +++---- - 2 files changed, 4 insertions(+), 4 deletions(-) + .../common/content_features_cc/Disable-idle-detection.inc | 1 + + .../permissions_policy/permissions_policy_features.json5 | 1 + + third_party/blink/renderer/modules/idle/idle_detector.idl | 3 ++- + .../blink/renderer/platform/runtime_enabled_features.json5 | 5 +++++ + 4 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-idle-detection.inc diff --git a/cromite_flags/content/public/common/content_features_cc/Disable-idle-detection.inc b/cromite_flags/content/public/common/content_features_cc/Disable-idle-detection.inc @@ -15,22 +17,44 @@ new file mode 100644 +++ b/cromite_flags/content/public/common/content_features_cc/Disable-idle-detection.inc @@ -0,0 +1 @@ +SET_CROMITE_FEATURE_DISABLED(kIdleDetection); +diff --git a/third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5 b/third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5 +--- a/third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5 ++++ b/third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5 +@@ -275,6 +275,7 @@ + { + name: "IdleDetection", + permissions_policy_name: "idle-detection", ++ depends_on: ["IdleDetection"], + }, + { + name: "JoinAdInterestGroup", +diff --git a/third_party/blink/renderer/modules/idle/idle_detector.idl b/third_party/blink/renderer/modules/idle/idle_detector.idl +--- a/third_party/blink/renderer/modules/idle/idle_detector.idl ++++ b/third_party/blink/renderer/modules/idle/idle_detector.idl +@@ -17,7 +17,8 @@ enum ScreenIdleState { + [ + SecureContext, + Exposed=(Window,DedicatedWorker), +- ActiveScriptWrappable ++ ActiveScriptWrappable, ++ RuntimeEnabled=IdleDetection + ] interface IdleDetector : EventTarget { + [CallWith=ScriptState] constructor(); + readonly attribute UserIdleState? userState; diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -2157,10 +2157,9 @@ +@@ -2068,6 +2068,11 @@ + name: "HTMLUnsafeMethods", status: "experimental", }, - { -- name: "IdleDetection", -- public: true, -- status: "stable", -- base_feature: "none", ++ { + name: "IdleDetection", // disabled + public: true, // by + base_feature: "none", // default - }, ++ }, { name: "ImplicitRootScroller", + public: true, -- 2.25.1 diff --git a/build/patches/Disable-lock-icon-in-address-bar-by-default.patch b/build/patches/Disable-lock-icon-in-address-bar-by-default.patch index 33c83650a..7fa1133a6 100644 --- a/build/patches/Disable-lock-icon-in-address-bar-by-default.patch +++ b/build/patches/Disable-lock-icon-in-address-bar-by-default.patch @@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/components/omnibox/common/omnibox_features.cc b/components/omnibox/common/omnibox_features.cc --- a/components/omnibox/common/omnibox_features.cc +++ b/components/omnibox/common/omnibox_features.cc -@@ -454,8 +454,8 @@ BASE_FEATURE(kOmniboxModernizeVisualUpdate, +@@ -448,8 +448,8 @@ BASE_FEATURE(kOmniboxModernizeVisualUpdate, // used, on non-Android platforms this is controlled through the // ChromeRefresh2023 flag. BASE_FEATURE(kUpdatedConnectionSecurityIndicators, diff --git a/build/patches/Disable-media-router-and-remoting-by-default.patch b/build/patches/Disable-media-router-and-remoting-by-default.patch index 2910136b1..be3460bb1 100644 --- a/build/patches/Disable-media-router-and-remoting-by-default.patch +++ b/build/patches/Disable-media-router-and-remoting-by-default.patch @@ -5,12 +5,12 @@ Subject: Disable media router and remoting by default Original License: MIT - https://spdx.org/licenses/MIT.html License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/media/router/media_router_feature.cc | 6 +++++- - chrome/browser/profiles/profile_impl.cc | 2 +- - content/child/runtime_features.cc | 2 ++ - .../renderer/modules/remoteplayback/remote_playback.cc | 2 +- - .../blink/renderer/platform/runtime_enabled_features.json5 | 4 ++-- - 5 files changed, 11 insertions(+), 5 deletions(-) + chrome/browser/media/router/media_router_feature.cc | 6 +++++- + chrome/browser/profiles/profile_impl.cc | 2 +- + content/child/runtime_features.cc | 2 ++ + .../renderer/modules/remoteplayback/remote_playback.cc | 2 +- + .../renderer/platform/runtime_enabled_features.json5 | 10 +++------- + 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/chrome/browser/media/router/media_router_feature.cc b/chrome/browser/media/router/media_router_feature.cc --- a/chrome/browser/media/router/media_router_feature.cc @@ -55,7 +55,7 @@ diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/p diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc --- a/content/child/runtime_features.cc +++ b/content/child/runtime_features.cc -@@ -587,6 +587,8 @@ void SetCustomizedRuntimeFeaturesFromCombinedArgs( +@@ -558,6 +558,8 @@ void SetCustomizedRuntimeFeaturesFromCombinedArgs( WebRuntimeFeatures::EnableBackForwardCache( content::IsBackForwardCacheEnabled()); @@ -67,7 +67,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features. diff --git a/third_party/blink/renderer/modules/remoteplayback/remote_playback.cc b/third_party/blink/renderer/modules/remoteplayback/remote_playback.cc --- a/third_party/blink/renderer/modules/remoteplayback/remote_playback.cc +++ b/third_party/blink/renderer/modules/remoteplayback/remote_playback.cc -@@ -92,7 +92,7 @@ KURL GetAvailabilityUrl(const WebURL& source, +@@ -99,7 +99,7 @@ KURL GetAvailabilityUrl(const WebURL& source, } bool IsBackgroundAvailabilityMonitoringDisabled() { @@ -79,15 +79,20 @@ diff --git a/third_party/blink/renderer/modules/remoteplayback/remote_playback.c diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -3218,10 +3218,10 @@ +@@ -3109,14 +3109,10 @@ base_feature: "none", }, { - name: "RemotePlaybackBackend", + name: "RemotePlaybackBackend", // disabled settable_from_internals: true, - // Tracking bug for the implementation: https://crbug.com/728609 -- status: {"Android": "stable", "default": "experimental"}, +- status: { +- "Android": "stable", +- "Win": "stable", +- "Mac": "stable", +- "Linux": "stable", +- "default": "experimental"}, ++ // Tracking bug for the implementation: https://crbug.com/728609 + status: "experimental", // by default }, { diff --git a/build/patches/Disable-minidump-upload-scheduling.patch b/build/patches/Disable-minidump-upload-scheduling.patch index cf4cc452f..fbe27b9b6 100644 --- a/build/patches/Disable-minidump-upload-scheduling.patch +++ b/build/patches/Disable-minidump-upload-scheduling.patch @@ -23,7 +23,7 @@ diff --git a/components/endpoint_fetcher/endpoint_fetcher.cc b/components/endpoi diff --git a/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/MinidumpUploadJobService.java b/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/MinidumpUploadJobService.java --- a/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/MinidumpUploadJobService.java +++ b/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/MinidumpUploadJobService.java -@@ -50,7 +50,10 @@ public abstract class MinidumpUploadJobService +@@ -52,7 +52,10 @@ public abstract class MinidumpUploadJobService extends JobService * to build an upload job for scheduling. */ public static void scheduleUpload(JobInfo.Builder jobInfoBuilder) { @@ -33,7 +33,7 @@ diff --git a/components/minidump_uploader/android/java/src/org/chromium/componen + return; + } JobScheduler scheduler = - (JobScheduler) ContextUtils.getApplicationContext().getSystemService( - Context.JOB_SCHEDULER_SERVICE); + (JobScheduler) + ContextUtils.getApplicationContext() -- 2.25.1 diff --git a/build/patches/Disable-plugins-enumeration.patch b/build/patches/Disable-plugins-enumeration.patch index 19b883e0f..ea4f90c38 100644 --- a/build/patches/Disable-plugins-enumeration.patch +++ b/build/patches/Disable-plugins-enumeration.patch @@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -2079,9 +2079,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() { +@@ -2113,9 +2113,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() { } PluginData* LocalFrame::GetPluginData() const { diff --git a/build/patches/Disable-safety-check.patch b/build/patches/Disable-safety-check.patch index 1c2e2ad93..329a4382b 100644 --- a/build/patches/Disable-safety-check.patch +++ b/build/patches/Disable-safety-check.patch @@ -4,19 +4,19 @@ Subject: Disable safety check License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/android/BUILD.gn | 5 ----- - chrome/android/chrome_java_sources.gni | 1 - - chrome/android/java/res/xml/main_preferences.xml | 5 ----- - .../chrome/browser/settings/SettingsActivity.java | 9 --------- - .../chrome/browser/settings/SettingsLauncherImpl.java | 5 +---- - chrome/browser/BUILD.gn | 1 - - .../browser/omnibox/suggestions/action/OmniboxPedal.java | 3 --- - 7 files changed, 1 insertion(+), 28 deletions(-) + chrome/android/BUILD.gn | 5 ----- + chrome/android/chrome_java_sources.gni | 1 - + chrome/android/java/res/xml/main_preferences.xml | 5 ----- + .../chrome/browser/settings/SettingsActivity.java | 12 ------------ + .../browser/settings/SettingsLauncherImpl.java | 5 +---- + chrome/browser/BUILD.gn | 1 - + .../omnibox/suggestions/action/OmniboxPedal.java | 3 --- + 7 files changed, 1 insertion(+), 31 deletions(-) diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -391,7 +391,6 @@ if (current_toolchain == default_toolchain) { +@@ -397,7 +397,6 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/recent_tabs:helper_java", "//chrome/browser/recent_tabs:java", "//chrome/browser/safe_browsing/android:java", @@ -24,7 +24,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn "//chrome/browser/screenshot_monitor:java", "//chrome/browser/search_engines/android:java", "//chrome/browser/search_resumption:java", -@@ -1028,8 +1027,6 @@ if (current_toolchain == default_toolchain) { +@@ -1037,8 +1036,6 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/recent_tabs:java", "//chrome/browser/recent_tabs:junit", "//chrome/browser/recent_tabs/internal:junit", @@ -33,7 +33,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn "//chrome/browser/screenshot_monitor:java", "//chrome/browser/search_engines/android:java", "//chrome/browser/search_engines/android:junit", -@@ -1639,8 +1636,6 @@ if (current_toolchain == default_toolchain) { +@@ -1659,8 +1656,6 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/quick_delete:javatests", "//chrome/browser/safe_browsing/android:java", "//chrome/browser/safe_browsing/android:javatests", @@ -45,7 +45,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni --- a/chrome/android/chrome_java_sources.gni +++ b/chrome/android/chrome_java_sources.gni -@@ -1008,7 +1008,6 @@ chrome_java_sources = [ +@@ -1001,7 +1001,6 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingPasswordReuseDialogBridge.java", "java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingReferringAppBridge.java", "java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingSettingsLauncher.java", @@ -71,7 +71,7 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java -@@ -65,9 +65,6 @@ import org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxSettingsBaseFra +@@ -66,9 +66,6 @@ import org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxSettingsBaseFra import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.profiles.ProfileManagerUtils; import org.chromium.chrome.browser.safe_browsing.settings.SafeBrowsingSettingsFragmentBase; @@ -81,19 +81,22 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin import org.chromium.chrome.browser.search_engines.settings.SearchEngineSettings; import org.chromium.chrome.browser.signin.SyncConsentActivityLauncherImpl; import org.chromium.chrome.browser.site_settings.ChromeSiteSettingsDelegate; -@@ -523,12 +520,6 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity +@@ -550,15 +547,6 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity baseSiteSettingsFragment.setCustomTabIntentHelper( LaunchIntentDispatcher::createCustomTabActivityIntent); } - if (fragment instanceof SafetyCheckSettingsFragment) { -- SafetyCheckCoordinator.create((SafetyCheckSettingsFragment) fragment, -- new SafetyCheckUpdatesDelegateImpl(), mSettingsLauncher, -- SyncConsentActivityLauncherImpl.get(), getModalDialogManagerSupplier(), +- SafetyCheckCoordinator.create( +- (SafetyCheckSettingsFragment) fragment, +- new SafetyCheckUpdatesDelegateImpl(), +- mSettingsLauncher, +- SyncConsentActivityLauncherImpl.get(), +- getModalDialogManagerSupplier(), - SyncServiceFactory.getForProfile(mProfile)); - } if (fragment instanceof PasswordCheckFragmentView) { - PasswordCheckComponentUiFactory.create((PasswordCheckFragmentView) fragment, - HelpAndFeedbackLauncherImpl.getForProfile(mProfile), mSettingsLauncher, + PasswordCheckComponentUiFactory.create( + (PasswordCheckFragmentView) fragment, diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsLauncherImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsLauncherImpl.java --- a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsLauncherImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsLauncherImpl.java @@ -105,7 +108,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin import org.chromium.components.browser_ui.accessibility.AccessibilitySettings; import org.chromium.components.browser_ui.settings.SettingsLauncher; import org.chromium.components.browser_ui.site_settings.SiteSettings; -@@ -57,9 +56,7 @@ public class SettingsLauncherImpl implements SettingsLauncher { +@@ -56,9 +55,7 @@ public class SettingsLauncherImpl implements SettingsLauncher { break; case SettingsFragment.SAFETY_CHECK: @@ -119,14 +122,14 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -3517,7 +3517,6 @@ static_library("browser") { +@@ -3489,7 +3489,6 @@ static_library("browser") { "//chrome/browser/reading_list/android", "//chrome/browser/recent_tabs:jni_headers", "//chrome/browser/safe_browsing/android:safe_browsing_enums", - "//chrome/browser/safety_check/android", "//chrome/browser/search_resumption:jni_headers", - "//chrome/browser/share/core/crow:crow_configuration", "//chrome/browser/signin/services/android:jni_headers", + "//chrome/browser/sync/android:jni_headers", diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/action/OmniboxPedal.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/action/OmniboxPedal.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/action/OmniboxPedal.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/action/OmniboxPedal.java diff --git a/build/patches/Disable-smart-selection-by-default.patch b/build/patches/Disable-smart-selection-by-default.patch index 1d96ed039..c28e21b36 100644 --- a/build/patches/Disable-smart-selection-by-default.patch +++ b/build/patches/Disable-smart-selection-by-default.patch @@ -13,10 +13,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../browser/contextualsearch/SelectionClientManager.java | 4 +++- chrome/browser/flags/android/chrome_feature_list.cc | 1 + .../org/chromium/chrome/browser/flags/ChromeFeatureList.java | 1 + - .../browser/selection/SelectionPopupControllerImpl.java | 2 +- + .../browser/selection/SelectionPopupControllerImpl.java | 1 - .../disable-smart-selection-by-default.inc | 3 +++ .../disable-smart-selection-by-default.inc | 1 + - 6 files changed, 10 insertions(+), 2 deletions(-) + 6 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/disable-smart-selection-by-default.inc create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/disable-smart-selection-by-default.inc @@ -44,7 +44,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearc diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc --- a/chrome/browser/flags/android/chrome_feature_list.cc +++ b/chrome/browser/flags/android/chrome_feature_list.cc -@@ -200,6 +200,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -198,6 +198,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kCCTClientDataHeader, &kCCTDeprecatedAPIs, &kCCTFeatureUsage, @@ -55,7 +55,7 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java -@@ -190,6 +190,7 @@ public abstract class ChromeFeatureList { +@@ -198,6 +198,7 @@ public abstract class ChromeFeatureList { public static final String CCT_REAL_TIME_ENGAGEMENT_SIGNALS_ALTERNATIVE_IMPL = "CCTRealTimeEngagementSignalsAlternativeImpl"; public static final String CCT_REDIRECT_PRECONNECT = "CCTRedirectPreconnect"; @@ -66,12 +66,11 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f diff --git a/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java b/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java --- a/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java +++ b/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java -@@ -1138,7 +1138,7 @@ public class SelectionPopupControllerImpl extends ActionModeCallbackHelper - */ - @Override +@@ -1172,7 +1172,6 @@ public class SelectionPopupControllerImpl extends ActionModeCallbackHelper public boolean canWebSearch() { -- return hasSelection() && !isFocusedNodeEditable() && !isIncognito() -+ return hasSelection() && !isFocusedNodeEditable() + return hasSelection() + && !isFocusedNodeEditable() +- && !isIncognito() && isSelectActionModeAllowed(MENU_ITEM_WEB_SEARCH); } diff --git a/build/patches/Disable-text-fragments-by-default.patch b/build/patches/Disable-text-fragments-by-default.patch index 41aef4223..669fd6d01 100644 --- a/build/patches/Disable-text-fragments-by-default.patch +++ b/build/patches/Disable-text-fragments-by-default.patch @@ -34,7 +34,7 @@ diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.cc b/chrome/browser/ui/pre diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc --- a/content/child/runtime_features.cc +++ b/content/child/runtime_features.cc -@@ -301,6 +301,8 @@ void SetRuntimeFeaturesFromChromiumFeatures() { +@@ -292,6 +292,8 @@ void SetRuntimeFeaturesFromChromiumFeatures() { #endif {wf::EnableTouchDragAndContextMenu, raw_ref(features::kTouchDragAndContextMenu)}, @@ -74,7 +74,7 @@ new file mode 100644 diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc --- a/third_party/blink/renderer/core/dom/document.cc +++ b/third_party/blink/renderer/core/dom/document.cc -@@ -4441,9 +4441,14 @@ void Document::SetURL(const KURL& url) { +@@ -4432,9 +4432,14 @@ void Document::SetURL(const KURL& url) { TRACE_EVENT1("navigation", "Document::SetURL", "url", new_url.GetString().Utf8()); @@ -92,7 +92,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -3834,10 +3834,9 @@ +@@ -3703,10 +3703,9 @@ }, { name: "TextFragmentIdentifiers", diff --git a/build/patches/Disable-third-party-origin-trials.patch b/build/patches/Disable-third-party-origin-trials.patch index 42725a0d6..d60b6748e 100644 --- a/build/patches/Disable-third-party-origin-trials.patch +++ b/build/patches/Disable-third-party-origin-trials.patch @@ -75,7 +75,7 @@ diff --git a/components/embedder_support/origin_trials/origin_trial_policy_impl. diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc -@@ -8375,7 +8375,6 @@ void NavigationRequest::SetSourceSiteInstanceToInitiatorIfNeeded() { +@@ -8520,7 +8520,6 @@ void NavigationRequest::SetSourceSiteInstanceToInitiatorIfNeeded() { void NavigationRequest::ForceEnableOriginTrials( const std::vector& trials) { DCHECK(!HasCommitted()); @@ -86,7 +86,7 @@ diff --git a/content/browser/renderer_host/navigation_request.cc b/content/brows diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -482,10 +482,6 @@ void FillNavigationParamsRequest( +@@ -483,10 +483,6 @@ void FillNavigationParamsRequest( common_params.initiator_origin.value(); } @@ -97,7 +97,7 @@ diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_fra navigation_params->was_discarded = commit_params.was_discarded; navigation_params->document_ukm_source_id = commit_params.document_ukm_source_id; -@@ -513,12 +509,6 @@ void FillNavigationParamsRequest( +@@ -514,12 +510,6 @@ void FillNavigationParamsRequest( navigation_params->had_transient_user_activation = common_params.has_user_gesture; @@ -110,7 +110,7 @@ diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_fra if (!commit_params.early_hints_preloaded_resources.empty()) { navigation_params->early_hints_preloaded_resources = WebVector(); for (const auto& resource : commit_params.early_hints_preloaded_resources) { -@@ -580,11 +570,6 @@ blink::mojom::CommonNavigationParamsPtr MakeCommonNavigationParams( +@@ -581,11 +571,6 @@ blink::mojom::CommonNavigationParamsPtr MakeCommonNavigationParams( info->url_request.GetURLRequestExtraData().get()); DCHECK(url_request_extra_data); @@ -122,7 +122,7 @@ diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_fra blink::NavigationDownloadPolicy download_policy; download_policy.ApplyDownloadFramePolicy( info->is_opener_navigation, info->url_request.HasUserGesture(), -@@ -607,7 +592,7 @@ blink::mojom::CommonNavigationParamsPtr MakeCommonNavigationParams( +@@ -608,7 +593,7 @@ blink::mojom::CommonNavigationParamsPtr MakeCommonNavigationParams( info->url_request.HasUserGesture(), info->url_request.HasTextFragmentToken(), info->should_check_main_world_content_security_policy, @@ -207,7 +207,7 @@ diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_p return result; } -@@ -2922,10 +2909,6 @@ void DocumentLoader::CreateParserPostCommit() { +@@ -2942,10 +2929,6 @@ void DocumentLoader::CreateParserPostCommit() { mojom::blink::OriginTrialFeature::kTouchEventFeatureDetection); } @@ -257,8 +257,8 @@ diff --git a/third_party/blink/renderer/core/origin_trials/origin_trial_context. bool OriginTrialContext::CanEnableTrialFromName(const StringView& trial_name) { + if ((true)) return false; - if (trial_name == "Portals") - return base::FeatureList::IsEnabled(features::kPortals); + if (trial_name == "PrivacySandboxAdsAPIs") + return base::FeatureList::IsEnabled(features::kPrivacySandboxAdsAPIs); -- 2.25.1 diff --git a/build/patches/Disable-update-scheduler.patch b/build/patches/Disable-update-scheduler.patch index 2978b059f..d8922060e 100644 --- a/build/patches/Disable-update-scheduler.patch +++ b/build/patches/Disable-update-scheduler.patch @@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java --- a/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java -@@ -66,7 +66,7 @@ public class ChromeBackgroundTaskFactory implements BackgroundTaskFactory { +@@ -67,7 +67,7 @@ public class ChromeBackgroundTaskFactory implements BackgroundTaskFactory { case TaskIds.WEBAPK_UPDATE_JOB_ID: return new WebApkUpdateTask(); case TaskIds.COMPONENT_UPDATE_JOB_ID: diff --git a/build/patches/Disable-various-metrics.patch b/build/patches/Disable-various-metrics.patch index 69b832f34..fd9ebbc23 100644 --- a/build/patches/Disable-various-metrics.patch +++ b/build/patches/Disable-various-metrics.patch @@ -24,7 +24,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java --- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java -@@ -60,7 +60,7 @@ public abstract class FirstRunActivityBase +@@ -63,7 +63,7 @@ public abstract class FirstRunActivityBase extends AsyncInitializationActivity static final String SHOW_SEARCH_ENGINE_PAGE = "ShowSearchEnginePage"; static final String SHOW_SYNC_CONSENT_PAGE = "ShowSyncConsent"; @@ -91,7 +91,7 @@ diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/br diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc --- a/chrome/browser/browser_process_impl.cc +++ b/chrome/browser/browser_process_impl.cc -@@ -1047,7 +1047,7 @@ void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { +@@ -1051,7 +1051,7 @@ void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { #endif // BUILDFLAG(IS_CHROMEOS_ASH) registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled, @@ -103,15 +103,15 @@ diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_pro diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc -@@ -81,7 +81,6 @@ +@@ -84,7 +84,6 @@ #include "chrome/browser/hid/chrome_hid_delegate.h" #include "chrome/browser/interstitials/enterprise_util.h" #include "chrome/browser/lifetime/browser_shutdown.h" -#include "chrome/browser/lookalikes/lookalike_url_navigation_throttle.h" #include "chrome/browser/media/audio_service_util.h" + #include "chrome/browser/media/prefs/capture_device_ranking.h" #include "chrome/browser/media/router/media_router_feature.h" - #include "chrome/browser/media/webrtc/audio_debug_recordings_handler.h" -@@ -5062,16 +5061,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( +@@ -5030,16 +5029,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( content::NavigationHandle* handle) { std::vector> throttles; @@ -128,7 +128,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch #if BUILDFLAG(ENABLE_SUPERVISED_USERS) MaybeAddThrottle( SupervisedUserNavigationThrottle::MaybeCreateThrottleFor(handle), -@@ -5172,10 +5161,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( +@@ -5140,10 +5129,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( throttle_manager->MaybeAppendNavigationThrottles(handle, &throttles); } @@ -222,8 +222,8 @@ diff --git a/components/ntp_tiles/most_visited_sites.cc b/components/ntp_tiles/m diff --git a/services/metrics/public/cpp/ukm_recorder.cc b/services/metrics/public/cpp/ukm_recorder.cc --- a/services/metrics/public/cpp/ukm_recorder.cc +++ b/services/metrics/public/cpp/ukm_recorder.cc -@@ -116,4 +116,5 @@ ukm::SourceId UkmRecorder::GetSourceIdFromScopeImpl(const GURL& scope_url, - return source_id; +@@ -130,4 +130,5 @@ void UkmRecorder::RemoveObserver(Observer* observer) { + observers_.RemoveObserver(observer); } +SET_CROMITE_FEATURE_DISABLED(kUkmFeature); diff --git a/build/patches/Do-not-build-API-keys-infobar.patch b/build/patches/Do-not-build-API-keys-infobar.patch index 786b9defe..566a8393f 100644 --- a/build/patches/Do-not-build-API-keys-infobar.patch +++ b/build/patches/Do-not-build-API-keys-infobar.patch @@ -11,7 +11,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn -@@ -1410,8 +1410,6 @@ static_library("ui") { +@@ -1421,8 +1421,6 @@ static_library("ui") { "singleton_tabs.h", "startup/automation_infobar_delegate.cc", "startup/automation_infobar_delegate.h", diff --git a/build/patches/Do-not-compile-QR-code-sharing.patch b/build/patches/Do-not-compile-QR-code-sharing.patch index 5c3f8c4be..dd26e9510 100644 --- a/build/patches/Do-not-compile-QR-code-sharing.patch +++ b/build/patches/Do-not-compile-QR-code-sharing.patch @@ -5,16 +5,16 @@ Subject: Do not compile QR code sharing License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- chrome/android/BUILD.gn | 1 - - .../chrome/browser/ui/RootUiCoordinator.java | 5 ----- + .../chrome/browser/ui/RootUiCoordinator.java | 5 ---- chrome/browser/share/BUILD.gn | 2 -- - ...omeProvidedSharingOptionsProviderBase.java | 19 ------------------- - chrome/browser/share/android/java_sources.gni | 11 ----------- - 5 files changed, 38 deletions(-) + ...omeProvidedSharingOptionsProviderBase.java | 23 ------------------- + chrome/browser/share/android/java_sources.gni | 11 --------- + 5 files changed, 42 deletions(-) diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -3456,7 +3456,6 @@ generate_jni("chrome_jni_headers") { +@@ -3471,7 +3471,6 @@ generate_jni("chrome_jni_headers") { "../browser/share/android/java/src/org/chromium/chrome/browser/share/link_to_text/LinkToTextBridge.java", "../browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/LongScreenshotsTabService.java", "../browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/LongScreenshotsTabServiceFactory.java", @@ -25,7 +25,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java -@@ -114,7 +114,6 @@ import org.chromium.chrome.browser.share.ShareButtonController; +@@ -112,7 +112,6 @@ import org.chromium.chrome.browser.share.ShareButtonController; import org.chromium.chrome.browser.share.ShareDelegate; import org.chromium.chrome.browser.share.ShareDelegate.ShareOrigin; import org.chromium.chrome.browser.share.ShareUtils; @@ -33,7 +33,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordi import org.chromium.chrome.browser.share.scroll_capture.ScrollCaptureManager; import org.chromium.chrome.browser.tab.AccessibilityVisibilityHandler; import org.chromium.chrome.browser.tab.AutofillSessionLifetimeController; -@@ -552,10 +551,6 @@ public class RootUiCoordinator +@@ -574,10 +573,6 @@ public class RootUiCoordinator } public void onAttachFragment(Fragment fragment) { @@ -67,7 +67,7 @@ diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/s import org.chromium.chrome.browser.share.send_tab_to_self.SendTabToSelfAndroidBridge; import org.chromium.chrome.browser.share.send_tab_to_self.SendTabToSelfCoordinator; import org.chromium.chrome.browser.share.share_sheet.ChromeOptionShareCallback; -@@ -287,9 +286,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase { +@@ -303,9 +302,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase { } private void maybeAddQrCodeFirstPartyOption() { @@ -77,22 +77,26 @@ diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/s } private void maybeAddScreenshotFirstPartyOption() { -@@ -441,21 +437,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase { +@@ -486,25 +482,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase { .build(); } - private FirstPartyOption createQrCodeFirstPartyOption() { - return new FirstPartyOptionBuilder( -- ContentType.LINK_PAGE_VISIBLE, ContentType.LINK_PAGE_NOT_VISIBLE, ContentType.IMAGE) +- ContentType.LINK_PAGE_VISIBLE, +- ContentType.LINK_PAGE_NOT_VISIBLE, +- ContentType.IMAGE) - .setDetailedContentTypesToDisableFor( - DetailedContentType.WEB_NOTES, DetailedContentType.SCREENSHOT) - .setIcon(R.drawable.qr_code, R.string.qr_code_share_icon_label) - .setFeatureNameForMetrics(USER_ACTION_QR_CODE_SELECTED) -- .setOnClickCallback((view) -> { -- QrCodeCoordinator qrCodeCoordinator = -- new QrCodeCoordinator(mActivity, mUrl, mShareParams.getWindow()); -- qrCodeCoordinator.show(); -- }) +- .setOnClickCallback( +- (view) -> { +- QrCodeCoordinator qrCodeCoordinator = +- new QrCodeCoordinator( +- mActivity, mUrl, mShareParams.getWindow()); +- qrCodeCoordinator.show(); +- }) - .build(); - } - diff --git a/build/patches/Do-not-ignore-download-location-prompt-setting.patch b/build/patches/Do-not-ignore-download-location-prompt-setting.patch index 6134dcb58..8a21ea06d 100644 --- a/build/patches/Do-not-ignore-download-location-prompt-setting.patch +++ b/build/patches/Do-not-ignore-download-location-prompt-setting.patch @@ -10,20 +10,21 @@ Do not tick "Don't show again" by default License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - .../DownloadLocationDialogCoordinator.java | 15 --------------- - 1 file changed, 15 deletions(-) + .../DownloadLocationDialogCoordinator.java | 16 ---------------- + 1 file changed, 16 deletions(-) diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java --- a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java +++ b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java -@@ -131,21 +131,6 @@ public class DownloadLocationDialogCoordinator implements ModalDialogProperties. +@@ -138,22 +138,6 @@ public class DownloadLocationDialogCoordinator implements ModalDialogProperties. * @param dirs An list of available download directories. */ private void onDirectoryOptionsRetrieved(ArrayList dirs) { - // If there is only one directory available, don't show the default dialog, and set the - // download directory to default. Dialog will still show for other types of dialogs, like - // name conflict or disk error or if Incognito download warning is needed. -- if (dirs.size() == 1 && !mLocationDialogManaged +- if (dirs.size() == 1 +- && !mLocationDialogManaged - && mDialogType == DownloadLocationDialogType.DEFAULT - && !shouldShowIncognitoWarning()) { - final DirectoryOption dir = dirs.get(0); diff --git a/build/patches/Do-not-link-with-libatomic.patch b/build/patches/Do-not-link-with-libatomic.patch index a753716d5..78f3b5162 100644 --- a/build/patches/Do-not-link-with-libatomic.patch +++ b/build/patches/Do-not-link-with-libatomic.patch @@ -14,7 +14,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/base/BUILD.gn b/base/BUILD.gn --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -1107,7 +1107,7 @@ component("base") { +@@ -1100,7 +1100,7 @@ component("base") { # more robust check for this. if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos)) && host_toolchain != "//build/toolchain/cros:host") { diff --git a/build/patches/DoH-improvements.patch b/build/patches/DoH-improvements.patch index 94a611172..cb179fd81 100644 --- a/build/patches/DoH-improvements.patch +++ b/build/patches/DoH-improvements.patch @@ -82,7 +82,7 @@ diff --git a/net/dns/dns_client.cc b/net/dns/dns_client.cc diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc --- a/net/dns/host_resolver_manager.cc +++ b/net/dns/host_resolver_manager.cc -@@ -3143,6 +3143,7 @@ void HostResolverManager::SetDnsConfigOverrides(DnsConfigOverrides overrides) { +@@ -3139,6 +3139,7 @@ void HostResolverManager::SetDnsConfigOverrides(DnsConfigOverrides overrides) { bool changed = dns_client_->SetConfigOverrides(std::move(overrides)); if (changed) { diff --git a/build/patches/Enable-Certificate-Transparency.patch b/build/patches/Enable-Certificate-Transparency.patch index 351df39cb..00e8fc24c 100644 --- a/build/patches/Enable-Certificate-Transparency.patch +++ b/build/patches/Enable-Certificate-Transparency.patch @@ -9,7 +9,7 @@ by default. License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- chrome/browser/browser_features.h | 1 + - chrome/browser/net/system_network_context_manager.cc | 6 +----- + chrome/browser/net/system_network_context_manager.cc | 2 +- chrome/browser/ssl/sct_reporting_service.cc | 5 +++++ .../about_flags_cc/Enable-Certificate-Transparency.inc | 9 +++++++++ .../Enable-Certificate-Transparency.inc | 6 ++++++ @@ -18,7 +18,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html net/url_request/report_sender.cc | 3 ++- services/network/network_context.cc | 2 +- services/network/sct_auditing/sct_auditing_handler.cc | 2 ++ - 10 files changed, 32 insertions(+), 9 deletions(-) + 10 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Enable-Certificate-Transparency.inc create mode 100644 cromite_flags/chrome/browser/browser_features_cc/Enable-Certificate-Transparency.inc create mode 100644 cromite_flags/chrome/common/chrome_features_cc/Enable-Certificate-Transparency.inc @@ -26,7 +26,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/browser_features.h b/chrome/browser/browser_features.h --- a/chrome/browser/browser_features.h +++ b/chrome/browser/browser_features.h -@@ -54,6 +54,7 @@ BASE_DECLARE_FEATURE(kTabCaptureBlueBorderCrOS); +@@ -62,6 +62,7 @@ BASE_DECLARE_FEATURE(kTabCaptureBlueBorderCrOS); BASE_DECLARE_FEATURE(kWebUsbDeviceDetection); @@ -37,22 +37,11 @@ diff --git a/chrome/browser/browser_features.h b/chrome/browser/browser_features diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc --- a/chrome/browser/net/system_network_context_manager.cc +++ b/chrome/browser/net/system_network_context_manager.cc -@@ -986,7 +986,6 @@ void SystemNetworkContextManager::SetEnableCertificateTransparencyForTesting( - bool SystemNetworkContextManager::IsCertificateTransparencyEnabled() { - if (certificate_transparency_enabled_for_testing_.has_value()) - return certificate_transparency_enabled_for_testing_.value(); --#if defined(OFFICIAL_BUILD) - // TODO(carlosil): Figure out if we can/should remove the OFFICIAL_BUILD - // check now that enforcement does not rely on build dates. - // Certificate Transparency is enabled: -@@ -994,10 +993,7 @@ bool SystemNetworkContextManager::IsCertificateTransparencyEnabled() { - // - on an opt-in basis for other builds and embedders, controlled with the - // kCertificateTransparencyAskBeforeEnabling flag +@@ -982,7 +982,7 @@ bool SystemNetworkContextManager::IsCertificateTransparencyEnabled() { + // - on an opt-in basis for other builds and embedders, controlled with the + // kCertificateTransparencyAskBeforeEnabling flag return base::FeatureList::IsEnabled( - features::kCertificateTransparencyAskBeforeEnabling); --#else -- return false; --#endif // defined(OFFICIAL_BUILD) + features::kCertificateTransparency); } @@ -60,8 +49,8 @@ diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/brows diff --git a/chrome/browser/ssl/sct_reporting_service.cc b/chrome/browser/ssl/sct_reporting_service.cc --- a/chrome/browser/ssl/sct_reporting_service.cc +++ b/chrome/browser/ssl/sct_reporting_service.cc -@@ -211,6 +211,11 @@ void SetSCTAuditingEnabledForStoragePartition( - } // namespace +@@ -203,6 +203,11 @@ SCTReportingService::SCTReportingService( + SCTReportingService::~SCTReportingService() = default; network::mojom::SCTAuditingMode SCTReportingService::GetReportingMode() { + if ((true)) { @@ -107,7 +96,7 @@ new file mode 100644 diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_state.cc --- a/net/http/transport_security_state.cc +++ b/net/http/transport_security_state.cc -@@ -329,6 +329,7 @@ class HSTSPreloadDecoder : public net::extras::PreloadDecoder { +@@ -327,6 +327,7 @@ class HSTSPreloadDecoder : public net::extras::PreloadDecoder { bool DecodeHSTSPreload(const std::string& search_hostname, PreloadResult* out) { #if !BUILDFLAG(INCLUDE_TRANSPORT_SECURITY_STATE_PRELOAD_LIST) @@ -115,7 +104,7 @@ diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_ if (g_hsts_source == nullptr) return false; #endif -@@ -374,8 +375,8 @@ bool DecodeHSTSPreload(const std::string& search_hostname, PreloadResult* out) { +@@ -372,8 +373,8 @@ bool DecodeHSTSPreload(const std::string& search_hostname, PreloadResult* out) { // static BASE_FEATURE(kCertificateTransparencyEnforcement, @@ -142,7 +131,7 @@ diff --git a/net/url_request/report_sender.cc b/net/url_request/report_sender.cc diff --git a/services/network/network_context.cc b/services/network/network_context.cc --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -2821,7 +2821,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2797,7 +2797,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( // TransportSecurityState. Since no requests have been made yet, safe to do // this even after the call to Build(). diff --git a/build/patches/Enable-HEVC-by-default.patch b/build/patches/Enable-HEVC-by-default.patch index cdbc7e549..acd72e0e5 100644 --- a/build/patches/Enable-HEVC-by-default.patch +++ b/build/patches/Enable-HEVC-by-default.patch @@ -12,7 +12,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc --- a/media/base/media_switches.cc +++ b/media/base/media_switches.cc -@@ -340,8 +340,8 @@ BASE_FEATURE(kEnableTabMuting, +@@ -348,8 +348,8 @@ BASE_FEATURE(kEnableTabMuting, #if BUILDFLAG(ENABLE_PLATFORM_HEVC) // Enables HEVC hardware accelerated decoding. BASE_FEATURE(kPlatformHEVCDecoderSupport, diff --git a/build/patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch b/build/patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch index 834e365bd..58e2c8275 100644 --- a/build/patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch +++ b/build/patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch @@ -20,7 +20,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc -@@ -1580,7 +1580,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs( +@@ -1549,7 +1549,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs( registry->RegisterFilePathPref(prefs::kDiskCacheDir, base::FilePath()); registry->RegisterIntegerPref(prefs::kDiskCacheSize, 0); registry->RegisterStringPref(prefs::kIsolateOrigins, std::string()); @@ -29,7 +29,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch registry->RegisterBooleanPref(prefs::kTabFreezingEnabled, true); registry->RegisterIntegerPref(prefs::kSCTAuditingHashdanceReportCount, 0); registry->RegisterBooleanPref( -@@ -1605,7 +1605,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs( +@@ -1574,7 +1574,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs( // user policy in addition to the same named ones in Local State (which are // used for mapping the command-line flags). registry->RegisterStringPref(prefs::kIsolateOrigins, std::string()); diff --git a/build/patches/Enable-darken-websites-checkbox-in-themes.patch b/build/patches/Enable-darken-websites-checkbox-in-themes.patch index 1f23075be..5510d5637 100644 --- a/build/patches/Enable-darken-websites-checkbox-in-themes.patch +++ b/build/patches/Enable-darken-websites-checkbox-in-themes.patch @@ -14,7 +14,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json -@@ -1508,9 +1508,9 @@ +@@ -1554,9 +1554,9 @@ "expiry_milestone": 125 }, { @@ -26,7 +26,7 @@ diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.js + "expiry_milestone": -1 }, { - "name": "data-retention-policies-disable-sync-types-needed", + "name": "dcheck-is-fatal", diff --git a/cromite_flags/components/content_settings/core/common/features_cc/Enable-darken-websites-checkbox-in-themes.inc b/cromite_flags/components/content_settings/core/common/features_cc/Enable-darken-websites-checkbox-in-themes.inc new file mode 100644 --- /dev/null diff --git a/build/patches/Enable-native-Android-autofill.patch b/build/patches/Enable-native-Android-autofill.patch index d448c2945..31c642bab 100644 --- a/build/patches/Enable-native-Android-autofill.patch +++ b/build/patches/Enable-native-Android-autofill.patch @@ -15,10 +15,9 @@ See also: https://github.com/bromite/bromite/issues/547 Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - android_webview/browser/aw_autofill_client.cc | 3 +- chrome/android/BUILD.gn | 1 + .../settings/PasswordSettings.java | 81 ++++++++++++++++++- - .../chromium/chrome/browser/tab/TabImpl.java | 51 ++++++++++++ + .../chromium/chrome/browser/tab/TabImpl.java | 52 ++++++++++++ .../browser/tab/TabViewAndroidDelegate.java | 14 ++++ chrome/browser/BUILD.gn | 7 ++ chrome/browser/android/tab_android.cc | 15 ++++ @@ -36,25 +35,12 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../autofill/core/common/autofill_prefs.h | 2 + .../embedder_support/view/ContentView.java | 46 +++++++++++ .../chromium/ui/base/ViewAndroidDelegate.java | 8 ++ - 21 files changed, 326 insertions(+), 9 deletions(-) + 20 files changed, 325 insertions(+), 8 deletions(-) -diff --git a/android_webview/browser/aw_autofill_client.cc b/android_webview/browser/aw_autofill_client.cc ---- a/android_webview/browser/aw_autofill_client.cc -+++ b/android_webview/browser/aw_autofill_client.cc -@@ -369,7 +369,8 @@ AwAutofillClient::AwAutofillClient(WebContents* contents, - ? base::BindRepeating(&autofill::AndroidDriverInitHook, this) - : base::BindRepeating(&autofill::BrowserDriverInitHook, - this, -- base::android::GetDefaultLocaleString())) -+ base::android::GetDefaultLocaleString(), -+ /*enable_secondary_autofill_manager*/ false)) - #if DCHECK_IS_ON() - , - use_android_autofill_manager_(use_android_autofill_manager) diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -418,6 +418,7 @@ if (current_toolchain == default_toolchain) { +@@ -424,6 +424,7 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/ui/android/hats:message_ui_delegate_java", "//chrome/browser/ui/android/layouts:java", "//chrome/browser/ui/android/layouts/glue:java", @@ -65,7 +51,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn 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 --- 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 -@@ -59,13 +59,18 @@ import java.lang.annotation.Retention; +@@ -59,6 +59,11 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.Locale; @@ -77,15 +63,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage /** * The "Passwords" screen in Settings, which allows the user to enable or disable password saving, * to view saved passwords (just the username and URL), and to delete saved passwords. - */ +@@ -66,7 +71,7 @@ import java.util.Locale; public class PasswordSettings extends ChromeBaseSettingsFragment - implements PasswordListObserver, Preference.OnPreferenceClickListener, -- SyncService.SyncStateChangedListener { -+ SyncService.SyncStateChangedListener, INeedSnackbarManager { - @IntDef({TrustedVaultBannerState.NOT_SHOWN, TrustedVaultBannerState.OFFER_OPT_IN, - TrustedVaultBannerState.OPTED_IN}) - @Retention(RetentionPolicy.SOURCE) -@@ -92,6 +97,12 @@ public class PasswordSettings extends ChromeBaseSettingsFragment + implements PasswordListObserver, + Preference.OnPreferenceClickListener, +- SyncService.SyncStateChangedListener { ++ SyncService.SyncStateChangedListener, INeedSnackbarManager { + @IntDef({ + TrustedVaultBannerState.NOT_SHOWN, + TrustedVaultBannerState.OFFER_OPT_IN, +@@ -96,6 +101,12 @@ public class PasswordSettings extends ChromeBaseSettingsFragment public static final String PREF_TRUSTED_VAULT_BANNER = "trusted_vault_banner"; public static final String PREF_KEY_MANAGE_ACCOUNT_LINK = "manage_account_link"; @@ -98,7 +85,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage private static final String PREF_KEY_CATEGORY_SAVED_PASSWORDS = "saved_passwords"; private static final String PREF_KEY_CATEGORY_EXCEPTIONS = "exceptions"; private static final String PREF_KEY_SAVED_PASSWORDS_NO_TEXT = "saved_passwords_no_text"; -@@ -124,6 +135,8 @@ public class PasswordSettings extends ChromeBaseSettingsFragment +@@ -128,6 +139,8 @@ public class PasswordSettings extends ChromeBaseSettingsFragment private Preference mLinkPref; private Menu mMenu; @@ -107,7 +94,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage private @ManagePasswordsReferrer int mManagePasswordsReferrer; private BottomSheetController mBottomSheetController; -@@ -298,6 +311,7 @@ public class PasswordSettings extends ChromeBaseSettingsFragment +@@ -302,6 +315,7 @@ public class PasswordSettings extends ChromeBaseSettingsFragment } createSavePasswordsSwitch(); @@ -115,7 +102,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage if (shouldShowAutoSigninOption()) { createAutoSignInCheckbox(); } -@@ -561,6 +575,71 @@ public class PasswordSettings extends ChromeBaseSettingsFragment +@@ -575,6 +589,71 @@ public class PasswordSettings extends ChromeBaseSettingsFragment getPrefService().getBoolean(Pref.CREDENTIALS_ENABLE_SERVICE)); } @@ -190,7 +177,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java -@@ -75,6 +75,17 @@ import org.chromium.url.GURL; +@@ -74,6 +74,17 @@ import org.chromium.url.GURL; import java.nio.ByteBuffer; @@ -206,9 +193,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav +import org.chromium.components.user_prefs.UserPrefs; + /** - * Implementation of the interface {@link Tab}. Contains and manages a {@link ContentView}. - * This class is not intended to be extended. -@@ -236,6 +247,8 @@ public class TabImpl implements Tab { + * Implementation of the interface {@link Tab}. Contains and manages a {@link ContentView}. This + * class is not intended to be extended. +@@ -224,6 +235,8 @@ class TabImpl implements Tab { */ private @Nullable @TabLaunchType Integer mTabLaunchTypeAtCreation; @@ -217,7 +204,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav /** * Creates an instance of a {@link TabImpl}. Package-private. Use {@link TabBuilder} to create * an instance. -@@ -816,6 +829,11 @@ public class TabImpl implements Tab { +@@ -844,6 +857,11 @@ class TabImpl implements Tab { for (TabObserver observer : mObservers) observer.onDestroyed(this); mObservers.clear(); @@ -229,7 +216,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav mUserDataHost.destroy(); mTabViewManager.destroy(); hideNativePage(false, null); -@@ -1393,6 +1411,16 @@ public class TabImpl implements Tab { +@@ -1424,6 +1442,16 @@ class TabImpl implements Tab { return mWebContentsState == null ? -1 : mWebContentsState.version(); } @@ -246,7 +233,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav /** * Initializes the {@link WebContents}. Completes the browser content components initialization * around a native WebContents pointer. -@@ -1448,6 +1476,28 @@ public class TabImpl implements Tab { +@@ -1491,6 +1519,28 @@ class TabImpl implements Tab { this)); mWebContents.notifyRendererPreferenceUpdate(); @@ -275,29 +262,30 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav TabHelpers.initWebContentsHelpers(this); notifyContentChanged(); } finally { -@@ -1875,6 +1925,7 @@ public class TabImpl implements Tab { - void setActiveNavigationEntryTitleForUrl(long nativeTabAndroid, String url, String title); - void loadOriginalImage(long nativeTabAndroid); +@@ -1954,6 +2004,8 @@ class TabImpl implements Tab { + boolean handleNonNavigationAboutURL(GURL url); + + void initializeAutofillIfNecessary(long nativeTabAndroid); ++ void onShow(long nativeTabAndroid); } } diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndroidDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndroidDelegate.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndroidDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndroidDelegate.java -@@ -21,6 +21,10 @@ import org.chromium.ui.dragdrop.DragAndDropBrowserDelegate; - import org.chromium.ui.dragdrop.DragAndDropDelegate; +@@ -20,6 +20,10 @@ import org.chromium.ui.base.WindowAndroid; + import org.chromium.ui.dragdrop.DragAndDropBrowserDelegate; import org.chromium.ui.dragdrop.DragStateTracker; +import android.util.SparseArray; +import android.view.autofill.AutofillValue; +import android.view.ViewStructure; + - /** - * Implementation of the abstract class {@link ViewAndroidDelegate} for Chrome. - */ -@@ -86,6 +90,16 @@ public class TabViewAndroidDelegate extends ViewAndroidDelegate { + /** Implementation of the abstract class {@link ViewAndroidDelegate} for Chrome. */ + public class TabViewAndroidDelegate extends ViewAndroidDelegate { + private final TabImpl mTab; +@@ -83,6 +87,16 @@ public class TabViewAndroidDelegate extends ViewAndroidDelegate { mTab.onBackgroundColorChanged(color); } @@ -317,7 +305,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndr diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -2688,6 +2688,13 @@ static_library("browser") { +@@ -2664,6 +2664,13 @@ static_library("browser") { deps += [ "//chrome/browser/error_reporting" ] } @@ -375,7 +363,7 @@ diff --git a/chrome/browser/android/tab_android.h b/chrome/browser/android/tab_a diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd -@@ -654,6 +654,12 @@ CHAR_LIMIT guidelines: +@@ -634,6 +634,12 @@ CHAR_LIMIT guidelines: Save passwords @@ -391,7 +379,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.cc b/chrome/browser/ui/autofill/chrome_autofill_client.cc --- a/chrome/browser/ui/autofill/chrome_autofill_client.cc +++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc -@@ -1346,7 +1346,13 @@ ChromeAutofillClient::ChromeAutofillClient(content::WebContents* web_contents) +@@ -1359,7 +1359,13 @@ ChromeAutofillClient::ChromeAutofillClient(content::WebContents* web_contents) web_contents, base::BindRepeating(&BrowserDriverInitHook, this, @@ -409,7 +397,7 @@ diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.cc b/chrome/brows diff --git a/components/android_autofill/browser/android_autofill_manager.cc b/components/android_autofill/browser/android_autofill_manager.cc --- a/components/android_autofill/browser/android_autofill_manager.cc +++ b/components/android_autofill/browser/android_autofill_manager.cc -@@ -25,7 +25,7 @@ using base::TimeTicks; +@@ -26,7 +26,7 @@ using base::TimeTicks; void AndroidDriverInitHook(AutofillClient* client, ContentAutofillDriver* driver) { driver->set_autofill_manager( @@ -421,9 +409,9 @@ diff --git a/components/android_autofill/browser/android_autofill_manager.cc b/c diff --git a/components/android_autofill/browser/android_autofill_manager.h b/components/android_autofill/browser/android_autofill_manager.h --- a/components/android_autofill/browser/android_autofill_manager.h +++ b/components/android_autofill/browser/android_autofill_manager.h -@@ -83,12 +83,12 @@ class AndroidAutofillManager : public AutofillManager, - const FieldTypeGroup field_type_group, - const url::Origin& triggered_origin); +@@ -91,12 +91,12 @@ class AndroidAutofillManager : public AutofillManager, + const std::u16string& value, + PopupItemId popup_item_id) override; + AndroidAutofillManager(AutofillDriver* driver, AutofillClient* client); + @@ -439,7 +427,7 @@ diff --git a/components/android_autofill/browser/android_autofill_manager.h b/co diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/components/autofill/content/browser/content_autofill_driver.cc --- a/components/autofill/content/browser/content_autofill_driver.cc +++ b/components/autofill/content/browser/content_autofill_driver.cc -@@ -489,6 +489,10 @@ void ContentAutofillDriver::FormsSeen( +@@ -455,6 +455,10 @@ void ContentAutofillDriver::FormsSeen( const std::vector& removed_forms) { target->GetAutofillManager().OnFormsSeen( WithNewVersion(updated_forms), removed_forms); @@ -450,7 +438,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -516,6 +520,10 @@ void ContentAutofillDriver::FormSubmitted( +@@ -482,6 +486,10 @@ void ContentAutofillDriver::FormSubmitted( } target->GetAutofillManager().OnFormSubmitted( WithNewVersion(form), known_success, submission_source); @@ -461,7 +449,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -537,6 +545,10 @@ void ContentAutofillDriver::TextFieldDidChange(const FormData& raw_form, +@@ -503,6 +511,10 @@ void ContentAutofillDriver::TextFieldDidChange(const FormData& raw_form, base::TimeTicks timestamp) { target->GetAutofillManager().OnTextFieldDidChange( WithNewVersion(form), field, bounding_box, timestamp); @@ -472,7 +460,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -556,6 +568,10 @@ void ContentAutofillDriver::TextFieldDidScroll(const FormData& raw_form, +@@ -522,6 +534,10 @@ void ContentAutofillDriver::TextFieldDidScroll(const FormData& raw_form, const FormFieldData& field, const gfx::RectF& bounding_box) { target->GetAutofillManager().OnTextFieldDidScroll(WithNewVersion(form), field, bounding_box); @@ -483,7 +471,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -576,6 +592,10 @@ void ContentAutofillDriver::SelectControlDidChange( +@@ -542,6 +558,10 @@ void ContentAutofillDriver::SelectControlDidChange( const FormFieldData& field, const gfx::RectF& bounding_box) { target->GetAutofillManager().OnSelectControlDidChange( WithNewVersion(form), field, bounding_box); @@ -494,7 +482,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -598,6 +618,10 @@ void ContentAutofillDriver::AskForValuesToFill( +@@ -564,6 +584,10 @@ void ContentAutofillDriver::AskForValuesToFill( AutofillSuggestionTriggerSource trigger_source) { target->GetAutofillManager().OnAskForValuesToFill( WithNewVersion(form), field, bounding_box, trigger_source); @@ -505,7 +493,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -609,6 +633,8 @@ void ContentAutofillDriver::HidePopup() { +@@ -575,6 +599,8 @@ void ContentAutofillDriver::HidePopup() { DCHECK(!target->IsPrerendering()) << "We should never affect UI while prerendering"; target->GetAutofillManager().OnHidePopup(); @@ -514,7 +502,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -620,6 +646,8 @@ void ContentAutofillDriver::FocusNoLongerOnForm(bool had_interacted_form) { +@@ -586,6 +612,8 @@ void ContentAutofillDriver::FocusNoLongerOnForm(bool had_interacted_form) { this, had_interacted_form, [](autofill::AutofillDriver* target, bool had_interacted_form) { target->GetAutofillManager().OnFocusNoLongerOnForm(had_interacted_form); @@ -523,7 +511,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -639,9 +667,16 @@ void ContentAutofillDriver::FocusOnFormField(const FormData& raw_form, +@@ -605,9 +633,16 @@ void ContentAutofillDriver::FocusOnFormField(const FormData& raw_form, const FormFieldData& field, const gfx::RectF& bounding_box) { target->GetAutofillManager().OnFocusOnFormField(WithNewVersion(form), field, bounding_box); @@ -540,7 +528,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -656,6 +691,10 @@ void ContentAutofillDriver::DidFillAutofillFormData(const FormData& raw_form, +@@ -622,6 +657,10 @@ void ContentAutofillDriver::DidFillAutofillFormData(const FormData& raw_form, base::TimeTicks timestamp) { target->GetAutofillManager().OnDidFillAutofillFormData( WithNewVersion(form), timestamp); @@ -551,7 +539,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -665,6 +704,8 @@ void ContentAutofillDriver::DidEndTextFieldEditing() { +@@ -631,6 +670,8 @@ void ContentAutofillDriver::DidEndTextFieldEditing() { } router().DidEndTextFieldEditing(this, [](autofill::AutofillDriver* target) { target->GetAutofillManager().OnDidEndTextFieldEditing(); @@ -560,7 +548,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -679,6 +720,10 @@ void ContentAutofillDriver::SelectOrSelectListFieldOptionsDidChange( +@@ -645,6 +686,10 @@ void ContentAutofillDriver::SelectOrSelectListFieldOptionsDidChange( cast(target) ->GetAutofillManager() .OnSelectOrSelectListFieldOptionsDidChange(WithNewVersion(form)); @@ -571,7 +559,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -698,6 +743,10 @@ void ContentAutofillDriver::JavaScriptChangedAutofilledValue( +@@ -664,6 +709,10 @@ void ContentAutofillDriver::JavaScriptChangedAutofilledValue( const FormFieldData& field, const std::u16string& old_value) { target->GetAutofillManager().OnJavaScriptChangedAutofilledValue( WithNewVersion(form), field, old_value); @@ -582,7 +570,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -710,6 +759,8 @@ void ContentAutofillDriver::OnContextMenuShownInField( +@@ -676,6 +725,8 @@ void ContentAutofillDriver::OnContextMenuShownInField( const FieldGlobalId& field_global_id) { target->GetAutofillManager().OnContextMenuShownInField(form_global_id, field_global_id); @@ -591,7 +579,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -720,6 +771,8 @@ void ContentAutofillDriver::Reset() { +@@ -686,6 +737,8 @@ void ContentAutofillDriver::Reset() { owner_->router().UnregisterDriver(this, /*driver_is_dying=*/false); autofill_manager_->Reset(); @@ -617,7 +605,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.h b/com content::RenderFrameHost* render_frame_host() { return &*render_frame_host_; } const content::RenderFrameHost* render_frame_host() const { -@@ -352,6 +355,10 @@ class ContentAutofillDriver : public AutofillDriver, +@@ -351,6 +354,10 @@ class ContentAutofillDriver : public AutofillDriver, std::unique_ptr autofill_manager_ = nullptr; @@ -672,7 +660,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver_factory diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc --- a/components/autofill/content/renderer/password_autofill_agent.cc +++ b/components/autofill/content/renderer/password_autofill_agent.cc -@@ -834,7 +834,10 @@ void PasswordAutofillAgent::UpdateStateForTextChange( +@@ -827,7 +827,10 @@ void PasswordAutofillAgent::UpdatePasswordStateForTextChange( void PasswordAutofillAgent::TrackAutofilledElement( const blink::WebFormControlElement& element) { @@ -734,16 +722,16 @@ diff --git a/components/embedder_support/android/java/src/org/chromium/component /** * The containing view for {@link WebContents} that exists in the Android UI hierarchy and exposes * the various {@link View} functionality to it. -@@ -93,6 +98,8 @@ public class ContentView extends FrameLayout - */ - public static ContentView createContentView(Context context, - @Nullable EventOffsetHandler eventOffsetHandler, @Nullable WebContents webContents) { +@@ -96,6 +101,8 @@ public class ContentView extends FrameLayout + Context context, + @Nullable EventOffsetHandler eventOffsetHandler, + @Nullable WebContents webContents) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) + return new ContentViewWithAutofill(context, eventOffsetHandler, webContents); return new ContentView(context, eventOffsetHandler, webContents); } -@@ -640,4 +647,43 @@ public class ContentView extends FrameLayout +@@ -642,4 +649,43 @@ public class ContentView extends FrameLayout mDragDropEventOffsetHandler.onPostDispatchDragEvent(event.getAction()); return ret; } @@ -798,10 +786,10 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java b +import android.view.autofill.AutofillValue; +import android.view.ViewStructure; + - /** - * Class to acquire, position, and remove anchor views from the implementing View. - */ -@@ -579,4 +583,8 @@ public class ViewAndroidDelegate { + /** Class to acquire, position, and remove anchor views from the implementing View. */ + @JNINamespace("ui") + public class ViewAndroidDelegate { +@@ -586,4 +590,8 @@ public class ViewAndroidDelegate { sDragAndDropDelegateForTesting = testDelegate; ResettersForTesting.register(() -> sDragAndDropDelegateForTesting = null); } diff --git a/build/patches/Enable-share-intent.patch b/build/patches/Enable-share-intent.patch index ec8bb2af7..03dc74ce6 100644 --- a/build/patches/Enable-share-intent.patch +++ b/build/patches/Enable-share-intent.patch @@ -34,7 +34,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni --- a/chrome/android/chrome_java_resources.gni +++ b/chrome/android/chrome_java_resources.gni -@@ -605,6 +605,7 @@ chrome_java_resources = [ +@@ -589,6 +589,7 @@ chrome_java_resources = [ "java/res/layout/signin_activity.xml", "java/res/layout/status_indicator_container.xml", "java/res/layout/suggestions_tile_view_condensed.xml", @@ -45,7 +45,7 @@ diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_ja diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni --- a/chrome/android/chrome_java_sources.gni +++ b/chrome/android/chrome_java_sources.gni -@@ -1045,6 +1045,7 @@ chrome_java_sources = [ +@@ -1038,6 +1038,7 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/signin/SyncConsentActivity.java", "java/src/org/chromium/chrome/browser/signin/SyncConsentActivityLauncherImpl.java", "java/src/org/chromium/chrome/browser/signin/SyncConsentFragment.java", @@ -189,17 +189,17 @@ new file mode 100644 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java --- a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java -@@ -197,6 +197,9 @@ public class IntentHandler { +@@ -173,6 +173,9 @@ public class IntentHandler { private static final String EXTRA_TAB_LAUNCH_TYPE = "org.chromium.chrome.browser.tab_launch_type"; + private static final String EXTRA_TAB_FORCE_INCOGNITO_TYPE = + "org.chromium.chrome.browser.force_incognito"; + - /** - * A hash code for the URL to verify intent data hasn't been modified. - */ -@@ -1265,6 +1268,17 @@ public class IntentHandler { + /** A hash code for the URL to verify intent data hasn't been modified. */ + public static final String EXTRA_DATA_HASH_CODE = "org.chromium.chrome.browser.data_hash"; + +@@ -1264,6 +1267,17 @@ public class IntentHandler { return IntentUtils.safeGetSerializableExtra(intent, EXTRA_TAB_LAUNCH_TYPE); } @@ -217,7 +217,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.j /** * Creates an Intent that will launch a ChromeTabbedActivity on the new tab page. The Intent * will be trusted and therefore able to launch Incognito tabs. -@@ -1396,7 +1410,7 @@ public class IntentHandler { +@@ -1393,7 +1407,7 @@ public class IntentHandler { String headers = getExtraHeadersFromIntent(intent); headers = maybeAddAdditionalContentHeaders(intent, url, headers); @@ -229,7 +229,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.j diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java --- a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java -@@ -430,8 +430,8 @@ public class LaunchIntentDispatcher { +@@ -431,8 +431,8 @@ public class LaunchIntentDispatcher { /*incognito*/true); newIntent.setData(mIntent.getData()); newIntent.setPackage(applicationContext.getPackageName()); @@ -242,7 +242,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDis diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java --- a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java -@@ -87,6 +87,7 @@ import org.chromium.chrome.browser.tab.state.ShoppingPersistedTabData; +@@ -86,6 +86,7 @@ import org.chromium.chrome.browser.tabpersistence.TabStateFileManager; import org.chromium.chrome.browser.ui.cars.DrivingRestrictionsManager; import org.chromium.chrome.browser.ui.hats.SurveyClientFactory; import org.chromium.chrome.browser.ui.searchactivityutils.SearchActivityPreferencesManager; @@ -250,8 +250,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessIni import org.chromium.chrome.browser.usb.UsbNotificationManager; import org.chromium.chrome.browser.util.AfterStartupTaskUtils; import org.chromium.chrome.browser.webapps.WebappRegistry; -@@ -440,6 +441,8 @@ public class ProcessInitializationHandler { - .resolveClearDataDialogResultRecorder()::makeDeferredRecordings); +@@ -467,6 +468,8 @@ public class ProcessInitializationHandler { + ::makeDeferredRecordings); deferredStartupHandler.addDeferredTask(WebApkUninstallUmaTracker::recordDeferredUma); + deferredStartupHandler.addDeferredTask( @@ -386,10 +386,10 @@ new file mode 100644 diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc --- a/chrome/browser/flags/android/chrome_feature_list.cc +++ b/chrome/browser/flags/android/chrome_feature_list.cc -@@ -292,6 +292,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { - &kReengagementNotification, +@@ -289,6 +289,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kSearchReadyOmniboxFeature, &kRelatedSearches, + &kRelatedSearchesAllLanguage, + &kSharedIntentUI, &kReportParentalControlSitesChild, &kRequestDesktopSiteDefaults, @@ -397,9 +397,9 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java -@@ -398,6 +398,7 @@ public abstract class ChromeFeatureList { - public static final String REACHED_CODE_PROFILER = "ReachedCodeProfiler"; +@@ -397,6 +397,7 @@ public abstract class ChromeFeatureList { public static final String READALOUD = "ReadAloud"; + public static final String READALOUD_PLAYBACK = "ReadAloudPlayback"; public static final String READER_MODE_IN_CCT = "ReaderModeInCCT"; + public static final String SHARED_INTENT_UI = "SharedIntentUI"; public static final String RECORD_SUPPRESSION_METRICS = "RecordSuppressionMetrics"; @@ -408,7 +408,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd -@@ -5239,6 +5239,19 @@ To change this setting, <resetlink>reset sync

<resetlink>reset sync

diff --git a/build/patches/Experimental-user-scripts-support.patch b/build/patches/Experimental-user-scripts-support.patch index 9aef51f26..8753fb3a2 100644 --- a/build/patches/Experimental-user-scripts-support.patch +++ b/build/patches/Experimental-user-scripts-support.patch @@ -30,7 +30,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html chrome/android/BUILD.gn | 7 +- .../android/java/res/xml/main_preferences.xml | 5 + .../browser/download/DownloadUtils.java | 6 + - .../init/ProcessInitializationHandler.java | 3 + + .../init/ProcessInitializationHandler.java | 4 + chrome/android/java_sources.gni | 3 + chrome/browser/BUILD.gn | 7 + chrome/browser/about_flags.cc | 1 + @@ -134,7 +134,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../strings/userscripts_strings.grdp | 54 ++ .../Experimental-user-scripts-support.inc | 13 + tools/gritsettings/resource_ids.spec | 6 + - 107 files changed, 9488 insertions(+), 2 deletions(-) + 107 files changed, 9489 insertions(+), 2 deletions(-) create mode 100644 components/user_scripts/README.md create mode 100755 components/user_scripts/android/BUILD.gn create mode 100644 components/user_scripts/android/java/res/layout/accept_script_item.xml @@ -225,7 +225,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -176,7 +176,11 @@ if (current_toolchain == default_toolchain) { +@@ -177,7 +177,11 @@ if (current_toolchain == default_toolchain) { sources = chrome_java_resources sources += [ "//chrome/android/java/res_app/layout/main.xml" ] @@ -238,7 +238,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn ":chrome_base_module_resources", ":ui_locale_string_resources", "//chrome/android/webapk/libs/common:splash_resources", -@@ -576,6 +580,7 @@ if (current_toolchain == default_toolchain) { +@@ -582,6 +586,7 @@ if (current_toolchain == default_toolchain) { "//components/ukm/android:java", "//components/url_formatter/android:url_formatter_java", "//components/user_prefs/android:java", @@ -264,7 +264,7 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java --- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java -@@ -75,6 +75,7 @@ import org.chromium.ui.UiUtils; +@@ -72,6 +72,7 @@ import org.chromium.ui.UiUtils; import org.chromium.ui.base.DeviceFormFactor; import org.chromium.ui.widget.Toast; import org.chromium.url.GURL; @@ -272,10 +272,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/Downlo import java.io.File; -@@ -447,6 +448,11 @@ public class DownloadUtils { - public static boolean openFile(String filePath, String mimeType, String downloadGuid, - OTRProfileID otrProfileID, String originalUrl, String referrer, - @DownloadOpenSource int source, Context context) { +@@ -423,6 +424,11 @@ public class DownloadUtils { + String referrer, + @DownloadOpenSource int source, + Context context) { + if (UserScriptsUtils.getInstance().openFile(filePath, mimeType, downloadGuid, + originalUrl, referrer, + getUriForItem(filePath))) { @@ -287,7 +287,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/Downlo diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java --- a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java -@@ -125,6 +125,8 @@ import java.util.ArrayList; +@@ -124,6 +124,8 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -296,14 +296,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessIni /** * Handles the initialization dependences of the browser process. This is meant to handle the * initialization that is not tied to any particular Activity, and the logic that should only be -@@ -332,6 +334,7 @@ public class ProcessInitializationHandler { +@@ -350,6 +352,8 @@ public class ProcessInitializationHandler { - DefaultBrowserInfo.initBrowserFetcher(); + DefaultBrowserInfo.initBrowserFetcher(); -+ UserScriptsUtils.Initialize(); - AfterStartupTaskUtils.setStartupComplete(); ++ UserScriptsUtils.Initialize(); ++ + AfterStartupTaskUtils.setStartupComplete(); - PartnerBrowserCustomizations.getInstance().setOnInitializeAsyncFinished( + PartnerBrowserCustomizations.getInstance() diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni --- a/chrome/android/java_sources.gni +++ b/chrome/android/java_sources.gni @@ -324,7 +325,7 @@ diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -3685,6 +3685,13 @@ static_library("browser") { +@@ -3658,6 +3658,13 @@ static_library("browser") { ] deps += [ "//chrome/android/modules/dev_ui/provider:native" ] } @@ -352,7 +353,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc -@@ -270,6 +270,7 @@ +@@ -278,6 +278,7 @@ #include "components/permissions/contexts/geolocation_permission_context_android.h" #include "components/query_tiles/tile_service_prefs.h" #include "components/webapps/browser/android/install_prompt_prefs.h" @@ -360,7 +361,7 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse #else // BUILDFLAG(IS_ANDROID) #include "chrome/browser/cart/cart_service.h" #include "chrome/browser/companion/core/promo_handler.h" -@@ -1724,6 +1725,9 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -1792,6 +1793,9 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, translate::TranslatePrefs::RegisterProfilePrefs(registry); omnibox::RegisterProfilePrefs(registry); ZeroSuggestProvider::RegisterProfilePrefs(registry); @@ -373,7 +374,7 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse diff --git a/chrome/browser/profiles/BUILD.gn b/chrome/browser/profiles/BUILD.gn --- a/chrome/browser/profiles/BUILD.gn +++ b/chrome/browser/profiles/BUILD.gn -@@ -68,6 +68,9 @@ source_set("profile") { +@@ -70,6 +70,9 @@ source_set("profile") { "//content/public/browser", "//extensions/buildflags", ] @@ -386,9 +387,9 @@ diff --git a/chrome/browser/profiles/BUILD.gn b/chrome/browser/profiles/BUILD.gn diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -485,6 +485,10 @@ - #include "chrome/browser/offline_pages/request_coordinator_factory.h" - #endif +@@ -502,6 +502,10 @@ + + #endif // BUILDFLAG(ENABLE_BOUND_SESSION_CREDENTIALS) +#if BUILDFLAG(IS_ANDROID) +#include "components/user_scripts/browser/userscripts_browser_client.h" @@ -397,7 +398,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc namespace chrome { void AddProfilesExtraParts(ChromeBrowserMainParts* main_parts) { -@@ -1205,6 +1209,9 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1248,6 +1252,9 @@ void ChromeBrowserMainExtraPartsProfiles:: #endif WebDataServiceFactory::GetInstance(); webrtc_event_logging::WebRtcEventLogManagerKeyedServiceFactory::GetInstance(); @@ -410,7 +411,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc --- a/chrome/browser/profiles/profile_manager.cc +++ b/chrome/browser/profiles/profile_manager.cc -@@ -109,6 +109,10 @@ +@@ -111,6 +111,10 @@ #include "extensions/common/manifest.h" #endif @@ -421,7 +422,7 @@ diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profile #if BUILDFLAG(ENABLE_SESSION_SERVICE) #include "chrome/browser/sessions/app_session_service_factory.h" #include "chrome/browser/sessions/session_service_factory.h" -@@ -1533,6 +1537,15 @@ void ProfileManager::DoFinalInitForServices(Profile* profile, +@@ -1537,6 +1541,15 @@ void ProfileManager::DoFinalInitForServices(Profile* profile, #endif #endif @@ -501,7 +502,7 @@ diff --git a/chrome/browser/profiles/renderer_updater.h b/chrome/browser/profile diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -102,6 +102,7 @@ +@@ -99,6 +99,7 @@ #include "components/signin/public/base/signin_buildflags.h" #include "components/site_engagement/content/site_engagement_service.h" #include "components/supervised_user/core/common/buildflags.h" @@ -509,7 +510,7 @@ diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrom #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" #include "content/public/common/content_client.h" -@@ -533,6 +534,10 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, +@@ -528,6 +529,10 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, return &NewWebUI; if (url.host_piece() == chrome::kChromeUIVersionHost) return &NewWebUI; @@ -523,7 +524,7 @@ diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrom diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni --- a/chrome/chrome_paks.gni +++ b/chrome/chrome_paks.gni -@@ -122,6 +122,7 @@ template("chrome_extra_paks") { +@@ -121,6 +121,7 @@ template("chrome_extra_paks") { "$root_gen_dir/net/net_resources.pak", "$root_gen_dir/third_party/blink/public/resources/blink_resources.pak", "$root_gen_dir/third_party/blink/public/resources/inspector_overlay_resources.pak", @@ -531,7 +532,7 @@ diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni "$root_gen_dir/ui/resources/webui_resources.pak", ] deps = [ -@@ -139,6 +140,7 @@ template("chrome_extra_paks") { +@@ -138,6 +139,7 @@ template("chrome_extra_paks") { "//third_party/blink/public:devtools_inspector_resources", "//third_party/blink/public:resources", "//ui/resources", @@ -553,7 +554,7 @@ diff --git a/chrome/common/renderer_configuration.mojom b/chrome/common/renderer diff --git a/chrome/renderer/BUILD.gn b/chrome/renderer/BUILD.gn --- a/chrome/renderer/BUILD.gn +++ b/chrome/renderer/BUILD.gn -@@ -234,6 +234,12 @@ static_library("renderer") { +@@ -235,6 +235,12 @@ static_library("renderer") { "//v8", ] @@ -612,7 +613,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer #if BUILDFLAG(ENABLE_PPAPI) new PepperHelper(render_frame); #endif -@@ -1615,6 +1637,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentStart( +@@ -1613,6 +1635,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentStart( render_frame); // |render_frame| might be dead by now. #endif @@ -630,7 +631,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer } void ChromeContentRendererClient::RunScriptsAtDocumentEnd( -@@ -1624,6 +1657,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentEnd( +@@ -1622,6 +1655,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentEnd( render_frame); // |render_frame| might be dead by now. #endif @@ -648,7 +649,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer } void ChromeContentRendererClient::RunScriptsAtDocumentIdle( -@@ -1633,6 +1677,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentIdle( +@@ -1631,6 +1675,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentIdle( render_frame); // |render_frame| might be dead by now. #endif @@ -691,7 +692,7 @@ diff --git a/chrome/renderer/chrome_render_thread_observer.cc b/chrome/renderer/ diff --git a/components/components_strings.grd b/components/components_strings.grd --- a/components/components_strings.grd +++ b/components/components_strings.grd -@@ -337,6 +337,7 @@ +@@ -338,6 +338,7 @@ @@ -10468,15 +10469,15 @@ new file mode 100644 diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -966,6 +966,12 @@ - "components/autofill/core/browser/autofill_address_rewriter_resources.grd":{ - "includes": [7220] +@@ -969,6 +969,12 @@ + "components/search_engine_descriptions_strings.grd": { + "messages": [7260], }, + "components/user_scripts/renderer/resources/user_scripts_renderer_resources.grd": { -+ "includes": [7240], ++ "includes": [7280], + }, + "components/user_scripts/browser/resources/browser_resources.grd": { -+ "includes": [7260], ++ "includes": [7300], + }, # END components/ section. diff --git a/build/patches/Follow-only-system-dark-mode.patch b/build/patches/Follow-only-system-dark-mode.patch index 62fd4eab1..22c928892 100644 --- a/build/patches/Follow-only-system-dark-mode.patch +++ b/build/patches/Follow-only-system-dark-mode.patch @@ -12,14 +12,14 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/GlobalNightModeStateController.java b/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/GlobalNightModeStateController.java --- a/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/GlobalNightModeStateController.java +++ b/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/GlobalNightModeStateController.java -@@ -137,7 +137,7 @@ class GlobalNightModeStateController implements NightModeStateProvider, +@@ -139,7 +139,7 @@ class GlobalNightModeStateController } private void updateNightMode() { - boolean powerSaveModeOn = mPowerSaveModeMonitor.powerSavingIsOn(); + boolean powerSaveModeOn = false; final int theme = NightModeUtils.getThemeSetting(); - final boolean newNightModeOn = theme == ThemeType.SYSTEM_DEFAULT - && (powerSaveModeOn || mSystemNightModeMonitor.isSystemNightModeOn()) + final boolean newNightModeOn = + theme == ThemeType.SYSTEM_DEFAULT -- 2.25.1 diff --git a/build/patches/Guard-for-user-agent-reduction.patch b/build/patches/Guard-for-user-agent-reduction.patch index 72ccfdfce..0cb8a8174 100644 --- a/build/patches/Guard-for-user-agent-reduction.patch +++ b/build/patches/Guard-for-user-agent-reduction.patch @@ -12,7 +12,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc -@@ -1644,7 +1644,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs( +@@ -1613,7 +1613,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs( registry->RegisterIntegerPref( prefs::kUserAgentReduction, static_cast( @@ -54,7 +54,7 @@ diff --git a/content/common/user_agent.cc b/content/common/user_agent.cc diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -3179,23 +3179,23 @@ +@@ -3066,23 +3066,23 @@ // If enabled, the deviceModel will be reduced to "K" and the // androidVersion will be reduced to a static "10" string in android // User-Agent string. @@ -85,6 +85,6 @@ diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 + status: {"Android": "", "default": "stable"}, // in bromite }, { - name: "RegionCapture", + name: "ReferenceBoxNoPixelSnapping", -- 2.25.1 diff --git a/build/patches/Hardening-against-incognito-mode-detection.patch b/build/patches/Hardening-against-incognito-mode-detection.patch index 99619d614..4021ccc07 100644 --- a/build/patches/Hardening-against-incognito-mode-detection.patch +++ b/build/patches/Hardening-against-incognito-mode-detection.patch @@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/storage/browser/quota/quota_settings.cc b/storage/browser/quota/quota_settings.cc --- a/storage/browser/quota/quota_settings.cc +++ b/storage/browser/quota/quota_settings.cc -@@ -60,7 +60,7 @@ absl::optional CalculateNominalDynamicSettings( +@@ -60,7 +60,7 @@ std::optional CalculateNominalDynamicSettings( base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, base::BlockingType::MAY_BLOCK); diff --git a/build/patches/History-number-of-days-privacy-setting.patch b/build/patches/History-number-of-days-privacy-setting.patch index 65367d4eb..abc30540d 100644 --- a/build/patches/History-number-of-days-privacy-setting.patch +++ b/build/patches/History-number-of-days-privacy-setting.patch @@ -69,10 +69,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting +import java.util.ArrayList; +import java.util.List; + - /** - * Fragment to keep track of the all the privacy related preferences. - */ -@@ -101,6 +105,8 @@ public class PrivacySettings + /** Fragment to keep track of the all the privacy related preferences. */ + public class PrivacySettings extends ChromeBaseSettingsFragment + implements Preference.OnPreferenceChangeListener { +@@ -99,6 +103,8 @@ public class PrivacySettings extends ChromeBaseSettingsFragment private ChromeSwitchPreference allowCustomTabIntentsPref; private ChromeSwitchPreference openExternalLinksPref; @@ -81,7 +81,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting @Override public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { getActivity().setTitle(R.string.prefs_privacy_security); -@@ -207,6 +213,40 @@ public class PrivacySettings +@@ -223,6 +229,40 @@ public class PrivacySettings extends ChromeBaseSettingsFragment Preference syncAndServicesLink = findPreference(PREF_SYNC_AND_SERVICES_LINK); syncAndServicesLink.setSummary(buildSyncAndServicesLink()); @@ -122,7 +122,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting Preference thirdPartyCookies = findPreference(PREF_THIRD_PARTY_COOKIES); Preference doNotTrackPref = findPreference(PREF_DO_NOT_TRACK); -@@ -403,6 +443,29 @@ public class PrivacySettings +@@ -439,6 +479,29 @@ public class PrivacySettings extends ChromeBaseSettingsFragment || ChromeFeatureList.isEnabled(ChromeFeatureList.TRACKING_PROTECTION_3PCD); } @@ -164,15 +164,15 @@ diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.cc b/chro #include "components/language/core/browser/pref_names.h" #include "components/live_caption/pref_names.h" @@ -202,6 +203,9 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() { - (*s_allowlist)[::prefs::kShowHomeButton] = - settings_api::PrefType::PREF_TYPE_BOOLEAN; + #endif + (*s_allowlist)[::prefs::kShowHomeButton] = settings_api::PrefType::kBoolean; + (*s_allowlist)[::prefs::kExpireDaysThreshold] = + settings_api::PrefType::PREF_TYPE_NUMBER; + // Appearance settings. - (*s_allowlist)[::prefs::kCurrentThemeID] = - settings_api::PrefType::PREF_TYPE_STRING; + (*s_allowlist)[::prefs::kCurrentThemeID] = settings_api::PrefType::kString; + (*s_allowlist)[::prefs::kPolicyThemeColor] = settings_api::PrefType::kNumber; diff --git a/chrome/browser/history/history_service_factory.cc b/chrome/browser/history/history_service_factory.cc --- a/chrome/browser/history/history_service_factory.cc +++ b/chrome/browser/history/history_service_factory.cc @@ -199,10 +199,10 @@ diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/p diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/chrome/browser/resources/settings/privacy_page/privacy_page.html --- a/chrome/browser/resources/settings/privacy_page/privacy_page.html +++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html -@@ -124,6 +124,15 @@ - target="_blank" tabindex="-1" aria-disabled="true" - role="none"> - +@@ -94,6 +94,15 @@ + sub-label="$i18n{permissionsPageDescription}" + on-click="onPermissionsPageClick_" + role-description="$i18n{subpageArrowRoleDescription}"> +

+