From 9be5fc052b3cdbc6c360b12dc121fdf4689a286b Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Fri, 1 Dec 2023 16:24:35 +0100 Subject: [PATCH 01/19] v120 patches --- build/bromite_patches_list.txt | 19 +- ...Plus-add-blocking-in-service-workers.patch | 20 +- .../00Add-a-flag-to-disable-GamePad-API.patch | 4 +- .../patches/00Add-cromite-flags-support.patch | 388 +++--- .../00Add-option-to-disable-snapshots.patch | 28 +- .../00Add-setting-to-clear-data-on-exit.patch | 40 +- ...d-setting-to-invert-tap-and-long-tap.patch | 89 +- build/patches/00Add-support-to-jxl.patch | 34 +- ...PiP-if-PopupsAndRedirects-are-active.patch | 2 +- ...ays-open-browser-controls-in-new-tab.patch | 6 +- ...ORS-Preflight-Cache-on-clearing-data.patch | 4 +- build/patches/00Cromite-Branding.patch | 42 +- ...0Deprecate-Data-URL-in-SVGUseElement.patch | 4 +- .../patches/00Disable-Component-Updates.patch | 4 +- ...ble-Compression-Dictionary-Transport.patch | 2 +- build/patches/00Disable-FedCm.patch | 2 +- ...-FirstPartySets-and-StorageAccessAPI.patch | 2 +- build/patches/00Disable-GSA-by-default.patch | 14 +- ...0Disable-GetInstalledRelatedApps-API.patch | 2 +- build/patches/00Disable-Real-Box.patch | 6 +- build/patches/00Disable-WebGPU.patch | 4 +- ...devtools-remote-and-custom-protocols.patch | 8 +- ...ers-reduced-transparency-media-query.patch | 2 +- ...e-privacy-issues-in-password-manager.patch | 6 +- ...isable-speechSynthesis-getVoices-API.patch | 2 +- ...sallowing-MIDI-permission-by-default.patch | 2 +- ...ndroid-Dynamic-Performance-Framework.patch | 6 +- ...le-Document-Open-Inheritance-Removal.patch | 4 +- ...0Enable-ImprovedBookmarks-by-default.patch | 18 +- ...ct-the-entire-FrameTree-like-desktop.patch | 2 +- ...00Eyeo-Adblock-Remove-Privacy-Issues.patch | 38 +- build/patches/00Fix-chromium-build-bugs.patch | 397 +----- .../00Fonts-fingerprinting-mitigation.patch | 4 +- build/patches/00Internal-firewall.patch | 30 +- ...00Keep-Side-Panel-Companion-disabled.patch | 4 +- .../00Keep-disabled-FetchLaterAPI.patch | 15 +- .../patches/00Keyboard-protection-flag.patch | 2 +- ...ing-attributes-in-some-html-elements.patch | 16 +- .../00Partition-HSTS-cache-by-NAK.patch | 49 +- ...00Partition-MediaDeviceId-by-default.patch | 2 +- ...ning-all-cookies-by-top-frame-domain.patch | 38 +- .../00Remove-ChromiumNetworkAdapter.patch | 8 +- ...th-header-upon-cross-origin-redirect.patch | 6 +- ...0Remove-detection-of-captive-portals.patch | 2 +- .../00Restore-LastTabStandingTracker.patch | 14 +- ...-Add-a-log-to-track-strange-behavior.patch | 2 +- ...ileSystemAccessPersistentPermissions.patch | 39 +- ...Add-some-prefs-to-secure-preferences.patch | 2 +- .../00WIN-Disable-TabHoverCard-images.patch | 2 +- .../00WIN-Disable-search-for-image.patch | 2 +- build/patches/00WIN-Disable-sharing-hub.patch | 4 +- build/patches/00WIN-Disable-updater.patch | 39 +- ...able-Network-Service-Sandbox-and-CIG.patch | 2 +- build/patches/00WIN-enable-pdf-plugin.patch | 2 +- ...message-for-unsupported-hardware-aes.patch | 12 +- build/patches/00add-browser-policy.patch | 38 +- ...ot-block-build-incompatible-profiles.patch | 2 +- .../AImageReader-CFI-crash-mitigations.patch | 8 +- .../Add-AllowUserCertificates-flag.patch | 30 +- .../Add-IsCleartextPermitted-flag.patch | 4 +- .../Add-a-proxy-configuration-page.patch | 28 +- .../Add-an-always-incognito-mode.patch | 120 +- .../Add-bookmark-import-export-actions.patch | 162 +-- ...dd-custom-tab-intents-privacy-option.patch | 26 +- build/patches/Add-exit-menu-item.patch | 16 +- ...g-for-omnibox-autocomplete-filtering.patch | 6 +- ...nfigure-maximum-connections-per-host.patch | 4 +- .../Add-flag-to-disable-IPv6-probes.patch | 8 +- .../Add-flag-to-disable-vibration.patch | 8 +- ...-switch-for-unsupported-clangd-flags.patch | 12 +- ...Add-lifetime-options-for-permissions.patch | 173 ++- .../Add-menu-item-to-bookmark-all-tabs.patch | 127 +- .../Add-menu-item-to-view-source.patch | 8 +- .../Add-option-to-force-tablet-UI.patch | 30 +- ...-to-not-persist-tabs-across-sessions.patch | 16 +- .../Add-option-to-use-home-page-as-NTP.patch | 18 +- build/patches/Add-site-engagement-flag.patch | 4 +- ...-support-for-ISupportHelpAndFeedback.patch | 8 +- .../Add-support-for-writing-URIs.patch | 2 +- build/patches/Add-webGL-site-setting.patch | 10 +- ...ow-building-without-enable_reporting.patch | 22 +- ...ow-building-without-supervised-users.patch | 20 +- .../Allow-playing-audio-in-background.patch | 4 +- ...e-new-tab-page-for-default-home-page.patch | 6 +- ...Block-gateway-attacks-via-websockets.patch | 16 +- .../Block-qjz9zk-or-trk-requests.patch | 2 +- .../Bookmarks-select-all-menu-entry.patch | 16 +- build/patches/Bromite-auto-updater.patch | 38 +- .../Bromite-subresource-adblocker.patch | 59 +- build/patches/Client-hints-overrides.patch | 6 +- .../Content-settings-infrastructure.patch | 190 +-- ...ctionary-suggestions-for-the-Omnibox.patch | 8 +- ...ble-Accessibility-service-by-default.patch | 4 +- .../Disable-FLoC-and-privacy-sandbox.patch | 77 +- build/patches/Disable-PrivacyGuide.patch | 2 +- .../Disable-StartSurface-feature.patch | 4 +- build/patches/Disable-TLS-resumption.patch | 8 +- .../patches/Disable-all-predictors-code.patch | 351 ++--- build/patches/Disable-all-promo-dialogs.patch | 6 +- .../Disable-conversion-measurement-api.patch | 164 ++- build/patches/Disable-crash-reporting.patch | 2 +- .../Disable-feeds-support-by-default.patch | 44 +- ...Disable-fetching-of-all-field-trials.patch | 28 +- build/patches/Disable-idle-detection.patch | 4 +- ...-lock-icon-in-address-bar-by-default.patch | 2 +- ...media-router-and-remoting-by-default.patch | 10 +- .../patches/Disable-plugins-enumeration.patch | 2 +- ...e-references-to-fonts.googleapis.com.patch | 2 +- ...sts-for-single-word-Omnibar-searches.patch | 6 +- build/patches/Disable-safety-check.patch | 26 +- .../Disable-smart-selection-by-default.patch | 6 +- ...ble-support-for-RAR-files-inspection.patch | 2 +- .../Disable-text-fragments-by-default.patch | 6 +- .../Disable-third-party-origin-trials.patch | 34 +- build/patches/Disable-update-scheduler.patch | 2 +- build/patches/Disable-various-metrics.patch | 12 +- .../Do-not-build-API-keys-infobar.patch | 4 +- .../Do-not-compile-QR-code-sharing.patch | 6 +- .../patches/Do-not-link-with-libatomic.patch | 2 +- build/patches/DoH-improvements.patch | 2 +- .../Enable-Certificate-Transparency.patch | 8 +- ...ctOriginIsolation-and-SitePerProcess.patch | 4 +- ...e-darken-websites-checkbox-in-themes.patch | 6 +- ...fwrapv-in-Clang-for-non-UBSan-builds.patch | 2 +- .../Enable-native-Android-autofill.patch | 78 +- build/patches/Enable-share-intent.patch | 22 +- .../Experimental-user-scripts-support.patch | 48 +- .../Follow-only-system-dark-mode.patch | 2 +- .../Guard-for-user-agent-reduction.patch | 4 +- ...story-number-of-days-privacy-setting.patch | 18 +- ...e-enterprise-policies-for-secure-DNS.patch | 2 +- ...ripts-for-AMP-tracking-ads-and-video.patch | 14 +- build/patches/JIT-site-settings.patch | 2 +- ...-allow-screenshots-in-Incognito-mode.patch | 6 +- build/patches/Logcat-crash-reports-UI.patch | 10 +- .../patches/Modify-default-preferences.patch | 14 +- .../Move-navigation-bar-to-bottom.patch | 356 ++--- ...nt-settings-back-to-privacy-settings.patch | 16 +- .../Multiple-fingerprinting-mitigations.patch | 57 +- ...uiltin-autocomplete-for-chrome-flags.patch | 4 +- build/patches/OpenSearch-miscellaneous.patch | 2 +- .../patches/Override-Navigator-Language.patch | 4 +- .../Partition-Blink-memory-cache.patch | 16 +- ...e-introduce-override_build_timestamp.patch | 2 +- ...ders-in-DoH-requests-to-bare-minimum.patch | 24 +- ...referrals-in-cross-origin-navigation.patch | 28 +- build/patches/Remove-SMS-integration.patch | 14 +- .../Remove-binary-blob-integrations.patch | 1204 +++++++++-------- ...cklisted-URLs-upon-bookmark-creation.patch | 2 +- build/patches/Remove-help-menu-item.patch | 14 +- ...Remove-voice-recognition-integration.patch | 246 ++-- ...ndow-name-on-cross-origin-navigation.patch | 4 +- .../Restore-Search-Ready-Omnibox-flag.patch | 25 +- .../Restore-Simplified-NTP-launch.patch | 20 +- ...-button-in-top-toolbar-customization.patch | 14 +- .../Restore-offline-indicator-v2-flag.patch | 8 +- ...Delete-block-external-form-redirects.patch | 2 +- ...evert-Permit-blocking-of-view-source.patch | 6 +- ...emove-disable-pull-to-refresh-effect.patch | 4 +- ...l-of-execution-context-address-space.patch | 61 +- ...-Note-9-SDK27-crazylinker-workaround.patch | 4 +- ...tings-for-cookies-javascript-and-ads.patch | 10 +- build/patches/Site-setting-for-images.patch | 2 +- .../Switch-to-fstack-protector-strong.patch | 2 +- build/patches/Timezone-customization.patch | 22 +- .../Use-4-tile-rows-never-show-logo.patch | 6 +- build/patches/User-agent-customization.patch | 59 +- .../Viewport-Protection-Site-Setting.patch | 4 +- build/patches/Viewport-Protection-flag.patch | 36 +- build/patches/Welcome-screen.patch | 92 +- build/patches/autofill-miscellaneous.patch | 34 +- build/patches/bromite-build-utils.patch | 18 +- ...build-remove-calling-untrusted-hooks.patch | 14 +- ...IPv6-connectivity-probes-to-RIPE-DNS.patch | 2 +- .../enable-ftrivial-auto-var-init-zero.patch | 2 +- .../eyeo-beta-118.0.5993.48-android_api.patch | 22 +- ...-beta-118.0.5993.48-android_settings.patch | 6 +- .../eyeo-beta-118.0.5993.48-base.patch | 50 +- ...eta-118.0.5993.48-chrome_integration.patch | 100 +- ...yeo-beta-118.0.5993.48-extension_api.patch | 22 +- ...t_run-deactivate-autoupdate-globally.patch | 6 +- .../kill-Location-fall-back-to-system.patch | 2 +- build/patches/kill-Vision.patch | 12 +- ...hromium-Disable-Network-Time-Tracker.patch | 2 +- ...gled-chromium-Disable-profile-avatar.patch | 6 +- ...romium-Disable-translate-integration.patch | 22 +- ...chromium-Disable-webRTC-log-uploader.patch | 70 +- ...ed-chromium-no-special-hosts-domains.patch | 88 +- ...iew-Hard-no-to-persistent-histograms.patch | 2 +- 189 files changed, 3104 insertions(+), 3556 deletions(-) diff --git a/build/bromite_patches_list.txt b/build/bromite_patches_list.txt index a6c182f1f..541e3b544 100644 --- a/build/bromite_patches_list.txt +++ b/build/bromite_patches_list.txt @@ -1,11 +1,3 @@ -eyeo-beta-118.0.5993.48-base.patch -eyeo-beta-118.0.5993.48-chrome_integration.patch -eyeo-beta-118.0.5993.48-android_api.patch -eyeo-beta-118.0.5993.48-android_settings.patch -eyeo-beta-118.0.5993.48-extension_api.patch -00Eyeo-Adblock-Remove-Privacy-Issues.patch -00AdblockPlus-add-blocking-in-service-workers.patch - bromite-build-utils.patch Remove-EV-certificates.patch do-not-hide-.orig-files.patch @@ -285,8 +277,15 @@ Timezone-customization.patch 00Add-cromite-flags-support.patch 00Temp-PerformanceNavigationTiming-privacy-fix.patch - 00Temp-disable-predictive-back-gesture.patch 00TEMP-Add-a-log-to-track-strange-behavior.patch 00Temp-guard-FileSystemAccessPersistentPermissions.patch -00Fix-chromium-build-bugs.patch \ No newline at end of file +00Fix-chromium-build-bugs.patch + +eyeo-beta-118.0.5993.48-base.patch +eyeo-beta-118.0.5993.48-chrome_integration.patch +eyeo-beta-118.0.5993.48-android_api.patch +eyeo-beta-118.0.5993.48-android_settings.patch +eyeo-beta-118.0.5993.48-extension_api.patch +00Eyeo-Adblock-Remove-Privacy-Issues.patch +00AdblockPlus-add-blocking-in-service-workers.patch diff --git a/build/patches/00AdblockPlus-add-blocking-in-service-workers.patch b/build/patches/00AdblockPlus-add-blocking-in-service-workers.patch index d37667d5d..9207c3421 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 -@@ -6330,7 +6330,9 @@ ChromeContentBrowserClient:: +@@ -6328,7 +6328,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; -@@ -6351,9 +6353,11 @@ bool ChromeContentBrowserClient::WillInterceptWebSocket( +@@ -6349,9 +6351,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 -@@ -624,11 +624,15 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -630,11 +630,15 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { CreateURLLoaderHandlerForServiceWorkerNavigationPreload( int frame_tree_node_id, const network::ResourceRequest& resource_request) override; @@ -662,7 +662,7 @@ diff --git a/components/adblock/content/browser/resource_classification_runner_i diff --git a/content/browser/websockets/websocket_connector_impl.cc b/content/browser/websockets/websocket_connector_impl.cc --- a/content/browser/websockets/websocket_connector_impl.cc +++ b/content/browser/websockets/websocket_connector_impl.cc -@@ -87,14 +87,14 @@ void WebSocketConnectorImpl::Connect( +@@ -88,14 +88,14 @@ void WebSocketConnectorImpl::Connect( const uint32_t options = GetContentClient()->browser()->GetWebSocketOptions(frame); @@ -672,8 +672,8 @@ diff --git a/content/browser/websockets/websocket_connector_impl.cc b/content/br - frame, + process, frame, base::BindOnce(ConnectCalledByContentBrowserClient, requested_protocols, - site_for_cookies, isolation_info_, process_id_, - frame_id_, origin_, options, + site_for_cookies, has_storage_access, isolation_info_, + process_id_, frame_id_, origin_, options, std::move(throttling_profile_id)), - url, site_for_cookies, user_agent, std::move(handshake_client)); + url, origin_, site_for_cookies, user_agent, std::move(handshake_client)); @@ -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 -@@ -998,7 +998,7 @@ bool ContentBrowserClient::WillCreateURLLoaderFactory( +@@ -1016,7 +1016,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; } -@@ -1007,9 +1007,11 @@ uint32_t ContentBrowserClient::GetWebSocketOptions(RenderFrameHost* frame) { +@@ -1025,9 +1025,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 -@@ -1791,7 +1791,7 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1842,7 +1842,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); -@@ -1813,9 +1813,11 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1864,9 +1864,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 fe60f4289..6e944779c 100644 --- a/build/patches/00Add-a-flag-to-disable-GamePad-API.patch +++ b/build/patches/00Add-a-flag-to-disable-GamePad-API.patch @@ -14,7 +14,7 @@ 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 -@@ -7317,9 +7317,9 @@ +@@ -6879,9 +6879,9 @@ "expiry_milestone": 121 }, { @@ -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 -@@ -3017,7 +3017,7 @@ const char kReduceAcceptLanguageDescription[] = +@@ -2995,7 +2995,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 d79d24667..8eabe014d 100644 --- a/build/patches/00Add-cromite-flags-support.patch +++ b/build/patches/00Add-cromite-flags-support.patch @@ -28,11 +28,10 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html chrome/common/chrome_features.cc | 1 + .../content_settings/core/common/features.cc | 1 + components/flags_ui/flags_state.cc | 21 +++ + components/flags_ui/resources/app.html | 33 +++- + components/flags_ui/resources/app.ts | 37 ++++- components/flags_ui/resources/experiment.html | 7 +- components/flags_ui/resources/experiment.ts | 16 ++ - components/flags_ui/resources/flags.css | 19 +++ - components/flags_ui/resources/flags.html | 13 ++ - components/flags_ui/resources/flags.ts | 36 ++++- .../flags_ui/resources/flags_browser_proxy.ts | 5 + .../core/offline_page_feature.cc | 1 + .../offline_pages/core/offline_page_feature.h | 1 + @@ -71,7 +70,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html services/network/public/cpp/features.h | 1 + third_party/blink/common/features.cc | 1 + third_party/blink/public/common/features.h | 1 + - 57 files changed, 474 insertions(+), 12 deletions(-) + 56 files changed, 475 insertions(+), 13 deletions(-) create mode 100755 cromite_flags/BUILD.gn create mode 100755 cromite_flags/chrome/browser/about_flags_cc/placeholder.txt create mode 100755 cromite_flags/chrome/browser/browser_features_cc/placeholder.txt @@ -108,7 +107,7 @@ diff --git a/base/BUILD.gn b/base/BUILD.gn sources = [ "allocator/allocator_check.cc", "allocator/allocator_check.h", -@@ -1034,7 +1036,7 @@ component("base") { +@@ -1037,7 +1039,7 @@ component("base") { "//build/config/compiler:wglobal_constructors", ] @@ -357,7 +356,7 @@ diff --git a/chrome/android/java/res/values/values.xml b/chrome/android/java/res diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml --- a/chrome/android/java/res/xml/privacy_preferences.xml +++ b/chrome/android/java/res/xml/privacy_preferences.xml -@@ -99,6 +99,10 @@ found in the LICENSE file. +@@ -58,6 +58,10 @@ found in the LICENSE file. android:title="@string/tabgrid_use_icons_title" android:summary="@string/tabgrid_use_icons_summary" android:defaultValue="false" /> @@ -366,14 +365,14 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi + android:title="@string/cromite_flags_title" + app:url="@string/cromite_flags_url" /> kAuxiliarySearchMaxTabsCountParam( +@@ -231,6 +231,7 @@ constexpr base::FeatureParam kAuxiliarySearchMaxTabsCountParam( "auxiliary_search_max_donation_tab", 100); @@ -425,7 +424,7 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.h b/chrome/browser diff --git a/chrome/browser/ui/ui_features.cc b/chrome/browser/ui/ui_features.cc --- a/chrome/browser/ui/ui_features.cc +++ b/chrome/browser/ui/ui_features.cc -@@ -394,4 +394,5 @@ BASE_FEATURE(kStopLoadingAnimationForHiddenWindow, +@@ -383,4 +383,5 @@ BASE_FEATURE(kStopLoadingAnimationForHiddenWindow, "StopLoadingAnimationForHiddenWindow", base::FEATURE_ENABLED_BY_DEFAULT); @@ -434,7 +433,7 @@ diff --git a/chrome/browser/ui/ui_features.cc b/chrome/browser/ui/ui_features.cc diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc --- a/chrome/common/chrome_features.cc +++ b/chrome/common/chrome_features.cc -@@ -1664,4 +1664,5 @@ BASE_FEATURE(kSupportsRtcWakeOver24Hours, +@@ -1717,4 +1717,5 @@ BASE_FEATURE(kSupportsRtcWakeOver24Hours, base::FEATURE_ENABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_CHROMEOS_ASH) @@ -443,9 +442,9 @@ diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc diff --git a/components/content_settings/core/common/features.cc b/components/content_settings/core/common/features.cc --- a/components/content_settings/core/common/features.cc +++ b/components/content_settings/core/common/features.cc -@@ -82,5 +82,6 @@ BASE_FEATURE(kTrackingProtection3pcd, - "TrackingProtection3pcd", - base::FEATURE_DISABLED_BY_DEFAULT); +@@ -94,5 +94,6 @@ BASE_FEATURE(kTpcdHeuristicsGrants, + const base::FeatureParam kTpcdReadHeuristicsGrants{ + &kTpcdHeuristicsGrants, kTpcdReadHeuristicsGrantsName, false}; +#include "cromite_flags/components_content_settings_core_common_features_cc.inc" } // namespace features @@ -481,6 +480,165 @@ diff --git a/components/flags_ui/flags_state.cc b/components/flags_ui/flags_stat switch (entry.type) { case FeatureEntry::SINGLE_VALUE: case FeatureEntry::SINGLE_DISABLE_VALUE: +diff --git a/components/flags_ui/resources/app.html b/components/flags_ui/resources/app.html +--- a/components/flags_ui/resources/app.html ++++ b/components/flags_ui/resources/app.html +@@ -473,6 +473,24 @@ + padding-top: 1.5rem; + } + } ++ .cromite #header { ++ display: none; ++ } ++ .cromite .blurb-container { ++ display: none; ++ } ++ .cromite #tabs { ++ display: none; ++ } ++ .cromite #tab-content-available { ++ display: none; ++ } ++ .cromite #tab-content-unavailable { ++ display: none; ++ } ++ .cromite #tab-content-cromite { ++ display: block !important; ++ } + + +- +\ No newline at end of file ++ +diff --git a/components/flags_ui/resources/app.ts b/components/flags_ui/resources/app.ts +--- a/components/flags_ui/resources/app.ts ++++ b/components/flags_ui/resources/app.ts +@@ -204,6 +204,10 @@ export class FlagsAppElement extends CustomElement { + // + + tabs: Tab[] = [ ++ { ++ tabEl: this.getRequiredElement('#tab-cromite')!, ++ panelEl: this.getRequiredElement('#tab-content-cromite')!, ++ }, + { + tabEl: this.getRequiredElement('#tab-available'), + panelEl: this.getRequiredElement('#tab-content-available'), +@@ -217,6 +221,8 @@ export class FlagsAppElement extends CustomElement { + ]; + + connectedCallback() { ++ if (location.pathname == '/cromite') ++ document.body.classList.add('cromite'); + // Get and display the data upon loading. + this.requestExperimentalFeaturesData(); + // There is no restart button on iOS. +@@ -277,20 +283,29 @@ export class FlagsAppElement extends CustomElement { + const defaultFeatures: Feature[] = []; + const nonDefaultFeatures: Feature[] = []; + ++ if (document.body.classList.contains("cromite")) { ++ experimentalFeaturesData.supportedFeatures = ++ experimentalFeaturesData.supportedFeatures.filter(item => item.is_new); ++ } ++ experimentalFeaturesData.supportedFeatures.sort( ++ (a,b) => (a.internal_name.localeCompare(b.internal_name))); + experimentalFeaturesData.supportedFeatures.forEach( + f => (f.is_default ? defaultFeatures : nonDefaultFeatures).push(f)); + + this.renderExperiments( + nonDefaultFeatures, +- this.getRequiredElement('#non-default-experiments')); ++ this.getRequiredElement('#non-default-experiments'), ++ this.getRequiredElement('non-default-cromite-experiments'), false); + + this.renderExperiments( +- defaultFeatures, this.getRequiredElement('#default-experiments')); ++ defaultFeatures, this.getRequiredElement('#default-experiments'), ++ this.getRequiredElement('cromite-experiments'), false); + + // + this.renderExperiments( + experimentalFeaturesData.unsupportedFeatures, +- this.getRequiredElement('#unavailable-experiments'), true); ++ this.getRequiredElement('#unavailable-experiments'), ++ undefined, true); + // + + this.showRestartToast(experimentalFeaturesData.needsRestart); +@@ -401,16 +416,23 @@ export class FlagsAppElement extends CustomElement { + } + + private renderExperiments( +- features: Feature[], container: HTMLElement, unsupported = false) { ++ features: Feature[], container: HTMLElement, ++ cromiteContainer: HTMLElement | undefined, unsupported: boolean = false) { + const fragment = document.createDocumentFragment(); ++ const fragmentCromite = document.createDocumentFragment(); ++ const show_permalink = !document.body.classList.contains('cromite'); + for (const feature of features) { + const experiment = document.createElement('flags-experiment'); + + experiment.toggleAttribute('unsupported', unsupported); ++ experiment.permalink = show_permalink; + experiment.data = feature; + experiment.id = feature.internal_name; + + const select = experiment.getSelect(); ++ // if (select && feature.is_cromite && !feature.is_new) { ++ // select.disabled = true; ++ // } + if (select) { + experiment.addEventListener('select-change', e => { + e.preventDefault(); +@@ -434,9 +456,14 @@ export class FlagsAppElement extends CustomElement { + this.showRestartToast(true); + }); + } +- fragment.appendChild(experiment); ++ if (feature.is_cromite) ++ fragmentCromite.appendChild(experiment); ++ else ++ fragment.appendChild(experiment); + } + container.replaceChildren(fragment); ++ if (!!cromiteContainer) ++ cromiteContainer.replaceChildren(fragmentCromite); + } + + /** diff --git a/components/flags_ui/resources/experiment.html b/components/flags_ui/resources/experiment.html --- a/components/flags_ui/resources/experiment.html +++ b/components/flags_ui/resources/experiment.html @@ -570,156 +728,6 @@ diff --git a/components/flags_ui/resources/experiment.ts b/components/flags_ui/r experimentSelect.appendChild(optionEl); } -diff --git a/components/flags_ui/resources/flags.css b/components/flags_ui/resources/flags.css ---- a/components/flags_ui/resources/flags.css -+++ b/components/flags_ui/resources/flags.css -@@ -468,3 +468,22 @@ button.primary:-webkit-any(:active, :hover) { - padding-top: 1.5rem; - } - } -+ -+.cromite #header { -+ display: none; -+} -+.cromite .blurb-container { -+ display: none; -+} -+.cromite #tabs { -+ display: none; -+} -+.cromite #tab-content-available { -+ display: none; -+} -+.cromite #tab-content-unavailable { -+ display: none; -+} -+.cromite #tab-content-cromite { -+ display: block !important; -+} -diff --git a/components/flags_ui/resources/flags.html b/components/flags_ui/resources/flags.html ---- a/components/flags_ui/resources/flags.html -+++ b/components/flags_ui/resources/flags.html -@@ -92,6 +92,11 @@ - aria-selected="false" aria-controls="panel2" - tabindex="-1">$i18n{unavailable} - -+ Cromite - -
-
-
- -+
-+ -+
-+ -+
-+ -+
-
-
-
-diff --git a/components/flags_ui/resources/flags.ts b/components/flags_ui/resources/flags.ts ---- a/components/flags_ui/resources/flags.ts -+++ b/components/flags_ui/resources/flags.ts -@@ -39,6 +39,10 @@ interface Tab { - } - - const tabs: Tab[] = [ -+ { -+ tabEl: document.body.querySelector('#tab-cromite')!, -+ panelEl: document.body.querySelector('#tab-content-cromite')!, -+ }, - { - tabEl: document.body.querySelector('#tab-available')!, - panelEl: document.body.querySelector('#tab-content-available')!, -@@ -84,18 +88,27 @@ function render(experimentalFeaturesData: ExperimentalFeaturesData) { - const defaultFeatures: Feature[] = []; - const nonDefaultFeatures: Feature[] = []; - -+ if (document.body.classList.contains("cromite")) { -+ experimentalFeaturesData.supportedFeatures = -+ experimentalFeaturesData.supportedFeatures.filter(item => item.is_new); -+ } -+ experimentalFeaturesData.supportedFeatures.sort( -+ (a,b) => (a.internal_name.localeCompare(b.internal_name))); - experimentalFeaturesData.supportedFeatures.forEach( - f => (f.is_default ? defaultFeatures : nonDefaultFeatures).push(f)); - - renderExperiments( -- nonDefaultFeatures, getRequiredElement('non-default-experiments')); -+ nonDefaultFeatures, getRequiredElement('non-default-experiments'), -+ getRequiredElement('non-default-cromite-experiments'), false); - -- renderExperiments(defaultFeatures, getRequiredElement('default-experiments')); -+ renderExperiments(defaultFeatures, getRequiredElement('default-experiments'), -+ getRequiredElement('cromite-experiments'), false); - - // - renderExperiments( - experimentalFeaturesData.unsupportedFeatures, -- getRequiredElement('unavailable-experiments'), true); -+ getRequiredElement('unavailable-experiments'), -+ undefined, true); - // - - showRestartToast(experimentalFeaturesData.needsRestart); -@@ -248,16 +261,22 @@ function resetAllFlags() { - } - - function renderExperiments( -- features: Feature[], container: HTMLElement, unsupported = false) { -+ features: Feature[], container: HTMLElement, cromiteContainer: HTMLElement | undefined, unsupported: boolean) { - const fragment = document.createDocumentFragment(); -+ const fragmentCromite = document.createDocumentFragment(); -+ const show_permalink = !document.body.classList.contains('cromite'); - for (const feature of features) { - const experiment = document.createElement('flags-experiment'); - - experiment.toggleAttribute('unsupported', unsupported); -+ experiment.permalink = show_permalink; - experiment.data = feature; - experiment.id = feature.internal_name; - - const select = experiment.getSelect(); -+ // if (select && feature.is_cromite && !feature.is_new) { -+ // select.disabled = true; -+ // } - if (select) { - experiment.addEventListener('select-change', () => { - showRestartToast(true); -@@ -281,9 +300,14 @@ function renderExperiments( - return false; - }); - } -- fragment.appendChild(experiment); -+ if (feature.is_cromite) -+ fragmentCromite.appendChild(experiment); -+ else -+ fragment.appendChild(experiment); - } - container.replaceChildren(fragment); -+ if (!!cromiteContainer) -+ cromiteContainer.replaceChildren(fragmentCromite); - } - - /** -@@ -507,6 +531,8 @@ function setupRestartButton() { - // - - document.addEventListener('DOMContentLoaded', function() { -+ if (location.pathname == '/cromite') -+ document.body.classList.add('cromite'); - // Get and display the data upon loading. - requestExperimentalFeaturesData(); - // There is no restart button on iOS. diff --git a/components/flags_ui/resources/flags_browser_proxy.ts b/components/flags_ui/resources/flags_browser_proxy.ts --- a/components/flags_ui/resources/flags_browser_proxy.ts +++ b/components/flags_ui/resources/flags_browser_proxy.ts @@ -758,7 +766,7 @@ diff --git a/components/offline_pages/core/offline_page_feature.h b/components/o diff --git a/components/permissions/features.cc b/components/permissions/features.cc --- a/components/permissions/features.cc +++ b/components/permissions/features.cc -@@ -171,6 +171,7 @@ BASE_FEATURE(kBlockMidiByDefault, +@@ -159,6 +159,7 @@ BASE_FEATURE(kBlockMidiByDefault, "BlockMidiByDefault", base::FEATURE_ENABLED_BY_DEFAULT); @@ -769,7 +777,7 @@ diff --git a/components/permissions/features.cc b/components/permissions/feature diff --git a/content/common/features.cc b/content/common/features.cc --- a/content/common/features.cc +++ b/content/common/features.cc -@@ -529,4 +529,5 @@ BASE_FEATURE(kWindowOpenFileSelectFix, +@@ -571,4 +571,5 @@ BASE_FEATURE(kWindowOpenFileSelectFix, // Please keep features in alphabetical order. @@ -778,7 +786,7 @@ diff --git a/content/common/features.cc b/content/common/features.cc diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc --- a/content/public/common/content_features.cc +++ b/content/public/common/content_features.cc -@@ -1321,4 +1321,5 @@ bool IsVideoCaptureServiceEnabledForBrowserProcess() { +@@ -1361,4 +1361,5 @@ bool IsVideoCaptureServiceEnabledForBrowserProcess() { VideoCaptureServiceConfiguration::kEnabledForBrowserProcess; } @@ -787,7 +795,7 @@ diff --git a/content/public/common/content_features.cc b/content/public/common/c diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h --- a/content/public/common/content_features.h +++ b/content/public/common/content_features.h -@@ -327,6 +327,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebRtcPipeWireCapturer); +@@ -335,6 +335,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebRtcPipeWireCapturer); CONTENT_EXPORT bool IsVideoCaptureServiceEnabledForOutOfProcess(); CONTENT_EXPORT bool IsVideoCaptureServiceEnabledForBrowserProcess(); @@ -1085,7 +1093,7 @@ new file mode 100755 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 -@@ -1743,5 +1743,5 @@ uint32_t GetPassthroughAudioFormats() { +@@ -1750,5 +1750,5 @@ uint32_t GetPassthroughAudioFormats() { return 0; #endif // BUILDFLAG(ENABLE_PASSTHROUGH_AUDIO_CODECS) } @@ -1095,7 +1103,7 @@ diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc diff --git a/media/base/media_switches.h b/media/base/media_switches.h --- a/media/base/media_switches.h +++ b/media/base/media_switches.h -@@ -505,5 +505,5 @@ MEDIA_EXPORT bool IsOutOfProcessVideoDecodingEnabled(); +@@ -517,5 +517,5 @@ MEDIA_EXPORT bool IsOutOfProcessVideoDecodingEnabled(); MEDIA_EXPORT uint32_t GetPassthroughAudioFormats(); } // namespace media @@ -1105,18 +1113,18 @@ diff --git a/media/base/media_switches.h b/media/base/media_switches.h diff --git a/net/base/features.cc b/net/base/features.cc --- a/net/base/features.cc +++ b/net/base/features.cc -@@ -469,4 +469,5 @@ BASE_FEATURE(kSpdyHeadersToHttpResponseVerifyCorrectness, - "SpdyHeadersToHttpResponseVerifyCorrectness", - base::FEATURE_DISABLED_BY_DEFAULT); +@@ -477,4 +477,5 @@ BASE_FEATURE(kNewCertPathBuilderIterationLimit, + "NewCertPathBuilderIterationLimit", + base::FEATURE_ENABLED_BY_DEFAULT); +#include "cromite_flags/net_base_features_cc.inc" } // namespace net::features diff --git a/net/base/features.h b/net/base/features.h --- a/net/base/features.h +++ b/net/base/features.h -@@ -467,6 +467,7 @@ NET_EXPORT BASE_DECLARE_FEATURE(kSpdyHeadersToHttpResponseUseBuilder); - // for two weeks on Dev. - NET_EXPORT BASE_DECLARE_FEATURE(kSpdyHeadersToHttpResponseVerifyCorrectness); +@@ -470,6 +470,7 @@ NET_EXPORT BASE_DECLARE_FEATURE(kReceiveEcn); + + NET_EXPORT BASE_DECLARE_FEATURE(kNewCertPathBuilderIterationLimit); +#include "cromite_flags/net_base_features_h.inc" } // namespace net::features @@ -1125,18 +1133,18 @@ diff --git a/net/base/features.h b/net/base/features.h diff --git a/services/network/public/cpp/features.cc b/services/network/public/cpp/features.cc --- a/services/network/public/cpp/features.cc +++ b/services/network/public/cpp/features.cc -@@ -422,4 +422,5 @@ BASE_FEATURE(kVisibilityAwareResourceScheduler, - - BASE_FEATURE(kSharedZstd, "SharedZstd", base::FEATURE_ENABLED_BY_DEFAULT); +@@ -431,4 +431,5 @@ const base::FeatureParam kSkipTpcdMitigationsForAdsSupport{ + &kSkipTpcdMitigationsForAds, /*name=*/"SkipTpcdMitigationsForAdsSupport", + /*default_value=*/false}; +#include "cromite_flags/services_network_public_cpp_features_cc.inc" } // namespace network::features diff --git a/services/network/public/cpp/features.h b/services/network/public/cpp/features.h --- a/services/network/public/cpp/features.h +++ b/services/network/public/cpp/features.h -@@ -158,6 +158,7 @@ BASE_DECLARE_FEATURE(kVisibilityAwareResourceScheduler); +@@ -168,6 +168,7 @@ extern const base::FeatureParam kSkipTpcdMitigationsForAdsMetadata; COMPONENT_EXPORT(NETWORK_CPP) - BASE_DECLARE_FEATURE(kSharedZstd); + extern const base::FeatureParam kSkipTpcdMitigationsForAdsSupport; +#include "cromite_flags/services_network_public_cpp_features_h.inc" } // namespace features @@ -1145,7 +1153,7 @@ diff --git a/services/network/public/cpp/features.h b/services/network/public/cp diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc --- a/third_party/blink/common/features.cc +++ b/third_party/blink/common/features.cc -@@ -2168,5 +2168,6 @@ bool IsKeepAliveURLLoaderServiceEnabled() { +@@ -2218,5 +2218,6 @@ bool IsKeepAliveURLLoaderServiceEnabled() { base::FeatureList::IsEnabled(kFetchLaterAPI); } @@ -1155,7 +1163,7 @@ diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/fea diff --git a/third_party/blink/public/common/features.h b/third_party/blink/public/common/features.h --- a/third_party/blink/public/common/features.h +++ b/third_party/blink/public/common/features.h -@@ -1388,6 +1388,7 @@ BLINK_COMMON_EXPORT bool IsKeepAliveURLLoaderServiceEnabled(); +@@ -1424,6 +1424,7 @@ BLINK_COMMON_EXPORT bool IsKeepAliveURLLoaderServiceEnabled(); BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE( kRemoveAuthroizationOnCrossOriginRedirect); diff --git a/build/patches/00Add-option-to-disable-snapshots.patch b/build/patches/00Add-option-to-disable-snapshots.patch index 160eaa60f..8650fd90a 100644 --- a/build/patches/00Add-option-to-disable-snapshots.patch +++ b/build/patches/00Add-option-to-disable-snapshots.patch @@ -16,7 +16,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridViewBinder.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridViewBinder.java --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridViewBinder.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridViewBinder.java -@@ -288,8 +288,12 @@ class TabGridViewBinder { +@@ -287,8 +287,12 @@ class TabGridViewBinder { // Adjust bitmap to thumbnail. TabUtils.setBitmapAndUpdateImageMatrix(thumbnail, result, thumbnailSize); } else if (isMostRecentRequest) { @@ -31,7 +31,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser } }; if (sThumbnailFetcherForTesting != null) { -@@ -325,6 +329,7 @@ class TabGridViewBinder { +@@ -324,6 +328,7 @@ class TabGridViewBinder { */ private static void setFavicon(ViewLookupCachingFrameLayout rootView, PropertyModel model, TabListFaviconProvider.TabFavicon favicon) { @@ -67,7 +67,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml --- a/chrome/android/java/res/xml/privacy_preferences.xml +++ b/chrome/android/java/res/xml/privacy_preferences.xml -@@ -94,6 +94,11 @@ found in the LICENSE file. +@@ -53,6 +53,11 @@ found in the LICENSE file. android:title="@string/open_external_links_incognito_title" android:summary="@string/open_external_links_incognito_summary" android:defaultValue="false" /> @@ -77,20 +77,20 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi + android:summary="@string/tabgrid_use_icons_summary" + android:defaultValue="false" /> +@@ -663,7 +664,7 @@ public abstract class ChromeActivity TabModelSelector tabModelSelector = mTabModelOrchestrator.getTabModelSelector(); setTabContentManager(new TabContentManager(this, mBrowserControlsManagerSupplier.get(), @@ -102,7 +102,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/content/TabContentManager.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/content/TabContentManager.java --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/content/TabContentManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/content/TabContentManager.java -@@ -344,9 +344,12 @@ public class TabContentManager { +@@ -345,9 +345,12 @@ public class TabContentManager { * @param forceUpdate Whether to obtain the thumbnail from the live content. * @param writeBack When {@code forceUpdate}, whether to write the thumbnail to cache. */ @@ -149,7 +149,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting private static final String PREF_CAN_MAKE_PAYMENT = "can_make_payment"; private static final String PREF_PRELOAD_PAGES = "preload_pages"; private static final String PREF_HTTPS_FIRST_MODE = "https_first_mode"; -@@ -139,6 +152,21 @@ public class PrivacySettings +@@ -135,6 +148,21 @@ public class PrivacySettings } } @@ -171,7 +171,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting Preference privacyGuidePreference = findPreference(PREF_PRIVACY_GUIDE); // Record the launch of PG from the S&P link-row entry point privacyGuidePreference.setOnPreferenceClickListener(preference -> { -@@ -294,6 +322,7 @@ public class PrivacySettings +@@ -292,6 +320,7 @@ public class PrivacySettings public static final String PREF_ALLOW_CUSTOM_TAB_INTENTS = "allow_custom_tab_intents"; public static final String PREF_OPEN_EXTERNAL_LINKS_INCOGNITO = "open_external_links_incognito"; @@ -179,7 +179,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting @Override public boolean onPreferenceChange(Preference preference, Object newValue) { -@@ -319,6 +348,13 @@ public class PrivacySettings +@@ -317,6 +346,13 @@ public class PrivacySettings SharedPreferences.Editor sharedPreferencesEditor = ContextUtils.getAppSharedPreferences().edit(); sharedPreferencesEditor.putBoolean(PREF_OPEN_EXTERNAL_LINKS_INCOGNITO, (boolean)newValue); sharedPreferencesEditor.apply(); @@ -193,7 +193,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting } return true; } -@@ -361,6 +397,10 @@ public class PrivacySettings +@@ -359,6 +395,10 @@ public class PrivacySettings : R.string.text_off); } @@ -207,7 +207,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting 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 -@@ -5463,6 +5463,14 @@ To change this setting, <resetlink>reset sync

<resetlink>reset sync

%1$swww.amazon.com timer ran out. It'll start again tomorrow. diff --git a/build/patches/00Add-setting-to-clear-data-on-exit.patch b/build/patches/00Add-setting-to-clear-data-on-exit.patch index 4396555bb..64be0c405 100644 --- a/build/patches/00Add-setting-to-clear-data-on-exit.patch +++ b/build/patches/00Add-setting-to-clear-data-on-exit.patch @@ -35,7 +35,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html 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 -@@ -303,6 +303,7 @@ chrome_java_sources = [ +@@ -301,6 +301,7 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragmentAdvanced.java", "java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragmentBasic.java", "java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataTabsFragment.java", @@ -46,7 +46,7 @@ diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java 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 -@@ -146,6 +146,7 @@ import org.chromium.chrome.browser.profiles.ProfileManager; +@@ -150,6 +150,7 @@ import org.chromium.chrome.browser.profiles.ProfileManager; import org.chromium.chrome.browser.quick_delete.QuickDeleteController; import org.chromium.chrome.browser.quick_delete.QuickDeleteDelegateImpl; import org.chromium.chrome.browser.quick_delete.QuickDeleteMetricsDelegate; @@ -54,7 +54,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct import org.chromium.chrome.browser.read_later.ReadingListBackPressHandler; import org.chromium.chrome.browser.read_later.ReadingListUtils; import org.chromium.chrome.browser.reengagement.ReengagementNotificationController; -@@ -1307,7 +1308,11 @@ public class ChromeTabbedActivity extends ChromeActivity Clear browsing data @@ -276,12 +276,12 @@ diff --git a/chrome/browser/browsing_data/chrome_browsing_data_lifetime_manager. const syncer::UserSelectableTypeSet sync_types) { + if ((true)) return true; bool sync_disabled = !SyncServiceFactory::IsSyncAllowed(profile_); - // Return the state of sync if - // `features::kDataRetentionPoliciesDisableSyncTypesNeeded` is disabled or if + // Condition is satisfied if sync is fully disabled by policy. + if (sync_disabled) { diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc --- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc +++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc -@@ -427,6 +427,9 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( +@@ -426,6 +426,9 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( delete_end_, CreateTaskCompletionClosure(TracingDataType::kHistory), &history_task_tracker_); } @@ -291,7 +291,7 @@ diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate. if (ClipboardRecentContent::GetInstance()) ClipboardRecentContent::GetInstance()->SuppressClipboardContent(); -@@ -477,7 +480,9 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( +@@ -476,7 +479,9 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( prerender::NoStatePrefetchManager::CLEAR_PRERENDER_CONTENTS | prerender::NoStatePrefetchManager::CLEAR_PRERENDER_HISTORY); } @@ -301,7 +301,7 @@ diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate. // The saved Autofill profiles and credit cards can include the origin from // which these profiles and credit cards were learned. These are a form of // history, so clear them as well. -@@ -498,7 +503,9 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( +@@ -497,7 +502,9 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( if (data_manager) data_manager->Refresh(); } @@ -311,7 +311,7 @@ diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate. base::ThreadPool::PostTaskAndReply( FROM_HERE, {base::TaskPriority::USER_VISIBLE, base::MayBlock()}, base::BindOnce( -@@ -573,9 +580,13 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( +@@ -572,9 +579,13 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( } device_event_log::Clear(delete_begin_, delete_end_); @@ -328,7 +328,7 @@ diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate. diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.cc b/chrome/browser/extensions/api/settings_private/prefs_util.cc --- a/chrome/browser/extensions/api/settings_private/prefs_util.cc +++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -517,6 +517,23 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() { +@@ -504,6 +504,23 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() { (*s_allowlist)[browsing_data::prefs::kLastClearBrowsingDataTab] = settings_api::PrefType::PREF_TYPE_NUMBER; @@ -355,7 +355,7 @@ diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.cc b/chro diff --git a/chrome/browser/profiles/android/java/src/org/chromium/chrome/browser/profiles/ProfileManagerUtils.java b/chrome/browser/profiles/android/java/src/org/chromium/chrome/browser/profiles/ProfileManagerUtils.java --- a/chrome/browser/profiles/android/java/src/org/chromium/chrome/browser/profiles/ProfileManagerUtils.java +++ b/chrome/browser/profiles/android/java/src/org/chromium/chrome/browser/profiles/ProfileManagerUtils.java -@@ -52,9 +52,14 @@ public class ProfileManagerUtils { +@@ -54,9 +54,14 @@ public class ProfileManagerUtils { } } @@ -385,7 +385,7 @@ diff --git a/chrome/browser/profiles/android/profile_manager_utils.cc b/chrome/b 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 -@@ -1492,6 +1492,19 @@ void ProfileManager::DoFinalInit(ProfileInfo* profile_info, +@@ -1491,6 +1491,19 @@ void ProfileManager::DoFinalInit(ProfileInfo* profile_info, } } @@ -408,7 +408,7 @@ diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profile diff --git a/chrome/browser/profiles/profile_manager.h b/chrome/browser/profiles/profile_manager.h --- a/chrome/browser/profiles/profile_manager.h +++ b/chrome/browser/profiles/profile_manager.h -@@ -202,6 +202,8 @@ class ProfileManager : public Profile::Delegate { +@@ -199,6 +199,8 @@ class ProfileManager : public Profile::Delegate { // profiles. std::vector GetLoadedProfiles() const; @@ -420,7 +420,7 @@ diff --git a/chrome/browser/profiles/profile_manager.h b/chrome/browser/profiles diff --git a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.html b/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.html --- a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.html +++ b/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.html -@@ -284,6 +284,50 @@ +@@ -304,6 +304,50 @@ disabled="[[clearingInProgress_]]" no-set-pref>

@@ -474,7 +474,7 @@ diff --git a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_ diff --git a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.ts b/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.ts --- a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.ts +++ b/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.ts -@@ -194,6 +194,7 @@ export class SettingsClearBrowsingDataDialogElement extends +@@ -222,6 +222,7 @@ export class SettingsClearBrowsingDataDialogElement extends value: () => [loadTimeData.getString('basicPageTitle'), loadTimeData.getString('advancedPageTitle'), @@ -485,7 +485,7 @@ diff --git a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_ 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 -@@ -1635,6 +1635,9 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1526,6 +1526,9 @@ Your Google account may have other forms of browsing history like searches and a Basic @@ -498,7 +498,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro 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 -@@ -1584,6 +1584,7 @@ void AddPrivacyStrings(content::WebUIDataSource* html_source, +@@ -1604,6 +1604,7 @@ void AddPrivacyStrings(content::WebUIDataSource* html_source, {"clearedData", IDS_SETTINGS_CLEARED_DATA}, {"clearBrowsingData", IDS_SETTINGS_CLEAR_BROWSING_DATA}, {"clearBrowsingDataDescription", IDS_SETTINGS_CLEAR_DATA_DESCRIPTION}, @@ -638,7 +638,7 @@ diff --git a/components/browsing_data/core/pref_names.cc b/components/browsing_d // Clear browsing data deletion time period. const char kDeleteTimePeriod[] = "browser.clear_data.time_period"; const char kDeleteTimePeriodBasic[] = "browser.clear_data.time_period_basic"; -@@ -85,6 +95,23 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { +@@ -97,6 +107,23 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { registry->RegisterIntegerPref( kClearBrowsingDataHistoryNoticeShownTimes, 0); @@ -684,7 +684,7 @@ diff --git a/components/browsing_data/core/pref_names.h b/components/browsing_da 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 -@@ -1542,6 +1542,7 @@ void StoragePartitionImpl::Initialize( +@@ -1569,6 +1569,7 @@ void StoragePartitionImpl::Initialize( .AppendASCII("Code Cache"); } DCHECK_GE(settings.size_in_bytes(), 0); diff --git a/build/patches/00Add-setting-to-invert-tap-and-long-tap.patch b/build/patches/00Add-setting-to-invert-tap-and-long-tap.patch index f0b3182e1..1b41e76a2 100644 --- a/build/patches/00Add-setting-to-invert-tap-and-long-tap.patch +++ b/build/patches/00Add-setting-to-invert-tap-and-long-tap.patch @@ -23,13 +23,13 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html ...Add-setting-to-invert-tap-and-long-tap.inc | 8 +++++ ...Add-setting-to-invert-tap-and-long-tap.inc | 3 ++ ...Add-setting-to-invert-tap-and-long-tap.inc | 1 + - .../renderer/core/html/html_anchor_element.cc | 35 +++++++++++++++---- + .../renderer/core/html/html_anchor_element.cc | 36 +++++++++++++++---- .../renderer/core/html/html_anchor_element.h | 9 +++-- .../renderer/core/html/html_image_element.cc | 17 +++++++++ .../renderer/core/html/html_image_element.h | 2 ++ .../core/page/context_menu_controller.cc | 32 ++++++++++++----- .../core/page/context_menu_controller.h | 5 +-- - 21 files changed, 164 insertions(+), 20 deletions(-) + 21 files changed, 164 insertions(+), 21 deletions(-) create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Add-setting-to-invert-tap-and-long-tap.inc create mode 100644 cromite_flags/third_party/blink/common/features_cc/Add-setting-to-invert-tap-and-long-tap.inc create mode 100644 cromite_flags/third_party/blink/common/features_h/Add-setting-to-invert-tap-and-long-tap.inc @@ -76,7 +76,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuItem.java b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuItem.java --- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuItem.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuItem.java -@@ -88,8 +88,9 @@ class ChromeContextMenuItem { +@@ -87,8 +87,9 @@ class ChromeContextMenuItem { int SHARE_HIGHLIGHT = 32; int REMOVE_HIGHLIGHT = 33; int LEARN_MORE = 34; @@ -87,18 +87,18 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/Chr } /** -@@ -131,6 +132,7 @@ class ChromeContextMenuItem { +@@ -130,6 +131,7 @@ class ChromeContextMenuItem { R.id.contextmenu_share_highlight, // Item.SHARE_HIGHLIGHT R.id.contextmenu_remove_highlight, // Item.REMOVE_HIGHLIGHT R.id.contextmenu_learn_more, // Item.LEARN_MORE + R.id.contextmenu_open_in_tab, // Item.OPEN_IN_NEW_CHROME_TAB }; - /** -@@ -172,6 +174,7 @@ class ChromeContextMenuItem { - R.string.contextmenu_share_highlight, // Item.SHARE_HIGHLIGHT - R.string.contextmenu_remove_highlight, // Item.REMOVE_HIGHLIGHT - R.string.contextmenu_learn_more, // Item.LEARN_MORE + /** Mapping from {@link Item} to the ID of the string that describes the action of the item. */ +@@ -169,6 +171,7 @@ class ChromeContextMenuItem { + R.string.contextmenu_share_highlight, // Item.SHARE_HIGHLIGHT + R.string.contextmenu_remove_highlight, // Item.REMOVE_HIGHLIGHT + R.string.contextmenu_learn_more, // Item.LEARN_MORE + R.string.contextmenu_open_in_tab, // Item.OPEN_IN_NEW_CHROME_TAB: }; @@ -106,7 +106,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/Chr diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java -@@ -239,6 +239,9 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { +@@ -241,6 +241,9 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { if (mParams.isAnchor()) { ModelList linkGroup = new ModelList(); @@ -116,7 +116,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/Chr if (FirstRunStatus.getFirstRunFlowComplete() && !isEmptyUrl(mParams.getUrl()) && UrlUtilities.isAcceptedScheme(mParams.getUrl())) { if (mMode == ContextMenuMode.NORMAL) { -@@ -588,6 +591,8 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { +@@ -593,6 +596,8 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { ShareHelper.shareDirectly( params, ShareHelper.getLastShareComponentName(), getProfile(), false); }); @@ -128,7 +128,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/Chr 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 -@@ -247,6 +247,14 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate { +@@ -251,6 +251,14 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate { mTab.loadUrl(loadUrlParams); } @@ -165,7 +165,7 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse + &blink::features::kShowAlwaysContextMenuOnLinks, &kTabStripRedesign, &kTabletToolbarReordering, - &kTabStripStartupRefactoring, + &kTabStateFlatBuffer, 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 @@ -178,7 +178,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f public static final String NOTIFICATION_PERMISSION_VARIANT = "NotificationPermissionVariant"; public static final String NOTIFICATION_PERMISSION_BOTTOM_SHEET = "NotificationPermissionBottomSheet"; -@@ -600,6 +602,8 @@ public abstract class ChromeFeatureList { +@@ -615,6 +617,8 @@ public abstract class ChromeFeatureList { new CachedFlag(OMNIBOX_MATCH_TOOLBAR_AND_STATUS_BAR_COLOR, false); public static final CachedFlag sMoveTopToolbarToBottom = new CachedFlag(MOVE_TOP_TOOLBAR_TO_BOTTOM, false); @@ -187,18 +187,18 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f public static final CachedFlag sOmniboxModernizeVisualUpdate = new CachedFlag(OMNIBOX_MODERNIZE_VISUAL_UPDATE, true); public static final CachedFlag sOptimizationGuidePushNotifications = -@@ -723,6 +727,7 @@ public abstract class ChromeFeatureList { - sTabStripRedesign, - sTabStripStartupRefactoring, - sTabletToolbarReordering, -+ sShowAlwaysContextMenuOnLinks, - sTabToGTSAnimation, - sToolbarUseHardwareBitmapDraw, - sUseChimeAndroidSdk, +@@ -750,6 +754,7 @@ public abstract class ChromeFeatureList { + sTabToGTSAnimation, + sToolbarUseHardwareBitmapDraw, + sUseChimeAndroidSdk, ++ sShowAlwaysContextMenuOnLinks, + sUseLibunwindstackNativeUnwinderAndroid); + + public static final List sFlagsCachedInMinimalBrowser = 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 -@@ -1839,6 +1839,12 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1732,6 +1732,12 @@ Your Google account may have other forms of browsing history like searches and a Move toolbar to bottom @@ -211,7 +211,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro -@@ -2891,6 +2897,9 @@ To change this setting, <resetlink>reset sync

<resetlink>reset sync

Open in new Chrome tab @@ -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; -@@ -510,6 +522,15 @@ void HTMLAnchorElement::NavigateToHyperlink(ResourceRequest request, +@@ -518,6 +530,15 @@ void HTMLAnchorElement::NavigateToHyperlink(ResourceRequest request, /*element=*/this, request.HasUserGesture())); } @@ -362,8 +362,8 @@ 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; -@@ -553,7 +574,7 @@ void HTMLAnchorElement::SetHovered(bool hovered) { - } +@@ -541,7 +562,7 @@ void HTMLAnchorElement::SetHovered(bool hovered) { + HTMLElement::SetHovered(hovered); } -void HTMLAnchorElement::HandleClick(Event& event) { @@ -371,25 +371,26 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third event.SetDefaultHandled(); LocalDOMWindow* window = GetDocument().domWindow(); -@@ -652,12 +673,12 @@ void HTMLAnchorElement::HandleClick(Event& event) { +@@ -641,13 +662,12 @@ void HTMLAnchorElement::HandleClick(Event& event) { + return; } - NavigationPolicy navigation_policy = NavigationPolicyFromEvent(&event); - base::OnceClosure navigate_closure = WTF::BindOnce( - &HTMLAnchorElement::NavigateToHyperlink, WrapWeakPersistent(this), - std::move(request), navigation_policy, event.isTrusted(), - event.PlatformTimeStamp(), std::move(completed_url)); - - if (navigation_policy == kNavigationPolicyDownload) { +- + if (navigation_policy == kNavigationPolicyDownload || + navigation_policy == kNavigationPolicyLinkPreview) { + base::OnceClosure navigate_closure = WTF::BindOnce( + &HTMLAnchorElement::NavigateToHyperlink, WrapWeakPersistent(this), + std::move(request), navigation_policy, event.isTrusted(), + event.PlatformTimeStamp(), std::move(completed_url)); - // If Alt is held down it will force a download, however, wait to see if - // this is an alt-double-click which should instead select the text of the - // link. -@@ -669,7 +690,9 @@ void HTMLAnchorElement::HandleClick(Event& event) { - frame->GetEventHandler().SetDownloadModifierTaskHandle( + // 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) { + frame->GetEventHandler().SetDelayedNavigationTaskHandle( std::move(task_handle)); } else { - std::move(navigate_closure).Run(); @@ -402,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 -@@ -106,6 +106,7 @@ class CORE_EXPORT HTMLAnchorElement : public HTMLElement, public DOMURLUtils { +@@ -104,6 +104,7 @@ class CORE_EXPORT HTMLAnchorElement : public HTMLElement, public DOMURLUtils { void SetHovered(bool hovered) override; void Trace(Visitor*) const override; @@ -410,7 +411,7 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.h b/third_ protected: void ParseAttribute(const AttributeModificationParams&) override; -@@ -127,12 +128,16 @@ class CORE_EXPORT HTMLAnchorElement : public HTMLElement, public DOMURLUtils { +@@ -126,12 +127,16 @@ class CORE_EXPORT HTMLAnchorElement : public HTMLElement, public DOMURLUtils { bool IsInteractiveContent() const final; InsertionNotificationRequest InsertedInto(ContainerNode&) override; void RemovedFrom(ContainerNode&) override; @@ -485,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 -@@ -236,14 +236,16 @@ void ContextMenuController::DocumentDetached(Document* document) { +@@ -231,14 +231,16 @@ void ContextMenuController::DocumentDetached(Document* document) { } } @@ -505,7 +506,7 @@ diff --git a/third_party/blink/renderer/core/page/context_menu_controller.cc b/t mouse_event->SetDefaultHandled(); } -@@ -461,7 +463,8 @@ bool ContextMenuController::ShouldShowContextMenuFromTouch( +@@ -456,7 +458,8 @@ bool ContextMenuController::ShouldShowContextMenuFromTouch( bool ContextMenuController::ShowContextMenu(LocalFrame* frame, const PhysicalOffset& point, WebMenuSourceType source_type, @@ -515,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, -@@ -484,6 +487,15 @@ bool ContextMenuController::ShowContextMenu(LocalFrame* frame, +@@ -479,6 +482,15 @@ bool ContextMenuController::ShowContextMenu(LocalFrame* frame, if (!result.InnerNodeOrImageMapImage()) return false; @@ -531,9 +532,9 @@ 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; -@@ -837,11 +849,13 @@ bool ContextMenuController::ShowContextMenu(LocalFrame* frame, - data.form_renderer_id = GetFormRendererId(result); - data.field_renderer_id = GetFieldRendererId(result); +@@ -832,11 +844,13 @@ bool ContextMenuController::ShowContextMenu(LocalFrame* frame, + SetAutofillData(result.InnerNode(), data); + SetPasswordManagerData(result.InnerElement(), data); - const bool from_touch = source_type == kMenuSourceTouch || - source_type == kMenuSourceLongPress || diff --git a/build/patches/00Add-support-to-jxl.patch b/build/patches/00Add-support-to-jxl.patch index 5cdd82d07..bf3a3bad2 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 -@@ -515,6 +515,10 @@ vars = { +@@ -504,6 +504,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 -@@ -1205,6 +1209,9 @@ deps = { +@@ -1134,6 +1138,9 @@ deps = { 'src/third_party/dawn': Var('dawn_git') + '/dawn.git' + '@' + Var('dawn_revision'), @@ -146,14 +146,14 @@ new file mode 100644 diff --git a/build/linux/unbundle/replace_gn_files.py b/build/linux/unbundle/replace_gn_files.py --- a/build/linux/unbundle/replace_gn_files.py +++ b/build/linux/unbundle/replace_gn_files.py -@@ -53,6 +53,7 @@ REPLACEMENTS = { +@@ -55,6 +55,7 @@ REPLACEMENTS = { 'libdrm': 'third_party/libdrm/BUILD.gn', 'libevent': 'third_party/libevent/BUILD.gn', 'libjpeg': 'third_party/libjpeg.gni', + 'libjxl' : 'third_party/libjxl/BUILD.gn', 'libpng': 'third_party/libpng/BUILD.gn', - 'libvpx': 'third_party/libvpx/BUILD.gn', - 'libwebp': 'third_party/libwebp/BUILD.gn', + 'libsecret' : 'third_party/libsecret/BUILD.gn', + 'libusb': 'third_party/libusb/BUILD.gn', diff --git a/cc/base/devtools_instrumentation.cc b/cc/base/devtools_instrumentation.cc --- a/cc/base/devtools_instrumentation.cc +++ b/cc/base/devtools_instrumentation.cc @@ -174,8 +174,8 @@ diff --git a/cc/base/devtools_instrumentation.h b/cc/base/devtools_instrumentati class CC_BASE_EXPORT ScopedImageTask { public: -- enum ImageType { kAvif, kBmp, kGif, kIco, kJpeg, kPng, kWebP, kOther }; -+ enum ImageType { kJxl, kAvif, kBmp, kGif, kIco, kJpeg, kPng, kWebP, kOther }; +- enum class ImageType { kAvif, kBmp, kGif, kIco, kJpeg, kPng, kWebP, kOther }; ++ enum class ImageType { kJxl, kAvif, kBmp, kGif, kIco, kJpeg, kPng, kWebP, kOther }; explicit ScopedImageTask(ImageType image_type) : image_type_(image_type), start_time_(base::TimeTicks::Now()) {} @@ -304,7 +304,7 @@ new file mode 100644 diff --git a/media/BUILD.gn b/media/BUILD.gn --- a/media/BUILD.gn +++ b/media/BUILD.gn -@@ -37,6 +37,7 @@ buildflag_header("media_buildflags") { +@@ -38,6 +38,7 @@ buildflag_header("media_buildflags") { "ENABLE_CAST_AUDIO_RENDERER=$enable_cast_audio_renderer", "ENABLE_DAV1D_DECODER=$enable_dav1d_decoder", "ENABLE_AV1_DECODER=$enable_av1_decoder", @@ -315,7 +315,7 @@ diff --git a/media/BUILD.gn b/media/BUILD.gn diff --git a/media/media_options.gni b/media/media_options.gni --- a/media/media_options.gni +++ b/media/media_options.gni -@@ -125,6 +125,9 @@ declare_args() { +@@ -129,6 +129,9 @@ declare_args() { # `enable_libaom` should likely also be overriddent to false. enable_av1_decoder = enable_dav1d_decoder @@ -363,7 +363,7 @@ diff --git a/net/base/mime_util_unittest.cc b/net/base/mime_util_unittest.cc #if BUILDFLAG(IS_CHROMEOS_ASH) // These are test cases for testing platform mime types on ChromeOS. {FILE_PATH_LITERAL("epub"), {"application/epub+zip"}}, -@@ -497,6 +499,7 @@ TEST(MimeUtilTest, TestGetExtensionsForMimeType) { +@@ -496,6 +498,7 @@ TEST(MimeUtilTest, TestGetExtensionsForMimeType) { {"MeSsAge/*", 1, "eml"}, {"message/", 0, nullptr, true}, {"image/avif", 1, "avif"}, @@ -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 -@@ -4133,6 +4133,7 @@ domain Emulation +@@ -4218,6 +4218,7 @@ domain Emulation experimental type DisabledImageType extends string enum avif @@ -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 -@@ -2232,6 +2232,10 @@ source_set("blink_platform_unittests_sources") { +@@ -2256,6 +2256,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 += [ -@@ -2275,6 +2279,7 @@ source_set("blink_platform_unittests_sources") { +@@ -2299,6 +2303,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", @@ -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 -@@ -4781,6 +4781,12 @@ crbug.com/1199522 http/tests/devtools/layers/layers-3d-view-hit-testing.js [ Fai +@@ -4822,6 +4822,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 ] @@ -2237,7 +2237,7 @@ diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/we 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 -@@ -447,6 +447,15 @@ +@@ -429,6 +429,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 -@@ -26498,7 +26498,7 @@ Called by update_debug_scenarios.py.--> +@@ -26859,7 +26859,7 @@ Called by update_debug_scenarios.py.--> @@ -2661,7 +2661,7 @@ diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums -@@ -65584,6 +65584,7 @@ from previous Chrome versions. +@@ -66332,6 +66332,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 70c5841b5..50e79b2fb 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 -@@ -370,6 +370,13 @@ void PictureInPictureControllerImpl::CreateDocumentPictureInPictureWindow( +@@ -372,6 +372,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 f57402ec4..2d6610213 100644 --- a/build/patches/00Always-open-browser-controls-in-new-tab.patch +++ b/build/patches/00Always-open-browser-controls-in-new-tab.patch @@ -23,9 +23,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextM import org.chromium.chrome.browser.profiles.Profile; +import org.chromium.chrome.browser.tab.TabBrowserControlsConstraintsHelper; import org.chromium.chrome.browser.tabmodel.TabModelSelector; - import org.chromium.chrome.browser.tabmodel.document.TabDelegate; + import org.chromium.chrome.browser.tabmodel.document.ChromeAsyncTabLauncher; import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; -@@ -202,6 +204,7 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate { +@@ -206,6 +208,7 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate { @Override public void onOpenInNewTab(GURL url, Referrer referrer, boolean navigateToTab, @Nullable AdditionalNavigationParams additionalNavigationParams) { @@ -33,7 +33,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextM RecordUserAction.record("MobileNewTabOpened"); RecordUserAction.record("LinkOpenedInNewTab"); LoadUrlParams loadUrlParams = new LoadUrlParams(url.getSpec()); -@@ -215,6 +218,7 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate { +@@ -219,6 +222,7 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate { @Override public void onOpenInNewTabInGroup(GURL url, Referrer referrer) { 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 b8817d3fe..2d90bcd50 100644 --- a/build/patches/00Clear-CORS-Preflight-Cache-on-clearing-data.patch +++ b/build/patches/00Clear-CORS-Preflight-Cache-on-clearing-data.patch @@ -41,7 +41,7 @@ diff --git a/services/network/cors/preflight_cache.h b/services/network/cors/pre diff --git a/services/network/cors/preflight_controller.cc b/services/network/cors/preflight_controller.cc --- a/services/network/cors/preflight_controller.cc +++ b/services/network/cors/preflight_controller.cc -@@ -804,6 +804,10 @@ void PreflightController::ClearCorsPreflightCache( +@@ -789,6 +789,10 @@ void PreflightController::ClearCorsPreflightCache( cache_.ClearCache(std::move(url_filter)); } @@ -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 -@@ -1126,6 +1126,8 @@ void NetworkContext::ClearHttpCache(base::Time start_time, +@@ -1129,6 +1129,8 @@ void NetworkContext::ClearHttpCache(base::Time start_time, base::BindOnce(&NetworkContext::OnHttpCacheCleared, base::Unretained(this), std::move(callback)))); diff --git a/build/patches/00Cromite-Branding.patch b/build/patches/00Cromite-Branding.patch index 0e21a33e3..b0d4b1a23 100644 --- a/build/patches/00Cromite-Branding.patch +++ b/build/patches/00Cromite-Branding.patch @@ -39,7 +39,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../profiles/profile_shortcut_manager_win.cc | 2 +- .../settings/settings_menu/settings_menu.html | 5 ++- .../strings/android_chrome_strings.grd | 2 +- - chrome/common/url_constants.cc | 4 +- + chrome/common/url_constants.h | 4 +- .../strings/android/browser_ui_strings.grd | 2 +- .../drawable-hdpi/fre_product_logo.png | Bin 3912 -> 22295 bytes .../drawable-mdpi/fre_product_logo.png | Bin 2490 -> 12171 bytes @@ -116,7 +116,7 @@ diff --git a/chrome/android/java/res/xml/legal_information_preferences.xml b/chr diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml --- a/chrome/android/java/res/xml/main_preferences.xml +++ b/chrome/android/java/res/xml/main_preferences.xml -@@ -8,20 +8,20 @@ +@@ -14,20 +14,20 @@ found in the LICENSE file. android:order="0"/> CreateProfilePrefStoreManager( +@@ -274,10 +275,7 @@ std::unique_ptr CreateProfilePrefStoreManager( #endif std::string seed; CHECK(ui::ResourceBundle::HasSharedInstance()); @@ -13209,7 +13209,7 @@ diff --git a/chrome/browser/resources/settings/settings_menu/settings_menu.html 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 -@@ -2296,7 +2296,7 @@ Your Google account may have other forms of browsing history like searches and a +@@ -2189,7 +2189,7 @@ Your Google account may have other forms of browsing history like searches and a About Chrome @@ -13218,31 +13218,31 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro Application version -diff --git a/chrome/common/url_constants.cc b/chrome/common/url_constants.cc ---- a/chrome/common/url_constants.cc -+++ b/chrome/common/url_constants.cc -@@ -79,7 +79,7 @@ const char kChromeHelpViaMenuURL[] = +diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h +--- a/chrome/common/url_constants.h ++++ b/chrome/common/url_constants.h +@@ -114,7 +114,7 @@ inline constexpr char kChromeHelpViaMenuURL[] = #endif // BUILDFLAG(IS_CHROMEOS_ASH) - const char kChromeHelpViaWebUIURL[] = -- "https://support.google.com/chrome/?p=help&ctx=settings"; -+ "https://github.com/uazo/bromite-buildtools/issues"; + inline constexpr char kChromeHelpViaWebUIURL[] = +- "https://support.google.com/chrome?p=help&ctx=settings"; ++ "https://github.com/uazo/cromite/issues"; #if BUILDFLAG(IS_CHROMEOS_ASH) - const char kChromeOsHelpViaWebUIURL[] = + inline constexpr char kChromeOsHelpViaWebUIURL[] = #if BUILDFLAG(GOOGLE_CHROME_BRANDING) -@@ -111,7 +111,7 @@ const char kChromeSearchScheme[] = "chrome-search"; - const char kChromeUIUntrustedNewTabPageUrl[] = +@@ -180,7 +180,7 @@ inline constexpr char kChromeUIUntrustedNewTabPageUrl[] = "chrome-untrusted://new-tab-page/"; --const char kChromiumProjectURL[] = "https://www.chromium.org/"; -+const char kChromiumProjectURL[] = "https://github.com/uazo/bromite-buildtools/"; + // The URL for the Chromium project used in the About dialog. +-inline constexpr char16_t kChromiumProjectURL[] = u"https://www.chromium.org/"; ++inline constexpr char16_t kChromiumProjectURL[] = u"https://www.cromite.org/"; - const char kContentSettingsExceptionsLearnMoreURL[] = - "https://support.google.com/chrome/?p=settings_manage_exceptions"; + inline constexpr char16_t kContentSettingsExceptionsLearnMoreURL[] = + u"https://support.google.com/chrome?p=settings_manage_exceptions"; 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 -@@ -978,7 +978,7 @@ +@@ -1009,7 +1009,7 @@ diff --git a/build/patches/00Deprecate-Data-URL-in-SVGUseElement.patch b/build/patches/00Deprecate-Data-URL-in-SVGUseElement.patch index 70a4725c3..9edf5a40a 100644 --- a/build/patches/00Deprecate-Data-URL-in-SVGUseElement.patch +++ b/build/patches/00Deprecate-Data-URL-in-SVGUseElement.patch @@ -10,12 +10,12 @@ 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 -@@ -3152,8 +3152,8 @@ +@@ -3232,8 +3232,8 @@ status: "stable", }, { - name: "RemoveDataUrlInSvgUse", -- status: "experimental", +- status: "stable", + name: "RemoveDataUrlInSvgUse", // enabled + status: "stable", // by default }, diff --git a/build/patches/00Disable-Component-Updates.patch b/build/patches/00Disable-Component-Updates.patch index da45f4f94..e53c43e37 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 -@@ -98,6 +98,7 @@ +@@ -100,6 +100,7 @@ namespace component_updater { void RegisterComponentsForUpdate() { @@ -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 -@@ -520,7 +520,7 @@ std::unique_ptr ComponentUpdateServiceFactory( +@@ -522,7 +522,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 4abcfdc02..232b354cc 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 -@@ -678,16 +678,18 @@ +@@ -698,16 +698,18 @@ status: "stable", }, { diff --git a/build/patches/00Disable-FedCm.patch b/build/patches/00Disable-FedCm.patch index e618f0c61..abd02745a 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 -@@ -1596,7 +1596,7 @@ +@@ -1653,7 +1653,7 @@ { name: "FedCm", public: true, diff --git a/build/patches/00Disable-FirstPartySets-and-StorageAccessAPI.patch b/build/patches/00Disable-FirstPartySets-and-StorageAccessAPI.patch index a8209127c..36399dffb 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 -@@ -27,13 +27,13 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) { +@@ -47,13 +47,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 2af3d118b..0faae8407 100644 --- a/build/patches/00Disable-GSA-by-default.patch +++ b/build/patches/00Disable-GSA-by-default.patch @@ -14,7 +14,7 @@ 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/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 -@@ -38,7 +38,6 @@ import org.chromium.chrome.browser.document.ChromeLauncherActivity; +@@ -39,7 +39,6 @@ import org.chromium.chrome.browser.document.ChromeLauncherActivity; import org.chromium.chrome.browser.externalnav.IntentWithRequestMetadataHandler; import org.chromium.chrome.browser.externalnav.IntentWithRequestMetadataHandler.RequestMetadata; import org.chromium.chrome.browser.flags.ChromeFeatureList; @@ -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; -@@ -264,8 +263,6 @@ public class IntentHandler { +@@ -265,8 +264,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"; -@@ -456,8 +453,6 @@ public class IntentHandler { +@@ -457,8 +454,6 @@ public class IntentHandler { return ExternalAppId.LINE; } else if (packageName.equals(PACKAGE_WHATSAPP)) { return ExternalAppId.WHATSAPP; @@ -43,15 +43,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.j diff --git a/chrome/android/java/src/org/chromium/chrome/browser/share/LensUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/share/LensUtils.java --- a/chrome/android/java/src/org/chromium/chrome/browser/share/LensUtils.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/share/LensUtils.java -@@ -12,7 +12,6 @@ import org.chromium.base.ResettersForTesting; - import org.chromium.chrome.R; +@@ -11,7 +11,6 @@ import android.text.TextUtils; + import org.chromium.base.ResettersForTesting; import org.chromium.chrome.browser.IntentHandler; import org.chromium.chrome.browser.flags.ChromeFeatureList; -import org.chromium.chrome.browser.gsa.GSAState; import org.chromium.components.externalauth.ExternalAuthUtils; /** -@@ -64,12 +63,7 @@ public class LensUtils { +@@ -59,12 +58,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 } } -@@ -121,11 +115,7 @@ public class LensUtils { +@@ -116,11 +110,7 @@ public class LensUtils { * @return Whether the package is valid. */ public static boolean isValidAgsaPackage(final ExternalAuthUtils externalAuthUtils) { diff --git a/build/patches/00Disable-GetInstalledRelatedApps-API.patch b/build/patches/00Disable-GetInstalledRelatedApps-API.patch index f1399efa4..b2028b0eb 100644 --- a/build/patches/00Disable-GetInstalledRelatedApps-API.patch +++ b/build/patches/00Disable-GetInstalledRelatedApps-API.patch @@ -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 -@@ -2132,9 +2132,9 @@ +@@ -2221,9 +2221,9 @@ status: {"Android": "test", "default": "stable"}, }, { diff --git a/build/patches/00Disable-Real-Box.patch b/build/patches/00Disable-Real-Box.patch index 1995947a9..c1990297c 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 -@@ -130,7 +130,7 @@ BASE_FEATURE(kNtpHandleMostVisitedNavigationExplicitly, +@@ -135,7 +135,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, -@@ -207,8 +207,8 @@ BASE_FEATURE(kNtpMostVisitedReflowOnOverflow, +@@ -212,8 +212,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, -@@ -243,8 +243,8 @@ BASE_FEATURE(kNtpFeedModule, +@@ -248,8 +248,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-WebGPU.patch b/build/patches/00Disable-WebGPU.patch index 50b89a04e..399799e1f 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 -@@ -283,7 +283,7 @@ BASE_FEATURE(kForceGpuMainThreadToNormalPriorityDrDc, +@@ -284,7 +284,7 @@ BASE_FEATURE(kForceGpuMainThreadToNormalPriorityDrDc, // Enable WebGPU on gpu service side only. This is used with origin trial and // enabled by default on supported platforms. - #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH) + #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) -#define WEBGPU_ENABLED base::FEATURE_ENABLED_BY_DEFAULT +#define WEBGPU_ENABLED base::FEATURE_DISABLED_BY_DEFAULT #else diff --git a/build/patches/00Disable-devtools-remote-and-custom-protocols.patch b/build/patches/00Disable-devtools-remote-and-custom-protocols.patch index c94039e29..9b8ecb75d 100644 --- a/build/patches/00Disable-devtools-remote-and-custom-protocols.patch +++ b/build/patches/00Disable-devtools-remote-and-custom-protocols.patch @@ -3,12 +3,12 @@ Date: Mon, 17 Apr 2023 12:38:44 +0000 Subject: Disable devtools remote and custom protocols --- - chrome/browser/ui/webui/devtools_ui_data_source.cc | 4 ++-- + chrome/browser/ui/webui/devtools/devtools_ui_data_source.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/chrome/browser/ui/webui/devtools_ui_data_source.cc b/chrome/browser/ui/webui/devtools_ui_data_source.cc ---- a/chrome/browser/ui/webui/devtools_ui_data_source.cc -+++ b/chrome/browser/ui/webui/devtools_ui_data_source.cc +diff --git a/chrome/browser/ui/webui/devtools/devtools_ui_data_source.cc b/chrome/browser/ui/webui/devtools/devtools_ui_data_source.cc +--- a/chrome/browser/ui/webui/devtools/devtools_ui_data_source.cc ++++ b/chrome/browser/ui/webui/devtools/devtools_ui_data_source.cc @@ -175,7 +175,7 @@ void DevToolsDataSource::StartDataRequest( // Serve request to devtools://remote from remote location. std::string remote_path_prefix(chrome::kChromeUIDevToolsRemotePath); diff --git a/build/patches/00Disable-prefers-reduced-transparency-media-query.patch b/build/patches/00Disable-prefers-reduced-transparency-media-query.patch index 3e82a9de3..d96cbdde2 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 -@@ -2996,8 +2996,8 @@ +@@ -3076,8 +3076,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 5f52c5384..e71839366 100644 --- a/build/patches/00Disable-privacy-issues-in-password-manager.patch +++ b/build/patches/00Disable-privacy-issues-in-password-manager.patch @@ -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 -@@ -120,4 +120,8 @@ BASE_FEATURE(kUseExtensionListForPSLMatching, +@@ -209,4 +209,8 @@ BASE_FEATURE(kUsernameFirstFlowWithIntermediateValuesVoting, + "UsernameFirstFlowWithIntermediateValuesVoting", base::FEATURE_ENABLED_BY_DEFAULT); - #endif +SET_CROMITE_FEATURE_ENABLED(kFillOnAccountSelect); +SET_CROMITE_FEATURE_DISABLED(kPasswordManagerEnableReceiverService); @@ -141,7 +141,7 @@ diff --git a/components/password_manager/core/browser/leak_detection/leak_detect diff --git a/components/password_manager/core/browser/leak_detection/leak_detection_check_impl.cc b/components/password_manager/core/browser/leak_detection/leak_detection_check_impl.cc --- a/components/password_manager/core/browser/leak_detection/leak_detection_check_impl.cc +++ b/components/password_manager/core/browser/leak_detection/leak_detection_check_impl.cc -@@ -190,9 +190,7 @@ bool LeakDetectionCheckImpl::HasAccountForRequest( +@@ -194,9 +194,7 @@ bool LeakDetectionCheckImpl::HasAccountForRequest( // always return something if the user is signed in. // On Android it will be empty if the user isn't syncing. Thus, // GetAccountsWithRefreshTokens() check is necessary. diff --git a/build/patches/00Disable-speechSynthesis-getVoices-API.patch b/build/patches/00Disable-speechSynthesis-getVoices-API.patch index 7dee07d92..7953c2fd1 100644 --- a/build/patches/00Disable-speechSynthesis-getVoices-API.patch +++ b/build/patches/00Disable-speechSynthesis-getVoices-API.patch @@ -29,7 +29,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 -@@ -1597,7 +1597,7 @@ ChromeContentRendererClient::CreateWorkerContentSettingsClient( +@@ -1605,7 +1605,7 @@ ChromeContentRendererClient::CreateWorkerContentSettingsClient( std::unique_ptr ChromeContentRendererClient::CreateSpeechRecognitionClient( content::RenderFrame* render_frame) { diff --git a/build/patches/00Disallowing-MIDI-permission-by-default.patch b/build/patches/00Disallowing-MIDI-permission-by-default.patch index e884b62ff..a39666ea3 100644 --- a/build/patches/00Disallowing-MIDI-permission-by-default.patch +++ b/build/patches/00Disallowing-MIDI-permission-by-default.patch @@ -10,7 +10,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/components/permissions/features.cc b/components/permissions/features.cc --- a/components/permissions/features.cc +++ b/components/permissions/features.cc -@@ -169,7 +169,7 @@ BASE_FEATURE(kWindowPlacementPermissionAlias, +@@ -157,7 +157,7 @@ BASE_FEATURE(kShowRelatedWebsiteSetsPermissionGrants, // Enables disallowing MIDI permission by default. BASE_FEATURE(kBlockMidiByDefault, "BlockMidiByDefault", diff --git a/build/patches/00Enable-Android-Dynamic-Performance-Framework.patch b/build/patches/00Enable-Android-Dynamic-Performance-Framework.patch index 6d881230e..77c77c6c9 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 -@@ -291,9 +291,10 @@ const base::FeatureParam kADPFMidFrameBoostDurationMultiplier{ +@@ -306,9 +306,10 @@ const base::FeatureParam kADPFMidFrameBoostDurationMultiplier{ // If enabled, Chrome includes the Renderer Main thread(s) into the // ADPF(Android Dynamic Performance Framework) hint session. @@ -34,7 +34,7 @@ diff --git a/components/viz/common/features.cc b/components/viz/common/features. + "EnableADPFRendererMain", // enabled + base::FEATURE_ENABLED_BY_DEFAULT); // by default - // If enabled, surface activation and draw do not block on dependencies. - BASE_FEATURE(kDrawImmediatelyWhenInteractive, + // If enabled, Chrome verifies that Renderer threads do not belong to the + // Browser process asynchronously via a mojo call to the Browser before -- 2.25.1 diff --git a/build/patches/00Enable-Document-Open-Inheritance-Removal.patch b/build/patches/00Enable-Document-Open-Inheritance-Removal.patch index 721d5620c..00dedad44 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 -@@ -3442,70 +3442,6 @@ void Document::open(LocalDOMWindow* entered_window, +@@ -3419,70 +3419,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 -@@ -1434,7 +1434,6 @@ +@@ -1490,7 +1490,6 @@ { name: "DocumentOpenSandboxInheritanceRemoval", status: "stable", diff --git a/build/patches/00Enable-ImprovedBookmarks-by-default.patch b/build/patches/00Enable-ImprovedBookmarks-by-default.patch index c9fadacf5..04b27f848 100644 --- a/build/patches/00Enable-ImprovedBookmarks-by-default.patch +++ b/build/patches/00Enable-ImprovedBookmarks-by-default.patch @@ -30,8 +30,8 @@ diff --git a/chrome/android/java/res/layout/bookmark_search_box_row.xml b/chrome diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkFeatures.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkFeatures.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkFeatures.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkFeatures.java -@@ -14,7 +14,7 @@ import org.chromium.chrome.browser.flags.MutableFlagWithSafeDefault; - */ +@@ -12,7 +12,7 @@ import org.chromium.chrome.browser.flags.MutableFlagWithSafeDefault; + /** Self-documenting feature class for bookmarks. */ public class BookmarkFeatures { private static final MutableFlagWithSafeDefault sAndroidImprovedBookmarksFlag = - new MutableFlagWithSafeDefault(ChromeFeatureList.ANDROID_IMPROVED_BOOKMARKS, false); @@ -50,7 +50,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm import androidx.annotation.DrawableRes; import androidx.annotation.StringRes; -@@ -53,6 +54,7 @@ class BookmarkSearchBoxRowViewBinder { +@@ -54,6 +55,7 @@ class BookmarkSearchBoxRowViewBinder { private void bindInternal(PropertyModel model, View view, PropertyKey key) { BookmarkSearchBoxRow row = (BookmarkSearchBoxRow) view; ChipView shoppingChip = view.findViewById(R.id.shopping_filter_chip); @@ -62,7 +62,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUiPrefs.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUiPrefs.java @@ -21,7 +21,7 @@ import java.lang.annotation.RetentionPolicy; - */ + /** Self-documenting preference class for bookmarks. */ public class BookmarkUiPrefs { private static final @BookmarkRowDisplayPref int INITIAL_BOOKMARK_ROW_DISPLAY_PREF = - BookmarkRowDisplayPref.VISUAL; @@ -73,7 +73,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java -@@ -38,6 +38,7 @@ import org.chromium.chrome.browser.app.bookmarks.BookmarkAddEditFolderActivity; +@@ -39,6 +39,7 @@ import org.chromium.chrome.browser.app.bookmarks.BookmarkAddEditFolderActivity; import org.chromium.chrome.browser.app.bookmarks.BookmarkEditActivity; import org.chromium.chrome.browser.app.bookmarks.BookmarkFolderPickerActivity; import org.chromium.chrome.browser.app.bookmarks.BookmarkFolderSelectActivity; @@ -81,15 +81,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm import org.chromium.chrome.browser.bookmarks.BookmarkUiPrefs.BookmarkRowDisplayPref; import org.chromium.chrome.browser.commerce.ShoppingServiceFactory; import org.chromium.chrome.browser.document.ChromeLauncherActivity; -@@ -405,7 +406,7 @@ public class BookmarkUtils { +@@ -486,7 +487,7 @@ public class BookmarkUtils { RecordUserAction.record("MobileBookmarkManagerReopenBookmarksInSameSession"); } - if (DeviceFormFactor.isNonMultiDisplayContextOnTablet(context)) { + if (BookmarkFeatures.isAndroidImprovedBookmarksEnabled() || DeviceFormFactor.isNonMultiDisplayContextOnTablet(context)) { - showBookmarkManagerOnTablet(context, - activity == null ? null : activity.getComponentName(), url, isIncognito); - } else { + showBookmarkManagerOnTablet( + context, + activity == null ? null : activity.getComponentName(), diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Enable-ImprovedBookmarks-by-default.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Enable-ImprovedBookmarks-by-default.inc new file mode 100644 --- /dev/null diff --git a/build/patches/00Evict-the-entire-FrameTree-like-desktop.patch b/build/patches/00Evict-the-entire-FrameTree-like-desktop.patch index 067d6e72e..819997d56 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 -@@ -233,7 +233,7 @@ BASE_FEATURE(kRendererAllocatesImages, +@@ -248,7 +248,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 a54e13303..9c583acc2 100644 --- a/build/patches/00Eyeo-Adblock-Remove-Privacy-Issues.patch +++ b/build/patches/00Eyeo-Adblock-Remove-Privacy-Issues.patch @@ -141,9 +141,9 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j xmlns:app="http://schemas.android.com/apk/res-auto" android:orderingFromXml="false"> @@ -75,6 +66,11 @@ Use of this source code is governed by the GPLv3 that can be found in the compon - android:key="safety_check" - android:order="12" - android:title="@string/prefs_safety_check"/> + android:key="adblock" + android:order="13" + android:title="@string/prefs_adblock"/> + @@ -1100,7 +1100,7 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc #include "chrome/browser/bookmarks/bookmark_model_factory.h" #include "chrome/browser/breadcrumbs/breadcrumb_manager_tab_helper.h" #include "chrome/browser/browser_process.h" -@@ -350,6 +351,8 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { +@@ -362,6 +363,8 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { } } @@ -1109,7 +1109,7 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc AdblockWebContentObserver::CreateForWebContents( web_contents, adblock::SubscriptionServiceFactory::GetForBrowserContext( -@@ -358,7 +361,8 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { +@@ -370,7 +373,8 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { web_contents->GetBrowserContext()), adblock::SitekeyStorageFactory::GetForBrowserContext( web_contents->GetBrowserContext()), @@ -1117,7 +1117,7 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc + std::make_unique(), + HostContentSettingsMapFactory::GetForProfile(profile)); autofill::ChromeAutofillClient::CreateForWebContents(web_contents); - if (breadcrumbs::IsEnabled()) + if (breadcrumbs::IsEnabled()) { BreadcrumbManagerTabHelper::CreateForWebContents(web_contents); diff --git a/chrome/browser/ui/webui/adblock_internals/adblock_internals_page_handler_impl.cc b/chrome/browser/ui/webui/adblock_internals/adblock_internals_page_handler_impl.cc --- a/chrome/browser/ui/webui/adblock_internals/adblock_internals_page_handler_impl.cc @@ -1184,7 +1184,7 @@ diff --git a/chrome/common/extensions/api/_permission_features.json b/chrome/com "autofillPrivate": { "channel": "trunk", "extension_types": ["extension", "platform_app"], -@@ -351,10 +347,6 @@ +@@ -360,10 +356,6 @@ "extension", "legacy_packaged_app", "hosted_app", "platform_app" ] }, @@ -1223,15 +1223,15 @@ diff --git a/chrome/common/extensions/api/adblock_private.idl b/chrome/common/ex diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -28,7 +28,6 @@ import("//chrome/test/base/js2gtest.gni") +@@ -27,7 +27,6 @@ import("//chrome/services/speech/buildflags/buildflags.gni") import("//chrome/test/include_js_tests.gni") import("//chrome/version.gni") import("//chromeos/ash/components/assistant/assistant.gni") -import("//components/adblock/features.gni") import("//components/captive_portal/core/features.gni") + import("//components/compose/features.gni") import("//components/enterprise/buildflags/buildflags.gni") - import("//components/feed/features.gni") -@@ -2754,10 +2753,6 @@ if (!is_android) { +@@ -2867,10 +2866,6 @@ if (!is_android) { sources += [ "../browser/chrome_for_testing/chrome_for_testing_info_bar_browsertest.cc" ] } @@ -4395,7 +4395,7 @@ new file mode 100644 diff --git a/components/resources/BUILD.gn b/components/resources/BUILD.gn --- a/components/resources/BUILD.gn +++ b/components/resources/BUILD.gn -@@ -76,7 +76,6 @@ grit("components_resources") { +@@ -78,7 +78,6 @@ grit("components_resources") { deps += [ "//components/resources/adblocking:copy_snippets_lib", @@ -11963,7 +11963,7 @@ new file mode 100755 diff --git a/third_party/blink/renderer/core/css/style_engine.cc b/third_party/blink/renderer/core/css/style_engine.cc --- a/third_party/blink/renderer/core/css/style_engine.cc +++ b/third_party/blink/renderer/core/css/style_engine.cc -@@ -623,6 +623,14 @@ void StyleEngine::UpdateActiveStyleSheetsInShadow( +@@ -626,6 +626,14 @@ void StyleEngine::UpdateActiveStyleSheetsInShadow( } } @@ -11981,7 +11981,7 @@ diff --git a/third_party/blink/renderer/core/css/style_engine.cc b/third_party/b diff --git a/third_party/blink/renderer/core/css/style_engine.h b/third_party/blink/renderer/core/css/style_engine.h --- a/third_party/blink/renderer/core/css/style_engine.h +++ b/third_party/blink/renderer/core/css/style_engine.h -@@ -243,6 +243,7 @@ class CORE_EXPORT StyleEngine final : public GarbageCollected, +@@ -246,6 +246,7 @@ class CORE_EXPORT StyleEngine final : public GarbageCollected, const ComputedStyle* embedder_style) const; void ViewportStyleSettingChanged(); diff --git a/build/patches/00Fix-chromium-build-bugs.patch b/build/patches/00Fix-chromium-build-bugs.patch index 67e2a7943..d36789dba 100644 --- a/build/patches/00Fix-chromium-build-bugs.patch +++ b/build/patches/00Fix-chromium-build-bugs.patch @@ -5,42 +5,21 @@ Subject: Fix chromium build bugs because of https://bugs.chromium.org/p/chromium/issues/detail?id=1491776#c10 --- - BUILD.gn | 1 - - .../AutofillSaveCardBottomSheetBridge.java | 2 +- - .../chromium/chrome/browser/tab/TabImpl.java | 2 +- - .../intent_helper/intent_picker_helpers.cc | 2 ++ - ...owser_main_extra_parts_nacl_deprecation.cc | 2 ++ - .../download/download_ui_safe_browsing_util.h | 2 +- - .../api/autofill_private/autofill_util.cc | 2 ++ - .../reading_list/reading_list_event_router.h | 2 +- - ...vigation_predictor_metrics_document_data.h | 2 ++ - .../notification_platform_bridge_linux.cc | 2 +- - chrome/browser/safe_browsing/BUILD.gn | 1 + - .../tpcd/support/tpcd_support_manager.cc | 2 +- - ...ion_consented_debugging_infobar_delegate.h | 2 +- - .../read_anything_container_view.cc | 12 +++---- - chrome/browser/ui/views/tabs/tab.cc | 2 +- - .../browser/ui/views/tabs/tab_group_header.cc | 2 +- - .../app_management_page_handler.cc | 2 ++ - chrome/browser/usb/chrome_usb_delegate.cc | 2 ++ - .../core/browser/data_model/address.cc | 2 +- - .../autofill/core/browser/form_structure.cc | 2 ++ - .../core/browser/webdata/autofill_table.cc | 36 +++++++++---------- - .../omnibox/browser/autocomplete_controller.h | 2 +- - .../omnibox/browser/omnibox_field_trial.cc | 4 +-- - components/omnibox/browser/omnibox_view.cc | 2 ++ - .../browser/tailored_word_break_iterator.cc | 2 +- - .../phishing_image_embedder.cc | 14 ++------ - content/browser/browser_interface_binders.cc | 1 + - crypto/BUILD.gn | 3 ++ - net/BUILD.gn | 1 + - third_party/libevent/BUILD.gn | 2 ++ - 30 files changed, 65 insertions(+), 50 deletions(-) + BUILD.gn | 1 - + .../navigation_predictor_metrics_document_data.h | 2 ++ + chrome/browser/safe_browsing/BUILD.gn | 1 + + components/omnibox/browser/omnibox_field_trial.cc | 4 ++-- + .../phishing_classifier/phishing_image_embedder.cc | 14 +++----------- + content/browser/browser_interface_binders.cc | 1 + + crypto/BUILD.gn | 3 +++ + net/BUILD.gn | 1 + + third_party/libevent/BUILD.gn | 2 ++ + 9 files changed, 15 insertions(+), 14 deletions(-) diff --git a/BUILD.gn b/BUILD.gn --- a/BUILD.gn +++ b/BUILD.gn -@@ -396,7 +396,6 @@ group("gn_all") { +@@ -394,7 +394,6 @@ group("gn_all") { "//android_webview:empty_group", "//android_webview/test", "//android_webview/tools/automated_ui_tests:webview_ui_test_app", @@ -48,135 +27,18 @@ diff --git a/BUILD.gn b/BUILD.gn "//android_webview/tools/system_webview_shell", "//chrome/android:chrome_junit_tests", "//chrome/android:chrome_public_apk", -diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillSaveCardBottomSheetBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillSaveCardBottomSheetBridge.java ---- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillSaveCardBottomSheetBridge.java -+++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillSaveCardBottomSheetBridge.java -@@ -42,7 +42,7 @@ public class AutofillSaveCardBottomSheetBridge { - AutofillSaveCardBottomSheetCoordinator::new); - } - -- @CalledByNative -+ //@CalledByNative - @VisibleForTesting - /*package*/ AutofillSaveCardBottomSheetBridge(long nativeAutofillSaveCardBottomSheetBridge, - WindowAndroid window, TabModel tabModel, CoordinatorFactory coordinatorFactory) { -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 -@@ -401,7 +401,7 @@ public class TabImpl implements Tab { - } - - @Override -- @CalledByNative -+ // @CalledByNative - public int getId() { - return mId; - } -diff --git a/chrome/browser/apps/intent_helper/intent_picker_helpers.cc b/chrome/browser/apps/intent_helper/intent_picker_helpers.cc ---- a/chrome/browser/apps/intent_helper/intent_picker_helpers.cc -+++ b/chrome/browser/apps/intent_helper/intent_picker_helpers.cc -@@ -32,6 +32,7 @@ - namespace apps { - namespace { - -+#if BUILDFLAG(IS_MAC) - std::vector CombinePossibleMacAppWithOtherApps( - std::vector apps, - absl::optional mac_app) { -@@ -40,6 +41,7 @@ std::vector CombinePossibleMacAppWithOtherApps( - } - return apps; - } -+#endif - - PickerEntryType GetPickerEntryType(AppType app_type) { - PickerEntryType picker_entry_type = PickerEntryType::kUnknown; -diff --git a/chrome/browser/chrome_browser_main_extra_parts_nacl_deprecation.cc b/chrome/browser/chrome_browser_main_extra_parts_nacl_deprecation.cc ---- a/chrome/browser/chrome_browser_main_extra_parts_nacl_deprecation.cc -+++ b/chrome/browser/chrome_browser_main_extra_parts_nacl_deprecation.cc -@@ -16,6 +16,7 @@ - - namespace { - -+#if BUILDFLAG(ENABLE_NACL) - bool ShouldNaClBeAllowed() { - // Enabled by policy. - if (g_browser_process->local_state()->GetBoolean( -@@ -24,6 +25,7 @@ bool ShouldNaClBeAllowed() { - } - return base::FeatureList::IsEnabled(kNaclAllow); - } -+#endif - - } // namespace - -diff --git a/chrome/browser/download/download_ui_safe_browsing_util.h b/chrome/browser/download/download_ui_safe_browsing_util.h ---- a/chrome/browser/download/download_ui_safe_browsing_util.h -+++ b/chrome/browser/download/download_ui_safe_browsing_util.h -@@ -9,7 +9,7 @@ class Profile; - - namespace download { - class DownloadItem; --}; -+} - - // Utilities for determining how to display a download in the desktop UI based - // on Safe Browsing state and verdict. -diff --git a/chrome/browser/extensions/api/autofill_private/autofill_util.cc b/chrome/browser/extensions/api/autofill_private/autofill_util.cc ---- a/chrome/browser/extensions/api/autofill_private/autofill_util.cc -+++ b/chrome/browser/extensions/api/autofill_private/autofill_util.cc -@@ -43,6 +43,7 @@ namespace { - // Get the multi-valued element for |type| and return it as a |vector|. - // TODO(khorimoto): remove this function since multi-valued types are - // deprecated. -+#if BUILDFLAG(IS_ANDROID) - std::vector GetList(const autofill::AutofillProfile& profile, - autofill::ServerFieldType type) { - std::vector list; -@@ -66,6 +67,7 @@ std::vector GetList(const autofill::AutofillProfile& profile, - - return list; - } -+#endif - - // Gets the string corresponding to |type| from |profile|. - std::string GetStringFromProfile(const autofill::AutofillProfile& profile, -diff --git a/chrome/browser/extensions/api/reading_list/reading_list_event_router.h b/chrome/browser/extensions/api/reading_list/reading_list_event_router.h ---- a/chrome/browser/extensions/api/reading_list/reading_list_event_router.h -+++ b/chrome/browser/extensions/api/reading_list/reading_list_event_router.h -@@ -33,7 +33,7 @@ class ReadingListEventRouter : public KeyedService, - - private: - // ReadingListModelObserver: -- void ReadingListModelLoaded(const ReadingListModel* model) override{}; -+ void ReadingListModelLoaded(const ReadingListModel* model) override {} - void ReadingListDidAddEntry(const ReadingListModel* model, - const GURL& url, - reading_list::EntrySource source) override; diff --git a/chrome/browser/navigation_predictor/navigation_predictor_metrics_document_data.h b/chrome/browser/navigation_predictor/navigation_predictor_metrics_document_data.h --- a/chrome/browser/navigation_predictor/navigation_predictor_metrics_document_data.h +++ b/chrome/browser/navigation_predictor/navigation_predictor_metrics_document_data.h -@@ -68,6 +68,8 @@ class NavigationPredictorMetricsDocumentData - UserInteractionsData(); +@@ -69,6 +69,8 @@ class NavigationPredictorMetricsDocumentData UserInteractionsData(const UserInteractionsData&); + UserInteractionsData& operator=(const UserInteractionsData&); + UserInteractionsData& operator=(UserInteractionsData&&) noexcept = default; + // True if the anchor element is still in viewport, otherwise false. bool is_in_viewport = false; // True if the pointer is still hovering over the anchor element, -diff --git a/chrome/browser/notifications/notification_platform_bridge_linux.cc b/chrome/browser/notifications/notification_platform_bridge_linux.cc ---- a/chrome/browser/notifications/notification_platform_bridge_linux.cc -+++ b/chrome/browser/notifications/notification_platform_bridge_linux.cc -@@ -883,7 +883,7 @@ class NotificationPlatformBridgeLinuxImpl - kMethodCloseNotification); - dbus::MessageWriter writer(&method_call); - writer.AppendUint32(data->dbus_id); -- notification_proxy_->CallMethodAndBlock( -+ (void)notification_proxy_->CallMethodAndBlock( - &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT); - to_erase.push_back(data); - } diff --git a/chrome/browser/safe_browsing/BUILD.gn b/chrome/browser/safe_browsing/BUILD.gn --- a/chrome/browser/safe_browsing/BUILD.gn +++ b/chrome/browser/safe_browsing/BUILD.gn @@ -188,207 +50,10 @@ diff --git a/chrome/browser/safe_browsing/BUILD.gn b/chrome/browser/safe_browsin ] if (safe_browsing_mode == 1) { # "Safe Browsing Full" files in addition to the "basic" ones to use for -diff --git a/chrome/browser/tpcd/support/tpcd_support_manager.cc b/chrome/browser/tpcd/support/tpcd_support_manager.cc ---- a/chrome/browser/tpcd/support/tpcd_support_manager.cc -+++ b/chrome/browser/tpcd/support/tpcd_support_manager.cc -@@ -38,7 +38,7 @@ TpcdSupportManager::TpcdSupportManager( - std::unique_ptr delegate) - : content::WebContentsObserver(web_contents), - content::WebContentsUserData(*web_contents), -- delegate_(std::move(delegate)){}; -+ delegate_(std::move(delegate)){} - - TpcdSupportManager::~TpcdSupportManager() = default; - -diff --git a/chrome/browser/ui/startup/bidding_and_auction_consented_debugging_infobar_delegate.h b/chrome/browser/ui/startup/bidding_and_auction_consented_debugging_infobar_delegate.h ---- a/chrome/browser/ui/startup/bidding_and_auction_consented_debugging_infobar_delegate.h -+++ b/chrome/browser/ui/startup/bidding_and_auction_consented_debugging_infobar_delegate.h -@@ -12,7 +12,7 @@ - - namespace content { - class WebContents; --}; -+} - - // An infobar for Chrome for Testing, which displays a message saying that this - // flavor of chrome is unsupported and does not auto-update. -diff --git a/chrome/browser/ui/views/side_panel/read_anything/read_anything_container_view.cc b/chrome/browser/ui/views/side_panel/read_anything/read_anything_container_view.cc ---- a/chrome/browser/ui/views/side_panel/read_anything/read_anything_container_view.cc -+++ b/chrome/browser/ui/views/side_panel/read_anything/read_anything_container_view.cc -@@ -23,12 +23,12 @@ - - namespace { - --int GetNormalizedFontScale(double font_scale) { -- DCHECK(font_scale >= kReadAnythingMinimumFontScale && -- font_scale <= kReadAnythingMaximumFontScale); -- return (font_scale - kReadAnythingMinimumFontScale) * -- (1 / kReadAnythingFontScaleIncrement); --} -+// int GetNormalizedFontScale(double font_scale) { -+// DCHECK(font_scale >= kReadAnythingMinimumFontScale && -+// font_scale <= kReadAnythingMaximumFontScale); -+// return (font_scale - kReadAnythingMinimumFontScale) * -+// (1 / kReadAnythingFontScaleIncrement); -+// } - - } // namespace - -diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc ---- a/chrome/browser/ui/views/tabs/tab.cc -+++ b/chrome/browser/ui/views/tabs/tab.cc -@@ -541,7 +541,7 @@ bool Tab::OnMousePressed(const ui::MouseEvent& event) { - } - - bool Tab::OnMouseDragged(const ui::MouseEvent& event) { -- controller_->ContinueDrag(this, event); -+ (void)controller_->ContinueDrag(this, event); // fix error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result] - return true; - } - -diff --git a/chrome/browser/ui/views/tabs/tab_group_header.cc b/chrome/browser/ui/views/tabs/tab_group_header.cc ---- a/chrome/browser/ui/views/tabs/tab_group_header.cc -+++ b/chrome/browser/ui/views/tabs/tab_group_header.cc -@@ -208,7 +208,7 @@ bool TabGroupHeader::OnMousePressed(const ui::MouseEvent& event) { - } - - bool TabGroupHeader::OnMouseDragged(const ui::MouseEvent& event) { -- tab_slot_controller_->ContinueDrag(this, event); -+ (void)tab_slot_controller_->ContinueDrag(this, event); - return true; - } - -diff --git a/chrome/browser/ui/webui/app_management/app_management_page_handler.cc b/chrome/browser/ui/webui/app_management/app_management_page_handler.cc ---- a/chrome/browser/ui/webui/app_management/app_management_page_handler.cc -+++ b/chrome/browser/ui/webui/app_management/app_management_page_handler.cc -@@ -137,6 +137,7 @@ bool CanShowDefaultAppAssociationsUi() { - #endif - } - -+#if BUILDFLAG(IS_CHROMEOS) - // Returns a list of intent filters that support http/https given an app ID. - apps::IntentFilters GetSupportedLinkIntentFilters(Profile* profile, - const std::string& app_id) { -@@ -171,6 +172,7 @@ std::vector GetSupportedLinks(Profile* profile, - return std::vector(supported_links.begin(), - supported_links.end()); - } -+#endif - - #if !BUILDFLAG(IS_CHROMEOS) - std::vector GetSupportedLinksForPWAs( -diff --git a/chrome/browser/usb/chrome_usb_delegate.cc b/chrome/browser/usb/chrome_usb_delegate.cc ---- a/chrome/browser/usb/chrome_usb_delegate.cc -+++ b/chrome/browser/usb/chrome_usb_delegate.cc -@@ -46,6 +46,7 @@ UsbChooserContext* GetChooserContext(content::BrowserContext* browser_context) { - return profile ? UsbChooserContextFactory::GetForProfile(profile) : nullptr; - } - -+#if !BUILDFLAG(IS_ANDROID) - UsbConnectionTracker* GetConnectionTracker( - content::BrowserContext* browser_context, - bool create) { -@@ -55,6 +56,7 @@ UsbConnectionTracker* GetConnectionTracker( - return profile ? UsbConnectionTrackerFactory::GetForProfile(profile, create) - : nullptr; - } -+#endif - - #if BUILDFLAG(ENABLE_EXTENSIONS) - // These extensions can claim the smart card USB class and automatically gain -diff --git a/components/autofill/core/browser/data_model/address.cc b/components/autofill/core/browser/data_model/address.cc ---- a/components/autofill/core/browser/data_model/address.cc -+++ b/components/autofill/core/browser/data_model/address.cc -@@ -59,7 +59,7 @@ Address& Address::operator=(const Address& address) { - - structured_address_->CopyFrom(address.GetStructuredAddress()); - return *this; --}; -+} - - bool Address::operator==(const Address& other) const { - if (this == &other) -diff --git a/components/autofill/core/browser/form_structure.cc b/components/autofill/core/browser/form_structure.cc ---- a/components/autofill/core/browser/form_structure.cc -+++ b/components/autofill/core/browser/form_structure.cc -@@ -221,6 +221,7 @@ void EncodeRandomizedValue(const RandomizedEncoder& encoder, - // In that case, use the server prediction instead. In the special case that - // the last specified manual override is a pass through, copy all server - // predictions. -+#if !BUILDFLAG(IS_ANDROID) - std::deque MergeManualAndServerOverrides( - std::deque manual_overrides, - std::deque server_overrides) { -@@ -246,6 +247,7 @@ std::deque MergeManualAndServerOverrides( - - return result; - } -+#endif - - void PopulateRandomizedFormMetadata(const RandomizedEncoder& encoder, - const FormStructure& form, -diff --git a/components/autofill/core/browser/webdata/autofill_table.cc b/components/autofill/core/browser/webdata/autofill_table.cc ---- a/components/autofill/core/browser/webdata/autofill_table.cc -+++ b/components/autofill/core/browser/webdata/autofill_table.cc -@@ -961,24 +961,24 @@ time_t GetEndTime(const base::Time& end) { - // Returns |s| with |escaper| in front of each of occurrence of a character - // from |special_chars|. Any occurrence of |escaper| in |s| is doubled. For - // example, Substitute("hello_world!", "_%", '!'') returns "hello!_world!!". --std::u16string Substitute(const std::u16string& s, -- const std::u16string& special_chars, -- const char16_t& escaper) { -- // Prepend |escaper| to the list of |special_chars|. -- std::u16string escape_wildcards(special_chars); -- escape_wildcards.insert(escape_wildcards.begin(), escaper); -- -- // Prepend the |escaper| just before |special_chars| in |s|. -- std::u16string result(s); -- for (char16_t c : escape_wildcards) { -- for (size_t pos = 0; (pos = result.find(c, pos)) != std::u16string::npos; -- pos += 2) { -- result.insert(result.begin() + pos, escaper); -- } -- } -- -- return result; --} -+// std::u16string Substitute(const std::u16string& s, -+// const std::u16string& special_chars, -+// const char16_t& escaper) { -+// // Prepend |escaper| to the list of |special_chars|. -+// std::u16string escape_wildcards(special_chars); -+// escape_wildcards.insert(escape_wildcards.begin(), escaper); -+ -+// // Prepend the |escaper| just before |special_chars| in |s|. -+// std::u16string result(s); -+// for (char16_t c : escape_wildcards) { -+// for (size_t pos = 0; (pos = result.find(c, pos)) != std::u16string::npos; -+// pos += 2) { -+// result.insert(result.begin() + pos, escaper); -+// } -+// } -+ -+// return result; -+// } - - // This helper function binds the `profile`s properties to the placeholders in - // `s`, in the order the columns are defined in the header file. -diff --git a/components/omnibox/browser/autocomplete_controller.h b/components/omnibox/browser/autocomplete_controller.h ---- a/components/omnibox/browser/autocomplete_controller.h -+++ b/components/omnibox/browser/autocomplete_controller.h -@@ -208,7 +208,7 @@ class AutocompleteController : public AutocompleteProviderListener, - OpenTabProvider* open_tab_provider() const { return open_tab_provider_; } - - const AutocompleteInput& input() const { return input_; } -- const AutocompleteResult& result() const { return published_result_; }; -+ const AutocompleteResult& result() const { return published_result_; } - // Groups `published_result_` by search vs URL. - // See also `AutocompleteResult::GroupSuggestionsBySearchVsURL()`. - void GroupSuggestionsBySearchVsURL(size_t begin, size_t end); diff --git a/components/omnibox/browser/omnibox_field_trial.cc b/components/omnibox/browser/omnibox_field_trial.cc --- a/components/omnibox/browser/omnibox_field_trial.cc +++ b/components/omnibox/browser/omnibox_field_trial.cc -@@ -1090,11 +1090,11 @@ MLConfig::MLConfig(const MLConfig&) = default; +@@ -1071,11 +1071,11 @@ MLConfig& MLConfig::operator=(const MLConfig& other) = default; ScopedMLConfigForTesting::ScopedMLConfigForTesting() : original_config_(std::make_unique(GetMLConfig())) { @@ -402,36 +67,6 @@ diff --git a/components/omnibox/browser/omnibox_field_trial.cc b/components/omni } MLConfig& ScopedMLConfigForTesting::GetMLConfig() { -diff --git a/components/omnibox/browser/omnibox_view.cc b/components/omnibox/browser/omnibox_view.cc ---- a/components/omnibox/browser/omnibox_view.cc -+++ b/components/omnibox/browser/omnibox_view.cc -@@ -56,12 +56,14 @@ bool RichAutocompletionEitherNonPrefixEnabled() { - kRichAutocompletionAutocompleteNonPrefixShortcutProvider.Get(); - } - -+#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) - // Return true if the given match uses a vector icon with a background. - bool HasVectorIconBackground(const AutocompleteMatch& match) { - return OmniboxFieldTrial::IsActionsUISimplificationEnabled() && - (match.type == AutocompleteMatchType::HISTORY_CLUSTER || - match.type == AutocompleteMatchType::PEDAL); - } -+#endif - - } // namespace - -diff --git a/components/omnibox/browser/tailored_word_break_iterator.cc b/components/omnibox/browser/tailored_word_break_iterator.cc ---- a/components/omnibox/browser/tailored_word_break_iterator.cc -+++ b/components/omnibox/browser/tailored_word_break_iterator.cc -@@ -18,7 +18,7 @@ TailoredWordBreakIterator::TailoredWordBreakIterator( - pos_(0), - word_breaks_{u"0123456789"}, - non_word_breaks_{u"_"}, -- all_breaks_{word_breaks_ + non_word_breaks_} {}; -+ all_breaks_{word_breaks_ + non_word_breaks_} {} - - TailoredWordBreakIterator::~TailoredWordBreakIterator() {} - diff --git a/components/safe_browsing/content/renderer/phishing_classifier/phishing_image_embedder.cc b/components/safe_browsing/content/renderer/phishing_classifier/phishing_image_embedder.cc --- a/components/safe_browsing/content/renderer/phishing_classifier/phishing_image_embedder.cc +++ b/components/safe_browsing/content/renderer/phishing_classifier/phishing_image_embedder.cc @@ -459,7 +94,7 @@ diff --git a/components/safe_browsing/content/renderer/phishing_classifier/phish diff --git a/content/browser/browser_interface_binders.cc b/content/browser/browser_interface_binders.cc --- a/content/browser/browser_interface_binders.cc +++ b/content/browser/browser_interface_binders.cc -@@ -346,6 +346,7 @@ void BindDateTimeChooserForFrame( +@@ -355,6 +355,7 @@ void BindDateTimeChooserForFrame( void BindTextSuggestionHostForFrame( RenderFrameHost* host, mojo::PendingReceiver receiver) { @@ -483,7 +118,7 @@ diff --git a/crypto/BUILD.gn b/crypto/BUILD.gn diff --git a/net/BUILD.gn b/net/BUILD.gn --- a/net/BUILD.gn +++ b/net/BUILD.gn -@@ -1651,6 +1651,7 @@ component("net") { +@@ -1650,6 +1650,7 @@ component("net") { configs -= [ "//build/config/compiler:default_optimization" ] configs += [ "//build/config/compiler:optimize_max" ] } diff --git a/build/patches/00Fonts-fingerprinting-mitigation.patch b/build/patches/00Fonts-fingerprinting-mitigation.patch index 4167379eb..529d0cfa4 100644 --- a/build/patches/00Fonts-fingerprinting-mitigation.patch +++ b/build/patches/00Fonts-fingerprinting-mitigation.patch @@ -115,7 +115,7 @@ diff --git a/skia/ext/skia_utils_win.h b/skia/ext/skia_utils_win.h diff --git a/third_party/blink/public/common/features.h b/third_party/blink/public/common/features.h --- a/third_party/blink/public/common/features.h +++ b/third_party/blink/public/common/features.h -@@ -247,6 +247,9 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kCompressParkableStrings); +@@ -252,6 +252,9 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kCompressParkableStrings); BLINK_COMMON_EXPORT extern const base::FeatureParam kMaxDiskDataAllocatorCapacityMB; @@ -128,7 +128,7 @@ diff --git a/third_party/blink/public/common/features.h b/third_party/blink/publ 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 -@@ -755,6 +755,7 @@ component("platform") { +@@ -762,6 +762,7 @@ component("platform") { "fonts/simple_font_data.cc", "fonts/simple_font_data.h", "fonts/skia/font_cache_skia.cc", diff --git a/build/patches/00Internal-firewall.patch b/build/patches/00Internal-firewall.patch index ff71dbc1e..ea3364f7e 100644 --- a/build/patches/00Internal-firewall.patch +++ b/build/patches/00Internal-firewall.patch @@ -58,7 +58,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -2552,6 +2552,7 @@ static_library("browser") { +@@ -2554,6 +2554,7 @@ static_library("browser") { "//third_party/ungoogled:switches", "//services/device/public/mojom", "//services/device/public/mojom:usb", @@ -69,7 +69,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -203,6 +203,7 @@ +@@ -207,6 +207,7 @@ #include "sandbox/policy/features.h" #include "sandbox/policy/switches.h" #include "services/device/public/cpp/device_features.h" @@ -239,9 +239,9 @@ new file mode 100644 diff --git a/net/BUILD.gn b/net/BUILD.gn --- a/net/BUILD.gn +++ b/net/BUILD.gn -@@ -1096,6 +1096,7 @@ component("net") { +@@ -1098,6 +1098,7 @@ component("net") { "//build:chromeos_buildflags", - "//net/data/ssl/chrome_root_store:gen_root_store_inc", + "//components/miracle_parameter/common", "//net/http:transport_security_state_generated_files", + "//services/firewall/public:firewall_builders", "//components/network_session_configurator/common" @@ -264,7 +264,7 @@ diff --git a/net/traffic_annotation/network_traffic_annotation.h b/net/traffic_a diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc --- a/net/url_request/url_request_http_job.cc +++ b/net/url_request/url_request_http_job.cc -@@ -262,6 +262,9 @@ URLRequestHttpJob::URLRequestHttpJob( +@@ -322,6 +322,9 @@ URLRequestHttpJob::URLRequestHttpJob( throttling_entry_ = manager->RegisterRequestUrl(request->url()); ResetTimer(); @@ -274,7 +274,7 @@ diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_reque } URLRequestHttpJob::~URLRequestHttpJob() { -@@ -556,6 +559,18 @@ void URLRequestHttpJob::MaybeStartTransactionInternal(int result) { +@@ -616,6 +619,18 @@ void URLRequestHttpJob::MaybeStartTransactionInternal(int result) { void URLRequestHttpJob::StartTransactionInternal() { DCHECK(!override_response_headers_); @@ -1558,7 +1558,7 @@ diff --git a/services/network/network_context.cc b/services/network/network_cont #include "services/network/brokered_client_socket_factory.h" #include "services/network/cookie_manager.h" #include "services/network/cors/cors_url_loader_factory.h" -@@ -1622,6 +1623,9 @@ void NetworkContext::OnNewSCTAuditingReportSent() { +@@ -1626,6 +1627,9 @@ void NetworkContext::OnNewSCTAuditingReportSent() { void NetworkContext::CreateUDPSocket( mojo::PendingReceiver receiver, mojo::PendingRemote listener) { @@ -1568,7 +1568,7 @@ diff --git a/services/network/network_context.cc b/services/network/network_cont socket_factory_->CreateUDPSocket(std::move(receiver), std::move(listener)); } -@@ -1634,6 +1638,17 @@ void NetworkContext::CreateRestrictedUDPSocket( +@@ -1638,6 +1642,17 @@ void NetworkContext::CreateRestrictedUDPSocket( mojo::PendingRemote listener, CreateRestrictedUDPSocketCallback callback) { // SimpleHostResolver is transitively owned by |this|. @@ -1586,7 +1586,7 @@ diff --git a/services/network/network_context.cc b/services/network/network_cont socket_factory_->CreateRestrictedUDPSocket( addr, mode, traffic_annotation, std::move(params), std::move(receiver), std::move(listener), SimpleHostResolver::Create(this), -@@ -1646,6 +1661,17 @@ void NetworkContext::CreateTCPServerSocket( +@@ -1650,6 +1665,17 @@ void NetworkContext::CreateTCPServerSocket( const net::MutableNetworkTrafficAnnotationTag& traffic_annotation, mojo::PendingReceiver receiver, CreateTCPServerSocketCallback callback) { @@ -1604,7 +1604,7 @@ diff --git a/services/network/network_context.cc b/services/network/network_cont socket_factory_->CreateTCPServerSocket( local_addr, std::move(options), static_cast(traffic_annotation), -@@ -1660,6 +1686,21 @@ void NetworkContext::CreateTCPConnectedSocket( +@@ -1664,6 +1690,21 @@ void NetworkContext::CreateTCPConnectedSocket( mojo::PendingReceiver receiver, mojo::PendingRemote observer, CreateTCPConnectedSocketCallback callback) { @@ -1626,7 +1626,7 @@ diff --git a/services/network/network_context.cc b/services/network/network_cont socket_factory_->CreateTCPConnectedSocket( local_addr, remote_addr_list, std::move(tcp_connected_socket_options), static_cast(traffic_annotation), -@@ -1671,6 +1712,20 @@ void NetworkContext::CreateTCPBoundSocket( +@@ -1675,6 +1716,20 @@ void NetworkContext::CreateTCPBoundSocket( const net::MutableNetworkTrafficAnnotationTag& traffic_annotation, mojo::PendingReceiver receiver, CreateTCPBoundSocketCallback callback) { @@ -1647,7 +1647,7 @@ diff --git a/services/network/network_context.cc b/services/network/network_cont socket_factory_->CreateTCPBoundSocket( local_addr, static_cast(traffic_annotation), -@@ -1736,6 +1791,24 @@ void NetworkContext::CreateWebSocket( +@@ -1741,6 +1796,24 @@ void NetworkContext::CreateWebSocket( mojo::PendingRemote auth_handler, mojo::PendingRemote header_client, const absl::optional& throttling_profile_id) { @@ -1951,7 +1951,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/fetch_utils.cc b/t diff --git a/third_party/blink/renderer/platform/loader/fetch/url_loader/url_loader.cc b/third_party/blink/renderer/platform/loader/fetch/url_loader/url_loader.cc --- a/third_party/blink/renderer/platform/loader/fetch/url_loader/url_loader.cc +++ b/third_party/blink/renderer/platform/loader/fetch/url_loader/url_loader.cc -@@ -287,7 +287,7 @@ void URLLoader::Context::Start( +@@ -276,7 +276,7 @@ void URLLoader::Context::Start( download_to_blob_registry.InitWithNewPipeAndPassReceiver()); } net::NetworkTrafficAnnotationTag tag = @@ -1960,7 +1960,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/url_loader/url_loa resource_request_sender_->SendSync( std::move(request), tag, loader_options, sync_load_response, url_loader_factory_, std::move(throttles), timeout_interval, -@@ -300,7 +300,7 @@ void URLLoader::Context::Start( +@@ -289,7 +289,7 @@ void URLLoader::Context::Start( TRACE_EVENT_WITH_FLOW0("loading", "URLLoader::Context::Start", this, TRACE_EVENT_FLAG_FLOW_OUT); net::NetworkTrafficAnnotationTag tag = @@ -1972,7 +1972,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/url_loader/url_loa diff --git a/tools/traffic_annotation/scripts/auditor/auditor.py b/tools/traffic_annotation/scripts/auditor/auditor.py --- a/tools/traffic_annotation/scripts/auditor/auditor.py +++ b/tools/traffic_annotation/scripts/auditor/auditor.py -@@ -830,6 +830,7 @@ class ArchivedAnnotation: +@@ -835,6 +835,7 @@ class ArchivedAnnotation: # the XML. This is used to serialize/deserialize the XML. FIELDS = [ "id", "added_in_milestone", "type", "second_id", "reserved", diff --git a/build/patches/00Keep-Side-Panel-Companion-disabled.patch b/build/patches/00Keep-Side-Panel-Companion-disabled.patch index f5ec4dde4..c108642ce 100644 --- a/build/patches/00Keep-Side-Panel-Companion-disabled.patch +++ b/build/patches/00Keep-Side-Panel-Companion-disabled.patch @@ -48,7 +48,7 @@ diff --git a/chrome/browser/ui/side_search/side_search_prefs.cc b/chrome/browser diff --git a/chrome/browser/ui/ui_features.cc b/chrome/browser/ui/ui_features.cc --- a/chrome/browser/ui/ui_features.cc +++ b/chrome/browser/ui/ui_features.cc -@@ -122,7 +122,7 @@ BASE_FEATURE(kResponsiveToolbar, +@@ -106,7 +106,7 @@ BASE_FEATURE(kResponsiveToolbar, // Enables the side search feature for Google Search. Presents recent Google // search results in a browser side panel. @@ -60,7 +60,7 @@ diff --git a/chrome/browser/ui/ui_features.cc b/chrome/browser/ui/ui_features.cc diff --git a/components/search_engines/template_url.cc b/components/search_engines/template_url.cc --- a/components/search_engines/template_url.cc +++ b/components/search_engines/template_url.cc -@@ -1829,7 +1829,7 @@ GURL TemplateURL::GenerateSuggestionURL( +@@ -1830,7 +1830,7 @@ GURL TemplateURL::GenerateSuggestionURL( } bool TemplateURL::IsSideSearchSupported() const { diff --git a/build/patches/00Keep-disabled-FetchLaterAPI.patch b/build/patches/00Keep-disabled-FetchLaterAPI.patch index 2fbbbb718..10400805d 100644 --- a/build/patches/00Keep-disabled-FetchLaterAPI.patch +++ b/build/patches/00Keep-disabled-FetchLaterAPI.patch @@ -3,9 +3,9 @@ Date: Thu, 28 Sep 2023 08:11:00 +0000 Subject: Keep disabled FetchLaterAPI --- - .../blink/common/features_cc/Keep-disabled-FetchLaterAPI.inc | 3 +++ - .../blink/renderer/platform/runtime_enabled_features.json5 | 3 ++- - 2 files changed, 5 insertions(+), 1 deletion(-) + .../blink/common/features_cc/Keep-disabled-FetchLaterAPI.inc | 3 +++ + .../blink/renderer/platform/runtime_enabled_features.json5 | 4 ++-- + 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 cromite_flags/third_party/blink/common/features_cc/Keep-disabled-FetchLaterAPI.inc diff --git a/cromite_flags/third_party/blink/common/features_cc/Keep-disabled-FetchLaterAPI.inc b/cromite_flags/third_party/blink/common/features_cc/Keep-disabled-FetchLaterAPI.inc @@ -19,15 +19,16 @@ 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 -@@ -1693,7 +1693,8 @@ +@@ -1754,8 +1754,8 @@ }, { // The Blink runtime-enabled feature name for the API's IDL. - name: "FetchLaterAPI", +- status: "experimental", + name: "FetchLaterAPI", // disable + status: "experimental", // by default - public: true, - }, - { + origin_trial_feature_name: "FetchLaterAPI", + base_feature: "FetchLaterAPI", + // base_feature is meant as kill-switch. This runtime-enabled feature -- 2.25.1 diff --git a/build/patches/00Keyboard-protection-flag.patch b/build/patches/00Keyboard-protection-flag.patch index aba8fcd2c..cb7843552 100644 --- a/build/patches/00Keyboard-protection-flag.patch +++ b/build/patches/00Keyboard-protection-flag.patch @@ -158,7 +158,7 @@ diff --git a/third_party/blink/renderer/core/events/keyboard_event.h b/third_par diff --git a/ui/base/ui_base_features.cc b/ui/base/ui_base_features.cc --- a/ui/base/ui_base_features.cc +++ b/ui/base/ui_base_features.cc -@@ -184,6 +184,14 @@ BASE_FEATURE(kSystemKeyboardLock, +@@ -192,6 +192,14 @@ BASE_FEATURE(kSystemKeyboardLock, "SystemKeyboardLock", base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/build/patches/00Log-dangling-attributes-in-some-html-elements.patch b/build/patches/00Log-dangling-attributes-in-some-html-elements.patch index 36799908b..a1c9365c5 100644 --- a/build/patches/00Log-dangling-attributes-in-some-html-elements.patch +++ b/build/patches/00Log-dangling-attributes-in-some-html-elements.patch @@ -41,7 +41,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 -@@ -4580,6 +4580,14 @@ void Document::ProcessBaseElement() { +@@ -4556,6 +4556,14 @@ void Document::ProcessBaseElement() { KURL base_element_url; if (href) { String stripped_href = StripLeadingAndTrailingHTMLSpaces(*href); @@ -56,7 +56,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink if (!stripped_href.empty()) base_element_url = KURL(FallbackBaseURL(), stripped_href); } -@@ -4598,6 +4606,14 @@ void Document::ProcessBaseElement() { +@@ -4573,6 +4581,14 @@ void Document::ProcessBaseElement() { !GetExecutionContext()->GetSecurityOrigin()->CanRequest( base_element_url)) { UseCounter::Count(*this, WebFeature::kBaseWithCrossOriginHref); @@ -71,7 +71,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink } } -@@ -4617,6 +4633,8 @@ void Document::ProcessBaseElement() { +@@ -4592,6 +4608,8 @@ void Document::ProcessBaseElement() { if (target->Contains('<')) UseCounter::Count(*this, WebFeature::kBaseWithOpenBracketInTarget); base_target_ = *target; @@ -83,7 +83,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/renderer/core/dom/element.cc --- a/third_party/blink/renderer/core/dom/element.cc +++ b/third_party/blink/renderer/core/dom/element.cc -@@ -2608,8 +2608,26 @@ void Element::StripScriptingAttributes( +@@ -2587,8 +2587,26 @@ void Element::StripScriptingAttributes( attribute_vector.Shrink(destination); } @@ -163,14 +163,14 @@ diff --git a/third_party/blink/renderer/core/html/html_base_element.cc b/third_p + Element::ParserSetAttributes(attribute_vector); +} + - KURL HTMLBaseElement::href() const { + String HTMLBaseElement::href() const { // This does not use the GetURLAttribute function because that will resolve // relative to the document's base URL; base elements like this one can be diff --git a/third_party/blink/renderer/core/html/html_base_element.h b/third_party/blink/renderer/core/html/html_base_element.h --- a/third_party/blink/renderer/core/html/html_base_element.h +++ b/third_party/blink/renderer/core/html/html_base_element.h @@ -37,6 +37,8 @@ class CORE_EXPORT HTMLBaseElement final : public HTMLElement { - KURL href() const; + String href() const; void setHref(const AtomicString&); + void ParserSetAttributes(Vector&) override; @@ -318,7 +318,7 @@ diff --git a/third_party/blink/renderer/core/page/frame_tree.cc b/third_party/bl 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 -@@ -1518,8 +1518,8 @@ +@@ -1578,8 +1578,8 @@ // Experiment with preventing some instances of mutation XSS // by escaping "<" and ">" in attribute values. // See: crbug.com/1175016 @@ -329,7 +329,7 @@ diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 }, { name: "EventTimingInteractionCount", -@@ -2289,6 +2289,12 @@ +@@ -2374,6 +2374,12 @@ // Use LongAnimationFrameMonitor to emit longtask entries name: "LongTaskFromLongAnimationFrame" }, diff --git a/build/patches/00Partition-HSTS-cache-by-NAK.patch b/build/patches/00Partition-HSTS-cache-by-NAK.patch index 64553d902..c1f0fee5a 100644 --- a/build/patches/00Partition-HSTS-cache-by-NAK.patch +++ b/build/patches/00Partition-HSTS-cache-by-NAK.patch @@ -12,11 +12,11 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html net/quic/crypto/proof_verifier_chromium.cc | 2 +- net/socket/ssl_client_socket_impl.cc | 2 +- .../url_request_context_builder.cc | 14 --- - net/url_request/url_request_http_job.cc | 6 +- + net/url_request/url_request_http_job.cc | 7 +- services/network/network_context.cc | 26 +++-- services/network/network_context.h | 11 ++- .../public/mojom/network_context.mojom | 8 +- - 12 files changed, 131 insertions(+), 84 deletions(-) + 12 files changed, 132 insertions(+), 84 deletions(-) diff --git a/chrome/browser/ssl/https_upgrades_interceptor.cc b/chrome/browser/ssl/https_upgrades_interceptor.cc --- a/chrome/browser/ssl/https_upgrades_interceptor.cc @@ -495,16 +495,17 @@ diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/ur diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc --- a/net/url_request/url_request_http_job.cc +++ b/net/url_request/url_request_http_job.cc -@@ -225,7 +225,7 @@ std::unique_ptr URLRequestHttpJob::Create(URLRequest* request) { - // Check for HSTS upgrade. - TransportSecurityState* hsts = - request->context()->transport_security_state(); -- if (hsts && hsts->ShouldUpgradeToSSL(url.host(), request->net_log())) { -+ if (hsts && hsts->ShouldUpgradeToSSL(request->isolation_info().network_anonymization_key(), url.host(), request->net_log())) { - return std::make_unique( - request, UpgradeSchemeToCryptographic(url), - // Use status code 307 to preserve the method, so POST requests work. -@@ -1056,7 +1056,7 @@ void URLRequestHttpJob::ProcessStrictTransportSecurityHeader() { +@@ -261,7 +261,8 @@ std::unique_ptr URLRequestHttpJob::Create(URLRequest* request) { + + TransportSecurityState* hsts = request->context()->transport_security_state(); + bool should_upgrade_to_ssl = +- hsts && hsts->ShouldUpgradeToSSL(url.host(), request->net_log()); ++ hsts && hsts->ShouldUpgradeToSSL(request->isolation_info().network_anonymization_key(), ++ url.host(), request->net_log()); + + // Check for reasons not to return a URLRequestHttpJob. These don't apply to + // https and wss requests. +@@ -1078,7 +1079,7 @@ void URLRequestHttpJob::ProcessStrictTransportSecurityHeader() { HttpResponseHeaders* headers = GetResponseHeaders(); std::string value; if (headers->EnumerateHeader(nullptr, "Strict-Transport-Security", &value)) @@ -513,7 +514,7 @@ diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_reque } void URLRequestHttpJob::OnStartCompleted(int result) { -@@ -1126,7 +1126,7 @@ void URLRequestHttpJob::OnStartCompleted(int result) { +@@ -1148,7 +1149,7 @@ void URLRequestHttpJob::OnStartCompleted(int result) { TransportSecurityState* state = context->transport_security_state(); NotifySSLCertificateError( result, transaction_->GetResponseInfo()->ssl_info, @@ -525,7 +526,7 @@ diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_reque 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 -@@ -1884,17 +1884,19 @@ void NetworkContext::SetCorsOriginAccessListsForOrigin( +@@ -1890,17 +1890,19 @@ void NetworkContext::SetCorsOriginAccessListsForOrigin( std::move(callback).Run(); } @@ -548,7 +549,7 @@ diff --git a/services/network/network_context.cc b/services/network/network_cont IsHSTSActiveForHostCallback callback) { net::TransportSecurityState* security_state = url_request_context_->transport_security_state(); -@@ -1904,10 +1906,10 @@ void NetworkContext::IsHSTSActiveForHost(const std::string& host, +@@ -1910,10 +1912,10 @@ void NetworkContext::IsHSTSActiveForHost(const std::string& host, return; } @@ -561,7 +562,7 @@ diff --git a/services/network/network_context.cc b/services/network/network_cont GetHSTSStateCallback callback) { base::Value::Dict result; -@@ -1943,10 +1945,10 @@ void NetworkContext::GetHSTSState(const std::string& domain, +@@ -1951,10 +1953,10 @@ void NetworkContext::GetHSTSState(const std::string& domain, net::TransportSecurityState::STSState dynamic_sts_state; net::TransportSecurityState::PKPState dynamic_pkp_state; bool found_sts_dynamic = transport_security_state->GetDynamicSTSState( @@ -574,7 +575,7 @@ diff --git a/services/network/network_context.cc b/services/network/network_cont if (found_sts_dynamic) { result.Set("dynamic_upgrade_mode", static_cast(dynamic_sts_state.upgrade_mode)); -@@ -1982,6 +1984,7 @@ void NetworkContext::GetHSTSState(const std::string& domain, +@@ -1992,6 +1994,7 @@ void NetworkContext::GetHSTSState(const std::string& domain, } void NetworkContext::DeleteDynamicDataForHost( @@ -582,7 +583,7 @@ diff --git a/services/network/network_context.cc b/services/network/network_cont const std::string& host, DeleteDynamicDataForHostCallback callback) { net::TransportSecurityState* transport_security_state = -@@ -1992,7 +1995,7 @@ void NetworkContext::DeleteDynamicDataForHost( +@@ -2002,7 +2005,7 @@ void NetworkContext::DeleteDynamicDataForHost( } std::move(callback).Run( @@ -591,7 +592,7 @@ diff --git a/services/network/network_context.cc b/services/network/network_cont } void NetworkContext::EnableStaticKeyPinningForTesting( -@@ -2125,7 +2128,7 @@ void NetworkContext::PreconnectSockets( +@@ -2146,7 +2149,7 @@ void NetworkContext::PreconnectSockets( DCHECK(!require_network_anonymization_key_ || !network_anonymization_key.IsEmpty()); @@ -600,7 +601,7 @@ diff --git a/services/network/network_context.cc b/services/network/network_cont // |PreconnectSockets| may receive arguments from the renderer, which is not // guaranteed to validate them. -@@ -2945,12 +2948,15 @@ void NetworkContext::OnConnectionError() { +@@ -2971,12 +2974,15 @@ void NetworkContext::OnConnectionError() { std::move(on_connection_close_callback_).Run(this); } @@ -620,7 +621,7 @@ diff --git a/services/network/network_context.cc b/services/network/network_cont diff --git a/services/network/network_context.h b/services/network/network_context.h --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -419,15 +419,17 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -421,15 +421,17 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext const std::string& ocsp_result, const std::string& sct_list, VerifyCertForSignedExchangeCallback callback) override; @@ -641,7 +642,7 @@ diff --git a/services/network/network_context.h b/services/network/network_conte const std::string& host, DeleteDynamicDataForHostCallback callback) override; void SetCorsOriginAccessListsForOrigin( -@@ -724,7 +726,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -726,7 +728,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext mojo::PendingRemote cookie_observer, net::FirstPartySetMetadata first_party_set_metadata); @@ -654,7 +655,7 @@ diff --git a/services/network/network_context.h b/services/network/network_conte diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1529,16 +1529,16 @@ interface NetworkContext { +@@ -1537,16 +1537,16 @@ interface NetworkContext { // Adds explicitly-specified data as if it was processed from an // HSTS header. Used by tests and implementation of chrome://net-internals. @@ -674,7 +675,7 @@ diff --git a/services/network/public/mojom/network_context.mojom b/services/netw => (mojo_base.mojom.DictionaryValue state); // Sets allowed and blocked origins respectively for the URLLoaderFactory -@@ -1557,7 +1557,7 @@ interface NetworkContext { +@@ -1565,7 +1565,7 @@ interface NetworkContext { // Deletes any dynamic data stored for |host| from the transport // security state. Returns true iff an entry was deleted. // See net::TransportSecurityState::DeleteDynamicDataForHost for more detail. diff --git a/build/patches/00Partition-MediaDeviceId-by-default.patch b/build/patches/00Partition-MediaDeviceId-by-default.patch index 7880c3c1f..a38faea58 100644 --- a/build/patches/00Partition-MediaDeviceId-by-default.patch +++ b/build/patches/00Partition-MediaDeviceId-by-default.patch @@ -16,7 +16,7 @@ diff --git a/components/media_device_salt/media_device_salt_service.cc b/compone +++ b/components/media_device_salt/media_device_salt_service.cc @@ -29,6 +29,9 @@ BASE_FEATURE(kMediaDeviceIdRandomSaltsPerStorageKey, "MediaDeviceIdRandomSaltsPerStorageKey", - base::FEATURE_DISABLED_BY_DEFAULT); + base::FEATURE_ENABLED_BY_DEFAULT); +SET_CROMITE_FEATURE_ENABLED(kMediaDeviceIdPartitioning); +SET_CROMITE_FEATURE_ENABLED(kMediaDeviceIdRandomSaltsPerStorageKey); diff --git a/build/patches/00Partitioning-all-cookies-by-top-frame-domain.patch b/build/patches/00Partitioning-all-cookies-by-top-frame-domain.patch index bb811e05b..30a2bd6eb 100644 --- a/build/patches/00Partitioning-all-cookies-by-top-frame-domain.patch +++ b/build/patches/00Partitioning-all-cookies-by-top-frame-domain.patch @@ -34,7 +34,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/browser/net/profile_network_context_service.cc b/chrome/browser/net/profile_network_context_service.cc --- a/chrome/browser/net/profile_network_context_service.cc +++ b/chrome/browser/net/profile_network_context_service.cc -@@ -613,14 +613,14 @@ ProfileNetworkContextService::CreateCookieManagerParams( +@@ -578,14 +578,14 @@ ProfileNetworkContextService::CreateCookieManagerParams( // UI to interact with SameSite cookies on accounts.google.com, which is used // for displaying a list of available accounts on the NTP // (chrome://new-tab-page), etc. @@ -56,7 +56,7 @@ diff --git a/chrome/browser/net/profile_network_context_service.cc b/chrome/brow diff --git a/components/content_settings/core/common/cookie_settings_base.cc b/components/content_settings/core/common/cookie_settings_base.cc --- a/components/content_settings/core/common/cookie_settings_base.cc +++ b/components/content_settings/core/common/cookie_settings_base.cc -@@ -318,7 +318,7 @@ CookieSettingsBase::GetCookieSettingInternal( +@@ -414,7 +414,7 @@ CookieSettingsBase::GetCookieSettingInternal( absl::optional scope; if (block_third) { scope = IsAllowed(setting) @@ -64,7 +64,7 @@ diff --git a/components/content_settings/core/common/cookie_settings_base.cc b/c + ? ThirdPartyBlockingScope::kUnpartitionedAndPartitioned : ThirdPartyBlockingScope::kUnpartitionedAndPartitioned; } - return {block_third ? CONTENT_SETTING_BLOCK : setting, scope, + diff --git a/cromite_flags/components/content_settings/core/common/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc b/cromite_flags/components/content_settings/core/common/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc new file mode 100644 --- /dev/null @@ -96,7 +96,7 @@ new file mode 100644 diff --git a/net/cookies/canonical_cookie.cc b/net/cookies/canonical_cookie.cc --- a/net/cookies/canonical_cookie.cc +++ b/net/cookies/canonical_cookie.cc -@@ -1469,8 +1469,6 @@ bool CanonicalCookie::IsCanonicalForFromStorage() const { +@@ -1488,8 +1488,6 @@ bool CanonicalCookie::IsCanonicalForFromStorage() const { if (IsPartitioned()) { if (CookiePartitionKey::HasNonce(partition_key_)) return true; @@ -105,7 +105,7 @@ diff --git a/net/cookies/canonical_cookie.cc b/net/cookies/canonical_cookie.cc } return true; -@@ -1727,15 +1725,7 @@ bool CanonicalCookie::IsCookiePartitionedValid(const GURL& url, +@@ -1746,15 +1744,7 @@ bool CanonicalCookie::IsCookiePartitionedValid(const GURL& url, bool secure, bool is_partitioned, bool partition_has_nonce) { @@ -162,7 +162,7 @@ diff --git a/net/cookies/parsed_cookie.h b/net/cookies/parsed_cookie.h diff --git a/net/extras/sqlite/sqlite_persistent_cookie_store.cc b/net/extras/sqlite/sqlite_persistent_cookie_store.cc --- a/net/extras/sqlite/sqlite_persistent_cookie_store.cc +++ b/net/extras/sqlite/sqlite_persistent_cookie_store.cc -@@ -814,6 +814,16 @@ bool SQLitePersistentCookieStore::Backend::DoInitializeDatabase() { +@@ -741,6 +741,16 @@ bool SQLitePersistentCookieStore::Backend::DoInitializeDatabase() { if (!restore_old_session_cookies_) DeleteSessionCookiesOnStartup(); @@ -182,21 +182,21 @@ diff --git a/net/extras/sqlite/sqlite_persistent_cookie_store.cc b/net/extras/sq diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc --- a/net/url_request/url_request_http_job.cc +++ b/net/url_request/url_request_http_job.cc -@@ -759,7 +759,7 @@ void URLRequestHttpJob::SetCookieHeaderAndStart( +@@ -788,7 +788,7 @@ void URLRequestHttpJob::SetCookieHeaderAndStart( - size_t n_partitioned_cookies = 0; - bool may_set_sec_cookie_deprecation_header = -- !request_->context()->cookie_deprecation_label().value_or("").empty(); -+ false; + size_t n_partitioned_cookies = 0; + bool may_set_sec_cookie_deprecation_header = +- !request_->context()->cookie_deprecation_label().value_or("").empty(); ++ false; - // TODO(crbug.com/1031664): Reduce the number of times the cookie list - // is iterated over. Get metrics for every cookie which is included. + // TODO(crbug.com/1031664): Reduce the number of times the cookie list + // is iterated over. Get metrics for every cookie which is included. diff --git a/services/network/restricted_cookie_manager.cc b/services/network/restricted_cookie_manager.cc --- a/services/network/restricted_cookie_manager.cc +++ b/services/network/restricted_cookie_manager.cc -@@ -808,6 +808,9 @@ void RestrictedCookieManager::SetCookieFromString( - std::move(callback).Run(site_for_cookies_ok, top_frame_origin_ok); - callback = base::DoNothing(); +@@ -933,6 +933,9 @@ void RestrictedCookieManager::SetCookieFromString( + + std::move(callback).Run(); + // https://bugs.chromium.org/p/chromium/issues/detail?id=911299 + if (!site_for_cookies_ok || !top_frame_origin_ok) return; @@ -217,7 +217,7 @@ diff --git a/third_party/blink/renderer/modules/cookie_store/cookie_init.idl b/t diff --git a/third_party/blink/renderer/modules/cookie_store/cookie_store.cc b/third_party/blink/renderer/modules/cookie_store/cookie_store.cc --- a/third_party/blink/renderer/modules/cookie_store/cookie_store.cc +++ b/third_party/blink/renderer/modules/cookie_store/cookie_store.cc -@@ -321,6 +321,10 @@ ScriptPromise CookieStore::set(ScriptState* script_state, +@@ -322,6 +322,10 @@ ScriptPromise CookieStore::set(ScriptState* script_state, CookieInit* set_options = CookieInit::Create(); set_options->setName(name); set_options->setValue(value); @@ -228,7 +228,7 @@ diff --git a/third_party/blink/renderer/modules/cookie_store/cookie_store.cc b/t return set(script_state, set_options, exception_state); } -@@ -343,6 +347,10 @@ ScriptPromise CookieStore::Delete(ScriptState* script_state, +@@ -344,6 +348,10 @@ ScriptPromise CookieStore::Delete(ScriptState* script_state, set_options->setName(name); set_options->setValue("deleted"); set_options->setExpires(0); @@ -239,7 +239,7 @@ diff --git a/third_party/blink/renderer/modules/cookie_store/cookie_store.cc b/t return DoWrite(script_state, set_options, exception_state); } -@@ -357,6 +365,10 @@ ScriptPromise CookieStore::Delete(ScriptState* script_state, +@@ -358,6 +366,10 @@ ScriptPromise CookieStore::Delete(ScriptState* script_state, set_options->setPath(options->path()); set_options->setSameSite("strict"); set_options->setPartitioned(options->partitioned()); diff --git a/build/patches/00Remove-ChromiumNetworkAdapter.patch b/build/patches/00Remove-ChromiumNetworkAdapter.patch index 2a4d7fdc8..290aae8b7 100644 --- a/build/patches/00Remove-ChromiumNetworkAdapter.patch +++ b/build/patches/00Remove-ChromiumNetworkAdapter.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/android/java/src/org/chromium/chrome/browser/download/OMADownloadHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/download/OMADownloadHandler.java --- a/chrome/android/java/src/org/chromium/chrome/browser/download/OMADownloadHandler.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/download/OMADownloadHandler.java -@@ -968,44 +968,6 @@ public class OMADownloadHandler extends BroadcastReceiver { +@@ -969,44 +969,6 @@ public class OMADownloadHandler extends BroadcastReceiver { protected Boolean doInBackground() { HttpURLConnection urlConnection = null; boolean success = false; @@ -67,7 +67,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/OMADow diff --git a/chrome/android/java/src/org/chromium/chrome/browser/feedback/ConnectivityChecker.java b/chrome/android/java/src/org/chromium/chrome/browser/feedback/ConnectivityChecker.java --- a/chrome/android/java/src/org/chromium/chrome/browser/feedback/ConnectivityChecker.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/feedback/ConnectivityChecker.java -@@ -136,42 +136,7 @@ public final class ConnectivityChecker { +@@ -137,42 +137,7 @@ public final class ConnectivityChecker { postResult(callback, ConnectivityCheckResult.ERROR); return; } @@ -178,8 +178,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/net/connectivit diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java --- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java -@@ -461,8 +461,7 @@ public class OmahaBase { - + "}"); +@@ -463,8 +463,7 @@ public class OmahaBase { + }"""); try { URL url = new URL(getRequestGenerator().getServerUrl()); - HttpURLConnection connection = diff --git a/build/patches/00Remove-auth-header-upon-cross-origin-redirect.patch b/build/patches/00Remove-auth-header-upon-cross-origin-redirect.patch index 75e72d3f4..1bec8ddc1 100644 --- a/build/patches/00Remove-auth-header-upon-cross-origin-redirect.patch +++ b/build/patches/00Remove-auth-header-upon-cross-origin-redirect.patch @@ -19,7 +19,7 @@ new file mode 100644 diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_loader.cc b/third_party/blink/renderer/platform/loader/fetch/resource_loader.cc --- a/third_party/blink/renderer/platform/loader/fetch/resource_loader.cc +++ b/third_party/blink/renderer/platform/loader/fetch/resource_loader.cc -@@ -822,6 +822,9 @@ bool ResourceLoader::WillFollowRedirect( +@@ -544,6 +544,9 @@ bool ResourceLoader::WillFollowRedirect( new_url)) { fetcher_->GetUseCounter().CountUse( mojom::WebFeature::kAuthorizationCrossOrigin); @@ -32,7 +32,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_loader.cc diff --git a/third_party/blink/renderer/platform/loader/fetch/url_loader/sync_load_context.cc b/third_party/blink/renderer/platform/loader/fetch/url_loader/sync_load_context.cc --- a/third_party/blink/renderer/platform/loader/fetch/url_loader/sync_load_context.cc +++ b/third_party/blink/renderer/platform/loader/fetch/url_loader/sync_load_context.cc -@@ -197,6 +197,10 @@ void SyncLoadContext::FollowRedirect(std::vector removed_headers) { +@@ -199,6 +199,10 @@ void SyncLoadContext::FollowRedirect(std::vector removed_headers, return; } @@ -42,6 +42,6 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/url_loader/sync_lo + response_->redirect_info = net::RedirectInfo(); *context_for_redirect_ = nullptr; - std::move(follow_redirect_callback_).Run(std::move(removed_headers)); + std::move(follow_redirect_callback_) -- 2.25.1 diff --git a/build/patches/00Remove-detection-of-captive-portals.patch b/build/patches/00Remove-detection-of-captive-portals.patch index 52d9205c2..b0490ad37 100644 --- a/build/patches/00Remove-detection-of-captive-portals.patch +++ b/build/patches/00Remove-detection-of-captive-portals.patch @@ -10,7 +10,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/browser/net/profile_network_context_service.cc b/chrome/browser/net/profile_network_context_service.cc --- a/chrome/browser/net/profile_network_context_service.cc +++ b/chrome/browser/net/profile_network_context_service.cc -@@ -411,7 +411,7 @@ void ProfileNetworkContextService::UpdateAdditionalCertificates() { +@@ -364,7 +364,7 @@ void ProfileNetworkContextService::UpdateAdditionalCertificates() { void ProfileNetworkContextService::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref(embedder_support::kAlternateErrorPagesEnabled, diff --git a/build/patches/00Restore-LastTabStandingTracker.patch b/build/patches/00Restore-LastTabStandingTracker.patch index 05daf670a..3dbc75676 100644 --- a/build/patches/00Restore-LastTabStandingTracker.patch +++ b/build/patches/00Restore-LastTabStandingTracker.patch @@ -27,7 +27,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -1970,6 +1970,16 @@ static_library("browser") { +@@ -1972,6 +1972,16 @@ static_library("browser") { ] } @@ -378,15 +378,15 @@ new file mode 100644 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 -@@ -123,6 +123,7 @@ +@@ -112,6 +112,7 @@ #include "chrome/browser/password_manager/password_reuse_manager_factory.h" - #include "chrome/browser/password_manager/password_store_factory.h" + #include "chrome/browser/password_manager/profile_password_store_factory.h" #include "chrome/browser/permissions/adaptive_quiet_notification_permission_ui_enabler.h" +#include "chrome/browser/permissions/last_tab_standing_tracker_factory.h" #include "chrome/browser/permissions/notifications_engagement_service_factory.h" #include "chrome/browser/permissions/one_time_permissions_tracker_factory.h" #include "chrome/browser/permissions/origin_keyed_permission_action_service_factory.h" -@@ -921,6 +922,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -908,6 +909,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #if BUILDFLAG(BUILD_WITH_TFLITE_LIB) OnDeviceTailModelServiceFactory::GetInstance(); #endif @@ -397,7 +397,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc 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 -@@ -63,6 +63,7 @@ +@@ -54,6 +54,7 @@ #include "chrome/browser/page_load_metrics/page_load_metrics_initialize.h" #include "chrome/browser/password_manager/chrome_password_manager_client.h" #include "chrome/browser/performance_manager/public/user_tuning/user_performance_tuning_manager.h" @@ -405,13 +405,13 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc #include "chrome/browser/permissions/one_time_permissions_tracker_helper.h" #include "chrome/browser/predictors/loading_predictor_factory.h" #include "chrome/browser/predictors/loading_predictor_tab_helper.h" -@@ -396,6 +397,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { +@@ -388,6 +389,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { HistoryClustersTabHelper::CreateForWebContents(web_contents); HttpsOnlyModeTabHelper::CreateForWebContents(web_contents); webapps::InstallableManager::CreateForWebContents(web_contents); + LastTabStandingTrackerTabHelper::CreateForWebContents(web_contents); login_detection::LoginDetectionTabHelper::MaybeCreateForWebContents( web_contents); - if (MediaEngagementService::IsEnabled()) + if (MediaEngagementService::IsEnabled()) { -- 2.25.1 diff --git a/build/patches/00TEMP-Add-a-log-to-track-strange-behavior.patch b/build/patches/00TEMP-Add-a-log-to-track-strange-behavior.patch index 7d1f9cd32..1e21d966e 100644 --- a/build/patches/00TEMP-Add-a-log-to-track-strange-behavior.patch +++ b/build/patches/00TEMP-Add-a-log-to-track-strange-behavior.patch @@ -10,7 +10,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc --- a/net/spdy/spdy_session.cc +++ b/net/spdy/spdy_session.cc -@@ -2964,6 +2964,7 @@ void SpdySession::OnHeaders(spdy::SpdyStreamId stream_id, +@@ -2974,6 +2974,7 @@ void SpdySession::OnHeaders(spdy::SpdyStreamId stream_id, if (it == active_streams_.end()) { // NOTE: it may just be that the stream was cancelled. LOG(WARNING) << "Received HEADERS for invalid stream " << stream_id; diff --git a/build/patches/00Temp-guard-FileSystemAccessPersistentPermissions.patch b/build/patches/00Temp-guard-FileSystemAccessPersistentPermissions.patch index 8a5b98430..30a566a56 100644 --- a/build/patches/00Temp-guard-FileSystemAccessPersistentPermissions.patch +++ b/build/patches/00Temp-guard-FileSystemAccessPersistentPermissions.patch @@ -3,31 +3,14 @@ Date: Sun, 29 Oct 2023 15:18:24 +0000 Subject: Temp guard FileSystemAccessPersistentPermissions --- - .../chrome_file_system_access_permission_context.cc | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) + .../chrome_file_system_access_permission_context.cc | 4 ++-- + .../browser/file_system_access/file_system_access_features.cc | 4 ++++ + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc --- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc +++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -@@ -75,13 +75,13 @@ - - namespace features { - BASE_FEATURE(kFileSystemAccessPersistentPermissions, -- "kFileSystemAccessPersistentPermissions", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "kFileSystemAccessPersistentPermissions", // guard -+ base::FEATURE_DISABLED_BY_DEFAULT); // this - - #if BUILDFLAG(IS_WIN) - BASE_FEATURE(kFileSystemAccessLocalUNCPathBlock, -- "kFileSystemAccessLocalUNCPathBlock", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "kFileSystemAccessLocalUNCPathBlock", // guard -+ base::FEATURE_ENABLED_BY_DEFAULT); // this - #endif - } // namespace features - -@@ -377,7 +377,7 @@ bool ShouldBlockAccessToPath(const base::FilePath& check_path, +@@ -375,7 +375,7 @@ bool ShouldBlockAccessToPath(const base::FilePath& check_path, } if (check_path == blocked_path || check_path.IsParent(blocked_path)) { @@ -36,7 +19,7 @@ diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permiss << " because it is a parent of " << blocked_path << " (" << block.base_path_key << ")"; return true; -@@ -406,7 +406,7 @@ bool ShouldBlockAccessToPath(const base::FilePath& check_path, +@@ -404,7 +404,7 @@ bool ShouldBlockAccessToPath(const base::FilePath& check_path, } // The nearest ancestor blocks access to its children, so block access. @@ -45,5 +28,17 @@ diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permiss << nearest_ancestor << " (" << nearest_ancestor_path_key << ")"; return true; } +diff --git a/chrome/browser/file_system_access/file_system_access_features.cc b/chrome/browser/file_system_access/file_system_access_features.cc +--- a/chrome/browser/file_system_access/file_system_access_features.cc ++++ b/chrome/browser/file_system_access/file_system_access_features.cc +@@ -22,4 +22,8 @@ BASE_FEATURE(kFileSystemAccessPersistentPermissions, + "kFileSystemAccessPersistentPermissions", + base::FEATURE_DISABLED_BY_DEFAULT); + ++#if BUILDFLAG(IS_WIN) ++SET_CROMITE_FEATURE_ENABLED(kFileSystemAccessLocalUNCPathBlock); ++#endif ++SET_CROMITE_FEATURE_DISABLED(kFileSystemAccessPersistentPermissions); + } // namespace features -- 2.25.1 diff --git a/build/patches/00WIN-Add-some-prefs-to-secure-preferences.patch b/build/patches/00WIN-Add-some-prefs-to-secure-preferences.patch index d71ad7d61..4bfd615ca 100644 --- a/build/patches/00WIN-Add-some-prefs-to-secure-preferences.patch +++ b/build/patches/00WIN-Add-some-prefs-to-secure-preferences.patch @@ -9,7 +9,7 @@ Subject: WIN Add some prefs to secure preferences diff --git a/chrome/browser/prefs/chrome_pref_service_factory.cc b/chrome/browser/prefs/chrome_pref_service_factory.cc --- a/chrome/browser/prefs/chrome_pref_service_factory.cc +++ b/chrome/browser/prefs/chrome_pref_service_factory.cc -@@ -121,6 +121,14 @@ bool g_disable_domain_check_for_testing = false; +@@ -116,6 +116,14 @@ bool g_disable_domain_check_for_testing = false; // See CleanupDeprecatedTrackedPreferences() in pref_hash_filter.cc to remove a // deprecated tracked preference. const prefs::TrackedPreferenceMetadata kTrackedPrefs[] = { diff --git a/build/patches/00WIN-Disable-TabHoverCard-images.patch b/build/patches/00WIN-Disable-TabHoverCard-images.patch index 55727f005..ccd71686d 100644 --- a/build/patches/00WIN-Disable-TabHoverCard-images.patch +++ b/build/patches/00WIN-Disable-TabHoverCard-images.patch @@ -10,7 +10,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/browser/ui/ui_features.cc b/chrome/browser/ui/ui_features.cc --- a/chrome/browser/ui/ui_features.cc +++ b/chrome/browser/ui/ui_features.cc -@@ -217,11 +217,7 @@ BASE_FEATURE(kTabHoverCardImageSettings, +@@ -206,11 +206,7 @@ BASE_FEATURE(kTabHoverCardImageSettings, // https://crbug.com/928954 BASE_FEATURE(kTabHoverCardImages, "TabHoverCardImages", diff --git a/build/patches/00WIN-Disable-search-for-image.patch b/build/patches/00WIN-Disable-search-for-image.patch index 1da35b958..5d0a068af 100644 --- a/build/patches/00WIN-Disable-search-for-image.patch +++ b/build/patches/00WIN-Disable-search-for-image.patch @@ -9,7 +9,7 @@ Subject: WIN Disable search for image diff --git a/components/renderer_context_menu/context_menu_content_type.cc b/components/renderer_context_menu/context_menu_content_type.cc --- a/components/renderer_context_menu/context_menu_content_type.cc +++ b/components/renderer_context_menu/context_menu_content_type.cc -@@ -99,7 +99,7 @@ bool ContextMenuContentType::SupportsGroupInternal(int group) { +@@ -98,7 +98,7 @@ bool ContextMenuContentType::SupportsGroupInternal(int group) { case ITEM_GROUP_SEARCHWEBFORIMAGE: // Image menu items imply search web for image item. diff --git a/build/patches/00WIN-Disable-sharing-hub.patch b/build/patches/00WIN-Disable-sharing-hub.patch index 59928976c..c7886cd67 100644 --- a/build/patches/00WIN-Disable-sharing-hub.patch +++ b/build/patches/00WIN-Disable-sharing-hub.patch @@ -25,7 +25,7 @@ diff --git a/chrome/browser/sharing_hub/sharing_hub_features.cc b/chrome/browser diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc --- a/chrome/browser/ui/browser_command_controller.cc +++ b/chrome/browser/ui/browser_command_controller.cc -@@ -1708,10 +1708,10 @@ void BrowserCommandController::UpdateCommandsForFullscreenMode() { +@@ -1728,10 +1728,10 @@ void BrowserCommandController::UpdateCommandsForFullscreenMode() { command_updater_.UpdateCommandEnabled(IDC_CHROME_WHATS_NEW, show_main_ui); #endif command_updater_.UpdateCommandEnabled(IDC_CONTENT_CONTEXT_SHARING_SUBMENU, @@ -42,7 +42,7 @@ diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc --- a/chrome/browser/ui/browser_commands.cc +++ b/chrome/browser/ui/browser_commands.cc -@@ -1556,6 +1556,7 @@ void SendTabToSelfFromPageAction(Browser* browser) { +@@ -1589,6 +1589,7 @@ void SendTabToSelfFromPageAction(Browser* browser) { } bool CanGenerateQrCode(const Browser* browser) { diff --git a/build/patches/00WIN-Disable-updater.patch b/build/patches/00WIN-Disable-updater.patch index 94c87a0c5..6e5f355cc 100644 --- a/build/patches/00WIN-Disable-updater.patch +++ b/build/patches/00WIN-Disable-updater.patch @@ -3,15 +3,27 @@ Date: Sun, 7 May 2023 14:03:55 +0000 Subject: WIN Disable updater --- - .../browser_process_platform_part_win.cc | 3 ++ - chrome/browser/updater/BUILD.gn | 9 ------ - .../browser/updater/browser_updater_client.cc | 32 +------------------ - 3 files changed, 4 insertions(+), 40 deletions(-) + chrome/browser/active_use_util.h | 2 +- + .../browser_process_platform_part_win.cc | 1 + + chrome/browser/updater/BUILD.gn | 9 ----- + .../browser/updater/browser_updater_client.cc | 33 +------------------ + 4 files changed, 3 insertions(+), 42 deletions(-) +diff --git a/chrome/browser/active_use_util.h b/chrome/browser/active_use_util.h +--- a/chrome/browser/active_use_util.h ++++ b/chrome/browser/active_use_util.h +@@ -9,6 +9,6 @@ + #include "chrome/install_static/buildflags.h" + + constexpr bool kShouldRecordActiveUse = +- !BUILDFLAG(IS_WIN) || BUILDFLAG(USE_GOOGLE_UPDATE_INTEGRATION); ++ false; + + #endif // CHROME_BROWSER_ACTIVE_USE_UTIL_H_ diff --git a/chrome/browser/browser_process_platform_part_win.cc b/chrome/browser/browser_process_platform_part_win.cc --- a/chrome/browser/browser_process_platform_part_win.cc +++ b/chrome/browser/browser_process_platform_part_win.cc -@@ -5,12 +5,15 @@ +@@ -5,6 +5,7 @@ #include "chrome/browser/browser_process_platform_part_win.h" #include "chrome/browser/active_use_util.h" @@ -19,14 +31,6 @@ diff --git a/chrome/browser/browser_process_platform_part_win.cc b/chrome/browse BrowserProcessPlatformPart::BrowserProcessPlatformPart() = default; BrowserProcessPlatformPart::~BrowserProcessPlatformPart() = default; - - void BrowserProcessPlatformPart::PlatformSpecificCommandLineProcessing( - const base::CommandLine& command_line) { -+#if BUILDFLAG(USE_GOOGLE_UPDATE_INTEGRATION) - if (!did_run_updater_ && ShouldRecordActiveUse(command_line)) - did_run_updater_.emplace(); -+#endif - } diff --git a/chrome/browser/updater/BUILD.gn b/chrome/browser/updater/BUILD.gn --- a/chrome/browser/updater/BUILD.gn +++ b/chrome/browser/updater/BUILD.gn @@ -49,7 +53,7 @@ diff --git a/chrome/browser/updater/BUILD.gn b/chrome/browser/updater/BUILD.gn diff --git a/chrome/browser/updater/browser_updater_client.cc b/chrome/browser/updater/browser_updater_client.cc --- a/chrome/browser/updater/browser_updater_client.cc +++ b/chrome/browser/updater/browser_updater_client.cc -@@ -29,19 +29,6 @@ BrowserUpdaterClient::~BrowserUpdaterClient() = default; +@@ -30,19 +30,6 @@ BrowserUpdaterClient::~BrowserUpdaterClient() = default; void BrowserUpdaterClient::Register(base::OnceClosure complete) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -69,7 +73,7 @@ diff --git a/chrome/browser/updater/browser_updater_client.cc b/chrome/browser/u } void BrowserUpdaterClient::RegistrationCompleted(base::OnceClosure complete, -@@ -72,18 +59,6 @@ void BrowserUpdaterClient::GetUpdaterVersionCompleted( +@@ -73,18 +60,6 @@ void BrowserUpdaterClient::GetUpdaterVersionCompleted( void BrowserUpdaterClient::CheckForUpdate( updater::UpdateService::StateChangeCallback version_updater_callback) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -88,7 +92,7 @@ diff --git a/chrome/browser/updater/browser_updater_client.cc b/chrome/browser/u } void BrowserUpdaterClient::UpdateCompleted( -@@ -129,12 +104,7 @@ void BrowserUpdaterClient::IsBrowserRegisteredCompleted( +@@ -130,13 +105,7 @@ void BrowserUpdaterClient::IsBrowserRegisteredCompleted( base::OnceCallback callback, const std::vector& apps) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -96,7 +100,8 @@ diff --git a/chrome/browser/updater/browser_updater_client.cc b/chrome/browser/u - std::move(callback).Run( - std::find_if(apps.begin(), apps.end(), - [&](const updater::UpdateService::AppState& app) { -- return app.app_id == app_id; +- return base::EqualsCaseInsensitiveASCII(app.app_id, +- app_id); - }) != apps.end()); + std::move(callback).Run(true); } diff --git a/build/patches/00WIN-Enable-Network-Service-Sandbox-and-CIG.patch b/build/patches/00WIN-Enable-Network-Service-Sandbox-and-CIG.patch index ad985a1f8..833c33838 100644 --- a/build/patches/00WIN-Enable-Network-Service-Sandbox-and-CIG.patch +++ b/build/patches/00WIN-Enable-Network-Service-Sandbox-and-CIG.patch @@ -11,7 +11,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.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 -@@ -774,7 +774,7 @@ const char kDEPRECATED_AllowlistedExtensionID[] = "whitelisted-extension-id"; +@@ -767,7 +767,7 @@ namespace { // https://blogs.windows.com/blog/tag/code-integrity-guard/. BASE_FEATURE(kNetworkServiceCodeIntegrity, "NetworkServiceCodeIntegrity", diff --git a/build/patches/00WIN-enable-pdf-plugin.patch b/build/patches/00WIN-enable-pdf-plugin.patch index 602de9c53..a456cbb3b 100644 --- a/build/patches/00WIN-enable-pdf-plugin.patch +++ b/build/patches/00WIN-enable-pdf-plugin.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/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 -@@ -2054,7 +2054,9 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() { +@@ -2080,7 +2080,9 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() { } PluginData* LocalFrame::GetPluginData() const { diff --git a/build/patches/00Warning-message-for-unsupported-hardware-aes.patch b/build/patches/00Warning-message-for-unsupported-hardware-aes.patch index f1a83d0c3..0c8830764 100644 --- a/build/patches/00Warning-message-for-unsupported-hardware-aes.patch +++ b/build/patches/00Warning-message-for-unsupported-hardware-aes.patch @@ -51,7 +51,7 @@ diff --git a/base/base_switches.h b/base/base_switches.h diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -447,6 +447,7 @@ if (is_win) { +@@ -449,6 +449,7 @@ if (is_win) { "//components/policy:generated", "//content/public/app", "//crypto", @@ -59,7 +59,7 @@ diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn "//headless:headless_non_renderer", "//headless:headless_shell_browser_lib", "//net:net_resources", -@@ -1705,6 +1706,8 @@ if (is_android) { +@@ -1714,6 +1715,8 @@ if (is_android) { "//chrome/common/profiler", "//chrome/gpu", "//chrome/renderer", @@ -71,7 +71,7 @@ diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn 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 -@@ -105,6 +105,9 @@ +@@ -100,6 +100,9 @@ #include "ui/base/resource/resource_bundle.h" #include "ui/base/resource/scoped_startup_resource_bundle.h" #include "ui/base/ui_base_switches.h" @@ -81,7 +81,7 @@ diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegat #if BUILDFLAG(IS_WIN) #include -@@ -1133,6 +1136,13 @@ absl::optional ChromeMainDelegate::BasicStartupComplete() { +@@ -1165,6 +1168,13 @@ absl::optional ChromeMainDelegate::BasicStartupComplete() { return chrome::RESULT_CODE_INVALID_SANDBOX_STATE; #endif @@ -98,7 +98,7 @@ diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegat 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 -@@ -7051,6 +7051,10 @@ Keep your key file in a safe place. You will need it to create new versions of y +@@ -7122,6 +7122,10 @@ Keep your key file in a safe place. You will need it to create new versions of y You are using an unsupported feature flag: $1SignedHTTPExchange. Stability and security will suffer. @@ -131,7 +131,7 @@ diff --git a/chrome/browser/ui/startup/bad_flags_prompt.cc b/chrome/browser/ui/s diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -3489,6 +3489,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3563,6 +3563,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( switches::kLacrosUseChromeosProtectedAv1, #endif switches::kDesktopModeViewportMetaEnabled, diff --git a/build/patches/00add-browser-policy.patch b/build/patches/00add-browser-policy.patch index ca2aedcea..bd2e4450e 100644 --- a/build/patches/00add-browser-policy.patch +++ b/build/patches/00add-browser-policy.patch @@ -171,7 +171,7 @@ diff --git a/chrome/browser/metrics/chrome_feature_list_creator.cc b/chrome/brow #if BUILDFLAG(IS_CHROMEOS_ASH) #include "chrome/browser/ash/policy/core/browser_policy_connector_ash.h" -@@ -222,6 +224,16 @@ void ChromeFeatureListCreator::CreatePrefService() { +@@ -219,6 +221,16 @@ void ChromeFeatureListCreator::CreatePrefService() { // ManagementService's cache. if (local_state_pref_store->ReadPrefs() == JsonPrefStore::PREF_READ_ERROR_NONE) { @@ -191,7 +191,7 @@ diff --git a/chrome/browser/metrics/chrome_feature_list_creator.cc b/chrome/brow diff --git a/chrome/browser/policy/chrome_browser_policy_connector.cc b/chrome/browser/policy/chrome_browser_policy_connector.cc --- a/chrome/browser/policy/chrome_browser_policy_connector.cc +++ b/chrome/browser/policy/chrome_browser_policy_connector.cc -@@ -159,8 +159,6 @@ bool ChromeBrowserPolicyConnector::HasMachineLevelPolicies() { +@@ -149,8 +149,6 @@ bool ChromeBrowserPolicyConnector::HasMachineLevelPolicies() { if (ProviderHasPolicies(machine_level_user_cloud_policy_manager())) return true; #endif // !BUILDFLAG(IS_CHROMEOS_ASH) @@ -203,7 +203,7 @@ diff --git a/chrome/browser/policy/chrome_browser_policy_connector.cc b/chrome/b diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc b/chrome/browser/policy/configuration_policy_handler_list_factory.cc --- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc +++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc -@@ -2046,9 +2046,9 @@ bool AreFuturePoliciesEnabledByDefault() { +@@ -2088,9 +2088,9 @@ bool AreFuturePoliciesEnabledByDefault() { if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType)) { return true; } @@ -219,7 +219,7 @@ diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc diff --git a/chrome/browser/signin/account_consistency_mode_manager.cc b/chrome/browser/signin/account_consistency_mode_manager.cc --- a/chrome/browser/signin/account_consistency_mode_manager.cc +++ b/chrome/browser/signin/account_consistency_mode_manager.cc -@@ -160,7 +160,7 @@ void AccountConsistencyModeManager::SetIgnoreMissingOAuthClientForTesting() { +@@ -164,7 +164,7 @@ void AccountConsistencyModeManager::SetIgnoreMissingOAuthClientForTesting() { // static bool AccountConsistencyModeManager::ShouldBuildServiceForProfile( Profile* profile) { @@ -228,7 +228,7 @@ diff --git a/chrome/browser/signin/account_consistency_mode_manager.cc b/chrome/ } AccountConsistencyMethod -@@ -198,7 +198,8 @@ AccountConsistencyModeManager::ComputeAccountConsistencyMethod( +@@ -202,7 +202,8 @@ AccountConsistencyModeManager::ComputeAccountConsistencyMethod( #endif #if BUILDFLAG(ENABLE_MIRROR) @@ -238,7 +238,7 @@ diff --git a/chrome/browser/signin/account_consistency_mode_manager.cc b/chrome/ #endif #if BUILDFLAG(ENABLE_DICE_SUPPORT) -@@ -208,7 +209,7 @@ AccountConsistencyModeManager::ComputeAccountConsistencyMethod( +@@ -212,7 +213,7 @@ AccountConsistencyModeManager::ComputeAccountConsistencyMethod( return AccountConsistencyMethod::kDisabled; } @@ -260,7 +260,7 @@ diff --git a/chrome/browser/signin/account_consistency_mode_manager_factory.cc b diff --git a/chrome/browser/signin/chrome_signin_client.cc b/chrome/browser/signin/chrome_signin_client.cc --- a/chrome/browser/signin/chrome_signin_client.cc +++ b/chrome/browser/signin/chrome_signin_client.cc -@@ -130,7 +130,9 @@ void ChromeSigninClient::DoFinalInit() { +@@ -214,7 +214,9 @@ void ChromeSigninClient::DoFinalInit() { bool ChromeSigninClient::ProfileAllowsSigninCookies(Profile* profile) { scoped_refptr cookie_settings = CookieSettingsFactory::GetForProfile(profile); @@ -270,8 +270,8 @@ diff --git a/chrome/browser/signin/chrome_signin_client.cc b/chrome/browser/sign + return cookiesAllowed && profile->GetPrefs()->GetBoolean(prefs::kSigninAllowed); } - PrefService* ChromeSigninClient::GetPrefs() { return profile_->GetPrefs(); } -@@ -242,6 +244,9 @@ bool ChromeSigninClient::AreNetworkCallsDelayed() { + PrefService* ChromeSigninClient::GetPrefs() { +@@ -328,6 +330,9 @@ bool ChromeSigninClient::AreNetworkCallsDelayed() { } void ChromeSigninClient::DelayNetworkCall(base::OnceClosure callback) { @@ -300,7 +300,7 @@ diff --git a/chrome/browser/ui/webui/policy/policy_ui_handler.cc b/chrome/browse #include "components/policy/core/common/policy_scheduler.h" #include "components/policy/core/common/policy_types.h" #include "components/policy/core/common/remote_commands/remote_commands_service.h" -@@ -177,6 +179,10 @@ void PolicyUIHandler::RegisterMessages() { +@@ -175,6 +177,10 @@ void PolicyUIHandler::RegisterMessages() { "exportPoliciesJSON", base::BindRepeating(&PolicyUIHandler::HandleExportPoliciesJson, base::Unretained(this))); @@ -311,7 +311,7 @@ diff --git a/chrome/browser/ui/webui/policy/policy_ui_handler.cc b/chrome/browse web_ui()->RegisterMessageCallback( "listenPoliciesUpdates", base::BindRepeating(&PolicyUIHandler::HandleListenPoliciesUpdates, -@@ -424,8 +430,102 @@ void PolicyUIHandler::SendPolicies() { +@@ -386,8 +392,102 @@ void PolicyUIHandler::SendPolicies() { "policies-updated", base::Value( policy_value_and_status_aggregator_->GetAggregatedPolicyNames()), @@ -419,7 +419,7 @@ diff --git a/chrome/browser/ui/webui/policy/policy_ui_handler.cc b/chrome/browse diff --git a/chrome/browser/ui/webui/policy/policy_ui_handler.h b/chrome/browser/ui/webui/policy/policy_ui_handler.h --- a/chrome/browser/ui/webui/policy/policy_ui_handler.h +++ b/chrome/browser/ui/webui/policy/policy_ui_handler.h -@@ -58,6 +58,8 @@ class PolicyUIHandler : public content::WebUIMessageHandler, +@@ -50,6 +50,8 @@ class PolicyUIHandler private: void HandleExportPoliciesJson(const base::Value::List& args); @@ -431,9 +431,9 @@ diff --git a/chrome/browser/ui/webui/policy/policy_ui_handler.h b/chrome/browser diff --git a/components/commerce/core/commerce_feature_list.cc b/components/commerce/core/commerce_feature_list.cc --- a/components/commerce/core/commerce_feature_list.cc +++ b/components/commerce/core/commerce_feature_list.cc -@@ -293,6 +293,13 @@ BASE_FEATURE(kParcelTrackingRegionLaunched, - "ParcelTrackingRegionLaunched", - base::FEATURE_DISABLED_BY_DEFAULT); +@@ -301,6 +301,13 @@ const char kParcelTrackingTestDataParamDelivered[] = "Delivered"; + const char kParcelTrackingTestDataParamInProgress[] = "InProgress"; + const char kParcelTrackingTestDataParamOutForDelivery[] = "OutForDelivery"; +SET_CROMITE_FEATURE_DISABLED(kCommercePriceTrackingRegionLaunched); +SET_CROMITE_FEATURE_DISABLED(kShoppingListRegionLaunched); @@ -634,7 +634,7 @@ diff --git a/components/policy/core/common/policy_loader_command_line.cc b/compo diff --git a/components/policy/core/common/policy_pref_names.cc b/components/policy/core/common/policy_pref_names.cc --- a/components/policy/core/common/policy_pref_names.cc +++ b/components/policy/core/common/policy_pref_names.cc -@@ -93,6 +93,9 @@ const char kReadAloudEnabled[] = "policy.read_aloud_enabled"; +@@ -97,6 +97,9 @@ const char kReadAloudEnabled[] = "policy.read_aloud_enabled"; const char kUserAgentClientHintsGREASEUpdateEnabled[] = "policy.user_agent_client_hints_grease_update_enabled"; @@ -647,7 +647,7 @@ diff --git a/components/policy/core/common/policy_pref_names.cc b/components/pol diff --git a/components/policy/core/common/policy_pref_names.h b/components/policy/core/common/policy_pref_names.h --- a/components/policy/core/common/policy_pref_names.h +++ b/components/policy/core/common/policy_pref_names.h -@@ -50,6 +50,7 @@ extern const char kUrlAllowlist[]; +@@ -51,6 +51,7 @@ extern const char kUrlAllowlist[]; extern const char kUserPolicyRefreshRate[]; extern const char kIntensiveWakeUpThrottlingEnabled[]; extern const char kUserAgentClientHintsGREASEUpdateEnabled[]; @@ -781,7 +781,7 @@ diff --git a/components/policy_strings.grdp b/components/policy_strings.grdp diff --git a/components/signin/internal/identity_manager/gaia_cookie_manager_service.cc b/components/signin/internal/identity_manager/gaia_cookie_manager_service.cc --- a/components/signin/internal/identity_manager/gaia_cookie_manager_service.cc +++ b/components/signin/internal/identity_manager/gaia_cookie_manager_service.cc -@@ -469,6 +469,8 @@ void GaiaCookieManagerService::RegisterPrefs(PrefRegistrySimple* registry) { +@@ -468,6 +468,8 @@ void GaiaCookieManagerService::RegisterPrefs(PrefRegistrySimple* registry) { } void GaiaCookieManagerService::InitCookieListener() { @@ -790,7 +790,7 @@ diff --git a/components/signin/internal/identity_manager/gaia_cookie_manager_ser DCHECK(!cookie_listener_receiver_.is_bound()); network::mojom::CookieManager* cookie_manager = -@@ -891,6 +893,8 @@ void GaiaCookieManagerService::OnSetAccountsFinished( +@@ -890,6 +892,8 @@ void GaiaCookieManagerService::OnSetAccountsFinished( } void GaiaCookieManagerService::HandleNextRequest() { diff --git a/build/patches/00do-not-block-build-incompatible-profiles.patch b/build/patches/00do-not-block-build-incompatible-profiles.patch index a7e137d7a..6fe3680fd 100644 --- a/build/patches/00do-not-block-build-incompatible-profiles.patch +++ b/build/patches/00do-not-block-build-incompatible-profiles.patch @@ -10,7 +10,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/v8/BUILD.gn b/v8/BUILD.gn --- a/v8/BUILD.gn +++ b/v8/BUILD.gn -@@ -2369,7 +2369,7 @@ template("run_mksnapshot") { +@@ -2382,7 +2382,7 @@ template("run_mksnapshot") { # Replace this with --warn-about-builtin-profile-data to see the full # list of builtins with incompatible profiles. diff --git a/build/patches/AImageReader-CFI-crash-mitigations.patch b/build/patches/AImageReader-CFI-crash-mitigations.patch index e6688de68..4e995682f 100644 --- a/build/patches/AImageReader-CFI-crash-mitigations.patch +++ b/build/patches/AImageReader-CFI-crash-mitigations.patch @@ -86,15 +86,15 @@ diff --git a/base/android/android_image_reader_compat.h b/base/android/android_i 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 -@@ -3028,9 +3028,9 @@ +@@ -2837,9 +2837,9 @@ "expiry_milestone": 125 }, { - "name": "enable-image-reader", -- "owners": [ "vikassoni", "liberato" ], +- "owners": [ "vikassoni@chromium.org", "liberato@chromium.org" ], - "expiry_milestone": 125 + "name": "enable-image-reader", // Bromite: do not expire -+ "owners": [ "vikassoni", "liberato" ], // flag ++ "owners": [ "vikassoni@chromium.org", "liberato@chromium.org" ], // flag + "expiry_milestone": -1 }, { @@ -205,7 +205,7 @@ diff --git a/gpu/config/gpu_workaround_list.txt b/gpu/config/gpu_workaround_list diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc --- a/gpu/ipc/service/gpu_init.cc +++ b/gpu/ipc/service/gpu_init.cc -@@ -628,6 +628,13 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line, +@@ -668,6 +668,13 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line, } #endif // BUILDFLAG(IS_WIN) diff --git a/build/patches/Add-AllowUserCertificates-flag.patch b/build/patches/Add-AllowUserCertificates-flag.patch index 86e113f50..f4dc634f0 100644 --- a/build/patches/Add-AllowUserCertificates-flag.patch +++ b/build/patches/Add-AllowUserCertificates-flag.patch @@ -20,7 +20,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/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java -@@ -227,6 +227,7 @@ import org.chromium.content_public.browser.ScreenOrientationProvider; +@@ -229,6 +229,7 @@ import org.chromium.content_public.browser.ScreenOrientationProvider; import org.chromium.content_public.browser.SelectionPopupController; import org.chromium.content_public.browser.WebContents; import org.chromium.content_public.common.ContentSwitches; @@ -28,7 +28,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv import org.chromium.printing.PrintManagerDelegateImpl; import org.chromium.printing.PrintingController; import org.chromium.printing.PrintingControllerImpl; -@@ -984,6 +985,8 @@ public abstract class ChromeActivity +@@ -988,6 +989,8 @@ public abstract class ChromeActivity super.onStartWithNative(); ChromeActivitySessionTracker.getInstance().onStartWithNative(); ChromeCachedFlags.getInstance().cacheNativeFlags(); @@ -40,7 +40,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv 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 -@@ -147,6 +147,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -146,6 +146,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &feed::kFeedShowSignInCommand, &feed::kFeedSignedOutViewDemotion, &feed::kFeedUserInteractionReliabilityReport, @@ -59,23 +59,23 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f public static final String ADAPTIVE_BUTTON_IN_TOP_TOOLBAR = "AdaptiveButtonInTopToolbar"; public static final String ADAPTIVE_BUTTON_IN_TOP_TOOLBAR_TRANSLATE = "AdaptiveButtonInTopToolbarTranslate"; -@@ -501,6 +502,8 @@ public abstract class ChromeFeatureList { - /* Alphabetical: */ +@@ -517,6 +518,8 @@ public abstract class ChromeFeatureList { public static final CachedFlag sAndroidAppIntegration = new CachedFlag(ANDROID_APP_INTEGRATION, false); + public static final CachedFlag sAndroidHub = new CachedFlag(ANDROID_HUB, false); + public static final CachedFlag sAllowUserCertificates = + new CachedFlag(ALLOW_USER_CERTIFICATES, false); public static final CachedFlag sAppMenuMobileSiteOption = new CachedFlag(APP_MENU_MOBILE_SITE_OPTION, false); public static final CachedFlag sBackGestureActivityTabProvider = -@@ -642,6 +645,7 @@ public abstract class ChromeFeatureList { - public static final List sFlagsCachedFullBrowser = List.of( - // clang-format off - sAndroidAppIntegration, -+ sAllowUserCertificates, - sAppMenuMobileSiteOption, - sBackGestureActivityTabProvider, - sBackGestureRefactorActivityAndroid, +@@ -662,6 +665,7 @@ public abstract class ChromeFeatureList { + + public static final List sFlagsCachedFullBrowser = + List.of( ++ sAllowUserCertificates, + sAndroidAppIntegration, + sAndroidHub, + sAppMenuMobileSiteOption, diff --git a/cromite_flags/chrome/browser/about_flags_cc/Add-AllowUserCertificates-flag.inc b/cromite_flags/chrome/browser/about_flags_cc/Add-AllowUserCertificates-flag.inc new file mode 100644 --- /dev/null @@ -111,7 +111,7 @@ new file mode 100644 diff --git a/net/android/java/src/org/chromium/net/X509Util.java b/net/android/java/src/org/chromium/net/X509Util.java --- a/net/android/java/src/org/chromium/net/X509Util.java +++ b/net/android/java/src/org/chromium/net/X509Util.java -@@ -545,6 +545,8 @@ public class X509Util { +@@ -544,6 +544,8 @@ public class X509Util { return userRootBytes.toArray(new byte[0][]); } @@ -120,7 +120,7 @@ diff --git a/net/android/java/src/org/chromium/net/X509Util.java b/net/android/j public static AndroidCertVerifyResult verifyServerCertificates(byte[][] certChain, String authType, String host) -@@ -631,6 +633,9 @@ public class X509Util { +@@ -630,6 +632,9 @@ public class X509Util { isIssuedByKnownRoot = isKnownRoot(root); } diff --git a/build/patches/Add-IsCleartextPermitted-flag.patch b/build/patches/Add-IsCleartextPermitted-flag.patch index 084b195cd..3cd9341d8 100644 --- a/build/patches/Add-IsCleartextPermitted-flag.patch +++ b/build/patches/Add-IsCleartextPermitted-flag.patch @@ -44,8 +44,8 @@ new file mode 100644 diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc --- a/net/url_request/url_request_http_job.cc +++ b/net/url_request/url_request_http_job.cc -@@ -232,6 +232,11 @@ std::unique_ptr URLRequestHttpJob::Create(URLRequest* request) { - RedirectUtil::ResponseCode::REDIRECT_307_TEMPORARY_REDIRECT, "HSTS"); +@@ -287,6 +287,11 @@ std::unique_ptr URLRequestHttpJob::Create(URLRequest* request) { + } } + if (base::FeatureList::IsEnabled(net::features::kIsCleartextPermitted) == false) { diff --git a/build/patches/Add-a-proxy-configuration-page.patch b/build/patches/Add-a-proxy-configuration-page.patch index cbbf55209..5ff3a22c8 100644 --- a/build/patches/Add-a-proxy-configuration-page.patch +++ b/build/patches/Add-a-proxy-configuration-page.patch @@ -63,10 +63,10 @@ diff --git a/chrome/android/java/res/values/values.xml b/chrome/android/java/res diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml --- a/chrome/android/java/res/xml/privacy_preferences.xml +++ b/chrome/android/java/res/xml/privacy_preferences.xml -@@ -9,6 +9,10 @@ found in the LICENSE file. - - +@@ -10,6 +10,10 @@ found in the LICENSE file. + + @@ -206,7 +206,7 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse #if BUILDFLAG(ENABLE_BACKGROUND_MODE) #include "chrome/browser/background/background_mode_manager.h" #endif -@@ -1389,6 +1391,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) { +@@ -1387,6 +1389,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) { component_updater::RegisterPrefs(registry); domain_reliability::RegisterPrefs(registry); embedder_support::OriginTrialPrefs::RegisterPrefs(registry); @@ -661,7 +661,7 @@ new file mode 100644 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 -@@ -301,6 +301,8 @@ static_library("ui") { +@@ -297,6 +297,8 @@ static_library("ui") { "webui/metrics_internals/metrics_internals_ui.h", "webui/net_export_ui.cc", "webui/net_export_ui.h", @@ -673,7 +673,7 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn 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 -@@ -63,6 +63,7 @@ +@@ -58,6 +58,7 @@ #include "chrome/browser/ui/webui/ntp_tiles_internals_ui.h" #include "chrome/browser/ui/webui/omnibox/omnibox_ui.h" #include "chrome/browser/ui/webui/policy/policy_ui.h" @@ -681,7 +681,7 @@ diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrom #include "chrome/browser/ui/webui/predictors/predictors_ui.h" #include "chrome/browser/ui/webui/segmentation_internals/segmentation_internals_ui.h" #include "chrome/browser/ui/webui/signin_internals_ui.h" -@@ -496,6 +497,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, +@@ -494,6 +495,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, return &NewWebUI; if (url.host_piece() == chrome::kChromeUINetExportHost) return &NewWebUI; @@ -1127,7 +1127,7 @@ new file mode 100644 diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_constants.cc --- a/chrome/common/webui_url_constants.cc +++ b/chrome/common/webui_url_constants.cc -@@ -56,6 +56,8 @@ const char kChromeUICertificateViewerHost[] = "view-cert"; +@@ -51,6 +51,8 @@ const char kChromeUICertificateViewerHost[] = "view-cert"; const char kChromeUICertificateViewerURL[] = "chrome://view-cert/"; const char kChromeUIChromeSigninHost[] = "chrome-signin"; const char kChromeUIChromeSigninURL[] = "chrome://chrome-signin/"; @@ -1136,7 +1136,7 @@ diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_cons const char kChromeUIChromeURLsHost[] = "chrome-urls"; const char kChromeUIChromeURLsURL[] = "chrome://chrome-urls/"; const char kChromeUIComponentsHost[] = "components"; -@@ -450,6 +452,7 @@ bool IsSystemWebUIHost(base::StringPiece host) { +@@ -457,6 +459,7 @@ bool IsSystemWebUIHost(base::StringPiece host) { kChromeUILockScreenNetworkHost, kChromeUILockScreenStartReauthHost, kChromeUIMobileSetupHost, @@ -1144,7 +1144,7 @@ diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_cons kChromeUIMultiDeviceSetupHost, kChromeUINetworkHost, kChromeUINotificationTesterHost, -@@ -759,6 +762,7 @@ const char* const kChromeHostURLs[] = { +@@ -771,6 +774,7 @@ const char* const kChromeHostURLs[] = { #if !BUILDFLAG(IS_ANDROID) #if !BUILDFLAG(IS_CHROMEOS) kChromeUIAppLauncherPageHost, @@ -1155,7 +1155,7 @@ diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_cons diff --git a/chrome/common/webui_url_constants.h b/chrome/common/webui_url_constants.h --- a/chrome/common/webui_url_constants.h +++ b/chrome/common/webui_url_constants.h -@@ -142,6 +142,8 @@ extern const char kChromeUINTPTilesInternalsHost[]; +@@ -139,6 +139,8 @@ extern const char kChromeUINTPTilesInternalsHost[]; extern const char kChromeUINaClHost[]; extern const char kChromeUINetExportHost[]; extern const char kChromeUINetExportURL[]; diff --git a/build/patches/Add-an-always-incognito-mode.patch b/build/patches/Add-an-always-incognito-mode.patch index e6e3d372d..d0deb2f11 100644 --- a/build/patches/Add-an-always-incognito-mode.patch +++ b/build/patches/Add-an-always-incognito-mode.patch @@ -97,14 +97,14 @@ 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 -@@ -659,6 +659,7 @@ chrome_java_resources = [ +@@ -666,6 +666,7 @@ chrome_java_resources = [ "java/res/xml/main_preferences.xml", "java/res/xml/manage_sync_preferences.xml", "java/res/xml/phone_as_a_security_key_accessory_filter.xml", + "java/res/xml/incognito_preferences.xml", "java/res/xml/privacy_preferences.xml", - "java/res/xml/privacy_preferences_v2.xml", "java/res/xml/search_widget_info.xml", + "java/res/xml/tracing_preferences.xml", 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 @@ -116,10 +116,10 @@ diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java "java/src/com/google/android/apps/chrome/appwidget/bookmarks/BookmarkThumbnailWidgetProvider.java", "java/src/org/chromium/chrome/browser/ActivityTabProvider.java", "java/src/org/chromium/chrome/browser/ActivityUtils.java", -@@ -967,6 +968,7 @@ chrome_java_sources = [ - "java/src/org/chromium/chrome/browser/privacy/settings/PrivacyPreferencesManagerImpl.java", +@@ -975,6 +976,7 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java", "java/src/org/chromium/chrome/browser/privacy_sandbox/ChromeTrackingProtectionDelegate.java", + "java/src/org/chromium/chrome/browser/privacy_sandbox/TrackingProtectionNoticeController.java", + "java/src/org/chromium/chrome/browser/privacy/settings/IncognitoSettings.java", "java/src/org/chromium/chrome/browser/provider/BaseColumns.java", "java/src/org/chromium/chrome/browser/provider/BookmarkColumns.java", @@ -169,18 +169,18 @@ new file mode 100644 diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml --- a/chrome/android/java/res/xml/privacy_preferences.xml +++ b/chrome/android/java/res/xml/privacy_preferences.xml -@@ -56,6 +56,11 @@ found in the LICENSE file. - android:key="secure_dns" +@@ -67,6 +67,11 @@ found in the LICENSE file. android:title="@string/settings_secure_dns_title" - android:fragment="org.chromium.chrome.browser.privacy.secure_dns.SecureDnsSettings"/> -+ + - + +@@ -1885,6 +1886,9 @@ public abstract class ChromeActivity throw new IllegalStateException( "Attempting to access TabCreator before initialization"); } @@ -371,15 +371,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java -@@ -28,6 +28,7 @@ import org.chromium.base.Callback; - import org.chromium.base.ContextUtils; +@@ -29,6 +29,7 @@ import org.chromium.base.ContextUtils; + import org.chromium.base.shared_preferences.SharedPreferencesManager; import org.chromium.base.supplier.Supplier; import org.chromium.chrome.R; +import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor; import org.chromium.chrome.browser.compositor.bottombar.ephemeraltab.EphemeralTabCoordinator; import org.chromium.chrome.browser.contextmenu.ChromeContextMenuItem.Item; import org.chromium.chrome.browser.contextmenu.ContextMenuCoordinator.ListItemType; -@@ -231,6 +232,9 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { +@@ -233,6 +234,9 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { public List> buildContextMenu() { mShowEphemeralTabNewLabel = null; @@ -389,7 +389,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/Chr List> groupedItems = new ArrayList<>(); if (mParams.isAnchor()) { -@@ -240,6 +244,7 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { +@@ -242,6 +246,7 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { if (mMode == ContextMenuMode.NORMAL) { linkGroup.add(createListItem(Item.OPEN_IN_NEW_TAB_IN_GROUP)); linkGroup.add(createListItem(Item.OPEN_IN_NEW_TAB)); @@ -397,7 +397,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/Chr if (!mItemDelegate.isIncognito() && mItemDelegate.isIncognitoSupported()) { linkGroup.add(createListItem(Item.OPEN_IN_INCOGNITO_TAB)); } -@@ -264,7 +269,7 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { +@@ -266,7 +271,7 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { } } if (FirstRunStatus.getFirstRunFlowComplete()) { @@ -409,7 +409,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/Chr diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java -@@ -67,31 +67,6 @@ public class CustomTabActivityLifecycleUmaTracker +@@ -68,31 +68,6 @@ public class CustomTabActivityLifecycleUmaTracker private boolean mIsInitialResume = true; private void recordIncognitoLaunchReason() { @@ -465,7 +465,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java -@@ -66,6 +66,9 @@ import org.chromium.components.embedder_support.util.UrlConstants; +@@ -67,6 +67,9 @@ import org.chromium.components.embedder_support.util.UrlConstants; import org.chromium.components.version_info.VersionInfo; import org.chromium.device.mojom.ScreenOrientationLockType; @@ -475,7 +475,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.ArrayList; -@@ -1263,7 +1266,7 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid +@@ -1288,7 +1291,7 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid @Override public boolean isIncognito() { @@ -487,7 +487,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust 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 -@@ -35,6 +35,7 @@ import org.chromium.base.annotations.NativeMethods; +@@ -36,6 +36,7 @@ import org.chromium.base.Log; import org.chromium.base.metrics.RecordHistogram; import org.chromium.base.metrics.RecordUserAction; import org.chromium.chrome.R; @@ -506,7 +506,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/Downlo /** * A class containing some utility static methods. */ -@@ -353,7 +358,16 @@ public class DownloadUtils { +@@ -345,7 +350,16 @@ public class DownloadUtils { // Offline pages isn't supported in Incognito. This should be checked before calling // OfflinePageBridge.getForProfile because OfflinePageBridge instance will not be found // for incognito profile. @@ -581,7 +581,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History mSelectableListLayout = null; mRootView = getIncognitoHistoryPlaceholderView(); return; -@@ -601,7 +608,7 @@ public class HistoryManager implements OnMenuItemClickListener, SelectionObserve +@@ -626,7 +633,7 @@ public class HistoryManager implements OnMenuItemClickListener, SelectionObserve private void swapContentView() { boolean toHistoryClusters; @@ -590,7 +590,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History return; } else if (isHistoryClustersUIShowing()) { toHistoryClusters = false; -@@ -664,11 +671,24 @@ public class HistoryManager implements OnMenuItemClickListener, SelectionObserve +@@ -689,11 +696,24 @@ public class HistoryManager implements OnMenuItemClickListener, SelectionObserve && mContentView == mHistoryClustersCoordinator.getActivityContentView(); } @@ -616,7 +616,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History // If Incognito placeholder is shown no need to call any destroy method. return; } -@@ -688,7 +708,7 @@ public class HistoryManager implements OnMenuItemClickListener, SelectionObserve +@@ -713,7 +733,7 @@ public class HistoryManager implements OnMenuItemClickListener, SelectionObserve * @return True if manager handles this event, false if it decides to ignore. */ public boolean onBackPressed() { @@ -675,7 +675,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat import org.chromium.chrome.browser.app.ChromeActivity; import org.chromium.chrome.browser.app.download.home.DownloadPage; import org.chromium.chrome.browser.bookmarks.BookmarkPage; -@@ -232,7 +233,8 @@ public class NativePageFactory { +@@ -238,7 +239,8 @@ public class NativePageFactory { String url, NativePage candidatePage, Tab tab, boolean isIncognito) { NativePage page; @@ -714,7 +714,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsM mActiveTab = tab; mTabModelSelector = tabModelSelector; mShowHistoryManager = showHistoryManager; -@@ -251,6 +261,22 @@ public class RecentTabsManager implements SyncService.SyncStateChangedListener, +@@ -255,6 +265,22 @@ public class RecentTabsManager implements SyncService.SyncStateChangedListener, */ public void openRecentlyClosedTab(RecentlyClosedTab tab, int windowDisposition) { if (mIsDestroyed) return; @@ -905,7 +905,7 @@ new file mode 100644 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 -@@ -75,6 +75,7 @@ import org.chromium.chrome.browser.signin.SyncConsentActivityLauncherImpl; +@@ -73,6 +73,7 @@ import org.chromium.chrome.browser.signin.SyncConsentActivityLauncherImpl; import org.chromium.chrome.browser.site_settings.ChromeSiteSettingsDelegate; import org.chromium.chrome.browser.sync.SyncServiceFactory; import org.chromium.chrome.browser.ui.device_lock.MissingDeviceLockLauncher; @@ -913,7 +913,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager.SnackbarManageable; import org.chromium.components.browser_ui.accessibility.AccessibilitySettings; -@@ -329,6 +330,9 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity +@@ -348,6 +349,9 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity ((PrivacySandboxSettingsBaseFragment) fragment) .setSnackbarManager(getSnackbarManager()); } @@ -968,7 +968,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabSaverImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabSaverImpl.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabSaverImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabSaverImpl.java -@@ -25,6 +25,8 @@ import java.util.Arrays; +@@ -26,6 +26,8 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -977,7 +977,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore /** * Creates historical entries in TabRestoreService. */ -@@ -58,10 +60,10 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { +@@ -59,10 +61,10 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { // HistoricalTabSaver implementation. @Override @@ -990,7 +990,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore } @Override -@@ -113,7 +115,7 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { +@@ -114,7 +116,7 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { // If there is only a single valid tab remaining save it individually. if (validEntries.size() == 1 && validEntries.get(0).isSingleTab()) { @@ -999,7 +999,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore return; } -@@ -139,11 +141,12 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { +@@ -140,11 +142,12 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { CollectionUtil.integerCollectionToIntArray(savedStateVersions)); } @@ -1014,7 +1014,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore } /** -@@ -151,7 +154,7 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { +@@ -152,7 +155,7 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { * internal Chrome scheme, about:blank, or a native page and it cannot be incognito. */ private boolean shouldSave(Tab tab) { @@ -1023,7 +1023,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore // {@link GURL#getScheme()} is not available in unit tests. if (mIgnoreUrlSchemesForTesting) return true; -@@ -223,7 +226,7 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { +@@ -224,7 +227,7 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { @NativeMethods interface Natives { @@ -1035,7 +1035,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore 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 -@@ -123,6 +123,8 @@ import org.chromium.components.webapps.bottomsheet.PwaBottomSheetControllerFacto +@@ -125,6 +125,8 @@ import org.chromium.components.webapps.bottomsheet.PwaBottomSheetControllerFacto import org.chromium.content_public.browser.WebContents; import org.chromium.ui.base.ActivityWindowAndroid; import org.chromium.ui.base.DeviceFormFactor; @@ -1044,7 +1044,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/Tab import org.chromium.ui.base.IntentRequestTracker; import org.chromium.ui.modaldialog.ModalDialogManager; -@@ -790,7 +792,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { +@@ -802,7 +804,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { mAppMenuCoordinator.getAppMenuHandler(), mActivityTabProvider, mToolbarManager.getMenuButtonView(), () -> { mTabCreatorManagerSupplier.get() @@ -1067,7 +1067,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/Chrome /** * This class creates various kinds of new tabs and adds them to the right {@link TabModel}. */ -@@ -517,7 +521,6 @@ public class ChromeTabCreator extends TabCreator { +@@ -512,7 +516,6 @@ public class ChromeTabCreator extends TabCreator { // TODO(crbug.com/1081924): Clean up the launches from SearchActivity/Chrome. public Tab launchUrlFromExternalApp( LoadUrlParams loadUrlParams, String appId, boolean forceNewTab, Intent intent) { @@ -1098,7 +1098,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabMod diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java -@@ -50,6 +50,8 @@ import org.chromium.components.embedder_support.util.UrlUtilities; +@@ -51,6 +51,8 @@ import org.chromium.components.embedder_support.util.UrlUtilities; import org.chromium.content_public.browser.LoadUrlParams; import org.chromium.url.GURL; @@ -1132,7 +1132,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar import org.chromium.chrome.browser.IntentHandler; import org.chromium.chrome.browser.app.tab_activity_glue.TabReparentingController; import org.chromium.chrome.browser.app.tabmodel.TabWindowManagerSingleton; -@@ -556,7 +557,8 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve +@@ -561,7 +562,8 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve return ret; } }, @@ -1256,8 +1256,8 @@ diff --git a/chrome/browser/android/historical_tab_saver.cc b/chrome/browser/and diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc --- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc +++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc -@@ -350,6 +350,15 @@ ChromeAutocompleteProviderClient::GetOnDeviceTailModelService() const { - #endif // BUILDFLAG(BUILD_WITH_TFLITE_LIB) +@@ -350,6 +350,15 @@ ChromeAutocompleteProviderClient::GetProviderStateService() const { + return ProviderStateServiceFactory::GetForProfile(profile_); } +bool ChromeAutocompleteProviderClient::IsAlwaysIncognitoEnabled() const { @@ -1275,9 +1275,9 @@ diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.h b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.h --- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.h +++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.h -@@ -84,6 +84,7 @@ class ChromeAutocompleteProviderClient : public AutocompleteProviderClient { - const override; +@@ -85,6 +85,7 @@ class ChromeAutocompleteProviderClient : public AutocompleteProviderClient { OnDeviceTailModelService* GetOnDeviceTailModelService() const override; + ProviderStateService* GetProviderStateService() const override; bool IsOffTheRecord() const override; + bool IsAlwaysIncognitoEnabled() const override; bool IsIncognitoProfile() const override; @@ -1445,7 +1445,7 @@ diff --git a/chrome/browser/offline_pages/android/offline_page_bridge.cc b/chrom using base::android::ConvertJavaStringToUTF8; using base::android::ConvertUTF16ToJavaString; -@@ -782,9 +785,15 @@ void OfflinePageBridge::GetPageByOfflineIdDone( +@@ -786,9 +789,15 @@ void OfflinePageBridge::GetPageByOfflineIdDone( } if (offline_page_model_->IsArchiveInInternalDir(offline_page->file_path)) { @@ -1685,7 +1685,7 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse #include "chrome/browser/android/bookmarks/partner_bookmarks_shim.h" #include "chrome/browser/android/ntp/recent_tabs_page_prefs.h" #include "chrome/browser/android/oom_intervention/oom_intervention_decider.h" -@@ -1781,6 +1782,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -1789,6 +1790,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, usage_stats::UsageStatsBridge::RegisterProfilePrefs(registry); variations::VariationsService::RegisterProfilePrefs(registry); webapps::InstallPromptPrefs::RegisterProfilePrefs(registry); @@ -1824,7 +1824,7 @@ diff --git a/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/ 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 -@@ -1431,6 +1431,37 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1322,6 +1322,37 @@ Your Google account may have other forms of browsing history like searches and a Clears history from all synced devices @@ -1865,7 +1865,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/LocationBarModel.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/LocationBarModel.java --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/LocationBarModel.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/LocationBarModel.java -@@ -177,6 +177,7 @@ public class LocationBarModel implements ToolbarDataProvider, LocationBarDataPro +@@ -178,6 +178,7 @@ public class LocationBarModel implements ToolbarDataProvider, LocationBarDataPro protected String mFormattedFullUrl; protected String mUrlForDisplay; private boolean mOmniboxUpdatedConnectionSecurityIndicatorsEnabled; @@ -1873,7 +1873,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow // notifyUrlChanged and notifySecurityStateChanged are usually called 3 times across a same // document navigation. The first call is usually necessary, which updates the UrlBar to reflect -@@ -199,7 +200,9 @@ public class LocationBarModel implements ToolbarDataProvider, LocationBarDataPro +@@ -200,7 +201,9 @@ public class LocationBarModel implements ToolbarDataProvider, LocationBarDataPro public LocationBarModel(Context context, NewTabPageDelegate newTabPageDelegate, @NonNull UrlFormatter urlFormatter, @NonNull ProfileProvider profileProvider, @NonNull OfflineStatus offlineStatus, @@ -1930,7 +1930,7 @@ new file mode 100644 diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h -@@ -3878,6 +3878,12 @@ inline constexpr char kOutOfProcessSystemDnsResolutionEnabled[] = +@@ -3917,6 +3917,12 @@ inline constexpr char kOutOfProcessSystemDnsResolutionEnabled[] = "net.out_of_process_system_dns_resolution_enabled"; #endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) @@ -1997,7 +1997,7 @@ diff --git a/components/content_settings/core/browser/content_settings_pref_prov diff --git a/components/content_settings/core/browser/host_content_settings_map.cc b/components/content_settings/core/browser/host_content_settings_map.cc --- a/components/content_settings/core/browser/host_content_settings_map.cc +++ b/components/content_settings/core/browser/host_content_settings_map.cc -@@ -280,6 +280,7 @@ struct ContentSettingEntry { +@@ -288,6 +288,7 @@ struct ContentSettingEntry { HostContentSettingsMap::HostContentSettingsMap(PrefService* prefs, bool is_off_the_record, @@ -2005,7 +2005,7 @@ diff --git a/components/content_settings/core/browser/host_content_settings_map. bool store_last_modified, bool restore_session, bool should_record_metrics) -@@ -289,6 +290,7 @@ HostContentSettingsMap::HostContentSettingsMap(PrefService* prefs, +@@ -297,6 +298,7 @@ HostContentSettingsMap::HostContentSettingsMap(PrefService* prefs, #endif prefs_(prefs), is_off_the_record_(is_off_the_record), @@ -2013,7 +2013,7 @@ diff --git a/components/content_settings/core/browser/host_content_settings_map. store_last_modified_(store_last_modified), allow_invalid_secondary_pattern_for_testing_(false), clock_(base::DefaultClock::GetInstance()) { -@@ -301,7 +303,7 @@ HostContentSettingsMap::HostContentSettingsMap(PrefService* prefs, +@@ -309,7 +311,7 @@ HostContentSettingsMap::HostContentSettingsMap(PrefService* prefs, policy_provider->AddObserver(this); auto pref_provider_ptr = std::make_unique( @@ -2033,7 +2033,7 @@ diff --git a/components/content_settings/core/browser/host_content_settings_map. bool store_last_modified, bool restore_session, bool should_record_metrics); -@@ -527,6 +528,8 @@ class HostContentSettingsMap : public content_settings::Observer, +@@ -531,6 +532,8 @@ class HostContentSettingsMap : public content_settings::Observer, // Whether this settings map is for an incognito or guest session. bool is_off_the_record_; @@ -2056,7 +2056,7 @@ diff --git a/components/omnibox/browser/autocomplete_provider_client.cc b/compon diff --git a/components/omnibox/browser/autocomplete_provider_client.h b/components/omnibox/browser/autocomplete_provider_client.h --- a/components/omnibox/browser/autocomplete_provider_client.h +++ b/components/omnibox/browser/autocomplete_provider_client.h -@@ -136,6 +136,7 @@ class AutocompleteProviderClient : public OmniboxAction::Client { +@@ -138,6 +138,7 @@ class AutocompleteProviderClient : public OmniboxAction::Client { virtual bool IsOffTheRecord() const = 0; virtual bool IsIncognitoProfile() const = 0; virtual bool IsGuestSession() const = 0; @@ -2067,7 +2067,7 @@ diff --git a/components/omnibox/browser/autocomplete_provider_client.h b/compone diff --git a/components/omnibox/browser/base_search_provider.cc b/components/omnibox/browser/base_search_provider.cc --- a/components/omnibox/browser/base_search_provider.cc +++ b/components/omnibox/browser/base_search_provider.cc -@@ -346,7 +346,7 @@ bool BaseSearchProvider::CanSendZeroSuggestRequest( +@@ -349,7 +349,7 @@ bool BaseSearchProvider::CanSendZeroSuggestRequest( } // Don't make a suggest request if in incognito mode. @@ -2079,7 +2079,7 @@ diff --git a/components/omnibox/browser/base_search_provider.cc b/components/omn diff --git a/components/omnibox/browser/search_provider.cc b/components/omnibox/browser/search_provider.cc --- a/components/omnibox/browser/search_provider.cc +++ b/components/omnibox/browser/search_provider.cc -@@ -780,7 +780,9 @@ bool SearchProvider::IsQuerySuitableForSuggest(bool* query_is_private) const { +@@ -781,7 +781,9 @@ bool SearchProvider::IsQuerySuitableForSuggest(bool* query_is_private) const { // keyword input to a keyword suggest server, if any.) const TemplateURL* default_url = providers_.GetDefaultProviderURL(); const TemplateURL* keyword_url = providers_.GetKeywordProviderURL(); diff --git a/build/patches/Add-bookmark-import-export-actions.patch b/build/patches/Add-bookmark-import-export-actions.patch index 87fd54056..52dd8aac0 100644 --- a/build/patches/Add-bookmark-import-export-actions.patch +++ b/build/patches/Add-bookmark-import-export-actions.patch @@ -15,14 +15,14 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../menu/bookmark_toolbar_menu_improved.xml | 14 + .../browser/TabbedModeTabDelegateFactory.java | 5 +- .../app/bookmarks/BookmarkActivity.java | 32 ++ - .../browser/bookmarks/BookmarkBridge.java | 278 +++++++++++++++++ + .../browser/bookmarks/BookmarkBridge.java | 279 +++++++++++++++++ .../browser/bookmarks/BookmarkDelegate.java | 10 + .../bookmarks/BookmarkManagerCoordinator.java | 9 + .../bookmarks/BookmarkManagerMediator.java | 23 ++ .../browser/bookmarks/BookmarkPage.java | 8 +- .../browser/bookmarks/BookmarkToolbar.java | 23 ++ .../bookmarks/BookmarkToolbarMediator.java | 4 + - .../bookmarks/BookmarkToolbarProperties.java | 7 +- + .../bookmarks/BookmarkToolbarProperties.java | 8 +- .../bookmarks/BookmarkToolbarViewBinder.java | 6 + .../native_page/NativePageFactory.java | 11 +- chrome/browser/BUILD.gn | 11 +- @@ -53,7 +53,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html ui/shell_dialogs/select_file_dialog_linux.cc | 4 + ui/shell_dialogs/select_file_dialog_linux.h | 2 + ui/shell_dialogs/select_file_dialog_win.cc | 5 + - 43 files changed, 917 insertions(+), 29 deletions(-) + 43 files changed, 919 insertions(+), 29 deletions(-) create mode 100644 cromite_flags/chrome/browser/about_flags_cc/add-bookmark-import-export-actions.inc create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/add-bookmark-import-export-actions.inc create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/add-bookmark-import-export-actions.inc @@ -149,7 +149,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/TabbedModeTabDe diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/bookmarks/BookmarkActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/bookmarks/BookmarkActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/app/bookmarks/BookmarkActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/bookmarks/BookmarkActivity.java -@@ -21,6 +21,11 @@ import org.chromium.chrome.browser.preferences.SharedPreferencesManager; +@@ -21,6 +21,11 @@ import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.components.bookmarks.BookmarkId; import org.chromium.components.embedder_support.util.UrlConstants; @@ -242,7 +242,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm import android.text.TextUtils; import android.util.Pair; -@@ -37,6 +50,32 @@ import org.chromium.url.GURL; +@@ -38,6 +51,32 @@ import org.chromium.url.GURL; import java.util.ArrayList; import java.util.List; @@ -273,10 +273,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm +import java.io.File; + /** - * Provides the communication channel for Android to fetch and manipulate the - * bookmark model stored in native. -@@ -435,6 +474,209 @@ class BookmarkBridge { - mNativeBookmarkBridge, id.getId(), id.getType()); + * Provides the communication channel for Android to fetch and manipulate the bookmark model stored + * in native. +@@ -451,6 +490,209 @@ class BookmarkBridge { + .getTotalBookmarkCount(mNativeBookmarkBridge, id.getId(), id.getType()); } + /** @@ -484,8 +484,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm + /** * Synchronously gets a list of bookmarks that match the specified search query. - * @param query Keyword used for searching bookmarks. -@@ -931,6 +1173,39 @@ class BookmarkBridge { + * +@@ -979,6 +1221,39 @@ class BookmarkBridge { depthList.add(depth); } @@ -525,22 +525,23 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm private static List> createPairsList(int[] left, int[] right) { List> pairList = new ArrayList<>(); for (int i = 0; i < left.length; i++) { -@@ -961,6 +1236,9 @@ class BookmarkBridge { - int getChildCount(long nativeBookmarkBridge, long id, int type); +@@ -1024,6 +1299,10 @@ class BookmarkBridge { void getChildIds( long nativeBookmarkBridge, long id, int type, List bookmarksList); + + void importBookmarks(long nativeBookmarkBridge, BookmarkBridge caller, WindowAndroid window); + void exportBookmarks(long nativeBookmarkBridge, BookmarkBridge caller, WindowAndroid window, + String export_path); ++ BookmarkId getChildAt(long nativeBookmarkBridge, long id, int type, int index); + int getTotalBookmarkCount(long nativeBookmarkBridge, long id, int type); - void setBookmarkTitle(long nativeBookmarkBridge, long id, int type, String title); diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkDelegate.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkDelegate.java -@@ -60,6 +60,16 @@ public interface BookmarkDelegate { - */ - void openBookmarksInNewTabs(List bookmark, boolean incognito); +@@ -66,6 +66,16 @@ public interface BookmarkDelegate { + /** Shows the search UI. */ + void openSearchUi(); + /** + * Imports bookmarks from user-selected file. @@ -552,9 +553,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm + */ + void exportBookmarks(); + - /** - * Shows the search UI. - */ + /** Add an observer to bookmark UI changes. */ + void addUiObserver(BookmarkUiObserver observer); + diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerCoordinator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerCoordinator.java @@ -567,7 +568,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm import org.chromium.ui.modaldialog.ModalDialogManager; import org.chromium.ui.modaldialog.ModalDialogManager.ModalDialogType; import org.chromium.ui.modelutil.MVCListAdapter.ModelList; -@@ -233,6 +235,13 @@ public class BookmarkManagerCoordinator +@@ -326,6 +328,13 @@ public class BookmarkManagerCoordinator // Public API implementation. @@ -578,9 +579,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm + mMediator.setWindow(window, modalDialogManager); + } + - /** - * Destroys and cleans up itself. This must be called after done using this class. - */ + /** Destroys and cleans up itself. This must be called after done using this class. */ + public void onDestroyed() { + RecordUserAction.record("MobileBookmarkManagerClose"); diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediator.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediator.java @@ -600,10 +601,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm + private ActivityWindowAndroid mWindowAndroid; + private ModalDialogManager mModalDialogManager; + - /** - * Keeps track of whether drag is enabled / active for bookmark lists. - */ -@@ -513,6 +518,14 @@ class BookmarkManagerMediator + /** Keeps track of whether drag is enabled / active for bookmark lists. */ + private class BookmarkDragStateDelegate implements DragStateDelegate { + private BookmarkDelegate mBookmarkDelegate; +@@ -566,6 +571,14 @@ class BookmarkManagerMediator mNativePage = nativePage; } @@ -615,10 +616,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm + mModalDialogManager = modalDialogManager; + } + - /** - * See BookmarkManager(Coordinator)#updateForUrl - */ -@@ -689,6 +702,16 @@ class BookmarkManagerMediator + /** See BookmarkManager(Coordinator)#updateForUrl */ + void updateForUrl(String url) { + // Bookmark model is null if the manager has been destroyed. +@@ -742,6 +755,16 @@ class BookmarkManagerMediator } } @@ -646,20 +647,20 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm +import org.chromium.ui.modaldialog.ModalDialogManager; +import org.chromium.components.browser_ui.modaldialog.AppModalPresenter; - /** - * A native page holding a {@link BookmarkManagerCoordinator} on _tablet_. -@@ -29,7 +32,7 @@ public class BookmarkPage extends BasicNativePage { - * @param host A NativePageHost to load urls. - */ - public BookmarkPage(ComponentName componentName, SnackbarManager snackbarManager, -- boolean isIncognito, NativePageHost host) { -+ boolean isIncognito, NativePageHost host, ChromeActivity activity) { + /** A native page holding a {@link BookmarkManagerCoordinator} on _tablet_. */ + public class BookmarkPage extends BasicNativePage { +@@ -31,7 +34,7 @@ public class BookmarkPage extends BasicNativePage { + ComponentName componentName, + SnackbarManager snackbarManager, + boolean isIncognito, +- NativePageHost host) { ++ NativePageHost host, ChromeActivity activity) { super(host); mBookmarkManagerCoordinator = -@@ -37,6 +40,9 @@ public class BookmarkPage extends BasicNativePage { - snackbarManager, Profile.getLastUsedRegularProfile(), - new BookmarkUiPrefs(SharedPreferencesManager.getInstance())); +@@ -44,6 +47,9 @@ public class BookmarkPage extends BasicNativePage { + Profile.getLastUsedRegularProfile(), + new BookmarkUiPrefs(ChromeSharedPreferences.getInstance())); mBookmarkManagerCoordinator.setBasicNativePage(this); + mBookmarkManagerCoordinator.setWindow(activity.getWindowAndroid(), + new ModalDialogManager( @@ -670,7 +671,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbar.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbar.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbar.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbar.java -@@ -119,6 +119,17 @@ public class BookmarkToolbar extends SelectableListToolbar +@@ -120,6 +120,17 @@ public class BookmarkToolbar extends SelectableListToolbar setOnMenuItemClickListener(dragEnabled ? null : this); } @@ -688,7 +689,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm void setSearchButtonVisible(boolean visible) { // The improved bookmarks experience embeds search in the list. if (BookmarkFeatures.isAndroidImprovedBookmarksEnabled()) return; -@@ -172,6 +183,8 @@ public class BookmarkToolbar extends SelectableListToolbar +@@ -173,6 +184,8 @@ public class BookmarkToolbar extends SelectableListToolbar void setCurrentFolder(BookmarkId folder) { mCurrentFolder = mBookmarkModel.getBookmarkById(folder); @@ -697,7 +698,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm } void setNavigateBackRunnable(Runnable navigateBackRunnable) { -@@ -191,6 +204,13 @@ public class BookmarkToolbar extends SelectableListToolbar +@@ -192,6 +205,13 @@ public class BookmarkToolbar extends SelectableListToolbar @Override public boolean onMenuItemClick(MenuItem menuItem) { hideOverflowMenu(); @@ -711,7 +712,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm return mMenuIdClickedFunction.apply(menuItem.getItemId()); } -@@ -211,6 +231,9 @@ public class BookmarkToolbar extends SelectableListToolbar +@@ -212,6 +232,9 @@ public class BookmarkToolbar extends SelectableListToolbar protected void showNormalView() { super.showNormalView(); @@ -724,22 +725,22 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarMediator.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarMediator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarMediator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarMediator.java -@@ -109,6 +109,10 @@ class BookmarkToolbarMediator implements BookmarkUiObserver, DragListener, - bookmarkDelegateSupplier.onAvailable((bookmarkDelegate) -> { - mBookmarkDelegate = bookmarkDelegate; - mModel.set(BookmarkToolbarProperties.NAVIGATE_BACK_RUNNABLE, this::onNavigateBack); -+ mModel.set( -+ BookmarkToolbarProperties.IMPORT_BOOKMARK_RUNNABLE, mBookmarkDelegate::importBookmarks); -+ mModel.set( -+ BookmarkToolbarProperties.EXPORT_BOOKMARK_RUNNABLE, mBookmarkDelegate::exportBookmarks); - mBookmarkDelegate.addUiObserver(this); - mBookmarkDelegate.notifyStateChange(this); - }); +@@ -129,6 +129,10 @@ class BookmarkToolbarMediator + mBookmarkDelegate = bookmarkDelegate; + mModel.set( + BookmarkToolbarProperties.NAVIGATE_BACK_RUNNABLE, this::onNavigateBack); ++ mModel.set( ++ BookmarkToolbarProperties.IMPORT_BOOKMARK_RUNNABLE, mBookmarkDelegate::importBookmarks); ++ mModel.set( ++ BookmarkToolbarProperties.EXPORT_BOOKMARK_RUNNABLE, mBookmarkDelegate::exportBookmarks); + mBookmarkDelegate.addUiObserver(this); + mBookmarkDelegate.notifyStateChange(this); + }); diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarProperties.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarProperties.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarProperties.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarProperties.java -@@ -66,11 +66,16 @@ class BookmarkToolbarProperties { - new WritableObjectPropertyKey<>(); +@@ -69,6 +69,10 @@ class BookmarkToolbarProperties { + static final WritableObjectPropertyKey NAVIGATE_BACK_RUNNABLE = new WritableObjectPropertyKey<>(); + static final WritableObjectPropertyKey IMPORT_BOOKMARK_RUNNABLE = @@ -747,19 +748,22 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm + static final WritableObjectPropertyKey EXPORT_BOOKMARK_RUNNABLE = + new WritableObjectPropertyKey<>(); - static final PropertyKey[] ALL_KEYS = {BOOKMARK_MODEL, BOOKMARK_OPENER, SELECTION_DELEGATE, - TITLE, BOOKMARK_UI_MODE, SOFT_KEYBOARD_VISIBLE, IS_DIALOG_UI, DRAG_ENABLED, - SEARCH_BUTTON_VISIBLE, EDIT_BUTTON_VISIBLE, NEW_FOLDER_BUTTON_VISIBLE, - NEW_FOLDER_BUTTON_ENABLED, NAVIGATION_BUTTON_STATE, CURRENT_FOLDER, SORT_MENU_IDS, - SORT_MENU_IDS_ENABLED, CHECKED_SORT_MENU_ID, CHECKED_VIEW_MENU_ID, -- MENU_ID_CLICKED_FUNCTION, NAVIGATE_BACK_RUNNABLE, FAKE_SELECTION_STATE_CHANGE}; -+ MENU_ID_CLICKED_FUNCTION, NAVIGATE_BACK_RUNNABLE, FAKE_SELECTION_STATE_CHANGE, -+ IMPORT_BOOKMARK_RUNNABLE, EXPORT_BOOKMARK_RUNNABLE}; + static final PropertyKey[] ALL_KEYS = { + BOOKMARK_MODEL, +@@ -91,6 +95,8 @@ class BookmarkToolbarProperties { + CHECKED_VIEW_MENU_ID, + MENU_ID_CLICKED_FUNCTION, + NAVIGATE_BACK_RUNNABLE, +- FAKE_SELECTION_STATE_CHANGE ++ FAKE_SELECTION_STATE_CHANGE, ++ IMPORT_BOOKMARK_RUNNABLE, ++ EXPORT_BOOKMARK_RUNNABLE + }; } diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarViewBinder.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarViewBinder.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarViewBinder.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarViewBinder.java -@@ -61,6 +61,12 @@ class BookmarkToolbarViewBinder { +@@ -59,6 +59,12 @@ class BookmarkToolbarViewBinder { model.get(BookmarkToolbarProperties.CHECKED_VIEW_MENU_ID)); } else if (key == BookmarkToolbarProperties.CURRENT_FOLDER) { bookmarkToolbar.setCurrentFolder(model.get(BookmarkToolbarProperties.CURRENT_FOLDER)); @@ -831,7 +835,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -225,6 +225,8 @@ static_library("browser") { +@@ -208,6 +208,8 @@ static_library("browser") { "bluetooth/chrome_bluetooth_delegate_impl_client.h", "bookmarks/bookmark_model_factory.cc", "bookmarks/bookmark_model_factory.h", @@ -840,7 +844,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn "bookmarks/chrome_bookmark_client.cc", "bookmarks/chrome_bookmark_client.h", "bookmarks/managed_bookmark_service_factory.cc", -@@ -1968,6 +1970,13 @@ static_library("browser") { +@@ -1974,6 +1976,13 @@ static_library("browser") { ] } @@ -854,7 +858,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn configs += [ "//build/config/compiler:wexit_time_destructors", "//build/config:precompiled_headers", -@@ -3697,8 +3706,6 @@ static_library("browser") { +@@ -3691,8 +3700,6 @@ static_library("browser") { "badging/badge_manager_factory.h", "banners/app_banner_manager_desktop.cc", "banners/app_banner_manager_desktop.h", @@ -996,7 +1000,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse } void BookmarkBridge::Destroy(JNIEnv*) { -@@ -558,6 +665,182 @@ jint BookmarkBridge::GetTotalBookmarkCount( +@@ -556,6 +663,182 @@ jint BookmarkBridge::GetTotalBookmarkCount( return count; } @@ -1373,11 +1377,11 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse + &kBookmarksExportUseSaf, &kCriticalPersistedTabData, &kCreateNewTabInitializeRenderer, - &kCCTBackgroundTab, + &kCCTBottomBarSwipeUpGesture, 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 -@@ -475,6 +475,7 @@ public abstract class ChromeFeatureList { +@@ -489,6 +489,7 @@ public abstract class ChromeFeatureList { public static final String USE_LIBUNWINDSTACK_NATIVE_UNWINDER_ANDROID = "UseLibunwindstackNativeUnwinderAndroid"; public static final String USER_BYPASS_UI = "UserBypassUI"; @@ -1388,7 +1392,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f diff --git a/chrome/browser/importer/profile_writer.cc b/chrome/browser/importer/profile_writer.cc --- a/chrome/browser/importer/profile_writer.cc +++ b/chrome/browser/importer/profile_writer.cc -@@ -106,12 +106,14 @@ void ProfileWriter::AddHistoryPage(const history::URLRows& page, +@@ -105,12 +105,14 @@ void ProfileWriter::AddHistoryPage(const history::URLRows& page, HistoryServiceFactory::GetForProfile(profile_, ServiceAccessType::EXPLICIT_ACCESS) ->AddPagesWithDetails(page, visit_source); @@ -1403,7 +1407,7 @@ diff --git a/chrome/browser/importer/profile_writer.cc b/chrome/browser/importer } void ProfileWriter::AddHomepage(const GURL& home_page) { -@@ -132,6 +134,16 @@ void ProfileWriter::AddBookmarks( +@@ -131,6 +133,16 @@ void ProfileWriter::AddBookmarks( return; BookmarkModel* model = BookmarkModelFactory::GetForBrowserContext(profile_); @@ -1455,7 +1459,7 @@ diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/bro /** * Whether Chrome is set as the default browser. -@@ -992,6 +994,7 @@ public final class ChromePreferenceKeys { +@@ -986,6 +988,7 @@ public final class ChromePreferenceKeys { AUTOFILL_ASSISTANT_PROACTIVE_HELP_ENABLED, APP_LAUNCH_LAST_KNOWN_ACTIVE_TAB_STATE, APP_LAUNCH_SEARCH_ENGINE_HAD_LOGO, @@ -1466,7 +1470,7 @@ diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/bro 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 -@@ -245,6 +245,24 @@ CHAR_LIMIT guidelines: +@@ -248,6 +248,24 @@ CHAR_LIMIT guidelines: Sites diff --git a/build/patches/Add-custom-tab-intents-privacy-option.patch b/build/patches/Add-custom-tab-intents-privacy-option.patch index 10a81604a..74e137f66 100644 --- a/build/patches/Add-custom-tab-intents-privacy-option.patch +++ b/build/patches/Add-custom-tab-intents-privacy-option.patch @@ -25,10 +25,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml --- a/chrome/android/java/res/xml/privacy_preferences.xml +++ b/chrome/android/java/res/xml/privacy_preferences.xml -@@ -74,6 +74,16 @@ found in the LICENSE file. - android:fragment="org.chromium.chrome.browser.privacy.settings.DoNotTrackSettings" +@@ -43,6 +43,16 @@ found in the LICENSE file. android:key="do_not_track" - android:title="@string/do_not_track_title"/> + android:title="@string/do_not_track_title" + android:fragment="org.chromium.chrome.browser.privacy.settings.DoNotTrackSettings" /> + ", "", servicesLink)); } @@ -140,7 +140,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting @Override public boolean onPreferenceChange(Preference preference, Object newValue) { String key = preference.getKey(); -@@ -263,6 +269,14 @@ public class PrivacySettings +@@ -261,6 +267,14 @@ public class PrivacySettings } else if (PREF_SEARCH_SUGGESTIONS.equals(key)) { UserPrefs.get(getProfile()) .setBoolean(Pref.SEARCH_SUGGEST_ENABLED, (boolean) newValue); @@ -155,7 +155,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting } return true; } -@@ -287,6 +301,16 @@ public class PrivacySettings +@@ -285,6 +299,16 @@ public class PrivacySettings UserPrefs.get(getProfile()).getBoolean(Pref.CAN_MAKE_PAYMENT_ENABLED)); } @@ -191,7 +191,7 @@ diff --git a/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/TabAsso 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 -@@ -5238,6 +5238,20 @@ To change this setting, <resetlink>reset sync

<resetlink>reset sync

Resume diff --git a/build/patches/Add-exit-menu-item.patch b/build/patches/Add-exit-menu-item.patch index a4861472c..2cf623030 100644 --- a/build/patches/Add-exit-menu-item.patch +++ b/build/patches/Add-exit-menu-item.patch @@ -40,15 +40,15 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ApplicationLifetime.java b/chrome/android/java/src/org/chromium/chrome/browser/ApplicationLifetime.java --- a/chrome/android/java/src/org/chromium/chrome/browser/ApplicationLifetime.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ApplicationLifetime.java -@@ -6,6 +6,7 @@ package org.chromium.chrome.browser; +@@ -7,6 +7,7 @@ package org.chromium.chrome.browser; + import org.jni_zero.CalledByNative; import org.chromium.base.ObserverList; - import org.chromium.base.annotations.CalledByNative; +import org.chromium.chrome.browser.incognito.IncognitoNotificationManager; /** * Watches for when Chrome is told to restart itself. -@@ -42,6 +43,7 @@ public class ApplicationLifetime { +@@ -43,6 +44,7 @@ public class ApplicationLifetime { @CalledByNative public static void terminate(boolean restart) { @@ -59,7 +59,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ApplicationLife 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 -@@ -236,6 +236,8 @@ import java.util.Locale; +@@ -242,6 +242,8 @@ import java.util.Locale; import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; @@ -68,7 +68,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct /** * This is the main activity for ChromeMobile when not running in document mode. All the tabs * are accessible via a chrome specific tab switching UI. -@@ -2271,6 +2273,8 @@ public class ChromeTabbedActivity extends ChromeActivity +@@ -2404,6 +2405,11 @@ public abstract class ChromeActivity return true; } @@ -119,7 +119,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLife 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 -@@ -3859,6 +3859,9 @@ To change this setting, <resetlink>reset sync

<resetlink>reset sync

Dark theme diff --git a/build/patches/Add-flag-for-omnibox-autocomplete-filtering.patch b/build/patches/Add-flag-for-omnibox-autocomplete-filtering.patch index 1355753c9..f56d71545 100644 --- a/build/patches/Add-flag-for-omnibox-autocomplete-filtering.patch +++ b/build/patches/Add-flag-for-omnibox-autocomplete-filtering.patch @@ -18,7 +18,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/omnibox/browser/autocomplete_controller.cc --- a/components/omnibox/browser/autocomplete_controller.cc +++ b/components/omnibox/browser/autocomplete_controller.cc -@@ -18,6 +18,7 @@ +@@ -20,6 +20,7 @@ #include "base/barrier_callback.h" #include "base/check_op.h" #include "base/containers/contains.h" @@ -26,7 +26,7 @@ diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/ #include "base/feature_list.h" #include "base/format_macros.h" #include "base/functional/bind.h" -@@ -305,6 +306,15 @@ AutocompleteController::AutocompleteController( +@@ -334,6 +335,15 @@ AutocompleteController::AutocompleteController( provider_client_->GetOmniboxTriggeredFeatureService()), steady_state_omnibox_position_( metrics::OmniboxEventProto::UNKNOWN_POSITION) { @@ -66,7 +66,7 @@ diff --git a/components/omnibox/browser/search_provider.cc b/components/omnibox/ #include "base/functional/callback.h" #include "base/i18n/break_iterator.h" #include "base/i18n/case_conversion.h" -@@ -649,6 +650,9 @@ void SearchProvider::Run(bool query_is_private) { +@@ -650,6 +651,9 @@ void SearchProvider::Run(bool query_is_private) { } void SearchProvider::DoHistoryQuery(bool minimal_changes) { diff --git a/build/patches/Add-flag-to-configure-maximum-connections-per-host.patch b/build/patches/Add-flag-to-configure-maximum-connections-per-host.patch index b054ea13b..4b2fa94a3 100644 --- a/build/patches/Add-flag-to-configure-maximum-connections-per-host.patch +++ b/build/patches/Add-flag-to-configure-maximum-connections-per-host.patch @@ -92,7 +92,7 @@ new file mode 100644 diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket_pool_manager.cc --- a/net/socket/client_socket_pool_manager.cc +++ b/net/socket/client_socket_pool_manager.cc -@@ -19,6 +19,10 @@ +@@ -21,6 +21,10 @@ #include "net/socket/client_socket_handle.h" #include "net/socket/client_socket_pool.h" #include "net/socket/connect_job.h" @@ -103,7 +103,7 @@ diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket #include "net/ssl/ssl_config.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "url/gurl.h" -@@ -172,6 +176,19 @@ void ClientSocketPoolManager::set_max_sockets_per_pool( +@@ -174,6 +178,19 @@ void ClientSocketPoolManager::set_max_sockets_per_pool( int ClientSocketPoolManager::max_sockets_per_group( HttpNetworkSession::SocketPoolType pool_type) { DCHECK_LT(pool_type, HttpNetworkSession::NUM_SOCKET_POOL_TYPES); diff --git a/build/patches/Add-flag-to-disable-IPv6-probes.patch b/build/patches/Add-flag-to-disable-IPv6-probes.patch index e9c227d3c..3d5bfdd8f 100644 --- a/build/patches/Add-flag-to-disable-IPv6-probes.patch +++ b/build/patches/Add-flag-to-disable-IPv6-probes.patch @@ -45,9 +45,9 @@ new file mode 100644 diff --git a/net/BUILD.gn b/net/BUILD.gn --- a/net/BUILD.gn +++ b/net/BUILD.gn -@@ -1094,6 +1094,7 @@ component("net") { +@@ -1096,6 +1096,7 @@ component("net") { "//build:chromeos_buildflags", - "//net/data/ssl/chrome_root_store:gen_root_store_inc", + "//components/miracle_parameter/common", "//net/http:transport_security_state_generated_files", + "//components/network_session_configurator/common" ] @@ -56,7 +56,7 @@ diff --git a/net/BUILD.gn b/net/BUILD.gn 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 -@@ -110,6 +110,7 @@ +@@ -111,6 +111,7 @@ #include "net/log/net_log_event_type.h" #include "net/log/net_log_source.h" #include "net/log/net_log_source_type.h" @@ -64,7 +64,7 @@ diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc #include "net/log/net_log_with_source.h" #include "net/socket/client_socket_factory.h" #include "net/url_request/url_request_context.h" -@@ -685,6 +686,9 @@ class HostResolverManager::RequestImpl +@@ -684,6 +685,9 @@ class HostResolverManager::RequestImpl // request source is LOCAL_ONLY. This is due to LOCAL_ONLY requiring a // synchronous response, so it cannot wait on an async probe result and // cannot make assumptions about reachability. diff --git a/build/patches/Add-flag-to-disable-vibration.patch b/build/patches/Add-flag-to-disable-vibration.patch index 42e332d4a..e8fb1ba6a 100644 --- a/build/patches/Add-flag-to-disable-vibration.patch +++ b/build/patches/Add-flag-to-disable-vibration.patch @@ -20,7 +20,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html 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 -@@ -103,6 +103,7 @@ void SetRuntimeFeatureDefaultsForPlatform( +@@ -104,6 +104,7 @@ void SetRuntimeFeatureDefaultsForPlatform( if (command_line.HasSwitch(switches::kDisableMediaSessionAPI)) { WebRuntimeFeatures::EnableMediaSession(false); } @@ -59,10 +59,10 @@ new file mode 100644 diff --git a/third_party/blink/public/platform/web_runtime_features.h b/third_party/blink/public/platform/web_runtime_features.h --- a/third_party/blink/public/platform/web_runtime_features.h +++ b/third_party/blink/public/platform/web_runtime_features.h -@@ -70,6 +70,7 @@ class BLINK_PLATFORM_EXPORT WebRuntimeFeatures : public WebRuntimeFeaturesBase { - static void EnableFingerprintingCanvasMeasureTextNoise(bool); +@@ -71,6 +71,7 @@ class BLINK_PLATFORM_EXPORT WebRuntimeFeatures : public WebRuntimeFeaturesBase { static void EnableFingerprintingCanvasImageDataNoise(bool); static void EnableFluentScrollbars(bool); + static void EnableFluentOverlayScrollbars(bool); + static void EnableVibration(bool); WebRuntimeFeatures() = delete; @@ -104,7 +104,7 @@ diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.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 -@@ -2638,6 +2638,10 @@ +@@ -2718,6 +2718,10 @@ status: {"Android": "stable"}, base_feature: "none", }, diff --git a/build/patches/Add-kill-switch-for-unsupported-clangd-flags.patch b/build/patches/Add-kill-switch-for-unsupported-clangd-flags.patch index cd739a2e3..cbfb7f2f8 100644 --- a/build/patches/Add-kill-switch-for-unsupported-clangd-flags.patch +++ b/build/patches/Add-kill-switch-for-unsupported-clangd-flags.patch @@ -14,9 +14,9 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn -@@ -1845,6 +1845,11 @@ config("default_warnings") { - # TODO(crbug.com/1412713) Evaluate and possibly enable. - "-Wno-deprecated-this-capture", +@@ -1889,6 +1889,11 @@ config("default_warnings") { + # TODO(crbug.com/1495100): Evaluate and possibly enable. + "-Wno-delayed-template-parsing-in-cxx20", ] + if (skip_clangd_unsupported_options) { + cflags -= [ @@ -36,8 +36,8 @@ diff --git a/build_overrides/build.gni b/build_overrides/build.gni + # Allows clangd builds by suppressing unsupported parameters + skip_clangd_unsupported_options = false + - # Allows third-party repositories to use C++17 for MSVC builds - # TODO(https://crbug.com/pdfium/1932) Remove once pdfium builds on MSVC C++20 - msvc_use_cxx17 = false + # Allow projects that wish to stay on C++17 to override Chromium's default. + # TODO(crbug.com/1402249): evaluate removing this end of 2023 + use_cxx17 = false -- 2.25.1 diff --git a/build/patches/Add-lifetime-options-for-permissions.patch b/build/patches/Add-lifetime-options-for-permissions.patch index 7b006d76c..43595bf5b 100644 --- a/build/patches/Add-lifetime-options-for-permissions.patch +++ b/build/patches/Add-lifetime-options-for-permissions.patch @@ -76,7 +76,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html components/page_info/page_info.cc | 2 + components/page_info/page_info.h | 1 + .../permissions/PermissionDialogDelegate.java | 13 +++ - .../permissions/PermissionDialogModel.java | 81 ++++++++++++++++++- + .../PermissionDialogModelFactory.java | 81 ++++++++++++++++++- .../permission_dialog_delegate.cc | 19 +++++ .../permission_dialog_delegate.h | 1 + .../permission_prompt_android.cc | 8 ++ @@ -233,14 +233,14 @@ diff --git a/chrome/browser/permissions/one_time_permissions_tracker_factory.cc diff --git a/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc b/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc --- a/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc +++ b/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc -@@ -34,7 +34,7 @@ void EmbeddedPermissionPromptAskView::RunButtonCallback(int button_id) { +@@ -33,7 +33,7 @@ void EmbeddedPermissionPromptAskView::RunButtonCallback(int button_id) { if (delegate()) { if (button == ButtonType::kAllowThisTime) { -- delegate()->AcceptThisTime(); -+ delegate()->AcceptThisTime(content_settings::LifetimeMode::OnlyThisTime); +- delegate()->AllowThisTime(); ++ delegate()->AllowThisTime(content_settings::LifetimeMode::OnlyThisTime); } else if (button == ButtonType::kAllow) { - delegate()->Accept(); + delegate()->Allow(); } diff --git a/chrome/browser/ui/views/permissions/permission_prompt_bubble_base_view.cc b/chrome/browser/ui/views/permissions/permission_prompt_bubble_base_view.cc --- a/chrome/browser/ui/views/permissions/permission_prompt_bubble_base_view.cc @@ -257,7 +257,7 @@ diff --git a/chrome/browser/ui/views/permissions/permission_prompt_bubble_base_v 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 -@@ -412,8 +412,8 @@ void ContentAutofillDriver::FormsSeen( +@@ -489,8 +489,8 @@ void ContentAutofillDriver::FormsSeen( const std::vector& removed_forms) { target->GetAutofillManager().OnFormsSeen( WithNewVersion(updated_forms), removed_forms); @@ -268,7 +268,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co WithNewVersion(updated_forms), removed_forms); } }); -@@ -443,8 +443,8 @@ void ContentAutofillDriver::FormSubmitted( +@@ -520,8 +520,8 @@ void ContentAutofillDriver::FormSubmitted( } target->GetAutofillManager().OnFormSubmitted( WithNewVersion(form), known_success, submission_source); @@ -279,7 +279,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co WithNewVersion(form), known_success, submission_source); } }); -@@ -468,8 +468,8 @@ void ContentAutofillDriver::TextFieldDidChange(const FormData& raw_form, +@@ -545,8 +545,8 @@ void ContentAutofillDriver::TextFieldDidChange(const FormData& raw_form, base::TimeTicks timestamp) { target->GetAutofillManager().OnTextFieldDidChange( WithNewVersion(form), field, bounding_box, timestamp); @@ -290,7 +290,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co WithNewVersion(form), field, bounding_box, timestamp); } }); -@@ -491,8 +491,8 @@ void ContentAutofillDriver::TextFieldDidScroll(const FormData& raw_form, +@@ -568,8 +568,8 @@ void ContentAutofillDriver::TextFieldDidScroll(const FormData& raw_form, const FormFieldData& field, const gfx::RectF& bounding_box) { target->GetAutofillManager().OnTextFieldDidScroll(WithNewVersion(form), field, bounding_box); @@ -301,7 +301,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co WithNewVersion(form), field, bounding_box); } }); -@@ -515,8 +515,8 @@ void ContentAutofillDriver::SelectControlDidChange( +@@ -592,8 +592,8 @@ void ContentAutofillDriver::SelectControlDidChange( const FormFieldData& field, const gfx::RectF& bounding_box) { target->GetAutofillManager().OnSelectControlDidChange( WithNewVersion(form), field, bounding_box); @@ -312,7 +312,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co WithNewVersion(form), field, bounding_box); } }); -@@ -541,8 +541,8 @@ void ContentAutofillDriver::AskForValuesToFill( +@@ -618,8 +618,8 @@ void ContentAutofillDriver::AskForValuesToFill( AutofillSuggestionTriggerSource trigger_source) { target->GetAutofillManager().OnAskForValuesToFill( WithNewVersion(form), field, bounding_box, trigger_source); @@ -323,7 +323,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co WithNewVersion(form), field, bounding_box, trigger_source); } }); -@@ -556,8 +556,8 @@ void ContentAutofillDriver::HidePopup() { +@@ -633,8 +633,8 @@ void ContentAutofillDriver::HidePopup() { DCHECK(!target->IsPrerendering()) << "We should never affect UI while prerendering"; target->GetAutofillManager().OnHidePopup(); @@ -334,7 +334,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -569,8 +569,8 @@ void ContentAutofillDriver::FocusNoLongerOnForm(bool had_interacted_form) { +@@ -646,8 +646,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); @@ -345,7 +345,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -590,15 +590,15 @@ void ContentAutofillDriver::FocusOnFormField(const FormData& raw_form, +@@ -667,15 +667,15 @@ void ContentAutofillDriver::FocusOnFormField(const FormData& raw_form, const FormFieldData& field, const gfx::RectF& bounding_box) { target->GetAutofillManager().OnFocusOnFormField(WithNewVersion(form), field, bounding_box); @@ -365,7 +365,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co } }); } -@@ -614,8 +614,8 @@ void ContentAutofillDriver::DidFillAutofillFormData(const FormData& raw_form, +@@ -691,8 +691,8 @@ void ContentAutofillDriver::DidFillAutofillFormData(const FormData& raw_form, base::TimeTicks timestamp) { target->GetAutofillManager().OnDidFillAutofillFormData( WithNewVersion(form), timestamp); @@ -376,7 +376,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co WithNewVersion(form), timestamp); } }); -@@ -627,8 +627,8 @@ void ContentAutofillDriver::DidEndTextFieldEditing() { +@@ -704,8 +704,8 @@ void ContentAutofillDriver::DidEndTextFieldEditing() { } router().DidEndTextFieldEditing(this, [](autofill::AutofillDriver* target) { target->GetAutofillManager().OnDidEndTextFieldEditing(); @@ -387,7 +387,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -643,8 +643,8 @@ void ContentAutofillDriver::SelectOrSelectListFieldOptionsDidChange( +@@ -720,8 +720,8 @@ void ContentAutofillDriver::SelectOrSelectListFieldOptionsDidChange( cast(target) ->GetAutofillManager() .OnSelectOrSelectListFieldOptionsDidChange(WithNewVersion(form)); @@ -398,7 +398,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co WithNewVersion(form)); } }); -@@ -666,8 +666,8 @@ void ContentAutofillDriver::JavaScriptChangedAutofilledValue( +@@ -743,8 +743,8 @@ void ContentAutofillDriver::JavaScriptChangedAutofilledValue( const FormFieldData& field, const std::u16string& old_value) { target->GetAutofillManager().OnJavaScriptChangedAutofilledValue( WithNewVersion(form), field, old_value); @@ -409,7 +409,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co WithNewVersion(form), field, old_value); } }); -@@ -682,8 +682,8 @@ void ContentAutofillDriver::OnContextMenuShownInField( +@@ -759,8 +759,8 @@ void ContentAutofillDriver::OnContextMenuShownInField( const FieldGlobalId& field_global_id) { target->GetAutofillManager().OnContextMenuShownInField(form_global_id, field_global_id); @@ -420,7 +420,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -708,6 +708,10 @@ ContentAutofillDriver::GetAutofillAgent() { +@@ -785,6 +785,10 @@ ContentAutofillDriver::GetAutofillAgent() { return autofill_agent_; } @@ -434,7 +434,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co diff --git a/components/autofill/content/browser/content_autofill_driver.h b/components/autofill/content/browser/content_autofill_driver.h --- a/components/autofill/content/browser/content_autofill_driver.h +++ b/components/autofill/content/browser/content_autofill_driver.h -@@ -132,7 +132,7 @@ class ContentAutofillDriver : public AutofillDriver, +@@ -133,7 +133,7 @@ class ContentAutofillDriver : public AutofillDriver, autofill_manager_ = std::move(autofill_manager); secondary_autofill_manager_ = std::move(secondary_autofill_manager); } @@ -506,7 +506,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c import org.chromium.components.embedder_support.util.Origin; import org.chromium.content_public.browser.BrowserContextHandle; -@@ -558,6 +559,11 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -551,6 +552,11 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment } } @@ -518,7 +518,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c private void setUpClearDataPreference() { ClearWebsiteStorage preference = findPreference(PREF_CLEAR_DATA); long usage = mSite.getTotalUsage(); -@@ -1024,6 +1030,10 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1034,6 +1040,10 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment if (contentType == mHighlightedPermission) { switchPreference.setBackgroundColor(mHighlightColor); } @@ -532,15 +532,15 @@ 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 -@@ -9,6 +9,7 @@ import org.chromium.base.annotations.CalledByNative; - import org.chromium.base.annotations.NativeMethods; +@@ -10,6 +10,7 @@ import org.jni_zero.NativeMethods; + import org.chromium.base.Callback; import org.chromium.components.content_settings.ContentSettingValues; import org.chromium.components.content_settings.ContentSettingsType; +import org.chromium.components.content_settings.SessionModel; import org.chromium.components.location.LocationUtils; import org.chromium.content_public.browser.BrowserContextHandle; import org.chromium.url.GURL; -@@ -55,7 +56,8 @@ public class WebsitePreferenceBridge { +@@ -56,7 +57,8 @@ public class WebsitePreferenceBridge { @CalledByNative private static void insertPermissionInfoIntoList(@ContentSettingsType int type, @@ -550,7 +550,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (type == ContentSettingsType.MEDIASTREAM_CAMERA || type == ContentSettingsType.MEDIASTREAM_MIC) { for (PermissionInfo info : list) { -@@ -64,7 +66,7 @@ public class WebsitePreferenceBridge { +@@ -65,7 +67,7 @@ public class WebsitePreferenceBridge { } } } @@ -593,7 +593,7 @@ diff --git a/components/browser_ui/site_settings/android/website_preference_brid 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 -@@ -642,6 +642,11 @@ +@@ -688,6 +688,11 @@ URL truncated @@ -602,13 +602,13 @@ diff --git a/components/browser_ui/strings/android/browser_ui_strings.grd b/comp + (only this session) + + - - Ad personalization + + Ad privacy diff --git a/components/content_settings/android/BUILD.gn b/components/content_settings/android/BUILD.gn --- a/components/content_settings/android/BUILD.gn +++ b/components/content_settings/android/BUILD.gn -@@ -60,6 +60,7 @@ java_cpp_enum("content_settings_enums_javagen") { +@@ -61,6 +61,7 @@ java_cpp_enum("content_settings_enums_javagen") { "../core/common/cookie_controls_breakage_confidence_level.h", "../core/common/cookie_controls_enforcement.h", "../core/common/cookie_controls_status.h", @@ -619,7 +619,7 @@ diff --git a/components/content_settings/android/BUILD.gn b/components/content_s diff --git a/components/content_settings/core/browser/content_settings_utils.cc b/components/content_settings/core/browser/content_settings_utils.cc --- a/components/content_settings/core/browser/content_settings_utils.cc +++ b/components/content_settings/core/browser/content_settings_utils.cc -@@ -174,6 +174,42 @@ bool IsConstraintPersistent(const ContentSettingConstraints& constraints) { +@@ -173,6 +173,42 @@ bool IsConstraintPersistent(const ContentSettingConstraints& constraints) { return constraints.session_model() == SessionModel::Durable; } @@ -709,7 +709,7 @@ diff --git a/components/content_settings/core/common/content_settings_constraint diff --git a/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoController.java b/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoController.java --- a/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoController.java +++ b/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoController.java -@@ -336,9 +336,9 @@ public class PageInfoController implements PageInfoMainController, ModalDialogPr +@@ -337,9 +337,9 @@ public class PageInfoController implements PageInfoMainController, ModalDialogPr */ @CalledByNative private void addPermissionSection(String name, String nameMidSentence, int type, @@ -808,7 +808,7 @@ diff --git a/components/page_info/android/page_info_controller_android.cc b/comp diff --git a/components/page_info/page_info.cc b/components/page_info/page_info.cc --- a/components/page_info/page_info.cc +++ b/components/page_info/page_info.cc -@@ -1184,6 +1184,8 @@ void PageInfo::PopulatePermissionInfo(PermissionInfo& permission_info, +@@ -1188,6 +1188,8 @@ void PageInfo::PopulatePermissionInfo(PermissionInfo& permission_info, permission_info.source = info.source; permission_info.is_one_time = (info.metadata.session_model() == content_settings::SessionModel::OneTime); @@ -820,7 +820,7 @@ diff --git a/components/page_info/page_info.cc b/components/page_info/page_info. diff --git a/components/page_info/page_info.h b/components/page_info/page_info.h --- a/components/page_info/page_info.h +++ b/components/page_info/page_info.h -@@ -199,6 +199,7 @@ class PageInfo : private content_settings::CookieControlsObserver, +@@ -200,6 +200,7 @@ class PageInfo : private content_settings::CookieControlsObserver, content_settings::SETTING_SOURCE_NONE; // Whether the permission is a one-time grant. bool is_one_time = false; @@ -831,9 +831,9 @@ diff --git a/components/page_info/page_info.h b/components/page_info/page_info.h diff --git a/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogDelegate.java b/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogDelegate.java --- a/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogDelegate.java +++ b/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogDelegate.java -@@ -8,6 +8,7 @@ import org.chromium.base.annotations.CalledByNative; - import org.chromium.base.annotations.JNINamespace; - import org.chromium.base.annotations.NativeMethods; +@@ -11,6 +11,7 @@ import org.jni_zero.JNINamespace; + import org.jni_zero.NativeMethods; + import org.chromium.ui.base.WindowAndroid; +import org.chromium.components.content_settings.LifetimeMode; @@ -849,7 +849,7 @@ diff --git a/components/permissions/android/java/src/org/chromium/components/per public WindowAndroid getWindow() { return mWindow; } -@@ -79,6 +83,15 @@ public class PermissionDialogDelegate { +@@ -75,6 +79,15 @@ public class PermissionDialogDelegate { PermissionDialogDelegateJni.get().accept(mNativeDelegatePtr, PermissionDialogDelegate.this); } @@ -865,10 +865,10 @@ diff --git a/components/permissions/android/java/src/org/chromium/components/per public void onCancel() { assert mNativeDelegatePtr != 0; PermissionDialogDelegateJni.get().cancel(mNativeDelegatePtr, PermissionDialogDelegate.this); -diff --git a/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogModel.java b/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogModel.java ---- a/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogModel.java -+++ b/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogModel.java -@@ -16,6 +16,17 @@ import org.chromium.ui.UiUtils; +diff --git a/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogModelFactory.java b/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogModelFactory.java +--- a/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogModelFactory.java ++++ b/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogModelFactory.java +@@ -12,6 +12,17 @@ import org.chromium.ui.UiUtils; import org.chromium.ui.modaldialog.ModalDialogProperties; import org.chromium.ui.modelutil.PropertyModel; @@ -884,18 +884,18 @@ diff --git a/components/permissions/android/java/src/org/chromium/components/per +import org.chromium.components.content_settings.LifetimeMode; + /** - * This class creates the model for permission dialog. + * This class creates the model for the permission dialog. */ -@@ -41,7 +52,7 @@ class PermissionDialogModel { - secondaryTextView.setVisibility(View.VISIBLE); - } +@@ -27,7 +38,7 @@ class PermissionDialogModelFactory { + String messageText = delegate.getMessageText(); + assert !TextUtils.isEmpty(messageText); - return new PropertyModel.Builder(ModalDialogProperties.ALL_KEYS) + PropertyModel pm = new PropertyModel.Builder(ModalDialogProperties.ALL_KEYS) .with(ModalDialogProperties.CONTROLLER, controller) .with(ModalDialogProperties.FOCUS_DIALOG, true) .with(ModalDialogProperties.CUSTOM_VIEW, customView) -@@ -53,6 +64,74 @@ class PermissionDialogModel { +@@ -39,5 +50,73 @@ class PermissionDialogModelFactory { .with(ModalDialogProperties.BUTTON_TAP_PROTECTION_PERIOD_MS, UiUtils.PROMPT_INPUT_PROTECTION_SHORT_DELAY_MS) .build(); @@ -923,29 +923,29 @@ diff --git a/components/permissions/android/java/src/org/chromium/components/per + // Create radio buttons with lifetime options. + RadioGroup radioGroup = new RadioGroup(context); + -+ RadioButton radioButon = new RadioButton(context); -+ radioButon.setText(context.getString( ++ RadioButton radioButton = new RadioButton(context); ++ radioButton.setText(context.getString( + org.chromium.components.permissions.R.string.session_permissions_only_this_this)); -+ radioButon.setId(LifetimeMode.ONLY_THIS_TIME); -+ radioGroup.addView(radioButon); ++ radioButton.setId(LifetimeMode.ONLY_THIS_TIME); ++ radioGroup.addView(radioButton); + -+ radioButon = new RadioButton(context); -+ radioButon.setText(context.getString( ++ radioButton = new RadioButton(context); ++ radioButton.setText(context.getString( + org.chromium.components.permissions.R.string.session_permissions_until_page_close)); -+ radioButon.setId(LifetimeMode.UNTIL_ORIGIN_CLOSED); -+ radioGroup.addView(radioButon); ++ radioButton.setId(LifetimeMode.UNTIL_ORIGIN_CLOSED); ++ radioGroup.addView(radioButton); + -+ radioButon = new RadioButton(context); -+ radioButon.setText(context.getString( ++ radioButton = new RadioButton(context); ++ radioButton.setText(context.getString( + org.chromium.components.permissions.R.string.session_permissions_until_browser_close)); -+ radioButon.setId(LifetimeMode.UNTIL_BROWSER_CLOSED); -+ radioGroup.addView(radioButon); ++ radioButton.setId(LifetimeMode.UNTIL_BROWSER_CLOSED); ++ radioGroup.addView(radioButton); + -+ radioButon = new RadioButton(context); -+ radioButon.setText(context.getString( ++ radioButton = new RadioButton(context); ++ radioButton.setText(context.getString( + org.chromium.components.permissions.R.string.session_permissions_forever)); -+ radioButon.setId(LifetimeMode.ALWAYS); -+ radioGroup.addView(radioButon); ++ radioButton.setId(LifetimeMode.ALWAYS); ++ radioGroup.addView(radioButton); + + radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { + @Override @@ -958,7 +958,7 @@ diff --git a/components/permissions/android/java/src/org/chromium/components/per + } + + return pm; -+ } + } + + private static boolean contains(final int[] array, final int key) { + int length = array.length; @@ -967,13 +967,12 @@ diff --git a/components/permissions/android/java/src/org/chromium/components/per + return true; + } + return false; - } - - private static View loadDialogView(Context context) { ++ } + } diff --git a/components/permissions/android/permission_prompt/permission_dialog_delegate.cc b/components/permissions/android/permission_prompt/permission_dialog_delegate.cc --- a/components/permissions/android/permission_prompt/permission_dialog_delegate.cc +++ b/components/permissions/android/permission_prompt/permission_dialog_delegate.cc -@@ -68,6 +68,11 @@ void PermissionDialogJavaDelegate::DismissDialog() { +@@ -113,6 +113,11 @@ void PermissionDialogJavaDelegate::DismissDialog() { Java_PermissionDialogDelegate_dismissFromNative(env, j_delegate_); } @@ -985,7 +984,7 @@ diff --git a/components/permissions/android/permission_prompt/permission_dialog_ // static void PermissionDialogDelegate::Create( content::WebContents* web_contents, -@@ -96,12 +101,26 @@ PermissionDialogDelegate* PermissionDialogDelegate::CreateForTesting( +@@ -141,12 +146,26 @@ PermissionDialogDelegate* PermissionDialogDelegate::CreateForTesting( void PermissionDialogDelegate::Accept(JNIEnv* env, const JavaParamRef& obj) { DCHECK(permission_prompt_); @@ -1015,9 +1014,9 @@ diff --git a/components/permissions/android/permission_prompt/permission_dialog_ diff --git a/components/permissions/android/permission_prompt/permission_dialog_delegate.h b/components/permissions/android/permission_prompt/permission_dialog_delegate.h --- a/components/permissions/android/permission_prompt/permission_dialog_delegate.h +++ b/components/permissions/android/permission_prompt/permission_dialog_delegate.h -@@ -35,6 +35,7 @@ class PermissionDialogJavaDelegate { - PermissionDialogDelegate* owner); - virtual void CreateDialog(); +@@ -41,6 +41,7 @@ class PermissionDialogJavaDelegate { + const favicon_base::FaviconRawBitmapResult& favicon_result); + virtual void DismissDialog(); + virtual int GetSelectedLifetimeOption(); @@ -1026,7 +1025,7 @@ diff --git a/components/permissions/android/permission_prompt/permission_dialog_ diff --git a/components/permissions/android/permission_prompt/permission_prompt_android.cc b/components/permissions/android/permission_prompt/permission_prompt_android.cc --- a/components/permissions/android/permission_prompt/permission_prompt_android.cc +++ b/components/permissions/android/permission_prompt/permission_prompt_android.cc -@@ -47,6 +47,14 @@ void PermissionPromptAndroid::Accept() { +@@ -52,6 +52,14 @@ void PermissionPromptAndroid::Accept() { delegate_->Accept(); } @@ -1044,7 +1043,7 @@ diff --git a/components/permissions/android/permission_prompt/permission_prompt_ diff --git a/components/permissions/android/permission_prompt/permission_prompt_android.h b/components/permissions/android/permission_prompt/permission_prompt_android.h --- a/components/permissions/android/permission_prompt/permission_prompt_android.h +++ b/components/permissions/android/permission_prompt/permission_prompt_android.h -@@ -46,7 +46,9 @@ class PermissionPromptAndroid : public PermissionPrompt { +@@ -47,7 +47,9 @@ class PermissionPromptAndroid : public PermissionPrompt { void Closing(); void Accept(); @@ -1401,7 +1400,7 @@ diff --git a/components/permissions/permission_request.cc b/components/permissio PermissionRequest::~PermissionRequest() { DCHECK(delete_callback_.is_null()); } -@@ -276,19 +284,37 @@ bool PermissionRequest::ShouldUseTwoOriginPrompt() const { +@@ -279,19 +287,37 @@ bool PermissionRequest::ShouldUseTwoOriginPrompt() const { permissions::features::kPermissionStorageAccessAPI); } @@ -1480,7 +1479,7 @@ diff --git a/components/permissions/permission_request.h b/components/permission // Called when the user has cancelled the permission request. This // corresponds to a denial, but is segregated in case the context needs to -@@ -174,6 +183,9 @@ class PermissionRequest { +@@ -180,6 +189,9 @@ class PermissionRequest { // Called once a decision is made about the permission. PermissionDecidedCallback permission_decided_callback_; @@ -1511,7 +1510,7 @@ diff --git a/components/permissions/permission_request_manager.cc b/components/p } request->RequestFinished(); return; -@@ -568,7 +568,8 @@ void PermissionRequestManager::Accept() { +@@ -574,7 +574,8 @@ void PermissionRequestManager::Accept() { (*requests_iter)->request_type(), PermissionAction::GRANTED); PermissionGrantedIncludingDuplicates(*requests_iter, @@ -1521,8 +1520,8 @@ diff --git a/components/permissions/permission_request_manager.cc b/components/p #if !BUILDFLAG(IS_ANDROID) absl::optional content_settings_type = -@@ -586,7 +587,7 @@ void PermissionRequestManager::Accept() { - FinalizeCurrentRequests(PermissionAction::GRANTED); +@@ -592,7 +593,7 @@ void PermissionRequestManager::Accept() { + CurrentRequestsDecided(PermissionAction::GRANTED); } -void PermissionRequestManager::AcceptThisTime() { @@ -1530,7 +1529,7 @@ diff --git a/components/permissions/permission_request_manager.cc b/components/p if (ignore_callbacks_from_prompt_) return; DCHECK(view_); -@@ -597,7 +598,8 @@ void PermissionRequestManager::AcceptThisTime() { +@@ -603,7 +604,8 @@ void PermissionRequestManager::AcceptThisTime() { (*requests_iter)->request_type(), PermissionAction::GRANTED_ONCE); PermissionGrantedIncludingDuplicates(*requests_iter, @@ -1540,7 +1539,7 @@ diff --git a/components/permissions/permission_request_manager.cc b/components/p } NotifyRequestDecided(PermissionAction::GRANTED_ONCE); -@@ -605,6 +607,15 @@ void PermissionRequestManager::AcceptThisTime() { +@@ -611,6 +613,15 @@ void PermissionRequestManager::AcceptThisTime() { } void PermissionRequestManager::Deny() { @@ -1556,7 +1555,7 @@ diff --git a/components/permissions/permission_request_manager.cc b/components/p if (ignore_callbacks_from_prompt_) return; DCHECK(view_); -@@ -627,7 +638,7 @@ void PermissionRequestManager::Deny() { +@@ -633,7 +644,7 @@ void PermissionRequestManager::Deny() { StorePermissionActionForUMA((*requests_iter)->requesting_origin(), (*requests_iter)->request_type(), PermissionAction::DENIED); @@ -1565,7 +1564,7 @@ diff --git a/components/permissions/permission_request_manager.cc b/components/p } NotifyRequestDecided(PermissionAction::DENIED); -@@ -1165,32 +1176,32 @@ PermissionRequestManager::VisitDuplicateRequests( +@@ -1184,32 +1195,32 @@ PermissionRequestManager::VisitDuplicateRequests( void PermissionRequestManager::PermissionGrantedIncludingDuplicates( PermissionRequest* request, @@ -1608,7 +1607,7 @@ diff --git a/components/permissions/permission_request_manager.cc b/components/p request); } -@@ -1439,7 +1450,7 @@ void PermissionRequestManager::LogWarningToConsole(const char* message) { +@@ -1458,7 +1469,7 @@ void PermissionRequestManager::LogWarningToConsole(const char* message) { void PermissionRequestManager::DoAutoResponseForTesting() { switch (auto_response_for_test_) { case ACCEPT_ONCE: @@ -1631,8 +1630,8 @@ diff --git a/components/permissions/permission_request_manager.h b/components/pe + void DenyThisTime(content_settings::LifetimeMode lifetime_option) override; void Dismiss() override; void Ignore() override; - void OpenHelpCenterLink(const ui::Event& event) override; -@@ -362,9 +364,12 @@ class PermissionRequestManager + void FinalizeCurrentRequests() override; +@@ -365,9 +367,12 @@ class PermissionRequestManager // Calls PermissionGranted on a request and all its duplicates. void PermissionGrantedIncludingDuplicates(PermissionRequest* request, diff --git a/build/patches/Add-menu-item-to-bookmark-all-tabs.patch b/build/patches/Add-menu-item-to-bookmark-all-tabs.patch index 8ebb1c48c..713b7792b 100644 --- a/build/patches/Add-menu-item-to-bookmark-all-tabs.patch +++ b/build/patches/Add-menu-item-to-bookmark-all-tabs.patch @@ -6,14 +6,14 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- chrome/android/java/res/menu/main_menu.xml | 7 ++ .../chrome/browser/ChromeTabbedActivity.java | 24 +++++++ - .../browser/bookmarks/BookmarkBridge.java | 64 +++++++++++++++++++ - .../bookmarks/android/bookmark_bridge.cc | 43 +++++++++++++ + .../browser/bookmarks/BookmarkBridge.java | 66 +++++++++++++++++++ + .../bookmarks/android/bookmark_bridge.cc | 43 ++++++++++++ .../bookmarks/android/bookmark_bridge.h | 8 +++ .../browser/bookmarks/bookmark_html_writer.cc | 8 ++- - .../bookmarks/chrome_bookmark_client.cc | 2 + .../dialogs/DownloadLocationCustomView.java | 4 +- .../strings/android_chrome_strings.grd | 3 + components/bookmark_bar_strings.grdp | 6 ++ + .../bookmarks/browser/bookmark_client.cc | 2 + .../bookmarks/browser/bookmark_codec.cc | 22 +++++-- components/bookmarks/browser/bookmark_codec.h | 7 +- .../browser/bookmark_load_details.cc | 4 ++ @@ -26,7 +26,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html components/bookmarks/browser/bookmark_uuids.h | 1 + components/bookmarks/browser/model_loader.cc | 3 +- .../bookmark_specifics_conversions.cc | 1 + - 22 files changed, 228 insertions(+), 10 deletions(-) + 22 files changed, 230 insertions(+), 10 deletions(-) diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/res/menu/main_menu.xml --- a/chrome/android/java/res/menu/main_menu.xml @@ -55,7 +55,7 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re 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 -@@ -84,6 +84,7 @@ import org.chromium.chrome.browser.back_press.MinimizeAppAndCloseTabBackPressHan +@@ -85,6 +85,7 @@ import org.chromium.chrome.browser.base.ColdStartTracker; import org.chromium.chrome.browser.bookmarks.BookmarkUtils; import org.chromium.chrome.browser.browserservices.intents.WebappConstants; import org.chromium.chrome.browser.compositor.CompositorViewHolder; @@ -63,7 +63,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct import org.chromium.chrome.browser.compositor.layouts.Layout; import org.chromium.chrome.browser.compositor.layouts.LayoutManagerChrome; import org.chromium.chrome.browser.compositor.layouts.LayoutManagerChromePhone; -@@ -2294,6 +2295,8 @@ public class ChromeTabbedActivity extends ChromeActivity getTabModelSelector().closeAllTabs()); RecordUserAction.record("MobileMenuCloseAllTabs"); @@ -72,7 +72,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct } else if (id == R.id.close_all_incognito_tabs_menu_id) { // Close only incognito tabs CloseAllTabsDialog.show(this, getModalDialogManagerSupplier(), -@@ -2359,6 +2362,27 @@ public class ChromeTabbedActivity extends ChromeActivity mObservers = new ObserverList<>(); @@ -131,7 +131,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm private long mNativeBookmarkBridge; private boolean mIsDestroyed; private boolean mIsDoingExtensiveChanges; -@@ -375,6 +382,16 @@ class BookmarkBridge { +@@ -389,6 +396,16 @@ class BookmarkBridge { return mMobileFolderId; } @@ -148,7 +148,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm /** * @return Id representing the special "other" folder from bookmark model. */ -@@ -1008,6 +1025,50 @@ class BookmarkBridge { +@@ -1033,6 +1050,50 @@ class BookmarkBridge { return BookmarkBridgeJni.get().addToReadingList(mNativeBookmarkBridge, title, url); } @@ -199,22 +199,25 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm /** * @param url The URL of the reading list item. * @return The reading list item with the URL, or null if no such reading list item. -@@ -1221,12 +1282,15 @@ class BookmarkBridge { - void getImageUrlForBookmark(long nativeBookmarkBridge, GURL url, Callback callback); +@@ -1272,6 +1333,9 @@ class BookmarkBridge { BookmarkId getBookmarkIdForWebContents( long nativeBookmarkBridge, WebContents webContents, boolean onlyEditable); + + BookmarkId getBookmarkIdForTabsCollection( + long nativeBookmarkBridge, GURL url); ++ BookmarkItem getBookmarkById(long nativeBookmarkBridge, long id, int type); + void getTopLevelFolderIds(long nativeBookmarkBridge, List bookmarksList); - BookmarkId getReadingListFolder(long nativeBookmarkBridge); - void getAllFoldersWithDepths( - long nativeBookmarkBridge, List folderList, List depthList); +@@ -1283,6 +1347,8 @@ class BookmarkBridge { + BookmarkId getRootFolderId(long nativeBookmarkBridge); + + BookmarkId getTabsCollectionFolderId(long nativeBookmarkBridge, BookmarkBridge caller); ++ BookmarkId getMobileFolderId(long nativeBookmarkBridge); + BookmarkId getOtherFolderId(long nativeBookmarkBridge); - BookmarkId getDesktopFolderId(long nativeBookmarkBridge); diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browser/bookmarks/android/bookmark_bridge.cc --- a/chrome/browser/bookmarks/android/bookmark_bridge.cc +++ b/chrome/browser/bookmarks/android/bookmark_bridge.cc @@ -252,7 +255,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse base::android::ScopedJavaLocalRef BookmarkBridge::GetBookmarkIdForWebContents( JNIEnv* env, -@@ -436,6 +463,10 @@ void BookmarkBridge::GetTopLevelFolderIds( +@@ -438,6 +465,10 @@ void BookmarkBridge::GetTopLevelFolderIds( } top_level_folders.push_back(root_child.get()); } @@ -261,9 +264,9 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse + top_level_folders.push_back(node.get()); + } - if (managed_bookmark_service_->managed_node() && - !managed_bookmark_service_->managed_node()->children().empty()) { -@@ -479,6 +510,7 @@ void BookmarkBridge::GetAllFoldersWithDepths( + if (partner_bookmarks_shim_->HasPartnerBookmarks() && + IsReachable(partner_bookmarks_shim_->GetPartnerBookmarksRoot())) { +@@ -477,6 +508,7 @@ void BookmarkBridge::GetAllFoldersWithDepths( // Vector to temporarily contain all child bookmarks at same level for sorting std::vector bookmarks = { bookmark_model_->mobile_node(), @@ -271,7 +274,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse bookmark_model_->bookmark_bar_node(), bookmark_model_->other_node(), }; -@@ -1051,6 +1083,17 @@ void BookmarkBridge::GetBookmarksOfType( +@@ -1049,6 +1081,17 @@ void BookmarkBridge::GetBookmarksOfType( } } @@ -347,18 +350,6 @@ diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/b if (!bookmark_urls_.empty()) FetchNextFavicon(); else -diff --git a/chrome/browser/bookmarks/chrome_bookmark_client.cc b/chrome/browser/bookmarks/chrome_bookmark_client.cc ---- a/chrome/browser/bookmarks/chrome_bookmark_client.cc -+++ b/chrome/browser/bookmarks/chrome_bookmark_client.cc -@@ -160,6 +160,8 @@ bool ChromeBookmarkClient::IsPermanentNodeVisibleWhenEmpty( - return !is_mobile; - case bookmarks::BookmarkNode::MOBILE: - return is_mobile; -+ case bookmarks::BookmarkNode::TABS_COLLECTION: -+ return is_mobile; - } - - return false; diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java --- a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java +++ b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java @@ -383,7 +374,7 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse 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 -@@ -3989,6 +3989,9 @@ To change this setting, <resetlink>reset sync

<resetlink>reset sync

Select tabs @@ -416,6 +407,18 @@ diff --git a/components/bookmark_bar_strings.grdp b/components/bookmark_bar_stri Other Bookmarks +diff --git a/components/bookmarks/browser/bookmark_client.cc b/components/bookmarks/browser/bookmark_client.cc +--- a/components/bookmarks/browser/bookmark_client.cc ++++ b/components/bookmarks/browser/bookmark_client.cc +@@ -55,6 +55,8 @@ bool BookmarkClient::IsPermanentNodeVisibleWhenEmpty( + case BookmarkNode::MOBILE: + // Either MOBILE or OTHER_NODE is visible when empty, but never both. + return !IsPermanentNodeVisibleWhenEmpty(BookmarkNode::OTHER_NODE); ++ case bookmarks::BookmarkNode::TABS_COLLECTION: ++ return !is_desktop; + } + NOTREACHED_NORETURN(); + } diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmarks/browser/bookmark_codec.cc --- a/components/bookmarks/browser/bookmark_codec.cc +++ b/components/bookmarks/browser/bookmark_codec.cc @@ -427,33 +430,33 @@ diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmar const char BookmarkCodec::kVersionKey[] = "version"; const char BookmarkCodec::kChecksumKey[] = "checksum"; const char BookmarkCodec::kIdKey[] = "id"; -@@ -75,7 +76,8 @@ BookmarkCodec::~BookmarkCodec() = default; +@@ -74,7 +75,8 @@ BookmarkCodec::~BookmarkCodec() = default; base::Value::Dict BookmarkCodec::Encode(BookmarkModel* model, std::string sync_metadata_str) { return Encode(model->bookmark_bar_node(), model->other_node(), - model->mobile_node(), model->root_node()->GetMetaInfoMap(), + model->mobile_node(), model->tabs_collection_node(), + model->root_node()->GetMetaInfoMap(), - model->root_node()->GetUnsyncedMetaInfoMap(), std::move(sync_metadata_str)); } -@@ -84,6 +86,7 @@ base::Value::Dict BookmarkCodec::Encode( + +@@ -82,6 +84,7 @@ base::Value::Dict BookmarkCodec::Encode( const BookmarkNode* bookmark_bar_node, const BookmarkNode* other_folder_node, const BookmarkNode* mobile_folder_node, + const BookmarkNode* tabs_folder_node, const BookmarkNode::MetaInfoMap* model_meta_info_map, - const BookmarkNode::MetaInfoMap* model_unsynced_meta_info_map, std::string sync_metadata_str) { -@@ -105,6 +108,7 @@ base::Value::Dict BookmarkCodec::Encode( + ids_reassigned_ = false; +@@ -102,6 +105,7 @@ base::Value::Dict BookmarkCodec::Encode( roots.Set(kBookmarkBarFolderNameKey, EncodeNode(bookmark_bar_node)); roots.Set(kOtherBookmarkFolderNameKey, EncodeNode(other_folder_node)); roots.Set(kMobileBookmarkFolderNameKey, EncodeNode(mobile_folder_node)); + roots.Set(kTabsBookmarkFolderNameKey, EncodeNode(tabs_folder_node)); if (model_meta_info_map) roots.Set(kMetaInfo, EncodeMetaInfo(*model_meta_info_map)); - if (model_unsynced_meta_info_map) { -@@ -125,6 +129,7 @@ bool BookmarkCodec::Decode(const base::Value::Dict& value, + +@@ -119,6 +123,7 @@ bool BookmarkCodec::Decode(const base::Value::Dict& value, BookmarkNode* bb_node, BookmarkNode* other_folder_node, BookmarkNode* mobile_folder_node, @@ -461,7 +464,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmar int64_t* max_id, std::string* sync_metadata_str) { ids_.clear(); -@@ -132,7 +137,8 @@ bool BookmarkCodec::Decode(const base::Value::Dict& value, +@@ -126,7 +131,8 @@ bool BookmarkCodec::Decode(const base::Value::Dict& value, base::Uuid::ParseLowercase(kBookmarkBarNodeUuid), base::Uuid::ParseLowercase(kOtherBookmarksNodeUuid), base::Uuid::ParseLowercase(kMobileBookmarksNodeUuid), @@ -471,7 +474,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmar ids_reassigned_ = false; uuids_reassigned_ = false; ids_valid_ = true; -@@ -140,12 +146,13 @@ bool BookmarkCodec::Decode(const base::Value::Dict& value, +@@ -134,12 +140,13 @@ bool BookmarkCodec::Decode(const base::Value::Dict& value, stored_checksum_.clear(); InitializeChecksum(); bool success = DecodeHelper(bb_node, other_folder_node, mobile_folder_node, @@ -486,7 +489,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmar *max_id = maximum_id_ + 1; return success; } -@@ -201,6 +208,7 @@ base::Value::Dict BookmarkCodec::EncodeMetaInfo( +@@ -191,6 +198,7 @@ base::Value::Dict BookmarkCodec::EncodeMetaInfo( bool BookmarkCodec::DecodeHelper(BookmarkNode* bb_node, BookmarkNode* other_folder_node, BookmarkNode* mobile_folder_node, @@ -494,7 +497,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmar const base::Value::Dict& value, std::string* sync_metadata_str) { absl::optional version = value.FindInt(kVersionKey); -@@ -225,6 +233,8 @@ bool BookmarkCodec::DecodeHelper(BookmarkNode* bb_node, +@@ -215,6 +223,8 @@ bool BookmarkCodec::DecodeHelper(BookmarkNode* bb_node, roots->FindDict(kOtherBookmarkFolderNameKey); const base::Value::Dict* mobile_folder_value = roots->FindDict(kMobileBookmarkFolderNameKey); @@ -503,7 +506,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmar if (!bb_value || !other_folder_value || !mobile_folder_value) return false; -@@ -232,6 +242,8 @@ bool BookmarkCodec::DecodeHelper(BookmarkNode* bb_node, +@@ -222,6 +232,8 @@ bool BookmarkCodec::DecodeHelper(BookmarkNode* bb_node, DecodeNode(*bb_value, nullptr, bb_node); DecodeNode(*other_folder_value, nullptr, other_folder_node); DecodeNode(*mobile_folder_value, nullptr, mobile_folder_node); @@ -512,7 +515,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmar if (!DecodeMetaInfo(*roots, &model_meta_info_map_)) return false; -@@ -497,11 +509,13 @@ void BookmarkCodec::DecodeMetaInfoHelper( +@@ -463,11 +475,13 @@ void BookmarkCodec::DecodeMetaInfoHelper( void BookmarkCodec::ReassignIDs(BookmarkNode* bb_node, BookmarkNode* other_node, @@ -536,9 +539,9 @@ diff --git a/components/bookmarks/browser/bookmark_codec.h b/components/bookmark const BookmarkNode* mobile_folder_node, + const BookmarkNode* tabs_folder_node, const BookmarkNode::MetaInfoMap* model_meta_info_map, - const BookmarkNode::MetaInfoMap* model_unsynced_meta_info_map, std::string sync_metadata_str); -@@ -59,6 +60,7 @@ class BookmarkCodec { + +@@ -58,6 +59,7 @@ class BookmarkCodec { BookmarkNode* bb_node, BookmarkNode* other_folder_node, BookmarkNode* mobile_folder_node, @@ -546,7 +549,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.h b/components/bookmark int64_t* max_node_id, std::string* sync_metadata_str); -@@ -110,6 +112,7 @@ class BookmarkCodec { +@@ -103,6 +105,7 @@ class BookmarkCodec { // Allows the BookmarkClient to read and a write a string blob from the JSON // file. That string captures the bookmarks sync metadata. static const char kSyncMetadata[]; @@ -554,7 +557,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.h b/components/bookmark static const char kDateLastUsed[]; // Possible values for kTypeKey. -@@ -128,6 +131,7 @@ class BookmarkCodec { +@@ -121,6 +124,7 @@ class BookmarkCodec { bool DecodeHelper(BookmarkNode* bb_node, BookmarkNode* other_folder_node, BookmarkNode* mobile_folder_node, @@ -562,7 +565,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.h b/components/bookmark const base::Value::Dict& value, std::string* sync_metadata_str); -@@ -139,7 +143,8 @@ class BookmarkCodec { +@@ -132,7 +136,8 @@ class BookmarkCodec { // Reassigns bookmark IDs for all nodes. void ReassignIDs(BookmarkNode* bb_node, BookmarkNode* other_node, @@ -597,7 +600,7 @@ diff --git a/components/bookmarks/browser/bookmark_load_details.h b/components/b std::unique_ptr owned_titled_url_index() { return std::move(titled_url_index_); -@@ -119,6 +120,8 @@ class BookmarkLoadDetails { +@@ -112,6 +113,8 @@ class BookmarkLoadDetails { nullptr; raw_ptr mobile_folder_node_ = nullptr; @@ -609,7 +612,7 @@ diff --git a/components/bookmarks/browser/bookmark_load_details.h b/components/b diff --git a/components/bookmarks/browser/bookmark_model.cc b/components/bookmarks/browser/bookmark_model.cc --- a/components/bookmarks/browser/bookmark_model.cc +++ b/components/bookmarks/browser/bookmark_model.cc -@@ -845,7 +845,7 @@ bool BookmarkModel::HasBookmarks() const { +@@ -801,7 +801,7 @@ bool BookmarkModel::HasBookmarks() const { bool BookmarkModel::HasNoUserCreatedBookmarksOrFolders() const { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); return bookmark_bar_node_->children().empty() && @@ -618,7 +621,7 @@ diff --git a/components/bookmarks/browser/bookmark_model.cc b/components/bookmar } bool BookmarkModel::IsBookmarked(const GURL& url) const { -@@ -1155,6 +1155,7 @@ void BookmarkModel::DoneLoading(std::unique_ptr details) { +@@ -1111,6 +1111,7 @@ void BookmarkModel::DoneLoading(std::unique_ptr details) { bookmark_bar_node_ = details->bb_node(); other_node_ = details->other_folder_node(); mobile_node_ = details->mobile_folder_node(); @@ -642,7 +645,7 @@ diff --git a/components/bookmarks/browser/bookmark_model.h b/components/bookmark bool is_root_node(const BookmarkNode* node) const { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); return node == root_; -@@ -495,6 +501,7 @@ class BookmarkModel final : public BookmarkUndoProvider, +@@ -475,6 +481,7 @@ class BookmarkModel final : public BookmarkUndoProvider, nullptr; raw_ptr mobile_node_ = nullptr; @@ -653,7 +656,7 @@ diff --git a/components/bookmarks/browser/bookmark_model.h b/components/bookmark diff --git a/components/bookmarks/browser/bookmark_node.cc b/components/bookmarks/browser/bookmark_node.cc --- a/components/bookmarks/browser/bookmark_node.cc +++ b/components/bookmarks/browser/bookmark_node.cc -@@ -239,6 +239,17 @@ BookmarkPermanentNode::CreateMobileBookmarks(int64_t id, +@@ -189,6 +189,17 @@ BookmarkPermanentNode::CreateMobileBookmarks(int64_t id, visible_when_empty)); } @@ -682,7 +685,7 @@ diff --git a/components/bookmarks/browser/bookmark_node.h b/components/bookmarks MOBILE }; -@@ -259,6 +260,9 @@ class BookmarkPermanentNode : public BookmarkNode { +@@ -245,6 +246,9 @@ class BookmarkPermanentNode : public BookmarkNode { static std::unique_ptr CreateMobileBookmarks( int64_t id, bool visible_when_empty); @@ -732,7 +735,7 @@ diff --git a/components/bookmarks/browser/model_loader.cc b/components/bookmarks diff --git a/components/sync_bookmarks/bookmark_specifics_conversions.cc b/components/sync_bookmarks/bookmark_specifics_conversions.cc --- a/components/sync_bookmarks/bookmark_specifics_conversions.cc +++ b/components/sync_bookmarks/bookmark_specifics_conversions.cc -@@ -447,6 +447,7 @@ sync_pb::BookmarkSpecifics::Type GetProtoTypeFromBookmarkNode( +@@ -445,6 +445,7 @@ sync_pb::BookmarkSpecifics::Type GetProtoTypeFromBookmarkNode( case bookmarks::BookmarkNode::BOOKMARK_BAR: case bookmarks::BookmarkNode::OTHER_NODE: case bookmarks::BookmarkNode::MOBILE: diff --git a/build/patches/Add-menu-item-to-view-source.patch b/build/patches/Add-menu-item-to-view-source.patch index 279633b2f..e5edc0c16 100644 --- a/build/patches/Add-menu-item-to-view-source.patch +++ b/build/patches/Add-menu-item-to-view-source.patch @@ -42,7 +42,7 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re 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 -@@ -2319,6 +2319,8 @@ public class ChromeTabbedActivity extends ChromeActivity +@@ -2537,6 +2537,11 @@ public abstract class ChromeActivity return doOpenWebApk(currentTab); } @@ -77,7 +77,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App updateAutoDarkMenuItem(menu, currentTab, isChromeScheme); -@@ -1142,6 +1143,23 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate +@@ -1148,6 +1149,23 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate } } @@ -115,7 +115,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust 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 -@@ -314,6 +314,10 @@ CHAR_LIMIT guidelines: +@@ -317,6 +317,10 @@ CHAR_LIMIT guidelines: USB diff --git a/build/patches/Add-option-to-force-tablet-UI.patch b/build/patches/Add-option-to-force-tablet-UI.patch index aeebeba66..ac98f5464 100644 --- a/build/patches/Add-option-to-force-tablet-UI.patch +++ b/build/patches/Add-option-to-force-tablet-UI.patch @@ -54,12 +54,12 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordi @@ -100,6 +100,7 @@ import org.chromium.chrome.browser.paint_preview.DemoPaintPreview; import org.chromium.chrome.browser.password_manager.ManagePasswordsReferrer; import org.chromium.chrome.browser.password_manager.PasswordManagerLauncher; - import org.chromium.chrome.browser.preferences.SharedPreferencesManager; + import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; +import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; import org.chromium.chrome.browser.price_tracking.PriceTrackingButtonController; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.quick_delete.QuickDeleteController; -@@ -1444,7 +1445,9 @@ public class RootUiCoordinator +@@ -1454,7 +1455,9 @@ public class RootUiCoordinator if (!mSupportsFindInPageSupplier.getAsBoolean()) return; int stubId = R.id.find_toolbar_stub; @@ -73,7 +73,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordi diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java --- a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java +++ b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java -@@ -355,6 +355,7 @@ public final class ChromePreferenceKeys { +@@ -349,6 +349,7 @@ public final class ChromePreferenceKeys { AccessibilityConstants.FONT_USER_SET_FORCE_ENABLE_ZOOM; public static final String HISTORY_SHOW_HISTORY_INFO = "history_home_show_info"; @@ -84,7 +84,7 @@ diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/bro diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/LegacyChromePreferenceKeys.java b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/LegacyChromePreferenceKeys.java --- a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/LegacyChromePreferenceKeys.java +++ b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/LegacyChromePreferenceKeys.java -@@ -64,6 +64,7 @@ public class LegacyChromePreferenceKeys { +@@ -63,6 +63,7 @@ public class LegacyChromePreferenceKeys { ChromePreferenceKeys.FLAGS_CACHED_START_SURFACE_ENABLED, ChromePreferenceKeys.FLAGS_CACHED_TAB_GROUPS_ANDROID_ENABLED, ChromePreferenceKeys.FONT_USER_FONT_SCALE_FACTOR, @@ -95,7 +95,7 @@ diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/bro diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java -@@ -691,7 +691,7 @@ public class LocationBarCoordinator +@@ -779,7 +779,7 @@ public class LocationBarCoordinator } private boolean isTabletWindow() { @@ -107,8 +107,8 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow 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 -@@ -1765,6 +1765,13 @@ Your Google account may have other forms of browsing history like searches and a - Protection from trackers (third-party cookies, IP tracking, invasive scripts, and more) +@@ -1658,6 +1658,13 @@ Your Google account may have other forms of browsing history like searches and a + Manage third-party cookies and tracking protections + @@ -139,7 +139,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow diff --git a/components/BUILD.gn b/components/BUILD.gn --- a/components/BUILD.gn +++ b/components/BUILD.gn -@@ -71,7 +71,7 @@ if (is_ios) { +@@ -68,7 +68,7 @@ if (is_ios) { # Omit Lacros because it allows //components to depend on //chrome, which in # turn depends on //extensions. @@ -148,7 +148,7 @@ diff --git a/components/BUILD.gn b/components/BUILD.gn disallowed_extension_deps_ = [ # Components should largely not depend on //extensions. Since // extensions # is not a component target and is linked with //chrome, depending on most -@@ -817,7 +817,7 @@ test("components_unittests") { +@@ -811,7 +811,7 @@ test("components_unittests") { # On other platforms, no components should depend on Chrome. # Since //chrome depends on //extensions, we also only assert_no_deps on # extensions targets for non-lacros builds. @@ -157,7 +157,7 @@ diff --git a/components/BUILD.gn b/components/BUILD.gn assert_no_deps = [ "//chrome/*" ] assert_no_deps += disallowed_extension_deps_ } -@@ -1103,7 +1103,7 @@ if (use_blink) { +@@ -1099,7 +1099,7 @@ if (use_blink) { # dependency. On other platforms, no components should depend on Chrome. # Since //chrome depends on //extensions, we also only assert_no_deps on # extensions targets for non-lacros builds. @@ -230,28 +230,28 @@ diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/c diff --git a/ui/android/BUILD.gn b/ui/android/BUILD.gn --- a/ui/android/BUILD.gn +++ b/ui/android/BUILD.gn -@@ -411,6 +411,8 @@ android_library("ui_no_recycler_view_java") { +@@ -417,6 +417,8 @@ android_library("ui_no_recycler_view_java") { ":ui_android_features_java", ":ui_java_resources", ":ui_utils_java", + # dependency for ui_no_recycler_view_java + "//chrome/browser/preferences:java", "//base:base_java", - "//base:jni_java", "//build/android:build_java", + "//components/url_formatter/android:url_formatter_java", diff --git a/ui/android/java/src/org/chromium/ui/base/DeviceFormFactor.java b/ui/android/java/src/org/chromium/ui/base/DeviceFormFactor.java --- a/ui/android/java/src/org/chromium/ui/base/DeviceFormFactor.java +++ b/ui/android/java/src/org/chromium/ui/base/DeviceFormFactor.java -@@ -12,6 +12,8 @@ import androidx.annotation.VisibleForTesting; +@@ -13,6 +13,8 @@ import org.jni_zero.CalledByNative; + import org.chromium.base.ContextUtils; import org.chromium.base.ThreadUtils; - import org.chromium.base.annotations.CalledByNative; +import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; +import org.chromium.chrome.browser.preferences.SharedPreferencesManager; import org.chromium.ui.R; import org.chromium.ui.display.DisplayAndroid; import org.chromium.ui.display.DisplayUtil; -@@ -62,6 +64,9 @@ public class DeviceFormFactor { +@@ -63,6 +65,9 @@ public class DeviceFormFactor { * E.g. http://developer.samsung.com/samsung-dex/testing */ public static boolean isNonMultiDisplayContextOnTablet(Context context) { diff --git a/build/patches/Add-option-to-not-persist-tabs-across-sessions.patch b/build/patches/Add-option-to-not-persist-tabs-across-sessions.patch index c8567cec2..dbab98098 100644 --- a/build/patches/Add-option-to-not-persist-tabs-across-sessions.patch +++ b/build/patches/Add-option-to-not-persist-tabs-across-sessions.patch @@ -13,7 +13,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml --- a/chrome/android/java/res/xml/privacy_preferences.xml +++ b/chrome/android/java/res/xml/privacy_preferences.xml -@@ -61,6 +61,11 @@ found in the LICENSE file. +@@ -71,6 +71,11 @@ found in the LICENSE file. android:title="@string/incognito_settings_title" android:summary="@string/incognito_settings_summary" android:fragment="org.chromium.chrome.browser.privacy.settings.IncognitoSettings"/> @@ -23,8 +23,8 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi + android:summary="@string/close_tabs_on_exit_summary" + android:defaultValue="false" /> 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 @@ -36,7 +36,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct import org.chromium.base.IntentUtils; import org.chromium.base.Log; import org.chromium.base.MemoryPressureListener; -@@ -1307,8 +1308,10 @@ public class ChromeTabbedActivity extends ChromeActivity<resetlink>reset sync

<resetlink>reset sync

IMAGE diff --git a/build/patches/Add-option-to-use-home-page-as-NTP.patch b/build/patches/Add-option-to-use-home-page-as-NTP.patch index 9b6f7b165..eeda8d048 100644 --- a/build/patches/Add-option-to-use-home-page-as-NTP.patch +++ b/build/patches/Add-option-to-use-home-page-as-NTP.patch @@ -58,7 +58,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java -@@ -17,6 +17,7 @@ import org.chromium.base.metrics.RecordUserAction; +@@ -18,6 +18,7 @@ import org.chromium.base.supplier.LazyOneshotSupplier; import org.chromium.base.supplier.ObservableSupplier; import org.chromium.base.supplier.ObservableSupplierImpl; import org.chromium.base.supplier.OneshotSupplier; @@ -66,7 +66,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser import org.chromium.chrome.browser.layouts.LayoutStateProvider; import org.chromium.chrome.browser.layouts.LayoutStateProvider.LayoutStateObserver; import org.chromium.chrome.browser.layouts.LayoutType; -@@ -345,8 +346,13 @@ public class TabGroupUiMediator implements BackPressHandler { +@@ -351,8 +352,13 @@ public class TabGroupUiMediator implements BackPressHandler { assert relatedTabs.size() > 0; parentTabToAttach = relatedTabs.get(relatedTabs.size() - 1); @@ -99,7 +99,7 @@ diff --git a/chrome/android/java/res/xml/homepage_preferences.xml b/chrome/andro diff --git a/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java b/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java --- a/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java -@@ -238,6 +238,22 @@ public class HomepageManager implements HomepagePolicyManager.HomepagePolicyStat +@@ -247,6 +247,22 @@ public class HomepageManager implements HomepagePolicyManager.HomepagePolicyStat notifyHomepageUpdated(); } @@ -161,7 +161,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/homepage/settin diff --git a/chrome/android/java/src/org/chromium/chrome/browser/metrics/LaunchMetrics.java b/chrome/android/java/src/org/chromium/chrome/browser/metrics/LaunchMetrics.java --- a/chrome/android/java/src/org/chromium/chrome/browser/metrics/LaunchMetrics.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/metrics/LaunchMetrics.java -@@ -103,7 +103,6 @@ public class LaunchMetrics { +@@ -104,7 +104,6 @@ public class LaunchMetrics { public static void recordHomePageLaunchMetrics( boolean showHomeButton, boolean homepageIsNtp, GURL homepageGurl) { if (homepageGurl.isEmpty()) { @@ -180,7 +180,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/Chrome import org.chromium.chrome.browser.ntp.NewTabPageLaunchOrigin; import org.chromium.chrome.browser.ntp.NewTabPageUtils; import org.chromium.chrome.browser.prefetch.settings.PreloadPagesSettingsBridge; -@@ -502,6 +503,13 @@ public class ChromeTabCreator extends TabCreator { +@@ -497,6 +498,13 @@ public class ChromeTabCreator extends TabCreator { * @return the created tab. */ public Tab launchUrl(String url, @TabLaunchType int type, Intent intent, long intentTimestamp) { @@ -197,7 +197,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/Chrome diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java --- a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java +++ b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java -@@ -367,6 +367,7 @@ public final class ChromePreferenceKeys { +@@ -361,6 +361,7 @@ public final class ChromePreferenceKeys { public static final String HOMEPAGE_USE_CHROME_NTP = "Chrome.Homepage.UseNTP"; public static final String HOMEPAGE_USE_DEFAULT_URI = "homepage_partner_enabled"; @@ -208,7 +208,7 @@ diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/bro diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/LegacyChromePreferenceKeys.java b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/LegacyChromePreferenceKeys.java --- a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/LegacyChromePreferenceKeys.java +++ b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/LegacyChromePreferenceKeys.java -@@ -68,6 +68,7 @@ public class LegacyChromePreferenceKeys { +@@ -67,6 +67,7 @@ public class LegacyChromePreferenceKeys { ChromePreferenceKeys.HISTORY_SHOW_HISTORY_INFO, ChromePreferenceKeys.HOMEPAGE_ENABLED, ChromePreferenceKeys.HOMEPAGE_USE_DEFAULT_URI, @@ -219,7 +219,7 @@ diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/bro 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 -@@ -1540,6 +1540,9 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1431,6 +1431,9 @@ Your Google account may have other forms of browsing history like searches and a Last hour @@ -244,7 +244,7 @@ diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_u diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h -@@ -1283,6 +1283,10 @@ inline constexpr char kUsedPolicyCertificates[] = +@@ -1296,6 +1296,10 @@ inline constexpr char kUsedPolicyCertificates[] = // visible on the toolbar. inline constexpr char kShowHomeButton[] = "browser.show_home_button"; diff --git a/build/patches/Add-site-engagement-flag.patch b/build/patches/Add-site-engagement-flag.patch index f9105f723..19f5fb241 100644 --- a/build/patches/Add-site-engagement-flag.patch +++ b/build/patches/Add-site-engagement-flag.patch @@ -21,10 +21,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -148,6 +148,7 @@ - #include "components/segmentation_platform/public/features.h" +@@ -152,6 +152,7 @@ #include "components/send_tab_to_self/features.h" #include "components/services/heap_profiling/public/cpp/switches.h" + #include "components/services/storage/public/cpp/buckets/bucket_info.h" +#include "components/site_engagement/core/features.h" #include "components/shared_highlighting/core/common/shared_highlighting_features.h" #include "components/signin/core/browser/dice_account_reconcilor_delegate.h" diff --git a/build/patches/Add-support-for-ISupportHelpAndFeedback.patch b/build/patches/Add-support-for-ISupportHelpAndFeedback.patch index e9b9026e2..0b72ed3e2 100644 --- a/build/patches/Add-support-for-ISupportHelpAndFeedback.patch +++ b/build/patches/Add-support-for-ISupportHelpAndFeedback.patch @@ -12,15 +12,15 @@ 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/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 -@@ -86,6 +86,7 @@ import org.chromium.components.browser_ui.settings.CustomDividerFragment; +@@ -84,6 +84,7 @@ import org.chromium.components.browser_ui.settings.CustomDividerFragment; import org.chromium.components.browser_ui.settings.FragmentSettingsLauncher; - import org.chromium.components.browser_ui.settings.PaddedDividerItemDecoration; + import org.chromium.components.browser_ui.settings.PaddedItemDecorationWithDivider; import org.chromium.components.browser_ui.settings.SettingsLauncher; +import org.chromium.components.browser_ui.settings.SettingsUtils; - import org.chromium.components.browser_ui.site_settings.SiteSettingsCategory; import org.chromium.components.browser_ui.site_settings.BaseSiteSettingsFragment; + import org.chromium.components.browser_ui.site_settings.SiteSettingsCategory; import org.chromium.components.browser_ui.util.TraceEventVectorDrawableCompat; -@@ -417,8 +418,12 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity +@@ -436,8 +437,12 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity finish(); return true; } else if (item.getItemId() == R.id.menu_id_general_help) { diff --git a/build/patches/Add-support-for-writing-URIs.patch b/build/patches/Add-support-for-writing-URIs.patch index 9122d43c0..f4f7fb0ef 100644 --- a/build/patches/Add-support-for-writing-URIs.patch +++ b/build/patches/Add-support-for-writing-URIs.patch @@ -49,7 +49,7 @@ diff --git a/base/android/content_uri_utils.h b/base/android/content_uri_utils.h diff --git a/base/android/java/src/org/chromium/base/ContentUriUtils.java b/base/android/java/src/org/chromium/base/ContentUriUtils.java --- a/base/android/java/src/org/chromium/base/ContentUriUtils.java +++ b/base/android/java/src/org/chromium/base/ContentUriUtils.java -@@ -23,6 +23,9 @@ import org.chromium.base.annotations.CalledByNative; +@@ -23,6 +23,9 @@ import org.jni_zero.CalledByNative; import java.io.File; import java.io.IOException; diff --git a/build/patches/Add-webGL-site-setting.patch b/build/patches/Add-webGL-site-setting.patch index 5a69ec9a8..6e871a0fa 100644 --- a/build/patches/Add-webGL-site-setting.patch +++ b/build/patches/Add-webGL-site-setting.patch @@ -205,7 +205,7 @@ diff --git a/third_party/blink/renderer/core/execution_context/execution_context diff --git a/third_party/blink/renderer/core/execution_context/execution_context.h b/third_party/blink/renderer/core/execution_context/execution_context.h --- a/third_party/blink/renderer/core/execution_context/execution_context.h +++ b/third_party/blink/renderer/core/execution_context/execution_context.h -@@ -116,6 +116,8 @@ enum ReasonForCallingCanExecuteScripts { +@@ -115,6 +115,8 @@ enum ReasonForCallingCanExecuteScripts { enum ReferrerPolicySource { kPolicySourceHttpHeader, kPolicySourceMetaTag }; @@ -217,7 +217,7 @@ diff --git a/third_party/blink/renderer/core/execution_context/execution_context diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc --- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc +++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc -@@ -248,6 +248,13 @@ void WebGLRenderingContextBase::InitializeWebGLContextLimits( +@@ -271,6 +271,13 @@ void WebGLRenderingContextBase::InitializeWebGLContextLimits( } } @@ -231,7 +231,7 @@ diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_ba unsigned WebGLRenderingContextBase::CurrentMaxGLContexts() { base::AutoLock locker(WebGLContextLimitLock()); DCHECK(webgl_context_limits_initialized_); -@@ -521,25 +528,6 @@ static String ExtractWebGLContextCreationError( +@@ -544,25 +551,6 @@ static String ExtractWebGLContextCreationError( const Platform::GraphicsInfo& info) { StringBuilder builder; builder.Append("Could not create a WebGL context"); @@ -257,7 +257,7 @@ diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_ba FormatWebGLStatusString("ErrorMessage", info.error_message.Utf8().c_str(), builder); builder.Append('.'); -@@ -599,6 +587,12 @@ WebGLRenderingContextBase::CreateWebGraphicsContext3DProvider( +@@ -622,6 +610,12 @@ WebGLRenderingContextBase::CreateWebGraphicsContext3DProvider( const CanvasContextCreationAttributesCore& attributes, Platform::ContextType context_type, Platform::GraphicsInfo* graphics_info) { @@ -273,7 +273,7 @@ diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_ba diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h --- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h +++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h -@@ -1937,6 +1937,8 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext, +@@ -1944,6 +1944,8 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext, DOMArrayBufferView* pixels, int64_t offset); diff --git a/build/patches/Allow-building-without-enable_reporting.patch b/build/patches/Allow-building-without-enable_reporting.patch index c0f6ae5c2..5402e18d6 100644 --- a/build/patches/Allow-building-without-enable_reporting.patch +++ b/build/patches/Allow-building-without-enable_reporting.patch @@ -183,7 +183,7 @@ diff --git a/content/browser/network/reporting_service_proxy.cc b/content/browse #include "content/browser/service_worker/service_worker_host.h" #include "content/browser/worker_host/dedicated_worker_host.h" #include "content/browser/worker_host/shared_worker_host.h" -@@ -174,12 +175,14 @@ class ReportingServiceProxyImpl : public blink::mojom::ReportingServiceProxy { +@@ -175,12 +176,14 @@ class ReportingServiceProxyImpl : public blink::mojom::ReportingServiceProxy { const std::string& group, const std::string& type, base::Value::Dict body) { @@ -201,7 +201,7 @@ diff --git a/content/browser/network/reporting_service_proxy.cc b/content/browse diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -13489,12 +13489,6 @@ void RenderFrameHostImpl::MaybeGenerateCrashReport( +@@ -13639,12 +13639,6 @@ void RenderFrameHostImpl::MaybeGenerateCrashReport( base::Value::Dict body; if (!reason.empty()) body.Set("reason", reason); @@ -254,7 +254,7 @@ new file mode 100644 diff --git a/net/base/features.cc b/net/base/features.cc --- a/net/base/features.cc +++ b/net/base/features.cc -@@ -224,6 +224,7 @@ extern const base::FeatureParam kTimeoutTcpConnectAttemptMax( +@@ -228,6 +228,7 @@ extern const base::FeatureParam kTimeoutTcpConnectAttemptMax( base::Seconds(30)); #if BUILDFLAG(ENABLE_REPORTING) @@ -281,7 +281,7 @@ diff --git a/net/reporting/reporting_service.cc b/net/reporting/reporting_servic diff --git a/services/network/network_context.h b/services/network/network_context.h --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -473,10 +473,10 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -475,10 +475,10 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext const absl::optional& reporting_source, const net::NetworkAnonymizationKey& network_anonymization_key, const absl::optional& user_agent, @@ -297,7 +297,7 @@ diff --git a/services/network/network_context.h b/services/network/network_conte diff --git a/services/network/public/mojom/BUILD.gn b/services/network/public/mojom/BUILD.gn --- a/services/network/public/mojom/BUILD.gn +++ b/services/network/public/mojom/BUILD.gn -@@ -1427,7 +1427,6 @@ mojom("mojom") { +@@ -1438,7 +1438,6 @@ mojom("mojom") { export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1" export_header_blink = "third_party/blink/public/platform/web_common.h" if (enable_reporting) { @@ -308,7 +308,7 @@ diff --git a/services/network/public/mojom/BUILD.gn b/services/network/public/mo diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1196,6 +1196,7 @@ interface NetworkContext { +@@ -1201,6 +1201,7 @@ interface NetworkContext { // provided |network_isolation_key|. // // Spec: https://w3c.github.io/reporting/#concept-reports @@ -316,7 +316,7 @@ diff --git a/services/network/public/mojom/network_context.mojom b/services/netw QueueReport(string type, string group, url.mojom.Url url, -@@ -1209,6 +1210,7 @@ interface NetworkContext { +@@ -1214,6 +1215,7 @@ interface NetworkContext { // Note that this queued report will never be delivered if no reporting // endpoint matching is registered for with the provided // |network_isolation_key|. @@ -335,7 +335,7 @@ diff --git a/third_party/blink/renderer/core/frame/csp/content_security_policy.c #include "base/containers/contains.h" #include "base/debug/dump_without_crashing.h" #include "services/network/public/cpp/web_sandbox_flags.h" -@@ -1156,6 +1157,7 @@ void ContentSecurityPolicy::ReportViolation( +@@ -1164,6 +1165,7 @@ void ContentSecurityPolicy::ReportViolation( return; } @@ -343,7 +343,7 @@ diff --git a/third_party/blink/renderer/core/frame/csp/content_security_policy.c PostViolationReport(violation_data, context_frame, report_endpoints, use_reporting_api); -@@ -1163,6 +1165,7 @@ void ContentSecurityPolicy::ReportViolation( +@@ -1171,6 +1173,7 @@ void ContentSecurityPolicy::ReportViolation( // `context_frame` (i.e. we're not processing 'frame-ancestors'). if (delegate_ && !context_frame) delegate_->DispatchViolationEvent(*violation_data, element); @@ -362,7 +362,7 @@ diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/ #include "services/network/public/cpp/features.h" #include "services/network/public/mojom/content_security_policy.mojom-blink.h" #include "services/network/public/mojom/source_location.mojom-blink.h" -@@ -2502,9 +2503,11 @@ void LocalFrame::MainFrameInteractive() { +@@ -2533,9 +2534,11 @@ void LocalFrame::MainFrameInteractive() { } } @@ -388,7 +388,7 @@ diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/b #include "services/device/public/mojom/device_posture_provider.mojom-blink-forward.h" #include "services/metrics/public/cpp/ukm_source_id.h" #include "services/network/public/mojom/fetch_api.mojom-blink-forward.h" -@@ -627,9 +627,9 @@ class CORE_EXPORT LocalFrame final +@@ -636,9 +636,9 @@ class CORE_EXPORT LocalFrame final void FinishedScrollSequence(); SmoothScrollSequencer* GetSmoothScrollSequencer() const; diff --git a/build/patches/Allow-building-without-supervised-users.patch b/build/patches/Allow-building-without-supervised-users.patch index a0737cff6..af39a47e9 100644 --- a/build/patches/Allow-building-without-supervised-users.patch +++ b/build/patches/Allow-building-without-supervised-users.patch @@ -21,7 +21,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 -@@ -3604,7 +3604,6 @@ generate_jni("chrome_jni_headers") { +@@ -3642,7 +3642,6 @@ generate_jni("chrome_jni_headers") { "java/src/org/chromium/chrome/browser/status_indicator/StatusIndicatorSceneLayer.java", "java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSites.java", "java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSitesBridge.java", @@ -32,7 +32,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 -@@ -1074,7 +1074,6 @@ chrome_java_sources = [ +@@ -1082,7 +1082,6 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/suggestions/tile/TileGroupDelegateImpl.java", "java/src/org/chromium/chrome/browser/suggestions/tile/TileRenderer.java", "java/src/org/chromium/chrome/browser/suggestions/tile/TopSitesTileView.java", @@ -43,7 +43,7 @@ diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -3182,8 +3182,6 @@ static_library("browser") { +@@ -3194,8 +3194,6 @@ static_library("browser") { "feed/android/refresh_task_scheduler_impl.cc", "feed/android/refresh_task_scheduler_impl.h", "feed/android/web_feed_bridge.cc", @@ -52,7 +52,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn "file_select_helper_contacts_android.cc", "file_select_helper_contacts_android.h", "first_run/android/first_run_prefs.cc", -@@ -3398,10 +3396,6 @@ static_library("browser") { +@@ -3413,10 +3411,6 @@ static_library("browser") { "ssl/chrome_security_state_model_delegate.h", "ssl/known_interception_disclosure_infobar.cc", "ssl/known_interception_disclosure_infobar.h", @@ -66,7 +66,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.cc b/chrome/browser/extensions/api/settings_private/prefs_util.cc --- a/chrome/browser/extensions/api/settings_private/prefs_util.cc +++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc -@@ -1027,9 +1027,11 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() { +@@ -1014,9 +1014,11 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() { settings_api::PrefType::PREF_TYPE_BOOLEAN; #endif @@ -81,7 +81,7 @@ diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.cc b/chro diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc -@@ -691,10 +691,12 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) { +@@ -696,10 +696,12 @@ void ProfileImpl::DoFinalInit(CreateMode create_mode) { prefs->SetTime(prefs::kProfileCreationTime, path_creation_time_); pref_change_registrar_.Init(prefs); @@ -94,7 +94,7 @@ diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/p // Changes in the profile avatar. pref_change_registrar_.Add( -@@ -1614,11 +1616,13 @@ GURL ProfileImpl::GetHomePage() { +@@ -1625,11 +1627,13 @@ GURL ProfileImpl::GetHomePage() { } void ProfileImpl::UpdateSupervisedUserIdInStorage() { @@ -111,7 +111,7 @@ diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/p 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 -@@ -1219,6 +1219,7 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) { +@@ -1218,6 +1218,7 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) { profile->GetPrefs()->SetString(prefs::kProfileName, profile_name); } @@ -119,7 +119,7 @@ diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profile base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); bool force_supervised_user_id = #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -1240,6 +1241,7 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) { +@@ -1239,6 +1240,7 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) { profile->GetPrefs()->SetString(prefs::kSupervisedUserId, supervised_user_id); } @@ -127,7 +127,7 @@ diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profile #if !BUILDFLAG(IS_ANDROID) if (profile->IsNewProfile()) { profile->GetPrefs()->SetBoolean(prefs::kHasSeenWelcomePage, false); -@@ -2035,8 +2037,10 @@ void ProfileManager::AddProfileToStorage(Profile* profile) { +@@ -2034,8 +2036,10 @@ void ProfileManager::AddProfileToStorage(Profile* profile) { init_params.icon_index = profile->GetPrefs()->GetInteger(prefs::kProfileAvatarIndex); diff --git a/build/patches/Allow-playing-audio-in-background.patch b/build/patches/Allow-playing-audio-in-background.patch index 766d7bb37..3e2e94369 100644 --- a/build/patches/Allow-playing-audio-in-background.patch +++ b/build/patches/Allow-playing-audio-in-background.patch @@ -11,7 +11,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/third_party/blink/renderer/platform/media/web_media_player_impl.cc b/third_party/blink/renderer/platform/media/web_media_player_impl.cc --- a/third_party/blink/renderer/platform/media/web_media_player_impl.cc +++ b/third_party/blink/renderer/platform/media/web_media_player_impl.cc -@@ -1176,6 +1176,12 @@ bool WebMediaPlayerImpl::HasAudio() const { +@@ -1178,6 +1178,12 @@ bool WebMediaPlayerImpl::HasAudio() const { return pipeline_metadata_.has_audio; } @@ -24,7 +24,7 @@ diff --git a/third_party/blink/renderer/platform/media/web_media_player_impl.cc void WebMediaPlayerImpl::EnabledAudioTracksChanged( const WebVector& enabledTrackIds) { DCHECK(main_task_runner_->BelongsToCurrentThread()); -@@ -3484,7 +3490,10 @@ bool WebMediaPlayerImpl::ShouldPausePlaybackWhenHidden() const { +@@ -3502,7 +3508,10 @@ bool WebMediaPlayerImpl::ShouldPausePlaybackWhenHidden() const { : HasAudio(); // Audio only stream is allowed to play when in background. diff --git a/build/patches/Always-use-new-tab-page-for-default-home-page.patch b/build/patches/Always-use-new-tab-page-for-default-home-page.patch index 4df336597..e21e81a96 100644 --- a/build/patches/Always-use-new-tab-page-for-default-home-page.patch +++ b/build/patches/Always-use-new-tab-page-for-default-home-page.patch @@ -17,7 +17,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/homepage/HomepageManager.java b/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java --- a/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java -@@ -168,10 +168,6 @@ public class HomepageManager implements HomepagePolicyManager.HomepagePolicyStat +@@ -169,10 +169,6 @@ public class HomepageManager implements HomepagePolicyManager.HomepagePolicyStat * tab page if the homepage button is force enabled via flag. */ public static GURL getDefaultHomepageGurl() { @@ -26,12 +26,12 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/homepage/Homepa - } - String homepagePartnerDefaultGurlSerialized = - SharedPreferencesManager.getInstance().readString( + ChromeSharedPreferences.getInstance().readString( ChromePreferenceKeys.HOMEPAGE_PARTNER_CUSTOMIZED_DEFAULT_GURL, ""); diff --git a/chrome/browser/partnercustomizations/java/src/org/chromium/chrome/browser/partnercustomizations/PartnerBrowserCustomizations.java b/chrome/browser/partnercustomizations/java/src/org/chromium/chrome/browser/partnercustomizations/PartnerBrowserCustomizations.java --- a/chrome/browser/partnercustomizations/java/src/org/chromium/chrome/browser/partnercustomizations/PartnerBrowserCustomizations.java +++ b/chrome/browser/partnercustomizations/java/src/org/chromium/chrome/browser/partnercustomizations/PartnerBrowserCustomizations.java -@@ -214,7 +214,7 @@ public class PartnerBrowserCustomizations { +@@ -215,7 +215,7 @@ public class PartnerBrowserCustomizations { boolean systemOrPreStable = (context.getApplicationInfo().flags & ApplicationInfo.FLAG_SYSTEM) == 1 || !VersionInfo.isStableBuild(); diff --git a/build/patches/Block-gateway-attacks-via-websockets.patch b/build/patches/Block-gateway-attacks-via-websockets.patch index b8871b086..87ee12c17 100644 --- a/build/patches/Block-gateway-attacks-via-websockets.patch +++ b/build/patches/Block-gateway-attacks-via-websockets.patch @@ -24,7 +24,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html 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 +++ b/third_party/blink/renderer/core/execution_context/execution_context.cc -@@ -713,4 +713,20 @@ void ExecutionContext::WriteIntoTrace( +@@ -710,6 +710,22 @@ void ExecutionContext::WriteIntoTrace( proto->set_world_type(GetWorldType(*this)); } @@ -44,7 +44,9 @@ diff --git a/third_party/blink/renderer/core/execution_context/execution_context + return "public"; +} + - } // namespace blink + bool ExecutionContext::CrossOriginIsolatedCapabilityOrDisabledWebSecurity() + const { + return Agent::IsWebSecurityDisabled() || CrossOriginIsolatedCapability(); diff --git a/third_party/blink/renderer/core/execution_context/execution_context.h b/third_party/blink/renderer/core/execution_context/execution_context.h --- a/third_party/blink/renderer/core/execution_context/execution_context.h +++ b/third_party/blink/renderer/core/execution_context/execution_context.h @@ -59,7 +61,7 @@ diff --git a/third_party/blink/renderer/core/execution_context/execution_context diff --git a/third_party/blink/renderer/core/loader/base_fetch_context.h b/third_party/blink/renderer/core/loader/base_fetch_context.h --- a/third_party/blink/renderer/core/loader/base_fetch_context.h +++ b/third_party/blink/renderer/core/loader/base_fetch_context.h -@@ -89,6 +89,7 @@ class CORE_EXPORT BaseFetchContext : public FetchContext { +@@ -85,6 +85,7 @@ class CORE_EXPORT BaseFetchContext : public FetchContext { virtual SubresourceFilter* GetSubresourceFilter() const = 0; virtual bool ShouldBlockWebSocketByMixedContentCheck(const KURL&) const = 0; @@ -70,7 +72,7 @@ diff --git a/third_party/blink/renderer/core/loader/base_fetch_context.h b/third diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.cc b/third_party/blink/renderer/core/loader/frame_fetch_context.cc --- a/third_party/blink/renderer/core/loader/frame_fetch_context.cc +++ b/third_party/blink/renderer/core/loader/frame_fetch_context.cc -@@ -588,6 +588,26 @@ bool FrameFetchContext::ShouldBlockRequestByInspector(const KURL& url) const { +@@ -592,6 +592,26 @@ bool FrameFetchContext::ShouldBlockRequestByInspector(const KURL& url) const { return should_block_request; } @@ -100,7 +102,7 @@ diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.cc b/thi diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.h b/third_party/blink/renderer/core/loader/frame_fetch_context.h --- a/third_party/blink/renderer/core/loader/frame_fetch_context.h +++ b/third_party/blink/renderer/core/loader/frame_fetch_context.h -@@ -175,6 +175,7 @@ class CORE_EXPORT FrameFetchContext final : public BaseFetchContext, +@@ -176,6 +176,7 @@ class CORE_EXPORT FrameFetchContext final : public BaseFetchContext, bool ShouldBlockWebSocketByMixedContentCheck(const KURL&) const override; std::unique_ptr CreateWebSocketHandshakeThrottle() override; @@ -149,7 +151,7 @@ diff --git a/third_party/blink/renderer/core/loader/worker_fetch_context.cc b/th diff --git a/third_party/blink/renderer/core/loader/worker_fetch_context.h b/third_party/blink/renderer/core/loader/worker_fetch_context.h --- a/third_party/blink/renderer/core/loader/worker_fetch_context.h +++ b/third_party/blink/renderer/core/loader/worker_fetch_context.h -@@ -64,6 +64,7 @@ class WorkerFetchContext final : public BaseFetchContext { +@@ -62,6 +62,7 @@ class WorkerFetchContext final : public BaseFetchContext { bool ShouldBlockWebSocketByMixedContentCheck(const KURL&) const override; std::unique_ptr CreateWebSocketHandshakeThrottle() override; @@ -206,7 +208,7 @@ diff --git a/third_party/blink/renderer/modules/background_fetch/background_fetc scoped_refptr ExtractBlobHandle( Request* request, ExceptionState& exception_state) { -@@ -187,6 +211,13 @@ ScriptPromise BackgroundFetchManager::fetch( +@@ -188,6 +212,13 @@ ScriptPromise BackgroundFetchManager::fetch( exception_state); } diff --git a/build/patches/Block-qjz9zk-or-trk-requests.patch b/build/patches/Block-qjz9zk-or-trk-requests.patch index 12fa309a5..336e2645e 100644 --- a/build/patches/Block-qjz9zk-or-trk-requests.patch +++ b/build/patches/Block-qjz9zk-or-trk-requests.patch @@ -119,7 +119,7 @@ diff --git a/content/browser/child_process_security_policy_impl.cc b/content/bro diff --git a/net/BUILD.gn b/net/BUILD.gn --- a/net/BUILD.gn +++ b/net/BUILD.gn -@@ -1056,6 +1056,8 @@ component("net") { +@@ -1058,6 +1058,8 @@ component("net") { "url_request/url_request_http_job.cc", "url_request/url_request_http_job.h", "url_request/url_request_interceptor.cc", diff --git a/build/patches/Bookmarks-select-all-menu-entry.patch b/build/patches/Bookmarks-select-all-menu-entry.patch index 06152d26a..8bbf8a336 100644 --- a/build/patches/Bookmarks-select-all-menu-entry.patch +++ b/build/patches/Bookmarks-select-all-menu-entry.patch @@ -47,16 +47,16 @@ diff --git a/chrome/android/java/res/menu/bookmark_toolbar_menu_improved.xml b/c diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbar.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbar.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbar.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbar.java -@@ -27,6 +27,8 @@ import org.chromium.components.browser_ui.widget.selectable_list.SelectionDelega - import java.util.ArrayList; +@@ -28,6 +28,8 @@ import java.util.ArrayList; import java.util.List; import java.util.function.Function; + +import java.util.HashSet; + /** - * Main toolbar of bookmark UI. It is responsible for displaying title and buttons - * associated with the current context. -@@ -183,6 +185,7 @@ public class BookmarkToolbar extends SelectableListToolbar + * Main toolbar of bookmark UI. It is responsible for displaying title and buttons associated with + * the current context. +@@ -184,6 +186,7 @@ public class BookmarkToolbar extends SelectableListToolbar void setCurrentFolder(BookmarkId folder) { mCurrentFolder = mBookmarkModel.getBookmarkById(folder); @@ -64,7 +64,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm getMenu().findItem(R.id.import_menu_id).setVisible(true); getMenu().findItem(R.id.export_menu_id).setVisible(true); } -@@ -211,6 +214,17 @@ public class BookmarkToolbar extends SelectableListToolbar +@@ -212,6 +215,17 @@ public class BookmarkToolbar extends SelectableListToolbar mExportBookmarkRunnable.run(); return true; } @@ -82,7 +82,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm return mMenuIdClickedFunction.apply(menuItem.getItemId()); } -@@ -233,6 +247,7 @@ public class BookmarkToolbar extends SelectableListToolbar +@@ -234,6 +248,7 @@ public class BookmarkToolbar extends SelectableListToolbar getMenu().findItem(R.id.import_menu_id).setVisible(mCurrentFolder != null); getMenu().findItem(R.id.export_menu_id).setVisible(mCurrentFolder != null); @@ -93,7 +93,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm 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 -@@ -245,6 +245,9 @@ CHAR_LIMIT guidelines: +@@ -248,6 +248,9 @@ CHAR_LIMIT guidelines: Sites diff --git a/build/patches/Bromite-auto-updater.patch b/build/patches/Bromite-auto-updater.patch index 36c8e272b..f8a3c42d3 100644 --- a/build/patches/Bromite-auto-updater.patch +++ b/build/patches/Bromite-auto-updater.patch @@ -16,7 +16,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../chrome/browser/omaha/OmahaBase.java | 57 +++- .../chrome/browser/omaha/UpdateConfigs.java | 30 +- .../browser/omaha/UpdateMenuItemHelper.java | 82 +++++- - .../browser/omaha/UpdateStatusProvider.java | 161 ++++++++--- + .../browser/omaha/UpdateStatusProvider.java | 163 ++++++++--- .../browser/omaha/VersionNumberGetter.java | 3 +- .../inline/BromiteInlineUpdateController.java | 272 ++++++++++++++++++ .../omaha/inline/InlineUpdateController.java | 51 ++++ @@ -32,7 +32,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../endpoint_fetcher/endpoint_fetcher.h | 23 +- .../Bromite-auto-updater.inc | 3 + .../Bromite-auto-updater.inc | 1 + - 24 files changed, 932 insertions(+), 50 deletions(-) + 24 files changed, 932 insertions(+), 52 deletions(-) create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/omaha/inline/BromiteInlineUpdateController.java create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/omaha/inline/InlineUpdateController.java create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/omaha/inline/InlineUpdateControllerFactory.java @@ -55,7 +55,7 @@ diff --git a/build/android/java/templates/BuildConfig.template b/build/android/j diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni --- a/build/config/android/rules.gni +++ b/build/config/android/rules.gni -@@ -1894,6 +1894,9 @@ if (enable_java_templates && is_android) { +@@ -1899,6 +1899,9 @@ if (enable_java_templates && is_android) { sources = [ "//build/android/java/templates/BuildConfig.template" ] defines = [] @@ -68,7 +68,7 @@ diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni 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 -@@ -872,6 +872,9 @@ chrome_java_sources = [ +@@ -878,6 +878,9 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/omaha/UpdateConfigs.java", "java/src/org/chromium/chrome/browser/omaha/UpdateMenuItemHelper.java", "java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java", @@ -184,7 +184,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase } /** -@@ -567,6 +573,10 @@ public class OmahaBase { +@@ -569,6 +575,10 @@ public class OmahaBase { /** Sends the request to the server and returns the response. */ static String sendRequestToServer(HttpURLConnection urlConnection, String request) throws RequestFailureException { @@ -195,7 +195,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase try { OutputStream out = new BufferedOutputStream(urlConnection.getOutputStream()); OutputStreamWriter writer = new OutputStreamWriter(out); -@@ -637,4 +647,47 @@ public class OmahaBase { +@@ -639,4 +649,47 @@ public class OmahaBase { // updateStatus is only used for the on-demand check. null); } @@ -460,7 +460,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateSta +import org.chromium.chrome.browser.omaha.inline.InlineUpdateControllerFactory; import org.chromium.chrome.browser.omaha.metrics.UpdateSuccessMetrics; import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; - import org.chromium.chrome.browser.preferences.SharedPreferencesManager; + import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; @@ -34,30 +43,37 @@ import java.io.File; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -676,7 +676,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateSta // Push custom configurations for certain update states. switch (forcedUpdateState) { case UpdateState.UPDATE_AVAILABLE: -@@ -279,27 +366,33 @@ public class UpdateStatusProvider { +@@ -279,29 +366,33 @@ public class UpdateStatusProvider { return status; } @@ -689,16 +689,18 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateSta - status.latestVersion = VersionNumberGetter.getInstance().getLatestKnownVersion(); - - boolean allowedToUpdate = checkForSufficientStorage() +- // Disable the version update check for automotive. See b/297925838. +- && !BuildInfo.getInstance().isAutomotive - && PackageUtils.isPackageInstalled( - GooglePlayServicesUtil.GOOGLE_PLAY_STORE_PACKAGE); - status.updateState = - allowedToUpdate ? UpdateState.UPDATE_AVAILABLE : UpdateState.NONE; - -- SharedPreferencesManager.getInstance().removeKey( +- ChromeSharedPreferences.getInstance().removeKey( - ChromePreferenceKeys.LATEST_UNSUPPORTED_VERSION); - } else if (!VersionNumberGetter.isCurrentOsVersionSupported()) { - status.updateState = UpdateState.UNSUPPORTED_OS_VERSION; -- status.latestUnsupportedVersion = SharedPreferencesManager.getInstance().readString( +- status.latestUnsupportedVersion = ChromeSharedPreferences.getInstance().readString( - ChromePreferenceKeys.LATEST_UNSUPPORTED_VERSION, null); - } else { - status.updateState = UpdateState.NONE; @@ -1207,7 +1209,7 @@ diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher_android.cc b/chrom diff --git a/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointFetcher.java b/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointFetcher.java --- a/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointFetcher.java +++ b/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointFetcher.java -@@ -70,6 +70,24 @@ public final class EndpointFetcher { +@@ -71,6 +71,24 @@ public final class EndpointFetcher { postData, timeout, headers, annotation.getHashCode(), callback); } @@ -1232,7 +1234,7 @@ diff --git a/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browse @NativeMethods public interface Natives { void nativeFetchOAuth(Profile profile, String oathConsumerName, String url, -@@ -78,7 +96,13 @@ public final class EndpointFetcher { +@@ -79,7 +97,13 @@ public final class EndpointFetcher { void nativeFetchChromeAPIKey(Profile profile, String url, String httpsMethod, String contentType, String postData, long timeout, String[] headers, int annotationHashCode, Callback callback); @@ -1286,9 +1288,9 @@ 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 -@@ -271,6 +271,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { - &kNotificationPermissionBottomSheet, +@@ -269,6 +269,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kPageAnnotationsService, + &kPaintPreviewNewColdStartHeuristic, &kPreconnectOnTabCreation, + &kInlineUpdateFlow, &kBookmarksImprovedSaveFlow, @@ -1297,7 +1299,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 -@@ -305,6 +305,7 @@ public abstract class ChromeFeatureList { +@@ -304,6 +304,7 @@ public abstract class ChromeFeatureList { "IncognitoReauthenticationForAndroid"; public static final String INCOGNITO_SCREENSHOT = "IncognitoScreenshot"; public static final String INFOBAR_SCROLL_OPTIMIZATION = "InfobarScrollOptimization"; @@ -1308,7 +1310,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 -@@ -2216,6 +2216,12 @@ Your Google account may have other forms of browsing history like searches and a +@@ -2109,6 +2109,12 @@ Your Google account may have other forms of browsing history like searches and a Chrome updates are no longer supported for this version of Android @@ -1321,7 +1323,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro -@@ -3840,7 +3846,10 @@ To change this setting, <resetlink>reset sync

<resetlink>reset sync

@@ -1333,7 +1335,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro Newer version is available -@@ -3851,6 +3860,18 @@ To change this setting, <resetlink>reset sync

<resetlink>reset sync

Android version is unsupported diff --git a/build/patches/Bromite-subresource-adblocker.patch b/build/patches/Bromite-subresource-adblocker.patch index b503443dd..15e2430c3 100644 --- a/build/patches/Bromite-subresource-adblocker.patch +++ b/build/patches/Bromite-subresource-adblocker.patch @@ -36,7 +36,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../sessions/session_restore_android.cc | 6 +- .../strings/android_chrome_strings.grd | 14 + chrome/common/pref_names.h | 3 + - .../strings/android/site_settings.grdp | 4 +- + .../strings/android/site_settings.grdp | 3 + components/component_updater/BUILD.gn | 7 + .../adblock_updater_service.cc | 268 ++++++++++++++++++ .../adblock_updater_service.h | 98 +++++++ @@ -52,7 +52,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../browser/subresource_filter_features.cc | 116 +------- .../core/common/indexed_ruleset.cc | 5 +- .../Bromite-subresource-adblocker.inc | 3 + - 40 files changed, 1208 insertions(+), 129 deletions(-) + 40 files changed, 1209 insertions(+), 127 deletions(-) create mode 100644 chrome/android/java/res/layout/adblock_editor.xml create mode 100644 chrome/android/java/res/xml/adblock_preferences.xml create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/settings/AdBlockEditor.java @@ -68,7 +68,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 -@@ -304,6 +304,7 @@ if (current_toolchain == default_toolchain) { +@@ -297,6 +297,7 @@ if (current_toolchain == default_toolchain) { "//chrome/android/modules/image_editor/provider:java", "//chrome/android/modules/stack_unwinder/provider:java", "//chrome/android/webapk/libs/client:client_java", @@ -79,7 +79,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn 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 -@@ -448,6 +448,7 @@ chrome_java_resources = [ +@@ -450,6 +450,7 @@ chrome_java_resources = [ "java/res/layout/account_chooser_dialog_title.xml", "java/res/layout/account_divider_preference.xml", "java/res/layout/account_management_account_row.xml", @@ -87,7 +87,7 @@ diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_ja "java/res/layout/auto_sign_in_first_run_dialog.xml", "java/res/layout/autofill_billing_address_dropdown.xml", "java/res/layout/autofill_card_name_and_number.xml", -@@ -648,6 +649,7 @@ chrome_java_resources = [ +@@ -655,6 +656,7 @@ chrome_java_resources = [ "java/res/xml/about_chrome_preferences.xml", "java/res/xml/account_management_preferences.xml", "java/res/xml/ad_services_config.xml", @@ -98,7 +98,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 -@@ -960,6 +960,8 @@ chrome_java_sources = [ +@@ -967,6 +967,8 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/permissions/PermissionSettingsBridge.java", "java/src/org/chromium/chrome/browser/permissions/PermissionUpdateRequester.java", "java/src/org/chromium/chrome/browser/photo_picker/DecoderServiceImpl.java", @@ -252,10 +252,10 @@ new file mode 100644 diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml --- a/chrome/android/java/res/xml/main_preferences.xml +++ b/chrome/android/java/res/xml/main_preferences.xml -@@ -71,6 +71,11 @@ - android:key="eyeo_adblock" - android:order="13" - android:title="@string/adblock_settings_title" /> +@@ -72,6 +72,11 @@ found in the LICENSE file. + android:key="safety_check" + android:order="12" + android:title="@string/prefs_safety_check"/> + @@ -501,7 +501,7 @@ diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h namespace extensions { class EventRouterForwarder; } -@@ -241,6 +246,7 @@ class BrowserProcess { +@@ -245,6 +250,7 @@ class BrowserProcess { #endif virtual component_updater::ComponentUpdateService* component_updater() = 0; @@ -512,7 +512,7 @@ diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h 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 -@@ -1130,6 +1130,26 @@ BrowserProcessImpl::component_updater() { +@@ -1134,6 +1134,26 @@ BrowserProcessImpl::component_updater() { return component_updater_.get(); } @@ -542,7 +542,7 @@ diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_pro diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_process_impl.h --- a/chrome/browser/browser_process_impl.h +++ b/chrome/browser/browser_process_impl.h -@@ -204,6 +204,7 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -208,6 +208,7 @@ class BrowserProcessImpl : public BrowserProcess, #endif component_updater::ComponentUpdateService* component_updater() override; @@ -550,7 +550,7 @@ diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_proc MediaFileSystemRegistry* media_file_system_registry() override; WebRtcLogUploader* webrtc_log_uploader() override; network_time::NetworkTimeTracker* network_time_tracker() override; -@@ -398,6 +399,7 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -404,6 +405,7 @@ class BrowserProcessImpl : public BrowserProcess, // to concerns over integrity of data shared between profiles, // but some users of component updater only install per-user. std::unique_ptr component_updater_; @@ -561,7 +561,7 @@ diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_proc diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc -@@ -431,6 +431,9 @@ StartupProfileInfo CreateInitialProfile( +@@ -428,6 +428,9 @@ StartupProfileInfo CreateInitialProfile( // missing code in the above test. CHECK(profile_info.profile) << "Cannot get default profile."; @@ -652,7 +652,7 @@ new file mode 100755 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 -@@ -604,6 +604,9 @@ SystemNetworkContextManager::~SystemNetworkContextManager() { +@@ -609,6 +609,9 @@ SystemNetworkContextManager::~SystemNetworkContextManager() { void SystemNetworkContextManager::RegisterPrefs(PrefRegistrySimple* registry) { StubResolverConfigReader::RegisterPrefs(registry); @@ -681,7 +681,7 @@ diff --git a/chrome/browser/sessions/session_restore_android.cc b/chrome/browser 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 -@@ -217,6 +217,20 @@ CHAR_LIMIT guidelines: +@@ -220,6 +220,20 @@ CHAR_LIMIT guidelines: Advanced @@ -705,7 +705,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h -@@ -2598,6 +2598,9 @@ inline constexpr char kAudioCaptureAllowed[] = "hardware.audio_capture_enabled"; +@@ -2625,6 +2625,9 @@ inline constexpr char kAudioCaptureAllowed[] = "hardware.audio_capture_enabled"; inline constexpr char kAudioCaptureAllowedUrls[] = "hardware.audio_capture_allowed_urls"; @@ -718,24 +718,23 @@ diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h diff --git a/components/browser_ui/strings/android/site_settings.grdp b/components/browser_ui/strings/android/site_settings.grdp --- a/components/browser_ui/strings/android/site_settings.grdp +++ b/components/browser_ui/strings/android/site_settings.grdp -@@ -362,8 +362,8 @@ +@@ -371,6 +371,9 @@ This site shows intrusive or misleading ads -- -- Block ads on sites that show intrusive or misleading ads + + Block ads based on the current filters - ++ Blocked on some sites + diff --git a/components/component_updater/BUILD.gn b/components/component_updater/BUILD.gn --- a/components/component_updater/BUILD.gn +++ b/components/component_updater/BUILD.gn -@@ -10,6 +10,12 @@ static_library("component_updater") { +@@ -16,6 +16,12 @@ static_library("component_updater") { + "component_installer.h", + "component_updater_command_line_config_policy.cc", "component_updater_command_line_config_policy.h", - "component_updater_paths.cc", - "component_updater_paths.h", + + "adblock_updater_service.cc", + "adblock_updater_service.h", @@ -745,7 +744,7 @@ diff --git a/components/component_updater/BUILD.gn b/components/component_update "component_updater_service.cc", "component_updater_service.h", "component_updater_service_internal.h", -@@ -39,6 +45,7 @@ static_library("component_updater") { +@@ -47,6 +53,7 @@ static_library("component_updater") { "//components/prefs", "//components/update_client", "//components/version_info", @@ -1528,7 +1527,7 @@ diff --git a/components/subresource_filter/content/browser/content_subresource_f web_contents_helper_(web_contents_helper) {} ContentSubresourceFilterThrottleManager:: -@@ -667,6 +671,17 @@ ContentSubresourceFilterThrottleManager:: +@@ -668,6 +672,17 @@ ContentSubresourceFilterThrottleManager:: throttle->NotifyPageActivationWithRuleset(EnsureRulesetHandle(), ad_tagging_state); } @@ -1696,7 +1695,7 @@ diff --git a/components/subresource_filter/content/browser/ruleset_service.cc b/ diff --git a/components/subresource_filter/content/browser/ruleset_service.h b/components/subresource_filter/content/browser/ruleset_service.h --- a/components/subresource_filter/content/browser/ruleset_service.h +++ b/components/subresource_filter/content/browser/ruleset_service.h -@@ -184,7 +184,7 @@ class RulesetService : public base::SupportsWeakPtr { +@@ -182,7 +182,7 @@ class RulesetService : public base::SupportsWeakPtr { // // Virtual so that it can be mocked out in tests. virtual void IndexAndStoreAndPublishRulesetIfNeeded( @@ -1705,7 +1704,7 @@ diff --git a/components/subresource_filter/content/browser/ruleset_service.h b/c // Get the ruleset version associated with the current local_state_. IndexedRulesetVersion GetMostRecentlyIndexedVersion() const; -@@ -217,6 +217,11 @@ class RulesetService : public base::SupportsWeakPtr { +@@ -215,6 +215,11 @@ class RulesetService : public base::SupportsWeakPtr { const base::FilePath& indexed_ruleset_base_dir, const UnindexedRulesetInfo& unindexed_ruleset_info); diff --git a/build/patches/Client-hints-overrides.patch b/build/patches/Client-hints-overrides.patch index b67f5af69..4c81eabe1 100644 --- a/build/patches/Client-hints-overrides.patch +++ b/build/patches/Client-hints-overrides.patch @@ -51,7 +51,7 @@ diff --git a/content/browser/client_hints/client_hints.cc b/content/browser/clie diff --git a/content/browser/loader/navigation_url_loader_impl.cc b/content/browser/loader/navigation_url_loader_impl.cc --- a/content/browser/loader/navigation_url_loader_impl.cc +++ b/content/browser/loader/navigation_url_loader_impl.cc -@@ -1067,6 +1067,11 @@ void NavigationURLLoaderImpl::OnAcceptCHFrameReceived( +@@ -1063,6 +1063,11 @@ void NavigationURLLoaderImpl::OnAcceptCHFrameReceived( return; } @@ -78,7 +78,7 @@ new file mode 100644 diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc -@@ -99,6 +99,7 @@ const size_t kMaxRestarts = 32; +@@ -100,6 +100,7 @@ const size_t kMaxRestarts = 32; // Returns true when Early Hints are allowed on the given protocol. bool EarlyHintsAreAllowedOn(HttpResponseInfo::ConnectionInfo connection_info) { @@ -139,7 +139,7 @@ diff --git a/third_party/blink/common/client_hints/enabled_client_hints.cc b/thi 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 -@@ -3906,8 +3906,8 @@ +@@ -4019,8 +4019,8 @@ public: true, }, { diff --git a/build/patches/Content-settings-infrastructure.patch b/build/patches/Content-settings-infrastructure.patch index 9aab4a3b6..2ae703d03 100644 --- a/build/patches/Content-settings-infrastructure.patch +++ b/build/patches/Content-settings-infrastructure.patch @@ -85,7 +85,7 @@ Require: bromite-build-utils.patch diff --git a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java --- a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java -@@ -47,6 +47,10 @@ import org.chromium.url.GURL; +@@ -58,6 +58,10 @@ import org.chromium.url.GURL; import java.util.Set; @@ -96,7 +96,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/C /** * A SiteSettingsDelegate instance that contains Chrome-specific Site Settings logic. */ -@@ -191,7 +195,7 @@ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate { +@@ -203,7 +207,7 @@ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate { @Override public boolean isHelpAndFeedbackEnabled() { @@ -105,7 +105,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/C } @Override -@@ -272,6 +276,17 @@ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate { +@@ -310,6 +314,17 @@ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate { return PrivacySandboxBridge.getFirstPartySetOwner(memberOrigin); } @@ -138,7 +138,7 @@ diff --git a/chrome/browser/installable/installed_webapp_bridge.cc b/chrome/brow 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 -@@ -1358,4 +1358,5 @@ +@@ -1367,4 +1367,5 @@ @@ -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 -@@ -71,7 +71,49 @@ export class SettingsPrivacyPageElement extends SettingsPrivacyPageElementBase { +@@ -72,7 +72,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, -@@ -137,6 +138,7 @@ function addPrivacyChildRoutes(r: Partial) { +@@ -139,6 +140,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 -@@ -274,4 +274,5 @@ +@@ -281,4 +281,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 -@@ -43,7 +43,7 @@ function getCategoryItemMap(): Map { +@@ -44,7 +44,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. @@ -328,7 +328,7 @@ diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_ diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_page_util.ts b/chrome/browser/resources/settings/site_settings_page/site_settings_page_util.ts --- a/chrome/browser/resources/settings/site_settings_page/site_settings_page_util.ts +++ b/chrome/browser/resources/settings/site_settings_page/site_settings_page_util.ts -@@ -6,6 +6,54 @@ import {assertNotReached} from 'chrome://resources/js/assert_ts.js'; +@@ -6,6 +6,54 @@ import {assertNotReached} from 'chrome://resources/js/assert.js'; import {ContentSettingsTypes} from '../site_settings/constants.js'; @@ -400,9 +400,9 @@ 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 -@@ -1975,6 +1975,7 @@ static_library("ui") { +@@ -2006,6 +2006,7 @@ static_library("ui") { + "//components/commerce/core/mojom:mojo_bindings", "//components/commerce/core/webui", - "//components/compose/core/browser:features", "//components/endpoint_fetcher:endpoint_fetcher", + "//components/content_settings/core/browser:browser", "//components/enterprise/common:files_scan_data", @@ -420,8 +420,8 @@ 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" -@@ -508,6 +510,17 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon( - icon = &vector_icons::kSelectWindowIcon; +@@ -509,6 +511,17 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon( + icon = &vector_icons::kPictureInPictureIcon; break; default: + bool found = false; @@ -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" -@@ -3631,6 +3634,42 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source, +@@ -3678,6 +3681,42 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source, policy_indicator::AddLocalizedStrings(html_source); AddSecurityKeysStrings(html_source); @@ -504,7 +504,7 @@ diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provide diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/browser/ui/webui/settings/site_settings_helper.cc --- a/chrome/browser/ui/webui/settings/site_settings_helper.cc +++ b/chrome/browser/ui/webui/settings/site_settings_helper.cc -@@ -41,6 +41,8 @@ +@@ -42,6 +42,8 @@ #include "chrome/common/url_constants.h" #include "chrome/grit/generated_resources.h" #include "components/content_settings/core/browser/host_content_settings_map.h" @@ -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" -@@ -206,7 +208,7 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = { +@@ -208,7 +210,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"); -@@ -461,6 +463,13 @@ bool HasRegisteredGroupName(ContentSettingsType type) { +@@ -465,6 +467,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; } -@@ -474,11 +483,24 @@ ContentSettingsType ContentSettingsTypeFromGroupName(base::StringPiece name) { +@@ -478,11 +487,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 -@@ -493,7 +515,6 @@ base::StringPiece ContentSettingsTypeToGroupName(ContentSettingsType type) { +@@ -497,7 +519,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(); -@@ -573,6 +594,13 @@ const std::vector& GetVisiblePermissionCategories() { +@@ -578,6 +599,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 -@@ -149,6 +149,21 @@ android_library("java") { +@@ -148,6 +148,21 @@ android_library("java") { ":site_settings_jni_headers", "//components/content_settings/android:java_pref_names_srcjar", ] @@ -609,7 +609,7 @@ diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/b } android_library("javatests") { -@@ -194,6 +209,7 @@ robolectric_library("junit") { +@@ -193,6 +208,7 @@ robolectric_library("junit") { } android_resources("java_resources") { @@ -620,7 +620,7 @@ 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 -@@ -346,11 +346,14 @@ public class AllSiteSettings extends BaseSiteSettingsFragment +@@ -342,11 +342,14 @@ public class AllSiteSettings extends BaseSiteSettingsFragment if (queryHasChanged) getInfoForOrigins(); }); @@ -1142,7 +1142,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c @ContentSettingValues @Nullable Integer defaultEnabledValue, @ContentSettingValues @Nullable Integer defaultDisabledValue, int enabledSummary, int disabledSummary) { -@@ -309,6 +309,8 @@ public class ContentSettingsResources { +@@ -303,6 +303,8 @@ public class ContentSettingsResources { ContentSettingValues.BLOCK, R.string.website_settings_category_vr_ask, R.string.website_settings_category_vr_blocked); } @@ -1151,7 +1151,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c assert false; // NOTREACHED return null; } -@@ -474,6 +476,12 @@ public class ContentSettingsResources { +@@ -468,6 +470,12 @@ public class ContentSettingsResources { } } @@ -1164,7 +1164,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. -@@ -609,6 +617,8 @@ public class ContentSettingsResources { +@@ -610,6 +618,8 @@ public class ContentSettingsResources { * Blocked states, in that order. */ public static int[] getTriStateSettingDescriptionIDs(int contentType) { @@ -1176,7 +1176,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/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 -@@ -310,6 +310,10 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -313,6 +313,10 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment @ContentSettingValues Integer contentSetting = website.site().getContentSetting( browserContextHandle, mCategory.getContentSettingsType()); @@ -1187,7 +1187,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (contentSetting != null) { return ContentSettingValues.BLOCK == contentSetting; } -@@ -469,6 +473,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -472,6 +476,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment ? new HashSet<>(getArguments().getStringArrayList(EXTRA_SELECTED_DOMAINS)) : null; @@ -1195,7 +1195,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c configureGlobalToggles(); if (mCategory.getType() == SiteSettingsCategory.Type.REQUEST_DESKTOP_SITE) { RecordUserAction.record("DesktopSiteContentSetting.SettingsPage.Entered"); -@@ -493,17 +498,26 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -496,17 +501,26 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment if (queryHasChanged) getInfoForOrigins(); }); @@ -1223,7 +1223,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (mCategory.getType() == SiteSettingsCategory.Type.PROTECTED_MEDIA) { getSiteSettingsDelegate().launchProtectedContentHelpAndFeedbackActivity( getActivity()); -@@ -577,6 +591,11 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -576,6 +590,11 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment BrowserContextHandle browserContextHandle = getSiteSettingsDelegate().getBrowserContextHandle(); PrefService prefService = UserPrefs.get(browserContextHandle); @@ -1235,7 +1235,7 @@ 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; -@@ -796,6 +815,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -797,6 +816,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment : R.string.website_settings_allowed_group_heading_request_desktop_site; break; } @@ -1244,7 +1244,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c assert resource > 0; return getString(resource); } -@@ -914,6 +935,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -915,6 +936,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment default: break; } @@ -1253,7 +1253,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (allowSpecifyingExceptions) { getPreferenceScreen().addPreference(new AddExceptionPreference(getStyledContext(), ADD_EXCEPTION_KEY, getAddExceptionDialogMessage(), mCategory, this)); -@@ -1085,8 +1108,16 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -1086,8 +1109,16 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment private boolean isBlocked() { switch (mGlobalToggleLayout) { case GlobalToggleLayout.TRI_STATE_TOGGLE: @@ -1270,9 +1270,9 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c return (triStateToggle.getCheckedSetting() == ContentSettingValues.BLOCK); case GlobalToggleLayout.FOUR_STATE_COOKIE_TOGGLE: FourStateCookieSettingsPreference fourStateCookieToggle = -@@ -1165,7 +1196,11 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment - } else if (mCategory.getType() == SiteSettingsCategory.Type.THIRD_PARTY_COOKIES) { - infoText.setSummary(R.string.website_settings_third_party_cookies_page_description); +@@ -1166,7 +1197,11 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment + } else if (mCategory.getType() == SiteSettingsCategory.Type.STORAGE_ACCESS) { + infoText.setSummary(getStorageAccessSummary()); } else { - screen.removePreference(infoText); + int infoMessage = BromiteCustomContentSettingImpl.getCategoryDescription(mCategory); @@ -1283,7 +1283,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } // Hide the anti-abuse text preferences, as needed. -@@ -1189,6 +1224,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -1190,6 +1225,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment screen.removePreference(antiAbuseThingsToConsiderHeader); screen.removePreference(antiAbuseThingsToConsiderSectionOne); } @@ -1291,7 +1291,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (permissionBlockedByOs) { maybeShowOsWarning(screen); -@@ -1352,7 +1388,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -1371,7 +1407,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment getSiteSettingsDelegate().getBrowserContextHandle(), contentType); int[] descriptionIds = ContentSettingsResources.getTriStateSettingDescriptionIDs(contentType); @@ -1300,7 +1300,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } private void configureBinaryToggle(ChromeSwitchPreference binaryToggle, int contentType) { -@@ -1478,6 +1514,14 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -1497,6 +1533,14 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment @ContentSettingValues Integer value = site.getContentSetting(browserContextHandle, contentSettingsType); @@ -1318,7 +1318,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/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 -@@ -46,6 +46,7 @@ import java.util.Collection; +@@ -47,6 +47,7 @@ import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -1326,7 +1326,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c /** * Shows the permissions and other settings for a particular website. -@@ -171,7 +172,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -172,7 +173,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment case ContentSettingsType.CLIPBOARD_READ_WRITE: return "clipboard_permission_list"; default: @@ -1335,7 +1335,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } } -@@ -536,7 +537,8 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -529,7 +530,8 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment private void setupContentSettingsPreferences() { mMaxPermissionOrder = findPreference(PREF_PERMISSIONS_HEADER).getOrder(); @@ -1345,7 +1345,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c Preference preference = new ChromeSwitchPreference(getStyledContext()); preference.setKey(getPreferenceKey(type)); -@@ -1016,14 +1018,22 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1026,14 +1028,22 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment private void setupContentSettingsPreference(Preference preference, @ContentSettingValues @Nullable Integer value, boolean isEmbargoed) { @@ -1371,7 +1371,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c switchPreference.setOnPreferenceChangeListener(this); @ContentSettingsType int contentType = getContentSettingsTypeFromPreferenceKey(preference.getKey()); -@@ -1176,7 +1186,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1186,7 +1196,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment public @ContentSettingsType int getContentSettingsTypeFromPreferenceKey(String preferenceKey) { if (mPreferenceMap == null) { mPreferenceMap = new HashMap<>(); @@ -1380,7 +1380,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); -@@ -1218,7 +1228,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1228,7 +1238,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment } mSite.setContentSetting(browserContextHandle, type, permission); @@ -1389,7 +1389,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c preference.setIcon(getContentSettingsIcon(type, permission)); if (mWebsiteSettingsObserver != null) { -@@ -1248,7 +1258,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1258,7 +1268,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. @@ -1401,24 +1401,24 @@ 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/SiteSettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java -@@ -37,6 +37,7 @@ public class SiteSettings extends BaseSiteSettingsFragment - : R.xml.site_settings_preferences); +@@ -34,6 +34,7 @@ public class SiteSettings extends BaseSiteSettingsFragment + SettingsUtils.addPreferencesFromResource(this, R.xml.site_settings_preferences); getActivity().setTitle(getContext().getString(R.string.prefs_site_settings)); + BromiteCustomContentSettingImpl.configurePreferences(this); configurePreferences(); updatePreferenceStates(); } -@@ -52,7 +53,7 @@ public class SiteSettings extends BaseSiteSettingsFragment +@@ -54,7 +55,7 @@ public class SiteSettings extends BaseSiteSettingsFragment + } - private void configurePreferences() { // 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(); type++) { if (!getSiteSettingsDelegate().isCategoryVisible(type)) { getPreferenceScreen().removePreference(findPreference(type)); -@@ -68,7 +69,7 @@ public class SiteSettings extends BaseSiteSettingsFragment +@@ -70,7 +71,7 @@ public class SiteSettings extends BaseSiteSettingsFragment @CookieControlsMode int cookieControlsMode = UserPrefs.get(browserContextHandle).getInteger(COOKIE_CONTROLS_MODE); @@ -1427,7 +1427,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. -@@ -133,10 +134,13 @@ public class SiteSettings extends BaseSiteSettingsFragment +@@ -135,10 +136,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. @@ -1447,25 +1447,25 @@ 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 -@@ -47,7 +47,7 @@ public class SiteSettingsCategory { - Type.PROTECTED_MEDIA, Type.SENSORS, Type.SOUND, Type.USB, Type.VIRTUAL_REALITY, - Type.USE_STORAGE, Type.AUTO_DARK_WEB_CONTENT, Type.REQUEST_DESKTOP_SITE, - Type.FEDERATED_IDENTITY_API, Type.THIRD_PARTY_COOKIES, Type.SITE_DATA, Type.ANTI_ABUSE, -- Type.ZOOM, Type.NUM_ENTRIES}) -+ Type.ZOOM, Type.NUM_ENTRIES_CHROMIUM}) +@@ -73,7 +73,7 @@ public class SiteSettingsCategory { + Type.ZOOM, + Type.STORAGE_ACCESS, + Type.TRACKING_PROTECTION, +- Type.NUM_ENTRIES ++ Type.NUM_ENTRIES_CHROMIUM + }) @Retention(RetentionPolicy.SOURCE) public @interface Type { - // All updates here must also be reflected in {@link #preferenceKey(int) -@@ -85,7 +85,7 @@ public class SiteSettingsCategory { - /** - * Number of handled categories used for calculating array sizes. - */ -- int NUM_ENTRIES = 30; -+ int NUM_ENTRIES_CHROMIUM = 30; +@@ -113,7 +113,7 @@ public class SiteSettingsCategory { + int TRACKING_PROTECTION = 31; + + /** Number of handled categories used for calculating array sizes. */ +- int NUM_ENTRIES = 32; ++ int NUM_ENTRIES_CHROMIUM = 32; } private final BrowserContextHandle mBrowserContextHandle; -@@ -129,6 +129,9 @@ public class SiteSettingsCategory { +@@ -157,6 +157,9 @@ public class SiteSettingsCategory { } else { permission = ""; } @@ -1475,7 +1475,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c return new SiteSettingsCategory(browserContextHandle, type, permission); } -@@ -137,7 +140,7 @@ public class SiteSettingsCategory { +@@ -165,7 +168,7 @@ public class SiteSettingsCategory { @ContentSettingsType int contentSettingsType) { assert contentSettingsType != -1; assert Type.ALL_SITES == 0; @@ -1484,7 +1484,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (contentSettingsType(i) == contentSettingsType) { return createFromType(browserContextHandle, i); } -@@ -148,7 +151,7 @@ public class SiteSettingsCategory { +@@ -176,7 +179,7 @@ public class SiteSettingsCategory { public static SiteSettingsCategory createFromPreferenceKey( BrowserContextHandle browserContextHandle, String preferenceKey) { assert Type.ALL_SITES == 0; @@ -1493,8 +1493,8 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (preferenceKey(i).equals(preferenceKey)) { return createFromType(browserContextHandle, i); } -@@ -219,8 +222,7 @@ public class SiteSettingsCategory { - case Type.ZOOM: +@@ -250,8 +253,7 @@ public class SiteSettingsCategory { + case Type.TRACKING_PROTECTION: return ContentSettingsType.DEFAULT; // Conversion unavailable. } - assert false; @@ -1503,7 +1503,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } /** -@@ -305,8 +307,12 @@ public class SiteSettingsCategory { +@@ -340,8 +342,12 @@ public class SiteSettingsCategory { case Type.ZOOM: return "zoom"; default: @@ -1519,7 +1519,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 -@@ -168,6 +168,8 @@ public interface SiteSettingsDelegate { +@@ -176,6 +176,8 @@ public interface SiteSettingsDelegate { */ String getFirstPartySetOwner(String memberOrigin); @@ -1575,8 +1575,8 @@ 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 -@@ -263,6 +263,12 @@ public final class Website implements WebsiteEntry { - RecordUserAction.record("SoundContentSetting.UnmuteBy.SiteSettings"); +@@ -282,6 +282,12 @@ public final class Website implements WebsiteEntry { + exception = exceptions.get(0); } } + @@ -1612,7 +1612,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 -@@ -265,7 +265,7 @@ public class WebsitePreferenceBridge { +@@ -266,7 +266,7 @@ public class WebsitePreferenceBridge { case ContentSettingsType.PROTECTED_MEDIA_IDENTIFIER: return true; default: @@ -1621,7 +1621,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } } -@@ -280,7 +280,6 @@ public class WebsitePreferenceBridge { +@@ -281,7 +281,6 @@ public class WebsitePreferenceBridge { public static boolean isCategoryEnabled(BrowserContextHandle browserContextHandle, @ContentSettingsType int contentSettingsType) { @@ -1739,7 +1739,7 @@ diff --git a/components/content_settings/core/browser/content_settings_registry. namespace content_settings { -@@ -630,6 +631,7 @@ void ContentSettingsRegistry::Init() { +@@ -640,6 +641,7 @@ void ContentSettingsRegistry::Init() { WebsiteSettingsRegistry::DESKTOP, ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE, ContentSettingsInfo::EXCEPTIONS_ON_SECURE_ORIGINS_ONLY); @@ -1750,7 +1750,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 -@@ -176,8 +176,9 @@ void RecordContentSettingsHistogram(const std::string& name, +@@ -179,8 +179,9 @@ void RecordContentSettingsHistogram(const std::string& name, } int ContentSettingTypeToHistogramValue(ContentSettingsType content_setting) { @@ -1770,9 +1770,9 @@ diff --git a/components/content_settings/core/browser/content_settings_utils.cc #include "components/content_settings/core/browser/host_content_settings_map.h" +#include "components/content_settings/core/browser/website_settings_registry.h" #include "components/content_settings/core/common/content_settings.h" - #include "components/content_settings/core/common/content_settings_types.h" #include "components/content_settings/core/common/content_settings_utils.h" -@@ -122,6 +123,17 @@ PatternPair ParsePatternString(const std::string& pattern_str) { + #include "components/content_settings/core/common/features.h" +@@ -121,6 +122,17 @@ PatternPair ParsePatternString(const std::string& pattern_str) { void GetRendererContentSettingRules(const HostContentSettingsMap* map, RendererContentSettingRules* rules) { @@ -1793,7 +1793,7 @@ diff --git a/components/content_settings/core/browser/content_settings_utils.cc diff --git a/components/content_settings/core/browser/website_settings_info.h b/components/content_settings/core/browser/website_settings_info.h --- a/components/content_settings/core/browser/website_settings_info.h +++ b/components/content_settings/core/browser/website_settings_info.h -@@ -125,6 +125,30 @@ class WebsiteSettingsInfo { +@@ -132,6 +132,30 @@ class WebsiteSettingsInfo { ScopingType scoping_type() const { return scoping_type_; } IncognitoBehavior incognito_behavior() const { return incognito_behavior_; } @@ -1824,7 +1824,7 @@ diff --git a/components/content_settings/core/browser/website_settings_info.h b/ private: const ContentSettingsType type_; const std::string name_; -@@ -136,6 +160,17 @@ class WebsiteSettingsInfo { +@@ -143,6 +167,17 @@ class WebsiteSettingsInfo { const LossyStatus lossy_status_; const ScopingType scoping_type_; const IncognitoBehavior incognito_behavior_; @@ -1872,7 +1872,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 -@@ -49,6 +49,13 @@ static_library("common") { +@@ -50,6 +50,13 @@ static_library("common") { "//net", "//url", ] @@ -1977,9 +1977,9 @@ diff --git a/components/content_settings/core/common/content_settings.mojom b/co // This mirrors the C++ type in content_settings.h. struct ContentSettingPatternSource { ContentSettingsPattern primary_pattern; -@@ -91,6 +96,7 @@ struct ContentSettingPatternSource { - +@@ -92,6 +97,7 @@ struct ContentSettingPatternSource { // This mirrors the C++ type in content_settings.h. + // TODO(https://crbug.com/1485360): This should be removed. struct RendererContentSettingRules { + array settings_rules; array image_rules; @@ -2065,9 +2065,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 -@@ -365,7 +365,9 @@ enum class ContentSettingsType : int32_t { - // request. - FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION, +@@ -369,7 +369,9 @@ enum class ContentSettingsType : int32_t { + // heuristics. + TPCD_HEURISTICS_GRANTS, - NUM_TYPES, + NUM_TYPES_CHROMIUM, @@ -2217,7 +2217,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" -@@ -1246,6 +1247,14 @@ void PageInfo::PopulatePermissionInfo(PermissionInfo& permission_info, +@@ -1250,6 +1251,14 @@ void PageInfo::PopulatePermissionInfo(PermissionInfo& permission_info, // applies to permissions listed in |kPermissionType|. bool PageInfo::ShouldShowPermission( const PageInfo::PermissionInfo& info) const { @@ -2232,7 +2232,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) { -@@ -1346,7 +1355,19 @@ void PageInfo::PresentSitePermissions() { +@@ -1377,7 +1386,19 @@ void PageInfo::PresentSitePermissions() { HostContentSettingsMap* content_settings = GetContentSettings(); DCHECK(web_contents_); @@ -2264,7 +2264,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" -@@ -607,6 +608,12 @@ PageInfoUI::~PageInfoUI() = default; +@@ -619,6 +620,12 @@ PageInfoUI::~PageInfoUI() = default; // static std::u16string PageInfoUI::PermissionTypeToUIString(ContentSettingsType type) { @@ -2277,7 +2277,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); -@@ -618,6 +625,12 @@ std::u16string PageInfoUI::PermissionTypeToUIString(ContentSettingsType type) { +@@ -630,6 +637,12 @@ std::u16string PageInfoUI::PermissionTypeToUIString(ContentSettingsType type) { // static std::u16string PageInfoUI::PermissionTypeToUIStringMidSentence( ContentSettingsType type) { @@ -2290,7 +2290,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); -@@ -1052,6 +1065,11 @@ bool PageInfoUI::ContentSettingsTypeInPageInfo(ContentSettingsType type) { +@@ -1064,6 +1077,11 @@ bool PageInfoUI::ContentSettingsTypeInPageInfo(ContentSettingsType type) { if (info.type == type) return true; } @@ -2363,7 +2363,7 @@ diff --git a/third_party/blink/renderer/core/execution_context/execution_context diff --git a/third_party/blink/renderer/core/execution_context/execution_context.h b/third_party/blink/renderer/core/execution_context/execution_context.h --- a/third_party/blink/renderer/core/execution_context/execution_context.h +++ b/third_party/blink/renderer/core/execution_context/execution_context.h -@@ -44,6 +44,7 @@ +@@ -43,6 +43,7 @@ #include "third_party/blink/public/mojom/permissions_policy/permissions_policy_feature.mojom-blink-forward.h" #include "third_party/blink/public/mojom/permissions_policy/policy_disposition.mojom-blink-forward.h" #include "third_party/blink/public/mojom/v8_cache_options.mojom-blink-forward.h" @@ -2371,7 +2371,7 @@ diff --git a/third_party/blink/renderer/core/execution_context/execution_context #include "third_party/blink/renderer/bindings/core/v8/sanitize_script_errors.h" #include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/execution_context/security_context.h" -@@ -103,6 +104,10 @@ class SecurityOrigin; +@@ -102,6 +103,10 @@ class SecurityOrigin; class ScriptState; class ScriptWrappable; class TrustedTypePolicyFactory; diff --git a/build/patches/Dictionary-suggestions-for-the-Omnibox.patch b/build/patches/Dictionary-suggestions-for-the-Omnibox.patch index 1388407b2..e5d28c897 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 -@@ -278,8 +278,16 @@ class LocationBarMediator +@@ -290,8 +290,16 @@ class LocationBarMediator if (mNativeInitialized) RecordUserAction.record("FocusLocation"); // Don't clear Omnibox if the user just pasted text to NTP Omnibox. if (mShouldClearOmniboxOnFocus) { @@ -57,15 +57,15 @@ 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; -@@ -106,6 +107,7 @@ public abstract class UrlBar extends AutocompleteEditText { +@@ -104,6 +105,7 @@ public abstract class UrlBar extends AutocompleteEditText { private boolean mAllowFocus = true; private boolean mPendingScroll; + private boolean mPendingSelectAll; private int mPreviousWidth; - @ScrollType -@@ -307,6 +309,27 @@ public abstract class UrlBar extends AutocompleteEditText { + @ScrollType private int mPreviousScrollType; +@@ -301,6 +303,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 b807e12b6..bce0112f5 100644 --- a/build/patches/Disable-Accessibility-service-by-default.patch +++ b/build/patches/Disable-Accessibility-service-by-default.patch @@ -14,7 +14,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html 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 -@@ -1826,6 +1826,12 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1719,6 +1719,12 @@ Your Google account may have other forms of browsing history like searches and a Check now @@ -58,7 +58,7 @@ diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/c 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 -@@ -1021,6 +1021,11 @@ public class WebContentsAccessibilityImpl extends AccessibilityNodeProviderCompa +@@ -1024,6 +1024,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 43201006f..6ceb7206b 100644 --- a/build/patches/Disable-FLoC-and-privacy-sandbox.patch +++ b/build/patches/Disable-FLoC-and-privacy-sandbox.patch @@ -5,50 +5,37 @@ Subject: Disable FLoC and privacy sandbox Remove UI from the settings and set the flags to inactive Permanently removes FLoC support, disabling the download of LSH clusters, the marking the history navigation and the javascript API and permission policies. -Also added the disabling of blink features through the DisabledForBromite tag 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 --- .../browser/chrome_content_browser_client.cc | 3 +++ - .../PrivacySandboxSettingsFragmentV3.java | 1 + .../privacy_sandbox_settings_delegate.cc | 1 + .../privacy_sandbox/privacy_sandbox_prompt.cc | 1 + .../history/core/browser/history_backend.cc | 13 +--------- - .../privacy_sandbox_attestations.cc | 1 + + .../privacy_sandbox_attestations.cc | 2 -- .../privacy_sandbox_features.cc | 4 ++++ - .../privacy_sandbox/privacy_sandbox_prefs.cc | 2 +- + .../privacy_sandbox/privacy_sandbox_prefs.cc | 4 ++-- .../privacy_sandbox_settings_impl.cc | 24 +++++++++++++------ - 9 files changed, 30 insertions(+), 20 deletions(-) + 8 files changed, 29 insertions(+), 23 deletions(-) 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 -@@ -3430,6 +3430,9 @@ bool ChromeContentBrowserClient::IsAttributionReportingOperationAllowed( - const url::Origin* source_origin, +@@ -3432,6 +3432,9 @@ bool ChromeContentBrowserClient::IsAttributionReportingOperationAllowed( const url::Origin* destination_origin, - const url::Origin* reporting_origin) { + const url::Origin* reporting_origin, + bool* can_bypass) { + // make sure that this is always disabled in Bromite even if privacy sandbox is already disabled in the prefs + if ((true)) + return false; Profile* profile = Profile::FromBrowserContext(browser_context); auto* privacy_sandbox_settings = -diff --git a/chrome/browser/privacy_sandbox/android/java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxSettingsFragmentV3.java b/chrome/browser/privacy_sandbox/android/java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxSettingsFragmentV3.java ---- a/chrome/browser/privacy_sandbox/android/java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxSettingsFragmentV3.java -+++ b/chrome/browser/privacy_sandbox/android/java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxSettingsFragmentV3.java -@@ -47,6 +47,7 @@ public class PrivacySandboxSettingsFragmentV3 extends PrivacySandboxSettingsBase - privacySandboxToggle.setOnPreferenceChangeListener(this); - privacySandboxToggle.setManagedPreferenceDelegate(createManagedPreferenceDelegate()); - privacySandboxToggle.setChecked(PrivacySandboxBridge.isPrivacySandboxEnabled()); -+ privacySandboxToggle.setEnabled(false); - - ChromeBasePreference learnMorePreference = findPreference(LEARN_MORE_PREFERENCE); - SpannableString spannableString = new SpannableString( diff --git a/chrome/browser/privacy_sandbox/privacy_sandbox_settings_delegate.cc b/chrome/browser/privacy_sandbox/privacy_sandbox_settings_delegate.cc --- a/chrome/browser/privacy_sandbox/privacy_sandbox_settings_delegate.cc +++ b/chrome/browser/privacy_sandbox/privacy_sandbox_settings_delegate.cc -@@ -150,6 +150,7 @@ bool PrivacySandboxSettingsDelegate::HasAppropriateTopicsConsent() const { +@@ -159,6 +159,7 @@ bool PrivacySandboxSettingsDelegate::HasAppropriateTopicsConsent() const { bool PrivacySandboxSettingsDelegate::PrivacySandboxRestrictedNoticeRequired() const { @@ -93,25 +80,26 @@ 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 -@@ -339,6 +339,7 @@ void PrivacySandboxAttestations::LoadAttestationsInternal( - void PrivacySandboxAttestations::SetParsedAttestations( - base::Version version, - PrivacySandboxAttestationsMap attestations_map) { -+ if ((true)) return; - file_version_ = std::move(version); - attestations_map_ = std::move(attestations_map); - +@@ -387,8 +387,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_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 -@@ -126,4 +126,8 @@ BASE_FEATURE(kTrackingProtectionOnboardingForceEligibility, - "TrackingProtectionOnboardingForceEligibility", +@@ -144,4 +144,8 @@ BASE_FEATURE(kAttributionDebugReportingCookieDeprecationTesting, + "AttributionDebugReportingCookieDeprecationTesting", base::FEATURE_DISABLED_BY_DEFAULT); +SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxSettings4); +SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxSettings3); +SET_CROMITE_FEATURE_ENABLED(kDisablePrivacySandboxPrompts); -+SET_CROMITE_FEATURE_ENABLED(kEnforcePrivacySandboxAttestations); // if enabled log to console ++SET_CROMITE_FEATURE_DISABLED(kEnforcePrivacySandboxAttestations); } // namespace privacy_sandbox diff --git a/components/privacy_sandbox/privacy_sandbox_prefs.cc b/components/privacy_sandbox/privacy_sandbox_prefs.cc --- a/components/privacy_sandbox/privacy_sandbox_prefs.cc @@ -125,10 +113,19 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_prefs.cc b/components/pr user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); registry->RegisterBooleanPref(prefs::kPrivacySandboxApisEnabledV2, false); registry->RegisterBooleanPref(prefs::kPrivacySandboxM1ConsentDecisionMade, +@@ -28,7 +28,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) { + registry->RegisterBooleanPref(prefs::kPrivacySandboxM1FledgeEnabled, false); + registry->RegisterBooleanPref(prefs::kPrivacySandboxM1AdMeasurementEnabled, + false); +- registry->RegisterBooleanPref(prefs::kPrivacySandboxM1Restricted, false); ++ registry->RegisterBooleanPref(prefs::kPrivacySandboxM1Restricted, true); + + registry->RegisterBooleanPref(prefs::kPrivacySandboxManuallyControlledV2, + false); diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/components/privacy_sandbox/privacy_sandbox_settings_impl.cc --- a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc +++ b/components/privacy_sandbox/privacy_sandbox_settings_impl.cc -@@ -120,7 +120,7 @@ std::set GetTopicsSetFromString( +@@ -121,7 +121,7 @@ std::set GetTopicsSetFromString( // static bool PrivacySandboxSettingsImpl::IsAllowed(Status status) { @@ -137,7 +134,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo } // static -@@ -229,7 +229,8 @@ PrivacySandboxSettingsImpl::GetFinchPrioritizedTopics() { +@@ -230,7 +230,8 @@ PrivacySandboxSettingsImpl::GetFinchPrioritizedTopics() { return finch_prioritized_topics_; } @@ -147,7 +144,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo // M1 specific if (base::FeatureList::IsEnabled(privacy_sandbox::kPrivacySandboxSettings4)) { Status status = GetM1TopicAllowedStatus(); -@@ -286,7 +287,8 @@ bool PrivacySandboxSettingsImpl::IsTopicsAllowedForContext( +@@ -287,7 +288,8 @@ bool PrivacySandboxSettingsImpl::IsTopicsAllowedForContext( IsPrivacySandboxEnabledForContext(top_frame_origin, url); } @@ -157,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); -@@ -488,6 +490,7 @@ bool PrivacySandboxSettingsImpl::MaySendAttributionReport( +@@ -513,6 +515,7 @@ bool PrivacySandboxSettingsImpl:: void PrivacySandboxSettingsImpl::SetFledgeJoiningAllowed( const std::string& top_frame_etld_plus1, bool allowed) { @@ -165,7 +162,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo ScopedDictPrefUpdate scoped_pref_update( pref_service_, prefs::kPrivacySandboxFledgeJoinBlocked); -@@ -558,7 +561,8 @@ void PrivacySandboxSettingsImpl::ClearFledgeJoiningAllowedSettings( +@@ -583,7 +586,8 @@ void PrivacySandboxSettingsImpl::ClearFledgeJoiningAllowedSettings( } bool PrivacySandboxSettingsImpl::IsFledgeJoiningAllowed( @@ -175,7 +172,7 @@ 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(); -@@ -727,7 +731,8 @@ bool PrivacySandboxSettingsImpl::IsPrivateAggregationDebugModeAllowed( +@@ -752,7 +756,8 @@ bool PrivacySandboxSettingsImpl::IsPrivateAggregationDebugModeAllowed( net::CookieSettingOverrides()); } @@ -185,7 +182,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo PrivacySandboxSettingsImpl::Status status = GetPrivacySandboxAllowedStatus(); if (!IsAllowed(status)) { return false; -@@ -765,7 +770,8 @@ void PrivacySandboxSettingsImpl::SetTopicsBlockedForTesting() { +@@ -790,7 +795,8 @@ void PrivacySandboxSettingsImpl::SetTopicsBlockedForTesting() { pref_service_->SetBoolean(prefs::kPrivacySandboxApisEnabledV2, false); } @@ -195,7 +192,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo pref_service_->SetBoolean(prefs::kPrivacySandboxApisEnabledV2, enabled); } -@@ -826,7 +832,10 @@ bool PrivacySandboxSettingsImpl::IsPrivacySandboxEnabledForContext( +@@ -851,7 +857,10 @@ bool PrivacySandboxSettingsImpl::IsPrivacySandboxEnabledForContext( net::CookieSettingOverrides()); } @@ -207,7 +204,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo pref_service_->SetTime(prefs::kPrivacySandboxTopicsDataAccessibleSince, base::Time::Now()); -@@ -839,6 +848,7 @@ PrivacySandboxSettingsImpl::Status +@@ -864,6 +873,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 75bc13396..27b3bae3d 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 -@@ -331,7 +331,7 @@ SettingsUI::SettingsUI(content::WebUI* web_ui) +@@ -347,7 +347,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 42b096cff..65c76b53d 100644 --- a/build/patches/Disable-StartSurface-feature.patch +++ b/build/patches/Disable-StartSurface-feature.patch @@ -14,8 +14,8 @@ 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 -@@ -613,7 +613,7 @@ public abstract class ChromeFeatureList { - new CachedFlag(SHOULD_IGNORE_INTENT_SKIP_INTERNAL_CHECK, true); +@@ -632,7 +632,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); diff --git a/build/patches/Disable-TLS-resumption.patch b/build/patches/Disable-TLS-resumption.patch index 2f2aee25d..942484af3 100644 --- a/build/patches/Disable-TLS-resumption.patch +++ b/build/patches/Disable-TLS-resumption.patch @@ -90,7 +90,7 @@ diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc --- a/net/quic/quic_stream_factory.cc +++ b/net/quic/quic_stream_factory.cc -@@ -70,6 +70,7 @@ +@@ -69,6 +69,7 @@ #include "net/third_party/quiche/src/quiche/quic/core/quic_utils.h" #include "net/third_party/quiche/src/quiche/quic/platform/api/quic_flags.h" #include "third_party/boringssl/src/include/openssl/aead.h" @@ -98,7 +98,7 @@ diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc #include "url/gurl.h" #include "url/scheme_host_port.h" #include "url/url_constants.h" -@@ -195,6 +196,38 @@ std::set HostsFromOrigins(std::set origins) { +@@ -194,6 +195,38 @@ std::set HostsFromOrigins(std::set origins) { } // namespace @@ -137,7 +137,7 @@ diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc // Refcounted class that owns quic::QuicCryptoClientConfig and tracks how many // consumers are using it currently. When the last reference is freed, the // QuicCryptoClientConfigHandle informs the owning QuicStreamFactory, moves it -@@ -2353,7 +2386,7 @@ QuicStreamFactory::CreateCryptoConfigHandle( +@@ -2368,7 +2401,7 @@ QuicStreamFactory::CreateCryptoConfigHandle( sct_auditing_delegate_, HostsFromOrigins(params_.origins_to_force_quic_on), actual_network_anonymization_key), @@ -191,7 +191,7 @@ diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket + Log_ssl_session_data("Old session resumed", session.get()); } - const int kBufferSize = kDefaultOpenSSLBufferSize.Get(); + const int kBufferSize = GetDefaultOpenSSLBufferSize(); @@ -1067,6 +1095,35 @@ int SSLClientSocketImpl::DoHandshakeComplete(int result) { : SSLHandshakeDetails::kTLS13Full; } diff --git a/build/patches/Disable-all-predictors-code.patch b/build/patches/Disable-all-predictors-code.patch index 436dcb285..bec29de04 100644 --- a/build/patches/Disable-all-predictors-code.patch +++ b/build/patches/Disable-all-predictors-code.patch @@ -5,28 +5,29 @@ Subject: Disable all predictors code 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 --- - chrome/browser/BUILD.gn | 8 +- - chrome/browser/browser_features.cc | 16 ++-- - .../preloading_model_keyed_service.cc | 8 -- - .../preloading_model_keyed_service_factory.cc | 4 +- - .../ranking/history_clusters_module_ranker.cc | 3 +- + chrome/browser/BUILD.gn | 4 --- + .../preloading_model_keyed_service.cc | 1 + + .../preloading_model_keyed_service_factory.cc | 4 +-- .../chrome_hints_manager.cc | 1 + .../optimization_guide_keyed_service.cc | 1 - - .../browser/predictors/loading_predictor.cc | 4 +- - .../predictors/loading_predictor_config.cc | 4 +- - .../browser/predictors/predictors_features.cc | 14 +--- - .../browser/autofill_optimization_guide.cc | 5 +- + .../browser/predictors/loading_predictor.cc | 4 +-- + .../predictors/loading_predictor_config.cc | 4 +-- + .../browser/predictors/predictors_features.cc | 11 ++----- + .../browser/autofill_optimization_guide.cc | 5 ++-- .../optimization_guide/core/hints_fetcher.cc | 1 + - .../optimization_guide/core/hints_manager.cc | 5 ++ - .../core/optimization_guide_features.cc | 74 +++++++------------ - .../core/prediction_model_download_manager.cc | 6 +- + .../optimization_guide/core/hints_manager.cc | 5 ++++ + .../core/optimization_guide_features.cc | 29 ++++++++++--------- + .../core/prediction_model_download_manager.cc | 6 ++-- .../core/prediction_model_fetcher_impl.cc | 1 + components/optimization_guide/features.gni | 3 +- - .../Disable-all-predictors-code.inc | 7 ++ - .../Disable-all-predictors-code.inc | 4 + - .../Disable-all-predictors-code.inc | 2 + + components/search/ntp_features.cc | 3 ++ + .../Disable-all-predictors-code.inc | 4 +++ + .../Disable-all-predictors-code.inc | 7 +++++ + .../Disable-all-predictors-code.inc | 4 +++ + .../Disable-all-predictors-code.inc | 2 ++ .../platform/runtime_enabled_features.json5 | 2 +- - 21 files changed, 80 insertions(+), 93 deletions(-) + 21 files changed, 60 insertions(+), 42 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 create mode 100644 cromite_flags/third_party/blink/common/features_cc/Disable-all-predictors-code.inc @@ -34,73 +35,28 @@ 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 -@@ -891,10 +891,10 @@ static_library("browser") { - "navigation_predictor/navigation_predictor_metrics_document_data.h", - "navigation_predictor/navigation_predictor_preconnect_client.cc", - "navigation_predictor/navigation_predictor_preconnect_client.h", -- "navigation_predictor/preloading_model_executor.cc", -- "navigation_predictor/preloading_model_executor.h", -- "navigation_predictor/preloading_model_handler.cc", -- "navigation_predictor/preloading_model_handler.h", -+ # "navigation_predictor/preloading_model_executor.cc", -+ # "navigation_predictor/preloading_model_executor.h", -+ # "navigation_predictor/preloading_model_handler.cc", -+ # "navigation_predictor/preloading_model_handler.h", +@@ -877,10 +877,6 @@ static_library("browser") { + "navigation_predictor/navigation_predictor_keyed_service.h", + "navigation_predictor/navigation_predictor_keyed_service_factory.cc", + "navigation_predictor/navigation_predictor_keyed_service_factory.h", +- "navigation_predictor/navigation_predictor_metrics_document_data.cc", +- "navigation_predictor/navigation_predictor_metrics_document_data.h", +- "navigation_predictor/navigation_predictor_preconnect_client.cc", +- "navigation_predictor/navigation_predictor_preconnect_client.h", "navigation_predictor/preloading_model_keyed_service.cc", "navigation_predictor/preloading_model_keyed_service.h", "navigation_predictor/preloading_model_keyed_service_factory.cc", -diff --git a/chrome/browser/browser_features.cc b/chrome/browser/browser_features.cc ---- a/chrome/browser/browser_features.cc -+++ b/chrome/browser/browser_features.cc -@@ -255,22 +255,22 @@ BASE_FEATURE(kIncomingCallNotifications, - - // Enables omnibox trigger prerendering. - BASE_FEATURE(kOmniboxTriggerForPrerender2, -- "OmniboxTriggerForPrerender2", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "OmniboxTriggerForPrerender2", // always disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite - - // Enables bookmark trigger prerendering. - BASE_FEATURE(kBookmarkTriggerForPrerender2, -- "BookmarkTriggerForPrerender2", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "BookmarkTriggerForPrerender2", // always disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite - - // Enables New Tab Page trigger prerendering. - BASE_FEATURE(kNewTabPageTriggerForPrerender2, -- "NewTabPageTriggerForPrerender2", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "NewTabPageTriggerForPrerender2", // always disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite - - BASE_FEATURE(kSupportSearchSuggestionForPrerender2, -- "SupportSearchSuggestionForPrerender2", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "SupportSearchSuggestionForPrerender2", // always disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // in bromite - const base::FeatureParam::Option - search_suggestion_implementation_types[] = { - {SearchSuggestionPrerenderImplementationType::kUsePrefetch, diff --git a/chrome/browser/navigation_predictor/preloading_model_keyed_service.cc b/chrome/browser/navigation_predictor/preloading_model_keyed_service.cc --- a/chrome/browser/navigation_predictor/preloading_model_keyed_service.cc +++ b/chrome/browser/navigation_predictor/preloading_model_keyed_service.cc -@@ -10,14 +10,6 @@ PreloadingModelKeyedService::Inputs::Inputs() = default; - +@@ -16,6 +16,7 @@ PreloadingModelKeyedService::Inputs::Inputs() = default; PreloadingModelKeyedService::PreloadingModelKeyedService( OptimizationGuideKeyedService* optimization_guide_keyed_service) { -- auto* model_provider = -- static_cast( -- optimization_guide_keyed_service); -- -- if (model_provider) { -- preloading_model_handler_ = -- std::make_unique(model_provider); -- } - } - - PreloadingModelKeyedService::~PreloadingModelKeyedService() = default; + #if BUILDFLAG(BUILD_WITH_TFLITE_LIB) ++#error BUILD_WITH_TFLITE_LIB must be disabled + auto* model_provider = + static_cast( + optimization_guide_keyed_service); diff --git a/chrome/browser/navigation_predictor/preloading_model_keyed_service_factory.cc b/chrome/browser/navigation_predictor/preloading_model_keyed_service_factory.cc --- a/chrome/browser/navigation_predictor/preloading_model_keyed_service_factory.cc +++ b/chrome/browser/navigation_predictor/preloading_model_keyed_service_factory.cc @@ -113,21 +69,6 @@ diff --git a/chrome/browser/navigation_predictor/preloading_model_keyed_service_ - OptimizationGuideKeyedServiceFactory::GetForProfile(profile)); + return nullptr; } -diff --git a/chrome/browser/new_tab_page/modules/history_clusters/ranking/history_clusters_module_ranker.cc b/chrome/browser/new_tab_page/modules/history_clusters/ranking/history_clusters_module_ranker.cc ---- a/chrome/browser/new_tab_page/modules/history_clusters/ranking/history_clusters_module_ranker.cc -+++ b/chrome/browser/new_tab_page/modules/history_clusters/ranking/history_clusters_module_ranker.cc -@@ -62,9 +62,10 @@ void HistoryClustersModuleRanker::OnAllSignalsReady( - for (const auto& cluster : clusters) { - ranking_signals->emplace_back(active_carts, category_boostlist_, cluster); - } -- auto* ranking_signals_ptr = ranking_signals.get(); - - #if BUILDFLAG(BUILD_WITH_TFLITE_LIB) -+ auto* ranking_signals_ptr = ranking_signals.get(); -+ - if (model_handler_ && model_handler_->CanExecuteAvailableModel()) { - model_handler_->ExecuteBatch( - ranking_signals_ptr, diff --git a/chrome/browser/optimization_guide/chrome_hints_manager.cc b/chrome/browser/optimization_guide/chrome_hints_manager.cc --- a/chrome/browser/optimization_guide/chrome_hints_manager.cc +++ b/chrome/browser/optimization_guide/chrome_hints_manager.cc @@ -142,7 +83,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 -@@ -343,7 +343,6 @@ void OptimizationGuideKeyedService::RemoveObserverForOptimizationTargetModel( +@@ -347,7 +347,6 @@ void OptimizationGuideKeyedService::RemoveObserverForOptimizationTargetModel( void OptimizationGuideKeyedService::RegisterOptimizationTypes( const std::vector& optimization_types) { @@ -153,7 +94,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 -@@ -184,7 +184,7 @@ ResourcePrefetchPredictor* LoadingPredictor::resource_prefetch_predictor() { +@@ -211,7 +211,7 @@ ResourcePrefetchPredictor* LoadingPredictor::resource_prefetch_predictor() { } PreconnectManager* LoadingPredictor::preconnect_manager() { @@ -162,7 +103,7 @@ diff --git a/chrome/browser/predictors/loading_predictor.cc b/chrome/browser/pre return nullptr; } -@@ -200,7 +200,7 @@ PrefetchManager* LoadingPredictor::prefetch_manager() { +@@ -227,7 +227,7 @@ PrefetchManager* LoadingPredictor::prefetch_manager() { if (!base::FeatureList::IsEnabled(features::kLoadingPredictorPrefetch)) return nullptr; @@ -188,17 +129,6 @@ diff --git a/chrome/browser/predictors/loading_predictor_config.cc b/chrome/brow diff --git a/chrome/browser/predictors/predictors_features.cc b/chrome/browser/predictors/predictors_features.cc --- a/chrome/browser/predictors/predictors_features.cc +++ b/chrome/browser/predictors/predictors_features.cc -@@ -11,8 +11,8 @@ namespace features { - - // Whether local predictions should be used to make preconnect predictions. - BASE_FEATURE(kLoadingPredictorUseLocalPredictions, -- "LoadingPredictorUseLocalPredictions", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "LoadingPredictorUseLocalPredictions", // disabled by -+ base::FEATURE_DISABLED_BY_DEFAULT); // default - - // Modifies loading predictor so that it only learns about subresources and - // origins that are high priority. @@ -39,11 +39,7 @@ BASE_FEATURE(kLoadingPredictorDisregardAlwaysAccessesNetwork, const base::FeatureState @@ -224,6 +154,12 @@ diff --git a/chrome/browser/predictors/predictors_features.cc b/chrome/browser/p // Modifies loading predictor so that it does prefetches of subresources instead // of preconnects. +@@ -103,4 +95,5 @@ size_t GetMaxInflightPrefetches() { + 3)); + } + ++SET_CROMITE_FEATURE_DISABLED(kLoadingPredictorUseLocalPredictions); + } // namespace features diff --git a/components/autofill/core/browser/autofill_optimization_guide.cc b/components/autofill/core/browser/autofill_optimization_guide.cc --- a/components/autofill/core/browser/autofill_optimization_guide.cc +++ b/components/autofill/core/browser/autofill_optimization_guide.cc @@ -267,7 +203,7 @@ diff --git a/components/optimization_guide/core/hints_fetcher.cc b/components/op diff --git a/components/optimization_guide/core/hints_manager.cc b/components/optimization_guide/core/hints_manager.cc --- a/components/optimization_guide/core/hints_manager.cc +++ b/components/optimization_guide/core/hints_manager.cc -@@ -391,6 +391,7 @@ void HintsManager::Shutdown() { +@@ -388,6 +388,7 @@ void HintsManager::Shutdown() { OptimizationGuideDecision HintsManager::GetOptimizationGuideDecisionFromOptimizationTypeDecision( OptimizationTypeDecision optimization_type_decision) { @@ -275,7 +211,7 @@ diff --git a/components/optimization_guide/core/hints_manager.cc b/components/op switch (optimization_type_decision) { case OptimizationTypeDecision::kAllowedByOptimizationFilter: case OptimizationTypeDecision::kAllowedByHint: -@@ -1099,6 +1100,7 @@ void HintsManager::CanApplyOptimizationOnDemand( +@@ -1096,6 +1097,7 @@ void HintsManager::CanApplyOptimizationOnDemand( proto::RequestContext request_context, OnDemandOptimizationGuideDecisionRepeatingCallback callback) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -283,7 +219,7 @@ diff --git a/components/optimization_guide/core/hints_manager.cc b/components/op InsertionOrderedSet urls_to_fetch; InsertionOrderedSet hosts_to_fetch; -@@ -1389,6 +1391,9 @@ OptimizationTypeDecision HintsManager::CanApplyOptimization( +@@ -1392,6 +1394,9 @@ OptimizationTypeDecision HintsManager::CanApplyOptimization( bool skip_cache, OptimizationMetadata* optimization_metadata) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -291,172 +227,67 @@ diff --git a/components/optimization_guide/core/hints_manager.cc b/components/op + return OptimizationTypeDecision::kNoHintAvailable; + } - ScopedCanApplyOptimizationLogger scoped_logger( - optimization_type, navigation_url, optimization_guide_logger_); + ScopedCanApplyOptimizationLogger scoped_logger(optimization_type, url, + optimization_guide_logger_); diff --git a/components/optimization_guide/core/optimization_guide_features.cc b/components/optimization_guide/core/optimization_guide_features.cc --- a/components/optimization_guide/core/optimization_guide_features.cc +++ b/components/optimization_guide/core/optimization_guide_features.cc -@@ -34,13 +34,6 @@ namespace features { - +@@ -35,25 +35,13 @@ namespace features { namespace { --constexpr auto enabled_by_default_desktop_only = + constexpr auto enabled_by_default_desktop_only = -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) -- base::FEATURE_DISABLED_BY_DEFAULT; + base::FEATURE_DISABLED_BY_DEFAULT; -#else - base::FEATURE_ENABLED_BY_DEFAULT; -#endif -- + constexpr auto enabled_by_default_mobile_only = - #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) - true; -@@ -48,13 +41,6 @@ constexpr auto enabled_by_default_mobile_only = +-#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) +- true; +-#else false; - #endif +-#endif --constexpr auto enabled_by_default_ios_only = + constexpr auto enabled_by_default_ios_only = -#if BUILDFLAG(IS_IOS) - base::FEATURE_ENABLED_BY_DEFAULT; -#else -- base::FEATURE_DISABLED_BY_DEFAULT; + base::FEATURE_DISABLED_BY_DEFAULT; -#endif -- + // Returns whether |locale| is a supported locale for |feature|. // - // This matches |locale| with the "supported_locales" feature param value in -@@ -149,17 +135,17 @@ std::set GetOauthScopesForFeature(const base::Feature& feature) { - // Enables the syncing of the Optimization Hints component, which provides - // hints for what optimizations can be applied on a page load. - BASE_FEATURE(kOptimizationHints, -- "OptimizationHints", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "OptimizationHints", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - // Enables fetching from a remote Optimization Guide Service. - BASE_FEATURE(kRemoteOptimizationGuideFetching, -- "OptimizationHintsFetching", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "OptimizationHintsFetching", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - BASE_FEATURE(kRemoteOptimizationGuideFetchingAnonymousDataConsent, -- "OptimizationHintsFetchingAnonymousDataConsent", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "OptimizationHintsFetchingAnonymousDataConsent", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - // Enables performance info in the context menu and fetching from a remote - // Optimization Guide Service. -@@ -169,33 +155,29 @@ BASE_FEATURE(kContextMenuPerformanceInfoAndRemoteHintFetching, - - // Enables the prediction of optimization targets. - BASE_FEATURE(kOptimizationTargetPrediction, -- "OptimizationTargetPrediction", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "OptimizationTargetPrediction", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - // Enables the downloading of models. - BASE_FEATURE(kOptimizationGuideModelDownloading, -- "OptimizationGuideModelDownloading", --#if BUILDFLAG(BUILD_WITH_TFLITE_LIB) -- base::FEATURE_ENABLED_BY_DEFAULT --#else // BUILD_WITH_TFLITE_LIB -- base::FEATURE_DISABLED_BY_DEFAULT --#endif // !BUILD_WITH_TFLITE_LIB -+ "OptimizationGuideModelDownloading", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT // in Bromite - ); - - // Enables page content to be annotated. - BASE_FEATURE(kPageContentAnnotations, -- "PageContentAnnotations", -- enabled_by_default_desktop_only); -+ "PageContentAnnotations", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - // Enables fetching page metadata from the remote Optimization Guide service. - BASE_FEATURE(kRemotePageMetadata, -- "RemotePageMetadata", -- enabled_by_default_desktop_only); -+ "RemotePageMetadata", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - // Enables the page entities model to be annotated on every page load. - BASE_FEATURE(kPageEntitiesPageContentAnnotations, -- "PageEntitiesPageContentAnnotations", -- enabled_by_default_desktop_only); -+ "PageEntitiesPageContentAnnotations", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - // Enables the page visibility model to be annotated on every page load. - BASE_FEATURE(kPageVisibilityPageContentAnnotations, - "PageVisibilityPageContentAnnotations", -@@ -218,8 +200,8 @@ BASE_FEATURE(kPageEntitiesModelResetOnShutdown, - - // Enables push notification of hints. - BASE_FEATURE(kPushNotifications, -- "OptimizationGuidePushNotifications", -- enabled_by_default_ios_only); -+ "OptimizationGuidePushNotifications", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - // This feature flag does not turn off any behavior, it is only used for - // experiment parameters. -@@ -232,21 +214,21 @@ BASE_FEATURE(kOptimizationGuideMetadataValidation, - "OptimizationGuideMetadataValidation", - base::FEATURE_DISABLED_BY_DEFAULT); - --BASE_FEATURE(kPageVisibilityBatchAnnotations, -- "PageVisibilityBatchAnnotations", -- base::FEATURE_ENABLED_BY_DEFAULT); -+BASE_FEATURE(kPageVisibilityBatchAnnotations, // disabled -+ "PageVisibilityBatchAnnotations", // by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - BASE_FEATURE(kTextEmbeddingBatchAnnotations, - "TextEmbeddingBatchAnnotations", - base::FEATURE_DISABLED_BY_DEFAULT); - - BASE_FEATURE(kPageContentAnnotationsValidation, -- "PageContentAnnotationsValidation", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ "PageContentAnnotationsValidation", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - BASE_FEATURE(kPreventLongRunningPredictionModels, - "PreventLongRunningPredictionModels", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ base::FEATURE_DISABLED_BY_DEFAULT); - - BASE_FEATURE(kOptimizationGuideUseContinueOnShutdownForPageContentAnnotations, - "OptimizationGuideUseContinueOnShutdownForPageContentAnnotations", -@@ -276,13 +258,13 @@ BASE_FEATURE(kExtractRelatedSearchesFromPrefetchedZPSResponse, - - BASE_FEATURE(kPageContentAnnotationsPersistSalientImageMetadata, - "PageContentAnnotationsPersistSalientImageMetadata", -- enabled_by_default_desktop_only); -+ base::FEATURE_DISABLED_BY_DEFAULT); - - // Killswitch for fetching on search results from a remote Optimization Guide - // Service. - BASE_FEATURE(kOptimizationGuideFetchingForSRP, -- "OptimizationHintsFetchingSRP", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "OptimizationHintsFetchingSRP", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default - - // Enables the model store to save relative paths computed from the base model - // store dir. Storing as relative path in the model store is needed for IOS, -@@ -566,7 +548,7 @@ size_t MaxURLKeyedHintCacheSize() { +@@ -560,8 +548,7 @@ size_t MaxURLKeyedHintCacheSize() { + } bool ShouldPersistHintsToDisk() { - return GetFieldTrialParamByFeatureAsBool(kOptimizationHints, +- return GetFieldTrialParamByFeatureAsBool(kOptimizationHints, - "persist_hints_to_disk", true); -+ "persist_hints_to_disk", false); ++ return false; } bool ShouldEnablePersonalizedMetadata(proto::RequestContext request_context) { +@@ -899,5 +886,19 @@ std::set GetOAuthScopesForModelExecution() { + return GetOauthScopesForFeature(kOptimizationGuideModelExecution); + } + ++SET_CROMITE_FEATURE_DISABLED(kOptimizationHints); ++SET_CROMITE_FEATURE_DISABLED(kRemoteOptimizationGuideFetching); ++SET_CROMITE_FEATURE_DISABLED(kRemoteOptimizationGuideFetchingAnonymousDataConsent); ++SET_CROMITE_FEATURE_DISABLED(kOptimizationTargetPrediction); ++SET_CROMITE_FEATURE_DISABLED(kOptimizationGuideModelDownloading); ++SET_CROMITE_FEATURE_DISABLED(kPageContentAnnotations); ++SET_CROMITE_FEATURE_DISABLED(kRemotePageMetadata); ++SET_CROMITE_FEATURE_DISABLED(kPageEntitiesPageContentAnnotations); ++SET_CROMITE_FEATURE_DISABLED(kPushNotifications); ++SET_CROMITE_FEATURE_DISABLED(kPageVisibilityBatchAnnotations); ++SET_CROMITE_FEATURE_DISABLED(kPageContentAnnotationsValidation); ++SET_CROMITE_FEATURE_DISABLED(kPreventLongRunningPredictionModels); ++SET_CROMITE_FEATURE_DISABLED(kPageContentAnnotationsPersistSalientImageMetadata); ++SET_CROMITE_FEATURE_DISABLED(kOptimizationGuideFetchingForSRP); + } // namespace features + } // namespace optimization_guide diff --git a/components/optimization_guide/core/prediction_model_download_manager.cc b/components/optimization_guide/core/prediction_model_download_manager.cc --- a/components/optimization_guide/core/prediction_model_download_manager.cc +++ b/components/optimization_guide/core/prediction_model_download_manager.cc @@ -518,6 +349,26 @@ diff --git a/components/optimization_guide/features.gni b/components/optimizatio } declare_args() { +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() { + base::SplitResult::SPLIT_WANT_NONEMPTY); + } + ++SET_CROMITE_FEATURE_DISABLED(kNtpHistoryClustersModule); ++SET_CROMITE_FEATURE_DISABLED(kNtpHistoryClustersModuleLoad); ++SET_CROMITE_FEATURE_DISABLED(kNtpHistoryClustersModuleUseModelRanking); + } // namespace ntp_features +diff --git a/cromite_flags/chrome/browser/browser_features_cc/Disable-all-predictors-code.inc b/cromite_flags/chrome/browser/browser_features_cc/Disable-all-predictors-code.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/browser_features_cc/Disable-all-predictors-code.inc +@@ -0,0 +1,4 @@ ++SET_CROMITE_FEATURE_DISABLED(kOmniboxTriggerForPrerender2); ++SET_CROMITE_FEATURE_DISABLED(kBookmarkTriggerForPrerender2); ++SET_CROMITE_FEATURE_DISABLED(kNewTabPageTriggerForPrerender2); ++SET_CROMITE_FEATURE_DISABLED(kSupportSearchSuggestionForPrerender2); diff --git a/cromite_flags/chrome/common/chrome_features_cc/Disable-all-predictors-code.inc b/cromite_flags/chrome/common/chrome_features_cc/Disable-all-predictors-code.inc new file mode 100644 --- /dev/null @@ -549,7 +400,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 -@@ -3007,7 +3007,7 @@ +@@ -3087,7 +3087,7 @@ { // https://crbug.com/1126305 name: "Prerender2", diff --git a/build/patches/Disable-all-promo-dialogs.patch b/build/patches/Disable-all-promo-dialogs.patch index c98ce1a6a..1ef0de12f 100644 --- a/build/patches/Disable-all-promo-dialogs.patch +++ b/build/patches/Disable-all-promo-dialogs.patch @@ -16,7 +16,7 @@ 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 -@@ -945,6 +945,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { +@@ -956,6 +956,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { } private boolean maybeShowPromo() { @@ -45,8 +45,8 @@ diff --git a/chrome/browser/ui/views/user_education/browser_feature_promo_contro ui::TrackedElement* anchor_element) const { + if ((true)) return false; auto* const profile = browser_view_->GetProfile(); - // Temporarily turn off IPH in incognito as a concern was raised that - // the IPH backend ignores incognito and writes to the parent profile. + + // Verify that there are no required notices pending. diff --git a/chrome/browser/user_education/java/src/org/chromium/chrome/browser/user_education/UserEducationHelper.java b/chrome/browser/user_education/java/src/org/chromium/chrome/browser/user_education/UserEducationHelper.java --- a/chrome/browser/user_education/java/src/org/chromium/chrome/browser/user_education/UserEducationHelper.java +++ b/chrome/browser/user_education/java/src/org/chromium/chrome/browser/user_education/UserEducationHelper.java diff --git a/build/patches/Disable-conversion-measurement-api.patch b/build/patches/Disable-conversion-measurement-api.patch index c5f6fc57b..a48b95764 100644 --- a/build/patches/Disable-conversion-measurement-api.patch +++ b/build/patches/Disable-conversion-measurement-api.patch @@ -11,34 +11,46 @@ being sent and being saved to disk, although it is currently in uncalled code. 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 --- + .../browser/aw_content_browser_client.cc | 1 + chrome/android/java/AndroidManifest.xml | 1 - components/attribution_reporting/features.cc | 1 + .../origin_trials/features.cc | 2 + .../render_view_context_menu_base.cc | 3 - .../aggregatable_report_sender.cc | 15 +- .../aggregation_service_features.cc | 1 + - .../attribution_data_host_manager_impl.cc | 5 + + .../attribution_data_host_manager_impl.cc | 1 + .../attribution_reporting/attribution_host.cc | 1 + - .../attribution_os_level_manager.cc | 1 + + .../attribution_os_level_manager.cc | 3 +- .../attribution_report_network_sender.cc | 9 + .../attribution_storage_sql.cc | 8 +- content/browser/storage_partition_impl.cc | 9 - content/public/android/BUILD.gn | 2 - - .../browser/AttributionOsLevelManager.java | 218 +----------------- - .../public/browser/content_browser_client.cc | 6 +- + .../browser/AttributionOsLevelManager.java | 229 +----------------- + .../public/browser/content_browser_client.cc | 7 +- .../public/browser/navigation_controller.cc | 1 - - content/renderer/render_thread_impl.cc | 5 +- .../Disable-conversion-measurement-api.inc | 1 + .../Disable-conversion-measurement-api.inc | 1 + .../Disable-conversion-measurement-api.inc | 9 + .../attribution/request_headers_internal.cc | 1 + .../network/public/cpp/attribution_utils.cc | 2 + + third_party/blink/renderer/core/page/page.cc | 2 +- ui/events/android/motion_event_android.cc | 6 +- - 23 files changed, 67 insertions(+), 241 deletions(-) + 24 files changed, 63 insertions(+), 253 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 +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 + AwContentBrowserClient::GetAttributionSupport( + AttributionReportingOsApiState state, + content::WebContents* web_contents) { ++ if ((true)) return network::mojom::AttributionSupport::kNone; + AwSettings* aw_settings = AwSettings::FromWebContents(web_contents); + if (aw_settings && aw_settings->GetAttributionBehavior() == + AwSettings::AttributionBehavior::DISABLED) { diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml --- a/chrome/android/java/AndroidManifest.xml +++ b/chrome/android/java/AndroidManifest.xml @@ -53,9 +65,9 @@ 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(kAttributionReportingNullAggregatableReports, - "AttributionReportingNullAggregatableReports", - base::FEATURE_ENABLED_BY_DEFAULT); +@@ -17,4 +17,5 @@ BASE_FEATURE(kAttributionReportingTriggerConfig, + "AttributionReportingTriggerConfig", + base::FEATURE_DISABLED_BY_DEFAULT); +SET_CROMITE_FEATURE_DISABLED(kConversionMeasurement); } // namespace attribution_reporting::features @@ -72,7 +84,7 @@ diff --git a/components/embedder_support/origin_trials/features.cc b/components/ diff --git a/components/renderer_context_menu/render_view_context_menu_base.cc b/components/renderer_context_menu/render_view_context_menu_base.cc --- a/components/renderer_context_menu/render_view_context_menu_base.cc +++ b/components/renderer_context_menu/render_view_context_menu_base.cc -@@ -507,9 +507,6 @@ RenderViewContextMenuBase::GetOpenURLParamsWithExtraHeaders( +@@ -510,9 +510,6 @@ RenderViewContextMenuBase::GetOpenURLParamsWithExtraHeaders( open_url_params.source_site_instance = site_instance_; @@ -124,18 +136,14 @@ 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 -@@ -500,6 +500,11 @@ void AttributionDataHostManagerImpl::ParseSource( +@@ -507,6 +507,7 @@ void AttributionDataHostManagerImpl::ParseSource( + HeaderPendingDecode pending_decode, Registrar registrar) { DCHECK(it != registrations_.end()); ++ if ((true)) return; -+ if ((true)) { -+ MaybeOnRegistrationsFinished(it); -+ return; -+ } -+ - switch (registrar) { - case Registrar::kWeb: - if (!network::HasAttributionWebSupport( + network::mojom::AttributionSupport attribution_support = + AttributionManager::GetAttributionSupport( 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 @@ -150,14 +158,23 @@ diff --git a/content/browser/attribution_reporting/attribution_host.cc b/content diff --git a/content/browser/attribution_reporting/attribution_os_level_manager.cc b/content/browser/attribution_reporting/attribution_os_level_manager.cc --- a/content/browser/attribution_reporting/attribution_os_level_manager.cc +++ b/content/browser/attribution_reporting/attribution_os_level_manager.cc -@@ -51,6 +51,7 @@ ApiState GetApiState() { - +@@ -46,6 +46,7 @@ absl::optional g_state GUARDED_BY_CONTEXT(GetSequenceChecker()); // static - network::mojom::AttributionSupport AttributionOsLevelManager::GetSupport() { + bool AttributionOsLevelManager::ShouldUseOsWebSource( + GlobalRenderFrameHostId render_frame_id) { + if ((true)) return network::mojom::AttributionSupport::kNone; - bool is_web_allowed = - GetContentClient()->browser()->IsWebAttributionReportingAllowed(); - switch (GetApiState()) { + return GetContentClient() + ->browser() + ->ShouldUseOsWebSourceAttributionReporting( +@@ -74,7 +75,7 @@ bool AttributionOsLevelManager::ShouldInitializeApiState() { + // static + ApiState AttributionOsLevelManager::GetApiState() { + DCHECK_CALLED_ON_VALID_SEQUENCE(GetSequenceChecker()); +- return g_state.value_or(ApiState::kDisabled); ++ return ApiState::kDisabled; + } + + // static diff --git a/content/browser/attribution_reporting/attribution_report_network_sender.cc b/content/browser/attribution_reporting/attribution_report_network_sender.cc --- a/content/browser/attribution_reporting/attribution_report_network_sender.cc +++ b/content/browser/attribution_reporting/attribution_report_network_sender.cc @@ -187,7 +204,7 @@ 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 -@@ -692,14 +692,16 @@ StorableSource::Result DestinationRateLimitResultToStorableSourceResult( +@@ -685,14 +685,16 @@ StorableSource::Result DestinationRateLimitResultToStorableSourceResult( } } @@ -210,7 +227,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 -@@ -1500,15 +1500,6 @@ void StoragePartitionImpl::Initialize( +@@ -1527,15 +1527,6 @@ void StoragePartitionImpl::Initialize( bucket_manager_ = std::make_unique(this); @@ -229,7 +246,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 -@@ -180,8 +180,6 @@ android_library("content_full_java") { +@@ -179,8 +179,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", @@ -257,9 +274,9 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib -import com.google.common.util.concurrent.Futures; -import com.google.common.util.concurrent.ListenableFuture; - import org.chromium.base.ContextUtils; - import org.chromium.base.Log; -@@ -51,6 +40,8 @@ import java.util.concurrent.TimeoutException; + import org.jni_zero.CalledByNative; + import org.jni_zero.JNINamespace; +@@ -52,6 +41,8 @@ import java.util.concurrent.TimeoutException; */ @JNINamespace("content") public class AttributionOsLevelManager { @@ -268,7 +285,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 = -@@ -98,21 +89,11 @@ public class AttributionOsLevelManager { +@@ -99,26 +90,11 @@ public class AttributionOsLevelManager { } private static boolean supportsAttribution() { @@ -286,13 +303,18 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib - if (!supportsAttribution()) { - return null; - } -- mManager = MeasurementManagerFutures.from(ContextUtils.getApplicationContext()); +- try { +- mManager = MeasurementManagerFutures.from(ContextUtils.getApplicationContext()); +- } catch (Throwable t) { +- // An error may be thrown if android.ext.adservices is not loaded. +- Log.i(TAG, "Failed to get measurement manager", t); +- } - return mManager; + return null; } private void onRegistrationCompleted( -@@ -137,46 +118,6 @@ public class AttributionOsLevelManager { +@@ -143,46 +119,6 @@ public class AttributionOsLevelManager { } } @@ -339,7 +361,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib /** * Registers a web attribution source with native, see `registerWebSourceAsync()`: * https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/java/measurement/MeasurementManagerFutures. -@@ -189,19 +130,6 @@ public class AttributionOsLevelManager { +@@ -195,19 +131,6 @@ public class AttributionOsLevelManager { requestId, RegistrationType.SOURCE, RegistrationResult.ERROR_INTERNAL); return; } @@ -359,7 +381,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib } /** -@@ -215,15 +143,6 @@ public class AttributionOsLevelManager { +@@ -221,15 +144,6 @@ public class AttributionOsLevelManager { requestId, RegistrationType.SOURCE, RegistrationResult.ERROR_INTERNAL); return; } @@ -375,7 +397,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib } /** -@@ -238,18 +157,6 @@ public class AttributionOsLevelManager { +@@ -244,18 +158,6 @@ public class AttributionOsLevelManager { requestId, RegistrationType.TRIGGER, RegistrationResult.ERROR_INTERNAL); return; } @@ -394,7 +416,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib } /** -@@ -263,15 +170,6 @@ public class AttributionOsLevelManager { +@@ -269,15 +171,6 @@ public class AttributionOsLevelManager { requestId, RegistrationType.TRIGGER, RegistrationResult.ERROR_INTERNAL); return; } @@ -410,7 +432,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib } private void onDataDeletionCompleted(int requestId) { -@@ -296,77 +194,7 @@ public class AttributionOsLevelManager { +@@ -302,77 +195,7 @@ public class AttributionOsLevelManager { onDataDeletionCompleted(requestId); return; } @@ -489,7 +511,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib } /** -@@ -377,6 +205,10 @@ public class AttributionOsLevelManager { +@@ -383,6 +206,10 @@ public class AttributionOsLevelManager { private static void getMeasurementApiStatus() { ThreadUtils.assertOnBackgroundThread(); @@ -500,12 +522,18 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib if (sManagerForTesting != null) { AttributionOsLevelManagerJni.get().onMeasurementStateReturned(1); return; -@@ -393,38 +225,6 @@ public class AttributionOsLevelManager { +@@ -399,44 +226,6 @@ public class AttributionOsLevelManager { AttributionOsLevelManagerJni.get().onMeasurementStateReturned(0); return; } -- MeasurementManagerFutures mm = -- MeasurementManagerFutures.from(ContextUtils.getApplicationContext()); +- MeasurementManagerFutures mm = null; +- try { +- mm = MeasurementManagerFutures.from(ContextUtils.getApplicationContext()); +- } catch (Throwable t) { +- // An error may be thrown if android.ext.adservices is not loaded. +- Log.i(TAG, "Failed to get measurement manager", t); +- } +- - if (mm == null) { - AttributionOsLevelManagerJni.get().onMeasurementStateReturned(0); - return; @@ -542,10 +570,18 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib 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 -@@ -560,17 +560,17 @@ bool ContentBrowserClient::IsAttributionReportingOperationAllowed( - } - - bool ContentBrowserClient::IsWebAttributionReportingAllowed() { +@@ -553,6 +553,7 @@ void ContentBrowserClient::OnAuctionComplete( + network::mojom::AttributionSupport ContentBrowserClient::GetAttributionSupport( + AttributionReportingOsApiState state, + content::WebContents* web_contents) { ++ if ((true)) return network::mojom::AttributionSupport::kNone; + switch (state) { + case AttributionReportingOsApiState::kDisabled: + return network::mojom::AttributionSupport::kWeb; +@@ -569,17 +570,17 @@ bool ContentBrowserClient::IsAttributionReportingOperationAllowed( + const url::Origin* destination_origin, + const url::Origin* reporting_origin, + bool* can_bypass) { - return true; + return false; } @@ -574,28 +610,6 @@ diff --git a/content/public/browser/navigation_controller.cc b/content/public/br is_pdf(input.is_pdf) { #if DCHECK_IS_ON() DCHECK(input.Valid()); -diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc ---- a/content/renderer/render_thread_impl.cc -+++ b/content/renderer/render_thread_impl.cc -@@ -885,6 +885,9 @@ void RenderThreadImpl::InitializeRenderer( - GetContentClient()->renderer()->DidSetUserAgent(user_agent); - user_agent_metadata_ = user_agent_metadata; - cors_exempt_header_list_ = cors_exempt_header_list; -+#if BUILDFLAG(IS_ANDROID) -+ attribution_support = network::mojom::AttributionSupport::kNone; -+#endif - attribution_support_ = attribution_support; - - blink::WebVector web_cors_exempt_header_list( -@@ -1789,7 +1792,7 @@ RenderThreadImpl::GetAttributionReportingSupport() { - - void RenderThreadImpl::SetAttributionReportingSupport( - network::mojom::AttributionSupport attribution_support) { -- attribution_support_ = attribution_support; -+ attribution_support_ = network::mojom::AttributionSupport::kNone; - } - - std::unique_ptr RenderThreadImpl::CreateMediaCodecFactory( diff --git a/cromite_flags/content/public/common/content_features_cc/Disable-conversion-measurement-api.inc b/cromite_flags/content/public/common/content_features_cc/Disable-conversion-measurement-api.inc new file mode 100644 --- /dev/null @@ -652,6 +666,18 @@ diff --git a/services/network/public/cpp/attribution_utils.cc b/services/network switch (attribution_support) { case mojom::AttributionSupport::kWeb: case mojom::AttributionSupport::kWebAndOs: +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( + + void Page::SetAttributionSupport( + network::mojom::AttributionSupport attribution_support) { +- attribution_support_ = attribution_support; ++ attribution_support_ = network::mojom::AttributionSupport::kNone; + } + + template class CORE_TEMPLATE_EXPORT Supplement; diff --git a/ui/events/android/motion_event_android.cc b/ui/events/android/motion_event_android.cc --- a/ui/events/android/motion_event_android.cc +++ b/ui/events/android/motion_event_android.cc diff --git a/build/patches/Disable-crash-reporting.patch b/build/patches/Disable-crash-reporting.patch index 18df3661a..32b801fab 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 -@@ -2651,6 +2651,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( +@@ -2649,6 +2649,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 71fad0314..16e0fea44 100644 --- a/build/patches/Disable-feeds-support-by-default.patch +++ b/build/patches/Disable-feeds-support-by-default.patch @@ -4,34 +4,16 @@ Subject: Disable feeds support by default License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - .../chromium/chrome/browser/feed/FeedFeatures.java | 8 +------- - chrome/browser/prefs/browser_prefs.cc | 4 ++-- - components/feed/core/common/pref_names.cc | 13 +------------ - components/feed/feed_feature_list.cc | 2 ++ - 4 files changed, 6 insertions(+), 21 deletions(-) + chrome/browser/prefs/browser_prefs.cc | 4 ++-- + components/feed/core/common/pref_names.cc | 13 +------------ + components/feed/core/shared_prefs/pref_names.cc | 2 +- + components/feed/feed_feature_list.cc | 2 ++ + 4 files changed, 6 insertions(+), 15 deletions(-) -diff --git a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedFeatures.java b/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedFeatures.java ---- a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedFeatures.java -+++ b/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedFeatures.java -@@ -46,13 +46,7 @@ public final class FeedFeatures { - * the user is signed in and confirms it's not a child profile. - */ - public static boolean isWebFeedUIEnabled() { -- // TODO(b/197354832, b/188188861): change consent check to SIGNIN. -- return ChromeFeatureList.isEnabled(ChromeFeatureList.WEB_FEED) -- && IdentityServicesProvider.get() -- .getSigninManager(Profile.getLastUsedRegularProfile()) -- .getIdentityManager() -- .hasPrimaryAccount(ConsentLevel.SIGNIN) -- && !Profile.getLastUsedRegularProfile().isChild(); -+ return false; - } - - public static boolean shouldUseWebFeedAwarenessIPH() { 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 -@@ -1765,10 +1765,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -1773,10 +1773,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, supervised_user::SupervisedUserService::RegisterProfilePrefs(registry); #endif @@ -67,10 +49,22 @@ diff --git a/components/feed/core/common/pref_names.cc b/components/feed/core/co prefs->ClearPref(prefs::kExperimentsDeprecated); } +diff --git a/components/feed/core/shared_prefs/pref_names.cc b/components/feed/core/shared_prefs/pref_names.cc +--- a/components/feed/core/shared_prefs/pref_names.cc ++++ b/components/feed/core/shared_prefs/pref_names.cc +@@ -26,7 +26,7 @@ const char kEnableSnippetsByDse[] = "ntp_snippets_by_dse.enable"; + void RegisterFeedSharedProfilePrefs(PrefRegistrySimple* registry) { + registry->RegisterBooleanPref(kEnableSnippets, false); + registry->RegisterBooleanPref(kArticlesListVisible, false); +- registry->RegisterBooleanPref(kEnableSnippetsByDse, true); ++ registry->RegisterBooleanPref(kEnableSnippetsByDse, false); + } + + } // namespace prefs 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 -@@ -163,4 +163,6 @@ BASE_FEATURE(kFeedSportsCard, +@@ -169,4 +169,6 @@ BASE_FEATURE(kFeedSportsCard, "FeedSportsCard", base::FEATURE_DISABLED_BY_DEFAULT); diff --git a/build/patches/Disable-fetching-of-all-field-trials.patch b/build/patches/Disable-fetching-of-all-field-trials.patch index c96e40a93..e8997513b 100644 --- a/build/patches/Disable-fetching-of-all-field-trials.patch +++ b/build/patches/Disable-fetching-of-all-field-trials.patch @@ -97,7 +97,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 -@@ -818,7 +818,6 @@ void SystemNetworkContextManager::AddSSLConfigToNetworkContextParams( +@@ -827,7 +827,6 @@ void SystemNetworkContextManager::AddSSLConfigToNetworkContextParams( void SystemNetworkContextManager::ConfigureDefaultNetworkContextParams( network::mojom::NetworkContextParams* network_context_params) { @@ -121,7 +121,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 -@@ -51,7 +51,7 @@ public class VariationsSeedBridge { +@@ -52,7 +52,7 @@ public class VariationsSeedBridge { } @CalledByNative @@ -232,7 +232,7 @@ diff --git a/components/variations/service/variations_field_trial_creator_base.c // Determines whether the field trial testing config defined in // testing/variations/fieldtrial_testing_config.json should be applied. If the // "disable_fieldtrial_testing_config" GN flag is set to true, then the testing -@@ -302,11 +303,6 @@ bool VariationsFieldTrialCreatorBase::SetUpFieldTrials( +@@ -300,11 +301,6 @@ bool VariationsFieldTrialCreatorBase::SetUpFieldTrials( safe_seed_manager); } @@ -244,7 +244,7 @@ diff --git a/components/variations/service/variations_field_trial_creator_base.c base::FeatureList::SetInstance(std::move(feature_list)); // For testing Variations Safe Mode, maybe crash here. -@@ -585,6 +581,7 @@ bool VariationsFieldTrialCreatorBase::CreateTrialsFromSeed( +@@ -581,6 +577,7 @@ bool VariationsFieldTrialCreatorBase::CreateTrialsFromSeed( const EntropyProviders& entropy_providers, base::FeatureList* feature_list, SafeSeedManagerInterface* safe_seed_manager) { @@ -252,7 +252,7 @@ diff --git a/components/variations/service/variations_field_trial_creator_base.c // This histogram name uses "VariationsFieldTrialCreator" rather than // "VariationsFieldTrialCreatorBase" for consistency with historical data TRACE_EVENT0("startup", "VariationsFieldTrialCreator::CreateTrialsFromSeed"); -@@ -678,6 +675,7 @@ bool VariationsFieldTrialCreatorBase::CreateTrialsFromSeed( +@@ -674,6 +671,7 @@ bool VariationsFieldTrialCreatorBase::CreateTrialsFromSeed( void VariationsFieldTrialCreatorBase::LoadSeedFromJsonFile( const base::FilePath& json_seed_path) { @@ -263,7 +263,7 @@ diff --git a/components/variations/service/variations_field_trial_creator_base.c diff --git a/components/variations/service/variations_service.cc b/components/variations/service/variations_service.cc --- a/components/variations/service/variations_service.cc +++ b/components/variations/service/variations_service.cc -@@ -220,17 +220,8 @@ bool GetInstanceManipulations(const net::HttpResponseHeaders* headers, +@@ -221,17 +221,8 @@ bool GetInstanceManipulations(const net::HttpResponseHeaders* headers, // Variations seed fetching is only enabled in official Chrome builds, if a URL // is specified on the command line, and for testing. bool IsFetchingEnabled() { @@ -283,7 +283,7 @@ diff --git a/components/variations/service/variations_service.cc b/components/va } // Returns the already downloaded first run seed, and clear the seed from the -@@ -599,7 +590,7 @@ bool VariationsService::DoFetchFromURL(const GURL& url, bool is_http_retry) { +@@ -601,7 +592,7 @@ bool VariationsService::DoFetchFromURL(const GURL& url, bool is_http_retry) { // debugger or if the machine was suspended) and OnURLFetchComplete() hasn't // had a chance to run yet from the previous request. In this case, don't // start a new request and just let the previous one finish. @@ -295,7 +295,7 @@ diff --git a/components/variations/service/variations_service.cc b/components/va diff --git a/content/browser/loader/url_loader_throttles.cc b/content/browser/loader/url_loader_throttles.cc --- a/content/browser/loader/url_loader_throttles.cc +++ b/content/browser/loader/url_loader_throttles.cc -@@ -49,8 +49,6 @@ CreateContentBrowserURLLoaderThrottles( +@@ -50,8 +50,6 @@ CreateContentBrowserURLLoaderThrottles( // TODO(crbug.com/1094303): Consider whether we want to use the WebContents to // determine the value for variations::Owner. Alternatively, this is the // browser side, and we might be fine with Owner::kUnknown. @@ -304,7 +304,7 @@ diff --git a/content/browser/loader/url_loader_throttles.cc b/content/browser/lo ClientHintsControllerDelegate* client_hint_delegate = browser_context->GetClientHintsControllerDelegate(); -@@ -128,11 +126,6 @@ CreateContentBrowserURLLoaderThrottlesForKeepAlive( +@@ -130,11 +128,6 @@ CreateContentBrowserURLLoaderThrottlesForKeepAlive( GetContentClient()->browser()->CreateURLLoaderThrottlesForKeepAlive( request, browser_context, wc_getter, frame_tree_node_id); variations::OmniboxURLLoaderThrottle::AppendThrottleIfNeeded(&throttles); @@ -314,8 +314,8 @@ diff --git a/content/browser/loader/url_loader_throttles.cc b/content/browser/lo - variations::VariationsURLLoaderThrottle::AppendThrottleIfNeeded( - browser_context->GetVariationsClient(), &throttles); - return throttles; - } + auto throttle = MaybeCreateIdentityUrlLoaderThrottle(base::BindRepeating( + webid::SetIdpSigninStatus, browser_context, frame_tree_node_id)); diff --git a/content/browser/origin_trials/origin_trials_utils.cc b/content/browser/origin_trials/origin_trials_utils.cc --- a/content/browser/origin_trials/origin_trials_utils.cc +++ b/content/browser/origin_trials/origin_trials_utils.cc @@ -356,9 +356,9 @@ new file mode 100644 diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc --- a/third_party/blink/renderer/core/loader/document_loader.cc +++ b/third_party/blink/renderer/core/loader/document_loader.cc -@@ -187,13 +187,6 @@ Vector CopyInitiatorOriginTrials( - WebVector CopyInitiatorOriginTrials( - const Vector& initiator_origin_trial_features) { +@@ -194,13 +194,6 @@ WebVector CopyInitiatorOriginTrials( + const Vector& + initiator_origin_trial_features) { WebVector result; - for (auto feature : initiator_origin_trial_features) { - // Convert from OriginTrialFeature to int. These values are passed between diff --git a/build/patches/Disable-idle-detection.patch b/build/patches/Disable-idle-detection.patch index 0e5eca201..914c99a41 100644 --- a/build/patches/Disable-idle-detection.patch +++ b/build/patches/Disable-idle-detection.patch @@ -18,8 +18,8 @@ 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 -@@ -2068,10 +2068,9 @@ - base_feature: "none", +@@ -2157,10 +2157,9 @@ + status: "experimental", }, { - name: "IdleDetection", 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 fa4c50018..33c83650a 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 -@@ -466,8 +466,8 @@ BASE_FEATURE(kOmniboxModernizeVisualUpdate, +@@ -454,8 +454,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 04c3b024d..aa2b7ab26 100644 --- a/build/patches/Disable-media-router-and-remoting-by-default.patch +++ b/build/patches/Disable-media-router-and-remoting-by-default.patch @@ -13,7 +13,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html 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 +++ b/chrome/browser/media/router/media_router_feature.cc -@@ -106,6 +106,7 @@ void ClearMediaRouterStoredPrefsForTesting() { +@@ -105,6 +105,7 @@ void ClearMediaRouterStoredPrefsForTesting() { } bool MediaRouterEnabled(content::BrowserContext* context) { @@ -21,7 +21,7 @@ diff --git a/chrome/browser/media/router/media_router_feature.cc b/chrome/browse #if !BUILDFLAG(IS_ANDROID) if (!base::FeatureList::IsEnabled(kMediaRouter)) return false; -@@ -147,7 +148,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) { +@@ -146,7 +147,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) { registry->RegisterStringPref(prefs::kMediaRouterReceiverIdHashToken, "", PrefRegistry::PUBLIC); registry->RegisterBooleanPref( @@ -30,7 +30,7 @@ diff --git a/chrome/browser/media/router/media_router_feature.cc b/chrome/browse registry->RegisterBooleanPref( media_router::prefs::kMediaRouterShowCastSessionsStartedByOtherDevices, true); -@@ -218,4 +219,7 @@ absl::optional GetCastMirroringPlayoutDelay() { +@@ -217,4 +218,7 @@ absl::optional GetCastMirroringPlayoutDelay() { #endif // !BUILDFLAG(IS_ANDROID) @@ -41,7 +41,7 @@ diff --git a/chrome/browser/media/router/media_router_feature.cc b/chrome/browse diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc -@@ -413,7 +413,7 @@ void ProfileImpl::RegisterProfilePrefs( +@@ -418,7 +418,7 @@ void ProfileImpl::RegisterProfilePrefs( #endif registry->RegisterBooleanPref(prefs::kForceEphemeralProfiles, false); @@ -53,7 +53,7 @@ diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/p 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 -@@ -101,7 +101,7 @@ KURL GetAvailabilityUrl(const WebURL& source, +@@ -92,7 +92,7 @@ KURL GetAvailabilityUrl(const WebURL& source, } bool IsBackgroundAvailabilityMonitoringDisabled() { diff --git a/build/patches/Disable-plugins-enumeration.patch b/build/patches/Disable-plugins-enumeration.patch index 2c6183afc..19b883e0f 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 -@@ -2053,9 +2053,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() { +@@ -2079,9 +2079,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() { } PluginData* LocalFrame::GetPluginData() const { diff --git a/build/patches/Disable-references-to-fonts.googleapis.com.patch b/build/patches/Disable-references-to-fonts.googleapis.com.patch index 7f38671e5..0383cfec9 100644 --- a/build/patches/Disable-references-to-fonts.googleapis.com.patch +++ b/build/patches/Disable-references-to-fonts.googleapis.com.patch @@ -13,7 +13,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc b/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc --- a/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc +++ b/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc -@@ -301,7 +301,7 @@ bool DomDistillerViewerSource::ShouldServiceRequest( +@@ -291,7 +291,7 @@ bool DomDistillerViewerSource::ShouldServiceRequest( std::string DomDistillerViewerSource::GetContentSecurityPolicy( network::mojom::CSPDirectiveName directive) { if (directive == network::mojom::CSPDirectiveName::StyleSrc) { diff --git a/build/patches/Disable-requests-for-single-word-Omnibar-searches.patch b/build/patches/Disable-requests-for-single-word-Omnibar-searches.patch index c9fa9f783..3ebc23383 100644 --- a/build/patches/Disable-requests-for-single-word-Omnibar-searches.patch +++ b/build/patches/Disable-requests-for-single-word-Omnibar-searches.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/omnibox/chrome_omnibox_navigation_observer.cc b/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc --- a/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc +++ b/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc -@@ -76,6 +76,7 @@ bool OnlyChangeIsFromHTTPToHTTPS(const GURL& origin, const GURL& destination) { +@@ -74,6 +74,7 @@ bool OnlyChangeIsFromHTTPToHTTPS(const GURL& origin, const GURL& destination) { return origin_with_https == destination; } @@ -20,7 +20,7 @@ diff --git a/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc b/c // Choose the appropriate URLLoaderFactory: either an explicitly specified or a // default for the given profile. network::mojom::URLLoaderFactory* GetURLLoaderFactory( -@@ -87,6 +88,7 @@ network::mojom::URLLoaderFactory* GetURLLoaderFactory( +@@ -85,6 +86,7 @@ network::mojom::URLLoaderFactory* GetURLLoaderFactory( ->GetURLLoaderFactoryForBrowserProcess() .get(); } @@ -28,7 +28,7 @@ diff --git a/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc b/c // Helper to keep ChromeOmniboxNavigationObserver alive while the initiated // navigation is pending. -@@ -252,13 +254,6 @@ ChromeOmniboxNavigationObserver::ChromeOmniboxNavigationObserver( +@@ -250,13 +252,6 @@ ChromeOmniboxNavigationObserver::ChromeOmniboxNavigationObserver( profile_(profile), show_infobar_(std::move(show_infobar)) { NavigationUserData::CreateForNavigationHandle(navigation, this); diff --git a/build/patches/Disable-safety-check.patch b/build/patches/Disable-safety-check.patch index 01b67613d..1c2e2ad93 100644 --- a/build/patches/Disable-safety-check.patch +++ b/build/patches/Disable-safety-check.patch @@ -16,7 +16,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 -@@ -397,7 +397,6 @@ if (current_toolchain == default_toolchain) { +@@ -391,7 +391,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", -@@ -1033,8 +1032,6 @@ if (current_toolchain == default_toolchain) { +@@ -1028,8 +1027,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", -@@ -1638,8 +1635,6 @@ if (current_toolchain == default_toolchain) { +@@ -1639,8 +1636,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 -@@ -1000,7 +1000,6 @@ chrome_java_sources = [ +@@ -1008,7 +1008,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", @@ -56,7 +56,7 @@ diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml --- a/chrome/android/java/res/xml/main_preferences.xml +++ b/chrome/android/java/res/xml/main_preferences.xml -@@ -61,11 +61,6 @@ +@@ -67,11 +67,6 @@ found in the LICENSE file. android:key="privacy" android:order="11" android:title="@string/prefs_privacy_security"/> @@ -66,12 +66,12 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j - android:order="12" - android:title="@string/prefs_safety_check"/> & trials) { DCHECK(!HasCommitted()); @@ -74,7 +74,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 -@@ -477,10 +477,6 @@ void FillNavigationParamsRequest( +@@ -482,10 +482,6 @@ void FillNavigationParamsRequest( common_params.initiator_origin.value(); } @@ -85,7 +85,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; -@@ -508,12 +504,6 @@ void FillNavigationParamsRequest( +@@ -513,12 +509,6 @@ void FillNavigationParamsRequest( navigation_params->had_transient_user_activation = common_params.has_user_gesture; @@ -98,7 +98,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) { -@@ -575,11 +565,6 @@ blink::mojom::CommonNavigationParamsPtr MakeCommonNavigationParams( +@@ -580,11 +570,6 @@ blink::mojom::CommonNavigationParamsPtr MakeCommonNavigationParams( info->url_request.GetURLRequestExtraData().get()); DCHECK(url_request_extra_data); @@ -110,7 +110,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(), -@@ -602,7 +587,7 @@ blink::mojom::CommonNavigationParamsPtr MakeCommonNavigationParams( +@@ -607,7 +592,7 @@ blink::mojom::CommonNavigationParamsPtr MakeCommonNavigationParams( info->url_request.HasUserGesture(), info->url_request.HasTextFragmentToken(), info->should_check_main_world_content_security_policy, @@ -162,21 +162,21 @@ diff --git a/third_party/blink/common/origin_trials/trial_token_validator.cc b/t diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc --- a/third_party/blink/renderer/core/loader/document_loader.cc +++ b/third_party/blink/renderer/core/loader/document_loader.cc -@@ -174,13 +174,6 @@ namespace { - Vector CopyInitiatorOriginTrials( +@@ -180,13 +180,6 @@ namespace { + Vector CopyInitiatorOriginTrials( const WebVector& initiator_origin_trial_features) { - Vector result; + Vector result; - for (auto feature : initiator_origin_trial_features) { - // Convert from int to OriginTrialFeature. These values are passed between - // blink navigations. OriginTrialFeature isn't visible outside of blink (and - // doesn't need to be) so the values are transferred outside of blink as - // ints and casted to OriginTrialFeature once being processed in blink. -- result.push_back(static_cast(feature)); +- result.push_back(static_cast(feature)); - } return result; } -@@ -193,18 +186,12 @@ WebVector CopyInitiatorOriginTrials( +@@ -200,18 +193,12 @@ WebVector CopyInitiatorOriginTrials( Vector CopyForceEnabledOriginTrials( const WebVector& force_enabled_origin_trials) { Vector result; @@ -195,8 +195,8 @@ diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_p return result; } -@@ -2859,10 +2846,6 @@ void DocumentLoader::CreateParserPostCommit() { - OriginTrialFeature::kTouchEventFeatureDetection); +@@ -2922,10 +2909,6 @@ void DocumentLoader::CreateParserPostCommit() { + mojom::blink::OriginTrialFeature::kTouchEventFeatureDetection); } - // Enable any origin trials that have been force enabled for this commit. @@ -221,7 +221,7 @@ diff --git a/third_party/blink/renderer/core/loader/http_equiv.cc b/third_party/ diff --git a/third_party/blink/renderer/core/origin_trials/origin_trial_context.cc b/third_party/blink/renderer/core/origin_trials/origin_trial_context.cc --- a/third_party/blink/renderer/core/origin_trials/origin_trial_context.cc +++ b/third_party/blink/renderer/core/origin_trials/origin_trial_context.cc -@@ -316,6 +316,9 @@ void OriginTrialContext::AddToken(const String& token) { +@@ -317,6 +317,9 @@ void OriginTrialContext::AddToken(const String& token) { void OriginTrialContext::AddTokenFromExternalScript( const String& token, const Vector>& external_origins) { @@ -231,16 +231,16 @@ diff --git a/third_party/blink/renderer/core/origin_trials/origin_trial_context. Vector script_origins; for (const scoped_refptr& origin : external_origins) { OriginInfo origin_info = {.origin = origin, -@@ -451,8 +454,6 @@ bool OriginTrialContext::InstallSettingFeature( +@@ -452,8 +455,6 @@ bool OriginTrialContext::InstallSettingFeature( } - void OriginTrialContext::AddFeature(OriginTrialFeature feature) { + void OriginTrialContext::AddFeature(mojom::blink::OriginTrialFeature feature) { - enabled_features_.insert(feature); - InitializePendingFeatures(); } - bool OriginTrialContext::IsFeatureEnabled(OriginTrialFeature feature) const { -@@ -494,6 +495,7 @@ void OriginTrialContext::AddForceEnabledTrials( + bool OriginTrialContext::IsFeatureEnabled( +@@ -497,6 +498,7 @@ void OriginTrialContext::AddForceEnabledTrials( } bool OriginTrialContext::CanEnableTrialFromName(const StringView& trial_name) { diff --git a/build/patches/Disable-update-scheduler.patch b/build/patches/Disable-update-scheduler.patch index 7481d4c21..2978b059f 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 -@@ -65,7 +65,7 @@ public class ChromeBackgroundTaskFactory implements BackgroundTaskFactory { +@@ -66,7 +66,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 73725cf34..69b832f34 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 -@@ -57,7 +57,7 @@ public abstract class FirstRunActivityBase +@@ -60,7 +60,7 @@ public abstract class FirstRunActivityBase 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 -@@ -1043,7 +1043,7 @@ void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { +@@ -1047,7 +1047,7 @@ void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { #endif // BUILDFLAG(IS_CHROMEOS_ASH) registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled, @@ -103,7 +103,7 @@ 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 -@@ -80,7 +80,6 @@ +@@ -81,7 +81,6 @@ #include "chrome/browser/hid/chrome_hid_delegate.h" #include "chrome/browser/interstitials/enterprise_util.h" #include "chrome/browser/lifetime/browser_shutdown.h" @@ -111,7 +111,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch #include "chrome/browser/media/audio_service_util.h" #include "chrome/browser/media/router/media_router_feature.h" #include "chrome/browser/media/webrtc/audio_debug_recordings_handler.h" -@@ -5029,16 +5028,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( +@@ -5062,16 +5061,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), -@@ -5139,10 +5128,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( +@@ -5172,10 +5161,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( throttle_manager->MaybeAppendNavigationThrottles(handle, &throttles); } @@ -142,7 +142,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch diff --git a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc --- a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc +++ b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc -@@ -92,6 +92,10 @@ BASE_FEATURE(kPostFREFixMetricsReportingFeature, +@@ -90,6 +90,10 @@ BASE_FEATURE(kPostFREFixMetricsReportingFeature, // Name of the variations param that defines the sampling rate. const char kRateParamName[] = "sampling_rate_per_mille"; diff --git a/build/patches/Do-not-build-API-keys-infobar.patch b/build/patches/Do-not-build-API-keys-infobar.patch index f69c7befb..786b9defe 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 -@@ -1388,8 +1388,6 @@ static_library("ui") { +@@ -1410,8 +1410,6 @@ static_library("ui") { "singleton_tabs.h", "startup/automation_infobar_delegate.cc", "startup/automation_infobar_delegate.h", @@ -23,7 +23,7 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn diff --git a/chrome/browser/ui/startup/infobar_utils.cc b/chrome/browser/ui/startup/infobar_utils.cc --- a/chrome/browser/ui/startup/infobar_utils.cc +++ b/chrome/browser/ui/startup/infobar_utils.cc -@@ -139,9 +139,6 @@ void AddInfoBarsIfNecessary(Browser* browser, +@@ -146,9 +146,6 @@ void AddInfoBarsIfNecessary(Browser* browser, infobars::ContentInfoBarManager* infobar_manager = infobars::ContentInfoBarManager::FromWebContents(web_contents); diff --git a/build/patches/Do-not-compile-QR-code-sharing.patch b/build/patches/Do-not-compile-QR-code-sharing.patch index 76b4611c1..5c3f8c4be 100644 --- a/build/patches/Do-not-compile-QR-code-sharing.patch +++ b/build/patches/Do-not-compile-QR-code-sharing.patch @@ -14,7 +14,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 -@@ -3416,7 +3416,6 @@ generate_jni("chrome_jni_headers") { +@@ -3456,7 +3456,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", @@ -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; -@@ -288,9 +287,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase { +@@ -287,9 +286,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase { } private void maybeAddQrCodeFirstPartyOption() { @@ -77,7 +77,7 @@ diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/s } private void maybeAddScreenshotFirstPartyOption() { -@@ -442,21 +438,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase { +@@ -441,21 +437,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase { .build(); } diff --git a/build/patches/Do-not-link-with-libatomic.patch b/build/patches/Do-not-link-with-libatomic.patch index 9caa2f3a3..a753716d5 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 -@@ -1103,7 +1103,7 @@ component("base") { +@@ -1107,7 +1107,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 7281c4a76..94a611172 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 -@@ -3149,6 +3149,7 @@ void HostResolverManager::SetDnsConfigOverrides(DnsConfigOverrides overrides) { +@@ -3143,6 +3143,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 a73682255..85f82655e 100644 --- a/build/patches/Enable-Certificate-Transparency.patch +++ b/build/patches/Enable-Certificate-Transparency.patch @@ -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 -@@ -58,6 +58,7 @@ BASE_DECLARE_FEATURE(kTabCaptureBlueBorderCrOS); +@@ -54,6 +54,7 @@ BASE_DECLARE_FEATURE(kTabCaptureBlueBorderCrOS); BASE_DECLARE_FEATURE(kWebUsbDeviceDetection); @@ -37,7 +37,7 @@ 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 -@@ -957,7 +957,6 @@ void SystemNetworkContextManager::SetEnableCertificateTransparencyForTesting( +@@ -981,7 +981,6 @@ void SystemNetworkContextManager::SetEnableCertificateTransparencyForTesting( bool SystemNetworkContextManager::IsCertificateTransparencyEnabled() { if (certificate_transparency_enabled_for_testing_.has_value()) return certificate_transparency_enabled_for_testing_.value(); @@ -45,7 +45,7 @@ diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/brows // 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: -@@ -965,10 +964,7 @@ bool SystemNetworkContextManager::IsCertificateTransparencyEnabled() { +@@ -989,10 +988,7 @@ bool SystemNetworkContextManager::IsCertificateTransparencyEnabled() { // - on an opt-in basis for other builds and embedders, controlled with the // kCertificateTransparencyAskBeforeEnabling flag return base::FeatureList::IsEnabled( @@ -142,7 +142,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 -@@ -2796,7 +2796,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2821,7 +2821,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-StrictOriginIsolation-and-SitePerProcess.patch b/build/patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch index ba808a21e..834e365bd 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 -@@ -1587,7 +1587,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs( +@@ -1580,7 +1580,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( -@@ -1612,7 +1612,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs( +@@ -1605,7 +1605,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 eb9a44c84..1f23075be 100644 --- a/build/patches/Enable-darken-websites-checkbox-in-themes.patch +++ b/build/patches/Enable-darken-websites-checkbox-in-themes.patch @@ -14,15 +14,15 @@ 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 -@@ -1588,9 +1588,9 @@ +@@ -1508,9 +1508,9 @@ "expiry_milestone": 125 }, { - "name": "darken-websites-checkbox-in-themes-setting", -- "owners": [ "nemco@google.com", "wenyufu@google.com", "twellington" ], +- "owners": [ "nemco@google.com", "wenyufu@google.com", "twellington@chromium.org" ], - "expiry_milestone": 125 + "name": "darken-websites-checkbox-in-themes-setting", // this is always enabled in Bromite -+ "owners": [ "nemco@google.com", "wenyufu@google.com", "twellington" ], // - ++ "owners": [ "nemco@google.com", "wenyufu@google.com", "twellington@chromium.org" ], // - + "expiry_milestone": -1 }, { diff --git a/build/patches/Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch b/build/patches/Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch index 6d69e45f1..0c718bd5c 100644 --- a/build/patches/Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch +++ b/build/patches/Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch @@ -45,7 +45,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn -@@ -389,6 +389,10 @@ config("compiler") { +@@ -395,6 +395,10 @@ config("compiler") { } } diff --git a/build/patches/Enable-native-Android-autofill.patch b/build/patches/Enable-native-Android-autofill.patch index ac5d5ae37..6738cc51c 100644 --- a/build/patches/Enable-native-Android-autofill.patch +++ b/build/patches/Enable-native-Android-autofill.patch @@ -54,7 +54,7 @@ diff --git a/android_webview/browser/aw_contents.cc b/android_webview/browser/aw diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -424,6 +424,7 @@ if (current_toolchain == default_toolchain) { +@@ -418,6 +418,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", @@ -215,9 +215,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav + AutofillProvider mAutofillProvider; + /** - * Creates an instance of a {@link TabImpl}. - * -@@ -817,6 +830,11 @@ public class TabImpl implements Tab { + * 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 { for (TabObserver observer : mObservers) observer.onDestroyed(this); mObservers.clear(); @@ -229,7 +229,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav mUserDataHost.destroy(); mTabViewManager.destroy(); hideNativePage(false, null); -@@ -1395,6 +1413,16 @@ public class TabImpl implements Tab { +@@ -1393,6 +1411,16 @@ public class TabImpl implements Tab { return mWebContentsState == null ? -1 : mWebContentsState.version(); } @@ -246,8 +246,8 @@ 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. -@@ -1444,6 +1472,28 @@ public class TabImpl implements Tab { - mDelegateFactory.createContextMenuPopulatorFactory(this), this)); +@@ -1448,6 +1476,28 @@ public class TabImpl implements Tab { + this)); mWebContents.notifyRendererPreferenceUpdate(); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { @@ -275,7 +275,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav TabHelpers.initWebContentsHelpers(this); notifyContentChanged(); } finally { -@@ -1873,6 +1923,7 @@ public class TabImpl implements Tab { +@@ -1875,6 +1925,7 @@ public class TabImpl implements Tab { void setActiveNavigationEntryTitleForUrl(long nativeTabAndroid, String url, String title); void loadOriginalImage(long nativeTabAndroid); boolean handleNonNavigationAboutURL(GURL url); @@ -317,7 +317,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 -@@ -2677,6 +2677,13 @@ static_library("browser") { +@@ -2688,6 +2688,13 @@ static_library("browser") { deps += [ "//chrome/browser/error_reporting" ] } @@ -334,7 +334,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc --- a/chrome/browser/android/tab_android.cc +++ b/chrome/browser/android/tab_android.cc -@@ -52,6 +52,13 @@ +@@ -53,6 +53,13 @@ #include "url/android/gurl_android.h" #include "url/gurl.h" @@ -375,7 +375,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 -@@ -642,6 +642,12 @@ CHAR_LIMIT guidelines: +@@ -654,6 +654,12 @@ CHAR_LIMIT guidelines: Save passwords @@ -391,7 +391,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 -@@ -1320,7 +1320,13 @@ ChromeAutofillClient::ChromeAutofillClient(content::WebContents* web_contents) +@@ -1346,7 +1346,13 @@ ChromeAutofillClient::ChromeAutofillClient(content::WebContents* web_contents) web_contents, base::BindRepeating(&BrowserDriverInitHook, this, @@ -421,7 +421,7 @@ 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 -@@ -95,12 +95,12 @@ class AndroidAutofillManager : public AutofillManager, +@@ -83,12 +83,12 @@ class AndroidAutofillManager : public AutofillManager, const FieldTypeGroup field_type_group, const url::Origin& triggered_origin); @@ -439,7 +439,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 -@@ -412,6 +412,10 @@ void ContentAutofillDriver::FormsSeen( +@@ -489,6 +489,10 @@ void ContentAutofillDriver::FormsSeen( const std::vector& removed_forms) { target->GetAutofillManager().OnFormsSeen( WithNewVersion(updated_forms), removed_forms); @@ -450,7 +450,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -439,6 +443,10 @@ void ContentAutofillDriver::FormSubmitted( +@@ -516,6 +520,10 @@ void ContentAutofillDriver::FormSubmitted( } target->GetAutofillManager().OnFormSubmitted( WithNewVersion(form), known_success, submission_source); @@ -461,7 +461,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -460,6 +468,10 @@ void ContentAutofillDriver::TextFieldDidChange(const FormData& raw_form, +@@ -537,6 +545,10 @@ void ContentAutofillDriver::TextFieldDidChange(const FormData& raw_form, base::TimeTicks timestamp) { target->GetAutofillManager().OnTextFieldDidChange( WithNewVersion(form), field, bounding_box, timestamp); @@ -472,7 +472,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -479,6 +491,10 @@ void ContentAutofillDriver::TextFieldDidScroll(const FormData& raw_form, +@@ -556,6 +568,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 +483,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -499,6 +515,10 @@ void ContentAutofillDriver::SelectControlDidChange( +@@ -576,6 +592,10 @@ void ContentAutofillDriver::SelectControlDidChange( const FormFieldData& field, const gfx::RectF& bounding_box) { target->GetAutofillManager().OnSelectControlDidChange( WithNewVersion(form), field, bounding_box); @@ -494,7 +494,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -521,6 +541,10 @@ void ContentAutofillDriver::AskForValuesToFill( +@@ -598,6 +618,10 @@ void ContentAutofillDriver::AskForValuesToFill( AutofillSuggestionTriggerSource trigger_source) { target->GetAutofillManager().OnAskForValuesToFill( WithNewVersion(form), field, bounding_box, trigger_source); @@ -505,7 +505,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -532,6 +556,8 @@ void ContentAutofillDriver::HidePopup() { +@@ -609,6 +633,8 @@ void ContentAutofillDriver::HidePopup() { DCHECK(!target->IsPrerendering()) << "We should never affect UI while prerendering"; target->GetAutofillManager().OnHidePopup(); @@ -514,7 +514,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -543,6 +569,8 @@ void ContentAutofillDriver::FocusNoLongerOnForm(bool had_interacted_form) { +@@ -620,6 +646,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 +523,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -562,9 +590,16 @@ void ContentAutofillDriver::FocusOnFormField(const FormData& raw_form, +@@ -639,9 +667,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 +540,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -579,6 +614,10 @@ void ContentAutofillDriver::DidFillAutofillFormData(const FormData& raw_form, +@@ -656,6 +691,10 @@ void ContentAutofillDriver::DidFillAutofillFormData(const FormData& raw_form, base::TimeTicks timestamp) { target->GetAutofillManager().OnDidFillAutofillFormData( WithNewVersion(form), timestamp); @@ -551,7 +551,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -588,6 +627,8 @@ void ContentAutofillDriver::DidEndTextFieldEditing() { +@@ -665,6 +704,8 @@ void ContentAutofillDriver::DidEndTextFieldEditing() { } router().DidEndTextFieldEditing(this, [](autofill::AutofillDriver* target) { target->GetAutofillManager().OnDidEndTextFieldEditing(); @@ -560,7 +560,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -602,6 +643,10 @@ void ContentAutofillDriver::SelectOrSelectListFieldOptionsDidChange( +@@ -679,6 +720,10 @@ void ContentAutofillDriver::SelectOrSelectListFieldOptionsDidChange( cast(target) ->GetAutofillManager() .OnSelectOrSelectListFieldOptionsDidChange(WithNewVersion(form)); @@ -571,7 +571,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -621,6 +666,10 @@ void ContentAutofillDriver::JavaScriptChangedAutofilledValue( +@@ -698,6 +743,10 @@ void ContentAutofillDriver::JavaScriptChangedAutofilledValue( const FormFieldData& field, const std::u16string& old_value) { target->GetAutofillManager().OnJavaScriptChangedAutofilledValue( WithNewVersion(form), field, old_value); @@ -582,7 +582,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -633,6 +682,8 @@ void ContentAutofillDriver::OnContextMenuShownInField( +@@ -710,6 +759,8 @@ void ContentAutofillDriver::OnContextMenuShownInField( const FieldGlobalId& field_global_id) { target->GetAutofillManager().OnContextMenuShownInField(form_global_id, field_global_id); @@ -591,7 +591,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co }); } -@@ -643,6 +694,8 @@ void ContentAutofillDriver::Reset() { +@@ -720,6 +771,8 @@ void ContentAutofillDriver::Reset() { owner_->router().UnregisterDriver(this, /*driver_is_dying=*/false); autofill_manager_->Reset(); @@ -603,7 +603,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co diff --git a/components/autofill/content/browser/content_autofill_driver.h b/components/autofill/content/browser/content_autofill_driver.h --- a/components/autofill/content/browser/content_autofill_driver.h +++ b/components/autofill/content/browser/content_autofill_driver.h -@@ -127,9 +127,12 @@ class ContentAutofillDriver : public AutofillDriver, +@@ -128,9 +128,12 @@ class ContentAutofillDriver : public AutofillDriver, ContentAutofillDriver& operator=(const ContentAutofillDriver&) = delete; ~ContentAutofillDriver() override; @@ -617,7 +617,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 { -@@ -319,6 +322,10 @@ class ContentAutofillDriver : public AutofillDriver, +@@ -352,6 +355,10 @@ class ContentAutofillDriver : public AutofillDriver, std::unique_ptr autofill_manager_ = nullptr; @@ -672,7 +672,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 -@@ -838,7 +838,10 @@ void PasswordAutofillAgent::UpdateStateForTextChange( +@@ -834,7 +834,10 @@ void PasswordAutofillAgent::UpdateStateForTextChange( void PasswordAutofillAgent::TrackAutofilledElement( const blink::WebFormControlElement& element) { @@ -698,15 +698,15 @@ diff --git a/components/autofill/core/common/autofill_prefs.cc b/components/auto void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { // Synced prefs. Used for cross-device choices, e.g., credit card Autofill. registry->RegisterBooleanPref( -@@ -169,6 +173,8 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { +@@ -166,6 +170,8 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref( prefs::kAutofillCreditCardFidoAuthOfferCheckboxState, true); #endif + registry->RegisterBooleanPref(prefs::kAutofillAndroidEnabled, true); + registry->RegisterBooleanPref(prefs::kAutofillAndroidIncognitoEnabled, false); - registry->RegisterIntegerPref( - prefs::kAutofillLastVersionDisusedCreditCardsDeleted, 0); registry->RegisterIntegerPref(prefs::kAutocompleteLastVersionRetentionPolicy, + 0); + registry->RegisterStringPref(prefs::kAutofillUploadEncodingSeed, ""); diff --git a/components/autofill/core/common/autofill_prefs.h b/components/autofill/core/common/autofill_prefs.h --- a/components/autofill/core/common/autofill_prefs.h +++ b/components/autofill/core/common/autofill_prefs.h @@ -722,7 +722,7 @@ diff --git a/components/autofill/core/common/autofill_prefs.h b/components/autof diff --git a/components/embedder_support/android/java/src/org/chromium/components/embedder_support/view/ContentView.java b/components/embedder_support/android/java/src/org/chromium/components/embedder_support/view/ContentView.java --- a/components/embedder_support/android/java/src/org/chromium/components/embedder_support/view/ContentView.java +++ b/components/embedder_support/android/java/src/org/chromium/components/embedder_support/view/ContentView.java -@@ -41,6 +41,11 @@ import org.chromium.ui.dragdrop.DragEventDispatchHelper.DragEventDispatchDestina +@@ -42,6 +42,11 @@ import org.chromium.ui.dragdrop.DragEventDispatchHelper.DragEventDispatchDestina import java.util.function.Supplier; @@ -734,7 +734,7 @@ 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. -@@ -92,6 +97,8 @@ public class ContentView extends FrameLayout +@@ -93,6 +98,8 @@ public class ContentView extends FrameLayout */ public static ContentView createContentView(Context context, @Nullable EventOffsetHandler eventOffsetHandler, @Nullable WebContents webContents) { @@ -743,7 +743,7 @@ diff --git a/components/embedder_support/android/java/src/org/chromium/component return new ContentView(context, eventOffsetHandler, webContents); } -@@ -638,4 +645,43 @@ public class ContentView extends FrameLayout +@@ -640,4 +647,43 @@ public class ContentView extends FrameLayout mDragDropEventOffsetHandler.onPostDispatchDragEvent(event.getAction()); return ret; } @@ -790,7 +790,7 @@ diff --git a/components/embedder_support/android/java/src/org/chromium/component diff --git a/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java b/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java --- a/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java +++ b/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java -@@ -31,6 +31,10 @@ import org.chromium.ui.dragdrop.DragStateTracker; +@@ -32,6 +32,10 @@ import org.chromium.ui.dragdrop.DragStateTracker; import org.chromium.ui.dragdrop.DropDataAndroid; import org.chromium.ui.mojom.CursorType; @@ -801,7 +801,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java b /** * Class to acquire, position, and remove anchor views from the implementing View. */ -@@ -578,4 +582,8 @@ public class ViewAndroidDelegate { +@@ -579,4 +583,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 a33fa8890..ec8bb2af7 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 -@@ -598,6 +598,7 @@ chrome_java_resources = [ +@@ -605,6 +605,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 -@@ -1037,6 +1037,7 @@ chrome_java_sources = [ +@@ -1045,6 +1045,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,7 +189,7 @@ 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 -@@ -196,6 +196,9 @@ public class IntentHandler { +@@ -197,6 +197,9 @@ public class IntentHandler { private static final String EXTRA_TAB_LAUNCH_TYPE = "org.chromium.chrome.browser.tab_launch_type"; @@ -199,7 +199,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.j /** * A hash code for the URL to verify intent data hasn't been modified. */ -@@ -1264,6 +1267,17 @@ public class IntentHandler { +@@ -1265,6 +1268,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. -@@ -1395,7 +1409,7 @@ public class IntentHandler { +@@ -1396,7 +1410,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 -@@ -429,8 +429,8 @@ public class LaunchIntentDispatcher { +@@ -430,8 +430,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 -@@ -86,6 +86,7 @@ import org.chromium.chrome.browser.tab.state.ShoppingPersistedTabData; +@@ -87,6 +87,7 @@ import org.chromium.chrome.browser.tab.state.ShoppingPersistedTabData; 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,7 +250,7 @@ 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; -@@ -439,6 +440,8 @@ public class ProcessInitializationHandler { +@@ -440,6 +441,8 @@ public class ProcessInitializationHandler { .resolveClearDataDialogResultRecorder()::makeDeferredRecordings); deferredStartupHandler.addDeferredTask(WebApkUninstallUmaTracker::recordDeferredUma); @@ -386,7 +386,7 @@ 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 -@@ -294,6 +294,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -292,6 +292,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kReengagementNotification, &kSearchReadyOmniboxFeature, &kRelatedSearches, @@ -397,7 +397,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 -@@ -395,6 +395,7 @@ public abstract class ChromeFeatureList { +@@ -398,6 +398,7 @@ public abstract class ChromeFeatureList { public static final String REACHED_CODE_PROFILER = "ReachedCodeProfiler"; public static final String READALOUD = "ReadAloud"; public static final String READER_MODE_IN_CCT = "ReaderModeInCCT"; @@ -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 -@@ -5312,6 +5312,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 fb6e984d7..7ae3f22a8 100644 --- a/build/patches/Experimental-user-scripts-support.patch +++ b/build/patches/Experimental-user-scripts-support.patch @@ -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 -@@ -179,7 +179,11 @@ if (current_toolchain == default_toolchain) { +@@ -176,7 +176,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", -@@ -583,6 +587,7 @@ if (current_toolchain == default_toolchain) { +@@ -576,6 +580,7 @@ if (current_toolchain == default_toolchain) { "//components/ukm/android:java", "//components/url_formatter/android:url_formatter_java", "//components/user_prefs/android:java", @@ -249,7 +249,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml --- a/chrome/android/java/res/xml/main_preferences.xml +++ b/chrome/android/java/res/xml/main_preferences.xml -@@ -115,6 +115,11 @@ +@@ -116,6 +116,11 @@ found in the LICENSE file. android:key="useragent_settings" android:order="20" android:title="@string/prefs_useragent_settings"/> @@ -272,7 +272,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/Downlo import java.io.File; -@@ -456,6 +457,11 @@ public class DownloadUtils { +@@ -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) { @@ -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 -@@ -124,6 +124,8 @@ import java.util.ArrayList; +@@ -125,6 +125,8 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -296,7 +296,7 @@ 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 -@@ -331,6 +333,7 @@ public class ProcessInitializationHandler { +@@ -332,6 +334,7 @@ public class ProcessInitializationHandler { DefaultBrowserInfo.initBrowserFetcher(); @@ -324,7 +324,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 -@@ -3684,6 +3684,13 @@ static_library("browser") { +@@ -3685,6 +3685,13 @@ static_library("browser") { ] deps += [ "//chrome/android/modules/dev_ui/provider:native" ] } @@ -341,9 +341,9 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -165,6 +165,7 @@ +@@ -169,6 +169,7 @@ + #include "components/trusted_vault/features.h" #include "components/ui_devtools/switches.h" - #include "components/variations/service/google_groups_updater_service.h" #include "components/variations/variations_switches.h" +#include "components/user_scripts/common/user_scripts_features.h" #include "components/version_info/version_info.h" @@ -360,7 +360,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" -@@ -1716,6 +1717,9 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -1724,6 +1725,9 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, translate::TranslatePrefs::RegisterProfilePrefs(registry); omnibox::RegisterProfilePrefs(registry); ZeroSuggestProvider::RegisterProfilePrefs(registry); @@ -373,7 +373,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 -@@ -60,6 +60,9 @@ source_set("profile") { +@@ -68,6 +68,9 @@ source_set("profile") { "//content/public/browser", "//extensions/buildflags", ] @@ -386,7 +386,7 @@ 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 -@@ -494,6 +494,10 @@ +@@ -485,6 +485,10 @@ #include "chrome/browser/offline_pages/request_coordinator_factory.h" #endif @@ -397,7 +397,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc namespace chrome { void AddProfilesExtraParts(ChromeBrowserMainParts* main_parts) { -@@ -1206,6 +1210,9 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1205,6 +1209,9 @@ void ChromeBrowserMainExtraPartsProfiles:: #endif WebDataServiceFactory::GetInstance(); webrtc_event_logging::WebRtcEventLogManagerKeyedServiceFactory::GetInstance(); @@ -421,7 +421,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" -@@ -1534,6 +1538,15 @@ void ProfileManager::DoFinalInitForServices(Profile* profile, +@@ -1533,6 +1537,15 @@ void ProfileManager::DoFinalInitForServices(Profile* profile, #endif #endif @@ -501,7 +501,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 -@@ -107,6 +107,7 @@ +@@ -102,6 +102,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 +509,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" -@@ -535,6 +536,10 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, +@@ -533,6 +534,10 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, return &NewWebUI; if (url.host_piece() == chrome::kChromeUIVersionHost) return &NewWebUI; @@ -523,7 +523,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 -@@ -121,6 +121,7 @@ template("chrome_extra_paks") { +@@ -122,6 +122,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 +531,7 @@ diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni "$root_gen_dir/ui/resources/webui_resources.pak", ] deps = [ -@@ -138,6 +139,7 @@ template("chrome_extra_paks") { +@@ -139,6 +140,7 @@ template("chrome_extra_paks") { "//third_party/blink/public:devtools_inspector_resources", "//third_party/blink/public:resources", "//ui/resources", @@ -612,7 +612,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer #if BUILDFLAG(ENABLE_PPAPI) new PepperHelper(render_frame); #endif -@@ -1607,6 +1629,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentStart( +@@ -1615,6 +1637,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentStart( render_frame); // |render_frame| might be dead by now. #endif @@ -630,7 +630,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer } void ChromeContentRendererClient::RunScriptsAtDocumentEnd( -@@ -1616,6 +1649,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentEnd( +@@ -1624,6 +1657,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentEnd( render_frame); // |render_frame| might be dead by now. #endif @@ -648,7 +648,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer } void ChromeContentRendererClient::RunScriptsAtDocumentIdle( -@@ -1625,6 +1669,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentIdle( +@@ -1633,6 +1677,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentIdle( render_frame); // |render_frame| might be dead by now. #endif @@ -691,7 +691,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 -@@ -336,6 +336,7 @@ +@@ -337,6 +337,7 @@ @@ -10470,9 +10470,9 @@ 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 -@@ -955,6 +955,12 @@ +@@ -966,6 +966,12 @@ "components/autofill/core/browser/autofill_address_rewriter_resources.grd":{ - "includes": [6220] + "includes": [7220] }, + "components/user_scripts/renderer/resources/user_scripts_renderer_resources.grd": { + "includes": [7000], diff --git a/build/patches/Follow-only-system-dark-mode.patch b/build/patches/Follow-only-system-dark-mode.patch index bf4bb1ecb..62fd4eab1 100644 --- a/build/patches/Follow-only-system-dark-mode.patch +++ b/build/patches/Follow-only-system-dark-mode.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/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 -@@ -136,7 +136,7 @@ class GlobalNightModeStateController implements NightModeStateProvider, +@@ -137,7 +137,7 @@ class GlobalNightModeStateController implements NightModeStateProvider, } private void updateNightMode() { diff --git a/build/patches/Guard-for-user-agent-reduction.patch b/build/patches/Guard-for-user-agent-reduction.patch index df633a2c4..72ccfdfce 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 -@@ -1650,7 +1650,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs( +@@ -1644,7 +1644,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 -@@ -3099,23 +3099,23 @@ +@@ -3179,23 +3179,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. diff --git a/build/patches/History-number-of-days-privacy-setting.patch b/build/patches/History-number-of-days-privacy-setting.patch index c73fb7dc5..9afd93eba 100644 --- a/build/patches/History-number-of-days-privacy-setting.patch +++ b/build/patches/History-number-of-days-privacy-setting.patch @@ -32,10 +32,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml --- a/chrome/android/java/res/xml/privacy_preferences.xml +++ b/chrome/android/java/res/xml/privacy_preferences.xml -@@ -43,6 +43,12 @@ found in the LICENSE file. - android:title="@string/settings_incognito_tab_lock_title" - android:summary="@string/settings_incognito_tab_lock_summary_android_setting_off" - android:persistent="false"/> +@@ -108,6 +108,12 @@ found in the LICENSE file. + android:title="@string/cablev2_paask_title" + android:summary="@string/cablev2_paask_body" + android:fragment="org.chromium.chrome.browser.webauthn.PrivacySettingsFragment" /> + Profile::CreateProfile(const base::FilePath& path, +@@ -370,6 +370,7 @@ std::unique_ptr Profile::CreateProfile(const base::FilePath& path, void ProfileImpl::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref(prefs::kSavingBrowserHistoryDisabled, false); @@ -172,7 +172,7 @@ diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/p 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 -@@ -1416,6 +1416,18 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1307,6 +1307,18 @@ Your Google account may have other forms of browsing history like searches and a Browsing history diff --git a/build/patches/Ignore-enterprise-policies-for-secure-DNS.patch b/build/patches/Ignore-enterprise-policies-for-secure-DNS.patch index 9790d7d7e..680efc5ce 100644 --- a/build/patches/Ignore-enterprise-policies-for-secure-DNS.patch +++ b/build/patches/Ignore-enterprise-policies-for-secure-DNS.patch @@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/enterprise/util/android/java/src/org/chromium/chrome/browser/enterprise/util/EnterpriseInfo.java b/chrome/browser/enterprise/util/android/java/src/org/chromium/chrome/browser/enterprise/util/EnterpriseInfo.java --- a/chrome/browser/enterprise/util/android/java/src/org/chromium/chrome/browser/enterprise/util/EnterpriseInfo.java +++ b/chrome/browser/enterprise/util/android/java/src/org/chromium/chrome/browser/enterprise/util/EnterpriseInfo.java -@@ -87,13 +87,7 @@ public abstract class EnterpriseInfo { +@@ -88,13 +88,7 @@ public abstract class EnterpriseInfo { public static void getManagedStateForNative() { Callback callback = (result) -> { Log.i(TAG, "#getManagedStateForNative() " + result); diff --git a/build/patches/Inject-scripts-for-AMP-tracking-ads-and-video.patch b/build/patches/Inject-scripts-for-AMP-tracking-ads-and-video.patch index 8ac404884..a18fa5587 100644 --- a/build/patches/Inject-scripts-for-AMP-tracking-ads-and-video.patch +++ b/build/patches/Inject-scripts-for-AMP-tracking-ads-and-video.patch @@ -23,7 +23,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/third_party/blink/renderer/core/dom/build.gni b/third_party/blink/renderer/core/dom/build.gni --- a/third_party/blink/renderer/core/dom/build.gni +++ b/third_party/blink/renderer/core/dom/build.gni -@@ -167,6 +167,8 @@ blink_core_sources_dom = [ +@@ -158,6 +158,8 @@ blink_core_sources_dom = [ "has_invalidation_flags.h", "icon_url.cc", "icon_url.h", @@ -35,15 +35,15 @@ diff --git a/third_party/blink/renderer/core/dom/build.gni b/third_party/blink/r 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 -@@ -295,6 +295,7 @@ +@@ -293,6 +293,7 @@ + #include "third_party/blink/renderer/core/page/scrolling/fragment_anchor.h" #include "third_party/blink/renderer/core/page/scrolling/root_scroller_controller.h" - #include "third_party/blink/renderer/core/page/scrolling/scroll_state_callback.h" #include "third_party/blink/renderer/core/page/scrolling/scrolling_coordinator.h" +#include "extensions/video_bg_play.h" #include "third_party/blink/renderer/core/page/scrolling/snap_coordinator.h" #include "third_party/blink/renderer/core/page/scrolling/top_document_root_scroller_controller.h" #include "third_party/blink/renderer/core/page/spatial_navigation_controller.h" -@@ -372,6 +373,8 @@ +@@ -370,6 +371,8 @@ #include "third_party/blink/renderer/platform/wtf/text/string_buffer.h" #include "third_party/blink/renderer/platform/wtf/text/text_encoding_registry.h" @@ -52,7 +52,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink #ifndef NDEBUG using WeakDocumentSet = blink::HeapHashSet>; static WeakDocumentSet& LiveDocumentSet(); -@@ -7440,6 +7443,64 @@ void Document::OnPrepareToStopParsing() { +@@ -7425,6 +7428,64 @@ void Document::OnPrepareToStopParsing() { MilestoneForDelayedAsyncScript::kFinishedParsing); } @@ -117,7 +117,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink void Document::FinishedParsing() { DCHECK(!GetScriptableDocumentParser() || !parser_->IsParsing()); DCHECK(!GetScriptableDocumentParser() || ready_state_ != kLoading); -@@ -7506,6 +7567,9 @@ void Document::FinishedParsing() { +@@ -7491,6 +7552,9 @@ void Document::FinishedParsing() { } frame->Loader().FinishedParsing(); @@ -130,7 +130,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink diff --git a/third_party/blink/renderer/core/dom/document.h b/third_party/blink/renderer/core/dom/document.h --- a/third_party/blink/renderer/core/dom/document.h +++ b/third_party/blink/renderer/core/dom/document.h -@@ -2076,6 +2076,9 @@ class CORE_EXPORT Document : public ContainerNode, +@@ -2062,6 +2062,9 @@ class CORE_EXPORT Document : public ContainerNode, void AXContextModeChanged(); void ClearAXObjectCache(); diff --git a/build/patches/JIT-site-settings.patch b/build/patches/JIT-site-settings.patch index 461c48c97..e3ad432c8 100644 --- a/build/patches/JIT-site-settings.patch +++ b/build/patches/JIT-site-settings.patch @@ -273,7 +273,7 @@ new file mode 100644 diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc --- a/components/content_settings/core/browser/content_settings_registry.cc +++ b/components/content_settings/core/browser/content_settings_registry.cc -@@ -538,7 +538,7 @@ void ContentSettingsRegistry::Init() { +@@ -548,7 +548,7 @@ void ContentSettingsRegistry::Init() { ContentSettingsInfo::EXCEPTIONS_ON_SECURE_ORIGINS_ONLY); Register(ContentSettingsType::JAVASCRIPT_JIT, "javascript-jit", diff --git a/build/patches/Keep-flag-to-allow-screenshots-in-Incognito-mode.patch b/build/patches/Keep-flag-to-allow-screenshots-in-Incognito-mode.patch index 765ebc4b3..5039a7b5f 100644 --- a/build/patches/Keep-flag-to-allow-screenshots-in-Incognito-mode.patch +++ b/build/patches/Keep-flag-to-allow-screenshots-in-Incognito-mode.patch @@ -15,15 +15,15 @@ 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 -@@ -5038,9 +5038,9 @@ +@@ -4694,9 +4694,9 @@ "expiry_milestone": 120 }, { - "name": "incognito-screenshot", -- "owners": [ "roagarwal", "sideyilmaz", "chrome-incognito@google.com" ], +- "owners": [ "roagarwal@chromium.org", "sideyilmaz@chromium.org", "chrome-incognito@google.com" ], - "expiry_milestone": 120 + "name": "incognito-screenshot", // Bromite: guard this feature flag -+ "owners": [ "roagarwal", "sideyilmaz", "chrome-incognito@google.com" ], // - ++ "owners": [ "roagarwal@chromium.org", "sideyilmaz@chromium.org", "chrome-incognito@google.com" ], // - + "expiry_milestone": -1 // - }, { diff --git a/build/patches/Logcat-crash-reports-UI.patch b/build/patches/Logcat-crash-reports-UI.patch index b8824e3ae..c836511c7 100644 --- a/build/patches/Logcat-crash-reports-UI.patch +++ b/build/patches/Logcat-crash-reports-UI.patch @@ -28,7 +28,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/crash/MinidumpUploadServiceImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpUploadServiceImpl.java --- a/chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpUploadServiceImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpUploadServiceImpl.java -@@ -44,6 +44,11 @@ import java.lang.annotation.Retention; +@@ -46,6 +46,11 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.concurrent.atomic.AtomicBoolean; @@ -40,7 +40,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpU /** * Service that is responsible for uploading crash minidumps to the Google crash server. */ -@@ -92,6 +97,23 @@ public class MinidumpUploadServiceImpl extends MinidumpUploadService.Impl { +@@ -94,6 +99,23 @@ public class MinidumpUploadServiceImpl extends MinidumpUploadService.Impl { getService().setIntentRedelivery(true); } @@ -160,7 +160,7 @@ diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/ 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 -@@ -665,6 +665,7 @@ static_library("ui") { +@@ -662,6 +662,7 @@ static_library("ui") { "//third_party/re2", "//third_party/webrtc_overrides:webrtc_component", "//third_party/zlib", @@ -581,7 +581,7 @@ diff --git a/components/crash/core/browser/resources/crashes.ts b/components/cra --- a/components/crash/core/browser/resources/crashes.ts +++ b/components/crash/core/browser/resources/crashes.ts @@ -12,7 +12,7 @@ import './strings.m.js'; - import {assert} from 'chrome://resources/js/assert_ts.js'; + import {assert} from 'chrome://resources/js/assert.js'; import {addWebUiListener} from 'chrome://resources/js/cr.js'; import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; -import {appendParam, getRequiredElement} from 'chrome://resources/js/util_ts.js'; @@ -891,7 +891,7 @@ diff --git a/components/minidump_uploader/android/java/src/org/chromium/componen diff --git a/components/upload_list/text_log_upload_list.cc b/components/upload_list/text_log_upload_list.cc --- a/components/upload_list/text_log_upload_list.cc +++ b/components/upload_list/text_log_upload_list.cc -@@ -165,6 +165,7 @@ std::unique_ptr TextLogUploadList::TryParseCsvLogEntry( +@@ -168,6 +168,7 @@ std::unique_ptr TextLogUploadList::TryParseCsvLogEntry( } auto info = std::make_unique(components[1], upload_time); diff --git a/build/patches/Modify-default-preferences.patch b/build/patches/Modify-default-preferences.patch index 403b22409..9670379ea 100644 --- a/build/patches/Modify-default-preferences.patch +++ b/build/patches/Modify-default-preferences.patch @@ -31,7 +31,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -78,6 +78,7 @@ +@@ -80,6 +80,7 @@ #include "components/autofill/core/common/autofill_payments_features.h" #include "components/autofill/core/common/autofill_switches.h" #include "components/autofill/core/common/autofill_util.h" @@ -42,7 +42,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/browser/background/background_mode_manager.cc --- a/chrome/browser/background/background_mode_manager.cc +++ b/chrome/browser/background/background_mode_manager.cc -@@ -359,7 +359,7 @@ BackgroundModeManager::~BackgroundModeManager() { +@@ -358,7 +358,7 @@ BackgroundModeManager::~BackgroundModeManager() { // static void BackgroundModeManager::RegisterPrefs(PrefRegistrySimple* registry) { @@ -54,7 +54,7 @@ diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/brows 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 -@@ -1608,7 +1608,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs( +@@ -1601,7 +1601,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs( void ChromeContentBrowserClient::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref(prefs::kDisable3DAPIs, false); @@ -145,7 +145,7 @@ diff --git a/components/bookmarks/browser/bookmark_utils.cc b/components/bookmar #include "components/bookmarks/browser/scoped_group_bookmark_actions.h" #include "components/bookmarks/common/bookmark_pref_names.h" #include "components/pref_registry/pref_registry_syncable.h" -@@ -483,11 +484,13 @@ bool DoesBookmarkContainWords(const std::u16string& title, +@@ -480,11 +481,13 @@ bool DoesBookmarkContainWords(const std::u16string& title, void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref( @@ -218,7 +218,7 @@ diff --git a/components/content_settings/core/browser/content_settings_registry. /*allowlisted_schemes=*/{}, /*valid_settings=*/{CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK}, WebsiteSettingsInfo::TOP_ORIGIN_ONLY_SCOPE, -@@ -337,7 +337,7 @@ void ContentSettingsRegistry::Init() { +@@ -347,7 +347,7 @@ void ContentSettingsRegistry::Init() { // TODO(crbug.com/904439): Update this to "SECURE_ONLY" once // DeviceOrientationEvents and DeviceMotionEvents are only fired in secure // contexts. @@ -230,7 +230,7 @@ diff --git a/components/content_settings/core/browser/content_settings_registry. diff --git a/components/content_settings/core/browser/cookie_settings.cc b/components/content_settings/core/browser/cookie_settings.cc --- a/components/content_settings/core/browser/cookie_settings.cc +++ b/components/content_settings/core/browser/cookie_settings.cc -@@ -74,7 +74,7 @@ void CookieSettings::RegisterProfilePrefs( +@@ -81,7 +81,7 @@ void CookieSettings::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { registry->RegisterIntegerPref( prefs::kCookieControlsMode, @@ -273,7 +273,7 @@ diff --git a/components/safe_browsing/core/common/safe_browsing_prefs.cc b/compo diff --git a/components/signin/internal/identity_manager/primary_account_manager.cc b/components/signin/internal/identity_manager/primary_account_manager.cc --- a/components/signin/internal/identity_manager/primary_account_manager.cc +++ b/components/signin/internal/identity_manager/primary_account_manager.cc -@@ -147,9 +147,9 @@ void PrimaryAccountManager::RegisterProfilePrefs(PrefRegistrySimple* registry) { +@@ -182,9 +182,9 @@ void PrimaryAccountManager::RegisterProfilePrefs(PrefRegistrySimple* registry) { std::string()); registry->RegisterStringPref(prefs::kGoogleServicesAccountId, std::string()); registry->RegisterBooleanPref(prefs::kGoogleServicesConsentedToSync, false); diff --git a/build/patches/Move-navigation-bar-to-bottom.patch b/build/patches/Move-navigation-bar-to-bottom.patch index a9ad6738d..e65519440 100644 --- a/build/patches/Move-navigation-bar-to-bottom.patch +++ b/build/patches/Move-navigation-bar-to-bottom.patch @@ -66,7 +66,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../suggestions/AutocompleteMediator.java | 6 +- .../DropdownItemViewInfoListManager.java | 14 +++- .../OmniboxSuggestionsDropdown.java | 38 ++++++++- - .../OmniboxSuggestionsDropdownEmbedder.java | 9 +++ + .../OmniboxSuggestionsDropdownEmbedder.java | 8 ++ .../strings/android_chrome_strings.grd | 6 ++ chrome/browser/ui/android/toolbar/BUILD.gn | 1 + .../toolbar/LocationBarFocusScrimHandler.java | 5 ++ @@ -85,7 +85,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../AccessibilitySettingsDelegate.java | 6 ++ .../render_widget_host_view_android.cc | 3 + .../Move-navigation-bar-to-bottom.inc | 12 +++ - 72 files changed, 835 insertions(+), 66 deletions(-) + 72 files changed, 834 insertions(+), 66 deletions(-) create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Move-navigation-bar-to-bottom.inc diff --git a/cc/base/features.cc b/cc/base/features.cc @@ -139,7 +139,7 @@ diff --git a/cc/input/browser_controls_offset_manager.cc b/cc/input/browser_cont diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -4257,6 +4257,9 @@ bool LayerTreeHostImpl::AnimateBrowserControls(base::TimeTicks time) { +@@ -4268,6 +4268,9 @@ bool LayerTreeHostImpl::AnimateBrowserControls(base::TimeTicks time) { if (scroll_delta.IsZero()) return false; @@ -191,7 +191,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser try (TraceEvent e = TraceEvent.scoped("TabGroupUiCoordinator.initializeWithNative")) { mTabStripCoordinator = new TabListCoordinator(TabListCoordinator.TabListMode.STRIP, mContext, mBrowserControlsStateProvider, mTabModelSelector, null, null, false, -@@ -168,7 +170,8 @@ public class TabGroupUiCoordinator implements TabGroupUiMediator.ResetHandler, T +@@ -169,7 +171,8 @@ public class TabGroupUiCoordinator implements TabGroupUiMediator.ResetHandler, T mMediator = new TabGroupUiMediator(mActivity, visibilityController, this, mModel, mTabModelSelector, mTabCreatorManager, mLayoutStateProviderSupplier, mIncognitoStateProvider, mTabGridDialogControllerSupplier, @@ -204,7 +204,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java -@@ -47,6 +47,12 @@ import org.chromium.url.GURL; +@@ -48,6 +48,12 @@ import org.chromium.url.GURL; import java.util.List; @@ -217,7 +217,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser /** * A mediator for the TabGroupUi. Responsible for managing the internal state of the component. */ -@@ -116,6 +122,11 @@ public class TabGroupUiMediator implements BackPressHandler { +@@ -117,6 +123,11 @@ public class TabGroupUiMediator implements BackPressHandler { private boolean mIsTabGroupUiVisible; private boolean mIsShowingOverViewMode; @@ -226,13 +226,13 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser + /** An observer that watches for changes in the active tab. */ + private final CurrentTabObserver mTabObserver; + - TabGroupUiMediator(Context context, BottomControlsVisibilityController visibilityController, - ResetHandler resetHandler, PropertyModel model, TabModelSelector tabModelSelector, - TabCreatorManager tabCreatorManager, -@@ -123,7 +134,9 @@ public class TabGroupUiMediator implements BackPressHandler { - IncognitoStateProvider incognitoStateProvider, - @Nullable OneshotSupplier - dialogControllerSupplier, + TabGroupUiMediator( + Context context, + BottomControlsVisibilityController visibilityController, +@@ -129,7 +140,9 @@ public class TabGroupUiMediator implements BackPressHandler { + @Nullable + LazyOneshotSupplier + dialogControllerSupplier, - ObservableSupplier omniboxFocusStateSupplier) { + ObservableSupplier omniboxFocusStateSupplier, + TopUiThemeColorProvider topUiThemeColorProvider, ObservableSupplier tabSupplier) { @@ -240,7 +240,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser mContext = context; mResetHandler = resetHandler; mModel = model; -@@ -144,10 +157,29 @@ public class TabGroupUiMediator implements BackPressHandler { +@@ -150,10 +163,29 @@ public class TabGroupUiMediator implements BackPressHandler { mIsShowingOverViewMode = true; } @@ -270,7 +270,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser if (getTabsToShowForId(lastId).contains(tab)) { return; } -@@ -199,6 +231,7 @@ public class TabGroupUiMediator implements BackPressHandler { +@@ -205,6 +237,7 @@ public class TabGroupUiMediator implements BackPressHandler { return; } resetTabStripWithRelatedTabsForId(currentTab.getId()); @@ -278,7 +278,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser } @Override -@@ -312,6 +345,8 @@ public class TabGroupUiMediator implements BackPressHandler { +@@ -318,6 +351,8 @@ public class TabGroupUiMediator implements BackPressHandler { resetTabStripWithRelatedTabsForId(tab.getId()); } @@ -287,7 +287,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser mBackPressStateSupplier = new ObservableSupplierImpl<>(); if (mTabGridDialogControllerSupplier != null) { mTabGridDialogControllerSupplier.onAvailable(controller -> { -@@ -325,6 +360,18 @@ public class TabGroupUiMediator implements BackPressHandler { +@@ -331,6 +366,18 @@ public class TabGroupUiMediator implements BackPressHandler { mModel.set(TabGroupUiProperties.LEFT_BUTTON_DRAWABLE_ID, drawableId); } @@ -306,7 +306,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser void setupLeftButtonOnClickListener(View.OnClickListener listener) { mModel.set(TabGroupUiProperties.LEFT_BUTTON_ON_CLICK_LISTENER, listener); } -@@ -438,6 +485,7 @@ public class TabGroupUiMediator implements BackPressHandler { +@@ -444,6 +491,7 @@ public class TabGroupUiMediator implements BackPressHandler { } public void destroy() { @@ -584,7 +584,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherMediator.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherMediator.java --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherMediator.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherMediator.java -@@ -519,11 +519,22 @@ class TabSwitcherMediator implements TabSwitcher.Controller, TabListRecyclerView +@@ -520,11 +520,22 @@ class TabSwitcherMediator implements TabSwitcher.Controller, TabListRecyclerView updateTopControlsProperties(); mContainerViewModel.set( BOTTOM_CONTROLS_HEIGHT, browserControlsStateProvider.getBottomControlsHeight()); @@ -607,7 +607,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser if (backPressManager != null && BackPressManager.isEnabled()) { assert !mIsStartSurfaceEnabled || mIsStartSurfaceRefactorEnabled; backPressManager.addHandler(this, BackPressHandler.Type.TAB_SWITCHER); -@@ -638,6 +649,10 @@ class TabSwitcherMediator implements TabSwitcher.Controller, TabListRecyclerView +@@ -639,6 +650,10 @@ class TabSwitcherMediator implements TabSwitcher.Controller, TabListRecyclerView final int contentOffset = mBrowserControlsStateProvider.getContentOffset(); mContainerViewModel.set(TOP_MARGIN, contentOffset); @@ -695,7 +695,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java -@@ -250,6 +250,9 @@ import java.util.ArrayList; +@@ -252,6 +252,9 @@ import java.util.ArrayList; import java.util.List; import java.util.function.Consumer; @@ -705,7 +705,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv /** * A {@link AsyncInitializationActivity} that builds and manages a {@link CompositorViewHolder} * and associated classes. -@@ -788,6 +791,16 @@ public abstract class ChromeActivity +@@ -793,6 +796,16 @@ public abstract class ChromeActivity int toolbarLayoutId = getToolbarLayoutId(); if (toolbarLayoutId != ActivityUtils.NO_RESOURCE_ID && controlContainer != null) { controlContainer.initWithToolbar(toolbarLayoutId); @@ -725,7 +725,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorViewHolder.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorViewHolder.java --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorViewHolder.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorViewHolder.java -@@ -90,6 +90,7 @@ import org.chromium.ui.base.WindowAndroid; +@@ -91,6 +91,7 @@ import org.chromium.ui.base.WindowAndroid; import org.chromium.ui.mojom.VirtualKeyboardMode; import org.chromium.ui.resources.ResourceManager; import org.chromium.ui.resources.dynamics.DynamicResourceLoader; @@ -733,7 +733,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/Comp import java.util.ArrayList; import java.util.HashSet; -@@ -319,6 +320,10 @@ public class CompositorViewHolder extends FrameLayout +@@ -324,6 +325,10 @@ public class CompositorViewHolder extends FrameLayout @Override public void setCurrentTouchEventOffsets(float top) { EventForwarder forwarder = getEventForwarder(); @@ -744,7 +744,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/Comp if (forwarder != null) forwarder.setCurrentTouchEventOffsets(0, top); } -@@ -889,6 +894,9 @@ public class CompositorViewHolder extends FrameLayout +@@ -895,6 +900,9 @@ public class CompositorViewHolder extends FrameLayout int keyboardInset = mApplicationBottomInsetSupplier != null ? mApplicationBottomInsetSupplier.get().webContentsHeightInset : 0; @@ -821,20 +821,20 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layo diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromeTablet.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromeTablet.java --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromeTablet.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromeTablet.java -@@ -30,6 +30,7 @@ import org.chromium.chrome.browser.toolbar.ControlContainer; - import org.chromium.chrome.features.start_surface.StartSurface; +@@ -31,6 +31,7 @@ import org.chromium.chrome.features.start_surface.StartSurface; import org.chromium.components.browser_ui.widget.scrim.ScrimCoordinator; + import org.chromium.ui.dragdrop.DragAndDropDelegate; import org.chromium.ui.resources.dynamics.DynamicResourceLoader; +import org.chromium.chrome.browser.fullscreen.BrowserControlsManager; import java.util.concurrent.Callable; -@@ -91,7 +92,8 @@ public class LayoutManagerChromeTablet extends LayoutManagerChrome { - () - -> mLayerTitleCache, - tabModelStartupInfoSupplier, lifecycleDispatcher, multiInstanceManager, -- toolbarContainerView, tabHoverCardViewStub, tabContentManagerSupplier); -+ toolbarContainerView, tabHoverCardViewStub, tabContentManagerSupplier, +@@ -109,7 +110,8 @@ public class LayoutManagerChromeTablet extends LayoutManagerChrome { + dragAndDropDelegate, + toolbarContainerView, + tabHoverCardViewStub, +- tabContentManagerSupplier); ++ tabContentManagerSupplier, + /*browserControlsManagerSupplier*/ () -> getBrowserControlsManager()); addSceneOverlay(mTabStripLayoutHelperManager); addObserver(mTabStripLayoutHelperManager.getTabSwitcherObserver()); @@ -880,7 +880,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layo diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java -@@ -531,7 +531,7 @@ public class StripLayoutHelper implements StripLayoutTab.StripLayoutTabDelegate +@@ -578,7 +578,7 @@ public class StripLayoutHelper implements StripLayoutTab.StripLayoutTabDelegate // position 0 is on the left. Account for that in the offset calculation. boolean isRtl = LocalizationUtils.isLayoutRtl(); boolean useUnadjustedScrollOffset = isRtl != isLeft; @@ -892,8 +892,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java -@@ -67,6 +67,8 @@ import org.chromium.ui.base.LocalizationUtils; - import org.chromium.ui.base.PageTransition; +@@ -70,6 +70,8 @@ import org.chromium.ui.base.PageTransition; + import org.chromium.ui.dragdrop.DragAndDropDelegate; import org.chromium.ui.resources.ResourceManager; import org.chromium.url.GURL; +import org.chromium.chrome.browser.fullscreen.BrowserControlsManager; @@ -901,9 +901,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over import java.util.List; -@@ -175,9 +177,13 @@ public class StripLayoutHelperManager implements SceneOverlay, PauseResumeWithNa - private final String mDefaultTitle; - private final Supplier mLayerTitleCacheSupplier; +@@ -177,9 +179,13 @@ public class StripLayoutHelperManager implements SceneOverlay, PauseResumeWithNa + @Nullable private TabDropTarget mTabDropTarget; + @Nullable private TabDragSource mTabDragSource; + private final Supplier mBrowserControlsManagerSupplier; + private final float mDpToPx; @@ -912,10 +912,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over @Override public void onDown(float x, float y, boolean fromMouse, int buttons) { + y -= mStripFilterArea.top; - // Clear any persisting tab strip hover state on a down event on the strip. Clearance is - // posted at a delay, as a best effort for the clearance to take effect after any - // animations triggered by the down event have ended. -@@ -201,12 +207,14 @@ public class StripLayoutHelperManager implements SceneOverlay, PauseResumeWithNa + if (mModelSelectorButton.onDown(x, y, fromMouse)) { + return; + } +@@ -199,12 +205,14 @@ public class StripLayoutHelperManager implements SceneOverlay, PauseResumeWithNa @Override public void drag(float x, float y, float dx, float dy, float tx, float ty) { @@ -930,7 +930,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over long time = time(); if (mModelSelectorButton.click(x, y)) { mModelSelectorButton.handleClick(time); -@@ -217,11 +225,13 @@ public class StripLayoutHelperManager implements SceneOverlay, PauseResumeWithNa +@@ -215,11 +223,13 @@ public class StripLayoutHelperManager implements SceneOverlay, PauseResumeWithNa @Override public void fling(float x, float y, float velocityX, float velocityY) { @@ -944,9 +944,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over getActiveStripLayoutHelper().onLongPress(time(), x, y); } -@@ -309,7 +319,8 @@ public class StripLayoutHelperManager implements SceneOverlay, PauseResumeWithNa - ActivityLifecycleDispatcher lifecycleDispatcher, - MultiInstanceManager multiInstanceManager, View toolbarContainerView, +@@ -314,7 +324,8 @@ public class StripLayoutHelperManager implements SceneOverlay, PauseResumeWithNa + DragAndDropDelegate dragDropDelegate, + View toolbarContainerView, @NonNull ViewStub tabHoverCardViewStub, - ObservableSupplier tabContentManagerSupplier) { + ObservableSupplier tabContentManagerSupplier, @@ -954,16 +954,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over mUpdateHost = updateHost; mLayerTitleCacheSupplier = layerTitleCacheSupplier; mTabStripTreeProvider = new TabStripSceneLayer(context); -@@ -409,6 +420,8 @@ public class StripLayoutHelperManager implements SceneOverlay, PauseResumeWithNa - mModelSelectorButton, multiInstanceManager, toolbarContainerView); - mIncognitoHelper = new StripLayoutHelper(context, managerHost, updateHost, renderHost, true, - mModelSelectorButton, multiInstanceManager, toolbarContainerView); +@@ -464,6 +475,8 @@ public class StripLayoutHelperManager implements SceneOverlay, PauseResumeWithNa + mModelSelectorButton, + mTabDragSource, + toolbarContainerView); + mBrowserControlsManagerSupplier = browserControlsManagerSupplier; + mDpToPx = context.getResources().getDisplayMetrics().density; tabHoverCardViewStub.setOnInflateListener((viewStub, view) -> { var hoverCardView = (StripTabHoverCardView) view; -@@ -512,9 +525,13 @@ public class StripLayoutHelperManager implements SceneOverlay, PauseResumeWithNa +@@ -568,9 +581,13 @@ public class StripLayoutHelperManager implements SceneOverlay, PauseResumeWithNa int hoveredTabId = getActiveStripLayoutHelper().getLastHoveredTab() == null ? TabModel.INVALID_TAB_INDEX : getActiveStripLayoutHelper().getLastHoveredTab().getId(); @@ -978,7 +978,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over return mTabStripTreeProvider; } -@@ -559,7 +576,17 @@ public class StripLayoutHelperManager implements SceneOverlay, PauseResumeWithNa +@@ -615,7 +632,17 @@ public class StripLayoutHelperManager implements SceneOverlay, PauseResumeWithNa mIncognitoHelper.onSizeChanged( mWidth, mHeight, orientationChanged, LayoutManagerImpl.time()); @@ -1000,7 +1000,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/StaticTabSceneLayer.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/StaticTabSceneLayer.java --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/StaticTabSceneLayer.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/StaticTabSceneLayer.java -@@ -13,6 +13,8 @@ import org.chromium.chrome.browser.tab.Tab; +@@ -16,6 +16,8 @@ import org.chromium.chrome.browser.tab.Tab; import org.chromium.ui.modelutil.PropertyKey; import org.chromium.ui.modelutil.PropertyModel; @@ -1009,7 +1009,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/scen /** * A SceneLayer to render a static tab. */ -@@ -46,7 +48,10 @@ public class StaticTabSceneLayer extends SceneLayer { +@@ -49,7 +51,10 @@ public class StaticTabSceneLayer extends SceneLayer { float x = model.get(LayoutTab.RENDER_X) * LayoutTab.sDpToPx; float y = model.get(LayoutTab.CONTENT_OFFSET) + model.get(LayoutTab.RENDER_Y) * LayoutTab.sDpToPx; @@ -1024,7 +1024,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/scen diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/TabListSceneLayer.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/TabListSceneLayer.java --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/TabListSceneLayer.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/TabListSceneLayer.java -@@ -22,6 +22,8 @@ import org.chromium.components.browser_ui.styles.SemanticColorUtils; +@@ -23,6 +23,8 @@ import org.chromium.components.browser_ui.styles.SemanticColorUtils; import org.chromium.ui.resources.ResourceManager; import org.chromium.ui.util.ColorUtils; @@ -1033,7 +1033,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/scen /** * A SceneLayer to render a tab stack. * TODO(changwan): change layouts to share one instance of this. -@@ -80,6 +82,12 @@ public class TabListSceneLayer extends SceneLayer { +@@ -81,6 +83,12 @@ public class TabListSceneLayer extends SceneLayer { TabListSceneLayerJni.get().beginBuildingFrame(mNativePtr, TabListSceneLayer.this); @@ -1046,7 +1046,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/scen // TODO(crbug.com/1070281): Use Supplier to get viewport and forward it to native, then // updateLayer can become obsolete. TabListSceneLayerJni.get().updateLayer(mNativePtr, TabListSceneLayer.this, tabListBgColor, -@@ -109,6 +117,11 @@ public class TabListSceneLayer extends SceneLayer { +@@ -110,6 +118,11 @@ public class TabListSceneLayer extends SceneLayer { boolean useIncognitoColors = t.isIncognito(); int defaultThemeColor = ChromeColors.getDefaultThemeColor(context, useIncognitoColors); @@ -1061,7 +1061,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/scen diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/TabStripSceneLayer.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/TabStripSceneLayer.java --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/TabStripSceneLayer.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/scene_layer/TabStripSceneLayer.java -@@ -21,6 +21,9 @@ import org.chromium.chrome.browser.layouts.scene_layer.SceneOverlayLayer; +@@ -22,6 +22,9 @@ import org.chromium.chrome.browser.layouts.scene_layer.SceneOverlayLayer; import org.chromium.chrome.browser.tasks.tab_management.TabUiFeatureUtilities; import org.chromium.ui.base.LocalizationUtils; import org.chromium.ui.resources.ResourceManager; @@ -1071,7 +1071,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/scen /** * The Java component of what is basically a CC Layer that manages drawing the Tab Strip (which is -@@ -78,9 +81,23 @@ public class TabStripSceneLayer extends SceneOverlayLayer { +@@ -79,9 +82,23 @@ public class TabStripSceneLayer extends SceneOverlayLayer { public void pushAndUpdateStrip(StripLayoutHelperManager layoutHelper, LayerTitleCache layerTitleCache, ResourceManager resourceManager, StripLayoutTab[] stripLayoutTabsToRender, float yOffset, int selectedTabId, @@ -1320,7 +1320,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsP diff --git a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java -@@ -86,6 +86,10 @@ import org.chromium.ui.base.WindowDelegate; +@@ -85,6 +85,10 @@ import org.chromium.ui.base.WindowDelegate; import org.chromium.ui.modaldialog.ModalDialogManager; import org.chromium.url.GURL; @@ -1331,9 +1331,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/Se import java.lang.ref.WeakReference; /** Queries the user's default search engine and shows autocomplete suggestions. */ -@@ -212,6 +216,12 @@ public class SearchActivity extends AsyncInitializationActivity - mSearchBox = (SearchActivityLocationBarLayout) mContentView.findViewById( - R.id.search_location_bar); +@@ -220,6 +224,12 @@ public class SearchActivity extends AsyncInitializationActivity + (SearchActivityLocationBarLayout) + mContentView.findViewById(R.id.search_location_bar); mAnchorView = mContentView.findViewById(R.id.toolbar); + if (ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled()) { + CoordinatorLayout.LayoutParams layoutParams = (CoordinatorLayout.LayoutParams) @@ -1344,19 +1344,19 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/Se updateAnchorViewLayout(); // Create status bar color controller and assign to search activity. -@@ -238,7 +248,7 @@ public class SearchActivity extends AsyncInitializationActivity - getOnBackPressedDispatcher().addCallback(this, backPressManager.getCallback()); - } - // clang-format off -- mLocationBarCoordinator = new LocationBarCoordinator(mSearchBox, mAnchorView, -+ mLocationBarCoordinator = new LocationBarCoordinator(mSearchBox, mAnchorView, mAnchorView, - mProfileSupplier, PrivacyPreferencesManagerImpl.getInstance(), - mSearchBoxDataProvider, null, new WindowDelegate(getWindow()), getWindowAndroid(), - /*activityTabSupplier=*/() -> null, getModalDialogManagerSupplier(), +@@ -247,7 +257,7 @@ public class SearchActivity extends AsyncInitializationActivity + getOnBackPressedDispatcher().addCallback(this, backPressManager.getCallback()); + mLocationBarCoordinator = + new LocationBarCoordinator( +- mSearchBox, ++ mSearchBox, mAnchorView, + mAnchorView, + mProfileSupplier, + PrivacyPreferencesManagerImpl.getInstance(), 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 -@@ -330,6 +330,11 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity +@@ -349,6 +349,11 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity if (fragment instanceof INeedSnackbarManager) { ((INeedSnackbarManager)fragment).setSnackbarManager(mSnackbarManager); } @@ -1397,7 +1397,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/status_indicato diff --git a/chrome/android/java/src/org/chromium/chrome/browser/status_indicator/StatusIndicatorSceneLayer.java b/chrome/android/java/src/org/chromium/chrome/browser/status_indicator/StatusIndicatorSceneLayer.java --- a/chrome/android/java/src/org/chromium/chrome/browser/status_indicator/StatusIndicatorSceneLayer.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/status_indicator/StatusIndicatorSceneLayer.java -@@ -15,6 +15,7 @@ import org.chromium.chrome.browser.layouts.components.VirtualView; +@@ -16,6 +16,7 @@ import org.chromium.chrome.browser.layouts.components.VirtualView; import org.chromium.chrome.browser.layouts.scene_layer.SceneLayer; import org.chromium.chrome.browser.layouts.scene_layer.SceneOverlayLayer; import org.chromium.ui.resources.ResourceManager; @@ -1405,7 +1405,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/status_indicato import java.util.List; -@@ -77,7 +78,10 @@ class StatusIndicatorSceneLayer extends SceneOverlayLayer implements SceneOverla +@@ -78,7 +79,10 @@ class StatusIndicatorSceneLayer extends SceneOverlayLayer implements SceneOverla @Override public SceneOverlayLayer getUpdatedSceneOverlayTree( RectF viewport, RectF visibleViewport, ResourceManager resourceManager, float yOffset) { @@ -1429,16 +1429,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar /** * Contains logic for managing the toolbar visual component. This class manages the interactions * with the rest of the application to ensure the toolbar is always visually up to date. -@@ -708,7 +710,7 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve - : null; - // clang-format off - LocationBarCoordinator locationBarCoordinator = new LocationBarCoordinator( -- mActivity.findViewById(R.id.location_bar), toolbarLayout, profileSupplier, -+ mActivity.findViewById(R.id.location_bar), toolbarLayout, controlContainer, profileSupplier, - PrivacyPreferencesManagerImpl.getInstance(), mLocationBarModel, - mActionModeController.getActionModeCallback(), - new WindowDelegate(mActivity.getWindow()), windowAndroid, mActivityTabProvider, -@@ -976,11 +978,13 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve +@@ -715,7 +717,7 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve + LocationBarCoordinator locationBarCoordinator = + new LocationBarCoordinator( + mActivity.findViewById(R.id.location_bar), +- toolbarLayout, ++ toolbarLayout, controlContainer, + profileSupplier, + PrivacyPreferencesManagerImpl.getInstance(), + mLocationBarModel, +@@ -996,11 +998,13 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve // the height won't be measured by the background image. if (mControlContainer.getBackground() == null) { setControlContainerTopMargin(getToolbarExtraYOffset()); @@ -1452,7 +1452,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar mControlContainer.removeOnLayoutChangeListener(mLayoutChangeListener); mLayoutChangeListener = null; } -@@ -1403,13 +1407,25 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve +@@ -1465,13 +1469,25 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve return ((LocationBarCoordinator) mLocationBar).getUrlBarTextWithoutAutocomplete(); } @@ -1480,7 +1480,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar mIncognitoStateProvider, mScrimCoordinator, mOmniboxFocusStateSupplier, mBottomSheetController, mActivityLifecycleDispatcher, mIsWarmOnResumeSupplier, mTabModelSelector, mTabContentManager, mCompositorViewHolder, -@@ -1417,8 +1433,9 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve +@@ -1479,8 +1495,9 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve mLayoutStateProviderSupplier, mSnackbarManager); var bottomControlsCoordinator = new BottomControlsCoordinator(mActivity, mWindowAndroid, mLayoutManager, mCompositorViewHolder.getResourceManager(), mBrowserControlsSizer, @@ -1490,9 +1490,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar + mTabObscuringHandler, mOverlayPanelVisibilitySupplier, mConstraintsProxy, + mTopUiThemeColorProvider, mActivityTabProvider); mBottomControlsCoordinatorSupplier.set(bottomControlsCoordinator); - bottomControlsCoordinator.getHandleBackPressChangedSupplier().addObserver( - (x) -> { onBackPressStateChanged(); }); -@@ -2261,6 +2278,15 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve + if (mBackPressManager != null) { + mBackPressManager.addHandler( +@@ -2332,6 +2349,15 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve private void setControlContainerTopMargin(int margin) { final ViewGroup.MarginLayoutParams layoutParams = ((ViewGroup.MarginLayoutParams) mControlContainer.getLayoutParams()); @@ -1588,7 +1588,7 @@ diff --git a/chrome/browser/android/compositor/scene_layer/tab_strip_scene_layer using base::android::JavaParamRef; using base::android::JavaRef; -@@ -84,8 +85,10 @@ void TabStripSceneLayer::SetContentTree( +@@ -85,8 +86,10 @@ void TabStripSceneLayer::SetContentTree( content_tree_ = content_tree; if (content_tree) { layer()->InsertChild(content_tree->layer(), 0); @@ -1601,7 +1601,7 @@ diff --git a/chrome/browser/android/compositor/scene_layer/tab_strip_scene_layer } } } -@@ -117,13 +120,18 @@ void TabStripSceneLayer::UpdateTabStripLayer(JNIEnv* env, +@@ -118,13 +121,18 @@ void TabStripSceneLayer::UpdateTabStripLayer(JNIEnv* env, jfloat y_offset, jint background_color) { gfx::RectF content(0, y_offset, width, height); @@ -1671,7 +1671,7 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse #include "chrome/browser/browser_features.h" #include "chrome/browser/feature_guide/notifications/feature_notification_guide_service.h" #include "chrome/browser/flags/android/chrome_session_state.h" -@@ -271,6 +272,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -268,6 +269,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kLensCameraAssistedSearch, &kLensOnQuickActionSearchWidget, &kNewTabSearchEngineUrlAndroid, @@ -1682,7 +1682,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/CachedFlag.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFlag.java --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFlag.java +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFlag.java -@@ -131,6 +131,12 @@ public class CachedFlag extends Flag { +@@ -132,6 +132,12 @@ public class CachedFlag extends Flag { } } @@ -1707,7 +1707,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f public static final String NOTIFICATION_PERMISSION_VARIANT = "NotificationPermissionVariant"; public static final String NOTIFICATION_PERMISSION_BOTTOM_SHEET = "NotificationPermissionBottomSheet"; -@@ -596,6 +598,8 @@ public abstract class ChromeFeatureList { +@@ -611,6 +613,8 @@ public abstract class ChromeFeatureList { new CachedFlag(PRIVACY_GUIDE_POST_MVP, false); public static final CachedFlag sOmniboxMatchToolbarAndStatusBarColor = new CachedFlag(OMNIBOX_MATCH_TOOLBAR_AND_STATUS_BAR_COLOR, false); @@ -1716,18 +1716,18 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f public static final CachedFlag sOmniboxModernizeVisualUpdate = new CachedFlag(OMNIBOX_MODERNIZE_VISUAL_UPDATE, true); public static final CachedFlag sOptimizationGuidePushNotifications = -@@ -695,6 +699,7 @@ public abstract class ChromeFeatureList { - sPrivacyGuideAndroid3, - sPrivacyGuidePreloadAndroid, - sPrivacyGuidePostMVP, -+ sMoveTopToolbarToBottom, - sOmniboxMatchToolbarAndStatusBarColor, - sOmniboxModernizeVisualUpdate, - sOptimizationGuidePushNotifications, +@@ -720,6 +724,7 @@ public abstract class ChromeFeatureList { + sOmniboxMatchToolbarAndStatusBarColor, + sOmniboxModernizeVisualUpdate, + sOptimizationGuidePushNotifications, ++ sMoveTopToolbarToBottom, + sPaintPreviewDemo, + sQueryTiles, + sQueryTilesOnStart, 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 -@@ -2024,7 +2024,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -2033,7 +2033,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, #if BUILDFLAG(IS_ANDROID) registry->RegisterBooleanPref(prefs::kVirtualKeyboardResizesLayoutByDefault, @@ -1768,10 +1768,10 @@ diff --git a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/ch int footerHeight = inflateFooter(footerResourceId, contentView, menuWidth); int headerHeight = inflateHeader(headerResourceId, contentView, menuWidth); -@@ -298,6 +306,11 @@ class AppMenu implements OnItemClickListener, OnKeyListener, AppMenuClickHandler - if (popupHeight + popupPosition[1] > visibleDisplayFrame.height() - anchorViewOffset) { - mPopup.setHeight(visibleDisplayFrame.height() - anchorViewOffset); - } +@@ -309,6 +317,11 @@ class AppMenu implements OnItemClickListener, OnKeyListener, AppMenuClickHandler + popupWidth, + anchorView.getRootView().getLayoutDirection()); + mPopup.setContentView(contentView); + if (ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled()) { + // due to some unknown behaviour, the popup must be resized to + // allow selection without leaving touch @@ -1780,7 +1780,7 @@ diff --git a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/ch try { mPopup.showAtLocation(anchorView.getRootView(), Gravity.NO_GRAVITY, popupPosition[0], -@@ -345,6 +358,14 @@ class AppMenu implements OnItemClickListener, OnKeyListener, AppMenuClickHandler +@@ -362,6 +375,14 @@ class AppMenu implements OnItemClickListener, OnKeyListener, AppMenuClickHandler int anchorViewX = tempLocation[0]; int anchorViewY = tempLocation[1]; @@ -1795,7 +1795,7 @@ diff --git a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/ch int[] offsets = new int[2]; // If we have a hardware menu button, locate the app menu closer to the estimated // hardware menu button location. -@@ -528,7 +549,13 @@ class AppMenu implements OnItemClickListener, OnKeyListener, AppMenuClickHandler +@@ -552,7 +573,13 @@ class AppMenu implements OnItemClickListener, OnKeyListener, AppMenuClickHandler int availableScreenSpace = appDimensions.height() - anchorViewOffset - padding.bottom - footerHeight - headerHeight - anchorViewImpactHeight; @@ -1840,7 +1840,7 @@ diff --git a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/ch diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java -@@ -92,6 +92,7 @@ public class LocationBarCoordinator +@@ -91,6 +91,7 @@ public class LocationBarCoordinator private WindowDelegate mWindowDelegate; private WindowAndroid mWindowAndroid; private View mAutocompleteAnchorView; @@ -1849,15 +1849,15 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow private View mUrlBar; private View mDeleteButton; @@ -147,7 +148,7 @@ public class LocationBarCoordinator - * @param backPressManager The {@link BackPressManager} for intercepting back press. - * @param tabModelSelectorSupplier Supplier of the {@link TabModelSelector}. */ -- public LocationBarCoordinator(View locationBarLayout, View autocompleteAnchorView, -+ public LocationBarCoordinator(View locationBarLayout, View autocompleteAnchorView, View containerView, + public LocationBarCoordinator( + View locationBarLayout, +- View autocompleteAnchorView, ++ View autocompleteAnchorView, View containerView, ObservableSupplier profileObservableSupplier, PrivacyPreferencesManager privacyPreferencesManager, - LocationBarDataProvider locationBarDataProvider, ActionMode.Callback actionModeCallback, -@@ -180,11 +181,12 @@ public class LocationBarCoordinator + LocationBarDataProvider locationBarDataProvider, +@@ -187,6 +188,7 @@ public class LocationBarCoordinator mActivityLifecycleDispatcher = activityLifecycleDispatcher; mActivityLifecycleDispatcher.register(this); mAutocompleteAnchorView = autocompleteAnchorView; @@ -1865,24 +1865,27 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow Context context = mLocationBarLayout.getContext(); OneshotSupplierImpl templateUrlServiceSupplier = new OneshotSupplierImpl<>(); - mOmniboxDropdownEmbedderImpl = new OmniboxSuggestionsDropdownEmbedderImpl( -- mWindowAndroid, mWindowDelegate, autocompleteAnchorView, mLocationBarLayout); -+ mWindowAndroid, mWindowDelegate, autocompleteAnchorView, mLocationBarLayout, mContainerView); +@@ -195,7 +197,7 @@ public class LocationBarCoordinator + mWindowAndroid, + mWindowDelegate, + autocompleteAnchorView, +- mLocationBarLayout); ++ mLocationBarLayout, mContainerView); mUrlBar = mLocationBarLayout.findViewById(R.id.url_bar); // TODO(crbug.com/1151513): Inject LocaleManager instance to LocationBarCoordinator instead diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/OmniboxSuggestionsDropdownEmbedderImpl.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/OmniboxSuggestionsDropdownEmbedderImpl.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/OmniboxSuggestionsDropdownEmbedderImpl.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/OmniboxSuggestionsDropdownEmbedderImpl.java -@@ -19,6 +19,7 @@ import androidx.core.view.WindowInsetsCompat; - import org.chromium.base.Callback; +@@ -20,6 +20,7 @@ import org.chromium.base.Callback; import org.chromium.base.supplier.ObservableSupplierImpl; + import org.chromium.chrome.browser.omnibox.styles.OmniboxResourceProvider; import org.chromium.chrome.browser.omnibox.suggestions.OmniboxSuggestionsDropdownEmbedder; +import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.ui.base.DeviceFormFactor; import org.chromium.ui.base.ViewUtils; import org.chromium.ui.base.WindowAndroid; -@@ -37,6 +38,7 @@ class OmniboxSuggestionsDropdownEmbedderImpl implements OmniboxSuggestionsDropdo +@@ -40,6 +41,7 @@ class OmniboxSuggestionsDropdownEmbedderImpl private final @NonNull WindowAndroid mWindowAndroid; private final @NonNull WindowDelegate mWindowDelegate; private final @NonNull View mAnchorView; @@ -1890,10 +1893,10 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow private final @NonNull View mHorizontalAlignmentView; private final @NonNull Context mContext; // Reusable int array to pass to positioning methods that operate on a two element int array. -@@ -61,10 +63,11 @@ class OmniboxSuggestionsDropdownEmbedderImpl implements OmniboxSuggestionsDropdo - */ - OmniboxSuggestionsDropdownEmbedderImpl(@NonNull WindowAndroid windowAndroid, - @NonNull WindowDelegate windowDelegate, @NonNull View anchorView, +@@ -64,10 +66,11 @@ class OmniboxSuggestionsDropdownEmbedderImpl + @NonNull WindowAndroid windowAndroid, + @NonNull WindowDelegate windowDelegate, + @NonNull View anchorView, - @NonNull View horizontalAlignmentView) { + @NonNull View horizontalAlignmentView, @NonNull View containerView) { mWindowAndroid = windowAndroid; @@ -1903,7 +1906,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow mHorizontalAlignmentView = horizontalAlignmentView; mContext = mAnchorView.getContext(); mContext.registerComponentCallbacks(this); -@@ -84,6 +87,16 @@ class OmniboxSuggestionsDropdownEmbedderImpl implements OmniboxSuggestionsDropdo +@@ -87,6 +90,16 @@ class OmniboxSuggestionsDropdownEmbedderImpl mOmniboxAlignmentSupplier.removeObserver(obs); } @@ -1920,7 +1923,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow @Nullable @Override public OmniboxAlignment getCurrentAlignment() { -@@ -101,9 +114,11 @@ class OmniboxSuggestionsDropdownEmbedderImpl implements OmniboxSuggestionsDropdo +@@ -104,9 +117,11 @@ class OmniboxSuggestionsDropdownEmbedderImpl mAnchorView.addOnLayoutChangeListener(this); mHorizontalAlignmentView.addOnLayoutChangeListener(this); mAnchorView.getViewTreeObserver().addOnGlobalLayoutListener(this); @@ -1945,9 +1948,9 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow +import org.chromium.chrome.browser.flags.ChromeFeatureList; +import android.view.WindowManager; + - /** - * Coordinates the interactions with the UrlBar text component. - */ + /** Coordinates the interactions with the UrlBar text component. */ + public class UrlBarCoordinator + implements UrlBarEditingTextStateProvider, diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteCoordinator.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteCoordinator.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteCoordinator.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteCoordinator.java @@ -1959,23 +1962,23 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow import java.util.ArrayList; import java.util.List; -@@ -83,6 +84,7 @@ public class AutocompleteCoordinator implements UrlFocusChangeListener, UrlTextC +@@ -81,6 +82,7 @@ public class AutocompleteCoordinator implements UrlFocusChangeListener, UrlTextC private OneshotSupplierImpl mAdapterSupplier = new OneshotSupplierImpl<>(); private PreWarmingRecycledViewPool mRecycledViewPool; + private final @NonNull OmniboxSuggestionsDropdownEmbedder mDropdownEmbedder; - public AutocompleteCoordinator(@NonNull ViewGroup parent, - @NonNull AutocompleteControllerProvider controllerProvider, -@@ -108,6 +110,7 @@ public class AutocompleteCoordinator implements UrlFocusChangeListener, UrlTextC + public AutocompleteCoordinator( + @NonNull ViewGroup parent, +@@ -107,6 +109,7 @@ public class AutocompleteCoordinator implements UrlFocusChangeListener, UrlTextC PropertyModel listModel = new PropertyModel(SuggestionListProperties.ALL_KEYS); ModelList listItems = new ModelList(); + mDropdownEmbedder = dropdownEmbedder; listModel.set(SuggestionListProperties.EMBEDDER, dropdownEmbedder); listModel.set(SuggestionListProperties.VISIBLE, false); - listModel.set(SuggestionListProperties.SUGGESTION_MODELS, listItems); -@@ -168,7 +171,7 @@ public class AutocompleteCoordinator implements UrlFocusChangeListener, UrlTextC + listModel.set(SuggestionListProperties.DRAW_OVER_ANCHOR, false); +@@ -186,7 +189,7 @@ public class AutocompleteCoordinator implements UrlFocusChangeListener, UrlTextC public void inflate() { OmniboxSuggestionsDropdown dropdown; try (StrictModeContext ignored = StrictModeContext.allowDiskReads()) { @@ -1984,10 +1987,10 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow } dropdown.getViewGroup().setClipToPadding(false); -@@ -177,6 +180,16 @@ public class AutocompleteCoordinator implements UrlFocusChangeListener, UrlTextC - ViewGroup container = (ViewGroup) ((ViewStub) mParent.getRootView().findViewById( - R.id.omnibox_results_container_stub)) - .inflate(); +@@ -200,6 +203,16 @@ public class AutocompleteCoordinator implements UrlFocusChangeListener, UrlTextC + R.id + .omnibox_results_container_stub)) + .inflate(); + if (ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled()) { + // make margins works + dropdown.getViewGroup().setClipToPadding(true); @@ -2004,7 +2007,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteMediator.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteMediator.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteMediator.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteMediator.java -@@ -63,6 +63,8 @@ import org.chromium.ui.modelutil.PropertyModel; +@@ -64,6 +64,8 @@ import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.mojom.WindowOpenDisposition; import org.chromium.url.GURL; @@ -2013,7 +2016,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.List; -@@ -1022,7 +1024,9 @@ class AutocompleteMediator implements OnSuggestionsReceivedListener, +@@ -1064,7 +1066,9 @@ class AutocompleteMediator @Override public void onSuggestionDropdownScroll() { mSuggestionsListScrolled = true; @@ -2035,7 +2038,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow import org.chromium.chrome.browser.omnibox.OmniboxFeatures; import org.chromium.chrome.browser.omnibox.R; import org.chromium.chrome.browser.omnibox.styles.OmniboxResourceProvider; -@@ -121,6 +122,7 @@ class DropdownItemViewInfoListManager { +@@ -133,6 +134,7 @@ class DropdownItemViewInfoListManager { OmniboxFeatures.shouldShowModernizeVisualUpdate(mContext); boolean previousItemWasHeader = false; @@ -2043,7 +2046,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow for (int i = 0; i < mSourceViewInfoList.size(); i++) { final DropdownItemViewInfo item = mSourceViewInfoList.get(i); final PropertyModel model = item.model; -@@ -140,18 +142,22 @@ class DropdownItemViewInfoListManager { +@@ -154,19 +156,23 @@ class DropdownItemViewInfoListManager { } var bottomMargin = applyRounding ? groupBottomMargin : suggestionVerticalMargin; @@ -2053,8 +2056,9 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow + DropdownCommonProperties.BG_TOP_CORNER_ROUNDED, applyRounding); // Do not have margin for the first suggestion, otherwise the first suggestion will // have a big gap with the Omnibox. -- model.set(DropdownCommonProperties.TOP_MARGIN, -+ model.set(toolbarToBottom ? DropdownCommonProperties.BOTTOM_MARGIN : DropdownCommonProperties.TOP_MARGIN, + model.set( +- DropdownCommonProperties.TOP_MARGIN, ++ toolbarToBottom ? DropdownCommonProperties.BOTTOM_MARGIN : DropdownCommonProperties.TOP_MARGIN, previousItem == null ? getSuggestionListTopMargin(item.processor.getViewTypeId()) : topMargin); @@ -2073,8 +2077,8 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsDropdown.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsDropdown.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsDropdown.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsDropdown.java -@@ -35,6 +35,9 @@ import org.chromium.chrome.browser.util.KeyNavigationUtil; - import org.chromium.components.browser_ui.styles.ChromeColors; +@@ -39,6 +39,9 @@ import org.chromium.ui.KeyboardVisibilityDelegate; + import org.chromium.ui.base.DeviceFormFactor; import org.chromium.ui.base.ViewUtils; +import android.graphics.Rect; @@ -2083,8 +2087,8 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow /** A widget for showing a list of omnibox suggestions. */ public class OmniboxSuggestionsDropdown extends RecyclerView { /** -@@ -205,7 +208,8 @@ public class OmniboxSuggestionsDropdown extends RecyclerView { - * Constructs a new list designed for containing omnibox suggestions. +@@ -213,7 +216,8 @@ public class OmniboxSuggestionsDropdown extends RecyclerView { + * * @param context Context used for contained views. */ - public OmniboxSuggestionsDropdown(@NonNull Context context, RecycledViewPool recycledViewPool) { @@ -2093,17 +2097,18 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow super(context, null, android.R.attr.dropDownListViewStyle); setFocusable(true); setFocusableInTouchMode(true); -@@ -216,13 +220,25 @@ public class OmniboxSuggestionsDropdown extends RecyclerView { +@@ -224,7 +228,6 @@ public class OmniboxSuggestionsDropdown extends RecyclerView { setItemAnimator(null); mLayoutScrollListener = new SuggestionLayoutScrollListener(context); - setLayoutManager(mLayoutScrollListener); + mSelectionController = new RecyclerViewSelectionController(mLayoutScrollListener); + addOnChildAttachStateChangeListener(mSelectionController); - boolean shouldShowModernizeVisualUpdate = - OmniboxFeatures.shouldShowModernizeVisualUpdate(context); - final Resources resources = context.getResources(); - int paddingBottom = +@@ -235,6 +238,19 @@ public class OmniboxSuggestionsDropdown extends RecyclerView { resources.getDimensionPixelOffset(R.dimen.omnibox_suggestion_list_padding_bottom); + int paddingTop = + resources.getDimensionPixelOffset(R.dimen.omnibox_suggestion_list_padding_top); + if (ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled()) { + // reverse the layout so that the items are at the bottom (in reverse order) + // and anchored to the bottom edge @@ -2115,12 +2120,12 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow + paddingBottom = resources.getDimensionPixelOffset(R.dimen.toolbar_height_no_shadow) + + embedderParams.bottomMargin; + } ++ paddingTop = 0; + } -+ setLayoutManager(mLayoutScrollListener); - ViewCompat.setPaddingRelative(this, 0, 0, 0, paddingBottom); + ViewCompat.setPaddingRelative(this, 0, paddingTop, 0, paddingBottom); - mStandardBgColor = shouldShowModernizeVisualUpdate -@@ -358,8 +374,16 @@ public class OmniboxSuggestionsDropdown extends RecyclerView { + mStandardBgColor = +@@ -388,8 +404,16 @@ public class OmniboxSuggestionsDropdown extends RecyclerView { TimingMetric metric = OmniboxMetrics.recordSuggestionListMeasureTime(); TimingMetric metric2 = OmniboxMetrics.recordSuggestionListMeasureWallTime()) { OmniboxAlignment omniboxAlignment = mEmbedder.getCurrentAlignment(); @@ -2139,7 +2144,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow int desiredWidth = omniboxAlignment.width; adjustHorizontalPosition(); notifyObserversIfViewportHeightChanged(availableViewportHeight); -@@ -371,6 +395,12 @@ public class OmniboxSuggestionsDropdown extends RecyclerView { +@@ -409,6 +433,12 @@ public class OmniboxSuggestionsDropdown extends RecyclerView { } } @@ -2155,16 +2160,15 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsDropdownEmbedder.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsDropdownEmbedder.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsDropdownEmbedder.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsDropdownEmbedder.java -@@ -4,6 +4,8 @@ - +@@ -5,6 +5,7 @@ package org.chromium.chrome.browser.omnibox.suggestions; + import android.annotation.SuppressLint; +import android.view.View; -+ + import androidx.annotation.NonNull; import androidx.annotation.Nullable; - -@@ -94,6 +96,13 @@ public interface OmniboxSuggestionsDropdownEmbedder { +@@ -108,6 +109,13 @@ public interface OmniboxSuggestionsDropdownEmbedder { @NonNull OmniboxAlignment getCurrentAlignment(); @@ -2181,7 +2185,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow 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 -@@ -1806,6 +1806,12 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1699,6 +1699,12 @@ Your Google account may have other forms of browsing history like searches and a Force Tablet Mode @@ -2365,7 +2369,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/ScrollingBottomViewSceneLayer.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/ScrollingBottomViewSceneLayer.java --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/ScrollingBottomViewSceneLayer.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/ScrollingBottomViewSceneLayer.java -@@ -19,6 +19,8 @@ import org.chromium.ui.resources.ResourceManager; +@@ -20,6 +20,8 @@ import org.chromium.ui.resources.ResourceManager; import java.util.List; @@ -2374,7 +2378,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow /** * A composited view that sits at the bottom of the screen and listens to changes in the browser * controls. When visible, the view will mimic the behavior of the top browser controls when -@@ -38,6 +40,9 @@ public class ScrollingBottomViewSceneLayer extends SceneOverlayLayer implements +@@ -39,6 +41,9 @@ public class ScrollingBottomViewSceneLayer extends SceneOverlayLayer implements /** The current Y offset of the bottom view in px. */ private int mCurrentYOffsetPx; @@ -2384,7 +2388,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow /** The current X offset of the bottom view in px. */ private int mCurrentXOffsetPx; -@@ -85,6 +90,13 @@ public class ScrollingBottomViewSceneLayer extends SceneOverlayLayer implements +@@ -86,6 +91,13 @@ public class ScrollingBottomViewSceneLayer extends SceneOverlayLayer implements mCurrentXOffsetPx = offsetPx; } @@ -2398,7 +2402,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow /** * @param visible Whether this {@link SceneLayer} is visible. */ -@@ -113,9 +125,14 @@ public class ScrollingBottomViewSceneLayer extends SceneOverlayLayer implements +@@ -114,9 +126,14 @@ public class ScrollingBottomViewSceneLayer extends SceneOverlayLayer implements // The composited shadow should be visible if the Android toolbar's isn't. boolean isShadowVisible = mBottomView.getVisibility() != View.VISIBLE; @@ -2493,7 +2497,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarSceneLayer.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarSceneLayer.java --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarSceneLayer.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarSceneLayer.java -@@ -13,6 +13,7 @@ import org.chromium.components.browser_ui.widget.ClipDrawableProgressBar.Drawing +@@ -14,6 +14,7 @@ import org.chromium.components.browser_ui.widget.ClipDrawableProgressBar.Drawing import org.chromium.ui.modelutil.PropertyKey; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.resources.ResourceManager; @@ -2501,7 +2505,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow /** A SceneLayer to render the top toolbar. This is the "view" piece of the top toolbar overlay. */ @JNINamespace("android") -@@ -38,13 +39,20 @@ class TopToolbarSceneLayer extends SceneOverlayLayer { +@@ -39,13 +40,20 @@ class TopToolbarSceneLayer extends SceneOverlayLayer { /** Push all information about the texture to native at once. */ private void pushProperties(PropertyModel model) { if (mResourceManagerSupplier.get() == null) return; @@ -2624,7 +2628,7 @@ diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/ #include "cc/base/math_util.h" #include "cc/slim/layer.h" #include "components/viz/common/features.h" -@@ -868,6 +869,8 @@ void RenderWidgetHostViewAndroid::OnRenderFrameMetadataChangedBeforeActivation( +@@ -865,6 +866,8 @@ void RenderWidgetHostViewAndroid::OnRenderFrameMetadataChangedBeforeActivation( // factor. Thus, |top_content_offset| in CSS pixels is also in DIPs. float top_content_offset = metadata.top_controls_height * metadata.top_controls_shown_ratio; diff --git a/build/patches/Move-some-account-settings-back-to-privacy-settings.patch b/build/patches/Move-some-account-settings-back-to-privacy-settings.patch index e2b46a33d..734c2db7a 100644 --- a/build/patches/Move-some-account-settings-back-to-privacy-settings.patch +++ b/build/patches/Move-some-account-settings-back-to-privacy-settings.patch @@ -14,10 +14,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml --- a/chrome/android/java/res/xml/privacy_preferences.xml +++ b/chrome/android/java/res/xml/privacy_preferences.xml -@@ -64,6 +64,19 @@ found in the LICENSE file. - android:key="privacy_sandbox" - android:title="@string/prefs_privacy_sandbox" - android:fragment="org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxSettingsFragmentV3"/> +@@ -66,6 +66,19 @@ found in the LICENSE file. + android:key="secure_dns" + android:title="@string/settings_secure_dns_title" + android:fragment="org.chromium.chrome.browser.privacy.secure_dns.SecureDnsSettings" /> + @@ -68,7 +68,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting private IncognitoLockSettings mIncognitoLockSettings; @Override -@@ -136,6 +153,16 @@ public class PrivacySettings +@@ -132,6 +149,16 @@ public class PrivacySettings setHasOptionsMenu(true); @@ -85,7 +85,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting ChromeSwitchPreference canMakePaymentPref = (ChromeSwitchPreference) findPreference(PREF_CAN_MAKE_PAYMENT); canMakePaymentPref.setOnPreferenceChangeListener(this); -@@ -223,6 +250,9 @@ public class PrivacySettings +@@ -221,6 +248,9 @@ public class PrivacySettings } else if (PREF_HTTPS_FIRST_MODE.equals(key)) { UserPrefs.get(getProfile()) .setBoolean(Pref.HTTPS_ONLY_MODE_ENABLED, (boolean) newValue); @@ -95,7 +95,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting } return true; } -@@ -237,6 +267,9 @@ public class PrivacySettings +@@ -235,6 +265,9 @@ public class PrivacySettings * Updates the preferences. */ public void updatePreferences() { @@ -108,7 +108,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting 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 -@@ -464,6 +464,10 @@ CHAR_LIMIT guidelines: +@@ -467,6 +467,10 @@ CHAR_LIMIT guidelines: No statistics or crash reports are sent to Google diff --git a/build/patches/Multiple-fingerprinting-mitigations.patch b/build/patches/Multiple-fingerprinting-mitigations.patch index 3b405bcfc..6f3aa2f24 100644 --- a/build/patches/Multiple-fingerprinting-mitigations.patch +++ b/build/patches/Multiple-fingerprinting-mitigations.patch @@ -45,7 +45,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../core/svg/svg_text_content_element.cc | 28 +++- .../canvas2d/base_rendering_context_2d.cc | 24 ++- third_party/blink/renderer/platform/BUILD.gn | 5 +- - .../platform/exported/web_runtime_features.cc | 12 ++ + .../platform/exported/web_runtime_features.cc | 13 ++ .../platform/graphics/image_data_buffer.cc | 7 + .../platform/graphics/static_bitmap_image.cc | 155 ++++++++++++++++++ .../platform/graphics/static_bitmap_image.h | 2 + @@ -53,7 +53,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html third_party/ungoogled/BUILD.gn | 10 ++ third_party/ungoogled/ungoogled_switches.cc | 18 ++ third_party/ungoogled/ungoogled_switches.h | 18 ++ - 27 files changed, 390 insertions(+), 8 deletions(-) + 27 files changed, 391 insertions(+), 8 deletions(-) create mode 100755 cromite_flags/chrome/browser/about_flags_cc/Multiple-fingerprinting-mitigations.inc create mode 100644 third_party/ungoogled/BUILD.gn create mode 100644 third_party/ungoogled/ungoogled_switches.cc @@ -62,7 +62,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 -@@ -2530,6 +2530,7 @@ static_library("browser") { +@@ -2536,6 +2536,7 @@ static_library("browser") { "//services/device/public/cpp:device_features", "//services/device/public/cpp/geolocation", "//services/device/public/cpp/usb", @@ -73,7 +73,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -227,6 +227,8 @@ +@@ -232,6 +232,8 @@ #include "ui/ui_features.h" #include "url/url_features.h" @@ -85,7 +85,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -245,6 +245,7 @@ source_set("browser") { +@@ -247,6 +247,7 @@ source_set("browser") { "//third_party/libyuv", "//third_party/re2", "//third_party/sqlite", @@ -96,7 +96,7 @@ diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -211,6 +211,7 @@ +@@ -213,6 +213,7 @@ #include "url/gurl.h" #include "url/origin.h" @@ -104,7 +104,7 @@ diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content #if BUILDFLAG(IS_ANDROID) #include "base/android/child_process_binding_types.h" #include "content/browser/android/java_interfaces_impl.h" -@@ -3299,6 +3300,9 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3373,6 +3374,9 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( switches::kDisableBreakpad, switches::kDisableDatabases, switches::kDisableFileSystem, @@ -117,7 +117,7 @@ diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content diff --git a/content/child/BUILD.gn b/content/child/BUILD.gn --- a/content/child/BUILD.gn +++ b/content/child/BUILD.gn -@@ -102,6 +102,7 @@ target(link_target_type, "child") { +@@ -103,6 +103,7 @@ target(link_target_type, "child") { "//third_party/blink/public/common:buildflags", "//third_party/blink/public/strings", "//third_party/ced", @@ -128,7 +128,7 @@ diff --git a/content/child/BUILD.gn b/content/child/BUILD.gn 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 -@@ -46,6 +46,8 @@ +@@ -47,6 +47,8 @@ #include "ui/gl/gl_switches.h" #include "ui/native_theme/native_theme_features.h" @@ -137,7 +137,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features. #if BUILDFLAG(IS_ANDROID) #include "base/android/build_info.h" #endif -@@ -548,6 +550,12 @@ void SetRuntimeFeaturesFromCommandLine(const base::CommandLine& command_line) { +@@ -558,6 +560,12 @@ void SetRuntimeFeaturesFromCommandLine(const base::CommandLine& command_line) { // as a last resort. void SetCustomizedRuntimeFeaturesFromCombinedArgs( const base::CommandLine& command_line) { @@ -182,8 +182,8 @@ diff --git a/third_party/blink/public/platform/web_runtime_features.h b/third_pa + static void EnableFingerprintingCanvasMeasureTextNoise(bool); + static void EnableFingerprintingCanvasImageDataNoise(bool); static void EnableFluentScrollbars(bool); + static void EnableFluentOverlayScrollbars(bool); - WebRuntimeFeatures() = delete; 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 @@ -213,7 +213,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink if (base::FeatureList::IsEnabled(features::kDelayAsyncScriptExecution)) script_runner_delayer_->Activate(); -@@ -2300,6 +2312,14 @@ void Document::UpdateStyleAndLayoutTreeForThisDocument() { +@@ -2323,6 +2335,14 @@ void Document::UpdateStyleAndLayoutTreeForThisDocument() { #endif } @@ -231,7 +231,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink diff --git a/third_party/blink/renderer/core/dom/document.h b/third_party/blink/renderer/core/dom/document.h --- a/third_party/blink/renderer/core/dom/document.h +++ b/third_party/blink/renderer/core/dom/document.h -@@ -532,6 +532,10 @@ class CORE_EXPORT Document : public ContainerNode, +@@ -511,6 +511,10 @@ class CORE_EXPORT Document : public ContainerNode, has_xml_declaration_ = has_xml_declaration ? 1 : 0; } @@ -242,7 +242,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.h b/third_party/blink/ AtomicString visibilityState() const; bool IsPageVisible() const; bool hidden() const; -@@ -2430,6 +2434,9 @@ class CORE_EXPORT Document : public ContainerNode, +@@ -2416,6 +2420,9 @@ class CORE_EXPORT Document : public ContainerNode, base::ElapsedTimer start_time_; @@ -255,7 +255,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.h b/third_party/blink/ diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/renderer/core/dom/element.cc --- a/third_party/blink/renderer/core/dom/element.cc +++ b/third_party/blink/renderer/core/dom/element.cc -@@ -2121,6 +2121,7 @@ void Element::ClientQuads(Vector& quads) const { +@@ -2100,6 +2100,7 @@ void Element::ClientQuads(Vector& quads) const { quads.push_back(element_layout_object->LocalToAbsoluteQuad( gfx::QuadF(element_layout_object->ObjectBoundingBox()))); } @@ -263,7 +263,7 @@ diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/ return; } -@@ -2129,6 +2130,10 @@ void Element::ClientQuads(Vector& quads) const { +@@ -2108,6 +2109,10 @@ void Element::ClientQuads(Vector& quads) const { element_layout_object->IsBR()) { element_layout_object->AbsoluteQuads(quads); } @@ -274,7 +274,7 @@ diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/ } DOMRectList* Element::getClientRects() { -@@ -2171,6 +2176,9 @@ gfx::RectF Element::GetBoundingClientRectNoLifecycleUpdate() const { +@@ -2150,6 +2155,9 @@ gfx::RectF Element::GetBoundingClientRectNoLifecycleUpdate() const { DCHECK(element_layout_object); GetDocument().AdjustRectForScrollAndAbsoluteZoom(result, *element_layout_object); @@ -338,7 +338,7 @@ diff --git a/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creat diff --git a/third_party/blink/renderer/core/html/canvas/text_metrics.cc b/third_party/blink/renderer/core/html/canvas/text_metrics.cc --- a/third_party/blink/renderer/core/html/canvas/text_metrics.cc +++ b/third_party/blink/renderer/core/html/canvas/text_metrics.cc -@@ -68,6 +68,24 @@ TextMetrics::TextMetrics(const Font& font, +@@ -69,6 +69,24 @@ TextMetrics::TextMetrics(const Font& font, Update(font, direction, baseline, align, text); } @@ -469,7 +469,7 @@ diff --git a/third_party/blink/renderer/core/svg/svg_text_content_element.cc b/t diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc --- a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc +++ b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc -@@ -44,6 +44,7 @@ +@@ -47,6 +47,7 @@ #include "third_party/blink/renderer/platform/graphics/bitmap_image.h" #include "third_party/blink/renderer/platform/graphics/filters/paint_filter_builder.h" #include "third_party/blink/renderer/platform/graphics/graphics_context.h" @@ -477,7 +477,7 @@ diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_c #include "third_party/blink/renderer/platform/graphics/skia/skia_utils.h" #include "third_party/blink/renderer/platform/graphics/stroke_data.h" #include "third_party/blink/renderer/platform/graphics/video_frame_image_util.h" -@@ -53,6 +54,9 @@ +@@ -56,6 +57,9 @@ #include "ui/gfx/geometry/quad_f.h" #include "ui/gfx/geometry/skia_conversions.h" @@ -487,7 +487,7 @@ diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_c namespace blink { BASE_FEATURE(kDisableCanvasOverdrawOptimization, -@@ -2187,6 +2191,10 @@ ImageData* BaseRenderingContext2D::getImageDataInternal( +@@ -2208,6 +2212,10 @@ ImageData* BaseRenderingContext2D::getImageDataInternal( snapshot->PaintImageForCurrentFrame().GetSkImageInfo().bounds(); DCHECK(!bounds.intersect(SkIRect::MakeXYWH(sx, sy, sw, sh))); } @@ -498,7 +498,7 @@ diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_c } return image_data; -@@ -2864,9 +2872,23 @@ TextMetrics* BaseRenderingContext2D::measureText(const String& text) { +@@ -2892,9 +2900,23 @@ TextMetrics* BaseRenderingContext2D::measureText(const String& text) { TextDirection direction = ToTextDirection(GetState().GetDirection(), canvas); @@ -526,7 +526,7 @@ diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_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 -@@ -1648,7 +1648,9 @@ component("platform") { +@@ -1657,7 +1657,9 @@ component("platform") { "//third_party/blink/renderer:non_test_config", ] @@ -537,7 +537,7 @@ diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/re allow_circular_includes_from = [ "//third_party/blink/renderer/platform/blob", -@@ -1722,6 +1724,7 @@ component("platform") { +@@ -1731,6 +1733,7 @@ component("platform") { "//third_party/blink/public/strings", "//third_party/blink/renderer/platform/wtf", "//third_party/ced", @@ -548,10 +548,11 @@ diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/re diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.cc b/third_party/blink/renderer/platform/exported/web_runtime_features.cc --- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc +++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc -@@ -65,4 +65,16 @@ void WebRuntimeFeatures::EnableFluentScrollbars(bool enable) { - ScrollbarThemeSettings::SetFluentScrollbarsEnabled(enable); +@@ -68,4 +68,17 @@ void WebRuntimeFeatures::EnableFluentScrollbars(bool enable) { + void WebRuntimeFeatures::EnableFluentOverlayScrollbars(bool enable) { + RuntimeEnabledFeatures::SetFluentOverlayScrollbarsEnabled(enable); } - ++ +void WebRuntimeFeatures::EnableFingerprintingClientRectsNoise(bool enable) { + RuntimeEnabledFeatures::SetFingerprintingClientRectsNoiseEnabled(enable); +} @@ -781,7 +782,7 @@ diff --git a/third_party/blink/renderer/platform/graphics/static_bitmap_image.h 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 -@@ -3122,6 +3122,15 @@ +@@ -3202,6 +3202,15 @@ status: {"Android": "", "default": "stable"}, base_feature: "none", }, diff --git a/build/patches/Offer-builtin-autocomplete-for-chrome-flags.patch b/build/patches/Offer-builtin-autocomplete-for-chrome-flags.patch index 87132e775..5dbfed3f9 100644 --- a/build/patches/Offer-builtin-autocomplete-for-chrome-flags.patch +++ b/build/patches/Offer-builtin-autocomplete-for-chrome-flags.patch @@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc --- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc +++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc -@@ -296,6 +296,8 @@ std::vector ChromeAutocompleteProviderClient::GetBuiltinURLs() { +@@ -294,6 +294,8 @@ std::vector ChromeAutocompleteProviderClient::GetBuiltinURLs() { std::vector ChromeAutocompleteProviderClient::GetBuiltinsToProvideAsUserTypes() { std::vector builtins_to_provide; @@ -18,6 +18,6 @@ diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc + base::ASCIIToUTF16(chrome::kChromeUIFlagsURL)); builtins_to_provide.push_back( base::ASCIIToUTF16(chrome::kChromeUIChromeURLsURL)); - builtins_to_provide.push_back( + builtins_to_provide.push_back(base::ASCIIToUTF16(chrome::kChromeUIFlagsURL)); -- 2.25.1 diff --git a/build/patches/OpenSearch-miscellaneous.patch b/build/patches/OpenSearch-miscellaneous.patch index d35a2dc1f..66ad844a0 100644 --- a/build/patches/OpenSearch-miscellaneous.patch +++ b/build/patches/OpenSearch-miscellaneous.patch @@ -264,7 +264,7 @@ diff --git a/components/search_engines/template_url_service.h b/components/searc // regardless of |url| if the default search provider is managed by policy or // controlled by an extension. bool CanMakeDefault(const TemplateURL* url) const; -@@ -643,9 +646,6 @@ class TemplateURLService : public WebDataServiceConsumer, +@@ -650,9 +653,6 @@ class TemplateURLService : public WebDataServiceConsumer, // SetKeywordSearchTermsForURL is invoked. void UpdateKeywordSearchTermsForURL(const URLVisitedDetails& details); diff --git a/build/patches/Override-Navigator-Language.patch b/build/patches/Override-Navigator-Language.patch index 3f238c8d0..a1bd36591 100644 --- a/build/patches/Override-Navigator-Language.patch +++ b/build/patches/Override-Navigator-Language.patch @@ -52,7 +52,7 @@ diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browse diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -68,6 +68,7 @@ +@@ -69,6 +69,7 @@ #include "cc/base/switches.h" #include "components/discardable_memory/public/mojom/discardable_shared_memory_manager.mojom.h" #include "components/discardable_memory/service/discardable_shared_memory_manager.h" @@ -60,7 +60,7 @@ diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content #include "components/metrics/single_sample_metrics.h" #include "components/services/storage/privileged/mojom/indexed_db_control.mojom.h" #include "components/services/storage/public/cpp/buckets/bucket_id.h" -@@ -3217,8 +3218,11 @@ void RenderProcessHostImpl::AppendRendererCommandLine( +@@ -3291,8 +3292,11 @@ void RenderProcessHostImpl::AppendRendererCommandLine( PropagateBrowserCommandLineToRenderer(browser_command_line, command_line); // Pass on the browser locale. diff --git a/build/patches/Partition-Blink-memory-cache.patch b/build/patches/Partition-Blink-memory-cache.patch index 5aa783ad2..612822316 100644 --- a/build/patches/Partition-Blink-memory-cache.patch +++ b/build/patches/Partition-Blink-memory-cache.patch @@ -54,7 +54,7 @@ diff --git a/third_party/blink/renderer/core/html/parser/html_srcset_parser.cc b diff --git a/third_party/blink/renderer/core/inspector/inspector_network_agent.cc b/third_party/blink/renderer/core/inspector/inspector_network_agent.cc --- a/third_party/blink/renderer/core/inspector/inspector_network_agent.cc +++ b/third_party/blink/renderer/core/inspector/inspector_network_agent.cc -@@ -2317,7 +2317,7 @@ bool InspectorNetworkAgent::FetchResourceContent(Document* document, +@@ -2318,7 +2318,7 @@ bool InspectorNetworkAgent::FetchResourceContent(Document* document, Resource* cached_resource = document->Fetcher()->CachedResource(url); if (!cached_resource) { cached_resource = MemoryCache::Get()->ResourceForURL( @@ -66,7 +66,7 @@ diff --git a/third_party/blink/renderer/core/inspector/inspector_network_agent.c diff --git a/third_party/blink/renderer/core/inspector/inspector_page_agent.cc b/third_party/blink/renderer/core/inspector/inspector_page_agent.cc --- a/third_party/blink/renderer/core/inspector/inspector_page_agent.cc +++ b/third_party/blink/renderer/core/inspector/inspector_page_agent.cc -@@ -165,9 +165,9 @@ Resource* CachedResource(LocalFrame* frame, +@@ -167,9 +167,9 @@ Resource* CachedResource(LocalFrame* frame, if (!document) return nullptr; Resource* cached_resource = document->Fetcher()->CachedResource(url); @@ -175,7 +175,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/memory_cache.h b/t diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc --- a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc +++ b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc -@@ -879,7 +879,8 @@ Resource* ResourceFetcher::CreateResourceForStaticData( +@@ -799,7 +799,8 @@ Resource* ResourceFetcher::CreateResourceForStaticData( if (!archive_ && factory.GetType() == ResourceType::kRaw) return nullptr; @@ -185,7 +185,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.c // Most off-main-thread resource fetches use Resource::kRaw and don't reach // this point, but off-main-thread module fetches might. if (IsMainThread()) { -@@ -1360,7 +1361,9 @@ Resource* ResourceFetcher::RequestResource(FetchParameters& params, +@@ -1150,7 +1151,9 @@ Resource* ResourceFetcher::RequestResource(FetchParameters& params, resource = nullptr; } else { resource = MemoryCache::Get()->ResourceForURL( @@ -196,7 +196,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.c } if (resource) { policy = DetermineRevalidationPolicy(resource_type, params, *resource, -@@ -1468,6 +1471,8 @@ Resource* ResourceFetcher::RequestResource(FetchParameters& params, +@@ -1258,6 +1261,8 @@ Resource* ResourceFetcher::RequestResource(FetchParameters& params, if (resource_cache_remote_.is_bound()) { resource_cache_remote_->Contains( params.Url(), @@ -205,7 +205,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.c WTF::BindOnce(&ResourceFetcher::OnResourceCacheContainsFinished, WrapWeakPersistent(this), base::TimeTicks::Now(), resource_request.GetRequestDestination())); -@@ -1619,7 +1624,8 @@ Resource* ResourceFetcher::CreateResourceForLoading( +@@ -1412,7 +1417,8 @@ Resource* ResourceFetcher::CreateResourceForLoading( const FetchParameters& params, const ResourceFactory& factory) { const String cache_identifier = @@ -215,7 +215,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.c if (!base::FeatureList::IsEnabled( blink::features::kScopeMemoryCachePerContext)) { DCHECK(!IsMainThread() || params.IsStaleRevalidation() || -@@ -2629,10 +2635,13 @@ void ResourceFetcher::UpdateAllImageResourcePriorities() { +@@ -2418,10 +2424,13 @@ void ResourceFetcher::UpdateAllImageResourcePriorities() { to_be_removed.clear(); } @@ -231,7 +231,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.c } // Requests that can be satisfied via `archive_` (i.e. MHTML) or -@@ -2645,7 +2654,7 @@ String ResourceFetcher::GetCacheIdentifier(const KURL& url) const { +@@ -2434,7 +2443,7 @@ String ResourceFetcher::GetCacheIdentifier(const KURL& url) const { if (bundle) return bundle->GetCacheIdentifier(); diff --git a/build/patches/Re-introduce-override_build_timestamp.patch b/build/patches/Re-introduce-override_build_timestamp.patch index f74aa1a70..e220630c5 100644 --- a/build/patches/Re-introduce-override_build_timestamp.patch +++ b/build/patches/Re-introduce-override_build_timestamp.patch @@ -16,7 +16,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 -@@ -4099,8 +4099,13 @@ action("build_date") { +@@ -4119,8 +4119,13 @@ action("build_date") { args = [ rebase_path("$target_gen_dir/generated_build_date.h", root_build_dir), diff --git a/build/patches/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch b/build/patches/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch index f61721edc..a7f3dff94 100644 --- a/build/patches/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch +++ b/build/patches/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch @@ -4,28 +4,26 @@ Subject: Reduce HTTP headers in DoH requests to bare minimum License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - net/base/load_flags_list.h | 6 ++++++ + net/base/load_flags_list.h | 4 ++++ net/dns/dns_transaction.cc | 2 +- net/url_request/url_request_http_job.cc | 10 +++++++--- - 3 files changed, 14 insertions(+), 4 deletions(-) + 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/net/base/load_flags_list.h b/net/base/load_flags_list.h --- a/net/base/load_flags_list.h +++ b/net/base/load_flags_list.h -@@ -110,3 +110,9 @@ LOAD_FLAG(CAN_USE_SHARED_DICTIONARY, 1 << 17) - // Indicates that CAN_USE_SHARED_DICTIONARY must be disabled after a redirect to - // another origin. - LOAD_FLAG(DISABLE_SHARED_DICTIONARY_AFTER_CROSS_ORIGIN_REDIRECT, 1 << 18) +@@ -114,3 +114,7 @@ LOAD_FLAG(DISABLE_SHARED_DICTIONARY_AFTER_CROSS_ORIGIN_REDIRECT, 1 << 18) + // This flag is used to bypass HSTS upgrades. This flag must be set for AIA, + // CRL, and OCSP requests in order to prevent circular dependencies. + LOAD_FLAG(SHOULD_BYPASS_HSTS, 1 << 19) + -+// This load will not send Accept-Language or User-Agent headers, and not -+// advertise brotli encoding. +// Used to comply with IETF (draft) DNS-over-HTTPS: +// "Implementors SHOULD NOT set non-essential HTTP headers in DoH client requests." -+LOAD_FLAG(MINIMAL_HEADERS, 1 << 19) ++LOAD_FLAG(MINIMAL_HEADERS, 1 << 20) diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc --- a/net/dns/dns_transaction.cc +++ b/net/dns/dns_transaction.cc -@@ -480,7 +480,7 @@ class DnsHTTPAttempt : public DnsAttempt, public URLRequest::Delegate { +@@ -484,7 +484,7 @@ class DnsHTTPAttempt : public DnsAttempt, public URLRequest::Delegate { // avoid deadlock and enable the use of preconfigured IP addresses. request_->SetSecureDnsPolicy(SecureDnsPolicy::kBootstrap); request_->SetLoadFlags(request_->load_flags() | LOAD_DISABLE_CACHE | @@ -37,7 +35,7 @@ diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc --- a/net/url_request/url_request_http_job.cc +++ b/net/url_request/url_request_http_job.cc -@@ -360,6 +360,7 @@ void URLRequestHttpJob::OnGotFirstPartySetMetadata( +@@ -419,6 +419,7 @@ void URLRequestHttpJob::OnGotFirstPartySetMetadata( // fields in the referrer. GURL referrer(request_->referrer()); @@ -45,7 +43,7 @@ diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_reque // Our consumer should have made sure that this is a safe referrer (e.g. via // URLRequestJob::ComputeReferrerForPolicy). if (referrer.is_valid()) { -@@ -367,11 +368,14 @@ void URLRequestHttpJob::OnGotFirstPartySetMetadata( +@@ -426,11 +427,14 @@ void URLRequestHttpJob::OnGotFirstPartySetMetadata( request_info_.extra_headers.SetHeader(HttpRequestHeaders::kReferer, referer_value); } @@ -60,7 +58,7 @@ diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_reque AddExtraHeaders(); -@@ -628,10 +632,10 @@ void URLRequestHttpJob::StartTransactionInternal() { +@@ -687,10 +691,10 @@ void URLRequestHttpJob::StartTransactionInternal() { void URLRequestHttpJob::AddExtraHeaders() { request_info_.extra_headers.SetAcceptEncodingIfMissing( request()->url(), request()->accepted_stream_types(), diff --git a/build/patches/Remove-HTTP-referrals-in-cross-origin-navigation.patch b/build/patches/Remove-HTTP-referrals-in-cross-origin-navigation.patch index 2e190e452..0e95cca3a 100644 --- a/build/patches/Remove-HTTP-referrals-in-cross-origin-navigation.patch +++ b/build/patches/Remove-HTTP-referrals-in-cross-origin-navigation.patch @@ -37,10 +37,10 @@ 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 -@@ -667,6 +667,8 @@ chrome_java_resources = [ +@@ -673,6 +673,8 @@ chrome_java_resources = [ + "java/res/xml/phone_as_a_security_key_accessory_filter.xml", "java/res/xml/incognito_preferences.xml", "java/res/xml/privacy_preferences.xml", - "java/res/xml/privacy_preferences_v2.xml", + "java/res/xml/referer_policy_preferences.xml", + "java/res/layout/radio_button_group_referer_policy_preference.xml", "java/res/xml/search_widget_info.xml", @@ -49,9 +49,9 @@ 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 -@@ -978,6 +978,8 @@ chrome_java_sources = [ - "java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java", +@@ -986,6 +986,8 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/privacy_sandbox/ChromeTrackingProtectionDelegate.java", + "java/src/org/chromium/chrome/browser/privacy_sandbox/TrackingProtectionNoticeController.java", "java/src/org/chromium/chrome/browser/privacy/settings/IncognitoSettings.java", + "java/src/org/chromium/chrome/browser/privacy/settings/RefererSettingsFragment.java", + "java/src/org/chromium/chrome/browser/privacy/settings/RadioButtonGroupRefererSettings.java", @@ -113,7 +113,7 @@ new file mode 100644 diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml --- a/chrome/android/java/res/xml/privacy_preferences.xml +++ b/chrome/android/java/res/xml/privacy_preferences.xml -@@ -76,6 +76,10 @@ found in the LICENSE file. +@@ -90,6 +90,10 @@ found in the LICENSE file. android:title="@string/close_tabs_on_exit_title" android:summary="@string/close_tabs_on_exit_summary" android:defaultValue="false" /> @@ -122,8 +122,8 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi + android:title="@string/referers_policy_title" + android:fragment="org.chromium.chrome.browser.privacy.settings.RefererSettingsFragment"/> diff --git a/chrome/android/java/res/xml/referer_policy_preferences.xml b/chrome/android/java/res/xml/referer_policy_preferences.xml new file mode 100644 --- /dev/null @@ -179,7 +179,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting private static final String PREF_PRIVACY_SANDBOX = "privacy_sandbox"; private static final String PREF_PROXY_OPTIONS = "proxy"; private static final String PREF_PRIVACY_GUIDE = "privacy_guide"; -@@ -359,6 +361,10 @@ public class PrivacySettings +@@ -357,6 +359,10 @@ public class PrivacySettings : R.string.text_off); } @@ -371,7 +371,7 @@ new file mode 100644 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 -@@ -557,6 +557,9 @@ SystemNetworkContextManager::SystemNetworkContextManager( +@@ -556,6 +556,9 @@ SystemNetworkContextManager::SystemNetworkContextManager( base::BindRepeating(&SystemNetworkContextManager::UpdateReferrersEnabled, base::Unretained(this))); @@ -381,7 +381,7 @@ diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/brows pref_change_registrar_.Add( prefs::kExplicitlyAllowedNetworkPorts, base::BindRepeating( -@@ -648,6 +651,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRegistrySimple* registry) { +@@ -653,6 +656,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRegistrySimple* registry) { // the system NetworkContext, and the per-profile pref values are used for // the profile NetworkContexts. registry->RegisterBooleanPref(prefs::kEnableReferrers, true); @@ -403,7 +403,7 @@ diff --git a/chrome/browser/renderer_preferences_util.cc b/chrome/browser/render 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 -@@ -1016,6 +1016,30 @@ CHAR_LIMIT guidelines: +@@ -1028,6 +1028,30 @@ CHAR_LIMIT guidelines: For example, some websites may respond to this request by showing you ads that aren’t based on other websites you’ve visited. Many websites will still collect and use your browsing data — for example to improve security, to provide content, ads and recommendations, and to generate reporting statistics. @@ -437,7 +437,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro diff --git a/chrome/browser/ui/prefs/pref_watcher.cc b/chrome/browser/ui/prefs/pref_watcher.cc --- a/chrome/browser/ui/prefs/pref_watcher.cc +++ b/chrome/browser/ui/prefs/pref_watcher.cc -@@ -106,6 +106,8 @@ PrefWatcher::PrefWatcher(Profile* profile) +@@ -93,6 +93,8 @@ PrefWatcher::PrefWatcher(Profile* profile) renderer_callback); profile_pref_change_registrar_.Add(prefs::kEnableReferrers, renderer_callback); @@ -461,7 +461,7 @@ diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.cc b/chrome/browser/ui/pre diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h -@@ -1469,6 +1469,9 @@ inline constexpr char kEnableReferrers[] = "enable_referrers"; +@@ -1482,6 +1482,9 @@ inline constexpr char kEnableReferrers[] = "enable_referrers"; inline constexpr char kEnableEncryptedMedia[] = "webkit.webprefs.encrypted_media_enabled"; @@ -474,7 +474,7 @@ diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h 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 -@@ -393,6 +393,14 @@ void AddAdditionalRequestHeaders( +@@ -394,6 +394,14 @@ void AddAdditionalRequestHeaders( blink::mojom::Referrer(GURL(), network::mojom::ReferrerPolicy::kNever); } diff --git a/build/patches/Remove-SMS-integration.patch b/build/patches/Remove-SMS-integration.patch index 415656059..4dbe29ee6 100644 --- a/build/patches/Remove-SMS-integration.patch +++ b/build/patches/Remove-SMS-integration.patch @@ -43,7 +43,7 @@ diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browse - if (shouldUseSystemManagedLocale()) { - setSystemManagedAppLanguage(languageName); - } else { -- SharedPreferencesManager.getInstance().writeString( +- ChromeSharedPreferences.getInstance().writeString( - ChromePreferenceKeys.APPLICATION_OVERRIDE_LANGUAGE, languageName); - } - } @@ -73,10 +73,10 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/sms/Sm -import com.google.android.gms.common.ConnectionResult; -import com.google.android.gms.common.GoogleApiAvailability; - - import org.chromium.base.ContextUtils; - import org.chromium.base.Log; - import org.chromium.base.ResettersForTesting; -@@ -44,17 +41,11 @@ public class SmsProviderGms { + import org.jni_zero.CalledByNative; + import org.jni_zero.JNINamespace; + import org.jni_zero.NativeMethods; +@@ -45,17 +42,11 @@ public class SmsProviderGms { @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) public SmsProviderGms(long smsProviderGmsAndroid, @GmsBackend int backend, @@ -95,7 +95,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/sms/Sm if (mBackend == GmsBackend.AUTO || mBackend == GmsBackend.USER_CONSENT) { mUserConsentReceiver = new SmsUserConsentReceiver(this, mContext); } -@@ -86,12 +77,7 @@ public class SmsProviderGms { +@@ -87,12 +78,7 @@ public class SmsProviderGms { @CalledByNative private static SmsProviderGms create(long smsProviderGmsAndroid, @GmsBackend int backend) { Log.d(TAG, "Creating SmsProviderGms"); @@ -109,7 +109,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/sms/Sm } @CalledByNative -@@ -180,13 +166,6 @@ public class SmsProviderGms { +@@ -181,13 +167,6 @@ public class SmsProviderGms { } public Wrappers.SmsRetrieverClientWrapper getClient() { diff --git a/build/patches/Remove-binary-blob-integrations.patch b/build/patches/Remove-binary-blob-integrations.patch index c269a53c0..1adc2c116 100644 --- a/build/patches/Remove-binary-blob-integrations.patch +++ b/build/patches/Remove-binary-blob-integrations.patch @@ -27,7 +27,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html ...em_webview_bundle.AndroidManifest.expected | 5 - build/android/gyp/proguard.py | 2 + build/config/android/config.gni | 4 +- - chrome/android/BUILD.gn | 48 +- + chrome/android/BUILD.gn | 47 +- chrome/android/chrome_java_sources.gni | 5 - .../features/cablev2_authenticator/BUILD.gn | 2 - chrome/android/java/AndroidManifest.xml | 50 -- @@ -73,7 +73,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../media_router/MediaStatusBridge.java | 40 +- .../caf/BaseNotificationController.java | 53 -- .../caf/BaseSessionController.java | 100 +-- - .../caf/CafBaseMediaRouteProvider.java | 103 +--- + .../caf/CafBaseMediaRouteProvider.java | 103 +-- .../caf/CafMediaRouteProvider.java | 16 - .../media_router/caf/CafMessageHandler.java | 97 +-- .../media_router/caf/CastMediaSource.java | 10 +- @@ -82,14 +82,14 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../media_router/caf/CastUtils.java | 8 - .../CafExpandedControllerActivity.java | 35 +- .../CafRemotingMediaRouteProvider.java | 4 +- - .../remoting/FlingingControllerAdapter.java | 74 --- + .../remoting/FlingingControllerAdapter.java | 74 -- .../caf/remoting/RemotingMediaSource.java | 8 +- .../remoting/RemotingSessionController.java | 26 - .../test/android/cast_emulator/BUILD.gn | 1 - components/module_installer/android/BUILD.gn | 4 - components/signin/public/android/BUILD.gn | 3 - .../signin/AccountRenameChecker.java | 16 - - components/webauthn/android/BUILD.gn | 12 - + components/webauthn/android/BUILD.gn | 11 - .../webauthn/AuthenticatorImpl.java | 93 +-- .../webauthn/CredManMetricsHelper.java | 17 - .../webauthn/Fido2ApiCallHelper.java | 58 +- @@ -101,11 +101,11 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html services/BUILD.gn | 9 - services/device/geolocation/BUILD.gn | 4 - services/shape_detection/BUILD.gn | 2 - - third_party/android_deps/BUILD.gn | 570 +----------------- + third_party/android_deps/BUILD.gn | 652 +----------------- .../preconditions/javatests/BUILD.gn | 1 - .../gms/ChromiumPlayServicesAvailability.java | 10 +- third_party/cardboard/BUILD.gn | 4 - - 81 files changed, 97 insertions(+), 2011 deletions(-) + 81 files changed, 97 insertions(+), 2091 deletions(-) diff --git a/android_webview/expectations/system_webview_bundle.AndroidManifest.expected b/android_webview/expectations/system_webview_bundle.AndroidManifest.expected --- a/android_webview/expectations/system_webview_bundle.AndroidManifest.expected @@ -158,7 +158,7 @@ diff --git a/build/config/android/config.gni b/build/config/android/config.gni diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -291,14 +291,6 @@ if (current_toolchain == default_toolchain) { +@@ -285,14 +285,6 @@ if (current_toolchain == default_toolchain) { ":google_api_keys_java", ":update_proto_java", ":usage_stats_proto_java", @@ -170,10 +170,10 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn - "$google_play_services_package:google_play_services_gcm_java", - "$google_play_services_package:google_play_services_iid_java", - "$google_play_services_package:google_play_services_tasks_java", - "//base:jni_java", "//cc:cc_java", "//cc/mojom:mojom_java", -@@ -625,14 +617,23 @@ if (current_toolchain == default_toolchain) { + "//chrome/android/features/keyboard_accessory:public_java", +@@ -618,13 +610,23 @@ if (current_toolchain == default_toolchain) { "//services/shape_detection:shape_detection_java", "//services/shape_detection/public/mojom:mojom_java", "//skia/public/mojom:mojom_java", @@ -191,7 +191,6 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn + "//third_party/android_deps:chromium_play_services_availability_java", - "//third_party/android_deps:com_google_code_findbugs_jsr305_java", -- "//third_party/android_deps:com_google_guava_listenablefuture_java", "//third_party/android_deps:dagger_java", "//third_party/android_deps:guava_android_java", "//third_party/android_deps:javax_inject_javax_inject_java", @@ -200,7 +199,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn "//third_party/android_deps:protobuf_lite_runtime_java", "//third_party/android_media:android_media_java", "//third_party/android_swipe_refresh:android_swipe_refresh_java", -@@ -915,12 +916,6 @@ if (current_toolchain == default_toolchain) { +@@ -908,12 +910,6 @@ if (current_toolchain == default_toolchain) { ":chrome_jni_headers", ":chrome_unit_test_util_java", ":delegate_public_impl_java", @@ -213,7 +212,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn "//base:base_java_test_support", "//base:base_java_test_support_uncommon", "//base:base_junit_test_support", -@@ -1537,13 +1532,6 @@ if (current_toolchain == default_toolchain) { +@@ -1537,13 +1533,6 @@ if (current_toolchain == default_toolchain) { ":chrome_app_java_resources", ":chrome_test_util_java", ":delegate_public_impl_java", @@ -227,15 +226,15 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn "//base:base_java", "//base:base_java_test_support", "//base:base_java_test_support_uncommon", -@@ -2459,7 +2447,6 @@ if (current_toolchain == default_toolchain) { +@@ -2462,7 +2451,6 @@ if (current_toolchain == default_toolchain) { ] deps = [ ":chrome_java", - "$google_play_services_package:google_play_services_gcm_java", "//base:base_java", "//base:base_java_test_support", - "//base:jni_java", -@@ -2553,7 +2540,6 @@ if (current_toolchain == default_toolchain) { + "//build/android:build_java", +@@ -2556,7 +2544,6 @@ if (current_toolchain == default_toolchain) { # is in a DFM. android_library("base_module_java") { sources = [ @@ -243,7 +242,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn "java/src/org/chromium/chrome/app/TrichromeZygotePreload.java", "java/src/org/chromium/chrome/browser/ChromeBackgroundService.java", "java/src/org/chromium/chrome/browser/ChromeBackupAgent.java", -@@ -2570,8 +2556,6 @@ if (current_toolchain == default_toolchain) { +@@ -2573,8 +2560,6 @@ if (current_toolchain == default_toolchain) { "java/src/org/chromium/chrome/browser/base/SplitCompatBackupAgent.java", "java/src/org/chromium/chrome/browser/base/SplitCompatContentProvider.java", "java/src/org/chromium/chrome/browser/base/SplitCompatCustomTabsService.java", @@ -252,7 +251,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn "java/src/org/chromium/chrome/browser/base/SplitCompatIntentService.java", "java/src/org/chromium/chrome/browser/base/SplitCompatJobService.java", "java/src/org/chromium/chrome/browser/base/SplitCompatMinidumpUploadJobService.java", -@@ -2594,17 +2578,11 @@ if (current_toolchain == default_toolchain) { +@@ -2597,17 +2582,11 @@ if (current_toolchain == default_toolchain) { "java/src/org/chromium/chrome/browser/notifications/NotificationService.java", "java/src/org/chromium/chrome/browser/photo_picker/DecoderService.java", "java/src/org/chromium/chrome/browser/provider/ChromeBrowserProvider.java", @@ -268,17 +267,17 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn - "$google_play_services_package:google_firebase_firebase_messaging_java", - "$google_play_services_package:google_play_services_gcm_java", "//base:base_java", - "//base:jni_java", "//chrome/browser/download/android:file_provider_java", -@@ -2618,7 +2596,6 @@ if (current_toolchain == default_toolchain) { + "//chrome/browser/flags:java", +@@ -2620,7 +2599,6 @@ if (current_toolchain == default_toolchain) { "//components/media_router/browser/android:cast_options_provider_java", "//components/minidump_uploader:minidump_uploader_java", "//components/module_installer/android:module_installer_java", - "//third_party/android_deps:playcore_java", "//third_party/androidx:androidx_annotation_annotation_java", "//third_party/androidx:androidx_collection_collection_java", - "//ui/android:ui_no_recycler_view_java", -@@ -2637,7 +2614,6 @@ if (current_toolchain == default_toolchain) { + "//third_party/jni_zero:jni_zero_java", +@@ -2640,7 +2618,6 @@ if (current_toolchain == default_toolchain) { # Deps to pull services into base module. # TODO(crbug.com/1126301): Consider moving these to the chrome module to # reduce base dex size. @@ -297,7 +296,7 @@ diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java "java/src/org/chromium/chrome/browser/ChromeBackupAgentImpl.java", "java/src/org/chromium/chrome/browser/ChromeBackupWatcher.java", "java/src/org/chromium/chrome/browser/ChromeBaseAppCompatActivity.java", -@@ -1003,10 +1002,6 @@ chrome_java_sources = [ +@@ -1011,10 +1010,6 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/segmentation_platform/ReaderModeActionProvider.java", "java/src/org/chromium/chrome/browser/segmentation_platform/SignalAccumulator.java", "java/src/org/chromium/chrome/browser/selection/ChromeSelectionDropdownMenuDelegate.java", @@ -318,8 +317,8 @@ diff --git a/chrome/android/features/cablev2_authenticator/BUILD.gn b/chrome/and - "$google_play_services_package:google_play_services_base_java", - "$google_play_services_package:google_play_services_tasks_java", "//base:base_java", - "//base:jni_java", "//build/android:build_java", + "//chrome/browser/webauthn/android:java_resources", diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml --- a/chrome/android/java/AndroidManifest.xml +++ b/chrome/android/java/AndroidManifest.xml @@ -403,7 +402,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro -@@ -1299,12 +1255,6 @@ by a child template that "extends" this file. +@@ -1302,12 +1258,6 @@ by a child template that "extends" this file. {% endif %} @@ -471,10 +470,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/PlayServicesVer -import com.google.android.gms.common.GoogleApiAvailability; - + import org.jni_zero.CalledByNative; + import org.chromium.base.PackageUtils; - import org.chromium.base.annotations.CalledByNative; - import org.chromium.components.externalauth.ExternalAuthUtils; -@@ -24,7 +22,7 @@ public class PlayServicesVersionInfo { +@@ -25,7 +23,7 @@ public class PlayServicesVersionInfo { */ @CalledByNative public static String getGmsInfo() { @@ -483,7 +482,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/PlayServicesVer final long installedGmsVersion = getApkVersionNumber(); final String accessType; -@@ -48,11 +46,6 @@ public class PlayServicesVersionInfo { +@@ -49,11 +47,6 @@ public class PlayServicesVersionInfo { * package is not found. */ public static int getApkVersionNumber() { @@ -499,7 +498,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/PlayServicesVer 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 -@@ -13,7 +13,6 @@ import org.chromium.chrome.browser.notifications.NotificationTriggerBackgroundTa +@@ -14,7 +14,6 @@ import org.chromium.chrome.browser.notifications.NotificationTriggerBackgroundTa import org.chromium.chrome.browser.notifications.scheduler.NotificationSchedulerTask; import org.chromium.chrome.browser.offlinepages.OfflineBackgroundTask; import org.chromium.chrome.browser.omaha.OmahaService; @@ -507,7 +506,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/background_task import org.chromium.chrome.browser.webapps.WebApkUpdateTask; import org.chromium.components.background_task_scheduler.BackgroundTask; import org.chromium.components.background_task_scheduler.BackgroundTaskFactory; -@@ -54,8 +53,6 @@ public class ChromeBackgroundTaskFactory implements BackgroundTaskFactory { +@@ -55,8 +54,6 @@ public class ChromeBackgroundTaskFactory implements BackgroundTaskFactory { switch (taskId) { case TaskIds.OMAHA_JOB_ID: return new OmahaService(); @@ -896,24 +895,24 @@ diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browse diff --git a/chrome/browser/password_manager/android/BUILD.gn b/chrome/browser/password_manager/android/BUILD.gn --- a/chrome/browser/password_manager/android/BUILD.gn +++ b/chrome/browser/password_manager/android/BUILD.gn -@@ -101,8 +101,6 @@ android_library("java") { +@@ -111,8 +111,6 @@ android_library("java") { ":android_backend_java_enums", ":java_resources", ":settings_interface_java", - "$google_play_services_package:google_play_services_base_java", - "$google_play_services_package:google_play_services_basement_java", "//base:base_java", - "//base:jni_java", "//build/android:build_java", -@@ -223,8 +221,6 @@ robolectric_binary("password_manager_junit_tests") { + "//chrome/browser/device_reauth/android:java", +@@ -232,8 +230,6 @@ robolectric_binary("password_manager_junit_tests") { ":public_impl_java", ":settings_interface_java", ":test_support_java", - "$google_play_services_package:google_play_services_base_java", - "$google_play_services_package:google_play_services_basement_java", + "add_username_dialog:junit", "pwd_migration:junit", "//base:base_java", - "//base:base_java_test_support", diff --git a/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerAndroidBackendUtil.java b/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerAndroidBackendUtil.java --- a/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerAndroidBackendUtil.java +++ b/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerAndroidBackendUtil.java @@ -1035,8 +1034,8 @@ diff --git a/chrome/browser/password_manager/android/java/src/org/chromium/chrom -import com.google.android.gms.common.api.ApiException; - - import org.chromium.base.annotations.CalledByNative; - import org.chromium.base.annotations.NativeMethods; + import org.jni_zero.CalledByNative; + import org.jni_zero.NativeMethods; @@ -73,11 +71,6 @@ class PasswordSyncControllerDelegateBridgeImpl { error = ((PasswordStoreAndroidBackend.BackendException) exception).errorCode; @@ -1053,7 +1052,7 @@ diff --git a/chrome/browser/password_manager/android/java/src/org/chromium/chrom diff --git a/chrome/browser/push_messaging/push_messaging_service_factory.cc b/chrome/browser/push_messaging/push_messaging_service_factory.cc --- a/chrome/browser/push_messaging/push_messaging_service_factory.cc +++ b/chrome/browser/push_messaging/push_messaging_service_factory.cc -@@ -26,13 +26,7 @@ +@@ -21,13 +21,7 @@ // static PushMessagingServiceImpl* PushMessagingServiceFactory::GetForProfile( content::BrowserContext* context) { @@ -1083,7 +1082,7 @@ diff --git a/chrome/browser/resources/settings/route.ts b/chrome/browser/resourc 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 -@@ -273,8 +273,6 @@ static_library("ui") { +@@ -269,8 +269,6 @@ static_library("ui") { "webui/flags/flags_ui.h", "webui/flags/flags_ui_handler.cc", "webui/flags/flags_ui_handler.h", @@ -1092,7 +1091,7 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn "webui/internals/internals_ui.cc", "webui/internals/internals_ui.h", "webui/interstitials/interstitial_ui.cc", -@@ -508,7 +506,6 @@ static_library("ui") { +@@ -505,7 +503,6 @@ static_library("ui") { "//components/feedback/redaction_tool", "//components/find_in_page", "//components/flags_ui", @@ -1124,7 +1123,7 @@ diff --git a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/brows diff --git a/chrome/browser/ui/webauthn/sheet_models.cc b/chrome/browser/ui/webauthn/sheet_models.cc --- a/chrome/browser/ui/webauthn/sheet_models.cc +++ b/chrome/browser/ui/webauthn/sheet_models.cc -@@ -192,12 +192,7 @@ bool AuthenticatorMechanismSelectorSheetModel::IsManageDevicesButtonVisible() +@@ -184,12 +184,7 @@ bool AuthenticatorMechanismSelectorSheetModel::IsManageDevicesButtonVisible() const { // If any phones are shown then also show a button that goes to the settings // page to manage them. @@ -1141,7 +1140,7 @@ diff --git a/chrome/browser/ui/webauthn/sheet_models.cc b/chrome/browser/ui/weba 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 -@@ -47,7 +47,6 @@ +@@ -42,7 +42,6 @@ #include "chrome/browser/ui/webui/download_internals/download_internals_ui.h" #include "chrome/browser/ui/webui/engagement/site_engagement_ui.h" #include "chrome/browser/ui/webui/flags/flags_ui.h" @@ -1149,7 +1148,7 @@ diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrom #include "chrome/browser/ui/webui/internals/internals_ui.h" #include "chrome/browser/ui/webui/interstitials/interstitial_ui.h" #include "chrome/browser/ui/webui/intro/intro_ui.h" -@@ -478,8 +477,6 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, +@@ -476,8 +475,6 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, return &NewWebUI; if (url.host_piece() == chrome::kChromeUIFlagsHost) return &NewWebUI; @@ -1167,8 +1166,8 @@ diff --git a/chrome/browser/webauthn/android/BUILD.gn b/chrome/browser/webauthn/ ":jni_headers", - "$google_play_services_package:google_play_services_tasks_java", "//base:base_java", - "//base:jni_java", "//build/android:build_java", + "//chrome/android:chrome_app_java_resources", diff --git a/chrome/browser/webauthn/android/java/src/org/chromium/chrome/browser/webauthn/CableAuthenticatorModuleProvider.java b/chrome/browser/webauthn/android/java/src/org/chromium/chrome/browser/webauthn/CableAuthenticatorModuleProvider.java --- a/chrome/browser/webauthn/android/java/src/org/chromium/chrome/browser/webauthn/CableAuthenticatorModuleProvider.java +++ b/chrome/browser/webauthn/android/java/src/org/chromium/chrome/browser/webauthn/CableAuthenticatorModuleProvider.java @@ -1178,10 +1177,10 @@ diff --git a/chrome/browser/webauthn/android/java/src/org/chromium/chrome/browse -import com.google.android.gms.tasks.Task; - - import org.chromium.base.ContextUtils; - import org.chromium.base.Log; - import org.chromium.base.PackageUtils; -@@ -45,7 +43,6 @@ import org.chromium.chrome.browser.notifications.NotificationWrapperBuilderFacto + import org.jni_zero.CalledByNative; + import org.jni_zero.NativeMethods; + +@@ -46,7 +44,6 @@ import org.chromium.chrome.browser.notifications.NotificationWrapperBuilderFacto import org.chromium.chrome.browser.notifications.channels.ChromeChannelDefinitions; import org.chromium.chrome.modules.cablev2_authenticator.Cablev2AuthenticatorModule; import org.chromium.components.externalauth.ExternalAuthUtils; @@ -1189,7 +1188,7 @@ diff --git a/chrome/browser/webauthn/android/java/src/org/chromium/chrome/browse import org.chromium.device.DeviceFeatureList; import org.chromium.device.DeviceFeatureMap; -@@ -284,25 +281,7 @@ public class CableAuthenticatorModuleProvider extends Fragment implements OnClic +@@ -285,25 +282,7 @@ public class CableAuthenticatorModuleProvider extends Fragment implements OnClic ok = false; } @@ -1219,7 +1218,7 @@ diff --git a/chrome/browser/webauthn/android/java/src/org/chromium/chrome/browse diff --git a/chrome/browser/webauthn/authenticator_request_dialog_model.cc b/chrome/browser/webauthn/authenticator_request_dialog_model.cc --- a/chrome/browser/webauthn/authenticator_request_dialog_model.cc +++ b/chrome/browser/webauthn/authenticator_request_dialog_model.cc -@@ -1772,10 +1772,6 @@ void AuthenticatorRequestDialogModel::PopulateMechanisms() { +@@ -1795,10 +1795,6 @@ void AuthenticatorRequestDialogModel::PopulateMechanisms() { if (cable_ui_type_) { switch (*cable_ui_type_) { case AuthenticatorRequestDialogModel::CableUIType::CABLE_V2_2ND_FACTOR: @@ -1246,7 +1245,7 @@ diff --git a/chrome/browser/webauthn/cablev2_devices.cc b/chrome/browser/webauth diff --git a/chrome/test/android/BUILD.gn b/chrome/test/android/BUILD.gn --- a/chrome/test/android/BUILD.gn +++ b/chrome/test/android/BUILD.gn -@@ -243,8 +243,6 @@ android_library("chrome_java_integration_test_support") { +@@ -284,8 +284,6 @@ android_library("chrome_java_integration_test_support") { deps = [ ":chrome_java_test_support_common", @@ -1254,7 +1253,7 @@ diff --git a/chrome/test/android/BUILD.gn b/chrome/test/android/BUILD.gn - "$google_play_services_package:google_play_services_basement_java", "//base:base_java", "//base:base_java_test_support", - "//build/android:build_java", + "//base/test:public_transit_java", diff --git a/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java b/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java --- a/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java +++ b/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java @@ -1452,8 +1451,8 @@ diff --git a/components/gcm_driver/instance_id/android/BUILD.gn b/components/gcm deps = [ - "$google_play_services_package:google_play_services_iid_java", "//base:base_java", - "//base:jni_java", "//build/android:build_java", + "//components/gcm_driver/android:gcm_driver_java", @@ -31,14 +30,12 @@ android_library("instance_id_driver_java") { sources = [ @@ -1466,13 +1465,13 @@ diff --git a/components/gcm_driver/instance_id/android/BUILD.gn b/components/gcm deps = [ ":instance_id_driver_java", - "$google_play_services_package:google_play_services_iid_java", - "//base:jni_java", + "//third_party/jni_zero:jni_zero_java", ] diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java b/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java --- a/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java +++ b/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java -@@ -27,7 +27,6 @@ public class InstanceIDBridge { +@@ -28,7 +28,6 @@ public class InstanceIDBridge { * Underlying InstanceIDWithSubtype. May be shared by multiple InstanceIDBridges. Must be * initialized on a background thread. */ @@ -1480,7 +1479,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com private static boolean sBlockOnAsyncTasksForTesting; -@@ -72,7 +71,7 @@ public class InstanceIDBridge { +@@ -73,7 +72,7 @@ public class InstanceIDBridge { new BridgeAsyncTask() { @Override protected String doBackgroundWork() { @@ -1489,7 +1488,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com } @Override protected void sendResultToNative(String id) { -@@ -88,7 +87,7 @@ public class InstanceIDBridge { +@@ -89,7 +88,7 @@ public class InstanceIDBridge { new BridgeAsyncTask() { @Override protected Long doBackgroundWork() { @@ -1498,7 +1497,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com } @Override protected void sendResultToNative(Long creationTime) { -@@ -110,21 +109,7 @@ public class InstanceIDBridge { +@@ -111,21 +110,7 @@ public class InstanceIDBridge { new BridgeAsyncTask() { @Override protected String doBackgroundWork() { @@ -1520,7 +1519,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com } @Override protected void sendResultToNative(String token) { -@@ -141,21 +126,7 @@ public class InstanceIDBridge { +@@ -142,21 +127,7 @@ public class InstanceIDBridge { new BridgeAsyncTask() { @Override protected Boolean doBackgroundWork() { @@ -1543,7 +1542,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com } @Override protected void sendResultToNative(Boolean success) { -@@ -171,12 +142,7 @@ public class InstanceIDBridge { +@@ -172,12 +143,7 @@ public class InstanceIDBridge { new BridgeAsyncTask() { @Override protected Boolean doBackgroundWork() { @@ -1557,7 +1556,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com } @Override protected void sendResultToNative(Boolean success) { -@@ -206,11 +172,6 @@ public class InstanceIDBridge { +@@ -207,11 +173,6 @@ public class InstanceIDBridge { @Override @SuppressWarnings("NoSynchronizedThisCheck") // Only used/accessible by native. protected Result doInBackground() { @@ -1581,8 +1580,8 @@ diff --git a/components/media_router/browser/android/BUILD.gn b/components/media - "$google_play_services_package:google_play_services_cast_framework_java", - "$google_play_services_package:google_play_services_cast_java", "//base:base_java", - "//base:jni_java", "//build/android:build_java", + "//components/browser_ui/media/android:java", @@ -77,8 +73,6 @@ android_library("java") { android_library("cast_options_provider_java") { sources = [ "java/src/org/chromium/components/media_router/caf/CastOptionsProvider.java" ] @@ -1599,8 +1598,8 @@ diff --git a/components/media_router/browser/android/BUILD.gn b/components/media - "$google_play_services_package:google_play_services_cast_java", "//base:base_java", "//base:base_java_test_support", - "//base:jni_java", -@@ -148,10 +141,6 @@ robolectric_library("junit") { + "//components/browser_ui/media/android:java", +@@ -149,10 +142,6 @@ robolectric_library("junit") { deps = [ ":java", ":test_support_java", @@ -1621,10 +1620,10 @@ diff --git a/components/media_router/browser/android/java/src/org/chromium/compo -import com.google.android.gms.common.ConnectionResult; -import com.google.android.gms.common.GoogleApiAvailability; - - import org.chromium.base.ContextUtils; - import org.chromium.base.Log; - import org.chromium.base.ResettersForTesting; -@@ -43,20 +40,7 @@ public class BrowserMediaRouter implements MediaRouteManager { + import org.jni_zero.CalledByNative; + import org.jni_zero.JNINamespace; + import org.jni_zero.NativeMethods; +@@ -44,20 +41,7 @@ public class BrowserMediaRouter implements MediaRouteManager { new MediaRouteProvider.Factory() { @Override public void addProviders(MediaRouteManager manager) { @@ -1758,10 +1757,10 @@ diff --git a/components/media_router/browser/android/java/src/org/chromium/compo -import com.google.android.gms.cast.MediaMetadata; -import com.google.android.gms.cast.MediaStatus; - - import org.chromium.base.annotations.CalledByNative; - import org.chromium.base.annotations.JNINamespace; + import org.jni_zero.CalledByNative; + import org.jni_zero.JNINamespace; -@@ -17,11 +13,6 @@ import org.chromium.base.annotations.JNINamespace; +@@ -17,11 +13,6 @@ import org.jni_zero.JNINamespace; */ @JNINamespace("media_router") public class MediaStatusBridge { @@ -2900,7 +2899,7 @@ diff --git a/components/media_router/browser/android/java/src/org/chromium/compo diff --git a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/RemotingMediaSource.java b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/RemotingMediaSource.java --- a/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/RemotingMediaSource.java +++ b/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/RemotingMediaSource.java -@@ -13,8 +13,6 @@ import android.util.Base64; +@@ -14,8 +14,6 @@ import android.util.Base64; import androidx.annotation.Nullable; import androidx.mediarouter.media.MediaRouteSelector; @@ -2909,7 +2908,7 @@ diff --git a/components/media_router/browser/android/java/src/org/chromium/compo import org.chromium.base.ContextUtils; import org.chromium.base.Log; import org.chromium.components.media_router.MediaSource; -@@ -84,9 +82,7 @@ public class RemotingMediaSource implements MediaSource { +@@ -93,9 +91,7 @@ public class RemotingMediaSource implements MediaSource { */ @Override public MediaRouteSelector buildRouteSelector() { @@ -2920,7 +2919,7 @@ diff --git a/components/media_router/browser/android/java/src/org/chromium/compo } /** -@@ -113,7 +109,7 @@ public class RemotingMediaSource implements MediaSource { +@@ -122,7 +118,7 @@ public class RemotingMediaSource implements MediaSource { sApplicationId = (customAppId != null && !customAppId.isEmpty()) ? customAppId @@ -2961,8 +2960,8 @@ diff --git a/components/media_router/browser/android/java/src/org/chromium/compo @Override public void onSessionStarted() { super.onSessionStarted(); -@@ -65,17 +50,6 @@ public class RemotingSessionController extends BaseSessionController { - mFlingingControllerAdapter = new FlingingControllerAdapter(this, source.getMediaUrl()); +@@ -69,17 +54,6 @@ public class RemotingSessionController extends BaseSessionController { + } } - @Override @@ -2993,18 +2992,17 @@ diff --git a/components/media_router/test/android/cast_emulator/BUILD.gn b/compo diff --git a/components/module_installer/android/BUILD.gn b/components/module_installer/android/BUILD.gn --- a/components/module_installer/android/BUILD.gn +++ b/components/module_installer/android/BUILD.gn -@@ -34,11 +34,9 @@ android_library("module_installer_java") { +@@ -34,10 +34,8 @@ android_library("module_installer_java") { ] deps = [ - "$google_play_services_package:google_play_services_tasks_java", "//base:base_java", - "//base:jni_java", "//components/crash/android:java", - "//third_party/android_deps:playcore_java", "//third_party/androidx:androidx_annotation_annotation_java", + "//third_party/jni_zero:jni_zero_java", ] - @@ -58,11 +56,9 @@ robolectric_binary("module_installer_junit_tests") { ] deps = [ @@ -3027,9 +3025,9 @@ diff --git a/components/signin/public/android/BUILD.gn b/components/signin/publi - "$google_play_services_package:google_play_services_auth_base_java", - "$google_play_services_package:google_play_services_base_java", "//base:base_java", - "//base:jni_java", "//build/android:build_java", -@@ -178,7 +176,6 @@ robolectric_library("junit") { + "//components/externalauth/android:java", +@@ -187,7 +185,6 @@ robolectric_library("junit") { deps = [ ":java", ":signin_java_test_support", @@ -3073,21 +3071,19 @@ diff --git a/components/signin/public/android/java/src/org/chromium/components/s diff --git a/components/webauthn/android/BUILD.gn b/components/webauthn/android/BUILD.gn --- a/components/webauthn/android/BUILD.gn +++ b/components/webauthn/android/BUILD.gn -@@ -7,8 +7,6 @@ import("//third_party/jni_zero/jni_zero.gni") - +@@ -8,8 +8,6 @@ import("//third_party/jni_zero/jni_zero.gni") generate_jni("jni_headers") { sources = [ + "java/src/org/chromium/components/webauthn/CredManSupportProvider.java", - "java/src/org/chromium/components/webauthn/Fido2Api.java", - "java/src/org/chromium/components/webauthn/Fido2CredentialRequest.java", "java/src/org/chromium/components/webauthn/InternalAuthenticator.java", "java/src/org/chromium/components/webauthn/WebAuthnBrowserBridge.java", ] -@@ -21,13 +19,8 @@ android_library("java") { - "java/src/org/chromium/components/webauthn/AuthenticatorImpl.java", - "java/src/org/chromium/components/webauthn/AuthenticatorIncognitoConfirmationBottomsheet.java", - "java/src/org/chromium/components/webauthn/Barrier.java", -- "java/src/org/chromium/components/webauthn/CredManHelper.java", +@@ -34,11 +32,7 @@ android_library("java") { "java/src/org/chromium/components/webauthn/CredManMetricsHelper.java", + "java/src/org/chromium/components/webauthn/CredManSupportProvider.java", + "java/src/org/chromium/components/webauthn/CredManUiModeRecommender.java", - "java/src/org/chromium/components/webauthn/Fido2Api.java", - "java/src/org/chromium/components/webauthn/Fido2ApiCall.java", "java/src/org/chromium/components/webauthn/Fido2ApiCallHelper.java", @@ -3096,7 +3092,7 @@ diff --git a/components/webauthn/android/BUILD.gn b/components/webauthn/android/ "java/src/org/chromium/components/webauthn/GetAssertionResponseCallback.java", "java/src/org/chromium/components/webauthn/GetMatchingCredentialIdsResponseCallback.java", "java/src/org/chromium/components/webauthn/InternalAuthenticator.java", -@@ -39,9 +32,6 @@ android_library("java") { +@@ -52,9 +46,6 @@ android_library("java") { deps = [ ":java_resources", @@ -3104,12 +3100,12 @@ diff --git a/components/webauthn/android/BUILD.gn b/components/webauthn/android/ - "$google_play_services_package:google_play_services_basement_java", - "$google_play_services_package:google_play_services_tasks_java", "//base:base_java", - "//base:jni_java", "//build/android:build_java", -@@ -96,8 +86,6 @@ android_library("test_support_java") { - + "//components/browser_ui/bottomsheet/android:java", +@@ -115,8 +106,6 @@ android_library("test_support_java") { source_set("android") { sources = [ + "cred_man_support.h", - "fido2api_native_android.cc", - "fido2credentialrequest_native_android.cc", "internal_authenticator_android.cc", @@ -3433,7 +3429,7 @@ diff --git a/content/browser/push_messaging/push_messaging_manager.cc b/content/ 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 -@@ -142,10 +142,6 @@ android_library("content_full_java") { +@@ -143,10 +143,6 @@ android_library("content_full_java") { deps = [ ":content_java_resources", ":content_main_dex_java", @@ -3442,12 +3438,12 @@ diff --git a/content/public/android/BUILD.gn b/content/public/android/BUILD.gn - "$google_play_services_package:google_play_services_basement_java", - "$google_play_services_package:google_play_services_tasks_java", "//base:base_java", - "//base:jni_java", "//base:process_launcher_java", + "//build:chromeos_buildflags", diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn -@@ -3405,10 +3405,6 @@ if (is_android) { +@@ -3450,10 +3450,6 @@ if (is_android) { testonly = true sources = content_java_sources_needing_jni deps = [ @@ -3456,12 +3452,12 @@ diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn - "$google_play_services_package:google_play_services_basement_java", - "$google_play_services_package:google_play_services_tasks_java", "//base:base_java", - "//base:jni_java", "//content/public/android:content_java", + "//third_party/jni_zero:jni_zero_java", diff --git a/device/BUILD.gn b/device/BUILD.gn --- a/device/BUILD.gn +++ b/device/BUILD.gn -@@ -506,9 +506,6 @@ if (is_android) { +@@ -508,9 +508,6 @@ if (is_android) { "gamepad/android/junit/src/org/chromium/device/gamepad/GamepadMappingsTest.java", ] deps = [ @@ -3522,8 +3518,8 @@ diff --git a/services/device/geolocation/BUILD.gn b/services/device/geolocation/ - "$google_play_services_package:google_play_services_location_java", - "$google_play_services_package:google_play_services_tasks_java", "//base:base_java", - "//base:jni_java", "//build/android:build_java", + "//components/location/android:location_java", diff --git a/services/shape_detection/BUILD.gn b/services/shape_detection/BUILD.gn --- a/services/shape_detection/BUILD.gn +++ b/services/shape_detection/BUILD.gn @@ -3534,12 +3530,26 @@ diff --git a/services/shape_detection/BUILD.gn b/services/shape_detection/BUILD. - "$google_play_services_package:google_play_services_base_java", - "$google_play_services_package:google_play_services_basement_java", "//base:base_java", - "//base:jni_java", "//mojo/public/java:base_java", + "//mojo/public/java:bindings_java", diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.gn --- a/third_party/android_deps/BUILD.gn +++ b/third_party/android_deps/BUILD.gn -@@ -81,22 +81,13 @@ if (!limit_android_deps) { +@@ -52,13 +52,6 @@ if (!limit_android_deps) { + if (defined(guava_android_target) && + (!defined(clank_needs_listenable_future) || + clank_needs_listenable_future)) { +- java_prebuilt("com_google_guava_listenablefuture_java") { +- jar_path = "libs/com_google_guava_guava_android/guava-32.1.3-android.jar" +- output_name = "listenable_future" +- supports_android = true +- jar_included_patterns = +- [ "com/google/common/util/concurrent/ListenableFuture.class" ] +- } + } else { + java_group("com_google_guava_listenablefuture_java") { + } +@@ -104,22 +97,13 @@ if (!limit_android_deps) { android_library("chromium_play_services_availability_java") { sources = [ "util/org/chromium/gms/ChromiumPlayServicesAvailability.java" ] @@ -3563,414 +3573,461 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD. } # TODO(crbug.com/1366370) Remove this once all depencencies are updated to -@@ -767,212 +758,6 @@ if (!limit_android_deps) { +@@ -786,238 +770,6 @@ if (!limit_android_deps) { ] } - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_play_services_auth_java") { -- aar_path = "libs/com_google_android_gms_play_services_auth/play-services-auth-20.1.0.aar" -- info_path = "libs/com_google_android_gms_play_services_auth/com_google_android_gms_play_services_auth.info" -- enable_bytecode_checks = false -- deps = [ -- ":google_play_services_auth_api_phone_java", -- ":google_play_services_auth_base_java", -- ":google_play_services_base_java", -- ":google_play_services_basement_java", -- ":google_play_services_tasks_java", -- "//third_party/androidx:androidx_fragment_fragment_java", -- "//third_party/androidx:androidx_loader_loader_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_play_services_auth_java") { +- aar_path = "libs/com_google_android_gms_play_services_auth/play-services-auth-20.1.0.aar" +- info_path = "libs/com_google_android_gms_play_services_auth/com_google_android_gms_play_services_auth.info" +- enable_bytecode_checks = false +- deps = [ +- "$google_play_services_package:google_play_services_auth_api_phone_java", +- "$google_play_services_package:google_play_services_auth_base_java", +- "$google_play_services_package:google_play_services_base_java", +- "$google_play_services_package:google_play_services_basement_java", +- "$google_play_services_package:google_play_services_tasks_java", +- "//third_party/androidx:androidx_fragment_fragment_java", +- "//third_party/androidx:androidx_loader_loader_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_play_services_auth_api_phone_java") { -- aar_path = "libs/com_google_android_gms_play_services_auth_api_phone/play-services-auth-api-phone-18.0.1.aar" -- info_path = "libs/com_google_android_gms_play_services_auth_api_phone/com_google_android_gms_play_services_auth_api_phone.info" -- enable_bytecode_checks = false -- deps = [ -- ":google_play_services_base_java", -- ":google_play_services_basement_java", -- ":google_play_services_tasks_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_play_services_auth_api_phone_java") { +- aar_path = "libs/com_google_android_gms_play_services_auth_api_phone/play-services-auth-api-phone-18.0.1.aar" +- info_path = "libs/com_google_android_gms_play_services_auth_api_phone/com_google_android_gms_play_services_auth_api_phone.info" +- enable_bytecode_checks = false +- deps = [ +- "$google_play_services_package:google_play_services_base_java", +- "$google_play_services_package:google_play_services_basement_java", +- "$google_play_services_package:google_play_services_tasks_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_play_services_auth_base_java") { -- aar_path = "libs/com_google_android_gms_play_services_auth_base/play-services-auth-base-18.0.2.aar" -- info_path = "libs/com_google_android_gms_play_services_auth_base/com_google_android_gms_play_services_auth_base.info" -- enable_bytecode_checks = false -- deps = [ -- ":google_play_services_base_java", -- ":google_play_services_basement_java", -- ":google_play_services_tasks_java", -- "//third_party/androidx:androidx_collection_collection_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_play_services_auth_base_java") { +- aar_path = "libs/com_google_android_gms_play_services_auth_base/play-services-auth-base-18.0.2.aar" +- info_path = "libs/com_google_android_gms_play_services_auth_base/com_google_android_gms_play_services_auth_base.info" +- enable_bytecode_checks = false +- deps = [ +- "$google_play_services_package:google_play_services_base_java", +- "$google_play_services_package:google_play_services_basement_java", +- "$google_play_services_package:google_play_services_tasks_java", +- "//third_party/androidx:androidx_collection_collection_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_play_services_base_java") { -- aar_path = "libs/com_google_android_gms_play_services_base/play-services-base-18.0.1.aar" -- info_path = "libs/com_google_android_gms_play_services_base/com_google_android_gms_play_services_base.info" -- enable_bytecode_checks = false -- deps = [ -- ":google_play_services_basement_java", -- ":google_play_services_tasks_java", -- "//third_party/androidx:androidx_collection_collection_java", -- "//third_party/androidx:androidx_core_core_java", -- "//third_party/androidx:androidx_fragment_fragment_java", -- ] -- bytecode_rewriter_target = -- "//build/android/bytecode:fragment_activity_replacer" +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_play_services_base_java") { +- aar_path = "libs/com_google_android_gms_play_services_base/play-services-base-18.0.1.aar" +- info_path = "libs/com_google_android_gms_play_services_base/com_google_android_gms_play_services_base.info" +- enable_bytecode_checks = false +- deps = [ +- "$google_play_services_package:google_play_services_basement_java", +- "$google_play_services_package:google_play_services_tasks_java", +- "//third_party/androidx:androidx_collection_collection_java", +- "//third_party/androidx:androidx_core_core_java", +- "//third_party/androidx:androidx_fragment_fragment_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_play_services_basement_java") { -- aar_path = "libs/com_google_android_gms_play_services_basement/play-services-basement-18.1.0.aar" -- info_path = "libs/com_google_android_gms_play_services_basement/com_google_android_gms_play_services_basement.info" -- enable_bytecode_checks = false -- deps = [ -- "//third_party/androidx:androidx_collection_collection_java", -- "//third_party/androidx:androidx_core_core_java", -- "//third_party/androidx:androidx_fragment_fragment_java", -- ] -- -- jar_excluded_patterns = [] -- if (!enable_java_asserts) { -- # Omit the file since we use our own copy. -- jar_excluded_patterns += -- [ "com/google/android/gms/common/internal/Preconditions.class" ] -- deps += [ "//third_party/android_deps/local_modifications/preconditions:gms_stub_preconditions_java" ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_play_services_basement_java") { +- aar_path = "libs/com_google_android_gms_play_services_basement/play-services-basement-18.1.0.aar" +- info_path = "libs/com_google_android_gms_play_services_basement/com_google_android_gms_play_services_basement.info" +- enable_bytecode_checks = false +- deps = [ +- "//third_party/androidx:androidx_collection_collection_java", +- "//third_party/androidx:androidx_core_core_java", +- "//third_party/androidx:androidx_fragment_fragment_java", +- ] +- +- jar_excluded_patterns = [] +- if (!enable_java_asserts) { +- # Omit the file since we use our own copy. +- jar_excluded_patterns += +- [ "com/google/android/gms/common/internal/Preconditions.class" ] +- deps += [ "//third_party/android_deps/local_modifications/preconditions:gms_stub_preconditions_java" ] +- } +- +- # https://crbug.com/989505 +- jar_excluded_patterns += [ "META-INF/proguard/*" ] +- input_jars_paths = [ "$android_sdk/optional/org.apache.http.legacy.jar" ] - } -- -- # https://crbug.com/989505 -- jar_excluded_patterns += [ "META-INF/proguard/*" ] -- input_jars_paths = [ "$android_sdk/optional/org.apache.http.legacy.jar" ] -- bytecode_rewriter_target = -- "//build/android/bytecode:fragment_activity_replacer" - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_play_services_cast_java") { -- aar_path = "libs/com_google_android_gms_play_services_cast/play-services-cast-17.0.0.aar" -- info_path = "libs/com_google_android_gms_play_services_cast/com_google_android_gms_play_services_cast.info" -- enable_bytecode_checks = false -- deps = [ -- ":google_play_services_base_java", -- ":google_play_services_basement_java", -- ":google_play_services_flags_java", -- ":google_play_services_tasks_java", -- "//third_party/androidx:androidx_core_core_java", -- "//third_party/androidx:androidx_mediarouter_mediarouter_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_play_services_cast_java") { +- aar_path = "libs/com_google_android_gms_play_services_cast/play-services-cast-17.0.0.aar" +- info_path = "libs/com_google_android_gms_play_services_cast/com_google_android_gms_play_services_cast.info" +- enable_bytecode_checks = false +- deps = [ +- "$google_play_services_package:google_play_services_base_java", +- "$google_play_services_package:google_play_services_basement_java", +- "$google_play_services_package:google_play_services_flags_java", +- "$google_play_services_package:google_play_services_tasks_java", +- "//third_party/androidx:androidx_core_core_java", +- "//third_party/androidx:androidx_mediarouter_mediarouter_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_play_services_cast_framework_java") { -- aar_path = "libs/com_google_android_gms_play_services_cast_framework/play-services-cast-framework-17.0.0.aar" -- info_path = "libs/com_google_android_gms_play_services_cast_framework/com_google_android_gms_play_services_cast_framework.info" -- enable_bytecode_checks = false -- deps = [ -- ":google_play_services_base_java", -- ":google_play_services_basement_java", -- ":google_play_services_cast_java", -- "//third_party/androidx:androidx_appcompat_appcompat_java", -- "//third_party/androidx:androidx_collection_collection_java", -- "//third_party/androidx:androidx_core_core_java", -- "//third_party/androidx:androidx_fragment_fragment_java", -- "//third_party/androidx:androidx_media_media_java", -- "//third_party/androidx:androidx_mediarouter_mediarouter_java", -- "//third_party/androidx:androidx_recyclerview_recyclerview_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_play_services_cast_framework_java") { +- aar_path = "libs/com_google_android_gms_play_services_cast_framework/play-services-cast-framework-17.0.0.aar" +- info_path = "libs/com_google_android_gms_play_services_cast_framework/com_google_android_gms_play_services_cast_framework.info" +- enable_bytecode_checks = false +- deps = [ +- "$google_play_services_package:google_play_services_base_java", +- "$google_play_services_package:google_play_services_basement_java", +- "$google_play_services_package:google_play_services_cast_java", +- "//third_party/androidx:androidx_appcompat_appcompat_java", +- "//third_party/androidx:androidx_collection_collection_java", +- "//third_party/androidx:androidx_core_core_java", +- "//third_party/androidx:androidx_fragment_fragment_java", +- "//third_party/androidx:androidx_media_media_java", +- "//third_party/androidx:androidx_mediarouter_mediarouter_java", +- "//third_party/androidx:androidx_recyclerview_recyclerview_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_play_services_gcm_java") { -- aar_path = "libs/com_google_android_gms_play_services_gcm/play-services-gcm-17.0.0.aar" -- info_path = "libs/com_google_android_gms_play_services_gcm/com_google_android_gms_play_services_gcm.info" -- enable_bytecode_checks = false -- deps = [ -- ":google_play_services_base_java", -- ":google_play_services_basement_java", -- ":google_play_services_iid_java", -- ":google_play_services_stats_java", -- "//third_party/androidx:androidx_collection_collection_java", -- "//third_party/androidx:androidx_core_core_java", -- "//third_party/androidx:androidx_legacy_legacy_support_core_utils_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_play_services_gcm_java") { +- aar_path = "libs/com_google_android_gms_play_services_gcm/play-services-gcm-17.0.0.aar" +- info_path = "libs/com_google_android_gms_play_services_gcm/com_google_android_gms_play_services_gcm.info" +- enable_bytecode_checks = false +- deps = [ +- "$google_play_services_package:google_play_services_base_java", +- "$google_play_services_package:google_play_services_basement_java", +- "$google_play_services_package:google_play_services_iid_java", +- "$google_play_services_package:google_play_services_stats_java", +- "//third_party/androidx:androidx_collection_collection_java", +- "//third_party/androidx:androidx_core_core_java", +- "//third_party/androidx:androidx_legacy_legacy_support_core_utils_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_play_services_iid_java") { -- aar_path = "libs/com_google_android_gms_play_services_iid/play-services-iid-17.0.0.aar" -- info_path = "libs/com_google_android_gms_play_services_iid/com_google_android_gms_play_services_iid.info" -- enable_bytecode_checks = false -- deps = [ -- ":google_play_services_base_java", -- ":google_play_services_basement_java", -- ":google_play_services_stats_java", -- ":google_play_services_tasks_java", -- "//third_party/androidx:androidx_collection_collection_java", -- "//third_party/androidx:androidx_core_core_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_play_services_iid_java") { +- aar_path = "libs/com_google_android_gms_play_services_iid/play-services-iid-17.0.0.aar" +- info_path = "libs/com_google_android_gms_play_services_iid/com_google_android_gms_play_services_iid.info" +- enable_bytecode_checks = false +- deps = [ +- "$google_play_services_package:google_play_services_base_java", +- "$google_play_services_package:google_play_services_basement_java", +- "$google_play_services_package:google_play_services_stats_java", +- "$google_play_services_package:google_play_services_tasks_java", +- "//third_party/androidx:androidx_collection_collection_java", +- "//third_party/androidx:androidx_core_core_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_play_services_instantapps_java") { -- aar_path = "libs/com_google_android_gms_play_services_instantapps/play-services-instantapps-18.0.1.aar" -- info_path = "libs/com_google_android_gms_play_services_instantapps/com_google_android_gms_play_services_instantapps.info" -- enable_bytecode_checks = false -- deps = [ -- ":google_play_services_base_java", -- ":google_play_services_basement_java", -- ":google_play_services_tasks_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_play_services_instantapps_java") { +- aar_path = "libs/com_google_android_gms_play_services_instantapps/play-services-instantapps-18.0.1.aar" +- info_path = "libs/com_google_android_gms_play_services_instantapps/com_google_android_gms_play_services_instantapps.info" +- enable_bytecode_checks = false +- deps = [ +- "$google_play_services_package:google_play_services_base_java", +- "$google_play_services_package:google_play_services_basement_java", +- "$google_play_services_package:google_play_services_tasks_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_play_services_location_java") { -- aar_path = "libs/com_google_android_gms_play_services_location/play-services-location-19.0.1.aar" -- info_path = "libs/com_google_android_gms_play_services_location/com_google_android_gms_play_services_location.info" -- enable_bytecode_checks = false -- deps = [ -- ":google_play_services_base_java", -- ":google_play_services_basement_java", -- ":google_play_services_places_placereport_java", -- ":google_play_services_tasks_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_play_services_location_java") { +- aar_path = "libs/com_google_android_gms_play_services_location/play-services-location-19.0.1.aar" +- info_path = "libs/com_google_android_gms_play_services_location/com_google_android_gms_play_services_location.info" +- enable_bytecode_checks = false +- deps = [ +- "$google_play_services_package:google_play_services_base_java", +- "$google_play_services_package:google_play_services_basement_java", +- "$google_play_services_package:google_play_services_places_placereport_java", +- "$google_play_services_package:google_play_services_tasks_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_play_services_tasks_java") { -- aar_path = "libs/com_google_android_gms_play_services_tasks/play-services-tasks-18.0.2.aar" -- info_path = "libs/com_google_android_gms_play_services_tasks/com_google_android_gms_play_services_tasks.info" -- enable_bytecode_checks = false -- deps = [ ":google_play_services_basement_java" ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_play_services_tasks_java") { +- aar_path = "libs/com_google_android_gms_play_services_tasks/play-services-tasks-18.0.2.aar" +- info_path = "libs/com_google_android_gms_play_services_tasks/com_google_android_gms_play_services_tasks.info" +- enable_bytecode_checks = false +- deps = +- [ "$google_play_services_package:google_play_services_basement_java" ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_play_services_vision_java") { -- aar_path = "libs/com_google_android_gms_play_services_vision/play-services-vision-20.1.3.aar" -- info_path = "libs/com_google_android_gms_play_services_vision/com_google_android_gms_play_services_vision.info" -- enable_bytecode_checks = false -- deps = [ -- ":google_play_services_base_java", -- ":google_play_services_basement_java", -- ":google_play_services_vision_common_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_play_services_vision_java") { +- aar_path = "libs/com_google_android_gms_play_services_vision/play-services-vision-20.1.3.aar" +- info_path = "libs/com_google_android_gms_play_services_vision/com_google_android_gms_play_services_vision.info" +- enable_bytecode_checks = false +- deps = [ +- "$google_play_services_package:google_play_services_base_java", +- "$google_play_services_package:google_play_services_basement_java", +- "$google_play_services_package:google_play_services_vision_common_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_play_services_vision_common_java") { -- aar_path = "libs/com_google_android_gms_play_services_vision_common/play-services-vision-common-19.1.3.aar" -- info_path = "libs/com_google_android_gms_play_services_vision_common/com_google_android_gms_play_services_vision_common.info" -- enable_bytecode_checks = false -- deps = [ -- ":google_play_services_base_java", -- ":google_play_services_basement_java", -- ":google_play_services_clearcut_java", -- ":google_play_services_flags_java", -- ":google_play_services_phenotype_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_play_services_vision_common_java") { +- aar_path = "libs/com_google_android_gms_play_services_vision_common/play-services-vision-common-19.1.3.aar" +- info_path = "libs/com_google_android_gms_play_services_vision_common/com_google_android_gms_play_services_vision_common.info" +- enable_bytecode_checks = false +- deps = [ +- "$google_play_services_package:google_play_services_base_java", +- "$google_play_services_package:google_play_services_basement_java", +- "$google_play_services_package:google_play_services_clearcut_java", +- "$google_play_services_package:google_play_services_flags_java", +- "$google_play_services_package:google_play_services_phenotype_java", +- ] +- } - } - +- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. - android_aar_prebuilt("com_google_android_material_material_java") { -@@ -1017,62 +802,6 @@ if (!limit_android_deps) { - ] + if (!defined(material_design_target)) { + android_aar_prebuilt("com_google_android_material_material_java") { +@@ -1063,73 +815,6 @@ if (!limit_android_deps) { + } } - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("com_google_android_play_feature_delivery_java") { -- aar_path = "libs/com_google_android_play_feature_delivery/feature-delivery-2.0.1.aar" -- info_path = "libs/com_google_android_play_feature_delivery/com_google_android_play_feature_delivery.info" -- enable_bytecode_checks = false -- deps = [ -- ":com_google_android_play_core_common_java", -- ":google_play_services_basement_java", -- ":google_play_services_tasks_java", -- ] +- if (!defined(playcore_target)) { +- android_aar_prebuilt("com_google_android_play_feature_delivery_java") { +- aar_path = "libs/com_google_android_play_feature_delivery/feature-delivery-2.0.1.aar" +- info_path = "libs/com_google_android_play_feature_delivery/com_google_android_play_feature_delivery.info" +- enable_bytecode_checks = false +- +- # Target is swapped out when internal code is enabled. +- # Please depend on :playcore_java instead. +- visibility = [ ":*" ] +- deps = [ +- ":com_google_android_play_core_common_java", +- "$google_play_services_package:google_play_services_basement_java", +- "$google_play_services_package:google_play_services_tasks_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_firebase_firebase_iid_java") { -- aar_path = "libs/com_google_firebase_firebase_iid/firebase-iid-21.0.1.aar" -- info_path = "libs/com_google_firebase_firebase_iid/com_google_firebase_firebase_iid.info" -- enable_bytecode_checks = false -- deps = [ -- ":google_firebase_firebase_common_java", -- ":google_firebase_firebase_components_java", -- ":google_firebase_firebase_iid_interop_java", -- ":google_firebase_firebase_installations_interop_java", -- ":google_firebase_firebase_installations_java", -- ":google_play_services_basement_java", -- ":google_play_services_cloud_messaging_java", -- ":google_play_services_stats_java", -- ":google_play_services_tasks_java", -- "//third_party/androidx:androidx_collection_collection_java", -- "//third_party/androidx:androidx_core_core_java", -- "//third_party/androidx:androidx_legacy_legacy_support_core_utils_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_firebase_firebase_iid_java") { +- aar_path = "libs/com_google_firebase_firebase_iid/firebase-iid-21.0.1.aar" +- info_path = "libs/com_google_firebase_firebase_iid/com_google_firebase_firebase_iid.info" +- enable_bytecode_checks = false +- deps = [ +- "$google_play_services_package:google_firebase_firebase_common_java", +- "$google_play_services_package:google_firebase_firebase_components_java", +- "$google_play_services_package:google_firebase_firebase_iid_interop_java", +- "$google_play_services_package:google_firebase_firebase_installations_interop_java", +- "$google_play_services_package:google_firebase_firebase_installations_java", +- "$google_play_services_package:google_play_services_basement_java", +- "$google_play_services_package:google_play_services_cloud_messaging_java", +- "$google_play_services_package:google_play_services_stats_java", +- "$google_play_services_package:google_play_services_tasks_java", +- "//third_party/androidx:androidx_collection_collection_java", +- "//third_party/androidx:androidx_core_core_java", +- "//third_party/androidx:androidx_legacy_legacy_support_core_utils_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_firebase_firebase_messaging_java") { -- aar_path = "libs/com_google_firebase_firebase_messaging/firebase-messaging-21.0.1.aar" -- info_path = "libs/com_google_firebase_firebase_messaging/com_google_firebase_firebase_messaging.info" -- enable_bytecode_checks = false -- deps = [ -- ":google_android_datatransport_transport_api_java", -- ":google_firebase_firebase_common_java", -- ":google_firebase_firebase_components_java", -- ":google_firebase_firebase_encoders_java", -- ":google_firebase_firebase_encoders_json_java", -- ":google_firebase_firebase_iid_java", -- ":google_firebase_firebase_installations_interop_java", -- ":google_firebase_firebase_installations_java", -- ":google_firebase_firebase_measurement_connector_java", -- ":google_play_services_basement_java", -- ":google_play_services_cloud_messaging_java", -- ":google_play_services_stats_java", -- ":google_play_services_tasks_java", -- "//third_party/androidx:androidx_collection_collection_java", -- "//third_party/androidx:androidx_core_core_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_firebase_firebase_messaging_java") { +- aar_path = "libs/com_google_firebase_firebase_messaging/firebase-messaging-21.0.1.aar" +- info_path = "libs/com_google_firebase_firebase_messaging/com_google_firebase_firebase_messaging.info" +- enable_bytecode_checks = false +- deps = [ +- ":google_android_datatransport_transport_api_java", +- "$google_play_services_package:google_firebase_firebase_common_java", +- "$google_play_services_package:google_firebase_firebase_components_java", +- "$google_play_services_package:google_firebase_firebase_encoders_java", +- "$google_play_services_package:google_firebase_firebase_encoders_json_java", +- "$google_play_services_package:google_firebase_firebase_iid_java", +- "$google_play_services_package:google_firebase_firebase_installations_interop_java", +- "$google_play_services_package:google_firebase_firebase_installations_java", +- "$google_play_services_package:google_firebase_firebase_measurement_connector_java", +- "$google_play_services_package:google_play_services_basement_java", +- "$google_play_services_package:google_play_services_cloud_messaging_java", +- "$google_play_services_package:google_play_services_stats_java", +- "$google_play_services_package:google_play_services_tasks_java", +- "//third_party/androidx:androidx_collection_collection_java", +- "//third_party/androidx:androidx_core_core_java", +- ] +- } - } - +- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. - java_prebuilt("com_google_guava_guava_android_java") { -@@ -1406,19 +1135,6 @@ if (!limit_android_deps) { - is_robolectric = true + if (!defined(guava_android_target)) { + java_prebuilt("com_google_guava_guava_android_java") { +@@ -1919,341 +1604,6 @@ if (!limit_android_deps) { + ] } - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- java_prebuilt("org_robolectric_shadows_playservices_java") { -- jar_path = "libs/org_robolectric_shadows_playservices/shadows-playservices-4.10.3.jar" -- output_name = "org_robolectric_shadows_playservices" -- enable_bytecode_checks = false -- testonly = true -- deps = [ -- ":com_google_guava_guava_java", -- ":org_robolectric_annotations_java", -- ] -- is_robolectric = true +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_android_datatransport_transport_api_java") { +- aar_path = "libs/com_google_android_datatransport_transport_api/transport-api-2.2.1.aar" +- info_path = "libs/com_google_android_datatransport_transport_api/com_google_android_datatransport_transport_api.info" +- enable_bytecode_checks = false +- +- # To remove visibility constraint, add this dependency to +- # //third_party/android_deps/build.gradle. +- visibility = [ +- ":*", +- "//third_party/androidx:*", +- ] +- deps = [ "//third_party/androidx:androidx_annotation_annotation_java" ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. - java_prebuilt("org_robolectric_utils_java") { - jar_path = "libs/org_robolectric_utils/utils-4.10.3.jar" -@@ -1878,290 +1594,6 @@ if (!limit_android_deps) { - deps = [ "//third_party/androidx:androidx_annotation_annotation_java" ] - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_play_services_clearcut_java") { -- aar_path = "libs/com_google_android_gms_play_services_clearcut/play-services-clearcut-17.0.0.aar" -- info_path = "libs/com_google_android_gms_play_services_clearcut/com_google_android_gms_play_services_clearcut.info" -- enable_bytecode_checks = false -- -- # To remove visibility constraint, add this dependency to -- # //third_party/android_deps/build.gradle. -- visibility = [ -- ":*", -- "//third_party/androidx:*", -- ] -- deps = [ -- ":google_play_services_base_java", -- ":google_play_services_basement_java", -- ":google_play_services_phenotype_java", -- ":google_play_services_tasks_java", -- "//third_party/androidx:androidx_core_core_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_play_services_clearcut_java") { +- aar_path = "libs/com_google_android_gms_play_services_clearcut/play-services-clearcut-17.0.0.aar" +- info_path = "libs/com_google_android_gms_play_services_clearcut/com_google_android_gms_play_services_clearcut.info" +- enable_bytecode_checks = false +- +- # To remove visibility constraint, add this dependency to +- # //third_party/android_deps/build.gradle. +- visibility = [ +- ":*", +- "//third_party/androidx:*", +- ] +- deps = [ +- "$google_play_services_package:google_play_services_base_java", +- "$google_play_services_package:google_play_services_basement_java", +- "$google_play_services_package:google_play_services_phenotype_java", +- "$google_play_services_package:google_play_services_tasks_java", +- "//third_party/androidx:androidx_core_core_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_play_services_cloud_messaging_java") { -- aar_path = "libs/com_google_android_gms_play_services_cloud_messaging/play-services-cloud-messaging-16.0.0.aar" -- info_path = "libs/com_google_android_gms_play_services_cloud_messaging/com_google_android_gms_play_services_cloud_messaging.info" -- enable_bytecode_checks = false -- -- # To remove visibility constraint, add this dependency to -- # //third_party/android_deps/build.gradle. -- visibility = [ -- ":*", -- "//third_party/androidx:*", -- ] -- deps = [ -- ":google_play_services_basement_java", -- ":google_play_services_tasks_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_play_services_cloud_messaging_java") { +- aar_path = "libs/com_google_android_gms_play_services_cloud_messaging/play-services-cloud-messaging-16.0.0.aar" +- info_path = "libs/com_google_android_gms_play_services_cloud_messaging/com_google_android_gms_play_services_cloud_messaging.info" +- enable_bytecode_checks = false +- +- # To remove visibility constraint, add this dependency to +- # //third_party/android_deps/build.gradle. +- visibility = [ +- ":*", +- "//third_party/androidx:*", +- ] +- deps = [ +- "$google_play_services_package:google_play_services_basement_java", +- "$google_play_services_package:google_play_services_tasks_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_play_services_flags_java") { -- aar_path = "libs/com_google_android_gms_play_services_flags/play-services-flags-17.0.0.aar" -- info_path = "libs/com_google_android_gms_play_services_flags/com_google_android_gms_play_services_flags.info" -- enable_bytecode_checks = false -- -- # To remove visibility constraint, add this dependency to -- # //third_party/android_deps/build.gradle. -- visibility = [ -- ":*", -- "//third_party/androidx:*", -- ] -- deps = [ -- ":google_play_services_base_java", -- ":google_play_services_basement_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_play_services_flags_java") { +- aar_path = "libs/com_google_android_gms_play_services_flags/play-services-flags-17.0.0.aar" +- info_path = "libs/com_google_android_gms_play_services_flags/com_google_android_gms_play_services_flags.info" +- enable_bytecode_checks = false +- +- # To remove visibility constraint, add this dependency to +- # //third_party/android_deps/build.gradle. +- visibility = [ +- ":*", +- "//third_party/androidx:*", +- ] +- deps = [ +- "$google_play_services_package:google_play_services_base_java", +- "$google_play_services_package:google_play_services_basement_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_play_services_phenotype_java") { -- aar_path = "libs/com_google_android_gms_play_services_phenotype/play-services-phenotype-17.0.0.aar" -- info_path = "libs/com_google_android_gms_play_services_phenotype/com_google_android_gms_play_services_phenotype.info" -- enable_bytecode_checks = false -- -- # To remove visibility constraint, add this dependency to -- # //third_party/android_deps/build.gradle. -- visibility = [ -- ":*", -- "//third_party/androidx:*", -- ] -- deps = [ -- ":google_play_services_base_java", -- ":google_play_services_basement_java", -- ":google_play_services_tasks_java", -- "//third_party/androidx:androidx_core_core_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_play_services_phenotype_java") { +- aar_path = "libs/com_google_android_gms_play_services_phenotype/play-services-phenotype-17.0.0.aar" +- info_path = "libs/com_google_android_gms_play_services_phenotype/com_google_android_gms_play_services_phenotype.info" +- enable_bytecode_checks = false +- +- # To remove visibility constraint, add this dependency to +- # //third_party/android_deps/build.gradle. +- visibility = [ +- ":*", +- "//third_party/androidx:*", +- ] +- deps = [ +- "$google_play_services_package:google_play_services_base_java", +- "$google_play_services_package:google_play_services_basement_java", +- "$google_play_services_package:google_play_services_tasks_java", +- "//third_party/androidx:androidx_core_core_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_play_services_places_placereport_java") { -- aar_path = "libs/com_google_android_gms_play_services_places_placereport/play-services-places-placereport-17.0.0.aar" -- info_path = "libs/com_google_android_gms_play_services_places_placereport/com_google_android_gms_play_services_places_placereport.info" -- enable_bytecode_checks = false -- -- # To remove visibility constraint, add this dependency to -- # //third_party/android_deps/build.gradle. -- visibility = [ -- ":*", -- "//third_party/androidx:*", -- ] -- deps = [ ":google_play_services_basement_java" ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_play_services_places_placereport_java") { +- aar_path = "libs/com_google_android_gms_play_services_places_placereport/play-services-places-placereport-17.0.0.aar" +- info_path = "libs/com_google_android_gms_play_services_places_placereport/com_google_android_gms_play_services_places_placereport.info" +- enable_bytecode_checks = false +- +- # To remove visibility constraint, add this dependency to +- # //third_party/android_deps/build.gradle. +- visibility = [ +- ":*", +- "//third_party/androidx:*", +- ] +- deps = +- [ "$google_play_services_package:google_play_services_basement_java" ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_play_services_stats_java") { -- aar_path = "libs/com_google_android_gms_play_services_stats/play-services-stats-17.0.0.aar" -- info_path = "libs/com_google_android_gms_play_services_stats/com_google_android_gms_play_services_stats.info" -- enable_bytecode_checks = false -- -- # To remove visibility constraint, add this dependency to -- # //third_party/android_deps/build.gradle. -- visibility = [ -- ":*", -- "//third_party/androidx:*", -- ] -- deps = [ -- ":google_play_services_basement_java", -- "//third_party/androidx:androidx_legacy_legacy_support_core_utils_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_play_services_stats_java") { +- aar_path = "libs/com_google_android_gms_play_services_stats/play-services-stats-17.0.0.aar" +- info_path = "libs/com_google_android_gms_play_services_stats/com_google_android_gms_play_services_stats.info" +- enable_bytecode_checks = false +- +- # To remove visibility constraint, add this dependency to +- # //third_party/android_deps/build.gradle. +- visibility = [ +- ":*", +- "//third_party/androidx:*", +- ] +- deps = [ +- "$google_play_services_package:google_play_services_basement_java", +- "//third_party/androidx:androidx_legacy_legacy_support_core_utils_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. @@ -3988,164 +4045,185 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD. - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- java_prebuilt("google_firebase_firebase_annotations_java") { -- jar_path = "libs/com_google_firebase_firebase_annotations/firebase-annotations-16.0.0.jar" -- output_name = "com_google_firebase_firebase_annotations" -- supports_android = true -- enable_bytecode_checks = false -- -- # To remove visibility constraint, add this dependency to -- # //third_party/android_deps/build.gradle. -- visibility = [ -- ":*", -- "//third_party/androidx:*", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- java_prebuilt("google_firebase_firebase_annotations_java") { +- jar_path = "libs/com_google_firebase_firebase_annotations/firebase-annotations-16.0.0.jar" +- output_name = "com_google_firebase_firebase_annotations" +- supports_android = true +- enable_bytecode_checks = false +- +- # To remove visibility constraint, add this dependency to +- # //third_party/android_deps/build.gradle. +- visibility = [ +- ":*", +- "//third_party/androidx:*", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_firebase_firebase_common_java") { -- aar_path = -- "libs/com_google_firebase_firebase_common/firebase-common-19.5.0.aar" -- info_path = "libs/com_google_firebase_firebase_common/com_google_firebase_firebase_common.info" -- enable_bytecode_checks = false -- -- # To remove visibility constraint, add this dependency to -- # //third_party/android_deps/build.gradle. -- visibility = [ -- ":*", -- "//third_party/androidx:*", -- ] -- deps = [ -- ":google_firebase_firebase_components_java", -- ":google_play_services_basement_java", -- ":google_play_services_tasks_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_firebase_firebase_common_java") { +- aar_path = +- "libs/com_google_firebase_firebase_common/firebase-common-19.5.0.aar" +- info_path = "libs/com_google_firebase_firebase_common/com_google_firebase_firebase_common.info" +- enable_bytecode_checks = false +- +- # To remove visibility constraint, add this dependency to +- # //third_party/android_deps/build.gradle. +- visibility = [ +- ":*", +- "//third_party/androidx:*", +- ] +- deps = [ +- "$google_play_services_package:google_firebase_firebase_components_java", +- "$google_play_services_package:google_play_services_basement_java", +- "$google_play_services_package:google_play_services_tasks_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_firebase_firebase_components_java") { -- aar_path = "libs/com_google_firebase_firebase_components/firebase-components-16.1.0.aar" -- info_path = "libs/com_google_firebase_firebase_components/com_google_firebase_firebase_components.info" -- enable_bytecode_checks = false -- -- # To remove visibility constraint, add this dependency to -- # //third_party/android_deps/build.gradle. -- visibility = [ -- ":*", -- "//third_party/androidx:*", -- ] -- deps = [ -- ":google_firebase_firebase_annotations_java", -- "//third_party/androidx:androidx_annotation_annotation_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_firebase_firebase_components_java") { +- aar_path = "libs/com_google_firebase_firebase_components/firebase-components-16.1.0.aar" +- info_path = "libs/com_google_firebase_firebase_components/com_google_firebase_firebase_components.info" +- enable_bytecode_checks = false +- +- # To remove visibility constraint, add this dependency to +- # //third_party/android_deps/build.gradle. +- visibility = [ +- ":*", +- "//third_party/androidx:*", +- ] +- deps = [ +- "$google_play_services_package:google_firebase_firebase_annotations_java", +- "//third_party/androidx:androidx_annotation_annotation_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- java_prebuilt("google_firebase_firebase_encoders_java") { -- jar_path = "libs/com_google_firebase_firebase_encoders/firebase-encoders-16.1.0.jar" -- output_name = "com_google_firebase_firebase_encoders" -- supports_android = true -- enable_bytecode_checks = false -- -- # To remove visibility constraint, add this dependency to -- # //third_party/android_deps/build.gradle. -- visibility = [ -- ":*", -- "//third_party/androidx:*", -- ] -- deps = [ "//third_party/androidx:androidx_annotation_annotation_java" ] -- -- # https://crbug.com/1412551 -- requires_android = true +- if (google_play_services_package == "//third_party/android_deps") { +- java_prebuilt("google_firebase_firebase_encoders_java") { +- jar_path = "libs/com_google_firebase_firebase_encoders/firebase-encoders-16.1.0.jar" +- output_name = "com_google_firebase_firebase_encoders" +- supports_android = true +- enable_bytecode_checks = false +- +- # To remove visibility constraint, add this dependency to +- # //third_party/android_deps/build.gradle. +- visibility = [ +- ":*", +- "//third_party/androidx:*", +- ] +- deps = [ "//third_party/androidx:androidx_annotation_annotation_java" ] +- +- # https://crbug.com/1412551 +- requires_android = true +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_firebase_firebase_encoders_json_java") { -- aar_path = "libs/com_google_firebase_firebase_encoders_json/firebase-encoders-json-17.1.0.aar" -- info_path = "libs/com_google_firebase_firebase_encoders_json/com_google_firebase_firebase_encoders_json.info" -- enable_bytecode_checks = false -- -- # To remove visibility constraint, add this dependency to -- # //third_party/android_deps/build.gradle. -- visibility = [ -- ":*", -- "//third_party/androidx:*", -- ] -- deps = [ -- ":google_firebase_firebase_encoders_java", -- "//third_party/androidx:androidx_annotation_annotation_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_firebase_firebase_encoders_json_java") { +- aar_path = "libs/com_google_firebase_firebase_encoders_json/firebase-encoders-json-17.1.0.aar" +- info_path = "libs/com_google_firebase_firebase_encoders_json/com_google_firebase_firebase_encoders_json.info" +- enable_bytecode_checks = false +- +- # To remove visibility constraint, add this dependency to +- # //third_party/android_deps/build.gradle. +- visibility = [ +- ":*", +- "//third_party/androidx:*", +- ] +- deps = [ +- "$google_play_services_package:google_firebase_firebase_encoders_java", +- "//third_party/androidx:androidx_annotation_annotation_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_firebase_firebase_iid_interop_java") { -- aar_path = "libs/com_google_firebase_firebase_iid_interop/firebase-iid-interop-17.0.0.aar" -- info_path = "libs/com_google_firebase_firebase_iid_interop/com_google_firebase_firebase_iid_interop.info" -- enable_bytecode_checks = false -- -- # To remove visibility constraint, add this dependency to -- # //third_party/android_deps/build.gradle. -- visibility = [ -- ":*", -- "//third_party/androidx:*", -- ] -- deps = [ -- ":google_play_services_base_java", -- ":google_play_services_basement_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_firebase_firebase_iid_interop_java") { +- aar_path = "libs/com_google_firebase_firebase_iid_interop/firebase-iid-interop-17.0.0.aar" +- info_path = "libs/com_google_firebase_firebase_iid_interop/com_google_firebase_firebase_iid_interop.info" +- enable_bytecode_checks = false +- +- # To remove visibility constraint, add this dependency to +- # //third_party/android_deps/build.gradle. +- visibility = [ +- ":*", +- "//third_party/androidx:*", +- ] +- deps = [ +- "$google_play_services_package:google_play_services_base_java", +- "$google_play_services_package:google_play_services_basement_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_firebase_firebase_installations_java") { -- aar_path = "libs/com_google_firebase_firebase_installations/firebase-installations-16.3.5.aar" -- info_path = "libs/com_google_firebase_firebase_installations/com_google_firebase_firebase_installations.info" -- enable_bytecode_checks = false -- -- # To remove visibility constraint, add this dependency to -- # //third_party/android_deps/build.gradle. -- visibility = [ -- ":*", -- "//third_party/androidx:*", -- ] -- deps = [ -- ":google_firebase_firebase_common_java", -- ":google_firebase_firebase_components_java", -- ":google_firebase_firebase_installations_interop_java", -- ":google_play_services_tasks_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt("google_firebase_firebase_installations_java") { +- aar_path = "libs/com_google_firebase_firebase_installations/firebase-installations-16.3.5.aar" +- info_path = "libs/com_google_firebase_firebase_installations/com_google_firebase_firebase_installations.info" +- enable_bytecode_checks = false +- +- # To remove visibility constraint, add this dependency to +- # //third_party/android_deps/build.gradle. +- visibility = [ +- ":*", +- "//third_party/androidx:*", +- ] +- deps = [ +- "$google_play_services_package:google_firebase_firebase_common_java", +- "$google_play_services_package:google_firebase_firebase_components_java", +- "$google_play_services_package:google_firebase_firebase_installations_interop_java", +- "$google_play_services_package:google_play_services_tasks_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_firebase_firebase_installations_interop_java") { -- aar_path = "libs/com_google_firebase_firebase_installations_interop/firebase-installations-interop-16.0.1.aar" -- info_path = "libs/com_google_firebase_firebase_installations_interop/com_google_firebase_firebase_installations_interop.info" -- enable_bytecode_checks = false -- -- # To remove visibility constraint, add this dependency to -- # //third_party/android_deps/build.gradle. -- visibility = [ -- ":*", -- "//third_party/androidx:*", -- ] -- deps = [ -- ":google_firebase_firebase_annotations_java", -- ":google_play_services_tasks_java", -- ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt( +- "google_firebase_firebase_installations_interop_java") { +- aar_path = "libs/com_google_firebase_firebase_installations_interop/firebase-installations-interop-16.0.1.aar" +- info_path = "libs/com_google_firebase_firebase_installations_interop/com_google_firebase_firebase_installations_interop.info" +- enable_bytecode_checks = false +- +- # To remove visibility constraint, add this dependency to +- # //third_party/android_deps/build.gradle. +- visibility = [ +- ":*", +- "//third_party/androidx:*", +- ] +- deps = [ +- "$google_play_services_package:google_firebase_firebase_annotations_java", +- "$google_play_services_package:google_play_services_tasks_java", +- ] +- } - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- android_aar_prebuilt("google_firebase_firebase_measurement_connector_java") { -- aar_path = "libs/com_google_firebase_firebase_measurement_connector/firebase-measurement-connector-18.0.0.aar" -- info_path = "libs/com_google_firebase_firebase_measurement_connector/com_google_firebase_firebase_measurement_connector.info" -- enable_bytecode_checks = false -- -- # To remove visibility constraint, add this dependency to -- # //third_party/android_deps/build.gradle. -- visibility = [ -- ":*", -- "//third_party/androidx:*", -- ] -- deps = [ ":google_play_services_basement_java" ] +- if (google_play_services_package == "//third_party/android_deps") { +- android_aar_prebuilt( +- "google_firebase_firebase_measurement_connector_java") { +- aar_path = "libs/com_google_firebase_firebase_measurement_connector/firebase-measurement-connector-18.0.0.aar" +- info_path = "libs/com_google_firebase_firebase_measurement_connector/com_google_firebase_firebase_measurement_connector.info" +- enable_bytecode_checks = false +- +- # To remove visibility constraint, add this dependency to +- # //third_party/android_deps/build.gradle. +- visibility = [ +- ":*", +- "//third_party/androidx:*", +- ] +- deps = +- [ "$google_play_services_package:google_play_services_basement_java" ] +- } - } # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. diff --git a/build/patches/Remove-blocklisted-URLs-upon-bookmark-creation.patch b/build/patches/Remove-blocklisted-URLs-upon-bookmark-creation.patch index 75a54ed5d..349b878b0 100644 --- a/build/patches/Remove-blocklisted-URLs-upon-bookmark-creation.patch +++ b/build/patches/Remove-blocklisted-URLs-upon-bookmark-creation.patch @@ -30,7 +30,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/TabBo /** * Constructor. -@@ -96,6 +102,13 @@ public class TabBookmarker { +@@ -104,6 +110,13 @@ public class TabBookmarker { return; } diff --git a/build/patches/Remove-help-menu-item.patch b/build/patches/Remove-help-menu-item.patch index c9c04b310..0a94b5ea0 100644 --- a/build/patches/Remove-help-menu-item.patch +++ b/build/patches/Remove-help-menu-item.patch @@ -67,7 +67,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcu diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java -@@ -2404,16 +2404,6 @@ public abstract class ChromeActivity +@@ -2417,16 +2417,6 @@ public abstract class ChromeActivity final Tab currentTab = getActivityTab(); @@ -120,7 +120,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/C diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java -@@ -580,7 +580,7 @@ public abstract class BaseCustomTabActivity extends ChromeActivity setSearchQuery(query)); +- return; +- } +- +- // Ensure the UrlBar has focus before entering text. If the UrlBar is not focused, +- // autocomplete text will be updated but the visible text will not. +- setUrlBarFocus( +- /* shouldBeFocused= */ true, +- /* pastedText= */ null, +- OmniboxFocusReason.SEARCH_QUERY); +- setUrlBarText( +- UrlBarData.forNonUrlText(query), +- UrlBar.ScrollType.NO_SCROLL, +- SelectionState.SELECT_ALL); +- mAutocompleteCoordinator.startAutocompleteForQuery(query); +- mUrlCoordinator.setKeyboardVisibility(true, false); +- } +- - @Override - public LocationBarDataProvider getLocationBarDataProvider() { - return mLocationBarDataProvider; - } +- public LocationBarDataProvider getLocationBarDataProvider() { +- return mLocationBarDataProvider; +- } - - @Override - public AutocompleteCoordinator getAutocompleteCoordinator() { @@ -719,12 +722,13 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow import java.util.List; -@@ -40,13 +39,6 @@ public interface OmniboxStub { +@@ -42,14 +41,6 @@ public interface OmniboxStub { */ boolean isUrlBarFocused(); - /** - * Get the {@link VoiceRecognitionHandler}. +- * - * @return the {@link VoiceRecognitionHandler} - */ - @Nullable @@ -732,24 +736,25 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow - /** * Adds a URL focus change listener that will be notified when the URL gains or loses focus. - * @param listener The listener to be registered. + * diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteController.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteController.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteController.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteController.java -@@ -12,7 +12,6 @@ import org.chromium.base.annotations.CalledByNative; - import org.chromium.base.annotations.NativeMethods; +@@ -13,7 +13,6 @@ import org.jni_zero.NativeMethods; + import org.chromium.base.lifetime.Destroyable; import org.chromium.chrome.browser.omnibox.OmniboxMetrics; -import org.chromium.chrome.browser.omnibox.voice.VoiceRecognitionHandler.VoiceResult; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.tab.Tab; import org.chromium.components.omnibox.AutocompleteMatch; -@@ -286,24 +285,6 @@ public class AutocompleteController implements Destroyable { - mNativeController, match.getNativeObjectRef(), matchIndex, webContents); +@@ -324,25 +323,6 @@ public class AutocompleteController implements Destroyable { + mNativeController, match.getNativeObjectRef(), matchIndex, webContents); } - /** - * Pass the voice provider a list representing the results of a voice recognition. +- * - * @param results A list containing the results of a voice recognition. - */ - void onVoiceResults(@Nullable List results) { @@ -762,22 +767,25 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow - voiceMatches[i] = results.get(i).getMatch(); - confidenceScores[i] = results.get(i).getConfidence(); - } -- AutocompleteControllerJni.get().setVoiceMatches( -- mNativeController, voiceMatches, confidenceScores); +- AutocompleteControllerJni.get() +- .setVoiceMatches(mNativeController, voiceMatches, confidenceScores); - } - /** * Updates AQS/SBS parameters on the selected match that we will navigate to and returns the * updated URL. -@@ -398,8 +379,6 @@ public class AutocompleteController implements Destroyable { - long elapsedTimeSinceInputChange, String newQueryText, String[] newQueryParams); +@@ -436,11 +416,6 @@ public class AutocompleteController implements Destroyable { Tab getMatchingTabForSuggestion( long nativeAutocompleteControllerAndroid, long nativeAutocompleteMatch); -- void setVoiceMatches(long nativeAutocompleteControllerAndroid, String[] matches, -- float[] confidenceScores); +- void setVoiceMatches( +- long nativeAutocompleteControllerAndroid, +- String[] matches, +- float[] confidenceScores); +- // Destroy supplied instance of the AutocompleteControllerAndroid. // The instance cannot be used after this call completes. + void destroy(long nativeAutocompleteControllerAndroid); diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteCoordinator.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteCoordinator.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteCoordinator.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteCoordinator.java @@ -789,7 +797,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.share.ShareDelegate; import org.chromium.chrome.browser.tab.Tab; -@@ -319,13 +318,6 @@ public class AutocompleteCoordinator implements UrlFocusChangeListener, UrlTextC +@@ -347,13 +346,6 @@ public class AutocompleteCoordinator implements UrlFocusChangeListener, UrlTextC mRecycledViewPool.onNativeInitialized(); } @@ -801,8 +809,8 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow - } - /** - * @return The current native pointer to the autocomplete results. - * TODO(ender): Figure out how to remove this. + * @return The current native pointer to the autocomplete results. TODO(ender): Figure out how + * to remove this. diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteMediator.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteMediator.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteMediator.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteMediator.java @@ -814,7 +822,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.search_engines.TemplateUrlServiceFactory; import org.chromium.chrome.browser.share.ShareDelegate; -@@ -415,14 +414,6 @@ class AutocompleteMediator implements OnSuggestionsReceivedListener, +@@ -427,14 +426,6 @@ class AutocompleteMediator mShouldPreventOmniboxAutocomplete = prevent; } @@ -827,7 +835,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow - } - /** - * @return The current native pointer to the autocomplete results. - * TODO(crbug.com/1138587): Figure out how to remove this. + * @return The current native pointer to the autocomplete results. TODO(crbug.com/1138587): + * Figure out how to remove this. -- 2.25.1 diff --git a/build/patches/Remove-window-name-on-cross-origin-navigation.patch b/build/patches/Remove-window-name-on-cross-origin-navigation.patch index dc70ed888..9819648ff 100644 --- a/build/patches/Remove-window-name-on-cross-origin-navigation.patch +++ b/build/patches/Remove-window-name-on-cross-origin-navigation.patch @@ -21,7 +21,7 @@ new file mode 100644 diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc --- a/third_party/blink/renderer/core/loader/document_loader.cc +++ b/third_party/blink/renderer/core/loader/document_loader.cc -@@ -2620,7 +2620,7 @@ void DocumentLoader::CommitNavigation() { +@@ -2683,7 +2683,7 @@ void DocumentLoader::CommitNavigation() { // that the name would be nulled and if the name is accessed after we will // fire a UseCounter. If we decide to move forward with this change, we'd // actually clean the name here. @@ -30,7 +30,7 @@ diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_p frame_->Tree().ExperimentalSetNulledName(); } -@@ -2631,6 +2631,7 @@ void DocumentLoader::CommitNavigation() { +@@ -2694,6 +2694,7 @@ void DocumentLoader::CommitNavigation() { // TODO(shuuran): CrossSiteCrossBrowsingContextGroupSetNulledName will just // record the fact that the name would be nulled and if the name is accessed // after we will fire a UseCounter. diff --git a/build/patches/Restore-Search-Ready-Omnibox-flag.patch b/build/patches/Restore-Search-Ready-Omnibox-flag.patch index e9e4970ea..99269db70 100644 --- a/build/patches/Restore-Search-Ready-Omnibox-flag.patch +++ b/build/patches/Restore-Search-Ready-Omnibox-flag.patch @@ -23,7 +23,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html 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 -@@ -287,6 +287,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -285,6 +285,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kReaderModeInCCT, &kRecordSuppressionMetrics, &kReengagementNotification, @@ -53,28 +53,29 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow import org.chromium.base.supplier.Supplier; import org.chromium.chrome.browser.omnibox.OmniboxFeatures; import org.chromium.chrome.browser.omnibox.UrlBarEditingTextStateProvider; -@@ -56,6 +57,7 @@ class DropdownItemViewInfoListBuilder { - @Px - private int mDropdownHeight; +@@ -55,6 +56,7 @@ class DropdownItemViewInfoListBuilder { + private @NonNull BookmarkState mBookmarkState; + @Px private int mDropdownHeight; private OpenHistoryClustersDelegate mOpenHistoryClustersDelegate; + private EditUrlSuggestionProcessor mEditUrlSuggestionProcessor; - DropdownItemViewInfoListBuilder(@NonNull Supplier tabSupplier, BookmarkState bookmarkState, - OpenHistoryClustersDelegate openHistoryClustersDelegate) { -@@ -91,8 +93,10 @@ class DropdownItemViewInfoListBuilder { + DropdownItemViewInfoListBuilder( + @NonNull Supplier tabSupplier, +@@ -92,9 +94,11 @@ class DropdownItemViewInfoListBuilder { mDividerLineProcessor = new DividerLineProcessor(context); } mHeaderProcessor = new HeaderProcessor(context); -- registerSuggestionProcessor(new EditUrlSuggestionProcessor( -- context, host, mImageSupplier, mActivityTabSupplier, shareSupplier)); -+ mEditUrlSuggestionProcessor = new EditUrlSuggestionProcessor( -+ context, host, mImageSupplier, mActivityTabSupplier, shareSupplier); +- registerSuggestionProcessor( ++ mEditUrlSuggestionProcessor = + new EditUrlSuggestionProcessor( +- context, host, mImageSupplier, mActivityTabSupplier, shareSupplier)); ++ context, host, mImageSupplier, mActivityTabSupplier, shareSupplier); + registerSuggestionProcessor(mEditUrlSuggestionProcessor); + registerSuggestionProcessor( new AnswerSuggestionProcessor(context, host, textProvider, mImageSupplier)); registerSuggestionProcessor( -@@ -201,6 +205,9 @@ class DropdownItemViewInfoListBuilder { +@@ -211,6 +215,9 @@ class DropdownItemViewInfoListBuilder { /** Signals that native initialization has completed. */ void onNativeInitialized() { mHeaderProcessor.onNativeInitialized(); diff --git a/build/patches/Restore-Simplified-NTP-launch.patch b/build/patches/Restore-Simplified-NTP-launch.patch index 2a92b5656..854ca1fc7 100644 --- a/build/patches/Restore-Simplified-NTP-launch.patch +++ b/build/patches/Restore-Simplified-NTP-launch.patch @@ -31,7 +31,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 -@@ -561,6 +561,7 @@ chrome_java_resources = [ +@@ -566,6 +566,7 @@ chrome_java_resources = [ "java/res/layout/new_tab_page_incognito.xml", "java/res/layout/new_tab_page_layout.xml", "java/res/layout/new_tab_page_tile_grid_placeholder.xml", @@ -42,7 +42,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 -@@ -623,6 +623,7 @@ chrome_java_sources = [ +@@ -626,6 +626,7 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/feedback/FeedFeedbackCollector.java", "java/src/org/chromium/chrome/browser/feedback/HelpAndFeedbackLauncherImpl.java", "java/src/org/chromium/chrome/browser/feedback/ScreenshotTask.java", @@ -226,7 +226,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageL /** * Whether the tiles shown in the layout have finished loading. * With {@link #mHasShownView}, it's one of the 2 flags used to track initialisation progress. -@@ -277,6 +280,7 @@ public class NewTabPageLayout extends LinearLayout { +@@ -278,6 +281,7 @@ public class NewTabPageLayout extends LinearLayout { initializeMostVisitedTilesCoordinator(profile, lifecycleDispatcher, tileGroupDelegate, touchEnabledDelegate, isScrollableMvtEnabled(), searchProviderIsGoogle); initializeSearchBoxBackground(); @@ -234,7 +234,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageL initializeSearchBoxTextView(); initializeVoiceSearchButton(); initializeLensButton(); -@@ -702,16 +706,22 @@ public class NewTabPageLayout extends LinearLayout { +@@ -703,16 +707,22 @@ public class NewTabPageLayout extends LinearLayout { marginLayoutParams.leftMargin = lateralPaddingsForNTP; marginLayoutParams.rightMargin = lateralPaddingsForNTP; } @@ -245,7 +245,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageL ? R.dimen.tile_grid_layout_top_margin : R.dimen.tile_grid_layout_no_logo_top_margin); + } - marginLayoutParams.bottomMargin = getResources().getDimensionPixelOffset( + marginLayoutParams.bottomMargin = getResources().getDimensionPixelSize( R.dimen.tile_carousel_layout_bottom_margin); } else { // Set a bit more top padding on the tile grid if there is no logo. @@ -259,7 +259,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageL marginLayoutParams.bottomMargin = getGridMvtBottomMargin(); } -@@ -1013,6 +1023,22 @@ public class NewTabPageLayout extends LinearLayout { +@@ -1014,6 +1024,22 @@ public class NewTabPageLayout extends LinearLayout { return iphCommandBuilder; } @@ -319,7 +319,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/Sug 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 -@@ -263,6 +263,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -260,6 +260,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kIncognitoReauthenticationForAndroid, &kIncognitoScreenshot, &kInfobarScrollOptimization, @@ -341,9 +341,9 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f diff --git a/components/signin/public/base/signin_switches.cc b/components/signin/public/base/signin_switches.cc --- a/components/signin/public/base/signin_switches.cc +++ b/components/signin/public/base/signin_switches.cc -@@ -84,4 +84,7 @@ BASE_FEATURE(kSearchEngineChoiceFre, - - BASE_FEATURE(kUnoDesktop, "UnoDesktop", base::FEATURE_DISABLED_BY_DEFAULT); +@@ -95,4 +95,7 @@ BASE_FEATURE(kRemoveSignedInAccountsDialog, + base::FEATURE_ENABLED_BY_DEFAULT); + #endif +#if BUILDFLAG(IS_ANDROID) +SET_CROMITE_FEATURE_DISABLED(kIdentityStatusConsistency); diff --git a/build/patches/Restore-adaptive-button-in-top-toolbar-customization.patch b/build/patches/Restore-adaptive-button-in-top-toolbar-customization.patch index 289c758eb..27238edbb 100644 --- a/build/patches/Restore-adaptive-button-in-top-toolbar-customization.patch +++ b/build/patches/Restore-adaptive-button-in-top-toolbar-customization.patch @@ -27,8 +27,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSe +import org.chromium.chrome.browser.toolbar.adaptive.AdaptiveToolbarFeatures; import org.chromium.chrome.browser.toolbar.adaptive.AdaptiveToolbarStatePredictor; import org.chromium.chrome.browser.tracing.settings.DeveloperSettings; - import org.chromium.components.browser_ui.settings.ChromeBasePreference; -@@ -225,7 +226,9 @@ public class MainSettings extends ChromeBaseSettingsFragment + import org.chromium.chrome.browser.ui.signin.SyncPromoController; +@@ -233,7 +234,9 @@ public class MainSettings extends ChromeBaseSettingsFragment new AdaptiveToolbarStatePredictor(null).recomputeUiState(uiState -> { // We don't show the toolbar shortcut settings page if disabled from finch. @@ -89,7 +89,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/share/ShareButt diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -675,18 +675,12 @@ const FeatureEntry::FeatureParam kAdaptiveButtonCustomization_Share[] = { +@@ -689,18 +689,12 @@ const FeatureEntry::FeatureParam kAdaptiveButtonCustomization_Share[] = { {"default_segment", "share"}, {"show_ui_only_after_ready", "false"}, {"ignore_segmentation_results", "true"}}; @@ -111,13 +111,13 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc 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 -@@ -49,9 +49,10 @@ +@@ -47,9 +47,10 @@ "expiry_milestone": 120 }, { + // restored in Bromite "name": "adaptive-button-in-top-toolbar-customization", - "owners": [ "shaktisahu", "chrome-segmentation-platform@google.com" ], + "owners": [ "shaktisahu@chromium.org", "chrome-segmentation-platform@google.com" ], - "expiry_milestone": 120 + "expiry_milestone": -1 }, @@ -142,7 +142,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarFeatures.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarFeatures.java --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarFeatures.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarFeatures.java -@@ -16,8 +16,18 @@ import org.chromium.chrome.browser.signin.services.UnifiedConsentServiceBridge; +@@ -16,8 +16,18 @@ import org.chromium.chrome.browser.readaloud.ReadAloudFeatures; /** * A utility class for handling feature flags used by {@link AdaptiveToolbarButtonController}. @@ -260,7 +260,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarStatePredictorTest.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarStatePredictorTest.java --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarStatePredictorTest.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarStatePredictorTest.java -@@ -68,6 +68,21 @@ public class AdaptiveToolbarStatePredictorTest { +@@ -76,6 +76,21 @@ public class AdaptiveToolbarStatePredictorTest { statePredictor.recomputeUiState(verifyResultCallback(expected)); } diff --git a/build/patches/Restore-offline-indicator-v2-flag.patch b/build/patches/Restore-offline-indicator-v2-flag.patch index f5e9710fb..132ed68c3 100644 --- a/build/patches/Restore-offline-indicator-v2-flag.patch +++ b/build/patches/Restore-offline-indicator-v2-flag.patch @@ -90,7 +90,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/in 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 -@@ -837,7 +837,8 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { +@@ -848,7 +848,8 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { private void initStatusIndicatorCoordinator(LayoutManagerImpl layoutManager) { // TODO(crbug.com/1035584): Disable on tablets for now as we need to do one or two extra // things for tablets. @@ -100,7 +100,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/Tab return; } -@@ -859,6 +860,11 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { +@@ -870,6 +871,11 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { mStatusIndicatorCoordinator.addObserver(mStatusIndicatorObserver); mStatusIndicatorCoordinator.addObserver(mStatusBarColorController); @@ -115,14 +115,14 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/Tab 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 -@@ -273,6 +273,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -270,6 +270,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kNewTabSearchEngineUrlAndroid, &kNotificationPermissionVariant, &kNotificationPermissionBottomSheet, + &kOfflineIndicatorV2, &kPageAnnotationsService, + &kPaintPreviewNewColdStartHeuristic, &kPreconnectOnTabCreation, - &kInlineUpdateFlow, 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 diff --git a/build/patches/Revert-Delete-block-external-form-redirects.patch b/build/patches/Revert-Delete-block-external-form-redirects.patch index 7ed50bed3..e94d27ca7 100644 --- a/build/patches/Revert-Delete-block-external-form-redirects.patch +++ b/build/patches/Revert-Delete-block-external-form-redirects.patch @@ -54,7 +54,7 @@ diff --git a/components/external_intents/android/external_intents_features.h b/c diff --git a/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalIntentsFeatures.java b/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalIntentsFeatures.java --- a/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalIntentsFeatures.java +++ b/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalIntentsFeatures.java -@@ -17,6 +17,12 @@ import org.chromium.base.annotations.NativeMethods; +@@ -18,6 +18,12 @@ import org.chromium.base.Features; */ @JNINamespace("external_intents") public class ExternalIntentsFeatures extends Features { diff --git a/build/patches/Revert-Permit-blocking-of-view-source.patch b/build/patches/Revert-Permit-blocking-of-view-source.patch index 36bc4c1cb..cdaf2ecd8 100644 --- a/build/patches/Revert-Permit-blocking-of-view-source.patch +++ b/build/patches/Revert-Permit-blocking-of-view-source.patch @@ -13,7 +13,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/components/policy/content/policy_blocklist_navigation_throttle.cc b/components/policy/content/policy_blocklist_navigation_throttle.cc --- a/components/policy/content/policy_blocklist_navigation_throttle.cc +++ b/components/policy/content/policy_blocklist_navigation_throttle.cc -@@ -15,7 +15,6 @@ +@@ -14,7 +14,6 @@ #include "components/prefs/pref_service.h" #include "components/user_prefs/user_prefs.h" #include "content/public/browser/browser_context.h" @@ -21,7 +21,7 @@ diff --git a/components/policy/content/policy_blocklist_navigation_throttle.cc b #include "content/public/browser/navigation_handle.h" #include "url/gurl.h" -@@ -43,19 +42,6 @@ PolicyBlocklistNavigationThrottle::PolicyBlocklistNavigationThrottle( +@@ -42,19 +41,6 @@ PolicyBlocklistNavigationThrottle::PolicyBlocklistNavigationThrottle( PolicyBlocklistNavigationThrottle::~PolicyBlocklistNavigationThrottle() = default; @@ -41,7 +41,7 @@ diff --git a/components/policy/content/policy_blocklist_navigation_throttle.cc b content::NavigationThrottle::ThrottleCheckResult PolicyBlocklistNavigationThrottle::WillStartRequest() { const GURL& url = navigation_handle()->GetURL(); -@@ -72,11 +58,6 @@ PolicyBlocklistNavigationThrottle::WillStartRequest() { +@@ -71,11 +57,6 @@ PolicyBlocklistNavigationThrottle::WillStartRequest() { net::ERR_BLOCKED_BY_ADMINISTRATOR); } diff --git a/build/patches/Revert-flags-remove-disable-pull-to-refresh-effect.patch b/build/patches/Revert-flags-remove-disable-pull-to-refresh-effect.patch index a0491f394..6a66add30 100644 --- a/build/patches/Revert-flags-remove-disable-pull-to-refresh-effect.patch +++ b/build/patches/Revert-flags-remove-disable-pull-to-refresh-effect.patch @@ -15,7 +15,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 -@@ -1812,6 +1812,10 @@ +@@ -1722,6 +1722,10 @@ "yangsharon@google.com", "alexmos@google.com", "creis@google.com" ], "expiry_milestone": 122 }, @@ -25,7 +25,7 @@ diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.js + }, { "name": "disable-quick-answers-v2-translation", - "owners": [ "croissant-eng" ], + "owners": [ "croissant-eng@chromium.org" ], diff --git a/cromite_flags/chrome/browser/about_flags_cc/Revert-flags-remove-disable-pull-to-refresh-effect.inc b/cromite_flags/chrome/browser/about_flags_cc/Revert-flags-remove-disable-pull-to-refresh-effect.inc new file mode 100644 --- /dev/null diff --git a/build/patches/Revert-removal-of-execution-context-address-space.patch b/build/patches/Revert-removal-of-execution-context-address-space.patch index 50079dc5e..030e3c9b6 100644 --- a/build/patches/Revert-removal-of-execution-context-address-space.patch +++ b/build/patches/Revert-removal-of-execution-context-address-space.patch @@ -24,7 +24,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../renderer/core/frame/policy_container.cc | 10 ++++++ .../renderer/core/frame/policy_container.h | 11 ++++++ .../renderer/core/frame/web_frame_test.cc | 34 +++++++++++++++++++ - .../layout_worklet_global_scope_proxy.cc | 2 +- + .../layout_worklet_global_scope_proxy.cc | 1 + ...ed_service_worker_module_script_fetcher.cc | 1 + .../modulescript/module_script_loader_test.cc | 1 + .../worker_module_script_fetcher.cc | 3 +- @@ -53,7 +53,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../audio_worklet_global_scope_test.cc | 1 + .../webaudio/audio_worklet_thread_test.cc | 1 + .../worklet/worklet_thread_test_common.cc | 2 +- - 36 files changed, 190 insertions(+), 24 deletions(-) + 36 files changed, 190 insertions(+), 23 deletions(-) create mode 100644 cromite_flags/content/public/common/content_features_cc/Revert-removal-of-execution-context-address-space.inc diff --git a/cromite_flags/content/public/common/content_features_cc/Revert-removal-of-execution-context-address-space.inc b/cromite_flags/content/public/common/content_features_cc/Revert-removal-of-execution-context-address-space.inc @@ -66,7 +66,7 @@ new file mode 100644 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 +++ b/third_party/blink/renderer/core/execution_context/execution_context.cc -@@ -516,6 +516,15 @@ void ExecutionContext::SetReferrerPolicy( +@@ -511,6 +511,15 @@ void ExecutionContext::SetReferrerPolicy( policy_container_->UpdateReferrerPolicy(referrer_policy); } @@ -91,8 +91,8 @@ diff --git a/third_party/blink/renderer/core/execution_context/execution_context #include "services/metrics/public/cpp/ukm_source_id.h" +#include "services/network/public/mojom/ip_address_space.mojom-blink-forward.h" #include "services/network/public/mojom/referrer_policy.mojom-blink-forward.h" - #include "third_party/abseil-cpp/absl/types/optional.h" #include "third_party/blink/public/common/tokens/tokens.h" + #include "third_party/blink/public/common/user_agent/user_agent_metadata.h" @@ -386,6 +387,9 @@ class CORE_EXPORT ExecutionContext : public Supplementable, const String& message = g_empty_string, const String& source_file = g_empty_string) const {} @@ -171,7 +171,7 @@ diff --git a/third_party/blink/renderer/core/frame/policy_container.h b/third_pa diff --git a/third_party/blink/renderer/core/frame/web_frame_test.cc b/third_party/blink/renderer/core/frame/web_frame_test.cc --- a/third_party/blink/renderer/core/frame/web_frame_test.cc +++ b/third_party/blink/renderer/core/frame/web_frame_test.cc -@@ -8069,6 +8069,40 @@ TEST_F(WebFrameTest, PushStateStartsAndStops) { +@@ -8079,6 +8079,40 @@ TEST_F(WebFrameTest, PushStateStartsAndStops) { EXPECT_EQ(client.StopLoadingCount(), 2); } @@ -212,15 +212,14 @@ diff --git a/third_party/blink/renderer/core/frame/web_frame_test.cc b/third_par TEST_F(WebFrameTest, CommitSynchronousNavigationForAboutBlankAndCheckStorageKeyNonce) { frame_test_helpers::WebViewHelper web_view_helper; -diff --git a/third_party/blink/renderer/core/layout/ng/custom/layout_worklet_global_scope_proxy.cc b/third_party/blink/renderer/core/layout/ng/custom/layout_worklet_global_scope_proxy.cc ---- a/third_party/blink/renderer/core/layout/ng/custom/layout_worklet_global_scope_proxy.cc -+++ b/third_party/blink/renderer/core/layout/ng/custom/layout_worklet_global_scope_proxy.cc -@@ -48,7 +48,7 @@ LayoutWorkletGlobalScopeProxy::LayoutWorkletGlobalScopeProxy( - window->GetReferrerPolicy(), window->GetSecurityOrigin(), +diff --git a/third_party/blink/renderer/core/layout/custom/layout_worklet_global_scope_proxy.cc b/third_party/blink/renderer/core/layout/custom/layout_worklet_global_scope_proxy.cc +--- a/third_party/blink/renderer/core/layout/custom/layout_worklet_global_scope_proxy.cc ++++ b/third_party/blink/renderer/core/layout/custom/layout_worklet_global_scope_proxy.cc +@@ -49,6 +49,7 @@ LayoutWorkletGlobalScopeProxy::LayoutWorkletGlobalScopeProxy( window->IsSecureContext(), window->GetHttpsState(), nullptr /* worker_clients */, -- frame_client->CreateWorkerContentSettingsClient(), -+ frame_client->CreateWorkerContentSettingsClient(), window->AddressSpace(), + frame_client->CreateWorkerContentSettingsClient(), ++ window->AddressSpace(), OriginTrialContext::GetInheritedTrialFeatures(window).get(), base::UnguessableToken::Create(), nullptr /* worker_settings */, mojom::blink::V8CacheOptions::kDefault, module_responses_map, @@ -364,7 +363,7 @@ diff --git a/third_party/blink/renderer/core/workers/dedicated_worker.h b/third_ diff --git a/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.cc b/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.cc --- a/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.cc +++ b/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.cc -@@ -82,6 +82,8 @@ DedicatedWorkerGlobalScope* DedicatedWorkerGlobalScope::Create( +@@ -83,6 +83,8 @@ DedicatedWorkerGlobalScope* DedicatedWorkerGlobalScope::Create( KURL response_script_url = creation_params->script_url; network::mojom::ReferrerPolicy response_referrer_policy = creation_params->referrer_policy; @@ -373,7 +372,7 @@ diff --git a/third_party/blink/renderer/core/workers/dedicated_worker_global_sco const bool parent_cross_origin_isolated_capability = creation_params->parent_cross_origin_isolated_capability; const bool parent_is_isolated_context = -@@ -101,7 +103,7 @@ DedicatedWorkerGlobalScope* DedicatedWorkerGlobalScope::Create( +@@ -102,7 +104,7 @@ DedicatedWorkerGlobalScope* DedicatedWorkerGlobalScope::Create( // Pass dummy origin trial tokens here as it is already set to outside's // origin trial tokens in DedicatedWorkerGlobalScope's constructor. global_scope->Initialize(response_script_url, response_referrer_policy, @@ -382,7 +381,7 @@ diff --git a/third_party/blink/renderer/core/workers/dedicated_worker_global_sco nullptr /* response_origin_trial_tokens */); return global_scope; } else { -@@ -218,6 +220,7 @@ const AtomicString& DedicatedWorkerGlobalScope::InterfaceName() const { +@@ -224,6 +226,7 @@ const AtomicString& DedicatedWorkerGlobalScope::InterfaceName() const { void DedicatedWorkerGlobalScope::Initialize( const KURL& response_url, network::mojom::ReferrerPolicy response_referrer_policy, @@ -390,7 +389,7 @@ diff --git a/third_party/blink/renderer/core/workers/dedicated_worker_global_sco Vector response_csp, const Vector* /* response_origin_trial_tokens */) { // Step 14.3. "Set worker global scope's url to response's url." -@@ -231,6 +234,9 @@ void DedicatedWorkerGlobalScope::Initialize( +@@ -237,6 +240,9 @@ void DedicatedWorkerGlobalScope::Initialize( // parsing the `Referrer-Policy` header of response." SetReferrerPolicy(response_referrer_policy); @@ -400,7 +399,7 @@ diff --git a/third_party/blink/renderer/core/workers/dedicated_worker_global_sco // The following is the Content-Security-Policy part of "Initialize worker // global scope's policy container" // https://html.spec.whatwg.org/#initialize-worker-policy-container -@@ -443,6 +449,7 @@ void DedicatedWorkerGlobalScope::DidFetchClassicScript( +@@ -449,6 +455,7 @@ void DedicatedWorkerGlobalScope::DidFetchClassicScript( // Pass dummy origin trial tokens here as it is already set to outside's // origin trial tokens in DedicatedWorkerGlobalScope's constructor. Initialize(classic_script_loader->ResponseURL(), response_referrer_policy, @@ -411,7 +410,7 @@ diff --git a/third_party/blink/renderer/core/workers/dedicated_worker_global_sco diff --git a/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.h b/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.h --- a/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.h +++ b/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.h -@@ -107,6 +107,7 @@ class CORE_EXPORT DedicatedWorkerGlobalScope final : public WorkerGlobalScope { +@@ -109,6 +109,7 @@ class CORE_EXPORT DedicatedWorkerGlobalScope final : public WorkerGlobalScope { void Initialize( const KURL& response_url, network::mojom::ReferrerPolicy response_referrer_policy, @@ -427,10 +426,10 @@ diff --git a/third_party/blink/renderer/core/workers/global_scope_creation_param WorkerClients* worker_clients, std::unique_ptr content_settings_client, + absl::optional response_address_space, - const Vector* inherited_trial_features, + const Vector* inherited_trial_features, const base::UnguessableToken& parent_devtools_token, std::unique_ptr worker_settings, -@@ -67,6 +68,7 @@ GlobalScopeCreationParams::GlobalScopeCreationParams( +@@ -68,6 +69,7 @@ GlobalScopeCreationParams::GlobalScopeCreationParams( starter_https_state(starter_https_state), worker_clients(worker_clients), content_settings_client(std::move(content_settings_client)), @@ -454,10 +453,10 @@ diff --git a/third_party/blink/renderer/core/workers/global_scope_creation_param WorkerClients*, std::unique_ptr, + absl::optional, - const Vector* inherited_trial_features, + const Vector* inherited_trial_features, const base::UnguessableToken& parent_devtools_token, std::unique_ptr, -@@ -167,6 +169,11 @@ struct CORE_EXPORT GlobalScopeCreationParams final { +@@ -169,6 +171,11 @@ struct CORE_EXPORT GlobalScopeCreationParams final { std::unique_ptr content_settings_client; @@ -594,15 +593,15 @@ diff --git a/third_party/blink/renderer/core/workers/shared_worker_global_scope. diff --git a/third_party/blink/renderer/core/workers/threaded_worklet_messaging_proxy.cc b/third_party/blink/renderer/core/workers/threaded_worklet_messaging_proxy.cc --- a/third_party/blink/renderer/core/workers/threaded_worklet_messaging_proxy.cc +++ b/third_party/blink/renderer/core/workers/threaded_worklet_messaging_proxy.cc -@@ -85,6 +85,7 @@ void ThreadedWorkletMessagingProxy::Initialize( +@@ -94,6 +94,7 @@ void ThreadedWorkletMessagingProxy::Initialize( /*starter_https_state=*/HttpsState::kNone, /*worker_clients=*/nullptr, - /*content_settings_client=*/nullptr, + /*content_settings_client=*/nullptr, &inherited_trial_features, + /*response_address_space*/network::mojom::IPAddressSpace::kUnknown, - /*inherited_trial_features=*/nullptr, /*parent_devtools_token=*/ client_provided_global_scope_creation_params->devtools_token, -@@ -130,6 +131,7 @@ void ThreadedWorkletMessagingProxy::Initialize( + /*worker_settings=*/nullptr, +@@ -140,6 +141,7 @@ void ThreadedWorkletMessagingProxy::Initialize( window->GetReferrerPolicy(), window->GetSecurityOrigin(), window->IsSecureContext(), window->GetHttpsState(), worker_clients, frame_client->CreateWorkerContentSettingsClient(), @@ -782,7 +781,7 @@ diff --git a/third_party/blink/renderer/modules/exported/web_embedded_worker_imp diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc --- a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc +++ b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc -@@ -474,6 +474,7 @@ void ServiceWorkerGlobalScope::DidFetchClassicScript( +@@ -476,6 +476,7 @@ void ServiceWorkerGlobalScope::DidFetchClassicScript( // is set, and with the following callback steps given evaluationStatus:" RunClassicScript( classic_script_loader->ResponseURL(), referrer_policy, @@ -790,7 +789,7 @@ diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_gl classic_script_loader->GetContentSecurityPolicy() ? mojo::Clone(classic_script_loader->GetContentSecurityPolicy() ->GetParsedPolicies()) -@@ -487,6 +488,7 @@ void ServiceWorkerGlobalScope::DidFetchClassicScript( +@@ -489,6 +490,7 @@ void ServiceWorkerGlobalScope::DidFetchClassicScript( void ServiceWorkerGlobalScope::Initialize( const KURL& response_url, network::mojom::ReferrerPolicy response_referrer_policy, @@ -798,7 +797,7 @@ diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_gl Vector response_csp, const Vector* response_origin_trial_tokens) { // Step 4.5. "Set workerGlobalScope's url to serviceWorker's script url." -@@ -500,6 +502,9 @@ void ServiceWorkerGlobalScope::Initialize( +@@ -502,6 +504,9 @@ void ServiceWorkerGlobalScope::Initialize( // script resource's referrer policy." SetReferrerPolicy(response_referrer_policy); @@ -808,7 +807,7 @@ diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_gl // This is quoted from the "Content Security Policy" algorithm in the service // workers spec: // "Whenever a user agent invokes Run Service Worker algorithm with a service -@@ -510,6 +515,9 @@ void ServiceWorkerGlobalScope::Initialize( +@@ -512,6 +517,9 @@ void ServiceWorkerGlobalScope::Initialize( // - If serviceWorker's script resource was delivered with a // Content-Security-Policy-Report-Only HTTP header containing the value // policy, the user agent must monitor policy for serviceWorker." @@ -818,7 +817,7 @@ diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_gl InitContentSecurityPolicyFromVector(std::move(response_csp)); BindContentSecurityPolicyToExecutionContext(); -@@ -550,26 +558,27 @@ void ServiceWorkerGlobalScope::LoadAndRunInstalledClassicScript( +@@ -552,26 +560,27 @@ void ServiceWorkerGlobalScope::LoadAndRunInstalledClassicScript( kDoNotSupportReferrerPolicyLegacyKeywords, &referrer_policy); } diff --git a/build/patches/Samsung-Note-9-SDK27-crazylinker-workaround.patch b/build/patches/Samsung-Note-9-SDK27-crazylinker-workaround.patch index 1b0046782..91c1398a1 100644 --- a/build/patches/Samsung-Note-9-SDK27-crazylinker-workaround.patch +++ b/build/patches/Samsung-Note-9-SDK27-crazylinker-workaround.patch @@ -11,7 +11,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java --- a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java +++ b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java -@@ -38,6 +38,7 @@ import org.chromium.build.annotations.MainDex; +@@ -37,6 +37,7 @@ import org.chromium.build.NativeLibraries; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -19,7 +19,7 @@ diff --git a/base/android/java/src/org/chromium/base/library_loader/LibraryLoade import javax.annotation.concurrent.GuardedBy; -@@ -285,7 +286,21 @@ public class LibraryLoader { +@@ -283,7 +284,21 @@ public class LibraryLoader { */ public void initInAppZygote() { assert !mInitDone; diff --git a/build/patches/Show-site-settings-for-cookies-javascript-and-ads.patch b/build/patches/Show-site-settings-for-cookies-javascript-and-ads.patch index e42a92303..544f66eaa 100644 --- a/build/patches/Show-site-settings-for-cookies-javascript-and-ads.patch +++ b/build/patches/Show-site-settings-for-cookies-javascript-and-ads.patch @@ -13,7 +13,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html 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 -@@ -548,6 +548,8 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -541,6 +541,8 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment setUpSoundPreference(preference); } else if (type == ContentSettingsType.JAVASCRIPT) { setUpJavascriptPreference(preference); @@ -22,7 +22,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } else if (type == ContentSettingsType.GEOLOCATION) { setUpLocationPreference(preference); } else if (type == ContentSettingsType.NOTIFICATIONS) { -@@ -939,16 +941,8 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -950,16 +952,8 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment private void setUpAdsInformationalBanner() { // Add the informational banner which shows at the top of the UI if ad blocking is // activated on this site. @@ -39,7 +39,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } private SiteSettingsCategory getWarningCategory() { -@@ -1123,17 +1117,35 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1133,17 +1127,35 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment @Nullable Integer currentValue = mSite.getContentSetting(browserContextHandle, ContentSettingsType.JAVASCRIPT); @@ -81,7 +81,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c /** * Updates the ads list preference based on whether the site is a candidate for blocking. This * has some custom behavior. -@@ -1149,22 +1161,10 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1159,22 +1171,10 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment setupContentSettingsPreference(preference, null, false); return; } @@ -107,7 +107,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/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 -@@ -223,13 +223,18 @@ public final class Website implements WebsiteEntry { +@@ -236,13 +236,18 @@ public final class Website implements WebsiteEntry { ContentSettingException exception = getContentSettingException(type); if (type == ContentSettingsType.ADS) { diff --git a/build/patches/Site-setting-for-images.patch b/build/patches/Site-setting-for-images.patch index 7db2dbc74..7aecef39e 100644 --- a/build/patches/Site-setting-for-images.patch +++ b/build/patches/Site-setting-for-images.patch @@ -259,7 +259,7 @@ diff --git a/components/content_settings/core/browser/content_settings_registry. diff --git a/components/content_settings/core/browser/content_settings_utils.cc b/components/content_settings/core/browser/content_settings_utils.cc --- a/components/content_settings/core/browser/content_settings_utils.cc +++ b/components/content_settings/core/browser/content_settings_utils.cc -@@ -145,12 +145,7 @@ void GetRendererContentSettingRules(const HostContentSettingsMap* map, +@@ -144,12 +144,7 @@ void GetRendererContentSettingRules(const HostContentSettingsMap* map, ContentSettingToValue(CONTENT_SETTING_ALLOW), std::string(), map->IsOffTheRecord())); #else diff --git a/build/patches/Switch-to-fstack-protector-strong.patch b/build/patches/Switch-to-fstack-protector-strong.patch index 67274d98c..f1bb7a211 100644 --- a/build/patches/Switch-to-fstack-protector-strong.patch +++ b/build/patches/Switch-to-fstack-protector-strong.patch @@ -19,7 +19,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn -@@ -372,14 +372,12 @@ config("compiler") { +@@ -378,14 +378,12 @@ config("compiler") { cflags += [ "-fstack-protector" ] } } else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) { diff --git a/build/patches/Timezone-customization.patch b/build/patches/Timezone-customization.patch index 98c67e4f4..3d10d7f30 100644 --- a/build/patches/Timezone-customization.patch +++ b/build/patches/Timezone-customization.patch @@ -45,7 +45,7 @@ Require: Content-settings-infrastructure.patch 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 -@@ -105,6 +105,7 @@ android_library("java") { +@@ -103,6 +103,7 @@ android_library("java") { "java/src/org/chromium/components/browser_ui/site_settings/WebsitePreference.java", "java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java", "java/src/org/chromium/components/browser_ui/site_settings/WebsiteRowPreference.java", @@ -53,9 +53,9 @@ diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/b ] resources_package = "org.chromium.components.browser_ui.site_settings" -@@ -277,6 +278,8 @@ android_resources("java_resources") { +@@ -276,6 +277,8 @@ android_resources("java_resources") { + "java/res/xml/single_website_preferences.xml", "java/res/xml/site_settings_preferences.xml", - "java/res/xml/site_settings_preferences_with_categories.xml", "java/res/xml/website_preferences.xml", + "java/res/layout/timezoneoverride_site_settings_preference.xml", + "java/res/layout/time_zone_select_dialog.xml", @@ -381,7 +381,7 @@ new file mode 100755 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 -@@ -416,6 +416,14 @@ public class WebsitePreferenceBridge { +@@ -417,6 +417,14 @@ public class WebsitePreferenceBridge { return WebsitePreferenceBridgeJni.get().toHostOnlyPattern(pattern); } @@ -396,7 +396,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c @NativeMethods public interface Natives { boolean isNotificationEmbargoedForOrigin( -@@ -485,5 +493,7 @@ public class WebsitePreferenceBridge { +@@ -486,5 +494,7 @@ public class WebsitePreferenceBridge { boolean getLocationAllowedByPolicy(BrowserContextHandle browserContextHandle); String toDomainWildcardPattern(String pattern); String toHostOnlyPattern(String pattern); @@ -559,7 +559,7 @@ new file mode 100644 diff --git a/components/browser_ui/site_settings/android/website_preference_bridge.cc b/components/browser_ui/site_settings/android/website_preference_bridge.cc --- a/components/browser_ui/site_settings/android/website_preference_bridge.cc +++ b/components/browser_ui/site_settings/android/website_preference_bridge.cc -@@ -1103,3 +1103,19 @@ JNI_WebsitePreferenceBridge_ToHostOnlyPattern( +@@ -1104,3 +1104,19 @@ JNI_WebsitePreferenceBridge_ToHostOnlyPattern( ContentSettingsPattern::FromString(pattern_string)); return ConvertUTF8ToJavaString(env, host_only_pattern.ToString()); } @@ -674,7 +674,7 @@ diff --git a/components/content_settings/core/browser/content_settings_pref_prov } PrefProvider::~PrefProvider() { -@@ -404,4 +410,14 @@ void PrefProvider::SetClockForTesting(base::Clock* clock) { +@@ -407,4 +413,14 @@ void PrefProvider::SetClockForTesting(base::Clock* clock) { clock_ = clock; } @@ -713,7 +713,7 @@ diff --git a/components/content_settings/core/browser/content_settings_pref_prov diff --git a/components/content_settings/core/browser/content_settings_utils.cc b/components/content_settings/core/browser/content_settings_utils.cc --- a/components/content_settings/core/browser/content_settings_utils.cc +++ b/components/content_settings/core/browser/content_settings_utils.cc -@@ -159,6 +159,11 @@ void GetRendererContentSettingRules(const HostContentSettingsMap* map, +@@ -158,6 +158,11 @@ void GetRendererContentSettingRules(const HostContentSettingsMap* map, map->GetSettingsForOneType(ContentSettingsType::JAVASCRIPT); rules->popup_redirect_rules = map->GetSettingsForOneType(ContentSettingsType::POPUPS); @@ -728,7 +728,7 @@ diff --git a/components/content_settings/core/browser/content_settings_utils.cc diff --git a/components/content_settings/core/browser/host_content_settings_map.cc b/components/content_settings/core/browser/host_content_settings_map.cc --- a/components/content_settings/core/browser/host_content_settings_map.cc +++ b/components/content_settings/core/browser/host_content_settings_map.cc -@@ -662,6 +662,14 @@ void HostContentSettingsMap::SetClockForTesting(base::Clock* clock) { +@@ -670,6 +670,14 @@ void HostContentSettingsMap::SetClockForTesting(base::Clock* clock) { provider->SetClockForTesting(clock); } @@ -746,7 +746,7 @@ diff --git a/components/content_settings/core/browser/host_content_settings_map. diff --git a/components/content_settings/core/browser/host_content_settings_map.h b/components/content_settings/core/browser/host_content_settings_map.h --- a/components/content_settings/core/browser/host_content_settings_map.h +++ b/components/content_settings/core/browser/host_content_settings_map.h -@@ -385,6 +385,9 @@ class HostContentSettingsMap : public content_settings::Observer, +@@ -387,6 +387,9 @@ class HostContentSettingsMap : public content_settings::Observer, allow_invalid_secondary_pattern_for_testing_ = allow; } @@ -777,7 +777,7 @@ diff --git a/components/content_settings/core/common/content_settings.h b/compon diff --git a/components/content_settings/core/common/content_settings.mojom b/components/content_settings/core/common/content_settings.mojom --- a/components/content_settings/core/common/content_settings.mojom +++ b/components/content_settings/core/common/content_settings.mojom -@@ -102,4 +102,5 @@ struct RendererContentSettingRules { +@@ -103,4 +103,5 @@ struct RendererContentSettingRules { array popup_redirect_rules; array mixed_content_rules; array auto_dark_content_rules; diff --git a/build/patches/Use-4-tile-rows-never-show-logo.patch b/build/patches/Use-4-tile-rows-never-show-logo.patch index a9537686e..e81522d5c 100644 --- a/build/patches/Use-4-tile-rows-never-show-logo.patch +++ b/build/patches/Use-4-tile-rows-never-show-logo.patch @@ -22,7 +22,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageL private boolean mSearchProviderIsGoogle; private boolean mShowingNonStandardLogo; -@@ -433,7 +433,7 @@ public class NewTabPageLayout extends LinearLayout { +@@ -434,7 +434,7 @@ public class NewTabPageLayout extends LinearLayout { boolean isScrollableMvtEnabled, boolean searchProviderIsGoogle) { assert mMvTilesContainerLayout != null; @@ -31,7 +31,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageL if (searchProviderIsGoogle && QueryTileUtils.isQueryTilesEnabledOnNTP()) { maxRows = QueryTileSection.getMaxRowsForMostVisitedTiles(getContext()); } -@@ -654,7 +654,7 @@ public class NewTabPageLayout extends LinearLayout { +@@ -655,7 +655,7 @@ public class NewTabPageLayout extends LinearLayout { && mInitialized) { return; } @@ -43,7 +43,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageL diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSitesBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSitesBridge.java --- a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSitesBridge.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSitesBridge.java -@@ -22,7 +22,7 @@ public class MostVisitedSitesBridge implements MostVisitedSites { +@@ -23,7 +23,7 @@ public class MostVisitedSitesBridge implements MostVisitedSites { * Maximum number of tiles that is explicitly supported. UMA relies on this value, so even if * the UI supports it, getting more can raise unexpected issues. */ diff --git a/build/patches/User-agent-customization.patch b/build/patches/User-agent-customization.patch index e5c6cd83f..a0401755b 100644 --- a/build/patches/User-agent-customization.patch +++ b/build/patches/User-agent-customization.patch @@ -21,7 +21,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../PrivacyPreferencesManagerImpl.java | 42 ++++ .../settings/UserAgentPreferences.java | 188 ++++++++++++++++++ .../chromium/chrome/browser/tab/TabImpl.java | 89 ++++++++- - .../chromium/chrome/browser/tab/TabUtils.java | 24 ++- + .../chromium/chrome/browser/tab/TabUtils.java | 23 ++- .../browser/android/content/content_utils.cc | 28 +++ .../preferences/browser_prefs_android.cc | 7 + .../privacy_preferences_manager_impl.cc | 124 ++++++++++++ @@ -40,7 +40,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../browser/web_contents/web_contents_impl.cc | 4 + .../framehost/NavigationControllerImpl.java | 3 +- content/renderer/render_thread_impl.cc | 1 - - 30 files changed, 748 insertions(+), 18 deletions(-) + 30 files changed, 748 insertions(+), 17 deletions(-) create mode 100644 chrome/android/java/res/layout/custom_useragent_preferences.xml create mode 100644 chrome/android/java/res/xml/useragent_preferences.xml create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/settings/UserAgentPreferences.java @@ -72,8 +72,8 @@ diff --git a/base/base_switches.h b/base/base_switches.h 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 -@@ -667,4 +667,6 @@ chrome_java_resources = [ - "java/res/xml/privacy_preferences_v2.xml", +@@ -673,4 +673,6 @@ chrome_java_resources = [ + "java/res/xml/privacy_preferences.xml", "java/res/xml/search_widget_info.xml", "java/res/xml/tracing_preferences.xml", + "java/res/xml/useragent_preferences.xml", @@ -82,7 +82,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 -@@ -951,6 +951,7 @@ chrome_java_sources = [ +@@ -958,6 +958,7 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/payments/ui/DimmingDialog.java", "java/src/org/chromium/chrome/browser/payments/ui/LineItem.java", "java/src/org/chromium/chrome/browser/payments/ui/PaymentAppComparator.java", @@ -204,7 +204,7 @@ new file mode 100644 diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml --- a/chrome/android/java/res/xml/main_preferences.xml +++ b/chrome/android/java/res/xml/main_preferences.xml -@@ -110,6 +110,11 @@ +@@ -111,6 +111,11 @@ found in the LICENSE file. android:key="content_settings" android:order="19" android:title="@string/prefs_site_settings"/> @@ -263,7 +263,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrow import java.io.File; import java.util.ArrayList; -@@ -304,11 +305,13 @@ public class ChromeBrowserInitializer { +@@ -308,11 +309,13 @@ public class ChromeBrowserInitializer { @Override public void onSuccess() { @@ -280,7 +280,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeBrow diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacyPreferencesManagerImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacyPreferencesManagerImpl.java --- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacyPreferencesManagerImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacyPreferencesManagerImpl.java -@@ -220,10 +220,52 @@ public class PrivacyPreferencesManagerImpl implements PrivacyPreferencesManager +@@ -223,10 +223,52 @@ public class PrivacyPreferencesManagerImpl implements PrivacyPreferencesManager return mCrashUploadPermittedSupplier; } @@ -541,7 +541,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav /** * Implementation of the interface {@link Tab}. Contains and manages a {@link ContentView}. * This class is not intended to be extended. -@@ -572,6 +577,32 @@ public class TabImpl implements Tab { +@@ -573,6 +578,32 @@ public class TabImpl implements Tab { params.setOverrideUserAgent(calculateUserAgentOverrideOption(null)); } @@ -574,7 +574,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav @TabLoadStatus int result = loadUrlInternal(params, fixedUrl); -@@ -1457,8 +1488,15 @@ public class TabImpl implements Tab { +@@ -1455,8 +1486,15 @@ public class TabImpl implements Tab { mWebContents.setImportance(mImportance); @@ -592,7 +592,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav mContentView.addOnAttachStateChangeListener(mAttachStateChangeListener); updateInteractableState(); -@@ -1627,6 +1665,10 @@ public class TabImpl implements Tab { +@@ -1631,6 +1669,10 @@ public class TabImpl implements Tab { } mIsBeingRestored = true; for (TabObserver observer : mObservers) observer.onRestoreStarted(this); @@ -603,7 +603,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav } finally { TraceEvent.end("Tab.restoreIfNeeded"); } -@@ -1838,6 +1880,13 @@ public class TabImpl implements Tab { +@@ -1840,6 +1882,13 @@ public class TabImpl implements Tab { } private @UserAgentOverrideOption int calculateUserAgentOverrideOption(@Nullable GURL url) { @@ -617,7 +617,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav WebContents webContents = getWebContents(); boolean currentRequestDesktopSite = TabUtils.isUsingDesktopUserAgent(webContents); @TabUserAgent -@@ -1905,6 +1954,42 @@ public class TabImpl implements Tab { +@@ -1907,6 +1956,42 @@ public class TabImpl implements Tab { /* forcedByUser */ false, caller); } @@ -663,7 +663,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabUtils.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabUtils.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabUtils.java -@@ -40,6 +40,10 @@ import org.chromium.ui.display.DisplayAndroidManager; +@@ -41,6 +41,10 @@ import org.chromium.ui.display.DisplayAndroidManager; import org.chromium.ui.display.DisplayUtil; import org.chromium.url.GURL; @@ -674,7 +674,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabUtils.ja import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; -@@ -160,17 +164,15 @@ public class TabUtils { +@@ -161,16 +165,15 @@ public class TabUtils { // TODO(crbug.com/1413060): Remove param forcedByUser from TabUtils#switchUserAgent. public static void switchUserAgent( Tab tab, boolean switchToDesktop, boolean forcedByUser, int caller) { @@ -684,8 +684,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabUtils.ja - if (forcedByUser) { - @TabUserAgent - int tabUserAgent = switchToDesktop ? TabUserAgent.DESKTOP : TabUserAgent.MOBILE; -- if (isDesktopSiteGlobalEnabled(Profile.fromWebContents(tab.getWebContents())) -- == switchToDesktop) { +- if (isDesktopSiteGlobalEnabled(tab.getProfile()) == switchToDesktop) { - tabUserAgent = TabUserAgent.DEFAULT; - } - tab.setUserAgent(tabUserAgent); @@ -910,7 +909,7 @@ diff --git a/chrome/browser/android/preferences/privacy_preferences_manager_impl diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java --- a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java +++ b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java -@@ -979,6 +979,9 @@ public final class ChromePreferenceKeys { +@@ -974,6 +974,9 @@ public final class ChromePreferenceKeys { public static final String BLUETOOTH_NOTIFICATION_IDS = "Chrome.Bluetooth.NotificationIds"; public static final String USB_NOTIFICATION_IDS = "Chrome.USB.NotificationIds"; @@ -920,7 +919,7 @@ diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/bro /** * These values are currently used as SharedPreferences keys, along with the keys in * {@link LegacyChromePreferenceKeys#getKeysInUse()}. Add new SharedPreferences keys -@@ -1119,8 +1122,8 @@ public final class ChromePreferenceKeys { +@@ -1113,8 +1116,8 @@ public final class ChromePreferenceKeys { SIGNIN_PROMO_NTP_LAST_SHOWN_TIME, SYNC_PROMO_TOTAL_SHOW_COUNT, SEARCH_RESUMPTION_MODULE_COLLAPSE_ON_NTP, @@ -930,7 +929,7 @@ diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/bro + USERAGENT_ALWAYS_DESKTOP_MODE, TABBED_ACTIVITY_LAST_VISIBLE_TIME_MS, TWA_DISCLOSURE_SEEN_PACKAGES, - UMA_ON_PRECREATE_COUNTER, + UMA_ON_POSTCREATE_COUNTER, diff --git a/chrome/browser/privacy/settings/java/src/org/chromium/chrome/browser/privacy/settings/PrivacyPreferencesManager.java b/chrome/browser/privacy/settings/java/src/org/chromium/chrome/browser/privacy/settings/PrivacyPreferencesManager.java --- a/chrome/browser/privacy/settings/java/src/org/chromium/chrome/browser/privacy/settings/PrivacyPreferencesManager.java +++ b/chrome/browser/privacy/settings/java/src/org/chromium/chrome/browser/privacy/settings/PrivacyPreferencesManager.java @@ -952,7 +951,7 @@ diff --git a/chrome/browser/privacy/settings/java/src/org/chromium/chrome/browse diff --git a/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/Tab.java b/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/Tab.java --- a/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/Tab.java +++ b/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/Tab.java -@@ -279,6 +279,8 @@ public interface Tab extends TabLifecycle { +@@ -285,6 +285,8 @@ public interface Tab extends TabLifecycle { */ void goForward(); @@ -1004,7 +1003,7 @@ diff --git a/chrome/browser/tabmodel/internal/android/java/src/org/chromium/chro 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 -@@ -231,6 +231,41 @@ CHAR_LIMIT guidelines: +@@ -234,6 +234,41 @@ CHAR_LIMIT guidelines: Visit help page @@ -1049,7 +1048,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h -@@ -1807,6 +1807,14 @@ inline constexpr char kNaviOnboardGroup[] = "browser.navi_onboard_group"; +@@ -1828,6 +1828,14 @@ inline constexpr char kNaviOnboardGroup[] = "browser.navi_onboard_group"; inline constexpr char kHadThreeConsecutiveNotificationPermissionDenies[] = "profile.content_settings.had_three_consecutive_denies.notifications"; @@ -1144,7 +1143,7 @@ diff --git a/content/browser/renderer_host/navigation_controller_android.h b/con diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -3484,6 +3484,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3558,6 +3558,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( switches::kLacrosUseChromeosProtectedMedia, switches::kLacrosUseChromeosProtectedAv1, #endif @@ -1158,12 +1157,12 @@ diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser @@ -14,6 +14,7 @@ #include - #include "base/allocator/partition_allocator/partition_alloc_buildflags.h" + #include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/base_switches.h" #include "base/check_op.h" #include "base/command_line.h" #include "base/containers/contains.h" -@@ -2996,6 +2997,9 @@ const blink::web_pref::WebPreferences WebContentsImpl::ComputeWebPreferences() { +@@ -3087,6 +3088,9 @@ const blink::web_pref::WebPreferences WebContentsImpl::ComputeWebPreferences() { #else prefs.viewport_meta_enabled = false; #endif @@ -1176,7 +1175,7 @@ diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser diff --git a/content/public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java b/content/public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java --- a/content/public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java +++ b/content/public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java -@@ -184,6 +184,7 @@ import org.chromium.url.Origin; +@@ -185,6 +185,7 @@ import org.chromium.url.Origin; params.getBaseUrl(), params.getVirtualUrlForDataUrl(), params.getDataUrlAsString(), params.getCanLoadLocalResources(), params.getIsRendererInitiated(), params.getShouldReplaceCurrentEntry(), @@ -1184,7 +1183,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/frameh params.getInitiatorOrigin(), params.getHasUserGesture(), params.getShouldClearHistoryList(), params.getAdditionalNavigationParams(), inputStart, -@@ -377,7 +378,7 @@ import org.chromium.url.Origin; +@@ -378,7 +379,7 @@ import org.chromium.url.Origin; String referrerUrl, int referrerPolicy, int uaOverrideOption, String extraHeaders, ResourceRequestBody postData, String baseUrlForDataUrl, String virtualUrlForDataUrl, String dataUrlAsString, boolean canLoadLocalResources, boolean isRendererInitiated, @@ -1196,9 +1195,9 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/frameh diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -880,7 +880,6 @@ void RenderThreadImpl::InitializeRenderer( +@@ -885,7 +885,6 @@ void RenderThreadImpl::InitializeRenderer( + const blink::UserAgentMetadata& user_agent_metadata, const std::vector& cors_exempt_header_list, - network::mojom::AttributionSupport attribution_support, blink::mojom::OriginTrialsSettingsPtr origin_trials_settings) { - DCHECK(user_agent_.IsNull()); diff --git a/build/patches/Viewport-Protection-Site-Setting.patch b/build/patches/Viewport-Protection-Site-Setting.patch index 612552403..27a86da8c 100644 --- a/build/patches/Viewport-Protection-Site-Setting.patch +++ b/build/patches/Viewport-Protection-Site-Setting.patch @@ -182,7 +182,7 @@ new file mode 100644 diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2275,6 +2275,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2285,6 +2285,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, // var w = window.open() // var not_emulated_screen_info = w.screen bool protection_enabled = base::FeatureList::IsEnabled(features::kViewportProtection); @@ -194,7 +194,7 @@ diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_p 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 -@@ -896,6 +896,9 @@ void Page::UpdateAcceleratedCompositingSettings() { +@@ -908,6 +908,9 @@ void Page::UpdateAcceleratedCompositingSettings() { void Page::CalculateEmulatedScreenSetting(LocalFrame* frame, bool force) { bool isEnabled = base::FeatureList::IsEnabled(features::kViewportProtection); diff --git a/build/patches/Viewport-Protection-flag.patch b/build/patches/Viewport-Protection-flag.patch index c2fcecfc5..e907e3a3d 100644 --- a/build/patches/Viewport-Protection-flag.patch +++ b/build/patches/Viewport-Protection-flag.patch @@ -87,7 +87,7 @@ diff --git a/third_party/blink/public/common/widget/device_emulation_params.h b/ diff --git a/third_party/blink/renderer/core/css/media_values.cc b/third_party/blink/renderer/core/css/media_values.cc --- a/third_party/blink/renderer/core/css/media_values.cc +++ b/third_party/blink/renderer/core/css/media_values.cc -@@ -182,7 +182,7 @@ bool MediaValues::CalculateStrictMode(LocalFrame* frame) { +@@ -184,7 +184,7 @@ bool MediaValues::CalculateStrictMode(LocalFrame* frame) { } float MediaValues::CalculateDevicePixelRatio(LocalFrame* frame) { @@ -99,7 +99,7 @@ diff --git a/third_party/blink/renderer/core/css/media_values.cc b/third_party/b diff --git a/third_party/blink/renderer/core/css/resolver/style_resolver.cc b/third_party/blink/renderer/core/css/resolver/style_resolver.cc --- a/third_party/blink/renderer/core/css/resolver/style_resolver.cc +++ b/third_party/blink/renderer/core/css/resolver/style_resolver.cc -@@ -1783,7 +1783,12 @@ ComputedStyleBuilder StyleResolver::InitialStyleBuilderForElement() const { +@@ -1796,7 +1796,12 @@ ComputedStyleBuilder StyleResolver::InitialStyleBuilderForElement() const { ComputedStyleBuilder builder = CreateComputedStyleBuilder(); builder.SetRtlOrdering(GetDocument().VisuallyOrdered() ? EOrder::kVisual : EOrder::kLogical); @@ -185,7 +185,7 @@ diff --git a/third_party/blink/renderer/core/events/pointer_event.h b/third_part diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -1052,7 +1052,7 @@ WebPagePopupImpl* WebViewImpl::OpenPagePopup(PagePopupClient* client) { +@@ -1055,7 +1055,7 @@ WebPagePopupImpl* WebViewImpl::OpenPagePopup(PagePopupClient* client) { page_popup_ = WebPagePopupImpl::Create( std::move(popup_widget_host), std::move(widget_host), std::move(widget_receiver), this, agent_group_scheduler, @@ -197,7 +197,7 @@ diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_p diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -1473,7 +1473,12 @@ int LocalDOMWindow::outerHeight() const { +@@ -1481,7 +1481,12 @@ int LocalDOMWindow::outerHeight() const { if (frame->IsInFencedFrameTree()) { return innerHeight(); } @@ -211,7 +211,7 @@ diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_p Page* page = frame->GetPage(); if (!page) return 0; -@@ -1498,7 +1503,12 @@ int LocalDOMWindow::outerWidth() const { +@@ -1506,7 +1511,12 @@ int LocalDOMWindow::outerWidth() const { if (frame->IsInFencedFrameTree()) { return innerWidth(); } @@ -225,7 +225,7 @@ diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_p Page* page = frame->GetPage(); if (!page) return 0; -@@ -1691,7 +1701,8 @@ double LocalDOMWindow::devicePixelRatio() const { +@@ -1699,7 +1709,8 @@ double LocalDOMWindow::devicePixelRatio() const { if (!GetFrame()) return 0.0; @@ -235,7 +235,7 @@ diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_p } void LocalDOMWindow::scrollBy(double x, double y) const { -@@ -2254,6 +2265,21 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2264,6 +2275,21 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, if (!completed_url.IsEmpty() || result.new_window) result.frame->Navigate(frame_request, WebFrameLoadType::kStandard); @@ -257,7 +257,7 @@ diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_p // TODO(japhet): window-open-noopener.html?_top and several tests in // html/browsers/windows/browsing-context-names/ appear to require that // the special case target names (_top, _parent, _self) ignore opener -@@ -2310,6 +2336,15 @@ DOMWindow* LocalDOMWindow::openPictureInPictureWindow( +@@ -2320,6 +2346,15 @@ DOMWindow* LocalDOMWindow::openPictureInPictureWindow( DCHECK(result.new_window); result.frame->Navigate(frame_request, WebFrameLoadType::kStandard); @@ -276,7 +276,7 @@ diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_p 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 -@@ -1402,6 +1402,10 @@ void LocalFrame::RestoreScrollOffsets() { +@@ -1408,6 +1408,10 @@ void LocalFrame::RestoreScrollOffsets() { saved_scroll_offsets_ = nullptr; } @@ -287,7 +287,7 @@ diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/ void LocalFrame::SetPageZoomFactor(float factor) { SetPageAndTextZoomFactors(factor, text_zoom_factor_); } -@@ -1542,12 +1546,16 @@ device::mojom::blink::DevicePostureType LocalFrame::GetDevicePosture() { +@@ -1569,12 +1573,16 @@ device::mojom::blink::DevicePostureType LocalFrame::GetDevicePosture() { return mojo_handler_->GetDevicePosture(); } @@ -309,7 +309,7 @@ diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/ diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h --- a/third_party/blink/renderer/core/frame/local_frame.h +++ b/third_party/blink/renderer/core/frame/local_frame.h -@@ -404,13 +404,14 @@ class CORE_EXPORT LocalFrame final +@@ -405,13 +405,14 @@ class CORE_EXPORT LocalFrame final void SetInViewSourceMode(bool = true); void SetPageZoomFactor(float); @@ -326,7 +326,7 @@ diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/b // Informs the local root's document and its local descendant subtree that a // media query value changed. -@@ -1026,6 +1027,7 @@ class CORE_EXPORT LocalFrame final +@@ -1035,6 +1036,7 @@ class CORE_EXPORT LocalFrame final unsigned hidden_ : 1; float page_zoom_factor_; @@ -432,7 +432,7 @@ diff --git a/third_party/blink/renderer/core/frame/screen_metrics_emulator.h b/t diff --git a/third_party/blink/renderer/core/frame/web_frame_widget_impl.cc b/third_party/blink/renderer/core/frame/web_frame_widget_impl.cc --- a/third_party/blink/renderer/core/frame/web_frame_widget_impl.cc +++ b/third_party/blink/renderer/core/frame/web_frame_widget_impl.cc -@@ -1779,6 +1779,14 @@ void WebFrameWidgetImpl::ApplyVisualPropertiesSizing( +@@ -1785,6 +1785,14 @@ void WebFrameWidgetImpl::ApplyVisualPropertiesSizing( if (auto* device_emulator = DeviceEmulator()) { device_emulator->UpdateVisualProperties(visual_properties); @@ -522,7 +522,7 @@ diff --git a/third_party/blink/renderer/core/page/page.cc b/third_party/blink/re namespace blink { -@@ -890,7 +894,79 @@ void Page::UpdateAcceleratedCompositingSettings() { +@@ -902,7 +906,79 @@ void Page::UpdateAcceleratedCompositingSettings() { } } @@ -605,9 +605,9 @@ diff --git a/third_party/blink/renderer/core/page/page.cc b/third_party/blink/re diff --git a/third_party/blink/renderer/core/page/page.h b/third_party/blink/renderer/core/page/page.h --- a/third_party/blink/renderer/core/page/page.h +++ b/third_party/blink/renderer/core/page/page.h -@@ -445,6 +445,9 @@ class CORE_EXPORT Page final : public GarbageCollected, - // place. - void UpdateBrowsingContextGroup(const blink::BrowsingContextGroupInfo&); +@@ -460,6 +460,9 @@ class CORE_EXPORT Page final : public GarbageCollected, + return attribution_support_; + } + void CalculateEmulatedScreenSetting(LocalFrame* frame, bool force = false); + bool IsScreenEmulated() { return is_screen_emulated; } @@ -615,7 +615,7 @@ diff --git a/third_party/blink/renderer/core/page/page.h b/third_party/blink/ren private: friend class ScopedPagePauser; -@@ -588,6 +591,10 @@ class CORE_EXPORT Page final : public GarbageCollected, +@@ -605,6 +608,10 @@ class CORE_EXPORT Page final : public GarbageCollected, // browser side FrameTree has the FrameTree::Type of kFencedFrame. bool is_fenced_frame_tree_ = false; diff --git a/build/patches/Welcome-screen.patch b/build/patches/Welcome-screen.patch index 8a8bd03d1..118a96c21 100644 --- a/build/patches/Welcome-screen.patch +++ b/build/patches/Welcome-screen.patch @@ -11,15 +11,15 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../android/java/res/layout/fre_tosanduma.xml | 160 +++++++++ chrome/android/java/res/values/dimens.xml | 10 + chrome/android/java/res/values/styles.xml | 24 ++ - .../firstrun/ChildAccountStatusSupplier.java | 8 - + .../firstrun/ChildAccountStatusSupplier.java | 13 - .../browser/firstrun/FirstRunActivity.java | 21 +- .../firstrun/FirstRunActivityBase.java | 6 +- - .../firstrun/FirstRunFlowSequencer.java | 52 +-- - .../browser/firstrun/FirstRunUtils.java | 16 +- + .../firstrun/FirstRunFlowSequencer.java | 58 +-- + .../browser/firstrun/FirstRunUtils.java | 15 +- .../firstrun/ToSAndUMAFirstRunFragment.java | 336 ++++++++++++++++++ .../firstrun/TosAndUmaFragmentView.java | 336 ++++++++++++++++++ .../strings/android_chrome_strings.grd | 24 +- - 13 files changed, 910 insertions(+), 86 deletions(-) + 13 files changed, 910 insertions(+), 96 deletions(-) create mode 100644 chrome/android/java/res/layout/fre_tosanduma.xml create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAndUMAFirstRunFragment.java create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/firstrun/TosAndUmaFragmentView.java @@ -27,7 +27,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 -@@ -523,6 +523,7 @@ chrome_java_resources = [ +@@ -526,6 +526,7 @@ chrome_java_resources = [ "java/res/layout/find_in_page.xml", "java/res/layout/find_toolbar.xml", "java/res/layout/fre_tos_privacy_disclaimer.xml", @@ -38,7 +38,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 -@@ -650,6 +650,8 @@ chrome_java_sources = [ +@@ -653,6 +653,8 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/firstrun/SyncConsentFirstRunFragment.java", "java/src/org/chromium/chrome/browser/firstrun/TabbedModeFirstRunActivity.java", "java/src/org/chromium/chrome/browser/firstrun/TosDialogBehaviorSharedPrefInvalidator.java", @@ -277,17 +277,22 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/ChildA /** * Fetches the child account status to be used by other FRE components. -@@ -41,13 +40,6 @@ public class ChildAccountStatusSupplier implements OneshotSupplier { +@@ -41,18 +40,6 @@ public class ChildAccountStatusSupplier implements OneshotSupplier { public ChildAccountStatusSupplier(AccountManagerFacade accountManagerFacade, FirstRunAppRestrictionInfo appRestrictionInfo) { mChildAccountStatusStartTime = SystemClock.elapsedRealtime(); - - appRestrictionInfo.getHasAppRestriction(this::onAppRestrictionDetected); - -- accountManagerFacade.getAccounts().then(accounts -> { -- AccountUtils.checkChildAccountStatusLegacy(accountManagerFacade, accounts, -- (isChild, account) -> onChildAccountStatusReady(isChild)); -- }); +- accountManagerFacade +- .getCoreAccountInfos() +- .then( +- coreAccountInfos -> { +- AccountUtils.checkChildAccountStatus( +- accountManagerFacade, +- coreAccountInfos, +- (isChild, account) -> onChildAccountStatusReady(isChild)); +- }); } @Override @@ -365,8 +370,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstR 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 -@@ -33,8 +33,6 @@ import org.chromium.chrome.browser.profiles.Profile; - import org.chromium.chrome.browser.profiles.ProfileManagerUtils; +@@ -36,8 +36,6 @@ import org.chromium.chrome.browser.profiles.ProfileManagerUtils; + import org.chromium.chrome.browser.ui.system.StatusBarColorController; import org.chromium.components.browser_ui.widget.gesture.BackPressHandler; import org.chromium.components.policy.PolicyService; -import org.chromium.components.signin.AccountManagerFacade; @@ -374,7 +379,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstR /** Base class for First Run Experience. */ public abstract class FirstRunActivityBase -@@ -104,9 +102,7 @@ public abstract class FirstRunActivityBase +@@ -107,9 +105,7 @@ public abstract class FirstRunActivityBase @Override @CallSuper public void triggerLayoutInflation() { @@ -382,13 +387,13 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstR - mChildAccountStatusSupplier = - new ChildAccountStatusSupplier(accountManagerFacade, mFirstRunAppRestrictionInfo); + mChildAccountStatusSupplier = new ChildAccountStatusSupplier(null, null); - } - @Override + if (BuildInfo.getInstance().isAutomotive) { + StatusBarColorController.setStatusBarColor(getWindow(), Color.BLACK); diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java --- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunFlowSequencer.java -@@ -27,14 +27,9 @@ import org.chromium.chrome.browser.locale.LocaleManager; +@@ -26,14 +26,9 @@ import org.chromium.chrome.browser.locale.LocaleManager; import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomizations; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.search_engines.SearchEnginePromoType; @@ -401,12 +406,12 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstR -import org.chromium.components.signin.identitymanager.ConsentLevel; -import org.chromium.components.signin.identitymanager.IdentityManager; - import java.util.List; + /** + * A helper to determine what should be the sequence of First Run Experience screens, and whether +@@ -61,38 +56,19 @@ public abstract class FirstRunFlowSequencer { -@@ -65,38 +60,19 @@ public abstract class FirstRunFlowSequencer { /** Returns true if the sync consent promo page should be shown. */ - boolean shouldShowSyncConsentPage( - Activity activity, List accounts, boolean isChild) { + boolean shouldShowSyncConsentPage(boolean isChild) { - if (isChild) { - // Always show the sync consent page for child account. - return true; @@ -444,27 +449,33 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstR } } -@@ -147,12 +123,8 @@ public abstract class FirstRunFlowSequencer { +@@ -143,18 +119,8 @@ public abstract class FirstRunFlowSequencer { * method. */ void start() { -- AccountManagerFacadeProvider.getInstance().getAccounts().then(accounts -> { -- RecordHistogram.recordCount1MHistogram( -- "Signin.AndroidDeviceAccountsNumberWhenEnteringFRE", -- Math.min(accounts.size(), 2)); -- setAccountList(accounts); -- }); +- AccountManagerFacadeProvider.getInstance() +- .getCoreAccountInfos() +- .then( +- coreAccountInfos -> { +- RecordHistogram.recordCount1MHistogram( +- "Signin.AndroidDeviceAccountsNumberWhenEnteringFRE", +- Math.min(coreAccountInfos.size(), 2)); +- +- assert !mAccountsAvailable; +- mAccountsAvailable = true; +- maybeProcessFreEnvironmentPreNative(); +- }); + mIsChild = false; + maybeProcessFreEnvironmentPreNative(); } @VisibleForTesting -@@ -177,14 +149,10 @@ public abstract class FirstRunFlowSequencer { +@@ -173,14 +139,10 @@ public abstract class FirstRunFlowSequencer { } private void maybeProcessFreEnvironmentPreNative() { - // Wait till both child account status and the list of accounts are available. -- if (mIsChild == null || mGoogleAccounts == null) return; +- if (mIsChild == null || !mAccountsAvailable) return; - if (mIsFlowKnown) return; mIsFlowKnown = true; @@ -474,7 +485,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstR onFlowIsKnown(freProperties); } -@@ -195,8 +163,8 @@ public abstract class FirstRunFlowSequencer { +@@ -191,8 +153,8 @@ public abstract class FirstRunFlowSequencer { * @param freProperties Resulting FRE properties bundle. */ public void updateFirstRunProperties(Bundle freProperties) { @@ -485,7 +496,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstR freProperties.putBoolean( FirstRunActivity.SHOW_SEARCH_ENGINE_PAGE, shouldShowSearchEnginePage()); } -@@ -297,13 +265,17 @@ public abstract class FirstRunFlowSequencer { +@@ -293,13 +255,17 @@ public abstract class FirstRunFlowSequencer { if (!(caller instanceof Activity)) { freIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); } @@ -508,17 +519,17 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstR diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java --- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java -@@ -18,9 +18,6 @@ import org.chromium.chrome.browser.metrics.ChangeMetricsReportingStateCalledFrom +@@ -20,9 +20,6 @@ import org.chromium.chrome.browser.metrics.ChangeMetricsReportingStateCalledFrom import org.chromium.chrome.browser.metrics.UmaSessionStats; import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; - import org.chromium.chrome.browser.preferences.SharedPreferencesManager; + import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; -import org.chromium.components.signin.AccountManagerFacade; -import org.chromium.components.signin.AccountManagerFacadeProvider; -import org.chromium.components.signin.AccountUtils; import org.chromium.ui.accessibility.AccessibilityState; /** Provides first run related utility functions. */ -@@ -83,16 +80,12 @@ public class FirstRunUtils { +@@ -85,16 +82,12 @@ public class FirstRunUtils { * @return Whether or not sync is allowed on this device. */ static boolean canAllowSync() { @@ -537,14 +548,13 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstR } @VisibleForTesting -@@ -102,10 +95,7 @@ public class FirstRunUtils { +@@ -104,9 +97,7 @@ public class FirstRunUtils { @VisibleForTesting static boolean hasGoogleAccounts() { -- return !AccountUtils -- .getAccountsIfFulfilledOrEmpty( -- AccountManagerFacadeProvider.getInstance().getAccounts()) -- .isEmpty(); +- return !AccountUtils.getCoreAccountInfosIfFulfilledOrEmpty( +- AccountManagerFacadeProvider.getInstance().getCoreAccountInfos()) +- .isEmpty(); + return false; } @@ -1234,7 +1244,7 @@ new file mode 100644 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 -@@ -3301,7 +3301,29 @@ To change this setting, <resetlink>reset sync

<resetlink>reset sync

%1$sGoogle Maps will open in Chrome. By continuing, you agree to the <LINK1>Google Terms of Service</LINK1>, and the <LINK2>Google Chrome and ChromeOS Additional Terms of Service</LINK2>. The <LINK3>Privacy Policy</LINK3> also applies. diff --git a/build/patches/autofill-miscellaneous.patch b/build/patches/autofill-miscellaneous.patch index c70b10131..c944022a9 100644 --- a/build/patches/autofill-miscellaneous.patch +++ b/build/patches/autofill-miscellaneous.patch @@ -23,7 +23,7 @@ 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 -@@ -1133,11 +1133,11 @@ void RegisterProfilePrefsForMigration( +@@ -1112,11 +1112,11 @@ void RegisterProfilePrefsForMigration( PrefRegistry::LOSSY_PREF); // Deprecated 11/2022. @@ -41,7 +41,7 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse 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 -@@ -215,12 +215,7 @@ ChromeAutofillClient::GetURLLoaderFactory() { +@@ -218,12 +218,7 @@ ChromeAutofillClient::GetURLLoaderFactory() { } AutofillDownloadManager* ChromeAutofillClient::GetDownloadManager() { @@ -88,7 +88,7 @@ diff --git a/components/autofill/core/browser/autofill_download_manager.cc b/com // Gets HTTP body payload for API POST request. absl::optional GetAPIBodyPayload( -@@ -521,18 +498,7 @@ bool IsRawMetadataUploadingEnabled(version_info::Channel channel) { +@@ -514,18 +491,7 @@ absl::optional GetAPIQueryPayload( } std::string GetAPIKeyForUrl(version_info::Channel channel) { @@ -108,7 +108,7 @@ diff --git a/components/autofill/core/browser/autofill_download_manager.cc b/com } } // namespace -@@ -744,6 +710,7 @@ std::tuple AutofillDownloadManager::GetRequestURLAndMethod( +@@ -733,6 +699,7 @@ std::tuple AutofillDownloadManager::GetRequestURLAndMethod( // ID of the resource to add to the API request URL. Nothing will be added if // |resource_id| is empty. std::string resource_id; @@ -116,7 +116,7 @@ diff --git a/components/autofill/core/browser/autofill_download_manager.cc b/com std::string method = "POST"; if (request_data.request_type == AutofillDownloadManager::REQUEST_QUERY) { -@@ -764,11 +731,15 @@ std::tuple AutofillDownloadManager::GetRequestURLAndMethod( +@@ -753,11 +720,15 @@ std::tuple AutofillDownloadManager::GetRequestURLAndMethod( // Add the query parameter to set the response format to a serialized proto. url = net::AppendQueryParameter(url, "alt", "proto"); @@ -148,22 +148,22 @@ diff --git a/components/autofill/core/browser/autofill_download_manager.h b/comp diff --git a/components/autofill/core/browser/browser_autofill_manager.h b/components/autofill/core/browser/browser_autofill_manager.h --- a/components/autofill/core/browser/browser_autofill_manager.h +++ b/components/autofill/core/browser/browser_autofill_manager.h -@@ -766,9 +766,9 @@ class BrowserAutofillManager : public AutofillManager, +@@ -744,9 +744,9 @@ class BrowserAutofillManager : public AutofillManager, autocomplete_unrecognized_fallback_logger_; // Have we logged whether Autofill is enabled for this page load? - bool has_logged_autofill_enabled_ = false; + bool has_logged_autofill_enabled_ = true; - // Have we logged an address suggestions count metric for this page? -- bool has_logged_address_suggestions_count_ = false; -+ bool has_logged_address_suggestions_count_ = true; // Have we shown Autofill suggestions at least once? - bool did_show_suggestions_ = false; +- bool did_show_suggestions_ = false; ++ bool did_show_suggestions_ = true; // Has the user manually edited at least one form field among the autofillable + // ones? + bool user_did_type_ = false; diff --git a/components/autofill/core/common/autofill_features.cc b/components/autofill/core/common/autofill_features.cc --- a/components/autofill/core/common/autofill_features.cc +++ b/components/autofill/core/common/autofill_features.cc -@@ -811,6 +811,7 @@ BASE_FEATURE(kAutofillUploadThrottling, +@@ -843,6 +843,7 @@ BASE_FEATURE(kAutofillUploadThrottling, "AutofillUploadThrottling", base::FEATURE_ENABLED_BY_DEFAULT); @@ -183,8 +183,8 @@ diff --git a/components/autofill/core/common/autofill_prefs.cc b/components/auto user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); registry->RegisterIntegerPref( prefs::kAutofillLastVersionDeduped, 0, -@@ -156,10 +156,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { - prefs::kAutofillLastVersionDisusedAddressesDeleted, 0, +@@ -153,10 +153,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { + prefs::kAutofillHasSeenIban, false, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); registry->RegisterBooleanPref( - prefs::kAutofillCreditCardEnabled, true, @@ -196,7 +196,7 @@ diff --git a/components/autofill/core/common/autofill_prefs.cc b/components/auto user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); // Non-synced prefs. Used for per-device choices, e.g., signin promo. -@@ -201,9 +201,9 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { +@@ -196,9 +196,9 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { #endif // Deprecated prefs registered for migration. @@ -205,9 +205,9 @@ diff --git a/components/autofill/core/common/autofill_prefs.cc b/components/auto registry->RegisterBooleanPref(prefs::kAutofillOrphanRowsRemoved, false); - registry->RegisterBooleanPref(prefs::kAutofillIbanEnabled, true); + registry->RegisterBooleanPref(prefs::kAutofillIbanEnabled, false); - - #if BUILDFLAG(IS_ANDROID) - registry->RegisterBooleanPref(prefs::kAutofillUsingVirtualViewStructure, + registry->RegisterIntegerPref( + prefs::kAutofillLastVersionDisusedAddressesDeleted, 0); + registry->RegisterIntegerPref( diff --git a/components/password_manager/core/browser/password_generation_frame_helper.cc b/components/password_manager/core/browser/password_generation_frame_helper.cc --- a/components/password_manager/core/browser/password_generation_frame_helper.cc +++ b/components/password_manager/core/browser/password_generation_frame_helper.cc diff --git a/build/patches/bromite-build-utils.patch b/build/patches/bromite-build-utils.patch index b078d66d3..7a9a3f038 100644 --- a/build/patches/bromite-build-utils.patch +++ b/build/patches/bromite-build-utils.patch @@ -40,7 +40,7 @@ diff --git a/build/android/gyp/java_cpp_enum.py b/build/android/gyp/java_cpp_enu single_line_comment_re = re.compile(r'\s*//\s*([^\n]*)') multi_line_comment_start_re = re.compile(r'\s*/\*') enum_line_re = re.compile(r'^\s*(\w+)(\s*\=\s*([^,\n]+))?,?') -@@ -194,7 +195,7 @@ class HeaderParser: +@@ -195,7 +196,7 @@ class HeaderParser: enum_single_line_re = re.compile( r'^\s*(?:\[cpp.*\])?\s*enum.*{(?P.*)}.*$') @@ -49,7 +49,7 @@ diff --git a/build/android/gyp/java_cpp_enum.py b/build/android/gyp/java_cpp_enu self._lines = lines self._path = path self._enum_definitions = [] -@@ -204,6 +205,7 @@ class HeaderParser: +@@ -205,6 +206,7 @@ class HeaderParser: self._generator_directives = DirectiveSet() self._multi_line_generator_directive = None self._current_enum_entry = '' @@ -57,7 +57,7 @@ diff --git a/build/android/gyp/java_cpp_enum.py b/build/android/gyp/java_cpp_enu def _ApplyGeneratorDirectives(self): self._generator_directives.UpdateDefinition(self._current_definition) -@@ -227,6 +229,24 @@ class HeaderParser: +@@ -228,6 +230,24 @@ class HeaderParser: raise Exception('Multi-line comments in enums are not supported in ' + self._path) @@ -82,7 +82,7 @@ diff --git a/build/android/gyp/java_cpp_enum.py b/build/android/gyp/java_cpp_enu enum_comment = HeaderParser.single_line_comment_re.match(line) if enum_comment: comment = enum_comment.groups()[0] -@@ -327,9 +347,9 @@ class HeaderParser: +@@ -328,9 +348,9 @@ class HeaderParser: self._ParseSingleLineEnum(single_line_enum.group('enum_entries')) @@ -94,7 +94,7 @@ diff --git a/build/android/gyp/java_cpp_enum.py b/build/android/gyp/java_cpp_enu if not enum_definitions: raise Exception('No enums found in %s\n' 'Did you forget prefixing enums with ' -@@ -342,9 +362,9 @@ def DoGenerate(source_paths): +@@ -343,9 +363,9 @@ def DoGenerate(source_paths): yield output_path, output @@ -106,7 +106,7 @@ diff --git a/build/android/gyp/java_cpp_enum.py b/build/android/gyp/java_cpp_enu def GenerateOutput(source_path, enum_definition): -@@ -423,6 +443,10 @@ def DoMain(argv): +@@ -424,6 +444,10 @@ def DoMain(argv): parser.add_option('--srcjar', help='When specified, a .srcjar at the given path is ' 'created instead of individual .java files.') @@ -117,7 +117,7 @@ diff --git a/build/android/gyp/java_cpp_enum.py b/build/android/gyp/java_cpp_enu options, args = parser.parse_args(argv) -@@ -432,7 +456,7 @@ def DoMain(argv): +@@ -433,7 +457,7 @@ def DoMain(argv): with action_helpers.atomic_output(options.srcjar) as f: with zipfile.ZipFile(f, 'w', zipfile.ZIP_STORED) as srcjar: @@ -413,7 +413,7 @@ diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni --- a/build/config/android/rules.gni +++ b/build/config/android/rules.gni -@@ -212,7 +212,7 @@ if (enable_java_templates && is_android) { +@@ -214,7 +214,7 @@ if (enable_java_templates && is_android) { # } template("java_cpp_enum") { action_with_pydeps(target_name) { @@ -422,7 +422,7 @@ diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni # The sources aren't compiled so don't check their dependencies. check_includes = false -@@ -223,6 +223,10 @@ if (enable_java_templates && is_android) { +@@ -225,6 +225,10 @@ if (enable_java_templates && is_android) { _rebased_sources = rebase_path(invoker.sources, root_build_dir) args = [ "--srcjar=$_rebased_srcjar_path" ] + _rebased_sources diff --git a/build/patches/build-remove-calling-untrusted-hooks.patch b/build/patches/build-remove-calling-untrusted-hooks.patch index 25e46e5b4..4ec63559e 100644 --- a/build/patches/build-remove-calling-untrusted-hooks.patch +++ b/build/patches/build-remove-calling-untrusted-hooks.patch @@ -13,16 +13,16 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/DEPS b/DEPS --- a/DEPS +++ b/DEPS -@@ -119,7 +119,7 @@ vars = { +@@ -118,7 +118,7 @@ vars = { - # Check out and download nacl by default, unless on an arm mac. + # Check out and download nacl by default, unless on Windows or Mac. # This can be disabled e.g. with custom_vars. -- 'checkout_nacl': 'not (host_os == "mac" and host_cpu == "arm64")', +- 'checkout_nacl': 'host_os == "linux"', + 'checkout_nacl': False, # By default, do not check out src-internal. This can be overridden e.g. with # custom_vars. -@@ -176,7 +176,7 @@ vars = { +@@ -178,7 +178,7 @@ vars = { # platforms, but support for other platforms may be added in the future. 'checkout_openxr' : 'checkout_win or checkout_android', @@ -31,7 +31,7 @@ diff --git a/DEPS b/DEPS # By default bot checkouts the WPR archive files only when this # flag is set True. -@@ -4508,54 +4508,6 @@ hooks = [ +@@ -4402,54 +4402,6 @@ hooks = [ 'sync', '--extract', ], }, @@ -86,7 +86,7 @@ diff --git a/DEPS b/DEPS { # Case-insensitivity for the Win SDK. Must run before win_toolchain below. 'name': 'ciopfs_linux', -@@ -4706,57 +4658,6 @@ hooks = [ +@@ -4600,57 +4552,6 @@ hooks = [ ], }, @@ -144,7 +144,7 @@ diff --git a/DEPS b/DEPS # Pull rc binaries using checked-in hashes. { 'name': 'rc_win', -@@ -4782,30 +4683,6 @@ hooks = [ +@@ -4676,30 +4577,6 @@ hooks = [ '-s', 'src/build/toolchain/win/rc/mac/rc.sha1', ], }, diff --git a/build/patches/dns-send-IPv6-connectivity-probes-to-RIPE-DNS.patch b/build/patches/dns-send-IPv6-connectivity-probes-to-RIPE-DNS.patch index 42aee3f3f..332add55f 100644 --- a/build/patches/dns-send-IPv6-connectivity-probes-to-RIPE-DNS.patch +++ b/build/patches/dns-send-IPv6-connectivity-probes-to-RIPE-DNS.patch @@ -15,7 +15,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html 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 -@@ -156,12 +156,12 @@ const unsigned kMinimumTTLSeconds = kCacheEntryTTLSeconds; +@@ -157,12 +157,12 @@ const unsigned kMinimumTTLSeconds = kCacheEntryTTLSeconds; // Time between IPv6 probes, i.e. for how long results of each IPv6 probe are // cached. diff --git a/build/patches/enable-ftrivial-auto-var-init-zero.patch b/build/patches/enable-ftrivial-auto-var-init-zero.patch index d8f8c83e5..70af341c1 100644 --- a/build/patches/enable-ftrivial-auto-var-init-zero.patch +++ b/build/patches/enable-ftrivial-auto-var-init-zero.patch @@ -11,7 +11,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn -@@ -393,6 +393,10 @@ config("compiler") { +@@ -399,6 +399,10 @@ config("compiler") { cflags += [ "-fwrapv" ] } diff --git a/build/patches/eyeo-beta-118.0.5993.48-android_api.patch b/build/patches/eyeo-beta-118.0.5993.48-android_api.patch index 7a9e5fb8f..3ebbe3438 100644 --- a/build/patches/eyeo-beta-118.0.5993.48-android_api.patch +++ b/build/patches/eyeo-beta-118.0.5993.48-android_api.patch @@ -97,7 +97,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn import("//build/android/resource_sizes.gni") import("//build/config/android/config.gni") -@@ -236,6 +240,7 @@ if (current_toolchain == default_toolchain) { +@@ -241,6 +245,7 @@ if (current_toolchain == default_toolchain) { "//third_party/androidx:androidx_gridlayout_gridlayout_java", "//third_party/androidx:androidx_preference_preference_java", ] @@ -105,7 +105,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn } android_library("app_hooks_java") { -@@ -453,6 +458,7 @@ if (current_toolchain == default_toolchain) { +@@ -450,6 +455,7 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/xsurface:java", "//chrome/browser/xsurface_provider:dependency_provider_impl_java", "//chrome/browser/xsurface_provider:java", @@ -113,7 +113,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn "//components/autofill/android:autofill_java", "//components/background_task_scheduler:background_task_scheduler_java", "//components/background_task_scheduler:background_task_scheduler_task_ids_java", -@@ -662,6 +668,7 @@ if (current_toolchain == default_toolchain) { +@@ -670,6 +676,7 @@ if (current_toolchain == default_toolchain) { "//url/mojom:url_mojom_gurl_java", ] @@ -121,7 +121,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn deps += feed_deps srcjar_deps = [ -@@ -1551,6 +1558,7 @@ if (current_toolchain == default_toolchain) { +@@ -1555,6 +1562,7 @@ if (current_toolchain == default_toolchain) { "//chrome/android/webapk/libs/client:client_java", "//chrome/android/webapk/libs/common:common_java", "//chrome/android/webapk/libs/runtime_library:webapk_service_aidl_java", @@ -129,7 +129,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn "//chrome/browser/android/browserservices/intents:java", "//chrome/browser/android/browserservices/verification:java", "//chrome/browser/android/browserservices/verification:javatests", -@@ -1890,6 +1898,7 @@ if (current_toolchain == default_toolchain) { +@@ -1897,6 +1905,7 @@ if (current_toolchain == default_toolchain) { srcjar_deps = [ "//chrome/browser:tos_dialog_behavior_generated_enum" ] data = [ @@ -137,7 +137,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn "//chrome/test/data/android/", "//chrome/test/data/autofill/", "//chrome/test/data/background_sync/", -@@ -3708,6 +3717,7 @@ group("jni_headers") { +@@ -3733,6 +3742,7 @@ group("jni_headers") { "//chrome/browser/util:jni_headers", "//chrome/browser/webauthn/android:jni_headers", "//components/browser_ui/device_lock/android:device_lock_bridge_jni_headers", @@ -148,7 +148,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -3438,6 +3438,17 @@ static_library("browser") { +@@ -3488,6 +3488,17 @@ static_library("browser") { "webauthn/android/webauthn_request_delegate_android.h", ] @@ -166,8 +166,8 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn public_deps += [ "//chrome/android/features/dev_ui:buildflags", -@@ -3627,6 +3638,9 @@ static_library("browser") { - "//url:gurl_android", +@@ -3678,6 +3689,9 @@ static_library("browser") { + "//url", ] + ###Android API module start @@ -668,7 +668,7 @@ new file mode 100644 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 -@@ -263,6 +263,11 @@ +@@ -268,6 +268,11 @@ #include "components/commerce/core/commerce_feature_list.h" #include "components/commerce/core/proto/merchant_signal_db_content.pb.h" @@ -680,7 +680,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc #else #include "chrome/browser/accessibility/live_caption/live_caption_controller_factory.h" -@@ -762,6 +767,11 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -787,6 +792,11 @@ void ChromeBrowserMainExtraPartsProfiles:: #if BUILDFLAG(IS_ANDROID) FastCheckoutCapabilitiesFetcherFactory::GetInstance(); diff --git a/build/patches/eyeo-beta-118.0.5993.48-android_settings.patch b/build/patches/eyeo-beta-118.0.5993.48-android_settings.patch index 3e40a1f66..9ef450398 100644 --- a/build/patches/eyeo-beta-118.0.5993.48-android_settings.patch +++ b/build/patches/eyeo-beta-118.0.5993.48-android_settings.patch @@ -243,7 +243,7 @@ Pre-requisites: eyeo Browser Ad filtering Solution: Base Module and Android API diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -241,6 +241,9 @@ if (current_toolchain == default_toolchain) { +@@ -246,6 +246,9 @@ if (current_toolchain == default_toolchain) { "//third_party/androidx:androidx_preference_preference_java", ] @@ -253,7 +253,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn } android_library("app_hooks_java") { -@@ -668,6 +671,9 @@ if (current_toolchain == default_toolchain) { +@@ -676,6 +679,9 @@ if (current_toolchain == default_toolchain) { "//url/mojom:url_mojom_gurl_java", ] @@ -288,7 +288,7 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j CreateURLLoaderFactory(std::move(default_factory_receiver), std::move(params)); @@ -154719,7 +154719,7 @@ diff --git a/content/browser/renderer_host/render_frame_host_impl.h b/content/br #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_ #define CONTENT_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_ -@@ -439,6 +443,10 @@ class CONTENT_EXPORT RenderFrameHostImpl +@@ -438,6 +442,10 @@ class CONTENT_EXPORT RenderFrameHostImpl const std::u16string& method_name, base::Value::List arguments, JavaScriptResultCallback callback) override; @@ -154744,7 +154744,7 @@ diff --git a/content/public/browser/render_frame_host.h b/content/public/browser #ifndef CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ #define CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ -@@ -510,6 +514,9 @@ class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, +@@ -515,6 +519,9 @@ class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, virtual void AddMessageToConsole(blink::mojom::ConsoleMessageLevel level, const std::string& message) = 0; @@ -154768,7 +154768,7 @@ diff --git a/content/public/common/isolated_world_ids.h b/content/public/common/ #ifndef CONTENT_PUBLIC_COMMON_ISOLATED_WORLD_IDS_H_ #define CONTENT_PUBLIC_COMMON_ISOLATED_WORLD_IDS_H_ -@@ -11,6 +15,10 @@ enum IsolatedWorldIDs : int32_t { +@@ -13,6 +17,10 @@ enum IsolatedWorldIDs : int32_t { // The main world. Chrome cannot use ID 0 for an isolated world because 0 // represents the main world. ISOLATED_WORLD_ID_GLOBAL = 0, @@ -154839,7 +154839,7 @@ diff --git a/extensions/browser/api/web_request/web_request_proxying_url_loader_ #include "extensions/browser/api/web_request/web_request_proxying_url_loader_factory.h" #include -@@ -462,6 +466,7 @@ void WebRequestProxyingURLLoaderFactory::InProgressRequest::OnReceiveRedirect( +@@ -463,6 +467,7 @@ void WebRequestProxyingURLLoaderFactory::InProgressRequest::OnReceiveRedirect( TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT); if (redirect_url_ != redirect_info.new_url && @@ -155031,7 +155031,7 @@ diff --git a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc b #include "third_party/blink/renderer/core/frame/local_frame_mojo_handler.h" -@@ -358,6 +362,14 @@ LocalFrameMojoHandler::LocalFrameMojoHandler(blink::LocalFrame& frame) +@@ -359,6 +363,14 @@ LocalFrameMojoHandler::LocalFrameMojoHandler(blink::LocalFrame& frame) WrapWeakPersistent(this))); } @@ -155082,7 +155082,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/url_loader/mojo_ur #include "third_party/blink/renderer/platform/loader/fetch/url_loader/mojo_url_loader_client.h" #include -@@ -449,7 +453,7 @@ void MojoURLLoaderClient::OnReceiveRedirect( +@@ -391,7 +395,7 @@ void MojoURLLoaderClient::OnReceiveRedirect( OnComplete(network::URLLoaderCompletionStatus(net::ERR_ABORTED)); return; } @@ -155540,16 +155540,16 @@ diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ # This file is used to assign starting resource ids for resources and strings # used by Chromium. This is done to ensure that resource ids are unique # across all the grd files. If you are adding a new grd file, please add -@@ -667,6 +671,10 @@ - "META": {"sizes": {"includes": [20]}}, - "includes": [4960], +@@ -686,6 +690,10 @@ + "META": {"sizes": {"includes": [10]}}, + "includes": [5240], }, + "<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resources/adblock_internals/resources.grd": { + "META": {"sizes": {"includes": [10],}}, -+ "includes": [4970], ++ "includes": [5250], + }, - "<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resources/hats/resources.grd": { + "<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resources/on_device_internals/resources.grd": { "META": {"sizes": {"includes": [10]}}, - "includes": [4980], + "includes": [5260], -- 2.25.1 diff --git a/build/patches/eyeo-beta-118.0.5993.48-chrome_integration.patch b/build/patches/eyeo-beta-118.0.5993.48-chrome_integration.patch index ff7e40f6d..466dd9719 100644 --- a/build/patches/eyeo-beta-118.0.5993.48-chrome_integration.patch +++ b/build/patches/eyeo-beta-118.0.5993.48-chrome_integration.patch @@ -71,9 +71,9 @@ Pre-requisites: eyeo Browser Ad filtering Solution: Base Module .../resources/adblock_internals/BUILD.gn | 29 ++ .../adblock_internals/adblock_internals.html | 38 ++ .../adblock_internals/adblock_internals.ts | 43 ++ - .../safe_browsing_blocking_page_test.cc | 8 +- + .../safe_browsing_blocking_page_test.cc | 7 + ...subresource_filter_browser_test_harness.cc | 8 +- - chrome/browser/ui/BUILD.gn | 12 +- + chrome/browser/ui/BUILD.gn | 11 + chrome/browser/ui/prefs/pref_watcher.cc | 13 + chrome/browser/ui/tab_helpers.cc | 18 + .../ui/webui/adblock_internals/BUILD.gn | 23 + @@ -129,7 +129,7 @@ Pre-requisites: eyeo Browser Ad filtering Solution: Base Module .../xhr_result_3_subresource_loading.json | 1 + .../test/data/adblock/wbn/index.html.mustache | 157 ++++++ chrome/test/data/adblock/xpath3.html | 23 + - 123 files changed, 7677 insertions(+), 12 deletions(-) + 123 files changed, 7677 insertions(+), 10 deletions(-) create mode 100644 chrome/browser/adblock/README.md create mode 100644 chrome/browser/adblock/adblock_content_browser_client.cc create mode 100644 chrome/browser/adblock/adblock_content_browser_client.h @@ -253,7 +253,7 @@ diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegat #include "chrome/browser/buildflags.h" #include "chrome/browser/chrome_content_browser_client.h" #include "chrome/browser/chrome_resource_bundle_helper.h" -@@ -1783,7 +1788,7 @@ content::ContentClient* ChromeMainDelegate::CreateContentClient() { +@@ -1848,7 +1853,7 @@ content::ContentClient* ChromeMainDelegate::CreateContentClient() { content::ContentBrowserClient* ChromeMainDelegate::CreateContentBrowserClient() { chrome_content_browser_client_ = @@ -275,7 +275,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn import("//base/allocator/allocator.gni") import("//build/buildflag_header.gni") -@@ -158,6 +161,26 @@ static_library("browser") { +@@ -159,6 +162,26 @@ static_library("browser") { "accessibility/page_colors.h", "accessibility/page_colors_factory.cc", "accessibility/page_colors_factory.h", @@ -302,7 +302,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn "after_startup_task_utils.cc", "after_startup_task_utils.h", "app_mode/app_mode_utils.cc", -@@ -2112,6 +2135,7 @@ static_library("browser") { +@@ -2149,6 +2172,7 @@ static_library("browser") { "//chrome/browser/ui/color:color_headers", "//chrome/browser/ui/color:mixers", "//chrome/browser/ui/webui:configs", @@ -310,7 +310,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn "//chrome/browser/ui/webui/app_service_internals:mojo_bindings", "//chrome/browser/ui/webui/feed:mojo_bindings", "//chrome/browser/ui/webui/internals/user_education:mojo_bindings", -@@ -2134,6 +2158,8 @@ static_library("browser") { +@@ -2171,6 +2195,8 @@ static_library("browser") { "//chrome/common/notifications", "//chrome/installer/util:with_no_strings", "//chrome/services/speech/buildflags", @@ -319,7 +319,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn "//components/assist_ranker", "//components/autofill/content/browser", "//components/autofill/core/browser", -@@ -3411,6 +3437,8 @@ static_library("browser") { +@@ -3461,6 +3487,8 @@ static_library("browser") { "webauthn/android/webauthn_request_delegate_android.cc", "webauthn/android/webauthn_request_delegate_android.h", ] @@ -328,8 +328,8 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn public_deps += [ "//chrome/android/features/dev_ui:buildflags", "//components/image_fetcher/core", -@@ -3599,6 +3627,7 @@ static_library("browser") { - "//url:gurl_android", +@@ -3650,6 +3678,7 @@ static_library("browser") { + "//url", ] + @@ -7036,7 +7036,7 @@ diff --git a/chrome/browser/chrome_browser_interface_binders.cc b/chrome/browser #include "chrome/browser/ui/webui/browsing_topics/browsing_topics_internals_ui.h" #include "chrome/browser/ui/webui/engagement/site_engagement_ui.h" #include "chrome/browser/ui/webui/internals/internals_ui.h" -@@ -1043,6 +1048,10 @@ void PopulateChromeWebUIFrameBinders( +@@ -1064,6 +1069,10 @@ void PopulateChromeWebUIFrameBinders( media::mojom::MediaEngagementScoreDetailsProvider, MediaEngagementUI>( map); @@ -7127,7 +7127,7 @@ diff --git a/chrome/browser/page_load_metrics/observers/ad_metrics/ads_page_load #include "components/heavy_ad_intervention/heavy_ad_features.h" #include "components/page_load_metrics/browser/ads_page_load_metrics_test_waiter.h" #include "components/page_load_metrics/browser/observers/ad_metrics/ad_intervention_browser_test_utils.h" -@@ -1490,7 +1495,7 @@ class AdsPageLoadMetricsObserverResourceBrowserTest +@@ -1491,7 +1496,7 @@ class AdsPageLoadMetricsObserverResourceBrowserTest {heavy_ad_intervention::features::kHeavyAdIntervention, {}}, {heavy_ad_intervention::features::kHeavyAdPrivacyMitigations, {{"host-threshold", "3"}}}}, @@ -7150,7 +7150,7 @@ diff --git a/chrome/browser/preferences/BUILD.gn b/chrome/browser/preferences/BU import("//build/config/android/rules.gni") import("//third_party/jni_zero/jni_zero.gni") -@@ -38,6 +42,7 @@ android_library("java") { +@@ -37,6 +41,7 @@ android_library("java") { java_cpp_strings("java_pref_names_srcjar") { sources = [ "//chrome/common/pref_names.h", @@ -7172,7 +7172,7 @@ diff --git a/chrome/browser/prefs/chrome_pref_service_factory.cc b/chrome/browse #include "chrome/browser/prefs/chrome_pref_service_factory.h" -@@ -39,6 +43,7 @@ +@@ -40,6 +44,7 @@ #include "chrome/grit/branded_strings.h" #include "chrome/grit/browser_resources.h" #include "chrome/grit/generated_resources.h" @@ -7180,7 +7180,7 @@ diff --git a/chrome/browser/prefs/chrome_pref_service_factory.cc b/chrome/browse #include "components/component_updater/pref_names.h" #include "components/policy/core/browser/configuration_policy_pref_store.h" #include "components/pref_registry/pref_registry_syncable.h" -@@ -177,6 +182,12 @@ const prefs::TrackedPreferenceMetadata kTrackedPrefs[] = { +@@ -186,6 +191,12 @@ const prefs::TrackedPreferenceMetadata kTrackedPrefs[] = { {32, prefs::kMediaCdmOriginData, EnforcementLevel::ENFORCE_ON_LOAD, PrefTrackingStrategy::ATOMIC, ValueType::IMPERSONAL}, #endif // BUILDFLAG(IS_WIN) @@ -7223,7 +7223,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h" #include "chrome/browser/autocomplete/document_suggestions_service_factory.h" #include "chrome/browser/autocomplete/in_memory_url_index_factory.h" -@@ -249,6 +262,8 @@ +@@ -254,6 +267,8 @@ #include "chrome/browser/signin/signin_manager_android_factory.h" #include "components/commerce/core/commerce_feature_list.h" #include "components/commerce/core/proto/merchant_signal_db_content.pb.h" @@ -7232,7 +7232,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc #else #include "chrome/browser/accessibility/live_caption/live_caption_controller_factory.h" #include "chrome/browser/accessibility/live_translate_controller_factory.h" -@@ -735,8 +750,19 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -760,8 +775,19 @@ void ChromeBrowserMainExtraPartsProfiles:: #if BUILDFLAG(ENABLE_SESSION_SERVICE) ExitTypeServiceFactory::GetInstance(); #endif @@ -7266,7 +7266,7 @@ diff --git a/chrome/browser/profiles/profile_keyed_service_browsertest.cc b/chro #include #include "base/ranges/algorithm.h" -@@ -189,12 +193,22 @@ IN_PROC_BROWSER_TEST_F(ProfileKeyedServiceBrowserTest, +@@ -194,12 +198,22 @@ IN_PROC_BROWSER_TEST_F(ProfileKeyedServiceBrowserTest, IN_PROC_BROWSER_TEST_F(ProfileKeyedServiceBrowserTest, SystemProfileParent_NeededServices) { @@ -7291,7 +7291,7 @@ diff --git a/chrome/browser/profiles/profile_keyed_service_browsertest.cc b/chro } IN_PROC_BROWSER_TEST_F(ProfileKeyedServiceBrowserTest, -@@ -271,7 +285,7 @@ IN_PROC_BROWSER_TEST_F(ProfileKeyedServiceBrowserTest, +@@ -276,7 +290,7 @@ IN_PROC_BROWSER_TEST_F(ProfileKeyedServiceBrowserTest, "UkmBackgroundRecorderService", "UsbDeviceManager", "UsbDeviceResourceManager", @@ -7300,7 +7300,7 @@ diff --git a/chrome/browser/profiles/profile_keyed_service_browsertest.cc b/chro }; // clang-format on -@@ -524,6 +538,17 @@ IN_PROC_BROWSER_TEST_F(ProfileKeyedServiceBrowserTest, +@@ -533,6 +547,17 @@ IN_PROC_BROWSER_TEST_F(ProfileKeyedServiceBrowserTest, "feedback::FeedbackUploaderChrome", "sct_reporting::Factory", "ZeroSuggestCacheServiceFactory", @@ -7318,7 +7318,7 @@ diff --git a/chrome/browser/profiles/profile_keyed_service_browsertest.cc b/chro }; // clang-format on -@@ -570,6 +595,17 @@ IN_PROC_BROWSER_TEST_F(ProfileKeyedServiceBrowserTest, +@@ -579,6 +604,17 @@ IN_PROC_BROWSER_TEST_F(ProfileKeyedServiceBrowserTest, "PermissionsUpdaterShutdownFactory", "PluginInfoHostImpl", "TurnSyncOnHelperShutdownNotifier", @@ -7349,7 +7349,7 @@ diff --git a/chrome/browser/resources/BUILD.gn b/chrome/browser/resources/BUILD. import("//build/config/chromebox_for_meetings/buildflags.gni") import("//build/config/chromeos/ui_mode.gni") -@@ -220,6 +223,7 @@ if (!is_android) { +@@ -227,6 +230,7 @@ if (!is_android) { group("dev_ui_resources") { public_deps = [ "accessibility:resources", @@ -7357,7 +7357,7 @@ diff --git a/chrome/browser/resources/BUILD.gn b/chrome/browser/resources/BUILD. "bluetooth_internals:resources", "browsing_topics:resources", "components:resources", -@@ -274,6 +278,7 @@ repack("dev_ui_paks") { +@@ -282,6 +286,7 @@ repack("dev_ui_paks") { sources = [ "$root_gen_dir/chrome/accessibility_resources.pak", @@ -7512,11 +7512,10 @@ diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc b/ #include "components/google/core/common/google_util.h" #include "components/grit/components_resources.h" #include "components/omnibox/browser/omnibox_prefs.h" -@@ -608,7 +613,8 @@ class SafeBrowsingBlockingPageBrowserTest - {kTagAndAttributeParamName, "div,foo,div,baz"}}; - base::test::FeatureRefAndParams tag_and_attribute( - safe_browsing::kThreatDomDetailsTagAndAttributeFeature, parameters); -- scoped_feature_list_.InitWithFeaturesAndParameters({tag_and_attribute}, {}); +@@ -612,6 +617,8 @@ class SafeBrowsingBlockingPageBrowserTest + safe_browsing::kAddWarningShownTSToClientSafeBrowsingReport, {}); + scoped_feature_list_.InitWithFeaturesAndParameters( + {tag_and_attribute, add_warning_shown_timestamp_csbrrs}, {}); + scoped_feature_list_.InitWithFeaturesAndParameters( + {tag_and_attribute}, {adblock::kAdblockPlusFeature}); } @@ -7568,7 +7567,7 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn import("//build/config/buildflags_paint_preview.gni") import("//build/config/chromebox_for_meetings/buildflags.gni") -@@ -231,6 +235,10 @@ static_library("ui") { +@@ -235,6 +239,10 @@ static_library("ui") { "webid/identity_dialog_controller.h", "webui/about_ui.cc", "webui/about_ui.h", @@ -7579,22 +7578,21 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn "webui/autofill_and_password_manager_internals/autofill_internals_ui.cc", "webui/autofill_and_password_manager_internals/autofill_internals_ui.h", "webui/autofill_and_password_manager_internals/internals_ui_handler.cc", -@@ -432,12 +440,13 @@ static_library("ui") { - "//chrome/browser/share", +@@ -436,11 +444,13 @@ static_library("ui") { "//chrome/browser/storage_access_api", "//chrome/browser/ui/side_panel:side_panel_enums", -- "//chrome/browser/ui/webui:configs", -+ "//chrome/browser/ui/webui/adblock_internals:mojo_bindings", "//chrome/browser/ui/webui/location_internals:mojo_bindings", ++ "//chrome/browser/ui/webui/adblock_internals:mojo_bindings", "//chrome/browser/ui/webui/omnibox:mojo_bindings", "//chrome/browser/ui/webui/segmentation_internals:mojo_bindings", "//chrome/browser/ui/webui/suggest_internals:mojo_bindings", "//chrome/browser/ui/webui/usb_internals:mojo_bindings", + "//chrome/browser/v8_compile_hints/proto", + "//chrome/browser/ui/webui:configs", "//chrome/common", "//chrome/common/net", "//chrome/common/search:mojo_bindings", -@@ -449,6 +458,7 @@ static_library("ui") { +@@ -452,6 +462,7 @@ static_library("ui") { "//components/about_ui", "//components/access_code_cast/common:metrics", "//components/account_id", @@ -7663,7 +7661,7 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc #include "chrome/browser/bookmarks/bookmark_model_factory.h" #include "chrome/browser/breadcrumbs/breadcrumb_manager_tab_helper.h" #include "chrome/browser/browser_process.h" -@@ -111,6 +118,7 @@ +@@ -112,6 +119,7 @@ #include "chrome/common/chrome_features.h" #include "chrome/common/chrome_isolated_world_ids.h" #include "chrome/common/chrome_switches.h" @@ -7671,7 +7669,7 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc #include "components/autofill/content/browser/content_autofill_client.h" #include "components/autofill/content/browser/content_autofill_driver_factory.h" #include "components/autofill/core/browser/browser_autofill_manager.h" -@@ -341,6 +349,16 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { +@@ -353,6 +361,16 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { optimization_guide_decider); } } @@ -7686,7 +7684,7 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc + web_contents->GetBrowserContext()), + std::make_unique()); autofill::ChromeAutofillClient::CreateForWebContents(web_contents); - if (breadcrumbs::IsEnabled()) + if (breadcrumbs::IsEnabled()) { BreadcrumbManagerTabHelper::CreateForWebContents(web_contents); diff --git a/chrome/browser/ui/webui/adblock_internals/BUILD.gn b/chrome/browser/ui/webui/adblock_internals/BUILD.gn new file mode 100644 @@ -8044,7 +8042,7 @@ diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrom #include "chrome/browser/ui/webui/autofill_and_password_manager_internals/autofill_internals_ui.h" #include "chrome/browser/ui/webui/autofill_and_password_manager_internals/password_manager_internals_ui.h" #include "chrome/browser/ui/webui/browsing_topics/browsing_topics_internals_ui.h" -@@ -434,8 +439,12 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, +@@ -437,8 +442,12 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, // after the host name. if (url.host_piece() == chrome::kChromeUIAccessibilityHost) return &NewWebUI; @@ -8128,15 +8126,15 @@ diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn import("//build/cipd/cipd.gni") import("//build/config/buildflags_paint_preview.gni") -@@ -25,6 +28,7 @@ import("//chrome/test/base/js2gtest.gni") +@@ -24,6 +27,7 @@ import("//chrome/services/speech/buildflags/buildflags.gni") import("//chrome/test/include_js_tests.gni") import("//chrome/version.gni") import("//chromeos/ash/components/assistant/assistant.gni") +import("//components/adblock/features.gni") import("//components/captive_portal/core/features.gni") + import("//components/compose/features.gni") import("//components/enterprise/buildflags/buildflags.gni") - import("//components/feed/features.gni") -@@ -1206,6 +1210,7 @@ if (is_android) { +@@ -1287,6 +1291,7 @@ if (is_android) { deps += [ ":persisted_tab_data_test_proto", @@ -8144,7 +8142,7 @@ diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn "//components/autofill/content/browser:test_support", "//components/back_forward_cache:back_forward_cache", "//components/browsing_data/core:core", -@@ -1587,6 +1592,7 @@ if (!is_android) { +@@ -1676,6 +1681,7 @@ if (!is_android) { "//chrome/test/data/webui/mojo:mojo_bindings", "//chrome/test/media_router/access_code_cast:access_code_cast_integration_base", "//chrome/test/payments:test_support", @@ -8152,7 +8150,7 @@ diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn "//components/autofill/content/browser:risk_proto", "//components/autofill/content/browser:test_support", "//components/autofill/content/common/mojom", -@@ -1924,6 +1930,7 @@ if (!is_android) { +@@ -2015,6 +2021,7 @@ if (!is_android) { "//ash/components/arc/test/data/icons", "//chrome/browser/page_load_metrics/integration_tests/data/", "//chrome/renderer/resources/extensions/", @@ -8160,7 +8158,7 @@ diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn "//chrome/test/data/cart/", "//components/test/data/ad_tagging/", "//components/test/data/ads_observer/", -@@ -2007,6 +2014,17 @@ if (!is_android) { +@@ -2104,6 +2111,17 @@ if (!is_android) { "../browser/accessibility/image_annotation_browsertest.cc", "../browser/accessibility/interstitial_accessibility_browsertest.cc", "../browser/accessibility/page_colors_browsertest.cc", @@ -8178,7 +8176,7 @@ diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn "../browser/apps/guest_view/app_view_browsertest.cc", "../browser/apps/guest_view/web_view_browsertest.cc", "../browser/apps/platform_apps/app_browsertest.cc", -@@ -2736,6 +2754,10 @@ if (!is_android) { +@@ -2849,6 +2867,10 @@ if (!is_android) { sources += [ "../browser/chrome_for_testing/chrome_for_testing_info_bar_browsertest.cc" ] } @@ -8189,7 +8187,7 @@ diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn if (enable_reporting) { sources += [ "../browser/net/reporting_browsertest.cc" ] } -@@ -3570,6 +3592,7 @@ if (!is_android) { +@@ -3694,6 +3716,7 @@ if (!is_android) { ] } @@ -8197,15 +8195,15 @@ diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn if (is_chromeos_ash && enable_extensions) { deps += [ "//chromeos/ash/components/network/portal_detector:test_support" ] -@@ -5860,6 +5883,7 @@ test("unit_tests") { +@@ -5962,6 +5985,7 @@ test("unit_tests") { + # All unittests in browser, common, renderer and service. "../browser/about_flags_unittest.cc", "../browser/accessibility/media_app/ax_media_app_handler_unittest.cc", - "../browser/active_use_util_unittest.cc", + "../browser/adblock/adblock_content_browser_client_unittest.cc", "../browser/after_startup_task_utils_unittest.cc", "../browser/apps/icon_standardizer_unittest.cc", "../browser/apps/user_type_filter_unittest.cc", -@@ -6528,6 +6552,8 @@ test("unit_tests") { +@@ -6641,6 +6665,8 @@ test("unit_tests") { "//chrome/services/file_util:unit_tests", "//chrome/services/qrcode_generator/public/cpp", "//components/account_id", @@ -8214,7 +8212,7 @@ diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn "//components/assist_ranker/proto", "//components/autofill/content/browser:test_support", "//components/background_sync", -@@ -10003,6 +10029,7 @@ if (!is_android) { +@@ -10158,6 +10184,7 @@ if (!is_android) { public_deps = [ "//chrome/browser:test_support_ui", @@ -8278,7 +8276,7 @@ diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_p namespace { #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -653,8 +661,19 @@ void InProcessBrowserTest::CreatedBrowserMainParts( +@@ -656,8 +664,19 @@ void InProcessBrowserTest::CreatedBrowserMainParts( void InProcessBrowserTest::SelectFirstBrowser() { const BrowserList* browser_list = BrowserList::GetInstance(); diff --git a/build/patches/eyeo-beta-118.0.5993.48-extension_api.patch b/build/patches/eyeo-beta-118.0.5993.48-extension_api.patch index ec605e6d4..04dccd302 100644 --- a/build/patches/eyeo-beta-118.0.5993.48-extension_api.patch +++ b/build/patches/eyeo-beta-118.0.5993.48-extension_api.patch @@ -95,7 +95,7 @@ diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUIL "api/favicon/favicon_util.cc", "api/favicon/favicon_util.h", "api/feedback_private/chrome_feedback_private_delegate.cc", -@@ -827,6 +835,7 @@ static_library("extensions") { +@@ -818,6 +826,7 @@ static_library("extensions") { "//chrome/browser/safe_browsing:metrics_collector", "//chrome/browser/ui/tabs:tab_enums", "//chrome/browser/web_applications", @@ -2155,7 +2155,7 @@ diff --git a/chrome/browser/extensions/api/api_browser_context_keyed_service_fac #include "chrome/browser/extensions/api/font_settings/font_settings_api.h" #include "chrome/browser/extensions/api/history/history_api.h" #include "chrome/browser/extensions/api/identity/identity_api.h" -@@ -73,6 +79,7 @@ namespace chrome_extensions { +@@ -74,6 +80,7 @@ namespace chrome_extensions { void EnsureApiBrowserContextKeyedServiceFactoriesBuilt() { extensions::ActivityLogAPI::GetFactoryInstance(); @@ -2163,9 +2163,9 @@ diff --git a/chrome/browser/extensions/api/api_browser_context_keyed_service_fac extensions::AutofillPrivateEventRouterFactory::GetInstance(); extensions::BluetoothLowEnergyAPI::GetFactoryInstance(); extensions::BookmarksAPI::GetFactoryInstance(); -@@ -82,6 +89,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt() { - extensions::CookiesAPI::GetFactoryInstance(); - extensions::DeveloperPrivateAPI::GetFactoryInstance(); +@@ -86,6 +93,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt() { + extensions::DocumentScanAPIHandler::GetFactoryInstance(); + #endif extensions::ExtensionActionAPI::GetFactoryInstance(); + extensions::EyeoFilteringPrivateAPI::GetFactoryInstance(); extensions::FontSettingsAPI::GetFactoryInstance(); @@ -3577,7 +3577,7 @@ diff --git a/chrome/common/extensions/api/_api_features.json b/chrome/common/ext // This features file defines extension APIs implemented under src/chrome. // See chrome/common/extensions/api/_features.md to understand this file, as -@@ -95,6 +99,16 @@ +@@ -94,6 +98,16 @@ "chrome://extensions/*" ] }], @@ -3594,7 +3594,7 @@ diff --git a/chrome/common/extensions/api/_api_features.json b/chrome/common/ext "app": { "blocklist": [ "2FC374607C2DF285634B67C64A2E356C607091C3", // Quickoffice -@@ -497,6 +511,14 @@ +@@ -495,6 +509,14 @@ "channel": "stable", "contexts": [] }, @@ -3634,7 +3634,7 @@ diff --git a/chrome/common/extensions/api/_permission_features.json b/chrome/com "autofillPrivate": { "channel": "trunk", "extension_types": ["extension", "platform_app"], -@@ -343,6 +351,10 @@ +@@ -352,6 +360,10 @@ "extension", "legacy_packaged_app", "hosted_app", "platform_app" ] }, @@ -4120,7 +4120,7 @@ diff --git a/chrome/common/extensions/permissions/permission_set_unittest.cc b/c diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -3592,6 +3592,12 @@ if (!is_android) { +@@ -3716,6 +3716,12 @@ if (!is_android) { ] } @@ -5439,7 +5439,7 @@ diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums --> -@@ -35307,7 +35310,7 @@ Called by update_extension_histograms.py.--> +@@ -35688,7 +35691,7 @@ Called by update_extension_histograms.py.--> @@ -5448,7 +5448,7 @@ diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums -@@ -38455,6 +38458,8 @@ Called by update_extension_permission.py.--> +@@ -38829,6 +38832,8 @@ Called by update_extension_permission.py.--> diff --git a/build/patches/first_run-deactivate-autoupdate-globally.patch b/build/patches/first_run-deactivate-autoupdate-globally.patch index f40794c43..128319fb9 100644 --- a/build/patches/first_run-deactivate-autoupdate-globally.patch +++ b/build/patches/first_run-deactivate-autoupdate-globally.patch @@ -17,12 +17,12 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html 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 -@@ -198,8 +198,7 @@ void ExtensionSystemImpl::Shared::Init(bool extensions_enabled) { +@@ -199,8 +199,7 @@ void ExtensionSystemImpl::Shared::Init(bool extensions_enabled) { user_script_manager_ = std::make_unique(profile_); -- bool autoupdate_enabled = !profile_->IsGuestSession() && -- !profile_->IsSystemProfile(); +- bool autoupdate_enabled = +- !profile_->IsGuestSession() && !profile_->IsSystemProfile(); + bool autoupdate_enabled = false; #if BUILDFLAG(IS_CHROMEOS_ASH) if (!extensions_enabled || diff --git a/build/patches/kill-Location-fall-back-to-system.patch b/build/patches/kill-Location-fall-back-to-system.patch index 055ad664a..226dabd8e 100644 --- a/build/patches/kill-Location-fall-back-to-system.patch +++ b/build/patches/kill-Location-fall-back-to-system.patch @@ -22,7 +22,7 @@ diff --git a/services/device/geolocation/BUILD.gn b/services/device/geolocation/ diff --git a/services/device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java b/services/device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java --- a/services/device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java +++ b/services/device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java -@@ -27,19 +27,13 @@ public class LocationProviderFactory { +@@ -28,19 +28,13 @@ public class LocationProviderFactory { @CalledByNative public static void useGmsCoreLocationProvider() { diff --git a/build/patches/kill-Vision.patch b/build/patches/kill-Vision.patch index 56182a756..a07fbe11a 100644 --- a/build/patches/kill-Vision.patch +++ b/build/patches/kill-Vision.patch @@ -15,15 +15,15 @@ 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 -@@ -299,8 +299,6 @@ if (current_toolchain == default_toolchain) { +@@ -293,8 +293,6 @@ if (current_toolchain == default_toolchain) { "$google_play_services_package:google_play_services_gcm_java", "$google_play_services_package:google_play_services_iid_java", "$google_play_services_package:google_play_services_tasks_java", - "$google_play_services_package:google_play_services_vision_common_java", - "$google_play_services_package:google_play_services_vision_java", - "//base:jni_java", "//cc:cc_java", "//cc/mojom:mojom_java", + "//chrome/android/features/keyboard_accessory:public_java", diff --git a/services/shape_detection/BUILD.gn b/services/shape_detection/BUILD.gn --- a/services/shape_detection/BUILD.gn +++ b/services/shape_detection/BUILD.gn @@ -47,8 +47,8 @@ diff --git a/services/shape_detection/BUILD.gn b/services/shape_detection/BUILD. - "$google_play_services_package:google_play_services_vision_common_java", - "$google_play_services_package:google_play_services_vision_java", "//base:base_java", - "//base:jni_java", "//mojo/public/java:base_java", + "//mojo/public/java:bindings_java", diff --git a/services/shape_detection/android/java/src/org/chromium/shape_detection/BitmapUtils.java b/services/shape_detection/android/java/src/org/chromium/shape_detection/BitmapUtils.java --- a/services/shape_detection/android/java/src/org/chromium/shape_detection/BitmapUtils.java +++ b/services/shape_detection/android/java/src/org/chromium/shape_detection/BitmapUtils.java @@ -79,8 +79,8 @@ diff --git a/services/shape_detection/android/java/src/org/chromium/shape_detect diff --git a/services/shape_detection/android/java/src/org/chromium/shape_detection/InterfaceRegistrar.java b/services/shape_detection/android/java/src/org/chromium/shape_detection/InterfaceRegistrar.java --- a/services/shape_detection/android/java/src/org/chromium/shape_detection/InterfaceRegistrar.java +++ b/services/shape_detection/android/java/src/org/chromium/shape_detection/InterfaceRegistrar.java -@@ -8,9 +8,6 @@ import org.chromium.base.annotations.CalledByNative; - import org.chromium.base.annotations.JNINamespace; +@@ -9,9 +9,6 @@ import org.jni_zero.JNINamespace; + import org.chromium.mojo.system.MessagePipeHandle; import org.chromium.mojo.system.impl.CoreImpl; -import org.chromium.shape_detection.mojom.BarcodeDetectionProvider; @@ -89,7 +89,7 @@ diff --git a/services/shape_detection/android/java/src/org/chromium/shape_detect @JNINamespace("shape_detection") class InterfaceRegistrar { -@@ -22,33 +19,17 @@ class InterfaceRegistrar { +@@ -23,33 +20,17 @@ class InterfaceRegistrar { static void bindBarcodeDetectionProvider(long nativeHandle) { // Immediately wrap |nativeHandle| as it cannot be allowed to leak. MessagePipeHandle handle = messagePipeHandleFromNative(nativeHandle); diff --git a/build/patches/ungoogled-chromium-Disable-Network-Time-Tracker.patch b/build/patches/ungoogled-chromium-Disable-Network-Time-Tracker.patch index fb3834b77..eeca1c2c8 100644 --- a/build/patches/ungoogled-chromium-Disable-Network-Time-Tracker.patch +++ b/build/patches/ungoogled-chromium-Disable-Network-Time-Tracker.patch @@ -15,7 +15,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/components/network_time/network_time_tracker.cc b/components/network_time/network_time_tracker.cc --- a/components/network_time/network_time_tracker.cc +++ b/components/network_time/network_time_tracker.cc -@@ -289,7 +289,7 @@ void NetworkTimeTracker::UpdateNetworkTime(base::Time network_time, +@@ -294,7 +294,7 @@ void NetworkTimeTracker::UpdateNetworkTime(base::Time network_time, } bool NetworkTimeTracker::AreTimeFetchesEnabled() const { diff --git a/build/patches/ungoogled-chromium-Disable-profile-avatar.patch b/build/patches/ungoogled-chromium-Disable-profile-avatar.patch index 4ac0e14c1..2079bd129 100644 --- a/build/patches/ungoogled-chromium-Disable-profile-avatar.patch +++ b/build/patches/ungoogled-chromium-Disable-profile-avatar.patch @@ -14,7 +14,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 -@@ -1463,8 +1463,6 @@ static_library("browser") { +@@ -1466,8 +1466,6 @@ static_library("browser") { "profiles/profile_attributes_storage.cc", "profiles/profile_attributes_storage.h", "profiles/profile_attributes_storage_observer.h", @@ -26,7 +26,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn diff --git a/chrome/browser/profiles/profile_attributes_entry.cc b/chrome/browser/profiles/profile_attributes_entry.cc --- a/chrome/browser/profiles/profile_attributes_entry.cc +++ b/chrome/browser/profiles/profile_attributes_entry.cc -@@ -329,12 +329,6 @@ std::u16string ProfileAttributesEntry::GetUserName() const { +@@ -323,12 +323,6 @@ std::u16string ProfileAttributesEntry::GetUserName() const { gfx::Image ProfileAttributesEntry::GetAvatarIcon( int size_for_placeholder_avatar, bool use_high_res_file) const { @@ -42,7 +42,7 @@ diff --git a/chrome/browser/profiles/profile_attributes_entry.cc b/chrome/browse diff --git a/chrome/browser/profiles/profile_attributes_storage.cc b/chrome/browser/profiles/profile_attributes_storage.cc --- a/chrome/browser/profiles/profile_attributes_storage.cc +++ b/chrome/browser/profiles/profile_attributes_storage.cc -@@ -998,7 +998,7 @@ void ProfileAttributesStorage::DownloadHighResAvatarIfNeeded( +@@ -984,7 +984,7 @@ void ProfileAttributesStorage::DownloadHighResAvatarIfNeeded( void ProfileAttributesStorage::DownloadHighResAvatar( size_t icon_index, const base::FilePath& profile_path) { diff --git a/build/patches/ungoogled-chromium-Disable-translate-integration.patch b/build/patches/ungoogled-chromium-Disable-translate-integration.patch index 61363478a..2812a231f 100644 --- a/build/patches/ungoogled-chromium-Disable-translate-integration.patch +++ b/build/patches/ungoogled-chromium-Disable-translate-integration.patch @@ -11,8 +11,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../language/settings/LanguageSettings.java | 44 +------------------ .../strings/android_chrome_strings.grd | 3 -- .../core/browser/translate_manager.cc | 5 ++- - .../core/browser/translate_script.cc | 19 +++----- - 6 files changed, 11 insertions(+), 108 deletions(-) + .../core/browser/translate_script.cc | 17 +++---- + 6 files changed, 10 insertions(+), 107 deletions(-) diff --git a/chrome/browser/language/android/java/res/xml/languages_detailed_preferences.xml b/chrome/browser/language/android/java/res/xml/languages_detailed_preferences.xml --- a/chrome/browser/language/android/java/res/xml/languages_detailed_preferences.xml @@ -170,7 +170,7 @@ diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browse 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 -@@ -1930,9 +1930,6 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1823,9 +1823,6 @@ Your Google account may have other forms of browsing history like searches and a Websites will show text in your preferred language, when possible. @@ -198,7 +198,7 @@ diff --git a/components/translate/core/browser/translate_manager.cc b/components diff --git a/components/translate/core/browser/translate_script.cc b/components/translate/core/browser/translate_script.cc --- a/components/translate/core/browser/translate_script.cc +++ b/components/translate/core/browser/translate_script.cc -@@ -125,19 +125,12 @@ void TranslateScript::OnScriptFetchComplete(bool success, +@@ -125,20 +125,13 @@ void TranslateScript::OnScriptFetchComplete(bool success, data_ = base::StringPrintf("var translateApiKey = '%s';\n", google_apis::GetAPIKey().c_str()); @@ -208,18 +208,18 @@ diff --git a/components/translate/core/browser/translate_script.cc b/components/ - std::map params; - base::StringAppendF( - &data_, "var gtTimeInfo = {'fetchStart': %0.f, 'fetchEnd': %0.f};\n", -- script_fetch_start_time_, base::Time::Now().ToJsTime()); +- script_fetch_start_time_, ++ base::StringAppendF(&data_, "var serverParams = '';\n"); ++ base::StringAppendF( ++ &data_, "var gtTimeInfo = {'fetchStart': %0.f, 'fetchEnd': %0.f};\n", ++ script_fetch_start_time_, + base::Time::Now().InMillisecondsFSinceUnixEpoch()); - base::StringAppendF(&data_, "var serverParams = '%s';\n", - server_params.c_str()); -- + - GURL security_origin = translate::GetTranslateSecurityOrigin(); - base::StringAppendF(&data_, "var securityOrigin = '%s';", - security_origin.spec().c_str()); -+ base::StringAppendF(&data_, "var serverParams = '';\n"); -+ base::StringAppendF( -+ &data_, "var gtTimeInfo = {'fetchStart': %0.f, 'fetchEnd': %0.f};\n", -+ script_fetch_start_time_, base::Time::Now().ToJsTime()); -+ + base::StringAppendF(&data_, "var securityOrigin = '';"); // Load embedded translate.js. diff --git a/build/patches/ungoogled-chromium-Disable-webRTC-log-uploader.patch b/build/patches/ungoogled-chromium-Disable-webRTC-log-uploader.patch index 52869f630..c2b78adc9 100644 --- a/build/patches/ungoogled-chromium-Disable-webRTC-log-uploader.patch +++ b/build/patches/ungoogled-chromium-Disable-webRTC-log-uploader.patch @@ -4,75 +4,9 @@ Subject: ungoogled-chromium: Disable webRTC log uploader License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - .../media/webrtc/webrtc_log_uploader.cc | 36 ++++--------------- - .../media/webrtc/webrtc_logging_controller.cc | 1 + - chrome/browser/ui/browser_ui_prefs.cc | 2 +- - 3 files changed, 8 insertions(+), 31 deletions(-) + chrome/browser/ui/browser_ui_prefs.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/chrome/browser/media/webrtc/webrtc_log_uploader.cc b/chrome/browser/media/webrtc/webrtc_log_uploader.cc ---- a/chrome/browser/media/webrtc/webrtc_log_uploader.cc -+++ b/chrome/browser/media/webrtc/webrtc_log_uploader.cc -@@ -128,36 +128,7 @@ void WebRtcLogUploader::OnLoggingStopped( - DCHECK(meta_data.get()); - DCHECK(!upload_done_data.paths.directory.empty()); - -- std::string compressed_log = CompressLog(log_buffer.get()); -- -- std::string local_log_id; -- -- if (base::PathExists(upload_done_data.paths.directory)) { -- webrtc_logging::DeleteOldWebRtcLogFiles(upload_done_data.paths.directory); -- -- local_log_id = base::NumberToString(base::Time::Now().ToDoubleT()); -- base::FilePath log_file_path = -- upload_done_data.paths.directory.AppendASCII(local_log_id) -- .AddExtension(FILE_PATH_LITERAL(".gz")); -- WriteCompressedLogToFile(compressed_log, log_file_path); -- -- base::FilePath log_list_path = -- webrtc_logging::TextLogList::GetWebRtcLogListFileForDirectory( -- upload_done_data.paths.directory); -- AddLocallyStoredLogInfoToUploadListFile(log_list_path, local_log_id); -- } -- -- upload_done_data.local_log_id = local_log_id; -- -- if (is_text_log_upload_allowed) { -- PrepareMultipartPostData(compressed_log, std::move(meta_data), -- std::move(upload_done_data)); -- } else { -- main_task_runner_->PostTask( -- FROM_HERE, -- base::BindOnce(&WebRtcLogUploader::NotifyUploadDisabled, -- base::Unretained(this), std::move(upload_done_data))); -- } -+ NotifyUploadDoneAndLogStats(net::HTTP_OK, net::OK, "", std::move(upload_done_data)); - } - - void WebRtcLogUploader::PrepareMultipartPostData( -@@ -168,6 +139,11 @@ void WebRtcLogUploader::PrepareMultipartPostData( - DCHECK(!compressed_log.empty()); - DCHECK(meta_data.get()); - -+ if ((true)) { -+ NotifyUploadDoneAndLogStats(net::HTTP_OK, net::OK, "", std::move(upload_done_data)); -+ return; -+ } -+ - std::unique_ptr post_data(new std::string()); - SetupMultipart(post_data.get(), compressed_log, - upload_done_data.paths.incoming_rtp_dump, -diff --git a/chrome/browser/media/webrtc/webrtc_logging_controller.cc b/chrome/browser/media/webrtc/webrtc_logging_controller.cc ---- a/chrome/browser/media/webrtc/webrtc_logging_controller.cc -+++ b/chrome/browser/media/webrtc/webrtc_logging_controller.cc -@@ -603,6 +603,7 @@ content::BrowserContext* WebRtcLoggingController::GetBrowserContext() const { - // static - bool WebRtcLoggingController::IsWebRtcTextLogAllowed( - content::BrowserContext* browser_context) { -+ if ((true)) return false; - // Historically by default webrtc text logs are always uploaded. - if (!browser_context) { - return true; 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 diff --git a/build/patches/ungoogled-chromium-no-special-hosts-domains.patch b/build/patches/ungoogled-chromium-no-special-hosts-domains.patch index 0d85c7a8a..c67325362 100644 --- a/build/patches/ungoogled-chromium-no-special-hosts-domains.patch +++ b/build/patches/ungoogled-chromium-no-special-hosts-domains.patch @@ -11,7 +11,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../android/metrics/uma_session_stats.cc | 10 - .../android/signin/signin_manager_android.cc | 27 +- chrome/browser/browser_process_impl.cc | 1 - - chrome/browser/chrome_browser_main.cc | 8 - + chrome/browser/chrome_browser_main.cc | 10 - .../browser/chrome_content_browser_client.cc | 35 +- .../domain_reliability/service_factory.cc | 33 +- chrome/browser/extensions/BUILD.gn | 1 - @@ -21,7 +21,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../long_screenshots_tab_service.cc | 22 -- .../metrics/chrome_metrics_service_client.cc | 2 +- .../chrome_metrics_services_manager_client.cc | 5 +- - .../metrics/metrics_reporting_state.cc | 78 +---- + .../metrics/metrics_reporting_state.cc | 72 +--- .../net/system_network_context_manager.cc | 1 - .../modules/recipes/recipes_service.cc | 3 +- .../one_google_bar_loader_impl.cc | 3 +- @@ -59,14 +59,14 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html ...gled-chromium-no-special-hosts-domains.inc | 1 + net/base/url_util.cc | 21 -- services/network/network_context.cc | 2 +- - 52 files changed, 57 insertions(+), 800 deletions(-) + 52 files changed, 57 insertions(+), 796 deletions(-) create mode 100644 cromite_flags/content/common/features_cc/ungoogled-chromium-no-special-hosts-domains.inc create mode 100644 cromite_flags/content/public/common/content_features_cc/ungoogled-chromium-no-special-hosts-domains.inc diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -1039,10 +1039,6 @@ static_library("browser") { +@@ -1031,10 +1031,6 @@ static_library("browser") { "page_load_metrics/observers/foreground_duration_ukm_observer.h", "page_load_metrics/observers/formfill_page_load_metrics_observer.cc", "page_load_metrics/observers/formfill_page_load_metrics_observer.h", @@ -77,7 +77,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn "page_load_metrics/observers/histogram_suffixes.cc", "page_load_metrics/observers/histogram_suffixes.h", "page_load_metrics/observers/https_engagement_metrics/https_engagement_page_load_metrics_observer.cc", -@@ -1989,7 +1985,6 @@ static_library("browser") { +@@ -1995,7 +1991,6 @@ static_library("browser") { "//chrome/browser/autofill", "//chrome/browser/devtools", "//chrome/browser/favicon", @@ -85,15 +85,15 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn "//chrome/browser/profiling_host", # TODO(crbug.com/1335199): break this dep when favicon is in its own target -@@ -2013,7 +2008,6 @@ static_library("browser") { +@@ -2019,7 +2014,6 @@ static_library("browser") { public_deps = [ "//base", - "//chrome/browser/google", "//chrome/browser/headless", + "//chrome/browser/profiles", "//chrome/common", - "//chrome/common:buildflags", -@@ -7789,8 +7783,6 @@ static_library("browser") { +@@ -7792,8 +7786,6 @@ static_library("browser") { "supervised_user/kids_chrome_management/kids_chrome_management_client_factory.h", "supervised_user/supervised_user_browser_utils.cc", "supervised_user/supervised_user_browser_utils.h", @@ -105,7 +105,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn diff --git a/chrome/browser/android/metrics/uma_session_stats.cc b/chrome/browser/android/metrics/uma_session_stats.cc --- a/chrome/browser/android/metrics/uma_session_stats.cc +++ b/chrome/browser/android/metrics/uma_session_stats.cc -@@ -256,16 +256,6 @@ static void JNI_UmaSessionStats_ChangeMetricsReportingConsent( +@@ -257,16 +257,6 @@ static void JNI_UmaSessionStats_ChangeMetricsReportingConsent( jint called_from) { UpdateMetricsPrefsOnPermissionChange( consent, static_cast(called_from)); @@ -162,7 +162,7 @@ diff --git a/chrome/browser/android/signin/signin_manager_android.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 -@@ -1121,7 +1121,6 @@ BrowserProcessImpl::component_updater() { +@@ -1125,7 +1125,6 @@ BrowserProcessImpl::component_updater() { std::make_unique(); std::string brand; @@ -173,24 +173,26 @@ diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_pro diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc -@@ -515,10 +515,6 @@ void ProcessSingletonNotificationCallbackImpl( +@@ -511,11 +511,6 @@ void ProcessSingletonNotificationCallbackImpl( StartupBrowserCreator::ProcessCommandLineAlreadyRunning( command_line, current_directory, startup_profile_path_info); - - // Record now as the last successful chrome start. -- if (ShouldRecordActiveUse(command_line)) +- if constexpr (kShouldRecordActiveUse) { - GoogleUpdateSettings::SetLastRunTime(); +- } } #endif // BUILDFLAG(ENABLE_PROCESS_SINGLETON) -@@ -1791,10 +1787,6 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1737,11 +1732,6 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { upgrade_util::SaveLastModifiedTimeOfExe(); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) - // Record now as the last successful chrome start. -- if (ShouldRecordActiveUse(*base::CommandLine::ForCurrentProcess())) +- if constexpr (kShouldRecordActiveUse) { - GoogleUpdateSettings::SetLastRunTime(); +- } - // Create the RunLoop for MainMessageLoopRun() to use and transfer // ownership of the browser's lifetime to the BrowserProcess. @@ -198,7 +200,7 @@ diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_brows 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 -@@ -2916,7 +2916,6 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( +@@ -2914,7 +2914,6 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( switches::kForcePNaClSubzero, #endif switches::kForceUIDirection, @@ -206,7 +208,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch switches::kJavaScriptHarmony, switches::kEnableExperimentalWebAssemblyFeatures, embedder_support::kOriginTrialDisabledFeatures, -@@ -5131,12 +5130,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( +@@ -5164,12 +5163,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( } #endif @@ -219,7 +221,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch if (auto* throttle_manager = subresource_filter::ContentSubresourceFilterThrottleManager:: FromNavigationHandle(*handle)) { -@@ -5662,7 +5655,8 @@ GetClientDataHeader(int frame_tree_node_id) { +@@ -5700,7 +5693,8 @@ GetClientDataHeader(int frame_tree_node_id) { } #endif @@ -229,7 +231,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch #if BUILDFLAG(IS_ANDROID) const std::string& client_data_header, #endif -@@ -5701,7 +5695,7 @@ std::unique_ptr CreateGoogleURLLoaderThrottle( +@@ -5739,7 +5733,7 @@ std::unique_ptr CreateGoogleURLLoaderThrottle( std::move(bound_session_request_throttled_listener), #endif std::move(dynamic_params)); @@ -238,7 +240,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch std::vector> ChromeContentBrowserClient::CreateURLLoaderThrottles( -@@ -5747,15 +5741,6 @@ ChromeContentBrowserClient::CreateURLLoaderThrottles( +@@ -5785,15 +5779,6 @@ ChromeContentBrowserClient::CreateURLLoaderThrottles( GetClientDataHeader(frame_tree_node_id); #endif @@ -254,7 +256,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch { auto* factory = ProtocolHandlerRegistryFactory::GetForBrowserContext(browser_context); -@@ -5809,20 +5794,6 @@ ChromeContentBrowserClient::CreateURLLoaderThrottlesForKeepAlive( +@@ -5847,20 +5832,6 @@ ChromeContentBrowserClient::CreateURLLoaderThrottlesForKeepAlive( } #endif @@ -324,7 +326,7 @@ diff --git a/chrome/browser/domain_reliability/service_factory.cc b/chrome/brows diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUILD.gn --- a/chrome/browser/extensions/BUILD.gn +++ b/chrome/browser/extensions/BUILD.gn -@@ -822,7 +822,6 @@ static_library("extensions") { +@@ -807,7 +807,6 @@ static_library("extensions") { "//chrome/browser/devtools", "//chrome/browser/extensions:cws_item_service_proto", "//chrome/browser/favicon", @@ -335,7 +337,7 @@ diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUIL diff --git a/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc b/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc --- a/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc +++ b/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc -@@ -119,7 +119,6 @@ constexpr char kOsVersionTag[] = "OS VERSION"; +@@ -122,7 +122,6 @@ constexpr char kOsVersionTag[] = "OS VERSION"; #if BUILDFLAG(IS_WIN) constexpr char kUsbKeyboardDetected[] = "usb_keyboard_detected"; constexpr char kIsEnrolledToDomain[] = "enrolled_to_domain"; @@ -343,7 +345,7 @@ diff --git a/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log #if BUILDFLAG(GOOGLE_CHROME_BRANDING) constexpr char kUpdateErrorCode[] = "update_error_code"; constexpr char kUpdateHresult[] = "update_hresult"; -@@ -622,10 +621,6 @@ void ChromeInternalLogSource::PopulateEnrolledToDomain( +@@ -631,10 +630,6 @@ void ChromeInternalLogSource::PopulateEnrolledToDomain( void ChromeInternalLogSource::PopulateInstallerBrandCode( SystemLogsResponse* response) { @@ -453,7 +455,7 @@ diff --git a/chrome/browser/metrics/chrome_metrics_service_client.cc b/chrome/br diff --git a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc --- a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc +++ b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc -@@ -103,9 +103,6 @@ void PostStoreMetricsClientInfo(const metrics::ClientInfo& client_info) { +@@ -101,9 +101,6 @@ void PostStoreMetricsClientInfo(const metrics::ClientInfo& client_info) { // This must happen on the same sequence as the tasks to enable/disable // metrics reporting. Otherwise, this may run while disabling metrics // reporting if the user quickly enables and disables metrics reporting. @@ -475,7 +477,7 @@ diff --git a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc b/ diff --git a/chrome/browser/metrics/metrics_reporting_state.cc b/chrome/browser/metrics/metrics_reporting_state.cc --- a/chrome/browser/metrics/metrics_reporting_state.cc +++ b/chrome/browser/metrics/metrics_reporting_state.cc -@@ -34,71 +34,6 @@ +@@ -33,65 +33,6 @@ #include "components/policy/core/common/features.h" #endif // BUILDFLAG(IS_ANDROID) @@ -521,12 +523,6 @@ diff --git a/chrome/browser/metrics/metrics_reporting_state.cc b/chrome/browser/ - g_browser_process->local_state()->SetBoolean( - metrics::prefs::kMetricsReportingEnabled, updated_pref); - --#if BUILDFLAG(IS_CHROMEOS_ASH) -- metrics::structured::NeutrinoDevicesLogWithClientId( -- g_browser_process->local_state()->GetString( -- metrics::prefs::kMetricsClientID), -- metrics::structured::NeutrinoDevicesLocation::kSetMetricsReporting); --#endif // BUILDFLAG(IS_CHROMEOS_ASH) - UpdateMetricsPrefsOnPermissionChange(updated_pref, called_from); - - // Uses the current state of whether reporting is enabled to enable services. @@ -547,10 +543,10 @@ diff --git a/chrome/browser/metrics/metrics_reporting_state.cc b/chrome/browser/ void ChangeMetricsReportingState( bool enabled, ChangeMetricsReportingStateCalledFrom called_from) { -@@ -139,11 +74,6 @@ void ChangeMetricsReportingStateWithReply( - metrics::structured::NeutrinoDevicesLocation:: - kChangeMetricsReportingStateWithReply); - #endif // BUILDFLAG(IS_CHROMEOS_ASH) +@@ -125,11 +66,6 @@ void ChangeMetricsReportingStateWithReply( + return; + } + #endif - GoogleUpdateSettings::CollectStatsConsentTaskRunner() - ->PostTaskAndReplyWithResult( - FROM_HERE, base::BindOnce(&SetGoogleUpdateSettings, enabled), @@ -559,7 +555,7 @@ diff --git a/chrome/browser/metrics/metrics_reporting_state.cc b/chrome/browser/ } void UpdateMetricsPrefsOnPermissionChange( -@@ -215,13 +145,7 @@ void UpdateMetricsPrefsOnPermissionChange( +@@ -195,13 +131,7 @@ void UpdateMetricsPrefsOnPermissionChange( crash_keys::ClearMetricsClientId(); } @@ -577,7 +573,7 @@ diff --git a/chrome/browser/metrics/metrics_reporting_state.cc b/chrome/browser/ 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 -@@ -819,7 +819,6 @@ void SystemNetworkContextManager::AddSSLConfigToNetworkContextParams( +@@ -828,7 +828,6 @@ void SystemNetworkContextManager::AddSSLConfigToNetworkContextParams( void SystemNetworkContextManager::ConfigureDefaultNetworkContextParams( network::mojom::NetworkContextParams* network_context_params) { variations::UpdateCorsExemptHeaderForVariations(network_context_params); @@ -658,7 +654,7 @@ diff --git a/chrome/browser/page_load_metrics/observers/from_gws_page_load_metri diff --git a/chrome/browser/page_load_metrics/page_load_metrics_initialize.cc b/chrome/browser/page_load_metrics/page_load_metrics_initialize.cc --- a/chrome/browser/page_load_metrics/page_load_metrics_initialize.cc +++ b/chrome/browser/page_load_metrics/page_load_metrics_initialize.cc -@@ -124,8 +124,6 @@ void PageLoadMetricsEmbedder::RegisterEmbedderObservers( +@@ -126,8 +126,6 @@ void PageLoadMetricsEmbedder::RegisterEmbedderObservers( tracker->AddObserver(std::make_unique()); tracker->AddObserver(std::make_unique()); tracker->AddObserver(std::make_unique()); @@ -695,7 +691,7 @@ diff --git a/chrome/browser/search_engines/ui_thread_search_terms_data.cc b/chro 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 -@@ -423,7 +423,6 @@ static_library("ui") { +@@ -419,7 +419,6 @@ static_library("ui") { "//chrome/browser/companion/core", "//chrome/browser/devtools", "//chrome/browser/favicon", @@ -706,7 +702,7 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn diff --git a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc b/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc --- a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc +++ b/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc -@@ -621,11 +621,6 @@ content::WebUIDataSource* CreateAndAddNewTabPageUiHtmlSource(Profile* profile) { +@@ -630,11 +630,6 @@ content::WebUIDataSource* CreateAndAddNewTabPageUiHtmlSource(Profile* profile) { // chrome-untrusted://new-tab-page for other external content and resources. // NOTE: Use caution when overriding content security policies as that cean // lead to subtle security bugs such as https://crbug.com/1251541. @@ -721,7 +717,7 @@ diff --git a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc b/chrome/br diff --git a/chrome/browser/ui/webui/settings/reset_settings_handler.cc b/chrome/browser/ui/webui/settings/reset_settings_handler.cc --- a/chrome/browser/ui/webui/settings/reset_settings_handler.cc +++ b/chrome/browser/ui/webui/settings/reset_settings_handler.cc -@@ -87,7 +87,6 @@ bool ResetSettingsHandler::ShouldShowResetProfileBanner(Profile* profile) { +@@ -82,7 +82,6 @@ bool ResetSettingsHandler::ShouldShowResetProfileBanner(Profile* profile) { ResetSettingsHandler::ResetSettingsHandler(Profile* profile) : profile_(profile) { @@ -744,7 +740,7 @@ diff --git a/chrome/browser/upgrade_detector/upgrade_detector_impl.cc b/chrome/b diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn --- a/chrome/common/BUILD.gn +++ b/chrome/common/BUILD.gn -@@ -142,8 +142,6 @@ static_library("common_lib") { +@@ -139,8 +139,6 @@ static_library("common_lib") { "content_restriction.h", "crash_keys.cc", "crash_keys.h", @@ -767,7 +763,7 @@ diff --git a/chrome/renderer/google_accounts_private_api_util.cc b/chrome/render diff --git a/chrome/renderer/url_loader_throttle_provider_impl.cc b/chrome/renderer/url_loader_throttle_provider_impl.cc --- a/chrome/renderer/url_loader_throttle_provider_impl.cc +++ b/chrome/renderer/url_loader_throttle_provider_impl.cc -@@ -219,17 +219,6 @@ URLLoaderThrottleProviderImpl::CreateThrottles( +@@ -220,17 +220,6 @@ URLLoaderThrottleProviderImpl::CreateThrottles( } #endif @@ -788,7 +784,7 @@ diff --git a/chrome/renderer/url_loader_throttle_provider_impl.cc b/chrome/rende diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -6506,7 +6506,6 @@ test("unit_tests") { +@@ -6594,7 +6594,6 @@ test("unit_tests") { "//chrome/browser/favicon", "//chrome/browser/feature_guide/notifications:unit_tests", "//chrome/browser/first_party_sets", @@ -1456,7 +1452,7 @@ diff --git a/components/search_engines/search_terms_data.cc b/components/search_ diff --git a/components/search_engines/template_url.cc b/components/search_engines/template_url.cc --- a/components/search_engines/template_url.cc +++ b/components/search_engines/template_url.cc -@@ -561,11 +561,7 @@ std::u16string TemplateURLRef::SearchTermToString16( +@@ -562,11 +562,7 @@ std::u16string TemplateURLRef::SearchTermToString16( bool TemplateURLRef::HasGoogleBaseURLs( const SearchTermsData& search_terms_data) const { ParseIfNecessary(search_terms_data); @@ -1677,7 +1673,7 @@ diff --git a/net/base/url_util.cc b/net/base/url_util.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 -@@ -2846,7 +2846,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2871,7 +2871,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( } #endif // BUILDFLAG(IS_CT_SUPPORTED) diff --git a/build/patches/webview-Hard-no-to-persistent-histograms.patch b/build/patches/webview-Hard-no-to-persistent-histograms.patch index 32b964369..636a5f104 100644 --- a/build/patches/webview-Hard-no-to-persistent-histograms.patch +++ b/build/patches/webview-Hard-no-to-persistent-histograms.patch @@ -18,7 +18,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/android_webview/browser/aw_field_trials.cc b/android_webview/browser/aw_field_trials.cc --- a/android_webview/browser/aw_field_trials.cc +++ b/android_webview/browser/aw_field_trials.cc -@@ -50,13 +50,6 @@ class AwFeatureOverrides { +@@ -51,13 +51,6 @@ class AwFeatureOverrides { } // namespace void AwFieldTrials::OnVariationsSetupComplete() { From b441c2af1b430158beaef12b0ea0e26c4a9c45b7 Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Fri, 1 Dec 2023 16:25:10 +0100 Subject: [PATCH 02/19] bump to 120.0.6099.56 --- build/RELEASE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/RELEASE b/build/RELEASE index 7ecc6ba06..695728112 100644 --- a/build/RELEASE +++ b/build/RELEASE @@ -1 +1 @@ -119.0.6045.200 \ No newline at end of file +120.0.6099.56 \ No newline at end of file From 86bb2672a7094d29145a967ae649bca28ef91b30 Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Sat, 2 Dec 2023 22:58:24 +0100 Subject: [PATCH 03/19] v120 final patches --- .../patches/00Add-cromite-flags-support.patch | 55 ++++--- .../00Add-option-to-disable-snapshots.patch | 12 +- build/patches/00Fix-chromium-build-bugs.patch | 17 ++- ...ning-all-cookies-by-top-frame-domain.patch | 9 +- .../Add-an-always-incognito-mode.patch | 8 +- .../Add-bookmark-import-export-actions.patch | 19 +-- ...Add-lifetime-options-for-permissions.patch | 45 +++--- .../Add-option-to-force-tablet-UI.patch | 10 +- ...-to-not-persist-tabs-across-sessions.patch | 10 +- ...ow-building-without-supervised-users.patch | 25 +++- build/patches/Bromite-auto-updater.patch | 2 +- .../Bromite-subresource-adblocker.patch | 4 +- ...ctionary-suggestions-for-the-Omnibox.patch | 13 +- ...ble-Accessibility-service-by-default.patch | 2 +- .../patches/Disable-all-predictors-code.patch | 98 ++++++++++++- .../Disable-conversion-measurement-api.patch | 2 +- .../Experimental-user-scripts-support.patch | 22 ++- ...story-number-of-days-privacy-setting.patch | 8 +- .../Move-navigation-bar-to-bottom.patch | 135 +++++++++++++----- ...nt-settings-back-to-privacy-settings.patch | 21 +-- .../patches/Override-Navigator-Language.patch | 2 +- ...referrals-in-cross-origin-navigation.patch | 6 +- .../Remove-binary-blob-integrations.patch | 14 +- ...Remove-voice-recognition-integration.patch | 88 +++++++----- .../Restore-Simplified-NTP-launch.patch | 30 ++-- ...l-of-execution-context-address-space.patch | 13 +- build/patches/User-agent-customization.patch | 30 ++-- build/patches/bromite-build-utils.patch | 10 +- .../eyeo-beta-118.0.5993.48-android_api.patch | 16 +-- ...eta-118.0.5993.48-chrome_integration.patch | 22 ++- 30 files changed, 489 insertions(+), 259 deletions(-) diff --git a/build/patches/00Add-cromite-flags-support.patch b/build/patches/00Add-cromite-flags-support.patch index 8eabe014d..d1984d8cc 100644 --- a/build/patches/00Add-cromite-flags-support.patch +++ b/build/patches/00Add-cromite-flags-support.patch @@ -28,8 +28,8 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html chrome/common/chrome_features.cc | 1 + .../content_settings/core/common/features.cc | 1 + components/flags_ui/flags_state.cc | 21 +++ - components/flags_ui/resources/app.html | 33 +++- - components/flags_ui/resources/app.ts | 37 ++++- + components/flags_ui/resources/app.html | 42 ++++- + components/flags_ui/resources/app.ts | 41 ++++- components/flags_ui/resources/experiment.html | 7 +- components/flags_ui/resources/experiment.ts | 16 ++ .../flags_ui/resources/flags_browser_proxy.ts | 5 + @@ -70,7 +70,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html services/network/public/cpp/features.h | 1 + third_party/blink/common/features.cc | 1 + third_party/blink/public/common/features.h | 1 + - 56 files changed, 475 insertions(+), 13 deletions(-) + 56 files changed, 488 insertions(+), 13 deletions(-) create mode 100755 cromite_flags/BUILD.gn create mode 100755 cromite_flags/chrome/browser/about_flags_cc/placeholder.txt create mode 100755 cromite_flags/chrome/browser/browser_features_cc/placeholder.txt @@ -483,10 +483,13 @@ diff --git a/components/flags_ui/flags_state.cc b/components/flags_ui/flags_stat diff --git a/components/flags_ui/resources/app.html b/components/flags_ui/resources/app.html --- a/components/flags_ui/resources/app.html +++ b/components/flags_ui/resources/app.html -@@ -473,6 +473,24 @@ +@@ -473,7 +473,32 @@ padding-top: 1.5rem; } } ++ #appcontainer { ++ overflow-y: scroll; ++ } + .cromite #header { + display: none; + } @@ -504,11 +507,16 @@ diff --git a/components/flags_ui/resources/app.html b/components/flags_ui/resour + } + .cromite #tab-content-cromite { + display: block !important; ++ } ++ .cromite .section-header-title { ++ display: none; + } ++

\ No newline at end of file +
++ ++
diff --git a/components/flags_ui/resources/app.ts b/components/flags_ui/resources/app.ts --- a/components/flags_ui/resources/app.ts +++ b/components/flags_ui/resources/app.ts -@@ -204,6 +204,10 @@ export class FlagsAppElement extends CustomElement { +@@ -193,6 +193,7 @@ export class FlagsAppElement extends CustomElement { + return getTemplate(); + } + ++ private onlyCromiteFlags: boolean = false; + private announceStatusDelayMs: number = 100; + private featuresResolver: PromiseResolver = new PromiseResolver(); + private flagSearch: FlagSearch = new FlagSearch(this); +@@ -204,6 +205,10 @@ export class FlagsAppElement extends CustomElement { // tabs: Tab[] = [ @@ -556,20 +574,23 @@ diff --git a/components/flags_ui/resources/app.ts b/components/flags_ui/resource { tabEl: this.getRequiredElement('#tab-available'), panelEl: this.getRequiredElement('#tab-content-available'), -@@ -217,6 +221,8 @@ export class FlagsAppElement extends CustomElement { +@@ -217,6 +222,11 @@ export class FlagsAppElement extends CustomElement { ]; connectedCallback() { -+ if (location.pathname == '/cromite') -+ document.body.classList.add('cromite'); ++ if (location.pathname == '/cromite') { ++ this.onlyCromiteFlags = true; ++ this.getRequiredElement("#appcontainer").classList.add('cromite'); ++ document.title = "Cromite Flags List"; ++ } // Get and display the data upon loading. this.requestExperimentalFeaturesData(); // There is no restart button on iOS. -@@ -277,20 +283,29 @@ export class FlagsAppElement extends CustomElement { +@@ -277,20 +287,29 @@ export class FlagsAppElement extends CustomElement { const defaultFeatures: Feature[] = []; const nonDefaultFeatures: Feature[] = []; -+ if (document.body.classList.contains("cromite")) { ++ if (this.onlyCromiteFlags) { + experimentalFeaturesData.supportedFeatures = + experimentalFeaturesData.supportedFeatures.filter(item => item.is_new); + } @@ -582,12 +603,12 @@ diff --git a/components/flags_ui/resources/app.ts b/components/flags_ui/resource nonDefaultFeatures, - this.getRequiredElement('#non-default-experiments')); + this.getRequiredElement('#non-default-experiments'), -+ this.getRequiredElement('non-default-cromite-experiments'), false); ++ this.getRequiredElement('#non-default-cromite-experiments'), false); this.renderExperiments( - defaultFeatures, this.getRequiredElement('#default-experiments')); + defaultFeatures, this.getRequiredElement('#default-experiments'), -+ this.getRequiredElement('cromite-experiments'), false); ++ this.getRequiredElement('#cromite-experiments'), false); // this.renderExperiments( @@ -598,7 +619,7 @@ diff --git a/components/flags_ui/resources/app.ts b/components/flags_ui/resource // this.showRestartToast(experimentalFeaturesData.needsRestart); -@@ -401,16 +416,23 @@ export class FlagsAppElement extends CustomElement { +@@ -401,16 +420,23 @@ export class FlagsAppElement extends CustomElement { } private renderExperiments( @@ -623,7 +644,7 @@ diff --git a/components/flags_ui/resources/app.ts b/components/flags_ui/resource if (select) { experiment.addEventListener('select-change', e => { e.preventDefault(); -@@ -434,9 +456,14 @@ export class FlagsAppElement extends CustomElement { +@@ -434,9 +460,14 @@ export class FlagsAppElement extends CustomElement { this.showRestartToast(true); }); } diff --git a/build/patches/00Add-option-to-disable-snapshots.patch b/build/patches/00Add-option-to-disable-snapshots.patch index 8650fd90a..9336c4b5c 100644 --- a/build/patches/00Add-option-to-disable-snapshots.patch +++ b/build/patches/00Add-option-to-disable-snapshots.patch @@ -120,7 +120,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layo diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java --- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java -@@ -65,6 +65,11 @@ import org.chromium.chrome.browser.preferences.SharedPreferencesManager; +@@ -66,6 +66,11 @@ import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; import org.chromium.components.browser_ui.settings.ChromeSwitchPreference; import org.chromium.components.browser_ui.settings.ManagedPreferenceDelegate; @@ -132,7 +132,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting import java.util.ArrayList; import java.util.List; -@@ -72,7 +77,15 @@ import java.util.List; +@@ -73,7 +78,15 @@ import java.util.List; * Fragment to keep track of the all the privacy related preferences. */ public class PrivacySettings @@ -149,7 +149,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting private static final String PREF_CAN_MAKE_PAYMENT = "can_make_payment"; private static final String PREF_PRELOAD_PAGES = "preload_pages"; private static final String PREF_HTTPS_FIRST_MODE = "https_first_mode"; -@@ -135,6 +148,21 @@ public class PrivacySettings +@@ -136,6 +149,21 @@ public class PrivacySettings } } @@ -171,7 +171,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting Preference privacyGuidePreference = findPreference(PREF_PRIVACY_GUIDE); // Record the launch of PG from the S&P link-row entry point privacyGuidePreference.setOnPreferenceClickListener(preference -> { -@@ -292,6 +320,7 @@ public class PrivacySettings +@@ -293,6 +321,7 @@ public class PrivacySettings public static final String PREF_ALLOW_CUSTOM_TAB_INTENTS = "allow_custom_tab_intents"; public static final String PREF_OPEN_EXTERNAL_LINKS_INCOGNITO = "open_external_links_incognito"; @@ -179,7 +179,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting @Override public boolean onPreferenceChange(Preference preference, Object newValue) { -@@ -317,6 +346,13 @@ public class PrivacySettings +@@ -318,6 +347,13 @@ public class PrivacySettings SharedPreferences.Editor sharedPreferencesEditor = ContextUtils.getAppSharedPreferences().edit(); sharedPreferencesEditor.putBoolean(PREF_OPEN_EXTERNAL_LINKS_INCOGNITO, (boolean)newValue); sharedPreferencesEditor.apply(); @@ -193,7 +193,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting } return true; } -@@ -359,6 +395,10 @@ public class PrivacySettings +@@ -360,6 +396,10 @@ public class PrivacySettings : R.string.text_off); } diff --git a/build/patches/00Fix-chromium-build-bugs.patch b/build/patches/00Fix-chromium-build-bugs.patch index d36789dba..5577ae094 100644 --- a/build/patches/00Fix-chromium-build-bugs.patch +++ b/build/patches/00Fix-chromium-build-bugs.patch @@ -8,13 +8,14 @@ https://bugs.chromium.org/p/chromium/issues/detail?id=1491776#c10 BUILD.gn | 1 - .../navigation_predictor_metrics_document_data.h | 2 ++ chrome/browser/safe_browsing/BUILD.gn | 1 + + .../omnibox/browser/autocomplete_classifier.cc | 4 ++-- components/omnibox/browser/omnibox_field_trial.cc | 4 ++-- .../phishing_classifier/phishing_image_embedder.cc | 14 +++----------- content/browser/browser_interface_binders.cc | 1 + crypto/BUILD.gn | 3 +++ net/BUILD.gn | 1 + third_party/libevent/BUILD.gn | 2 ++ - 9 files changed, 15 insertions(+), 14 deletions(-) + 10 files changed, 17 insertions(+), 16 deletions(-) diff --git a/BUILD.gn b/BUILD.gn --- a/BUILD.gn @@ -50,6 +51,20 @@ diff --git a/chrome/browser/safe_browsing/BUILD.gn b/chrome/browser/safe_browsin ] if (safe_browsing_mode == 1) { # "Safe Browsing Full" files in addition to the "basic" ones to use for +diff --git a/components/omnibox/browser/autocomplete_classifier.cc b/components/omnibox/browser/autocomplete_classifier.cc +--- a/components/omnibox/browser/autocomplete_classifier.cc ++++ b/components/omnibox/browser/autocomplete_classifier.cc +@@ -95,8 +95,8 @@ void AutocompleteClassifier::Classify( + metrics::OmniboxEventProto::PageClassification page_classification, + AutocompleteMatch* match, + GURL* alternate_nav_url) { +- TRACE_EVENT1("omnibox", "AutocompleteClassifier::Classify", "text", +- base::UTF16ToUTF8(text)); ++ // TRACE_EVENT1("omnibox", "AutocompleteClassifier::Classify", "text", ++ // base::UTF16ToUTF8(text)); + DCHECK(!inside_classify_); + base::AutoReset reset(&inside_classify_, true); + AutocompleteInput input(text, page_classification, *scheme_classifier_); diff --git a/components/omnibox/browser/omnibox_field_trial.cc b/components/omnibox/browser/omnibox_field_trial.cc --- a/components/omnibox/browser/omnibox_field_trial.cc +++ b/components/omnibox/browser/omnibox_field_trial.cc diff --git a/build/patches/00Partitioning-all-cookies-by-top-frame-domain.patch b/build/patches/00Partitioning-all-cookies-by-top-frame-domain.patch index 30a2bd6eb..3213cc13d 100644 --- a/build/patches/00Partitioning-all-cookies-by-top-frame-domain.patch +++ b/build/patches/00Partitioning-all-cookies-by-top-frame-domain.patch @@ -20,12 +20,12 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html net/cookies/parsed_cookie.h | 7 ++++++- net/extras/sqlite/sqlite_persistent_cookie_store.cc | 10 ++++++++++ net/url_request/url_request_http_job.cc | 2 +- - services/network/restricted_cookie_manager.cc | 3 +++ + services/network/restricted_cookie_manager.cc | 6 ++++++ .../renderer/modules/cookie_store/cookie_init.idl | 2 +- .../renderer/modules/cookie_store/cookie_store.cc | 12 ++++++++++++ .../cookie_store/cookie_store_delete_options.idl | 2 +- ui/webui/webui_allowlist.cc | 1 + - 16 files changed, 51 insertions(+), 21 deletions(-) + 16 files changed, 54 insertions(+), 21 deletions(-) create mode 100644 cromite_flags/components/content_settings/core/common/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc create mode 100644 cromite_flags/components/permissions/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc create mode 100644 cromite_flags/content/public/common/content_features_cc/Partitioning-all-cookies-by-top-frame-domain.inc @@ -194,11 +194,14 @@ diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_reque diff --git a/services/network/restricted_cookie_manager.cc b/services/network/restricted_cookie_manager.cc --- a/services/network/restricted_cookie_manager.cc +++ b/services/network/restricted_cookie_manager.cc -@@ -933,6 +933,9 @@ void RestrictedCookieManager::SetCookieFromString( +@@ -933,6 +933,12 @@ void RestrictedCookieManager::SetCookieFromString( std::move(callback).Run(); + // https://bugs.chromium.org/p/chromium/issues/detail?id=911299 ++ bool site_for_cookies_ok = ++ BoundSiteForCookies().IsEquivalent(site_for_cookies); ++ bool top_frame_origin_ok = top_frame_origin == BoundTopFrameOrigin(); + if (!site_for_cookies_ok || !top_frame_origin_ok) return; + net::CookieInclusionStatus status; diff --git a/build/patches/Add-an-always-incognito-mode.patch b/build/patches/Add-an-always-incognito-mode.patch index d0deb2f11..f32fbea59 100644 --- a/build/patches/Add-an-always-incognito-mode.patch +++ b/build/patches/Add-an-always-incognito-mode.patch @@ -169,18 +169,18 @@ new file mode 100644 diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml --- a/chrome/android/java/res/xml/privacy_preferences.xml +++ b/chrome/android/java/res/xml/privacy_preferences.xml -@@ -67,6 +67,11 @@ found in the LICENSE file. +@@ -66,6 +66,11 @@ found in the LICENSE file. + android:key="secure_dns" android:title="@string/settings_secure_dns_title" android:fragment="org.chromium.chrome.browser.privacy.secure_dns.SecureDnsSettings" /> - -+ - > createPairsList(int[] left, int[] right) { List> pairList = new ArrayList<>(); for (int i = 0; i < left.length; i++) { -@@ -1024,6 +1299,10 @@ class BookmarkBridge { +@@ -1024,6 +1300,10 @@ class BookmarkBridge { void getChildIds( long nativeBookmarkBridge, long id, int type, List bookmarksList); diff --git a/build/patches/Add-lifetime-options-for-permissions.patch b/build/patches/Add-lifetime-options-for-permissions.patch index 43595bf5b..c1233c2ba 100644 --- a/build/patches/Add-lifetime-options-for-permissions.patch +++ b/build/patches/Add-lifetime-options-for-permissions.patch @@ -56,7 +56,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../one_time_permissions_tracker.cc | 33 +++++++- .../one_time_permissions_tracker.h | 5 +- .../one_time_permissions_tracker_factory.cc | 2 +- - .../embedded_permission_prompt_ask_view.cc | 2 +- + .../permissions/embedded_permission_prompt.cc | 2 +- .../permission_prompt_bubble_base_view.cc | 2 +- .../browser/content_autofill_driver.cc | 64 ++++++++------- .../content/browser/content_autofill_driver.h | 2 +- @@ -67,7 +67,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../android/website_preference_bridge.cc | 7 +- .../strings/android/browser_ui_strings.grd | 5 ++ components/content_settings/android/BUILD.gn | 1 + - .../core/browser/content_settings_utils.cc | 36 +++++++++ + .../core/browser/content_settings_utils.cc | 36 ++++++++ .../core/browser/content_settings_utils.h | 6 ++ .../common/content_settings_constraints.h | 11 +++ .../page_info/PageInfoController.java | 4 +- @@ -76,7 +76,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html components/page_info/page_info.cc | 2 + components/page_info/page_info.h | 1 + .../permissions/PermissionDialogDelegate.java | 13 +++ - .../PermissionDialogModelFactory.java | 81 ++++++++++++++++++- + .../PermissionDialogModelFactory.java | 82 ++++++++++++++++++- .../permission_dialog_delegate.cc | 19 +++++ .../permission_dialog_delegate.h | 1 + .../permission_prompt_android.cc | 8 ++ @@ -89,9 +89,9 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html components/permissions/permission_prompt.h | 3 +- components/permissions/permission_request.cc | 30 ++++++- components/permissions/permission_request.h | 16 +++- - .../permissions/permission_request_manager.cc | 45 +++++++---- + .../permissions/permission_request_manager.cc | 45 ++++++---- .../permissions/permission_request_manager.h | 11 ++- - 39 files changed, 547 insertions(+), 92 deletions(-) + 39 files changed, 548 insertions(+), 92 deletions(-) diff --git a/chrome/browser/permissions/last_tab_standing_tracker.cc b/chrome/browser/permissions/last_tab_standing_tracker.cc --- a/chrome/browser/permissions/last_tab_standing_tracker.cc @@ -230,18 +230,18 @@ diff --git a/chrome/browser/permissions/one_time_permissions_tracker_factory.cc - return std::make_unique(); + return std::make_unique(context); } -diff --git a/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc b/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc ---- a/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc -+++ b/chrome/browser/ui/views/permissions/embedded_permission_prompt_ask_view.cc -@@ -33,7 +33,7 @@ void EmbeddedPermissionPromptAskView::RunButtonCallback(int button_id) { - - if (delegate()) { - if (button == ButtonType::kAllowThisTime) { -- delegate()->AllowThisTime(); -+ delegate()->AllowThisTime(content_settings::LifetimeMode::OnlyThisTime); - } else if (button == ButtonType::kAllow) { - delegate()->Allow(); - } +diff --git a/chrome/browser/ui/views/permissions/embedded_permission_prompt.cc b/chrome/browser/ui/views/permissions/embedded_permission_prompt.cc +--- a/chrome/browser/ui/views/permissions/embedded_permission_prompt.cc ++++ b/chrome/browser/ui/views/permissions/embedded_permission_prompt.cc +@@ -177,7 +177,7 @@ void EmbeddedPermissionPrompt::Allow() { + } + + void EmbeddedPermissionPrompt::AllowThisTime() { +- delegate_->AcceptThisTime(); ++ delegate_->AcceptThisTime(content_settings::LifetimeMode::OnlyThisTime); + CloseCurrentViewAndMaybeShowNext(/*first_prompt=*/false); + } + diff --git a/chrome/browser/ui/views/permissions/permission_prompt_bubble_base_view.cc b/chrome/browser/ui/views/permissions/permission_prompt_bubble_base_view.cc --- a/chrome/browser/ui/views/permissions/permission_prompt_bubble_base_view.cc +++ b/chrome/browser/ui/views/permissions/permission_prompt_bubble_base_view.cc @@ -868,7 +868,7 @@ diff --git a/components/permissions/android/java/src/org/chromium/components/per diff --git a/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogModelFactory.java b/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogModelFactory.java --- a/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogModelFactory.java +++ b/components/permissions/android/java/src/org/chromium/components/permissions/PermissionDialogModelFactory.java -@@ -12,6 +12,17 @@ import org.chromium.ui.UiUtils; +@@ -12,6 +12,18 @@ import org.chromium.ui.UiUtils; import org.chromium.ui.modaldialog.ModalDialogProperties; import org.chromium.ui.modelutil.PropertyModel; @@ -878,6 +878,7 @@ diff --git a/components/permissions/android/java/src/org/chromium/components/per +import android.widget.LinearLayout; +import android.widget.RadioButton; +import android.widget.RadioGroup; ++import android.widget.TextView; +import org.chromium.base.ApiCompatibilityUtils; +import org.chromium.ui.base.ViewUtils; +import org.chromium.components.content_settings.ContentSettingsType; @@ -886,7 +887,7 @@ diff --git a/components/permissions/android/java/src/org/chromium/components/per /** * This class creates the model for the permission dialog. */ -@@ -27,7 +38,7 @@ class PermissionDialogModelFactory { +@@ -27,7 +39,7 @@ class PermissionDialogModelFactory { String messageText = delegate.getMessageText(); assert !TextUtils.isEmpty(messageText); @@ -895,7 +896,7 @@ diff --git a/components/permissions/android/java/src/org/chromium/components/per .with(ModalDialogProperties.CONTROLLER, controller) .with(ModalDialogProperties.FOCUS_DIALOG, true) .with(ModalDialogProperties.CUSTOM_VIEW, customView) -@@ -39,5 +50,73 @@ class PermissionDialogModelFactory { +@@ -39,5 +51,73 @@ class PermissionDialogModelFactory { .with(ModalDialogProperties.BUTTON_TAP_PROTECTION_PERIOD_MS, UiUtils.PROMPT_INPUT_PROTECTION_SHORT_DELAY_MS) .build(); @@ -958,7 +959,7 @@ diff --git a/components/permissions/android/java/src/org/chromium/components/per + } + + return pm; - } ++ } + + private static boolean contains(final int[] array, final int key) { + int length = array.length; @@ -967,7 +968,7 @@ diff --git a/components/permissions/android/java/src/org/chromium/components/per + return true; + } + return false; -+ } + } } diff --git a/components/permissions/android/permission_prompt/permission_dialog_delegate.cc b/components/permissions/android/permission_prompt/permission_dialog_delegate.cc --- a/components/permissions/android/permission_prompt/permission_dialog_delegate.cc diff --git a/build/patches/Add-option-to-force-tablet-UI.patch b/build/patches/Add-option-to-force-tablet-UI.patch index ac98f5464..3c2c792cb 100644 --- a/build/patches/Add-option-to-force-tablet-UI.patch +++ b/build/patches/Add-option-to-force-tablet-UI.patch @@ -29,13 +29,13 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s + private static class ForceTabletUIDelegate implements BooleanPreferenceDelegate { + @Override + public boolean isEnabled() { -+ return SharedPreferencesManager.getInstance().readBoolean( ++ return ChromeSharedPreferences.getInstance().readBoolean( + ChromePreferenceKeys.FLAGS_FORCE_TABLET_UI_ENABLED, false); + } + + @Override + public void setEnabled(boolean value) { -+ SharedPreferencesManager.getInstance().writeBoolean( ++ ChromeSharedPreferences.getInstance().writeBoolean( + ChromePreferenceKeys.FLAGS_FORCE_TABLET_UI_ENABLED, value); + } + } @@ -65,7 +65,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordi int stubId = R.id.find_toolbar_stub; - if (DeviceFormFactor.isNonMultiDisplayContextOnTablet(mActivity)) { + if (DeviceFormFactor.isNonMultiDisplayContextOnTablet(mActivity) && -+ !SharedPreferencesManager.getInstance().readBoolean( ++ !ChromeSharedPreferences.getInstance().readBoolean( + ChromePreferenceKeys.FLAGS_FORCE_TABLET_UI_ENABLED, false)) { stubId = R.id.find_toolbar_tablet_stub; } @@ -247,7 +247,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/DeviceFormFactor.java b/ui import org.chromium.base.ContextUtils; import org.chromium.base.ThreadUtils; +import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; -+import org.chromium.chrome.browser.preferences.SharedPreferencesManager; ++import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; import org.chromium.ui.R; import org.chromium.ui.display.DisplayAndroid; import org.chromium.ui.display.DisplayUtil; @@ -255,7 +255,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/DeviceFormFactor.java b/ui * E.g. http://developer.samsung.com/samsung-dex/testing */ public static boolean isNonMultiDisplayContextOnTablet(Context context) { -+ if (SharedPreferencesManager.getInstance().readBoolean( ++ if (ChromeSharedPreferences.getInstance().readBoolean( + ChromePreferenceKeys.FLAGS_FORCE_TABLET_UI_ENABLED, false)) + return true; return detectScreenWidthBucket(context) >= SCREEN_BUCKET_TABLET; diff --git a/build/patches/Add-option-to-not-persist-tabs-across-sessions.patch b/build/patches/Add-option-to-not-persist-tabs-across-sessions.patch index dbab98098..94698a842 100644 --- a/build/patches/Add-option-to-not-persist-tabs-across-sessions.patch +++ b/build/patches/Add-option-to-not-persist-tabs-across-sessions.patch @@ -22,7 +22,7 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi + android:title="@string/close_tabs_on_exit_title" + android:summary="@string/close_tabs_on_exit_summary" + android:defaultValue="false" /> - diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java @@ -68,16 +68,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting import org.chromium.chrome.R; import org.chromium.chrome.browser.enterprise.util.ManagedBrowserUtils; import org.chromium.chrome.browser.flags.ChromeFeatureList; -@@ -88,6 +91,8 @@ public class PrivacySettings +@@ -89,6 +92,8 @@ public class PrivacySettings private final SharedPreferencesManager mSharedPreferencesManager = - SharedPreferencesManager.getInstance(); + ChromeSharedPreferences.getInstance(); + private static final String PREF_CLOSE_TABS_ON_EXIT = "close_tabs_on_exit"; + private ManagedPreferenceDelegate mManagedPreferenceDelegate; private IncognitoLockSettings mIncognitoLockSettings; -@@ -242,7 +247,11 @@ public class PrivacySettings +@@ -243,7 +248,11 @@ public class PrivacySettings @Override public boolean onPreferenceChange(Preference preference, Object newValue) { String key = preference.getKey(); @@ -90,7 +90,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting UserPrefs.get(getProfile()) .setBoolean(Pref.CAN_MAKE_PAYMENT_ENABLED, (boolean) newValue); } else if (PREF_HTTPS_FIRST_MODE.equals(key)) { -@@ -289,6 +298,11 @@ public class PrivacySettings +@@ -290,6 +299,11 @@ public class PrivacySettings PreloadPagesSettingsFragment.getPreloadPagesSummaryString(getContext())); } diff --git a/build/patches/Allow-building-without-supervised-users.patch b/build/patches/Allow-building-without-supervised-users.patch index af39a47e9..906eca8b1 100644 --- a/build/patches/Allow-building-without-supervised-users.patch +++ b/build/patches/Allow-building-without-supervised-users.patch @@ -6,6 +6,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- chrome/android/BUILD.gn | 1 - chrome/android/chrome_java_sources.gni | 1 - + .../chrome/browser/feed/FeedSurfaceCoordinator.java | 5 +---- chrome/browser/BUILD.gn | 6 ------ .../browser/extensions/api/settings_private/prefs_util.cc | 2 ++ chrome/browser/profiles/profile_impl.cc | 4 ++++ @@ -16,7 +17,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html components/supervised_user/core/common/pref_names.h | 4 ++++ .../core/common/supervised_user_constants.cc | 2 ++ .../supervised_user/core/common/supervised_user_utils.cc | 8 ++++++++ - 12 files changed, 29 insertions(+), 13 deletions(-) + 13 files changed, 30 insertions(+), 17 deletions(-) diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn @@ -40,6 +41,28 @@ diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java "java/src/org/chromium/chrome/browser/survey/ChromeSurveyController.java", "java/src/org/chromium/chrome/browser/sync/SyncErrorNotifier.java", "java/src/org/chromium/chrome/browser/sync/TrustedVaultClient.java", +diff --git a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceCoordinator.java b/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceCoordinator.java +--- a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceCoordinator.java ++++ b/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceCoordinator.java +@@ -69,7 +69,6 @@ import org.chromium.components.browser_ui.widget.displaystyle.UiConfig; + import org.chromium.components.feature_engagement.EventConstants; + import org.chromium.components.feature_engagement.Tracker; + import org.chromium.components.prefs.PrefService; +-import org.chromium.components.supervised_user.SupervisedUserPreferences; + import org.chromium.components.user_prefs.UserPrefs; + import org.chromium.third_party.android.swiperefresh.SwipeRefreshLayout; + import org.chromium.ui.base.DeviceFormFactor; +@@ -788,9 +787,7 @@ public class FeedSurfaceCoordinator + * Returns true if the supervised user feed should be displayed. + */ + public boolean shouldDisplaySupervisedFeed() { +- PrefService prefService = UserPrefs.get(mProfile); +- return SupervisedUserPreferences.isSubjectToParentalControls(prefService) +- && ChromeFeatureList.isEnabled(ChromeFeatureList.KID_FRIENDLY_CONTENT_FEED); ++ return false; + } + + /** diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn diff --git a/build/patches/Bromite-auto-updater.patch b/build/patches/Bromite-auto-updater.patch index f8a3c42d3..ba6eb09a6 100644 --- a/build/patches/Bromite-auto-updater.patch +++ b/build/patches/Bromite-auto-updater.patch @@ -1260,7 +1260,7 @@ new file mode 100644 + +package org.chromium.chrome.browser.endpoint_fetcher; + -+import org.chromium.base.annotations.CalledByNative; ++import org.jni_zero.CalledByNative; + +public class EndpointHeaderResponse { + private final String mResponseString; diff --git a/build/patches/Bromite-subresource-adblocker.patch b/build/patches/Bromite-subresource-adblocker.patch index 15e2430c3..70b8688db 100644 --- a/build/patches/Bromite-subresource-adblocker.patch +++ b/build/patches/Bromite-subresource-adblocker.patch @@ -631,8 +631,8 @@ new file mode 100755 @@ -0,0 +1,20 @@ +package org.chromium.chrome.browser.flags; + -+import org.chromium.base.annotations.CalledByNative; -+import org.chromium.base.annotations.NativeMethods; ++import org.jni_zero.CalledByNative; ++import org.jni_zero.NativeMethods; + +public class AdBlockNativeGateway { + public static void setAdBlockFiltersURL(String url) { diff --git a/build/patches/Dictionary-suggestions-for-the-Omnibox.patch b/build/patches/Dictionary-suggestions-for-the-Omnibox.patch index e5d28c897..b570c19f1 100644 --- a/build/patches/Dictionary-suggestions-for-the-Omnibox.patch +++ b/build/patches/Dictionary-suggestions-for-the-Omnibox.patch @@ -10,9 +10,9 @@ Original License: BSD-3-Clause - https://spdx.org/licenses/BSD-3-Clause.html License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- chrome/android/java/res/layout/url_bar.xml | 1 + - .../browser/omnibox/LocationBarMediator.java | 12 ++++++++-- + .../browser/omnibox/LocationBarMediator.java | 13 +++++++++-- .../chrome/browser/omnibox/UrlBar.java | 23 +++++++++++++++++++ - 3 files changed, 34 insertions(+), 2 deletions(-) + 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/chrome/android/java/res/layout/url_bar.xml b/chrome/android/java/res/layout/url_bar.xml --- a/chrome/android/java/res/layout/url_bar.xml @@ -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,16 @@ class LocationBarMediator +@@ -290,8 +290,17 @@ class LocationBarMediator if (mNativeInitialized) RecordUserAction.record("FocusLocation"); // Don't clear Omnibox if the user just pasted text to NTP Omnibox. if (mShouldClearOmniboxOnFocus) { @@ -35,9 +35,10 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow - UrlBarData.EMPTY, UrlBar.ScrollType.NO_SCROLL, SelectionState.SELECT_END); + UrlBarData data = mLocationBarDataProvider.getUrlBarData(); + @SelectionState int selectionState = SelectionState.SELECT_ALL; -+ if (mTemplateUrlServiceSupplier.hasValue()) { -+ String searchParams = mTemplateUrlServiceSupplier.get().getSearchQueryForUrl( -+ mLocationBarDataProvider.getUrlBarData().url); ++ GURL url = mLocationBarDataProvider.getUrlBarData().url; ++ if (url != null && mTemplateUrlServiceSupplier.hasValue()) { ++ String searchParams = ++ mTemplateUrlServiceSupplier.get().getSearchQueryForUrl(url); + if (searchParams != null && !searchParams.isEmpty()) { + data = UrlBarData.forUrlAndText(data.url, data.displayText, searchParams); + } diff --git a/build/patches/Disable-Accessibility-service-by-default.patch b/build/patches/Disable-Accessibility-service-by-default.patch index bce0112f5..565d42b01 100644 --- a/build/patches/Disable-Accessibility-service-by-default.patch +++ b/build/patches/Disable-Accessibility-service-by-default.patch @@ -50,7 +50,7 @@ diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/c import org.chromium.content_public.browser.ContentFeatureMap; +import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; -+import org.chromium.chrome.browser.preferences.SharedPreferencesManager; ++import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; + /** * Fragment to keep track of all the accessibility related preferences. diff --git a/build/patches/Disable-all-predictors-code.patch b/build/patches/Disable-all-predictors-code.patch index bec29de04..daa319c12 100644 --- a/build/patches/Disable-all-predictors-code.patch +++ b/build/patches/Disable-all-predictors-code.patch @@ -5,7 +5,7 @@ Subject: Disable all predictors code 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 --- - chrome/browser/BUILD.gn | 4 --- + chrome/browser/BUILD.gn | 2 -- .../preloading_model_keyed_service.cc | 1 + .../preloading_model_keyed_service_factory.cc | 4 +-- .../chrome_hints_manager.cc | 1 + @@ -13,7 +13,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../browser/predictors/loading_predictor.cc | 4 +-- .../predictors/loading_predictor_config.cc | 4 +-- .../browser/predictors/predictors_features.cc | 11 ++----- + chrome/browser/ui/tab_helpers.cc | 1 - + .../ui/webui/omnibox/omnibox_page_handler.cc | 14 +++++++++ .../browser/autofill_optimization_guide.cc | 5 ++-- + .../browser/autocomplete_controller.cc | 2 ++ .../optimization_guide/core/hints_fetcher.cc | 1 + .../optimization_guide/core/hints_manager.cc | 5 ++++ .../core/optimization_guide_features.cc | 29 ++++++++++--------- @@ -26,7 +29,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../Disable-all-predictors-code.inc | 4 +++ .../Disable-all-predictors-code.inc | 2 ++ .../platform/runtime_enabled_features.json5 | 2 +- - 21 files changed, 60 insertions(+), 42 deletions(-) + 24 files changed, 76 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 @@ -35,12 +38,10 @@ 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 -@@ -877,10 +877,6 @@ static_library("browser") { - "navigation_predictor/navigation_predictor_keyed_service.h", - "navigation_predictor/navigation_predictor_keyed_service_factory.cc", +@@ -879,8 +879,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", + "navigation_predictor/navigation_predictor_metrics_document_data.cc", + "navigation_predictor/navigation_predictor_metrics_document_data.h", - "navigation_predictor/navigation_predictor_preconnect_client.cc", - "navigation_predictor/navigation_predictor_preconnect_client.h", "navigation_predictor/preloading_model_keyed_service.cc", @@ -160,6 +161,76 @@ diff --git a/chrome/browser/predictors/predictors_features.cc b/chrome/browser/p +SET_CROMITE_FEATURE_DISABLED(kLoadingPredictorUseLocalPredictions); } // namespace features +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); + MixedContentSettingsTabHelper::CreateForWebContents(web_contents); + NavigationMetricsRecorder::CreateForWebContents(web_contents); +- NavigationPredictorPreconnectClient::CreateForWebContents(web_contents); + OpenerHeuristicTabHelper::CreateForWebContents(web_contents); + if (optimization_guide::features::IsOptimizationHintsEnabled()) { + OptimizationGuideWebContentsObserver::CreateForWebContents(web_contents); +diff --git a/chrome/browser/ui/webui/omnibox/omnibox_page_handler.cc b/chrome/browser/ui/webui/omnibox/omnibox_page_handler.cc +--- a/chrome/browser/ui/webui/omnibox/omnibox_page_handler.cc ++++ b/chrome/browser/ui/webui/omnibox/omnibox_page_handler.cc +@@ -39,7 +39,9 @@ + #include "components/omnibox/browser/autocomplete_match.h" + #include "components/omnibox/browser/autocomplete_provider.h" + #include "components/omnibox/browser/autocomplete_result.h" ++#if BUILDFLAG(BUILD_WITH_TFLITE_LIB) + #include "components/omnibox/browser/autocomplete_scoring_model_service.h" ++#endif + #include "components/omnibox/browser/omnibox_field_trial.h" + #include "components/search_engines/template_url.h" + #include "content/public/browser/web_ui.h" +@@ -500,6 +502,7 @@ void OmniboxPageHandler::StartOmniboxQuery(const std::string& input_string, + } + + void OmniboxPageHandler::GetMlModelVersion(GetMlModelVersionCallback callback) { ++#if BUILDFLAG(BUILD_WITH_TFLITE_LIB) + if (auto* service = GetMlService()) { + auto version = service->GetModelVersion(); + if (version == -1) { +@@ -512,10 +515,14 @@ void OmniboxPageHandler::GetMlModelVersion(GetMlModelVersionCallback callback) { + } else { + std::move(callback).Run(-1); + } ++#else ++ std::move(callback).Run(-1); ++#endif + } + + void OmniboxPageHandler::StartMl(mojom::SignalsPtr mojom_signals, + StartMlCallback callback) { ++#if BUILDFLAG(BUILD_WITH_TFLITE_LIB) + if (auto* service = GetMlService()) { + AutocompleteMatch::ScoringSignals signals = + mojo::ConvertTo(mojom_signals); +@@ -525,6 +532,9 @@ void OmniboxPageHandler::StartMl(mojom::SignalsPtr mojom_signals, + } else { + std::move(callback).Run(-1); + } ++#else ++ std::move(callback).Run(-1); ++#endif + } + + std::unique_ptr OmniboxPageHandler::CreateController( +@@ -549,8 +559,12 @@ OmniboxPageHandler::GetAutocompleteControllerType( + } + + AutocompleteScoringModelService* OmniboxPageHandler::GetMlService() { ++#if BUILDFLAG(BUILD_WITH_TFLITE_LIB) + return OmniboxFieldTrial::IsMlSyncBatchUrlScoringEnabled() + ? AutocompleteScoringModelServiceFactory::GetInstance() + ->GetForProfile(profile_) + : nullptr; ++#else ++ return nullptr; ++#endif + } diff --git a/components/autofill/core/browser/autofill_optimization_guide.cc b/components/autofill/core/browser/autofill_optimization_guide.cc --- a/components/autofill/core/browser/autofill_optimization_guide.cc +++ b/components/autofill/core/browser/autofill_optimization_guide.cc @@ -189,6 +260,19 @@ diff --git a/components/autofill/core/browser/autofill_optimization_guide.cc b/c optimization_guide::OptimizationGuideDecision decision = decider_->CanApplyOptimization(url, optimization_type, /*optimization_metadata=*/nullptr); +diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/omnibox/browser/autocomplete_controller.cc +--- a/components/omnibox/browser/autocomplete_controller.cc ++++ b/components/omnibox/browser/autocomplete_controller.cc +@@ -46,7 +46,9 @@ + #include "components/omnibox/browser/autocomplete_input.h" + #include "components/omnibox/browser/autocomplete_match_type.h" + #include "components/omnibox/browser/autocomplete_provider.h" ++#if BUILDFLAG(BUILD_WITH_TFLITE_LIB) + #include "components/omnibox/browser/autocomplete_scoring_model_service.h" ++#endif + #include "components/omnibox/browser/autocomplete_scoring_signals_annotator.h" + #include "components/omnibox/browser/bookmark_provider.h" + #include "components/omnibox/browser/bookmark_scoring_signals_annotator.h" diff --git a/components/optimization_guide/core/hints_fetcher.cc b/components/optimization_guide/core/hints_fetcher.cc --- a/components/optimization_guide/core/hints_fetcher.cc +++ b/components/optimization_guide/core/hints_fetcher.cc diff --git a/build/patches/Disable-conversion-measurement-api.patch b/build/patches/Disable-conversion-measurement-api.patch index a48b95764..fee43f91b 100644 --- a/build/patches/Disable-conversion-measurement-api.patch +++ b/build/patches/Disable-conversion-measurement-api.patch @@ -162,7 +162,7 @@ diff --git a/content/browser/attribution_reporting/attribution_os_level_manager. // static bool AttributionOsLevelManager::ShouldUseOsWebSource( GlobalRenderFrameHostId render_frame_id) { -+ if ((true)) return network::mojom::AttributionSupport::kNone; ++ if ((true)) return false; return GetContentClient() ->browser() ->ShouldUseOsWebSourceAttributionReporting( diff --git a/build/patches/Experimental-user-scripts-support.patch b/build/patches/Experimental-user-scripts-support.patch index 7ae3f22a8..9aef51f26 100644 --- a/build/patches/Experimental-user-scripts-support.patch +++ b/build/patches/Experimental-user-scripts-support.patch @@ -121,7 +121,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../user_scripts/renderer/scripts_run_info.h | 69 ++ .../renderer/user_script_injector.cc | 227 +++++ .../renderer/user_script_injector.h | 86 ++ - .../user_scripts/renderer/user_script_set.cc | 266 ++++++ + .../user_scripts/renderer/user_script_set.cc | 264 ++++++ .../user_scripts/renderer/user_script_set.h | 101 +++ .../renderer/user_script_set_manager.cc | 77 ++ .../renderer/user_script_set_manager.h | 61 ++ @@ -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, 9490 insertions(+), 2 deletions(-) + 107 files changed, 9488 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 @@ -1867,9 +1867,9 @@ new file mode 100644 +import android.app.AlertDialog; +import android.content.DialogInterface; + -+import org.chromium.base.annotations.CalledByNative; -+import org.chromium.base.annotations.JNINamespace; -+import org.chromium.base.annotations.NativeMethods; ++import org.jni_zero.CalledByNative; ++import org.jni_zero.JNINamespace; ++import org.jni_zero.NativeMethods; +import org.chromium.base.ContentUriUtils; +import org.chromium.base.Log; +import org.chromium.ui.base.WindowAndroid; @@ -9539,7 +9539,7 @@ diff --git a/components/user_scripts/renderer/user_script_set.cc b/components/us new file mode 100755 --- /dev/null +++ b/components/user_scripts/renderer/user_script_set.cc -@@ -0,0 +1,266 @@ +@@ -0,0 +1,264 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -9784,8 +9784,7 @@ new file mode 100755 + base::StrCat({kUserScriptHead, script_content, kUserScriptTail}); + source = blink::WebString::FromUTF8(content); + } else { -+ source = blink::WebString::FromUTF8(script_content.data(), -+ script_content.length()); ++ source = blink::WebString::FromUTF8(script_content); + } + script_sources_[url] = source; + return source; @@ -9800,8 +9799,7 @@ new file mode 100755 + base::StringPiece script_content = file.GetContent(); + return script_sources_ + .insert(std::make_pair( -+ url, blink::WebString::FromUTF8(script_content.data(), -+ script_content.length()))) ++ url, blink::WebString::FromUTF8(script_content))) + .first->second; +} + @@ -10475,10 +10473,10 @@ diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ "includes": [7220] }, + "components/user_scripts/renderer/resources/user_scripts_renderer_resources.grd": { -+ "includes": [7000], ++ "includes": [7240], + }, + "components/user_scripts/browser/resources/browser_resources.grd": { -+ "includes": [7020], ++ "includes": [7260], + }, # END components/ section. diff --git a/build/patches/History-number-of-days-privacy-setting.patch b/build/patches/History-number-of-days-privacy-setting.patch index 9afd93eba..71271d840 100644 --- a/build/patches/History-number-of-days-privacy-setting.patch +++ b/build/patches/History-number-of-days-privacy-setting.patch @@ -56,7 +56,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting import org.chromium.components.browser_ui.settings.SettingsLauncher; import org.chromium.components.browser_ui.settings.SettingsUtils; import org.chromium.components.browser_ui.site_settings.ContentSettingsResources; -@@ -63,6 +64,9 @@ import org.chromium.chrome.browser.preferences.SharedPreferencesManager; +@@ -64,6 +65,9 @@ import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; import org.chromium.components.browser_ui.settings.ChromeSwitchPreference; import org.chromium.components.browser_ui.settings.ManagedPreferenceDelegate; @@ -66,7 +66,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting /** * Fragment to keep track of the all the privacy related preferences. */ -@@ -100,6 +104,8 @@ public class PrivacySettings +@@ -101,6 +105,8 @@ public class PrivacySettings private ChromeSwitchPreference allowCustomTabIntentsPref; private ChromeSwitchPreference openExternalLinksPref; @@ -75,7 +75,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); -@@ -206,6 +212,40 @@ public class PrivacySettings +@@ -207,6 +213,40 @@ public class PrivacySettings Preference syncAndServicesLink = findPreference(PREF_SYNC_AND_SERVICES_LINK); syncAndServicesLink.setSummary(buildSyncAndServicesLink()); @@ -116,7 +116,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); -@@ -402,6 +442,29 @@ public class PrivacySettings +@@ -403,6 +443,29 @@ public class PrivacySettings || ChromeFeatureList.isEnabled(ChromeFeatureList.TRACKING_PROTECTION_3PCD); } diff --git a/build/patches/Move-navigation-bar-to-bottom.patch b/build/patches/Move-navigation-bar-to-bottom.patch index e65519440..b71f0fc8f 100644 --- a/build/patches/Move-navigation-bar-to-bottom.patch +++ b/build/patches/Move-navigation-bar-to-bottom.patch @@ -25,7 +25,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../tab_management/TabGroupUiViewBinder.java | 3 + .../tab_management/TabListCoordinator.java | 80 +++++++++++++++++++ .../tab_management/TabListRecyclerView.java | 19 ++++- - .../tab_management/TabSwitcherMediator.java | 15 ++++ + .../tab_management/TabSwitcherMediator.java | 21 ++++- .../ChromeAccessibilitySettingsDelegate.java | 50 ++++++++++++ .../chrome/browser/app/ChromeActivity.java | 13 +++ .../compositor/CompositorViewHolder.java | 8 ++ @@ -47,7 +47,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../browser/settings/SettingsActivity.java | 5 ++ .../StatusIndicatorCoordinator.java | 9 +++ .../StatusIndicatorSceneLayer.java | 6 +- - .../browser/toolbar/ToolbarManager.java | 36 +++++++-- + .../browser/toolbar/ToolbarManager.java | 44 ++++++++-- .../chrome/browser/ui/BottomContainer.java | 18 +++++ .../ui/system/StatusBarColorController.java | 9 +++ .../scene_layer/tab_strip_scene_layer.cc | 16 +++- @@ -57,15 +57,14 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../chrome/browser/flags/CachedFlag.java | 6 ++ .../browser/flags/ChromeFeatureList.java | 5 ++ chrome/browser/prefs/browser_prefs.cc | 2 +- - .../chrome/browser/ui/appmenu/AppMenu.java | 29 ++++++- + .../chrome/browser/ui/appmenu/AppMenu.java | 40 ++++++++-- .../ui/appmenu/AppMenuHandlerImpl.java | 10 +++ .../omnibox/LocationBarCoordinator.java | 6 +- ...mniboxSuggestionsDropdownEmbedderImpl.java | 23 +++++- - .../browser/omnibox/UrlBarCoordinator.java | 3 + .../suggestions/AutocompleteCoordinator.java | 15 +++- .../suggestions/AutocompleteMediator.java | 6 +- - .../DropdownItemViewInfoListManager.java | 14 +++- - .../OmniboxSuggestionsDropdown.java | 38 ++++++++- + .../DropdownItemViewInfoListManager.java | 18 +++-- + .../OmniboxSuggestionsDropdown.java | 39 ++++++++- .../OmniboxSuggestionsDropdownEmbedder.java | 8 ++ .../strings/android_chrome_strings.grd | 6 ++ chrome/browser/ui/android/toolbar/BUILD.gn | 1 + @@ -85,7 +84,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../AccessibilitySettingsDelegate.java | 6 ++ .../render_widget_host_view_android.cc | 3 + .../Move-navigation-bar-to-bottom.inc | 12 +++ - 72 files changed, 834 insertions(+), 66 deletions(-) + 71 files changed, 854 insertions(+), 73 deletions(-) create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Move-navigation-bar-to-bottom.inc diff --git a/cc/base/features.cc b/cc/base/features.cc @@ -607,7 +606,20 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser if (backPressManager != null && BackPressManager.isEnabled()) { assert !mIsStartSurfaceEnabled || mIsStartSurfaceRefactorEnabled; backPressManager.addHandler(this, BackPressHandler.Type.TAB_SWITCHER); -@@ -639,6 +650,10 @@ class TabSwitcherMediator implements TabSwitcher.Controller, TabListRecyclerView +@@ -629,8 +640,10 @@ class TabSwitcherMediator implements TabSwitcher.Controller, TabListRecyclerView + + // The grid tab switcher for tablets translates up over top of the browser controls. + if (mIsTablet) { +- final int toolbarHeight = getToolbarHeight(); +- ++ int toolbarHeight = getToolbarHeight(); ++ if (ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled()) { ++ toolbarHeight = 0; ++ } + mContainerViewModel.set(TOP_MARGIN, toolbarHeight); + mContainerViewModel.set(SHADOW_TOP_OFFSET, toolbarHeight); + return; +@@ -639,6 +652,10 @@ class TabSwitcherMediator implements TabSwitcher.Controller, TabListRecyclerView final int contentOffset = mBrowserControlsStateProvider.getContentOffset(); mContainerViewModel.set(TOP_MARGIN, contentOffset); @@ -623,7 +635,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s +++ b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java @@ -28,6 +28,12 @@ import org.chromium.chrome.browser.flags.CromiteNativeUtils; import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; - import org.chromium.chrome.browser.preferences.SharedPreferencesManager; + import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; +import android.app.Activity; +import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; @@ -1420,16 +1432,17 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/status_indicato diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java -@@ -187,6 +187,8 @@ import org.chromium.url.GURL; +@@ -187,6 +187,9 @@ import org.chromium.url.GURL; import java.util.List; +import org.chromium.chrome.browser.flags.ChromeFeatureList; ++import android.view.Gravity; + /** * Contains logic for managing the toolbar visual component. This class manages the interactions * with the rest of the application to ensure the toolbar is always visually up to date. -@@ -715,7 +717,7 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve +@@ -715,7 +718,7 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve LocationBarCoordinator locationBarCoordinator = new LocationBarCoordinator( mActivity.findViewById(R.id.location_bar), @@ -1438,7 +1451,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar profileSupplier, PrivacyPreferencesManagerImpl.getInstance(), mLocationBarModel, -@@ -996,11 +998,13 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve +@@ -996,11 +999,13 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve // the height won't be measured by the background image. if (mControlContainer.getBackground() == null) { setControlContainerTopMargin(getToolbarExtraYOffset()); @@ -1452,7 +1465,21 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar mControlContainer.removeOnLayoutChangeListener(mLayoutChangeListener); mLayoutChangeListener = null; } -@@ -1465,13 +1469,25 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve +@@ -1160,6 +1165,13 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve + public void setTabSwitcherFullScreenView(ViewGroup containerView) { + ViewStub toolbarStub = + containerView.findViewById(R.id.fullscreen_tab_switcher_toolbar_stub); ++ if (ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled()) { ++ // the top tab switcher toolbar is docked at the bottom ++ FrameLayout.LayoutParams params = ++ (FrameLayout.LayoutParams)toolbarStub.getLayoutParams(); ++ params.gravity = Gravity.START | Gravity.BOTTOM; ++ toolbarStub.setLayoutParams(params); ++ } + mToolbar.setFullScreenToolbarStub(toolbarStub); + } + +@@ -1465,13 +1477,25 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve return ((LocationBarCoordinator) mLocationBar).getUrlBarTextWithoutAutocomplete(); } @@ -1480,7 +1507,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar mIncognitoStateProvider, mScrimCoordinator, mOmniboxFocusStateSupplier, mBottomSheetController, mActivityLifecycleDispatcher, mIsWarmOnResumeSupplier, mTabModelSelector, mTabContentManager, mCompositorViewHolder, -@@ -1479,8 +1495,9 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve +@@ -1479,8 +1503,9 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve mLayoutStateProviderSupplier, mSnackbarManager); var bottomControlsCoordinator = new BottomControlsCoordinator(mActivity, mWindowAndroid, mLayoutManager, mCompositorViewHolder.getResourceManager(), mBrowserControlsSizer, @@ -1492,7 +1519,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar mBottomControlsCoordinatorSupplier.set(bottomControlsCoordinator); if (mBackPressManager != null) { mBackPressManager.addHandler( -@@ -2332,6 +2349,15 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve +@@ -2332,6 +2357,15 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve private void setControlContainerTopMargin(int margin) { final ViewGroup.MarginLayoutParams layoutParams = ((ViewGroup.MarginLayoutParams) mControlContainer.getLayoutParams()); @@ -1768,19 +1795,39 @@ diff --git a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/ch int footerHeight = inflateFooter(footerResourceId, contentView, menuWidth); int headerHeight = inflateHeader(headerResourceId, contentView, menuWidth); -@@ -309,6 +317,11 @@ class AppMenu implements OnItemClickListener, OnKeyListener, AppMenuClickHandler +@@ -287,7 +295,7 @@ class AppMenu implements OnItemClickListener, OnKeyListener, AppMenuClickHandler + anchorView.getLocationOnScreen(mTempLocation); + int anchorViewOffset = Math.min(Math.abs(mTempLocation[1] - visibleDisplayFrame.top), + Math.abs(mTempLocation[1] - visibleDisplayFrame.bottom)); +- setMenuHeight( ++ int popupHeight = setMenuHeight( + menuItemIds, + heightList, + visibleDisplayFrame, +@@ -307,8 +315,14 @@ class AppMenu implements OnItemClickListener, OnKeyListener, AppMenuClickHandler + sizingPadding, + anchorView, popupWidth, - anchorView.getRootView().getLayoutDirection()); +- anchorView.getRootView().getLayoutDirection()); ++ anchorView.getRootView().getLayoutDirection(), ++ popupHeight); mPopup.setContentView(contentView); + if (ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled()) { + // due to some unknown behaviour, the popup must be resized to + // allow selection without leaving touch -+ mPopup.setHeight(popupHeight-1); ++ mPopup.setHeight(popupHeight - 1); + } try { mPopup.showAtLocation(anchorView.getRootView(), Gravity.NO_GRAVITY, popupPosition[0], -@@ -362,6 +375,14 @@ class AppMenu implements OnItemClickListener, OnKeyListener, AppMenuClickHandler +@@ -357,11 +371,20 @@ class AppMenu implements OnItemClickListener, OnKeyListener, AppMenuClickHandler + Rect padding, + View anchorView, + int popupWidth, +- int viewLayoutDirection) { ++ int viewLayoutDirection, ++ int popupHeight) { + anchorView.getLocationInWindow(tempLocation); int anchorViewX = tempLocation[0]; int anchorViewY = tempLocation[1]; @@ -1795,7 +1842,16 @@ diff --git a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/ch int[] offsets = new int[2]; // If we have a hardware menu button, locate the app menu closer to the estimated // hardware menu button location. -@@ -552,7 +573,13 @@ class AppMenu implements OnItemClickListener, OnKeyListener, AppMenuClickHandler +@@ -538,7 +561,7 @@ class AppMenu implements OnItemClickListener, OnKeyListener, AppMenuClickHandler + if (mAdapter != null) mAdapter.notifyDataSetChanged(); + } + +- private void setMenuHeight( ++ private int setMenuHeight( + List menuItemIds, + List heightList, + Rect appDimensions, +@@ -552,7 +575,13 @@ class AppMenu implements OnItemClickListener, OnKeyListener, AppMenuClickHandler int availableScreenSpace = appDimensions.height() - anchorViewOffset - padding.bottom - footerHeight - headerHeight - anchorViewImpactHeight; @@ -1810,6 +1866,14 @@ diff --git a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/ch if (mIsByPermanentButton) availableScreenSpace -= padding.top; if (availableScreenSpace <= 0 && sExceptionReporter != null) { String logMessage = String.format( +@@ -570,6 +599,7 @@ class AppMenu implements OnItemClickListener, OnKeyListener, AppMenuClickHandler + menuItemIds, heightList, groupDividerResourceId, availableScreenSpace); + menuHeight += footerHeight + headerHeight + padding.top + padding.bottom; + mPopup.setHeight(menuHeight); ++ return menuHeight; + } + + @VisibleForTesting diff --git a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenuHandlerImpl.java b/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenuHandlerImpl.java --- a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenuHandlerImpl.java +++ b/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenuHandlerImpl.java @@ -1938,19 +2002,6 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow onConfigurationChanged(mContext.getResources().getConfiguration()); recalculateOmniboxAlignment(); } -diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/UrlBarCoordinator.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/UrlBarCoordinator.java ---- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/UrlBarCoordinator.java -+++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/UrlBarCoordinator.java -@@ -26,6 +26,9 @@ import org.chromium.ui.modelutil.PropertyModelChangeProcessor; - import java.lang.annotation.Retention; - import java.lang.annotation.RetentionPolicy; - -+import org.chromium.chrome.browser.flags.ChromeFeatureList; -+import android.view.WindowManager; -+ - /** Coordinates the interactions with the UrlBar text component. */ - public class UrlBarCoordinator - implements UrlBarEditingTextStateProvider, diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteCoordinator.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteCoordinator.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteCoordinator.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteCoordinator.java @@ -2074,6 +2125,17 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow previousItem.model.set(DropdownCommonProperties.SHOW_DIVIDER, !applyRounding); } +@@ -185,7 +191,9 @@ class DropdownItemViewInfoListManager { + + // round the bottom corners of the last suggestion. + if (previousItem != null) { +- previousItem.model.set(DropdownCommonProperties.BG_BOTTOM_CORNER_ROUNDED, true); ++ previousItem.model.set(toolbarToBottom ++ ? DropdownCommonProperties.BG_TOP_CORNER_ROUNDED ++ : DropdownCommonProperties.BG_BOTTOM_CORNER_ROUNDED, true); + } + + mManagedModel.set(suggestionsList); diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsDropdown.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsDropdown.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsDropdown.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/OmniboxSuggestionsDropdown.java @@ -2105,7 +2167,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow mSelectionController = new RecyclerViewSelectionController(mLayoutScrollListener); addOnChildAttachStateChangeListener(mSelectionController); -@@ -235,6 +238,19 @@ public class OmniboxSuggestionsDropdown extends RecyclerView { +@@ -235,6 +238,20 @@ public class OmniboxSuggestionsDropdown extends RecyclerView { resources.getDimensionPixelOffset(R.dimen.omnibox_suggestion_list_padding_bottom); int paddingTop = resources.getDimensionPixelOffset(R.dimen.omnibox_suggestion_list_padding_top); @@ -2122,10 +2184,11 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow + } + paddingTop = 0; + } ++ setLayoutManager(mLayoutScrollListener); ViewCompat.setPaddingRelative(this, 0, paddingTop, 0, paddingBottom); mStandardBgColor = -@@ -388,8 +404,16 @@ public class OmniboxSuggestionsDropdown extends RecyclerView { +@@ -388,8 +405,16 @@ public class OmniboxSuggestionsDropdown extends RecyclerView { TimingMetric metric = OmniboxMetrics.recordSuggestionListMeasureTime(); TimingMetric metric2 = OmniboxMetrics.recordSuggestionListMeasureWallTime()) { OmniboxAlignment omniboxAlignment = mEmbedder.getCurrentAlignment(); @@ -2144,7 +2207,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow int desiredWidth = omniboxAlignment.width; adjustHorizontalPosition(); notifyObserversIfViewportHeightChanged(availableViewportHeight); -@@ -409,6 +433,12 @@ public class OmniboxSuggestionsDropdown extends RecyclerView { +@@ -409,6 +434,12 @@ public class OmniboxSuggestionsDropdown extends RecyclerView { } } diff --git a/build/patches/Move-some-account-settings-back-to-privacy-settings.patch b/build/patches/Move-some-account-settings-back-to-privacy-settings.patch index 734c2db7a..74caa988b 100644 --- a/build/patches/Move-some-account-settings-back-to-privacy-settings.patch +++ b/build/patches/Move-some-account-settings-back-to-privacy-settings.patch @@ -6,10 +6,10 @@ Search suggestions, autofill assistant and contextual search License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - .../java/res/xml/privacy_preferences.xml | 13 ++++++++ - .../privacy/settings/PrivacySettings.java | 33 +++++++++++++++++++ + .../java/res/xml/privacy_preferences.xml | 13 +++++++ + .../privacy/settings/PrivacySettings.java | 34 +++++++++++++++++++ .../strings/android_chrome_strings.grd | 4 +++ - 3 files changed, 50 insertions(+) + 3 files changed, 51 insertions(+) diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml --- a/chrome/android/java/res/xml/privacy_preferences.xml @@ -37,21 +37,22 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java --- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java -@@ -53,6 +53,13 @@ import org.chromium.components.user_prefs.UserPrefs; +@@ -53,6 +53,14 @@ import org.chromium.components.user_prefs.UserPrefs; import org.chromium.ui.text.NoUnderlineClickableSpan; import org.chromium.ui.text.SpanApplier; +import androidx.annotation.Nullable; +import androidx.preference.PreferenceCategory; +import org.chromium.chrome.browser.contextualsearch.ContextualSearchManager; -+import org.chromium.chrome.browser.preferences.SharedPreferencesManager; ++import org.chromium.base.shared_preferences.SharedPreferencesManager; ++import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; +import org.chromium.components.browser_ui.settings.ChromeSwitchPreference; +import org.chromium.components.browser_ui.settings.ManagedPreferenceDelegate; + /** * Fragment to keep track of the all the privacy related preferences. */ -@@ -72,6 +79,16 @@ public class PrivacySettings +@@ -72,6 +80,16 @@ public class PrivacySettings private static final String PREF_THIRD_PARTY_COOKIES = "third_party_cookies"; private static final String PREF_TRACKING_PROTECTION = "tracking_protection"; @@ -62,13 +63,13 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting + private ChromeSwitchPreference mSearchSuggestions; + private @Nullable Preference mContextualSearch; + private final SharedPreferencesManager mSharedPreferencesManager = -+ SharedPreferencesManager.getInstance(); ++ ChromeSharedPreferences.getInstance(); + + private ManagedPreferenceDelegate mManagedPreferenceDelegate; private IncognitoLockSettings mIncognitoLockSettings; @Override -@@ -132,6 +149,16 @@ public class PrivacySettings +@@ -132,6 +150,16 @@ public class PrivacySettings setHasOptionsMenu(true); @@ -85,7 +86,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting ChromeSwitchPreference canMakePaymentPref = (ChromeSwitchPreference) findPreference(PREF_CAN_MAKE_PAYMENT); canMakePaymentPref.setOnPreferenceChangeListener(this); -@@ -221,6 +248,9 @@ public class PrivacySettings +@@ -221,6 +249,9 @@ public class PrivacySettings } else if (PREF_HTTPS_FIRST_MODE.equals(key)) { UserPrefs.get(getProfile()) .setBoolean(Pref.HTTPS_ONLY_MODE_ENABLED, (boolean) newValue); @@ -95,7 +96,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting } return true; } -@@ -235,6 +265,9 @@ public class PrivacySettings +@@ -235,6 +266,9 @@ public class PrivacySettings * Updates the preferences. */ public void updatePreferences() { diff --git a/build/patches/Override-Navigator-Language.patch b/build/patches/Override-Navigator-Language.patch index a1bd36591..e8a83815d 100644 --- a/build/patches/Override-Navigator-Language.patch +++ b/build/patches/Override-Navigator-Language.patch @@ -37,7 +37,7 @@ diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browse + if (shouldUseSystemManagedLocale()) { + setSystemManagedAppLanguage(languageName); + } else { -+ SharedPreferencesManager.getInstance().writeString( ++ ChromeSharedPreferences.getInstance().writeString( + ChromePreferenceKeys.APPLICATION_OVERRIDE_LANGUAGE, languageName); + } + } diff --git a/build/patches/Remove-HTTP-referrals-in-cross-origin-navigation.patch b/build/patches/Remove-HTTP-referrals-in-cross-origin-navigation.patch index 0e95cca3a..88242c868 100644 --- a/build/patches/Remove-HTTP-referrals-in-cross-origin-navigation.patch +++ b/build/patches/Remove-HTTP-referrals-in-cross-origin-navigation.patch @@ -121,7 +121,7 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi + android:key="referers_policy" + android:title="@string/referers_policy_title" + android:fragment="org.chromium.chrome.browser.privacy.settings.RefererSettingsFragment"/> - diff --git a/chrome/android/java/res/xml/referer_policy_preferences.xml b/chrome/android/java/res/xml/referer_policy_preferences.xml @@ -171,7 +171,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting import org.chromium.chrome.browser.privacy.secure_dns.SecureDnsSettings; import org.chromium.chrome.browser.privacy_guide.PrivacyGuideInteractions; import org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxBridge; -@@ -80,6 +81,7 @@ public class PrivacySettings +@@ -81,6 +82,7 @@ public class PrivacySettings private static final String PREF_DO_NOT_TRACK = "do_not_track"; private static final String PREF_SAFE_BROWSING = "safe_browsing"; private static final String PREF_SYNC_AND_SERVICES_LINK = "sync_and_services_link"; @@ -179,7 +179,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting private static final String PREF_PRIVACY_SANDBOX = "privacy_sandbox"; private static final String PREF_PROXY_OPTIONS = "proxy"; private static final String PREF_PRIVACY_GUIDE = "privacy_guide"; -@@ -357,6 +359,10 @@ public class PrivacySettings +@@ -358,6 +360,10 @@ public class PrivacySettings : R.string.text_off); } diff --git a/build/patches/Remove-binary-blob-integrations.patch b/build/patches/Remove-binary-blob-integrations.patch index 1adc2c116..647cccc5f 100644 --- a/build/patches/Remove-binary-blob-integrations.patch +++ b/build/patches/Remove-binary-blob-integrations.patch @@ -89,7 +89,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html components/module_installer/android/BUILD.gn | 4 - components/signin/public/android/BUILD.gn | 3 - .../signin/AccountRenameChecker.java | 16 - - components/webauthn/android/BUILD.gn | 11 - + components/webauthn/android/BUILD.gn | 12 - .../webauthn/AuthenticatorImpl.java | 93 +-- .../webauthn/CredManMetricsHelper.java | 17 - .../webauthn/Fido2ApiCallHelper.java | 58 +- @@ -105,7 +105,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../preconditions/javatests/BUILD.gn | 1 - .../gms/ChromiumPlayServicesAvailability.java | 10 +- third_party/cardboard/BUILD.gn | 4 - - 81 files changed, 97 insertions(+), 2091 deletions(-) + 81 files changed, 97 insertions(+), 2092 deletions(-) diff --git a/android_webview/expectations/system_webview_bundle.AndroidManifest.expected b/android_webview/expectations/system_webview_bundle.AndroidManifest.expected --- a/android_webview/expectations/system_webview_bundle.AndroidManifest.expected @@ -3080,7 +3080,11 @@ diff --git a/components/webauthn/android/BUILD.gn b/components/webauthn/android/ "java/src/org/chromium/components/webauthn/InternalAuthenticator.java", "java/src/org/chromium/components/webauthn/WebAuthnBrowserBridge.java", ] -@@ -34,11 +32,7 @@ android_library("java") { +@@ -30,15 +28,10 @@ android_library("java") { + "java/src/org/chromium/components/webauthn/AuthenticatorImpl.java", + "java/src/org/chromium/components/webauthn/AuthenticatorIncognitoConfirmationBottomsheet.java", + "java/src/org/chromium/components/webauthn/Barrier.java", +- "java/src/org/chromium/components/webauthn/CredManHelper.java", "java/src/org/chromium/components/webauthn/CredManMetricsHelper.java", "java/src/org/chromium/components/webauthn/CredManSupportProvider.java", "java/src/org/chromium/components/webauthn/CredManUiModeRecommender.java", @@ -3092,7 +3096,7 @@ diff --git a/components/webauthn/android/BUILD.gn b/components/webauthn/android/ "java/src/org/chromium/components/webauthn/GetAssertionResponseCallback.java", "java/src/org/chromium/components/webauthn/GetMatchingCredentialIdsResponseCallback.java", "java/src/org/chromium/components/webauthn/InternalAuthenticator.java", -@@ -52,9 +46,6 @@ android_library("java") { +@@ -52,9 +45,6 @@ android_library("java") { deps = [ ":java_resources", @@ -3102,7 +3106,7 @@ diff --git a/components/webauthn/android/BUILD.gn b/components/webauthn/android/ "//base:base_java", "//build/android:build_java", "//components/browser_ui/bottomsheet/android:java", -@@ -115,8 +106,6 @@ android_library("test_support_java") { +@@ -115,8 +105,6 @@ android_library("test_support_java") { source_set("android") { sources = [ "cred_man_support.h", diff --git a/build/patches/Remove-voice-recognition-integration.patch b/build/patches/Remove-voice-recognition-integration.patch index 9e42ac781..a08bbe88d 100644 --- a/build/patches/Remove-voice-recognition-integration.patch +++ b/build/patches/Remove-voice-recognition-integration.patch @@ -5,23 +5,23 @@ Subject: Remove voice recognition integration License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- .../start_surface/StartSurfaceMediator.java | 15 +--- - .../features/tasks/TasksSurfaceMediator.java | 4 - + .../features/tasks/TasksSurfaceMediator.java | 4 -- .../browser/metrics/UmaSessionStats.java | 19 ----- - .../chrome/browser/ntp/NewTabPage.java | 41 +-------- + .../chrome/browser/ntp/NewTabPage.java | 41 +---------- .../browser/ntp/search/SearchBoxMediator.java | 1 - .../browser/searchwidget/SearchActivity.java | 6 +- - .../SearchActivityLocationBarLayout.java | 44 +--------- + .../SearchActivityLocationBarLayout.java | 44 +----------- .../browser/toolbar/ToolbarManager.java | 5 -- - .../chrome/browser/ui/RootUiCoordinator.java | 23 +---- + .../chrome/browser/ui/RootUiCoordinator.java | 23 +----- chrome/browser/ui/android/omnibox/BUILD.gn | 1 - .../chrome/browser/omnibox/LocationBar.java | 6 -- - .../omnibox/LocationBarCoordinator.java | 13 --- - .../browser/omnibox/LocationBarMediator.java | 84 +------------------ - .../chrome/browser/omnibox/OmniboxStub.java | 9 -- - .../suggestions/AutocompleteController.java | 25 ------ - .../suggestions/AutocompleteCoordinator.java | 8 -- - .../suggestions/AutocompleteMediator.java | 9 -- - 17 files changed, 8 insertions(+), 305 deletions(-) + .../omnibox/LocationBarCoordinator.java | 13 ---- + .../browser/omnibox/LocationBarMediator.java | 72 +------------------ + .../chrome/browser/omnibox/OmniboxStub.java | 9 --- + .../suggestions/AutocompleteController.java | 25 ------- + .../suggestions/AutocompleteCoordinator.java | 8 --- + .../suggestions/AutocompleteMediator.java | 9 --- + 17 files changed, 9 insertions(+), 292 deletions(-) diff --git a/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/start_surface/StartSurfaceMediator.java b/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/start_surface/StartSurfaceMediator.java --- a/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/start_surface/StartSurfaceMediator.java @@ -632,7 +632,31 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow return false; } boolean isToolbarMicEnabled = mIsToolbarMicEnabledSupplier.getAsBoolean(); -@@ -1364,16 +1347,6 @@ class LocationBarMediator +@@ -1146,6 +1129,7 @@ class LocationBarMediator + } + + private boolean shouldShowLensButton() { ++ if ((true)) return false; + if (shouldShowDeleteButton()) return false; + + // When this method is called on UI inflation, return false as the native is not ready. +@@ -1153,15 +1137,6 @@ class LocationBarMediator + return false; + } + +- // Never show Lens in the old search widget page context. +- // This widget must guarantee consistent feature set regardless of search engine choice or +- // other aspects that may not be met by Lens. +- LocationBarDataProvider dataProvider = getLocationBarDataProvider(); +- if (dataProvider.getPageClassification(dataProvider.isIncognito(), /* isPrefetch= */ false) +- == PageClassification.ANDROID_SEARCH_WIDGET_VALUE) { +- return false; +- } +- + // When this method is called after native initialized, check omnibox conditions and Lens + // eligibility. + if (mIsTablet && mShouldShowButtonsWhenUnfocused) { +@@ -1364,16 +1339,6 @@ class LocationBarMediator } } @@ -649,7 +673,13 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow @Override public void addUrlFocusChangeListener(UrlFocusChangeListener listener) { mUrlFocusChangeListeners.addObserver(listener); -@@ -1395,61 +1368,6 @@ class LocationBarMediator +@@ -1389,30 +1354,11 @@ class LocationBarMediator + return mUrlHasFocus; + } + +- @Override + public void clearOmniboxFocus() { + setUrlBarFocus( /* shouldBeFocused= */ false, /* pastedText= */ null, OmniboxFocusReason.UNFOCUS); } @@ -671,28 +701,13 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow - } - - @Override -- public void setSearchQuery(String query) { -- if (TextUtils.isEmpty(query)) return; -- -- if (!mNativeInitialized) { -- mDeferredNativeRunnables.add(() -> setSearchQuery(query)); -- return; -- } -- -- // Ensure the UrlBar has focus before entering text. If the UrlBar is not focused, -- // autocomplete text will be updated but the visible text will not. -- setUrlBarFocus( -- /* shouldBeFocused= */ true, -- /* pastedText= */ null, -- OmniboxFocusReason.SEARCH_QUERY); -- setUrlBarText( -- UrlBarData.forNonUrlText(query), -- UrlBar.ScrollType.NO_SCROLL, -- SelectionState.SELECT_ALL); -- mAutocompleteCoordinator.startAutocompleteForQuery(query); -- mUrlCoordinator.setKeyboardVisibility(true, false); -- } -- + public void setSearchQuery(String query) { + if (TextUtils.isEmpty(query)) return; + +@@ -1435,20 +1381,6 @@ class LocationBarMediator + mUrlCoordinator.setKeyboardVisibility(true, false); + } + - @Override - public LocationBarDataProvider getLocationBarDataProvider() { - return mLocationBarDataProvider; @@ -707,10 +722,9 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow - public WindowAndroid getWindowAndroid() { - return mWindowAndroid; - } -- + // UrlBarDelegate implementation. - @Nullable diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/OmniboxStub.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/OmniboxStub.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/OmniboxStub.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/OmniboxStub.java diff --git a/build/patches/Restore-Simplified-NTP-launch.patch b/build/patches/Restore-Simplified-NTP-launch.patch index 854ca1fc7..6b2576536 100644 --- a/build/patches/Restore-Simplified-NTP-launch.patch +++ b/build/patches/Restore-Simplified-NTP-launch.patch @@ -12,16 +12,16 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../android/java/res/layout/ntp_shortcuts.xml | 65 +++++++++++++++++++ .../feedback/ChromeFeedbackCollector.java | 1 + .../feedback/SimplifiedNtpFeedbackSource.java | 38 +++++++++++ + .../identity_disc/IdentityDiscController.java | 5 +- .../NativePageNavigationDelegateImpl.java | 4 +- .../chrome/browser/ntp/NewTabPageLayout.java | 30 ++++++++- .../SuggestionsNavigationDelegate.java | 17 +++++ .../flags/android/chrome_feature_list.cc | 1 + .../browser/flags/ChromeFeatureList.java | 1 + - .../signin/public/base/signin_switches.cc | 3 + .../Restore-Simplified-NTP-launch.inc | 12 ++++ .../Restore-Simplified-NTP-launch.inc | 3 + .../Restore-Simplified-NTP-launch.inc | 1 + - 15 files changed, 181 insertions(+), 4 deletions(-) + 15 files changed, 182 insertions(+), 5 deletions(-) create mode 100644 chrome/android/java/res/layout/ntp_shortcuts.xml create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/feedback/SimplifiedNtpFeedbackSource.java create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Restore-Simplified-NTP-launch.inc @@ -191,6 +191,21 @@ new file mode 100644 + return mMap; + } +} +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/identity_disc/IdentityDiscController.java b/chrome/android/java/src/org/chromium/chrome/browser/identity_disc/IdentityDiscController.java +--- a/chrome/android/java/src/org/chromium/chrome/browser/identity_disc/IdentityDiscController.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/identity_disc/IdentityDiscController.java +@@ -165,7 +165,10 @@ public class IdentityDiscController implements NativeInitObserver, ProfileDataCa + + mButtonData.setButtonSpec( + buttonSpecWithDrawableAndDescription(mButtonData.getButtonSpec(), email)); +- mButtonData.setCanShow(true); ++ if (email == null) ++ mButtonData.setCanShow(false); ++ else ++ mButtonData.setCanShow(true); + } + + private ButtonSpec buttonSpecWithDrawableAndDescription( diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageNavigationDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageNavigationDelegateImpl.java --- a/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageNavigationDelegateImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageNavigationDelegateImpl.java @@ -338,17 +353,6 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f public static final String MESSAGES_FOR_ANDROID_INFRASTRUCTURE = "MessagesForAndroidInfrastructure"; public static final String MESSAGES_FOR_ANDROID_PERMISSION_UPDATE = -diff --git a/components/signin/public/base/signin_switches.cc b/components/signin/public/base/signin_switches.cc ---- a/components/signin/public/base/signin_switches.cc -+++ b/components/signin/public/base/signin_switches.cc -@@ -95,4 +95,7 @@ BASE_FEATURE(kRemoveSignedInAccountsDialog, - base::FEATURE_ENABLED_BY_DEFAULT); - #endif - -+#if BUILDFLAG(IS_ANDROID) -+SET_CROMITE_FEATURE_DISABLED(kIdentityStatusConsistency); -+#endif - } // namespace switches diff --git a/cromite_flags/chrome/browser/about_flags_cc/Restore-Simplified-NTP-launch.inc b/cromite_flags/chrome/browser/about_flags_cc/Restore-Simplified-NTP-launch.inc new file mode 100644 --- /dev/null diff --git a/build/patches/Revert-removal-of-execution-context-address-space.patch b/build/patches/Revert-removal-of-execution-context-address-space.patch index 030e3c9b6..7ae15c5f2 100644 --- a/build/patches/Revert-removal-of-execution-context-address-space.patch +++ b/build/patches/Revert-removal-of-execution-context-address-space.patch @@ -39,7 +39,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../core/workers/main_thread_worklet_test.cc | 1 + .../workers/shared_worker_global_scope.cc | 7 ++++ .../core/workers/shared_worker_global_scope.h | 1 + - .../threaded_worklet_messaging_proxy.cc | 2 ++ + .../threaded_worklet_messaging_proxy.cc | 5 ++- .../core/workers/threaded_worklet_test.cc | 1 + .../workers/worker_classic_script_loader.cc | 5 ++- .../workers/worker_classic_script_loader.h | 6 ++++ @@ -53,7 +53,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../audio_worklet_global_scope_test.cc | 1 + .../webaudio/audio_worklet_thread_test.cc | 1 + .../worklet/worklet_thread_test_common.cc | 2 +- - 36 files changed, 190 insertions(+), 23 deletions(-) + 36 files changed, 192 insertions(+), 24 deletions(-) create mode 100644 cromite_flags/content/public/common/content_features_cc/Revert-removal-of-execution-context-address-space.inc diff --git a/cromite_flags/content/public/common/content_features_cc/Revert-removal-of-execution-context-address-space.inc b/cromite_flags/content/public/common/content_features_cc/Revert-removal-of-execution-context-address-space.inc @@ -593,15 +593,18 @@ diff --git a/third_party/blink/renderer/core/workers/shared_worker_global_scope. diff --git a/third_party/blink/renderer/core/workers/threaded_worklet_messaging_proxy.cc b/third_party/blink/renderer/core/workers/threaded_worklet_messaging_proxy.cc --- a/third_party/blink/renderer/core/workers/threaded_worklet_messaging_proxy.cc +++ b/third_party/blink/renderer/core/workers/threaded_worklet_messaging_proxy.cc -@@ -94,6 +94,7 @@ void ThreadedWorkletMessagingProxy::Initialize( +@@ -93,7 +93,9 @@ void ThreadedWorkletMessagingProxy::Initialize( + starter_secure_context, /*starter_https_state=*/HttpsState::kNone, /*worker_clients=*/nullptr, - /*content_settings_client=*/nullptr, &inherited_trial_features, +- /*content_settings_client=*/nullptr, &inherited_trial_features, ++ /*content_settings_client=*/nullptr, + /*response_address_space*/network::mojom::IPAddressSpace::kUnknown, ++ &inherited_trial_features, /*parent_devtools_token=*/ client_provided_global_scope_creation_params->devtools_token, /*worker_settings=*/nullptr, -@@ -140,6 +141,7 @@ void ThreadedWorkletMessagingProxy::Initialize( +@@ -140,6 +142,7 @@ void ThreadedWorkletMessagingProxy::Initialize( window->GetReferrerPolicy(), window->GetSecurityOrigin(), window->IsSecureContext(), window->GetHttpsState(), worker_clients, frame_client->CreateWorkerContentSettingsClient(), diff --git a/build/patches/User-agent-customization.patch b/build/patches/User-agent-customization.patch index a0401755b..ef8e54a23 100644 --- a/build/patches/User-agent-customization.patch +++ b/build/patches/User-agent-customization.patch @@ -381,7 +381,7 @@ new file mode 100644 +import org.chromium.components.browser_ui.settings.SettingsUtils; + +import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; -+import org.chromium.chrome.browser.preferences.SharedPreferencesManager; ++import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; + +import org.chromium.chrome.browser.app.tabmodel.TabWindowManagerSingleton; +import org.chromium.chrome.browser.tabmodel.TabWindowManager; @@ -410,11 +410,11 @@ new file mode 100644 + + ChromeSwitchPreference alwaysDesktopModeSwitch = + (ChromeSwitchPreference) findPreference(PREF_STICK_DESKTOP_MODE_SWITCH); -+ boolean enabled = SharedPreferencesManager.getInstance().readBoolean( ++ boolean enabled = ChromeSharedPreferences.getInstance().readBoolean( + ChromePreferenceKeys.USERAGENT_STICKY_DESKTOP_MODE, false); + alwaysDesktopModeSwitch.setChecked(enabled); + alwaysDesktopModeSwitch.setOnPreferenceChangeListener((preference, newValue) -> { -+ SharedPreferencesManager.getInstance().writeBoolean( ++ ChromeSharedPreferences.getInstance().writeBoolean( + ChromePreferenceKeys.USERAGENT_STICKY_DESKTOP_MODE, (boolean) newValue); + UpdateAllTabs(); + return true; @@ -498,7 +498,7 @@ new file mode 100644 + } + + private void UpdateAllTabs() { -+ final boolean alwaysDesktopModeEnabled = SharedPreferencesManager.getInstance().readBoolean( ++ final boolean alwaysDesktopModeEnabled = ChromeSharedPreferences.getInstance().readBoolean( + ChromePreferenceKeys.USERAGENT_ALWAYS_DESKTOP_MODE, false); + TabWindowManagerSingleton.getInstance().SetOverrideUserAgentForAllTabs(alwaysDesktopModeEnabled); + } @@ -535,7 +535,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav +import org.chromium.content_public.browser.NavigationController; +import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; -+import org.chromium.chrome.browser.preferences.SharedPreferencesManager; ++import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; +import org.chromium.components.embedder_support.util.UrlUtilities; + /** @@ -545,10 +545,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav params.setOverrideUserAgent(calculateUserAgentOverrideOption(null)); } -+ final boolean stickyDesktopModeEnabled = SharedPreferencesManager.getInstance().readBoolean( ++ final boolean stickyDesktopModeEnabled = ChromeSharedPreferences.getInstance().readBoolean( + ChromePreferenceKeys.USERAGENT_STICKY_DESKTOP_MODE, false); + if (stickyDesktopModeEnabled) { -+ boolean alwaysDesktopModeEnabled = SharedPreferencesManager.getInstance().readBoolean( ++ boolean alwaysDesktopModeEnabled = ChromeSharedPreferences.getInstance().readBoolean( + ChromePreferenceKeys.USERAGENT_ALWAYS_DESKTOP_MODE, false); + + if (UrlUtilities.isInternalScheme(UrlFormatter.fixupUrl(params.getUrl()))) { @@ -580,9 +580,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav - ContentUtils.setUserAgentOverride(mWebContents, - calculateUserAgentOverrideOption(null) == UserAgentOverrideOption.TRUE); -+ if (SharedPreferencesManager.getInstance().readBoolean( ++ if (ChromeSharedPreferences.getInstance().readBoolean( + ChromePreferenceKeys.USERAGENT_STICKY_DESKTOP_MODE, false) && -+ SharedPreferencesManager.getInstance().readBoolean( ++ ChromeSharedPreferences.getInstance().readBoolean( + ChromePreferenceKeys.USERAGENT_ALWAYS_DESKTOP_MODE, false)) { + ContentUtils.setUserAgentOverride(mWebContents, true); + } else { @@ -607,9 +607,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav } private @UserAgentOverrideOption int calculateUserAgentOverrideOption(@Nullable GURL url) { -+ if (SharedPreferencesManager.getInstance().readBoolean( ++ if (ChromeSharedPreferences.getInstance().readBoolean( + ChromePreferenceKeys.USERAGENT_STICKY_DESKTOP_MODE, false) && -+ SharedPreferencesManager.getInstance().readBoolean( ++ ChromeSharedPreferences.getInstance().readBoolean( + ChromePreferenceKeys.USERAGENT_ALWAYS_DESKTOP_MODE, false)) { + return UserAgentOverrideOption.INHERIT; + } @@ -669,7 +669,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabUtils.ja +import org.chromium.chrome.browser.app.tabmodel.TabWindowManagerSingleton; +import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; -+import org.chromium.chrome.browser.preferences.SharedPreferencesManager; ++import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; + import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -688,10 +688,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabUtils.ja - tabUserAgent = TabUserAgent.DEFAULT; - } - tab.setUserAgent(tabUserAgent); -+ SharedPreferencesManager.getInstance().writeBoolean( ++ ChromeSharedPreferences.getInstance().writeBoolean( + ChromePreferenceKeys.USERAGENT_ALWAYS_DESKTOP_MODE, switchToDesktop); + -+ final boolean stickyDesktopModeEnabled = SharedPreferencesManager.getInstance().readBoolean( ++ final boolean stickyDesktopModeEnabled = ChromeSharedPreferences.getInstance().readBoolean( + ChromePreferenceKeys.USERAGENT_STICKY_DESKTOP_MODE, false); + if (stickyDesktopModeEnabled) { + TabWindowManagerSingleton.getInstance().SetOverrideUserAgentForAllTabs(switchToDesktop); @@ -831,7 +831,7 @@ diff --git a/chrome/browser/android/preferences/privacy_preferences_manager_impl + std::vector cors_exempt_header_list; + iter.GetCurrentValue()->GetRendererInterface()->InitializeRenderer( + /*user_agent*/ ua, /*metadata*/ blink::UserAgentMetadata(), -+ cors_exempt_header_list, content::AttributionManager::GetSupport(), ++ cors_exempt_header_list, + g_browser_process->GetOriginTrialsSettingsStorage()->GetSettings()); + } + } diff --git a/build/patches/bromite-build-utils.patch b/build/patches/bromite-build-utils.patch index 7a9a3f038..e1e76181f 100644 --- a/build/patches/bromite-build-utils.patch +++ b/build/patches/bromite-build-utils.patch @@ -443,7 +443,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s +import org.chromium.chrome.browser.flags.ChromeFeatureList; +import org.chromium.chrome.browser.flags.CromiteNativeUtils; +import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; -+import org.chromium.chrome.browser.preferences.SharedPreferencesManager; ++import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; + /** The Chrome implementation of AccessibilitySettingsDelegate. */ public class ChromeAccessibilitySettingsDelegate implements AccessibilitySettingsDelegate { @@ -542,10 +542,10 @@ new file mode 100755 + +import org.chromium.chrome.browser.flags.ChromeFeatureList; +import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; -+import org.chromium.chrome.browser.preferences.SharedPreferencesManager; ++import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; + -+import org.chromium.base.annotations.CalledByNative; -+import org.chromium.base.annotations.NativeMethods; ++import org.jni_zero.CalledByNative; ++import org.jni_zero.NativeMethods; + +public class CromiteNativeUtils { + /** @@ -561,7 +561,7 @@ new file mode 100755 + CachedFlag cachedFlag = ChromeFeatureList.sAllCachedFlags.get(featureName); + String preferenceName = cachedFlag.getSharedPreferenceKey(); + -+ SharedPreferencesManager.getInstance().writeBoolean(preferenceName, newValue); ++ ChromeSharedPreferences.getInstance().writeBoolean(preferenceName, newValue); + cachedFlag.setValueReturnedOverride(newValue); + } + diff --git a/build/patches/eyeo-beta-118.0.5993.48-android_api.patch b/build/patches/eyeo-beta-118.0.5993.48-android_api.patch index 3ebbe3438..3db6f94a8 100644 --- a/build/patches/eyeo-beta-118.0.5993.48-android_api.patch +++ b/build/patches/eyeo-beta-118.0.5993.48-android_api.patch @@ -148,7 +148,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -3488,6 +3488,17 @@ static_library("browser") { +@@ -3490,6 +3490,17 @@ static_library("browser") { "webauthn/android/webauthn_request_delegate_android.h", ] @@ -166,7 +166,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn public_deps += [ "//chrome/android/features/dev_ui:buildflags", -@@ -3678,6 +3689,9 @@ static_library("browser") { +@@ -3680,6 +3691,9 @@ static_library("browser") { "//url", ] @@ -1504,8 +1504,8 @@ new file mode 100644 +import androidx.annotation.UiThread; + +import org.chromium.base.ThreadUtils; -+import org.chromium.base.annotations.CalledByNative; -+import org.chromium.base.annotations.NativeMethods; ++import org.jni_zero.CalledByNative; ++import org.jni_zero.NativeMethods; +import org.chromium.components.adblock.controller.R; + +import java.net.MalformedURLException; @@ -1820,8 +1820,8 @@ new file mode 100644 + +import org.chromium.base.ContextUtils; +import org.chromium.base.ThreadUtils; -+import org.chromium.base.annotations.CalledByNative; -+import org.chromium.base.annotations.NativeMethods; ++import org.jni_zero.CalledByNative; ++import org.jni_zero.NativeMethods; + +import java.net.MalformedURLException; +import java.net.URL; @@ -2173,8 +2173,8 @@ new file mode 100644 + +import org.chromium.base.ContextUtils; +import org.chromium.base.ThreadUtils; -+import org.chromium.base.annotations.CalledByNative; -+import org.chromium.base.annotations.NativeMethods; ++import org.jni_zero.CalledByNative; ++import org.jni_zero.NativeMethods; + +import java.net.MalformedURLException; +import java.net.URL; diff --git a/build/patches/eyeo-beta-118.0.5993.48-chrome_integration.patch b/build/patches/eyeo-beta-118.0.5993.48-chrome_integration.patch index 466dd9719..92969aab4 100644 --- a/build/patches/eyeo-beta-118.0.5993.48-chrome_integration.patch +++ b/build/patches/eyeo-beta-118.0.5993.48-chrome_integration.patch @@ -73,7 +73,7 @@ Pre-requisites: eyeo Browser Ad filtering Solution: Base Module .../adblock_internals/adblock_internals.ts | 43 ++ .../safe_browsing_blocking_page_test.cc | 7 + ...subresource_filter_browser_test_harness.cc | 8 +- - chrome/browser/ui/BUILD.gn | 11 + + chrome/browser/ui/BUILD.gn | 10 + chrome/browser/ui/prefs/pref_watcher.cc | 13 + chrome/browser/ui/tab_helpers.cc | 18 + .../ui/webui/adblock_internals/BUILD.gn | 23 + @@ -129,7 +129,7 @@ Pre-requisites: eyeo Browser Ad filtering Solution: Base Module .../xhr_result_3_subresource_loading.json | 1 + .../test/data/adblock/wbn/index.html.mustache | 157 ++++++ chrome/test/data/adblock/xpath3.html | 23 + - 123 files changed, 7677 insertions(+), 10 deletions(-) + 123 files changed, 7676 insertions(+), 10 deletions(-) create mode 100644 chrome/browser/adblock/README.md create mode 100644 chrome/browser/adblock/adblock_content_browser_client.cc create mode 100644 chrome/browser/adblock/adblock_content_browser_client.h @@ -302,7 +302,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn "after_startup_task_utils.cc", "after_startup_task_utils.h", "app_mode/app_mode_utils.cc", -@@ -2149,6 +2172,7 @@ static_library("browser") { +@@ -2151,6 +2174,7 @@ static_library("browser") { "//chrome/browser/ui/color:color_headers", "//chrome/browser/ui/color:mixers", "//chrome/browser/ui/webui:configs", @@ -310,7 +310,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn "//chrome/browser/ui/webui/app_service_internals:mojo_bindings", "//chrome/browser/ui/webui/feed:mojo_bindings", "//chrome/browser/ui/webui/internals/user_education:mojo_bindings", -@@ -2171,6 +2195,8 @@ static_library("browser") { +@@ -2173,6 +2197,8 @@ static_library("browser") { "//chrome/common/notifications", "//chrome/installer/util:with_no_strings", "//chrome/services/speech/buildflags", @@ -319,7 +319,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn "//components/assist_ranker", "//components/autofill/content/browser", "//components/autofill/core/browser", -@@ -3461,6 +3487,8 @@ static_library("browser") { +@@ -3463,6 +3489,8 @@ static_library("browser") { "webauthn/android/webauthn_request_delegate_android.cc", "webauthn/android/webauthn_request_delegate_android.h", ] @@ -328,7 +328,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn public_deps += [ "//chrome/android/features/dev_ui:buildflags", "//components/image_fetcher/core", -@@ -3650,6 +3678,7 @@ static_library("browser") { +@@ -3652,6 +3680,7 @@ static_library("browser") { "//url", ] @@ -7578,7 +7578,7 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn "webui/autofill_and_password_manager_internals/autofill_internals_ui.cc", "webui/autofill_and_password_manager_internals/autofill_internals_ui.h", "webui/autofill_and_password_manager_internals/internals_ui_handler.cc", -@@ -436,11 +444,13 @@ static_library("ui") { +@@ -436,6 +444,7 @@ static_library("ui") { "//chrome/browser/storage_access_api", "//chrome/browser/ui/side_panel:side_panel_enums", "//chrome/browser/ui/webui/location_internals:mojo_bindings", @@ -7586,13 +7586,7 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn "//chrome/browser/ui/webui/omnibox:mojo_bindings", "//chrome/browser/ui/webui/segmentation_internals:mojo_bindings", "//chrome/browser/ui/webui/suggest_internals:mojo_bindings", - "//chrome/browser/ui/webui/usb_internals:mojo_bindings", - "//chrome/browser/v8_compile_hints/proto", -+ "//chrome/browser/ui/webui:configs", - "//chrome/common", - "//chrome/common/net", - "//chrome/common/search:mojo_bindings", -@@ -452,6 +462,7 @@ static_library("ui") { +@@ -452,6 +461,7 @@ static_library("ui") { "//components/about_ui", "//components/access_code_cast/common:metrics", "//components/account_id", From c5ecfb9ff178e32ca213ada5d722a4b85dbebe8f Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Sat, 2 Dec 2023 22:59:58 +0100 Subject: [PATCH 04/19] v120 line changes --- build/patches/00Cromite-Branding.patch | 2 +- ...able-prefers-reduced-transparency-media-query.patch | 2 +- build/patches/00Internal-firewall.patch | 2 +- build/patches/00Restore-LastTabStandingTracker.patch | 2 +- build/patches/Add-a-proxy-configuration-page.patch | 2 +- .../Add-custom-tab-intents-privacy-option.patch | 8 ++++---- build/patches/Add-menu-item-to-bookmark-all-tabs.patch | 10 +++++----- build/patches/Remove-help-menu-item.patch | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/build/patches/00Cromite-Branding.patch b/build/patches/00Cromite-Branding.patch index b0d4b1a23..7087b9a01 100644 --- a/build/patches/00Cromite-Branding.patch +++ b/build/patches/00Cromite-Branding.patch @@ -13147,7 +13147,7 @@ e)fqMZZ`3a)Ds&5H", "", servicesLink)); } @@ -140,7 +140,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting @Override public boolean onPreferenceChange(Preference preference, Object newValue) { String key = preference.getKey(); -@@ -261,6 +267,14 @@ public class PrivacySettings +@@ -262,6 +268,14 @@ public class PrivacySettings } else if (PREF_SEARCH_SUGGESTIONS.equals(key)) { UserPrefs.get(getProfile()) .setBoolean(Pref.SEARCH_SUGGEST_ENABLED, (boolean) newValue); @@ -155,7 +155,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting } return true; } -@@ -285,6 +299,16 @@ public class PrivacySettings +@@ -286,6 +300,16 @@ public class PrivacySettings UserPrefs.get(getProfile()).getBoolean(Pref.CAN_MAKE_PAYMENT_ENABLED)); } diff --git a/build/patches/Add-menu-item-to-bookmark-all-tabs.patch b/build/patches/Add-menu-item-to-bookmark-all-tabs.patch index 713b7792b..9fca2496a 100644 --- a/build/patches/Add-menu-item-to-bookmark-all-tabs.patch +++ b/build/patches/Add-menu-item-to-bookmark-all-tabs.patch @@ -122,7 +122,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm import org.chromium.components.bookmarks.BookmarkId; import org.chromium.components.bookmarks.BookmarkItem; import org.chromium.components.bookmarks.BookmarkType; -@@ -84,6 +89,8 @@ import java.io.File; +@@ -85,6 +90,8 @@ import java.io.File; class BookmarkBridge { private final ObserverList mObservers = new ObserverList<>(); @@ -131,7 +131,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm private long mNativeBookmarkBridge; private boolean mIsDestroyed; private boolean mIsDoingExtensiveChanges; -@@ -389,6 +396,16 @@ class BookmarkBridge { +@@ -390,6 +397,16 @@ class BookmarkBridge { return mMobileFolderId; } @@ -148,7 +148,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm /** * @return Id representing the special "other" folder from bookmark model. */ -@@ -1033,6 +1050,50 @@ class BookmarkBridge { +@@ -1034,6 +1051,50 @@ class BookmarkBridge { return BookmarkBridgeJni.get().addToReadingList(mNativeBookmarkBridge, title, url); } @@ -199,7 +199,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm /** * @param url The URL of the reading list item. * @return The reading list item with the URL, or null if no such reading list item. -@@ -1272,6 +1333,9 @@ class BookmarkBridge { +@@ -1273,6 +1334,9 @@ class BookmarkBridge { BookmarkId getBookmarkIdForWebContents( long nativeBookmarkBridge, WebContents webContents, boolean onlyEditable); @@ -209,7 +209,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm BookmarkItem getBookmarkById(long nativeBookmarkBridge, long id, int type); void getTopLevelFolderIds(long nativeBookmarkBridge, List bookmarksList); -@@ -1283,6 +1347,8 @@ class BookmarkBridge { +@@ -1284,6 +1348,8 @@ class BookmarkBridge { BookmarkId getRootFolderId(long nativeBookmarkBridge); diff --git a/build/patches/Remove-help-menu-item.patch b/build/patches/Remove-help-menu-item.patch index 0a94b5ea0..ff32c40d2 100644 --- a/build/patches/Remove-help-menu-item.patch +++ b/build/patches/Remove-help-menu-item.patch @@ -162,7 +162,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/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java --- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java -@@ -370,6 +370,7 @@ public class PrivacySettings +@@ -371,6 +371,7 @@ public class PrivacySettings menu.add(Menu.NONE, R.id.menu_id_targeted_help, Menu.NONE, R.string.menu_help); help.setIcon(TraceEventVectorDrawableCompat.create( getResources(), R.drawable.ic_help_and_feedback, getActivity().getTheme())); From a3edc9ee7446b039344ac248a9af6c25fbf57027 Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 6 Dec 2023 13:24:15 +0100 Subject: [PATCH 05/19] Shown by default the list of variations with the text format in chrome://version --- build/patches/00Add-cromite-flags-support.patch | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/build/patches/00Add-cromite-flags-support.patch b/build/patches/00Add-cromite-flags-support.patch index d1984d8cc..07a56600f 100644 --- a/build/patches/00Add-cromite-flags-support.patch +++ b/build/patches/00Add-cromite-flags-support.patch @@ -36,6 +36,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../core/offline_page_feature.cc | 1 + .../offline_pages/core/offline_page_feature.h | 1 + components/permissions/features.cc | 1 + + .../version_ui/version_handler_helper.cc | 2 +- content/common/features.cc | 1 + content/public/common/content_features.cc | 1 + content/public/common/content_features.h | 1 + @@ -70,7 +71,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html services/network/public/cpp/features.h | 1 + third_party/blink/common/features.cc | 1 + third_party/blink/public/common/features.h | 1 + - 56 files changed, 488 insertions(+), 13 deletions(-) + 57 files changed, 489 insertions(+), 14 deletions(-) create mode 100755 cromite_flags/BUILD.gn create mode 100755 cromite_flags/chrome/browser/about_flags_cc/placeholder.txt create mode 100755 cromite_flags/chrome/browser/browser_features_cc/placeholder.txt @@ -343,7 +344,7 @@ 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 -@@ -42,6 +42,9 @@ found in the LICENSE file. +@@ -44,6 +44,9 @@ found in the LICENSE file. 0.95 @@ -795,6 +796,18 @@ diff --git a/components/permissions/features.cc b/components/permissions/feature } // namespace features namespace feature_params { +diff --git a/components/version_ui/version_handler_helper.cc b/components/version_ui/version_handler_helper.cc +--- a/components/version_ui/version_handler_helper.cc ++++ b/components/version_ui/version_handler_helper.cc +@@ -37,7 +37,7 @@ base::Value::List GetVariationsList() { + // displayed locally (and is useful for diagnostics purposes). + base::FieldTrialListIncludingLowAnonymity::GetActiveFieldTrialGroups( + &active_groups); +-#if !defined(NDEBUG) ++#if true + const unsigned char kNonBreakingHyphenUTF8[] = {0xE2, 0x80, 0x91, '\0'}; + const std::string kNonBreakingHyphenUTF8String( + reinterpret_cast(kNonBreakingHyphenUTF8)); diff --git a/content/common/features.cc b/content/common/features.cc --- a/content/common/features.cc +++ b/content/common/features.cc From 052116749551d6109bfa714a5a5178f0792df7d4 Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 6 Dec 2023 13:25:25 +0100 Subject: [PATCH 06/19] #572 fix hang in settings ui --- .../00Add-setting-to-clear-data-on-exit.patch | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/build/patches/00Add-setting-to-clear-data-on-exit.patch b/build/patches/00Add-setting-to-clear-data-on-exit.patch index 64be0c405..55c2f4ef3 100644 --- a/build/patches/00Add-setting-to-clear-data-on-exit.patch +++ b/build/patches/00Add-setting-to-clear-data-on-exit.patch @@ -19,7 +19,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html chrome/browser/profiles/profile_manager.cc | 13 ++++ chrome/browser/profiles/profile_manager.h | 2 + .../clear_browsing_data_dialog.html | 44 +++++++++++ - .../clear_browsing_data_dialog.ts | 1 + + .../clear_browsing_data_dialog.ts | 2 + .../strings/android_chrome_strings.grd | 3 + .../settings_localized_strings_provider.cc | 1 + .../core/browsing_data_policies_utils.cc | 20 ++--- @@ -29,7 +29,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html components/browsing_data/core/pref_names.cc | 27 +++++++ components/browsing_data/core/pref_names.h | 9 +++ content/browser/storage_partition_impl.cc | 1 + - 25 files changed, 319 insertions(+), 16 deletions(-) + 25 files changed, 320 insertions(+), 16 deletions(-) create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragmentAtStart.java diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni @@ -482,6 +482,14 @@ diff --git a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_ ], }, +@@ -332,6 +333,7 @@ export class SettingsClearBrowsingDataDialogElement extends + } + this.clearButtonDisabled_ = + this.getSelectedDataTypes_(tab as HTMLElement).length === 0; ++ if ((tab as HTMLElement).id == "atstart-tab") this.clearButtonDisabled_ = true; + } + + /** 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 From b7c8cb3be5e7f437ec2869663b03cc6707cab68c Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 6 Dec 2023 13:26:17 +0100 Subject: [PATCH 07/19] the other folder is always shown by default --- .../00Enable-ImprovedBookmarks-by-default.patch | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/build/patches/00Enable-ImprovedBookmarks-by-default.patch b/build/patches/00Enable-ImprovedBookmarks-by-default.patch index 04b27f848..46a30cb47 100644 --- a/build/patches/00Enable-ImprovedBookmarks-by-default.patch +++ b/build/patches/00Enable-ImprovedBookmarks-by-default.patch @@ -9,8 +9,9 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../browser/bookmarks/BookmarkSearchBoxRowViewBinder.java | 2 ++ .../chromium/chrome/browser/bookmarks/BookmarkUiPrefs.java | 2 +- .../org/chromium/chrome/browser/bookmarks/BookmarkUtils.java | 3 ++- + components/bookmarks/browser/bookmark_client.cc | 3 +-- .../Enable-ImprovedBookmarks-by-default.inc | 1 + - 6 files changed, 9 insertions(+), 5 deletions(-) + 7 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Enable-ImprovedBookmarks-by-default.inc diff --git a/chrome/android/java/res/layout/bookmark_search_box_row.xml b/chrome/android/java/res/layout/bookmark_search_box_row.xml @@ -90,6 +91,19 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm showBookmarkManagerOnTablet( context, activity == null ? null : activity.getComponentName(), +diff --git a/components/bookmarks/browser/bookmark_client.cc b/components/bookmarks/browser/bookmark_client.cc +--- a/components/bookmarks/browser/bookmark_client.cc ++++ b/components/bookmarks/browser/bookmark_client.cc +@@ -50,8 +50,7 @@ bool BookmarkClient::IsPermanentNodeVisibleWhenEmpty( + case BookmarkNode::BOOKMARK_BAR: + return is_desktop; + case BookmarkNode::OTHER_NODE: +- return is_desktop || base::FeatureList::IsEnabled( +- kAllBookmarksBaselineFolderVisibility); ++ return true; + case BookmarkNode::MOBILE: + // Either MOBILE or OTHER_NODE is visible when empty, but never both. + return !IsPermanentNodeVisibleWhenEmpty(BookmarkNode::OTHER_NODE); diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Enable-ImprovedBookmarks-by-default.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Enable-ImprovedBookmarks-by-default.inc new file mode 100644 --- /dev/null From ffffa2aba38c74eb2e826a1c943e29080571c61c Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 6 Dec 2023 13:28:05 +0100 Subject: [PATCH 08/19] removed support for heuristic enabling of third-party cookies added cromite defaults for new v120 flags --- ...ning-all-cookies-by-top-frame-domain.patch | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/build/patches/00Partitioning-all-cookies-by-top-frame-domain.patch b/build/patches/00Partitioning-all-cookies-by-top-frame-domain.patch index 3213cc13d..f9fee088b 100644 --- a/build/patches/00Partitioning-all-cookies-by-top-frame-domain.patch +++ b/build/patches/00Partitioning-all-cookies-by-top-frame-domain.patch @@ -10,9 +10,10 @@ samesite=none first-party cookies are sent in third-party contexts. License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- .../browser/net/profile_network_context_service.cc | 8 ++++---- + .../content_settings/core/browser/cookie_settings.cc | 1 + .../core/common/cookie_settings_base.cc | 2 +- - .../Partitioning-all-cookies-by-top-frame-domain.inc | 1 + - .../Partitioning-all-cookies-by-top-frame-domain.inc | 1 + + .../Partitioning-all-cookies-by-top-frame-domain.inc | 3 +++ + .../Partitioning-all-cookies-by-top-frame-domain.inc | 2 ++ .../Partitioning-all-cookies-by-top-frame-domain.inc | 1 + .../Partitioning-all-cookies-by-top-frame-domain.inc | 5 +++++ net/cookies/canonical_cookie.cc | 12 +----------- @@ -25,7 +26,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../renderer/modules/cookie_store/cookie_store.cc | 12 ++++++++++++ .../cookie_store/cookie_store_delete_options.idl | 2 +- ui/webui/webui_allowlist.cc | 1 + - 16 files changed, 54 insertions(+), 21 deletions(-) + 17 files changed, 58 insertions(+), 21 deletions(-) create mode 100644 cromite_flags/components/content_settings/core/common/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc create mode 100644 cromite_flags/components/permissions/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc create mode 100644 cromite_flags/content/public/common/content_features_cc/Partitioning-all-cookies-by-top-frame-domain.inc @@ -53,6 +54,17 @@ diff --git a/chrome/browser/net/profile_network_context_service.cc b/chrome/brow #endif HostContentSettingsMap* host_content_settings_map = +diff --git a/components/content_settings/core/browser/cookie_settings.cc b/components/content_settings/core/browser/cookie_settings.cc +--- a/components/content_settings/core/browser/cookie_settings.cc ++++ b/components/content_settings/core/browser/cookie_settings.cc +@@ -123,6 +123,7 @@ void CookieSettings::SetTemporaryCookieGrantForHeuristic( + const GURL& first_party_url, + base::TimeDelta ttl, + bool use_schemeless_patterns) { ++ if ((true)) return; + // If the new grant has an earlier TTL than the existing setting, keep the + // existing TTL. + SettingInfo info; diff --git a/components/content_settings/core/common/cookie_settings_base.cc b/components/content_settings/core/common/cookie_settings_base.cc --- a/components/content_settings/core/common/cookie_settings_base.cc +++ b/components/content_settings/core/common/cookie_settings_base.cc @@ -69,14 +81,17 @@ diff --git a/cromite_flags/components/content_settings/core/common/features_cc/P new file mode 100644 --- /dev/null +++ b/cromite_flags/components/content_settings/core/common/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc -@@ -0,0 +1 @@ +@@ -0,0 +1,3 @@ +SET_CROMITE_FEATURE_DISABLED(kTrackingProtection3pcd); ++SET_CROMITE_FEATURE_DISABLED(kUserBypassUI); ++SET_CROMITE_FEATURE_DISABLED(kTpcdHeuristicsGrants); diff --git a/cromite_flags/components/permissions/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc b/cromite_flags/components/permissions/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc new file mode 100644 --- /dev/null +++ b/cromite_flags/components/permissions/features_cc/Partitioning-all-cookies-by-top-frame-domain.inc -@@ -0,0 +1 @@ +@@ -0,0 +1,2 @@ +SET_CROMITE_FEATURE_DISABLED(kPermissionStorageAccessAPI); ++SET_CROMITE_FEATURE_ENABLED(kShowRelatedWebsiteSetsPermissionGrants); diff --git a/cromite_flags/content/public/common/content_features_cc/Partitioning-all-cookies-by-top-frame-domain.inc b/cromite_flags/content/public/common/content_features_cc/Partitioning-all-cookies-by-top-frame-domain.inc new file mode 100644 --- /dev/null From 8aa4f9e3b7d52359dde704bb514b3a7f9493c436 Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 6 Dec 2023 13:28:51 +0100 Subject: [PATCH 09/19] fixed ntp ui with v120 changes --- .../patches/Add-option-to-force-tablet-UI.patch | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/build/patches/Add-option-to-force-tablet-UI.patch b/build/patches/Add-option-to-force-tablet-UI.patch index 3c2c792cb..5a8b78a16 100644 --- a/build/patches/Add-option-to-force-tablet-UI.patch +++ b/build/patches/Add-option-to-force-tablet-UI.patch @@ -5,6 +5,7 @@ Subject: Add option to force tablet UI License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- .../ChromeAccessibilitySettingsDelegate.java | 19 +++++++++++++++++++ + .../browser/tasks/ReturnToChromeUtil.java | 4 +++- .../chrome/browser/ui/RootUiCoordinator.java | 5 ++++- .../preferences/ChromePreferenceKeys.java | 1 + .../LegacyChromePreferenceKeys.java | 1 + @@ -17,7 +18,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../AccessibilitySettingsDelegate.java | 2 ++ ui/android/BUILD.gn | 2 ++ .../chromium/ui/base/DeviceFormFactor.java | 5 +++++ - 13 files changed, 62 insertions(+), 8 deletions(-) + 14 files changed, 65 insertions(+), 9 deletions(-) diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java --- a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java @@ -48,6 +49,20 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s @Override public void addExtraPreferences(PreferenceFragmentCompat fragment) { if (ImageDescriptionsController.getInstance().shouldShowImageDescriptionsMenuItem()) { +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToChromeUtil.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToChromeUtil.java +--- a/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToChromeUtil.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToChromeUtil.java +@@ -948,7 +948,9 @@ public final class ReturnToChromeUtil { + + public static boolean isScrollableMvtEnabled(Context context) { + boolean isSurfacePolishEnabled = ChromeFeatureList.sSurfacePolish.isEnabled(); +- if (!DeviceFormFactor.isNonMultiDisplayContextOnTablet(context)) { ++ if (!DeviceFormFactor.isNonMultiDisplayContextOnTablet(context) || ++ ChromeSharedPreferences.getInstance().readBoolean( ++ ChromePreferenceKeys.FLAGS_FORCE_TABLET_UI_ENABLED, false)) { + // On phones, parameter SURFACE_POLISH_SCROLLABLE_MVT is checked when feature flag + // surface polish is enabled; otherwise, feature flag + // SHOW_SCROLLABLE_MVT_ON_NTP_PHONE_ANDROID 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 From c4ce10cd51b5f0b9681248706a7449958989bb32 Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 6 Dec 2023 13:29:30 +0100 Subject: [PATCH 10/19] also disable feature engagement --- build/patches/Add-site-engagement-flag.patch | 48 +++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/build/patches/Add-site-engagement-flag.patch b/build/patches/Add-site-engagement-flag.patch index 19f5fb241..4e6269db1 100644 --- a/build/patches/Add-site-engagement-flag.patch +++ b/build/patches/Add-site-engagement-flag.patch @@ -8,12 +8,14 @@ Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later. License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- chrome/browser/about_flags.cc | 1 + + .../internal/tracker_impl.cc | 3 ++ + .../public/feature_configurations.cc | 7 ++++ .../content/site_engagement_score.cc | 5 +++ components/site_engagement/core/BUILD.gn | 6 ++++ components/site_engagement/core/features.cc | 30 ++++++++++++++++ components/site_engagement/core/features.h | 34 +++++++++++++++++++ .../Add-site-engagement-flag.inc | 10 ++++++ - 6 files changed, 86 insertions(+) + 8 files changed, 96 insertions(+) create mode 100644 components/site_engagement/core/features.cc create mode 100644 components/site_engagement/core/features.h create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Add-site-engagement-flag.inc @@ -29,6 +31,50 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc #include "components/shared_highlighting/core/common/shared_highlighting_features.h" #include "components/signin/core/browser/dice_account_reconcilor_delegate.h" #include "components/signin/public/base/signin_buildflags.h" +diff --git a/components/feature_engagement/internal/tracker_impl.cc b/components/feature_engagement/internal/tracker_impl.cc +--- a/components/feature_engagement/internal/tracker_impl.cc ++++ b/components/feature_engagement/internal/tracker_impl.cc +@@ -22,6 +22,7 @@ + #include "base/task/single_thread_task_runner.h" + #include "base/time/clock.h" + #include "build/build_config.h" ++#include "components/site_engagement/core/features.h" + #include "components/feature_engagement/internal/availability_model_impl.h" + #include "components/feature_engagement/internal/blocked_iph_features.h" + #include "components/feature_engagement/internal/chrome_variations_configuration.h" +@@ -187,6 +188,8 @@ TrackerImpl::TrackerImpl( + TrackerImpl::~TrackerImpl() = default; + + void TrackerImpl::NotifyEvent(const std::string& event) { ++ if (!base::FeatureList::IsEnabled(site_engagement::features::kSiteEngagement)) ++ return; + event_model_->IncrementEvent(event, time_provider_->GetCurrentDay()); + stats::RecordNotifyEvent(event, configuration_.get(), + event_model_->IsReady()); +diff --git a/components/feature_engagement/public/feature_configurations.cc b/components/feature_engagement/public/feature_configurations.cc +--- a/components/feature_engagement/public/feature_configurations.cc ++++ b/components/feature_engagement/public/feature_configurations.cc +@@ -6,6 +6,7 @@ + + #include "base/strings/string_util.h" + #include "build/build_config.h" ++#include "components/site_engagement/core/features.h" + #include "components/feature_engagement/public/configuration.h" + #include "components/feature_engagement/public/event_constants.h" + #include "components/feature_engagement/public/feature_constants.h" +@@ -48,6 +49,12 @@ FeatureConfig CreateAlwaysTriggerConfig(const base::Feature* feature) { + + absl::optional GetClientSideFeatureConfig( + const base::Feature* feature) { ++ if (!base::FeatureList::IsEnabled(site_engagement::features::kSiteEngagement)) { ++ absl::optional config = FeatureConfig(); ++ config->valid = false; ++ return config; ++ } ++ + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ + BUILDFLAG(IS_CHROMEOS) + if (kIPHPasswordsAccountStorageFeature.name == feature->name) { diff --git a/components/site_engagement/content/site_engagement_score.cc b/components/site_engagement/content/site_engagement_score.cc --- a/components/site_engagement/content/site_engagement_score.cc +++ b/components/site_engagement/content/site_engagement_score.cc From 853bcab94057d811a5e39ca2a595c3685d63610c Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 6 Dec 2023 13:35:26 +0100 Subject: [PATCH 11/19] added mark for the feature I'm interested in marking the point in the code because I don't understand what the download has to do with it. --- .../Allow-building-without-supervised-users.patch | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/build/patches/Allow-building-without-supervised-users.patch b/build/patches/Allow-building-without-supervised-users.patch index 906eca8b1..f72c163e3 100644 --- a/build/patches/Allow-building-without-supervised-users.patch +++ b/build/patches/Allow-building-without-supervised-users.patch @@ -14,10 +14,11 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html chrome/browser/ui/webui/managed_ui_handler.cc | 2 ++ .../browser/ui/webui/management/management_ui_handler.cc | 2 ++ components/supervised_user/buildflags.gni | 6 +----- + components/supervised_user/core/common/features.cc | 1 + components/supervised_user/core/common/pref_names.h | 4 ++++ .../core/common/supervised_user_constants.cc | 2 ++ .../supervised_user/core/common/supervised_user_utils.cc | 8 ++++++++ - 13 files changed, 30 insertions(+), 17 deletions(-) + 14 files changed, 31 insertions(+), 17 deletions(-) diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn @@ -206,6 +207,15 @@ diff --git a/components/supervised_user/buildflags.gni b/components/supervised_u - is_ios || is_linux || is_mac || is_win + enable_supervised_users = false } +diff --git a/components/supervised_user/core/common/features.cc b/components/supervised_user/core/common/features.cc +--- a/components/supervised_user/core/common/features.cc ++++ b/components/supervised_user/core/common/features.cc +@@ -171,4 +171,5 @@ bool IsShadowKidsApiWithSafeSitesEnabled() { + return base::FeatureList::IsEnabled(kShadowKidsApiWithSafeSites); + } + ++SET_CROMITE_FEATURE_DISABLED(kForceGoogleSafeSearchForSupervisedUsers); + } // namespace supervised_user diff --git a/components/supervised_user/core/common/pref_names.h b/components/supervised_user/core/common/pref_names.h --- a/components/supervised_user/core/common/pref_names.h +++ b/components/supervised_user/core/common/pref_names.h From dee3870e45f630acae7d0364926ee3f3a3993da6 Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 6 Dec 2023 13:36:46 +0100 Subject: [PATCH 12/19] decoupled activation flag with adblock site setting first step towards completely deactivating the functionality --- .../Bromite-subresource-adblocker.patch | 153 +++++++++++------- 1 file changed, 99 insertions(+), 54 deletions(-) diff --git a/build/patches/Bromite-subresource-adblocker.patch b/build/patches/Bromite-subresource-adblocker.patch index 70b8688db..4dd13d472 100644 --- a/build/patches/Bromite-subresource-adblocker.patch +++ b/build/patches/Bromite-subresource-adblocker.patch @@ -17,31 +17,31 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html chrome/android/chrome_java_sources.gni | 2 + .../java/res/layout/adblock_editor.xml | 67 +++++ chrome/android/java/res/values/styles.xml | 18 ++ - chrome/android/java/res/values/values.xml | 2 + + chrome/android/java/res/values/values.xml | 4 + .../java/res/xml/adblock_preferences.xml | 25 ++ .../android/java/res/xml/main_preferences.xml | 5 + .../browser/settings/AdBlockEditor.java | 91 ++++++ - .../browser/settings/AdBlockPreferences.java | 61 ++++ + .../browser/settings/AdBlockPreferences.java | 58 ++++ .../chrome/browser/tabmodel/TabModelImpl.java | 2 +- chrome/app/generated_resources.grd | 10 + chrome/browser/after_startup_task_utils.cc | 4 + chrome/browser/browser_process.h | 6 + - chrome/browser/browser_process_impl.cc | 20 ++ + chrome/browser/browser_process_impl.cc | 21 ++ chrome/browser/browser_process_impl.h | 2 + chrome/browser/chrome_browser_main.cc | 3 + chrome/browser/flags/BUILD.gn | 3 + - .../flags/android/adblock_native_gateway.cc | 21 ++ - .../browser/flags/AdBlockNativeGateway.java | 20 ++ - .../net/system_network_context_manager.cc | 3 + + .../flags/android/adblock_native_gateway.cc | 31 ++ + .../browser/flags/AdBlockNativeGateway.java | 30 ++ + .../net/system_network_context_manager.cc | 8 + .../sessions/session_restore_android.cc | 6 +- .../strings/android_chrome_strings.grd | 14 + - chrome/common/pref_names.h | 3 + + chrome/common/pref_names.h | 5 + .../strings/android/site_settings.grdp | 3 + components/component_updater/BUILD.gn | 7 + - .../adblock_updater_service.cc | 268 ++++++++++++++++++ - .../adblock_updater_service.h | 98 +++++++ - .../download_filters_task.cc | 239 ++++++++++++++++ - .../component_updater/download_filters_task.h | 129 +++++++++ + .../adblock_updater_service.cc | 281 ++++++++++++++++++ + .../adblock_updater_service.h | 103 +++++++ + .../download_filters_task.cc | 239 +++++++++++++++ + .../component_updater/download_filters_task.h | 129 ++++++++ ...ent_subresource_filter_throttle_manager.cc | 15 + ...tent_subresource_filter_throttle_manager.h | 2 + .../content/browser/ruleset_service.cc | 42 ++- @@ -52,7 +52,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../browser/subresource_filter_features.cc | 116 +------- .../core/common/indexed_ruleset.cc | 5 +- .../Bromite-subresource-adblocker.inc | 3 + - 40 files changed, 1209 insertions(+), 127 deletions(-) + 40 files changed, 1254 insertions(+), 127 deletions(-) create mode 100644 chrome/android/java/res/layout/adblock_editor.xml create mode 100644 chrome/android/java/res/xml/adblock_preferences.xml create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/settings/AdBlockEditor.java @@ -210,10 +210,12 @@ diff --git a/chrome/android/java/res/values/styles.xml b/chrome/android/java/res 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 -@@ -27,6 +27,8 @@ found in the LICENSE file. +@@ -27,6 +27,10 @@ found in the LICENSE file. true ++ Autoupdate enabled ++ Autoupdate disabled + https://www.bromite.org/custom-filters + Proxy configuration @@ -235,19 +237,19 @@ new file mode 100644 + + -+ -+ ++ android:summaryOn="@string/adblock_on" ++ android:summaryOff="@string/adblock_off" /> + + + ++ ++ + diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml --- a/chrome/android/java/res/xml/main_preferences.xml @@ -323,7 +325,7 @@ new file mode 100644 + + @Override + public void onTextChanged(CharSequence s, int start, int before, int count) { -+ mSaveButton.setEnabled(s.length() != 0); ++ mSaveButton.setEnabled(true); // was (s.length() != 0); + mResetButton.setEnabled(true); + } + @@ -364,7 +366,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/AdBloc new file mode 100644 --- /dev/null +++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/AdBlockPreferences.java -@@ -0,0 +1,61 @@ +@@ -0,0 +1,58 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -400,15 +402,12 @@ new file mode 100644 + getActivity().setTitle(R.string.options_adblock_title); + SettingsUtils.addPreferencesFromResource(this, R.xml.adblock_preferences); + -+ BrowserContextHandle browserContextHandle = -+ getSiteSettingsDelegate().getBrowserContextHandle(); -+ + ChromeSwitchPreference mAdBlockSwitch = + (ChromeSwitchPreference) findPreference(PREF_ADBLOCK_SWITCH); -+ boolean isAdBlockEnabled = !WebsitePreferenceBridge.isCategoryEnabled(browserContextHandle, ContentSettingsType.ADS); ++ boolean isAdBlockEnabled = AdBlockNativeGateway.getAdBlockEnabled(); + mAdBlockSwitch.setChecked(isAdBlockEnabled); + mAdBlockSwitch.setOnPreferenceChangeListener((preference, newValue) -> { -+ WebsitePreferenceBridge.setCategoryEnabled(browserContextHandle, ContentSettingsType.ADS, !(boolean) newValue); ++ AdBlockNativeGateway.setAdBlockEnabled((boolean) newValue); + return true; + }); + @@ -512,7 +511,7 @@ diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h 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 -@@ -1134,6 +1134,26 @@ BrowserProcessImpl::component_updater() { +@@ -1134,6 +1134,27 @@ BrowserProcessImpl::component_updater() { return component_updater_.get(); } @@ -531,6 +530,7 @@ diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_pro + g_browser_process->system_network_context_manager()->GetSharedURLLoaderFactory(), + std::move(scheduler), + g_browser_process->subresource_filter_ruleset_service(), ++ local_state()->GetBoolean(prefs::kAdBlockEnabled), + local_state()->GetString(prefs::kAdBlockFiltersURL)); + + return adblock_updater_.get(); @@ -602,7 +602,7 @@ diff --git a/chrome/browser/flags/android/adblock_native_gateway.cc b/chrome/bro new file mode 100755 --- /dev/null +++ b/chrome/browser/flags/android/adblock_native_gateway.cc -@@ -0,0 +1,21 @@ +@@ -0,0 +1,31 @@ +#include "chrome/browser/flags/jni_headers/AdBlockNativeGateway_jni.h" + +#include "base/android/jni_string.h" @@ -624,11 +624,21 @@ new file mode 100755 + g_browser_process->local_state()->SetString(prefs::kAdBlockFiltersURL, + base::android::ConvertJavaStringToUTF8(env, url)); +} ++ ++static jboolean JNI_AdBlockNativeGateway_GetAdBlockEnabled( ++ JNIEnv* env) { ++ return g_browser_process->local_state()->GetBoolean(prefs::kAdBlockEnabled); ++} ++ ++static void JNI_AdBlockNativeGateway_SetAdBlockEnabled( ++ JNIEnv* env, jboolean enabled) { ++ g_browser_process->local_state()->SetBoolean(prefs::kAdBlockEnabled, enabled); ++} diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/AdBlockNativeGateway.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/AdBlockNativeGateway.java new file mode 100755 --- /dev/null +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/AdBlockNativeGateway.java -@@ -0,0 +1,20 @@ +@@ -0,0 +1,30 @@ +package org.chromium.chrome.browser.flags; + +import org.jni_zero.CalledByNative; @@ -643,19 +653,34 @@ new file mode 100755 + return AdBlockNativeGatewayJni.get().getAdBlockFiltersURL(); + } + ++ public static void setAdBlockEnabled(boolean enabled) { ++ AdBlockNativeGatewayJni.get().setAdBlockEnabled(enabled); ++ } ++ ++ public static boolean getAdBlockEnabled() { ++ return AdBlockNativeGatewayJni.get().getAdBlockEnabled(); ++ } ++ + @NativeMethods + interface Natives { + void setAdBlockFiltersURL(String url); + String getAdBlockFiltersURL(); ++ void setAdBlockEnabled(boolean enabled); ++ boolean getAdBlockEnabled(); + } +} 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 -@@ -609,6 +609,9 @@ SystemNetworkContextManager::~SystemNetworkContextManager() { +@@ -609,6 +609,14 @@ SystemNetworkContextManager::~SystemNetworkContextManager() { void SystemNetworkContextManager::RegisterPrefs(PrefRegistrySimple* registry) { StubResolverConfigReader::RegisterPrefs(registry); ++#if BUILDFLAG(IS_ANDROID) ++ registry->RegisterBooleanPref(prefs::kAdBlockEnabled, true); ++#else ++ registry->RegisterBooleanPref(prefs::kAdBlockEnabled, false); ++#endif + registry->RegisterStringPref(prefs::kAdBlockFiltersURL, + "https://www.bromite.org/filters/filters.dat"); + @@ -705,12 +730,14 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h -@@ -2625,6 +2625,9 @@ inline constexpr char kAudioCaptureAllowed[] = "hardware.audio_capture_enabled"; +@@ -2625,6 +2625,11 @@ inline constexpr char kAudioCaptureAllowed[] = "hardware.audio_capture_enabled"; inline constexpr char kAudioCaptureAllowedUrls[] = "hardware.audio_capture_allowed_urls"; +// Holds the URL to an indexed subresource filters file. +inline constexpr char kAdBlockFiltersURL[] = "adblock.filters_url"; ++ ++inline constexpr char kAdBlockEnabled[] = "adblock.enabled"; + // A pref holding the value of the policy used to explicitly allow or deny // access to video capture devices. When enabled or not set, the user is @@ -756,7 +783,7 @@ diff --git a/components/component_updater/adblock_updater_service.cc b/component new file mode 100644 --- /dev/null +++ b/components/component_updater/adblock_updater_service.cc -@@ -0,0 +1,268 @@ +@@ -0,0 +1,281 @@ +/* + This file is part of Bromite. + @@ -800,9 +827,16 @@ new file mode 100644 + next_check_delay = 60*60*24*7, // 1 week + on_demand_check_delay = 60; // minimum 1 minute between each on-demand check + -+AdBlockUpdaterService::AdBlockUpdaterService(scoped_refptr shared_url_network_factory, std::unique_ptr scheduler, -+ subresource_filter::RulesetService* ruleset_service, std::string filters_url) -+ : ruleset_service_(ruleset_service), shared_url_network_factory_(shared_url_network_factory), scheduler_(std::move(scheduler)) { ++AdBlockUpdaterService::AdBlockUpdaterService( ++ scoped_refptr shared_url_network_factory, ++ std::unique_ptr scheduler, ++ subresource_filter::RulesetService* ruleset_service, ++ bool enabled, ++ std::string filters_url) ++ : ruleset_service_(ruleset_service), ++ shared_url_network_factory_(shared_url_network_factory), ++ scheduler_(std::move(scheduler)), ++ enabled_(enabled) { + DCHECK(ruleset_service); + + filters_url_ = filters_url; @@ -861,6 +895,11 @@ new file mode 100644 +bool AdBlockUpdaterService::OnDemandUpdateAsNeeded(bool is_foreground, Callback on_finished) { + DCHECK(thread_checker_.CalledOnValidThread()); + ++ if (!enabled_) { ++ LOG(INFO) << "AdBlockUpdaterService: update is disabled."; ++ return false; ++ } ++ + // Check if the request is too early + if (!last_update_.is_null()) { + base::TimeDelta delta = @@ -940,22 +979,23 @@ new file mode 100644 + } + + last_update_ = base::TimeTicks::Now(); -+ auto task = base::MakeRefCounted( -+ shared_url_network_factory_, -+ is_foreground, filters_url_, -+ min_last_modified, -+ base::BindOnce(&AdBlockUpdaterService::OnUpdateComplete, base::Unretained(this), -+ std::move(on_finished))); -+ -+ // run task now; task is responsible for downloading the filters (if Last-Modified header is more recent) -+ // and then clearing the 'is_updating' status -+ base::SequencedTaskRunner::GetCurrentDefault()->PostTask(FROM_HERE, -+ base::BindOnce(&DownloadFiltersTask::Run, base::Unretained(task.get()))); -+ tasks_.insert(task); -+ -+ base::SequencedTaskRunner::GetCurrentDefault()->PostTask( -+ FROM_HERE, base::BindOnce(&AdBlockUpdaterService::NotifyObservers, base::Unretained(this), Event::ADBLOCK_UPDATE_DOWNLOADING)); ++ if (!filters_url_.empty()) { ++ auto task = base::MakeRefCounted( ++ shared_url_network_factory_, ++ is_foreground, filters_url_, ++ min_last_modified, ++ base::BindOnce(&AdBlockUpdaterService::OnUpdateComplete, base::Unretained(this), ++ std::move(on_finished))); ++ ++ // run task now; task is responsible for downloading the filters (if Last-Modified header is more recent) ++ // and then clearing the 'is_updating' status ++ base::SequencedTaskRunner::GetCurrentDefault()->PostTask(FROM_HERE, ++ base::BindOnce(&DownloadFiltersTask::Run, base::Unretained(task.get()))); ++ tasks_.insert(task); + ++ base::SequencedTaskRunner::GetCurrentDefault()->PostTask( ++ FROM_HERE, base::BindOnce(&AdBlockUpdaterService::NotifyObservers, base::Unretained(this), Event::ADBLOCK_UPDATE_DOWNLOADING)); ++ } + return true; +} + @@ -1029,7 +1069,7 @@ diff --git a/components/component_updater/adblock_updater_service.h b/components new file mode 100644 --- /dev/null +++ b/components/component_updater/adblock_updater_service.h -@@ -0,0 +1,98 @@ +@@ -0,0 +1,103 @@ +/* + This file is part of Bromite. + @@ -1085,8 +1125,12 @@ new file mode 100644 +// All methods are safe to call ONLY from the browser's main thread. +class AdBlockUpdaterService { + public: -+ AdBlockUpdaterService(scoped_refptr shared_url_network_factory, std::unique_ptr scheduler, -+ subresource_filter::RulesetService* ruleset_service, std::string filters_url); ++ AdBlockUpdaterService( ++ scoped_refptr shared_url_network_factory, ++ std::unique_ptr scheduler, ++ subresource_filter::RulesetService* ruleset_service, ++ bool enabled, ++ std::string filters_url); + ~AdBlockUpdaterService(); + + // Adds an observer for this class. An observer should not be added more @@ -1120,6 +1164,7 @@ new file mode 100644 + scoped_refptr shared_url_network_factory_; + std::unique_ptr scheduler_; + ++ bool enabled_; + bool is_updating_ = false; + bool scheduled_ = false; + std::set> tasks_; From f3f0781b71509157091535fca618318ffa637b26 Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 6 Dec 2023 13:37:06 +0100 Subject: [PATCH 13/19] Disable SpeculationRulesPrefetchProxy --- build/patches/Disable-all-predictors-code.patch | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/build/patches/Disable-all-predictors-code.patch b/build/patches/Disable-all-predictors-code.patch index daa319c12..a17fac416 100644 --- a/build/patches/Disable-all-predictors-code.patch +++ b/build/patches/Disable-all-predictors-code.patch @@ -28,8 +28,8 @@ 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 | 2 +- - 24 files changed, 76 insertions(+), 41 deletions(-) + .../platform/runtime_enabled_features.json5 | 6 ++-- + 24 files changed, 78 insertions(+), 43 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 @@ -493,5 +493,17 @@ 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 From dad28f9e4178390e4e8224ef2b3022ffb359201e Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 6 Dec 2023 13:37:52 +0100 Subject: [PATCH 14/19] Disable kPrivacySandboxFirstPartySetsUI FPS are disabled by default --- build/patches/Disable-FLoC-and-privacy-sandbox.patch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build/patches/Disable-FLoC-and-privacy-sandbox.patch b/build/patches/Disable-FLoC-and-privacy-sandbox.patch index 6ceb7206b..c0bcf0ddd 100644 --- a/build/patches/Disable-FLoC-and-privacy-sandbox.patch +++ b/build/patches/Disable-FLoC-and-privacy-sandbox.patch @@ -14,10 +14,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../privacy_sandbox/privacy_sandbox_prompt.cc | 1 + .../history/core/browser/history_backend.cc | 13 +--------- .../privacy_sandbox_attestations.cc | 2 -- - .../privacy_sandbox_features.cc | 4 ++++ + .../privacy_sandbox_features.cc | 5 ++++ .../privacy_sandbox/privacy_sandbox_prefs.cc | 4 ++-- .../privacy_sandbox_settings_impl.cc | 24 +++++++++++++------ - 8 files changed, 29 insertions(+), 23 deletions(-) + 8 files changed, 30 insertions(+), 23 deletions(-) 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 @@ -92,7 +92,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_attestations/privacy_san 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,8 @@ BASE_FEATURE(kAttributionDebugReportingCookieDeprecationTesting, +@@ -144,4 +144,9 @@ BASE_FEATURE(kAttributionDebugReportingCookieDeprecationTesting, "AttributionDebugReportingCookieDeprecationTesting", base::FEATURE_DISABLED_BY_DEFAULT); @@ -100,6 +100,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_features.cc b/components +SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxSettings3); +SET_CROMITE_FEATURE_ENABLED(kDisablePrivacySandboxPrompts); +SET_CROMITE_FEATURE_DISABLED(kEnforcePrivacySandboxAttestations); ++SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxFirstPartySetsUI); } // namespace privacy_sandbox diff --git a/components/privacy_sandbox/privacy_sandbox_prefs.cc b/components/privacy_sandbox/privacy_sandbox_prefs.cc --- a/components/privacy_sandbox/privacy_sandbox_prefs.cc From 74f8fa716fe81b184018c4c28851609076022022 Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 6 Dec 2023 13:38:37 +0100 Subject: [PATCH 15/19] use new style for flags --- .../Remove-segmentation-platform.patch | 34 +++++-------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/build/patches/Remove-segmentation-platform.patch b/build/patches/Remove-segmentation-platform.patch index 31dd5ac3f..37a5b4010 100644 --- a/build/patches/Remove-segmentation-platform.patch +++ b/build/patches/Remove-segmentation-platform.patch @@ -7,9 +7,9 @@ Also fixes a crash on startup. 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 --- - ...rome_browser_main_extra_parts_segmentation_platform.cc | 4 ++++ - components/segmentation_platform/public/features.cc | 8 ++------ - 2 files changed, 6 insertions(+), 6 deletions(-) + .../chrome_browser_main_extra_parts_segmentation_platform.cc | 4 ++++ + components/segmentation_platform/public/features.cc | 2 ++ + 2 files changed, 6 insertions(+) diff --git a/chrome/browser/segmentation_platform/chrome_browser_main_extra_parts_segmentation_platform.cc b/chrome/browser/segmentation_platform/chrome_browser_main_extra_parts_segmentation_platform.cc --- a/chrome/browser/segmentation_platform/chrome_browser_main_extra_parts_segmentation_platform.cc @@ -45,28 +45,12 @@ diff --git a/chrome/browser/segmentation_platform/chrome_browser_main_extra_part diff --git a/components/segmentation_platform/public/features.cc b/components/segmentation_platform/public/features.cc --- a/components/segmentation_platform/public/features.cc +++ b/components/segmentation_platform/public/features.cc -@@ -9,8 +9,8 @@ - namespace segmentation_platform::features { +@@ -128,4 +128,6 @@ BASE_FEATURE(kSegmentationPlatformModelInitializationDelay, + "SegmentationPlatformModelInitializationDelay", + base::FEATURE_ENABLED_BY_DEFAULT); - BASE_FEATURE(kSegmentationPlatformFeature, -- "SegmentationPlatform", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "SegmentationPlatform", // disabled by default -+ base::FEATURE_DISABLED_BY_DEFAULT); // in Bromite - - BASE_FEATURE(kSegmentationPlatformUkmEngine, - "SegmentationPlatformUkmEngine", -@@ -42,11 +42,7 @@ BASE_FEATURE(kSegmentationPlatformDeviceSwitcher, - - BASE_FEATURE(kSegmentationPlatformFeedSegmentFeature, - "SegmentationPlatformFeedSegmentFeature", --#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) -- base::FEATURE_ENABLED_BY_DEFAULT); --#else - base::FEATURE_DISABLED_BY_DEFAULT); --#endif - - BASE_FEATURE(kResumeHeavyUserSegmentFeature, - "ResumeHeavyUserSegment", ++SET_CROMITE_FEATURE_DISABLED(kSegmentationPlatformFeature); ++SET_CROMITE_FEATURE_DISABLED(kSegmentationPlatformFeedSegmentFeature); + } // namespace segmentation_platform::features -- 2.25.1 From 7998846c205aa0683565546ec3fcf4746f9c2701 Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 6 Dec 2023 13:44:19 +0100 Subject: [PATCH 16/19] Improve the browser sandbox by using the new flags on android and renamed the patch name --- build/bromite_patches_list.txt | 2 +- ...atch => Improve-the-browser-sandbox.patch} | 31 ++++++++++--------- 2 files changed, 17 insertions(+), 16 deletions(-) rename build/patches/{00WIN-Enable-Network-Service-Sandbox-and-CIG.patch => Improve-the-browser-sandbox.patch} (58%) diff --git a/build/bromite_patches_list.txt b/build/bromite_patches_list.txt index 541e3b544..fb76e9546 100644 --- a/build/bromite_patches_list.txt +++ b/build/bromite_patches_list.txt @@ -206,7 +206,7 @@ AudioBuffer-AnalyserNode-fp-mitigations.patch 00Disable-visited-pseudo-class.patch 00Add-setting-to-clear-data-on-exit.patch 00WIN-Disable-sharing-hub.patch -00WIN-Enable-Network-Service-Sandbox-and-CIG.patch +Improve-the-browser-sandbox.patch 00Disable-csp-reports.patch 00Fonts-fingerprinting-mitigation.patch 00Keyboard-protection-flag.patch diff --git a/build/patches/00WIN-Enable-Network-Service-Sandbox-and-CIG.patch b/build/patches/Improve-the-browser-sandbox.patch similarity index 58% rename from build/patches/00WIN-Enable-Network-Service-Sandbox-and-CIG.patch rename to build/patches/Improve-the-browser-sandbox.patch index 833c33838..0432fa485 100644 --- a/build/patches/00WIN-Enable-Network-Service-Sandbox-and-CIG.patch +++ b/build/patches/Improve-the-browser-sandbox.patch @@ -1,12 +1,15 @@ From: uazo Date: Fri, 17 Feb 2023 16:23:20 +0000 -Subject: WIN Enable Network Service Sandbox and CIG +Subject: Improve the browser sandbox + +by enabling network service sandbox and CIG in windows and +using the new flags on android License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- chrome/browser/chrome_content_browser_client.cc | 2 +- - sandbox/policy/features.cc | 6 +++++- - 2 files changed, 6 insertions(+), 2 deletions(-) + sandbox/policy/features.cc | 7 +++++++ + 2 files changed, 8 insertions(+), 1 deletion(-) 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 @@ -23,19 +26,17 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch diff --git a/sandbox/policy/features.cc b/sandbox/policy/features.cc --- a/sandbox/policy/features.cc +++ b/sandbox/policy/features.cc -@@ -18,8 +18,12 @@ namespace sandbox::policy::features { - // Enables network service sandbox. - // (Only causes an effect when feature kNetworkServiceInProcess is disabled.) - BASE_FEATURE(kNetworkServiceSandbox, -- "NetworkServiceSandbox", -+ "NetworkServiceSandbox", // enabled only in windows +@@ -194,4 +194,11 @@ bool IsNetworkSandboxEnabled() { + #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) + } + ++#if BUILDFLAG(IS_ANDROID) ++SET_CROMITE_FEATURE_ENABLED(kUseRendererProcessPolicy); ++SET_CROMITE_FEATURE_ENABLED(kRestrictRendererPoliciesInBaseline); ++#endif +#if BUILDFLAG(IS_WIN) -+ base::FEATURE_ENABLED_BY_DEFAULT); -+#else - base::FEATURE_DISABLED_BY_DEFAULT); ++SET_CROMITE_FEATURE_ENABLED(kNetworkServiceSandbox); +#endif - - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) - // Enables a fine-grained seccomp-BPF syscall filter for the network service. + } // namespace sandbox::policy::features -- 2.25.1 From 76b7e1415a38994d80d4e9521a7db5d0e3d32398 Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 6 Dec 2023 13:46:37 +0100 Subject: [PATCH 17/19] #586 Add a new flag for kPartialLowEndModeOnMidRangeDevices --- build/bromite_patches_list.txt | 1 + ...tialLowEndModeOnMidRangeDevices-flag.patch | 55 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 build/patches/00Add-PartialLowEndModeOnMidRangeDevices-flag.patch diff --git a/build/bromite_patches_list.txt b/build/bromite_patches_list.txt index fb76e9546..d8b802ae5 100644 --- a/build/bromite_patches_list.txt +++ b/build/bromite_patches_list.txt @@ -275,6 +275,7 @@ Timezone-customization.patch 00Disable-Real-Box.patch 00Always-allow-inspect-fallback.patch 00Add-cromite-flags-support.patch +00Add-PartialLowEndModeOnMidRangeDevices-flag.patch 00Temp-PerformanceNavigationTiming-privacy-fix.patch 00Temp-disable-predictive-back-gesture.patch diff --git a/build/patches/00Add-PartialLowEndModeOnMidRangeDevices-flag.patch b/build/patches/00Add-PartialLowEndModeOnMidRangeDevices-flag.patch new file mode 100644 index 000000000..f242fb332 --- /dev/null +++ b/build/patches/00Add-PartialLowEndModeOnMidRangeDevices-flag.patch @@ -0,0 +1,55 @@ +From: uazo +Date: Wed, 6 Dec 2023 10:21:45 +0000 +Subject: Add PartialLowEndModeOnMidRangeDevices flag + +adds a new flag in chrome://flags to re-enable the experiment + +License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html +--- + base/features.cc | 3 +++ + chrome/browser/about_flags.cc | 1 + + .../Add-PartialLowEndModeOnMidRangeDevices-flag.inc | 12 ++++++++++++ + 3 files changed, 16 insertions(+) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Add-PartialLowEndModeOnMidRangeDevices-flag.inc + +diff --git a/base/features.cc b/base/features.cc +--- a/base/features.cc ++++ b/base/features.cc +@@ -67,4 +67,7 @@ BASE_FEATURE(kCollectAndroidFrameTimelineMetrics, + base::FEATURE_DISABLED_BY_DEFAULT); + #endif // BUILDFLAG(IS_ANDROID) + ++#if BUILDFLAG(IS_ANDROID) ++SET_CROMITE_FEATURE_DISABLED(kPartialLowEndModeOnMidRangeDevices); ++#endif + } // namespace base::features +diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc +--- a/chrome/browser/about_flags.cc ++++ b/chrome/browser/about_flags.cc +@@ -16,6 +16,7 @@ + #include "base/base_switches.h" + #include "base/command_line.h" + #include "base/feature_list.h" ++#include "base/features.h" + #include "base/functional/bind.h" + #include "base/functional/callback.h" + #include "base/i18n/base_i18n_switches.h" +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Add-PartialLowEndModeOnMidRangeDevices-flag.inc b/cromite_flags/chrome/browser/about_flags_cc/Add-PartialLowEndModeOnMidRangeDevices-flag.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Add-PartialLowEndModeOnMidRangeDevices-flag.inc +@@ -0,0 +1,12 @@ ++#if BUILDFLAG(IS_ANDROID) ++ ++#ifdef FLAG_SECTION ++ ++ {"partial-lowendmode-on-midrange-devices", ++ "Partial Low End Mode On Mid Range Devices", ++ "Enables the LowEndDeviceMode experiment in devices with 4-6 gb of ram.", ++ kOsAndroid, FEATURE_VALUE_TYPE(base::features::kPartialLowEndModeOnMidRangeDevices)}, ++ ++#endif ++ ++#endif +-- +2.25.1 From 51e31406dc8e9251b51907c9956f915112523446 Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 6 Dec 2023 13:47:27 +0100 Subject: [PATCH 18/19] bump to 120.0.6099.63 --- build/RELEASE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/RELEASE b/build/RELEASE index 695728112..38888494b 100644 --- a/build/RELEASE +++ b/build/RELEASE @@ -1 +1 @@ -120.0.6099.56 \ No newline at end of file +120.0.6099.63 \ No newline at end of file From f81260b38f45dac2fcc3b60f5f88fd579f0005cd Mon Sep 17 00:00:00 2001 From: uazo Date: Wed, 6 Dec 2023 12:52:15 +0000 Subject: [PATCH 19/19] AUTOMATED - git apply results --- build/patches/00Add-a-flag-to-disable-GamePad-API.patch | 4 ++-- build/patches/00Add-cromite-flags-support.patch | 4 ++-- build/patches/00Add-support-to-jxl.patch | 2 +- build/patches/AImageReader-CFI-crash-mitigations.patch | 2 +- build/patches/Enable-Certificate-Transparency.patch | 4 ++-- .../Keep-flag-to-allow-screenshots-in-Incognito-mode.patch | 2 +- .../Remove-HTTP-referrals-in-cross-origin-navigation.patch | 2 +- build/patches/Restore-Search-Ready-Omnibox-flag.patch | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) 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 6e944779c..0b029af6e 100644 --- a/build/patches/00Add-a-flag-to-disable-GamePad-API.patch +++ b/build/patches/00Add-a-flag-to-disable-GamePad-API.patch @@ -14,7 +14,7 @@ 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 -@@ -6879,9 +6879,9 @@ +@@ -6884,9 +6884,9 @@ "expiry_milestone": 121 }, { @@ -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 -@@ -2995,7 +2995,7 @@ const char kResetShortcutCustomizationsDescription[] = +@@ -3001,7 +3001,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 07a56600f..65c38fa47 100644 --- a/build/patches/00Add-cromite-flags-support.patch +++ b/build/patches/00Add-cromite-flags-support.patch @@ -1187,7 +1187,7 @@ diff --git a/services/network/public/cpp/features.h b/services/network/public/cp diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc --- a/third_party/blink/common/features.cc +++ b/third_party/blink/common/features.cc -@@ -2218,5 +2218,6 @@ bool IsKeepAliveURLLoaderServiceEnabled() { +@@ -2222,5 +2222,6 @@ bool IsKeepAliveURLLoaderServiceEnabled() { base::FeatureList::IsEnabled(kFetchLaterAPI); } @@ -1197,7 +1197,7 @@ diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/fea diff --git a/third_party/blink/public/common/features.h b/third_party/blink/public/common/features.h --- a/third_party/blink/public/common/features.h +++ b/third_party/blink/public/common/features.h -@@ -1424,6 +1424,7 @@ BLINK_COMMON_EXPORT bool IsKeepAliveURLLoaderServiceEnabled(); +@@ -1427,6 +1427,7 @@ BLINK_COMMON_EXPORT bool IsKeepAliveURLLoaderServiceEnabled(); BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE( kRemoveAuthroizationOnCrossOriginRedirect); diff --git a/build/patches/00Add-support-to-jxl.patch b/build/patches/00Add-support-to-jxl.patch index bf3a3bad2..d651138ed 100644 --- a/build/patches/00Add-support-to-jxl.patch +++ b/build/patches/00Add-support-to-jxl.patch @@ -2661,7 +2661,7 @@ diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums -@@ -66332,6 +66332,7 @@ from previous Chrome versions. +@@ -66334,6 +66334,7 @@ from previous Chrome versions. diff --git a/build/patches/AImageReader-CFI-crash-mitigations.patch b/build/patches/AImageReader-CFI-crash-mitigations.patch index 4e995682f..ba2ce8fac 100644 --- a/build/patches/AImageReader-CFI-crash-mitigations.patch +++ b/build/patches/AImageReader-CFI-crash-mitigations.patch @@ -86,7 +86,7 @@ diff --git a/base/android/android_image_reader_compat.h b/base/android/android_i 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 -@@ -2837,9 +2837,9 @@ +@@ -2842,9 +2842,9 @@ "expiry_milestone": 125 }, { diff --git a/build/patches/Enable-Certificate-Transparency.patch b/build/patches/Enable-Certificate-Transparency.patch index 85f82655e..351df39cb 100644 --- a/build/patches/Enable-Certificate-Transparency.patch +++ b/build/patches/Enable-Certificate-Transparency.patch @@ -37,7 +37,7 @@ 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 -@@ -981,7 +981,6 @@ void SystemNetworkContextManager::SetEnableCertificateTransparencyForTesting( +@@ -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(); @@ -45,7 +45,7 @@ diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/brows // 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: -@@ -989,10 +988,7 @@ bool SystemNetworkContextManager::IsCertificateTransparencyEnabled() { +@@ -994,10 +993,7 @@ bool SystemNetworkContextManager::IsCertificateTransparencyEnabled() { // - on an opt-in basis for other builds and embedders, controlled with the // kCertificateTransparencyAskBeforeEnabling flag return base::FeatureList::IsEnabled( diff --git a/build/patches/Keep-flag-to-allow-screenshots-in-Incognito-mode.patch b/build/patches/Keep-flag-to-allow-screenshots-in-Incognito-mode.patch index 5039a7b5f..5b4055056 100644 --- a/build/patches/Keep-flag-to-allow-screenshots-in-Incognito-mode.patch +++ b/build/patches/Keep-flag-to-allow-screenshots-in-Incognito-mode.patch @@ -15,7 +15,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 -@@ -4694,9 +4694,9 @@ +@@ -4699,9 +4699,9 @@ "expiry_milestone": 120 }, { diff --git a/build/patches/Remove-HTTP-referrals-in-cross-origin-navigation.patch b/build/patches/Remove-HTTP-referrals-in-cross-origin-navigation.patch index 88242c868..cbc164416 100644 --- a/build/patches/Remove-HTTP-referrals-in-cross-origin-navigation.patch +++ b/build/patches/Remove-HTTP-referrals-in-cross-origin-navigation.patch @@ -381,7 +381,7 @@ diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/brows pref_change_registrar_.Add( prefs::kExplicitlyAllowedNetworkPorts, base::BindRepeating( -@@ -653,6 +656,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRegistrySimple* registry) { +@@ -658,6 +661,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRegistrySimple* registry) { // the system NetworkContext, and the per-profile pref values are used for // the profile NetworkContexts. registry->RegisterBooleanPref(prefs::kEnableReferrers, true); diff --git a/build/patches/Restore-Search-Ready-Omnibox-flag.patch b/build/patches/Restore-Search-Ready-Omnibox-flag.patch index 99269db70..b2c96383d 100644 --- a/build/patches/Restore-Search-Ready-Omnibox-flag.patch +++ b/build/patches/Restore-Search-Ready-Omnibox-flag.patch @@ -66,7 +66,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow } mHeaderProcessor = new HeaderProcessor(context); - registerSuggestionProcessor( -+ mEditUrlSuggestionProcessor = ++ mEditUrlSuggestionProcessor = new EditUrlSuggestionProcessor( - context, host, mImageSupplier, mActivityTabSupplier, shareSupplier)); + context, host, mImageSupplier, mActivityTabSupplier, shareSupplier);