diff --git a/build/RELEASE b/build/RELEASE index 38afa620d..6342d569c 100644 --- a/build/RELEASE +++ b/build/RELEASE @@ -1 +1 @@ -120.0.6099.230 +121.0.6167.75 \ No newline at end of file diff --git a/build/cromite.gn_args b/build/cromite.gn_args index 39ec5d2ea..050dd8bc2 100644 --- a/build/cromite.gn_args +++ b/build/cromite.gn_args @@ -61,8 +61,13 @@ enable_jxl_decoder = true # see https://github.com/uazo/cromite/issues/697 use_minikin_hyphenation = false +# disable automatic update of sync-related cookies +# initial commit: https://source.chromium.org/chromium/chromium/src/+/fd9a841f7a63b9f5510f6b713d9c833d259c63ad +enable_bound_session_credentials = false + declare_args() { _is_debug_build = "" + build_webview = false } not_needed(["_target_build", "_is_debug_build"]) @@ -76,7 +81,8 @@ if (target_os == "android") { #enable_kythe_annotations = true chrome_public_manifest_package = "org.cromite.cromite" - system_webview_package_name="org.cromite.webview" + system_webview_package_name="org.cromite.webview" #"com.android.webview" + system_webview_shell_package_name="org.cromite.webview_shell" if (getenv("USE_KEYSTORE") != "") { android_keystore_path = "/home/lg/working_dir/cromite.keystore" @@ -98,6 +104,11 @@ if (target_os == "android") { } else { generate_linker_map = true } + + if (build_webview) { + # only 64bit + skip_secondary_abi_for_cq = true + } } if (target_os == "win") { diff --git a/build/cromite_patches_list.txt b/build/cromite_patches_list.txt index 25a9584a9..2c60c1a36 100644 --- a/build/cromite_patches_list.txt +++ b/build/cromite_patches_list.txt @@ -150,7 +150,7 @@ Add-flag-for-save-data-header.patch Disable-UA-full-version.patch Dictionary-suggestions-for-the-Omnibox.patch Disable-AsyncDNS-by-default.patch -00Restore-LastTabStandingTracker.patch +Restore-LastTabStandingTracker.patch Add-lifetime-options-for-permissions.patch Disable-crash-reporting.patch Samsung-Note-9-SDK27-crazylinker-workaround.patch @@ -181,56 +181,56 @@ Enable-third-party-storage-partitioning.patch Restore-adaptive-button-in-top-toolbar-customization.patch Add-kill-switch-for-unsupported-clangd-flags.patch -00WIN-enable-pdf-plugin.patch -00WIN-disable-annotate-downloads.patch -00WIN-enable-HighEfficiencyMode-by-default.patch -00WIN-enable-file-system-access-blocklist.patch -00WIN-Disable-TabHoverCard-images.patch -00WIN-Fix-log-to-file.patch -00WIN-Disable-updater.patch -00WIN-Disable-first-run.patch -00WIN-Add-some-prefs-to-secure-preferences.patch -00WIN-Disable-search-for-image.patch +WIN-enable-pdf-plugin.patch +WIN-disable-annotate-downloads.patch +WIN-enable-HighEfficiencyMode-by-default.patch +WIN-enable-file-system-access-blocklist.patch +WIN-Disable-TabHoverCard-images.patch +WIN-Fix-log-to-file.patch +WIN-Disable-updater.patch +WIN-Disable-first-run.patch +WIN-Add-some-prefs-to-secure-preferences.patch +WIN-Disable-search-for-image.patch AudioBuffer-AnalyserNode-fp-mitigations.patch -00Disable-Component-Updates.patch -00add-browser-policy.patch -00Always-open-browser-controls-in-new-tab.patch -00Partitioning-all-cookies-by-top-frame-domain.patch -00Disable-FedCm.patch -00Disable-BackForwardCache.patch -00Evict-the-entire-FrameTree-like-desktop.patch -00Disable-visited-pseudo-class.patch -00Add-setting-to-clear-data-on-exit.patch -00WIN-Disable-sharing-hub.patch +Disable-Component-Updates.patch +add-browser-policy.patch +Always-open-browser-controls-in-new-tab.patch +Partitioning-all-cookies-by-top-frame-domain.patch +Disable-FedCm.patch +Disable-BackForwardCache.patch +Evict-the-entire-FrameTree-like-desktop.patch +Disable-visited-pseudo-class.patch +Add-setting-to-clear-data-on-exit.patch +WIN-Disable-sharing-hub.patch Improve-the-browser-sandbox.patch -00Disable-csp-reports.patch -00Fonts-fingerprinting-mitigation.patch -00Keyboard-protection-flag.patch -00Disable-privacy-issues-in-password-manager.patch -00Partition-HSTS-cache-by-NAK.patch -00Warning-message-for-unsupported-hardware-aes.patch -00Enable-Document-Open-Inheritance-Removal.patch -00Add-setting-to-invert-tap-and-long-tap.patch -00Remove-ChromiumNetworkAdapter.patch -00Internal-firewall.patch -00Disable-devtools-remote-and-custom-protocols.patch -00Remove-detection-of-captive-portals.patch -00Disable-SHA1-Server-Signature.patch -00Remove-auth-header-upon-cross-origin-redirect.patch -00Clear-CORS-Preflight-Cache-on-clearing-data.patch -00Multi-Screen-Window-Placement-API-fix.patch -00Remove-https-connection-from-chrome-discards.patch -00Add-a-flag-to-disable-GamePad-API.patch -00Disable-WebGPU.patch -00Disable-FirstPartySets-and-StorageAccessAPI.patch -00Disable-GetInstalledRelatedApps-API.patch -00Disable-GSA-by-default.patch -00Disable-PrivateStateTokens-API.patch -00Disallowing-MIDI-permission-by-default.patch -00Disable-Compression-Dictionary-Transport.patch -00Disallow-Android-App-Scheme-as-referrer.patch -00Deprecate-Data-URL-in-SVGUseElement.patch +Disable-csp-reports.patch +Fonts-fingerprinting-mitigation.patch +Keyboard-protection-flag.patch +Disable-privacy-issues-in-password-manager.patch +Partition-HSTS-cache-by-NAK.patch +Warning-message-for-unsupported-hardware-aes.patch +Enable-Document-Open-Inheritance-Removal.patch +Add-setting-to-invert-tap-and-long-tap.patch +Remove-ChromiumNetworkAdapter.patch +Internal-firewall.patch +Disable-devtools-remote-and-custom-protocols.patch +Remove-detection-of-captive-portals.patch +Disable-SHA1-Server-Signature.patch +Remove-auth-header-upon-cross-origin-redirect.patch +Clear-CORS-Preflight-Cache-on-clearing-data.patch +Multi-Screen-Window-Placement-API-fix.patch +Remove-https-connection-from-chrome-discards.patch +Add-a-flag-to-disable-GamePad-API.patch +Disable-WebGPU.patch +Disable-FirstPartySets-and-StorageAccessAPI.patch +Disable-GetInstalledRelatedApps-API.patch +Disable-GSA-by-default.patch +Disable-PrivateStateTokens-API.patch +Disallowing-MIDI-permission-by-default.patch +Disable-Compression-Dictionary-Transport.patch +Disallow-Android-App-Scheme-as-referrer.patch +Deprecate-Data-URL-in-SVGUseElement.patch Content-settings-infrastructure.patch Add-autoplay-site-setting.patch Site-setting-for-images.patch @@ -240,56 +240,57 @@ Add-webRTC-site-settings.patch Show-site-settings-for-cookies-javascript-and-ads.patch Viewport-Protection-flag.patch Timezone-customization.patch -00Disable-speechSynthesis-getVoices-API.patch -00Remove-support-for-device-memory-and-cpu-recovery.patch -00Log-dangling-attributes-in-some-html-elements.patch -00Keep-Side-Panel-Companion-disabled.patch -00Lock-Profile-Cookie-Database.patch -00Show-warnings-on-downloads-over-HTTP.patch -00Compress-libchrome-to-free-up-some-space.patch -00Cromite-Branding.patch -00Disable-Feeback-Collector.patch -00Disable-remote-altsvc-for-h3-connections.patch -00do-not-block-build-incompatible-profiles.patch -00Allow-DocumentPiP-if-PopupsAndRedirects-are-active.patch -00allow-the-download-of-clang-for-windows-crossbuild.patch -00Add-option-to-disable-snapshots.patch -00Enable-Android-Dynamic-Performance-Framework.patch -00Remove-GoogleAccountsPrivateApiHost.patch -00Fix-crash-on-customize-profile-ui.patch -00Enable-ImprovedBookmarks-by-default.patch -00Partition-MediaDeviceId-by-default.patch -00Keep-disabled-FetchLaterAPI.patch -00Disable-ranker-url-fetcher.patch -00Show-full-urls-for-bookmark.patch -00Disable-prefers-reduced-transparency-media-query.patch -00libjxl-0-8-2.patch -00Add-support-to-jxl.patch -00Block-Intents-While-Locked.patch -00Keep-Manta-Service-Disabled.patch -00Disable-Service-and-Shared-workers-on-3P-iframe.patch -00Disable-Real-Box.patch -00Always-allow-inspect-fallback.patch -00Add-cromite-flags-support.patch -00Add-PartialLowEndModeOnMidRangeDevices-flag.patch -00Use-list-mode-for-tab-switcher.patch -00Chrome-web-store-protection.patch -00Enable-search-engine-settings-desktop-ui.patch -00Disable-Android-AppRestrictions.patch -00Customize-selection-popup.patch -00Enables-deactivation-of-the-js-debugger-statement.patch -00Enable-gwp-asan-on-Android.patch +Disable-speechSynthesis-getVoices-API.patch +Remove-support-for-device-memory-and-cpu-recovery.patch +Log-dangling-attributes-in-some-html-elements.patch +Keep-Side-Panel-Companion-disabled.patch +Lock-Profile-Cookie-Database.patch +Show-warnings-on-downloads-over-HTTP.patch +Compress-libchrome-to-free-up-some-space.patch +Cromite-Branding.patch +Disable-Feeback-Collector.patch +Disable-remote-altsvc-for-h3-connections.patch +do-not-block-build-incompatible-profiles.patch +Allow-DocumentPiP-if-PopupsAndRedirects-are-active.patch +allow-the-download-of-clang-for-windows-crossbuild.patch +Add-option-to-disable-snapshots.patch +Enable-Android-Dynamic-Performance-Framework.patch +Remove-GoogleAccountsPrivateApiHost.patch +Fix-crash-on-customize-profile-ui.patch +Enable-ImprovedBookmarks-by-default.patch +Partition-MediaDeviceId-by-default.patch +Keep-disabled-FetchLaterAPI.patch +Disable-ranker-url-fetcher.patch +Show-full-urls-for-bookmark.patch +Disable-prefers-reduced-transparency-media-query.patch +libjxl-0-8-2.patch +Add-support-to-jxl.patch +Block-Intents-While-Locked.patch +Keep-Manta-Service-Disabled.patch +Disable-Service-and-Shared-workers-on-3P-iframe.patch +Disable-Real-Box.patch +Always-allow-inspect-fallback.patch +Add-cromite-flags-support.patch +Add-PartialLowEndModeOnMidRangeDevices-flag.patch +Use-list-mode-for-tab-switcher.patch +Chrome-web-store-protection.patch +Enable-search-engine-settings-desktop-ui.patch +Disable-Android-AppRestrictions.patch +Customize-selection-popup.patch +Enables-deactivation-of-the-js-debugger-statement.patch +Enable-gwp-asan-on-Android.patch + +Temp-PerformanceNavigationTiming-privacy-fix.patch +Temp-disable-predictive-back-gesture.patch +TEMP-Add-a-log-to-track-strange-behavior.patch +Temp-guard-FileSystemAccessPersistentPermissions.patch +Fix-chromium-build-bugs.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 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 -00AdblockPlus-connect-popup-blocker.patch \ No newline at end of file +Eyeo-Adblock-Remove-Privacy-Issues.patch +AdblockPlus-add-blocking-in-service-workers.patch +AdblockPlus-connect-popup-blocker.patch diff --git a/build/patches/00Disallowing-MIDI-permission-by-default.patch b/build/patches/00Disallowing-MIDI-permission-by-default.patch deleted file mode 100644 index a39666ea3..000000000 --- a/build/patches/00Disallowing-MIDI-permission-by-default.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: uazo -Date: Sat, 3 Jun 2023 13:11:22 +0000 -Subject: Disallowing MIDI permission by default - -License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html ---- - components/permissions/features.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/components/permissions/features.cc b/components/permissions/features.cc ---- a/components/permissions/features.cc -+++ b/components/permissions/features.cc -@@ -157,7 +157,7 @@ BASE_FEATURE(kShowRelatedWebsiteSetsPermissionGrants, - // Enables disallowing MIDI permission by default. - BASE_FEATURE(kBlockMidiByDefault, - "BlockMidiByDefault", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ base::FEATURE_ENABLED_BY_DEFAULT); - - } // namespace features - namespace feature_params { --- -2.25.1 diff --git a/build/patches/00WIN-enable-file-system-access-blocklist.patch b/build/patches/00WIN-enable-file-system-access-blocklist.patch deleted file mode 100644 index 7857b6dac..000000000 --- a/build/patches/00WIN-enable-file-system-access-blocklist.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: uazo -Date: Tue, 14 Feb 2023 16:32:30 +0000 -Subject: WIN enable file system access blocklist - -License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html ---- - content/browser/file_system_access/features.cc | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/content/browser/file_system_access/features.cc b/content/browser/file_system_access/features.cc ---- a/content/browser/file_system_access/features.cc -+++ b/content/browser/file_system_access/features.cc -@@ -15,7 +15,7 @@ namespace content::features { - // some applications. - BASE_FEATURE(kFileSystemAccessDragAndDropCheckBlocklist, - "FileSystemAccessDragAndDropCheckBlocklist", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ base::FEATURE_ENABLED_BY_DEFAULT); - - // TODO(crbug.com/1381621): Remove this flag eventually. - // When enabled, move() will result in a promise rejection when the specified -@@ -44,8 +44,8 @@ BASE_FEATURE(kFileSystemAccessRemove, - // When enabled, a user gesture is required to rename a file if the site does - // not have write access to the parent. See http://b/254157070 for more context. - BASE_FEATURE(kFileSystemAccessRenameWithoutParentAccessRequiresUserActivation, -- "FileSystemAccessRenameWithoutParentAccessRequiresUserActivation", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "FileSystemAccessRenameWithoutParentAccessRequiresUserActivation", // enabled by default -+ base::FEATURE_ENABLED_BY_DEFAULT); // in bromite - - // TODO(crbug.com/1247850): Remove this flag eventually. - // When enabled, move operations within the same file system that do not change --- -2.25.1 diff --git a/build/patches/AImageReader-CFI-crash-mitigations.patch b/build/patches/AImageReader-CFI-crash-mitigations.patch index ba2ce8fac..86c2a6ffe 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 -@@ -2842,9 +2842,9 @@ +@@ -2923,9 +2923,9 @@ "expiry_milestone": 125 }, { @@ -117,7 +117,7 @@ new file mode 100644 diff --git a/gpu/config/gpu_driver_bug_list.json b/gpu/config/gpu_driver_bug_list.json --- a/gpu/config/gpu_driver_bug_list.json +++ b/gpu/config/gpu_driver_bug_list.json -@@ -3212,6 +3212,22 @@ +@@ -2689,6 +2689,22 @@ "no_downscaled_overlay_promotion" ] }, @@ -179,7 +179,7 @@ diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc if (!gpu_preferences.enable_android_surface_control) return kGpuFeatureStatusDisabled; -@@ -347,6 +350,11 @@ void AdjustGpuFeatureStatusToWorkarounds(GpuFeatureInfo* gpu_feature_info) { +@@ -355,6 +358,11 @@ void AdjustGpuFeatureStatusToWorkarounds(GpuFeatureInfo* gpu_feature_info) { gpu_feature_info->status_values[GPU_FEATURE_TYPE_CANVAS_OOP_RASTERIZATION] = kGpuFeatureStatusBlocklisted; } @@ -194,8 +194,8 @@ diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc diff --git a/gpu/config/gpu_workaround_list.txt b/gpu/config/gpu_workaround_list.txt --- a/gpu/config/gpu_workaround_list.txt +++ b/gpu/config/gpu_workaround_list.txt -@@ -13,6 +13,7 @@ count_all_in_varyings_packing - decode_encode_srgb_for_generatemipmap +@@ -11,6 +11,7 @@ clamp_texture_base_level_and_max_level + clear_pixel_unpack_buffer_before_copyteximage disable_2d_canvas_auto_flush disable_accelerated_av1_decode +disable_aimagereader @@ -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 -@@ -668,6 +668,13 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line, +@@ -675,6 +675,13 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line, } #endif // BUILDFLAG(IS_WIN) @@ -248,4 +248,3 @@ diff --git a/gpu/ipc/service/stream_texture_android.cc b/gpu/ipc/service/stream_ : TextureOwner::Mode::kSurfaceTextureInsecure; } -- -2.25.1 diff --git a/build/patches/00AdblockPlus-add-blocking-in-service-workers.patch b/build/patches/AdblockPlus-add-blocking-in-service-workers.patch similarity index 98% rename from build/patches/00AdblockPlus-add-blocking-in-service-workers.patch rename to build/patches/AdblockPlus-add-blocking-in-service-workers.patch index 9207c3421..1d62f37f4 100644 --- a/build/patches/00AdblockPlus-add-blocking-in-service-workers.patch +++ b/build/patches/AdblockPlus-add-blocking-in-service-workers.patch @@ -401,7 +401,7 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.h b/chrome/br diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc -@@ -6328,7 +6328,9 @@ ChromeContentBrowserClient:: +@@ -6305,7 +6305,9 @@ ChromeContentBrowserClient:: } bool ChromeContentBrowserClient::WillInterceptWebSocket( @@ -412,7 +412,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch #if BUILDFLAG(ENABLE_EXTENSIONS) if (!frame) { return false; -@@ -6349,9 +6351,11 @@ bool ChromeContentBrowserClient::WillInterceptWebSocket( +@@ -6328,9 +6330,11 @@ bool ChromeContentBrowserClient::WillInterceptWebSocket( } void ChromeContentBrowserClient::CreateWebSocket( @@ -427,7 +427,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch diff --git a/chrome/browser/chrome_content_browser_client.h b/chrome/browser/chrome_content_browser_client.h --- a/chrome/browser/chrome_content_browser_client.h +++ b/chrome/browser/chrome_content_browser_client.h -@@ -630,11 +630,15 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -642,11 +642,15 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { CreateURLLoaderHandlerForServiceWorkerNavigationPreload( int frame_tree_node_id, const network::ResourceRequest& resource_request) override; @@ -447,7 +447,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.h b/chrome/browser/chr diff --git a/components/adblock/content/browser/adblock_url_loader_factory.cc b/components/adblock/content/browser/adblock_url_loader_factory.cc --- a/components/adblock/content/browser/adblock_url_loader_factory.cc +++ b/components/adblock/content/browser/adblock_url_loader_factory.cc -@@ -342,12 +342,6 @@ void AdblockURLLoaderFactory::InProgressRequest::OnRequestError( +@@ -343,12 +343,6 @@ void AdblockURLLoaderFactory::InProgressRequest::OnRequestError( void AdblockURLLoaderFactory::InProgressRequest::CheckFilterMatch( CheckFilterMatchCallback callback) { @@ -460,7 +460,7 @@ diff --git a/components/adblock/content/browser/adblock_url_loader_factory.cc b/ auto subscription_service = factory_->config_.subscription_service; if (is_document_request_) { auto* host = content::RenderFrameHost::FromID(factory_->host_id_); -@@ -386,7 +380,7 @@ void AdblockURLLoaderFactory::InProgressRequest::CheckFilterMatch( +@@ -387,7 +381,7 @@ void AdblockURLLoaderFactory::InProgressRequest::CheckFilterMatch( } else { factory_->config_.resource_classifier->CheckRequestFilterMatch( subscription_service->GetCurrentSnapshot(), request_url_, @@ -469,7 +469,7 @@ diff --git a/components/adblock/content/browser/adblock_url_loader_factory.cc b/ base::BindOnce( &AdblockURLLoaderFactory::InProgressRequest::OnRequestUrlClassified, weak_factory_.GetWeakPtr(), -@@ -675,12 +669,14 @@ void AdblockURLLoaderFactory::InProgressRequest::OnRequestFilterMatchResult( +@@ -676,12 +670,14 @@ void AdblockURLLoaderFactory::InProgressRequest::OnRequestFilterMatchResult( AdblockURLLoaderFactory::AdblockURLLoaderFactory( AdblockURLLoaderFactoryConfig config, @@ -683,7 +683,7 @@ diff --git a/content/browser/websockets/websocket_connector_impl.cc b/content/br diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -1016,7 +1016,7 @@ bool ContentBrowserClient::WillCreateURLLoaderFactory( +@@ -1023,7 +1023,7 @@ bool ContentBrowserClient::WillCreateURLLoaderFactory( return false; } @@ -692,7 +692,7 @@ diff --git a/content/public/browser/content_browser_client.cc b/content/public/b return false; } -@@ -1025,9 +1025,11 @@ uint32_t ContentBrowserClient::GetWebSocketOptions(RenderFrameHost* frame) { +@@ -1032,9 +1032,11 @@ uint32_t ContentBrowserClient::GetWebSocketOptions(RenderFrameHost* frame) { } void ContentBrowserClient::CreateWebSocket( @@ -707,7 +707,7 @@ diff --git a/content/public/browser/content_browser_client.cc b/content/public/b diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -1842,7 +1842,7 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1859,7 +1859,7 @@ class CONTENT_EXPORT ContentBrowserClient { scoped_refptr navigation_response_task_runner); // Returns true when the embedder wants to intercept a websocket connection. @@ -716,7 +716,7 @@ diff --git a/content/public/browser/content_browser_client.h b/content/public/br // Returns the WebSocket creation options. virtual uint32_t GetWebSocketOptions(RenderFrameHost* frame); -@@ -1864,9 +1864,11 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1881,9 +1881,11 @@ class CONTENT_EXPORT ContentBrowserClient { // Always called on the UI thread and only when the Network Service is // enabled. virtual void CreateWebSocket( @@ -729,4 +729,3 @@ diff --git a/content/public/browser/content_browser_client.h b/content/public/br const absl::optional& user_agent, mojo::PendingRemote -- -2.25.1 diff --git a/build/patches/00AdblockPlus-connect-popup-blocker.patch b/build/patches/AdblockPlus-connect-popup-blocker.patch similarity index 99% rename from build/patches/00AdblockPlus-connect-popup-blocker.patch rename to build/patches/AdblockPlus-connect-popup-blocker.patch index 4c479ae48..3c1bd528c 100644 --- a/build/patches/00AdblockPlus-connect-popup-blocker.patch +++ b/build/patches/AdblockPlus-connect-popup-blocker.patch @@ -167,4 +167,3 @@ new file mode 100644 + +#endif // ifdef FLAG_SECTION -- -2.25.1 diff --git a/build/patches/Add-AllowUserCertificates-flag.patch b/build/patches/Add-AllowUserCertificates-flag.patch index f4dc634f0..90340f251 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 -@@ -229,6 +229,7 @@ import org.chromium.content_public.browser.ScreenOrientationProvider; +@@ -228,6 +228,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; -@@ -988,6 +989,8 @@ public abstract class ChromeActivity +@@ -1097,6 +1098,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 -@@ -146,6 +146,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -144,6 +144,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &feed::kFeedShowSignInCommand, &feed::kFeedSignedOutViewDemotion, &feed::kFeedUserInteractionReliabilityReport, @@ -51,7 +51,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 -@@ -98,6 +98,7 @@ public abstract class ChromeFeatureList { +@@ -103,6 +103,7 @@ public abstract class ChromeFeatureList { } /* Alphabetical: */ @@ -59,7 +59,7 @@ 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"; -@@ -517,6 +518,8 @@ public abstract class ChromeFeatureList { +@@ -522,6 +523,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); @@ -67,7 +67,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f + new CachedFlag(ALLOW_USER_CERTIFICATES, false); public static final CachedFlag sAppMenuMobileSiteOption = new CachedFlag(APP_MENU_MOBILE_SITE_OPTION, false); - public static final CachedFlag sBackGestureActivityTabProvider = + public static final CachedFlag sArchiveTabService = new CachedFlag(ARCHIVE_TAB_SERVICE, false); @@ -662,6 +665,7 @@ public abstract class ChromeFeatureList { public static final List sFlagsCachedFullBrowser = @@ -111,24 +111,23 @@ 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 -@@ -544,6 +544,8 @@ public class X509Util { +@@ -525,6 +525,8 @@ public class X509Util { return userRootBytes.toArray(new byte[0][]); } + public static boolean AllowUserCertificates = false; + - public static AndroidCertVerifyResult verifyServerCertificates(byte[][] certChain, - String authType, - String host) -@@ -630,6 +632,9 @@ public class X509Util { + public static AndroidCertVerifyResult verifyServerCertificates( + byte[][] certChain, String authType, String host) + throws KeyStoreException, NoSuchAlgorithmException { +@@ -613,6 +615,9 @@ public class X509Util { isIssuedByKnownRoot = isKnownRoot(root); } + if (AllowUserCertificates == false && isIssuedByKnownRoot == false) + return new AndroidCertVerifyResult(CertVerifyStatusAndroid.NO_TRUSTED_ROOT); + - return new AndroidCertVerifyResult(CertVerifyStatusAndroid.OK, - isIssuedByKnownRoot, verifiedChain); + return new AndroidCertVerifyResult( + CertVerifyStatusAndroid.OK, isIssuedByKnownRoot, verifiedChain); } -- -2.25.1 diff --git a/build/patches/Add-Alt-D-hotkey-to-focus-address-bar.patch b/build/patches/Add-Alt-D-hotkey-to-focus-address-bar.patch index 72323e7dc..fa2a0be84 100644 --- a/build/patches/Add-Alt-D-hotkey-to-focus-address-bar.patch +++ b/build/patches/Add-Alt-D-hotkey-to-focus-address-bar.patch @@ -10,14 +10,13 @@ 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/KeyboardShortcuts.java b/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java --- a/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java -@@ -152,6 +152,8 @@ public class KeyboardShortcuts { - KeyEvent.KEYCODE_F, KeyEvent.META_CTRL_ON); - addShortcut(context, chromeFeatureShortcutGroup, R.string.keyboard_shortcut_address_bar, - KeyEvent.KEYCODE_L, KeyEvent.META_CTRL_ON); +@@ -198,6 +198,8 @@ public class KeyboardShortcuts { + R.string.keyboard_shortcut_address_bar, + KeyEvent.KEYCODE_L, + KeyEvent.META_CTRL_ON); + addShortcut(context, chromeFeatureShortcutGroup, R.string.keyboard_shortcut_address_bar, + KeyEvent.KEYCODE_D, KeyEvent.META_ALT_ON); shortcutGroups.add(chromeFeatureShortcutGroup); - KeyboardShortcutGroup webpageShortcutGroup = new KeyboardShortcutGroup( + KeyboardShortcutGroup webpageShortcutGroup = -- -2.25.1 diff --git a/build/patches/Add-IsCleartextPermitted-flag.patch b/build/patches/Add-IsCleartextPermitted-flag.patch index 3cd9341d8..6bdfae8b5 100644 --- a/build/patches/Add-IsCleartextPermitted-flag.patch +++ b/build/patches/Add-IsCleartextPermitted-flag.patch @@ -57,4 +57,3 @@ diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_reque // Check whether the app allows cleartext traffic to this host, and return // ERR_CLEARTEXT_NOT_PERMITTED if not. -- -2.25.1 diff --git a/build/patches/00Add-PartialLowEndModeOnMidRangeDevices-flag.patch b/build/patches/Add-PartialLowEndModeOnMidRangeDevices-flag.patch similarity index 99% rename from build/patches/00Add-PartialLowEndModeOnMidRangeDevices-flag.patch rename to build/patches/Add-PartialLowEndModeOnMidRangeDevices-flag.patch index f242fb332..0a559d4aa 100644 --- a/build/patches/00Add-PartialLowEndModeOnMidRangeDevices-flag.patch +++ b/build/patches/Add-PartialLowEndModeOnMidRangeDevices-flag.patch @@ -52,4 +52,3 @@ new file mode 100644 + +#endif -- -2.25.1 diff --git a/build/patches/00Add-a-flag-to-disable-GamePad-API.patch b/build/patches/Add-a-flag-to-disable-GamePad-API.patch similarity index 96% rename from build/patches/00Add-a-flag-to-disable-GamePad-API.patch rename to build/patches/Add-a-flag-to-disable-GamePad-API.patch index 0b029af6e..238557b3d 100644 --- a/build/patches/00Add-a-flag-to-disable-GamePad-API.patch +++ b/build/patches/Add-a-flag-to-disable-GamePad-API.patch @@ -14,8 +14,8 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json -@@ -6884,9 +6884,9 @@ - "expiry_milestone": 121 +@@ -7058,9 +7058,9 @@ + "expiry_milestone": 123 }, { - "name": "restrict-gamepad-access", @@ -29,7 +29,7 @@ diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.js diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc -@@ -3001,7 +3001,7 @@ const char kResetShortcutCustomizationsDescription[] = +@@ -3078,7 +3078,7 @@ const char kResetShortcutCustomizationsDescription[] = const char kRestrictGamepadAccessName[] = "Restrict gamepad access"; const char kRestrictGamepadAccessDescription[] = @@ -71,4 +71,3 @@ diff --git a/third_party/blink/renderer/modules/gamepad/navigator_gamepad.cc b/t DCHECK(processing_events_); DCHECK(has_connection_event_listener_); -- -2.25.1 diff --git a/build/patches/Add-a-proxy-configuration-page.patch b/build/patches/Add-a-proxy-configuration-page.patch index ca9f5aec7..283ddce19 100644 --- a/build/patches/Add-a-proxy-configuration-page.patch +++ b/build/patches/Add-a-proxy-configuration-page.patch @@ -50,7 +50,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html 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,9 @@ found in the LICENSE file. +@@ -25,6 +25,9 @@ found in the LICENSE file. true @@ -77,7 +77,7 @@ 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 -@@ -78,6 +78,7 @@ public class PrivacySettings +@@ -76,6 +76,7 @@ public class PrivacySettings extends ChromeBaseSettingsFragment private static final String PREF_SAFE_BROWSING = "safe_browsing"; private static final String PREF_SYNC_AND_SERVICES_LINK = "sync_and_services_link"; private static final String PREF_PRIVACY_SANDBOX = "privacy_sandbox"; @@ -197,7 +197,7 @@ diff --git a/chrome/browser/net/proxy_service_factory.h b/chrome/browser/net/pro 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 -@@ -185,6 +185,8 @@ +@@ -191,6 +191,8 @@ #include "rlz/buildflags/buildflags.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -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 -@@ -1387,6 +1389,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) { +@@ -1451,6 +1453,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) { component_updater::RegisterPrefs(registry); domain_reliability::RegisterPrefs(registry); embedder_support::OriginTrialPrefs::RegisterPrefs(registry); @@ -397,7 +397,7 @@ new file mode 100644 + along with Bromite. If not, see . +*/ + -+import {$} from 'chrome://resources/js/util_ts.js'; ++import {$} from 'chrome://resources/js/util.js'; + +/** + * Main entry point called once the page has loaded. @@ -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 -@@ -297,6 +297,8 @@ static_library("ui") { +@@ -301,6 +301,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 -@@ -58,6 +58,7 @@ +@@ -56,6 +56,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" -@@ -494,6 +495,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, +@@ -489,6 +490,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, return &NewWebUI; if (url.host_piece() == chrome::kChromeUINetExportHost) return &NewWebUI; @@ -1136,15 +1136,15 @@ 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"; -@@ -457,6 +459,7 @@ bool IsSystemWebUIHost(base::StringPiece host) { - kChromeUILockScreenNetworkHost, - kChromeUILockScreenStartReauthHost, - kChromeUIMobileSetupHost, -+ kChromeUIProxyConfigHost, - kChromeUIMultiDeviceSetupHost, - kChromeUINetworkHost, - kChromeUINotificationTesterHost, -@@ -771,6 +774,7 @@ const char* const kChromeHostURLs[] = { +@@ -454,6 +456,7 @@ bool IsSystemWebUIHost(base::StringPiece host) { + kChromeUILockScreenNetworkHost, + kChromeUILockScreenStartReauthHost, + kChromeUIMobileSetupHost, ++ kChromeUIProxyConfigHost, + kChromeUIMultiDeviceSetupHost, + kChromeUINetworkHost, + kChromeUINotificationTesterHost, +@@ -758,6 +761,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 -@@ -139,6 +139,8 @@ extern const char kChromeUINTPTilesInternalsHost[]; +@@ -137,6 +137,8 @@ extern const char kChromeUINTPTilesInternalsHost[]; extern const char kChromeUINaClHost[]; extern const char kChromeUINetExportHost[]; extern const char kChromeUINetExportURL[]; @@ -1413,4 +1413,3 @@ diff --git a/net/proxy_resolution/proxy_config.h b/net/proxy_resolution/proxy_co // Returns one of {&proxies_for_http, &proxies_for_https, &proxies_for_ftp, // &fallback_proxies}, or NULL if there is no proxy to use. -- -2.25.1 diff --git a/build/patches/Add-an-always-incognito-mode.patch b/build/patches/Add-an-always-incognito-mode.patch index 09f753e48..ef0b019d5 100644 --- a/build/patches/Add-an-always-incognito-mode.patch +++ b/build/patches/Add-an-always-incognito-mode.patch @@ -28,7 +28,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../chrome/browser/app/ChromeActivity.java | 4 + .../AppMenuPropertiesDelegateImpl.java | 26 ++- .../ChromeContextMenuPopulator.java | 7 +- - .../CustomTabActivityLifecycleUmaTracker.java | 25 --- + .../CustomTabActivityLifecycleUmaTracker.java | 31 ---- .../CustomTabAppMenuPropertiesDelegate.java | 4 + .../CustomTabIntentDataProvider.java | 5 +- .../browser/download/DownloadUtils.java | 16 +- @@ -46,7 +46,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../browser/tabmodel/ChromeTabCreator.java | 5 +- .../tabmodel/TabModelSelectorImpl.java | 3 + .../browser/tabmodel/TabPersistentStore.java | 9 + - .../browser/toolbar/ToolbarManager.java | 4 +- + .../browser/toolbar/ToolbarManager.java | 3 +- .../webapps/WebappIntentDataProvider.java | 14 ++ .../browser/android/historical_tab_saver.cc | 24 ++- .../chrome_autocomplete_provider_client.cc | 9 + @@ -85,7 +85,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../add-an-always-incognito-mode.inc | 3 + .../add-an-always-incognito-mode.inc | 1 + net/base/file_stream_context.cc | 2 +- - 66 files changed, 774 insertions(+), 96 deletions(-) + 66 files changed, 773 insertions(+), 102 deletions(-) create mode 100644 chrome/android/java/res/xml/incognito_preferences.xml create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/AlwaysIncognitoLinkInterceptor.java create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/IncognitoSettings.java @@ -98,7 +98,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 -@@ -666,6 +666,7 @@ chrome_java_resources = [ +@@ -649,6 +649,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", @@ -117,7 +117,7 @@ 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", -@@ -975,6 +976,7 @@ chrome_java_sources = [ +@@ -968,6 +969,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", @@ -243,7 +243,7 @@ new file mode 100644 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 -@@ -62,6 +62,10 @@ import org.chromium.base.task.TaskTraits; +@@ -63,6 +63,10 @@ import org.chromium.base.task.TaskTraits; import org.chromium.build.annotations.UsedByReflection; import org.chromium.cc.input.BrowserControlsState; import org.chromium.chrome.R; @@ -254,7 +254,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct import org.chromium.chrome.browser.IntentHandler.TabOpenType; import org.chromium.chrome.browser.app.ChromeActivity; import org.chromium.chrome.browser.app.metrics.LaunchCauseMetrics; -@@ -602,9 +606,14 @@ public class ChromeTabbedActivity extends ChromeActivity +@@ -2005,6 +2006,9 @@ public abstract class ChromeActivity throw new IllegalStateException( "Attempting to access TabCreator before initialization"); } @@ -313,10 +313,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App import org.chromium.chrome.R; import org.chromium.chrome.browser.ActivityTabProvider; +import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor; - import org.chromium.chrome.browser.banners.AppMenuVerbiage; import org.chromium.chrome.browser.bookmarks.BookmarkFeatures; import org.chromium.chrome.browser.bookmarks.BookmarkModel; -@@ -102,6 +103,10 @@ import java.lang.annotation.RetentionPolicy; + import org.chromium.chrome.browser.bookmarks.PowerBookmarkUtils; +@@ -100,6 +101,10 @@ import java.lang.annotation.RetentionPolicy; import java.util.ArrayList; import java.util.List; @@ -327,7 +327,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App /** * Base implementation of {@link AppMenuPropertiesDelegate} that handles hiding and showing menu * items based on activity state. -@@ -569,6 +574,13 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate +@@ -597,6 +602,13 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate } private void prepareCommonMenuItems(Menu menu, @MenuGroup int menuGroup, boolean isIncognito) { @@ -341,7 +341,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App // We have to iterate all menu items since same menu item ID may be associated with more // than one menu items. boolean isOverviewModeMenu = menuGroup == MenuGroup.OVERVIEW_MODE_MENU; -@@ -626,7 +638,15 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate +@@ -659,7 +671,15 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate } if (item.getItemId() == R.id.recent_tabs_menu_id) { @@ -358,12 +358,12 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App } if (item.getItemId() == R.id.menu_select_tabs) { item.setVisible(isMenuSelectTabsVisible); -@@ -840,7 +860,9 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate - // is not persisted when adding to the homescreen. - // * If creating shortcuts it not supported by the current home screen. - return WebappsUtils.isAddToHomeIntentSupported() && !isChromeScheme && !isFileScheme -- && !isContentScheme && !isIncognito && !url.isEmpty(); -+ && !isContentScheme && !url.isEmpty() +@@ -866,7 +886,9 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate + && !isFileScheme + && !isContentScheme + && !isIncognito +- && !url.isEmpty(); ++ && !url.isEmpty() + && (!isIncognito || + AlwaysIncognitoLinkInterceptor.isAlwaysIncognito()); } @@ -380,7 +380,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/Chr 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; -@@ -233,6 +234,9 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { +@@ -258,6 +259,9 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { public List> buildContextMenu() { mShowEphemeralTabNewLabel = null; @@ -390,7 +390,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/Chr List> groupedItems = new ArrayList<>(); if (mParams.isAnchor()) { -@@ -242,6 +246,7 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { +@@ -268,6 +272,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)); @@ -398,7 +398,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)); } -@@ -266,7 +271,7 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { +@@ -292,7 +297,7 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { } } if (FirstRunStatus.getFirstRunFlowComplete()) { @@ -410,7 +410,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 -@@ -68,31 +68,6 @@ public class CustomTabActivityLifecycleUmaTracker +@@ -70,37 +70,6 @@ public class CustomTabActivityLifecycleUmaTracker private boolean mIsInitialResume = true; private void recordIncognitoLaunchReason() { @@ -419,8 +419,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust - - @IntentHandler.IncognitoCCTCallerId - int incognitoCCTCallerId = incognitoProvider.getFeatureIdForMetricsCollection(); -- RecordHistogram.recordEnumeratedHistogram("CustomTabs.IncognitoCCTCallerId", -- incognitoCCTCallerId, IntentHandler.IncognitoCCTCallerId.NUM_ENTRIES); +- RecordHistogram.recordEnumeratedHistogram( +- "CustomTabs.IncognitoCCTCallerId", +- incognitoCCTCallerId, +- IntentHandler.IncognitoCCTCallerId.NUM_ENTRIES); - - // Record which 1P app launched Incognito CCT. - if (incognitoCCTCallerId == IntentHandler.IncognitoCCTCallerId.GOOGLE_APPS) { @@ -428,15 +430,19 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust - @IntentHandler.ExternalAppId - int externalId = IntentHandler.mapPackageToExternalAppId(sendersPackageName); - if (externalId != IntentHandler.ExternalAppId.OTHER) { -- RecordHistogram.recordEnumeratedHistogram("CustomTabs.ClientAppId.Incognito", -- externalId, IntentHandler.ExternalAppId.NUM_ENTRIES); +- RecordHistogram.recordEnumeratedHistogram( +- "CustomTabs.ClientAppId.Incognito", +- externalId, +- IntentHandler.ExternalAppId.NUM_ENTRIES); - } else { - // Using package name didn't give any meaningful insight on who launched the - // Incognito CCT, falling back to check if they provided EXTRA_APPLICATION_ID. - externalId = - IntentHandler.determineExternalIntentSource(incognitoProvider.getIntent()); -- RecordHistogram.recordEnumeratedHistogram("CustomTabs.ClientAppId.Incognito", -- externalId, IntentHandler.ExternalAppId.NUM_ENTRIES); +- RecordHistogram.recordEnumeratedHistogram( +- "CustomTabs.ClientAppId.Incognito", +- externalId, +- IntentHandler.ExternalAppId.NUM_ENTRIES); - } - } } @@ -453,7 +459,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust import org.chromium.chrome.browser.DefaultBrowserInfo; import org.chromium.chrome.browser.app.appmenu.AppMenuPropertiesDelegateImpl; import org.chromium.chrome.browser.app.appmenu.DividerLineMenuItemViewBinder; -@@ -179,6 +180,9 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat +@@ -195,6 +196,9 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat downloadItemVisible = false; openInChromeItemVisible = false; } @@ -461,12 +467,12 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust + downloadItemVisible = true; + } - boolean isChromeScheme = url.getScheme().equals(UrlConstants.CHROME_SCHEME) - || url.getScheme().equals(UrlConstants.CHROME_NATIVE_SCHEME); + boolean isChromeScheme = + url.getScheme().equals(UrlConstants.CHROME_SCHEME) 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 -@@ -67,6 +67,9 @@ import org.chromium.components.embedder_support.util.UrlConstants; +@@ -83,6 +83,9 @@ import org.chromium.components.embedder_support.util.UrlConstants; import org.chromium.components.version_info.VersionInfo; import org.chromium.device.mojom.ScreenOrientationLockType; @@ -476,7 +482,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; -@@ -1288,7 +1291,7 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid +@@ -1294,7 +1297,7 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid @Override public boolean isIncognito() { @@ -488,15 +494,15 @@ 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 -@@ -36,6 +36,7 @@ import org.chromium.base.Log; - import org.chromium.base.metrics.RecordHistogram; - import org.chromium.base.metrics.RecordUserAction; +@@ -34,6 +34,7 @@ import org.chromium.base.FileUtils; + import org.chromium.base.IntentUtils; + import org.chromium.base.Log; import org.chromium.chrome.R; +import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor; import org.chromium.chrome.browser.ChromeTabbedActivity; import org.chromium.chrome.browser.IntentHandler; import org.chromium.chrome.browser.app.download.home.DownloadActivity; -@@ -77,6 +78,10 @@ import org.chromium.url.GURL; +@@ -74,6 +75,10 @@ import org.chromium.url.GURL; import java.io.File; @@ -504,10 +510,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/Downlo +import org.chromium.components.user_prefs.UserPrefs; +import org.chromium.chrome.browser.preferences.Pref; + - /** - * A class containing some utility static methods. - */ -@@ -345,7 +350,16 @@ public class DownloadUtils { + /** A class containing some utility static methods. */ + public class DownloadUtils { + private static final String TAG = "download"; +@@ -311,7 +316,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. @@ -528,7 +534,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/history/HistoryContentManager.java b/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryContentManager.java --- a/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryContentManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryContentManager.java -@@ -231,7 +231,9 @@ public class HistoryContentManager implements SignInStateObserver, PrefObserver +@@ -243,7 +243,9 @@ public class HistoryContentManager implements SignInStateObserver, PrefObserver mHistoryAdapter.generateFooterItems(); // Listen to changes in sign in state. @@ -539,7 +545,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History // Create PrefChangeRegistrar to receive notifications on preference changes. mPrefChangeRegistrar = new PrefChangeRegistrar(); -@@ -266,7 +268,8 @@ public class HistoryContentManager implements SignInStateObserver, PrefObserver +@@ -278,7 +280,8 @@ public class HistoryContentManager implements SignInStateObserver, PrefObserver mHistoryAdapter.onDestroyed(); mLargeIconBridge.destroy(); mLargeIconBridge = null; @@ -570,10 +576,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History +import org.chromium.components.user_prefs.UserPrefs; +import org.chromium.chrome.browser.preferences.Pref; + - /** - * Combines and manages the different UI components of browsing history. - */ -@@ -158,7 +165,7 @@ public class HistoryManager implements OnMenuItemClickListener, SelectionObserve + /** Combines and manages the different UI components of browsing history. */ + public class HistoryManager + implements OnMenuItemClickListener, +@@ -164,7 +171,7 @@ public class HistoryManager recordUserAction("Show"); // If incognito placeholder is shown, we don't need to create History UI elements. @@ -582,7 +588,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History mSelectableListLayout = null; mRootView = getIncognitoHistoryPlaceholderView(); return; -@@ -626,7 +633,7 @@ public class HistoryManager implements OnMenuItemClickListener, SelectionObserve +@@ -672,7 +679,7 @@ public class HistoryManager private void swapContentView() { boolean toHistoryClusters; @@ -591,7 +597,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History return; } else if (isHistoryClustersUIShowing()) { toHistoryClusters = false; -@@ -689,11 +696,24 @@ public class HistoryManager implements OnMenuItemClickListener, SelectionObserve +@@ -736,9 +743,22 @@ public class HistoryManager && mContentView == mHistoryClustersCoordinator.getActivityContentView(); } @@ -608,16 +614,14 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History + return mIsIncognito; + } + - /** - * Called when the activity/native page is destroyed. - */ + /** Called when the activity/native page is destroyed. */ public void onDestroyed() { - if (mIsIncognito) { + if (shouldShowIncognitoPlaceholder()) { // If Incognito placeholder is shown no need to call any destroy method. return; } -@@ -713,7 +733,7 @@ public class HistoryManager implements OnMenuItemClickListener, SelectionObserve +@@ -758,7 +778,7 @@ public class HistoryManager * @return True if manager handles this event, false if it decides to ignore. */ public boolean onBackPressed() { @@ -647,11 +651,11 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History +import org.chromium.components.user_prefs.UserPrefs; +import org.chromium.chrome.browser.preferences.Pref; + - /** - * Native page for managing browsing history. - */ -@@ -39,6 +46,14 @@ public class HistoryPage extends BasicNativePage { - Profile profile, Supplier tabSupplier, String url) { + /** Native page for managing browsing history. */ + public class HistoryPage extends BasicNativePage { + private HistoryManager mHistoryManager; +@@ -42,6 +49,14 @@ public class HistoryPage extends BasicNativePage { + String url) { super(host); + if (profile.isOffTheRecord() && @@ -676,7 +680,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; -@@ -238,7 +239,8 @@ public class NativePageFactory { +@@ -276,7 +277,8 @@ public class NativePageFactory { String url, NativePage candidatePage, Tab tab, boolean isIncognito) { NativePage page; @@ -705,17 +709,17 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsM import java.util.HashMap; import java.util.List; import java.util.Map; -@@ -99,7 +108,8 @@ public class RecentTabsManager implements SyncService.SyncStateChangedListener, - */ - public RecentTabsManager(Tab tab, TabModelSelector tabModelSelector, Profile profile, - Context context, Runnable showHistoryManager) { +@@ -101,7 +110,8 @@ public class RecentTabsManager + Profile profile, + Context context, + Runnable showHistoryManager) { - mProfile = profile; + mProfile = profile.getOriginalProfile(); + profile = mProfile; mActiveTab = tab; mTabModelSelector = tabModelSelector; mShowHistoryManager = showHistoryManager; -@@ -255,6 +265,22 @@ public class RecentTabsManager implements SyncService.SyncStateChangedListener, +@@ -258,6 +268,22 @@ public class RecentTabsManager */ public void openRecentlyClosedTab(RecentlyClosedTab tab, int windowDisposition) { if (mIsDestroyed) return; @@ -906,7 +910,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 -@@ -73,6 +73,7 @@ import org.chromium.chrome.browser.signin.SyncConsentActivityLauncherImpl; +@@ -74,6 +74,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; @@ -914,7 +918,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; -@@ -348,6 +349,9 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity +@@ -359,6 +360,9 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity ((PrivacySandboxSettingsBaseFragment) fragment) .setSnackbarManager(getSnackbarManager()); } @@ -933,10 +937,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore +import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor; + - /** - * A tab model observer for managing bulk closures. - */ -@@ -40,7 +42,8 @@ public class HistoricalTabModelObserver implements TabModelObserver { + /** A tab model observer for managing bulk closures. */ + public class HistoricalTabModelObserver implements TabModelObserver { + private final TabModel mTabModel; +@@ -38,7 +40,8 @@ public class HistoricalTabModelObserver implements TabModelObserver { if (tabs.isEmpty()) return; if (tabs.size() == 1) { @@ -946,7 +950,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore return; } -@@ -71,7 +74,6 @@ public class HistoricalTabModelObserver implements TabModelObserver { +@@ -69,7 +72,6 @@ public class HistoricalTabModelObserver implements TabModelObserver { entries.add(historicalGroup); idToGroup.put(groupId, historicalGroup); } @@ -957,7 +961,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/HistoricalTabSaver.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabSaver.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabSaver.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabSaver.java -@@ -16,7 +16,7 @@ public interface HistoricalTabSaver { +@@ -14,7 +14,7 @@ public interface HistoricalTabSaver { * Creates a Tab entry in TabRestoreService. * @param tab The {@link Tab} to create an entry for. */ @@ -975,10 +979,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore +import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor; + - /** - * Creates historical entries in TabRestoreService. - */ -@@ -59,10 +61,10 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { + /** Creates historical entries in TabRestoreService. */ + @JNINamespace("historical_tab_saver") + public class HistoricalTabSaverImpl implements HistoricalTabSaver { +@@ -64,10 +66,10 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { // HistoricalTabSaver implementation. @Override @@ -991,7 +995,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore } @Override -@@ -114,7 +116,7 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { +@@ -119,7 +121,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()) { @@ -1000,22 +1004,25 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore return; } -@@ -140,11 +142,12 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { - CollectionUtil.integerCollectionToIntArray(savedStateVersions)); +@@ -155,14 +157,15 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { + CollectionUtil.integerCollectionToIntArray(savedStateVersions)); } - private void createHistoricalTabInternal(Tab tab) { + private void createHistoricalTabInternal(Tab tab, boolean is_always_incognito) { - RecordHistogram.recordEnumeratedHistogram("Tabs.RecentlyClosed.HistoricalSaverCloseType", - HistoricalSaverCloseType.TAB, HistoricalSaverCloseType.COUNT); - HistoricalTabSaverImplJni.get().createHistoricalTab( -- tab, getWebContentsState(tab).buffer(), getWebContentsState(tab).version()); -+ tab, getWebContentsState(tab).buffer(), getWebContentsState(tab).version(), + RecordHistogram.recordEnumeratedHistogram( + "Tabs.RecentlyClosed.HistoricalSaverCloseType", + HistoricalSaverCloseType.TAB, + HistoricalSaverCloseType.COUNT); + HistoricalTabSaverImplJni.get() + .createHistoricalTab( +- tab, getWebContentsState(tab).buffer(), getWebContentsState(tab).version()); ++ tab, getWebContentsState(tab).buffer(), getWebContentsState(tab).version(), + is_always_incognito); } /** -@@ -152,7 +155,7 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { +@@ -170,7 +173,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) { @@ -1024,20 +1031,20 @@ 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; -@@ -224,7 +227,7 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { +@@ -243,7 +246,7 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { @NativeMethods interface Natives { - void createHistoricalTab(Tab tab, ByteBuffer state, int savedStateVersion); + void createHistoricalTab(Tab tab, ByteBuffer state, int savedStateVersion, boolean is_always_incognito); - void createHistoricalGroup(TabModel model, String title, Tab[] tabs, - ByteBuffer[] byteBuffers, int[] savedStationsVersions); - void createHistoricalBulkClosure(TabModel model, int[] groupIds, String[] titles, + + void createHistoricalGroup( + TabModel model, 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 -@@ -125,6 +125,8 @@ import org.chromium.components.webapps.bottomsheet.PwaBottomSheetControllerFacto - import org.chromium.content_public.browser.WebContents; +@@ -129,6 +129,8 @@ import org.chromium.components.webapps.bottomsheet.PwaBottomSheetController; + import org.chromium.components.webapps.bottomsheet.PwaBottomSheetControllerFactory; import org.chromium.ui.base.ActivityWindowAndroid; import org.chromium.ui.base.DeviceFormFactor; +import org.chromium.base.ContextUtils; @@ -1045,19 +1052,19 @@ 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; -@@ -802,7 +804,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { - mAppMenuCoordinator.getAppMenuHandler(), mActivityTabProvider, - mToolbarManager.getMenuButtonView(), () -> { - mTabCreatorManagerSupplier.get() -- .getTabCreator(/*incognito=*/false) -+ .getTabCreator(AlwaysIncognitoLinkInterceptor.isAlwaysIncognito()) - .launchUrl(NewTabPageUtils.encodeNtpUrl( - NewTabPageLaunchOrigin.WEB_FEED), - TabLaunchType.FROM_CHROME_UI); +@@ -942,7 +944,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { + () -> { + mTabCreatorManagerSupplier + .get() +- .getTabCreator(/* incognito= */ false) ++ .getTabCreator(AlwaysIncognitoLinkInterceptor.isAlwaysIncognito()) + .launchUrl( + NewTabPageUtils.encodeNtpUrl( + NewTabPageLaunchOrigin.WEB_FEED), diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java -@@ -53,6 +53,10 @@ import org.chromium.ui.base.PageTransition; +@@ -50,6 +50,10 @@ import org.chromium.ui.base.PageTransition; import org.chromium.ui.base.WindowAndroid; import org.chromium.url.GURL; @@ -1065,10 +1072,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/Chrome +import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor; +import org.chromium.chrome.browser.tab.TabObserver; + - /** - * This class creates various kinds of new tabs and adds them to the right {@link TabModel}. - */ -@@ -512,7 +516,6 @@ public class ChromeTabCreator extends TabCreator { + /** This class creates various kinds of new tabs and adds them to the right {@link TabModel}. */ + public class ChromeTabCreator extends TabCreator { + /** Interface to handle showing overview instead of NTP if needed. */ +@@ -499,7 +503,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) { @@ -1082,14 +1089,14 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabMod @@ -10,6 +10,7 @@ import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; - import org.chromium.base.supplier.Supplier; + import org.chromium.base.supplier.OneshotSupplier; +import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor; import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager; import org.chromium.chrome.browser.flags.ActivityType; import org.chromium.chrome.browser.ntp.RecentlyClosedBridge; -@@ -109,6 +110,8 @@ public class TabModelSelectorImpl extends TabModelSelectorBase implements TabMod - public void onNativeLibraryReady(TabContentManager tabContentProvider) { - assert mTabContentManager == null : "onNativeLibraryReady called twice!"; +@@ -107,6 +108,8 @@ public class TabModelSelectorImpl extends TabModelSelectorBase implements TabMod + ProfileProvider profileProvider = mProfileProviderSupplier.get(); + assert profileProvider != null; + AlwaysIncognitoLinkInterceptor.migrateSettingToNative(); + @@ -1108,7 +1115,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPer import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; -@@ -651,6 +653,13 @@ public class TabPersistentStore { +@@ -673,6 +675,13 @@ public class TabPersistentStore { } } } @@ -1133,13 +1140,12 @@ 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; -@@ -561,7 +562,8 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve - return ret; - } - }, -- SearchEngineLogoUtils.getInstance()); -+ SearchEngineLogoUtils.getInstance(), -+ AlwaysIncognitoLinkInterceptor.isAlwaysIncognito()); +@@ -590,7 +591,7 @@ public class ToolbarManager + TraceEvent.end("isOfflinePage"); + return ret; + } +- }); ++ }, AlwaysIncognitoLinkInterceptor.isAlwaysIncognito()); mControlContainer = controlContainer; assert mControlContainer != null; @@ -1153,19 +1159,19 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappI +import org.chromium.base.ContextUtils; +import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor; + - /** - * Stores info about a web app. - */ -@@ -47,6 +50,8 @@ public class WebappIntentDataProvider extends BrowserServicesIntentDataProvider + /** Stores info about a web app. */ + public class WebappIntentDataProvider extends BrowserServicesIntentDataProvider { + private final Drawable mCloseButtonIcon; +@@ -45,6 +48,8 @@ public class WebappIntentDataProvider extends BrowserServicesIntentDataProvider private final ColorProviderImpl mColorProvider; private final ColorProviderImpl mDarkColorProvider; + private boolean mIsIncognito = false; + - /** - * Returns the toolbar color to use if a custom color is not specified by the webapp. - */ -@@ -78,6 +83,10 @@ public class WebappIntentDataProvider extends BrowserServicesIntentDataProvider + /** Returns the toolbar color to use if a custom color is not specified by the webapp. */ + public static int getDefaultToolbarColor() { + return Color.WHITE; +@@ -80,6 +85,10 @@ public class WebappIntentDataProvider extends BrowserServicesIntentDataProvider mWebappExtras = webappExtras; mWebApkExtras = webApkExtras; mActivityType = (webApkExtras != null) ? ActivityType.WEB_APK : ActivityType.WEBAPP; @@ -1176,7 +1182,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappI } @Override -@@ -172,6 +181,11 @@ public class WebappIntentDataProvider extends BrowserServicesIntentDataProvider +@@ -175,6 +184,11 @@ public class WebappIntentDataProvider extends BrowserServicesIntentDataProvider return mWebApkExtras; } @@ -1368,7 +1374,7 @@ diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/histo #else #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" -@@ -482,6 +485,13 @@ void HistoryTabHelper::TitleWasSet(NavigationEntry* entry) { +@@ -445,6 +448,13 @@ void HistoryTabHelper::TitleWasSet(NavigationEntry* entry) { history::HistoryService* HistoryTabHelper::GetHistoryService() { Profile* profile = Profile::FromBrowserContext(web_contents()->GetBrowserContext()); @@ -1382,7 +1388,7 @@ diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/histo if (profile->IsOffTheRecord()) return nullptr; -@@ -489,6 +499,16 @@ history::HistoryService* HistoryTabHelper::GetHistoryService() { +@@ -452,6 +462,16 @@ history::HistoryService* HistoryTabHelper::GetHistoryService() { profile, ServiceAccessType::IMPLICIT_ACCESS); } @@ -1423,7 +1429,7 @@ diff --git a/chrome/browser/history/history_tab_helper.h b/chrome/browser/histor private: explicit HistoryTabHelper(content::WebContents* web_contents); friend class content::WebContentsUserData; -@@ -85,9 +92,6 @@ class HistoryTabHelper +@@ -83,9 +90,6 @@ class HistoryTabHelper void OnLanguageDetermined( const translate::LanguageDetectionDetails& details) override; @@ -1446,7 +1452,7 @@ diff --git a/chrome/browser/offline_pages/android/offline_page_bridge.cc b/chrom using base::android::ConvertJavaStringToUTF8; using base::android::ConvertUTF16ToJavaString; -@@ -786,9 +789,15 @@ void OfflinePageBridge::GetPageByOfflineIdDone( +@@ -780,9 +783,15 @@ void OfflinePageBridge::GetPageByOfflineIdDone( } if (offline_page_model_->IsArchiveInInternalDir(offline_page->file_path)) { @@ -1731,7 +1737,7 @@ diff --git a/chrome/browser/offline_pages/request_coordinator_factory.h b/chrome 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 -@@ -249,6 +249,7 @@ +@@ -256,6 +256,7 @@ #if BUILDFLAG(IS_ANDROID) #include "chrome/browser/accessibility/accessibility_prefs/android/accessibility_prefs_controller.h" @@ -1739,7 +1745,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" -@@ -1789,6 +1790,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -1857,6 +1858,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, usage_stats::UsageStatsBridge::RegisterProfilePrefs(registry); variations::VariationsService::RegisterProfilePrefs(registry); webapps::InstallPromptPrefs::RegisterProfilePrefs(registry); @@ -1761,8 +1767,8 @@ diff --git a/chrome/browser/profiles/profile_selections.cc b/chrome/browser/prof +#include "components/prefs/pref_service.h" +#include "chrome/common/pref_names.h" #include "chrome/browser/profiles/profile.h" - #include "chrome/browser/profiles/profile_types_ash.h" #include "components/profile_metrics/browser_profile_type.h" + @@ -110,6 +113,13 @@ Profile* ProfileSelections::ApplyProfileSelection(Profile* profile) const { return nullptr; case ProfileSelection::kOriginalOnly: @@ -1823,10 +1829,10 @@ diff --git a/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/ +import org.chromium.base.ContextUtils; + - /** - * An interface for pages that will be using Android views instead of html/rendered Web content. - */ -@@ -120,12 +122,12 @@ public interface NativePage { + /** An interface for pages that will be using Android views instead of html/rendered Web content. */ + public interface NativePage { + /** +@@ -118,12 +120,12 @@ public interface NativePage { */ @Deprecated // Use GURL-variant instead. static boolean isNativePageUrl(String url, boolean isIncognito) { @@ -1838,10 +1844,10 @@ diff --git a/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/ return url != null - && nativePageType(url.getHost(), url.getScheme(), null, isIncognito) + && nativePageType(url.getHost(), url.getScheme(), null, isIncognito, false) - != NativePageType.NONE; + != NativePageType.NONE; } -@@ -137,11 +139,12 @@ public interface NativePage { +@@ -135,11 +137,12 @@ public interface NativePage { */ // TODO(crbug/783819) - Convert to using GURL. static @NativePageType int nativePageType( @@ -1856,7 +1862,7 @@ diff --git a/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/ } /** -@@ -150,7 +153,7 @@ public interface NativePage { +@@ -148,7 +151,7 @@ public interface NativePage { * @return Type of the native page defined in {@link NativePageType}. */ private static @NativePageType int nativePageType( @@ -1865,7 +1871,7 @@ diff --git a/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/ if (!UrlConstants.CHROME_NATIVE_SCHEME.equals(scheme) && !UrlConstants.CHROME_SCHEME.equals(scheme)) { return NativePageType.NONE; -@@ -168,7 +171,8 @@ public interface NativePage { +@@ -166,7 +169,8 @@ public interface NativePage { return NativePageType.DOWNLOADS; } else if (UrlConstants.HISTORY_HOST.equals(host)) { return NativePageType.HISTORY; @@ -1878,7 +1884,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 -@@ -1322,6 +1322,37 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1225,6 +1225,37 @@ Your Google account may have other forms of browsing history like searches and a Clears history from all synced devices @@ -1919,7 +1925,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 -@@ -178,6 +178,7 @@ public class LocationBarModel implements ToolbarDataProvider, LocationBarDataPro +@@ -165,6 +165,7 @@ public class LocationBarModel implements ToolbarDataProvider, LocationBarDataPro protected String mFormattedFullUrl; protected String mUrlForDisplay; private boolean mOmniboxUpdatedConnectionSecurityIndicatorsEnabled; @@ -1927,12 +1933,12 @@ 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 -@@ -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, -- @NonNull SearchEngineLogoUtils searchEngineLogoUtils) { -+ @NonNull SearchEngineLogoUtils searchEngineLogoUtils, +@@ -188,7 +189,9 @@ public class LocationBarModel implements ToolbarDataProvider, LocationBarDataPro + Context context, + NewTabPageDelegate newTabPageDelegate, + @NonNull UrlFormatter urlFormatter, +- @NonNull OfflineStatus offlineStatus) { ++ @NonNull OfflineStatus offlineStatus, + boolean isAlwaysIncognito) { + mIsAlwaysIncognito = isAlwaysIncognito; // (uazo) to do, check mContext = context; @@ -1984,7 +1990,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 -@@ -3917,6 +3917,12 @@ inline constexpr char kOutOfProcessSystemDnsResolutionEnabled[] = +@@ -3938,6 +3938,12 @@ inline constexpr char kOutOfProcessSystemDnsResolutionEnabled[] = "net.out_of_process_system_dns_resolution_enabled"; #endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) @@ -2000,7 +2006,7 @@ diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h diff --git a/components/content_settings/core/browser/content_settings_pref_provider.cc b/components/content_settings/core/browser/content_settings_pref_provider.cc --- a/components/content_settings/core/browser/content_settings_pref_provider.cc +++ b/components/content_settings/core/browser/content_settings_pref_provider.cc -@@ -87,10 +87,12 @@ void PrefProvider::RegisterProfilePrefs( +@@ -91,10 +91,12 @@ void PrefProvider::RegisterProfilePrefs( PrefProvider::PrefProvider(PrefService* prefs, bool off_the_record, @@ -2013,7 +2019,7 @@ diff --git a/components/content_settings/core/browser/content_settings_pref_prov store_last_modified_(store_last_modified), clock_(base::DefaultClock::GetInstance()) { TRACE_EVENT_BEGIN("startup", "PrefProvider::PrefProvider"); -@@ -113,10 +115,14 @@ PrefProvider::PrefProvider(PrefService* prefs, +@@ -117,10 +119,14 @@ PrefProvider::PrefProvider(PrefService* prefs, WebsiteSettingsRegistry* website_settings = WebsiteSettingsRegistry::GetInstance(); for (const WebsiteSettingsInfo* info : *website_settings) { @@ -2040,7 +2046,7 @@ diff --git a/components/content_settings/core/browser/content_settings_pref_prov bool store_last_modified, bool restore_session); -@@ -110,6 +111,7 @@ class PrefProvider : public UserModifiableProvider { +@@ -116,6 +117,7 @@ class PrefProvider : public UserModifiableProvider { raw_ptr prefs_; const bool off_the_record_; @@ -2133,7 +2139,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 -@@ -781,7 +781,9 @@ bool SearchProvider::IsQuerySuitableForSuggest(bool* query_is_private) const { +@@ -767,7 +767,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(); @@ -2195,4 +2201,3 @@ diff --git a/net/base/file_stream_context.cc b/net/base/file_stream_context.cc file = base::OpenContentUriForRead(path); } else { -- -2.25.1 diff --git a/build/patches/Add-autoplay-site-setting.patch b/build/patches/Add-autoplay-site-setting.patch index a242e6d3b..fb3be1be3 100644 --- a/build/patches/Add-autoplay-site-setting.patch +++ b/build/patches/Add-autoplay-site-setting.patch @@ -11,13 +11,13 @@ Require: Content-settings-infrastructure.patch .../res/drawable-xhdpi/settings_autoplay.png | Bin 0 -> 551 bytes .../res/drawable-xxhdpi/settings_autoplay.png | Bin 0 -> 792 bytes .../drawable-xxxhdpi/settings_autoplay.png | Bin 0 -> 1064 bytes - .../impl/BromiteAutoplayContentSetting.java | 92 ++++++++++++++++++ + .../impl/BromiteAutoplayContentSetting.java | 93 ++++++++++++++++++ .../bromite_content_settings/autoplay.grdp | 21 ++++ .../bromite_content_settings/autoplay.inc | 12 +++ .../core/browser/content_settings_registry.cc | 2 +- .../core/html/media/autoplay_policy.cc | 14 +++ .../core/html/media/autoplay_policy.h | 4 + - 11 files changed, 144 insertions(+), 1 deletion(-) + 11 files changed, 145 insertions(+), 1 deletion(-) create mode 100644 components/browser_ui/site_settings/android/java/res/drawable-hdpi/settings_autoplay.png create mode 100644 components/browser_ui/site_settings/android/java/res/drawable-mdpi/settings_autoplay.png create mode 100644 components/browser_ui/site_settings/android/java/res/drawable-xhdpi/settings_autoplay.png @@ -139,7 +139,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c new file mode 100644 --- /dev/null +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/impl/BromiteAutoplayContentSetting.java -@@ -0,0 +1,92 @@ +@@ -0,0 +1,93 @@ +/* + This file is part of Bromite. + @@ -192,7 +192,8 @@ new file mode 100644 + /*defaultEnabledValue*/ getDefaultEnabledValue(), + /*defaultDisabledValue*/ getDefaultDisabledValue(), + /*enabledSummary*/ R.string.website_settings_category_autoplay_enabled, -+ /*disabledSummary*/ R.string.website_settings_category_autoplay_disabled); ++ /*disabledSummary*/ R.string.website_settings_category_autoplay_disabled, ++ /*summaryOverrideForScreenReader*/ 0); + } + + @Override @@ -278,13 +279,13 @@ 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 -@@ -246,7 +246,7 @@ void ContentSettingsRegistry::Init() { +@@ -250,7 +250,7 @@ void ContentSettingsRegistry::Init() { ContentSettingsInfo::INHERIT_IN_INCOGNITO, ContentSettingsInfo::EXCEPTIONS_ON_SECURE_ORIGINS_ONLY); - Register(ContentSettingsType::AUTOPLAY, "autoplay", CONTENT_SETTING_ALLOW, + Register(ContentSettingsType::AUTOPLAY, "autoplay", CONTENT_SETTING_BLOCK, - WebsiteSettingsInfo::UNSYNCABLE, /*allowlisted_schemes=*/{}, + WebsiteSettingsInfo::UNSYNCABLE, /*allowlisted_primary_schemes=*/{}, /*valid_settings=*/{CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK}, WebsiteSettingsInfo::TOP_ORIGIN_ONLY_SCOPE, diff --git a/third_party/blink/renderer/core/html/media/autoplay_policy.cc b/third_party/blink/renderer/core/html/media/autoplay_policy.cc @@ -298,7 +299,7 @@ diff --git a/third_party/blink/renderer/core/html/media/autoplay_policy.cc b/thi #include "third_party/blink/public/platform/web_media_player.h" #include "third_party/blink/public/web/web_local_frame.h" #include "third_party/blink/public/web/web_local_frame_client.h" -@@ -310,6 +311,8 @@ void AutoplayPolicy::TryUnlockingUserGesture() { +@@ -332,6 +333,8 @@ void AutoplayPolicy::TryUnlockingUserGesture() { } bool AutoplayPolicy::IsGestureNeededForPlayback() const { @@ -307,7 +308,7 @@ diff --git a/third_party/blink/renderer/core/html/media/autoplay_policy.cc b/thi if (!IsLockedPendingUserGesture()) return false; -@@ -408,6 +411,17 @@ void AutoplayPolicy::MaybeSetAutoplayInitiated() { +@@ -430,6 +433,17 @@ void AutoplayPolicy::MaybeSetAutoplayInitiated() { } } @@ -328,7 +329,7 @@ diff --git a/third_party/blink/renderer/core/html/media/autoplay_policy.cc b/thi diff --git a/third_party/blink/renderer/core/html/media/autoplay_policy.h b/third_party/blink/renderer/core/html/media/autoplay_policy.h --- a/third_party/blink/renderer/core/html/media/autoplay_policy.h +++ b/third_party/blink/renderer/core/html/media/autoplay_policy.h -@@ -133,6 +133,10 @@ class CORE_EXPORT AutoplayPolicy final +@@ -137,6 +137,10 @@ class CORE_EXPORT AutoplayPolicy final // should use, if checking to see if an action is allowed. bool IsLockedPendingUserGesture() const; @@ -340,4 +341,3 @@ diff --git a/third_party/blink/renderer/core/html/media/autoplay_policy.h b/thir bool IsOrWillBeAutoplayingMutedInternal(bool muted) const; -- -2.25.1 diff --git a/build/patches/Add-bookmark-import-export-actions.patch b/build/patches/Add-bookmark-import-export-actions.patch index c07bd8439..d1d0f4ce6 100644 --- a/build/patches/Add-bookmark-import-export-actions.patch +++ b/build/patches/Add-bookmark-import-export-actions.patch @@ -33,7 +33,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../DownloadLocationDialogCoordinator.java | 8 +- .../flags/android/chrome_feature_list.cc | 1 + .../browser/flags/ChromeFeatureList.java | 1 + - chrome/browser/importer/profile_writer.cc | 12 + + chrome/browser/importer/profile_writer.cc | 10 + chrome/browser/importer/profile_writer.h | 6 + .../preferences/ChromePreferenceKeys.java | 3 + .../strings/android_chrome_strings.grd | 18 ++ @@ -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, 920 insertions(+), 29 deletions(-) + 43 files changed, 918 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 @@ -137,12 +137,12 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/TabbedModeTabDe private final BrowserControlsVisibilityDelegate mAppBrowserControlsVisibilityDelegate; private final Supplier mShareDelegateSupplier; private final Supplier mEphemeralTabCoordinatorSupplier; -@@ -76,7 +77,7 @@ public class TabbedModeTabDelegateFactory implements TabDelegateFactory { - +@@ -77,7 +78,7 @@ public class TabbedModeTabDelegateFactory implements TabDelegateFactory { private NativePageFactory mNativePageFactory; -- public TabbedModeTabDelegateFactory(Activity activity, -+ public TabbedModeTabDelegateFactory(ChromeActivity activity, + public TabbedModeTabDelegateFactory( +- Activity activity, ++ ChromeActivity activity, BrowserControlsVisibilityDelegate appBrowserControlsVisibilityDelegate, Supplier shareDelegateSupplier, Supplier ephemeralTabCoordinatorSupplier, @@ -171,9 +171,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/bookmarks/B @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); -@@ -54,8 +62,23 @@ public class BookmarkActivity extends SnackbarActivity { - BackPressHelper.create(this, getOnBackPressedDispatcher(), - mBookmarkManagerCoordinator::onBackPressed, SecondaryActivity.BOOKMARK); +@@ -66,8 +74,23 @@ public class BookmarkActivity extends SnackbarActivity { + mBookmarkManagerCoordinator::onBackPressed, + SecondaryActivity.BOOKMARK); } + + final boolean listenToActivityState = true; @@ -195,15 +195,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/bookmarks/B @Override protected void onDestroy() { super.onDestroy(); -@@ -65,6 +88,7 @@ public class BookmarkActivity extends SnackbarActivity { +@@ -77,6 +100,7 @@ public class BookmarkActivity extends SnackbarActivity { @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); + mWindowAndroid.getIntentRequestTracker().onActivityResult(requestCode, resultCode, data); if (requestCode == EDIT_BOOKMARK_REQUEST_CODE && resultCode == RESULT_OK) { - BookmarkId bookmarkId = BookmarkId.getBookmarkIdFromString( - data.getStringExtra(INTENT_VISIT_BOOKMARK_ID)); -@@ -72,6 +96,14 @@ public class BookmarkActivity extends SnackbarActivity { + BookmarkId bookmarkId = + BookmarkId.getBookmarkIdFromString( +@@ -85,6 +109,14 @@ public class BookmarkActivity extends SnackbarActivity { } } @@ -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; -@@ -38,6 +51,33 @@ import org.chromium.url.GURL; +@@ -36,6 +49,33 @@ import org.chromium.url.GURL; import java.util.ArrayList; import java.util.List; @@ -276,7 +276,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm /** * Provides the communication channel for Android to fetch and manipulate the bookmark model stored * in native. -@@ -451,6 +491,209 @@ class BookmarkBridge { +@@ -435,6 +475,209 @@ class BookmarkBridge { .getTotalBookmarkCount(mNativeBookmarkBridge, id.getId(), id.getType()); } @@ -486,7 +486,7 @@ 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. * -@@ -979,6 +1222,39 @@ class BookmarkBridge { +@@ -950,6 +1193,39 @@ class BookmarkBridge { depthList.add(depth); } @@ -526,7 +526,7 @@ 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++) { -@@ -1024,6 +1300,10 @@ class BookmarkBridge { +@@ -994,6 +1270,10 @@ class BookmarkBridge { void getChildIds( long nativeBookmarkBridge, long id, int type, List bookmarksList); @@ -560,7 +560,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/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 -@@ -49,6 +49,8 @@ import org.chromium.components.image_fetcher.ImageFetcher; +@@ -47,6 +47,8 @@ import org.chromium.components.image_fetcher.ImageFetcher; import org.chromium.components.image_fetcher.ImageFetcherConfig; import org.chromium.components.image_fetcher.ImageFetcherFactory; import org.chromium.ui.KeyboardVisibilityDelegate; @@ -569,7 +569,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; -@@ -326,6 +328,13 @@ public class BookmarkManagerCoordinator +@@ -320,6 +322,13 @@ public class BookmarkManagerCoordinator // Public API implementation. @@ -586,7 +586,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/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 -@@ -55,6 +55,8 @@ import org.chromium.components.browser_ui.widget.selectable_list.SelectionDelega +@@ -53,6 +53,8 @@ import org.chromium.components.browser_ui.widget.selectable_list.SelectionDelega import org.chromium.components.browser_ui.widget.selectable_list.SelectionDelegate.SelectionObserver; import org.chromium.components.commerce.core.CommerceSubscription; import org.chromium.components.commerce.core.ShoppingService; @@ -605,7 +605,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm /** 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 +@@ -551,6 +556,14 @@ class BookmarkManagerMediator mNativePage = nativePage; } @@ -620,7 +620,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm /** See BookmarkManager(Coordinator)#updateForUrl */ void updateForUrl(String url) { // Bookmark model is null if the manager has been destroyed. -@@ -742,6 +755,16 @@ class BookmarkManagerMediator +@@ -727,6 +740,16 @@ class BookmarkManagerMediator } } @@ -788,7 +788,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat import org.chromium.chrome.browser.app.download.home.DownloadPage; import org.chromium.chrome.browser.bookmarks.BookmarkPage; import org.chromium.chrome.browser.browser_controls.BrowserControlsMarginSupplier; -@@ -53,7 +54,7 @@ import org.chromium.ui.util.ColorUtils; +@@ -52,7 +53,7 @@ import org.chromium.ui.util.ColorUtils; * Creates NativePage objects to show chrome-native:// URLs using the native Android view system. */ public class NativePageFactory { @@ -798,15 +798,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat private final BrowserControlsManager mBrowserControlsManager; private final Supplier mCurrentTabSupplier; @@ -70,7 +71,7 @@ public class NativePageFactory { - private NativePageBuilder mNativePageBuilder; -- public NativePageFactory(@NonNull Activity activity, -+ public NativePageFactory(@NonNull ChromeActivity activity, + public NativePageFactory( +- @NonNull Activity activity, ++ @NonNull ChromeActivity activity, @NonNull BottomSheetController sheetController, @NonNull BrowserControlsManager browserControlsManager, @NonNull Supplier currentTabSupplier, -@@ -118,7 +119,7 @@ public class NativePageFactory { +@@ -130,7 +131,7 @@ public class NativePageFactory { @VisibleForTesting static class NativePageBuilder { @@ -815,18 +815,18 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat private final BottomSheetController mBottomSheetController; private final Supplier mUma; private final BrowserControlsManager mBrowserControlsManager; -@@ -133,7 +134,7 @@ public class NativePageFactory { - private final HomeSurfaceTracker mHomeSurfaceTracker; +@@ -146,7 +147,7 @@ public class NativePageFactory { private final ObservableSupplier mTabContentManagerSupplier; -- public NativePageBuilder(Activity activity, Supplier uma, -+ public NativePageBuilder(ChromeActivity activity, Supplier uma, + public NativePageBuilder( +- Activity activity, ++ ChromeActivity activity, + Supplier uma, BottomSheetController sheetController, - BrowserControlsManager browserControlsManager, Supplier currentTabSupplier, - Supplier snackbarManagerSupplier, -@@ -175,7 +176,7 @@ public class NativePageFactory { - protected NativePage buildBookmarksPage(Tab tab) { - return new BookmarkPage(mActivity.getComponentName(), mSnackbarManagerSupplier.get(), + BrowserControlsManager browserControlsManager, +@@ -208,7 +209,7 @@ public class NativePageFactory { + mActivity.getComponentName(), + mSnackbarManagerSupplier.get(), mTabModelSelector.isIncognitoSelected(), - new TabShim(tab, mBrowserControlsManager, mTabModelSelector)); + new TabShim(tab, mBrowserControlsManager, mTabModelSelector), mActivity); @@ -836,7 +836,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 -@@ -208,6 +208,8 @@ static_library("browser") { +@@ -199,6 +199,8 @@ static_library("browser") { "bluetooth/chrome_bluetooth_delegate_impl_client.h", "bookmarks/bookmark_model_factory.cc", "bookmarks/bookmark_model_factory.h", @@ -845,7 +845,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", -@@ -1974,6 +1976,13 @@ static_library("browser") { +@@ -1939,6 +1941,13 @@ static_library("browser") { ] } @@ -859,7 +859,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn configs += [ "//build/config/compiler:wexit_time_destructors", "//build/config:precompiled_headers", -@@ -3691,8 +3700,6 @@ static_library("browser") { +@@ -3664,8 +3673,6 @@ static_library("browser") { "badging/badge_manager_factory.h", "banners/app_banner_manager_desktop.cc", "banners/app_banner_manager_desktop.h", @@ -871,7 +871,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn 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 -@@ -58,6 +58,25 @@ +@@ -56,6 +56,25 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/web_contents.h" @@ -897,7 +897,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse using base::android::AttachCurrentThread; using base::android::ConvertUTF16ToJavaString; using base::android::ConvertUTF8ToJavaString; -@@ -75,8 +94,92 @@ using bookmarks::android::JavaBookmarkIdGetType; +@@ -73,12 +92,96 @@ using bookmarks::android::JavaBookmarkIdGetType; using content::BrowserThread; using power_bookmarks::PowerBookmarkMeta; @@ -952,7 +952,11 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse +} // internal + namespace { + // The key used to connect the instance of the bookmark bridge to the bookmark + // model. + const char kBookmarkBridgeUserDataKey[] = "bookmark_bridge"; + // Compares titles of different instance of BookmarkNode. +class FileBookmarksExportObserver: public BookmarksExportObserver { + public: + FileBookmarksExportObserver( @@ -990,7 +994,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse class BookmarkTitleComparer { public: explicit BookmarkTitleComparer(BookmarkBridge* bookmark_bridge, -@@ -198,6 +301,10 @@ BookmarkBridge::~BookmarkBridge() { +@@ -199,6 +302,10 @@ BookmarkBridge::~BookmarkBridge() { if (partner_bookmarks_shim_) partner_bookmarks_shim_->RemoveObserver(this); reading_list_manager_->RemoveObserver(this); @@ -1001,7 +1005,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse } void BookmarkBridge::Destroy(JNIEnv*) { -@@ -556,6 +663,182 @@ jint BookmarkBridge::GetTotalBookmarkCount( +@@ -539,6 +646,182 @@ jint BookmarkBridge::GetTotalBookmarkCount( return count; } @@ -1187,7 +1191,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.h b/chrome/browser/bookmarks/android/bookmark_bridge.h --- a/chrome/browser/bookmarks/android/bookmark_bridge.h +++ b/chrome/browser/bookmarks/android/bookmark_bridge.h -@@ -19,6 +19,7 @@ +@@ -20,6 +20,7 @@ #include "base/supports_user_data.h" #include "chrome/browser/android/bookmarks/partner_bookmarks_shim.h" #include "chrome/browser/image_service/image_service_factory.h" @@ -1195,17 +1199,17 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.h b/chrome/browser #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_observer.h" #include "chrome/browser/reading_list/android/reading_list_manager.h" -@@ -27,6 +28,9 @@ +@@ -31,6 +32,9 @@ #include "components/prefs/pref_change_registrar.h" #include "url/android/gurl_android.h" +#include "components/search_engines/template_url.h" +#include "ui/shell_dialogs/select_file_dialog.h" + - namespace bookmarks { - class BookmarkModel; - class ManagedBookmarkService; -@@ -44,7 +48,8 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver, + class BookmarkBridgeTest; + + // The delegate to fetch bookmarks information for the Android native +@@ -42,7 +46,8 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver, public PartnerBookmarksShim::Observer, public ReadingListManager::Observer, public ProfileObserver, @@ -1215,7 +1219,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.h b/chrome/browser public: BookmarkBridge(Profile* profile, bookmarks::BookmarkModel* model, -@@ -72,6 +77,12 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver, +@@ -69,6 +74,12 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver, bool IsDoingExtensiveChanges(JNIEnv* env); @@ -1228,7 +1232,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.h b/chrome/browser jboolean IsEditBookmarksEnabled(JNIEnv* env); void LoadEmptyPartnerBookmarkShimForTesting(JNIEnv* env); -@@ -84,6 +95,15 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver, +@@ -81,6 +92,15 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver, jlong id, jint type); @@ -1241,9 +1245,9 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.h b/chrome/browser + const base::android::JavaParamRef& java_window, + const base::android::JavaParamRef& j_export_path); + - void GetTopLevelFolderIds( + void GetAllFoldersWithDepths( JNIEnv* env, - const base::android::JavaParamRef& j_result_obj); + const base::android::JavaParamRef& j_folders_obj, @@ -310,12 +330,16 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver, void DestroyJavaObject(); @@ -1304,7 +1308,7 @@ diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/b 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 -@@ -49,7 +49,7 @@ public class DownloadLocationCustomView +@@ -47,7 +47,7 @@ public class DownloadLocationCustomView extends ScrollView private TextView mFileSize; private Spinner mFileLocation; private TextView mLocationAvailableSpace; @@ -1313,7 +1317,7 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse private @DownloadLocationDialogType int mDialogType; private long mTotalBytes; -@@ -72,7 +72,7 @@ public class DownloadLocationCustomView +@@ -70,7 +70,7 @@ public class DownloadLocationCustomView extends ScrollView mDontShowAgain = findViewById(R.id.show_again_checkbox); } @@ -1322,8 +1326,8 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse // TODO(xingliu): Remove this function, currently used by smart suggestion. mDialogType = dialogType; mTotalBytes = totalBytes; -@@ -125,7 +125,7 @@ public class DownloadLocationCustomView - * @return The text that the user inputted as the name of the file. +@@ -123,7 +123,7 @@ public class DownloadLocationCustomView extends ScrollView + * @return The text that the user inputted as the name of the file. */ @Nullable - String getFileName() { @@ -1331,8 +1335,8 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse if (mFileName == null || mFileName.getText() == null) return null; return mFileName.getText().toString(); } -@@ -134,7 +134,7 @@ public class DownloadLocationCustomView - * @return The file path based on what the user selected as the location of the file. +@@ -132,7 +132,7 @@ public class DownloadLocationCustomView extends ScrollView + * @return The file path based on what the user selected as the location of the file. */ @Nullable - DirectoryOption getDirectoryOption() { @@ -1343,10 +1347,10 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java --- a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java +++ b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java -@@ -36,12 +36,12 @@ import java.util.ArrayList; +@@ -35,12 +35,12 @@ import java.util.ArrayList; + */ public class DownloadLocationDialogCoordinator implements ModalDialogProperties.Controller { - @NonNull - private DownloadLocationDialogController mController; + @NonNull private DownloadLocationDialogController mController; - private PropertyModel mDialogModel; + protected PropertyModel mDialogModel; private PropertyModel mDownloadLocationDialogModel; @@ -1359,7 +1363,7 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse private long mTotalBytes; private @DownloadLocationDialogType int mDialogType; private String mSuggestedPath; -@@ -130,7 +130,7 @@ public class DownloadLocationDialogCoordinator implements ModalDialogProperties. +@@ -137,7 +137,7 @@ public class DownloadLocationDialogCoordinator implements ModalDialogProperties. * Called after retrieved the download directory options. * @param dirs An list of available download directories. */ @@ -1371,9 +1375,9 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse 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 -@@ -191,6 +191,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -189,6 +189,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { + &kCastDeviceFilter, &kClearOmniboxFocusAfterNavigation, - &kCloseTabSuggestions, &kCloseTabSaveTabList, + &kBookmarksExportUseSaf, &kCriticalPersistedTabData, @@ -1382,10 +1386,10 @@ 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 -@@ -489,6 +489,7 @@ public abstract class ChromeFeatureList { - public static final String USE_LIBUNWINDSTACK_NATIVE_UNWINDER_ANDROID = - "UseLibunwindstackNativeUnwinderAndroid"; +@@ -494,6 +494,7 @@ public abstract class ChromeFeatureList { public static final String USER_BYPASS_UI = "UserBypassUI"; + public static final String VERTICAL_AUTOMOTIVE_BACK_BUTTON_TOOLBAR = + "VerticalAutomotiveBackButtonToolbar"; + public static final String BOOKMARKS_EXPORT_USESAF = "BookmarksExportUseSaf"; public static final String VOICE_BUTTON_IN_TOP_TOOLBAR = "VoiceButtonInTopToolbar"; public static final String VOICE_SEARCH_AUDIO_CAPTURE_POLICY = "VoiceSearchAudioCapturePolicy"; @@ -1393,22 +1397,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 -@@ -105,12 +105,14 @@ void ProfileWriter::AddHistoryPage(const history::URLRows& page, - HistoryServiceFactory::GetForProfile(profile_, - ServiceAccessType::EXPLICIT_ACCESS) - ->AddPagesWithDetails(page, visit_source); -+#if !BUILDFLAG(IS_ANDROID) - // Measure the size of the history page after Auto Import on first run. - if (first_run::IsChromeFirstRun() && - visit_source == history::SOURCE_IE_IMPORTED) { - UMA_HISTOGRAM_COUNTS_1M("Import.ImportedHistorySize.AutoImportFromIE", - page.size()); - } -+#endif - } - - void ProfileWriter::AddHomepage(const GURL& home_page) { -@@ -131,6 +133,16 @@ void ProfileWriter::AddBookmarks( +@@ -125,6 +125,16 @@ void ProfileWriter::AddBookmarks( return; BookmarkModel* model = BookmarkModelFactory::GetForBrowserContext(profile_); @@ -1451,7 +1440,7 @@ diff --git a/chrome/browser/importer/profile_writer.h b/chrome/browser/importer/ 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 -@@ -101,6 +101,8 @@ public final class ChromePreferenceKeys { +@@ -104,6 +104,8 @@ public final class ChromePreferenceKeys { "enhanced_bookmark_last_used_parent_folder"; public static final String BOOKMARKS_SORT_ORDER = "Chrome.Bookmarks.BookmarkRowSortOrder"; public static final String BOOKMARKS_VISUALS_PREF = "Chrome.Bookmarks.BookmarkRowDisplay"; @@ -1460,7 +1449,7 @@ diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/bro /** * Whether Chrome is set as the default browser. -@@ -986,6 +988,7 @@ public final class ChromePreferenceKeys { +@@ -938,6 +940,7 @@ public final class ChromePreferenceKeys { AUTOFILL_ASSISTANT_PROACTIVE_HELP_ENABLED, APP_LAUNCH_LAST_KNOWN_ACTIVE_TAB_STATE, APP_LAUNCH_SEARCH_ENGINE_HAD_LOGO, @@ -1499,7 +1488,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn --- a/chrome/common/BUILD.gn +++ b/chrome/common/BUILD.gn -@@ -402,6 +402,9 @@ static_library("common_lib") { +@@ -403,6 +403,9 @@ static_library("common_lib") { sources += [ "media/chrome_media_drm_bridge_client.cc", "media/chrome_media_drm_bridge_client.h", @@ -1720,25 +1709,25 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui // The permission scenario for accessing media has evolved a bit over the years: // Early on, READ_EXTERNAL_STORAGE was required to access media, but that permission was // later deprecated. In its place (starting with Android T) READ_MEDIA_IMAGES and -@@ -381,7 +388,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick - } - - // TODO(finnur): Remove once we figure out the cause of crbug.com/950024. -- if (shouldUsePhotoPicker) { -+ if (shouldUsePhotoPicker || shouldShowHtmlTypes()) { - if (permissions.length != requestPermissions.length) { - throw new RuntimeException( - String.format("Permissions arrays misaligned: %d != %d", -@@ -395,7 +402,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick - } - } - -- if (shouldUsePhotoPicker) { -+ if (shouldUsePhotoPicker || shouldShowHtmlTypes()) { - if (permissions[i].equals(storagePermission) - || permissions[i].equals(Manifest.permission.READ_MEDIA_IMAGES) - || permissions[i].equals( -@@ -672,6 +679,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick +@@ -385,7 +392,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick + + // TODO(finnur): Remove once we figure out the cause of + // crbug.com/950024. +- if (shouldUsePhotoPicker) { ++ if (shouldUsePhotoPicker || shouldShowHtmlTypes()) { + if (permissions.length != requestPermissions.length) { + throw new RuntimeException( + String.format( +@@ -402,7 +409,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick + } + } + +- if (shouldUsePhotoPicker) { ++ if (shouldUsePhotoPicker || shouldShowHtmlTypes()) { + if (permissions[i].equals(storagePermission) + || permissions[i].equals( + Manifest.permission.READ_MEDIA_IMAGES) +@@ -685,6 +692,7 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick } if (!mimeTypes.contains(mimeType)) mimeTypes.add(mimeType); } @@ -1746,7 +1735,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java b/ui return mimeTypes; } -@@ -1000,6 +1008,10 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick +@@ -1032,6 +1040,10 @@ public class SelectFileDialog implements WindowAndroid.IntentCallback, PhotoPick return countAcceptTypesFor(superType) == mFileTypes.size(); } @@ -1859,4 +1848,3 @@ diff --git a/ui/shell_dialogs/select_file_dialog_win.cc b/ui/shell_dialogs/selec if (!owning_window->GetRootWindow()) return false; -- -2.25.1 diff --git a/build/patches/00Add-cromite-flags-support.patch b/build/patches/Add-cromite-flags-support.patch similarity index 94% rename from build/patches/00Add-cromite-flags-support.patch rename to build/patches/Add-cromite-flags-support.patch index ad2e70e9d..1852829b7 100644 --- a/build/patches/00Add-cromite-flags-support.patch +++ b/build/patches/Add-cromite-flags-support.patch @@ -128,7 +128,7 @@ diff --git a/base/BUILD.gn b/base/BUILD.gn sources = [ "allocator/allocator_check.cc", "allocator/allocator_check.h", -@@ -1037,7 +1039,7 @@ component("base") { +@@ -1030,7 +1032,7 @@ component("base") { "//build/config/compiler:wglobal_constructors", ] @@ -160,7 +160,7 @@ diff --git a/base/android/feature_map.cc b/base/android/feature_map.cc diff --git a/base/feature_list.cc b/base/feature_list.cc --- a/base/feature_list.cc +++ b/base/feature_list.cc -@@ -29,6 +29,33 @@ +@@ -30,6 +30,33 @@ #include "base/strings/stringprintf.h" #include "build/build_config.h" @@ -194,7 +194,7 @@ diff --git a/base/feature_list.cc b/base/feature_list.cc namespace base { namespace { -@@ -436,6 +463,48 @@ bool FeatureList::IsEnabled(const Feature& feature) { +@@ -441,6 +468,48 @@ bool FeatureList::IsEnabled(const Feature& feature) { return g_feature_list_instance->IsFeatureEnabled(feature); } @@ -243,7 +243,7 @@ diff --git a/base/feature_list.cc b/base/feature_list.cc // static bool FeatureList::IsValidFeatureOrFieldTrialName(StringPiece name) { return IsStringASCII(name) && name.find_first_of(",<*") == std::string::npos; -@@ -616,6 +685,17 @@ void FeatureList::SetCachingContextForTesting(uint16_t caching_context) { +@@ -662,6 +731,17 @@ void FeatureList::AddEarlyAllowedFeatureForTesting(std::string feature_name) { void FeatureList::FinalizeInitialization() { DCHECK(!initialized_); @@ -264,7 +264,7 @@ diff --git a/base/feature_list.cc b/base/feature_list.cc diff --git a/base/feature_list.h b/base/feature_list.h --- a/base/feature_list.h +++ b/base/feature_list.h -@@ -93,8 +93,10 @@ enum FeatureState { +@@ -94,8 +94,10 @@ enum FeatureState { // [1]: // https://crsrc.org/c/docs/speed/binary_size/android_binary_size_trybot.md#Mutable-Constants struct BASE_EXPORT LOGICALLY_CONST Feature { @@ -277,7 +277,7 @@ diff --git a/base/feature_list.h b/base/feature_list.h #if BUILDFLAG(ENABLE_BANNED_BASE_FEATURE_PREFIX) if (StringPiece(name).find(BUILDFLAG(BANNED_BASE_FEATURE_PREFIX)) == 0) { LOG(FATAL) << "Invalid feature name " << name << " starts with " -@@ -120,6 +122,9 @@ struct BASE_EXPORT LOGICALLY_CONST Feature { +@@ -121,6 +123,9 @@ struct BASE_EXPORT LOGICALLY_CONST Feature { // command line switch. const FeatureState default_state; @@ -287,7 +287,7 @@ diff --git a/base/feature_list.h b/base/feature_list.h private: friend class FeatureList; -@@ -395,6 +400,11 @@ class BASE_EXPORT FeatureList { +@@ -396,6 +401,11 @@ class BASE_EXPORT FeatureList { // instance, which is checked in builds with DCHECKs enabled. static bool IsEnabled(const Feature& feature); @@ -299,7 +299,7 @@ diff --git a/base/feature_list.h b/base/feature_list.h // Some characters are not allowed to appear in feature names or the // associated field trial names, as they are used as special characters for // command-line serialization. This function checks that the strings are ASCII -@@ -616,4 +626,62 @@ class BASE_EXPORT FeatureList { +@@ -652,4 +662,62 @@ class BASE_EXPORT FeatureList { } // namespace base @@ -396,16 +396,16 @@ diff --git a/build/android/gyp/java_cpp_features.py b/build/android/gyp/java_cpp diff --git a/chrome/android/java/res/values/values.xml b/chrome/android/java/res/values/values.xml --- a/chrome/android/java/res/values/values.xml +++ b/chrome/android/java/res/values/values.xml -@@ -44,6 +44,9 @@ found in the LICENSE file. - - 0.95 +@@ -9,6 +9,9 @@ found in the LICENSE file. + xmlns:tools="http://schemas.android.com/tools" + tools:ignore="MissingTranslation"> + Open Cromite flags list + chrome://flags/cromite + - - 0.5 - 0 + + Safety check -diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java ---- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java -+++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java -@@ -166,9 +166,8 @@ public class ToolbarControlContainer extends OptimizedFrameLayout implements Con - - return backgroundDrawable; - } else { -- final Drawable backgroundDrawable = -- AppCompatResources.getDrawable(getContext(), R.drawable.toolbar_background) -- .mutate(); -+ Drawable backgroundDrawable = new ColorDrawable( -+ ChromeColors.getPrimaryBackgroundColor(getContext(), incognito)); - backgroundDrawable.setTint(ChromeColors.getDefaultThemeColor(getContext(), incognito)); - backgroundDrawable.setTintMode(PorterDuff.Mode.MULTIPLY); - diff --git a/components/BUILD.gn b/components/BUILD.gn --- a/components/BUILD.gn +++ b/components/BUILD.gn @@ -200,7 +184,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 -@@ -811,7 +811,7 @@ test("components_unittests") { +@@ -819,7 +819,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. @@ -209,7 +193,7 @@ diff --git a/components/BUILD.gn b/components/BUILD.gn assert_no_deps = [ "//chrome/*" ] assert_no_deps += disallowed_extension_deps_ } -@@ -1099,7 +1099,7 @@ if (use_blink) { +@@ -1107,7 +1107,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. @@ -236,7 +220,7 @@ diff --git a/components/browser_ui/accessibility/android/java/res/xml/accessibil diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java --- a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java +++ b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java -@@ -33,6 +33,8 @@ public class AccessibilitySettings extends PreferenceFragmentCompat +@@ -31,6 +31,8 @@ public class AccessibilitySettings extends PreferenceFragmentCompat public static final String PREF_CAPTIONS = "captions"; public static final String PREF_ZOOM_INFO = "zoom_info"; @@ -245,7 +229,7 @@ diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/c private TextScalePreference mTextScalePref; private PageZoomPreference mPageZoomDefaultZoomPref; private ChromeSwitchPreference mPageZoomAlwaysShowPref; -@@ -117,6 +119,12 @@ public class AccessibilitySettings extends PreferenceFragmentCompat +@@ -123,6 +125,12 @@ public class AccessibilitySettings extends PreferenceFragmentCompat getPreferenceScreen().removePreference(readerForAccessibilityPref); } @@ -256,9 +240,9 @@ diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/c + forceTabletUiPref.setOnPreferenceChangeListener(this); + Preference captions = findPreference(PREF_CAPTIONS); - captions.setOnPreferenceClickListener(preference -> { - Intent intent = new Intent(Settings.ACTION_CAPTIONING_SETTINGS); -@@ -174,6 +182,8 @@ public class AccessibilitySettings extends PreferenceFragmentCompat + captions.setOnPreferenceClickListener( + preference -> { +@@ -182,6 +190,8 @@ public class AccessibilitySettings extends PreferenceFragmentCompat mFontSizePrefs.setUserFontScaleFactor((Float) newValue); } else if (PREF_FORCE_ENABLE_ZOOM.equals(preference.getKey())) { mFontSizePrefs.setForceEnableZoomFromUser((Boolean) newValue); @@ -270,7 +254,7 @@ diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/c diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettingsDelegate.java b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettingsDelegate.java --- a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettingsDelegate.java +++ b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettingsDelegate.java -@@ -60,6 +60,8 @@ public interface AccessibilitySettingsDelegate { +@@ -52,6 +52,8 @@ public interface AccessibilitySettingsDelegate { */ IntegerPreferenceDelegate getTextSizeContrastAccessibilityDelegate(); @@ -282,8 +266,8 @@ diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/c 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 -@@ -38,6 +38,11 @@ public class DeviceFormFactor { - */ +@@ -31,6 +31,11 @@ public class DeviceFormFactor { + /** Matches the value set in res/values-sw720dp/values.xml */ private static final int SCREEN_BUCKET_LARGET_TABLET = 3; + private static boolean mForceTabletUI; @@ -294,7 +278,7 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/DeviceFormFactor.java b/ui /** * Each activity could be on a different display, and this will just tell you whether the * display associated with the application context is "tablet sized". -@@ -63,6 +68,7 @@ public class DeviceFormFactor { +@@ -56,6 +61,7 @@ public class DeviceFormFactor { * E.g. http://developer.samsung.com/samsung-dex/testing */ public static boolean isNonMultiDisplayContextOnTablet(Context context) { @@ -303,4 +287,3 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/DeviceFormFactor.java b/ui } -- -2.25.1 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 94698a842..2d68ac2bc 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 @@ -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; -@@ -1333,8 +1334,10 @@ public class ChromeTabbedActivity extends ChromeActivity<resetlink>reset sync

<resetlink>reset sync

IMAGE @@ -119,4 +119,3 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro LINK -- -2.25.1 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 eeda8d048..aea46321f 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 @@ -39,7 +39,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser import java.util.ArrayList; import java.util.List; -@@ -564,9 +566,14 @@ public class TabGridDialogMediator +@@ -615,11 +617,16 @@ public class TabGridDialogMediator assert relatedTabs.size() > 0; @@ -49,12 +49,14 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser + url = gurl != null ? gurl.getSpec() : url; + } Tab parentTabToAttach = relatedTabs.get(relatedTabs.size() - 1); - mTabCreatorManager.getTabCreator(currentTab.isIncognito()) -- .createNewTab(new LoadUrlParams(UrlConstants.NTP_URL), -+ .createNewTab(new LoadUrlParams(url), - TabLaunchType.FROM_TAB_GROUP_UI, parentTabToAttach); + mTabCreatorManager + .getTabCreator(currentTab.isIncognito()) + .createNewTab( +- new LoadUrlParams(UrlConstants.NTP_URL), ++ new LoadUrlParams(url), + TabLaunchType.FROM_TAB_GROUP_UI, + parentTabToAttach); RecordUserAction.record("MobileNewTabOpened." + mComponentName); - }; 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 @@ -66,21 +68,23 @@ 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; -@@ -351,8 +352,13 @@ public class TabGroupUiMediator implements BackPressHandler { - assert relatedTabs.size() > 0; +@@ -371,10 +372,15 @@ public class TabGroupUiMediator implements BackPressHandler { + assert relatedTabs.size() > 0; - parentTabToAttach = relatedTabs.get(relatedTabs.size() - 1); -+ String url = UrlConstants.NTP_URL; -+ if (HomepageManager.getInstance().getPrefNTPIsHomepageEnabled()) { -+ GURL gurl = HomepageManager.getInstance().getHomepageGurl(); -+ url = gurl != null ? gurl.getSpec() : url; -+ } - mTabCreatorManager.getTabCreator(currentTab.isIncognito()) -- .createNewTab(new LoadUrlParams(UrlConstants.NTP_URL), -+ .createNewTab(new LoadUrlParams(url), - TabLaunchType.FROM_TAB_GROUP_UI, parentTabToAttach); - RecordUserAction.record("MobileNewTabOpened." + TabGroupUiCoordinator.COMPONENT_NAME); - }; + parentTabToAttach = relatedTabs.get(relatedTabs.size() - 1); ++ String url = UrlConstants.NTP_URL; ++ if (HomepageManager.getInstance().getPrefNTPIsHomepageEnabled()) { ++ GURL gurl = HomepageManager.getInstance().getHomepageGurl(); ++ url = gurl != null ? gurl.getSpec() : url; ++ } + mTabCreatorManager + .getTabCreator(currentTab.isIncognito()) + .createNewTab( +- new LoadUrlParams(UrlConstants.NTP_URL), ++ new LoadUrlParams(url), + TabLaunchType.FROM_TAB_GROUP_UI, + parentTabToAttach); + RecordUserAction.record( diff --git a/chrome/android/java/res/xml/homepage_preferences.xml b/chrome/android/java/res/xml/homepage_preferences.xml --- a/chrome/android/java/res/xml/homepage_preferences.xml +++ b/chrome/android/java/res/xml/homepage_preferences.xml @@ -99,7 +103,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 -@@ -247,6 +247,22 @@ public class HomepageManager implements HomepagePolicyManager.HomepagePolicyStat +@@ -233,6 +233,22 @@ public class HomepageManager notifyHomepageUpdated(); } @@ -131,9 +135,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/homepage/settin import org.chromium.url.GURL; +import org.chromium.components.embedder_support.util.UrlConstants; - /** - * Fragment that allows the user to configure homepage related preferences. -@@ -32,6 +33,8 @@ public class HomepageSettings extends ChromeBaseSettingsFragment { + /** Fragment that allows the user to configure homepage related preferences. */ + public class HomepageSettings extends ChromeBaseSettingsFragment { +@@ -30,6 +31,8 @@ public class HomepageSettings extends ChromeBaseSettingsFragment { @VisibleForTesting public static final String PREF_HOMEPAGE_RADIO_GROUP = "homepage_radio_group"; @@ -142,8 +146,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/homepage/settin private HomepageManager mHomepageManager; private RadioButtonGroupHomepagePreference mRadioButtons; -@@ -65,6 +68,15 @@ public class HomepageSettings extends ChromeBaseSettingsFragment { - }); +@@ -64,6 +67,15 @@ public class HomepageSettings extends ChromeBaseSettingsFragment { + }); mRadioButtons.setupPreferenceValues(createPreferenceValuesForRadioGroup()); + ChromeSwitchPreference mNTPIsHomepageSwitch = @@ -161,26 +165,26 @@ 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 -@@ -104,7 +104,6 @@ public class LaunchMetrics { +@@ -112,7 +112,6 @@ public class LaunchMetrics { public static void recordHomePageLaunchMetrics( boolean showHomeButton, boolean homepageIsNtp, GURL homepageGurl) { if (homepageGurl.isEmpty()) { - assert !showHomeButton : "Homepage should be disabled for an empty GURL"; } - LaunchMetricsJni.get().recordHomePageLaunchMetrics( - showHomeButton, homepageIsNtp, homepageGurl); + LaunchMetricsJni.get() + .recordHomePageLaunchMetrics(showHomeButton, homepageIsNtp, homepageGurl); diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java -@@ -27,6 +27,7 @@ import org.chromium.chrome.browser.compositor.CompositorViewHolder; +@@ -24,6 +24,7 @@ import org.chromium.chrome.browser.app.tab_activity_glue.ReparentingTask; + import org.chromium.chrome.browser.compositor.CompositorViewHolder; import org.chromium.chrome.browser.flags.ChromeFeatureList; - import org.chromium.chrome.browser.incognito.IncognitoUtils; import org.chromium.chrome.browser.new_tab_url.DseNewTabUrlManager; +import org.chromium.chrome.browser.homepage.HomepageManager; import org.chromium.chrome.browser.ntp.NewTabPageLaunchOrigin; import org.chromium.chrome.browser.ntp.NewTabPageUtils; import org.chromium.chrome.browser.prefetch.settings.PreloadPagesSettingsBridge; -@@ -497,6 +498,13 @@ public class ChromeTabCreator extends TabCreator { +@@ -484,6 +485,13 @@ public class ChromeTabCreator extends TabCreator { * @return the created tab. */ public Tab launchUrl(String url, @TabLaunchType int type, Intent intent, long intentTimestamp) { @@ -197,18 +201,18 @@ 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 -@@ -361,6 +361,7 @@ public final class ChromePreferenceKeys { +@@ -323,6 +323,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"; + public static final String HOMEPAGE_NTP_IS_HOMEPAGE = "newtabpage_is_homepage"; - /** - * Key used to save homepage location set by enterprise policy - */ + /** Key used to save homepage location set by enterprise policy */ + public static final String DEPRECATED_HOMEPAGE_LOCATION_POLICY = + "Chrome.Policy.HomepageLocation"; 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 -@@ -67,6 +67,7 @@ public class LegacyChromePreferenceKeys { +@@ -62,6 +62,7 @@ public class LegacyChromePreferenceKeys { ChromePreferenceKeys.HISTORY_SHOW_HISTORY_INFO, ChromePreferenceKeys.HOMEPAGE_ENABLED, ChromePreferenceKeys.HOMEPAGE_USE_DEFAULT_URI, @@ -219,7 +223,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 -@@ -1431,6 +1431,9 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1334,6 +1334,9 @@ Your Google account may have other forms of browsing history like searches and a Last hour @@ -244,7 +248,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 -@@ -1296,6 +1296,10 @@ inline constexpr char kUsedPolicyCertificates[] = +@@ -1311,6 +1311,10 @@ inline constexpr char kUsedPolicyCertificates[] = // visible on the toolbar. inline constexpr char kShowHomeButton[] = "browser.show_home_button"; @@ -256,4 +260,3 @@ diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h // The old key value is kept to avoid unnecessary migration code. inline constexpr char kSpeechRecognitionFilterProfanities[] = -- -2.25.1 diff --git a/build/patches/Add-search-engine.patch b/build/patches/Add-search-engine.patch index 6910720b5..f3562c93b 100644 --- a/build/patches/Add-search-engine.patch +++ b/build/patches/Add-search-engine.patch @@ -76,7 +76,7 @@ diff --git a/components/search_engines/search_engine_type.h b/components/search_ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc --- a/components/search_engines/template_url_prepopulate_data.cc +++ b/components/search_engines/template_url_prepopulate_data.cc -@@ -56,6 +56,7 @@ struct EngineAndTier { +@@ -61,6 +61,7 @@ struct EngineAndTier { // Default (for countries with no better engine set) constexpr EngineAndTier engines_default[] = { @@ -84,7 +84,7 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon {SearchEngineTier::kTopEngines, &google}, {SearchEngineTier::kTopEngines, &bing}, {SearchEngineTier::kTopEngines, &yahoo}, -@@ -1608,6 +1609,8 @@ const std::vector GetPrepopulationSetFromCountryID( +@@ -1613,6 +1614,8 @@ const std::vector GetPrepopulationSetFromCountryID( for (size_t i = 0; i < num_engines; i++) { t_url.push_back(engines[i]); } @@ -94,4 +94,3 @@ diff --git a/components/search_engines/template_url_prepopulate_data.cc b/compon } -- -2.25.1 diff --git a/build/patches/00Add-setting-to-clear-data-on-exit.patch b/build/patches/Add-setting-to-clear-data-on-exit.patch similarity index 93% rename from build/patches/00Add-setting-to-clear-data-on-exit.patch rename to build/patches/Add-setting-to-clear-data-on-exit.patch index f0d031311..40d7918e0 100644 --- a/build/patches/00Add-setting-to-clear-data-on-exit.patch +++ b/build/patches/Add-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 -@@ -301,6 +301,7 @@ chrome_java_sources = [ +@@ -303,6 +303,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 -@@ -150,6 +150,7 @@ import org.chromium.chrome.browser.profiles.ProfileManager; +@@ -159,6 +159,7 @@ import org.chromium.chrome.browser.profiles.ProfileProvider; 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; -@@ -1333,7 +1334,11 @@ public class ChromeTabbedActivity extends ChromeActivity Clear browsing data @@ -281,7 +281,7 @@ diff --git a/chrome/browser/browsing_data/chrome_browsing_data_lifetime_manager. 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 -@@ -426,6 +426,9 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( +@@ -432,6 +432,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(); -@@ -476,7 +479,9 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( +@@ -482,7 +485,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. -@@ -497,7 +502,9 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( +@@ -503,7 +508,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( -@@ -572,9 +579,13 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( +@@ -578,9 +585,13 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData( } device_event_log::Clear(delete_begin_, delete_end_); @@ -328,34 +328,34 @@ 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 -@@ -513,6 +513,23 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() { +@@ -506,6 +506,23 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() { (*s_allowlist)[browsing_data::prefs::kLastClearBrowsingDataTab] = - settings_api::PrefType::PREF_TYPE_NUMBER; + settings_api::PrefType::kNumber; + (*s_allowlist)[browsing_data::prefs::kDeleteBrowsingHistoryAtStart] = -+ settings_api::PrefType::PREF_TYPE_BOOLEAN; ++ settings_api::PrefType::kBoolean; + (*s_allowlist)[browsing_data::prefs::kDeleteDownloadHistoryAtStart] = -+ settings_api::PrefType::PREF_TYPE_BOOLEAN; ++ settings_api::PrefType::kBoolean; + (*s_allowlist)[browsing_data::prefs::kDeleteCacheAtStart] = -+ settings_api::PrefType::PREF_TYPE_BOOLEAN; ++ settings_api::PrefType::kBoolean; + (*s_allowlist)[browsing_data::prefs::kDeleteCookiesAtStart] = -+ settings_api::PrefType::PREF_TYPE_BOOLEAN; ++ settings_api::PrefType::kBoolean; + (*s_allowlist)[browsing_data::prefs::kDeletePasswordsAtStart] = -+ settings_api::PrefType::PREF_TYPE_BOOLEAN; ++ settings_api::PrefType::kBoolean; + (*s_allowlist)[browsing_data::prefs::kDeleteFormDataAtStart] = -+ settings_api::PrefType::PREF_TYPE_BOOLEAN; ++ settings_api::PrefType::kBoolean; + (*s_allowlist)[browsing_data::prefs::kDeleteSiteSettingsAtStart] = -+ settings_api::PrefType::PREF_TYPE_BOOLEAN; ++ settings_api::PrefType::kBoolean; + (*s_allowlist)[browsing_data::prefs::kDeleteHostedAppsDataAtStart] = -+ settings_api::PrefType::PREF_TYPE_BOOLEAN; ++ settings_api::PrefType::kBoolean; + // Accessibility. (*s_allowlist)[::prefs::kAccessibilityImageLabelsEnabled] = - settings_api::PrefType::PREF_TYPE_BOOLEAN; + settings_api::PrefType::kBoolean; 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 -@@ -54,9 +54,14 @@ public class ProfileManagerUtils { +@@ -52,10 +52,15 @@ public class ProfileManagerUtils { } } @@ -366,6 +366,7 @@ diff --git a/chrome/browser/profiles/android/java/src/org/chromium/chrome/browse @NativeMethods interface Natives { void flushPersistentDataForAllProfiles(); + void removeSessionCookiesForAllProfiles(); + void removeBrowsingDataAtStart(); } @@ -373,7 +374,7 @@ diff --git a/chrome/browser/profiles/android/java/src/org/chromium/chrome/browse diff --git a/chrome/browser/profiles/android/profile_manager_utils.cc b/chrome/browser/profiles/android/profile_manager_utils.cc --- a/chrome/browser/profiles/android/profile_manager_utils.cc +++ b/chrome/browser/profiles/android/profile_manager_utils.cc -@@ -67,3 +67,8 @@ static void JNI_ProfileManagerUtils_RemoveSessionCookiesForAllProfiles( +@@ -62,3 +62,8 @@ static void JNI_ProfileManagerUtils_RemoveSessionCookiesForAllProfiles( g_browser_process->profile_manager()->GetLoadedProfiles(), RemoveSessionCookiesForProfile); } @@ -385,7 +386,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 -@@ -1491,6 +1491,19 @@ void ProfileManager::DoFinalInit(ProfileInfo* profile_info, +@@ -1495,6 +1495,19 @@ void ProfileManager::DoFinalInit(ProfileInfo* profile_info, } } @@ -405,7 +406,7 @@ diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profile void ProfileManager::DoFinalInitForServices(Profile* profile, bool go_off_the_record) { if (!do_final_services_init_ || -@@ -2154,7 +2167,7 @@ void ProfileManager::OnBrowserClosed(Browser* browser) { +@@ -2166,7 +2179,7 @@ void ProfileManager::OnBrowserClosed(Browser* browser) { Profile* original_profile = profile->GetOriginalProfile(); // Do nothing if the closed window is not the last window of the same profile. for (auto* browser_iter : *BrowserList::GetInstance()) { @@ -429,7 +430,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 -@@ -304,6 +304,50 @@ +@@ -306,6 +306,50 @@ disabled="[[clearingInProgress_]]" no-set-pref> @@ -483,7 +484,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 -@@ -247,6 +247,7 @@ export class SettingsClearBrowsingDataDialogElement extends +@@ -297,6 +297,7 @@ export class SettingsClearBrowsingDataDialogElement extends value: () => [loadTimeData.getString('basicPageTitle'), loadTimeData.getString('advancedPageTitle'), @@ -491,7 +492,7 @@ diff --git a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_ ], }, -@@ -366,6 +367,7 @@ export class SettingsClearBrowsingDataDialogElement extends +@@ -417,6 +418,7 @@ export class SettingsClearBrowsingDataDialogElement extends } this.clearButtonDisabled_ = this.getSelectedDataTypes_(tab as HTMLElement).length === 0; @@ -502,7 +503,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 -@@ -1526,6 +1526,9 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1429,6 +1429,9 @@ Your Google account may have other forms of browsing history like searches and a Basic @@ -515,14 +516,14 @@ 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 -@@ -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}, -+ {"atStartPageTitle", IDS_CLEAR_BROWSING_DATA_ATSTART_TAB_TITLE}, - {"titleAndCount", IDS_SETTINGS_TITLE_AND_COUNT}, - {"safeBrowsingEnableExtendedReportingDesc", - IDS_SETTINGS_SAFEBROWSING_ENABLE_REPORTING_DESC}, +@@ -1660,6 +1660,7 @@ void AddPrivacyStrings(content::WebUIDataSource* html_source, + {"clearedData", IDS_SETTINGS_CLEARED_DATA}, + {"clearBrowsingData", IDS_SETTINGS_CLEAR_BROWSING_DATA}, + {"clearBrowsingDataDescription", IDS_SETTINGS_CLEAR_DATA_DESCRIPTION}, ++ {"atStartPageTitle", IDS_CLEAR_BROWSING_DATA_ATSTART_TAB_TITLE}, + {"titleAndCount", IDS_SETTINGS_TITLE_AND_COUNT}, + {"safeBrowsingEnableExtendedReportingDesc", + IDS_SETTINGS_SAFEBROWSING_ENABLE_REPORTING_DESC}, diff --git a/components/browsing_data/core/browsing_data_policies_utils.cc b/components/browsing_data/core/browsing_data_policies_utils.cc --- a/components/browsing_data/core/browsing_data_policies_utils.cc +++ b/components/browsing_data/core/browsing_data_policies_utils.cc @@ -655,7 +656,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"; -@@ -97,6 +107,23 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { +@@ -99,6 +109,23 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { registry->RegisterIntegerPref( kClearBrowsingDataHistoryNoticeShownTimes, 0); @@ -701,7 +702,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 -@@ -1569,6 +1569,7 @@ void StoragePartitionImpl::Initialize( +@@ -1571,6 +1571,7 @@ void StoragePartitionImpl::Initialize( .AppendASCII("Code Cache"); } DCHECK_GE(settings.size_in_bytes(), 0); @@ -710,4 +711,3 @@ diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage settings.size_in_bytes()); } -- -2.25.1 diff --git a/build/patches/00Add-setting-to-invert-tap-and-long-tap.patch b/build/patches/Add-setting-to-invert-tap-and-long-tap.patch similarity index 90% rename from build/patches/00Add-setting-to-invert-tap-and-long-tap.patch rename to build/patches/Add-setting-to-invert-tap-and-long-tap.patch index 833cd01b3..5251c91d6 100644 --- a/build/patches/00Add-setting-to-invert-tap-and-long-tap.patch +++ b/build/patches/Add-setting-to-invert-tap-and-long-tap.patch @@ -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 -@@ -87,8 +87,9 @@ class ChromeContextMenuItem { +@@ -111,8 +111,9 @@ class ChromeContextMenuItem { int SHARE_HIGHLIGHT = 32; int REMOVE_HIGHLIGHT = 33; int LEARN_MORE = 34; @@ -86,16 +86,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/Chr + int NUM_ENTRIES = 36; } - /** -@@ -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 + /** Mapping from {@link Item} to the ID found in the ids.xml. */ +@@ -152,6 +153,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 }; /** Mapping from {@link Item} to the ID of the string that describes the action of the item. */ -@@ -169,6 +171,7 @@ class ChromeContextMenuItem { +@@ -191,6 +193,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 @@ -106,20 +106,20 @@ 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 -@@ -241,6 +241,9 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { +@@ -266,6 +266,9 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { if (mParams.isAnchor()) { ModelList linkGroup = new ModelList(); + if (ChromeFeatureList.sShowAlwaysContextMenuOnLinks.isEnabled()) { + linkGroup.add(createListItem(Item.FOLLOW_LINK)); + } - if (FirstRunStatus.getFirstRunFlowComplete() && !isEmptyUrl(mParams.getUrl()) + if (FirstRunStatus.getFirstRunFlowComplete() + && !isEmptyUrl(mParams.getUrl()) && UrlUtilities.isAcceptedScheme(mParams.getUrl())) { - if (mMode == ContextMenuMode.NORMAL) { -@@ -593,6 +596,8 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { - ShareHelper.shareDirectly( - params, ShareHelper.getLastShareComponentName(), getProfile(), false); - }); +@@ -643,6 +646,8 @@ public class ChromeContextMenuPopulator implements ContextMenuPopulator { + getProfile(), + false); + }); + } else if (itemId == R.id.contextmenu_open_in_tab) { + mItemDelegate.onOpenUrl(mParams.getUrl(), mParams.getReferrer()); } else if (itemId == R.id.contextmenu_open_in_chrome) { @@ -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 -@@ -251,6 +251,14 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate { +@@ -266,6 +266,14 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate { mTab.loadUrl(loadUrlParams); } @@ -146,7 +146,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextM diff --git a/chrome/browser/contextmenu/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuItemDelegate.java b/chrome/browser/contextmenu/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuItemDelegate.java --- a/chrome/browser/contextmenu/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuItemDelegate.java +++ b/chrome/browser/contextmenu/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuItemDelegate.java -@@ -111,6 +111,8 @@ public interface ContextMenuItemDelegate { +@@ -110,6 +110,8 @@ public interface ContextMenuItemDelegate { */ void onOpenImageUrl(GURL url, Referrer referrer); @@ -158,18 +158,18 @@ diff --git a/chrome/browser/contextmenu/java/src/org/chromium/chrome/browser/con 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 -@@ -331,6 +331,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -327,6 +327,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kTabDragDropAndroid, &kTabAndLinkDragDropAndroid, &kTabEngagementReportingAndroid, + &blink::features::kShowAlwaysContextMenuOnLinks, - &kTabStripRedesign, &kTabletToolbarReordering, &kTabStateFlatBuffer, + &kTabStripStartupRefactoring, 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 -@@ -330,6 +330,8 @@ public abstract class ChromeFeatureList { +@@ -327,6 +327,8 @@ public abstract class ChromeFeatureList { public static final String NEW_TAB_SEARCH_ENGINE_URL_ANDROID = "NewTabSearchEngineUrlAndroid"; public static final String MOVE_TOP_TOOLBAR_TO_BOTTOM = "MoveTopToolbarToBottom"; @@ -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"; -@@ -615,6 +617,8 @@ public abstract class ChromeFeatureList { +@@ -614,6 +616,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 = -@@ -750,6 +754,7 @@ public abstract class ChromeFeatureList { +@@ -747,6 +751,7 @@ public abstract class ChromeFeatureList { sTabToGTSAnimation, sToolbarUseHardwareBitmapDraw, sUseChimeAndroidSdk, + sShowAlwaysContextMenuOnLinks, - sUseLibunwindstackNativeUnwinderAndroid); + sUseLibunwindstackNativeUnwinderAndroid, + sVerticalAutomotiveBackButtonToolbar); - 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 -@@ -1732,6 +1732,12 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1635,6 +1635,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 -@@ -2772,6 +2778,9 @@ To change this setting, <resetlink>reset sync

<resetlink>reset sync

Open in new Chrome tab @@ -239,7 +239,7 @@ diff --git a/components/browser_ui/accessibility/android/java/res/xml/accessibil diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java --- a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java +++ b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java -@@ -36,6 +36,7 @@ public class AccessibilitySettings extends PreferenceFragmentCompat +@@ -34,6 +34,7 @@ public class AccessibilitySettings extends PreferenceFragmentCompat private BooleanPreferenceDelegate mForceTabletUIDelegate; static final String PREF_FORCE_TABLET_UI = "force_tablet_ui"; static final String PREF_MOVE_TOOLBAR_TO_BOTTOM = "move_toolbar_bottom"; @@ -247,15 +247,15 @@ diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/c private TextScalePreference mTextScalePref; private PageZoomPreference mPageZoomDefaultZoomPref; private ChromeSwitchPreference mPageZoomAlwaysShowPref; -@@ -45,6 +46,7 @@ public class AccessibilitySettings extends PreferenceFragmentCompat +@@ -43,6 +44,7 @@ public class AccessibilitySettings extends PreferenceFragmentCompat private BooleanPreferenceDelegate mReaderForAccessibilityDelegate; private double mPageZoomLatestDefaultZoomPrefValue; private BooleanPreferenceDelegate mMoveTopToolbarToBottomDelegate; + private BooleanPreferenceDelegate mShowAlwaysContextMenuOnLinksDelegate; private FontSizePrefs mFontSizePrefs; - private FontSizePrefsObserver mFontSizePrefsObserver = new FontSizePrefsObserver() { -@@ -137,6 +139,12 @@ public class AccessibilitySettings extends PreferenceFragmentCompat + private FontSizePrefsObserver mFontSizePrefsObserver = +@@ -143,6 +145,12 @@ public class AccessibilitySettings extends PreferenceFragmentCompat mMoveToolbarToBottomPref.setChecked(mMoveTopToolbarToBottomDelegate.isEnabled()); mMoveToolbarToBottomPref.setOnPreferenceChangeListener(this); @@ -266,9 +266,9 @@ diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/c + mShowAlwaysContextMenuOnLinksPref.setOnPreferenceChangeListener(this); + Preference captions = findPreference(PREF_CAPTIONS); - captions.setOnPreferenceClickListener(preference -> { - Intent intent = new Intent(Settings.ACTION_CAPTIONING_SETTINGS); -@@ -210,6 +218,9 @@ public class AccessibilitySettings extends PreferenceFragmentCompat + captions.setOnPreferenceClickListener( + preference -> { +@@ -218,6 +226,9 @@ public class AccessibilitySettings extends PreferenceFragmentCompat } else if (PREF_MOVE_TOOLBAR_TO_BOTTOM.equals(preference.getKey())) { mMoveTopToolbarToBottomDelegate.setEnabled((Boolean) newValue); mDelegate.requestRestart(getActivity()); @@ -281,15 +281,15 @@ diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/c diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettingsDelegate.java b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettingsDelegate.java --- a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettingsDelegate.java +++ b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettingsDelegate.java -@@ -49,6 +49,8 @@ public interface AccessibilitySettingsDelegate { +@@ -43,6 +43,8 @@ public interface AccessibilitySettingsDelegate { BooleanPreferenceDelegate getMoveTopToolbarToBottomDelegate(); + BooleanPreferenceDelegate getShowAlwaysContextMenuOnLinksDelegate(); + - /** - * @return The BrowserContextHandle that should be used to read and update settings. - */ + /** @return The BrowserContextHandle that should be used to read and update settings. */ + BrowserContextHandle getBrowserContextHandle(); + diff --git a/cromite_flags/chrome/browser/about_flags_cc/Add-setting-to-invert-tap-and-long-tap.inc b/cromite_flags/chrome/browser/about_flags_cc/Add-setting-to-invert-tap-and-long-tap.inc new file mode 100644 --- /dev/null @@ -328,7 +328,7 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third #include "third_party/blink/renderer/core/page/page.h" #include "third_party/blink/renderer/core/speculation_rules/document_speculation_rules.h" #include "third_party/blink/renderer/platform/heap/garbage_collected.h" -@@ -456,6 +457,17 @@ void HTMLAnchorElement::NavigateToHyperlink(ResourceRequest request, +@@ -467,6 +468,17 @@ void HTMLAnchorElement::NavigateToHyperlink(ResourceRequest request, bool is_trusted, base::TimeTicks platform_time_stamp, KURL completed_url) { @@ -346,7 +346,7 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third LocalDOMWindow* window = GetDocument().domWindow(); if (!window) { return; -@@ -518,6 +530,15 @@ void HTMLAnchorElement::NavigateToHyperlink(ResourceRequest request, +@@ -527,6 +539,15 @@ void HTMLAnchorElement::NavigateToHyperlink(ResourceRequest request, /*element=*/this, request.HasUserGesture())); } @@ -362,7 +362,7 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third Frame* target_frame = frame->Tree().FindOrCreateFrameForNavigation(frame_request, target).frame; -@@ -541,7 +562,7 @@ void HTMLAnchorElement::SetHovered(bool hovered) { +@@ -559,7 +580,7 @@ void HTMLAnchorElement::SetHovered(bool hovered) { HTMLElement::SetHovered(hovered); } @@ -371,7 +371,7 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third event.SetDefaultHandled(); LocalDOMWindow* window = GetDocument().domWindow(); -@@ -641,13 +662,12 @@ void HTMLAnchorElement::HandleClick(Event& event) { +@@ -659,13 +680,12 @@ void HTMLAnchorElement::HandleClick(Event& event) { return; } @@ -389,7 +389,7 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third // We distinguish single/double click with some modifiers. // See the comment of `EventHandler.delayed_navigation_task_handle_`. auto task_handle = PostDelayedCancellableTask( -@@ -657,7 +677,9 @@ void HTMLAnchorElement::HandleClick(Event& event) { +@@ -675,7 +695,9 @@ void HTMLAnchorElement::HandleClick(Event& event) { frame->GetEventHandler().SetDelayedNavigationTaskHandle( std::move(task_handle)); } else { @@ -403,7 +403,7 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third diff --git a/third_party/blink/renderer/core/html/html_anchor_element.h b/third_party/blink/renderer/core/html/html_anchor_element.h --- a/third_party/blink/renderer/core/html/html_anchor_element.h +++ b/third_party/blink/renderer/core/html/html_anchor_element.h -@@ -104,6 +104,7 @@ class CORE_EXPORT HTMLAnchorElement : public HTMLElement, public DOMURLUtils { +@@ -106,6 +106,7 @@ class CORE_EXPORT HTMLAnchorElement : public HTMLElement, public DOMURLUtils { void SetHovered(bool hovered) override; void Trace(Visitor*) const override; @@ -411,7 +411,7 @@ diff --git a/third_party/blink/renderer/core/html/html_anchor_element.h b/third_ protected: void ParseAttribute(const AttributeModificationParams&) override; -@@ -126,12 +127,16 @@ class CORE_EXPORT HTMLAnchorElement : public HTMLElement, public DOMURLUtils { +@@ -130,12 +131,16 @@ class CORE_EXPORT HTMLAnchorElement : public HTMLElement, public DOMURLUtils { bool IsInteractiveContent() const final; InsertionNotificationRequest InsertedInto(ContainerNode&) override; void RemovedFrom(ContainerNode&) override; @@ -448,8 +448,8 @@ diff --git a/third_party/blink/renderer/core/html/html_image_element.cc b/third_ +#include "third_party/blink/renderer/core/page/context_menu_controller.h" #include "third_party/blink/renderer/core/paint/timing/paint_timing.h" #include "third_party/blink/renderer/core/probe/core_probes.h" - #include "third_party/blink/renderer/core/style/content_data.h" -@@ -753,6 +755,21 @@ void HTMLImageElement::DidFinishLifecycleUpdate( + #include "third_party/blink/renderer/core/resize_observer/resize_observer_entry.h" +@@ -794,6 +796,21 @@ void HTMLImageElement::DidFinishLifecycleUpdate( } } @@ -474,7 +474,7 @@ diff --git a/third_party/blink/renderer/core/html/html_image_element.cc b/third_ diff --git a/third_party/blink/renderer/core/html/html_image_element.h b/third_party/blink/renderer/core/html/html_image_element.h --- a/third_party/blink/renderer/core/html/html_image_element.h +++ b/third_party/blink/renderer/core/html/html_image_element.h -@@ -220,6 +220,8 @@ class CORE_EXPORT HTMLImageElement final +@@ -232,6 +232,8 @@ class CORE_EXPORT HTMLImageElement final void DidAddUserAgentShadowRoot(ShadowRoot&) override; void AdjustStyle(ComputedStyleBuilder&) override; @@ -486,7 +486,7 @@ diff --git a/third_party/blink/renderer/core/html/html_image_element.h b/third_p diff --git a/third_party/blink/renderer/core/page/context_menu_controller.cc b/third_party/blink/renderer/core/page/context_menu_controller.cc --- a/third_party/blink/renderer/core/page/context_menu_controller.cc +++ b/third_party/blink/renderer/core/page/context_menu_controller.cc -@@ -231,14 +231,16 @@ void ContextMenuController::DocumentDetached(Document* document) { +@@ -234,14 +234,16 @@ void ContextMenuController::DocumentDetached(Document* document) { } } @@ -506,7 +506,7 @@ diff --git a/third_party/blink/renderer/core/page/context_menu_controller.cc b/t mouse_event->SetDefaultHandled(); } -@@ -456,7 +458,8 @@ bool ContextMenuController::ShouldShowContextMenuFromTouch( +@@ -459,7 +461,8 @@ bool ContextMenuController::ShouldShowContextMenuFromTouch( bool ContextMenuController::ShowContextMenu(LocalFrame* frame, const PhysicalOffset& point, WebMenuSourceType source_type, @@ -516,7 +516,7 @@ diff --git a/third_party/blink/renderer/core/page/context_menu_controller.cc b/t // Displaying the context menu in this function is a big hack as we don't // have context, i.e. whether this is being invoked via a script or in // response to user input (Mouse event WM_RBUTTONDOWN, -@@ -479,6 +482,15 @@ bool ContextMenuController::ShowContextMenu(LocalFrame* frame, +@@ -482,6 +485,15 @@ bool ContextMenuController::ShowContextMenu(LocalFrame* frame, if (!result.InnerNodeOrImageMapImage()) return false; @@ -532,7 +532,7 @@ diff --git a/third_party/blink/renderer/core/page/context_menu_controller.cc b/t // Clear any previously set cached results if we are resetting the hit test // result. image_selection_cached_result_ = nullptr; -@@ -832,11 +844,13 @@ bool ContextMenuController::ShowContextMenu(LocalFrame* frame, +@@ -835,11 +847,13 @@ bool ContextMenuController::ShowContextMenu(LocalFrame* frame, SetAutofillData(result.InnerNode(), data); SetPasswordManagerData(result.InnerElement(), data); @@ -574,4 +574,3 @@ diff --git a/third_party/blink/renderer/core/page/context_menu_controller.h b/th bool ShouldShowContextMenuFromTouch(const ContextMenuData&); -- -2.25.1 diff --git a/build/patches/Add-site-engagement-flag.patch b/build/patches/Add-site-engagement-flag.patch index 4e6269db1..667d1b171 100644 --- a/build/patches/Add-site-engagement-flag.patch +++ b/build/patches/Add-site-engagement-flag.patch @@ -62,10 +62,10 @@ diff --git a/components/feature_engagement/public/feature_configurations.cc b/co #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) { +@@ -66,6 +67,12 @@ absl::optional GetClientSideFeatureConfig( + } - absl::optional GetClientSideFeatureConfig( - const base::Feature* feature) { + #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) + if (!base::FeatureList::IsEnabled(site_engagement::features::kSiteEngagement)) { + absl::optional config = FeatureConfig(); + config->valid = false; @@ -205,4 +205,3 @@ new file mode 100644 + +#endif -- -2.25.1 diff --git a/build/patches/Add-support-for-ISupportHelpAndFeedback.patch b/build/patches/Add-support-for-ISupportHelpAndFeedback.patch index 0b72ed3e2..56f129f95 100644 --- a/build/patches/Add-support-for-ISupportHelpAndFeedback.patch +++ b/build/patches/Add-support-for-ISupportHelpAndFeedback.patch @@ -12,7 +12,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/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 -@@ -84,6 +84,7 @@ import org.chromium.components.browser_ui.settings.CustomDividerFragment; +@@ -85,6 +85,7 @@ import org.chromium.components.browser_ui.settings.CustomDividerFragment; import org.chromium.components.browser_ui.settings.FragmentSettingsLauncher; import org.chromium.components.browser_ui.settings.PaddedItemDecorationWithDivider; import org.chromium.components.browser_ui.settings.SettingsLauncher; @@ -20,17 +20,17 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin 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; -@@ -436,8 +437,12 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity +@@ -454,8 +455,12 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity finish(); return true; } else if (item.getItemId() == R.id.menu_id_general_help) { -- HelpAndFeedbackLauncherImpl.getForProfile(mProfile).show( -- this, getString(R.string.help_context_settings), null); +- HelpAndFeedbackLauncherImpl.getForProfile(mProfile) +- .show(this, getString(R.string.help_context_settings), null); + if (mainFragment instanceof SettingsUtils.ISupportHelpAndFeedback) { + ((SettingsUtils.ISupportHelpAndFeedback)mainFragment).onHelpAndFeebackPressed(); + } else { -+ HelpAndFeedbackLauncherImpl.getForProfile(mProfile).show( -+ this, getString(R.string.help_context_settings), null); ++ HelpAndFeedbackLauncherImpl.getForProfile(mProfile) ++ .show(this, getString(R.string.help_context_settings), null); + } return true; } @@ -38,7 +38,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin diff --git a/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsUtils.java b/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsUtils.java --- a/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsUtils.java +++ b/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsUtils.java -@@ -97,4 +97,8 @@ public class SettingsUtils { +@@ -91,4 +91,8 @@ public class SettingsUtils { ToolbarUtils.setOverflowMenuVisibility(toolbar, visibility); return true; } @@ -48,4 +48,3 @@ diff --git a/components/browser_ui/settings/android/java/src/org/chromium/compon + } } -- -2.25.1 diff --git a/build/patches/Add-support-for-writing-URIs.patch b/build/patches/Add-support-for-writing-URIs.patch index f4f7fb0ef..4b3ba99fd 100644 --- a/build/patches/Add-support-for-writing-URIs.patch +++ b/build/patches/Add-support-for-writing-URIs.patch @@ -56,10 +56,10 @@ diff --git a/base/android/java/src/org/chromium/base/ContentUriUtils.java b/base +import android.system.Os; +import android.content.ContentProviderClient; + - /** - * This class provides methods to access content URI schemes. - */ -@@ -89,6 +92,36 @@ public abstract class ContentUriUtils { + /** This class provides methods to access content URI schemes. */ + public abstract class ContentUriUtils { + private static final String TAG = "ContentUriUtils"; +@@ -87,6 +90,36 @@ public abstract class ContentUriUtils { return -1; } @@ -97,4 +97,3 @@ diff --git a/base/android/java/src/org/chromium/base/ContentUriUtils.java b/base * Check whether a content URI exists. * -- -2.25.1 diff --git a/build/patches/00Add-support-to-jxl.patch b/build/patches/Add-support-to-jxl.patch similarity index 99% rename from build/patches/00Add-support-to-jxl.patch rename to build/patches/Add-support-to-jxl.patch index d651138ed..c6156fea3 100644 --- a/build/patches/00Add-support-to-jxl.patch +++ b/build/patches/Add-support-to-jxl.patch @@ -83,7 +83,7 @@ Enabled by default diff --git a/DEPS b/DEPS --- a/DEPS +++ b/DEPS -@@ -504,6 +504,10 @@ vars = { +@@ -485,6 +485,10 @@ vars = { # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. @@ -94,7 +94,7 @@ diff --git a/DEPS b/DEPS 'highway_revision': '8f20644eca693cfb74aa795b0006b6779c370e7a', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ffmpeg -@@ -1134,6 +1138,9 @@ deps = { +@@ -1103,6 +1107,9 @@ deps = { 'src/third_party/dawn': Var('dawn_git') + '/dawn.git' + '@' + Var('dawn_revision'), @@ -328,7 +328,7 @@ diff --git a/media/media_options.gni b/media/media_options.gni diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc --- a/net/base/mime_util.cc +++ b/net/base/mime_util.cc -@@ -163,6 +163,7 @@ static const MimeInfo kPrimaryMappings[] = { +@@ -164,6 +164,7 @@ static const MimeInfo kPrimaryMappings[] = { {"image/avif", "avif"}, {"image/gif", "gif"}, {"image/jpeg", "jpeg,jpg"}, @@ -336,7 +336,7 @@ diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc {"image/png", "png"}, {"image/apng", "png,apng"}, {"image/svg+xml", "svg,svgz"}, -@@ -666,6 +667,7 @@ static const char* const kStandardImageTypes[] = {"image/avif", +@@ -667,6 +668,7 @@ static const char* const kStandardImageTypes[] = {"image/avif", "image/gif", "image/ief", "image/jpeg", @@ -466,7 +466,7 @@ diff --git a/third_party/blink/common/mime_util/mime_util_unittest.cc b/third_pa diff --git a/third_party/blink/public/devtools_protocol/browser_protocol.pdl b/third_party/blink/public/devtools_protocol/browser_protocol.pdl --- a/third_party/blink/public/devtools_protocol/browser_protocol.pdl +++ b/third_party/blink/public/devtools_protocol/browser_protocol.pdl -@@ -4218,6 +4218,7 @@ domain Emulation +@@ -4246,6 +4246,7 @@ domain Emulation experimental type DisabledImageType extends string enum avif @@ -491,7 +491,7 @@ diff --git a/third_party/blink/renderer/core/inspector/inspector_emulation_agent header.Replace(String(type + ","), ""); } return AtomicString(header); -@@ -842,6 +842,7 @@ protocol::Response InspectorEmulationAgent::setDisabledImageTypes( +@@ -843,6 +843,7 @@ protocol::Response InspectorEmulationAgent::setDisabledImageTypes( namespace DisabledImageTypeEnum = protocol::Emulation::DisabledImageTypeEnum; for (protocol::Emulation::DisabledImageType type : *disabled_types) { if (DisabledImageTypeEnum::Avif == type || @@ -607,7 +607,7 @@ diff --git a/third_party/blink/renderer/modules/webcodecs/image_decoder_fuzzer.c diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn -@@ -2256,6 +2256,10 @@ source_set("blink_platform_unittests_sources") { +@@ -2263,6 +2263,10 @@ source_set("blink_platform_unittests_sources") { sources += [ "text/locale_icu_test.cc" ] } @@ -618,7 +618,7 @@ diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/re sources += [ "testing/run_all_tests.cc" ] configs += [ -@@ -2299,6 +2303,7 @@ source_set("blink_platform_unittests_sources") { +@@ -2306,6 +2310,7 @@ source_set("blink_platform_unittests_sources") { "//third_party/blink/renderer/platform/scheduler:unit_tests", "//third_party/blink/renderer/platform/wtf", "//third_party/libavif:libavif", @@ -672,7 +672,7 @@ diff --git a/third_party/blink/renderer/platform/graphics/bitmap_image_metrics.h + kMaxValue = kJXL, }; - // Categories for the JPEG color space histogram. Synced with 'JpegColorSpace' + // |type| is the return value of ImageDecoder::FilenameExtension(). diff --git a/third_party/blink/renderer/platform/image-decoders/BUILD.gn b/third_party/blink/renderer/platform/image-decoders/BUILD.gn --- a/third_party/blink/renderer/platform/image-decoders/BUILD.gn +++ b/third_party/blink/renderer/platform/image-decoders/BUILD.gn @@ -2221,7 +2221,7 @@ diff --git a/third_party/blink/tools/commit_stats/git-dirs.txt b/third_party/bli diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations -@@ -4822,6 +4822,12 @@ crbug.com/1199522 http/tests/devtools/layers/layers-3d-view-hit-testing.js [ Fai +@@ -4852,6 +4852,12 @@ crbug.com/1199522 http/tests/devtools/layers/layers-3d-view-hit-testing.js [ Fai # Started failing after rolling new version of check-layout-th.js css3/flexbox/perpendicular-writing-modes-inside-flex-item.html [ Failure ] @@ -2231,13 +2231,13 @@ diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/we +crbug.com/1210658 virtual/jxl-enabled/images/jxl/jxl-images.html [ Crash Failure Pass Timeout ] +crbug.com/1358616 virtual/jxl-enabled/images/jxl/progressive.html [ Crash Failure Pass Timeout ] + - # Temporarily disabled to unblock https://crrev.com/c/3099011 - crbug.com/1199701 http/tests/devtools/console/console-big-array.js [ Crash Failure Pass Timeout ] + # Sheriff 2021-11-15 + crbug.com/1270362 http/tests/devtools/sources/debugger-ui/debugger-inline-values.js [ Failure Pass Timeout ] diff --git a/third_party/blink/web_tests/VirtualTestSuites b/third_party/blink/web_tests/VirtualTestSuites --- a/third_party/blink/web_tests/VirtualTestSuites +++ b/third_party/blink/web_tests/VirtualTestSuites -@@ -429,6 +429,15 @@ +@@ -441,6 +441,15 @@ "--disable-threaded-compositing", "--disable-threaded-animation"], "expires": "Jul 1, 2023" }, @@ -2652,7 +2652,7 @@ new file mode 100644 diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml -@@ -26859,7 +26859,7 @@ Called by update_debug_scenarios.py.--> +@@ -11344,7 +11344,7 @@ to ensure that the crash string is shown properly on the user-facing crash UI. @@ -2660,8 +2660,8 @@ diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums + - -@@ -66334,6 +66334,7 @@ from previous Chrome versions. + +@@ -34310,6 +34310,7 @@ from previous Chrome versions. @@ -2670,4 +2670,3 @@ diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums -- -2.25.1 diff --git a/build/patches/Add-webGL-site-setting.patch b/build/patches/Add-webGL-site-setting.patch index 6e871a0fa..db26b62d7 100644 --- a/build/patches/Add-webGL-site-setting.patch +++ b/build/patches/Add-webGL-site-setting.patch @@ -9,7 +9,7 @@ Requires patch: Content-settings-infrastructure.patch 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 --- - .../impl/BromiteWebGLContentSetting.java | 92 +++++++++++++++++++ + .../impl/BromiteWebGLContentSetting.java | 93 +++++++++++++++++++ .../bromite_content_settings/webgl.grdp | 27 ++++++ .../bromite_content_settings/webgl.inc | 22 +++++ .../common/bromite_content_settings/WEBGL.inc | 1 + @@ -17,7 +17,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../execution_context/execution_context.h | 2 + .../webgl/webgl_rendering_context_base.cc | 32 +++---- .../webgl/webgl_rendering_context_base.h | 2 + - 8 files changed, 166 insertions(+), 19 deletions(-) + 8 files changed, 167 insertions(+), 19 deletions(-) create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/impl/BromiteWebGLContentSetting.java create mode 100644 components/browser_ui/strings/bromite_content_settings/webgl.grdp create mode 100644 components/content_settings/core/browser/bromite_content_settings/webgl.inc @@ -27,7 +27,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c new file mode 100644 --- /dev/null +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/impl/BromiteWebGLContentSetting.java -@@ -0,0 +1,92 @@ +@@ -0,0 +1,93 @@ +/* + This file is part of Bromite. + @@ -80,7 +80,8 @@ new file mode 100644 + /*defaultEnabledValue*/ getDefaultEnabledValue(), + /*defaultDisabledValue*/ getDefaultDisabledValue(), + /*enabledSummary*/ R.string.website_settings_category_webgl_enabled, -+ /*disabledSummary*/ R.string.website_settings_category_webgl_disabled); ++ /*disabledSummary*/ R.string.website_settings_category_webgl_disabled, ++ /*summaryOverrideForScreenReader*/ 0); + } + + @Override @@ -217,7 +218,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 -@@ -271,6 +271,13 @@ void WebGLRenderingContextBase::InitializeWebGLContextLimits( +@@ -309,6 +309,13 @@ void WebGLRenderingContextBase::InitializeWebGLContextLimits( } } @@ -231,7 +232,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_); -@@ -544,25 +551,6 @@ static String ExtractWebGLContextCreationError( +@@ -582,25 +589,6 @@ static String ExtractWebGLContextCreationError( const Platform::GraphicsInfo& info) { StringBuilder builder; builder.Append("Could not create a WebGL context"); @@ -257,7 +258,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('.'); -@@ -622,6 +610,12 @@ WebGLRenderingContextBase::CreateWebGraphicsContext3DProvider( +@@ -660,6 +648,12 @@ WebGLRenderingContextBase::CreateWebGraphicsContext3DProvider( const CanvasContextCreationAttributesCore& attributes, Platform::ContextType context_type, Platform::GraphicsInfo* graphics_info) { @@ -273,14 +274,13 @@ 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 -@@ -1944,6 +1944,8 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext, +@@ -1952,6 +1952,8 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext, DOMArrayBufferView* pixels, int64_t offset); + static bool AllowWebglForHost(blink::CanvasRenderingContextHost* host); + - // Record Canvas/OffscreenCanvas.RenderingContextDrawnTo at the first draw - // call. - void RecordUKMCanvasDrawnToAtFirstDrawCall(); + void RecordANGLEImplementation(); + + private: -- -2.25.1 diff --git a/build/patches/Add-webRTC-site-settings.patch b/build/patches/Add-webRTC-site-settings.patch index 5fc32e931..b1dd0017e 100644 --- a/build/patches/Add-webRTC-site-settings.patch +++ b/build/patches/Add-webRTC-site-settings.patch @@ -7,14 +7,14 @@ Requires patch: Content-settings-infrastructure.patch 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 --- - .../impl/BromiteWebRTCContentSetting.java | 93 +++++++++++++++++++ + .../impl/BromiteWebRTCContentSetting.java | 94 +++++++++++++++++++ .../bromite_content_settings/webrtc.grdp | 27 ++++++ .../bromite_content_settings/webrtc.inc | 22 +++++ .../bromite_content_settings/WEBRTC.inc | 1 + .../peer_connection_dependency_factory.cc | 6 ++ .../peerconnection/rtc_rtp_receiver.cc | 10 ++ .../modules/peerconnection/rtc_rtp_sender.cc | 10 ++ - 7 files changed, 169 insertions(+) + 7 files changed, 170 insertions(+) create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/impl/BromiteWebRTCContentSetting.java create mode 100644 components/browser_ui/strings/bromite_content_settings/webrtc.grdp create mode 100644 components/content_settings/core/browser/bromite_content_settings/webrtc.inc @@ -24,7 +24,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c new file mode 100644 --- /dev/null +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/impl/BromiteWebRTCContentSetting.java -@@ -0,0 +1,93 @@ +@@ -0,0 +1,94 @@ +/* + This file is part of Bromite. + @@ -77,7 +77,8 @@ new file mode 100644 + /*defaultEnabledValue*/ getDefaultEnabledValue(), + /*defaultDisabledValue*/ getDefaultDisabledValue(), + /*enabledSummary*/ R.string.website_settings_category_webrtc_enabled, -+ /*disabledSummary*/ R.string.website_settings_category_webrtc_disabled); ++ /*disabledSummary*/ R.string.website_settings_category_webrtc_disabled, ++ /*summaryOverrideForScreenReader*/ 0); + } + + @Override @@ -194,7 +195,7 @@ diff --git a/third_party/blink/renderer/modules/peerconnection/peer_connection_d #include "third_party/blink/public/platform/web_url.h" #include "third_party/blink/public/web/modules/mediastream/media_stream_video_source.h" #include "third_party/blink/public/web/web_document.h" -@@ -781,6 +782,11 @@ PeerConnectionDependencyFactory::CreatePortAllocator( +@@ -774,6 +775,11 @@ PeerConnectionDependencyFactory::CreatePortAllocator( // origin. WebRTCIPHandlingPolicy policy = GetWebRTCIPHandlingPolicy(webrtc_ip_handling_policy); @@ -218,7 +219,7 @@ diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_rtp_receiver. #include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_insertable_streams.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_rtcp_parameters.h" -@@ -255,6 +257,14 @@ RTCRtpCapabilities* RTCRtpReceiver::getCapabilities(ScriptState* state, +@@ -287,6 +289,14 @@ RTCRtpCapabilities* RTCRtpReceiver::getCapabilities(ScriptState* state, if (kind != "audio" && kind != "video") return nullptr; @@ -245,7 +246,7 @@ diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_rtp_sender.cc #include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_insertable_streams.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_rtcp_parameters.h" -@@ -1004,6 +1006,14 @@ RTCRtpCapabilities* RTCRtpSender::getCapabilities(ScriptState* state, +@@ -1034,6 +1036,14 @@ RTCRtpCapabilities* RTCRtpSender::getCapabilities(ScriptState* state, if (kind != "audio" && kind != "video") return nullptr; @@ -261,4 +262,3 @@ diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_rtp_sender.cc capabilities->setCodecs(HeapVector>()); capabilities->setHeaderExtensions( -- -2.25.1 diff --git a/build/patches/00Allow-DocumentPiP-if-PopupsAndRedirects-are-active.patch b/build/patches/Allow-DocumentPiP-if-PopupsAndRedirects-are-active.patch similarity index 88% rename from build/patches/00Allow-DocumentPiP-if-PopupsAndRedirects-are-active.patch rename to build/patches/Allow-DocumentPiP-if-PopupsAndRedirects-are-active.patch index 50e79b2fb..aab15cee9 100644 --- a/build/patches/00Allow-DocumentPiP-if-PopupsAndRedirects-are-active.patch +++ b/build/patches/Allow-DocumentPiP-if-PopupsAndRedirects-are-active.patch @@ -12,11 +12,11 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/third_party/blink/renderer/modules/document_picture_in_picture/picture_in_picture_controller_impl.cc b/third_party/blink/renderer/modules/document_picture_in_picture/picture_in_picture_controller_impl.cc --- a/third_party/blink/renderer/modules/document_picture_in_picture/picture_in_picture_controller_impl.cc +++ b/third_party/blink/renderer/modules/document_picture_in_picture/picture_in_picture_controller_impl.cc -@@ -372,6 +372,13 @@ void PictureInPictureControllerImpl::CreateDocumentPictureInPictureWindow( +@@ -376,6 +376,13 @@ void PictureInPictureControllerImpl::CreateDocumentPictureInPictureWindow( return; } -+ if (!opener.GetFrame()->GetContentSettingsClient()->AllowPopupsAndRedirects(false)) { ++ if (!opener.GetFrame()->GetContentSettings()->allow_popup) { + exception_state.ThrowDOMException(DOMExceptionCode::kNotAllowedError, + "Document PiP requires user popup permission"); + resolver->Reject(exception_state); @@ -27,4 +27,3 @@ diff --git a/third_party/blink/renderer/modules/document_picture_in_picture/pict web_options.width = options->width(); web_options.height = options->height(); -- -2.25.1 diff --git a/build/patches/Allow-building-without-enable_reporting.patch b/build/patches/Allow-building-without-enable_reporting.patch index 5402e18d6..3f8470996 100644 --- a/build/patches/Allow-building-without-enable_reporting.patch +++ b/build/patches/Allow-building-without-enable_reporting.patch @@ -20,11 +20,11 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../network/public/mojom/network_context.mojom | 2 ++ .../core/frame/csp/content_security_policy.cc | 3 +++ .../blink/renderer/core/frame/local_frame.cc | 3 +++ - .../blink/renderer/core/frame/local_frame.h | 6 +++--- + .../blink/renderer/core/frame/local_frame.h | 4 +++- .../renderer/core/frame/reporting_context.cc | 9 +++++++++ .../renderer/core/frame/reporting_context.h | 7 +++++-- .../renderer/core/frame/reporting_observer.cc | 3 +-- - 20 files changed, 58 insertions(+), 27 deletions(-) + 20 files changed, 58 insertions(+), 25 deletions(-) create mode 100644 cromite_flags/services/network/public/cpp/features_cc/Allow-building-without-enable_reporting.inc diff --git a/chrome/browser/net/chrome_report_sender.cc b/chrome/browser/net/chrome_report_sender.cc @@ -41,7 +41,7 @@ diff --git a/chrome/browser/net/chrome_report_sender.cc b/chrome/browser/net/chr diff --git a/content/browser/devtools/protocol/network_handler.cc b/content/browser/devtools/protocol/network_handler.cc --- a/content/browser/devtools/protocol/network_handler.cc +++ b/content/browser/devtools/protocol/network_handler.cc -@@ -1314,6 +1314,7 @@ String BuildReportStatus(const net::ReportingReport::Status status) { +@@ -1326,6 +1326,7 @@ String BuildReportStatus(const net::ReportingReport::Status status) { } } @@ -49,7 +49,7 @@ diff --git a/content/browser/devtools/protocol/network_handler.cc b/content/brow std::vector ComputeReportingURLs(RenderFrameHostImpl* frame_host) { std::vector urls; frame_host->ForEachRenderFrameHostWithAction( -@@ -1327,6 +1328,7 @@ std::vector ComputeReportingURLs(RenderFrameHostImpl* frame_host) { +@@ -1339,6 +1340,7 @@ std::vector ComputeReportingURLs(RenderFrameHostImpl* frame_host) { }); return urls; } @@ -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 -@@ -13639,12 +13639,6 @@ void RenderFrameHostImpl::MaybeGenerateCrashReport( +@@ -13593,12 +13593,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 -@@ -228,6 +228,7 @@ extern const base::FeatureParam kTimeoutTcpConnectAttemptMax( +@@ -227,6 +227,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 -@@ -475,10 +475,10 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -472,10 +472,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 -@@ -1438,7 +1438,6 @@ mojom("mojom") { +@@ -1435,7 +1435,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 -@@ -1201,6 +1201,7 @@ interface NetworkContext { +@@ -1197,6 +1197,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, -@@ -1214,6 +1215,7 @@ interface NetworkContext { +@@ -1210,6 +1211,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" -@@ -1164,6 +1165,7 @@ void ContentSecurityPolicy::ReportViolation( +@@ -1169,6 +1170,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); -@@ -1171,6 +1173,7 @@ void ContentSecurityPolicy::ReportViolation( +@@ -1176,6 +1178,7 @@ void ContentSecurityPolicy::ReportViolation( // `context_frame` (i.e. we're not processing 'frame-ancestors'). if (delegate_ && !context_frame) delegate_->DispatchViolationEvent(*violation_data, element); @@ -354,7 +354,7 @@ diff --git a/third_party/blink/renderer/core/frame/csp/content_security_policy.c 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 -@@ -42,6 +42,7 @@ +@@ -45,6 +45,7 @@ #include "build/build_config.h" #include "mojo/public/cpp/bindings/self_owned_receiver.h" #include "mojo/public/cpp/system/message_pipe.h" @@ -362,8 +362,8 @@ 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" -@@ -2533,9 +2534,11 @@ void LocalFrame::MainFrameInteractive() { - } +@@ -2585,9 +2586,11 @@ void LocalFrame::MainFrameInteractive() { + v8_local_compile_hints_producer_->GenerateData(); } +#if BUILDFLAG(ENABLE_REPORTING) @@ -372,34 +372,30 @@ diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/ } +#endif - // static - void LocalFrame::NotifyUserActivation( + device::mojom::blink::DevicePostureProvider* + LocalFrame::GetDevicePostureProvider() { 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 -@@ -35,9 +35,9 @@ - #include "base/time/default_tick_clock.h" - #include "base/time/time.h" - #include "base/unguessable_token.h" --#include "build/build_config.h" +@@ -38,6 +38,7 @@ + #include "build/build_config.h" #include "mojo/public/cpp/bindings/pending_associated_receiver.h" #include "mojo/public/cpp/bindings/pending_receiver.h" +#include "net/net_buildflags.h" #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" -@@ -636,9 +636,9 @@ class CORE_EXPORT LocalFrame final +@@ -657,8 +658,9 @@ class CORE_EXPORT LocalFrame final void FinishedScrollSequence(); SmoothScrollSequencer* GetSmoothScrollSequencer() const; - +#if BUILDFLAG(ENABLE_REPORTING) mojom::blink::ReportingServiceProxy* GetReportingService(); -- +#endif + device::mojom::blink::DevicePostureProvider* GetDevicePostureProvider(); + // Returns the frame host ptr. The interface returned is backed by an - // associated interface with the legacy Chrome IPC channel. - mojom::blink::LocalFrameHost& GetLocalFrameHostRemote() const; diff --git a/third_party/blink/renderer/core/frame/reporting_context.cc b/third_party/blink/renderer/core/frame/reporting_context.cc --- a/third_party/blink/renderer/core/frame/reporting_context.cc +++ b/third_party/blink/renderer/core/frame/reporting_context.cc @@ -512,4 +508,3 @@ diff --git a/third_party/blink/renderer/core/frame/reporting_observer.cc b/third bool ReportingObserver::Buffered() { -- -2.25.1 diff --git a/build/patches/Allow-building-without-supervised-users.patch b/build/patches/Allow-building-without-supervised-users.patch index 5d6b16f0a..31b443a69 100644 --- a/build/patches/Allow-building-without-supervised-users.patch +++ b/build/patches/Allow-building-without-supervised-users.patch @@ -4,26 +4,27 @@ Subject: Allow building without supervised users 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 ++++ - chrome/browser/profiles/profile_manager.cc | 4 ++++ - 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 ++++++++ - 14 files changed, 31 insertions(+), 17 deletions(-) + chrome/android/BUILD.gn | 1 - + chrome/android/chrome_java_sources.gni | 1 - + .../chrome/browser/feed/FeedSurfaceCoordinator.java | 5 +---- + chrome/browser/BUILD.gn | 6 ------ + .../extensions/api/settings_private/prefs_util.cc | 2 ++ + chrome/browser/profiles/profile_impl.cc | 4 ++++ + chrome/browser/profiles/profile_manager.cc | 4 ++++ + chrome/browser/ui/webui/managed_ui_handler.cc | 2 ++ + .../browser/ui/webui/management/management_ui_handler.cc | 2 ++ + components/supervised_user/buildflags.gni | 6 +----- + .../core/browser/supervised_user_preferences.cc | 2 +- + 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 | 9 ++++++--- + 15 files changed, 30 insertions(+), 21 deletions(-) diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -3642,7 +3642,6 @@ generate_jni("chrome_jni_headers") { +@@ -3657,7 +3657,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", @@ -34,7 +35,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 -@@ -1082,7 +1082,6 @@ chrome_java_sources = [ +@@ -1075,7 +1075,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", @@ -53,7 +54,7 @@ diff --git a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/ 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 +@@ -848,9 +847,7 @@ public class FeedSurfaceCoordinator * Returns true if the supervised user feed should be displayed. */ public boolean shouldDisplaySupervisedFeed() { @@ -67,7 +68,7 @@ diff --git a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -3194,8 +3194,6 @@ static_library("browser") { +@@ -3161,8 +3161,6 @@ static_library("browser") { "feed/android/refresh_task_scheduler_impl.cc", "feed/android/refresh_task_scheduler_impl.h", "feed/android/web_feed_bridge.cc", @@ -76,7 +77,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", -@@ -3413,10 +3411,6 @@ static_library("browser") { +@@ -3381,10 +3379,6 @@ static_library("browser") { "ssl/chrome_security_state_model_delegate.h", "ssl/known_interception_disclosure_infobar.cc", "ssl/known_interception_disclosure_infobar.h", @@ -90,18 +91,18 @@ 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 -@@ -1018,9 +1018,11 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() { - settings_api::PrefType::PREF_TYPE_BOOLEAN; +@@ -1001,9 +1001,11 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() { + settings_api::PrefType::kBoolean; #endif +#if BUILDFLAG(ENABLE_SUPERVISED_USERS) // Supervised Users. This setting is queried in our Tast tests (b/241943380). (*s_allowlist)[::prefs::kSupervisedUserExtensionsMayRequestPermissions] = - settings_api::PrefType::PREF_TYPE_BOOLEAN; + settings_api::PrefType::kBoolean; +#endif #if BUILDFLAG(IS_CHROMEOS_LACROS) - (*s_allowlist)[::prefs::kUseAshProxy] = + (*s_allowlist)[::prefs::kUseAshProxy] = settings_api::PrefType::kBoolean; 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 @@ -135,7 +136,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 -@@ -1218,6 +1218,7 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) { +@@ -1222,6 +1222,7 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) { profile->GetPrefs()->SetString(prefs::kProfileName, profile_name); } @@ -143,7 +144,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) -@@ -1239,6 +1240,7 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) { +@@ -1243,6 +1244,7 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) { profile->GetPrefs()->SetString(prefs::kSupervisedUserId, supervised_user_id); } @@ -151,7 +152,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); -@@ -2034,8 +2036,10 @@ void ProfileManager::AddProfileToStorage(Profile* profile) { +@@ -2046,8 +2048,10 @@ void ProfileManager::AddProfileToStorage(Profile* profile) { init_params.icon_index = profile->GetPrefs()->GetInteger(prefs::kProfileAvatarIndex); @@ -207,10 +208,22 @@ 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/browser/supervised_user_preferences.cc b/components/supervised_user/core/browser/supervised_user_preferences.cc +--- a/components/supervised_user/core/browser/supervised_user_preferences.cc ++++ b/components/supervised_user/core/browser/supervised_user_preferences.cc +@@ -173,7 +173,7 @@ bool IsChildAccountStatusKnown(const PrefService& pref_service) { + } + + bool IsChildAccount(const PrefService& pref_service) { +- return pref_service.GetString(prefs::kSupervisedUserId) == kChildAccountSUID; ++ return false; + } + + bool IsSafeSitesEnabled(const PrefService& pref_service) { 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() { +@@ -165,4 +165,5 @@ bool IsShadowKidsApiWithSafeSitesEnabled() { return base::FeatureList::IsEnabled(kShadowKidsApiWithSafeSites); } @@ -259,36 +272,22 @@ diff --git a/components/supervised_user/core/common/supervised_user_constants.cc diff --git a/components/supervised_user/core/common/supervised_user_utils.cc b/components/supervised_user/core/common/supervised_user_utils.cc --- a/components/supervised_user/core/common/supervised_user_utils.cc +++ b/components/supervised_user/core/common/supervised_user_utils.cc -@@ -76,11 +76,15 @@ GURL NormalizeUrl(const GURL& url) { +@@ -75,11 +75,14 @@ GURL NormalizeUrl(const GURL& url) { } bool AreWebFilterPrefsDefault(const PrefService& pref_service) { +#if BUILDFLAG(ENABLE_SUPERVISED_USERS) return pref_service .FindPreference(prefs::kDefaultSupervisedUserFilteringBehavior) - ->IsDefaultValue() || - pref_service.FindPreference(prefs::kSupervisedUserSafeSites) - ->IsDefaultValue(); -+#else -+ return true; -+#endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) - } - - bool EmitLogSegmentHistogram(const std::vector& primary_accounts) { -@@ -107,10 +111,14 @@ bool EmitLogSegmentHistogram(const std::vector& primary_accounts) { - } - - bool IsSubjectToParentalControls(const PrefService* pref_service) { -+#if BUILDFLAG(ENABLE_SUPERVISED_USERS) - return pref_service && - pref_service->GetString(prefs::kSupervisedUserId) == - kChildAccountSUID && - IsChildAccountSupervisionEnabled(); +- ->IsDefaultValue() || +- pref_service.FindPreference(prefs::kSupervisedUserSafeSites) +- ->IsDefaultValue(); ++ kChildAccountSUID && ++ IsChildAccountSupervisionEnabled(); +#else + return false; +#endif } - } // namespace supervised_user + bool EmitLogSegmentHistogram(const std::vector& primary_accounts) { -- -2.25.1 diff --git a/build/patches/Allow-playing-audio-in-background.patch b/build/patches/Allow-playing-audio-in-background.patch index 3e2e94369..f1987a08d 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 -@@ -1178,6 +1178,12 @@ bool WebMediaPlayerImpl::HasAudio() const { +@@ -1177,6 +1177,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()); -@@ -3502,7 +3508,10 @@ bool WebMediaPlayerImpl::ShouldPausePlaybackWhenHidden() const { +@@ -3504,7 +3510,10 @@ bool WebMediaPlayerImpl::ShouldPausePlaybackWhenHidden() const { : HasAudio(); // Audio only stream is allowed to play when in background. @@ -50,4 +50,3 @@ diff --git a/third_party/blink/renderer/platform/media/web_media_player_impl.h b const WebVector& enabledTrackIds) override; void SelectedVideoTrackChanged( -- -2.25.1 diff --git a/build/patches/00Always-allow-inspect-fallback.patch b/build/patches/Always-allow-inspect-fallback.patch similarity index 99% rename from build/patches/00Always-allow-inspect-fallback.patch rename to build/patches/Always-allow-inspect-fallback.patch index da527e7ab..a493791e7 100644 --- a/build/patches/00Always-allow-inspect-fallback.patch +++ b/build/patches/Always-allow-inspect-fallback.patch @@ -28,4 +28,3 @@ diff --git a/chrome/browser/resources/inspect/inspect.js b/chrome/browser/resour const propertiesBox = row.querySelector('.properties-box'); propertiesBox.insertBefore(favicon, propertiesBox.firstChild); -- -2.25.1 diff --git a/build/patches/00Always-open-browser-controls-in-new-tab.patch b/build/patches/Always-open-browser-controls-in-new-tab.patch similarity index 86% rename from build/patches/00Always-open-browser-controls-in-new-tab.patch rename to build/patches/Always-open-browser-controls-in-new-tab.patch index 2d6610213..d1a125435 100644 --- a/build/patches/00Always-open-browser-controls-in-new-tab.patch +++ b/build/patches/Always-open-browser-controls-in-new-tab.patch @@ -9,7 +9,7 @@ Subject: Always open browser controls in new tab diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java -@@ -20,6 +20,7 @@ import org.chromium.base.IntentUtils; +@@ -21,6 +21,7 @@ import org.chromium.base.IntentUtils; import org.chromium.base.PackageManagerUtils; import org.chromium.base.metrics.RecordUserAction; import org.chromium.base.supplier.Supplier; @@ -17,7 +17,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextM import org.chromium.chrome.browser.DefaultBrowserInfo; import org.chromium.chrome.browser.IntentHandler; import org.chromium.chrome.browser.bookmarks.BookmarkModel; -@@ -34,6 +35,7 @@ import org.chromium.chrome.browser.multiwindow.MultiWindowUtils; +@@ -35,6 +36,7 @@ import org.chromium.chrome.browser.multiwindow.MultiWindowUtils; import org.chromium.chrome.browser.offlinepages.OfflinePageBridge; import org.chromium.chrome.browser.offlinepages.RequestCoordinatorBridge; import org.chromium.chrome.browser.profiles.Profile; @@ -25,15 +25,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextM import org.chromium.chrome.browser.tabmodel.TabModelSelector; import org.chromium.chrome.browser.tabmodel.document.ChromeAsyncTabLauncher; import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; -@@ -206,6 +208,7 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate { - @Override - public void onOpenInNewTab(GURL url, Referrer referrer, boolean navigateToTab, +@@ -212,6 +214,7 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate { + Referrer referrer, + boolean navigateToTab, @Nullable AdditionalNavigationParams additionalNavigationParams) { + TabBrowserControlsConstraintsHelper.get(mTab).update(BrowserControlsState.SHOWN, true); RecordUserAction.record("MobileNewTabOpened"); RecordUserAction.record("LinkOpenedInNewTab"); LoadUrlParams loadUrlParams = new LoadUrlParams(url.getSpec()); -@@ -219,6 +222,7 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate { +@@ -228,6 +231,7 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate { @Override public void onOpenInNewTabInGroup(GURL url, Referrer referrer) { @@ -42,4 +42,3 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextM RecordUserAction.record("LinkOpenedInNewTab"); LoadUrlParams loadUrlParams = new LoadUrlParams(url.getSpec()); -- -2.25.1 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 e21e81a96..11eaf6546 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 -@@ -169,10 +169,6 @@ public class HomepageManager implements HomepagePolicyManager.HomepagePolicyStat +@@ -152,10 +152,6 @@ public class HomepageManager * tab page if the homepage button is force enabled via flag. */ public static GURL getDefaultHomepageGurl() { @@ -26,25 +26,25 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/homepage/Homepa - } - String homepagePartnerDefaultGurlSerialized = - ChromeSharedPreferences.getInstance().readString( - ChromePreferenceKeys.HOMEPAGE_PARTNER_CUSTOMIZED_DEFAULT_GURL, ""); + ChromeSharedPreferences.getInstance() + .readString( 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 -@@ -215,7 +215,7 @@ public class PartnerBrowserCustomizations { - boolean systemOrPreStable = - (context.getApplicationInfo().flags & ApplicationInfo.FLAG_SYSTEM) == 1 - || !VersionInfo.isStableBuild(); -- if (!systemOrPreStable) { -+ if ((true)) { - // Only allow partner customization if this browser is a system package, or - // is in pre-stable channels. - return null; +@@ -212,7 +212,7 @@ public class PartnerBrowserCustomizations { + & ApplicationInfo.FLAG_SYSTEM) + == 1 + || !VersionInfo.isStableBuild(); +- if (!systemOrPreStable) { ++ if ((true)) { + // Only allow partner customization if this browser is a system + // package, or is in pre-stable channels. + return null; diff --git a/components/search_engines/android/java/src/org/chromium/components/search_engines/TemplateUrl.java b/components/search_engines/android/java/src/org/chromium/components/search_engines/TemplateUrl.java --- a/components/search_engines/android/java/src/org/chromium/components/search_engines/TemplateUrl.java +++ b/components/search_engines/android/java/src/org/chromium/components/search_engines/TemplateUrl.java -@@ -75,6 +75,7 @@ public class TemplateUrl { - * prepopulated_engines.json. +@@ -69,6 +69,7 @@ public class TemplateUrl { + * prepopulated_engines.json. */ public String getNewTabURL() { + if ((true)) return null; @@ -70,4 +70,3 @@ new file mode 100755 +SET_CROMITE_FEATURE_DISABLED(kNewTabSearchEngineUrlAndroid); +SET_CROMITE_FEATURE_DISABLED(kPartnerCustomizationsUma); -- -2.25.1 diff --git a/build/patches/AudioBuffer-AnalyserNode-fp-mitigations.patch b/build/patches/AudioBuffer-AnalyserNode-fp-mitigations.patch index c8677db76..67cf3c401 100644 --- a/build/patches/AudioBuffer-AnalyserNode-fp-mitigations.patch +++ b/build/patches/AudioBuffer-AnalyserNode-fp-mitigations.patch @@ -204,4 +204,3 @@ diff --git a/third_party/blink/renderer/modules/webaudio/realtime_analyser.cc b/ } } -- -2.25.1 diff --git a/build/patches/Battery-API-return-nothing.patch b/build/patches/Battery-API-return-nothing.patch index 0aac3bc2b..4e54e96aa 100644 --- a/build/patches/Battery-API-return-nothing.patch +++ b/build/patches/Battery-API-return-nothing.patch @@ -64,4 +64,3 @@ diff --git a/third_party/blink/renderer/modules/battery/battery_manager.cc b/thi void BatteryManager::RegisterWithDispatcher() { -- -2.25.1 diff --git a/build/patches/00Block-Intents-While-Locked.patch b/build/patches/Block-Intents-While-Locked.patch similarity index 99% rename from build/patches/00Block-Intents-While-Locked.patch rename to build/patches/Block-Intents-While-Locked.patch index ef7c24bb3..38bb0973e 100644 --- a/build/patches/00Block-Intents-While-Locked.patch +++ b/build/patches/Block-Intents-While-Locked.patch @@ -15,4 +15,3 @@ new file mode 100644 @@ -0,0 +1 @@ +SET_CROMITE_FEATURE_ENABLED(kBlockIntentsWhileLocked); -- -2.25.1 diff --git a/build/patches/Block-gateway-attacks-via-websockets.patch b/build/patches/Block-gateway-attacks-via-websockets.patch index 87ee12c17..907162294 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 -@@ -710,6 +710,22 @@ void ExecutionContext::WriteIntoTrace( +@@ -701,6 +701,22 @@ void ExecutionContext::WriteIntoTrace( proto->set_world_type(GetWorldType(*this)); } @@ -72,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 -@@ -592,6 +592,26 @@ bool FrameFetchContext::ShouldBlockRequestByInspector(const KURL& url) const { +@@ -593,6 +593,26 @@ bool FrameFetchContext::ShouldBlockRequestByInspector(const KURL& url) const { return should_block_request; } @@ -302,4 +302,3 @@ diff --git a/third_party/blink/renderer/modules/websockets/websocket_common.h b/ // Returns true if |protocol| is a valid WebSocket subprotocol name. -- -2.25.1 diff --git a/build/patches/Block-qjz9zk-or-trk-requests.patch b/build/patches/Block-qjz9zk-or-trk-requests.patch index 336e2645e..4e38f1320 100644 --- a/build/patches/Block-qjz9zk-or-trk-requests.patch +++ b/build/patches/Block-qjz9zk-or-trk-requests.patch @@ -94,7 +94,7 @@ diff --git a/components/omnibox/browser/autocomplete_input.cc b/components/omnib diff --git a/components/url_formatter/url_fixer.cc b/components/url_formatter/url_fixer.cc --- a/components/url_formatter/url_fixer.cc +++ b/components/url_formatter/url_fixer.cc -@@ -563,6 +563,10 @@ GURL FixupURL(const std::string& text, const std::string& desired_tld) { +@@ -576,6 +576,10 @@ GURL FixupURLInternal(const std::string& text, } } @@ -108,7 +108,7 @@ diff --git a/components/url_formatter/url_fixer.cc b/components/url_formatter/ur diff --git a/content/browser/child_process_security_policy_impl.cc b/content/browser/child_process_security_policy_impl.cc --- a/content/browser/child_process_security_policy_impl.cc +++ b/content/browser/child_process_security_policy_impl.cc -@@ -829,6 +829,7 @@ ChildProcessSecurityPolicyImpl::ChildProcessSecurityPolicyImpl() +@@ -841,6 +841,7 @@ ChildProcessSecurityPolicyImpl::ChildProcessSecurityPolicyImpl() RegisterPseudoScheme(url::kJavaScriptScheme); RegisterPseudoScheme(kViewSourceScheme); RegisterPseudoScheme(kGoogleChromeScheme); @@ -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 -@@ -1058,6 +1058,8 @@ component("net") { +@@ -995,6 +995,8 @@ component("net") { "url_request/url_request_http_job.cc", "url_request/url_request_http_job.h", "url_request/url_request_interceptor.cc", @@ -212,7 +212,7 @@ diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc namespace net { -@@ -597,6 +599,12 @@ URLRequest::URLRequest(base::PassKey pass_key, +@@ -591,6 +593,12 @@ URLRequest::URLRequest(base::PassKey pass_key, // Sanity check out environment. DCHECK(base::SingleThreadTaskRunner::HasCurrentDefault()); @@ -287,4 +287,3 @@ diff --git a/url/url_util.cc b/url/url_util.cc // Schemes that can be sent CORS requests. -- -2.25.1 diff --git a/build/patches/Bookmarks-select-all-menu-entry.patch b/build/patches/Bookmarks-select-all-menu-entry.patch index 8bbf8a336..a2248c179 100644 --- a/build/patches/Bookmarks-select-all-menu-entry.patch +++ b/build/patches/Bookmarks-select-all-menu-entry.patch @@ -104,4 +104,3 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro Import -- -2.25.1 diff --git a/build/patches/Bromite-auto-updater.patch b/build/patches/Bromite-auto-updater.patch index ba6eb09a6..926a22ef9 100644 --- a/build/patches/Bromite-auto-updater.patch +++ b/build/patches/Bromite-auto-updater.patch @@ -14,16 +14,16 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../java/res/xml/about_chrome_preferences.xml | 5 + .../about_settings/AboutChromeSettings.java | 28 +- .../chrome/browser/omaha/OmahaBase.java | 57 +++- - .../chrome/browser/omaha/UpdateConfigs.java | 30 +- + .../chrome/browser/omaha/UpdateConfigs.java | 27 +- .../browser/omaha/UpdateMenuItemHelper.java | 82 +++++- - .../browser/omaha/UpdateStatusProvider.java | 163 ++++++++--- + .../browser/omaha/UpdateStatusProvider.java | 165 ++++++++--- .../browser/omaha/VersionNumberGetter.java | 3 +- .../inline/BromiteInlineUpdateController.java | 272 ++++++++++++++++++ .../omaha/inline/InlineUpdateController.java | 51 ++++ .../inline/InlineUpdateControllerFactory.java | 21 ++ chrome/browser/endpoint_fetcher/BUILD.gn | 2 + .../endpoint_fetcher_android.cc | 50 ++++ - .../endpoint_fetcher/EndpointFetcher.java | 26 +- + .../endpoint_fetcher/EndpointFetcher.java | 27 ++ .../EndpointHeaderResponse.java | 31 ++ .../flags/android/chrome_feature_list.cc | 1 + .../browser/flags/ChromeFeatureList.java | 1 + @@ -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 -@@ -1899,6 +1899,9 @@ if (enable_java_templates && is_android) { +@@ -1908,6 +1908,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 -@@ -878,6 +878,9 @@ chrome_java_sources = [ +@@ -872,6 +872,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", @@ -96,7 +96,7 @@ diff --git a/chrome/android/java/res/xml/about_chrome_preferences.xml b/chrome/a diff --git a/chrome/android/java/src/org/chromium/chrome/browser/about_settings/AboutChromeSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/about_settings/AboutChromeSettings.java --- a/chrome/android/java/src/org/chromium/chrome/browser/about_settings/AboutChromeSettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/about_settings/AboutChromeSettings.java -@@ -21,14 +21,20 @@ import org.chromium.ui.widget.Toast; +@@ -21,12 +21,18 @@ import org.chromium.ui.widget.Toast; import java.util.Calendar; @@ -104,13 +104,11 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/about_settings/ +import org.chromium.chrome.browser.omaha.OmahaBase; +import org.chromium.components.browser_ui.settings.ChromeSwitchPreference; + - /** - * Settings fragment that displays information about Chrome. - */ - public class AboutChromeSettings -- extends PreferenceFragmentCompat implements Preference.OnPreferenceClickListener { -+ extends PreferenceFragmentCompat implements Preference.OnPreferenceClickListener, -+ Preference.OnPreferenceChangeListener { + /** Settings fragment that displays information about Chrome. */ + public class AboutChromeSettings extends PreferenceFragmentCompat +- implements Preference.OnPreferenceClickListener { ++ implements Preference.OnPreferenceClickListener, ++ Preference.OnPreferenceChangeListener { private static final int TAPS_FOR_DEVELOPER_SETTINGS = 7; private static final String PREF_APPLICATION_VERSION = "application_version"; @@ -118,7 +116,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/about_settings/ private static final String PREF_OS_VERSION = "os_version"; private static final String PREF_LEGAL_INFORMATION = "legal_information"; -@@ -59,6 +65,13 @@ public class AboutChromeSettings +@@ -57,6 +63,13 @@ public class AboutChromeSettings extends PreferenceFragmentCompat p = findPreference(PREF_LEGAL_INFORMATION); int currentYear = Calendar.getInstance().get(Calendar.YEAR); p.setSummary(getString(R.string.legal_information_summary, currentYear)); @@ -132,7 +130,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/about_settings/ } /** -@@ -122,4 +135,17 @@ public class AboutChromeSettings +@@ -121,4 +134,17 @@ public class AboutChromeSettings extends PreferenceFragmentCompat } return true; } @@ -162,7 +160,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase /** * Keeps tabs on the current state of Chrome, tracking if and when a request should be sent to the * Omaha Server. -@@ -99,7 +101,10 @@ public class OmahaBase { +@@ -103,7 +105,10 @@ public class OmahaBase { static final String PREF_TIMESTAMP_FOR_NEW_REQUEST = "timestampForNewRequest"; static final String PREF_TIMESTAMP_FOR_NEXT_POST_ATTEMPT = "timestampForNextPostAttempt"; static final String PREF_TIMESTAMP_OF_INSTALL = "timestampOfInstall"; @@ -174,7 +172,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase private static final int UNKNOWN_DATE = -2; -@@ -157,7 +162,8 @@ public class OmahaBase { +@@ -161,7 +166,8 @@ public class OmahaBase { } static boolean isDisabled() { @@ -184,7 +182,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase } /** -@@ -569,6 +575,10 @@ public class OmahaBase { +@@ -599,6 +605,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 +193,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); -@@ -639,4 +649,47 @@ public class OmahaBase { +@@ -679,4 +689,47 @@ public class OmahaBase { // updateStatus is only used for the on-demand check. null); } @@ -281,7 +279,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateCon } /** -@@ -123,6 +132,13 @@ public class UpdateConfigs { +@@ -124,6 +133,13 @@ public class UpdateConfigs { return DEFAULT_UPDATE_ATTRIBUTION_WINDOW_MS; } @@ -295,12 +293,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateCon /** * Gets a String VariationsAssociatedData parameter. Also checks for a command-line switch * with the same name, for easy local testing. -@@ -137,4 +153,14 @@ public class UpdateConfigs { +@@ -137,4 +153,13 @@ public class UpdateConfigs { } return value; } --} -\ No newline at end of file + + @UpdateFlowConfiguration + public static int getConfiguration() { @@ -308,10 +304,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateCon + // Always use the the old flow if the inline update flow feature is not enabled. + return UpdateFlowConfiguration.INLINE_ONLY; + } -+ + return UpdateFlowConfiguration.NEVER_SHOW; + } -+} + } diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateMenuItemHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateMenuItemHelper.java --- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateMenuItemHelper.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateMenuItemHelper.java @@ -323,7 +318,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateMen import org.chromium.base.BuildInfo; import org.chromium.base.Callback; -@@ -135,8 +136,21 @@ public class UpdateMenuItemHelper { +@@ -138,8 +139,21 @@ public class UpdateMenuItemHelper { Log.e(TAG, "Failed to launch Activity for: %s", mStatus.updateUrl); } break; @@ -339,13 +334,13 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateMen + UpdateStatusProvider.getInstance().retryInlineUpdate(activity); + break; case UpdateState.UNSUPPORTED_OS_VERSION: - // Intentional fall through. + // Intentional fall through. + case UpdateState.INLINE_UPDATE_DOWNLOADING: + // Intentional fall through. default: return; } -@@ -182,7 +196,7 @@ public class UpdateMenuItemHelper { +@@ -188,7 +202,7 @@ public class UpdateMenuItemHelper { mMenuUiState = new MenuUiState(); switch (mStatus.updateState) { @@ -353,8 +348,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateMen + case UpdateState.UPDATE_AVAILABLE: // this is not used in Bromite // The badge is hidden if the update menu item has been clicked until there is an // even newer version of Chrome available. - showBadge |= !TextUtils.equals( -@@ -237,6 +251,72 @@ public class UpdateMenuItemHelper { + showBadge |= +@@ -247,6 +261,72 @@ public class UpdateMenuItemHelper { mMenuUiState.itemState.icon = R.drawable.ic_error_24dp_filled; mMenuUiState.itemState.enabled = false; break; @@ -425,7 +420,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateMen + mMenuUiState.itemState.enabled = true; + break; case UpdateState.NONE: - // Intentional fall through. + // Intentional fall through. default: diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java --- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java @@ -667,7 +662,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateSta } @Override -@@ -263,6 +348,8 @@ public class UpdateStatusProvider { +@@ -262,6 +347,8 @@ public class UpdateStatusProvider { status.mIsSimulated = true; status.updateState = forcedUpdateState; @@ -676,7 +671,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,29 +366,33 @@ public class UpdateStatusProvider { +@@ -279,31 +366,33 @@ public class UpdateStatusProvider { return status; } @@ -688,20 +683,22 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateSta - status.updateUrl = MarketURLGetter.getMarketUrl(); - 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); +- 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; - -- ChromeSharedPreferences.getInstance().removeKey( -- ChromePreferenceKeys.LATEST_UNSUPPORTED_VERSION); +- ChromeSharedPreferences.getInstance() +- .removeKey(ChromePreferenceKeys.LATEST_UNSUPPORTED_VERSION); - } else if (!VersionNumberGetter.isCurrentOsVersionSupported()) { - status.updateState = UpdateState.UNSUPPORTED_OS_VERSION; -- status.latestUnsupportedVersion = ChromeSharedPreferences.getInstance().readString( -- ChromePreferenceKeys.LATEST_UNSUPPORTED_VERSION, null); +- status.latestUnsupportedVersion = +- ChromeSharedPreferences.getInstance() +- .readString(ChromePreferenceKeys.LATEST_UNSUPPORTED_VERSION, null); - } else { - status.updateState = UpdateState.NONE; + SharedPreferences preferences = OmahaBase.getSharedPreferences(); @@ -734,7 +731,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateSta diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNumberGetter.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNumberGetter.java --- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNumberGetter.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNumberGetter.java -@@ -50,7 +50,8 @@ public class VersionNumberGetter { +@@ -51,7 +51,8 @@ public class VersionNumberGetter { private static VersionNumberGetter sInstanceForTests; /** If false, OmahaClient will never report that a newer version is available. */ @@ -742,7 +739,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNu + // it must be false to disable version control via Omaha server + private static boolean sEnableUpdateDetection = false; - protected VersionNumberGetter() { } + protected VersionNumberGetter() {} diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/inline/BromiteInlineUpdateController.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/inline/BromiteInlineUpdateController.java new file mode 100644 @@ -1209,8 +1206,8 @@ 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 -@@ -71,6 +71,24 @@ public final class EndpointFetcher { - postData, timeout, headers, annotation.getHashCode(), callback); +@@ -104,6 +104,24 @@ public final class EndpointFetcher { + callback); } + @MainThread @@ -1233,18 +1230,20 @@ 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, -@@ -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); -- void nativeFetchWithNoAuth(Profile profile, String url, int annotationHashCode, -+ void nativeFetchWithNoAuth( -+ Profile profile, String url, long timeout, boolean allow_redirect, -+ int annotationHashCode, + void nativeFetchOAuth( +@@ -132,7 +150,16 @@ public final class EndpointFetcher { + void nativeFetchWithNoAuth( + Profile profile, + String url, ++ long timeout, ++ boolean allow_redirect, + int annotationHashCode, Callback callback); + void nativeHeadWithNoAuth( -+ Profile profile, String url, long timeout, boolean allow_redirect, ++ Profile profile, ++ String url, ++ long timeout, ++ boolean allow_redirect, + int annotationHashCode, + Callback callback); } @@ -1288,10 +1287,10 @@ new file mode 100644 diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc --- a/chrome/browser/flags/android/chrome_feature_list.cc +++ b/chrome/browser/flags/android/chrome_feature_list.cc -@@ -269,6 +269,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { - &kPageAnnotationsService, - &kPaintPreviewNewColdStartHeuristic, +@@ -264,6 +264,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kPreconnectOnTabCreation, + &kPriceChangeModule, + &kPwaRestoreUi, + &kInlineUpdateFlow, &kBookmarksImprovedSaveFlow, &kBookmarksRefresh, @@ -1299,18 +1298,18 @@ 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 -@@ -304,6 +304,7 @@ public abstract class ChromeFeatureList { +@@ -303,6 +303,7 @@ public abstract class ChromeFeatureList { "IncognitoReauthenticationForAndroid"; public static final String INCOGNITO_SCREENSHOT = "IncognitoScreenshot"; public static final String INFOBAR_SCROLL_OPTIMIZATION = "InfobarScrollOptimization"; + public static final String INLINE_UPDATE_FLOW = "InlineUpdateFlow"; - public static final String INSTALLABLE_AMBIENT_BADGE_INFOBAR = "InstallableAmbientBadgeInfoBar"; public static final String INSTALLABLE_AMBIENT_BADGE_MESSAGE = "InstallableAmbientBadgeMessage"; public static final String INSTANCE_SWITCHER = "InstanceSwitcher"; + public static final String INSTANT_START = "InstantStart"; 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 -@@ -2109,6 +2109,12 @@ Your Google account may have other forms of browsing history like searches and a +@@ -2012,6 +2012,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 @@ -1323,7 +1322,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro -@@ -3746,7 +3752,10 @@ To change this setting, <resetlink>reset sync

<resetlink>reset sync

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

<resetlink>reset sync

Android version is unsupported @@ -1474,7 +1473,7 @@ diff --git a/components/endpoint_fetcher/endpoint_fetcher.cc b/components/endpoi network::SimpleURLLoader::RETRY_ON_5XX); - simple_url_loader_->SetTimeoutDuration(base::Milliseconds(timeout_ms_)); - simple_url_loader_->SetAllowHttpErrorResults(true); -- network::SimpleURLLoader::BodyAsStringCallback body_as_string_callback = +- network::SimpleURLLoader::BodyAsStringCallbackDeprecated + + LOG(INFO) << "performing " << http_method_ << " request to " << url_; + if (base::EqualsCaseInsensitiveASCII(http_method_, "HEAD")) { @@ -1485,10 +1484,10 @@ diff --git a/components/endpoint_fetcher/endpoint_fetcher.cc b/components/endpoi + base::BindOnce(&EndpointFetcher::OnURLLoadComplete, + base::Unretained(this))); + } else { -+ network::SimpleURLLoader::BodyAsStringCallback body_as_string_callback = - base::BindOnce(&EndpointFetcher::OnResponseFetched, - weak_ptr_factory_.GetWeakPtr(), - std::move(endpoint_fetcher_callback)); ++ network::SimpleURLLoader::BodyAsStringCallbackDeprecated + body_as_string_callback = base::BindOnce( + &EndpointFetcher::OnResponseFetched, weak_ptr_factory_.GetWeakPtr(), + std::move(endpoint_fetcher_callback)); - simple_url_loader_->DownloadToString( - url_loader_factory_.get(), std::move(body_as_string_callback), - network::SimpleURLLoader::kMaxBoundedStringDownloadSize); @@ -1624,4 +1623,3 @@ new file mode 100644 @@ -0,0 +1 @@ +BASE_DECLARE_FEATURE(kInlineUpdateFlow); -- -2.25.1 diff --git a/build/patches/Bromite-package-name.patch b/build/patches/Bromite-package-name.patch index 0c339f28b..139e2d540 100644 --- a/build/patches/Bromite-package-name.patch +++ b/build/patches/Bromite-package-name.patch @@ -20,4 +20,3 @@ diff --git a/chrome/android/chrome_public_apk_tmpl.gni b/chrome/android/chrome_p chrome_public_manifest_package += ".stable" } else if (android_channel != "default" && android_channel != "stable") { -- -2.25.1 diff --git a/build/patches/Bromite-subresource-adblocker.patch b/build/patches/Bromite-subresource-adblocker.patch index 4dd13d472..6f4f31976 100644 --- a/build/patches/Bromite-subresource-adblocker.patch +++ b/build/patches/Bromite-subresource-adblocker.patch @@ -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 -@@ -297,6 +297,7 @@ if (current_toolchain == default_toolchain) { +@@ -304,6 +304,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 -@@ -450,6 +450,7 @@ chrome_java_resources = [ +@@ -434,6 +434,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", -@@ -655,6 +656,7 @@ chrome_java_resources = [ +@@ -638,6 +639,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 -@@ -967,6 +967,8 @@ chrome_java_sources = [ +@@ -961,6 +961,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", @@ -106,7 +106,7 @@ diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java + "java/src/org/chromium/chrome/browser/settings/AdBlockPreferences.java", "java/src/org/chromium/chrome/browser/policy/PolicyAuditor.java", "java/src/org/chromium/chrome/browser/policy/PolicyAuditorBridge.java", - "java/src/org/chromium/chrome/browser/printing/TabPrinter.java", + "java/src/org/chromium/chrome/browser/privacy/settings/DoNotTrackSettings.java", diff --git a/chrome/android/java/res/layout/adblock_editor.xml b/chrome/android/java/res/layout/adblock_editor.xml new file mode 100644 --- /dev/null @@ -210,7 +210,7 @@ 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,10 @@ found in the LICENSE file. +@@ -25,6 +25,10 @@ found in the LICENSE file. true @@ -428,7 +428,7 @@ new file mode 100644 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelImpl.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelImpl.java -@@ -781,7 +781,7 @@ public class TabModelImpl extends TabModelJniBridge { +@@ -839,7 +839,7 @@ public class TabModelImpl extends TabModelJniBridge { protected boolean createTabWithWebContents( Tab parent, Profile profile, WebContents webContents) { return getTabCreator(profile.isOffTheRecord()) @@ -440,7 +440,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabMod 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 -@@ -14539,6 +14539,16 @@ Please help our engineers fix this problem. Tell us what happened right before y +@@ -14908,6 +14908,16 @@ Please help our engineers fix this problem. Tell us what happened right before y Never show this again. @@ -511,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,27 @@ BrowserProcessImpl::component_updater() { +@@ -1138,6 +1138,27 @@ 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 -@@ -208,6 +208,7 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -210,6 +210,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; -@@ -404,6 +405,7 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -406,6 +407,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 -@@ -428,6 +428,9 @@ StartupProfileInfo CreateInitialProfile( +@@ -448,6 +448,9 @@ StartupProfileInfo CreateInitialProfile( // missing code in the above test. CHECK(profile_info.profile) << "Cannot get default profile."; @@ -574,7 +574,7 @@ diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_brows diff --git a/chrome/browser/flags/BUILD.gn b/chrome/browser/flags/BUILD.gn --- a/chrome/browser/flags/BUILD.gn +++ b/chrome/browser/flags/BUILD.gn -@@ -24,6 +24,7 @@ android_library("java") { +@@ -23,6 +23,7 @@ android_library("java") { "android/java/src/org/chromium/chrome/browser/flags/StringCachedFieldTrialParameter.java", "android/java/src/org/chromium/chrome/browser/flags/ValuesOverridden.java", "android/java/src/org/chromium/chrome/browser/flags/ValuesReturned.java", @@ -582,7 +582,7 @@ diff --git a/chrome/browser/flags/BUILD.gn b/chrome/browser/flags/BUILD.gn ] deps = [ "//base:base_java", -@@ -45,6 +46,7 @@ android_library("java") { +@@ -44,6 +45,7 @@ android_library("java") { generate_jni("jni_headers") { sources = [ "android/java/src/org/chromium/chrome/browser/flags/CromiteNativeUtils.java" ] sources += [ @@ -590,7 +590,7 @@ diff --git a/chrome/browser/flags/BUILD.gn b/chrome/browser/flags/BUILD.gn "android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureMap.java", "android/java/src/org/chromium/chrome/browser/flags/ChromeSessionState.java", ] -@@ -59,6 +61,7 @@ static_library("flags_android") { +@@ -58,6 +60,7 @@ static_library("flags_android") { "android/chrome_session_state.cc", "android/chrome_session_state.h", ] @@ -672,7 +672,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 -@@ -609,6 +609,14 @@ SystemNetworkContextManager::~SystemNetworkContextManager() { +@@ -602,6 +602,14 @@ SystemNetworkContextManager::~SystemNetworkContextManager() { void SystemNetworkContextManager::RegisterPrefs(PrefRegistrySimple* registry) { StubResolverConfigReader::RegisterPrefs(registry); @@ -730,7 +730,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 -@@ -2625,6 +2625,11 @@ inline constexpr char kAudioCaptureAllowed[] = "hardware.audio_capture_enabled"; +@@ -2657,6 +2657,11 @@ inline constexpr char kAudioCaptureAllowed[] = "hardware.audio_capture_enabled"; inline constexpr char kAudioCaptureAllowedUrls[] = "hardware.audio_capture_allowed_urls"; @@ -1593,7 +1593,7 @@ diff --git a/components/subresource_filter/content/browser/content_subresource_f diff --git a/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h b/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h --- a/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h +++ b/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h -@@ -412,6 +412,8 @@ class ContentSubresourceFilterThrottleManager +@@ -413,6 +413,8 @@ class ContentSubresourceFilterThrottleManager std::unique_ptr profile_interaction_manager_; @@ -1999,4 +1999,3 @@ new file mode 100644 +SET_CROMITE_FEATURE_DISABLED(kAutomaticLazyFrameLoadingToEmbeds); +SET_CROMITE_FEATURE_DISABLED(kAutomaticLazyFrameLoadingToEmbedUrls); -- -2.25.1 diff --git a/build/patches/00Chrome-web-store-protection.patch b/build/patches/Chrome-web-store-protection.patch similarity index 97% rename from build/patches/00Chrome-web-store-protection.patch rename to build/patches/Chrome-web-store-protection.patch index 817f0b4af..9a9e15ddd 100644 --- a/build/patches/00Chrome-web-store-protection.patch +++ b/build/patches/Chrome-web-store-protection.patch @@ -64,7 +64,7 @@ diff --git a/chrome/app/extensions_strings.grdp b/chrome/app/extensions_strings. diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.cc b/chrome/browser/extensions/api/developer_private/developer_private_api.cc --- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc +++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc -@@ -123,6 +123,12 @@ +@@ -125,6 +125,12 @@ #include "url/gurl.h" #include "url/origin.h" @@ -75,8 +75,8 @@ diff --git a/chrome/browser/extensions/api/developer_private/developer_private_a +#include "components/flags_ui/flags_storage.h" + #if BUILDFLAG(ENABLE_SUPERVISED_USERS) - #include "chrome/browser/supervised_user/supervised_user_service_factory.h" - #include "components/supervised_user/core/browser/supervised_user_service.h" + #include "components/supervised_user/core/browser/supervised_user_preferences.h" + #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) @@ -520,9 +526,32 @@ std::unique_ptr DeveloperPrivateAPI::CreateProfileInfo( info->can_load_unpacked = ExtensionManagementFactory::GetForBrowserContext(profile) @@ -110,7 +110,7 @@ diff --git a/chrome/browser/extensions/api/developer_private/developer_private_a template <> void BrowserContextKeyedAPIFactory< DeveloperPrivateAPI>::DeclareFactoryDependencies() { -@@ -950,6 +979,7 @@ ExtensionFunction::ResponseAction DeveloperPrivateAutoUpdateFunction::Run() { +@@ -951,6 +980,7 @@ ExtensionFunction::ResponseAction DeveloperPrivateAutoUpdateFunction::Run() { ExtensionUpdater::CheckParams params; params.fetch_priority = DownloadFetchPriority::kForeground; params.install_immediately = true; @@ -118,16 +118,16 @@ diff --git a/chrome/browser/extensions/api/developer_private/developer_private_a params.callback = base::BindOnce(&DeveloperPrivateAutoUpdateFunction::OnComplete, this); updater->CheckNow(std::move(params)); -@@ -1089,7 +1119,7 @@ DeveloperPrivateUpdateProfileConfigurationFunction::Run() { +@@ -1090,7 +1120,7 @@ DeveloperPrivateUpdateProfileConfigurationFunction::Run() { const developer::ProfileConfigurationUpdate& update = params->update; - if (update.in_developer_mode) { + if (update.in_developer_mode.has_value() && update.in_developer_mode) { Profile* profile = Profile::FromBrowserContext(browser_context()); - + CHECK(profile); #if BUILDFLAG(ENABLE_SUPERVISED_USERS) -@@ -1103,6 +1133,11 @@ DeveloperPrivateUpdateProfileConfigurationFunction::Run() { +@@ -1102,6 +1132,11 @@ DeveloperPrivateUpdateProfileConfigurationFunction::Run() { util::SetDeveloperModeForProfile(profile, *update.in_developer_mode); } @@ -163,7 +163,7 @@ diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api #include "extensions/common/manifest.h" #include "extensions/common/manifest_constants.h" #include "extensions/common/manifest_handlers/permissions_parser.h" -@@ -231,12 +232,16 @@ WebstorePrivateApi::Delegate* test_delegate = nullptr; +@@ -230,12 +231,16 @@ WebstorePrivateApi::Delegate* test_delegate = nullptr; // there was previously stored data, or an empty string otherwise. The Set will // overwrite any previous login. std::string GetWebstoreLogin(Profile* profile) { @@ -180,16 +180,16 @@ diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api profile->GetPrefs()->SetString(kWebstoreLogin, login); } -@@ -246,6 +251,8 @@ void RecordWebstoreExtensionInstallResult(bool success) { +@@ -245,6 +250,8 @@ void RecordWebstoreExtensionInstallResult(bool success) { api::webstore_private::ExtensionInstallStatus ConvertExtensionInstallStatusForAPI(ExtensionInstallStatus status) { + if (!base::FeatureList::IsEnabled(extensions_features::kEnableExtensionManagementToChromeStore)) -+ return api::webstore_private::EXTENSION_INSTALL_STATUS_INSTALLABLE; ++ return api::webstore_private::ExtensionInstallStatus::kInstallable; switch (status) { case kCanRequest: - return api::webstore_private::ExtensionInstallStatus:: -@@ -1178,7 +1185,8 @@ ExtensionFunction::ResponseAction + return api::webstore_private::ExtensionInstallStatus::kCanRequest; +@@ -1163,7 +1170,8 @@ ExtensionFunction::ResponseAction WebstorePrivateIsInIncognitoModeFunction::Run() { Profile* profile = Profile::FromBrowserContext(browser_context()); return RespondNow(ArgumentList(IsInIncognitoMode::Results::Create( @@ -199,7 +199,7 @@ diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api } WebstorePrivateIsPendingCustodianApprovalFunction:: -@@ -1280,6 +1288,8 @@ WebstorePrivateGetReferrerChainFunction::Run() { +@@ -1263,6 +1271,8 @@ WebstorePrivateGetReferrerChainFunction::Run() { recent_navigations_to_collect); std::string serialized_referrer_proto = request.SerializeAsString(); @@ -211,7 +211,7 @@ diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api diff --git a/chrome/browser/extensions/extension_system_impl.cc b/chrome/browser/extensions/extension_system_impl.cc --- a/chrome/browser/extensions/extension_system_impl.cc +++ b/chrome/browser/extensions/extension_system_impl.cc -@@ -57,6 +57,7 @@ +@@ -56,6 +56,7 @@ #include "extensions/browser/updater/uninstall_ping_sender.h" #include "extensions/browser/user_script_manager.h" #include "extensions/common/constants.h" @@ -219,7 +219,7 @@ diff --git a/chrome/browser/extensions/extension_system_impl.cc b/chrome/browser #include "extensions/common/features/feature_channel.h" #include "extensions/common/manifest_url_handlers.h" #include "ui/message_center/public/cpp/notifier_id.h" -@@ -84,6 +85,7 @@ UninstallPingSender::FilterResult ShouldSendUninstallPing( +@@ -83,6 +84,7 @@ UninstallPingSender::FilterResult ShouldSendUninstallPing( Profile* profile, const Extension* extension, UninstallReason reason) { @@ -343,8 +343,8 @@ diff --git a/chrome/browser/extensions/updater/extension_updater.cc b/chrome/bro params.fetch_priority, &update_check_params); } else { @@ -518,7 +525,7 @@ void ExtensionUpdater::CheckNow(CheckParams params) { - const Extension* extension = registry_->GetExtensionById( - id, extensions::ExtensionRegistry::EVERYTHING); + const Extension* extension = + registry_->GetExtensionById(id, ExtensionRegistry::EVERYTHING); if (extension) { - if (CanUseUpdateService(id)) { + if ((false) && CanUseUpdateService(id)) { @@ -476,7 +476,7 @@ diff --git a/chrome/browser/resources/extensions/manager.ts b/chrome/browser/res diff --git a/chrome/browser/resources/extensions/service.ts b/chrome/browser/resources/extensions/service.ts --- a/chrome/browser/resources/extensions/service.ts +++ b/chrome/browser/resources/extensions/service.ts -@@ -283,6 +283,11 @@ export class Service implements ServiceInterface { +@@ -284,6 +284,11 @@ export class Service implements ServiceInterface { {inDeveloperMode: inDevMode}); } @@ -594,7 +594,7 @@ diff --git a/chrome/browser/resources/webstore_app/manifest.json b/chrome/browse diff --git a/chrome/browser/ui/webui/extensions/extensions_ui.cc b/chrome/browser/ui/webui/extensions/extensions_ui.cc --- a/chrome/browser/ui/webui/extensions/extensions_ui.cc +++ b/chrome/browser/ui/webui/extensions/extensions_ui.cc -@@ -56,6 +56,8 @@ +@@ -58,6 +58,8 @@ #include "chrome/browser/ui/webui/extensions/ash/kiosk_apps_handler.h" #endif @@ -603,7 +603,7 @@ diff --git a/chrome/browser/ui/webui/extensions/extensions_ui.cc b/chrome/browse namespace extensions { namespace { -@@ -338,6 +340,8 @@ content::WebUIDataSource* CreateAndAddExtensionsSource(Profile* profile, +@@ -340,6 +342,8 @@ content::WebUIDataSource* CreateAndAddExtensionsSource(Profile* profile, {"itemSuspiciousInstallLearnMore", IDS_EXTENSIONS_ADDED_WITHOUT_KNOWLEDGE_LEARN_MORE}, {"toolbarDevMode", IDS_EXTENSIONS_DEVELOPER_MODE}, @@ -612,7 +612,7 @@ diff --git a/chrome/browser/ui/webui/extensions/extensions_ui.cc b/chrome/browse {"toolbarLoadUnpacked", IDS_EXTENSIONS_TOOLBAR_LOAD_UNPACKED}, {"toolbarLoadUnpackedDone", IDS_EXTENSIONS_TOOLBAR_LOAD_UNPACKED_DONE}, {"toolbarPack", IDS_EXTENSIONS_TOOLBAR_PACK}, -@@ -415,6 +419,10 @@ content::WebUIDataSource* CreateAndAddExtensionsSource(Profile* profile, +@@ -417,6 +421,10 @@ content::WebUIDataSource* CreateAndAddExtensionsSource(Profile* profile, source->AddString("hostPermissionsLearnMoreLink", chrome_extension_constants::kRuntimeHostPermissionsHelpURL); source->AddBoolean(kInDevModeKey, in_dev_mode); @@ -767,7 +767,7 @@ diff --git a/extensions/browser/api/management/management_api.cc b/extensions/br iter != extensions.end(); ++iter) { const Extension& extension = **iter; @@ -306,10 +333,9 @@ ExtensionFunction::ResponseAction ManagementGetFunction::Run() { - absl::optional params = + std::optional params = management::Get::Params::Create(args()); EXTENSION_FUNCTION_VALIDATE(params); - ExtensionRegistry* registry = ExtensionRegistry::Get(browser_context()); @@ -1033,14 +1033,14 @@ diff --git a/extensions/browser/updater/extension_downloader.cc b/extensions/bro diff --git a/extensions/browser/updater/extension_downloader.h b/extensions/browser/updater/extension_downloader.h --- a/extensions/browser/updater/extension_downloader.h +++ b/extensions/browser/updater/extension_downloader.h -@@ -113,7 +113,6 @@ class ExtensionDownloader { +@@ -112,7 +112,6 @@ class ExtensionDownloader { } void set_ping_enabled_domain(const std::string& domain) { - ping_enabled_domain_ = domain; } - // Set backoff policy for manifest and extension queue. Set `absl::nullopt` to + // Set backoff policy for manifest and extension queue. Set `std::nullopt` to diff --git a/extensions/browser/updater/manifest_fetch_data.cc b/extensions/browser/updater/manifest_fetch_data.cc --- a/extensions/browser/updater/manifest_fetch_data.cc +++ b/extensions/browser/updater/manifest_fetch_data.cc @@ -1075,7 +1075,7 @@ diff --git a/extensions/browser/updater/manifest_fetch_data.cc b/extensions/brow diff --git a/extensions/browser/updater/safe_manifest_parser.cc b/extensions/browser/updater/safe_manifest_parser.cc --- a/extensions/browser/updater/safe_manifest_parser.cc +++ b/extensions/browser/updater/safe_manifest_parser.cc -@@ -203,6 +203,7 @@ void ParseXmlDone(ParseUpdateManifestCallback callback, +@@ -202,6 +202,7 @@ void ParseXmlDone(ParseUpdateManifestCallback callback, std::move(callback).Run(/*results=*/nullptr, std::move(error)); }); @@ -1086,8 +1086,8 @@ diff --git a/extensions/browser/updater/safe_manifest_parser.cc b/extensions/bro diff --git a/extensions/common/extension_features.cc b/extensions/common/extension_features.cc --- a/extensions/common/extension_features.cc +++ b/extensions/common/extension_features.cc -@@ -226,4 +226,19 @@ BASE_FEATURE(kDeclarativeNetRequestSafeRuleLimits, - "DeclarativeNetRequestSafeDynamicRules", +@@ -154,4 +154,19 @@ BASE_FEATURE(kDeclarativeNetRequestResponseHeaderMatching, + "DeclarativeNetRequestResponseHeaderMatching", base::FEATURE_DISABLED_BY_DEFAULT); +// Activates the auto update of extensions. @@ -1109,9 +1109,9 @@ diff --git a/extensions/common/extension_features.cc b/extensions/common/extensi diff --git a/extensions/common/extension_features.h b/extensions/common/extension_features.h --- a/extensions/common/extension_features.h +++ b/extensions/common/extension_features.h -@@ -108,6 +108,10 @@ BASE_DECLARE_FEATURE(kNewWebstoreURL); - - BASE_DECLARE_FEATURE(kDeclarativeNetRequestSafeRuleLimits); +@@ -193,6 +193,10 @@ BASE_DECLARE_FEATURE(kDeclarativeNetRequestSafeRuleLimits); + // matching condition. + BASE_DECLARE_FEATURE(kDeclarativeNetRequestResponseHeaderMatching); +BASE_DECLARE_FEATURE(kEnableExtensionAutoupdate); + @@ -1142,4 +1142,3 @@ diff --git a/tools/typescript/definitions/developer_private.d.ts b/tools/typescr export interface ExtensionCommandUpdate { -- -2.25.1 diff --git a/build/patches/00Clear-CORS-Preflight-Cache-on-clearing-data.patch b/build/patches/Clear-CORS-Preflight-Cache-on-clearing-data.patch similarity index 98% rename from build/patches/00Clear-CORS-Preflight-Cache-on-clearing-data.patch rename to build/patches/Clear-CORS-Preflight-Cache-on-clearing-data.patch index 2d90bcd50..b780a355e 100644 --- a/build/patches/00Clear-CORS-Preflight-Cache-on-clearing-data.patch +++ b/build/patches/Clear-CORS-Preflight-Cache-on-clearing-data.patch @@ -79,7 +79,7 @@ diff --git a/services/network/cors/preflight_result.cc b/services/network/cors/p diff --git a/services/network/network_context.cc b/services/network/network_context.cc --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1129,6 +1129,8 @@ void NetworkContext::ClearHttpCache(base::Time start_time, +@@ -1136,6 +1136,8 @@ void NetworkContext::ClearHttpCache(base::Time start_time, base::BindOnce(&NetworkContext::OnHttpCacheCleared, base::Unretained(this), std::move(callback)))); @@ -89,4 +89,3 @@ diff --git a/services/network/network_context.cc b/services/network/network_cont if (memory_cache) memory_cache->Clear(); -- -2.25.1 diff --git a/build/patches/Client-hints-overrides.patch b/build/patches/Client-hints-overrides.patch index 4c81eabe1..305420c40 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 -@@ -1063,6 +1063,11 @@ void NavigationURLLoaderImpl::OnAcceptCHFrameReceived( +@@ -1064,6 +1064,11 @@ void NavigationURLLoaderImpl::OnAcceptCHFrameReceived( return; } @@ -78,14 +78,14 @@ 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 -@@ -100,6 +100,7 @@ const size_t kMaxRestarts = 32; +@@ -101,6 +101,7 @@ const size_t kMaxRestarts = 32; // Returns true when Early Hints are allowed on the given protocol. - bool EarlyHintsAreAllowedOn(HttpResponseInfo::ConnectionInfo connection_info) { + bool EarlyHintsAreAllowedOn(HttpConnectionInfo connection_info) { + if ((true)) return false; switch (connection_info) { - case HttpResponseInfo::ConnectionInfo::CONNECTION_INFO_HTTP0_9: - case HttpResponseInfo::ConnectionInfo::CONNECTION_INFO_HTTP1_0: + case HttpConnectionInfo::kHTTP0_9: + case HttpConnectionInfo::kHTTP1_0: diff --git a/services/network/public/cpp/client_hints.cc b/services/network/public/cpp/client_hints.cc --- a/services/network/public/cpp/client_hints.cc +++ b/services/network/public/cpp/client_hints.cc @@ -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 -@@ -4019,8 +4019,8 @@ +@@ -3903,8 +3903,8 @@ public: true, }, { @@ -151,4 +151,3 @@ diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 { // https://chromestatus.com/feature/5132477781245952 -- -2.25.1 diff --git a/build/patches/00Compress-libchrome-to-free-up-some-space.patch b/build/patches/Compress-libchrome-to-free-up-some-space.patch similarity index 94% rename from build/patches/00Compress-libchrome-to-free-up-some-space.patch rename to build/patches/Compress-libchrome-to-free-up-some-space.patch index ec3419fe6..e3d103b18 100644 --- a/build/patches/00Compress-libchrome-to-free-up-some-space.patch +++ b/build/patches/Compress-libchrome-to-free-up-some-space.patch @@ -13,7 +13,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/android/chrome_public_apk_tmpl.gni b/chrome/android/chrome_public_apk_tmpl.gni --- a/chrome/android/chrome_public_apk_tmpl.gni +++ b/chrome/android/chrome_public_apk_tmpl.gni -@@ -639,6 +639,7 @@ template("chrome_common_apk_or_module_tmpl") { +@@ -638,6 +638,7 @@ template("chrome_common_apk_or_module_tmpl") { [ "//components/crash/core/app:chrome_crashpad_handler_named_as_so" ] loadable_modules += [ "$root_out_dir/libchrome_crashpad_handler.so" ] library_always_compress += [ "libchrome_crashpad_handler.so" ] @@ -22,4 +22,3 @@ diff --git a/chrome/android/chrome_public_apk_tmpl.gni b/chrome/android/chrome_p # Crashpad trampoline lives in TrichromeLibrary.apk. # https://chromium.googlesource.com/chromium/src/+/main/docs/android_native_libraries.md#Crashpad-Packaging -- -2.25.1 diff --git a/build/patches/Content-settings-infrastructure.patch b/build/patches/Content-settings-infrastructure.patch index 4827480e5..3d018e675 100644 --- a/build/patches/Content-settings-infrastructure.patch +++ b/build/patches/Content-settings-infrastructure.patch @@ -37,7 +37,7 @@ Require: bromite-build-utils.patch .../site_settings/SiteSettingsCategory.java | 18 +- .../site_settings/SiteSettingsDelegate.java | 2 + .../TriStateSiteSettingsPreference.java | 13 +- - .../browser_ui/site_settings/Website.java | 6 + + .../browser_ui/site_settings/Website.java | 6 +- .../WebsitePermissionsFetcher.java | 4 +- .../WebsitePreferenceBridge.java | 3 +- .../impl/include_all_directory.java | 1 + @@ -72,7 +72,7 @@ Require: bromite-build-utils.patch .../platform/web_content_settings_client.h | 5 + .../execution_context/execution_context.cc | 16 + .../execution_context/execution_context.h | 5 + - 61 files changed, 1195 insertions(+), 44 deletions(-) + 61 files changed, 1194 insertions(+), 45 deletions(-) create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSetting.java create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomContentSettingImpl.java create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/BromiteCustomTriStateSiteSettingsPreferenceImpl.java @@ -93,10 +93,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/C +import android.provider.Browser; +import android.net.Uri; + - /** - * A SiteSettingsDelegate instance that contains Chrome-specific Site Settings logic. - */ -@@ -203,7 +207,7 @@ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate { + /** A SiteSettingsDelegate instance that contains Chrome-specific Site Settings logic. */ + public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate { + public static final String EMBEDDED_CONTENT_HELP_CENTER_URL = +@@ -202,7 +206,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 -@@ -310,6 +314,17 @@ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate { +@@ -315,6 +319,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 -@@ -1376,4 +1376,5 @@ +@@ -1326,4 +1326,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 -@@ -72,7 +72,49 @@ export class SettingsPrivacyPageElement extends SettingsPrivacyPageElementBase { +@@ -71,7 +71,49 @@ export class SettingsPrivacyPageElement extends SettingsPrivacyPageElementBase { } static get template() { @@ -209,7 +209,7 @@ diff --git a/chrome/browser/resources/settings/route.ts b/chrome/browser/resourc /** * Add all of the child routes that originate from the privacy route, -@@ -139,6 +140,7 @@ function addPrivacyChildRoutes(r: Partial) { +@@ -136,6 +137,7 @@ function addPrivacyChildRoutes(r: Partial) { r.SITE_SETTINGS_STORAGE_ACCESS = r.SITE_SETTINGS.createChild('storageAccess'); } @@ -237,7 +237,7 @@ diff --git a/chrome/browser/resources/settings/site_settings/settings_category_d diff --git a/chrome/browser/resources/settings/site_settings/site_details.html b/chrome/browser/resources/settings/site_settings/site_details.html --- a/chrome/browser/resources/settings/site_settings/site_details.html +++ b/chrome/browser/resources/settings/site_settings/site_details.html -@@ -281,4 +281,5 @@ +@@ -279,4 +279,5 @@ label="$i18n{siteSettingsAutoPictureInPicture}"> @@ -272,7 +272,7 @@ diff --git a/chrome/browser/resources/settings/site_settings/site_details.ts b/c diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts --- a/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts +++ b/chrome/browser/resources/settings/site_settings_page/site_settings_page.ts -@@ -44,7 +44,7 @@ function getCategoryItemMap(): Map { +@@ -45,7 +45,7 @@ function getCategoryItemMap(): Map { } // The following list is ordered alphabetically by |id|. The order in which // these appear in the UI is determined elsewhere in this file. @@ -281,7 +281,7 @@ diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_ { route: routes.SITE_SETTINGS_ADS, id: Id.ADS, -@@ -367,10 +367,34 @@ function getCategoryItemMap(): Map { +@@ -371,10 +371,34 @@ function getCategoryItemMap(): Map { disabledLabel: 'trackingProtectionLinkRowSubLabel', }); } @@ -316,7 +316,7 @@ diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_ function buildItemListFromIds(orderedIdList: ContentSettingsTypes[]): CategoryListItem[] { const map = getCategoryItemMap(); -@@ -460,7 +484,7 @@ export class SettingsSiteSettingsPageElement extends +@@ -465,7 +489,7 @@ export class SettingsSiteSettingsPageElement extends Id.IMAGES, Id.POPUPS, ]), @@ -383,7 +383,7 @@ diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_ /** * Determine localization string for i18n for a given content settings type. * Sorted alphabetically by |ContentSettingsType|. -@@ -89,6 +137,13 @@ export function getLocalizationStringForContentType( +@@ -90,6 +138,13 @@ export function getLocalizationStringForContentType( case ContentSettingsTypes.SITE_DATA: return null; default: @@ -400,7 +400,7 @@ diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn -@@ -2006,6 +2006,7 @@ static_library("ui") { +@@ -2047,6 +2047,7 @@ static_library("ui") { "//components/commerce/core/mojom:mojo_bindings", "//components/commerce/core/webui", "//components/endpoint_fetcher:endpoint_fetcher", @@ -420,7 +420,7 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.cc b/chrom #include "components/page_info/core/features.h" #include "components/page_info/core/proto/about_this_site_metadata.pb.h" #include "components/page_info/page_info.h" -@@ -509,6 +511,17 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon( +@@ -507,6 +509,17 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon( icon = &vector_icons::kPictureInPictureIcon; break; default: @@ -458,7 +458,7 @@ diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provide #include "components/password_manager/core/browser/leak_detection_dialog_utils.h" #include "components/password_manager/core/browser/manage_passwords_referrer.h" #include "components/password_manager/core/common/password_manager_features.h" -@@ -3687,6 +3690,42 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source, +@@ -3628,6 +3631,42 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source, policy_indicator::AddLocalizedStrings(html_source); AddSecurityKeysStrings(html_source); @@ -513,7 +513,7 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b #include "components/content_settings/core/common/content_settings.h" #include "components/content_settings/core/common/content_settings_pattern.h" #include "components/content_settings/core/common/content_settings_utils.h" -@@ -208,7 +210,7 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = { +@@ -209,7 +211,7 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = { static_assert(std::size(kContentSettingsTypeGroupNames) == // ContentSettingsType starts at -1, so add 1 here. @@ -522,7 +522,7 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b "kContentSettingsTypeGroupNames should have " "CONTENT_SETTINGS_NUM_TYPES elements"); -@@ -465,6 +467,13 @@ bool HasRegisteredGroupName(ContentSettingsType type) { +@@ -462,6 +464,13 @@ bool HasRegisteredGroupName(ContentSettingsType type) { return true; } } @@ -536,7 +536,7 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b return false; } -@@ -478,11 +487,24 @@ ContentSettingsType ContentSettingsTypeFromGroupName(base::StringPiece name) { +@@ -475,11 +484,24 @@ ContentSettingsType ContentSettingsTypeFromGroupName(base::StringPiece name) { return entry.type; } } @@ -562,7 +562,7 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b for (const auto& entry : kContentSettingsTypeGroupNames) { if (type == entry.type) { // Content setting types that aren't represented in the settings UI -@@ -497,7 +519,6 @@ base::StringPiece ContentSettingsTypeToGroupName(ContentSettingsType type) { +@@ -494,7 +516,6 @@ base::StringPiece ContentSettingsTypeToGroupName(ContentSettingsType type) { return entry.name ? entry.name : base::StringPiece(); } } @@ -570,7 +570,7 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b NOTREACHED() << static_cast(type) << " is not a recognized content settings type."; return base::StringPiece(); -@@ -578,6 +599,13 @@ const std::vector& GetVisiblePermissionCategories() { +@@ -574,6 +595,13 @@ const std::vector& GetVisiblePermissionCategories() { base_types->push_back(ContentSettingsType::MIDI_SYSEX); } @@ -587,7 +587,7 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/browser_ui/site_settings/android/BUILD.gn --- a/components/browser_ui/site_settings/android/BUILD.gn +++ b/components/browser_ui/site_settings/android/BUILD.gn -@@ -148,6 +148,23 @@ android_library("java") { +@@ -149,6 +149,23 @@ android_library("java") { ":site_settings_jni_headers", "//components/content_settings/android:java_pref_names_srcjar", ] @@ -611,7 +611,7 @@ diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/b } android_library("javatests") { -@@ -193,6 +210,7 @@ robolectric_library("junit") { +@@ -194,6 +211,7 @@ robolectric_library("junit") { } android_resources("java_resources") { @@ -622,17 +622,20 @@ diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/b diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/AllSiteSettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/AllSiteSettings.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/AllSiteSettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/AllSiteSettings.java -@@ -342,11 +342,14 @@ public class AllSiteSettings extends BaseSiteSettingsFragment - if (queryHasChanged) getInfoForOrigins(); - }); +@@ -366,7 +366,8 @@ public class AllSiteSettings extends BaseSiteSettingsFragment + if (queryHasChanged) getInfoForOrigins(); + }); - if (getSiteSettingsDelegate().isHelpAndFeedbackEnabled()) { + if (getSiteSettingsDelegate().isHelpAndFeedbackEnabled() || + BromiteCustomContentSettingImpl.isHelpAndFeedbackEnabled(mCategory)) { - MenuItem help = menu.add( - Menu.NONE, R.id.menu_id_site_settings_help, Menu.NONE, R.string.menu_help); - help.setIcon(TraceEventVectorDrawableCompat.create( - getResources(), R.drawable.ic_help_and_feedback, getContext().getTheme())); + MenuItem help = + menu.add( + Menu.NONE, +@@ -378,6 +379,8 @@ public class AllSiteSettings extends BaseSiteSettingsFragment + getResources(), + R.drawable.ic_help_and_feedback, + getContext().getTheme())); + if (!BromiteCustomContentSettingImpl.isHelpAndFeedbackEnabled(mCategory)) + help.setVisible(false); } @@ -1126,34 +1129,34 @@ new file mode 100644 diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/ContentSettingsResources.java -@@ -39,7 +39,7 @@ public class ContentSettingsResources { - /** - * An inner class contains all the resources for a ContentSettingsType - */ +@@ -37,7 +37,7 @@ import org.chromium.device.DeviceFeatureMap; + @SuppressLint("UseSparseArrays") + public class ContentSettingsResources { + /** An inner class contains all the resources for a ContentSettingsType */ - private static class ResourceItem { + public static class ResourceItem { private final int mIcon; private final int mTitle; private final @ContentSettingValues @Nullable Integer mDefaultEnabledValue; -@@ -47,7 +47,7 @@ public class ContentSettingsResources { - private final int mEnabledSummary; +@@ -46,7 +46,7 @@ public class ContentSettingsResources { private final int mDisabledSummary; + private final int mSummaryOverrideForScreenReader; -- ResourceItem(int icon, int title, -+ public ResourceItem(int icon, int title, +- ResourceItem( ++ public ResourceItem( + int icon, + int title, @ContentSettingValues @Nullable Integer defaultEnabledValue, - @ContentSettingValues @Nullable Integer defaultDisabledValue, int enabledSummary, - int disabledSummary) { -@@ -303,6 +303,8 @@ public class ContentSettingsResources { - ContentSettingValues.BLOCK, R.string.website_settings_category_vr_ask, - R.string.website_settings_category_vr_blocked); +@@ -437,6 +437,8 @@ public class ContentSettingsResources { + R.string.website_settings_category_vr_blocked, + R.string.website_settings_category_vr_a11y); } + ResourceItem ri = BromiteCustomContentSettingImpl.getResourceItem(contentType); + if (ri != null) return ri; assert false; // NOTREACHED return null; } -@@ -468,6 +470,12 @@ public class ContentSettingsResources { +@@ -617,6 +619,12 @@ public class ContentSettingsResources { } } @@ -1166,7 +1169,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c /** * Returns the string resource id for a content type to show with a permission category. * @param enabled Whether the content type is enabled. -@@ -610,6 +618,8 @@ public class ContentSettingsResources { +@@ -769,6 +777,8 @@ public class ContentSettingsResources { * Blocked states, in that order. */ public static int[] getTriStateSettingDescriptionIDs(int contentType) { @@ -1174,14 +1177,14 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c + if (value != null) return value; if (contentType == ContentSettingsType.PROTECTED_MEDIA_IDENTIFIER) { int[] descriptionIDs = { - R.string.website_settings_category_protected_content_allowed_recommended, + R.string.website_settings_category_protected_content_allowed_recommended, diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java -@@ -313,6 +313,10 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment - @ContentSettingValues - Integer contentSetting = website.site().getContentSetting( - browserContextHandle, mCategory.getContentSettingsType()); +@@ -337,6 +337,10 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment + website.site() + .getContentSetting( + browserContextHandle, mCategory.getContentSettingsType()); + if (contentSetting != null && + BromiteCustomContentSettingImpl.processOnBlockList(contentSetting, contentSetting)) { + return BromiteCustomContentSettingImpl.isOnBlockList(contentSetting, website, contentSetting); @@ -1189,25 +1192,28 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (contentSetting != null) { return ContentSettingValues.BLOCK == contentSetting; } -@@ -472,6 +476,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment - ? new HashSet<>(getArguments().getStringArrayList(EXTRA_SELECTED_DOMAINS)) - : null; +@@ -501,6 +505,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment + ? new HashSet<>(getArguments().getStringArrayList(EXTRA_SELECTED_DOMAINS)) + : null; + BromiteCustomContentSettingImpl.onActivityCreated(this); configureGlobalToggles(); if (mCategory.getType() == SiteSettingsCategory.Type.REQUEST_DESKTOP_SITE) { RecordUserAction.record("DesktopSiteContentSetting.SettingsPage.Entered"); -@@ -496,17 +501,26 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment - if (queryHasChanged) getInfoForOrigins(); - }); +@@ -531,7 +536,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment + if (queryHasChanged) getInfoForOrigins(); + }); - if (getSiteSettingsDelegate().isHelpAndFeedbackEnabled()) { + if (getSiteSettingsDelegate().isHelpAndFeedbackEnabled() || + BromiteCustomContentSettingImpl.isHelpAndFeedbackEnabled(mCategory)) { - MenuItem help = menu.add( - Menu.NONE, R.id.menu_id_site_settings_help, Menu.NONE, R.string.menu_help); - help.setIcon(TraceEventVectorDrawableCompat.create( - getResources(), R.drawable.ic_help_and_feedback, getContext().getTheme())); + MenuItem help = + menu.add( + Menu.NONE, +@@ -543,12 +549,20 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment + getResources(), + R.drawable.ic_help_and_feedback, + getContext().getTheme())); + if (!BromiteCustomContentSettingImpl.isHelpAndFeedbackEnabled(mCategory)) + help.setVisible(false); } @@ -1223,9 +1229,9 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c + return true; + } if (mCategory.getType() == SiteSettingsCategory.Type.PROTECTED_MEDIA) { - getSiteSettingsDelegate().launchProtectedContentHelpAndFeedbackActivity( - getActivity()); -@@ -576,6 +590,11 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment + getSiteSettingsDelegate() + .launchProtectedContentHelpAndFeedbackActivity(getActivity()); +@@ -620,6 +634,11 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment BrowserContextHandle browserContextHandle = getSiteSettingsDelegate().getBrowserContextHandle(); PrefService prefService = UserPrefs.get(browserContextHandle); @@ -1237,8 +1243,8 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (BINARY_TOGGLE_KEY.equals(preference.getKey())) { assert !mCategory.isManaged(); boolean toggleValue = (boolean) newValue; -@@ -797,6 +816,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment - : R.string.website_settings_allowed_group_heading_request_desktop_site; +@@ -817,6 +836,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment + .website_settings_allowed_group_heading_request_desktop_site; break; } + if (resource == 0) @@ -1246,16 +1252,16 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c assert resource > 0; return getString(resource); } -@@ -915,6 +936,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -934,6 +955,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment default: break; } + Boolean allow = BromiteCustomContentSettingImpl.allowSpecifyingExceptions(mCategory); + if (allow != null) allowSpecifyingExceptions = (boolean)allow; if (allowSpecifyingExceptions) { - getPreferenceScreen().addPreference(new AddExceptionPreference(getStyledContext(), - ADD_EXCEPTION_KEY, getAddExceptionDialogMessage(), mCategory, this)); -@@ -1086,8 +1109,16 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment + getPreferenceScreen() + .addPreference( +@@ -1122,8 +1145,16 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment private boolean isBlocked() { switch (mGlobalToggleLayout) { case GlobalToggleLayout.TRI_STATE_TOGGLE: @@ -1270,9 +1276,9 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c getPreferenceScreen().findPreference(TRI_STATE_TOGGLE_KEY); + if (triStateToggle == null) return true; return (triStateToggle.getCheckedSetting() == ContentSettingValues.BLOCK); - case GlobalToggleLayout.FOUR_STATE_COOKIE_TOGGLE: - FourStateCookieSettingsPreference fourStateCookieToggle = -@@ -1166,7 +1197,11 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment + case GlobalToggleLayout.TRI_STATE_COOKIE_TOGGLE: + TriStateCookieSettingsPreference triStateCookieToggle = +@@ -1190,7 +1221,11 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment } else if (mCategory.getType() == SiteSettingsCategory.Type.STORAGE_ACCESS) { infoText.setSummary(getStorageAccessSummary()); } else { @@ -1285,7 +1291,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } // Hide the anti-abuse text preferences, as needed. -@@ -1190,6 +1225,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -1214,6 +1249,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment screen.removePreference(antiAbuseThingsToConsiderHeader); screen.removePreference(antiAbuseThingsToConsiderSectionOne); } @@ -1293,8 +1299,8 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (permissionBlockedByOs) { maybeShowOsWarning(screen); -@@ -1371,7 +1407,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment - getSiteSettingsDelegate().getBrowserContextHandle(), contentType); +@@ -1378,7 +1414,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment + getSiteSettingsDelegate().getBrowserContextHandle(), contentType); int[] descriptionIds = ContentSettingsResources.getTriStateSettingDescriptionIDs(contentType); - triStateToggle.initialize(setting, descriptionIds); @@ -1302,7 +1308,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } private void configureBinaryToggle(ChromeSwitchPreference binaryToggle, int contentType) { -@@ -1497,6 +1533,14 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -1517,6 +1553,14 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment @ContentSettingValues Integer value = site.getContentSetting(browserContextHandle, contentSettingsType); @@ -1316,19 +1322,19 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c + AlertDialog alertDialog = new AlertDialog.Builder(getContext(), R.style.ThemeOverlay_BrowserUI_AlertDialog) - .setTitle(getContext().getString( + .setTitle( diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java -@@ -47,6 +47,7 @@ import java.util.Collection; +@@ -49,6 +49,7 @@ import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.List; - /** - * Shows the permissions and other settings for a particular website. -@@ -172,7 +173,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment + /** Shows the permissions and other settings for a particular website. */ + public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -169,7 +170,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment case ContentSettingsType.CLIPBOARD_READ_WRITE: return "clipboard_permission_list"; default: @@ -1337,7 +1343,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } } -@@ -529,7 +530,8 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -544,7 +545,8 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment private void setupContentSettingsPreferences() { mMaxPermissionOrder = findPreference(PREF_PERMISSIONS_HEADER).getOrder(); @@ -1347,10 +1353,10 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c Preference preference = new ChromeSwitchPreference(getStyledContext()); preference.setKey(getPreferenceKey(type)); -@@ -1026,14 +1028,22 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment - - private void setupContentSettingsPreference(Preference preference, - @ContentSettingValues @Nullable Integer value, boolean isEmbargoed) { +@@ -1085,15 +1087,23 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment + Preference preference, + @ContentSettingValues @Nullable Integer value, + boolean isEmbargoed) { - if (value == null) return; + int content_type = getContentSettingsTypeFromPreferenceKey(preference.getKey()); + BromiteCustomContentSetting cs = @@ -1366,14 +1372,15 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c ChromeSwitchPreference switchPreference = (ChromeSwitchPreference) preference; - switchPreference.setChecked(value == ContentSettingValues.ALLOW); + switchPreference.setChecked(value != ContentSettingValues.BLOCK); - switchPreference.setSummary(isEmbargoed + switchPreference.setSummary( + isEmbargoed ? getString(R.string.automatically_blocked) - : getString(ContentSettingsResources.getCategorySummary(value))); + : getString(ContentSettingsResources.getCategorySummary(content_type, value))); switchPreference.setOnPreferenceChangeListener(this); @ContentSettingsType int contentType = getContentSettingsTypeFromPreferenceKey(preference.getKey()); -@@ -1186,7 +1196,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1256,7 +1266,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment public @ContentSettingsType int getContentSettingsTypeFromPreferenceKey(String preferenceKey) { if (mPreferenceMap == null) { mPreferenceMap = new HashMap<>(); @@ -1382,7 +1389,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c String key = getPreferenceKey(type); if (key != null) { mPreferenceMap.put(key, type); -@@ -1228,7 +1238,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1297,7 +1307,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment } mSite.setContentSetting(browserContextHandle, type, permission); @@ -1391,7 +1398,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c preference.setIcon(getContentSettingsIcon(type, permission)); if (mWebsiteSettingsObserver != null) { -@@ -1258,7 +1268,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1325,7 +1335,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment // TODO(mvanouwerkerk): Refactor this class so that it does not depend on the screen state // for its logic. This class should maintain its own data model, and only update the screen // after a change is made. @@ -1411,16 +1418,16 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c configurePreferences(); updatePreferenceStates(); } -@@ -54,7 +55,7 @@ public class SiteSettings extends BaseSiteSettingsFragment - } +@@ -55,7 +56,7 @@ public class SiteSettings extends BaseSiteSettingsFragment // Remove unsupported settings categories. -- for (@SiteSettingsCategory.Type int type = 0; type < SiteSettingsCategory.Type.NUM_ENTRIES; -+ for (@SiteSettingsCategory.Type int type = 0; type < BromiteCustomContentSettingImpl.NUM_ENTRIES(); + for (@SiteSettingsCategory.Type int type = 0; +- type < SiteSettingsCategory.Type.NUM_ENTRIES; ++ type < BromiteCustomContentSettingImpl.NUM_ENTRIES(); type++) { if (!getSiteSettingsDelegate().isCategoryVisible(type)) { getPreferenceScreen().removePreference(findPreference(type)); -@@ -70,7 +71,7 @@ public class SiteSettings extends BaseSiteSettingsFragment +@@ -71,7 +72,7 @@ public class SiteSettings extends BaseSiteSettingsFragment @CookieControlsMode int cookieControlsMode = UserPrefs.get(browserContextHandle).getInteger(COOKIE_CONTROLS_MODE); @@ -1429,7 +1436,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c Preference p = findPreference(prefCategory); int contentType = SiteSettingsCategory.contentSettingsType(prefCategory); // p can be null if the Preference was removed in configurePreferences. -@@ -135,10 +136,13 @@ public class SiteSettings extends BaseSiteSettingsFragment +@@ -139,10 +140,13 @@ public class SiteSettings extends BaseSiteSettingsFragment } else if (Type.ZOOM == prefCategory) { // Don't want to set a summary for Zoom because we don't want any message to display // under the Zoom row on site settings. @@ -1449,7 +1456,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java -@@ -73,7 +73,7 @@ public class SiteSettingsCategory { +@@ -70,7 +70,7 @@ public class SiteSettingsCategory { Type.ZOOM, Type.STORAGE_ACCESS, Type.TRACKING_PROTECTION, @@ -1458,16 +1465,16 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c }) @Retention(RetentionPolicy.SOURCE) public @interface Type { -@@ -113,7 +113,7 @@ public class SiteSettingsCategory { - int TRACKING_PROTECTION = 31; +@@ -109,7 +109,7 @@ public class SiteSettingsCategory { + int TRACKING_PROTECTION = 30; /** Number of handled categories used for calculating array sizes. */ -- int NUM_ENTRIES = 32; -+ int NUM_ENTRIES_CHROMIUM = 32; +- int NUM_ENTRIES = 31; ++ int NUM_ENTRIES_CHROMIUM = 31; } private final BrowserContextHandle mBrowserContextHandle; -@@ -157,6 +157,9 @@ public class SiteSettingsCategory { +@@ -154,6 +154,9 @@ public class SiteSettingsCategory { } else { permission = ""; } @@ -1477,7 +1484,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c return new SiteSettingsCategory(browserContextHandle, type, permission); } -@@ -165,7 +168,7 @@ public class SiteSettingsCategory { +@@ -162,7 +165,7 @@ public class SiteSettingsCategory { @ContentSettingsType int contentSettingsType) { assert contentSettingsType != -1; assert Type.ALL_SITES == 0; @@ -1486,7 +1493,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (contentSettingsType(i) == contentSettingsType) { return createFromType(browserContextHandle, i); } -@@ -176,7 +179,7 @@ public class SiteSettingsCategory { +@@ -173,7 +176,7 @@ public class SiteSettingsCategory { public static SiteSettingsCategory createFromPreferenceKey( BrowserContextHandle browserContextHandle, String preferenceKey) { assert Type.ALL_SITES == 0; @@ -1495,7 +1502,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (preferenceKey(i).equals(preferenceKey)) { return createFromType(browserContextHandle, i); } -@@ -250,8 +253,7 @@ public class SiteSettingsCategory { +@@ -244,8 +247,7 @@ public class SiteSettingsCategory { case Type.TRACKING_PROTECTION: return ContentSettingsType.DEFAULT; // Conversion unavailable. } @@ -1505,7 +1512,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } /** -@@ -340,8 +342,12 @@ public class SiteSettingsCategory { +@@ -330,8 +332,12 @@ public class SiteSettingsCategory { case Type.ZOOM: return "zoom"; default: @@ -1521,7 +1528,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsDelegate.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsDelegate.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsDelegate.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsDelegate.java -@@ -176,6 +176,8 @@ public interface SiteSettingsDelegate { +@@ -152,6 +152,8 @@ public interface SiteSettingsDelegate { */ String getFirstPartySetOwner(String memberOrigin); @@ -1539,9 +1546,9 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c import org.chromium.components.content_settings.ContentSettingValues; +import org.chromium.components.content_settings.ContentSettingsType; - /** - * A 3-state Allowed/Ask/Blocked radio group Preference used for SiteSettings. -@@ -25,6 +26,7 @@ public class TriStateSiteSettingsPreference + /** A 3-state Allowed/Ask/Blocked radio group Preference used for SiteSettings. */ + public class TriStateSiteSettingsPreference extends Preference +@@ -23,6 +24,7 @@ public class TriStateSiteSettingsPreference extends Preference private RadioButtonWithDescription mAsk; private RadioButtonWithDescription mBlocked; private RadioGroup mRadioGroup; @@ -1549,7 +1556,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c public TriStateSiteSettingsPreference(Context context, AttributeSet attrs) { super(context, attrs); -@@ -44,7 +46,9 @@ public class TriStateSiteSettingsPreference +@@ -42,7 +44,9 @@ public class TriStateSiteSettingsPreference extends Preference * @param descriptionIds An array of 3 resource IDs for descriptions for * Allowed, Ask and Blocked states, in that order. */ @@ -1560,7 +1567,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c mSetting = setting; mDescriptionIds = descriptionIds; } -@@ -79,6 +83,13 @@ public class TriStateSiteSettingsPreference +@@ -75,6 +79,13 @@ public class TriStateSiteSettingsPreference extends Preference mRadioGroup = (RadioGroup) holder.findViewById(R.id.radio_button_layout); mRadioGroup.setOnCheckedChangeListener(this); @@ -1577,11 +1584,11 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java -@@ -282,6 +282,12 @@ public final class Website implements WebsiteEntry { - exception = exceptions.get(0); +@@ -325,7 +325,11 @@ public final class Website implements WebsiteEntry { + RecordUserAction.record("SoundContentSetting.UnmuteBy.SiteSettings"); } } -+ +- + if (exception == null) { + exception = BromiteCustomContentSettingImpl.createCustomException(type, value, getAddress()); + if (exception != null) @@ -1593,16 +1600,16 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePermissionsFetcher.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePermissionsFetcher.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePermissionsFetcher.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePermissionsFetcher.java -@@ -106,7 +106,7 @@ public class WebsitePermissionsFetcher { - case ContentSettingsType.USB_GUARD: - return WebsitePermissionsType.CHOSEN_OBJECT_INFO; +@@ -114,7 +114,7 @@ public class WebsitePermissionsFetcher { + } + return null; default: - return null; + return BromiteCustomContentSettingImpl.getPermissionsType(contentSettingsType); } } -@@ -220,7 +220,7 @@ public class WebsitePermissionsFetcher { +@@ -228,7 +228,7 @@ public class WebsitePermissionsFetcher { if (SiteSettingsFeatureMap.isEnabled(SiteSettingsFeatureList.SITE_DATA_IMPROVEMENTS)) { queue.add(new CookiesInfoFetcher()); } @@ -1614,7 +1621,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java -@@ -266,7 +266,7 @@ public class WebsitePreferenceBridge { +@@ -283,7 +283,7 @@ public class WebsitePreferenceBridge { case ContentSettingsType.PROTECTED_MEDIA_IDENTIFIER: return true; default: @@ -1623,9 +1630,9 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } } -@@ -281,7 +281,6 @@ public class WebsitePreferenceBridge { - - public static boolean isCategoryEnabled(BrowserContextHandle browserContextHandle, +@@ -299,7 +299,6 @@ public class WebsitePreferenceBridge { + public static boolean isCategoryEnabled( + BrowserContextHandle browserContextHandle, @ContentSettingsType int contentSettingsType) { - assert !requiresTriStateContentSetting(contentSettingsType); return isContentSettingEnabled(browserContextHandle, contentSettingsType); @@ -1710,7 +1717,7 @@ diff --git a/components/content_settings/android/BUILD.gn b/components/content_s diff --git a/components/content_settings/core/browser/BUILD.gn b/components/content_settings/core/browser/BUILD.gn --- a/components/content_settings/core/browser/BUILD.gn +++ b/components/content_settings/core/browser/BUILD.gn -@@ -87,6 +87,13 @@ static_library("browser") { +@@ -89,6 +89,13 @@ static_library("browser") { } configs += [ "//build/config/compiler:wexit_time_destructors" ] @@ -1741,7 +1748,7 @@ diff --git a/components/content_settings/core/browser/content_settings_registry. namespace content_settings { -@@ -640,6 +641,7 @@ void ContentSettingsRegistry::Init() { +@@ -654,6 +655,7 @@ void ContentSettingsRegistry::Init() { WebsiteSettingsRegistry::DESKTOP, ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE, ContentSettingsInfo::EXCEPTIONS_ON_SECURE_ORIGINS_ONLY); @@ -1752,7 +1759,7 @@ diff --git a/components/content_settings/core/browser/content_settings_registry. diff --git a/components/content_settings/core/browser/content_settings_uma_util.cc b/components/content_settings/core/browser/content_settings_uma_util.cc --- a/components/content_settings/core/browser/content_settings_uma_util.cc +++ b/components/content_settings/core/browser/content_settings_uma_util.cc -@@ -179,8 +179,9 @@ void RecordContentSettingsHistogram(const std::string& name, +@@ -180,8 +180,9 @@ void RecordContentSettingsHistogram(const std::string& name, } int ContentSettingTypeToHistogramValue(ContentSettingsType content_setting) { @@ -1874,7 +1881,7 @@ diff --git a/components/content_settings/core/browser/website_settings_registry. diff --git a/components/content_settings/core/common/BUILD.gn b/components/content_settings/core/common/BUILD.gn --- a/components/content_settings/core/common/BUILD.gn +++ b/components/content_settings/core/common/BUILD.gn -@@ -50,6 +50,13 @@ static_library("common") { +@@ -52,6 +52,13 @@ static_library("common") { "//net", "//url", ] @@ -2067,9 +2074,9 @@ diff --git a/components/content_settings/core/common/content_settings_param_trai diff --git a/components/content_settings/core/common/content_settings_types.h b/components/content_settings/core/common/content_settings_types.h --- a/components/content_settings/core/common/content_settings_types.h +++ b/components/content_settings/core/common/content_settings_types.h -@@ -369,7 +369,9 @@ enum class ContentSettingsType : int32_t { - // heuristics. - TPCD_HEURISTICS_GRANTS, +@@ -371,7 +371,9 @@ enum class ContentSettingsType : int32_t { + // shown to the user, for a given origin. + FILE_SYSTEM_ACCESS_RESTORE_PERMISSION, - NUM_TYPES, + NUM_TYPES_CHROMIUM, @@ -2081,7 +2088,7 @@ diff --git a/components/content_settings/core/common/content_settings_types.h b/ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc b/components/content_settings/renderer/content_settings_agent_impl.cc --- a/components/content_settings/renderer/content_settings_agent_impl.cc +++ b/components/content_settings/renderer/content_settings_agent_impl.cc -@@ -201,6 +201,39 @@ void ContentSettingsAgentImpl::SendRendererContentSettingRules( +@@ -202,6 +202,39 @@ void ContentSettingsAgentImpl::SendRendererContentSettingRules( std::move(renderer_settings)); } @@ -2139,8 +2146,8 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.h diff --git a/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoPermissionsController.java b/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoPermissionsController.java --- a/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoPermissionsController.java +++ b/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoPermissionsController.java -@@ -169,6 +169,15 @@ public class PageInfoPermissionsController - : perm1.nameMidSentence.toString()); +@@ -177,6 +177,15 @@ public class PageInfoPermissionsController extends PageInfoPreferenceSubpageCont + : perm1.nameMidSentence.toString()); } + String value = ""; @@ -2154,7 +2161,7 @@ diff --git a/components/page_info/android/java/src/org/chromium/components/page_ + // More than 2 permissions. if (same) { - int resId = perm1.allowed ? R.plurals.page_info_permissions_summary_more_allowed + int resId = diff --git a/components/page_info/android/java/src/org/chromium/components/page_info/PermissionParamsListBuilder.java b/components/page_info/android/java/src/org/chromium/components/page_info/PermissionParamsListBuilder.java --- a/components/page_info/android/java/src/org/chromium/components/page_info/PermissionParamsListBuilder.java +++ b/components/page_info/android/java/src/org/chromium/components/page_info/PermissionParamsListBuilder.java @@ -2219,7 +2226,7 @@ diff --git a/components/page_info/page_info.cc b/components/page_info/page_info. #include "components/content_settings/browser/ui/cookie_controls_controller.h" #include "components/content_settings/core/browser/content_settings_registry.h" #include "components/content_settings/core/browser/content_settings_uma_util.h" -@@ -1250,6 +1251,14 @@ void PageInfo::PopulatePermissionInfo(PermissionInfo& permission_info, +@@ -1249,6 +1250,14 @@ void PageInfo::PopulatePermissionInfo(PermissionInfo& permission_info, // applies to permissions listed in |kPermissionType|. bool PageInfo::ShouldShowPermission( const PageInfo::PermissionInfo& info) const { @@ -2234,7 +2241,7 @@ diff --git a/components/page_info/page_info.cc b/components/page_info/page_info. // Note |ContentSettingsType::ADS| will show up regardless of its default // value when it has been activated on the current origin. if (info.type == ContentSettingsType::ADS) { -@@ -1377,7 +1386,19 @@ void PageInfo::PresentSitePermissions() { +@@ -1375,7 +1384,19 @@ void PageInfo::PresentSitePermissions() { HostContentSettingsMap* content_settings = GetContentSettings(); DCHECK(web_contents_); @@ -2266,7 +2273,7 @@ diff --git a/components/page_info/page_info_ui.cc b/components/page_info/page_in #include "components/page_info/core/features.h" #include "components/page_info/page_info.h" #include "components/page_info/page_info_ui_delegate.h" -@@ -619,6 +620,12 @@ PageInfoUI::~PageInfoUI() = default; +@@ -622,6 +623,12 @@ PageInfoUI::~PageInfoUI() = default; // static std::u16string PageInfoUI::PermissionTypeToUIString(ContentSettingsType type) { @@ -2279,7 +2286,7 @@ diff --git a/components/page_info/page_info_ui.cc b/components/page_info/page_in for (const PermissionUIInfo& info : GetContentSettingsUIInfo()) { if (info.type == type) return l10n_util::GetStringUTF16(info.string_id); -@@ -630,6 +637,12 @@ std::u16string PageInfoUI::PermissionTypeToUIString(ContentSettingsType type) { +@@ -633,6 +640,12 @@ std::u16string PageInfoUI::PermissionTypeToUIString(ContentSettingsType type) { // static std::u16string PageInfoUI::PermissionTypeToUIStringMidSentence( ContentSettingsType type) { @@ -2292,7 +2299,7 @@ diff --git a/components/page_info/page_info_ui.cc b/components/page_info/page_in for (const PermissionUIInfo& info : GetContentSettingsUIInfo()) { if (info.type == type) return l10n_util::GetStringUTF16(info.string_id_mid_sentence); -@@ -1064,6 +1077,11 @@ bool PageInfoUI::ContentSettingsTypeInPageInfo(ContentSettingsType type) { +@@ -1067,6 +1080,11 @@ bool PageInfoUI::ContentSettingsTypeInPageInfo(ContentSettingsType type) { if (info.type == type) return true; } @@ -2323,9 +2330,9 @@ diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/t #include "base/time/time.h" +#include "components/content_settings/core/common/content_settings_types.h" #include "third_party/blink/public/common/client_hints/enabled_client_hints.h" + #include "third_party/blink/public/mojom/navigation/renderer_content_settings.mojom.h" - namespace blink { -@@ -68,6 +69,10 @@ class WebContentSettingsClient { +@@ -51,6 +52,10 @@ class WebContentSettingsClient { return enabled_per_settings; } @@ -2333,8 +2340,8 @@ diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/t + return enabled_per_settings; + } + - // Controls whether auto dark web content is allowed for this frame. - virtual bool AllowAutoDarkWebContent(bool enabled_per_settings) { + // Controls whether scripts are allowed to execute for this frame. + virtual bool AllowScript(bool enabled_per_settings) { return enabled_per_settings; diff --git a/third_party/blink/renderer/core/execution_context/execution_context.cc b/third_party/blink/renderer/core/execution_context/execution_context.cc --- a/third_party/blink/renderer/core/execution_context/execution_context.cc @@ -2385,4 +2392,3 @@ diff --git a/third_party/blink/renderer/core/execution_context/execution_context enum ReasonForCallingCanExecuteScripts { kAboutToExecuteScript, -- -2.25.1 diff --git a/build/patches/00Cromite-Branding.patch b/build/patches/Cromite-Branding.patch similarity index 99% rename from build/patches/00Cromite-Branding.patch rename to build/patches/Cromite-Branding.patch index 73cee2f04..612ffe7ad 100644 --- a/build/patches/00Cromite-Branding.patch +++ b/build/patches/Cromite-Branding.patch @@ -13146,7 +13146,7 @@ e)fqMZZ`3a)Ds&5H @@ -13241,7 +13241,7 @@ diff --git a/chrome/common/url_constants.h b/chrome/common/url_constants.h diff --git a/components/browser_ui/strings/android/browser_ui_strings.grd b/components/browser_ui/strings/android/browser_ui_strings.grd --- a/components/browser_ui/strings/android/browser_ui_strings.grd +++ b/components/browser_ui/strings/android/browser_ui_strings.grd -@@ -1009,7 +1009,7 @@ +@@ -1003,7 +1003,7 @@ @@ -18199,4 +18199,3 @@ diff --git a/tools/grit/grit/grd_reader.py b/tools/grit/grit/grd_reader.py class GrdPartContentHandler(xml.sax.handler.ContentHandler): def __init__(self, parent): -- -2.25.1 diff --git a/build/patches/00Customize-selection-popup.patch b/build/patches/Customize-selection-popup.patch similarity index 73% rename from build/patches/00Customize-selection-popup.patch rename to build/patches/Customize-selection-popup.patch index 2d34a44f3..57962342d 100644 --- a/build/patches/00Customize-selection-popup.patch +++ b/build/patches/Customize-selection-popup.patch @@ -7,41 +7,41 @@ Opens tabs in foreground, Move web search to the top of items, Web search in tab group and Enable smart text selection License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - .../chrome/browser/ChromeTabbedActivity.java | 15 ++- + .../chrome/browser/ChromeTabbedActivity.java | 15 +- .../compositor/layouts/LayoutManagerImpl.java | 8 ++ .../chrome/browser/ui/RootUiCoordinator.java | 8 +- .../Customize-selection-popup.grdp | 34 +++++ .../res/xml/accessibility_preferences.xml | 24 ++++ - .../selection/SelectActionMenuHelper.java | 121 +++++++++++++----- + .../selection/SelectActionMenuHelper.java | 131 ++++++++++++------ .../selection/SmartSelectionClient.java | 4 + - 7 files changed, 177 insertions(+), 37 deletions(-) + 7 files changed, 177 insertions(+), 47 deletions(-) create mode 100644 chrome/browser/ui/android/strings/cromite_android_chrome_strings_grd/Customize-selection-popup.grdp diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java -@@ -658,10 +658,17 @@ public class ChromeTabbedActivity extends ChromeActivity menuItemBuilders = new ArrayList<>(); + menuItemBuilders.add(cut(delegate.canCut())); + menuItemBuilders.add(copy(delegate.canCopy())); +@@ -301,7 +348,7 @@ public class SelectActionMenuHelper { // these menu items. - SelectionMenuGroup secondaryAssistItems = new SelectionMenuGroup( -- android.R.id.textAssist, GroupItemOrder.SECONDARY_ASSIST_ITEMS); -+ android.R.id.textAssist, GroupItemOrderChromium.SECONDARY_ASSIST_ITEMS()); + SelectionMenuGroup secondaryAssistItems = + new SelectionMenuGroup( +- android.R.id.textAssist, GroupItemOrder.SECONDARY_ASSIST_ITEMS); ++ android.R.id.textAssist, GroupItemOrderChromium.SECONDARY_ASSIST_ITEMS()); // First action is reserved for primary action so start at index 1. final int startIndex = 1; -@@ -276,7 +333,7 @@ public class SelectActionMenuHelper { - } +@@ -334,7 +381,7 @@ public class SelectActionMenuHelper { SelectionMenuGroup textProcessingItems = - new SelectionMenuGroup(R.id.select_action_menu_text_processing_items, + new SelectionMenuGroup( + R.id.select_action_menu_text_processing_items, - GroupItemOrder.TEXT_PROCESSING_ITEMS); + GroupItemOrderChromium.TEXT_PROCESSING_ITEMS()); - final PackageManager packageManager = context.getPackageManager(); - for (int i = 0; i < supportedActivities.size(); i++) { - ResolveInfo resolveInfo = supportedActivities.get(i); -@@ -346,7 +403,7 @@ public class SelectActionMenuHelper { + if (isSelectionPassword || intentHandler == null) { + addAdditionalTextProcessingItems(textProcessingItems, selectionActionMenuDelegate); + return textProcessingItems; +@@ -430,7 +477,7 @@ public class SelectActionMenuHelper { .setId(R.id.select_action_menu_cut) .setIconAttr(android.R.attr.actionModeCutDrawable) .setAlphabeticShortcut(ItemKeyShortcuts.CUT) @@ -337,7 +347,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/select .setShowAsActionFlags( MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT) .setIsEnabled(isEnabled) -@@ -359,7 +416,7 @@ public class SelectActionMenuHelper { +@@ -442,7 +489,7 @@ public class SelectActionMenuHelper { .setId(R.id.select_action_menu_copy) .setIconAttr(android.R.attr.actionModeCopyDrawable) .setAlphabeticShortcut(ItemKeyShortcuts.COPY) @@ -346,7 +356,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/select .setShowAsActionFlags( MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT) .setIsEnabled(isEnabled) -@@ -372,7 +429,7 @@ public class SelectActionMenuHelper { +@@ -454,7 +501,7 @@ public class SelectActionMenuHelper { .setId(R.id.select_action_menu_paste) .setIconAttr(android.R.attr.actionModePasteDrawable) .setAlphabeticShortcut(ItemKeyShortcuts.PASTE) @@ -355,7 +365,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/select .setShowAsActionFlags( MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT) .setIsEnabled(isEnabled) -@@ -384,7 +441,7 @@ public class SelectActionMenuHelper { +@@ -465,7 +512,7 @@ public class SelectActionMenuHelper { return new SelectionMenuItem.Builder(R.string.actionbar_share) .setId(R.id.select_action_menu_share) .setIconAttr(android.R.attr.actionModeShareDrawable) @@ -364,7 +374,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/select .setShowAsActionFlags( MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT) .setIsEnabled(isEnabled) -@@ -397,7 +454,7 @@ public class SelectActionMenuHelper { +@@ -477,7 +524,7 @@ public class SelectActionMenuHelper { .setId(R.id.select_action_menu_select_all) .setIconAttr(android.R.attr.actionModeSelectAllDrawable) .setAlphabeticShortcut(ItemKeyShortcuts.SELECT_ALL) @@ -373,16 +383,16 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/select .setShowAsActionFlags( MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT) .setIsEnabled(isEnabled) -@@ -409,7 +466,7 @@ public class SelectActionMenuHelper { - private static SelectionMenuItem pasteAsPlainText(boolean isEnabled) { - return new SelectionMenuItem.Builder(android.R.string.paste_as_plain_text) - .setId(R.id.select_action_menu_paste_as_plain_text) -- .setOrderInCategory(DefaultItemOrder.PASTE_AS_PLAIN_TEXT) -+ .setOrderInCategory(DefaultItemOrderChromium.PASTE_AS_PLAIN_TEXT()) - .setShowAsActionFlags( - MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT) - .setIsEnabled(isEnabled) -@@ -420,7 +477,7 @@ public class SelectActionMenuHelper { +@@ -490,7 +537,7 @@ public class SelectActionMenuHelper { + SelectionMenuItem.Builder builder = + new SelectionMenuItem.Builder(android.R.string.paste_as_plain_text) + .setId(R.id.select_action_menu_paste_as_plain_text) +- .setOrderInCategory(DefaultItemOrder.PASTE_AS_PLAIN_TEXT) ++ .setOrderInCategory(DefaultItemOrderChromium.PASTE_AS_PLAIN_TEXT()) + .setShowAsActionFlags( + MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT) + .setIsEnabled(isEnabled); +@@ -506,7 +553,7 @@ public class SelectActionMenuHelper { return new SelectionMenuItem.Builder(R.string.actionbar_web_search) .setId(R.id.select_action_menu_web_search) .setIconAttr(android.R.attr.actionModeWebSearchDrawable) @@ -413,4 +423,3 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/select } -- -2.25.1 diff --git a/build/patches/00Deprecate-Data-URL-in-SVGUseElement.patch b/build/patches/Deprecate-Data-URL-in-SVGUseElement.patch similarity index 96% rename from build/patches/00Deprecate-Data-URL-in-SVGUseElement.patch rename to build/patches/Deprecate-Data-URL-in-SVGUseElement.patch index 9edf5a40a..3032b8a3c 100644 --- a/build/patches/00Deprecate-Data-URL-in-SVGUseElement.patch +++ b/build/patches/Deprecate-Data-URL-in-SVGUseElement.patch @@ -10,7 +10,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -3232,8 +3232,8 @@ +@@ -3129,8 +3129,8 @@ status: "stable", }, { @@ -22,4 +22,3 @@ diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 { name: "RemoveMobileViewportDoubleTap", -- -2.25.1 diff --git a/build/patches/Dictionary-suggestions-for-the-Omnibox.patch b/build/patches/Dictionary-suggestions-for-the-Omnibox.patch index 561705d01..7a60a7690 100644 --- a/build/patches/Dictionary-suggestions-for-the-Omnibox.patch +++ b/build/patches/Dictionary-suggestions-for-the-Omnibox.patch @@ -27,7 +27,7 @@ diff --git a/chrome/android/java/res/layout/url_bar.xml b/chrome/android/java/re diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediator.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediator.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediator.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediator.java -@@ -290,8 +290,17 @@ class LocationBarMediator +@@ -288,8 +288,17 @@ class LocationBarMediator if (mNativeInitialized) RecordUserAction.record("FocusLocation"); // Don't clear Omnibox if the user just pasted text to NTP Omnibox. if (mShouldClearOmniboxOnFocus) { @@ -58,7 +58,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow import android.os.SystemClock; import android.text.Editable; import android.text.InputType; -@@ -104,6 +105,7 @@ public abstract class UrlBar extends AutocompleteEditText { +@@ -100,6 +101,7 @@ public abstract class UrlBar extends AutocompleteEditText { private boolean mFocused; private boolean mAllowFocus = true; @@ -66,7 +66,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow private boolean mPendingScroll; // Captures the current intended text scroll type. -@@ -304,6 +306,27 @@ public abstract class UrlBar extends AutocompleteEditText { +@@ -299,6 +301,27 @@ public abstract class UrlBar extends AutocompleteEditText { mPendingScroll = false; } fixupTextDirection(); @@ -95,4 +95,3 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow @Override -- -2.25.1 diff --git a/build/patches/Disable-Accessibility-service-by-default.patch b/build/patches/Disable-Accessibility-service-by-default.patch index e178cea30..1d1c10d7a 100644 --- a/build/patches/Disable-Accessibility-service-by-default.patch +++ b/build/patches/Disable-Accessibility-service-by-default.patch @@ -42,7 +42,7 @@ diff --git a/components/browser_ui/accessibility/android/java/res/xml/accessibil diff --git a/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java b/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java --- a/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java +++ b/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java -@@ -1024,6 +1024,11 @@ public class WebContentsAccessibilityImpl extends AccessibilityNodeProviderCompa +@@ -1044,6 +1044,11 @@ public class WebContentsAccessibilityImpl extends AccessibilityNodeProviderCompa structure.setChildCount(0); return; } @@ -55,4 +55,3 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/access final ViewStructure viewRoot = structure.asyncNewChild(0); viewRoot.setClassName(""); -- -2.25.1 diff --git a/build/patches/00Disable-Android-AppRestrictions.patch b/build/patches/Disable-Android-AppRestrictions.patch similarity index 99% rename from build/patches/00Disable-Android-AppRestrictions.patch rename to build/patches/Disable-Android-AppRestrictions.patch index 7a69914d7..9b88f3347 100644 --- a/build/patches/00Disable-Android-AppRestrictions.patch +++ b/build/patches/Disable-Android-AppRestrictions.patch @@ -19,7 +19,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/browser/flags/BUILD.gn b/chrome/browser/flags/BUILD.gn --- a/chrome/browser/flags/BUILD.gn +++ b/chrome/browser/flags/BUILD.gn -@@ -35,6 +35,7 @@ android_library("java") { +@@ -34,6 +34,7 @@ android_library("java") { "//build:chromeos_buildflags", "//build/android:build_java", "//chrome/browser/preferences:java", @@ -128,4 +128,3 @@ new file mode 100644 @@ -0,0 +1 @@ +BASE_DECLARE_FEATURE(kEnableAndroidAppRestriction); -- -2.25.1 diff --git a/build/patches/Disable-AsyncDNS-by-default.patch b/build/patches/Disable-AsyncDNS-by-default.patch index 8a4455e7b..1fa632332 100644 --- a/build/patches/Disable-AsyncDNS-by-default.patch +++ b/build/patches/Disable-AsyncDNS-by-default.patch @@ -18,4 +18,3 @@ new file mode 100644 @@ -0,0 +1 @@ +SET_CROMITE_FEATURE_DISABLED(kAsyncDns); -- -2.25.1 diff --git a/build/patches/00Disable-BackForwardCache.patch b/build/patches/Disable-BackForwardCache.patch similarity index 99% rename from build/patches/00Disable-BackForwardCache.patch rename to build/patches/Disable-BackForwardCache.patch index a7084b96e..86412413f 100644 --- a/build/patches/00Disable-BackForwardCache.patch +++ b/build/patches/Disable-BackForwardCache.patch @@ -15,4 +15,3 @@ new file mode 100644 @@ -0,0 +1 @@ +SET_CROMITE_FEATURE_DISABLED(kBackForwardCache); -- -2.25.1 diff --git a/build/patches/00Disable-Component-Updates.patch b/build/patches/Disable-Component-Updates.patch similarity index 93% rename from build/patches/00Disable-Component-Updates.patch rename to build/patches/Disable-Component-Updates.patch index e53c43e37..417c7d91d 100644 --- a/build/patches/00Disable-Component-Updates.patch +++ b/build/patches/Disable-Component-Updates.patch @@ -12,7 +12,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/browser/component_updater/registration.cc b/chrome/browser/component_updater/registration.cc --- a/chrome/browser/component_updater/registration.cc +++ b/chrome/browser/component_updater/registration.cc -@@ -100,6 +100,7 @@ +@@ -102,6 +102,7 @@ namespace component_updater { void RegisterComponentsForUpdate() { @@ -23,7 +23,7 @@ diff --git a/chrome/browser/component_updater/registration.cc b/chrome/browser/c diff --git a/components/component_updater/component_installer.cc b/components/component_updater/component_installer.cc --- a/components/component_updater/component_installer.cc +++ b/components/component_updater/component_installer.cc -@@ -88,6 +88,7 @@ void ComponentInstaller::Register(RegisterCallback register_callback, +@@ -92,6 +92,7 @@ void ComponentInstaller::Register(RegisterCallback register_callback, base::OnceClosure callback, base::TaskPriority task_priority, const base::Version& registered_version) { @@ -34,7 +34,7 @@ diff --git a/components/component_updater/component_installer.cc b/components/co diff --git a/components/component_updater/component_updater_service.cc b/components/component_updater/component_updater_service.cc --- a/components/component_updater/component_updater_service.cc +++ b/components/component_updater/component_updater_service.cc -@@ -522,7 +522,7 @@ std::unique_ptr ComponentUpdateServiceFactory( +@@ -535,7 +535,7 @@ std::unique_ptr ComponentUpdateServiceFactory( // Register prefs required by the component update service. void RegisterComponentUpdateServicePrefs(PrefRegistrySimple* registry) { // The component updates are enabled by default, if the preference is not set. @@ -44,4 +44,3 @@ diff --git a/components/component_updater/component_updater_service.cc b/compone } // namespace component_updater -- -2.25.1 diff --git a/build/patches/00Disable-Compression-Dictionary-Transport.patch b/build/patches/Disable-Compression-Dictionary-Transport.patch similarity index 97% rename from build/patches/00Disable-Compression-Dictionary-Transport.patch rename to build/patches/Disable-Compression-Dictionary-Transport.patch index 232b354cc..f3b6767fe 100644 --- a/build/patches/00Disable-Compression-Dictionary-Transport.patch +++ b/build/patches/Disable-Compression-Dictionary-Transport.patch @@ -10,7 +10,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -698,16 +698,18 @@ +@@ -721,16 +721,18 @@ status: "stable", }, { @@ -32,4 +32,3 @@ diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 { name: "ComputedAccessibilityInfo", -- -2.25.1 diff --git a/build/patches/Disable-DRM-media-origin-IDs-preprovisioning.patch b/build/patches/Disable-DRM-media-origin-IDs-preprovisioning.patch index 0725132e6..c08b4a6e7 100644 --- a/build/patches/Disable-DRM-media-origin-IDs-preprovisioning.patch +++ b/build/patches/Disable-DRM-media-origin-IDs-preprovisioning.patch @@ -19,4 +19,3 @@ new file mode 100644 + +#endif -- -2.25.1 diff --git a/build/patches/Disable-FLoC-and-privacy-sandbox.patch b/build/patches/Disable-FLoC-and-privacy-sandbox.patch index 09635ad4b..7bff8650e 100644 --- a/build/patches/Disable-FLoC-and-privacy-sandbox.patch +++ b/build/patches/Disable-FLoC-and-privacy-sandbox.patch @@ -14,15 +14,15 @@ 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 | 5 ++++ + .../privacy_sandbox_features.cc | 6 ++++- .../privacy_sandbox/privacy_sandbox_prefs.cc | 4 ++-- .../privacy_sandbox_settings_impl.cc | 24 +++++++++++++------ - 8 files changed, 30 insertions(+), 23 deletions(-) + 8 files changed, 30 insertions(+), 24 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 -@@ -3432,6 +3432,9 @@ bool ChromeContentBrowserClient::IsAttributionReportingOperationAllowed( +@@ -3381,6 +3381,9 @@ bool ChromeContentBrowserClient::IsAttributionReportingOperationAllowed( const url::Origin* destination_origin, const url::Origin* reporting_origin, bool* can_bypass) { @@ -46,14 +46,13 @@ diff --git a/chrome/browser/privacy_sandbox/privacy_sandbox_settings_delegate.cc diff --git a/chrome/browser/ui/privacy_sandbox/privacy_sandbox_prompt.cc b/chrome/browser/ui/privacy_sandbox/privacy_sandbox_prompt.cc --- a/chrome/browser/ui/privacy_sandbox/privacy_sandbox_prompt.cc +++ b/chrome/browser/ui/privacy_sandbox/privacy_sandbox_prompt.cc -@@ -8,6 +8,7 @@ +@@ -8,5 +8,6 @@ void ShowPrivacySandboxPrompt(Browser* browser, PrivacySandboxService::PromptType prompt_type) { -+ if ((true)) return; - if (prompt_type == PrivacySandboxService::PromptType::kNotice) { - ShowPrivacySandboxNoticeBubble(browser); - } else { ++ if ((true)) return; + ShowPrivacySandboxDialog(browser, prompt_type); + } diff --git a/components/history/core/browser/history_backend.cc b/components/history/core/browser/history_backend.cc --- a/components/history/core/browser/history_backend.cc +++ b/components/history/core/browser/history_backend.cc @@ -80,24 +79,31 @@ diff --git a/components/history/core/browser/history_backend.cc b/components/his diff --git a/components/privacy_sandbox/privacy_sandbox_attestations/privacy_sandbox_attestations.cc b/components/privacy_sandbox/privacy_sandbox_attestations/privacy_sandbox_attestations.cc --- a/components/privacy_sandbox/privacy_sandbox_attestations/privacy_sandbox_attestations.cc +++ b/components/privacy_sandbox/privacy_sandbox_attestations/privacy_sandbox_attestations.cc -@@ -389,8 +389,6 @@ void PrivacySandboxAttestations::OnAttestationsParsed( +@@ -405,8 +405,6 @@ void PrivacySandboxAttestations::OnAttestationsParsed( if (attestations_map.has_value() && (!file_version_.IsValid() || file_version_.CompareTo(version) < 0)) { // Parsing succeeded and the attestations file has newer version. - file_version_ = std::move(version); -- attestations_map_ = std::move(attestations_map); +- attestations_map_ = std::move(attestations_map.value()); } attestations_parse_progress_ = Progress::kFinished; diff --git a/components/privacy_sandbox/privacy_sandbox_features.cc b/components/privacy_sandbox/privacy_sandbox_features.cc --- a/components/privacy_sandbox/privacy_sandbox_features.cc +++ b/components/privacy_sandbox/privacy_sandbox_features.cc -@@ -144,4 +144,9 @@ BASE_FEATURE(kAttributionDebugReportingCookieDeprecationTesting, - "AttributionDebugReportingCookieDeprecationTesting", +@@ -145,11 +145,15 @@ BASE_FEATURE(kAttributionDebugReportingCookieDeprecationTesting, + BASE_FEATURE(kPrivateAggregationDebugReportingCookieDeprecationTesting, + "PrivateAggregationDebugReportingCookieDeprecationTesting", + base::FEATURE_DISABLED_BY_DEFAULT); +- ++ + #if BUILDFLAG(IS_ANDROID) + BASE_FEATURE(kTrackingProtectionNoticeRequestTracking, + "TrackingProtectionNoticeRequestTracking", base::FEATURE_DISABLED_BY_DEFAULT); + #endif // BUILDFLAG(IS_ANDROID) +SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxSettings4); -+SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxSettings3); +SET_CROMITE_FEATURE_ENABLED(kDisablePrivacySandboxPrompts); +SET_CROMITE_FEATURE_DISABLED(kEnforcePrivacySandboxAttestations); +SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxFirstPartySetsUI); @@ -142,11 +148,11 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo -bool PrivacySandboxSettingsImpl::IsTopicsAllowed() const { +bool PrivacySandboxSettingsImpl::IsTopicsAllowed() const { // disabled in Bromite + if ((true)) return false; - // M1 specific - if (base::FeatureList::IsEnabled(privacy_sandbox::kPrivacySandboxSettings4)) { - Status status = GetM1TopicAllowedStatus(); -@@ -287,7 +288,8 @@ bool PrivacySandboxSettingsImpl::IsTopicsAllowedForContext( - IsPrivacySandboxEnabledForContext(top_frame_origin, url); + Status status = GetM1TopicAllowedStatus(); + JoinHistogram(kIsTopicsAllowedHistogram, status); + return IsAllowed(status); +@@ -262,7 +263,8 @@ bool PrivacySandboxSettingsImpl::IsTopicsAllowedForContext( + return IsAllowed(status); } -bool PrivacySandboxSettingsImpl::IsTopicAllowed(const CanonicalTopic& topic) { @@ -155,7 +161,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo const auto& blocked_topics = pref_service_->GetList(prefs::kPrivacySandboxBlockedTopics); -@@ -513,6 +515,7 @@ bool PrivacySandboxSettingsImpl:: +@@ -464,6 +466,7 @@ bool PrivacySandboxSettingsImpl:: void PrivacySandboxSettingsImpl::SetFledgeJoiningAllowed( const std::string& top_frame_etld_plus1, bool allowed) { @@ -163,7 +169,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo ScopedDictPrefUpdate scoped_pref_update( pref_service_, prefs::kPrivacySandboxFledgeJoinBlocked); -@@ -583,7 +586,8 @@ void PrivacySandboxSettingsImpl::ClearFledgeJoiningAllowedSettings( +@@ -534,7 +537,8 @@ void PrivacySandboxSettingsImpl::ClearFledgeJoiningAllowedSettings( } bool PrivacySandboxSettingsImpl::IsFledgeJoiningAllowed( @@ -173,8 +179,8 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo ScopedDictPrefUpdate scoped_pref_update( pref_service_, prefs::kPrivacySandboxFledgeJoinBlocked); auto& pref_data = scoped_pref_update.Get(); -@@ -752,7 +756,8 @@ bool PrivacySandboxSettingsImpl::IsPrivateAggregationDebugModeAllowed( - net::CookieSettingOverrides()); +@@ -693,7 +697,8 @@ bool PrivacySandboxSettingsImpl::IsPrivateAggregationDebugModeAllowed( + delegate_->AreThirdPartyCookiesBlockedByCookieDeprecationExperiment(); } -bool PrivacySandboxSettingsImpl::IsPrivacySandboxEnabled() const { @@ -183,8 +189,8 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo PrivacySandboxSettingsImpl::Status status = GetPrivacySandboxAllowedStatus(); if (!IsAllowed(status)) { return false; -@@ -790,7 +795,8 @@ void PrivacySandboxSettingsImpl::SetTopicsBlockedForTesting() { - pref_service_->SetBoolean(prefs::kPrivacySandboxApisEnabledV2, false); +@@ -720,7 +725,8 @@ void PrivacySandboxSettingsImpl::SetTopicsBlockedForTesting() { + pref_service_->SetBoolean(prefs::kPrivacySandboxM1TopicsEnabled, false); } -void PrivacySandboxSettingsImpl::SetPrivacySandboxEnabled(bool enabled) { @@ -193,8 +199,8 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo pref_service_->SetBoolean(prefs::kPrivacySandboxApisEnabledV2, enabled); } -@@ -851,7 +857,10 @@ bool PrivacySandboxSettingsImpl::IsPrivacySandboxEnabledForContext( - net::CookieSettingOverrides()); +@@ -767,7 +773,10 @@ void PrivacySandboxSettingsImpl::SetDelegateForTesting( + delegate_ = std::move(delegate); } -void PrivacySandboxSettingsImpl::SetTopicsDataAccessibleFromNow() const { @@ -205,7 +211,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo pref_service_->SetTime(prefs::kPrivacySandboxTopicsDataAccessibleSince, base::Time::Now()); -@@ -864,6 +873,7 @@ PrivacySandboxSettingsImpl::Status +@@ -780,6 +789,7 @@ PrivacySandboxSettingsImpl::Status PrivacySandboxSettingsImpl::GetSiteAccessAllowedStatus( const url::Origin& top_frame_origin, const GURL& url) const { @@ -214,4 +220,3 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo // allows to query whether the site associated with the |url| is allowed to // access Site data (aka ContentSettingsType::COOKIES) without considering any -- -2.25.1 diff --git a/build/patches/00Disable-FedCm.patch b/build/patches/Disable-FedCm.patch similarity index 97% rename from build/patches/00Disable-FedCm.patch rename to build/patches/Disable-FedCm.patch index abd02745a..76fb1fddf 100644 --- a/build/patches/00Disable-FedCm.patch +++ b/build/patches/Disable-FedCm.patch @@ -18,7 +18,7 @@ new file mode 100644 diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -1653,7 +1653,7 @@ +@@ -1591,7 +1591,7 @@ { name: "FedCm", public: true, @@ -28,4 +28,3 @@ diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 }, { -- -2.25.1 diff --git a/build/patches/00Disable-Feeback-Collector.patch b/build/patches/Disable-Feeback-Collector.patch similarity index 81% rename from build/patches/00Disable-Feeback-Collector.patch rename to build/patches/Disable-Feeback-Collector.patch index e3198574b..32941739a 100644 --- a/build/patches/00Disable-Feeback-Collector.patch +++ b/build/patches/Disable-Feeback-Collector.patch @@ -4,8 +4,8 @@ Subject: Disable Feeback Collector License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - .../browser/feedback/FeedbackCollector.java | 27 +++---------------- - 1 file changed, 3 insertions(+), 24 deletions(-) + .../browser/feedback/FeedbackCollector.java | 28 ++----------------- + 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/chrome/browser/feedback/android/java/src/org/chromium/chrome/browser/feedback/FeedbackCollector.java b/chrome/browser/feedback/android/java/src/org/chromium/chrome/browser/feedback/FeedbackCollector.java --- a/chrome/browser/feedback/android/java/src/org/chromium/chrome/browser/feedback/FeedbackCollector.java @@ -18,9 +18,9 @@ diff --git a/chrome/browser/feedback/android/java/src/org/chromium/chrome/browse import java.util.List; import java.util.Map; -@@ -64,30 +65,8 @@ public abstract class FeedbackCollector implements Runnable { - // Subclasses must invoke init() at construction time. - protected void init(Activity activity, @Nullable ScreenshotSource screenshotTask, T initParams, +@@ -69,31 +70,8 @@ public abstract class FeedbackCollector implements Runnable { + @Nullable ScreenshotSource screenshotTask, + T initParams, Profile profile) { - // 1. Build all synchronous and asynchronous sources and determine the currently signed in - // account. @@ -29,8 +29,9 @@ diff --git a/chrome/browser/feedback/android/java/src/org/chromium/chrome/browse - IdentityManager identityManager = - IdentityServicesProvider.get().getIdentityManager(profile); - if (identityManager != null) { -- mAccountInUse = CoreAccountInfo.getEmailFrom( -- identityManager.getPrimaryAccountInfo(ConsentLevel.SIGNIN)); +- mAccountInUse = +- CoreAccountInfo.getEmailFrom( +- identityManager.getPrimaryAccountInfo(ConsentLevel.SIGNIN)); - } - - // Validation check in case a source is added to the wrong list. @@ -52,4 +53,3 @@ diff --git a/chrome/browser/feedback/android/java/src/org/chromium/chrome/browse // 4. Kick off a task to timeout the async sources. ThreadUtils.postOnUiThreadDelayed(this, TIMEOUT_MS); -- -2.25.1 diff --git a/build/patches/00Disable-FirstPartySets-and-StorageAccessAPI.patch b/build/patches/Disable-FirstPartySets-and-StorageAccessAPI.patch similarity index 97% rename from build/patches/00Disable-FirstPartySets-and-StorageAccessAPI.patch rename to build/patches/Disable-FirstPartySets-and-StorageAccessAPI.patch index 72b0e8d78..f573aad40 100644 --- a/build/patches/00Disable-FirstPartySets-and-StorageAccessAPI.patch +++ b/build/patches/Disable-FirstPartySets-and-StorageAccessAPI.patch @@ -25,7 +25,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_prefs.cc b/components/pr diff --git a/components/privacy_sandbox/tracking_protection_prefs.cc b/components/privacy_sandbox/tracking_protection_prefs.cc --- a/components/privacy_sandbox/tracking_protection_prefs.cc +++ b/components/privacy_sandbox/tracking_protection_prefs.cc -@@ -58,13 +58,13 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) { +@@ -64,13 +64,13 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) { // Tracking Protection Settings Prefs registry->RegisterBooleanPref( @@ -48,4 +48,3 @@ new file mode 100644 @@ -0,0 +1 @@ +SET_CROMITE_FEATURE_DISABLED(kFirstPartySets); -- -2.25.1 diff --git a/build/patches/00Disable-GSA-by-default.patch b/build/patches/Disable-GSA-by-default.patch similarity index 88% rename from build/patches/00Disable-GSA-by-default.patch rename to build/patches/Disable-GSA-by-default.patch index 0faae8407..938d56bbb 100644 --- a/build/patches/00Disable-GSA-by-default.patch +++ b/build/patches/Disable-GSA-by-default.patch @@ -22,7 +22,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.j import org.chromium.chrome.browser.omnibox.suggestions.AutocompleteControllerProvider; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.renderer_host.ChromeNavigationUIData; -@@ -265,8 +264,6 @@ public class IntentHandler { +@@ -239,8 +238,6 @@ public class IntentHandler { private static int sReferrerId; private static String sPendingIncognitoUrl; @@ -31,7 +31,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.j private static final String PACKAGE_GMAIL = "com.google.android.gm"; private static final String PACKAGE_PLUS = "com.google.android.apps.plus"; private static final String PACKAGE_HANGOUTS = "com.google.android.talk"; -@@ -457,8 +454,6 @@ public class IntentHandler { +@@ -456,8 +453,6 @@ public class IntentHandler { return ExternalAppId.LINE; } else if (packageName.equals(PACKAGE_WHATSAPP)) { return ExternalAppId.WHATSAPP; @@ -50,8 +50,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/share/LensUtils -import org.chromium.chrome.browser.gsa.GSAState; import org.chromium.components.externalauth.ExternalAuthUtils; - /** -@@ -59,12 +58,7 @@ public class LensUtils { + /** This class provides utilities for intenting into Google Lens. */ +@@ -55,12 +54,7 @@ public class LensUtils { if (context == null) { return ""; } @@ -64,7 +64,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/share/LensUtils } } -@@ -116,11 +110,7 @@ public class LensUtils { +@@ -112,11 +106,7 @@ public class LensUtils { * @return Whether the package is valid. */ public static boolean isValidAgsaPackage(final ExternalAuthUtils externalAuthUtils) { @@ -80,25 +80,25 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/share/LensUtils diff --git a/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAState.java b/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAState.java --- a/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAState.java +++ b/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAState.java -@@ -34,8 +34,6 @@ import java.util.regex.Pattern; - * A class responsible for representing the current state of Chrome's integration with GSA. - */ +@@ -32,8 +32,6 @@ import java.util.regex.Pattern; + + /** A class responsible for representing the current state of Chrome's integration with GSA. */ public class GSAState { - public static final String PACKAGE_NAME = "com.google.android.googlequicksearchbox"; - /** Used to observe state changes in the class. */ public interface Observer { /** Called when the GSA account name is set. */ -@@ -75,7 +73,7 @@ public class GSAState { - /** - * Caches the result of a computation on whether GSA is available. - */ +@@ -71,7 +69,7 @@ public class GSAState { + private final ObserverList mObserverList = new ObserverList<>(); + + /** Caches the result of a computation on whether GSA is available. */ - private Boolean mGsaAvailable; + private Boolean mGsaAvailable = false; /** * The Google account email address being used by GSA according to the latest update we have -@@ -156,7 +154,7 @@ public class GSAState { +@@ -153,7 +151,7 @@ public class GSAState { /** Returns whether the GSA package is installed on device. */ public boolean isGsaInstalled() { @@ -107,7 +107,7 @@ diff --git a/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAStat } /** -@@ -179,6 +177,7 @@ public class GSAState { +@@ -176,6 +174,7 @@ public class GSAState { */ public boolean isAgsaVersionBelowMinimum( String installedVersionName, String minimumVersionName) { @@ -115,7 +115,7 @@ diff --git a/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAStat if (TextUtils.isEmpty(installedVersionName) || TextUtils.isEmpty(minimumVersionName)) { return true; } -@@ -210,7 +209,7 @@ public class GSAState { +@@ -207,7 +206,7 @@ public class GSAState { * @return Whether the given intent can be handled by Agsa. */ public boolean canAgsaHandleIntent(@NonNull Intent intent) { @@ -124,7 +124,7 @@ diff --git a/chrome/browser/gsa/java/src/org/chromium/chrome/browser/gsa/GSAStat ComponentName activity = intent.resolveActivity(ContextUtils.getApplicationContext().getPackageManager()); -@@ -224,7 +223,7 @@ public class GSAState { +@@ -221,7 +220,7 @@ public class GSAState { * @return The version name of the Agsa package or null if it can't be found. */ public @Nullable String getAgsaVersionName() { @@ -141,4 +141,3 @@ new file mode 100644 +SET_CROMITE_FEATURE_DISABLED(kContextMenuSearchWithGoogleLens); +SET_CROMITE_FEATURE_DISABLED(kExperimentsForAgsa); -- -2.25.1 diff --git a/build/patches/00Disable-GetInstalledRelatedApps-API.patch b/build/patches/Disable-GetInstalledRelatedApps-API.patch similarity index 93% rename from build/patches/00Disable-GetInstalledRelatedApps-API.patch rename to build/patches/Disable-GetInstalledRelatedApps-API.patch index b2028b0eb..2c089ee62 100644 --- a/build/patches/00Disable-GetInstalledRelatedApps-API.patch +++ b/build/patches/Disable-GetInstalledRelatedApps-API.patch @@ -14,9 +14,9 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/components/installedapp/android/java/src/org/chromium/components/installedapp/InstalledAppProviderImpl.java b/components/installedapp/android/java/src/org/chromium/components/installedapp/InstalledAppProviderImpl.java --- a/components/installedapp/android/java/src/org/chromium/components/installedapp/InstalledAppProviderImpl.java +++ b/components/installedapp/android/java/src/org/chromium/components/installedapp/InstalledAppProviderImpl.java -@@ -155,6 +155,7 @@ public class InstalledAppProviderImpl implements InstalledAppProvider { - @UiThread - public void filterInstalledApps(final RelatedApplication[] relatedApps, final Url manifestUrl, +@@ -153,6 +153,7 @@ public class InstalledAppProviderImpl implements InstalledAppProvider { + final RelatedApplication[] relatedApps, + final Url manifestUrl, final FilterInstalledApps_Response callback) { + assert false; GURL url = mRenderFrameHost.getLastCommittedURL(); @@ -43,7 +43,7 @@ new file mode 100644 diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -2221,9 +2221,9 @@ +@@ -2133,9 +2133,9 @@ status: {"Android": "test", "default": "stable"}, }, { @@ -55,4 +55,3 @@ diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 }, { -- -2.25.1 diff --git a/build/patches/Disable-NTP-remote-suggestions-by-default.patch b/build/patches/Disable-NTP-remote-suggestions-by-default.patch index b5bfbdb15..7b5fc2b60 100644 --- a/build/patches/Disable-NTP-remote-suggestions-by-default.patch +++ b/build/patches/Disable-NTP-remote-suggestions-by-default.patch @@ -22,4 +22,3 @@ diff --git a/components/feed/core/shared_prefs/pref_names.cc b/components/feed/c } -- -2.25.1 diff --git a/build/patches/Disable-PrivacyGuide.patch b/build/patches/Disable-PrivacyGuide.patch index 27b3bae3d..61cf841d6 100644 --- a/build/patches/Disable-PrivacyGuide.patch +++ b/build/patches/Disable-PrivacyGuide.patch @@ -12,7 +12,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/ui/webui/settings/settings_ui.cc b/chrome/browser/ui/webui/settings/settings_ui.cc --- a/chrome/browser/ui/webui/settings/settings_ui.cc +++ b/chrome/browser/ui/webui/settings/settings_ui.cc -@@ -347,7 +347,7 @@ SettingsUI::SettingsUI(content::WebUI* web_ui) +@@ -351,7 +351,7 @@ SettingsUI::SettingsUI(content::WebUI* web_ui) #endif // !BUILDFLAG(IS_CHROMEOS_LACROS) bool show_privacy_guide = @@ -37,4 +37,3 @@ new file mode 100644 + +#endif -- -2.25.1 diff --git a/build/patches/00Disable-PrivateStateTokens-API.patch b/build/patches/Disable-PrivateStateTokens-API.patch similarity index 99% rename from build/patches/00Disable-PrivateStateTokens-API.patch rename to build/patches/Disable-PrivateStateTokens-API.patch index ab61971c5..8608edb71 100644 --- a/build/patches/00Disable-PrivateStateTokens-API.patch +++ b/build/patches/Disable-PrivateStateTokens-API.patch @@ -16,4 +16,3 @@ new file mode 100644 +SET_CROMITE_FEATURE_DISABLED(kPrivateStateTokens); +SET_CROMITE_FEATURE_DISABLED(kFledgePst); -- -2.25.1 diff --git a/build/patches/00Disable-Real-Box.patch b/build/patches/Disable-Real-Box.patch similarity index 92% rename from build/patches/00Disable-Real-Box.patch rename to build/patches/Disable-Real-Box.patch index c1990297c..d83eade3b 100644 --- a/build/patches/00Disable-Real-Box.patch +++ b/build/patches/Disable-Real-Box.patch @@ -26,7 +26,7 @@ diff --git a/chrome/browser/resources/new_tab_page/app.html b/chrome/browser/res diff --git a/components/search/ntp_features.cc b/components/search/ntp_features.cc --- a/components/search/ntp_features.cc +++ b/components/search/ntp_features.cc -@@ -135,7 +135,7 @@ BASE_FEATURE(kNtpHandleMostVisitedNavigationExplicitly, +@@ -166,7 +166,7 @@ BASE_FEATURE(kNtpHandleMostVisitedNavigationExplicitly, base::FEATURE_ENABLED_BY_DEFAULT); // If enabled, logo will be shown. @@ -35,7 +35,7 @@ diff --git a/components/search/ntp_features.cc b/components/search/ntp_features. // If enabled, logo will fill up less vertical space. BASE_FEATURE(kNtpReducedLogoSpace, -@@ -212,8 +212,8 @@ BASE_FEATURE(kNtpMostVisitedReflowOnOverflow, +@@ -243,8 +243,8 @@ BASE_FEATURE(kNtpMostVisitedReflowOnOverflow, // If enabled, OneGoogleBar will be shown. BASE_FEATURE(kNtpOneGoogleBar, @@ -46,7 +46,7 @@ diff --git a/components/search/ntp_features.cc b/components/search/ntp_features. // If enabled, Google Photos module will be shown. BASE_FEATURE(kNtpPhotosModule, -@@ -248,8 +248,8 @@ BASE_FEATURE(kNtpFeedModule, +@@ -279,8 +279,8 @@ BASE_FEATURE(kNtpFeedModule, // If enabled, Google Lens image search will be shown in the NTP Realbox. BASE_FEATURE(kNtpRealboxLensSearch, @@ -58,4 +58,3 @@ diff --git a/components/search/ntp_features.cc b/components/search/ntp_features. // If enabled, Google Lens image search will call Lens v3 direct upload // endpoint instead of uploading to Scotty. -- -2.25.1 diff --git a/build/patches/00Disable-SHA1-Server-Signature.patch b/build/patches/Disable-SHA1-Server-Signature.patch similarity index 99% rename from build/patches/00Disable-SHA1-Server-Signature.patch rename to build/patches/Disable-SHA1-Server-Signature.patch index 0974b2dbb..67740069c 100644 --- a/build/patches/00Disable-SHA1-Server-Signature.patch +++ b/build/patches/Disable-SHA1-Server-Signature.patch @@ -15,4 +15,3 @@ new file mode 100644 @@ -0,0 +1 @@ +SET_CROMITE_FEATURE_DISABLED(kSHA1ServerSignature); -- -2.25.1 diff --git a/build/patches/00Disable-Service-and-Shared-workers-on-3P-iframe.patch b/build/patches/Disable-Service-and-Shared-workers-on-3P-iframe.patch similarity index 97% rename from build/patches/00Disable-Service-and-Shared-workers-on-3P-iframe.patch rename to build/patches/Disable-Service-and-Shared-workers-on-3P-iframe.patch index 59687a77d..8e55d40e8 100644 --- a/build/patches/00Disable-Service-and-Shared-workers-on-3P-iframe.patch +++ b/build/patches/Disable-Service-and-Shared-workers-on-3P-iframe.patch @@ -51,7 +51,7 @@ diff --git a/components/embedder_support/content_settings_utils.cc b/components/ for (const auto& it : render_frames) { auto* rfh = content::RenderFrameHost::FromID(it); -@@ -109,19 +94,16 @@ content::AllowServiceWorkerResult AllowServiceWorker( +@@ -108,19 +93,16 @@ content::AllowServiceWorkerResult AllowServiceWorker( scope, site_for_cookies, top_frame_origin, cookie_settings->SettingOverridesForStorage(), &cookie_settings_metadata); @@ -75,7 +75,7 @@ diff --git a/components/embedder_support/content_settings_utils.cc b/components/ return content::AllowServiceWorkerResult::FromPolicy(!allow_javascript, !allow_cookies); -@@ -143,17 +125,16 @@ bool AllowSharedWorker( +@@ -142,17 +124,16 @@ bool AllowSharedWorker( worker_url, site_for_cookies, top_frame_origin, cookie_settings->SettingOverridesForStorage(), &cookie_settings_metadata); @@ -98,4 +98,3 @@ diff --git a/components/embedder_support/content_settings_utils.cc b/components/ content_settings::PageSpecificContentSettings::SharedWorkerAccessed( render_process_id, render_frame_id, worker_url, name, storage_key, -- -2.25.1 diff --git a/build/patches/Disable-StartSurface-feature.patch b/build/patches/Disable-StartSurface-feature.patch index 65c76b53d..f9a35d5af 100644 --- a/build/patches/Disable-StartSurface-feature.patch +++ b/build/patches/Disable-StartSurface-feature.patch @@ -14,12 +14,12 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java -@@ -632,7 +632,7 @@ public abstract class ChromeFeatureList { +@@ -631,7 +631,7 @@ public abstract class ChromeFeatureList { new CachedFlag(SHOW_NTP_AT_STARTUP_ANDROID, false); public static final CachedFlag sSpareTab = new CachedFlag(SPARE_TAB, false); - public static final CachedFlag sStartSurfaceAndroid = new CachedFlag( -- START_SURFACE_ANDROID, ChromePreferenceKeys.FLAGS_CACHED_START_SURFACE_ENABLED, true); -+ START_SURFACE_ANDROID, ChromePreferenceKeys.FLAGS_CACHED_START_SURFACE_ENABLED, false); + public static final CachedFlag sStartSurfaceAndroid = +- new CachedFlag(START_SURFACE_ANDROID, true); ++ new CachedFlag(START_SURFACE_ANDROID, false); public static final CachedFlag sStartSurfaceDisabledFeedImprovement = new CachedFlag(START_SURFACE_DISABLED_FEED_IMPROVEMENT, false); public static final CachedFlag sStartSurfaceOnTablet = @@ -30,4 +30,3 @@ new file mode 100644 @@ -0,0 +1 @@ +SET_CROMITE_FEATURE_DISABLED(kStartSurfaceAndroid); -- -2.25.1 diff --git a/build/patches/Disable-TLS-resumption.patch b/build/patches/Disable-TLS-resumption.patch index 942484af3..8ab79fc0d 100644 --- a/build/patches/Disable-TLS-resumption.patch +++ b/build/patches/Disable-TLS-resumption.patch @@ -183,7 +183,7 @@ diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket Disconnect(); } -@@ -776,6 +802,8 @@ int SSLClientSocketImpl::Init() { +@@ -772,6 +798,8 @@ int SSLClientSocketImpl::Init() { } if (session) SSL_set_session(ssl_.get(), session.get()); @@ -192,7 +192,7 @@ diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket } const int kBufferSize = GetDefaultOpenSSLBufferSize(); -@@ -1067,6 +1095,35 @@ int SSLClientSocketImpl::DoHandshakeComplete(int result) { +@@ -1066,6 +1094,35 @@ int SSLClientSocketImpl::DoHandshakeComplete(int result) { : SSLHandshakeDetails::kTLS13Full; } } @@ -228,7 +228,7 @@ diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket UMA_HISTOGRAM_ENUMERATION("Net.SSLHandshakeDetails", details); // Measure TLS connections that implement the renegotiation_info extension. -@@ -1741,6 +1798,8 @@ bool SSLClientSocketImpl::IsRenegotiationAllowed() const { +@@ -1718,6 +1775,8 @@ bool SSLClientSocketImpl::IsRenegotiationAllowed() const { } bool SSLClientSocketImpl::IsCachingEnabled() const { @@ -240,7 +240,7 @@ diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket diff --git a/net/socket/ssl_client_socket_impl.h b/net/socket/ssl_client_socket_impl.h --- a/net/socket/ssl_client_socket_impl.h +++ b/net/socket/ssl_client_socket_impl.h -@@ -126,6 +126,8 @@ class SSLClientSocketImpl : public SSLClientSocket, +@@ -124,6 +124,8 @@ class SSLClientSocketImpl : public SSLClientSocket, friend class SSLClientSocket; friend class SSLContext; @@ -250,4 +250,3 @@ diff --git a/net/socket/ssl_client_socket_impl.h b/net/socket/ssl_client_socket_ void DoReadCallback(int result); void DoWriteCallback(int result); -- -2.25.1 diff --git a/build/patches/Disable-UA-full-version.patch b/build/patches/Disable-UA-full-version.patch index 934d64ca3..7eb11dd28 100644 --- a/build/patches/Disable-UA-full-version.patch +++ b/build/patches/Disable-UA-full-version.patch @@ -22,8 +22,8 @@ diff --git a/third_party/blink/renderer/core/frame/navigator_ua_data.cc b/third_ #include "third_party/blink/public/common/privacy_budget/identifiability_metric_builder.h" #include "third_party/blink/public/common/privacy_budget/identifiability_study_settings.h" #include "third_party/blink/public/common/privacy_budget/identifiable_surface.h" -@@ -40,6 +42,16 @@ void MaybeRecordMetric(bool record_identifiability, - .Record(execution_context->UkmRecorder()); +@@ -64,6 +66,16 @@ void MaybeRecordMetric(bool record_identifiability, + execution_context); } +const String GetReducedVersionNumber(const std::string& fullVersion) { @@ -39,7 +39,7 @@ diff --git a/third_party/blink/renderer/core/frame/navigator_ua_data.cc b/third_ } // namespace NavigatorUAData::NavigatorUAData(ExecutionContext* context) -@@ -78,7 +90,7 @@ void NavigatorUAData::SetFullVersionList( +@@ -102,7 +114,7 @@ void NavigatorUAData::SetFullVersionList( const UserAgentBrandList& full_version_list) { for (const auto& brand_version : full_version_list) { AddBrandFullVersion(String::FromUTF8(brand_version.brand), @@ -48,7 +48,7 @@ diff --git a/third_party/blink/renderer/core/frame/navigator_ua_data.cc b/third_ } } -@@ -100,7 +112,7 @@ void NavigatorUAData::SetModel(const String& model) { +@@ -124,7 +136,7 @@ void NavigatorUAData::SetModel(const String& model) { } void NavigatorUAData::SetUAFullVersion(const String& ua_full_version) { @@ -58,4 +58,3 @@ diff --git a/third_party/blink/renderer/core/frame/navigator_ua_data.cc b/third_ void NavigatorUAData::SetBitness(const String& bitness) { -- -2.25.1 diff --git a/build/patches/00Disable-WebGPU.patch b/build/patches/Disable-WebGPU.patch similarity index 85% rename from build/patches/00Disable-WebGPU.patch rename to build/patches/Disable-WebGPU.patch index e2363ec12..3e1717ecf 100644 --- a/build/patches/00Disable-WebGPU.patch +++ b/build/patches/Disable-WebGPU.patch @@ -11,10 +11,10 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc --- a/gpu/config/gpu_finch_features.cc +++ b/gpu/config/gpu_finch_features.cc -@@ -284,7 +284,7 @@ BASE_FEATURE(kForceGpuMainThreadToNormalPriorityDrDc, - // Enable WebGPU on gpu service side only. This is used with origin trial and +@@ -300,7 +300,7 @@ BASE_FEATURE(kForceGpuMainThreadToNormalPriorityDrDc, // enabled by default on supported platforms. - #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) + #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \ + BUILDFLAG(IS_ANDROID) -#define WEBGPU_ENABLED base::FEATURE_ENABLED_BY_DEFAULT +#define WEBGPU_ENABLED base::FEATURE_DISABLED_BY_DEFAULT #else @@ -23,7 +23,7 @@ diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc diff --git a/third_party/blink/renderer/modules/webgpu/gpu.cc b/third_party/blink/renderer/modules/webgpu/gpu.cc --- a/third_party/blink/renderer/modules/webgpu/gpu.cc +++ b/third_party/blink/renderer/modules/webgpu/gpu.cc -@@ -370,6 +370,7 @@ ScriptPromise GPU::requestAdapter(ScriptState* script_state, +@@ -369,6 +369,7 @@ ScriptPromise GPU::requestAdapter(ScriptState* script_state, "WebGPU is experimental on this platform. See " "https://github.com/gpuweb/gpuweb/wiki/" "Implementation-Status#implementation-status")); @@ -32,4 +32,3 @@ diff --git a/third_party/blink/renderer/modules/webgpu/gpu.cc b/third_party/blin auto* resolver = MakeGarbageCollected(script_state); -- -2.25.1 diff --git a/build/patches/Disable-add-to-home-screen-prompt.patch b/build/patches/Disable-add-to-home-screen-prompt.patch index 94c2c85fb..70042dd70 100644 --- a/build/patches/Disable-add-to-home-screen-prompt.patch +++ b/build/patches/Disable-add-to-home-screen-prompt.patch @@ -4,23 +4,23 @@ Subject: Disable add to home screen prompt License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - .../webapps/AddToHomescreenMostVisitedTileClickObserver.java | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) + .../AddToHomescreenMostVisitedTileClickObserver.java | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenMostVisitedTileClickObserver.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenMostVisitedTileClickObserver.java --- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenMostVisitedTileClickObserver.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/AddToHomescreenMostVisitedTileClickObserver.java -@@ -43,10 +43,7 @@ public class AddToHomescreenMostVisitedTileClickObserver implements MostVisitedT - ntp.addMostVisitedTileClickObserver( - AddToHomescreenMostVisitedTileClickObserver.this); - } else { -- // If it is a regular web page, and started from a most visited tile, show IPH. -- if (url.getOrigin().equals(mLastClickedMostVisitedTileUrl)) { -- addToHomescreenIPHController.showAddToHomescreenIPH(tab); -- } -+ // do not show any add to home screen IPH in Bromite - removeObserver(tab); - } - mLastClickedMostVisitedTileUrl = null; +@@ -48,11 +48,7 @@ public class AddToHomescreenMostVisitedTileClickObserver implements MostVisitedT + ntp.addMostVisitedTileClickObserver( + AddToHomescreenMostVisitedTileClickObserver.this); + } else { +- // If it is a regular web page, and started from a most visited +- // tile, show IPH. +- if (url.getOrigin().equals(mLastClickedMostVisitedTileUrl)) { +- addToHomescreenIPHController.showAddToHomescreenIPH(tab); +- } ++ // do not show any add to home screen IPH in Bromite + removeObserver(tab); + } + mLastClickedMostVisitedTileUrl = null; -- -2.25.1 diff --git a/build/patches/Disable-all-predictors-code.patch b/build/patches/Disable-all-predictors-code.patch index a17fac416..1d49a57bc 100644 --- a/build/patches/Disable-all-predictors-code.patch +++ b/build/patches/Disable-all-predictors-code.patch @@ -28,8 +28,9 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../Disable-all-predictors-code.inc | 7 +++++ .../Disable-all-predictors-code.inc | 4 +++ .../Disable-all-predictors-code.inc | 2 ++ - .../platform/runtime_enabled_features.json5 | 6 ++-- - 24 files changed, 78 insertions(+), 43 deletions(-) + .../document_speculation_rules.cc | 1 + + .../platform/runtime_enabled_features.json5 | 2 +- + 25 files changed, 77 insertions(+), 41 deletions(-) create mode 100644 cromite_flags/chrome/browser/browser_features_cc/Disable-all-predictors-code.inc create mode 100644 cromite_flags/chrome/common/chrome_features_cc/Disable-all-predictors-code.inc create mode 100644 cromite_flags/components/permissions/features_cc/Disable-all-predictors-code.inc @@ -38,7 +39,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -879,8 +879,6 @@ static_library("browser") { +@@ -840,8 +840,6 @@ static_library("browser") { "navigation_predictor/navigation_predictor_keyed_service_factory.h", "navigation_predictor/navigation_predictor_metrics_document_data.cc", "navigation_predictor/navigation_predictor_metrics_document_data.h", @@ -84,7 +85,7 @@ diff --git a/chrome/browser/optimization_guide/chrome_hints_manager.cc b/chrome/ diff --git a/chrome/browser/optimization_guide/optimization_guide_keyed_service.cc b/chrome/browser/optimization_guide/optimization_guide_keyed_service.cc --- a/chrome/browser/optimization_guide/optimization_guide_keyed_service.cc +++ b/chrome/browser/optimization_guide/optimization_guide_keyed_service.cc -@@ -347,7 +347,6 @@ void OptimizationGuideKeyedService::RemoveObserverForOptimizationTargetModel( +@@ -517,7 +517,6 @@ void OptimizationGuideKeyedService::RemoveObserverForOptimizationTargetModel( void OptimizationGuideKeyedService::RegisterOptimizationTypes( const std::vector& optimization_types) { @@ -95,7 +96,7 @@ diff --git a/chrome/browser/optimization_guide/optimization_guide_keyed_service. diff --git a/chrome/browser/predictors/loading_predictor.cc b/chrome/browser/predictors/loading_predictor.cc --- a/chrome/browser/predictors/loading_predictor.cc +++ b/chrome/browser/predictors/loading_predictor.cc -@@ -211,7 +211,7 @@ ResourcePrefetchPredictor* LoadingPredictor::resource_prefetch_predictor() { +@@ -212,7 +212,7 @@ ResourcePrefetchPredictor* LoadingPredictor::resource_prefetch_predictor() { } PreconnectManager* LoadingPredictor::preconnect_manager() { @@ -104,7 +105,7 @@ diff --git a/chrome/browser/predictors/loading_predictor.cc b/chrome/browser/pre return nullptr; } -@@ -227,7 +227,7 @@ PrefetchManager* LoadingPredictor::prefetch_manager() { +@@ -228,7 +228,7 @@ PrefetchManager* LoadingPredictor::prefetch_manager() { if (!base::FeatureList::IsEnabled(features::kLoadingPredictorPrefetch)) return nullptr; @@ -164,8 +165,8 @@ diff --git a/chrome/browser/predictors/predictors_features.cc b/chrome/browser/p diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc --- a/chrome/browser/ui/tab_helpers.cc +++ b/chrome/browser/ui/tab_helpers.cc -@@ -400,7 +400,6 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { - web_contents); +@@ -404,7 +404,6 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { + } MixedContentSettingsTabHelper::CreateForWebContents(web_contents); NavigationMetricsRecorder::CreateForWebContents(web_contents); - NavigationPredictorPreconnectClient::CreateForWebContents(web_contents); @@ -208,7 +209,7 @@ diff --git a/chrome/browser/ui/webui/omnibox/omnibox_page_handler.cc b/chrome/br if (auto* service = GetMlService()) { AutocompleteMatch::ScoringSignals signals = mojo::ConvertTo(mojom_signals); -@@ -525,6 +532,9 @@ void OmniboxPageHandler::StartMl(mojom::SignalsPtr mojom_signals, +@@ -526,6 +533,9 @@ void OmniboxPageHandler::StartMl(mojom::SignalsPtr mojom_signals, } else { std::move(callback).Run(-1); } @@ -218,7 +219,7 @@ diff --git a/chrome/browser/ui/webui/omnibox/omnibox_page_handler.cc b/chrome/br } std::unique_ptr OmniboxPageHandler::CreateController( -@@ -549,8 +559,12 @@ OmniboxPageHandler::GetAutocompleteControllerType( +@@ -550,8 +560,12 @@ OmniboxPageHandler::GetAutocompleteControllerType( } AutocompleteScoringModelService* OmniboxPageHandler::GetMlService() { @@ -342,7 +343,7 @@ diff --git a/components/optimization_guide/core/optimization_guide_features.cc b // Returns whether |locale| is a supported locale for |feature|. // -@@ -560,8 +548,7 @@ size_t MaxURLKeyedHintCacheSize() { +@@ -582,8 +570,7 @@ size_t MaxURLKeyedHintCacheSize() { } bool ShouldPersistHintsToDisk() { @@ -352,8 +353,8 @@ diff --git a/components/optimization_guide/core/optimization_guide_features.cc b } bool ShouldEnablePersonalizedMetadata(proto::RequestContext request_context) { -@@ -899,5 +886,19 @@ std::set GetOAuthScopesForModelExecution() { - return GetOauthScopesForFeature(kOptimizationGuideModelExecution); +@@ -1002,5 +989,19 @@ bool CanLaunchOnDeviceModelService() { + base::FeatureList::IsEnabled(kLogOnDeviceMetricsOnStartup); } +SET_CROMITE_FEATURE_DISABLED(kOptimizationHints); @@ -436,7 +437,7 @@ diff --git a/components/optimization_guide/features.gni b/components/optimizatio diff --git a/components/search/ntp_features.cc b/components/search/ntp_features.cc --- a/components/search/ntp_features.cc +++ b/components/search/ntp_features.cc -@@ -460,4 +460,7 @@ std::vector GetModulesOrder() { +@@ -499,4 +499,7 @@ std::vector GetModulesOrder() { base::SplitResult::SPLIT_WANT_NONEMPTY); } @@ -481,10 +482,21 @@ new file mode 100644 @@ -0,0 +1,2 @@ +SET_CROMITE_FEATURE_DISABLED(kNavigationPredictor); +SET_CROMITE_FEATURE_DISABLED(kPreloadingHeuristicsMLModel); +diff --git a/third_party/blink/renderer/core/speculation_rules/document_speculation_rules.cc b/third_party/blink/renderer/core/speculation_rules/document_speculation_rules.cc +--- a/third_party/blink/renderer/core/speculation_rules/document_speculation_rules.cc ++++ b/third_party/blink/renderer/core/speculation_rules/document_speculation_rules.cc +@@ -584,6 +584,7 @@ void DocumentSpeculationRules::UpdateSpeculationCandidates() { + return; + } + ++ if ((true)) return; + HeapVector> candidates; + auto push_candidates = [&candidates, &execution_context]( + mojom::blink::SpeculationAction action, diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -3087,7 +3087,7 @@ +@@ -2969,7 +2969,7 @@ { // https://crbug.com/1126305 name: "Prerender2", @@ -493,17 +505,4 @@ diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 }, { name: "Presentation", -@@ -3698,9 +3698,9 @@ - origin_trial_allows_third_party: true, - }, - { -- name: "SpeculationRulesPrefetchProxy", -+ name: "SpeculationRulesPrefetchProxy", // disabled -+ status: "test", // by default - origin_trial_feature_name: "SpeculationRulesPrefetch", -- status: "stable", - copied_from_base_feature_if: "overridden", - implied_by: ["SpeculationRulesPrefetchFuture", "NoVarySearchPrefetch"], - }, -- -2.25.1 diff --git a/build/patches/Disable-all-promo-dialogs.patch b/build/patches/Disable-all-promo-dialogs.patch index fd9864d8b..186613a56 100644 --- a/build/patches/Disable-all-promo-dialogs.patch +++ b/build/patches/Disable-all-promo-dialogs.patch @@ -17,18 +17,18 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java -@@ -956,6 +956,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { +@@ -1143,6 +1143,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { } - private boolean maybeShowPromo() { + private boolean maybeShowPromo(Profile profile) { + if ((true)) return false; - // Only one promo can be shown in one run to avoid nagging users too much. - if (FullScreenSyncPromoUtil.launchPromoIfNeeded(mActivity, - SyncConsentActivityLauncherImpl.get(), VersionInfo.getProductMajorVersion())) { + // NOTE: Only one promo can be shown in one run to avoid nagging users too much. + + // The PWA Restore promotion runs when we've detected that a user has switched to a new diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc --- a/chrome/browser/ui/browser_ui_prefs.cc +++ b/chrome/browser/ui/browser_ui_prefs.cc -@@ -144,7 +144,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { +@@ -143,7 +143,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref(prefs::kEnterpriseHardwarePlatformAPIEnabled, false); @@ -40,7 +40,7 @@ diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_u diff --git a/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc b/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc --- a/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc +++ b/chrome/browser/ui/views/user_education/browser_feature_promo_controller.cc -@@ -68,6 +68,7 @@ ui::ElementContext BrowserFeaturePromoController::GetAnchorContext() const { +@@ -129,6 +129,7 @@ ui::ElementContext BrowserFeaturePromoController::GetAnchorContext() const { bool BrowserFeaturePromoController::CanShowPromoForElement( ui::TrackedElement* anchor_element) const { @@ -58,11 +58,11 @@ diff --git a/chrome/browser/user_education/java/src/org/chromium/chrome/browser/ + if ((true)) return; // Activity was destroyed; don't show IPH. View anchorView = iphCommand.anchorView; - if (mActivity == null || mActivity.isFinishing() || mActivity.isDestroyed() + if (mActivity == null diff --git a/components/user_education/common/feature_promo_controller.cc b/components/user_education/common/feature_promo_controller.cc --- a/components/user_education/common/feature_promo_controller.cc +++ b/components/user_education/common/feature_promo_controller.cc -@@ -388,6 +388,7 @@ FeaturePromoResult FeaturePromoControllerCommon::CanShowPromoCommon( +@@ -433,6 +433,7 @@ FeaturePromoResult FeaturePromoControllerCommon::CanShowPromoCommon( const FeaturePromoSpecification** spec_out, std::unique_ptr* lifecycle_out, ui::TrackedElement** anchor_element_out) const { @@ -88,4 +88,3 @@ new file mode 100755 @@ -0,0 +1 @@ +SET_CROMITE_FEATURE_DISABLED(kChromeLabs); -- -2.25.1 diff --git a/build/patches/Disable-conversion-measurement-api.patch b/build/patches/Disable-conversion-measurement-api.patch index 7c0c020c7..35d398a32 100644 --- a/build/patches/Disable-conversion-measurement-api.patch +++ b/build/patches/Disable-conversion-measurement-api.patch @@ -13,7 +13,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- .../browser/aw_content_browser_client.cc | 1 + chrome/android/java/AndroidManifest.xml | 4 - - components/attribution_reporting/features.cc | 1 + + components/attribution_reporting/features.cc | 2 + .../origin_trials/features.cc | 2 + .../render_view_context_menu_base.cc | 3 - .../aggregatable_report_sender.cc | 15 +- @@ -25,7 +25,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../attribution_storage_sql.cc | 8 +- content/browser/storage_partition_impl.cc | 9 - content/public/android/BUILD.gn | 2 - - .../browser/AttributionOsLevelManager.java | 229 +----------------- + .../browser/AttributionOsLevelManager.java | 296 +----------------- .../public/browser/content_browser_client.cc | 7 +- .../public/browser/navigation_controller.cc | 1 - .../Disable-conversion-measurement-api.inc | 1 + @@ -35,7 +35,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../network/public/cpp/attribution_utils.cc | 2 + third_party/blink/renderer/core/page/page.cc | 2 +- ui/events/android/motion_event_android.cc | 6 +- - 24 files changed, 63 insertions(+), 256 deletions(-) + 24 files changed, 64 insertions(+), 323 deletions(-) create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-conversion-measurement-api.inc create mode 100644 cromite_flags/services/network/public/cpp/features_cc/Disable-conversion-measurement-api.inc create mode 100644 cromite_flags/third_party/blink/common/features_cc/Disable-conversion-measurement-api.inc @@ -43,7 +43,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc --- a/android_webview/browser/aw_content_browser_client.cc +++ b/android_webview/browser/aw_content_browser_client.cc -@@ -1207,6 +1207,7 @@ network::mojom::AttributionSupport +@@ -1216,6 +1216,7 @@ network::mojom::AttributionSupport AwContentBrowserClient::GetAttributionSupport( AttributionReportingOsApiState state, content::WebContents* web_contents) { @@ -75,11 +75,12 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro diff --git a/components/attribution_reporting/features.cc b/components/attribution_reporting/features.cc --- a/components/attribution_reporting/features.cc +++ b/components/attribution_reporting/features.cc -@@ -17,4 +17,5 @@ BASE_FEATURE(kAttributionReportingTriggerConfig, - "AttributionReportingTriggerConfig", - base::FEATURE_DISABLED_BY_DEFAULT); +@@ -21,4 +21,6 @@ BASE_FEATURE(kAttributionReportingTriggerContextId, + "AttributionReportingTriggerContextId", + base::FEATURE_ENABLED_BY_DEFAULT); +SET_CROMITE_FEATURE_DISABLED(kConversionMeasurement); ++SET_CROMITE_FEATURE_DISABLED(kAttributionReportingTriggerContextId); } // namespace attribution_reporting::features diff --git a/components/embedder_support/origin_trials/features.cc b/components/embedder_support/origin_trials/features.cc --- a/components/embedder_support/origin_trials/features.cc @@ -107,7 +108,7 @@ diff --git a/components/renderer_context_menu/render_view_context_menu_base.cc b diff --git a/content/browser/aggregation_service/aggregatable_report_sender.cc b/content/browser/aggregation_service/aggregatable_report_sender.cc --- a/content/browser/aggregation_service/aggregatable_report_sender.cc +++ b/content/browser/aggregation_service/aggregatable_report_sender.cc -@@ -136,19 +136,18 @@ void AggregatableReportSender::SendReport(const GURL& url, +@@ -137,19 +137,18 @@ void AggregatableReportSender::SendReport(const GURL& url, // Allow bodies of non-2xx responses to be returned. simple_url_loader_ptr->SetAllowHttpErrorResults(true); @@ -133,7 +134,7 @@ diff --git a/content/browser/aggregation_service/aggregatable_report_sender.cc b + } RequestStatus status; - absl::optional http_response_code; + std::optional http_response_code; diff --git a/content/browser/aggregation_service/aggregation_service_features.cc b/content/browser/aggregation_service/aggregation_service_features.cc --- a/content/browser/aggregation_service/aggregation_service_features.cc +++ b/content/browser/aggregation_service/aggregation_service_features.cc @@ -146,18 +147,18 @@ diff --git a/content/browser/aggregation_service/aggregation_service_features.cc diff --git a/content/browser/attribution_reporting/attribution_data_host_manager_impl.cc b/content/browser/attribution_reporting/attribution_data_host_manager_impl.cc --- a/content/browser/attribution_reporting/attribution_data_host_manager_impl.cc +++ b/content/browser/attribution_reporting/attribution_data_host_manager_impl.cc -@@ -507,6 +507,7 @@ void AttributionDataHostManagerImpl::ParseSource( +@@ -833,6 +833,7 @@ void AttributionDataHostManagerImpl::ParseHeader( HeaderPendingDecode pending_decode, Registrar registrar) { DCHECK(it != registrations_.end()); + if ((true)) return; - network::mojom::AttributionSupport attribution_support = - AttributionManager::GetAttributionSupport( + switch (it->eligibility()) { + case RegistrationEligibility::kSourceOrTrigger: diff --git a/content/browser/attribution_reporting/attribution_host.cc b/content/browser/attribution_reporting/attribution_host.cc --- a/content/browser/attribution_reporting/attribution_host.cc +++ b/content/browser/attribution_reporting/attribution_host.cc -@@ -360,6 +360,7 @@ void AttributionHost::RegisterNavigationDataHost( +@@ -361,6 +361,7 @@ void AttributionHost::RegisterNavigationDataHost( return; } @@ -214,8 +215,8 @@ diff --git a/content/browser/attribution_reporting/attribution_report_network_se diff --git a/content/browser/attribution_reporting/attribution_storage_sql.cc b/content/browser/attribution_reporting/attribution_storage_sql.cc --- a/content/browser/attribution_reporting/attribution_storage_sql.cc +++ b/content/browser/attribution_reporting/attribution_storage_sql.cc -@@ -685,14 +685,16 @@ StorableSource::Result DestinationRateLimitResultToStorableSourceResult( - } +@@ -398,14 +398,16 @@ base::FilePath DatabasePath(const base::FilePath& user_data_directory) { + return user_data_directory.Append(kDatabasePath); } +bool g_run_in_memory = true; @@ -237,7 +238,7 @@ diff --git a/content/browser/attribution_reporting/attribution_storage_sql.cc b/ diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc --- a/content/browser/storage_partition_impl.cc +++ b/content/browser/storage_partition_impl.cc -@@ -1527,15 +1527,6 @@ void StoragePartitionImpl::Initialize( +@@ -1526,15 +1526,6 @@ void StoragePartitionImpl::Initialize( bucket_manager_ = std::make_unique(this); @@ -256,7 +257,7 @@ diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage diff --git a/content/public/android/BUILD.gn b/content/public/android/BUILD.gn --- a/content/public/android/BUILD.gn +++ b/content/public/android/BUILD.gn -@@ -179,8 +179,6 @@ android_library("content_full_java") { +@@ -180,8 +180,6 @@ android_library("content_full_java") { "//third_party/androidx:androidx_appcompat_appcompat_resources_java", "//third_party/androidx:androidx_collection_collection_java", "//third_party/androidx:androidx_core_core_java", @@ -295,24 +296,83 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib private static final String TAG = "AttributionManager"; // TODO: replace with constant in android.Manifest.permission once it becomes available in U. private static final String PERMISSION_ACCESS_ADSERVICES_ATTRIBUTION = -@@ -99,26 +90,11 @@ public class AttributionOsLevelManager { +@@ -116,62 +107,11 @@ public class AttributionOsLevelManager { } private static boolean supportsAttribution() { - return Build.VERSION.SDK_INT >= Build.VERSION_CODES.R; +- } +- +- private static @OperationResult int convertToOperationResult(Throwable thrown) { +- if (thrown instanceof IllegalArgumentException) { +- return OperationResult.ERROR_ILLEGAL_ARGUMENT; +- } else if (thrown instanceof IOException) { +- return OperationResult.ERROR_IO; +- } else if (thrown instanceof IllegalStateException) { +- // The Android API doesn't break out this error as a separate exception so we +- // are forced to inspect the message for now. +- if (thrown.getMessage().toLowerCase(Locale.US).contains("background")) { +- return OperationResult.ERROR_BACKGROUND_CALLER; +- } else { +- return OperationResult.ERROR_ILLEGAL_STATE; +- } +- } else if (thrown instanceof SecurityException) { +- return OperationResult.ERROR_SECURITY; +- } else if (thrown instanceof TimeoutException) { +- return OperationResult.ERROR_TIMEOUT; +- } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R +- && thrown instanceof LimitExceededException) { +- return OperationResult.ERROR_LIMIT_EXCEEDED; +- } else { +- return OperationResult.ERROR_UNKNOWN; +- } + return false; } + private static void recordOperationResult( + @OperationType int type, @OperationResult int result) { +- String suffix = ""; +- switch (type) { +- case OperationType.REGISTER_SOURCE: +- suffix = "RegisterSource"; +- break; +- case OperationType.REGISTER_WEB_SOURCE: +- suffix = "RegisterWebSource"; +- break; +- case OperationType.REGISTER_TRIGGER: +- suffix = "RegisterTrigger"; +- break; +- case OperationType.REGISTER_WEB_TRIGGER: +- suffix = "RegisterWebTrigger"; +- break; +- case OperationType.GET_MEASUREMENT_API_STATUS: +- suffix = "GetMeasurementApiStatus"; +- break; +- case OperationType.DELETE_REGISTRATIONS: +- suffix = "DeleteRegistrations"; +- break; +- } +- +- assert suffix.length() > 0; +- +- RecordHistogram.recordEnumeratedHistogram( +- "Conversions.AndroidOperationResult." + suffix, result, OperationResult.COUNT); + } + + @CalledByNative +@@ -180,22 +120,7 @@ public class AttributionOsLevelManager { + } + private MeasurementManagerFutures getManager() { +- if (!supportsAttribution()) { +- return null; +- } - if (sManagerForTesting != null) { - return sManagerForTesting; - } - if (mManager != null) { - return mManager; - } -- if (!supportsAttribution()) { -- return null; -- } - try { - mManager = MeasurementManagerFutures.from(ContextUtils.getApplicationContext()); - } catch (Throwable t) { @@ -324,125 +384,117 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib } private void onRegistrationCompleted( -@@ -143,46 +119,6 @@ public class AttributionOsLevelManager { +@@ -209,28 +134,6 @@ public class AttributionOsLevelManager { } } - private void addRegistrationFutureCallback( -- int requestId, @RegistrationType int type, ListenableFuture future) { +- int requestId, @OperationType int type, ListenableFuture future) { - if (!supportsAttribution()) { - return; - } -- Futures.addCallback(future, new FutureCallback() { -- @Override -- public void onSuccess(Object result) { -- onRegistrationCompleted(requestId, type, RegistrationResult.SUCCESS); -- } -- @Override -- public void onFailure(Throwable thrown) { -- Log.w(TAG, "Failed to register", thrown); -- @RegistrationResult -- int result = RegistrationResult.ERROR_UNKNOWN; -- if (thrown instanceof IllegalArgumentException) { -- result = RegistrationResult.ERROR_ILLEGAL_ARGUMENT; -- } else if (thrown instanceof IOException) { -- result = RegistrationResult.ERROR_IO; -- } else if (thrown instanceof IllegalStateException) { -- // The Android API doesn't break out this error as a separate exception so we -- // are forced to inspect the message for now. -- if (thrown.getMessage().toLowerCase(Locale.US).contains("background")) { -- result = RegistrationResult.ERROR_BACKGROUND_CALLER; -- } else { -- result = RegistrationResult.ERROR_ILLEGAL_STATE; +- Futures.addCallback( +- future, +- new FutureCallback() { +- @Override +- public void onSuccess(Object result) { +- onRegistrationCompleted(requestId, type, OperationResult.SUCCESS); - } -- } else if (thrown instanceof SecurityException) { -- result = RegistrationResult.ERROR_SECURITY; -- } else if (thrown instanceof TimeoutException) { -- result = RegistrationResult.ERROR_TIMEOUT; -- } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R -- && thrown instanceof LimitExceededException) { -- result = RegistrationResult.ERROR_LIMIT_EXCEEDED; -- } -- onRegistrationCompleted(requestId, type, result); -- } -- }, ContextUtils.getApplicationContext().getMainExecutor()); +- +- @Override +- public void onFailure(Throwable thrown) { +- Log.w(TAG, "Failed to register", thrown); +- onRegistrationCompleted(requestId, type, convertToOperationResult(thrown)); +- } +- }, +- ContextUtils.getApplicationContext().getMainExecutor()); - } - /** * Registers a web attribution source with native, see `registerWebSourceAsync()`: * https://developer.android.com/reference/androidx/privacysandbox/ads/adservices/java/measurement/MeasurementManagerFutures. -@@ -195,19 +131,6 @@ public class AttributionOsLevelManager { - requestId, RegistrationType.SOURCE, RegistrationResult.ERROR_INTERNAL); +@@ -249,25 +152,6 @@ public class AttributionOsLevelManager { + OperationResult.ERROR_VERSION_UNSUPPORTED); return; } - MeasurementManagerFutures mm = getManager(); - if (mm == null) { - onRegistrationCompleted( -- requestId, RegistrationType.SOURCE, RegistrationResult.ERROR_INTERNAL); +- requestId, OperationType.REGISTER_WEB_SOURCE, OperationResult.ERROR_INTERNAL); - return; - } -- ListenableFuture future = mm.registerWebSourceAsync(new WebSourceRegistrationRequest( -- Arrays.asList(new WebSourceParams( -- Uri.parse(registrationUrl.getSpec()), isDebugKeyAllowed)), -- Uri.parse(topLevelOrigin.getSpec()), /*inputEvent=*/event, -- /*appDestination=*/null, /*webDestination=*/null, -- /*verifiedDestination=*/null)); -- addRegistrationFutureCallback(requestId, RegistrationType.SOURCE, future); +- ListenableFuture future = +- mm.registerWebSourceAsync( +- new WebSourceRegistrationRequest( +- Arrays.asList( +- new WebSourceParams( +- Uri.parse(registrationUrl.getSpec()), +- isDebugKeyAllowed)), +- Uri.parse(topLevelOrigin.getSpec()), +- /* inputEvent= */ event, +- /* appDestination= */ null, +- /* webDestination= */ null, +- /* verifiedDestination= */ null)); +- addRegistrationFutureCallback(requestId, OperationType.REGISTER_WEB_SOURCE, future); } /** -@@ -221,15 +144,6 @@ public class AttributionOsLevelManager { - requestId, RegistrationType.SOURCE, RegistrationResult.ERROR_INTERNAL); +@@ -283,15 +167,6 @@ public class AttributionOsLevelManager { + OperationResult.ERROR_VERSION_UNSUPPORTED); return; } - MeasurementManagerFutures mm = getManager(); - if (mm == null) { - onRegistrationCompleted( -- requestId, RegistrationType.SOURCE, RegistrationResult.ERROR_INTERNAL); +- requestId, OperationType.REGISTER_SOURCE, OperationResult.ERROR_INTERNAL); - return; - } - ListenableFuture future = - mm.registerSourceAsync(Uri.parse(registrationUrl.getSpec()), event); -- addRegistrationFutureCallback(requestId, RegistrationType.SOURCE, future); +- addRegistrationFutureCallback(requestId, OperationType.REGISTER_SOURCE, future); } /** -@@ -244,18 +158,6 @@ public class AttributionOsLevelManager { - requestId, RegistrationType.TRIGGER, RegistrationResult.ERROR_INTERNAL); +@@ -308,22 +183,6 @@ public class AttributionOsLevelManager { + OperationResult.ERROR_VERSION_UNSUPPORTED); return; } - - MeasurementManagerFutures mm = getManager(); - if (mm == null) { - onRegistrationCompleted( -- requestId, RegistrationType.TRIGGER, RegistrationResult.ERROR_INTERNAL); +- requestId, OperationType.REGISTER_WEB_TRIGGER, OperationResult.ERROR_INTERNAL); - return; - } -- ListenableFuture future = mm.registerWebTriggerAsync(new WebTriggerRegistrationRequest( -- Arrays.asList(new WebTriggerParams( -- Uri.parse(registrationUrl.getSpec()), isDebugKeyAllowed)), -- Uri.parse(topLevelOrigin.getSpec()))); -- addRegistrationFutureCallback(requestId, RegistrationType.TRIGGER, future); +- ListenableFuture future = +- mm.registerWebTriggerAsync( +- new WebTriggerRegistrationRequest( +- Arrays.asList( +- new WebTriggerParams( +- Uri.parse(registrationUrl.getSpec()), +- isDebugKeyAllowed)), +- Uri.parse(topLevelOrigin.getSpec()))); +- addRegistrationFutureCallback(requestId, OperationType.REGISTER_WEB_TRIGGER, future); } /** -@@ -269,15 +171,6 @@ public class AttributionOsLevelManager { - requestId, RegistrationType.TRIGGER, RegistrationResult.ERROR_INTERNAL); +@@ -339,15 +198,6 @@ public class AttributionOsLevelManager { + OperationResult.ERROR_VERSION_UNSUPPORTED); return; } - - MeasurementManagerFutures mm = getManager(); - if (mm == null) { - onRegistrationCompleted( -- requestId, RegistrationType.TRIGGER, RegistrationResult.ERROR_INTERNAL); +- requestId, OperationType.REGISTER_TRIGGER, OperationResult.ERROR_INTERNAL); - return; - } - ListenableFuture future = mm.registerTriggerAsync(Uri.parse(registrationUrl.getSpec())); -- addRegistrationFutureCallback(requestId, RegistrationType.TRIGGER, future); +- addRegistrationFutureCallback(requestId, OperationType.REGISTER_TRIGGER, future); } private void onDataDeletionCompleted(int requestId) { -@@ -302,77 +195,7 @@ public class AttributionOsLevelManager { +@@ -382,96 +232,7 @@ public class AttributionOsLevelManager { onDataDeletionCompleted(requestId); return; } @@ -462,14 +514,20 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib - if (origins.length == 0 && domains.length == 0) { - switch (matchBehavior) { - case DeletionRequest.MATCH_BEHAVIOR_DELETE: +- recordOperationResult( +- OperationType.DELETE_REGISTRATIONS, OperationResult.SUCCESS); - onDataDeletionCompleted(requestId); - return; - case DeletionRequest.MATCH_BEHAVIOR_PRESERVE: -- matchBehaviors = ImmutableList.of(DeletionRequest.MATCH_BEHAVIOR_DELETE, -- DeletionRequest.MATCH_BEHAVIOR_PRESERVE); +- matchBehaviors = +- ImmutableList.of( +- DeletionRequest.MATCH_BEHAVIOR_DELETE, +- DeletionRequest.MATCH_BEHAVIOR_PRESERVE); - break; - default: - Log.e(TAG, "Received invalid match behavior: ", matchBehavior); +- recordOperationResult( +- OperationType.DELETE_REGISTRATIONS, OperationResult.ERROR_UNKNOWN); - onDataDeletionCompleted(requestId); - return; - } @@ -489,30 +547,43 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib - - int numCalls = matchBehaviors.size(); - -- FutureCallback callback = new FutureCallback() { -- private int mNumPendingCalls = numCalls; +- FutureCallback callback = +- new FutureCallback() { +- private int mNumPendingCalls = numCalls; - -- private void onCall() { -- if (--mNumPendingCalls == 0) { -- onDataDeletionCompleted(requestId); -- } -- } +- private void onCall() { +- if (--mNumPendingCalls == 0) { +- onDataDeletionCompleted(requestId); +- } +- } - -- @Override -- public void onSuccess(Object result) { -- onCall(); -- } -- @Override -- public void onFailure(Throwable thrown) { -- Log.w(TAG, "Failed to delete measurement API data", thrown); -- onCall(); -- } -- }; +- @Override +- public void onSuccess(Object result) { +- recordOperationResult( +- OperationType.DELETE_REGISTRATIONS, OperationResult.SUCCESS); +- onCall(); +- } +- +- @Override +- public void onFailure(Throwable thrown) { +- Log.w(TAG, "Failed to delete measurement API data", thrown); +- recordOperationResult( +- OperationType.DELETE_REGISTRATIONS, +- convertToOperationResult(thrown)); +- onCall(); +- } +- }; - - for (int currMatchBehavior : matchBehaviors) { -- ListenableFuture future = mm.deleteRegistrationsAsync(new DeletionRequest( -- deletionMode, currMatchBehavior, Instant.ofEpochMilli(startMs), -- Instant.ofEpochMilli(endMs), originUris, domainUris)); +- ListenableFuture future = +- mm.deleteRegistrationsAsync( +- new DeletionRequest( +- deletionMode, +- currMatchBehavior, +- Instant.ofEpochMilli(startMs), +- Instant.ofEpochMilli(endMs), +- originUris, +- domainUris)); - - Futures.addCallback( - future, callback, ContextUtils.getApplicationContext().getMainExecutor()); @@ -520,8 +591,8 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib + onDataDeletionCompleted(requestId); } - /** -@@ -383,6 +206,10 @@ public class AttributionOsLevelManager { + private static void onMeasurementStateReturned(int status, @OperationResult int result) { +@@ -487,6 +248,10 @@ public class AttributionOsLevelManager { private static void getMeasurementApiStatus() { ThreadUtils.assertOnBackgroundThread(); @@ -532,8 +603,8 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib if (sManagerForTesting != null) { AttributionOsLevelManagerJni.get().onMeasurementStateReturned(1); return; -@@ -399,44 +226,6 @@ public class AttributionOsLevelManager { - AttributionOsLevelManagerJni.get().onMeasurementStateReturned(0); +@@ -506,49 +271,6 @@ public class AttributionOsLevelManager { + onMeasurementStateReturned(/* status= */ 0, OperationResult.ERROR_PERMISSION_UNGRANTED); return; } - MeasurementManagerFutures mm = null; @@ -545,7 +616,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib - } - - if (mm == null) { -- AttributionOsLevelManagerJni.get().onMeasurementStateReturned(0); +- onMeasurementStateReturned(/* status= */ 0, OperationResult.ERROR_INTERNAL); - return; - } - @@ -559,28 +630,33 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib - } - - if (future == null) { -- AttributionOsLevelManagerJni.get().onMeasurementStateReturned(0); +- onMeasurementStateReturned(/* status= */ 0, OperationResult.ERROR_INTERNAL); - return; - } - -- Futures.addCallback(future, new FutureCallback() { -- @Override -- public void onSuccess(Integer status) { -- AttributionOsLevelManagerJni.get().onMeasurementStateReturned(status); -- } -- @Override -- public void onFailure(Throwable thrown) { -- Log.w(TAG, "Failed to get measurement API status", thrown); -- AttributionOsLevelManagerJni.get().onMeasurementStateReturned(0); -- } -- }, ContextUtils.getApplicationContext().getMainExecutor()); +- Futures.addCallback( +- future, +- new FutureCallback() { +- @Override +- public void onSuccess(Integer status) { +- onMeasurementStateReturned(status, OperationResult.SUCCESS); +- } +- +- @Override +- public void onFailure(Throwable thrown) { +- Log.w(TAG, "Failed to get measurement API status", thrown); +- onMeasurementStateReturned( +- /* status= */ 0, convertToOperationResult(thrown)); +- } +- }, +- ContextUtils.getApplicationContext().getMainExecutor()); } @CalledByNative diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -553,6 +553,7 @@ void ContentBrowserClient::OnAuctionComplete( +@@ -554,6 +554,7 @@ void ContentBrowserClient::OnAuctionComplete( network::mojom::AttributionSupport ContentBrowserClient::GetAttributionSupport( AttributionReportingOsApiState state, content::WebContents* web_contents) { @@ -588,7 +664,7 @@ diff --git a/content/public/browser/content_browser_client.cc b/content/public/b switch (state) { case AttributionReportingOsApiState::kDisabled: return network::mojom::AttributionSupport::kWeb; -@@ -569,17 +570,17 @@ bool ContentBrowserClient::IsAttributionReportingOperationAllowed( +@@ -570,17 +571,17 @@ bool ContentBrowserClient::IsAttributionReportingOperationAllowed( const url::Origin* destination_origin, const url::Origin* reporting_origin, bool* can_bypass) { @@ -679,7 +755,7 @@ diff --git a/services/network/public/cpp/attribution_utils.cc b/services/network diff --git a/third_party/blink/renderer/core/page/page.cc b/third_party/blink/renderer/core/page/page.cc --- a/third_party/blink/renderer/core/page/page.cc +++ b/third_party/blink/renderer/core/page/page.cc -@@ -1223,7 +1223,7 @@ void Page::UpdateBrowsingContextGroup( +@@ -1303,7 +1303,7 @@ void Page::UpdateBrowsingContextGroup( void Page::SetAttributionSupport( network::mojom::AttributionSupport attribution_support) { @@ -705,4 +781,3 @@ diff --git a/ui/events/android/motion_event_android.cc b/ui/events/android/motio } -- -2.25.1 diff --git a/build/patches/Disable-crash-reporting.patch b/build/patches/Disable-crash-reporting.patch index 32b801fab..fa5ef5917 100644 --- a/build/patches/Disable-crash-reporting.patch +++ b/build/patches/Disable-crash-reporting.patch @@ -11,7 +11,7 @@ Subject: Disable crash reporting diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc -@@ -2649,6 +2649,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( +@@ -2622,6 +2622,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( base::NumberToString(pid)); } #endif @@ -26,4 +26,3 @@ new file mode 100644 @@ -0,0 +1 @@ +SET_CROMITE_FEATURE_DISABLED(kCrashReporting); -- -2.25.1 diff --git a/build/patches/00Disable-csp-reports.patch b/build/patches/Disable-csp-reports.patch similarity index 99% rename from build/patches/00Disable-csp-reports.patch rename to build/patches/Disable-csp-reports.patch index d212b8e17..b81b59c4d 100644 --- a/build/patches/00Disable-csp-reports.patch +++ b/build/patches/Disable-csp-reports.patch @@ -34,4 +34,3 @@ diff --git a/third_party/blink/renderer/core/loader/ping_loader.cc b/third_party request.SetHttpMethod(http_names::kPOST); request.SetHTTPContentType(AtomicString("application/csp-report")); -- -2.25.1 diff --git a/build/patches/00Disable-devtools-remote-and-custom-protocols.patch b/build/patches/Disable-devtools-remote-and-custom-protocols.patch similarity index 99% rename from build/patches/00Disable-devtools-remote-and-custom-protocols.patch rename to build/patches/Disable-devtools-remote-and-custom-protocols.patch index 9b8ecb75d..09eada5ec 100644 --- a/build/patches/00Disable-devtools-remote-and-custom-protocols.patch +++ b/build/patches/Disable-devtools-remote-and-custom-protocols.patch @@ -28,4 +28,3 @@ diff --git a/chrome/browser/ui/webui/devtools/devtools_ui_data_source.cc b/chrom GURL custom_devtools_frontend = GetCustomDevToolsFrontendURL(); if (!custom_devtools_frontend.is_empty()) { -- -2.25.1 diff --git a/build/patches/Disable-feeds-support-by-default.patch b/build/patches/Disable-feeds-support-by-default.patch index 16e0fea44..ba2ff9710 100644 --- a/build/patches/Disable-feeds-support-by-default.patch +++ b/build/patches/Disable-feeds-support-by-default.patch @@ -13,8 +13,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc -@@ -1773,10 +1773,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, - supervised_user::SupervisedUserService::RegisterProfilePrefs(registry); +@@ -1840,10 +1840,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, + supervised_user::RegisterProfilePrefs(registry); #endif -#if BUILDFLAG(ENABLE_FEED_V2) @@ -64,12 +64,11 @@ diff --git a/components/feed/core/shared_prefs/pref_names.cc b/components/feed/c diff --git a/components/feed/feed_feature_list.cc b/components/feed/feed_feature_list.cc --- a/components/feed/feed_feature_list.cc +++ b/components/feed/feed_feature_list.cc -@@ -169,4 +169,6 @@ BASE_FEATURE(kFeedSportsCard, - "FeedSportsCard", +@@ -169,4 +169,6 @@ BASE_FEATURE(kRefreshFeedOnRestart, + "RefreshFeedOnRestart", base::FEATURE_DISABLED_BY_DEFAULT); +SET_CROMITE_FEATURE_DISABLED(kInterestFeedV2); +SET_CROMITE_FEATURE_DISABLED(kWebFeed); } // namespace feed -- -2.25.1 diff --git a/build/patches/Disable-fetching-of-all-field-trials.patch b/build/patches/Disable-fetching-of-all-field-trials.patch index aa3adc2bd..899b131bd 100644 --- a/build/patches/Disable-fetching-of-all-field-trials.patch +++ b/build/patches/Disable-fetching-of-all-field-trials.patch @@ -10,30 +10,30 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html android_webview/common/aw_features.cc | 4 +-- android_webview/nonembedded/BUILD.gn | 2 -- ...eddedFastVariationsSeedSafeModeAction.java | 2 -- - ...SafeModeVariationsSeedContentProvider.java | 2 -- + ...SafeModeVariationsSeedContentProvider.java | 5 --- .../services/VariationsSeedServer.java | 2 -- .../metrics/chrome_browser_sampling_trials.cc | 4 +++ .../net/system_network_context_manager.cc | 1 - components/ukm/ukm_recorder_impl.cc | 3 ++ .../firstrun/VariationsSeedBridge.java | 2 +- - .../firstrun/VariationsSeedFetcher.java | 32 +++---------------- + .../firstrun/VariationsSeedFetcher.java | 36 +++---------------- components/variations/net/BUILD.gn | 2 -- .../variations/net/omnibox_http_headers.cc | 4 +-- .../variations/net/variations_http_headers.cc | 3 ++ .../variations_field_trial_creator_base.cc | 8 ++--- - .../variations/service/variations_service.cc | 15 ++------- + .../variations/service/variations_service.cc | 15 ++------ .../browser/loader/url_loader_throttles.cc | 7 ---- .../origin_trials/origin_trials_utils.cc | 2 +- - .../variations_render_thread_observer.cc | 9 ------ + .../variations_render_thread_observer.cc | 9 ----- .../Disable-fetching-of-all-field-trials.inc | 1 + .../renderer/core/loader/document_loader.cc | 7 ---- - 20 files changed, 28 insertions(+), 84 deletions(-) + 20 files changed, 28 insertions(+), 91 deletions(-) create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-fetching-of-all-field-trials.inc diff --git a/android_webview/common/aw_features.cc b/android_webview/common/aw_features.cc --- a/android_webview/common/aw_features.cc +++ b/android_webview/common/aw_features.cc -@@ -106,8 +106,8 @@ BASE_FEATURE(kWebViewMetricsFiltering, +@@ -107,8 +107,8 @@ BASE_FEATURE(kWebViewMetricsFiltering, // Field trial feature for controlling support of Origin Trials on WebView. BASE_FEATURE(kWebViewOriginTrials, @@ -70,7 +70,7 @@ diff --git a/android_webview/nonembedded/java/src/org/chromium/android_webview/s @Override public boolean onActivate() { -- AwVariationsSeedFetcher.scheduleIfNeeded(/*requireFastMode=*/true); +- AwVariationsSeedFetcher.scheduleIfNeeded(/* requireFastMode= */ true); return true; } @@ -83,26 +83,29 @@ diff --git a/android_webview/nonembedded/java/src/org/chromium/android_webview/s diff --git a/android_webview/nonembedded/java/src/org/chromium/android_webview/services/SafeModeVariationsSeedContentProvider.java b/android_webview/nonembedded/java/src/org/chromium/android_webview/services/SafeModeVariationsSeedContentProvider.java --- a/android_webview/nonembedded/java/src/org/chromium/android_webview/services/SafeModeVariationsSeedContentProvider.java +++ b/android_webview/nonembedded/java/src/org/chromium/android_webview/services/SafeModeVariationsSeedContentProvider.java -@@ -83,8 +83,6 @@ public class SafeModeVariationsSeedContentProvider extends ContentProvider { +@@ -88,11 +88,6 @@ public class SafeModeVariationsSeedContentProvider extends ContentProvider { private Boolean awaitSeedResults() { CountDownLatch countDownLatch = new CountDownLatch(1); -- VariationsSeedHolder.getInstance().hasSeedUpdateCompletedAsync( -- () -> { countDownLatch.countDown(); }); +- VariationsSeedHolder.getInstance() +- .hasSeedUpdateCompletedAsync( +- () -> { +- countDownLatch.countDown(); +- }); try { return countDownLatch.await(TIMEOUT_IN_MILLIS, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { diff --git a/android_webview/nonembedded/java/src/org/chromium/android_webview/services/VariationsSeedServer.java b/android_webview/nonembedded/java/src/org/chromium/android_webview/services/VariationsSeedServer.java --- a/android_webview/nonembedded/java/src/org/chromium/android_webview/services/VariationsSeedServer.java +++ b/android_webview/nonembedded/java/src/org/chromium/android_webview/services/VariationsSeedServer.java -@@ -30,8 +30,6 @@ public class VariationsSeedServer extends Service { - @Override - public void getSeed(ParcelFileDescriptor newSeedFile, long oldSeedDate, - IVariationsSeedServerCallback callback) { -- maybeReportMetrics(callback); -- VariationsSeedHolder.getInstance().writeSeedIfNewer(newSeedFile, oldSeedDate); - } - }; +@@ -33,8 +33,6 @@ public class VariationsSeedServer extends Service { + ParcelFileDescriptor newSeedFile, + long oldSeedDate, + IVariationsSeedServerCallback callback) { +- maybeReportMetrics(callback); +- VariationsSeedHolder.getInstance().writeSeedIfNewer(newSeedFile, oldSeedDate); + } + }; diff --git a/chrome/browser/metrics/chrome_browser_sampling_trials.cc b/chrome/browser/metrics/chrome_browser_sampling_trials.cc --- a/chrome/browser/metrics/chrome_browser_sampling_trials.cc @@ -128,7 +131,7 @@ diff --git a/chrome/browser/metrics/chrome_browser_sampling_trials.cc b/chrome/b diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc --- a/chrome/browser/net/system_network_context_manager.cc +++ b/chrome/browser/net/system_network_context_manager.cc -@@ -827,7 +827,6 @@ void SystemNetworkContextManager::AddSSLConfigToNetworkContextParams( +@@ -815,7 +815,6 @@ void SystemNetworkContextManager::AddSSLConfigToNetworkContextParams( void SystemNetworkContextManager::ConfigureDefaultNetworkContextParams( network::mojom::NetworkContextParams* network_context_params) { @@ -152,7 +155,7 @@ diff --git a/components/ukm/ukm_recorder_impl.cc b/components/ukm/ukm_recorder_i diff --git a/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridge.java b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridge.java --- a/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridge.java +++ b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridge.java -@@ -52,7 +52,7 @@ public class VariationsSeedBridge { +@@ -53,7 +53,7 @@ public class VariationsSeedBridge { } @CalledByNative @@ -164,7 +167,7 @@ diff --git a/components/variations/android/java/src/org/chromium/components/vari diff --git a/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedFetcher.java b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedFetcher.java --- a/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedFetcher.java +++ b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedFetcher.java -@@ -453,35 +453,13 @@ public class VariationsSeedFetcher { +@@ -468,39 +468,13 @@ public class VariationsSeedFetcher { */ public void fetchSeed(String restrictMode, String milestone, String channel) { assert !ThreadUtils.runningOnUiThread(); @@ -193,8 +196,12 @@ diff --git a/components/variations/android/java/src/org/chromium/components/vari - SeedFetchInfo fetchInfo = downloadContent(params, null); - if (fetchInfo.seedInfo != null) { - SeedInfo info = fetchInfo.seedInfo; -- VariationsSeedBridge.setVariationsFirstRunSeed(info.seedData, info.signature, -- info.country, info.date, info.isGzipCompressed); +- VariationsSeedBridge.setVariationsFirstRunSeed( +- info.seedData, +- info.signature, +- info.country, +- info.date, +- info.isGzipCompressed); - } + SharedPreferences prefs = ContextUtils.getAppSharedPreferences(); // VARIATIONS_INITIALIZED_PREF should still be set to true when exceptions occur @@ -204,7 +211,7 @@ diff --git a/components/variations/android/java/src/org/chromium/components/vari } private void recordFetchResultOrCode(int resultOrCode) { -@@ -525,7 +503,7 @@ public class VariationsSeedFetcher { +@@ -552,7 +526,7 @@ public class VariationsSeedFetcher { * @param curSeedInfo optional currently saved seed info to set the `If-None-Match` header. * @return the object holds the request result and seed data with its related header fields. */ @@ -278,7 +285,7 @@ diff --git a/components/variations/service/variations_field_trial_creator_base.c @@ -581,6 +577,7 @@ bool VariationsFieldTrialCreatorBase::CreateTrialsFromSeed( const EntropyProviders& entropy_providers, base::FeatureList* feature_list, - SafeSeedManagerInterface* safe_seed_manager) { + SafeSeedManagerBase* safe_seed_manager) { + if ((true)) return false; // This histogram name uses "VariationsFieldTrialCreator" rather than // "VariationsFieldTrialCreatorBase" for consistency with historical data @@ -402,4 +409,3 @@ diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_p } -- -2.25.1 diff --git a/build/patches/Disable-idle-detection.patch b/build/patches/Disable-idle-detection.patch index 914c99a41..acad45f7b 100644 --- a/build/patches/Disable-idle-detection.patch +++ b/build/patches/Disable-idle-detection.patch @@ -4,33 +4,67 @@ Subject: Disable idle detection License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - .../common/content_features_cc/Disable-idle-detection.inc | 1 + - .../blink/renderer/platform/runtime_enabled_features.json5 | 7 +++---- - 2 files changed, 4 insertions(+), 4 deletions(-) + .../common/content_features_cc/Disable-idle-detection.inc | 4 ++++ + .../common/content_features_h/Disable-idle-detection.inc | 1 + + .../permissions_policy/permissions_policy_features.json5 | 1 + + third_party/blink/renderer/modules/idle/idle_detector.idl | 3 ++- + .../blink/renderer/platform/runtime_enabled_features.json5 | 5 +++++ + 5 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-idle-detection.inc + create mode 100644 cromite_flags/content/public/common/content_features_h/Disable-idle-detection.inc diff --git a/cromite_flags/content/public/common/content_features_cc/Disable-idle-detection.inc b/cromite_flags/content/public/common/content_features_cc/Disable-idle-detection.inc new file mode 100644 --- /dev/null +++ b/cromite_flags/content/public/common/content_features_cc/Disable-idle-detection.inc +@@ -0,0 +1,4 @@ ++// This is intended as a kill switch for the Idle Detection feature. To enable ++// this feature, the experimental web platform features flag should be set, ++// or the site should obtain an Origin Trial token. ++CROMITE_FEATURE(kIdleDetection, "IdleDetection", base::FEATURE_DISABLED_BY_DEFAULT); +diff --git a/cromite_flags/content/public/common/content_features_h/Disable-idle-detection.inc b/cromite_flags/content/public/common/content_features_h/Disable-idle-detection.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_h/Disable-idle-detection.inc @@ -0,0 +1 @@ -+SET_CROMITE_FEATURE_DISABLED(kIdleDetection); ++CONTENT_EXPORT BASE_DECLARE_FEATURE(kIdleDetection); +diff --git a/third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5 b/third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5 +--- a/third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5 ++++ b/third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5 +@@ -275,6 +275,7 @@ + { + name: "IdleDetection", + permissions_policy_name: "idle-detection", ++ depends_on: ["IdleDetection"], + }, + { + name: "JoinAdInterestGroup", +diff --git a/third_party/blink/renderer/modules/idle/idle_detector.idl b/third_party/blink/renderer/modules/idle/idle_detector.idl +--- a/third_party/blink/renderer/modules/idle/idle_detector.idl ++++ b/third_party/blink/renderer/modules/idle/idle_detector.idl +@@ -17,7 +17,8 @@ enum ScreenIdleState { + [ + SecureContext, + Exposed=(Window,DedicatedWorker), +- ActiveScriptWrappable ++ ActiveScriptWrappable, ++ RuntimeEnabled=IdleDetection + ] interface IdleDetector : EventTarget { + [CallWith=ScriptState] constructor(); + readonly attribute UserIdleState? userState; diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -2157,10 +2157,9 @@ +@@ -2068,6 +2068,11 @@ + name: "HTMLUnsafeMethods", status: "experimental", }, - { -- name: "IdleDetection", -- public: true, -- status: "stable", -- base_feature: "none", ++ { + name: "IdleDetection", // disabled + public: true, // by + base_feature: "none", // default - }, ++ }, { name: "ImplicitRootScroller", + public: true, -- -2.25.1 diff --git a/build/patches/Disable-lock-icon-in-address-bar-by-default.patch b/build/patches/Disable-lock-icon-in-address-bar-by-default.patch index 33c83650a..844bdf60b 100644 --- a/build/patches/Disable-lock-icon-in-address-bar-by-default.patch +++ b/build/patches/Disable-lock-icon-in-address-bar-by-default.patch @@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/components/omnibox/common/omnibox_features.cc b/components/omnibox/common/omnibox_features.cc --- a/components/omnibox/common/omnibox_features.cc +++ b/components/omnibox/common/omnibox_features.cc -@@ -454,8 +454,8 @@ BASE_FEATURE(kOmniboxModernizeVisualUpdate, +@@ -448,8 +448,8 @@ BASE_FEATURE(kOmniboxModernizeVisualUpdate, // used, on non-Android platforms this is controlled through the // ChromeRefresh2023 flag. BASE_FEATURE(kUpdatedConnectionSecurityIndicators, @@ -22,4 +22,3 @@ diff --git a/components/omnibox/common/omnibox_features.cc b/components/omnibox/ // Feature used to default typed navigations to use HTTPS instead of HTTP. // This only applies to navigations that don't have a scheme such as -- -2.25.1 diff --git a/build/patches/Disable-media-router-and-remoting-by-default.patch b/build/patches/Disable-media-router-and-remoting-by-default.patch index 2910136b1..ca42dd5ea 100644 --- a/build/patches/Disable-media-router-and-remoting-by-default.patch +++ b/build/patches/Disable-media-router-and-remoting-by-default.patch @@ -5,12 +5,12 @@ Subject: Disable media router and remoting by default Original License: MIT - https://spdx.org/licenses/MIT.html License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/media/router/media_router_feature.cc | 6 +++++- - chrome/browser/profiles/profile_impl.cc | 2 +- - content/child/runtime_features.cc | 2 ++ - .../renderer/modules/remoteplayback/remote_playback.cc | 2 +- - .../blink/renderer/platform/runtime_enabled_features.json5 | 4 ++-- - 5 files changed, 11 insertions(+), 5 deletions(-) + chrome/browser/media/router/media_router_feature.cc | 6 +++++- + chrome/browser/profiles/profile_impl.cc | 2 +- + content/child/runtime_features.cc | 2 ++ + .../renderer/modules/remoteplayback/remote_playback.cc | 2 +- + .../renderer/platform/runtime_enabled_features.json5 | 10 +++------- + 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/chrome/browser/media/router/media_router_feature.cc b/chrome/browser/media/router/media_router_feature.cc --- a/chrome/browser/media/router/media_router_feature.cc @@ -55,7 +55,7 @@ diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/p diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc --- a/content/child/runtime_features.cc +++ b/content/child/runtime_features.cc -@@ -587,6 +587,8 @@ void SetCustomizedRuntimeFeaturesFromCombinedArgs( +@@ -558,6 +558,8 @@ void SetCustomizedRuntimeFeaturesFromCombinedArgs( WebRuntimeFeatures::EnableBackForwardCache( content::IsBackForwardCacheEnabled()); @@ -67,7 +67,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features. diff --git a/third_party/blink/renderer/modules/remoteplayback/remote_playback.cc b/third_party/blink/renderer/modules/remoteplayback/remote_playback.cc --- a/third_party/blink/renderer/modules/remoteplayback/remote_playback.cc +++ b/third_party/blink/renderer/modules/remoteplayback/remote_playback.cc -@@ -92,7 +92,7 @@ KURL GetAvailabilityUrl(const WebURL& source, +@@ -99,7 +99,7 @@ KURL GetAvailabilityUrl(const WebURL& source, } bool IsBackgroundAvailabilityMonitoringDisabled() { @@ -79,18 +79,22 @@ diff --git a/third_party/blink/renderer/modules/remoteplayback/remote_playback.c diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -3218,10 +3218,10 @@ +@@ -3109,14 +3109,10 @@ base_feature: "none", }, { - name: "RemotePlaybackBackend", + name: "RemotePlaybackBackend", // disabled settable_from_internals: true, - // Tracking bug for the implementation: https://crbug.com/728609 -- status: {"Android": "stable", "default": "experimental"}, +- status: { +- "Android": "stable", +- "Win": "stable", +- "Mac": "stable", +- "Linux": "stable", +- "default": "experimental"}, ++ // Tracking bug for the implementation: https://crbug.com/728609 + status: "experimental", // by default }, { name: "RemoveDanglingMarkupInTarget", -- -2.25.1 diff --git a/build/patches/Disable-minidump-upload-scheduling.patch b/build/patches/Disable-minidump-upload-scheduling.patch index cf4cc452f..474f477d8 100644 --- a/build/patches/Disable-minidump-upload-scheduling.patch +++ b/build/patches/Disable-minidump-upload-scheduling.patch @@ -23,7 +23,7 @@ diff --git a/components/endpoint_fetcher/endpoint_fetcher.cc b/components/endpoi diff --git a/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/MinidumpUploadJobService.java b/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/MinidumpUploadJobService.java --- a/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/MinidumpUploadJobService.java +++ b/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/MinidumpUploadJobService.java -@@ -50,7 +50,10 @@ public abstract class MinidumpUploadJobService +@@ -52,7 +52,10 @@ public abstract class MinidumpUploadJobService extends JobService * to build an upload job for scheduling. */ public static void scheduleUpload(JobInfo.Builder jobInfoBuilder) { @@ -33,7 +33,6 @@ diff --git a/components/minidump_uploader/android/java/src/org/chromium/componen + return; + } JobScheduler scheduler = - (JobScheduler) ContextUtils.getApplicationContext().getSystemService( - Context.JOB_SCHEDULER_SERVICE); + (JobScheduler) + ContextUtils.getApplicationContext() -- -2.25.1 diff --git a/build/patches/Disable-offline-pages-in-CCT.patch b/build/patches/Disable-offline-pages-in-CCT.patch index 9d361f5e8..cc53099c4 100644 --- a/build/patches/Disable-offline-pages-in-CCT.patch +++ b/build/patches/Disable-offline-pages-in-CCT.patch @@ -15,4 +15,3 @@ new file mode 100644 @@ -0,0 +1 @@ +SET_CROMITE_FEATURE_DISABLED(kOfflinePagesInDownloadHomeOpenInCctFeature); -- -2.25.1 diff --git a/build/patches/Disable-omission-of-URL-elements-in-Omnibox.patch b/build/patches/Disable-omission-of-URL-elements-in-Omnibox.patch index cb573f7e1..e6f26b606 100644 --- a/build/patches/Disable-omission-of-URL-elements-in-Omnibox.patch +++ b/build/patches/Disable-omission-of-URL-elements-in-Omnibox.patch @@ -54,4 +54,3 @@ new file mode 100755 @@ -0,0 +1 @@ +SET_CROMITE_FEATURE_DISABLED(kAndroidVisibleUrlTruncation); -- -2.25.1 diff --git a/build/patches/Disable-plugins-enumeration.patch b/build/patches/Disable-plugins-enumeration.patch index 19b883e0f..c2bdfe42c 100644 --- a/build/patches/Disable-plugins-enumeration.patch +++ b/build/patches/Disable-plugins-enumeration.patch @@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -2079,9 +2079,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() { +@@ -2113,9 +2113,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() { } PluginData* LocalFrame::GetPluginData() const { @@ -21,4 +21,3 @@ diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/ void LocalFrame::SetAdTrackerForTesting(AdTracker* ad_tracker) { -- -2.25.1 diff --git a/build/patches/00Disable-prefers-reduced-transparency-media-query.patch b/build/patches/Disable-prefers-reduced-transparency-media-query.patch similarity index 97% rename from build/patches/00Disable-prefers-reduced-transparency-media-query.patch rename to build/patches/Disable-prefers-reduced-transparency-media-query.patch index e9c6f0b1c..6adea5372 100644 --- a/build/patches/00Disable-prefers-reduced-transparency-media-query.patch +++ b/build/patches/Disable-prefers-reduced-transparency-media-query.patch @@ -10,7 +10,7 @@ This feature can be used for fingerprinting as it exposes a user preference diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -3075,8 +3075,8 @@ +@@ -2957,8 +2957,8 @@ base_feature: "none", }, { @@ -22,4 +22,3 @@ diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 // This feature is deprecated and we are evangelizing affected sites. // See https://crbug.com/346236 for current status. -- -2.25.1 diff --git a/build/patches/00Disable-privacy-issues-in-password-manager.patch b/build/patches/Disable-privacy-issues-in-password-manager.patch similarity index 96% rename from build/patches/00Disable-privacy-issues-in-password-manager.patch rename to build/patches/Disable-privacy-issues-in-password-manager.patch index e71839366..f2f9109bf 100644 --- a/build/patches/00Disable-privacy-issues-in-password-manager.patch +++ b/build/patches/Disable-privacy-issues-in-password-manager.patch @@ -49,7 +49,7 @@ diff --git a/chrome/browser/password_manager/generated_password_leak_detection_p diff --git a/components/password_manager/core/browser/affiliation/affiliation_backend.cc b/components/password_manager/core/browser/affiliation/affiliation_backend.cc --- a/components/password_manager/core/browser/affiliation/affiliation_backend.cc +++ b/components/password_manager/core/browser/affiliation/affiliation_backend.cc -@@ -404,6 +404,7 @@ void AffiliationBackend::OnMalformedResponse( +@@ -409,6 +409,7 @@ void AffiliationBackend::OnMalformedResponse( } bool AffiliationBackend::OnCanSendNetworkRequest() { @@ -114,9 +114,9 @@ diff --git a/components/password_manager/core/browser/affiliation/facet_manager. diff --git a/components/password_manager/core/browser/features/password_features.cc b/components/password_manager/core/browser/features/password_features.cc --- a/components/password_manager/core/browser/features/password_features.cc +++ b/components/password_manager/core/browser/features/password_features.cc -@@ -209,4 +209,8 @@ BASE_FEATURE(kUsernameFirstFlowWithIntermediateValuesVoting, - "UsernameFirstFlowWithIntermediateValuesVoting", - base::FEATURE_ENABLED_BY_DEFAULT); +@@ -239,4 +239,8 @@ BASE_FEATURE(kUseGMSCoreForBrandingInfo, + base::FEATURE_DISABLED_BY_DEFAULT); + #endif +SET_CROMITE_FEATURE_ENABLED(kFillOnAccountSelect); +SET_CROMITE_FEATURE_DISABLED(kPasswordManagerEnableReceiverService); @@ -153,4 +153,3 @@ diff --git a/components/password_manager/core/browser/leak_detection/leak_detect void LeakDetectionCheckImpl::Start(LeakDetectionInitiator initiator, -- -2.25.1 diff --git a/build/patches/00Disable-ranker-url-fetcher.patch b/build/patches/Disable-ranker-url-fetcher.patch similarity index 99% rename from build/patches/00Disable-ranker-url-fetcher.patch rename to build/patches/Disable-ranker-url-fetcher.patch index 764fc16b1..c34b476f0 100644 --- a/build/patches/00Disable-ranker-url-fetcher.patch +++ b/build/patches/Disable-ranker-url-fetcher.patch @@ -29,4 +29,3 @@ diff --git a/components/translate/core/browser/translate_ranker_impl.cc b/compon std::ostream& operator<<(std::ostream& stream, -- -2.25.1 diff --git a/build/patches/Disable-references-to-fonts.googleapis.com.patch b/build/patches/Disable-references-to-fonts.googleapis.com.patch index 0383cfec9..6012bb56d 100644 --- a/build/patches/Disable-references-to-fonts.googleapis.com.patch +++ b/build/patches/Disable-references-to-fonts.googleapis.com.patch @@ -60,4 +60,3 @@ diff --git a/third_party/crashpad/crashpad/doc/support/crashpad_doxygen.css b/th body, table, -- -2.25.1 diff --git a/build/patches/00Disable-remote-altsvc-for-h3-connections.patch b/build/patches/Disable-remote-altsvc-for-h3-connections.patch similarity index 98% rename from build/patches/00Disable-remote-altsvc-for-h3-connections.patch rename to build/patches/Disable-remote-altsvc-for-h3-connections.patch index 7d725131b..0f260400f 100644 --- a/build/patches/00Disable-remote-altsvc-for-h3-connections.patch +++ b/build/patches/Disable-remote-altsvc-for-h3-connections.patch @@ -52,7 +52,7 @@ diff --git a/net/http/http_stream_factory_job_controller.cc b/net/http/http_stre diff --git a/net/quic/quic_context.h b/net/quic/quic_context.h --- a/net/quic/quic_context.h +++ b/net/quic/quic_context.h -@@ -179,7 +179,7 @@ struct NET_EXPORT QuicParams { +@@ -183,7 +183,7 @@ struct NET_EXPORT QuicParams { bool allow_server_migration = false; // If true, allows QUIC to use alternative services with a different // hostname from the origin. @@ -62,4 +62,3 @@ diff --git a/net/quic/quic_context.h b/net/quic/quic_context.h bool estimate_initial_rtt = false; // The initial rtt that will be used in crypto handshake if no cached -- -2.25.1 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 3ebc23383..2ed5b3692 100644 --- a/build/patches/Disable-requests-for-single-word-Omnibar-searches.patch +++ b/build/patches/Disable-requests-for-single-word-Omnibar-searches.patch @@ -43,4 +43,3 @@ diff --git a/chrome/browser/ui/omnibox/chrome_omnibox_navigation_observer.cc b/c ChromeOmniboxNavigationObserver::~ChromeOmniboxNavigationObserver() { -- -2.25.1 diff --git a/build/patches/Disable-safety-check.patch b/build/patches/Disable-safety-check.patch index 1c2e2ad93..91a4266e1 100644 --- a/build/patches/Disable-safety-check.patch +++ b/build/patches/Disable-safety-check.patch @@ -4,19 +4,19 @@ Subject: Disable safety check License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/android/BUILD.gn | 5 ----- - chrome/android/chrome_java_sources.gni | 1 - - chrome/android/java/res/xml/main_preferences.xml | 5 ----- - .../chrome/browser/settings/SettingsActivity.java | 9 --------- - .../chrome/browser/settings/SettingsLauncherImpl.java | 5 +---- - chrome/browser/BUILD.gn | 1 - - .../browser/omnibox/suggestions/action/OmniboxPedal.java | 3 --- - 7 files changed, 1 insertion(+), 28 deletions(-) + chrome/android/BUILD.gn | 5 ----- + chrome/android/chrome_java_sources.gni | 1 - + chrome/android/java/res/xml/main_preferences.xml | 5 ----- + .../chrome/browser/settings/SettingsActivity.java | 12 ------------ + .../browser/settings/SettingsLauncherImpl.java | 5 +---- + chrome/browser/BUILD.gn | 1 - + .../omnibox/suggestions/action/OmniboxPedal.java | 3 --- + 7 files changed, 1 insertion(+), 31 deletions(-) diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -391,7 +391,6 @@ if (current_toolchain == default_toolchain) { +@@ -397,7 +397,6 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/recent_tabs:helper_java", "//chrome/browser/recent_tabs:java", "//chrome/browser/safe_browsing/android:java", @@ -24,7 +24,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn "//chrome/browser/screenshot_monitor:java", "//chrome/browser/search_engines/android:java", "//chrome/browser/search_resumption:java", -@@ -1028,8 +1027,6 @@ if (current_toolchain == default_toolchain) { +@@ -1037,8 +1036,6 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/recent_tabs:java", "//chrome/browser/recent_tabs:junit", "//chrome/browser/recent_tabs/internal:junit", @@ -33,7 +33,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn "//chrome/browser/screenshot_monitor:java", "//chrome/browser/search_engines/android:java", "//chrome/browser/search_engines/android:junit", -@@ -1639,8 +1636,6 @@ if (current_toolchain == default_toolchain) { +@@ -1659,8 +1656,6 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/quick_delete:javatests", "//chrome/browser/safe_browsing/android:java", "//chrome/browser/safe_browsing/android:javatests", @@ -45,7 +45,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni --- a/chrome/android/chrome_java_sources.gni +++ b/chrome/android/chrome_java_sources.gni -@@ -1008,7 +1008,6 @@ chrome_java_sources = [ +@@ -1001,7 +1001,6 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingPasswordReuseDialogBridge.java", "java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingReferringAppBridge.java", "java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingSettingsLauncher.java", @@ -71,7 +71,7 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java -@@ -65,9 +65,6 @@ import org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxSettingsBaseFra +@@ -66,9 +66,6 @@ import org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxSettingsBaseFra import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.profiles.ProfileManagerUtils; import org.chromium.chrome.browser.safe_browsing.settings.SafeBrowsingSettingsFragmentBase; @@ -81,19 +81,22 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin import org.chromium.chrome.browser.search_engines.settings.SearchEngineSettings; import org.chromium.chrome.browser.signin.SyncConsentActivityLauncherImpl; import org.chromium.chrome.browser.site_settings.ChromeSiteSettingsDelegate; -@@ -523,12 +520,6 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity +@@ -550,15 +547,6 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity baseSiteSettingsFragment.setCustomTabIntentHelper( LaunchIntentDispatcher::createCustomTabActivityIntent); } - if (fragment instanceof SafetyCheckSettingsFragment) { -- SafetyCheckCoordinator.create((SafetyCheckSettingsFragment) fragment, -- new SafetyCheckUpdatesDelegateImpl(), mSettingsLauncher, -- SyncConsentActivityLauncherImpl.get(), getModalDialogManagerSupplier(), +- SafetyCheckCoordinator.create( +- (SafetyCheckSettingsFragment) fragment, +- new SafetyCheckUpdatesDelegateImpl(), +- mSettingsLauncher, +- SyncConsentActivityLauncherImpl.get(), +- getModalDialogManagerSupplier(), - SyncServiceFactory.getForProfile(mProfile)); - } if (fragment instanceof PasswordCheckFragmentView) { - PasswordCheckComponentUiFactory.create((PasswordCheckFragmentView) fragment, - HelpAndFeedbackLauncherImpl.getForProfile(mProfile), mSettingsLauncher, + PasswordCheckComponentUiFactory.create( + (PasswordCheckFragmentView) fragment, diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsLauncherImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsLauncherImpl.java --- a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsLauncherImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsLauncherImpl.java @@ -105,7 +108,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin import org.chromium.components.browser_ui.accessibility.AccessibilitySettings; import org.chromium.components.browser_ui.settings.SettingsLauncher; import org.chromium.components.browser_ui.site_settings.SiteSettings; -@@ -57,9 +56,7 @@ public class SettingsLauncherImpl implements SettingsLauncher { +@@ -56,9 +55,7 @@ public class SettingsLauncherImpl implements SettingsLauncher { break; case SettingsFragment.SAFETY_CHECK: @@ -119,14 +122,14 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -3517,7 +3517,6 @@ static_library("browser") { +@@ -3489,7 +3489,6 @@ static_library("browser") { "//chrome/browser/reading_list/android", "//chrome/browser/recent_tabs:jni_headers", "//chrome/browser/safe_browsing/android:safe_browsing_enums", - "//chrome/browser/safety_check/android", "//chrome/browser/search_resumption:jni_headers", - "//chrome/browser/share/core/crow:crow_configuration", "//chrome/browser/signin/services/android:jni_headers", + "//chrome/browser/sync/android:jni_headers", diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/action/OmniboxPedal.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/action/OmniboxPedal.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/action/OmniboxPedal.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/action/OmniboxPedal.java @@ -141,4 +144,3 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow delegate.openSettingsPage(SettingsFragment.SITE); break; -- -2.25.1 diff --git a/build/patches/Disable-smart-selection-by-default.patch b/build/patches/Disable-smart-selection-by-default.patch index 1d96ed039..4107a4d3e 100644 --- a/build/patches/Disable-smart-selection-by-default.patch +++ b/build/patches/Disable-smart-selection-by-default.patch @@ -13,10 +13,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../browser/contextualsearch/SelectionClientManager.java | 4 +++- chrome/browser/flags/android/chrome_feature_list.cc | 1 + .../org/chromium/chrome/browser/flags/ChromeFeatureList.java | 1 + - .../browser/selection/SelectionPopupControllerImpl.java | 2 +- + .../browser/selection/SelectionPopupControllerImpl.java | 1 - .../disable-smart-selection-by-default.inc | 3 +++ .../disable-smart-selection-by-default.inc | 1 + - 6 files changed, 10 insertions(+), 2 deletions(-) + 6 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/disable-smart-selection-by-default.inc create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/disable-smart-selection-by-default.inc @@ -44,7 +44,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearc diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc --- a/chrome/browser/flags/android/chrome_feature_list.cc +++ b/chrome/browser/flags/android/chrome_feature_list.cc -@@ -200,6 +200,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -198,6 +198,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kCCTClientDataHeader, &kCCTDeprecatedAPIs, &kCCTFeatureUsage, @@ -55,7 +55,7 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java -@@ -190,6 +190,7 @@ public abstract class ChromeFeatureList { +@@ -198,6 +198,7 @@ public abstract class ChromeFeatureList { public static final String CCT_REAL_TIME_ENGAGEMENT_SIGNALS_ALTERNATIVE_IMPL = "CCTRealTimeEngagementSignalsAlternativeImpl"; public static final String CCT_REDIRECT_PRECONNECT = "CCTRedirectPreconnect"; @@ -66,12 +66,11 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f diff --git a/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java b/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java --- a/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java +++ b/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java -@@ -1138,7 +1138,7 @@ public class SelectionPopupControllerImpl extends ActionModeCallbackHelper - */ - @Override +@@ -1172,7 +1172,6 @@ public class SelectionPopupControllerImpl extends ActionModeCallbackHelper public boolean canWebSearch() { -- return hasSelection() && !isFocusedNodeEditable() && !isIncognito() -+ return hasSelection() && !isFocusedNodeEditable() + return hasSelection() + && !isFocusedNodeEditable() +- && !isIncognito() && isSelectActionModeAllowed(MENU_ITEM_WEB_SEARCH); } @@ -90,4 +89,3 @@ new file mode 100644 @@ -0,0 +1 @@ +BASE_DECLARE_FEATURE(kChromeSmartSelection); -- -2.25.1 diff --git a/build/patches/Disable-some-signed-exchange-features.patch b/build/patches/Disable-some-signed-exchange-features.patch index c72e3a22e..e09ef6d4d 100644 --- a/build/patches/Disable-some-signed-exchange-features.patch +++ b/build/patches/Disable-some-signed-exchange-features.patch @@ -23,4 +23,3 @@ new file mode 100644 @@ -0,0 +1 @@ +SET_CROMITE_FEATURE_DISABLED(kSignedHTTPExchange); -- -2.25.1 diff --git a/build/patches/00Disable-speechSynthesis-getVoices-API.patch b/build/patches/Disable-speechSynthesis-getVoices-API.patch similarity index 96% rename from build/patches/00Disable-speechSynthesis-getVoices-API.patch rename to build/patches/Disable-speechSynthesis-getVoices-API.patch index 757823dc9..b84fe6fa3 100644 --- a/build/patches/00Disable-speechSynthesis-getVoices-API.patch +++ b/build/patches/Disable-speechSynthesis-getVoices-API.patch @@ -31,7 +31,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc -@@ -1605,7 +1605,7 @@ ChromeContentRendererClient::CreateWorkerContentSettingsClient( +@@ -1603,7 +1603,7 @@ ChromeContentRendererClient::CreateWorkerContentSettingsClient( std::unique_ptr ChromeContentRendererClient::CreateSpeechRecognitionClient( content::RenderFrame* render_frame) { @@ -43,7 +43,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc b/components/content_settings/renderer/content_settings_agent_impl.cc --- a/components/content_settings/renderer/content_settings_agent_impl.cc +++ b/components/content_settings/renderer/content_settings_agent_impl.cc -@@ -496,6 +496,14 @@ bool ContentSettingsAgentImpl::IsAllowlistedForContentSettings() const { +@@ -476,6 +476,14 @@ bool ContentSettingsAgentImpl::IsAllowlistedForContentSettings() const { return false; } @@ -58,7 +58,7 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc bool ContentSettingsAgentImpl::UpdateOverrides() { // Evaluate the content setting rules ContentSetting setting = CONTENT_SETTING_ALLOW; -@@ -506,7 +514,6 @@ bool ContentSettingsAgentImpl::UpdateOverrides() { +@@ -486,7 +494,6 @@ bool ContentSettingsAgentImpl::UpdateOverrides() { } return UpdateTimeZoneOverride( setting, content_setting_rules_->timezone_override_value); @@ -69,7 +69,7 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc diff --git a/components/content_settings/renderer/content_settings_agent_impl.h b/components/content_settings/renderer/content_settings_agent_impl.h --- a/components/content_settings/renderer/content_settings_agent_impl.h +++ b/components/content_settings/renderer/content_settings_agent_impl.h -@@ -117,6 +117,8 @@ class ContentSettingsAgentImpl +@@ -116,6 +116,8 @@ class ContentSettingsAgentImpl void SetRendererContentSettingRulesForTest( const RendererContentSettingRules& rules); @@ -139,7 +139,7 @@ new file mode 100644 diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/third_party/blink/public/platform/web_content_settings_client.h --- a/third_party/blink/public/platform/web_content_settings_client.h +++ b/third_party/blink/public/platform/web_content_settings_client.h -@@ -119,6 +119,8 @@ class WebContentSettingsClient { +@@ -115,6 +115,8 @@ class WebContentSettingsClient { // frame. virtual bool ShouldAutoupgradeMixedContent() { return true; } @@ -183,4 +183,3 @@ diff --git a/third_party/blink/renderer/modules/speech/speech_synthesis.cc b/thi VoicesDidChange(); } -- -2.25.1 diff --git a/build/patches/Disable-support-for-RAR-files-inspection.patch b/build/patches/Disable-support-for-RAR-files-inspection.patch index a1745ad4b..3fea92122 100644 --- a/build/patches/Disable-support-for-RAR-files-inspection.patch +++ b/build/patches/Disable-support-for-RAR-files-inspection.patch @@ -92,4 +92,3 @@ diff --git a/chrome/utility/safe_browsing/archive_analyzer.cc b/chrome/utility/s return std::make_unique(); } else if (file_type == DownloadFileType::SEVEN_ZIP) { -- -2.25.1 diff --git a/build/patches/Disable-text-fragments-by-default.patch b/build/patches/Disable-text-fragments-by-default.patch index 41aef4223..5eff35acc 100644 --- a/build/patches/Disable-text-fragments-by-default.patch +++ b/build/patches/Disable-text-fragments-by-default.patch @@ -34,7 +34,7 @@ diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.cc b/chrome/browser/ui/pre diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc --- a/content/child/runtime_features.cc +++ b/content/child/runtime_features.cc -@@ -301,6 +301,8 @@ void SetRuntimeFeaturesFromChromiumFeatures() { +@@ -292,6 +292,8 @@ void SetRuntimeFeaturesFromChromiumFeatures() { #endif {wf::EnableTouchDragAndContextMenu, raw_ref(features::kTouchDragAndContextMenu)}, @@ -74,7 +74,7 @@ new file mode 100644 diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc --- a/third_party/blink/renderer/core/dom/document.cc +++ b/third_party/blink/renderer/core/dom/document.cc -@@ -4441,9 +4441,14 @@ void Document::SetURL(const KURL& url) { +@@ -4432,9 +4432,14 @@ void Document::SetURL(const KURL& url) { TRACE_EVENT1("navigation", "Document::SetURL", "url", new_url.GetString().Utf8()); @@ -92,7 +92,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -3834,10 +3834,9 @@ +@@ -3703,10 +3703,9 @@ }, { name: "TextFragmentIdentifiers", @@ -106,4 +106,3 @@ diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 { name: "TextFragmentTapOpensContextMenu", -- -2.25.1 diff --git a/build/patches/Disable-the-DIAL-repeating-discovery.patch b/build/patches/Disable-the-DIAL-repeating-discovery.patch index fedfaebf3..b23bfcd02 100644 --- a/build/patches/Disable-the-DIAL-repeating-discovery.patch +++ b/build/patches/Disable-the-DIAL-repeating-discovery.patch @@ -33,4 +33,3 @@ diff --git a/chrome/browser/media/router/discovery/dial/dial_registry.cc b/chrom } -- -2.25.1 diff --git a/build/patches/Disable-third-party-origin-trials.patch b/build/patches/Disable-third-party-origin-trials.patch index 42725a0d6..686cd2210 100644 --- a/build/patches/Disable-third-party-origin-trials.patch +++ b/build/patches/Disable-third-party-origin-trials.patch @@ -75,7 +75,7 @@ diff --git a/components/embedder_support/origin_trials/origin_trial_policy_impl. diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc -@@ -8375,7 +8375,6 @@ void NavigationRequest::SetSourceSiteInstanceToInitiatorIfNeeded() { +@@ -8520,7 +8520,6 @@ void NavigationRequest::SetSourceSiteInstanceToInitiatorIfNeeded() { void NavigationRequest::ForceEnableOriginTrials( const std::vector& trials) { DCHECK(!HasCommitted()); @@ -86,7 +86,7 @@ diff --git a/content/browser/renderer_host/navigation_request.cc b/content/brows diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -482,10 +482,6 @@ void FillNavigationParamsRequest( +@@ -483,10 +483,6 @@ void FillNavigationParamsRequest( common_params.initiator_origin.value(); } @@ -97,7 +97,7 @@ diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_fra navigation_params->was_discarded = commit_params.was_discarded; navigation_params->document_ukm_source_id = commit_params.document_ukm_source_id; -@@ -513,12 +509,6 @@ void FillNavigationParamsRequest( +@@ -514,12 +510,6 @@ void FillNavigationParamsRequest( navigation_params->had_transient_user_activation = common_params.has_user_gesture; @@ -110,7 +110,7 @@ diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_fra if (!commit_params.early_hints_preloaded_resources.empty()) { navigation_params->early_hints_preloaded_resources = WebVector(); for (const auto& resource : commit_params.early_hints_preloaded_resources) { -@@ -580,11 +570,6 @@ blink::mojom::CommonNavigationParamsPtr MakeCommonNavigationParams( +@@ -581,11 +571,6 @@ blink::mojom::CommonNavigationParamsPtr MakeCommonNavigationParams( info->url_request.GetURLRequestExtraData().get()); DCHECK(url_request_extra_data); @@ -122,7 +122,7 @@ diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_fra blink::NavigationDownloadPolicy download_policy; download_policy.ApplyDownloadFramePolicy( info->is_opener_navigation, info->url_request.HasUserGesture(), -@@ -607,7 +592,7 @@ blink::mojom::CommonNavigationParamsPtr MakeCommonNavigationParams( +@@ -608,7 +593,7 @@ blink::mojom::CommonNavigationParamsPtr MakeCommonNavigationParams( info->url_request.HasUserGesture(), info->url_request.HasTextFragmentToken(), info->should_check_main_world_content_security_policy, @@ -207,7 +207,7 @@ diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_p return result; } -@@ -2922,10 +2909,6 @@ void DocumentLoader::CreateParserPostCommit() { +@@ -2942,10 +2929,6 @@ void DocumentLoader::CreateParserPostCommit() { mojom::blink::OriginTrialFeature::kTouchEventFeatureDetection); } @@ -257,8 +257,7 @@ diff --git a/third_party/blink/renderer/core/origin_trials/origin_trial_context. bool OriginTrialContext::CanEnableTrialFromName(const StringView& trial_name) { + if ((true)) return false; - if (trial_name == "Portals") - return base::FeatureList::IsEnabled(features::kPortals); + if (trial_name == "PrivacySandboxAdsAPIs") + return base::FeatureList::IsEnabled(features::kPrivacySandboxAdsAPIs); -- -2.25.1 diff --git a/build/patches/Disable-update-scheduler.patch b/build/patches/Disable-update-scheduler.patch index 2978b059f..08d35e406 100644 --- a/build/patches/Disable-update-scheduler.patch +++ b/build/patches/Disable-update-scheduler.patch @@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java --- a/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java -@@ -66,7 +66,7 @@ public class ChromeBackgroundTaskFactory implements BackgroundTaskFactory { +@@ -67,7 +67,7 @@ public class ChromeBackgroundTaskFactory implements BackgroundTaskFactory { case TaskIds.WEBAPK_UPDATE_JOB_ID: return new WebApkUpdateTask(); case TaskIds.COMPONENT_UPDATE_JOB_ID: @@ -20,4 +20,3 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/background_task return new BackgroundSyncBackgroundTask(); case TaskIds.NOTIFICATION_SCHEDULER_JOB_ID: -- -2.25.1 diff --git a/build/patches/Disable-various-metrics.patch b/build/patches/Disable-various-metrics.patch index 69b832f34..f19b83982 100644 --- a/build/patches/Disable-various-metrics.patch +++ b/build/patches/Disable-various-metrics.patch @@ -24,7 +24,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java --- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java -@@ -60,7 +60,7 @@ public abstract class FirstRunActivityBase +@@ -63,7 +63,7 @@ public abstract class FirstRunActivityBase extends AsyncInitializationActivity static final String SHOW_SEARCH_ENGINE_PAGE = "ShowSearchEnginePage"; static final String SHOW_SYNC_CONSENT_PAGE = "ShowSyncConsent"; @@ -91,7 +91,7 @@ diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/br diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc --- a/chrome/browser/browser_process_impl.cc +++ b/chrome/browser/browser_process_impl.cc -@@ -1047,7 +1047,7 @@ void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { +@@ -1051,7 +1051,7 @@ void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { #endif // BUILDFLAG(IS_CHROMEOS_ASH) registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled, @@ -103,15 +103,15 @@ diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_pro diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc -@@ -81,7 +81,6 @@ +@@ -84,7 +84,6 @@ #include "chrome/browser/hid/chrome_hid_delegate.h" #include "chrome/browser/interstitials/enterprise_util.h" #include "chrome/browser/lifetime/browser_shutdown.h" -#include "chrome/browser/lookalikes/lookalike_url_navigation_throttle.h" #include "chrome/browser/media/audio_service_util.h" + #include "chrome/browser/media/prefs/capture_device_ranking.h" #include "chrome/browser/media/router/media_router_feature.h" - #include "chrome/browser/media/webrtc/audio_debug_recordings_handler.h" -@@ -5062,16 +5061,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( +@@ -5030,16 +5029,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( content::NavigationHandle* handle) { std::vector> throttles; @@ -128,7 +128,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch #if BUILDFLAG(ENABLE_SUPERVISED_USERS) MaybeAddThrottle( SupervisedUserNavigationThrottle::MaybeCreateThrottleFor(handle), -@@ -5172,10 +5161,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( +@@ -5140,10 +5129,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( throttle_manager->MaybeAppendNavigationThrottles(handle, &throttles); } @@ -222,11 +222,10 @@ diff --git a/components/ntp_tiles/most_visited_sites.cc b/components/ntp_tiles/m diff --git a/services/metrics/public/cpp/ukm_recorder.cc b/services/metrics/public/cpp/ukm_recorder.cc --- a/services/metrics/public/cpp/ukm_recorder.cc +++ b/services/metrics/public/cpp/ukm_recorder.cc -@@ -116,4 +116,5 @@ ukm::SourceId UkmRecorder::GetSourceIdFromScopeImpl(const GURL& scope_url, - return source_id; +@@ -130,4 +130,5 @@ void UkmRecorder::RemoveObserver(Observer* observer) { + observers_.RemoveObserver(observer); } +SET_CROMITE_FEATURE_DISABLED(kUkmFeature); } // namespace ukm -- -2.25.1 diff --git a/build/patches/00Disable-visited-pseudo-class.patch b/build/patches/Disable-visited-pseudo-class.patch similarity index 99% rename from build/patches/00Disable-visited-pseudo-class.patch rename to build/patches/Disable-visited-pseudo-class.patch index c24783d24..50195373c 100644 --- a/build/patches/00Disable-visited-pseudo-class.patch +++ b/build/patches/Disable-visited-pseudo-class.patch @@ -63,4 +63,3 @@ diff --git a/components/visitedlink/common/visitedlink_common.cc b/components/vi // wasn't found). This loop will terminate as long as the table isn't full, // which should be enforced by AddFingerprint. -- -2.25.1 diff --git a/build/patches/00Disallow-Android-App-Scheme-as-referrer.patch b/build/patches/Disallow-Android-App-Scheme-as-referrer.patch similarity index 99% rename from build/patches/00Disallow-Android-App-Scheme-as-referrer.patch rename to build/patches/Disallow-Android-App-Scheme-as-referrer.patch index 02a293ab3..edb3a498a 100644 --- a/build/patches/00Disallow-Android-App-Scheme-as-referrer.patch +++ b/build/patches/Disallow-Android-App-Scheme-as-referrer.patch @@ -22,4 +22,3 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer // or javascript: URLs typed in the omnibox. WebSecurityPolicy::RegisterURLSchemeAsNotAllowingJavascriptURLs( -- -2.25.1 diff --git a/build/patches/Disallowing-MIDI-permission-by-default.patch b/build/patches/Disallowing-MIDI-permission-by-default.patch new file mode 100644 index 000000000..e58ac8942 --- /dev/null +++ b/build/patches/Disallowing-MIDI-permission-by-default.patch @@ -0,0 +1,17 @@ +From: uazo +Date: Sat, 3 Jun 2023 13:11:22 +0000 +Subject: Disallowing MIDI permission by default + +License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html +--- + .../Disallowing-MIDI-permission-by-default.inc | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 cromite_flags/content/public/common/content_features_cc/Disallowing-MIDI-permission-by-default.inc + +diff --git a/cromite_flags/content/public/common/content_features_cc/Disallowing-MIDI-permission-by-default.inc b/cromite_flags/content/public/common/content_features_cc/Disallowing-MIDI-permission-by-default.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/content/public/common/content_features_cc/Disallowing-MIDI-permission-by-default.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_ENABLED(kBlockMidiByDefault); +-- diff --git a/build/patches/Do-not-build-API-keys-infobar.patch b/build/patches/Do-not-build-API-keys-infobar.patch index 786b9defe..bd5b9ee49 100644 --- a/build/patches/Do-not-build-API-keys-infobar.patch +++ b/build/patches/Do-not-build-API-keys-infobar.patch @@ -11,7 +11,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn -@@ -1410,8 +1410,6 @@ static_library("ui") { +@@ -1421,8 +1421,6 @@ static_library("ui") { "singleton_tabs.h", "startup/automation_infobar_delegate.cc", "startup/automation_infobar_delegate.h", @@ -34,4 +34,3 @@ diff --git a/chrome/browser/ui/startup/infobar_utils.cc b/chrome/browser/ui/star PrefService* local_state = g_browser_process->local_state(); if (!local_state || -- -2.25.1 diff --git a/build/patches/Do-not-compile-QR-code-sharing.patch b/build/patches/Do-not-compile-QR-code-sharing.patch index 5c3f8c4be..be297b389 100644 --- a/build/patches/Do-not-compile-QR-code-sharing.patch +++ b/build/patches/Do-not-compile-QR-code-sharing.patch @@ -5,16 +5,16 @@ Subject: Do not compile QR code sharing License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- chrome/android/BUILD.gn | 1 - - .../chrome/browser/ui/RootUiCoordinator.java | 5 ----- + .../chrome/browser/ui/RootUiCoordinator.java | 5 ---- chrome/browser/share/BUILD.gn | 2 -- - ...omeProvidedSharingOptionsProviderBase.java | 19 ------------------- - chrome/browser/share/android/java_sources.gni | 11 ----------- - 5 files changed, 38 deletions(-) + ...omeProvidedSharingOptionsProviderBase.java | 23 ------------------- + chrome/browser/share/android/java_sources.gni | 11 --------- + 5 files changed, 42 deletions(-) diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -3456,7 +3456,6 @@ generate_jni("chrome_jni_headers") { +@@ -3471,7 +3471,6 @@ generate_jni("chrome_jni_headers") { "../browser/share/android/java/src/org/chromium/chrome/browser/share/link_to_text/LinkToTextBridge.java", "../browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/LongScreenshotsTabService.java", "../browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/bitmap_generation/LongScreenshotsTabServiceFactory.java", @@ -25,7 +25,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java -@@ -114,7 +114,6 @@ import org.chromium.chrome.browser.share.ShareButtonController; +@@ -112,7 +112,6 @@ import org.chromium.chrome.browser.share.ShareButtonController; import org.chromium.chrome.browser.share.ShareDelegate; import org.chromium.chrome.browser.share.ShareDelegate.ShareOrigin; import org.chromium.chrome.browser.share.ShareUtils; @@ -33,7 +33,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordi import org.chromium.chrome.browser.share.scroll_capture.ScrollCaptureManager; import org.chromium.chrome.browser.tab.AccessibilityVisibilityHandler; import org.chromium.chrome.browser.tab.AutofillSessionLifetimeController; -@@ -552,10 +551,6 @@ public class RootUiCoordinator +@@ -574,10 +573,6 @@ public class RootUiCoordinator } public void onAttachFragment(Fragment fragment) { @@ -67,7 +67,7 @@ diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/s import org.chromium.chrome.browser.share.send_tab_to_self.SendTabToSelfAndroidBridge; import org.chromium.chrome.browser.share.send_tab_to_self.SendTabToSelfCoordinator; import org.chromium.chrome.browser.share.share_sheet.ChromeOptionShareCallback; -@@ -287,9 +286,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase { +@@ -303,9 +302,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase { } private void maybeAddQrCodeFirstPartyOption() { @@ -77,22 +77,26 @@ diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/s } private void maybeAddScreenshotFirstPartyOption() { -@@ -441,21 +437,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase { +@@ -486,25 +482,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase { .build(); } - private FirstPartyOption createQrCodeFirstPartyOption() { - return new FirstPartyOptionBuilder( -- ContentType.LINK_PAGE_VISIBLE, ContentType.LINK_PAGE_NOT_VISIBLE, ContentType.IMAGE) +- ContentType.LINK_PAGE_VISIBLE, +- ContentType.LINK_PAGE_NOT_VISIBLE, +- ContentType.IMAGE) - .setDetailedContentTypesToDisableFor( - DetailedContentType.WEB_NOTES, DetailedContentType.SCREENSHOT) - .setIcon(R.drawable.qr_code, R.string.qr_code_share_icon_label) - .setFeatureNameForMetrics(USER_ACTION_QR_CODE_SELECTED) -- .setOnClickCallback((view) -> { -- QrCodeCoordinator qrCodeCoordinator = -- new QrCodeCoordinator(mActivity, mUrl, mShareParams.getWindow()); -- qrCodeCoordinator.show(); -- }) +- .setOnClickCallback( +- (view) -> { +- QrCodeCoordinator qrCodeCoordinator = +- new QrCodeCoordinator( +- mActivity, mUrl, mShareParams.getWindow()); +- qrCodeCoordinator.show(); +- }) - .build(); - } - @@ -121,4 +125,3 @@ diff --git a/chrome/browser/share/android/java_sources.gni b/chrome/browser/shar "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/screenshot/EditorScreenshotTask.java", "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/screenshot/ScreenshotCoordinator.java", -- -2.25.1 diff --git a/build/patches/Do-not-ignore-download-location-prompt-setting.patch b/build/patches/Do-not-ignore-download-location-prompt-setting.patch index 6134dcb58..022159984 100644 --- a/build/patches/Do-not-ignore-download-location-prompt-setting.patch +++ b/build/patches/Do-not-ignore-download-location-prompt-setting.patch @@ -10,20 +10,21 @@ Do not tick "Don't show again" by default License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - .../DownloadLocationDialogCoordinator.java | 15 --------------- - 1 file changed, 15 deletions(-) + .../DownloadLocationDialogCoordinator.java | 16 ---------------- + 1 file changed, 16 deletions(-) diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java --- a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java +++ b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java -@@ -131,21 +131,6 @@ public class DownloadLocationDialogCoordinator implements ModalDialogProperties. +@@ -138,22 +138,6 @@ public class DownloadLocationDialogCoordinator implements ModalDialogProperties. * @param dirs An list of available download directories. */ private void onDirectoryOptionsRetrieved(ArrayList dirs) { - // If there is only one directory available, don't show the default dialog, and set the - // download directory to default. Dialog will still show for other types of dialogs, like - // name conflict or disk error or if Incognito download warning is needed. -- if (dirs.size() == 1 && !mLocationDialogManaged +- if (dirs.size() == 1 +- && !mLocationDialogManaged - && mDialogType == DownloadLocationDialogType.DEFAULT - && !shouldShowIncognitoWarning()) { - final DirectoryOption dir = dirs.get(0); @@ -39,4 +40,3 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse if (mDialogModel != null) return; -- -2.25.1 diff --git a/build/patches/Do-not-link-with-libatomic.patch b/build/patches/Do-not-link-with-libatomic.patch index a753716d5..dc4825382 100644 --- a/build/patches/Do-not-link-with-libatomic.patch +++ b/build/patches/Do-not-link-with-libatomic.patch @@ -14,7 +14,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/base/BUILD.gn b/base/BUILD.gn --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -1107,7 +1107,7 @@ component("base") { +@@ -1100,7 +1100,7 @@ component("base") { # more robust check for this. if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos)) && host_toolchain != "//build/toolchain/cros:host") { @@ -24,4 +24,3 @@ diff --git a/base/BUILD.gn b/base/BUILD.gn if (use_allocator_shim) { -- -2.25.1 diff --git a/build/patches/Do-not-store-passwords-by-default.patch b/build/patches/Do-not-store-passwords-by-default.patch index c79c4d4fc..bdc846948 100644 --- a/build/patches/Do-not-store-passwords-by-default.patch +++ b/build/patches/Do-not-store-passwords-by-default.patch @@ -40,4 +40,3 @@ diff --git a/components/password_manager/core/browser/password_manager.cc b/comp registry->RegisterIntegerPref( prefs::kCurrentMigrationVersionToGoogleMobileServices, 0); -- -2.25.1 diff --git a/build/patches/DoH-improvements.patch b/build/patches/DoH-improvements.patch index 94a611172..ac37ead3c 100644 --- a/build/patches/DoH-improvements.patch +++ b/build/patches/DoH-improvements.patch @@ -82,7 +82,7 @@ diff --git a/net/dns/dns_client.cc b/net/dns/dns_client.cc diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc --- a/net/dns/host_resolver_manager.cc +++ b/net/dns/host_resolver_manager.cc -@@ -3143,6 +3143,7 @@ void HostResolverManager::SetDnsConfigOverrides(DnsConfigOverrides overrides) { +@@ -3139,6 +3139,7 @@ void HostResolverManager::SetDnsConfigOverrides(DnsConfigOverrides overrides) { bool changed = dns_client_->SetConfigOverrides(std::move(overrides)); if (changed) { @@ -91,4 +91,3 @@ diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc // Only invalidate cache if new overrides have resulted in a config change. -- -2.25.1 diff --git a/build/patches/00Enable-Android-Dynamic-Performance-Framework.patch b/build/patches/Enable-Android-Dynamic-Performance-Framework.patch similarity index 94% rename from build/patches/00Enable-Android-Dynamic-Performance-Framework.patch rename to build/patches/Enable-Android-Dynamic-Performance-Framework.patch index 77c77c6c9..1784fddfc 100644 --- a/build/patches/00Enable-Android-Dynamic-Performance-Framework.patch +++ b/build/patches/Enable-Android-Dynamic-Performance-Framework.patch @@ -23,7 +23,7 @@ diff --git a/chrome/version.gni b/chrome/version.gni diff --git a/components/viz/common/features.cc b/components/viz/common/features.cc --- a/components/viz/common/features.cc +++ b/components/viz/common/features.cc -@@ -306,9 +306,10 @@ const base::FeatureParam kADPFMidFrameBoostDurationMultiplier{ +@@ -303,9 +303,10 @@ BASE_FEATURE(kDelegateTransforms, // If enabled, Chrome includes the Renderer Main thread(s) into the // ADPF(Android Dynamic Performance Framework) hint session. @@ -37,4 +37,3 @@ diff --git a/components/viz/common/features.cc b/components/viz/common/features. // 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/Enable-Certificate-Transparency.patch b/build/patches/Enable-Certificate-Transparency.patch index 351df39cb..e2682096d 100644 --- a/build/patches/Enable-Certificate-Transparency.patch +++ b/build/patches/Enable-Certificate-Transparency.patch @@ -9,7 +9,7 @@ by default. License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- chrome/browser/browser_features.h | 1 + - chrome/browser/net/system_network_context_manager.cc | 6 +----- + chrome/browser/net/system_network_context_manager.cc | 2 +- chrome/browser/ssl/sct_reporting_service.cc | 5 +++++ .../about_flags_cc/Enable-Certificate-Transparency.inc | 9 +++++++++ .../Enable-Certificate-Transparency.inc | 6 ++++++ @@ -18,7 +18,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html net/url_request/report_sender.cc | 3 ++- services/network/network_context.cc | 2 +- services/network/sct_auditing/sct_auditing_handler.cc | 2 ++ - 10 files changed, 32 insertions(+), 9 deletions(-) + 10 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Enable-Certificate-Transparency.inc create mode 100644 cromite_flags/chrome/browser/browser_features_cc/Enable-Certificate-Transparency.inc create mode 100644 cromite_flags/chrome/common/chrome_features_cc/Enable-Certificate-Transparency.inc @@ -26,7 +26,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/browser_features.h b/chrome/browser/browser_features.h --- a/chrome/browser/browser_features.h +++ b/chrome/browser/browser_features.h -@@ -54,6 +54,7 @@ BASE_DECLARE_FEATURE(kTabCaptureBlueBorderCrOS); +@@ -62,6 +62,7 @@ BASE_DECLARE_FEATURE(kTabCaptureBlueBorderCrOS); BASE_DECLARE_FEATURE(kWebUsbDeviceDetection); @@ -37,22 +37,11 @@ diff --git a/chrome/browser/browser_features.h b/chrome/browser/browser_features diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc --- a/chrome/browser/net/system_network_context_manager.cc +++ b/chrome/browser/net/system_network_context_manager.cc -@@ -986,7 +986,6 @@ void SystemNetworkContextManager::SetEnableCertificateTransparencyForTesting( - bool SystemNetworkContextManager::IsCertificateTransparencyEnabled() { - if (certificate_transparency_enabled_for_testing_.has_value()) - return certificate_transparency_enabled_for_testing_.value(); --#if defined(OFFICIAL_BUILD) - // TODO(carlosil): Figure out if we can/should remove the OFFICIAL_BUILD - // check now that enforcement does not rely on build dates. - // Certificate Transparency is enabled: -@@ -994,10 +993,7 @@ bool SystemNetworkContextManager::IsCertificateTransparencyEnabled() { - // - on an opt-in basis for other builds and embedders, controlled with the - // kCertificateTransparencyAskBeforeEnabling flag +@@ -982,7 +982,7 @@ bool SystemNetworkContextManager::IsCertificateTransparencyEnabled() { + // - on an opt-in basis for other builds and embedders, controlled with the + // kCertificateTransparencyAskBeforeEnabling flag return base::FeatureList::IsEnabled( - features::kCertificateTransparencyAskBeforeEnabling); --#else -- return false; --#endif // defined(OFFICIAL_BUILD) + features::kCertificateTransparency); } @@ -60,8 +49,8 @@ diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/brows diff --git a/chrome/browser/ssl/sct_reporting_service.cc b/chrome/browser/ssl/sct_reporting_service.cc --- a/chrome/browser/ssl/sct_reporting_service.cc +++ b/chrome/browser/ssl/sct_reporting_service.cc -@@ -211,6 +211,11 @@ void SetSCTAuditingEnabledForStoragePartition( - } // namespace +@@ -203,6 +203,11 @@ SCTReportingService::SCTReportingService( + SCTReportingService::~SCTReportingService() = default; network::mojom::SCTAuditingMode SCTReportingService::GetReportingMode() { + if ((true)) { @@ -107,7 +96,7 @@ new file mode 100644 diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_state.cc --- a/net/http/transport_security_state.cc +++ b/net/http/transport_security_state.cc -@@ -329,6 +329,7 @@ class HSTSPreloadDecoder : public net::extras::PreloadDecoder { +@@ -327,6 +327,7 @@ class HSTSPreloadDecoder : public net::extras::PreloadDecoder { bool DecodeHSTSPreload(const std::string& search_hostname, PreloadResult* out) { #if !BUILDFLAG(INCLUDE_TRANSPORT_SECURITY_STATE_PRELOAD_LIST) @@ -115,7 +104,7 @@ diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_ if (g_hsts_source == nullptr) return false; #endif -@@ -374,8 +375,8 @@ bool DecodeHSTSPreload(const std::string& search_hostname, PreloadResult* out) { +@@ -372,8 +373,8 @@ bool DecodeHSTSPreload(const std::string& search_hostname, PreloadResult* out) { // static BASE_FEATURE(kCertificateTransparencyEnforcement, @@ -142,7 +131,7 @@ diff --git a/net/url_request/report_sender.cc b/net/url_request/report_sender.cc diff --git a/services/network/network_context.cc b/services/network/network_context.cc --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -2821,7 +2821,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2797,7 +2797,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( // TransportSecurityState. Since no requests have been made yet, safe to do // this even after the call to Build(). @@ -171,4 +160,3 @@ diff --git a/services/network/sct_auditing/sct_auditing_handler.cc b/services/ne auto reporter = std::make_unique( owner_network_context_, reporter_key, std::move(report), -- -2.25.1 diff --git a/build/patches/00Enable-Document-Open-Inheritance-Removal.patch b/build/patches/Enable-Document-Open-Inheritance-Removal.patch similarity index 97% rename from build/patches/00Enable-Document-Open-Inheritance-Removal.patch rename to build/patches/Enable-Document-Open-Inheritance-Removal.patch index 00dedad44..1a3dcdbbf 100644 --- a/build/patches/00Enable-Document-Open-Inheritance-Removal.patch +++ b/build/patches/Enable-Document-Open-Inheritance-Removal.patch @@ -11,7 +11,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc --- a/third_party/blink/renderer/core/dom/document.cc +++ b/third_party/blink/renderer/core/dom/document.cc -@@ -3419,70 +3419,6 @@ void Document::open(LocalDOMWindow* entered_window, +@@ -3421,70 +3421,6 @@ void Document::open(LocalDOMWindow* entered_window, // https://chromestatus.com/metrics/feature/timeline/popularity/4375 CountUse(WebFeature::kDocumentOpenMutateSandbox); } @@ -85,7 +85,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -1490,7 +1490,6 @@ +@@ -1439,7 +1439,6 @@ { name: "DocumentOpenSandboxInheritanceRemoval", status: "stable", @@ -94,4 +94,3 @@ diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 { name: "DocumentPictureInPictureAPI", -- -2.25.1 diff --git a/build/patches/Enable-ECH-by-default.patch b/build/patches/Enable-ECH-by-default.patch index be75b2683..20739b767 100644 --- a/build/patches/Enable-ECH-by-default.patch +++ b/build/patches/Enable-ECH-by-default.patch @@ -16,4 +16,3 @@ new file mode 100644 +SET_CROMITE_FEATURE_ENABLED(kEncryptedClientHello); +SET_CROMITE_FEATURE_ENABLED(kEncryptedClientHelloQuic); -- -2.25.1 diff --git a/build/patches/Enable-HEVC-by-default.patch b/build/patches/Enable-HEVC-by-default.patch index cdbc7e549..04c83a07b 100644 --- a/build/patches/Enable-HEVC-by-default.patch +++ b/build/patches/Enable-HEVC-by-default.patch @@ -12,7 +12,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc --- a/media/base/media_switches.cc +++ b/media/base/media_switches.cc -@@ -340,8 +340,8 @@ BASE_FEATURE(kEnableTabMuting, +@@ -348,8 +348,8 @@ BASE_FEATURE(kEnableTabMuting, #if BUILDFLAG(ENABLE_PLATFORM_HEVC) // Enables HEVC hardware accelerated decoding. BASE_FEATURE(kPlatformHEVCDecoderSupport, @@ -24,4 +24,3 @@ diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_ANDROID) // Enables HEVC hardware accelerated encoding for Windows, Mac, and Android. -- -2.25.1 diff --git a/build/patches/00Enable-ImprovedBookmarks-by-default.patch b/build/patches/Enable-ImprovedBookmarks-by-default.patch similarity index 82% rename from build/patches/00Enable-ImprovedBookmarks-by-default.patch rename to build/patches/Enable-ImprovedBookmarks-by-default.patch index 46a30cb47..bc8900a7e 100644 --- a/build/patches/00Enable-ImprovedBookmarks-by-default.patch +++ b/build/patches/Enable-ImprovedBookmarks-by-default.patch @@ -5,10 +5,10 @@ Subject: Enable ImprovedBookmarks by default License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- chrome/android/java/res/layout/bookmark_search_box_row.xml | 4 ++-- - .../chromium/chrome/browser/bookmarks/BookmarkFeatures.java | 2 +- .../browser/bookmarks/BookmarkSearchBoxRowViewBinder.java | 2 ++ .../chromium/chrome/browser/bookmarks/BookmarkUiPrefs.java | 2 +- .../org/chromium/chrome/browser/bookmarks/BookmarkUtils.java | 3 ++- + .../org/chromium/chrome/browser/flags/ChromeFeatureList.java | 2 +- components/bookmarks/browser/bookmark_client.cc | 3 +-- .../Enable-ImprovedBookmarks-by-default.inc | 1 + 7 files changed, 10 insertions(+), 7 deletions(-) @@ -28,18 +28,6 @@ diff --git a/chrome/android/java/res/layout/bookmark_search_box_row.xml b/chrome android:orientation="horizontal"> RegisterFilePathPref(prefs::kDiskCacheDir, base::FilePath()); registry->RegisterIntegerPref(prefs::kDiskCacheSize, 0); registry->RegisterStringPref(prefs::kIsolateOrigins, std::string()); @@ -29,7 +29,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch registry->RegisterBooleanPref(prefs::kTabFreezingEnabled, true); registry->RegisterIntegerPref(prefs::kSCTAuditingHashdanceReportCount, 0); registry->RegisterBooleanPref( -@@ -1605,7 +1605,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs( +@@ -1574,7 +1574,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs( // user policy in addition to the same named ones in Local State (which are // used for mapping the command-line flags). registry->RegisterStringPref(prefs::kIsolateOrigins, std::string()); @@ -78,4 +78,3 @@ new file mode 100644 @@ -0,0 +1 @@ +SET_CROMITE_FEATURE_ENABLED(kStrictOriginIsolation); -- -2.25.1 diff --git a/build/patches/Enable-darken-websites-checkbox-in-themes.patch b/build/patches/Enable-darken-websites-checkbox-in-themes.patch index 1f23075be..943f37ecf 100644 --- a/build/patches/Enable-darken-websites-checkbox-in-themes.patch +++ b/build/patches/Enable-darken-websites-checkbox-in-themes.patch @@ -14,7 +14,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json -@@ -1508,9 +1508,9 @@ +@@ -1554,9 +1554,9 @@ "expiry_milestone": 125 }, { @@ -26,7 +26,7 @@ diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.js + "expiry_milestone": -1 }, { - "name": "data-retention-policies-disable-sync-types-needed", + "name": "dcheck-is-fatal", diff --git a/cromite_flags/components/content_settings/core/common/features_cc/Enable-darken-websites-checkbox-in-themes.inc b/cromite_flags/components/content_settings/core/common/features_cc/Enable-darken-websites-checkbox-in-themes.inc new file mode 100644 --- /dev/null @@ -38,4 +38,3 @@ new file mode 100644 + +#endif // BUILDFLAG(IS_ANDROID) -- -2.25.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 0c718bd5c..faf0df8bd 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 @@ -57,4 +57,3 @@ diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn if (fatal_linker_warnings && !is_apple && current_os != "aix" && current_os != "zos") { -- -2.25.1 diff --git a/build/patches/00Enable-gwp-asan-on-Android.patch b/build/patches/Enable-gwp-asan-on-Android.patch similarity index 84% rename from build/patches/00Enable-gwp-asan-on-Android.patch rename to build/patches/Enable-gwp-asan-on-Android.patch index ca3262485..feb65690b 100644 --- a/build/patches/00Enable-gwp-asan-on-Android.patch +++ b/build/patches/Enable-gwp-asan-on-Android.patch @@ -14,15 +14,14 @@ in android there is a test function accessible in the developer settings. chrome/app/chrome_main_delegate.cc | 2 +- chrome/browser/platform_util_android.cc | 32 +++++++++++++++++++ .../chrome/browser/util/PlatformUtil.java | 10 ++++++ - components/gwp_asan/client/gwp_asan.cc | 18 ++++++++--- - .../gwp_asan/client/gwp_asan_features.cc | 3 +- + components/gwp_asan/client/gwp_asan.cc | 10 +++--- components/memory_system/memory_system.cc | 1 + - 11 files changed, 86 insertions(+), 9 deletions(-) + 10 files changed, 76 insertions(+), 8 deletions(-) diff --git a/android_webview/lib/aw_main_delegate.cc b/android_webview/lib/aw_main_delegate.cc --- a/android_webview/lib/aw_main_delegate.cc +++ b/android_webview/lib/aw_main_delegate.cc -@@ -464,7 +464,7 @@ void AwMainDelegate::InitializeMemorySystem(const bool is_browser_process) { +@@ -397,7 +397,7 @@ void AwMainDelegate::InitializeMemorySystem(const bool is_browser_process) { const std::string process_type = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( switches::kProcessType); @@ -91,15 +90,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tracing/setting import org.chromium.components.browser_ui.settings.SettingsUtils; import org.chromium.components.version_info.Channel; import org.chromium.components.version_info.VersionConstants; -@@ -22,6 +25,7 @@ import org.chromium.components.version_info.VersionInfo; - */ +@@ -20,6 +23,7 @@ import org.chromium.components.version_info.VersionInfo; + /** Settings fragment containing preferences aimed at Chrome and web developers. */ public class DeveloperSettings extends PreferenceFragmentCompat { private static final String UI_PREF_BETA_STABLE_HINT = "beta_stable_hint"; + private static final String TEST_GWP_ASAN_KEY = "test_gwp_asan"; // Non-translated strings: private static final String MSG_DEVELOPER_OPTIONS_TITLE = "Developer options"; -@@ -56,5 +60,21 @@ public class DeveloperSettings extends PreferenceFragmentCompat { +@@ -54,5 +58,21 @@ public class DeveloperSettings extends PreferenceFragmentCompat { if (VersionInfo.isBetaBuild() || VersionInfo.isStableBuild()) { getPreferenceScreen().removePreference(findPreference(UI_PREF_BETA_STABLE_HINT)); } @@ -124,7 +123,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tracing/setting diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc --- a/chrome/app/chrome_main_delegate.cc +++ b/chrome/app/chrome_main_delegate.cc -@@ -1935,7 +1935,7 @@ void ChromeMainDelegate::InitializeMemorySystem() { +@@ -1939,7 +1939,7 @@ void ChromeMainDelegate::InitializeMemorySystem() { const version_info::Channel channel = chrome::GetChannel(); const bool is_canary_dev = (channel == version_info::Channel::CANARY || channel == version_info::Channel::DEV); @@ -183,7 +182,7 @@ diff --git a/chrome/browser/util/android/java/src/org/chromium/chrome/browser/ut import org.chromium.base.ContextUtils; import org.chromium.base.Log; -@@ -32,4 +33,13 @@ public class PlatformUtil { +@@ -30,4 +31,13 @@ public class PlatformUtil { Log.e(TAG, "cannot find activity to launch %s", url, e); } } @@ -200,42 +199,32 @@ diff --git a/chrome/browser/util/android/java/src/org/chromium/chrome/browser/ut diff --git a/components/gwp_asan/client/gwp_asan.cc b/components/gwp_asan/client/gwp_asan.cc --- a/components/gwp_asan/client/gwp_asan.cc +++ b/components/gwp_asan/client/gwp_asan.cc -@@ -38,7 +38,7 @@ namespace gwp_asan { - namespace internal { - namespace { - --constexpr bool kCpuIs64Bit = -+[[maybe_unused]] constexpr bool kCpuIs64Bit = - #if defined(ARCH_CPU_64_BITS) - true; - #else -@@ -72,7 +72,15 @@ constexpr int kDefaultMaxMetadata = 210; +@@ -76,21 +76,21 @@ constexpr int kDefaultMaxMetadata = 210; constexpr int kDefaultTotalPages = kCpuIs64Bit ? 2048 : kDefaultMaxMetadata * 2; constexpr int kDefaultAllocationSamplingMultiplier = 1500; constexpr int kDefaultAllocationSamplingRange = 16; -constexpr double kDefaultProcessSamplingProbability = 0.01; +constexpr double kDefaultProcessSamplingProbability = 0.5; -+constexpr int kDefaultProcessSamplingBoost2 = 10; -+#elif BUILDFLAG(IS_ANDROID) -+constexpr int kDefaultMaxAllocations = 70; -+constexpr int kDefaultMaxMetadata = 255; -+constexpr int kDefaultTotalPages = 512; -+constexpr int kDefaultAllocationSamplingMultiplier = 2000; -+constexpr int kDefaultAllocationSamplingRange = 20; + #elif BUILDFLAG(IS_ANDROID) + constexpr int kDefaultMaxAllocations = 70; + constexpr int kDefaultMaxMetadata = 255; + constexpr int kDefaultTotalPages = 512; + constexpr int kDefaultAllocationSamplingMultiplier = 2000; + constexpr int kDefaultAllocationSamplingRange = 20; +-constexpr double kDefaultProcessSamplingProbability = 0.015; +constexpr double kDefaultProcessSamplingProbability = 0.5; - constexpr int kDefaultProcessSamplingBoost2 = 10; - #else // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA) + #else constexpr int kDefaultMaxAllocations = 70; -@@ -80,7 +88,7 @@ constexpr int kDefaultMaxMetadata = 255; + constexpr int kDefaultMaxMetadata = 255; constexpr int kDefaultTotalPages = kCpuIs64Bit ? 2048 : kDefaultMaxMetadata * 2; constexpr int kDefaultAllocationSamplingMultiplier = 1000; constexpr int kDefaultAllocationSamplingRange = 16; -constexpr double kDefaultProcessSamplingProbability = 0.015; +constexpr double kDefaultProcessSamplingProbability = 0.5; - constexpr int kDefaultProcessSamplingBoost2 = 10; #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || // BUILDFLAG(IS_FUCHSIA) -@@ -288,7 +296,7 @@ void EnableForMalloc(bool boost_sampling, const char* process_type) { + constexpr int kDefaultProcessSamplingBoost2 = 10; +@@ -415,7 +415,7 @@ void EnableForMalloc(bool boost_sampling, const char* process_type) { std::ignore = init_once; #else std::ignore = internal::kGwpAsanMalloc; @@ -244,7 +233,7 @@ diff --git a/components/gwp_asan/client/gwp_asan.cc b/components/gwp_asan/client #endif // BUILDFLAG(USE_ALLOCATOR_SHIM) } -@@ -308,7 +316,7 @@ void EnableForPartitionAlloc(bool boost_sampling, const char* process_type) { +@@ -435,7 +435,7 @@ void EnableForPartitionAlloc(bool boost_sampling, const char* process_type) { std::ignore = init_once; #else std::ignore = internal::kGwpAsanPartitionAlloc; @@ -253,23 +242,10 @@ diff --git a/components/gwp_asan/client/gwp_asan.cc b/components/gwp_asan/client #endif // BUILDFLAG(USE_PARTITION_ALLOC) } -diff --git a/components/gwp_asan/client/gwp_asan_features.cc b/components/gwp_asan/client/gwp_asan_features.cc ---- a/components/gwp_asan/client/gwp_asan_features.cc -+++ b/components/gwp_asan/client/gwp_asan_features.cc -@@ -9,7 +9,8 @@ - namespace gwp_asan::internal { - - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_LINUX) || \ -- BUILDFLAG(IS_CHROMEOS) -+ BUILDFLAG(IS_CHROMEOS) || \ -+ (BUILDFLAG(IS_ANDROID) && defined(ARCH_CPU_64_BITS)) - constexpr base::FeatureState kDefaultEnabled = base::FEATURE_ENABLED_BY_DEFAULT; - #else - constexpr base::FeatureState kDefaultEnabled = diff --git a/components/memory_system/memory_system.cc b/components/memory_system/memory_system.cc --- a/components/memory_system/memory_system.cc +++ b/components/memory_system/memory_system.cc -@@ -169,6 +169,7 @@ void MemorySystem::Impl::Initialize( +@@ -197,6 +197,7 @@ void MemorySystem::Impl::Initialize( if (gwp_asan_parameters) { InitializeGwpASan(*gwp_asan_parameters, initialization_data); @@ -278,4 +254,3 @@ diff --git a/components/memory_system/memory_system.cc b/components/memory_syste if (profiling_client_parameters) { -- -2.25.1 diff --git a/build/patches/Enable-native-Android-autofill.patch b/build/patches/Enable-native-Android-autofill.patch index d448c2945..76339bc1f 100644 --- a/build/patches/Enable-native-Android-autofill.patch +++ b/build/patches/Enable-native-Android-autofill.patch @@ -15,46 +15,39 @@ See also: https://github.com/bromite/bromite/issues/547 Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - android_webview/browser/aw_autofill_client.cc | 3 +- chrome/android/BUILD.gn | 1 + .../settings/PasswordSettings.java | 81 ++++++++++++++++++- - .../chromium/chrome/browser/tab/TabImpl.java | 51 ++++++++++++ + .../chromium/chrome/browser/tab/TabImpl.java | 55 +++++++++++++ .../browser/tab/TabViewAndroidDelegate.java | 14 ++++ chrome/browser/BUILD.gn | 7 ++ chrome/browser/android/tab_android.cc | 15 ++++ chrome/browser/android/tab_android.h | 2 + .../strings/android_chrome_strings.grd | 6 ++ .../ui/autofill/chrome_autofill_client.cc | 8 +- + components/android_autofill/browser/BUILD.gn | 1 + .../browser/android_autofill_manager.cc | 2 +- .../browser/android_autofill_manager.h | 4 +- - .../browser/content_autofill_driver.cc | 53 ++++++++++++ + .../autofill/AutofillManagerWrapper.java | 5 +- + .../components/autofill/AutofillProvider.java | 7 ++ + .../BrowserSelectionActionMenuDelegate.java | 62 ++++++++++++++ + .../browser/content_autofill_driver.cc | 57 +++++++++++++ .../content/browser/content_autofill_driver.h | 9 ++- .../content_autofill_driver_factory.cc | 11 ++- .../browser/content_autofill_driver_factory.h | 1 + .../renderer/password_autofill_agent.cc | 5 +- + .../autofill/core/browser/autofill_driver.h | 2 + .../autofill/core/common/autofill_prefs.cc | 6 ++ .../autofill/core/common/autofill_prefs.h | 2 + .../embedder_support/view/ContentView.java | 46 +++++++++++ + .../selection/FloatingPastePopupMenu.java | 3 +- .../chromium/ui/base/ViewAndroidDelegate.java | 8 ++ - 21 files changed, 326 insertions(+), 9 deletions(-) + 26 files changed, 410 insertions(+), 10 deletions(-) + create mode 100644 components/android_autofill/browser/java/src/org/chromium/components/autofill/BrowserSelectionActionMenuDelegate.java -diff --git a/android_webview/browser/aw_autofill_client.cc b/android_webview/browser/aw_autofill_client.cc ---- a/android_webview/browser/aw_autofill_client.cc -+++ b/android_webview/browser/aw_autofill_client.cc -@@ -369,7 +369,8 @@ AwAutofillClient::AwAutofillClient(WebContents* contents, - ? base::BindRepeating(&autofill::AndroidDriverInitHook, this) - : base::BindRepeating(&autofill::BrowserDriverInitHook, - this, -- base::android::GetDefaultLocaleString())) -+ base::android::GetDefaultLocaleString(), -+ /*enable_secondary_autofill_manager*/ false)) - #if DCHECK_IS_ON() - , - use_android_autofill_manager_(use_android_autofill_manager) diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -418,6 +418,7 @@ if (current_toolchain == default_toolchain) { +@@ -424,6 +424,7 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/ui/android/hats:message_ui_delegate_java", "//chrome/browser/ui/android/layouts:java", "//chrome/browser/ui/android/layouts/glue:java", @@ -65,7 +58,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java --- a/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java -@@ -59,13 +59,18 @@ import java.lang.annotation.Retention; +@@ -59,6 +59,11 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.Locale; @@ -77,15 +70,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage /** * The "Passwords" screen in Settings, which allows the user to enable or disable password saving, * to view saved passwords (just the username and URL), and to delete saved passwords. - */ +@@ -66,7 +71,7 @@ import java.util.Locale; public class PasswordSettings extends ChromeBaseSettingsFragment - implements PasswordListObserver, Preference.OnPreferenceClickListener, -- SyncService.SyncStateChangedListener { -+ SyncService.SyncStateChangedListener, INeedSnackbarManager { - @IntDef({TrustedVaultBannerState.NOT_SHOWN, TrustedVaultBannerState.OFFER_OPT_IN, - TrustedVaultBannerState.OPTED_IN}) - @Retention(RetentionPolicy.SOURCE) -@@ -92,6 +97,12 @@ public class PasswordSettings extends ChromeBaseSettingsFragment + implements PasswordListObserver, + Preference.OnPreferenceClickListener, +- SyncService.SyncStateChangedListener { ++ SyncService.SyncStateChangedListener, INeedSnackbarManager { + @IntDef({ + TrustedVaultBannerState.NOT_SHOWN, + TrustedVaultBannerState.OFFER_OPT_IN, +@@ -96,6 +101,12 @@ public class PasswordSettings extends ChromeBaseSettingsFragment public static final String PREF_TRUSTED_VAULT_BANNER = "trusted_vault_banner"; public static final String PREF_KEY_MANAGE_ACCOUNT_LINK = "manage_account_link"; @@ -98,7 +92,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage private static final String PREF_KEY_CATEGORY_SAVED_PASSWORDS = "saved_passwords"; private static final String PREF_KEY_CATEGORY_EXCEPTIONS = "exceptions"; private static final String PREF_KEY_SAVED_PASSWORDS_NO_TEXT = "saved_passwords_no_text"; -@@ -124,6 +135,8 @@ public class PasswordSettings extends ChromeBaseSettingsFragment +@@ -128,6 +139,8 @@ public class PasswordSettings extends ChromeBaseSettingsFragment private Preference mLinkPref; private Menu mMenu; @@ -107,7 +101,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage private @ManagePasswordsReferrer int mManagePasswordsReferrer; private BottomSheetController mBottomSheetController; -@@ -298,6 +311,7 @@ public class PasswordSettings extends ChromeBaseSettingsFragment +@@ -302,6 +315,7 @@ public class PasswordSettings extends ChromeBaseSettingsFragment } createSavePasswordsSwitch(); @@ -115,7 +109,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage if (shouldShowAutoSigninOption()) { createAutoSignInCheckbox(); } -@@ -561,6 +575,71 @@ public class PasswordSettings extends ChromeBaseSettingsFragment +@@ -575,6 +589,71 @@ public class PasswordSettings extends ChromeBaseSettingsFragment getPrefService().getBoolean(Pref.CREDENTIALS_ENABLE_SERVICE)); } @@ -190,7 +184,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java -@@ -75,6 +75,17 @@ import org.chromium.url.GURL; +@@ -74,6 +74,18 @@ import org.chromium.url.GURL; import java.nio.ByteBuffer; @@ -200,15 +194,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav +import android.view.ViewStructure; +import android.view.autofill.AutofillValue; +import org.chromium.components.autofill.AutofillProvider; -+import org.chromium.components.autofill.AutofillSelectionMenuItemProvider; ++import org.chromium.components.autofill.AutofillSelectionMenuItemHelper; ++import org.chromium.components.autofill.BrowserSelectionActionMenuDelegate; +import org.chromium.content_public.browser.SelectionPopupController; +import org.chromium.chrome.browser.preferences.Pref; +import org.chromium.components.user_prefs.UserPrefs; + /** - * Implementation of the interface {@link Tab}. Contains and manages a {@link ContentView}. - * This class is not intended to be extended. -@@ -236,6 +247,8 @@ public class TabImpl implements Tab { + * Implementation of the interface {@link Tab}. Contains and manages a {@link ContentView}. This + * class is not intended to be extended. +@@ -224,6 +236,8 @@ class TabImpl implements Tab { */ private @Nullable @TabLaunchType Integer mTabLaunchTypeAtCreation; @@ -217,7 +212,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav /** * Creates an instance of a {@link TabImpl}. Package-private. Use {@link TabBuilder} to create * an instance. -@@ -816,6 +829,11 @@ public class TabImpl implements Tab { +@@ -844,6 +858,11 @@ class TabImpl implements Tab { for (TabObserver observer : mObservers) observer.onDestroyed(this); mObservers.clear(); @@ -229,7 +224,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav mUserDataHost.destroy(); mTabViewManager.destroy(); hideNativePage(false, null); -@@ -1393,6 +1411,16 @@ public class TabImpl implements Tab { +@@ -1424,6 +1443,16 @@ class TabImpl implements Tab { return mWebContentsState == null ? -1 : mWebContentsState.version(); } @@ -246,7 +241,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav /** * Initializes the {@link WebContents}. Completes the browser content components initialization * around a native WebContents pointer. -@@ -1448,6 +1476,28 @@ public class TabImpl implements Tab { +@@ -1491,6 +1520,30 @@ class TabImpl implements Tab { this)); mWebContents.notifyRendererPreferenceUpdate(); @@ -267,37 +262,40 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav + TabImplJni.get().initializeAutofillIfNecessary(mNativeTabAndroid); + mAutofillProvider.setWebContents(webContents); + cv.setWebContents(webContents); -+ selectionController.setNonSelectionAdditionalMenuItemProvider( -+ new AutofillSelectionMenuItemProvider( -+ getContext(), mAutofillProvider)); ++ BrowserSelectionActionMenuDelegate selectionActionMenuDelegate = ++ new BrowserSelectionActionMenuDelegate(); ++ selectionActionMenuDelegate.setAutofillSelectionMenuItemHelper( ++ new AutofillSelectionMenuItemHelper(getContext(), mAutofillProvider)); ++ selectionController.setSelectionActionMenuDelegate(selectionActionMenuDelegate); + } + } TabHelpers.initWebContentsHelpers(this); notifyContentChanged(); } finally { -@@ -1875,6 +1925,7 @@ public class TabImpl implements Tab { - void setActiveNavigationEntryTitleForUrl(long nativeTabAndroid, String url, String title); - void loadOriginalImage(long nativeTabAndroid); +@@ -1954,6 +2007,8 @@ class TabImpl implements Tab { + boolean handleNonNavigationAboutURL(GURL url); + + void initializeAutofillIfNecessary(long nativeTabAndroid); ++ void onShow(long nativeTabAndroid); } } diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndroidDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndroidDelegate.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndroidDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndroidDelegate.java -@@ -21,6 +21,10 @@ import org.chromium.ui.dragdrop.DragAndDropBrowserDelegate; - import org.chromium.ui.dragdrop.DragAndDropDelegate; +@@ -20,6 +20,10 @@ import org.chromium.ui.base.WindowAndroid; + import org.chromium.ui.dragdrop.DragAndDropBrowserDelegate; import org.chromium.ui.dragdrop.DragStateTracker; +import android.util.SparseArray; +import android.view.autofill.AutofillValue; +import android.view.ViewStructure; + - /** - * Implementation of the abstract class {@link ViewAndroidDelegate} for Chrome. - */ -@@ -86,6 +90,16 @@ public class TabViewAndroidDelegate extends ViewAndroidDelegate { + /** Implementation of the abstract class {@link ViewAndroidDelegate} for Chrome. */ + public class TabViewAndroidDelegate extends ViewAndroidDelegate { + private final TabImpl mTab; +@@ -83,6 +87,16 @@ public class TabViewAndroidDelegate extends ViewAndroidDelegate { mTab.onBackgroundColorChanged(color); } @@ -317,7 +315,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndr diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -2688,6 +2688,13 @@ static_library("browser") { +@@ -2664,6 +2664,13 @@ static_library("browser") { deps += [ "//chrome/browser/error_reporting" ] } @@ -375,7 +373,7 @@ diff --git a/chrome/browser/android/tab_android.h b/chrome/browser/android/tab_a diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd -@@ -654,6 +654,12 @@ CHAR_LIMIT guidelines: +@@ -634,6 +634,12 @@ CHAR_LIMIT guidelines: Save passwords @@ -391,7 +389,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.cc b/chrome/browser/ui/autofill/chrome_autofill_client.cc --- a/chrome/browser/ui/autofill/chrome_autofill_client.cc +++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc -@@ -1346,7 +1346,13 @@ ChromeAutofillClient::ChromeAutofillClient(content::WebContents* web_contents) +@@ -1359,7 +1359,13 @@ ChromeAutofillClient::ChromeAutofillClient(content::WebContents* web_contents) web_contents, base::BindRepeating(&BrowserDriverInitHook, this, @@ -406,10 +404,21 @@ diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.cc b/chrome/brows content::WebContentsObserver(web_contents), log_manager_( // TODO(crbug.com/928595): Replace the closure with a callback to the +diff --git a/components/android_autofill/browser/BUILD.gn b/components/android_autofill/browser/BUILD.gn +--- a/components/android_autofill/browser/BUILD.gn ++++ b/components/android_autofill/browser/BUILD.gn +@@ -40,6 +40,7 @@ android_library("java") { + "java/src/org/chromium/components/autofill/AutofillProviderUMA.java", + "java/src/org/chromium/components/autofill/AutofillRequest.java", + "java/src/org/chromium/components/autofill/AutofillSelectionMenuItemHelper.java", ++ "java/src/org/chromium/components/autofill/BrowserSelectionActionMenuDelegate.java", + "java/src/org/chromium/components/autofill/FormData.java", + "java/src/org/chromium/components/autofill/FormFieldData.java", + "java/src/org/chromium/components/autofill/PrefillRequest.java", diff --git a/components/android_autofill/browser/android_autofill_manager.cc b/components/android_autofill/browser/android_autofill_manager.cc --- a/components/android_autofill/browser/android_autofill_manager.cc +++ b/components/android_autofill/browser/android_autofill_manager.cc -@@ -25,7 +25,7 @@ using base::TimeTicks; +@@ -26,7 +26,7 @@ using base::TimeTicks; void AndroidDriverInitHook(AutofillClient* client, ContentAutofillDriver* driver) { driver->set_autofill_manager( @@ -421,9 +430,9 @@ diff --git a/components/android_autofill/browser/android_autofill_manager.cc b/c diff --git a/components/android_autofill/browser/android_autofill_manager.h b/components/android_autofill/browser/android_autofill_manager.h --- a/components/android_autofill/browser/android_autofill_manager.h +++ b/components/android_autofill/browser/android_autofill_manager.h -@@ -83,12 +83,12 @@ class AndroidAutofillManager : public AutofillManager, - const FieldTypeGroup field_type_group, - const url::Origin& triggered_origin); +@@ -91,12 +91,12 @@ class AndroidAutofillManager : public AutofillManager, + const std::u16string& value, + PopupItemId popup_item_id) override; + AndroidAutofillManager(AutofillDriver* driver, AutofillClient* client); + @@ -436,162 +445,296 @@ diff --git a/components/android_autofill/browser/android_autofill_manager.h b/co void OnFormSubmittedImpl(const FormData& form, bool known_success, mojom::SubmissionSource source) override; +diff --git a/components/android_autofill/browser/java/src/org/chromium/components/autofill/AutofillManagerWrapper.java b/components/android_autofill/browser/java/src/org/chromium/components/autofill/AutofillManagerWrapper.java +--- a/components/android_autofill/browser/java/src/org/chromium/components/autofill/AutofillManagerWrapper.java ++++ b/components/android_autofill/browser/java/src/org/chromium/components/autofill/AutofillManagerWrapper.java +@@ -51,6 +51,7 @@ public class AutofillManagerWrapper { + AutofillManagerWrapper manager = mManager.get(); + if (manager == null) return; + manager.mIsAutofillInputUIShowing = (event == EVENT_INPUT_SHOWN); ++ if (manager.isLoggable()) manager.log("onAutofillEvent isAutofillInputUIShowing: " + manager.mIsAutofillInputUIShowing); + if (event == EVENT_INPUT_SHOWN) manager.notifyInputUIChange(); + } + } +@@ -89,6 +90,7 @@ public class AutofillManagerWrapper { + // Uses Exception to catch various cases. (refer to crbug.com/1186406) + Log.e(TAG, "getAutofillServiceComponentName", e); + } ++ if (isLoggable()) log("componentName=" + componentName); + if (componentName != null) { + mIsAwGCurrentAutofillService = + AWG_COMPONENT_NAME.equals(componentName.flattenToString()); +@@ -247,7 +249,7 @@ public class AutofillManagerWrapper { + /** Always check isLoggable() before call this method. */ + public static void log(String log) { + // Log.i() instead of Log.d() is used here because log.d() is stripped out in release build. +- Log.i(TAG, log); ++ Log.i(TAG, "---" + log); + } + + public static boolean isLoggable() { +@@ -260,6 +262,7 @@ public class AutofillManagerWrapper { + // NOTE: See the comment on TAG above for why this is still AwAutofillManager. + // Check the system setting directly. + sIsLoggable = android.util.Log.isLoggable(TAG, Log.DEBUG); ++ // sIsLoggable = true; // to force enable the log + } + + } +diff --git a/components/android_autofill/browser/java/src/org/chromium/components/autofill/AutofillProvider.java b/components/android_autofill/browser/java/src/org/chromium/components/autofill/AutofillProvider.java +--- a/components/android_autofill/browser/java/src/org/chromium/components/autofill/AutofillProvider.java ++++ b/components/android_autofill/browser/java/src/org/chromium/components/autofill/AutofillProvider.java +@@ -190,13 +190,19 @@ public class AutofillProvider { + + /** @return whether query autofill suggestion. */ + public boolean shouldQueryAutofillSuggestion() { ++ AutofillManagerWrapper.log("---shouldQueryAutofillSuggestion" + ++ " mRequest != null=" + (mRequest != null) + ++ " mRequest.getFocusField() != null=" + (mRequest != null && mRequest.getFocusField() != null) + ++ " !mAutofillManager.isAutofillInputUIShowing()=" + ( !mAutofillManager.isAutofillInputUIShowing())); + return mRequest != null + && mRequest.getFocusField() != null + && !mAutofillManager.isAutofillInputUIShowing(); + } + + public void queryAutofillSuggestion() { ++ AutofillManagerWrapper.log("queryAutofillSuggestion start"); + if (shouldQueryAutofillSuggestion()) { ++ AutofillManagerWrapper.log("calling requestAutofill"); + FocusField focusField = mRequest.getFocusField(); + mAutofillManager.requestAutofill( + mContainerView, +@@ -256,6 +262,7 @@ public class AutofillProvider { + float width, + float height, + boolean hasServerPrediction) { ++ AutofillManagerWrapper.log("startAutofillSession"); + // Check focusField inside short value? Autofill Manager might have session that wasn't + // started by AutofillProvider, we just always cancel existing session here. + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) { +diff --git a/components/android_autofill/browser/java/src/org/chromium/components/autofill/BrowserSelectionActionMenuDelegate.java b/components/android_autofill/browser/java/src/org/chromium/components/autofill/BrowserSelectionActionMenuDelegate.java +new file mode 100644 +--- /dev/null ++++ b/components/android_autofill/browser/java/src/org/chromium/components/autofill/BrowserSelectionActionMenuDelegate.java +@@ -0,0 +1,62 @@ ++// Copyright 2023 The Chromium Authors ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++package org.chromium.components.autofill; ++ ++import android.content.pm.ResolveInfo; ++ ++import androidx.annotation.IntDef; ++import androidx.annotation.NonNull; ++ ++import org.chromium.base.metrics.RecordHistogram; ++import org.chromium.components.autofill.AutofillSelectionMenuItemHelper; ++import org.chromium.content_public.browser.SelectionMenuItem; ++import org.chromium.content_public.browser.SelectionPopupController; ++import org.chromium.content_public.browser.selection.SelectionActionMenuDelegate; ++ ++import java.lang.annotation.Retention; ++import java.lang.annotation.RetentionPolicy; ++import java.util.ArrayList; ++import java.util.List; ++ ++import org.chromium.base.Log; ++ ++/** Interface for customizing text selection menu items in {@link SelectionPopupController} */ ++public class BrowserSelectionActionMenuDelegate implements SelectionActionMenuDelegate { ++ private AutofillSelectionMenuItemHelper mAutofillSelectionMenuItemHelper; ++ ++ public BrowserSelectionActionMenuDelegate() { ++ } ++ ++ @Override ++ public void modifyDefaultMenuItems( ++ List menuItemBuilders, ++ boolean isSelectionPassword, ++ @NonNull String selectedText) { ++ } ++ ++ @Override ++ public List filterTextProcessingActivities(List activities) { ++ return activities; ++ } ++ ++ @NonNull ++ @Override ++ public List getAdditionalNonSelectionItems() { ++ if (mAutofillSelectionMenuItemHelper != null) { ++ return mAutofillSelectionMenuItemHelper.getAdditionalItems(); ++ } ++ return new ArrayList<>(); ++ } ++ ++ @NonNull ++ @Override ++ public List getAdditionalTextProcessingItems() { ++ return new ArrayList<>(); ++ } ++ ++ public void setAutofillSelectionMenuItemHelper(AutofillSelectionMenuItemHelper provider) { ++ mAutofillSelectionMenuItemHelper = provider; ++ } ++} diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/components/autofill/content/browser/content_autofill_driver.cc --- a/components/autofill/content/browser/content_autofill_driver.cc +++ b/components/autofill/content/browser/content_autofill_driver.cc -@@ -489,6 +489,10 @@ void ContentAutofillDriver::FormsSeen( +@@ -455,6 +455,10 @@ void ContentAutofillDriver::FormsSeen( const std::vector& removed_forms) { target->GetAutofillManager().OnFormsSeen( WithNewVersion(updated_forms), removed_forms); -+ if (target->secondary_autofill_manager_) { -+ target->secondary_autofill_manager_->OnFormsSeen( ++ if (target->secondary_autofill_manager()) { ++ target->secondary_autofill_manager()->OnFormsSeen( + WithNewVersion(updated_forms), removed_forms); + } }); } -@@ -516,6 +520,10 @@ void ContentAutofillDriver::FormSubmitted( +@@ -482,6 +486,10 @@ void ContentAutofillDriver::FormSubmitted( } target->GetAutofillManager().OnFormSubmitted( WithNewVersion(form), known_success, submission_source); -+ if (target->secondary_autofill_manager_) { -+ target->secondary_autofill_manager_->OnFormSubmitted( ++ if (target->secondary_autofill_manager()) { ++ target->secondary_autofill_manager()->OnFormSubmitted( + WithNewVersion(form), known_success, submission_source); + } }); } -@@ -537,6 +545,10 @@ void ContentAutofillDriver::TextFieldDidChange(const FormData& raw_form, +@@ -503,6 +511,10 @@ void ContentAutofillDriver::TextFieldDidChange(const FormData& raw_form, base::TimeTicks timestamp) { target->GetAutofillManager().OnTextFieldDidChange( WithNewVersion(form), field, bounding_box, timestamp); -+ if (target->secondary_autofill_manager_) { -+ target->secondary_autofill_manager_->OnTextFieldDidChange( ++ if (target->secondary_autofill_manager()) { ++ target->secondary_autofill_manager()->OnTextFieldDidChange( + WithNewVersion(form), field, bounding_box, timestamp); + } }); } -@@ -556,6 +568,10 @@ void ContentAutofillDriver::TextFieldDidScroll(const FormData& raw_form, +@@ -522,6 +534,10 @@ void ContentAutofillDriver::TextFieldDidScroll(const FormData& raw_form, const FormFieldData& field, const gfx::RectF& bounding_box) { target->GetAutofillManager().OnTextFieldDidScroll(WithNewVersion(form), field, bounding_box); -+ if (target->secondary_autofill_manager_) { -+ target->secondary_autofill_manager_->OnTextFieldDidScroll( ++ if (target->secondary_autofill_manager()) { ++ target->secondary_autofill_manager()->OnTextFieldDidScroll( + WithNewVersion(form), field, bounding_box); + } }); } -@@ -576,6 +592,10 @@ void ContentAutofillDriver::SelectControlDidChange( +@@ -542,6 +558,10 @@ void ContentAutofillDriver::SelectControlDidChange( const FormFieldData& field, const gfx::RectF& bounding_box) { target->GetAutofillManager().OnSelectControlDidChange( WithNewVersion(form), field, bounding_box); -+ if (target->secondary_autofill_manager_) { -+ target->secondary_autofill_manager_->OnSelectControlDidChange( ++ if (target->secondary_autofill_manager()) { ++ target->secondary_autofill_manager()->OnSelectControlDidChange( + WithNewVersion(form), field, bounding_box); + } }); } -@@ -598,6 +618,10 @@ void ContentAutofillDriver::AskForValuesToFill( +@@ -564,6 +584,10 @@ void ContentAutofillDriver::AskForValuesToFill( AutofillSuggestionTriggerSource trigger_source) { target->GetAutofillManager().OnAskForValuesToFill( WithNewVersion(form), field, bounding_box, trigger_source); -+ if (target->secondary_autofill_manager_) { -+ target->secondary_autofill_manager_->OnAskForValuesToFill( ++ if (target->secondary_autofill_manager()) { ++ target->secondary_autofill_manager()->OnAskForValuesToFill( + WithNewVersion(form), field, bounding_box, trigger_source); + } }); } -@@ -609,6 +633,8 @@ void ContentAutofillDriver::HidePopup() { +@@ -575,6 +599,8 @@ void ContentAutofillDriver::HidePopup() { DCHECK(!target->IsPrerendering()) << "We should never affect UI while prerendering"; target->GetAutofillManager().OnHidePopup(); -+ if (target->secondary_autofill_manager_) -+ target->secondary_autofill_manager_->OnHidePopup(); ++ if (target->secondary_autofill_manager()) ++ target->secondary_autofill_manager()->OnHidePopup(); }); } -@@ -620,6 +646,8 @@ void ContentAutofillDriver::FocusNoLongerOnForm(bool had_interacted_form) { +@@ -586,6 +612,8 @@ void ContentAutofillDriver::FocusNoLongerOnForm(bool had_interacted_form) { this, had_interacted_form, [](autofill::AutofillDriver* target, bool had_interacted_form) { target->GetAutofillManager().OnFocusNoLongerOnForm(had_interacted_form); -+ if (target->secondary_autofill_manager_) -+ target->secondary_autofill_manager_->OnFocusNoLongerOnForm(had_interacted_form); ++ if (target->secondary_autofill_manager()) ++ target->secondary_autofill_manager()->OnFocusNoLongerOnForm(had_interacted_form); }); } -@@ -639,9 +667,16 @@ void ContentAutofillDriver::FocusOnFormField(const FormData& raw_form, +@@ -605,9 +633,16 @@ void ContentAutofillDriver::FocusOnFormField(const FormData& raw_form, const FormFieldData& field, const gfx::RectF& bounding_box) { target->GetAutofillManager().OnFocusOnFormField(WithNewVersion(form), field, bounding_box); -+ if (target->secondary_autofill_manager_) { -+ target->secondary_autofill_manager_->OnFocusOnFormField( ++ if (target->secondary_autofill_manager()) { ++ target->secondary_autofill_manager()->OnFocusOnFormField( + WithNewVersion(form), field, bounding_box); + } }, [](autofill::AutofillDriver* target) { target->GetAutofillManager().OnFocusNoLongerOnForm(true); -+ if (target->secondary_autofill_manager_) { -+ target->secondary_autofill_manager_->OnFocusNoLongerOnForm(true); ++ if (target->secondary_autofill_manager()) { ++ target->secondary_autofill_manager()->OnFocusNoLongerOnForm(true); + } }); } -@@ -656,6 +691,10 @@ void ContentAutofillDriver::DidFillAutofillFormData(const FormData& raw_form, +@@ -622,6 +657,10 @@ void ContentAutofillDriver::DidFillAutofillFormData(const FormData& raw_form, base::TimeTicks timestamp) { target->GetAutofillManager().OnDidFillAutofillFormData( WithNewVersion(form), timestamp); -+ if (target->secondary_autofill_manager_) { -+ target->secondary_autofill_manager_->OnDidFillAutofillFormData( ++ if (target->secondary_autofill_manager()) { ++ target->secondary_autofill_manager()->OnDidFillAutofillFormData( + WithNewVersion(form), timestamp); + } }); } -@@ -665,6 +704,8 @@ void ContentAutofillDriver::DidEndTextFieldEditing() { +@@ -631,6 +670,8 @@ void ContentAutofillDriver::DidEndTextFieldEditing() { } router().DidEndTextFieldEditing(this, [](autofill::AutofillDriver* target) { target->GetAutofillManager().OnDidEndTextFieldEditing(); -+ if (target->secondary_autofill_manager_) -+ target->secondary_autofill_manager_->OnDidEndTextFieldEditing(); ++ if (target->secondary_autofill_manager()) ++ target->secondary_autofill_manager()->OnDidEndTextFieldEditing(); }); } -@@ -679,6 +720,10 @@ void ContentAutofillDriver::SelectOrSelectListFieldOptionsDidChange( +@@ -645,6 +686,10 @@ void ContentAutofillDriver::SelectOrSelectListFieldOptionsDidChange( cast(target) ->GetAutofillManager() .OnSelectOrSelectListFieldOptionsDidChange(WithNewVersion(form)); -+ if (target->secondary_autofill_manager_) { -+ target->secondary_autofill_manager_->OnSelectOrSelectMenuFieldOptionsDidChange( ++ if (target->secondary_autofill_manager()) { ++ target->secondary_autofill_manager()->OnSelectOrSelectListFieldOptionsDidChange( + WithNewVersion(form)); + } }); } -@@ -698,6 +743,10 @@ void ContentAutofillDriver::JavaScriptChangedAutofilledValue( +@@ -664,6 +709,10 @@ void ContentAutofillDriver::JavaScriptChangedAutofilledValue( const FormFieldData& field, const std::u16string& old_value) { target->GetAutofillManager().OnJavaScriptChangedAutofilledValue( WithNewVersion(form), field, old_value); -+ if (target->secondary_autofill_manager_) { -+ target->secondary_autofill_manager_->OnJavaScriptChangedAutofilledValue( ++ if (target->secondary_autofill_manager()) { ++ target->secondary_autofill_manager()->OnJavaScriptChangedAutofilledValue( + WithNewVersion(form), field, old_value); + } }); } -@@ -710,6 +759,8 @@ void ContentAutofillDriver::OnContextMenuShownInField( +@@ -676,6 +725,8 @@ void ContentAutofillDriver::OnContextMenuShownInField( const FieldGlobalId& field_global_id) { target->GetAutofillManager().OnContextMenuShownInField(form_global_id, field_global_id); -+ if (target->secondary_autofill_manager_) -+ target->secondary_autofill_manager_->OnContextMenuShownInField(form_global_id, field_global_id); ++ if (target->secondary_autofill_manager()) ++ target->secondary_autofill_manager()->OnContextMenuShownInField(form_global_id, field_global_id); }); } -@@ -720,6 +771,8 @@ void ContentAutofillDriver::Reset() { +@@ -686,6 +737,8 @@ void ContentAutofillDriver::Reset() { owner_->router().UnregisterDriver(this, /*driver_is_dying=*/false); autofill_manager_->Reset(); @@ -600,6 +743,17 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co } const mojo::AssociatedRemote& +@@ -698,6 +751,10 @@ ContentAutofillDriver::GetAutofillAgent() { + return autofill_agent_; + } + ++raw_ptr ContentAutofillDriver::secondary_autofill_manager() { ++ return secondary_autofill_manager_.get(); ++} ++ + void ContentAutofillDriver::SetFrameAndFormMetaData( + FormData& form, + FormFieldData* optional_field) const { 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 @@ -613,11 +767,11 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.h b/com autofill_manager_ = std::move(autofill_manager); + secondary_autofill_manager_ = std::move(secondary_autofill_manager); } -+ AutofillManager* secondary_autofill_manager() { return secondary_autofill_manager_.get(); } ++ raw_ptr secondary_autofill_manager() override; content::RenderFrameHost* render_frame_host() { return &*render_frame_host_; } const content::RenderFrameHost* render_frame_host() const { -@@ -352,6 +355,10 @@ class ContentAutofillDriver : public AutofillDriver, +@@ -351,6 +354,10 @@ class ContentAutofillDriver : public AutofillDriver, std::unique_ptr autofill_manager_ = nullptr; @@ -672,7 +826,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver_factory diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc --- a/components/autofill/content/renderer/password_autofill_agent.cc +++ b/components/autofill/content/renderer/password_autofill_agent.cc -@@ -834,7 +834,10 @@ void PasswordAutofillAgent::UpdateStateForTextChange( +@@ -827,7 +827,10 @@ void PasswordAutofillAgent::UpdatePasswordStateForTextChange( void PasswordAutofillAgent::TrackAutofilledElement( const blink::WebFormControlElement& element) { @@ -684,6 +838,18 @@ diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/c } void PasswordAutofillAgent::FillPasswordSuggestion( +diff --git a/components/autofill/core/browser/autofill_driver.h b/components/autofill/core/browser/autofill_driver.h +--- a/components/autofill/core/browser/autofill_driver.h ++++ b/components/autofill/core/browser/autofill_driver.h +@@ -69,6 +69,8 @@ class AutofillDriver { + // Returns the AutofillManager owned by the AutofillDriver. + virtual AutofillManager& GetAutofillManager() = 0; + ++ virtual raw_ptr secondary_autofill_manager() = 0; ++ + // Returns whether the AutofillDriver instance is associated with an active + // frame in the MPArch sense. + virtual bool IsInActiveFrame() const = 0; diff --git a/components/autofill/core/common/autofill_prefs.cc b/components/autofill/core/common/autofill_prefs.cc --- a/components/autofill/core/common/autofill_prefs.cc +++ b/components/autofill/core/common/autofill_prefs.cc @@ -734,16 +900,16 @@ diff --git a/components/embedder_support/android/java/src/org/chromium/component /** * The containing view for {@link WebContents} that exists in the Android UI hierarchy and exposes * the various {@link View} functionality to it. -@@ -93,6 +98,8 @@ public class ContentView extends FrameLayout - */ - public static ContentView createContentView(Context context, - @Nullable EventOffsetHandler eventOffsetHandler, @Nullable WebContents webContents) { +@@ -96,6 +101,8 @@ public class ContentView extends FrameLayout + Context context, + @Nullable EventOffsetHandler eventOffsetHandler, + @Nullable WebContents webContents) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) + return new ContentViewWithAutofill(context, eventOffsetHandler, webContents); return new ContentView(context, eventOffsetHandler, webContents); } -@@ -640,4 +647,43 @@ public class ContentView extends FrameLayout +@@ -642,4 +649,43 @@ public class ContentView extends FrameLayout mDragDropEventOffsetHandler.onPostDispatchDragEvent(event.getAction()); return ret; } @@ -787,6 +953,25 @@ diff --git a/components/embedder_support/android/java/src/org/chromium/component + } + } } +diff --git a/content/public/android/java/src/org/chromium/content/browser/selection/FloatingPastePopupMenu.java b/content/public/android/java/src/org/chromium/content/browser/selection/FloatingPastePopupMenu.java +--- a/content/public/android/java/src/org/chromium/content/browser/selection/FloatingPastePopupMenu.java ++++ b/content/public/android/java/src/org/chromium/content/browser/selection/FloatingPastePopupMenu.java +@@ -133,13 +133,14 @@ public class FloatingPastePopupMenu implements PastePopupMenu { + SortedSet nonSelectionMenuItems = + SelectActionMenuHelper.getNonSelectionMenuItems( + mContext, actionMenuDelegate, mSelectionActionMenuDelegate); ++ mCustomMenuItemClickListeners.clear(); + SelectionPopupControllerImpl.initializeActionMenu( + mContext, nonSelectionMenuItems, menu, mCustomMenuItemClickListeners, null); + } + + @Override + public boolean onPrepareActionMode(ActionMode mode, Menu menu) { +- mCustomMenuItemClickListeners.clear(); ++ // fixed a bug, moved above + return false; + } + 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 @@ -798,10 +983,10 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java b +import android.view.autofill.AutofillValue; +import android.view.ViewStructure; + - /** - * Class to acquire, position, and remove anchor views from the implementing View. - */ -@@ -579,4 +583,8 @@ public class ViewAndroidDelegate { + /** Class to acquire, position, and remove anchor views from the implementing View. */ + @JNINamespace("ui") + public class ViewAndroidDelegate { +@@ -586,4 +590,8 @@ public class ViewAndroidDelegate { sDragAndDropDelegateForTesting = testDelegate; ResettersForTesting.register(() -> sDragAndDropDelegateForTesting = null); } @@ -811,4 +996,3 @@ diff --git a/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java b + public void autofill(final SparseArray values) {} } -- -2.25.1 diff --git a/build/patches/Enable-network-isolation-features.patch b/build/patches/Enable-network-isolation-features.patch index a600388f2..33f66f433 100644 --- a/build/patches/Enable-network-isolation-features.patch +++ b/build/patches/Enable-network-isolation-features.patch @@ -37,4 +37,3 @@ new file mode 100644 @@ -0,0 +1 @@ +SET_CROMITE_FEATURE_ENABLED(kSplitAuthCacheByNetworkIsolationKey); -- -2.25.1 diff --git a/build/patches/Enable-prefetch-privacy-changes-by-default.patch b/build/patches/Enable-prefetch-privacy-changes-by-default.patch index 427ab601d..913d3627b 100644 --- a/build/patches/Enable-prefetch-privacy-changes-by-default.patch +++ b/build/patches/Enable-prefetch-privacy-changes-by-default.patch @@ -15,4 +15,3 @@ new file mode 100644 @@ -0,0 +1 @@ +SET_CROMITE_FEATURE_ENABLED(kPrefetchPrivacyChanges); -- -2.25.1 diff --git a/build/patches/00Enable-search-engine-settings-desktop-ui.patch b/build/patches/Enable-search-engine-settings-desktop-ui.patch similarity index 97% rename from build/patches/00Enable-search-engine-settings-desktop-ui.patch rename to build/patches/Enable-search-engine-settings-desktop-ui.patch index 602c6af8c..a239dec19 100644 --- a/build/patches/00Enable-search-engine-settings-desktop-ui.patch +++ b/build/patches/Enable-search-engine-settings-desktop-ui.patch @@ -51,7 +51,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../android/template_url_service_android.cc | 2 +- .../search_engines/template_url_service.cc | 8 +- .../search_engines/template_url_service.h | 6 +- - content/browser/webui/web_ui_impl.cc | 11 +- + content/browser/webui/web_ui_impl.cc | 16 +- content/browser/webui/web_ui_impl.h | 3 + content/public/browser/web_ui.h | 1 + ui/base/template_expressions.cc | 21 +- @@ -68,7 +68,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html ui/webui/resources/include_polymer.gni | 2 +- ui/webui/resources/js/BUILD.gn | 2 +- ui/webui/resources/js/load_time_data.ts | 17 +- - 61 files changed, 1088 insertions(+), 58 deletions(-) + 61 files changed, 1091 insertions(+), 60 deletions(-) create mode 100644 chrome/app/settings_strings_android.grdp create mode 100644 chrome/browser/search_engines/android/java/res/layout/search_engine_layout.xml create mode 100644 chrome/browser/ui/webui/settings/settings_localized_strings_provider_android.cc @@ -90,7 +90,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin import org.chromium.base.IntentUtils; import org.chromium.chrome.browser.autofill.settings.AutofillPaymentMethodsFragment; import org.chromium.chrome.browser.browsing_data.ClearBrowsingDataFragment; -@@ -27,6 +30,13 @@ import org.chromium.components.browser_ui.site_settings.SiteSettings; +@@ -25,6 +28,13 @@ import org.chromium.components.browser_ui.site_settings.SiteSettings; public class SettingsLauncherImpl implements SettingsLauncher { public SettingsLauncherImpl() {} @@ -107,7 +107,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd -@@ -311,6 +311,11 @@ are declared in tools/grit/grit_rule.gni. +@@ -314,6 +314,11 @@ are declared in tools/grit/grit_rule.gni. @@ -119,7 +119,7 @@ diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources -@@ -486,7 +491,7 @@ are declared in tools/grit/grit_rule.gni. +@@ -489,7 +494,7 @@ are declared in tools/grit/grit_rule.gni. Disable @@ -131,7 +131,7 @@ diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp --- a/chrome/app/settings_strings.grdp +++ b/chrome/app/settings_strings.grdp -@@ -2509,6 +2509,9 @@ +@@ -2427,6 +2427,9 @@ URL with %s in place of query @@ -406,7 +406,7 @@ new file mode 100644 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -3695,6 +3695,9 @@ static_library("browser") { +@@ -3668,6 +3668,9 @@ static_library("browser") { "//components/user_scripts/android", ] } @@ -447,7 +447,7 @@ diff --git a/chrome/browser/resources/settings/BUILD.gn b/chrome/browser/resourc diff --git a/chrome/browser/resources/settings/page_visibility.ts b/chrome/browser/resources/settings/page_visibility.ts --- a/chrome/browser/resources/settings/page_visibility.ts +++ b/chrome/browser/resources/settings/page_visibility.ts -@@ -46,7 +46,35 @@ export interface PrivacyPageVisibility { +@@ -47,7 +47,35 @@ export interface PrivacyPageVisibility { */ export let pageVisibility: PageVisibility; @@ -610,7 +610,7 @@ diff --git a/chrome/browser/resources/settings/search_engines_page/search_engine diff --git a/chrome/browser/resources/settings/search_page/search_page.html b/chrome/browser/resources/settings/search_page/search_page.html --- a/chrome/browser/resources/settings/search_page/search_page.html +++ b/chrome/browser/resources/settings/search_page/search_page.html -@@ -121,7 +121,11 @@ +@@ -129,7 +129,11 @@ associated-control="[[$$('#enginesSubpageTrigger')]]" page-title="$i18n{searchEnginesManageSiteSearch}" search-label="$i18n{searchEnginesSearch}" @@ -693,10 +693,10 @@ diff --git a/chrome/browser/resources/settings_shared/BUILD.gn b/chrome/browser/ diff --git a/chrome/browser/search_engines/android/BUILD.gn b/chrome/browser/search_engines/android/BUILD.gn --- a/chrome/browser/search_engines/android/BUILD.gn +++ b/chrome/browser/search_engines/android/BUILD.gn -@@ -75,6 +75,7 @@ android_resources("java_resources") { - sources = [ +@@ -79,6 +79,7 @@ android_resources("java_resources") { "java/res/drawable/search_sogou.xml", "java/res/layout/search_engine.xml", + "java/res/layout/search_engine_choice_header.xml", + "java/res/layout/search_engine_layout.xml", "java/res/layout/search_engine_choice_item.xml", "java/res/layout/search_engine_choice_view.xml", @@ -744,8 +744,8 @@ diff --git a/chrome/browser/search_engines/android/java/src/org/chromium/chrome/ + import androidx.fragment.app.ListFragment; - import org.chromium.chrome.browser.profiles.Profile; -@@ -25,6 +29,7 @@ import org.chromium.components.browser_ui.settings.SettingsLauncher; + import org.chromium.chrome.browser.flags.ChromeFeatureList; +@@ -27,6 +31,7 @@ import org.chromium.components.browser_ui.settings.SettingsLauncher; public class SearchEngineSettings extends ListFragment implements ProfileDependentSetting { private SearchEngineAdapter mSearchEngineAdapter; private Profile mProfile; @@ -753,7 +753,7 @@ diff --git a/chrome/browser/search_engines/android/java/src/org/chromium/chrome/ String getValueForTesting() { return mSearchEngineAdapter.getValueForTesting(); -@@ -46,6 +51,19 @@ public class SearchEngineSettings extends ListFragment implements ProfileDepende +@@ -48,6 +53,19 @@ public class SearchEngineSettings extends ListFragment implements ProfileDepende setListAdapter(mSearchEngineAdapter); } @@ -773,7 +773,7 @@ diff --git a/chrome/browser/search_engines/android/java/src/org/chromium/chrome/ @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); -@@ -81,6 +99,7 @@ public class SearchEngineSettings extends ListFragment implements ProfileDepende +@@ -90,6 +108,7 @@ public class SearchEngineSettings extends ListFragment implements ProfileDepende * @param settingsLauncher The SettingsLauncher that is injected. */ public void setSettingsLauncher(SettingsLauncher settingsLauncher) { @@ -784,7 +784,7 @@ diff --git a/chrome/browser/search_engines/android/java/src/org/chromium/chrome/ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn -@@ -1009,6 +1009,18 @@ static_library("ui") { +@@ -1022,6 +1022,18 @@ static_library("ui") { "//ui/android", "//url", ] @@ -986,7 +986,7 @@ diff --git a/chrome/browser/ui/search_engines/template_url_table_model.h b/chrom diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -133,6 +133,8 @@ +@@ -130,6 +130,8 @@ #include "chrome/browser/ui/webui/webapks/webapks_ui.h" #include "components/feed/buildflags.h" #include "components/feed/feed_feature_list.h" @@ -995,7 +995,7 @@ diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrom #else // BUILDFLAG(IS_ANDROID) #include "chrome/browser/media/router/discovery/access_code/access_code_cast_feature.h" #include "chrome/browser/media/router/media_router_feature.h" -@@ -664,6 +666,10 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, +@@ -649,6 +651,10 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, return &NewWebUI; } #endif // !BUILDFLAG(IS_ANDROID) @@ -1128,9 +1128,9 @@ diff --git a/chrome/browser/ui/webui/favicon_source.h b/chrome/browser/ui/webui/ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome/browser/ui/webui/settings/search_engines_handler.cc --- a/chrome/browser/ui/webui/settings/search_engines_handler.cc +++ b/chrome/browser/ui/webui/settings/search_engines_handler.cc -@@ -31,10 +31,12 @@ +@@ -30,10 +30,12 @@ + #include "components/search_engines/template_url.h" #include "components/search_engines/template_url_service.h" - #include "components/signin/public/base/signin_switches.h" #include "content/public/browser/web_ui.h" +#if !BUILDFLAG(IS_ANDROID) #include "extensions/browser/extension_registry.h" @@ -1141,7 +1141,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome #if BUILDFLAG(IS_CHROMEOS_ASH) #include "ash/public/cpp/new_window_delegate.h" -@@ -46,6 +48,7 @@ namespace { +@@ -45,6 +47,7 @@ namespace { const char kSearchEngineField[] = "searchEngine"; const char kKeywordField[] = "keyword"; const char kQueryUrlField[] = "queryUrl"; @@ -1149,7 +1149,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome // Dummy number used for indicating that a new search engine is added. const int kNewSearchEngineIndex = -1; -@@ -218,15 +221,17 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( +@@ -217,15 +220,17 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( IDS_SEARCH_ENGINES_EDITOR_DESCRIPTION_COLUMN)); dict.Set("keyword", table_model->GetText( index, IDS_SEARCH_ENGINES_EDITOR_KEYWORD_COLUMN)); @@ -1166,9 +1166,9 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome +#if !BUILDFLAG(IS_ANDROID) const bool is_search_engine_choice_settings_ui = - base::FeatureList::IsEnabled(switches::kSearchEngineChoiceSettingsUi) && search_engines::IsChoiceScreenFlagEnabled( -@@ -237,6 +242,7 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( + search_engines::ChoicePromo::kAny); +@@ -241,6 +246,7 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( template_url->keyword(), /*parent_directory_path=*/u"images/"); dict.Set("iconPath", icon_path); } @@ -1176,7 +1176,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome dict.Set("modelIndex", base::checked_cast(index)); -@@ -250,8 +256,10 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( +@@ -254,8 +260,10 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( list_controller_.ShouldConfirmDeletion(template_url)); TemplateURL::Type type = template_url->type(); dict.Set("isOmniboxExtension", type == TemplateURL::OMNIBOX_API_EXTENSION); @@ -1187,7 +1187,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome const extensions::Extension* extension = extensions::ExtensionRegistry::Get(profile)->GetExtensionById( template_url->GetExtensionId(), -@@ -266,6 +274,7 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( +@@ -270,6 +278,7 @@ base::Value::Dict SearchEnginesHandler::CreateDictionaryForEngine( dict.Set("extension", std::move(ext_info)); } } @@ -1195,7 +1195,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome return dict; } -@@ -357,12 +366,13 @@ void SearchEnginesHandler::HandleSearchEngineEditStarted( +@@ -361,12 +370,13 @@ void SearchEnginesHandler::HandleSearchEngineEditStarted( void SearchEnginesHandler::OnEditedKeyword(TemplateURL* template_url, const std::u16string& title, const std::u16string& keyword, @@ -1212,7 +1212,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome edit_controller_.reset(); } -@@ -390,6 +400,8 @@ bool SearchEnginesHandler::CheckFieldValidity(const std::string& field_name, +@@ -394,6 +404,8 @@ bool SearchEnginesHandler::CheckFieldValidity(const std::string& field_name, is_valid = edit_controller_->IsKeywordValid(base::UTF8ToUTF16(field_value)); else if (field_name.compare(kQueryUrlField) == 0) is_valid = edit_controller_->IsURLValid(field_value); @@ -1221,7 +1221,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome else NOTREACHED(); -@@ -409,18 +421,20 @@ void SearchEnginesHandler::HandleSearchEngineEditCompleted( +@@ -413,18 +425,20 @@ void SearchEnginesHandler::HandleSearchEngineEditCompleted( if (!edit_controller_.get()) return; @@ -1261,7 +1261,7 @@ diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.h b/chrome/ diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc --- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc +++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc -@@ -2502,6 +2502,8 @@ void AddSearchEnginesStrings(content::WebUIDataSource* html_source) { +@@ -2474,6 +2474,8 @@ void AddSearchEnginesStrings(content::WebUIDataSource* html_source) { {"searchEnginesQueryURL", IDS_SETTINGS_SEARCH_ENGINES_QUERY_URL}, {"searchEnginesQueryURLExplanation", IDS_SETTINGS_SEARCH_ENGINES_QUERY_URL_EXPLANATION}, @@ -1770,7 +1770,7 @@ new file mode 100644 diff --git a/chrome/browser/ui/webui/webui_util.cc b/chrome/browser/ui/webui/webui_util.cc --- a/chrome/browser/ui/webui/webui_util.cc +++ b/chrome/browser/ui/webui/webui_util.cc -@@ -94,6 +94,11 @@ void SetupChromeRefresh2023(content::WebUIDataSource* source) { +@@ -91,6 +91,11 @@ void SetupChromeRefresh2023(content::WebUIDataSource* source) { source->AddString( "chromeRefresh2023Attribute", features::IsChromeWebuiRefresh2023() ? "chrome-refresh-2023" : ""); @@ -1785,7 +1785,7 @@ diff --git a/chrome/browser/ui/webui/webui_util.cc b/chrome/browser/ui/webui/web diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni --- a/chrome/chrome_paks.gni +++ b/chrome/chrome_paks.gni -@@ -149,6 +149,17 @@ template("chrome_extra_paks") { +@@ -148,6 +148,17 @@ template("chrome_extra_paks") { sources += invoker.additional_paks } @@ -1806,7 +1806,7 @@ diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni diff --git a/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsLauncher.java b/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsLauncher.java --- a/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsLauncher.java +++ b/components/browser_ui/settings/android/java/src/org/chromium/components/browser_ui/settings/SettingsLauncher.java -@@ -40,6 +40,8 @@ public interface SettingsLauncher { +@@ -44,6 +44,8 @@ public interface SettingsLauncher { int ACCESSIBILITY = 6; } @@ -1841,7 +1841,7 @@ diff --git a/components/search_engines/android/template_url_service_android.cc b diff --git a/components/search_engines/template_url_service.cc b/components/search_engines/template_url_service.cc --- a/components/search_engines/template_url_service.cc +++ b/components/search_engines/template_url_service.cc -@@ -444,13 +444,15 @@ TemplateURL* TemplateURLService::AddWithOverrides( +@@ -466,13 +466,15 @@ TemplateURL* TemplateURLService::AddWithOverrides( std::unique_ptr template_url, const std::u16string& short_name, const std::u16string& keyword, @@ -1858,7 +1858,7 @@ diff --git a/components/search_engines/template_url_service.cc b/components/sear return Add(std::move(template_url)); } -@@ -628,7 +630,8 @@ void TemplateURLService::IncrementUsageCount(TemplateURL* url) { +@@ -650,7 +652,8 @@ void TemplateURLService::IncrementUsageCount(TemplateURL* url) { void TemplateURLService::ResetTemplateURL(TemplateURL* url, const std::u16string& title, const std::u16string& keyword, @@ -1868,7 +1868,7 @@ diff --git a/components/search_engines/template_url_service.cc b/components/sear DCHECK(!IsCreatedByExtension(url)); DCHECK(!keyword.empty()); DCHECK(!search_url.empty()); -@@ -640,6 +643,7 @@ void TemplateURLService::ResetTemplateURL(TemplateURL* url, +@@ -662,6 +665,7 @@ void TemplateURLService::ResetTemplateURL(TemplateURL* url, // The urls have changed, reset the favicon url. data.favicon_url = GURL(); } @@ -1879,7 +1879,7 @@ diff --git a/components/search_engines/template_url_service.cc b/components/sear diff --git a/components/search_engines/template_url_service.h b/components/search_engines/template_url_service.h --- a/components/search_engines/template_url_service.h +++ b/components/search_engines/template_url_service.h -@@ -193,7 +193,8 @@ class TemplateURLService : public WebDataServiceConsumer, +@@ -203,7 +203,8 @@ class TemplateURLService : public WebDataServiceConsumer, TemplateURL* AddWithOverrides(std::unique_ptr template_url, const std::u16string& short_name, const std::u16string& keyword, @@ -1889,7 +1889,7 @@ diff --git a/components/search_engines/template_url_service.h b/components/searc // Removes the keyword from the model. This deletes the supplied TemplateURL. // This fails if the supplied template_url is the default search provider. -@@ -246,7 +247,8 @@ class TemplateURLService : public WebDataServiceConsumer, +@@ -256,7 +257,8 @@ class TemplateURLService : public WebDataServiceConsumer, void ResetTemplateURL(TemplateURL* url, const std::u16string& title, const std::u16string& keyword, @@ -1913,17 +1913,21 @@ diff --git a/content/browser/webui/web_ui_impl.cc b/content/browser/webui/web_ui void WebUIImpl::ProcessWebUIMessage(const GURL& source_url, const std::string& message, base::Value::List args) { -@@ -268,8 +272,13 @@ void WebUIImpl::ProcessWebUIMessage(const GURL& source_url, +@@ -268,9 +272,15 @@ void WebUIImpl::ProcessWebUIMessage(const GURL& source_url, return; } -- NOTREACHED() << "Unhandled chrome.send(\"" << message << "\", " << args +- DUMP_WILL_BE_NOTREACHED_NORETURN() +- << "Unhandled chrome.send(\"" << message << "\", " << args << "); from " +- << source_url; + if (!do_not_crash_on_unhandled_message_) { -+ NOTREACHED() << "Unhandled chrome.send(\"" << message << "\", " << args -+ << "); from " << source_url; ++ DUMP_WILL_BE_NOTREACHED_NORETURN() ++ << "Unhandled chrome.send(\"" << message << "\", " << args << "); from " ++ << source_url; + } else { -+ DLOG(INFO) << "---Unhandled chrome.send(\"" << message << "\", " << args - << "); from " << source_url; ++ DLOG(INFO) ++ << "---Unhandled chrome.send(\"" << message << "\", " << args << "); from " ++ << source_url; + } } @@ -1931,7 +1935,7 @@ diff --git a/content/browser/webui/web_ui_impl.cc b/content/browser/webui/web_ui diff --git a/content/browser/webui/web_ui_impl.h b/content/browser/webui/web_ui_impl.h --- a/content/browser/webui/web_ui_impl.h +++ b/content/browser/webui/web_ui_impl.h -@@ -84,6 +84,7 @@ class CONTENT_EXPORT WebUIImpl : public WebUI, +@@ -82,6 +82,7 @@ class CONTENT_EXPORT WebUIImpl : public WebUI, public mojom::WebUIHost { void ProcessWebUIMessage(const GURL& source_url, const std::string& message, base::Value::List args) override; @@ -1939,7 +1943,7 @@ diff --git a/content/browser/webui/web_ui_impl.h b/content/browser/webui/web_ui_ bool CanCallJavascript() override; void CallJavascriptFunctionUnsafe(base::StringPiece function_name) override; void CallJavascriptFunctionUnsafe( -@@ -155,6 +156,8 @@ class CONTENT_EXPORT WebUIImpl : public WebUI, +@@ -153,6 +154,8 @@ class CONTENT_EXPORT WebUIImpl : public WebUI, public mojom::WebUIHost { std::unique_ptr controller_; @@ -2020,7 +2024,7 @@ diff --git a/ui/webui/BUILD.gn b/ui/webui/BUILD.gn diff --git a/ui/webui/resources/BUILD.gn b/ui/webui/resources/BUILD.gn --- a/ui/webui/resources/BUILD.gn +++ b/ui/webui/resources/BUILD.gn -@@ -73,6 +73,16 @@ generate_grd("build_grd") { +@@ -74,6 +74,16 @@ generate_grd("build_grd") { "$target_gen_dir/cr_components/most_visited/resources.grdp", "$target_gen_dir/cr_components/settings_prefs/resources.grdp", ] @@ -2035,8 +2039,8 @@ diff --git a/ui/webui/resources/BUILD.gn b/ui/webui/resources/BUILD.gn + ] + } - if (use_nss_certs) { - public_deps += [ "cr_components/certificate_manager:build_grdp" ] + if (!optimize_webui) { + public_deps += [ "//third_party/lit/v3_0:build_grdp" ] diff --git a/ui/webui/resources/cr_components/customize_color_scheme_mode/BUILD.gn b/ui/webui/resources/cr_components/customize_color_scheme_mode/BUILD.gn --- a/ui/webui/resources/cr_components/customize_color_scheme_mode/BUILD.gn +++ b/ui/webui/resources/cr_components/customize_color_scheme_mode/BUILD.gn @@ -2205,4 +2209,3 @@ diff --git a/ui/webui/resources/js/load_time_data.ts b/ui/webui/resources/js/loa } -- -2.25.1 diff --git a/build/patches/Enable-share-intent.patch b/build/patches/Enable-share-intent.patch index ec8bb2af7..998a0661a 100644 --- a/build/patches/Enable-share-intent.patch +++ b/build/patches/Enable-share-intent.patch @@ -13,18 +13,18 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html chrome/android/chrome_java_resources.gni | 1 + chrome/android/chrome_java_sources.gni | 1 + chrome/android/java/AndroidManifest.xml | 24 +++- - .../res/layout/sharing_intent_content.xml | 87 +++++++++++++ + .../res/layout/sharing_intent_content.xml | 87 ++++++++++++ .../chrome/browser/IntentHandler.java | 16 ++- .../browser/LaunchIntentDispatcher.java | 2 +- .../init/ProcessInitializationHandler.java | 3 + - .../SharedIntentShareActivity.java | 119 ++++++++++++++++++ + .../SharedIntentShareActivity.java | 127 ++++++++++++++++++ .../flags/android/chrome_feature_list.cc | 1 + .../browser/flags/ChromeFeatureList.java | 1 + .../strings/android_chrome_strings.grd | 13 ++ .../about_flags_cc/Enable-share-intent.inc | 12 ++ .../Enable-share-intent.inc | 3 + .../Enable-share-intent.inc | 1 + - 14 files changed, 276 insertions(+), 8 deletions(-) + 14 files changed, 284 insertions(+), 8 deletions(-) create mode 100644 chrome/android/java/res/layout/sharing_intent_content.xml create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/sharing/shared_intent/SharedIntentShareActivity.java create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Enable-share-intent.inc @@ -34,7 +34,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni --- a/chrome/android/chrome_java_resources.gni +++ b/chrome/android/chrome_java_resources.gni -@@ -605,6 +605,7 @@ chrome_java_resources = [ +@@ -589,6 +589,7 @@ chrome_java_resources = [ "java/res/layout/signin_activity.xml", "java/res/layout/status_indicator_container.xml", "java/res/layout/suggestions_tile_view_condensed.xml", @@ -45,7 +45,7 @@ diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_ja diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni --- a/chrome/android/chrome_java_sources.gni +++ b/chrome/android/chrome_java_sources.gni -@@ -1045,6 +1045,7 @@ chrome_java_sources = [ +@@ -1038,6 +1038,7 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/signin/SyncConsentActivity.java", "java/src/org/chromium/chrome/browser/signin/SyncConsentActivityLauncherImpl.java", "java/src/org/chromium/chrome/browser/signin/SyncConsentFragment.java", @@ -189,17 +189,17 @@ new file mode 100644 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java --- a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java -@@ -197,6 +197,9 @@ public class IntentHandler { +@@ -173,6 +173,9 @@ public class IntentHandler { private static final String EXTRA_TAB_LAUNCH_TYPE = "org.chromium.chrome.browser.tab_launch_type"; + private static final String EXTRA_TAB_FORCE_INCOGNITO_TYPE = + "org.chromium.chrome.browser.force_incognito"; + - /** - * A hash code for the URL to verify intent data hasn't been modified. - */ -@@ -1265,6 +1268,17 @@ public class IntentHandler { + /** A hash code for the URL to verify intent data hasn't been modified. */ + public static final String EXTRA_DATA_HASH_CODE = "org.chromium.chrome.browser.data_hash"; + +@@ -1264,6 +1267,17 @@ public class IntentHandler { return IntentUtils.safeGetSerializableExtra(intent, EXTRA_TAB_LAUNCH_TYPE); } @@ -217,7 +217,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.j /** * Creates an Intent that will launch a ChromeTabbedActivity on the new tab page. The Intent * will be trusted and therefore able to launch Incognito tabs. -@@ -1396,7 +1410,7 @@ public class IntentHandler { +@@ -1393,7 +1407,7 @@ public class IntentHandler { String headers = getExtraHeadersFromIntent(intent); headers = maybeAddAdditionalContentHeaders(intent, url, headers); @@ -229,7 +229,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.j diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java --- a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java -@@ -430,8 +430,8 @@ public class LaunchIntentDispatcher { +@@ -431,8 +431,8 @@ public class LaunchIntentDispatcher { /*incognito*/true); newIntent.setData(mIntent.getData()); newIntent.setPackage(applicationContext.getPackageName()); @@ -242,7 +242,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDis diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java --- a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java -@@ -87,6 +87,7 @@ import org.chromium.chrome.browser.tab.state.ShoppingPersistedTabData; +@@ -86,6 +86,7 @@ import org.chromium.chrome.browser.tabpersistence.TabStateFileManager; import org.chromium.chrome.browser.ui.cars.DrivingRestrictionsManager; import org.chromium.chrome.browser.ui.hats.SurveyClientFactory; import org.chromium.chrome.browser.ui.searchactivityutils.SearchActivityPreferencesManager; @@ -250,8 +250,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessIni import org.chromium.chrome.browser.usb.UsbNotificationManager; import org.chromium.chrome.browser.util.AfterStartupTaskUtils; import org.chromium.chrome.browser.webapps.WebappRegistry; -@@ -440,6 +441,8 @@ public class ProcessInitializationHandler { - .resolveClearDataDialogResultRecorder()::makeDeferredRecordings); +@@ -467,6 +468,8 @@ public class ProcessInitializationHandler { + ::makeDeferredRecordings); deferredStartupHandler.addDeferredTask(WebApkUninstallUmaTracker::recordDeferredUma); + deferredStartupHandler.addDeferredTask( @@ -263,7 +263,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sharing/shared_ new file mode 100644 --- /dev/null +++ b/chrome/android/java/src/org/chromium/chrome/browser/sharing/shared_intent/SharedIntentShareActivity.java -@@ -0,0 +1,119 @@ +@@ -0,0 +1,127 @@ +// Copyright 2019 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. @@ -286,12 +286,15 @@ new file mode 100644 +import org.chromium.base.ThreadUtils; +import org.chromium.base.task.PostTask; +import org.chromium.base.task.TaskTraits; ++import org.chromium.base.supplier.OneshotSupplier; +import org.chromium.chrome.R; +import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor; +import org.chromium.chrome.browser.flags.ChromeFeatureList; ++import org.chromium.chrome.browser.init.ActivityProfileProvider; +import org.chromium.chrome.browser.init.AsyncInitializationActivity; +import org.chromium.chrome.browser.LaunchIntentDispatcher; +import org.chromium.chrome.browser.IntentHandler; ++import org.chromium.chrome.browser.profiles.ProfileProvider; +import org.chromium.ui.widget.ButtonCompat; + +/** @@ -300,6 +303,11 @@ new file mode 100644 +public class SharedIntentShareActivity + extends AsyncInitializationActivity { + ++ @Override ++ protected OneshotSupplier createProfileProvider() { ++ return new ActivityProfileProvider(getLifecycleDispatcher()); ++ } ++ + /** + * Checks whether sending shared clipboard message is enabled for the user and enables/disables + * the SharedIntentShareActivity appropriately. This call requires native to be loaded. @@ -386,10 +394,10 @@ new file mode 100644 diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc --- a/chrome/browser/flags/android/chrome_feature_list.cc +++ b/chrome/browser/flags/android/chrome_feature_list.cc -@@ -292,6 +292,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { - &kReengagementNotification, +@@ -289,6 +289,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kSearchReadyOmniboxFeature, &kRelatedSearches, + &kRelatedSearchesAllLanguage, + &kSharedIntentUI, &kReportParentalControlSitesChild, &kRequestDesktopSiteDefaults, @@ -397,9 +405,9 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java -@@ -398,6 +398,7 @@ public abstract class ChromeFeatureList { - public static final String REACHED_CODE_PROFILER = "ReachedCodeProfiler"; +@@ -397,6 +397,7 @@ public abstract class ChromeFeatureList { public static final String READALOUD = "ReadAloud"; + public static final String READALOUD_PLAYBACK = "ReadAloudPlayback"; public static final String READER_MODE_IN_CCT = "ReaderModeInCCT"; + public static final String SHARED_INTENT_UI = "SharedIntentUI"; public static final String RECORD_SUPPRESSION_METRICS = "RecordSuppressionMetrics"; @@ -408,7 +416,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd -@@ -5239,6 +5239,19 @@ To change this setting, <resetlink>reset sync

<resetlink>reset sync

@@ -460,4 +468,3 @@ new file mode 100644 @@ -0,0 +1 @@ +BASE_DECLARE_FEATURE(kSharedIntentUI); -- -2.25.1 diff --git a/build/patches/Enable-third-party-storage-partitioning.patch b/build/patches/Enable-third-party-storage-partitioning.patch index 6f0230ed7..5ada1ef65 100644 --- a/build/patches/Enable-third-party-storage-partitioning.patch +++ b/build/patches/Enable-third-party-storage-partitioning.patch @@ -15,4 +15,3 @@ new file mode 100644 @@ -0,0 +1 @@ +SET_CROMITE_FEATURE_ENABLED(kThirdPartyStoragePartitioning); -- -2.25.1 diff --git a/build/patches/00Enables-deactivation-of-the-js-debugger-statement.patch b/build/patches/Enables-deactivation-of-the-js-debugger-statement.patch similarity index 97% rename from build/patches/00Enables-deactivation-of-the-js-debugger-statement.patch rename to build/patches/Enables-deactivation-of-the-js-debugger-statement.patch index 83430190f..f71672cbe 100644 --- a/build/patches/00Enables-deactivation-of-the-js-debugger-statement.patch +++ b/build/patches/Enables-deactivation-of-the-js-debugger-statement.patch @@ -101,7 +101,7 @@ diff --git a/third_party/devtools-frontend/src/front_end/core/sdk/sdk-meta.ts b/ diff --git a/third_party/devtools-frontend/src/front_end/generated/InspectorBackendCommands.js b/third_party/devtools-frontend/src/front_end/generated/InspectorBackendCommands.js --- a/third_party/devtools-frontend/src/front_end/generated/InspectorBackendCommands.js +++ b/third_party/devtools-frontend/src/front_end/generated/InspectorBackendCommands.js -@@ -1276,6 +1276,10 @@ inspectorBackend.registerCommand("Debugger.restartFrame", [{"name": "callFrameId +@@ -1280,6 +1280,10 @@ inspectorBackend.registerCommand("Debugger.restartFrame", [{"name": "callFrameId inspectorBackend.registerCommand("Debugger.resume", [{"name": "terminateOnResume", "type": "boolean", "optional": true, "description": "Set to true to terminate execution upon resuming execution. In contrast to Runtime.terminateExecution, this will allows to execute further JavaScript (i.e. via evaluation) until execution of the paused code is actually resumed, at which point termination is triggered. If execution is currently not paused, this parameter has no effect.", "typeRef": null}], [], "Resumes JavaScript execution."); inspectorBackend.registerCommand("Debugger.searchInContent", [{"name": "scriptId", "type": "string", "optional": false, "description": "Id of the script to search in.", "typeRef": "Runtime.ScriptId"}, {"name": "query", "type": "string", "optional": false, "description": "String to search for.", "typeRef": null}, {"name": "caseSensitive", "type": "boolean", "optional": true, "description": "If true, search is case sensitive.", "typeRef": null}, {"name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats string parameter as regex.", "typeRef": null}], ["result"], "Searches for given string in script content."); inspectorBackend.registerCommand("Debugger.setAsyncCallStackDepth", [{"name": "maxDepth", "type": "number", "optional": false, "description": "Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async call stacks (default).", "typeRef": null}], [], "Enables or disables async call stacks tracking."); @@ -115,7 +115,7 @@ diff --git a/third_party/devtools-frontend/src/front_end/generated/InspectorBack diff --git a/third_party/devtools-frontend/src/front_end/generated/protocol-mapping.d.ts b/third_party/devtools-frontend/src/front_end/generated/protocol-mapping.d.ts --- a/third_party/devtools-frontend/src/front_end/generated/protocol-mapping.d.ts +++ b/third_party/devtools-frontend/src/front_end/generated/protocol-mapping.d.ts -@@ -4417,6 +4417,10 @@ export namespace ProtocolMapping { +@@ -4404,6 +4404,10 @@ export namespace ProtocolMapping { paramsType: [Protocol.Debugger.SetAsyncCallStackDepthRequest]; returnType: void; }; @@ -129,7 +129,7 @@ diff --git a/third_party/devtools-frontend/src/front_end/generated/protocol-mapp diff --git a/third_party/devtools-frontend/src/front_end/generated/protocol-proxy-api.d.ts b/third_party/devtools-frontend/src/front_end/generated/protocol-proxy-api.d.ts --- a/third_party/devtools-frontend/src/front_end/generated/protocol-proxy-api.d.ts +++ b/third_party/devtools-frontend/src/front_end/generated/protocol-proxy-api.d.ts -@@ -3908,6 +3908,8 @@ declare namespace ProtocolProxyApi { +@@ -3897,6 +3897,8 @@ declare namespace ProtocolProxyApi { */ invoke_setAsyncCallStackDepth(params: Protocol.Debugger.SetAsyncCallStackDepthRequest): Promise; @@ -141,7 +141,7 @@ diff --git a/third_party/devtools-frontend/src/front_end/generated/protocol-prox diff --git a/third_party/devtools-frontend/src/front_end/generated/protocol.ts b/third_party/devtools-frontend/src/front_end/generated/protocol.ts --- a/third_party/devtools-frontend/src/front_end/generated/protocol.ts +++ b/third_party/devtools-frontend/src/front_end/generated/protocol.ts -@@ -16837,6 +16837,10 @@ export namespace Debugger { +@@ -16904,6 +16904,10 @@ export namespace Debugger { maxDepth: integer; } @@ -155,7 +155,7 @@ diff --git a/third_party/devtools-frontend/src/front_end/generated/protocol.ts b diff --git a/third_party/devtools-frontend/src/third_party/blink/public/devtools_protocol/browser_protocol.json b/third_party/devtools-frontend/src/third_party/blink/public/devtools_protocol/browser_protocol.json --- a/third_party/devtools-frontend/src/third_party/blink/public/devtools_protocol/browser_protocol.json +++ b/third_party/devtools-frontend/src/third_party/blink/public/devtools_protocol/browser_protocol.json -@@ -25238,8 +25238,17 @@ +@@ -25356,8 +25356,17 @@ "$ref": "WasmDisassemblyChunk" } ] @@ -175,7 +175,7 @@ diff --git a/third_party/devtools-frontend/src/third_party/blink/public/devtools "name": "nextWasmDisassemblyChunk", "description": "Disassemble the next chunk of lines for the module corresponding to the\nstream. If disassembly is complete, this API will invalidate the streamId\nand return an empty chunk. Any subsequent calls for the now invalid stream\nwill return errors.", "experimental": true, -@@ -28367,4 +28376,4 @@ +@@ -28485,4 +28494,4 @@ ] } ] @@ -199,7 +199,7 @@ diff --git a/v8/include/js_protocol.pdl b/v8/include/js_protocol.pdl diff --git a/v8/src/common/message-template.h b/v8/src/common/message-template.h --- a/v8/src/common/message-template.h +++ b/v8/src/common/message-template.h -@@ -729,6 +729,7 @@ namespace internal { +@@ -733,6 +733,7 @@ namespace internal { /* AggregateError */ \ T(AllPromisesRejected, "All promises were rejected") \ T(CannotDeepFreezeObject, "Cannot DeepFreeze object of type %") \ @@ -210,7 +210,7 @@ diff --git a/v8/src/common/message-template.h b/v8/src/common/message-template.h diff --git a/v8/src/debug/debug-interface.cc b/v8/src/debug/debug-interface.cc --- a/v8/src/debug/debug-interface.cc +++ b/v8/src/debug/debug-interface.cc -@@ -1013,6 +1013,11 @@ void SetAsyncEventDelegate(Isolate* v8_isolate, AsyncEventDelegate* delegate) { +@@ -1015,6 +1015,11 @@ void SetAsyncEventDelegate(Isolate* v8_isolate, AsyncEventDelegate* delegate) { reinterpret_cast(v8_isolate)->set_async_event_delegate(delegate); } @@ -260,7 +260,7 @@ diff --git a/v8/src/debug/debug.h b/v8/src/debug/debug.h diff --git a/v8/src/execution/messages.cc b/v8/src/execution/messages.cc --- a/v8/src/execution/messages.cc +++ b/v8/src/execution/messages.cc -@@ -497,6 +497,7 @@ MaybeHandle MessageFormatter::TryFormat( +@@ -500,6 +500,7 @@ MaybeHandle MessageFormatter::TryFormat( MessageTemplate::kUndefinedOrNullToObject, MessageTemplate::kUnexpectedStrictReserved, MessageTemplate::kUnexpectedTokenIdentifier, @@ -333,4 +333,3 @@ diff --git a/v8/src/runtime/runtime-debug.cc b/v8/src/runtime/runtime-debug.cc } -- -2.25.1 diff --git a/build/patches/00Evict-the-entire-FrameTree-like-desktop.patch b/build/patches/Evict-the-entire-FrameTree-like-desktop.patch similarity index 96% rename from build/patches/00Evict-the-entire-FrameTree-like-desktop.patch rename to build/patches/Evict-the-entire-FrameTree-like-desktop.patch index 819997d56..95b4126bb 100644 --- a/build/patches/00Evict-the-entire-FrameTree-like-desktop.patch +++ b/build/patches/Evict-the-entire-FrameTree-like-desktop.patch @@ -12,7 +12,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/components/viz/common/features.cc b/components/viz/common/features.cc --- a/components/viz/common/features.cc +++ b/components/viz/common/features.cc -@@ -248,7 +248,7 @@ BASE_FEATURE(kRendererAllocatesImages, +@@ -252,7 +252,7 @@ BASE_FEATURE(kRendererAllocatesImages, // evicts itself. This differs from Destkop platforms which evict the entire // FrameTree along with the topmost viz::Surface. When this feature is enabled, // Android will begin also evicting the entire FrameTree. @@ -28,4 +28,3 @@ new file mode 100644 @@ -0,0 +1 @@ +SET_CROMITE_FEATURE_ENABLED(kInnerFrameCompositorSurfaceEviction); -- -2.25.1 diff --git a/build/patches/Experimental-user-scripts-support.patch b/build/patches/Experimental-user-scripts-support.patch index 9aef51f26..7e688bfb6 100644 --- a/build/patches/Experimental-user-scripts-support.patch +++ b/build/patches/Experimental-user-scripts-support.patch @@ -30,7 +30,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html chrome/android/BUILD.gn | 7 +- .../android/java/res/xml/main_preferences.xml | 5 + .../browser/download/DownloadUtils.java | 6 + - .../init/ProcessInitializationHandler.java | 3 + + .../init/ProcessInitializationHandler.java | 4 + chrome/android/java_sources.gni | 3 + chrome/browser/BUILD.gn | 7 + chrome/browser/about_flags.cc | 1 + @@ -94,7 +94,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html components/user_scripts/common/host_id.h | 35 + .../user_scripts/common/script_constants.h | 33 + components/user_scripts/common/url_pattern.cc | 803 ++++++++++++++++++ - components/user_scripts/common/url_pattern.h | 302 +++++++ + components/user_scripts/common/url_pattern.h | 303 +++++++ .../user_scripts/common/url_pattern_set.cc | 335 ++++++++ .../user_scripts/common/url_pattern_set.h | 160 ++++ components/user_scripts/common/user_script.cc | 329 +++++++ @@ -112,7 +112,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../user_scripts_renderer_resources.grd | 14 + .../user_scripts/renderer/script_context.cc | 191 +++++ .../user_scripts/renderer/script_context.h | 67 ++ - .../user_scripts/renderer/script_injection.cc | 293 +++++++ + .../user_scripts/renderer/script_injection.cc | 295 +++++++ .../user_scripts/renderer/script_injection.h | 155 ++++ .../renderer/script_injection_manager.cc | 415 +++++++++ .../renderer/script_injection_manager.h | 100 +++ @@ -134,7 +134,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../strings/userscripts_strings.grdp | 54 ++ .../Experimental-user-scripts-support.inc | 13 + tools/gritsettings/resource_ids.spec | 6 + - 107 files changed, 9488 insertions(+), 2 deletions(-) + 107 files changed, 9492 insertions(+), 2 deletions(-) create mode 100644 components/user_scripts/README.md create mode 100755 components/user_scripts/android/BUILD.gn create mode 100644 components/user_scripts/android/java/res/layout/accept_script_item.xml @@ -225,7 +225,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -176,7 +176,11 @@ if (current_toolchain == default_toolchain) { +@@ -177,7 +177,11 @@ if (current_toolchain == default_toolchain) { sources = chrome_java_resources sources += [ "//chrome/android/java/res_app/layout/main.xml" ] @@ -238,7 +238,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn ":chrome_base_module_resources", ":ui_locale_string_resources", "//chrome/android/webapk/libs/common:splash_resources", -@@ -576,6 +580,7 @@ if (current_toolchain == default_toolchain) { +@@ -582,6 +586,7 @@ if (current_toolchain == default_toolchain) { "//components/ukm/android:java", "//components/url_formatter/android:url_formatter_java", "//components/user_prefs/android:java", @@ -264,7 +264,7 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java --- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadUtils.java -@@ -75,6 +75,7 @@ import org.chromium.ui.UiUtils; +@@ -72,6 +72,7 @@ import org.chromium.ui.UiUtils; import org.chromium.ui.base.DeviceFormFactor; import org.chromium.ui.widget.Toast; import org.chromium.url.GURL; @@ -272,10 +272,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/Downlo import java.io.File; -@@ -447,6 +448,11 @@ public class DownloadUtils { - public static boolean openFile(String filePath, String mimeType, String downloadGuid, - OTRProfileID otrProfileID, String originalUrl, String referrer, - @DownloadOpenSource int source, Context context) { +@@ -423,6 +424,11 @@ public class DownloadUtils { + String referrer, + @DownloadOpenSource int source, + Context context) { + if (UserScriptsUtils.getInstance().openFile(filePath, mimeType, downloadGuid, + originalUrl, referrer, + getUriForItem(filePath))) { @@ -287,7 +287,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/Downlo diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java --- a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java -@@ -125,6 +125,8 @@ import java.util.ArrayList; +@@ -124,6 +124,8 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -296,14 +296,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessIni /** * Handles the initialization dependences of the browser process. This is meant to handle the * initialization that is not tied to any particular Activity, and the logic that should only be -@@ -332,6 +334,7 @@ public class ProcessInitializationHandler { +@@ -350,6 +352,8 @@ public class ProcessInitializationHandler { - DefaultBrowserInfo.initBrowserFetcher(); + DefaultBrowserInfo.initBrowserFetcher(); -+ UserScriptsUtils.Initialize(); - AfterStartupTaskUtils.setStartupComplete(); ++ UserScriptsUtils.Initialize(); ++ + AfterStartupTaskUtils.setStartupComplete(); - PartnerBrowserCustomizations.getInstance().setOnInitializeAsyncFinished( + PartnerBrowserCustomizations.getInstance() diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni --- a/chrome/android/java_sources.gni +++ b/chrome/android/java_sources.gni @@ -324,7 +325,7 @@ diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -3685,6 +3685,13 @@ static_library("browser") { +@@ -3658,6 +3658,13 @@ static_library("browser") { ] deps += [ "//chrome/android/modules/dev_ui/provider:native" ] } @@ -352,7 +353,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc -@@ -270,6 +270,7 @@ +@@ -278,6 +278,7 @@ #include "components/permissions/contexts/geolocation_permission_context_android.h" #include "components/query_tiles/tile_service_prefs.h" #include "components/webapps/browser/android/install_prompt_prefs.h" @@ -360,7 +361,7 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse #else // BUILDFLAG(IS_ANDROID) #include "chrome/browser/cart/cart_service.h" #include "chrome/browser/companion/core/promo_handler.h" -@@ -1724,6 +1725,9 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -1792,6 +1793,9 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, translate::TranslatePrefs::RegisterProfilePrefs(registry); omnibox::RegisterProfilePrefs(registry); ZeroSuggestProvider::RegisterProfilePrefs(registry); @@ -373,7 +374,7 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse diff --git a/chrome/browser/profiles/BUILD.gn b/chrome/browser/profiles/BUILD.gn --- a/chrome/browser/profiles/BUILD.gn +++ b/chrome/browser/profiles/BUILD.gn -@@ -68,6 +68,9 @@ source_set("profile") { +@@ -70,6 +70,9 @@ source_set("profile") { "//content/public/browser", "//extensions/buildflags", ] @@ -386,9 +387,9 @@ diff --git a/chrome/browser/profiles/BUILD.gn b/chrome/browser/profiles/BUILD.gn diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -485,6 +485,10 @@ - #include "chrome/browser/offline_pages/request_coordinator_factory.h" - #endif +@@ -502,6 +502,10 @@ + + #endif // BUILDFLAG(ENABLE_BOUND_SESSION_CREDENTIALS) +#if BUILDFLAG(IS_ANDROID) +#include "components/user_scripts/browser/userscripts_browser_client.h" @@ -397,7 +398,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc namespace chrome { void AddProfilesExtraParts(ChromeBrowserMainParts* main_parts) { -@@ -1205,6 +1209,9 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1248,6 +1252,9 @@ void ChromeBrowserMainExtraPartsProfiles:: #endif WebDataServiceFactory::GetInstance(); webrtc_event_logging::WebRtcEventLogManagerKeyedServiceFactory::GetInstance(); @@ -410,7 +411,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc --- a/chrome/browser/profiles/profile_manager.cc +++ b/chrome/browser/profiles/profile_manager.cc -@@ -109,6 +109,10 @@ +@@ -111,6 +111,10 @@ #include "extensions/common/manifest.h" #endif @@ -421,7 +422,7 @@ diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profile #if BUILDFLAG(ENABLE_SESSION_SERVICE) #include "chrome/browser/sessions/app_session_service_factory.h" #include "chrome/browser/sessions/session_service_factory.h" -@@ -1533,6 +1537,15 @@ void ProfileManager::DoFinalInitForServices(Profile* profile, +@@ -1537,6 +1541,15 @@ void ProfileManager::DoFinalInitForServices(Profile* profile, #endif #endif @@ -501,7 +502,7 @@ diff --git a/chrome/browser/profiles/renderer_updater.h b/chrome/browser/profile diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc -@@ -102,6 +102,7 @@ +@@ -99,6 +99,7 @@ #include "components/signin/public/base/signin_buildflags.h" #include "components/site_engagement/content/site_engagement_service.h" #include "components/supervised_user/core/common/buildflags.h" @@ -509,7 +510,7 @@ diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrom #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" #include "content/public/common/content_client.h" -@@ -533,6 +534,10 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, +@@ -528,6 +529,10 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, return &NewWebUI; if (url.host_piece() == chrome::kChromeUIVersionHost) return &NewWebUI; @@ -523,7 +524,7 @@ diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrom diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni --- a/chrome/chrome_paks.gni +++ b/chrome/chrome_paks.gni -@@ -122,6 +122,7 @@ template("chrome_extra_paks") { +@@ -121,6 +121,7 @@ template("chrome_extra_paks") { "$root_gen_dir/net/net_resources.pak", "$root_gen_dir/third_party/blink/public/resources/blink_resources.pak", "$root_gen_dir/third_party/blink/public/resources/inspector_overlay_resources.pak", @@ -531,7 +532,7 @@ diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni "$root_gen_dir/ui/resources/webui_resources.pak", ] deps = [ -@@ -139,6 +140,7 @@ template("chrome_extra_paks") { +@@ -138,6 +139,7 @@ template("chrome_extra_paks") { "//third_party/blink/public:devtools_inspector_resources", "//third_party/blink/public:resources", "//ui/resources", @@ -553,7 +554,7 @@ diff --git a/chrome/common/renderer_configuration.mojom b/chrome/common/renderer diff --git a/chrome/renderer/BUILD.gn b/chrome/renderer/BUILD.gn --- a/chrome/renderer/BUILD.gn +++ b/chrome/renderer/BUILD.gn -@@ -234,6 +234,12 @@ static_library("renderer") { +@@ -235,6 +235,12 @@ static_library("renderer") { "//v8", ] @@ -612,7 +613,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer #if BUILDFLAG(ENABLE_PPAPI) new PepperHelper(render_frame); #endif -@@ -1615,6 +1637,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentStart( +@@ -1613,6 +1635,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentStart( render_frame); // |render_frame| might be dead by now. #endif @@ -630,7 +631,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer } void ChromeContentRendererClient::RunScriptsAtDocumentEnd( -@@ -1624,6 +1657,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentEnd( +@@ -1622,6 +1655,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentEnd( render_frame); // |render_frame| might be dead by now. #endif @@ -648,7 +649,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer } void ChromeContentRendererClient::RunScriptsAtDocumentIdle( -@@ -1633,6 +1677,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentIdle( +@@ -1631,6 +1675,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentIdle( render_frame); // |render_frame| might be dead by now. #endif @@ -691,7 +692,7 @@ diff --git a/chrome/renderer/chrome_render_thread_observer.cc b/chrome/renderer/ diff --git a/components/components_strings.grd b/components/components_strings.grd --- a/components/components_strings.grd +++ b/components/components_strings.grd -@@ -337,6 +337,7 @@ +@@ -338,6 +338,7 @@ @@ -911,7 +912,7 @@ new file mode 100755 + deps = [ + ":java_resources", + "//base:base_java", -+ "//base:jni_java", ++ "//third_party/jni_zero:jni_zero_java", + "//components/embedder_support/android:browser_context_java", + "//components/browser_ui/settings/android:java", + "//components/browser_ui/widget/android:java", @@ -1067,7 +1068,7 @@ new file mode 100644 + + + -+ + -\ No newline at end of file diff --git a/components/user_scripts/android/java/res/layout/accept_script_list.xml b/components/user_scripts/android/java/res/layout/accept_script_list.xml new file mode 100644 --- /dev/null @@ -1527,8 +1527,8 @@ new file mode 100644 + +import org.chromium.components.browser_ui.widget.dragreorder.DragReorderableListAdapter; +import org.chromium.components.browser_ui.widget.dragreorder.DragStateDelegate; -+import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; -+import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; ++import org.chromium.ui.listmenu.ListMenuButton; ++import org.chromium.ui.listmenu.ListMenuButtonDelegate; +import org.chromium.ui.widget.ChromeImageView; + +import java.util.ArrayList; @@ -1675,8 +1675,7 @@ new file mode 100644 + +package org.chromium.components.user_scripts; + -+import static org.chromium.components.browser_ui.widget.listmenu.BasicListMenu.buildMenuListItem; -+import static org.chromium.components.browser_ui.widget.listmenu.BasicListMenu.buildMenuListItemWithEndIcon; ++import static org.chromium.components.browser_ui.widget.BrowserUiListMenuUtils.buildMenuListItem; + +import android.content.Context; +import android.content.Intent; @@ -1699,9 +1698,10 @@ new file mode 100644 +import org.chromium.base.ApplicationStatus; +import org.chromium.base.ContextUtils; +import org.chromium.components.browser_ui.widget.TintedDrawable; -+import org.chromium.components.browser_ui.widget.listmenu.BasicListMenu; -+import org.chromium.components.browser_ui.widget.listmenu.ListMenu; -+import org.chromium.components.browser_ui.widget.listmenu.ListMenuItemProperties; ++import org.chromium.components.browser_ui.widget.BrowserUiListMenuUtils; ++import org.chromium.ui.listmenu.BasicListMenu; ++import org.chromium.ui.listmenu.ListMenu; ++import org.chromium.ui.listmenu.ListMenuItemProperties; +import org.chromium.ui.modelutil.MVCListAdapter.ModelList; + +import org.chromium.components.user_scripts.ScriptListBaseAdapter; @@ -1740,7 +1740,7 @@ new file mode 100644 + } + }; + ((ScriptInfoRowViewHolder) holder) -+ .setMenuButtonDelegate(() -> new BasicListMenu(mContext, menuItems, delegate)); ++ .setMenuButtonDelegate(() -> BrowserUiListMenuUtils.getBasicListMenu(mContext, menuItems, delegate)); + ((ScriptInfoRowViewHolder) holder) + .setItemListener(new ScriptListBaseAdapter.ItemClickListener() { + @Override @@ -2627,7 +2627,7 @@ new file mode 100644 +++ b/components/user_scripts/browser/resources/user-script-ui/user-scripts-ui.js @@ -0,0 +1,9 @@ +import {sendWithPromise} from 'chrome://resources/js/cr.js'; -+import {$} from 'chrome://resources/js/util_ts.js'; ++import {$} from 'chrome://resources/js/util.js'; + +document.addEventListener('DOMContentLoaded', function() { + const urlParams = new URLSearchParams(window.location.search); @@ -5591,7 +5591,7 @@ diff --git a/components/user_scripts/common/url_pattern.h b/components/user_scri new file mode 100755 --- /dev/null +++ b/components/user_scripts/common/url_pattern.h -@@ -0,0 +1,302 @@ +@@ -0,0 +1,303 @@ +// Copyright (c) 2012 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. @@ -5605,6 +5605,7 @@ new file mode 100755 + +#include "base/strings/string_piece.h" +#include "net/base/registry_controlled_domains/registry_controlled_domain.h" ++#include "third_party/abseil-cpp/absl/types/optional.h" + +class GURL; + @@ -8022,7 +8023,7 @@ diff --git a/components/user_scripts/renderer/script_injection.cc b/components/u new file mode 100755 --- /dev/null +++ b/components/user_scripts/renderer/script_injection.cc -@@ -0,0 +1,293 @@ +@@ -0,0 +1,295 @@ +// 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. @@ -8114,7 +8115,9 @@ new file mode 100755 + ~FrameWatcher() override {} + + private: -+ void WillDetach() override { injection_->invalidate_render_frame(); } ++ void WillDetach(blink::DetachReason detach_reason) override { ++ injection_->invalidate_render_frame(); ++ } + void OnDestruct() override { injection_->invalidate_render_frame(); } + + ScriptInjection* injection_; @@ -8556,7 +8559,7 @@ new file mode 100755 + void DidCreateDocumentElement() override; + void DidFailProvisionalLoad() override; + void DidDispatchDOMContentLoadedEvent() override; -+ void WillDetach() override; ++ void WillDetach(blink::DetachReason detach_reason) override; + void OnDestruct() override; + void OnStop() override; + @@ -8680,7 +8683,7 @@ new file mode 100755 + weak_factory_.GetWeakPtr())); +} + -+void ScriptInjectionManager::RFOHelper::WillDetach() { ++void ScriptInjectionManager::RFOHelper::WillDetach(blink::DetachReason detach_reason) { + // The frame is closing - invalidate. + constexpr bool kForceReset = true; + InvalidateAndResetFrame(kForceReset); @@ -10468,18 +10471,17 @@ new file mode 100644 diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -966,6 +966,12 @@ - "components/autofill/core/browser/autofill_address_rewriter_resources.grd":{ - "includes": [7220] +@@ -969,6 +969,12 @@ + "components/search_engine_descriptions_strings.grd": { + "messages": [7260], }, + "components/user_scripts/renderer/resources/user_scripts_renderer_resources.grd": { -+ "includes": [7240], ++ "includes": [7280], + }, + "components/user_scripts/browser/resources/browser_resources.grd": { -+ "includes": [7260], ++ "includes": [7300], + }, # END components/ section. # START ios/ section. -- -2.25.1 diff --git a/build/patches/00Eyeo-Adblock-Remove-Privacy-Issues.patch b/build/patches/Eyeo-Adblock-Remove-Privacy-Issues.patch similarity index 99% rename from build/patches/00Eyeo-Adblock-Remove-Privacy-Issues.patch rename to build/patches/Eyeo-Adblock-Remove-Privacy-Issues.patch index 3eb996829..6b4ef2928 100644 --- a/build/patches/00Eyeo-Adblock-Remove-Privacy-Issues.patch +++ b/build/patches/Eyeo-Adblock-Remove-Privacy-Issues.patch @@ -167,7 +167,7 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -166,8 +166,6 @@ static_library("browser") { +@@ -157,8 +157,6 @@ static_library("browser") { "adblock/adblock_content_browser_client.h", "adblock/adblock_controller_factory.cc", "adblock/adblock_controller_factory.h", @@ -469,8 +469,8 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc #include "chrome/browser/adblock/content_security_policy_injector_factory.h" #include "chrome/browser/adblock/element_hider_factory.h" #include "chrome/browser/adblock/resource_classification_runner_factory.h" -@@ -781,7 +780,6 @@ void ChromeBrowserMainExtraPartsProfiles:: - ExitTypeServiceFactory::GetInstance(); +@@ -823,7 +822,6 @@ void ChromeBrowserMainExtraPartsProfiles:: + FakeSmartCardDeviceServiceFactory::GetInstance(); #endif adblock::AdblockControllerFactory::GetInstance(); - adblock::AdblockTelemetryServiceFactory::GetInstance(); @@ -481,14 +481,14 @@ diff --git a/chrome/browser/resources/settings/BUILD.gn b/chrome/browser/resourc --- a/chrome/browser/resources/settings/BUILD.gn +++ b/chrome/browser/resources/settings/BUILD.gn @@ -74,6 +74,7 @@ build_webui("build") { - web_component_files = [ "a11y_page/a11y_page.ts", "about_page/about_page.ts", + "ai_page/ai_page.ts", + "adblock_page/adblock_page.ts", "appearance_page/appearance_fonts_page.ts", "appearance_page/appearance_page.ts", "appearance_page/home_url_input.ts", -@@ -374,6 +375,7 @@ build_webui("build") { +@@ -371,6 +372,7 @@ build_webui("build") { ts_composite = true ts_definitions = [ "//tools/typescript/definitions/autofill_private.d.ts", @@ -1002,8 +1002,8 @@ new file mode 100644 diff --git a/chrome/browser/resources/settings/basic_page/basic_page.html b/chrome/browser/resources/settings/basic_page/basic_page.html --- a/chrome/browser/resources/settings/basic_page/basic_page.html +++ b/chrome/browser/resources/settings/basic_page/basic_page.html -@@ -24,6 +24,13 @@ - +@@ -31,6 +31,13 @@ + + +@@ -94,6 +94,15 @@ + sub-label="$i18n{permissionsPageDescription}" + on-click="onPermissionsPageClick_" + role-description="$i18n{subpageArrowRoleDescription}"> +

+