From 47a57d88a1f89014d7d0b3487c5776d33e50c953 Mon Sep 17 00:00:00 2001 From: althafvly Date: Mon, 5 Aug 2024 15:18:09 +0530 Subject: [PATCH 1/4] Bump to 127.0.6533.94 --- Dockerfile | 2 +- build.sh | 8 +- build/.gitignore | 2 + build/browser.gn_args | 9 +- build/copy_cromite_patches.sh | 18 + .../AImageReader-CFI-crash-mitigations.patch | 22 +- .../Add-AllowUserCertificates-flag.patch | 34 +- .../Add-IsCleartextPermitted-flag.patch | 2 +- .../Add-a-proxy-configuration-page.patch | 114 +- .../Add-an-always-incognito-mode.patch | 436 +- .../Add-autoplay-site-setting.patch | 8 +- .../Add-bookmark-import-export-actions.patch | 200 +- .../Add-cromite-flags-support.patch | 369 +- ...dd-custom-tab-intents-privacy-option.patch | 32 +- .../cromite_patches/Add-exit-menu-item.patch | 35 +- ...g-for-omnibox-autocomplete-filtering.patch | 12 +- ...nfigure-maximum-connections-per-host.patch | 4 +- .../Add-flag-to-disable-IPv6-probes.patch | 4 +- .../Add-flag-to-disable-vibration.patch | 2 +- ...Add-lifetime-options-for-permissions.patch | 335 +- .../Add-menu-item-to-bookmark-all-tabs.patch | 187 +- .../Add-menu-item-to-view-source.patch | 24 +- .../Add-option-to-force-tablet-UI.patch | 599 +- ...-to-not-persist-tabs-across-sessions.patch | 22 +- .../Add-option-to-use-home-page-as-NTP.patch | 44 +- build/cromite_patches/Add-search-engine.patch | 98 +- .../Add-site-engagement-flag.patch | 18 +- ...-support-for-ISupportHelpAndFeedback.patch | 4 +- .../Add-support-for-writing-URIs.patch | 2 +- .../Add-webGL-site-setting.patch | 12 +- .../Add-webRTC-site-settings.patch | 6 +- ...ow-building-without-enable_reporting.patch | 130 +- ...ow-building-without-supervised-users.patch | 327 +- .../Allow-playing-audio-in-background.patch | 6 +- ...e-new-tab-page-for-default-home-page.patch | 26 +- ...ioBuffer-AnalyserNode-fp-mitigations.patch | 27 +- .../Battery-API-return-nothing.patch | 2 +- .../Block-qjz9zk-or-trk-requests.patch | 54 +- .../Bookmarks-select-all-menu-entry.patch | 53 +- .../Bromite-package-name.patch | 2 +- .../Bromite-subresource-adblocker.patch | 247 +- .../Client-hints-overrides.patch | 88 +- .../Content-settings-infrastructure.patch | 571 +- ...ctionary-suggestions-for-the-Omnibox.patch | 8 +- ...ble-Accessibility-service-by-default.patch | 4 +- .../Disable-PrivacyGuide.patch | 24 +- .../Disable-StartSurface-feature.patch | 10 +- .../Disable-TLS-resumption.patch | 18 +- .../Disable-all-predictors-code.patch | 359 +- .../Disable-all-promo-dialogs.patch | 20 +- .../Disable-conversion-measurement-api.patch | 219 +- .../Disable-crash-reporting.patch | 2 +- .../Disable-feeds-support-by-default.patch | 122 +- ...Disable-fetching-of-all-field-trials.patch | 70 +- .../Disable-idle-detection.patch | 8 +- ...-lock-icon-in-address-bar-by-default.patch | 2 +- ...media-router-and-remoting-by-default.patch | 12 +- .../Disable-minidump-upload-scheduling.patch | 2 +- ...-omission-of-URL-elements-in-Omnibox.patch | 56 - .../Disable-omission-of-URL-elements.patch | 125 + .../Disable-plugins-enumeration.patch | 2 +- ...ox.patch => Disable-privacy-sandbox.patch} | 170 +- ...e-references-to-fonts.googleapis.com.patch | 31 +- .../Disable-safety-check.patch | 88 +- .../Disable-smart-selection-by-default.patch | 12 +- ...isable-some-signed-exchange-features.patch | 10 +- ...ble-support-for-RAR-files-inspection.patch | 4 +- .../Disable-text-fragments-by-default.patch | 18 +- .../Disable-third-party-origin-trials.patch | 41 +- .../Disable-update-scheduler.patch | 2 +- .../Disable-various-metrics.patch | 46 +- .../Do-not-build-API-keys-infobar.patch | 17 +- .../Do-not-compile-QR-code-sharing.patch | 37 +- ...ore-download-location-prompt-setting.patch | 4 +- .../Do-not-link-with-libatomic.patch | 2 +- .../Do-not-store-passwords-by-default.patch | 7 +- build/cromite_patches/DoH-improvements.patch | 160 +- .../Enable-Certificate-Transparency.patch | 31 +- .../Enable-HEVC-by-default.patch | 2 +- .../Enable-ImprovedBookmarks-by-default.patch | 20 +- ...able-PermuteTLSExtensions-by-default.patch | 17 - ...ctOriginIsolation-and-SitePerProcess.patch | 6 +- ...e-darken-websites-checkbox-in-themes.patch | 10 +- ...fwrapv-in-Clang-for-non-UBSan-builds.patch | 2 +- .../Enable-native-Android-autofill.patch | 868 ++- .../Enable-network-isolation-features.patch | 12 +- .../cromite_patches/Enable-share-intent.patch | 66 +- .../Experimental-user-scripts-support.patch | 167 +- ...s.patch => Eyeo-Adblock-for-Cromite.patch} | 5531 ++++------------- .../Fix-chromium-build-bugs.patch | 69 +- ...story-number-of-days-privacy-setting.patch | 76 +- ...number-of-autocomplete-matches-to-10.patch | 2 +- ...ripts-for-AMP-tracking-ads-and-video.patch | 16 +- .../Invalidate-components-public-key.patch | 2 +- build/cromite_patches/JIT-site-settings.patch | 28 +- .../Keep-empty-tabs-between-sessions.patch | 6 +- ...-allow-screenshots-in-Incognito-mode.patch | 4 +- .../Logcat-crash-reports-UI.patch | 85 +- .../Modify-default-preferences.patch | 43 +- .../Move-navigation-bar-to-bottom.patch | 1423 +++-- ...nt-settings-back-to-privacy-settings.patch | 24 +- .../Multiple-fingerprinting-mitigations.patch | 80 +- .../Never-fetch-popular-sites.patch | 4 +- ...uiltin-autocomplete-for-chrome-flags.patch | 2 +- .../OpenSearch-miscellaneous.patch | 6 +- .../Override-Navigator-Language.patch | 21 +- .../Partition-Blink-memory-cache.patch | 42 +- .../Partition-blobs-by-top-frame-URL.patch | 38 +- ...-modal-dialog-flag-to-close-all-tabs.patch | 14 +- ...e-introduce-override_build_timestamp.patch | 4 +- ...ders-in-DoH-requests-to-bare-minimum.patch | 6 +- ...referrals-in-cross-origin-navigation.patch | 69 +- .../Remove-SMS-integration.patch | 4 +- .../Remove-binary-blob-integrations.patch | 599 +- ...cklisted-URLs-upon-bookmark-creation.patch | 13 +- .../Remove-help-menu-item.patch | 26 +- .../Remove-segmentation-platform.patch | 11 +- ...Remove-voice-recognition-integration.patch | 484 +- ...ndow-name-on-cross-origin-navigation.patch | 4 +- ...ce-DoH-probe-domain-with-RIPE-domain.patch | 4 +- ...ore-BookmarkToolbar-setCurrentFolder.patch | 150 + .../Restore-LastTabStandingTracker.patch | 24 +- .../Restore-Search-Ready-Omnibox-flag.patch | 34 +- .../Restore-Simplified-NTP-launch.patch | 526 +- ...-button-in-top-toolbar-customization.patch | 100 +- .../Restore-classic-new-tab-page.patch | 14 +- .../Restore-offline-indicator-v2-flag.patch | 14 +- ...Delete-block-external-form-redirects.patch | 8 +- ...emove-disable-pull-to-refresh-effect.patch | 2 +- ...l-of-execution-context-address-space.patch | 151 +- ...script-content-setting-secondary-url.patch | 371 ++ ...tings-for-cookies-javascript-and-ads.patch | 25 +- .../Site-setting-for-images.patch | 270 +- .../Switch-to-fstack-protector-strong.patch | 2 +- .../Timezone-customization.patch | 75 +- .../Use-4-tile-rows-never-show-logo.patch | 79 - .../User-agent-customization.patch | 544 +- build/cromite_patches/Welcome-screen.patch | 153 +- .../autofill-miscellaneous.patch | 44 +- .../cromite_patches/bromite-build-utils.patch | 37 +- ...build-remove-calling-untrusted-hooks.patch | 178 - .../disable-AdsBlockedInfoBar.patch | 10 +- .../disable-WebView-variations-support.patch | 6 +- .../disable-battery-status-updater.patch | 27 +- ...IPv6-connectivity-probes-to-RIPE-DNS.patch | 2 +- .../do-not-add-suffix-to-package-name.patch | 2 +- .../enable-ftrivial-auto-var-init-zero.patch | 2 +- .../exit-on-failure-of-inclusion.patch | 2 +- .../eyeo-beta-118.0.5993.48-android_api.patch | 38 +- ...-beta-118.0.5993.48-android_settings.patch | 15 +- .../eyeo-beta-118.0.5993.48-base.patch | 298 +- ...eta-118.0.5993.48-chrome_integration.patch | 219 +- ...yeo-beta-118.0.5993.48-extension_api.patch | 84 +- build/cromite_patches/kill-Auth.patch | 2 +- .../kill-Location-fall-back-to-system.patch | 23 +- build/cromite_patches/kill-Vision.patch | 2 +- ...net-cert-increase-default-key-length.patch | 2 +- ...always-prompt-for-download-directory.patch | 2 +- ...le-fetching-of-languages-from-server.patch | 4 +- ...gled-chromium-Disable-profile-avatar.patch | 6 +- ...romium-Disable-translate-integration.patch | 24 +- ...ed-chromium-Disable-untraceable-URLs.patch | 2 +- ...chromium-Disable-webRTC-log-uploader.patch | 2 +- ...ed-chromium-no-special-hosts-domains.patch | 383 +- ...RTC-do-not-expose-local-IP-addresses.patch | 6 +- ...iew-Hard-no-to-persistent-histograms.patch | 6 +- build/cromite_patches_list.txt | 11 +- ...oval-of-execution-context-address-sp.patch | 4 +- ...-fixup-Bromite-subresource-adblocker.patch | 8 +- ...Disable-fetching-of-all-field-trials.patch | 8 +- ...4-add-trichrome-browser-apk-targets.patch} | 22 +- ...price-shopping-commerce-integration.patch} | 14 +- ...-Remove-bromite-auto-updater-option.patch} | 37 +- ...ange-app-and-package-name-to-browser.patch | 4 +- ...r-Point-to-our-default-popular-sites.patch | 4 +- ...owser-Enable-do-not-track-by-default.patch | 12 +- ...vider-to-share-default-search-engine.patch | 12 +- ...rowser-Enable-custom-tabs-by-default.patch | 12 +- ...-Enable-search-suggestion-by-default.patch | 8 +- ...rowser-Modify-default-search-engines.patch | 1776 +----- .../0014-Add-Mojeek-Search-engine.patch | 24 + .../0015-Add-Mojeek-Search-engine.patch | 896 --- ...Redirect-users-to-e-foundation-docs.patch} | 6 +- .../0016-Revert-TM-Add-themed-app-icons.patch | 10 +- ...wser-Use-our-custom-icon-for-browser.patch | 10 +- ...18-Browser-Rename-strings-to-browser.patch | 6 +- ...ser-Use-adaptive-icon-for-recents-UI.patch | 4 +- .../0020-Browser-Change-info-bar-icon.patch | 4 +- ...wser-Remove-logo-from-chrome-version.patch | 4 +- ...Browser-disable-search-provider-logo.patch | 8 +- ...owser-disable-first-run-welcome-page.patch | 8 +- ...0024-disable-seed-based-field-trials.patch | 6 +- .../0025-disable-fetching-variations.patch | 6 +- ...vigation-error-correction-by-default.patch | 8 +- ...-Handle-web-search-action-in-browser.patch | 34 +- ...-Browser-Replace-default-tab-favicon.patch | 4 +- ...Browser-Spoof-as-Pixel-4a-by-default.patch | 4 +- ...ser-Remove-broken-link-about-entries.patch | 4 +- ...e-Android-native-autofill-by-default.patch | 8 +- ...r-Enable-unified-autoplay-by-default.patch | 12 +- ...3-Use-thirdparty-autofill-by-default.patch | 4 +- .../0034-Remove-some-privacy-UI-pref.patch | 27 +- ...rowser-Remove-send-to-devices-option.patch | 19 +- ...036-Browser-Enable-webRTC-by-default.patch | 16 +- ...0037-Browser-Enable-webgl-by-default.patch | 8 +- .../0038-Enable-sensors-by-default.patch | 10 +- ...e-browser-sign-in-feature-by-default.patch | 6 +- ...-signed-out-avatar-on-new-tab-pages-.patch | 16 +- ...e-Sign-In-preference-when-disallowed.patch | 8 +- ...42-Remove-google-pref-from-main-menu.patch | 10 +- ...disable-contextual-search-by-default.patch | 8 +- .../0044-Disable-AGSA-by-default.patch | 423 +- .../0045-Update-i18n-zh_CN-support.patch | 28 +- ...-mremap-from-seccomp-baseline-policy.patch | 8 +- .../0047-Re-introduce-kWebAuthCable.patch | 141 +- ...-SPPI-for-devices-with-enough-memory.patch | 4 +- ...cent-and-switch-to-match-our-palette.patch | 202 +- build/e_patches/0050-Update-app-icon.patch | 4 +- .../e_patches/0051-Update-default-sites.patch | 4 +- ...ings-when-parental-control-is-activ.patch} | 38 +- ...p-Add-menu-item-to-bookmark-all-tabs.patch | 43 - ...053-Browser-Use-correct-switch-scale.patch | 25 + build/e_patches_list.txt | 15 +- domain_substitution/.gitignore | 2 + .../copy_domain_substitution.sh | 16 + domain_substitution/domain_blacklist.list | 2 + domain_substitution/domain_substitution.list | 1355 ++-- 227 files changed, 11272 insertions(+), 13988 deletions(-) create mode 100644 build/.gitignore create mode 100755 build/copy_cromite_patches.sh delete mode 100644 build/cromite_patches/Disable-omission-of-URL-elements-in-Omnibox.patch create mode 100644 build/cromite_patches/Disable-omission-of-URL-elements.patch rename build/cromite_patches/{Disable-FLoC-and-privacy-sandbox.patch => Disable-privacy-sandbox.patch} (54%) delete mode 100644 build/cromite_patches/Enable-PermuteTLSExtensions-by-default.patch rename build/cromite_patches/{Eyeo-Adblock-Remove-Privacy-Issues.patch => Eyeo-Adblock-for-Cromite.patch} (62%) create mode 100644 build/cromite_patches/Restore-BookmarkToolbar-setCurrentFolder.patch create mode 100644 build/cromite_patches/Revert-remove-allowscript-content-setting-secondary-url.patch delete mode 100644 build/cromite_patches/Use-4-tile-rows-never-show-logo.patch delete mode 100644 build/cromite_patches/build-remove-calling-untrusted-hooks.patch rename build/e_patches/{0005-add-trichrome-browser-apk-targets.patch => 0004-add-trichrome-browser-apk-targets.patch} (76%) rename build/e_patches/{0006-Browser-disable-price-shopping-commerce-integration.patch => 0005-Browser-disable-price-shopping-commerce-integration.patch} (85%) rename build/e_patches/{0004-Remove-bromite-auto-updater-option.patch => 0006-Remove-bromite-auto-updater-option.patch} (76%) create mode 100644 build/e_patches/0014-Add-Mojeek-Search-engine.patch delete mode 100644 build/e_patches/0015-Add-Mojeek-Search-engine.patch rename build/e_patches/{0014-Browser-Redirect-users-to-e-foundation-docs.patch => 0015-Browser-Redirect-users-to-e-foundation-docs.patch} (92%) rename build/e_patches/{0053-Browser-Hide-settings-when-parental-control-is-activ.patch => 0052-Browser-Hide-settings-when-parental-control-is-activ.patch} (81%) delete mode 100644 build/e_patches/0052-fixup-Add-menu-item-to-bookmark-all-tabs.patch create mode 100644 build/e_patches/0053-Browser-Use-correct-switch-scale.patch create mode 100755 domain_substitution/copy_domain_substitution.sh create mode 100644 domain_substitution/domain_blacklist.list diff --git a/Dockerfile b/Dockerfile index 169c7bb9..baffbcfc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:20.04 ENV CHROMIUM_DIR "/srv/chromium" -ENV CHROMIUM_VER "123.0.6312.122" +ENV CHROMIUM_VER "127.0.6533.94" RUN dpkg --add-architecture i386 diff --git a/build.sh b/build.sh index 4515a94b..b2c17156 100755 --- a/build.sh +++ b/build.sh @@ -134,7 +134,13 @@ patch() { rename() { cd $chromium_dir/src - replacements=("Chrome browser=Browser" "Chrome=Browser" "Bromite=Browser" "Cromite=Browser") + replacements=( + "Chrome browser=Browser" + "Chrome=Browser" + "Bromite=Browser" + "Cromite=Browser" + "Google Password Manager=Password Manager" + ) for replacement in "${replacements[@]}"; do replaced_string=${replacement%%=*} diff --git a/build/.gitignore b/build/.gitignore new file mode 100644 index 00000000..721043c8 --- /dev/null +++ b/build/.gitignore @@ -0,0 +1,2 @@ +cromite/ + diff --git a/build/browser.gn_args b/build/browser.gn_args index e2bbfff5..4819d36a 100644 --- a/build/browser.gn_args +++ b/build/browser.gn_args @@ -4,7 +4,6 @@ build_contextual_search=false build_with_tflite_lib=false chrome_pgo_phase=0 dcheck_always_on=false -debuggable_apks=false dfmify_dev_ui=false disable_android_lint=true disable_fieldtrial_testing_config=true @@ -18,10 +17,12 @@ enable_mdns=false enable_mse_mpeg2ts_stream_parser=true enable_nacl=false enable_openxr=false -enable_platform_dolby_vision=true +enable_platform_dolby_vision=false +enable_platform_dts_audio=false +enable_platform_encrypted_dolby_vision=false enable_platform_hevc=true -enable_remoting=false enable_reporting=false +enable_remoting=false enable_vr=false exclude_unwind_tables=false ffmpeg_branding="Chrome" @@ -39,10 +40,12 @@ use_cfi_cast=true use_debug_fission=true use_errorprone_java_compiler=false use_official_google_api_keys=false +use_relr_relocations=false use_rtti=false use_stable_package_name_for_trichrome=false use_sysroot=false use_thin_lto=false +use_v8_context_snapshot=false chrome_public_manifest_package = "foundation.e.browser" trichrome_library_package = "org.chromium.trichromelibrary" diff --git a/build/copy_cromite_patches.sh b/build/copy_cromite_patches.sh new file mode 100755 index 00000000..f512f2c5 --- /dev/null +++ b/build/copy_cromite_patches.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +if [ -d cromite ]; then + cd cromite + git fetch origin v127.0.6533.94-5fe9b924075b8c565742b4844362e71aaa9ec0d8 + git reset --hard FETCH_HEAD + cd .. +else + git clone https://gitlab.e.foundation/e/os/cromite.git -b v127.0.6533.94-5fe9b924075b8c565742b4844362e71aaa9ec0d8 cromite --depth=1 +fi + +cromite_patches_list=$(cat "cromite_patches_list.txt") +for file in $cromite_patches_list; do + cp cromite/build/patches/$file "cromite_patches/$file" +done + +echo "Copy done" + diff --git a/build/cromite_patches/AImageReader-CFI-crash-mitigations.patch b/build/cromite_patches/AImageReader-CFI-crash-mitigations.patch index 47d66c34..908d824c 100644 --- a/build/cromite_patches/AImageReader-CFI-crash-mitigations.patch +++ b/build/cromite_patches/AImageReader-CFI-crash-mitigations.patch @@ -90,8 +90,8 @@ 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 -@@ -3046,9 +3046,9 @@ - "expiry_milestone": 125 +@@ -3286,9 +3286,9 @@ + "expiry_milestone": 135 }, { - "name": "enable-image-reader", @@ -121,7 +121,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 -@@ -2689,6 +2689,22 @@ +@@ -2696,6 +2696,22 @@ "no_downscaled_overlay_promotion" ] }, @@ -147,7 +147,7 @@ diff --git a/gpu/config/gpu_driver_bug_list.json b/gpu/config/gpu_driver_bug_lis 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 -@@ -65,6 +65,11 @@ BASE_FEATURE(kUseGles2ForOopR, +@@ -53,6 +53,11 @@ BASE_FEATURE(kUseGles2ForOopR, base::FEATURE_DISABLED_BY_DEFAULT); #if BUILDFLAG(IS_ANDROID) @@ -168,12 +168,12 @@ diff --git a/gpu/config/gpu_finch_features.h b/gpu/config/gpu_finch_features.h #if BUILDFLAG(IS_ANDROID) +GPU_EXPORT BASE_DECLARE_FEATURE(kAImageReaderMediaPlayer); GPU_EXPORT BASE_DECLARE_FEATURE(kAndroidSurfaceControl); + GPU_EXPORT BASE_DECLARE_FEATURE(kEnableGpuMemoryBufferImplAHB); GPU_EXPORT BASE_DECLARE_FEATURE(kWebViewSurfaceControl); - GPU_EXPORT BASE_DECLARE_FEATURE(kAImageReader); diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc --- a/gpu/config/gpu_util.cc +++ b/gpu/config/gpu_util.cc -@@ -122,6 +122,9 @@ GpuFeatureStatus GetAndroidSurfaceControlFeatureStatus( +@@ -126,6 +126,9 @@ GpuFeatureStatus GetAndroidSurfaceControlFeatureStatus( #if !BUILDFLAG(IS_ANDROID) return kGpuFeatureStatusDisabled; #else @@ -183,7 +183,7 @@ diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc if (!gpu_preferences.enable_android_surface_control) return kGpuFeatureStatusDisabled; -@@ -368,6 +371,11 @@ void AdjustGpuFeatureStatusToWorkarounds(GpuFeatureInfo* gpu_feature_info) { +@@ -387,6 +390,11 @@ void AdjustGpuFeatureStatusToWorkarounds(GpuFeatureInfo* gpu_feature_info) { gpu_feature_info->status_values[GPU_FEATURE_TYPE_CANVAS_OOP_RASTERIZATION] = kGpuFeatureStatusBlocklisted; } @@ -198,7 +198,7 @@ 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 -@@ -11,6 +11,7 @@ clamp_texture_base_level_and_max_level +@@ -10,6 +10,7 @@ clamp_texture_base_level_and_max_level clear_pixel_unpack_buffer_before_copyteximage disable_2d_canvas_auto_flush disable_accelerated_av1_decode @@ -209,7 +209,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 -@@ -65,6 +65,7 @@ +@@ -69,6 +69,7 @@ #if BUILDFLAG(IS_ANDROID) #include "ui/gfx/android/android_surface_control_compat.h" @@ -217,7 +217,7 @@ diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc #endif #if BUILDFLAG(ENABLE_VULKAN) -@@ -662,6 +663,13 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line, +@@ -721,6 +722,13 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line, } #endif // BUILDFLAG(IS_WIN) @@ -242,7 +242,7 @@ diff --git a/gpu/ipc/service/stream_texture_android.cc b/gpu/ipc/service/stream_ #include "base/android/scoped_hardware_buffer_fence_sync.h" #include "base/feature_list.h" #include "base/functional/bind.h" -@@ -50,7 +51,15 @@ std::unique_ptr MakeCurrent( +@@ -49,7 +50,15 @@ std::unique_ptr MakeCurrent( } TextureOwner::Mode GetTextureOwnerMode() { diff --git a/build/cromite_patches/Add-AllowUserCertificates-flag.patch b/build/cromite_patches/Add-AllowUserCertificates-flag.patch index de341491..ca35a310 100644 --- a/build/cromite_patches/Add-AllowUserCertificates-flag.patch +++ b/build/cromite_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 -@@ -230,6 +230,7 @@ import org.chromium.content_public.browser.ScreenOrientationProvider; +@@ -229,6 +229,7 @@ import org.chromium.content_public.browser.ScreenOrientationProvider; import org.chromium.content_public.browser.SelectionPopupController; import org.chromium.content_public.browser.WebContents; import org.chromium.content_public.common.ContentSwitches; @@ -28,9 +28,9 @@ 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; -@@ -1064,6 +1065,8 @@ public abstract class ChromeActivity +@@ -1070,6 +1071,8 @@ public abstract class ChromeActivity super.onStartWithNative(); - ChromeActivitySessionTracker.getInstance().onStartWithNative(); + ChromeActivitySessionTracker.getInstance().onStartWithNative(getProfileProviderSupplier()); ChromeCachedFlags.getInstance().cacheNativeFlags(); + X509Util.AllowUserCertificates = ChromeFeatureList.isEnabled( + ChromeFeatureList.ALLOW_USER_CERTIFICATES); @@ -40,38 +40,38 @@ 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 -@@ -136,6 +136,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -144,6 +144,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &feed::kFeedShowSignInCommand, &feed::kFeedSignedOutViewDemotion, &feed::kFeedUserInteractionReliabilityReport, + &kAllowUserCertificates, &feed::kInterestFeedV2, &feed::kInterestFeedV2Hearts, - &feed::kWebFeed, + &feed::kWebFeedAwareness, 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 -@@ -141,6 +141,7 @@ public abstract class ChromeFeatureList { - return ChromeFeatureMap.getInstance().mutableFlagWithSafeDefault(featureName, defaultValue); - } - +@@ -153,6 +153,7 @@ public abstract class ChromeFeatureList { + /* Alphabetical: */ + public static final String ACCOUNT_REAUTHENTICATION_RECENT_TIME_WINDOW = + "AccountReauthenticationRecentTimeWindow"; + public static final String ALLOW_USER_CERTIFICATES = "AllowUserCertificates"; public static final String ADAPTIVE_BUTTON_IN_TOP_TOOLBAR_TRANSLATE = "AdaptiveButtonInTopToolbarTranslate"; public static final String ADAPTIVE_BUTTON_IN_TOP_TOOLBAR_ADD_TO_BOOKMARKS = -@@ -533,6 +534,8 @@ public abstract class ChromeFeatureList { - public static final CachedFlag sAndroidHub = newCachedFlag(ANDROID_HUB, false); - public static final CachedFlag sAndroidTabGroupStableIds = - newCachedFlag(ANDROID_TAB_GROUP_STABLE_IDS, false); +@@ -555,6 +556,8 @@ public abstract class ChromeFeatureList { + public static final CachedFlag sAppInfoTabResumptionModule = + newCachedFlag(APP_INFO_TAB_RESUMPTION_MODULE, false); + public static final CachedFlag sAppSpecificHistory = newCachedFlag(APP_SPECIFIC_HISTORY, false); + public static final CachedFlag sAllowUserCertificates = + newCachedFlag(ALLOW_USER_CERTIFICATES, false); public static final CachedFlag sArchiveTabService = newCachedFlag(ARCHIVE_TAB_SERVICE, false); - public static final CachedFlag sBackGestureActivityTabProvider = - newCachedFlag(BACK_GESTURE_ACTIVITY_TAB_PROVIDER, false); -@@ -679,6 +682,7 @@ public abstract class ChromeFeatureList { - + public static final CachedFlag sAsyncNotificationManager = + newCachedFlag(ASYNC_NOTIFICATION_MANAGER, false); +@@ -704,6 +707,7 @@ public abstract class ChromeFeatureList { public static final List sFlagsCachedFullBrowser = List.of( + sAccountReauthenticationRecentTimeWindow, + sAllowUserCertificates, sAndroidAppIntegration, sAndroidElegantTextHeight, diff --git a/build/cromite_patches/Add-IsCleartextPermitted-flag.patch b/build/cromite_patches/Add-IsCleartextPermitted-flag.patch index 4af1a40e..f7453e5a 100644 --- a/build/cromite_patches/Add-IsCleartextPermitted-flag.patch +++ b/build/cromite_patches/Add-IsCleartextPermitted-flag.patch @@ -44,7 +44,7 @@ new file mode 100644 diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc --- a/net/url_request/url_request_http_job.cc +++ b/net/url_request/url_request_http_job.cc -@@ -300,6 +300,11 @@ std::unique_ptr URLRequestHttpJob::Create(URLRequest* request) { +@@ -360,6 +360,11 @@ std::unique_ptr URLRequestHttpJob::Create(URLRequest* request) { } } diff --git a/build/cromite_patches/Add-a-proxy-configuration-page.patch b/build/cromite_patches/Add-a-proxy-configuration-page.patch index 20c241c2..5bd4de36 100644 --- a/build/cromite_patches/Add-a-proxy-configuration-page.patch +++ b/build/cromite_patches/Add-a-proxy-configuration-page.patch @@ -30,7 +30,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html chrome/browser/resources/proxy_config.js | 278 +++++++++++++ chrome/browser/ui/BUILD.gn | 2 + .../webui/chrome_web_ui_controller_factory.cc | 3 + - chrome/browser/ui/webui/proxy_config_ui.cc | 393 ++++++++++++++++++ + chrome/browser/ui/webui/proxy_config_ui.cc | 392 ++++++++++++++++++ chrome/browser/ui/webui/proxy_config_ui.h | 31 ++ chrome/common/webui_url_constants.cc | 4 + chrome/common/webui_url_constants.h | 2 + @@ -38,9 +38,9 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../proxy_config/proxy_config_dictionary.cc | 30 +- .../proxy_config/proxy_config_dictionary.h | 7 +- .../proxy_config/proxy_policy_handler.cc | 2 +- - net/proxy_resolution/proxy_config.cc | 52 ++- + net/proxy_resolution/proxy_config.cc | 51 ++- net/proxy_resolution/proxy_config.h | 3 + - 25 files changed, 981 insertions(+), 17 deletions(-) + 25 files changed, 979 insertions(+), 17 deletions(-) create mode 100644 chrome/browser/resources/proxy_config.css create mode 100644 chrome/browser/resources/proxy_config.html create mode 100644 chrome/browser/resources/proxy_config.js @@ -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 -@@ -25,6 +25,9 @@ found in the LICENSE file. +@@ -19,6 +19,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 -@@ -76,6 +76,7 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -74,6 +74,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"; @@ -88,7 +88,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc --- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc +++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc -@@ -308,6 +308,8 @@ ChromeAutocompleteProviderClient::GetBuiltinsToProvideAsUserTypes() { +@@ -309,6 +309,8 @@ ChromeAutocompleteProviderClient::GetBuiltinsToProvideAsUserTypes() { builtins_to_provide.push_back( base::ASCIIToUTF16(chrome::kChromeUISettingsURL)); #endif @@ -100,7 +100,7 @@ diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd --- a/chrome/browser/browser_resources.grd +++ b/chrome/browser/browser_resources.grd -@@ -237,6 +237,9 @@ +@@ -241,6 +241,9 @@ @@ -197,16 +197,16 @@ 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 -@@ -191,6 +191,8 @@ - #include "printing/buildflags/buildflags.h" +@@ -195,6 +195,8 @@ #include "rlz/buildflags/buildflags.h" + #include "services/screen_ai/buildflags/buildflags.h" +#include "chrome/browser/net/proxy_service_factory.h" + #if BUILDFLAG(ENABLE_BACKGROUND_MODE) #include "chrome/browser/background/background_mode_manager.h" #endif -@@ -1447,6 +1449,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) { +@@ -1697,6 +1699,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) { component_updater::RegisterPrefs(registry); domain_reliability::RegisterPrefs(registry); embedder_support::OriginTrialPrefs::RegisterPrefs(registry); @@ -661,7 +661,7 @@ new file mode 100644 diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn -@@ -301,6 +301,8 @@ static_library("ui") { +@@ -327,6 +327,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 -@@ -52,6 +52,7 @@ +@@ -49,6 +49,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,8 +681,8 @@ 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/privacy_sandbox/privacy_sandbox_internals_ui.h" #include "chrome/browser/ui/webui/segmentation_internals/segmentation_internals_ui.h" -@@ -469,6 +470,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, - return &NewWebUI; +@@ -450,6 +451,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, + #endif // BUILDFLAG(IS_CHROMEOS_ASH) if (url.host_piece() == chrome::kChromeUINetExportHost) return &NewWebUI; + if (url.host_piece() == chrome::kChromeUIProxyConfigHost) @@ -694,7 +694,7 @@ diff --git a/chrome/browser/ui/webui/proxy_config_ui.cc b/chrome/browser/ui/webu new file mode 100644 --- /dev/null +++ b/chrome/browser/ui/webui/proxy_config_ui.cc -@@ -0,0 +1,393 @@ +@@ -0,0 +1,392 @@ +/* + This file is part of Bromite. + @@ -895,8 +895,7 @@ new file mode 100644 + state.SetByDottedPath("config.rules.fallback_proxies", base::Value(omitDirect(rules.fallback_proxies.ToPacString()))); + break; + default: -+ NOTREACHED(); -+ break; ++ NOTREACHED_NORETURN(); + } + state.SetByDottedPath("config.rules.type", base::Value(type)); + state.SetByDottedPath("config.rules.bypass_rules", base::Value(rules.bypass_rules.ToString())); @@ -978,7 +977,7 @@ new file mode 100644 + } + + if (const std::string* pacURL = config.FindString("pac_url")) { -+ absl::optional pacMandatory = config.FindBool("pac_mandatory"); ++ std::optional pacMandatory = config.FindBool("pac_mandatory"); + auto proxyConfig = net::ProxyConfig::CreateFromCustomPacURL( + GURL(*pacURL)); + proxyConfig.set_pac_mandatory(pacMandatory.value_or(false)); @@ -1038,7 +1037,7 @@ new file mode 100644 + if (bypass_rules == nullptr) + return; + -+ absl::optional reverse_bypass = rules->FindBool("reverse_bypass"); ++ std::optional reverse_bypass = rules->FindBool("reverse_bypass"); + + proxyConfig.proxy_rules().bypass_rules.ParseFromString(*bypass_rules); + proxyConfig.proxy_rules().reverse_bypass = reverse_bypass.value_or(false); @@ -1127,7 +1126,7 @@ new file mode 100644 diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_constants.cc --- a/chrome/common/webui_url_constants.cc +++ b/chrome/common/webui_url_constants.cc -@@ -49,6 +49,8 @@ const char kChromeUICertificateViewerHost[] = "view-cert"; +@@ -50,6 +50,8 @@ const char kChromeUICertificateViewerHost[] = "view-cert"; const char kChromeUICertificateViewerURL[] = "chrome://view-cert/"; const char kChromeUIChromeSigninHost[] = "chrome-signin"; const char kChromeUIChromeSigninURL[] = "chrome://chrome-signin/"; @@ -1136,7 +1135,7 @@ diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_cons const char kChromeUIChromeURLsHost[] = "chrome-urls"; const char kChromeUIChromeURLsURL[] = "chrome://chrome-urls/"; const char kChromeUIComponentsHost[] = "components"; -@@ -460,6 +462,7 @@ bool IsSystemWebUIHost(base::StringPiece host) { +@@ -471,6 +473,7 @@ bool IsSystemWebUIHost(std::string_view host) { kChromeUILockScreenNetworkHost, kChromeUILockScreenStartReauthHost, kChromeUIMobileSetupHost, @@ -1144,7 +1143,7 @@ diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_cons kChromeUIMultiDeviceSetupHost, kChromeUINetworkHost, kChromeUINotificationTesterHost, -@@ -760,6 +763,7 @@ const char* const kChromeHostURLs[] = { +@@ -766,6 +769,7 @@ const char* const kChromeHostURLs[] = { #if !BUILDFLAG(IS_ANDROID) #if !BUILDFLAG(IS_CHROMEOS) kChromeUIAppLauncherPageHost, @@ -1155,7 +1154,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 -@@ -134,6 +134,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[]; @@ -1342,16 +1341,11 @@ diff --git a/net/proxy_resolution/proxy_config.cc b/net/proxy_resolution/proxy_c } // Trim whitespace off the url scheme. -@@ -140,6 +140,56 @@ void ProxyConfig::ProxyRules::ParseFromString(const std::string& proxy_rules) { +@@ -140,6 +140,55 @@ void ProxyConfig::ProxyRules::ParseFromString(const std::string& proxy_rules) { } } +std::string ProxyConfig::ProxyRules::ToString() const { -+ if (type == Type::EMPTY) { -+ return ""; -+ } -+ -+ // special case: a single proxy servers list specified + if (type == Type::PROXY_LIST) { + std::string proxy_list; + for (const auto& proxy_chain : single_proxies.AllChains()) { @@ -1363,37 +1357,41 @@ diff --git a/net/proxy_resolution/proxy_config.cc b/net/proxy_resolution/proxy_c + proxy_list.pop_back(); + } + return proxy_list; -+ } -+ -+ if (type != Type::PROXY_LIST_PER_SCHEME) { -+ NOTREACHED(); -+ // Unexpected LIST with fallback, or other type values ++ } else if (type == Type::PROXY_LIST_PER_SCHEME) { ++ // start to build a per-scheme list ++ std::string list; ++ for (const auto& proxy_chain : proxies_for_http.AllChains()) { ++ if (proxy_chain.length()) { ++ net::ProxyServer proxy_server = proxy_chain.First(); ++ list += "http=" + ProxyServerToProxyUri(proxy_server) + ";"; ++ } ++ } ++ for (const auto& proxy_chain : proxies_for_https.AllChains()) { ++ if (proxy_chain.length()) { ++ net::ProxyServer proxy_server = proxy_chain.First(); ++ list += "https=" + ProxyServerToProxyUri(proxy_server) + ";"; ++ } ++ } ++ for (const auto& proxy_chain : proxies_for_ftp.AllChains()) { ++ if (proxy_chain.length()) { ++ net::ProxyServer proxy_server = proxy_chain.First(); ++ list += "ftp=" + ProxyServerToProxyUri(proxy_server) + ";"; ++ } ++ } ++ for (const auto& proxy_chain : fallback_proxies.AllChains()) { ++ if (proxy_chain.length()) { ++ net::ProxyServer proxy_server = proxy_chain.First(); ++ list += "socks=" + ProxyServerToProxyUri(proxy_server) + ";"; ++ } ++ } ++ if (list.length() != 0 ) { ++ // remove last semicolon ++ list.pop_back(); ++ } ++ return list; ++ } else { + return ""; + } -+ -+ // start to build a per-scheme list -+ std::string list; -+ for (const auto& proxy_chain : proxies_for_http.AllChains()) { -+ net::ProxyServer proxy_server = proxy_chain.GetProxyServer(/*chain_index=*/0); -+ list += "http=" + ProxyServerToProxyUri(proxy_server) + ";"; -+ } -+ for (const auto& proxy_chain : proxies_for_https.AllChains()) { -+ net::ProxyServer proxy_server = proxy_chain.GetProxyServer(/*chain_index=*/0); -+ list += "https=" + ProxyServerToProxyUri(proxy_server) + ";"; -+ } -+ for (const auto& proxy_chain : proxies_for_ftp.AllChains()) { -+ net::ProxyServer proxy_server = proxy_chain.GetProxyServer(/*chain_index=*/0); -+ list += "ftp=" + ProxyServerToProxyUri(proxy_server) + ";"; -+ } -+ for (const auto& proxy_chain : fallback_proxies.AllChains()) { -+ net::ProxyServer proxy_server = proxy_chain.GetProxyServer(/*chain_index=*/0); -+ list += "socks=" + ProxyServerToProxyUri(proxy_server) + ";"; -+ } -+ if (list.length() != 0 ) { -+ // remove last semicolon -+ list.pop_back(); -+ } -+ return list; +} + const ProxyList* ProxyConfig::ProxyRules::MapUrlSchemeToProxyList( diff --git a/build/cromite_patches/Add-an-always-incognito-mode.patch b/build/cromite_patches/Add-an-always-incognito-mode.patch index d9987bba..b064cfd1 100644 --- a/build/cromite_patches/Add-an-always-incognito-mode.patch +++ b/build/cromite_patches/Add-an-always-incognito-mode.patch @@ -23,23 +23,23 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html chrome/android/chrome_java_sources.gni | 2 + .../java/res/xml/incognito_preferences.xml | 37 ++++ .../java/res/xml/privacy_preferences.xml | 5 + - .../AlwaysIncognitoLinkInterceptor.java | 53 ++++++ - .../chrome/browser/ChromeTabbedActivity.java | 20 ++- + .../AlwaysIncognitoLinkInterceptor.java | 54 ++++++ + .../chrome/browser/ChromeTabbedActivity.java | 22 ++- .../chrome/browser/app/ChromeActivity.java | 4 + - .../AppMenuPropertiesDelegateImpl.java | 27 ++- + .../AppMenuPropertiesDelegateImpl.java | 28 ++- .../ChromeContextMenuPopulator.java | 7 +- .../CustomTabActivityLifecycleUmaTracker.java | 31 ---- .../CustomTabAppMenuPropertiesDelegate.java | 4 + .../CustomTabIntentDataProvider.java | 5 +- .../browser/download/DownloadUtils.java | 16 +- .../history/HistoryContentManager.java | 7 +- - .../browser/history/HistoryManager.java | 26 ++- - .../chrome/browser/history/HistoryPage.java | 15 ++ + .../browser/history/HistoryManager.java | 27 ++- + .../chrome/browser/history/HistoryPage.java | 16 ++ .../native_page/NativePageFactory.java | 4 +- .../chrome/browser/ntp/RecentTabsManager.java | 28 ++- - .../privacy/settings/IncognitoSettings.java | 160 ++++++++++++++++++ + .../privacy/settings/IncognitoSettings.java | 161 ++++++++++++++++++ .../browser/settings/SettingsActivity.java | 4 + - .../HistoricalTabModelObserver.java | 6 +- + .../HistoricalTabModelObserver.java | 5 +- .../tab/tab_restore/HistoricalTabSaver.java | 2 +- .../tab_restore/HistoricalTabSaverImpl.java | 17 +- .../tabbed_mode/TabbedRootUiCoordinator.java | 4 +- @@ -57,7 +57,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html chrome/browser/history/history_tab_helper.h | 10 +- .../android/offline_page_bridge.cc | 11 +- .../android/offline_page_model_factory.cc | 20 ++- - .../android/request_coordinator_factory.cc | 34 +++- + .../android/request_coordinator_factory.cc | 33 +++- .../offline_page_model_factory.h | 1 + .../offline_pages/recent_tab_helper.cc | 31 +++- .../browser/offline_pages/recent_tab_helper.h | 5 + @@ -66,7 +66,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html chrome/browser/profiles/profile_selections.cc | 10 ++ chrome/browser/profiles/profile_selections.h | 7 +- .../browser/ui/android/native_page/BUILD.gn | 2 + - .../browser/ui/native_page/NativePage.java | 16 +- + .../browser/ui/native_page/NativePage.java | 23 ++- .../strings/android_chrome_strings.grd | 31 ++++ .../browser/toolbar/LocationBarModel.java | 5 +- chrome/browser/ui/messages/android/BUILD.gn | 1 + @@ -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, 770 insertions(+), 102 deletions(-) + 66 files changed, 781 insertions(+), 103 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,9 +98,9 @@ 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 -@@ -644,6 +644,7 @@ chrome_java_resources = [ - "java/res/xml/main_preferences.xml", +@@ -632,6 +632,7 @@ chrome_java_resources = [ "java/res/xml/manage_sync_preferences.xml", + "java/res/xml/personalize_google_services_preferences.xml", "java/res/xml/phone_as_a_security_key_accessory_filter.xml", + "java/res/xml/incognito_preferences.xml", "java/res/xml/privacy_preferences.xml", @@ -117,10 +117,10 @@ diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java "java/src/com/google/android/apps/chrome/appwidget/bookmarks/BookmarkThumbnailWidgetProvider.java", "java/src/org/chromium/chrome/browser/ActivityTabProvider.java", "java/src/org/chromium/chrome/browser/ActivityUtils.java", -@@ -979,6 +980,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", +@@ -967,6 +968,7 @@ chrome_java_sources = [ + "java/src/org/chromium/chrome/browser/privacy_sandbox/TrackingProtectionOnboardingType.java", + "java/src/org/chromium/chrome/browser/privacy_sandbox/TrackingProtectionOnboardingView.java", + "java/src/org/chromium/chrome/browser/privacy_sandbox/TrackingProtectionSnackbarController.java", + "java/src/org/chromium/chrome/browser/privacy/settings/IncognitoSettings.java", "java/src/org/chromium/chrome/browser/provider/BaseColumns.java", "java/src/org/chromium/chrome/browser/provider/BookmarkColumns.java", @@ -170,7 +170,7 @@ new file mode 100644 diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml --- a/chrome/android/java/res/xml/privacy_preferences.xml +++ b/chrome/android/java/res/xml/privacy_preferences.xml -@@ -66,6 +66,11 @@ found in the LICENSE file. +@@ -82,6 +82,11 @@ found in the LICENSE file. android:key="secure_dns" android:title="@string/settings_secure_dns_title" android:fragment="org.chromium.chrome.browser.privacy.secure_dns.SecureDnsSettings" /> @@ -186,7 +186,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/AlwaysIncognito new file mode 100644 --- /dev/null +++ b/chrome/android/java/src/org/chromium/chrome/browser/AlwaysIncognitoLinkInterceptor.java -@@ -0,0 +1,53 @@ +@@ -0,0 +1,54 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ @@ -199,6 +199,7 @@ new file mode 100644 +import org.chromium.components.user_prefs.UserPrefs; +import org.chromium.components.prefs.PrefService; +import org.chromium.chrome.browser.profiles.Profile; ++import org.chromium.chrome.browser.profiles.ProfileManager; +import org.chromium.chrome.browser.preferences.Pref; +import org.chromium.base.Log; + @@ -222,7 +223,7 @@ new file mode 100644 + } + + public static void setAlwaysIncognito(boolean enabled) { -+ UserPrefs.get(Profile.getLastUsedRegularProfile()) ++ UserPrefs.get(ProfileManager.getLastUsedRegularProfile()) + .setBoolean(Pref.ALWAYS_INCOGNITO_ENABLED, enabled); + + SharedPreferences.Editor sharedPreferenceEditor = ContextUtils.getAppSharedPreferences().edit(); @@ -232,7 +233,7 @@ new file mode 100644 + + public static void migrateSettingToNative() { + if (isAlwaysIncognito()) { -+ PrefService prefService = UserPrefs.get(Profile.getLastUsedRegularProfile()); ++ PrefService prefService = UserPrefs.get(ProfileManager.getLastUsedRegularProfile()); + if (!prefService.getBoolean(Pref.ALWAYS_INCOGNITO_ENABLED)) { + Log.i(TAG, "Pref migration from java to native"); + prefService.setBoolean(Pref.ALWAYS_INCOGNITO_ENABLED, true); @@ -243,7 +244,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 -@@ -66,6 +66,10 @@ import org.chromium.base.task.TaskTraits; +@@ -68,6 +68,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,25 +255,27 @@ 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; -@@ -676,9 +680,14 @@ public class ChromeTabbedActivity extends ChromeActivity +@@ -2033,6 +2034,9 @@ public abstract class ChromeActivity throw new IllegalStateException( "Attempting to access TabCreator before initialization"); } @@ -308,16 +311,17 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java --- a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java -@@ -37,6 +37,7 @@ import org.chromium.base.supplier.OneshotSupplier; +@@ -37,6 +37,8 @@ import org.chromium.base.supplier.OneshotSupplier; import org.chromium.base.supplier.Supplier; import org.chromium.chrome.R; import org.chromium.chrome.browser.ActivityTabProvider; +import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor; - import org.chromium.chrome.browser.bookmarks.BookmarkFeatures; ++import org.chromium.chrome.browser.profiles.ProfileManager; import org.chromium.chrome.browser.bookmarks.BookmarkModel; import org.chromium.chrome.browser.bookmarks.PowerBookmarkUtils; -@@ -103,6 +104,10 @@ import java.lang.annotation.RetentionPolicy; - import java.util.ArrayList; + import org.chromium.chrome.browser.commerce.ShoppingFeatures; +@@ -99,6 +101,10 @@ import java.util.ArrayList; + import java.util.Iterator; import java.util.List; +import org.chromium.components.prefs.PrefService; @@ -327,7 +331,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. -@@ -604,6 +609,13 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate +@@ -594,6 +600,13 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate } private void prepareCommonMenuItems(Menu menu, @MenuGroup int menuGroup, boolean isIncognito) { @@ -341,14 +345,14 @@ 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; -@@ -667,7 +679,15 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate +@@ -657,7 +670,15 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate } if (item.getItemId() == R.id.recent_tabs_menu_id) { - item.setVisible(!isIncognito); + if (always_incognito) { + PrefService prefService = -+ UserPrefs.get(Profile.getLastUsedRegularProfile()); ++ UserPrefs.get(ProfileManager.getLastUsedRegularProfile()); + boolean historyEnabledInIncognito = + prefService.getBoolean(Pref.INCOGNITO_TAB_HISTORY_ENABLED); + item.setVisible(historyEnabledInIncognito); @@ -358,8 +362,8 @@ 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); -@@ -876,8 +896,9 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate - && !isChromeScheme +@@ -866,8 +887,9 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate + && !isNativePage && !isFileScheme && !isContentScheme - && !isIncognito @@ -460,7 +464,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; -@@ -218,6 +219,9 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat +@@ -216,6 +217,9 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat openInChromeItemVisible = false; tryAddingReadAloud = false; } @@ -468,12 +472,12 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust + downloadItemVisible = true; + } - boolean isChromeScheme = + boolean isNativePage = 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 -@@ -83,6 +83,9 @@ import org.chromium.components.browser_ui.widget.TintedDrawable; +@@ -88,6 +88,9 @@ import org.chromium.components.browser_ui.widget.TintedDrawable; import org.chromium.components.embedder_support.util.UrlConstants; import org.chromium.device.mojom.ScreenOrientationLockType; @@ -483,7 +487,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; -@@ -1291,7 +1294,7 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid +@@ -1390,7 +1393,7 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid @Override public boolean isIncognito() { @@ -491,11 +495,11 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust + return AlwaysIncognitoLinkInterceptor.isAlwaysIncognito(); } - @Nullable + @Override 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 -@@ -34,6 +34,7 @@ import org.chromium.base.FileUtils; +@@ -35,6 +35,7 @@ import org.chromium.base.FileUtils; import org.chromium.base.IntentUtils; import org.chromium.base.Log; import org.chromium.chrome.R; @@ -503,7 +507,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/Downlo import org.chromium.chrome.browser.ChromeTabbedActivity; import org.chromium.chrome.browser.IntentHandler; import org.chromium.chrome.browser.app.download.home.DownloadActivityLauncher; -@@ -74,6 +75,10 @@ import org.chromium.url.GURL; +@@ -77,6 +78,10 @@ import org.chromium.url.GURL; import java.io.File; @@ -514,14 +518,14 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/Downlo /** A class containing some utility static methods. */ public class DownloadUtils { private static final String TAG = "download"; -@@ -286,7 +291,16 @@ public class DownloadUtils { +@@ -296,7 +301,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. - if (tab.isIncognito()) return false; + boolean always_incognito = AlwaysIncognitoLinkInterceptor.isAlwaysIncognito(); + if (always_incognito) { -+ PrefService prefService = UserPrefs.get(Profile.getLastUsedRegularProfile()); ++ PrefService prefService = UserPrefs.get(ProfileManager.getLastUsedRegularProfile()); + boolean historyEnabledInIncognito = + prefService.getBoolean(Pref.INCOGNITO_TAB_HISTORY_ENABLED); + if (historyEnabledInIncognito == false) @@ -535,7 +539,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 -@@ -239,7 +239,9 @@ public class HistoryContentManager implements SignInStateObserver, PrefObserver +@@ -271,7 +271,9 @@ public class HistoryContentManager implements SignInStateObserver, PrefObserver mHistoryAdapter.generateFooterItems(); // Listen to changes in sign in state. @@ -546,7 +550,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(); -@@ -275,7 +277,8 @@ public class HistoryContentManager implements SignInStateObserver, PrefObserver +@@ -347,7 +349,8 @@ public class HistoryContentManager implements SignInStateObserver, PrefObserver mHistoryAdapter.onDestroyed(); mLargeIconBridge.destroy(); mLargeIconBridge = null; @@ -559,19 +563,13 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryManager.java b/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryManager.java --- a/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryManager.java -@@ -23,6 +23,7 @@ import com.google.android.material.tabs.TabLayout; - import org.chromium.base.metrics.RecordHistogram; - import org.chromium.base.metrics.RecordUserAction; - import org.chromium.base.supplier.ObservableSupplier; -+import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor; - import org.chromium.base.supplier.ObservableSupplierImpl; - import org.chromium.base.supplier.Supplier; - import org.chromium.chrome.R; -@@ -49,6 +50,12 @@ import org.chromium.ui.base.Clipboard; +@@ -56,6 +56,14 @@ import org.chromium.ui.base.Clipboard; import java.util.List; ++import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor; +import org.chromium.chrome.browser.profiles.Profile; ++import org.chromium.chrome.browser.profiles.ProfileManager; +import org.chromium.base.ContextUtils; +import org.chromium.components.prefs.PrefService; +import org.chromium.components.user_prefs.UserPrefs; @@ -580,16 +578,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History /** Combines and manages the different UI components of browsing history. */ public class HistoryManager implements OnMenuItemClickListener, -@@ -133,7 +140,7 @@ public class HistoryManager +@@ -168,7 +176,7 @@ public class HistoryManager - recordUserAction("Show"); + mUmaRecorder.recordOpenHistory(); // If incognito placeholder is shown, we don't need to create History UI elements. - if (mIsIncognito) { + if (shouldShowIncognitoPlaceholder()) { mSelectableListLayout = null; mRootView = getIncognitoHistoryPlaceholderView(); return; -@@ -339,9 +346,22 @@ public class HistoryManager +@@ -420,9 +428,22 @@ public class HistoryManager onBackPressStateChanged(); } @@ -598,7 +596,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History + public boolean shouldShowIncognitoPlaceholder() { + if (mIsIncognito && + AlwaysIncognitoLinkInterceptor.isAlwaysIncognito()) { -+ PrefService prefService = UserPrefs.get(Profile.getLastUsedRegularProfile()); ++ PrefService prefService = UserPrefs.get(ProfileManager.getLastUsedRegularProfile()); + boolean historyEnabledInIncognito = + prefService.getBoolean(Pref.INCOGNITO_TAB_HISTORY_ENABLED); + if (historyEnabledInIncognito) return false; @@ -613,7 +611,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History // If Incognito placeholder is shown no need to call any destroy method. return; } -@@ -397,7 +417,7 @@ public class HistoryManager +@@ -482,7 +503,7 @@ public class HistoryManager * @return True if manager handles this event, false if it decides to ignore. */ private boolean onBackPressed() { @@ -625,19 +623,13 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryPage.java b/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryPage.java --- a/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryPage.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryPage.java -@@ -9,6 +9,7 @@ import android.net.Uri; - - import org.chromium.base.supplier.Supplier; - import org.chromium.chrome.R; -+import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor; - import org.chromium.chrome.browser.profiles.Profile; - import org.chromium.chrome.browser.tab.Tab; - import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; -@@ -16,6 +17,12 @@ import org.chromium.chrome.browser.ui.native_page.BasicNativePage; - import org.chromium.chrome.browser.ui.native_page.NativePageHost; +@@ -17,6 +17,14 @@ import org.chromium.chrome.browser.ui.native_page.NativePageHost; + import org.chromium.components.browser_ui.bottomsheet.BottomSheetController; import org.chromium.components.embedder_support.util.UrlConstants; ++import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor; +import org.chromium.chrome.browser.profiles.Profile; ++import org.chromium.chrome.browser.profiles.ProfileManager; +import org.chromium.base.ContextUtils; +import org.chromium.components.prefs.PrefService; +import org.chromium.components.user_prefs.UserPrefs; @@ -646,13 +638,13 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History /** Native page for managing browsing history. */ public class HistoryPage extends BasicNativePage { private HistoryManager mHistoryManager; -@@ -41,6 +48,14 @@ public class HistoryPage extends BasicNativePage { +@@ -45,6 +53,14 @@ public class HistoryPage extends BasicNativePage { String url) { super(host); + if (profile.isOffTheRecord() && + AlwaysIncognitoLinkInterceptor.isAlwaysIncognito()) { -+ PrefService prefService = UserPrefs.get(Profile.getLastUsedRegularProfile()); ++ PrefService prefService = UserPrefs.get(ProfileManager.getLastUsedRegularProfile()); + boolean historyEnabledInIncognito = + prefService.getBoolean(Pref.INCOGNITO_TAB_HISTORY_ENABLED); + if (historyEnabledInIncognito == true) profile = profile.getOriginalProfile(); @@ -664,28 +656,28 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java --- a/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java -@@ -17,6 +17,7 @@ import org.chromium.base.supplier.DestroyableObservableSupplier; - import org.chromium.base.supplier.ObservableSupplier; +@@ -18,6 +18,7 @@ import org.chromium.base.supplier.ObservableSupplier; import org.chromium.base.supplier.OneshotSupplier; import org.chromium.base.supplier.Supplier; + import org.chromium.chrome.R; +import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor; import org.chromium.chrome.browser.app.ChromeActivity; import org.chromium.chrome.browser.app.download.home.DownloadPage; import org.chromium.chrome.browser.bookmarks.BookmarkPage; -@@ -297,7 +298,8 @@ public class NativePageFactory { - String url, NativePage candidatePage, Tab tab, boolean isIncognito) { +@@ -310,7 +311,8 @@ public class NativePageFactory { + String url, NativePage candidatePage, Tab tab, boolean isIncognito, PdfInfo pdfInfo) { NativePage page; -- switch (NativePage.nativePageType(url, candidatePage, isIncognito)) { +- switch (NativePage.nativePageType(url, candidatePage, isIncognito, pdfInfo != null)) { + boolean isAlwaysIncognito = AlwaysIncognitoLinkInterceptor.isAlwaysIncognito(); -+ switch (NativePage.nativePageType(url, candidatePage, isIncognito, isAlwaysIncognito)) { ++ switch (NativePage.nativePageType(url, candidatePage, isIncognito, pdfInfo != null, isAlwaysIncognito)) { case NativePageType.NONE: return null; case NativePageType.CANDIDATE: diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsManager.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsManager.java --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsManager.java -@@ -35,6 +35,15 @@ import org.chromium.components.signin.metrics.SigninAccessPoint; +@@ -39,6 +39,15 @@ import org.chromium.components.signin.metrics.SigninAccessPoint; import org.chromium.components.sync.SyncService; import org.chromium.url.GURL; @@ -701,7 +693,7 @@ 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; -@@ -101,7 +110,8 @@ public class RecentTabsManager +@@ -105,7 +114,8 @@ public class RecentTabsManager Profile profile, Context context, Runnable showHistoryManager) { @@ -711,7 +703,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsM mActiveTab = tab; mTabModelSelector = tabModelSelector; mShowHistoryManager = showHistoryManager; -@@ -263,6 +273,22 @@ public class RecentTabsManager +@@ -273,6 +283,22 @@ public class RecentTabsManager */ public void openRecentlyClosedTab(RecentlyClosedTab tab, int windowDisposition) { if (mIsDestroyed) return; @@ -738,7 +730,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting new file mode 100644 --- /dev/null +++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/IncognitoSettings.java -@@ -0,0 +1,160 @@ +@@ -0,0 +1,161 @@ +/* + This file is part of Bromite. + @@ -774,6 +766,7 @@ new file mode 100644 +import org.chromium.chrome.R; +import org.chromium.chrome.browser.preferences.Pref; +import org.chromium.chrome.browser.profiles.Profile; ++import org.chromium.chrome.browser.profiles.ProfileManager; +import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor; +import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; +import org.chromium.chrome.browser.ui.messages.snackbar.INeedSnackbarManager; @@ -797,7 +790,7 @@ new file mode 100644 + private static final String PREF_INCOGNITO_TAB_HISTORY = "incognito_history"; + private static final String PREF_INCOGNITO_SAVE_SITE_SETTING = "incognito_save_site_setting"; + -+ private final PrefService prefService = UserPrefs.get(Profile.getLastUsedRegularProfile()); ++ private final PrefService prefService = UserPrefs.get(ProfileManager.getLastUsedRegularProfile()); + + @Override + public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { @@ -902,54 +895,48 @@ new file mode 100644 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java -@@ -75,6 +75,7 @@ import org.chromium.chrome.browser.signin.SyncConsentActivityLauncherImpl; - import org.chromium.chrome.browser.site_settings.ChromeSiteSettingsDelegate; - import org.chromium.chrome.browser.sync.SyncServiceFactory; +@@ -86,6 +86,7 @@ import org.chromium.chrome.browser.sync.settings.AccountManagementFragment; + import org.chromium.chrome.browser.sync.settings.GoogleServicesSettings; + import org.chromium.chrome.browser.sync.settings.ManageSyncSettings; import org.chromium.chrome.browser.ui.device_lock.MissingDeviceLockLauncher; +import org.chromium.chrome.browser.ui.messages.snackbar.INeedSnackbarManager; 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; -@@ -362,6 +363,9 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity + import org.chromium.components.browser_ui.bottomsheet.BottomSheetController; +@@ -374,6 +375,9 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity ((PrivacySandboxSettingsBaseFragment) fragment) .setSnackbarManager(getSnackbarManager()); } + if (fragment instanceof INeedSnackbarManager) { + ((INeedSnackbarManager)fragment).setSnackbarManager(mSnackbarManager); + } - initBackPressHandler(); - } - + if (fragment instanceof AccountManagementFragment) { + ((AccountManagementFragment) fragment).setSnackbarManager(mSnackbarManager); + } diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabModelObserver.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabModelObserver.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabModelObserver.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabModelObserver.java -@@ -13,6 +13,8 @@ import java.util.ArrayList; - import java.util.HashMap; +@@ -22,6 +22,8 @@ import java.util.HashMap; import java.util.List; + import java.util.Set; +import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor; + /** 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; + private final TabGroupModelFilter mTabGroupModelFilter; +@@ -53,9 +55,10 @@ public class HistoricalTabModelObserver implements TabModelObserver { + if (tabs.isEmpty() || !canRestore) return; if (tabs.size() == 1) { -- mHistoricalTabSaver.createHistoricalTab(tabs.get(0)); + boolean is_always_incognito = AlwaysIncognitoLinkInterceptor.isAlwaysIncognito(); -+ mHistoricalTabSaver.createHistoricalTab(tabs.get(0), is_always_incognito); - return; - } - -@@ -69,7 +72,6 @@ public class HistoricalTabModelObserver implements TabModelObserver { - entries.add(historicalGroup); - idToGroup.put(groupId, historicalGroup); + Tab tab = tabs.get(0); + if (!isTabGroupWithOneTab(tab)) { +- mHistoricalTabSaver.createHistoricalTab(tab); ++ mHistoricalTabSaver.createHistoricalTab(tab, is_always_incognito); + return; + } } -- - mHistoricalTabSaver.createHistoricalBulkClosure(entries); - } - } 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 @@ -965,7 +952,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabSaverImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabSaverImpl.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabSaverImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore/HistoricalTabSaverImpl.java -@@ -26,6 +26,8 @@ import java.util.Arrays; +@@ -29,6 +29,8 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -974,7 +961,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore /** Creates historical entries in TabRestoreService. */ @JNINamespace("historical_tab_saver") public class HistoricalTabSaverImpl implements HistoricalTabSaver { -@@ -64,10 +66,10 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { +@@ -67,10 +69,10 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { // HistoricalTabSaver implementation. @Override @@ -987,7 +974,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore } @Override -@@ -119,7 +121,7 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { +@@ -131,7 +133,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()) { @@ -996,7 +983,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore return; } -@@ -155,14 +157,15 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { +@@ -172,14 +174,15 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { CollectionUtil.integerCollectionToIntArray(savedStateVersions)); } @@ -1014,7 +1001,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore } /** -@@ -170,7 +173,7 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { +@@ -187,7 +190,7 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { * internal Chrome scheme, about:blank, or a native page and it cannot be incognito. */ private boolean shouldSave(Tab tab) { @@ -1023,7 +1010,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore // {@link GURL#getScheme()} is not available in unit tests. if (mIgnoreUrlSchemesForTesting) return true; -@@ -243,7 +246,7 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { +@@ -268,7 +271,7 @@ public class HistoricalTabSaverImpl implements HistoricalTabSaver { @NativeMethods interface Natives { @@ -1035,8 +1022,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java -@@ -139,6 +139,8 @@ import org.chromium.components.webapps.bottomsheet.PwaBottomSheetController; - import org.chromium.components.webapps.bottomsheet.PwaBottomSheetControllerFactory; +@@ -154,6 +154,8 @@ import org.chromium.components.webapps.bottomsheet.PwaBottomSheetControllerFacto + import org.chromium.ui.InsetObserver; import org.chromium.ui.base.ActivityWindowAndroid; import org.chromium.ui.base.DeviceFormFactor; +import org.chromium.base.ContextUtils; @@ -1044,7 +1031,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/Tab import org.chromium.ui.base.IntentRequestTracker; import org.chromium.ui.dragdrop.DragDropGlobalState; import org.chromium.ui.modaldialog.ModalDialogManager; -@@ -1011,7 +1013,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { +@@ -1045,7 +1047,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { () -> { mTabCreatorManagerSupplier .get() @@ -1067,8 +1054,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/Chrome /** This class creates various kinds of new tabs and adds them to the right {@link TabModel}. */ 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. +@@ -534,7 +538,6 @@ public class ChromeTabCreator extends TabCreator { + // TODO(crbug.com/40691614): Clean up the launches from SearchActivity/Chrome. public Tab launchUrlFromExternalApp( LoadUrlParams loadUrlParams, String appId, boolean forceNewTab, Intent intent) { - assert !mIncognito; @@ -1083,10 +1070,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabMod 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; -@@ -107,6 +108,8 @@ public class TabModelSelectorImpl extends TabModelSelectorBase implements TabMod + import org.chromium.chrome.browser.profiles.ProfileProvider; +@@ -108,6 +109,8 @@ public class TabModelSelectorImpl extends TabModelSelectorBase implements TabMod ProfileProvider profileProvider = mProfileProviderSupplier.get(); assert profileProvider != null; @@ -1106,8 +1093,8 @@ 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; -@@ -670,6 +672,13 @@ public class TabPersistentStore { + import java.io.DataInputStream; +@@ -764,6 +766,13 @@ public class TabPersistentStore { } } } @@ -1124,7 +1111,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPer diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java -@@ -41,6 +41,7 @@ import org.chromium.base.supplier.OneshotSupplier; +@@ -42,6 +42,7 @@ import org.chromium.base.supplier.OneshotSupplier; import org.chromium.base.supplier.Supplier; import org.chromium.chrome.R; import org.chromium.chrome.browser.ActivityTabProvider; @@ -1132,7 +1119,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar import org.chromium.chrome.browser.IntentHandler; import org.chromium.chrome.browser.app.tab_activity_glue.TabReparentingController; import org.chromium.chrome.browser.app.tabmodel.TabWindowManagerSingleton; -@@ -615,7 +616,7 @@ public class ToolbarManager +@@ -650,7 +651,7 @@ public class ToolbarManager TraceEvent.end("isOfflinePage"); return ret; } @@ -1140,7 +1127,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar + }, AlwaysIncognitoLinkInterceptor.isAlwaysIncognito()); mControlContainer = controlContainer; mToolbarHairline = mControlContainer.findViewById(R.id.toolbar_hairline); - assert mControlContainer != null; + diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappIntentDataProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappIntentDataProvider.java --- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappIntentDataProvider.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappIntentDataProvider.java @@ -1189,9 +1176,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappI diff --git a/chrome/browser/android/historical_tab_saver.cc b/chrome/browser/android/historical_tab_saver.cc --- a/chrome/browser/android/historical_tab_saver.cc +++ b/chrome/browser/android/historical_tab_saver.cc -@@ -27,6 +27,11 @@ - #include "components/sessions/core/tab_restore_service.h" - #include "content/public/browser/web_contents.h" +@@ -32,6 +32,11 @@ + // Must come after all headers that specialize FromJniType() / ToJniType(). + #include "chrome/android/chrome_jni_headers/HistoricalTabSaverImpl_jni.h" +#include "chrome/common/pref_names.h" +#include "components/prefs/pref_registry_simple.h" @@ -1199,9 +1186,9 @@ diff --git a/chrome/browser/android/historical_tab_saver.cc b/chrome/browser/and +#include "historical_tab_saver.h" + using base::android::JavaParamRef; + using base::android::JavaRef; using base::android::ScopedJavaLocalRef; - -@@ -39,7 +44,8 @@ constexpr int kInvalidGroupId = -1; +@@ -106,7 +111,8 @@ std::vector> StringsToUuids( void CreateHistoricalTab( TabAndroid* tab_android, @@ -1211,7 +1198,7 @@ diff --git a/chrome/browser/android/historical_tab_saver.cc b/chrome/browser/and if (!tab_android) { return; } -@@ -50,9 +56,14 @@ void CreateHistoricalTab( +@@ -117,9 +123,14 @@ void CreateHistoricalTab( return; } @@ -1228,16 +1215,16 @@ diff --git a/chrome/browser/android/historical_tab_saver.cc b/chrome/browser/and if (!service) { return; } -@@ -100,7 +111,7 @@ void CreateHistoricalBulkClosure( - std::vector per_tab_android_group_id, +@@ -185,7 +196,7 @@ void CreateHistoricalBulkClosure( + std::vector per_tab_root_id, std::vector> tabs, std::vector web_contents_state) { - DCHECK(model); + if (!model) return; - DCHECK_EQ(android_group_ids.size(), group_titles.size()); - DCHECK_EQ(per_tab_android_group_id.size(), tabs.size()); - -@@ -235,11 +246,12 @@ static void JNI_HistoricalTabSaverImpl_CreateHistoricalTab( + DCHECK_EQ(root_ids.size(), group_titles.size()); + DCHECK_EQ(root_ids.size(), group_colors.size()); + DCHECK_EQ(root_ids.size(), optional_tab_group_ids.size()); +@@ -318,11 +329,12 @@ static void JNI_HistoricalTabSaverImpl_CreateHistoricalTab( JNIEnv* env, const JavaParamRef& jtab_android, const JavaParamRef& state, @@ -1251,11 +1238,11 @@ diff --git a/chrome/browser/android/historical_tab_saver.cc b/chrome/browser/and + std::move(web_contents_state), is_always_incognito); } - // static + static void JNI_HistoricalTabSaverImpl_CreateHistoricalGroup( diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc --- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc +++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc -@@ -357,6 +357,15 @@ ChromeAutocompleteProviderClient::GetProviderStateService() const { +@@ -358,6 +358,15 @@ ChromeAutocompleteProviderClient::GetProviderStateService() const { return ProviderStateServiceFactory::GetForProfile(profile_); } @@ -1274,7 +1261,7 @@ diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.h b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.h --- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.h +++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.h -@@ -85,6 +85,7 @@ class ChromeAutocompleteProviderClient : public AutocompleteProviderClient { +@@ -86,6 +86,7 @@ class ChromeAutocompleteProviderClient : public AutocompleteProviderClient { OnDeviceTailModelService* GetOnDeviceTailModelService() const override; ProviderStateService* GetProviderStateService() const override; bool IsOffTheRecord() const override; @@ -1302,21 +1289,21 @@ diff --git a/chrome/browser/autocomplete/remote_suggestions_service_factory.cc b +#else .WithRegular(ProfileSelection::kOriginalOnly) +#endif - // TODO(crbug.com/1418376): Check if this service is needed in + // TODO(crbug.com/40257657): Check if this service is needed in // Guest mode. .WithGuest(ProfileSelection::kOriginalOnly) diff --git a/chrome/browser/content_settings/host_content_settings_map_factory.cc b/chrome/browser/content_settings/host_content_settings_map_factory.cc --- a/chrome/browser/content_settings/host_content_settings_map_factory.cc +++ b/chrome/browser/content_settings/host_content_settings_map_factory.cc -@@ -16,6 +16,7 @@ - #include "chrome/browser/profiles/profiles_state.h" +@@ -18,6 +18,7 @@ #include "chrome/browser/search_engines/template_url_service_factory.h" + #include "chrome/browser/supervised_user/supervised_user_settings_service_factory.h" #include "chrome/common/buildflags.h" +#include "chrome/common/pref_names.h" #include "components/content_settings/core/browser/content_settings_pref_provider.h" #include "components/content_settings/core/browser/host_content_settings_map.h" #include "components/permissions/features.h" -@@ -105,9 +106,25 @@ scoped_refptr +@@ -101,9 +102,25 @@ scoped_refptr if (profile->IsOffTheRecord() && !profile->IsGuestSession()) GetForProfile(original_profile); @@ -1343,9 +1330,9 @@ diff --git a/chrome/browser/content_settings/host_content_settings_map_factory.c /*store_last_modified=*/true, profile->ShouldRestoreOldSessionCookies(), profiles::IsRegularUserProfile(profile))); -@@ -117,6 +134,9 @@ scoped_refptr - HostContentSettingsMap::WEBUI_ALLOWLIST_PROVIDER, - std::move(allowlist_provider)); +@@ -112,6 +129,9 @@ scoped_refptr + settings_map->RegisterProvider(ProviderType::kWebuiAllowlistProvider, + std::move(allowlist_provider)); + if (always_incognito_enabled) + return settings_map; @@ -1356,9 +1343,9 @@ diff --git a/chrome/browser/content_settings/host_content_settings_map_factory.c diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/history/history_tab_helper.cc --- a/chrome/browser/history/history_tab_helper.cc +++ b/chrome/browser/history/history_tab_helper.cc -@@ -41,6 +41,9 @@ - #include "components/feed/core/v2/public/feed_api.h" - #include "components/feed/core/v2/public/feed_service.h" +@@ -40,6 +40,9 @@ + #include "chrome/browser/ui/android/tab_model/tab_model.h" + #include "chrome/browser/ui/android/tab_model/tab_model_list.h" #include "content/public/browser/web_contents.h" +#include "chrome/common/pref_names.h" +#include "components/prefs/pref_registry_simple.h" @@ -1366,7 +1353,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" -@@ -448,6 +451,13 @@ void HistoryTabHelper::TitleWasSet(NavigationEntry* entry) { +@@ -458,6 +461,13 @@ void HistoryTabHelper::TitleWasSet(NavigationEntry* entry) { history::HistoryService* HistoryTabHelper::GetHistoryService() { Profile* profile = Profile::FromBrowserContext(web_contents()->GetBrowserContext()); @@ -1380,7 +1367,7 @@ diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/histo if (profile->IsOffTheRecord()) return nullptr; -@@ -455,6 +465,16 @@ history::HistoryService* HistoryTabHelper::GetHistoryService() { +@@ -465,6 +475,16 @@ history::HistoryService* HistoryTabHelper::GetHistoryService() { profile, ServiceAccessType::IMPLICIT_ACCESS); } @@ -1434,7 +1421,7 @@ diff --git a/chrome/browser/history/history_tab_helper.h b/chrome/browser/histor diff --git a/chrome/browser/offline_pages/android/offline_page_bridge.cc b/chrome/browser/offline_pages/android/offline_page_bridge.cc --- a/chrome/browser/offline_pages/android/offline_page_bridge.cc +++ b/chrome/browser/offline_pages/android/offline_page_bridge.cc -@@ -47,6 +47,9 @@ +@@ -45,6 +45,9 @@ #include "content/public/browser/web_contents.h" #include "net/base/filename_util.h" #include "url/android/gurl_android.h" @@ -1442,9 +1429,9 @@ diff --git a/chrome/browser/offline_pages/android/offline_page_bridge.cc b/chrom +#include "components/prefs/pref_service.h" +#include "chrome/common/pref_names.h" - using base::android::ConvertJavaStringToUTF8; - using base::android::ConvertUTF16ToJavaString; -@@ -780,9 +783,15 @@ void OfflinePageBridge::GetPageByOfflineIdDone( + // Must come after all headers that specialize FromJniType() / ToJniType(). + #include "chrome/android/chrome_jni_headers/OfflinePageBridge_jni.h" +@@ -758,9 +761,15 @@ void OfflinePageBridge::GetPageByOfflineIdDone( } if (offline_page_model_->IsArchiveInInternalDir(offline_page->file_path)) { @@ -1538,24 +1525,24 @@ diff --git a/chrome/browser/offline_pages/android/request_coordinator_factory.cc namespace network { class NetworkQualityTracker; } -@@ -65,14 +71,8 @@ class ActiveTabInfo : public RequestCoordinator::ActiveTabInfo { +@@ -65,14 +71,9 @@ class ActiveTabInfo : public RequestCoordinator::ActiveTabInfo { } // namespace RequestCoordinatorFactory::RequestCoordinatorFactory() - : ProfileKeyedServiceFactory( -- "OfflineRequestCoordinator", ++ : BrowserContextKeyedServiceFactory( + "OfflineRequestCoordinator", - ProfileSelections::Builder() - .WithRegular(ProfileSelection::kOriginalOnly) -- // TODO(crbug.com/1418376): Check if this service is needed in +- // TODO(crbug.com/40257657): Check if this service is needed in - // Guest mode. - .WithGuest(ProfileSelection::kOriginalOnly) - .Build()) { -+ : BrowserContextKeyedServiceFactory("OfflineRequestCoordinator", -+ BrowserContextDependencyManager::GetInstance()) { ++ BrowserContextDependencyManager::GetInstance()) { // Depends on OfflinePageModelFactory in SimpleDependencyManager. } -@@ -92,6 +92,12 @@ RequestCoordinator* RequestCoordinatorFactory::GetForBrowserContext( +@@ -92,6 +93,12 @@ RequestCoordinator* RequestCoordinatorFactory::GetForBrowserContext( std::unique_ptr RequestCoordinatorFactory::BuildServiceInstanceForBrowserContext( content::BrowserContext* context) const { @@ -1568,7 +1555,7 @@ diff --git a/chrome/browser/offline_pages/android/request_coordinator_factory.cc std::unique_ptr policy(new OfflinerPolicy()); std::unique_ptr offliner; OfflinePageModel* model = -@@ -122,4 +128,16 @@ RequestCoordinatorFactory::BuildServiceInstanceForBrowserContext( +@@ -122,4 +129,16 @@ RequestCoordinatorFactory::BuildServiceInstanceForBrowserContext( std::make_unique(profile)); } @@ -1729,7 +1716,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 @@ +@@ -248,6 +248,7 @@ #if BUILDFLAG(IS_ANDROID) #include "chrome/browser/accessibility/accessibility_prefs/android/accessibility_prefs_controller.h" @@ -1737,7 +1724,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" -@@ -1856,6 +1857,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -2126,6 +2127,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, usage_stats::UsageStatsBridge::RegisterProfilePrefs(registry); variations::VariationsService::RegisterProfilePrefs(registry); webapps::InstallPromptPrefs::RegisterProfilePrefs(registry); @@ -1761,7 +1748,7 @@ diff --git a/chrome/browser/profiles/profile_selections.cc b/chrome/browser/prof #include "chrome/browser/profiles/profile.h" #include "components/profile_metrics/browser_profile_type.h" -@@ -110,6 +113,13 @@ Profile* ProfileSelections::ApplyProfileSelection(Profile* profile) const { +@@ -109,6 +112,13 @@ Profile* ProfileSelections::ApplyProfileSelection(Profile* profile) const { return nullptr; case ProfileSelection::kOriginalOnly: return profile->IsOffTheRecord() ? nullptr : profile; @@ -1802,20 +1789,19 @@ diff --git a/chrome/browser/profiles/profile_selections.h b/chrome/browser/profi diff --git a/chrome/browser/ui/android/native_page/BUILD.gn b/chrome/browser/ui/android/native_page/BUILD.gn --- a/chrome/browser/ui/android/native_page/BUILD.gn +++ b/chrome/browser/ui/android/native_page/BUILD.gn -@@ -28,7 +28,9 @@ robolectric_library("junit") { +@@ -30,6 +30,8 @@ robolectric_library("junit") { deps = [ ":java", + "//base:base_java", ++ "//components/embedder_support/android:util_java", "//base:base_junit_test_support", "//third_party/junit", -+ "//components/embedder_support/android:util_java", - ] - } + "//url:url_java", diff --git a/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/browser/ui/native_page/NativePage.java b/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/browser/ui/native_page/NativePage.java --- a/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/browser/ui/native_page/NativePage.java +++ b/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/browser/ui/native_page/NativePage.java -@@ -16,6 +16,8 @@ import org.chromium.url.GURL; +@@ -15,6 +15,8 @@ import org.chromium.url.GURL; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -1823,47 +1809,65 @@ diff --git a/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/ + /** 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 { + +@@ -157,7 +159,9 @@ public interface NativePage { + * @return Whether the URL would navigate to a native page. */ - @Deprecated // Use GURL-variant instead. - static boolean isNativePageUrl(String url, boolean isIncognito) { -- return nativePageType(url, null, isIncognito) != NativePageType.NONE; -+ return nativePageType(url, null, isIncognito, false) != NativePageType.NONE; + static boolean isNativePageUrl(GURL url, boolean isIncognito, boolean isPdf) { +- return url != null && nativePageType(url, null, isIncognito, isPdf) != NativePageType.NONE; ++ return url != null ++ && nativePageType(url, null, isIncognito, isPdf, /*isAlwaysIncognito*/ false) ++ != NativePageType.NONE; } - static boolean isNativePageUrl(GURL url, boolean isIncognito) { - return url != null -- && nativePageType(url.getHost(), url.getScheme(), null, isIncognito) -+ && nativePageType(url.getHost(), url.getScheme(), null, isIncognito, false) - != NativePageType.NONE; + /** +@@ -167,7 +171,7 @@ public interface NativePage { + * not have chrome or chrome-native scheme. + */ + static boolean isChromePageUrl(GURL url, boolean isIncognito) { +- return url != null && chromePageType(url, null, isIncognito) != NativePageType.NONE; ++ return url != null && chromePageType(url, null, isIncognito, /*isAlwaysIncognito*/false) != NativePageType.NONE; } -@@ -135,11 +137,12 @@ public interface NativePage { + /** +@@ -179,11 +183,12 @@ public interface NativePage { */ - // TODO(crbug/783819) - Convert to using GURL. + // TODO(crbug.com/40549331) - Convert to using GURL. static @NativePageType int nativePageType( -- String url, NativePage candidatePage, boolean isIncognito) { -+ String url, NativePage candidatePage, boolean isIncognito, +- String url, NativePage candidatePage, boolean isIncognito, boolean isPdf) { ++ String url, NativePage candidatePage, boolean isIncognito, boolean isPdf, + boolean isAlwaysIncognito) { if (url == null) return NativePageType.NONE; - Uri uri = Uri.parse(url); -- return nativePageType(uri.getHost(), uri.getScheme(), candidatePage, isIncognito); -+ return nativePageType(uri.getHost(), uri.getScheme(), candidatePage, isIncognito, isAlwaysIncognito); + GURL gurl = new GURL(url); +- return nativePageType(gurl, candidatePage, isIncognito, isPdf); ++ return nativePageType(gurl, candidatePage, isIncognito, isPdf, isAlwaysIncognito); } /** -@@ -148,7 +151,7 @@ public interface NativePage { +@@ -194,9 +199,10 @@ public interface NativePage { * @return Type of the native page defined in {@link NativePageType}. */ private static @NativePageType int nativePageType( -- String host, String scheme, NativePage candidatePage, boolean isIncognito) { -+ String host, String scheme, NativePage candidatePage, boolean isIncognito, boolean isAlwaysIncognito) { +- GURL url, NativePage candidatePage, boolean isIncognito, boolean isPdf) { ++ GURL url, NativePage candidatePage, boolean isIncognito, boolean isPdf, ++ boolean isAlwaysIncognito) { + if (!isPdf) { +- return chromePageType(url, candidatePage, isIncognito); ++ return chromePageType(url, candidatePage, isIncognito, isAlwaysIncognito); + } + + if (candidatePage != null && candidatePage.getUrl().equals(url.getSpec())) { +@@ -214,7 +220,7 @@ public interface NativePage { + * which do not have chrome or chrome-native scheme. + */ + private static @NativePageType int chromePageType( +- GURL url, NativePage candidatePage, boolean isIncognito) { ++ GURL url, NativePage candidatePage, boolean isIncognito, boolean isAlwaysIncognito) { + String host = url.getHost(); + String scheme = url.getScheme(); if (!UrlConstants.CHROME_NATIVE_SCHEME.equals(scheme) - && !UrlConstants.CHROME_SCHEME.equals(scheme)) { - return NativePageType.NONE; -@@ -166,7 +169,8 @@ public interface NativePage { +@@ -234,7 +240,8 @@ public interface NativePage { return NativePageType.DOWNLOADS; } else if (UrlConstants.HISTORY_HOST.equals(host)) { return NativePageType.HISTORY; @@ -1876,9 +1880,9 @@ 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 -@@ -1228,6 +1228,37 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1296,6 +1296,37 @@ Your Google account may have other forms of browsing history like searches and a - Clears history from all synced devices + Deletes history from all synced devices + + @@ -1917,7 +1921,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 -@@ -165,6 +165,7 @@ public class LocationBarModel implements ToolbarDataProvider, LocationBarDataPro +@@ -162,6 +162,7 @@ public class LocationBarModel implements ToolbarDataProvider, LocationBarDataPro protected String mFormattedFullUrl; protected String mUrlForDisplay; private boolean mOmniboxUpdatedConnectionSecurityIndicatorsEnabled; @@ -1925,7 +1929,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow // notifyUrlChanged and notifySecurityStateChanged are usually called 3 times across a same // document navigation. The first call is usually necessary, which updates the UrlBar to reflect -@@ -188,7 +189,9 @@ public class LocationBarModel implements ToolbarDataProvider, LocationBarDataPro +@@ -185,7 +186,9 @@ public class LocationBarModel implements ToolbarDataProvider, LocationBarDataPro Context context, NewTabPageDelegate newTabPageDelegate, @NonNull UrlFormatter urlFormatter, @@ -1982,7 +1986,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 -@@ -3957,6 +3957,12 @@ inline constexpr char kOutOfProcessSystemDnsResolutionEnabled[] = +@@ -4077,6 +4077,12 @@ inline constexpr char kOutOfProcessSystemDnsResolutionEnabled[] = "net.out_of_process_system_dns_resolution_enabled"; #endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) @@ -2048,7 +2052,7 @@ diff --git a/components/content_settings/core/browser/content_settings_pref_prov diff --git a/components/content_settings/core/browser/host_content_settings_map.cc b/components/content_settings/core/browser/host_content_settings_map.cc --- a/components/content_settings/core/browser/host_content_settings_map.cc +++ b/components/content_settings/core/browser/host_content_settings_map.cc -@@ -277,6 +277,7 @@ struct ContentSettingEntry { +@@ -270,6 +270,7 @@ struct ContentSettingEntry { HostContentSettingsMap::HostContentSettingsMap(PrefService* prefs, bool is_off_the_record, @@ -2056,7 +2060,7 @@ diff --git a/components/content_settings/core/browser/host_content_settings_map. bool store_last_modified, bool restore_session, bool should_record_metrics) -@@ -286,6 +287,7 @@ HostContentSettingsMap::HostContentSettingsMap(PrefService* prefs, +@@ -279,6 +280,7 @@ HostContentSettingsMap::HostContentSettingsMap(PrefService* prefs, #endif prefs_(prefs), is_off_the_record_(is_off_the_record), @@ -2064,19 +2068,19 @@ diff --git a/components/content_settings/core/browser/host_content_settings_map. store_last_modified_(store_last_modified), allow_invalid_secondary_pattern_for_testing_(false), clock_(base::DefaultClock::GetInstance()) { -@@ -298,7 +300,7 @@ HostContentSettingsMap::HostContentSettingsMap(PrefService* prefs, +@@ -292,7 +294,7 @@ HostContentSettingsMap::HostContentSettingsMap(PrefService* prefs, policy_provider->AddObserver(this); auto pref_provider_ptr = std::make_unique( - prefs_, is_off_the_record_, store_last_modified_, restore_session); + prefs_, is_off_the_record_, force_save_site_settings_, store_last_modified_, restore_session); pref_provider_ = pref_provider_ptr.get(); - content_settings_providers_[PREF_PROVIDER] = std::move(pref_provider_ptr); - user_modifiable_providers_.push_back(pref_provider_.get()); + content_settings_providers_[ProviderType::kPrefProvider] = + std::move(pref_provider_ptr); diff --git a/components/content_settings/core/browser/host_content_settings_map.h b/components/content_settings/core/browser/host_content_settings_map.h --- a/components/content_settings/core/browser/host_content_settings_map.h +++ b/components/content_settings/core/browser/host_content_settings_map.h -@@ -103,6 +103,7 @@ class HostContentSettingsMap : public content_settings::Observer, +@@ -83,6 +83,7 @@ class HostContentSettingsMap : public content_settings::Observer, // profile or a guest session. HostContentSettingsMap(PrefService* prefs, bool is_off_the_record, @@ -2084,7 +2088,7 @@ diff --git a/components/content_settings/core/browser/host_content_settings_map. bool store_last_modified, bool restore_session, bool should_record_metrics); -@@ -544,6 +545,8 @@ class HostContentSettingsMap : public content_settings::Observer, +@@ -507,6 +508,8 @@ class HostContentSettingsMap : public content_settings::Observer, // Whether this settings map is for an incognito or guest session. bool is_off_the_record_; @@ -2096,7 +2100,7 @@ diff --git a/components/content_settings/core/browser/host_content_settings_map. diff --git a/components/omnibox/browser/autocomplete_provider_client.cc b/components/omnibox/browser/autocomplete_provider_client.cc --- a/components/omnibox/browser/autocomplete_provider_client.cc +++ b/components/omnibox/browser/autocomplete_provider_client.cc -@@ -33,3 +33,7 @@ base::WeakPtr +@@ -38,3 +38,7 @@ base::WeakPtr AutocompleteProviderClient::GetWeakPtr() { return nullptr; } @@ -2107,7 +2111,7 @@ diff --git a/components/omnibox/browser/autocomplete_provider_client.cc b/compon diff --git a/components/omnibox/browser/autocomplete_provider_client.h b/components/omnibox/browser/autocomplete_provider_client.h --- a/components/omnibox/browser/autocomplete_provider_client.h +++ b/components/omnibox/browser/autocomplete_provider_client.h -@@ -137,6 +137,7 @@ class AutocompleteProviderClient : public OmniboxAction::Client { +@@ -142,6 +142,7 @@ class AutocompleteProviderClient : public OmniboxAction::Client { virtual bool IsOffTheRecord() const = 0; virtual bool IsIncognitoProfile() const = 0; virtual bool IsGuestSession() const = 0; @@ -2118,7 +2122,7 @@ diff --git a/components/omnibox/browser/autocomplete_provider_client.h b/compone diff --git a/components/omnibox/browser/base_search_provider.cc b/components/omnibox/browser/base_search_provider.cc --- a/components/omnibox/browser/base_search_provider.cc +++ b/components/omnibox/browser/base_search_provider.cc -@@ -350,7 +350,7 @@ bool BaseSearchProvider::CanSendSuggestRequestWithoutPageURL( +@@ -376,7 +376,7 @@ bool BaseSearchProvider::CanSendSuggestRequestWithoutPageURL( } // Don't make a suggest request if in incognito mode. @@ -2130,7 +2134,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 -@@ -775,7 +775,9 @@ bool SearchProvider::IsQuerySuitableForSuggest(bool* query_is_private) const { +@@ -778,7 +778,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(); @@ -2182,7 +2186,7 @@ new file mode 100644 diff --git a/net/base/file_stream_context.cc b/net/base/file_stream_context.cc --- a/net/base/file_stream_context.cc +++ b/net/base/file_stream_context.cc -@@ -167,7 +167,7 @@ FileStream::Context::OpenResult FileStream::Context::OpenFileImpl( +@@ -171,7 +171,7 @@ FileStream::Context::OpenResult FileStream::Context::OpenFileImpl( #if BUILDFLAG(IS_ANDROID) if (path.IsContentUri()) { // Check that only Read flags are set. diff --git a/build/cromite_patches/Add-autoplay-site-setting.patch b/build/cromite_patches/Add-autoplay-site-setting.patch index 3c6d45a5..4cda1d33 100644 --- a/build/cromite_patches/Add-autoplay-site-setting.patch +++ b/build/cromite_patches/Add-autoplay-site-setting.patch @@ -279,7 +279,7 @@ new file mode 100644 diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc --- a/components/content_settings/core/browser/content_settings_registry.cc +++ b/components/content_settings/core/browser/content_settings_registry.cc -@@ -255,7 +255,7 @@ void ContentSettingsRegistry::Init() { +@@ -248,7 +248,7 @@ void ContentSettingsRegistry::Init() { ContentSettingsInfo::INHERIT_IN_INCOGNITO, ContentSettingsInfo::EXCEPTIONS_ON_SECURE_ORIGINS_ONLY); @@ -299,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" -@@ -330,6 +331,8 @@ void AutoplayPolicy::TryUnlockingUserGesture() { +@@ -331,6 +332,8 @@ void AutoplayPolicy::TryUnlockingUserGesture() { } bool AutoplayPolicy::IsGestureNeededForPlayback() const { @@ -308,7 +308,7 @@ diff --git a/third_party/blink/renderer/core/html/media/autoplay_policy.cc b/thi if (!IsLockedPendingUserGesture()) return false; -@@ -428,6 +431,17 @@ void AutoplayPolicy::MaybeSetAutoplayInitiated() { +@@ -429,6 +432,17 @@ void AutoplayPolicy::MaybeSetAutoplayInitiated() { } } @@ -329,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 -@@ -138,6 +138,10 @@ class CORE_EXPORT AutoplayPolicy final +@@ -142,6 +142,10 @@ class CORE_EXPORT AutoplayPolicy final // should use, if checking to see if an action is allowed. bool IsLockedPendingUserGesture() const; diff --git a/build/cromite_patches/Add-bookmark-import-export-actions.patch b/build/cromite_patches/Add-bookmark-import-export-actions.patch index 33ab53ef..d7f1800a 100644 --- a/build/cromite_patches/Add-bookmark-import-export-actions.patch +++ b/build/cromite_patches/Add-bookmark-import-export-actions.patch @@ -6,12 +6,12 @@ Add bookmark import/export actions in bookmarks activity and page Reduce permissions needed for bookmarks import/export Completely remove contacts picker permission from the file dialog -Requires patch: Adds-support-for-writing-URIs.patch +Requires: Adds-support-for-writing-URIs.patch +Requires: Restore-BookmarkToolbar-setCurrentFolder.patch License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- chrome/android/java/AndroidManifest.xml | 1 - - .../java/res/menu/bookmark_toolbar_menu.xml | 14 + .../menu/bookmark_toolbar_menu_improved.xml | 14 + .../browser/TabbedModeTabDelegateFactory.java | 5 +- .../app/bookmarks/BookmarkActivity.java | 32 ++ @@ -20,7 +20,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../bookmarks/BookmarkManagerCoordinator.java | 9 + .../bookmarks/BookmarkManagerMediator.java | 23 ++ .../browser/bookmarks/BookmarkPage.java | 8 +- - .../browser/bookmarks/BookmarkToolbar.java | 23 ++ + .../browser/bookmarks/BookmarkToolbar.java | 28 ++ .../bookmarks/BookmarkToolbarMediator.java | 4 + .../bookmarks/BookmarkToolbarProperties.java | 8 +- .../bookmarks/BookmarkToolbarViewBinder.java | 6 + @@ -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, 928 insertions(+), 30 deletions(-) + 42 files changed, 919 insertions(+), 30 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 @@ -69,30 +69,6 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro -diff --git a/chrome/android/java/res/menu/bookmark_toolbar_menu.xml b/chrome/android/java/res/menu/bookmark_toolbar_menu.xml ---- a/chrome/android/java/res/menu/bookmark_toolbar_menu.xml -+++ b/chrome/android/java/res/menu/bookmark_toolbar_menu.xml -@@ -23,6 +23,20 @@ found in the LICENSE file. - android:visible="false" - app:showAsAction="ifRoom" - app:iconTint="@color/default_icon_color_secondary_tint_list" /> -+ -+ - mShareDelegateSupplier; private final Supplier mEphemeralTabCoordinatorSupplier; -@@ -82,7 +83,7 @@ public class TabbedModeTabDelegateFactory implements TabDelegateFactory { +@@ -83,7 +84,7 @@ public class TabbedModeTabDelegateFactory implements TabDelegateFactory { private NativePageFactory mNativePageFactory; public TabbedModeTabDelegateFactory( @@ -270,7 +246,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. -@@ -483,6 +525,212 @@ class BookmarkBridge { +@@ -474,6 +516,212 @@ class BookmarkBridge { .getTotalBookmarkCount(mNativeBookmarkBridge, id.getId(), id.getType()); } @@ -483,8 +459,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm /** * Synchronously gets a list of bookmarks that match the specified search query. * -@@ -1036,6 +1284,39 @@ class BookmarkBridge { - depthList.add(depth); +@@ -1032,6 +1280,39 @@ class BookmarkBridge { + BookmarkUtils.clearLastUsedPrefs(); } + @CalledByNative @@ -557,7 +533,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 -@@ -48,6 +48,8 @@ import org.chromium.components.image_fetcher.ImageFetcher; +@@ -49,6 +49,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; @@ -566,7 +542,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 +@@ -303,6 +305,13 @@ public class BookmarkManagerCoordinator // Public API implementation. @@ -583,16 +559,16 @@ 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 -@@ -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; +@@ -52,6 +52,8 @@ import org.chromium.components.browser_ui.widget.selectable_list.SelectionDelega import org.chromium.components.commerce.core.CommerceSubscription; import org.chromium.components.commerce.core.ShoppingService; + import org.chromium.components.commerce.core.SubscriptionsObserver; +import org.chromium.ui.base.ActivityWindowAndroid; +import org.chromium.ui.modaldialog.ModalDialogManager; import org.chromium.components.favicon.LargeIconBridge; import org.chromium.components.feature_engagement.EventConstants; import org.chromium.components.power_bookmarks.PowerBookmarkMeta; -@@ -82,6 +84,9 @@ class BookmarkManagerMediator +@@ -81,6 +83,9 @@ class BookmarkManagerMediator private static boolean sPreventLoadingForTesting; @@ -602,7 +578,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; -@@ -554,6 +559,14 @@ class BookmarkManagerMediator +@@ -568,6 +573,14 @@ class BookmarkManagerMediator mNativePage = nativePage; } @@ -617,7 +593,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. -@@ -734,6 +747,16 @@ class BookmarkManagerMediator +@@ -748,6 +761,16 @@ class BookmarkManagerMediator } } @@ -669,7 +645,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbar.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbar.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbar.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbar.java -@@ -120,6 +120,17 @@ public class BookmarkToolbar extends SelectableListToolbar +@@ -101,6 +101,17 @@ public class BookmarkToolbar extends SelectableListToolbar setOnMenuItemClickListener(dragEnabled ? null : this); } @@ -684,19 +660,24 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm + mExportBookmarkRunnable = runnable; + } + - void setSearchButtonVisible(boolean visible) { - // The improved bookmarks experience embeds search in the list. - if (BookmarkFeatures.isAndroidImprovedBookmarksEnabled()) return; -@@ -173,6 +184,8 @@ public class BookmarkToolbar extends SelectableListToolbar + void setEditButtonVisible(boolean visible) { + mEditButtonVisible = visible; + getMenu().findItem(R.id.edit_menu_id).setVisible(visible); +@@ -177,6 +188,13 @@ public class BookmarkToolbar extends SelectableListToolbar void setCurrentFolder(BookmarkId folder) { mCurrentFolder = mBookmarkModel.getBookmarkById(folder); ++ enableImportExportMenu(); ++ } ++ ++ void enableImportExportMenu() { + getMenu().findItem(R.id.import_menu_id).setVisible(true); + getMenu().findItem(R.id.export_menu_id).setVisible(true); ++ } } void setNavigateBackRunnable(Runnable navigateBackRunnable) { -@@ -192,6 +205,13 @@ public class BookmarkToolbar extends SelectableListToolbar +@@ -196,6 +214,13 @@ public class BookmarkToolbar extends SelectableListToolbar @Override public boolean onMenuItemClick(MenuItem menuItem) { hideOverflowMenu(); @@ -710,7 +691,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm return mMenuIdClickedFunction.apply(menuItem.getItemId()); } -@@ -212,6 +232,9 @@ public class BookmarkToolbar extends SelectableListToolbar +@@ -211,6 +236,9 @@ public class BookmarkToolbar extends SelectableListToolbar protected void showNormalView() { super.showNormalView(); @@ -718,8 +699,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm + getMenu().findItem(R.id.export_menu_id).setVisible(mCurrentFolder != null); + // SelectableListToolbar will show/hide the entire group. - setSearchButtonVisible(mSearchButtonVisible); setEditButtonVisible(mEditButtonVisible); + setNewFolderButtonVisible(mNewFolderButtonVisible); diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarMediator.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarMediator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarMediator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarMediator.java @@ -737,7 +718,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/BookmarkToolbarProperties.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarProperties.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarProperties.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarProperties.java -@@ -69,6 +69,10 @@ class BookmarkToolbarProperties { +@@ -81,6 +81,10 @@ class BookmarkToolbarProperties { static final WritableObjectPropertyKey NAVIGATE_BACK_RUNNABLE = new WritableObjectPropertyKey<>(); @@ -747,13 +728,13 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm + new WritableObjectPropertyKey<>(); static final PropertyKey[] ALL_KEYS = { - BOOKMARK_MODEL, -@@ -91,6 +95,8 @@ class BookmarkToolbarProperties { - CHECKED_VIEW_MENU_ID, - MENU_ID_CLICKED_FUNCTION, - NAVIGATE_BACK_RUNNABLE, -- FAKE_SELECTION_STATE_CHANGE -+ FAKE_SELECTION_STATE_CHANGE, + BOOKMARK_OPENER, +@@ -109,6 +113,8 @@ class BookmarkToolbarProperties { + SELECTION_MODE_SHOW_OPEN_IN_INCOGNITO, + SELECTION_MODE_SHOW_MOVE, + SELECTION_MODE_SHOW_MARK_READ, +- SELECTION_MODE_SHOW_MARK_UNREAD ++ SELECTION_MODE_SHOW_MARK_UNREAD, + IMPORT_BOOKMARK_RUNNABLE, + EXPORT_BOOKMARK_RUNNABLE }; @@ -761,7 +742,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/BookmarkToolbarViewBinder.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarViewBinder.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarViewBinder.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarViewBinder.java -@@ -59,6 +59,12 @@ class BookmarkToolbarViewBinder { +@@ -56,6 +56,12 @@ class BookmarkToolbarViewBinder { model.get(BookmarkToolbarProperties.CHECKED_VIEW_MENU_ID)); } else if (key == BookmarkToolbarProperties.CURRENT_FOLDER) { bookmarkToolbar.setCurrentFolder(model.get(BookmarkToolbarProperties.CURRENT_FOLDER)); @@ -777,15 +758,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java --- a/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java -@@ -17,6 +17,7 @@ import org.chromium.base.supplier.DestroyableObservableSupplier; - import org.chromium.base.supplier.ObservableSupplier; +@@ -18,6 +18,7 @@ import org.chromium.base.supplier.ObservableSupplier; import org.chromium.base.supplier.OneshotSupplier; import org.chromium.base.supplier.Supplier; + import org.chromium.chrome.R; +import org.chromium.chrome.browser.app.ChromeActivity; import org.chromium.chrome.browser.app.download.home.DownloadPage; import org.chromium.chrome.browser.bookmarks.BookmarkPage; import org.chromium.chrome.browser.browser_controls.BrowserControlsMarginSupplier; -@@ -54,7 +55,7 @@ import org.chromium.ui.util.ColorUtils; +@@ -57,7 +58,7 @@ import org.chromium.ui.util.ColorUtils; * Creates NativePage objects to show chrome-native:// URLs using the native Android view system. */ public class NativePageFactory { @@ -794,8 +775,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat private final BottomSheetController mBottomSheetController; private final BrowserControlsManager mBrowserControlsManager; private final Supplier mCurrentTabSupplier; -@@ -74,7 +75,7 @@ public class NativePageFactory { - private NativePageBuilder mNativePageBuilder; +@@ -78,7 +79,7 @@ public class NativePageFactory { + private static NativePage sTestPage; public NativePageFactory( - @NonNull Activity activity, @@ -803,7 +784,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat @NonNull BottomSheetController sheetController, @NonNull BrowserControlsManager browserControlsManager, @NonNull Supplier currentTabSupplier, -@@ -140,7 +141,7 @@ public class NativePageFactory { +@@ -144,7 +145,7 @@ public class NativePageFactory { @VisibleForTesting static class NativePageBuilder { @@ -812,7 +793,7 @@ 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; -@@ -158,7 +159,7 @@ public class NativePageFactory { +@@ -162,7 +163,7 @@ public class NativePageFactory { private final OneshotSupplier mModuleRegistrySupplier; public NativePageBuilder( @@ -821,7 +802,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat Supplier uma, BottomSheetController sheetController, BrowserControlsManager browserControlsManager, -@@ -228,7 +229,7 @@ public class NativePageFactory { +@@ -233,7 +234,7 @@ public class NativePageFactory { mActivity.getComponentName(), mSnackbarManagerSupplier.get(), tab.getProfile(), @@ -833,7 +814,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 -@@ -201,6 +201,8 @@ static_library("browser") { +@@ -203,6 +203,8 @@ static_library("browser") { "bluetooth/chrome_bluetooth_delegate_impl_client.h", "bookmarks/bookmark_model_factory.cc", "bookmarks/bookmark_model_factory.h", @@ -856,7 +837,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn configs += [ "//build/config/compiler:wexit_time_destructors", "//build/config:precompiled_headers", -@@ -3649,8 +3658,6 @@ static_library("browser") { +@@ -3746,8 +3755,6 @@ static_library("browser") { "badging/badge_manager_factory.h", "banners/app_banner_manager_desktop.cc", "banners/app_banner_manager_desktop.h", @@ -869,8 +850,8 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse --- a/chrome/browser/bookmarks/android/bookmark_bridge.cc +++ b/chrome/browser/bookmarks/android/bookmark_bridge.cc @@ -59,6 +59,28 @@ - #include "content/public/browser/browser_thread.h" #include "content/public/browser/web_contents.h" + #include "url/gurl.h" +#include "base/android/content_uri_utils.h" +#include "base/android/path_utils.h" @@ -894,10 +875,10 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse +#include "ui/shell_dialogs/selected_file_info.h" +#include "ui/shell_dialogs/select_file_dialog.h" + - using base::android::AttachCurrentThread; - using base::android::ConvertUTF16ToJavaString; - using base::android::ConvertUTF8ToJavaString; -@@ -76,12 +98,96 @@ using bookmarks::android::JavaBookmarkIdGetType; + // Must come after all headers that specialize FromJniType() / ToJniType(). + #include "chrome/android/chrome_jni_headers/BookmarkBridge_jni.h" + +@@ -77,12 +99,96 @@ using bookmarks::android::JavaBookmarkIdGetType; using content::BrowserThread; using power_bookmarks::PowerBookmarkMeta; @@ -994,7 +975,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse class BookmarkTitleComparer { public: explicit BookmarkTitleComparer(BookmarkBridge* bookmark_bridge, -@@ -232,6 +338,10 @@ BookmarkBridge::~BookmarkBridge() { +@@ -223,6 +329,10 @@ BookmarkBridge::~BookmarkBridge() { partner_bookmarks_shim_observation_.Reset(); bookmark_model_observation_.Reset(); profile_observation_.Reset(); @@ -1004,8 +985,8 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse + select_file_dialog_->ListenerDestroyed(); } - void BookmarkBridge::Destroy(JNIEnv*) { -@@ -668,6 +778,183 @@ jint BookmarkBridge::GetTotalBookmarkCount( + void BookmarkBridge::Destroy(JNIEnv* env) { +@@ -762,6 +872,183 @@ jint BookmarkBridge::GetTotalBookmarkCount( return count; } @@ -1192,16 +1173,16 @@ 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 -@@ -21,6 +21,7 @@ +@@ -20,6 +20,7 @@ + #include "base/strings/utf_string_conversions.h" #include "base/supports_user_data.h" #include "chrome/browser/android/bookmarks/partner_bookmarks_shim.h" - #include "chrome/browser/image_service/image_service_factory.h" +#include "chrome/browser/bookmarks/bookmark_html_writer.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_observer.h" #include "chrome/browser/reading_list/android/reading_list_manager.h" -@@ -33,6 +34,9 @@ - #include "components/prefs/pref_change_registrar.h" +@@ -37,6 +38,9 @@ + #include "components/signin/public/identity_manager/identity_manager.h" #include "url/android/gurl_android.h" +#include "components/search_engines/template_url.h" @@ -1210,16 +1191,16 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.h b/chrome/browser class BookmarkBridgeTest; // The delegate to fetch bookmarks information for the Android native -@@ -44,7 +48,8 @@ class BookmarkBridge : public ProfileObserver, - public bookmarks::BaseBookmarkModelObserver, - public PartnerBookmarksShim::Observer, +@@ -50,7 +54,8 @@ class BookmarkBridge : public ProfileObserver, public ReadingListManager::Observer, + public ReadingListModelObserver, + public signin::IdentityManager::Observer, - public base::SupportsUserData::Data { + public base::SupportsUserData::Data, + public ui::SelectFileDialog::Listener { public: - BookmarkBridge( - Profile* profile, + // All of the injected pointers must be non-null and must outlive `this`. + BookmarkBridge(Profile* profile, @@ -81,6 +86,12 @@ class BookmarkBridge : public ProfileObserver, bool IsDoingExtensiveChanges(JNIEnv* env); @@ -1249,16 +1230,17 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.h b/chrome/browser void GetAllFoldersWithDepths( JNIEnv* env, const base::android::JavaParamRef& j_folders_obj, -@@ -356,12 +376,16 @@ class BookmarkBridge : public ProfileObserver, - void DestroyJavaObject(); +@@ -363,6 +383,9 @@ class BookmarkBridge : public ProfileObserver, + void CreateOrDestroyAccountReadingListManagerIfNeeded(); - raw_ptr profile_; // weak + const raw_ptr profile_; // weak + base::FilePath export_path_; + raw_ptr observer_; // weak + base::android::ScopedJavaGlobalRef java_bookmark_model_; - raw_ptr bookmark_model_; // weak - raw_ptr managed_bookmark_service_; // weak + const raw_ptr bookmark_model_; // weak + const raw_ptr +@@ -377,6 +400,7 @@ class BookmarkBridge : public ProfileObserver, std::unique_ptr grouped_bookmark_actions_; PrefChangeRegistrar pref_change_registrar_; @@ -1266,7 +1248,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.h b/chrome/browser // Information about the Partner bookmarks (must check for IsLoaded()). // This is owned by profile. -@@ -389,6 +413,10 @@ class BookmarkBridge : public ProfileObserver, +@@ -408,6 +432,10 @@ class BookmarkBridge : public ProfileObserver, bool suppress_observer_notifications_ = false; @@ -1348,7 +1330,7 @@ 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 -@@ -37,18 +37,18 @@ import java.util.ArrayList; +@@ -38,18 +38,18 @@ import java.util.ArrayList; */ public class DownloadLocationDialogCoordinator implements ModalDialogProperties.Controller { @NonNull private DownloadLocationDialogController mController; @@ -1371,7 +1353,7 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse private boolean mLocationDialogManaged; /** -@@ -140,7 +140,7 @@ public class DownloadLocationDialogCoordinator implements ModalDialogProperties. +@@ -141,7 +141,7 @@ public class DownloadLocationDialogCoordinator implements ModalDialogProperties. * Called after retrieved the download directory options. * @param dirs An list of available download directories. */ @@ -1383,21 +1365,21 @@ 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 -@@ -176,6 +176,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -188,6 +188,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kCacheActivityTaskID, &kCastDeviceFilter, - &kClearOmniboxFocusAfterNavigation, + &kCCTAuthView, + &kBookmarksExportUseSaf, - &kCreateNewTabInitializeRenderer, - &kCCTBrandTransparencyMemoryImprovement, + &kCCTBeforeUnload, &kCCTClientDataHeader, + &kCCTExtendTrustedCdnPublisher, 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 -@@ -502,6 +502,7 @@ public abstract class ChromeFeatureList { - public static final String USER_BYPASS_UI = "UserBypassUI"; +@@ -517,6 +517,7 @@ public abstract class ChromeFeatureList { public static final String VERTICAL_AUTOMOTIVE_BACK_BUTTON_TOOLBAR = "VerticalAutomotiveBackButtonToolbar"; + public static final String VISITED_URL_RANKING_SERVICE = "VisitedURLRankingService"; + public static final String BOOKMARKS_EXPORT_USESAF = "BookmarksExportUseSaf"; public static final String VOICE_SEARCH_AUDIO_CAPTURE_POLICY = "VoiceSearchAudioCapturePolicy"; public static final String WEB_APK_ALLOW_ICON_UPDATE = "WebApkAllowIconUpdate"; @@ -1455,9 +1437,9 @@ diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/bro + public static final String BOOKMARKS_LAST_EXPORT_URI = + "Chrome.Bookmarks.Last_Export_Uri"; - /** - * Whether Chrome is set as the default browser. -@@ -894,6 +896,7 @@ public final class ChromePreferenceKeys { + /** Whether Chrome is set as the default browser. Default value is false. */ + public static final String CHROME_DEFAULT_BROWSER = "applink.chrome_default_browser"; +@@ -921,6 +923,7 @@ public final class ChromePreferenceKeys { AUTOFILL_ASSISTANT_PROACTIVE_HELP_ENABLED, APP_LAUNCH_LAST_KNOWN_ACTIVE_TAB_STATE, APP_LAUNCH_SEARCH_ENGINE_HAD_LOGO, @@ -1468,7 +1450,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 -@@ -248,6 +248,24 @@ CHAR_LIMIT guidelines: +@@ -245,6 +245,24 @@ CHAR_LIMIT guidelines: Sites @@ -1496,7 +1478,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 -@@ -404,6 +404,9 @@ static_library("common_lib") { +@@ -395,6 +395,9 @@ static_library("common_lib") { sources += [ "media/chrome_media_drm_bridge_client.cc", "media/chrome_media_drm_bridge_client.h", @@ -1509,7 +1491,7 @@ diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn diff --git a/chrome/utility/BUILD.gn b/chrome/utility/BUILD.gn --- a/chrome/utility/BUILD.gn +++ b/chrome/utility/BUILD.gn -@@ -84,8 +84,6 @@ static_library("utility") { +@@ -89,8 +89,6 @@ static_library("utility") { if (!is_android) { sources += [ @@ -1518,7 +1500,7 @@ diff --git a/chrome/utility/BUILD.gn b/chrome/utility/BUILD.gn "importer/bookmarks_file_importer.cc", "importer/bookmarks_file_importer.h", "importer/external_process_importer_bridge.cc", -@@ -220,6 +218,11 @@ static_library("utility") { +@@ -228,6 +226,11 @@ static_library("utility") { ] } @@ -1770,7 +1752,7 @@ diff --git a/ui/android/java/strings/android_ui_strings.grd b/ui/android/java/st diff --git a/ui/shell_dialogs/select_file_dialog.h b/ui/shell_dialogs/select_file_dialog.h --- a/ui/shell_dialogs/select_file_dialog.h +++ b/ui/shell_dialogs/select_file_dialog.h -@@ -199,6 +199,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog +@@ -209,6 +209,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog const GURL* caller = nullptr); bool HasMultipleFileTypeChoices(); @@ -1782,7 +1764,7 @@ diff --git a/ui/shell_dialogs/select_file_dialog.h b/ui/shell_dialogs/select_fil diff --git a/ui/shell_dialogs/select_file_dialog_android.cc b/ui/shell_dialogs/select_file_dialog_android.cc --- a/ui/shell_dialogs/select_file_dialog_android.cc +++ b/ui/shell_dialogs/select_file_dialog_android.cc -@@ -137,6 +137,12 @@ void SelectFileDialogImpl::SelectFileImpl( +@@ -139,6 +139,12 @@ void SelectFileDialogImpl::SelectFileImpl( owning_window->GetJavaObject()); } @@ -1836,7 +1818,7 @@ diff --git a/ui/shell_dialogs/select_file_dialog_linux.h b/ui/shell_dialogs/sele diff --git a/ui/shell_dialogs/select_file_dialog_win.cc b/ui/shell_dialogs/select_file_dialog_win.cc --- a/ui/shell_dialogs/select_file_dialog_win.cc +++ b/ui/shell_dialogs/select_file_dialog_win.cc -@@ -194,6 +194,7 @@ class SelectFileDialogImpl : public ui::SelectFileDialog, +@@ -195,6 +195,7 @@ class SelectFileDialogImpl : public ui::SelectFileDialog, int index); bool HasMultipleFileTypeChoicesImpl() override; @@ -1844,7 +1826,7 @@ diff --git a/ui/shell_dialogs/select_file_dialog_win.cc b/ui/shell_dialogs/selec // Returns the filter to be used while displaying the open/save file dialog. // This is computed from the extensions for the file types being opened. -@@ -272,6 +273,10 @@ bool SelectFileDialogImpl::HasMultipleFileTypeChoicesImpl() { +@@ -273,6 +274,10 @@ bool SelectFileDialogImpl::HasMultipleFileTypeChoicesImpl() { return has_multiple_file_type_choices_; } diff --git a/build/cromite_patches/Add-cromite-flags-support.patch b/build/cromite_patches/Add-cromite-flags-support.patch index b795c317..fced281c 100644 --- a/build/cromite_patches/Add-cromite-flags-support.patch +++ b/build/cromite_patches/Add-cromite-flags-support.patch @@ -9,22 +9,22 @@ Allows flags to be defined in separate files. Activates a new cromite tab in chrome://flags with only the flags added and changed. In android added chrome://flags/cromite in the setting ui. -Currently in wip Need: bromite-build-utils.patch License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- base/BUILD.gn | 4 +- - base/android/feature_map.cc | 8 +- + base/android/feature_map.cc | 5 + .../base/cached_flags/CachedFlag.java | 8 +- - base/feature_list.cc | 78 +++++++++ - base/feature_list.h | 72 ++++++++- + base/feature_list.cc | 76 ++++++++ + base/feature_list.h | 72 +++++++- build/android/gyp/java_cpp_features.py | 17 ++ chrome/android/java/res/values/values.xml | 3 + .../java/res/xml/privacy_preferences.xml | 4 + + .../settings/AccessibilitySettings.java | 5 +- .../homepage/settings/HomepageSettings.java | 2 +- .../privacy/settings/PrivacySettings.java | 2 +- - .../browser/settings/SettingsActivity.java | 36 +++++ + .../browser/settings/SettingsActivity.java | 36 ++++ chrome/browser/about_flags.cc | 11 ++ chrome/browser/browser_features.cc | 1 + chrome/browser/flags/BUILD.gn | 13 ++ @@ -32,19 +32,20 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../flags/android/chrome_feature_list.h | 1 + .../browser/flags/ChromeFeatureList.java | 13 +- .../flags/cromite/include_all_directory.java | 1 + - .../java_template/CromiteCachedFlag.java.tmpl | 47 ++++++ + .../java_template/CromiteCachedFlag.java.tmpl | 47 +++++ chrome/browser/settings/BUILD.gn | 1 + - .../settings/ChromeBaseSettingsFragment.java | 47 ++++++ + .../settings/ChromeBaseSettingsFragment.java | 47 +++++ .../strings/android_chrome_strings.grd | 1 + .../placeholder.txt | 1 + chrome/browser/ui/ui_features.cc | 1 + chrome/common/chrome_features.cc | 1 + + .../res/xml/accessibility_preferences.xml | 3 +- .../android/java/res/values/attrs.xml | 4 + .../settings/ChromeSwitchPreference.java | 20 +++ components/components_strings.grd | 1 + .../content_settings/core/common/features.cc | 1 + .../placeholder.txt | 1 + - components/flags_ui/flags_state.cc | 56 ++++++- + components/flags_ui/flags_state.cc | 55 +++++- components/flags_ui/resources/app.html | 42 ++++- components/flags_ui/resources/app.ts | 41 ++++- components/flags_ui/resources/experiment.html | 7 +- @@ -52,12 +53,13 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../flags_ui/resources/flags_browser_proxy.ts | 5 + .../core/offline_page_feature.cc | 1 + .../offline_pages/core/offline_page_feature.h | 1 + + .../browser/features/password_features.cc | 1 + components/permissions/features.cc | 1 + .../version_ui/version_handler_helper.cc | 2 +- content/common/features.cc | 1 + content/public/common/content_features.cc | 1 + content/public/common/content_features.h | 1 + - cromite_flags/BUILD.gn | 150 ++++++++++++++++++ + cromite_flags/BUILD.gn | 168 ++++++++++++++++++ .../browser/about_flags_cc/placeholder.txt | 1 + .../browser_features_cc/placeholder.txt | 1 + .../chrome_feature_list_cc/placeholder.txt | 1 + @@ -68,6 +70,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../core/common/features_cc/placeholder.txt | 1 + .../offline_page_feature_cc/placeholder.txt | 1 + .../offline_page_feature_h/placeholder.txt | 1 + + .../password_features_cc/placeholder.txt | 1 + .../permissions/features_cc/placeholder.txt | 1 + .../common/features_cc/placeholder.txt | 1 + .../content_features_cc/placeholder.txt | 1 + @@ -80,6 +83,8 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html .../public/cpp/features_h/placeholder.txt | 1 + .../blink/common/features_cc/placeholder.txt | 1 + .../blink/common/features_h/placeholder.txt | 1 + + .../ui/base/features_cc/placeholder.txt | 1 + + .../ui/base/features_h/placeholder.txt | 1 + media/base/media_switches.cc | 2 +- media/base/media_switches.h | 2 +- net/base/features.cc | 1 + @@ -88,7 +93,9 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html services/network/public/cpp/features.h | 1 + third_party/blink/common/features.cc | 1 + third_party/blink/public/common/features.h | 1 + - 74 files changed, 738 insertions(+), 20 deletions(-) + ui/base/ui_base_features.cc | 1 + + ui/base/ui_base_features.h | 1 + + 82 files changed, 762 insertions(+), 22 deletions(-) create mode 100644 chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/cromite/include_all_directory.java create mode 100644 chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/cromite/java_template/CromiteCachedFlag.java.tmpl create mode 100644 chrome/browser/ui/android/strings/cromite_android_chrome_strings_grd/placeholder.txt @@ -104,6 +111,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html create mode 100755 cromite_flags/components/content_settings/core/common/features_cc/placeholder.txt create mode 100755 cromite_flags/components/offline_pages/core/offline_page_feature_cc/placeholder.txt create mode 100755 cromite_flags/components/offline_pages/core/offline_page_feature_h/placeholder.txt + create mode 100755 cromite_flags/components/password_manager/core/browser/features/password_features_cc/placeholder.txt create mode 100755 cromite_flags/components/permissions/features_cc/placeholder.txt create mode 100755 cromite_flags/content/common/features_cc/placeholder.txt create mode 100755 cromite_flags/content/public/common/content_features_cc/placeholder.txt @@ -116,11 +124,13 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html create mode 100755 cromite_flags/services/network/public/cpp/features_h/placeholder.txt create mode 100755 cromite_flags/third_party/blink/common/features_cc/placeholder.txt create mode 100755 cromite_flags/third_party/blink/common/features_h/placeholder.txt + create mode 100755 cromite_flags/ui/base/features_cc/placeholder.txt + create mode 100755 cromite_flags/ui/base/features_h/placeholder.txt diff --git a/base/BUILD.gn b/base/BUILD.gn --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -212,6 +212,8 @@ buildflag_header("message_pump_buildflags") { +@@ -202,6 +202,8 @@ buildflag_header("message_pump_buildflags") { # This does not include test code (test support and anything in the test # directory) which should use source_set as is recommended for GN targets). component("base") { @@ -129,7 +139,7 @@ diff --git a/base/BUILD.gn b/base/BUILD.gn sources = [ "allocator/allocator_check.cc", "allocator/allocator_check.h", -@@ -1055,7 +1057,7 @@ component("base") { +@@ -1054,7 +1056,7 @@ component("base") { "//build/config/compiler:wglobal_constructors", ] @@ -141,28 +151,23 @@ diff --git a/base/BUILD.gn b/base/BUILD.gn diff --git a/base/android/feature_map.cc b/base/android/feature_map.cc --- a/base/android/feature_map.cc +++ b/base/android/feature_map.cc -@@ -45,9 +45,15 @@ static jboolean JNI_FeatureMap_IsEnabled( - JNIEnv* env, - jlong jfeature_map, - const android::JavaParamRef& jfeature_name) { -+ std::string feature_name = ConvertJavaStringToUTF8(env, jfeature_name); +@@ -45,6 +45,11 @@ const Feature* FeatureMap::FindFeatureExposedToJava( + static jboolean JNI_FeatureMap_IsEnabled(JNIEnv* env, + jlong jfeature_map, + std::string& feature_name) { + if (base::FeatureList::IsCromiteFlag(feature_name)) { + const base::Feature* cromite_feature = + base::FeatureList::GetCromiteFlag(feature_name); + return base::FeatureList::IsEnabled(*cromite_feature); + } FeatureMap* feature_map = reinterpret_cast(jfeature_map); - const base::Feature* feature = feature_map->FindFeatureExposedToJava( -- StringPiece(ConvertJavaStringToUTF8(env, jfeature_name))); -+ StringPiece(feature_name)); - return base::FeatureList::IsEnabled(*feature); - } - + const base::Feature* feature = + feature_map->FindFeatureExposedToJava(feature_name); diff --git a/base/android/java/src/org/chromium/base/cached_flags/CachedFlag.java b/base/android/java/src/org/chromium/base/cached_flags/CachedFlag.java --- a/base/android/java/src/org/chromium/base/cached_flags/CachedFlag.java +++ b/base/android/java/src/org/chromium/base/cached_flags/CachedFlag.java -@@ -125,7 +125,7 @@ public class CachedFlag extends Flag { - .writeBoolean(getSharedPreferenceKey(), isEnabledInNative); +@@ -142,7 +142,7 @@ public class CachedFlag extends Flag { + editor.putBoolean(getSharedPreferenceKey(), isEnabledInNative); } - String getSharedPreferenceKey() { @@ -170,8 +175,8 @@ diff --git a/base/android/java/src/org/chromium/base/cached_flags/CachedFlag.jav // Create the key only once to avoid String concatenation every flag check. if (mPreferenceKey == null) { mPreferenceKey = CachedFlagsSharedPreferences.FLAGS_CACHED.createKey(mFeatureName); -@@ -157,6 +157,12 @@ public class CachedFlag extends Flag { - .removeKeysWithPrefix(CachedFlagsSharedPreferences.FLAGS_CACHED); +@@ -169,6 +169,12 @@ public class CachedFlag extends Flag { + } } + public void setValueReturnedOverride(@Nullable Boolean value) { @@ -186,7 +191,7 @@ diff --git a/base/android/java/src/org/chromium/base/cached_flags/CachedFlag.jav diff --git a/base/feature_list.cc b/base/feature_list.cc --- a/base/feature_list.cc +++ b/base/feature_list.cc -@@ -37,6 +37,31 @@ +@@ -43,6 +43,31 @@ namespace base { @@ -218,7 +223,7 @@ diff --git a/base/feature_list.cc b/base/feature_list.cc namespace { // Pointer to the FeatureList instance singleton that was set via -@@ -464,6 +489,48 @@ bool FeatureList::IsEnabled(const Feature& feature) { +@@ -472,6 +497,46 @@ bool FeatureList::IsEnabled(const Feature& feature) { return g_feature_list_instance->IsFeatureEnabled(feature); } @@ -239,8 +244,7 @@ diff --git a/base/feature_list.cc b/base/feature_list.cc + return key; + } + } -+ NOTREACHED(); -+ return nullptr; ++ NOTREACHED_NORETURN(); +} + +// static @@ -260,14 +264,13 @@ diff --git a/base/feature_list.cc b/base/feature_list.cc + return value == base::FEATURE_ENABLED_BY_DEFAULT; + } + } -+ NOTREACHED(); -+ return false; ++ NOTREACHED_NORETURN(); +} + // static - bool FeatureList::IsValidFeatureOrFieldTrialName(StringPiece name) { + bool FeatureList::IsValidFeatureOrFieldTrialName(std::string_view name) { return IsStringASCII(name) && name.find_first_of(",<*") == std::string::npos; -@@ -710,6 +777,17 @@ void FeatureList::VisitFeaturesAndParams(FeatureVisitor& visitor) { +@@ -718,6 +783,17 @@ void FeatureList::VisitFeaturesAndParams(FeatureVisitor& visitor) { void FeatureList::FinalizeInitialization() { DCHECK(!initialized_); @@ -288,20 +291,20 @@ 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 -@@ -99,8 +99,10 @@ enum FeatureState { - // [1]: - // https://crsrc.org/c/docs/speed/binary_size/android_binary_size_trybot.md#Mutable-Constants +@@ -108,8 +108,10 @@ enum class FeatureMacroHandshake { kSecret }; struct BASE_EXPORT LOGICALLY_CONST Feature { -- constexpr Feature(const char* name, FeatureState default_state) + constexpr Feature(const char* name, + FeatureState default_state, +- internal::FeatureMacroHandshake) - : name(name), default_state(default_state) { -+ constexpr Feature(const char* name, FeatureState default_state, -+ bool cromite = false, bool is_new_flag = false) ++ internal::FeatureMacroHandshake, ++ bool cromite = false, bool is_new_flag = false) + : name(name), default_state(default_state), + is_cromite(cromite), is_new(is_new_flag) { #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 " -@@ -126,6 +128,9 @@ struct BASE_EXPORT LOGICALLY_CONST Feature { + if (std::string_view(name).find(BUILDFLAG(BANNED_BASE_FEATURE_PREFIX)) == + 0) { +@@ -136,6 +138,9 @@ struct BASE_EXPORT LOGICALLY_CONST Feature { // command line switch. const FeatureState default_state; @@ -311,7 +314,7 @@ diff --git a/base/feature_list.h b/base/feature_list.h private: friend class FeatureList; -@@ -401,6 +406,11 @@ class BASE_EXPORT FeatureList { +@@ -411,6 +416,11 @@ class BASE_EXPORT FeatureList { // instance, which is checked in builds with DCHECKs enabled. static bool IsEnabled(const Feature& feature); @@ -323,7 +326,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 -@@ -665,4 +675,62 @@ class BASE_EXPORT FeatureList { +@@ -676,4 +686,62 @@ class BASE_EXPORT FeatureList { } // namespace base @@ -345,7 +348,7 @@ diff --git a/base/feature_list.h b/base/feature_list.h +} // namespace base + +#define CROMITE_FEATURE(feature, name, default_state) \ -+ constinit const base::Feature feature(name, default_state, true, true); \ ++ constinit const base::Feature feature(name, default_state, base::internal::FeatureMacroHandshake::kSecret, true, true); \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wglobal-constructors\"") \ + static const ::base::internal::FeatureDefaultStateOverrider \ @@ -433,7 +436,7 @@ diff --git a/chrome/android/java/res/values/values.xml b/chrome/android/java/res diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml --- a/chrome/android/java/res/xml/privacy_preferences.xml +++ b/chrome/android/java/res/xml/privacy_preferences.xml -@@ -59,6 +59,10 @@ found in the LICENSE file. +@@ -75,6 +75,10 @@ found in the LICENSE file. android:title="@string/tabgrid_use_icons_title" android:summary="@string/tabgrid_use_icons_summary" android:defaultValue="false" /> @@ -444,6 +447,35 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi kAuxiliarySearchMaxTabsCountParam( +@@ -193,6 +193,7 @@ constexpr base::FeatureParam kAuxiliarySearchMaxTabsCountParam( "auxiliary_search_max_donation_tab", 100); @@ -642,7 +674,7 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.h b/chrome/browser 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 -@@ -13,6 +13,10 @@ import org.chromium.base.cached_flags.DoubleCachedFieldTrialParameter; +@@ -15,6 +15,10 @@ import org.chromium.base.cached_flags.DoubleCachedFieldTrialParameter; import org.chromium.base.cached_flags.IntCachedFieldTrialParameter; import org.chromium.base.cached_flags.StringCachedFieldTrialParameter; @@ -653,16 +685,16 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f import java.util.List; import java.util.Map; -@@ -691,7 +695,7 @@ public abstract class ChromeFeatureList { +@@ -719,7 +723,7 @@ public abstract class ChromeFeatureList { public static final CachedFlag sVerticalAutomotiveBackButtonToolbar = newCachedFlag(VERTICAL_AUTOMOTIVE_BACK_BUTTON_TOOLBAR, true); - public static final List sFlagsCachedFullBrowser = + public static final List sFlagsCachedFullBrowserChromium = List.of( + sAccountReauthenticationRecentTimeWindow, sAllowUserCertificates, - sAndroidAppIntegration, -@@ -779,6 +783,13 @@ public abstract class ChromeFeatureList { +@@ -816,6 +820,13 @@ public abstract class ChromeFeatureList { sUseLibunwindstackNativeUnwinderAndroid, sVerticalAutomotiveBackButtonToolbar); @@ -829,7 +861,7 @@ new file mode 100644 diff --git a/chrome/browser/ui/ui_features.cc b/chrome/browser/ui/ui_features.cc --- a/chrome/browser/ui/ui_features.cc +++ b/chrome/browser/ui/ui_features.cc -@@ -450,4 +450,5 @@ BASE_FEATURE(kStopLoadingAnimationForHiddenWindow, +@@ -517,4 +517,5 @@ BASE_FEATURE(kStopLoadingAnimationForHiddenWindow, "StopLoadingAnimationForHiddenWindow", base::FEATURE_ENABLED_BY_DEFAULT); @@ -838,12 +870,25 @@ diff --git a/chrome/browser/ui/ui_features.cc b/chrome/browser/ui/ui_features.cc diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc --- a/chrome/common/chrome_features.cc +++ b/chrome/common/chrome_features.cc -@@ -1735,4 +1735,5 @@ BASE_FEATURE(kSupportsRtcWakeOver24Hours, - base::FEATURE_ENABLED_BY_DEFAULT); +@@ -1674,4 +1674,5 @@ BASE_FEATURE(kEventBasedLogUpload, + base::FEATURE_DISABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_CHROMEOS_ASH) +#include "cromite_flags/chrome_common_chrome_features_cc.inc" } // namespace features +diff --git a/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml b/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml +--- a/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml ++++ b/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml +@@ -5,7 +5,8 @@ Use of this source code is governed by a BSD-style license that can be + found in the LICENSE file. + --> + +- ++ + + + - - - + + + diff --git a/components/content_settings/core/common/features.cc b/components/content_settings/core/common/features.cc --- a/components/content_settings/core/common/features.cc +++ b/components/content_settings/core/common/features.cc -@@ -112,5 +112,6 @@ BASE_FEATURE(kIndexedHostContentSettingsMap, +@@ -113,5 +113,6 @@ BASE_FEATURE(kIndexedHostContentSettingsMap, "IndexedHostContentSettingsMap", - base::FEATURE_DISABLED_BY_DEFAULT); + base::FEATURE_ENABLED_BY_DEFAULT); +#include "cromite_flags/components_content_settings_core_common_features_cc.inc" } // namespace features @@ -932,7 +977,7 @@ new file mode 100644 diff --git a/components/flags_ui/flags_state.cc b/components/flags_ui/flags_state.cc --- a/components/flags_ui/flags_state.cc +++ b/components/flags_ui/flags_state.cc -@@ -359,7 +359,22 @@ void FlagsState::GetSwitchesAndFeaturesFromFlags( +@@ -359,7 +359,21 @@ void FlagsState::GetSwitchesAndFeaturesFromFlags( for (const std::string& entry_name : enabled_entries) { const auto& entry_it = name_to_switch_map.find(entry_name); @@ -950,15 +995,14 @@ diff --git a/components/flags_ui/flags_state.cc b/components/flags_ui/flags_stat + continue; + } + } -+ NOTREACHED(); -+ continue; ++ NOTREACHED_NORETURN(); + } const SwitchEntry& entry = entry_it->second; if (!entry.switch_name.empty()) -@@ -668,6 +683,27 @@ void FlagsState::GetFlagFeatureEntries( - bool is_default_value = IsDefaultValue(entry, enabled_entries); - data.Set("is_default", is_default_value); +@@ -676,6 +690,27 @@ void FlagsState::GetFlagFeatureEntries( + data.Set("links", std::move(links)); + } + if (entry.type == FeatureEntry::FEATURE_VALUE + || entry.type == FeatureEntry::FEATURE_WITH_PARAMS_VALUE) { @@ -984,7 +1028,7 @@ diff --git a/components/flags_ui/flags_state.cc b/components/flags_ui/flags_stat switch (entry.type) { case FeatureEntry::SINGLE_VALUE: case FeatureEntry::SINGLE_DISABLE_VALUE: -@@ -796,6 +832,16 @@ void FlagsState::AddSwitchesToCommandLine( +@@ -804,6 +839,16 @@ void FlagsState::AddSwitchesToCommandLine( for (const std::string& entry_name : enabled_entries) { const auto& entry_it = name_to_switch_map.find(entry_name); if (entry_it == name_to_switch_map.end()) { @@ -998,10 +1042,10 @@ diff --git a/components/flags_ui/flags_state.cc b/components/flags_ui/flags_stat + continue; + } + } - NOTREACHED(); + NOTREACHED_IN_MIGRATION(); continue; } -@@ -1048,6 +1094,14 @@ const FeatureEntry* FlagsState::FindFeatureEntryByName( +@@ -1056,6 +1101,14 @@ const FeatureEntry* FlagsState::FindFeatureEntryByName( bool FlagsState::IsSupportedFeature(const FlagsStorage* storage, const std::string& name, int platform_mask) const { @@ -1099,7 +1143,7 @@ diff --git a/components/flags_ui/resources/app.ts b/components/flags_ui/resource private announceStatusDelayMs: number = 100; private featuresResolver: PromiseResolver = new PromiseResolver(); private flagSearch: FlagSearch = new FlagSearch(this); -@@ -205,6 +206,10 @@ export class FlagsAppElement extends CustomElement { +@@ -209,6 +210,10 @@ export class FlagsAppElement extends CustomElement { // tabs: Tab[] = [ @@ -1110,7 +1154,7 @@ diff --git a/components/flags_ui/resources/app.ts b/components/flags_ui/resource { tabEl: this.getRequiredElement('#tab-available'), panelEl: this.getRequiredElement('#tab-content-available'), -@@ -218,6 +223,11 @@ export class FlagsAppElement extends CustomElement { +@@ -222,6 +227,11 @@ export class FlagsAppElement extends CustomElement { ]; connectedCallback() { @@ -1119,10 +1163,10 @@ diff --git a/components/flags_ui/resources/app.ts b/components/flags_ui/resource + this.getRequiredElement("#appcontainer").classList.add('cromite'); + document.title = "Cromite Flags List"; + } - // Get and display the data upon loading. - this.requestExperimentalFeaturesData(); - // There is no restart button on iOS. -@@ -278,20 +288,29 @@ export class FlagsAppElement extends CustomElement { + // + const pathname = new URL(window.location.href).pathname; + this.isFlagsDeprecatedUrl_ = +@@ -306,20 +316,29 @@ export class FlagsAppElement extends CustomElement { const defaultFeatures: Feature[] = []; const nonDefaultFeatures: Feature[] = []; @@ -1155,7 +1199,7 @@ diff --git a/components/flags_ui/resources/app.ts b/components/flags_ui/resource // this.showRestartToast(experimentalFeaturesData.needsRestart); -@@ -402,16 +421,23 @@ export class FlagsAppElement extends CustomElement { +@@ -438,16 +457,23 @@ export class FlagsAppElement extends CustomElement { } private renderExperiments( @@ -1180,7 +1224,7 @@ diff --git a/components/flags_ui/resources/app.ts b/components/flags_ui/resource if (select) { experiment.addEventListener('select-change', e => { e.preventDefault(); -@@ -435,9 +461,14 @@ export class FlagsAppElement extends CustomElement { +@@ -471,9 +497,14 @@ export class FlagsAppElement extends CustomElement { this.showRestartToast(true); }); } @@ -1266,7 +1310,7 @@ diff --git a/components/flags_ui/resources/experiment.ts b/components/flags_ui/r const description = this.getRequiredElement('.description'); description.textContent = feature.description; -@@ -125,6 +136,7 @@ export class FlagsExperimentElement extends CustomElement { +@@ -134,6 +145,7 @@ export class FlagsExperimentElement extends CustomElement { const permalink = this.getRequiredElement('.permalink'); permalink.href = `#${feature.internal_name}`; permalink.textContent = `#${feature.internal_name}`; @@ -1274,7 +1318,7 @@ diff --git a/components/flags_ui/resources/experiment.ts b/components/flags_ui/r const smallScreenCheck = window.matchMedia('(max-width: 480px)'); // Toggling of experiment description overflow content on smaller screens. -@@ -153,6 +165,10 @@ export class FlagsExperimentElement extends CustomElement { +@@ -162,6 +174,10 @@ export class FlagsExperimentElement extends CustomElement { const optionEl = document.createElement('option'); optionEl.selected = option.selected; optionEl.textContent = option.description; @@ -1303,7 +1347,7 @@ diff --git a/components/flags_ui/resources/flags_browser_proxy.ts b/components/f diff --git a/components/offline_pages/core/offline_page_feature.cc b/components/offline_pages/core/offline_page_feature.cc --- a/components/offline_pages/core/offline_page_feature.cc +++ b/components/offline_pages/core/offline_page_feature.cc -@@ -55,4 +55,5 @@ bool IsOfflinePagesNetworkStateLikelyUnknown() { +@@ -48,4 +48,5 @@ bool IsOfflinePagesNetworkStateLikelyUnknown() { return base::FeatureList::IsEnabled(kOfflinePagesNetworkStateLikelyUnknown); } @@ -1312,7 +1356,7 @@ diff --git a/components/offline_pages/core/offline_page_feature.cc b/components/ diff --git a/components/offline_pages/core/offline_page_feature.h b/components/offline_pages/core/offline_page_feature.h --- a/components/offline_pages/core/offline_page_feature.h +++ b/components/offline_pages/core/offline_page_feature.h -@@ -50,6 +50,7 @@ bool IsOnTheFlyMhtmlHashComputationEnabled(); +@@ -42,6 +42,7 @@ bool IsOnTheFlyMhtmlHashComputationEnabled(); // offline pages to avoid showing them even when the device is online. bool IsOfflinePagesNetworkStateLikelyUnknown(); @@ -1320,10 +1364,19 @@ diff --git a/components/offline_pages/core/offline_page_feature.h b/components/o } // namespace offline_pages #endif // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_FEATURE_H_ +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 +@@ -207,4 +207,5 @@ BASE_FEATURE(kUsernameFirstFlowWithIntermediateValuesVoting, + "UsernameFirstFlowWithIntermediateValuesVoting", + base::FEATURE_ENABLED_BY_DEFAULT); + ++#include "cromite_flags/components_password_manager_core_browser_features_password_features_cc.inc" + } // namespace password_manager::features diff --git a/components/permissions/features.cc b/components/permissions/features.cc --- a/components/permissions/features.cc +++ b/components/permissions/features.cc -@@ -139,6 +139,7 @@ BASE_FEATURE(kCpssQuietChipTextUpdate, +@@ -149,6 +149,7 @@ BASE_FEATURE(kCpssQuietChipTextUpdate, "CpssQuietChipTextUpdate", base::FEATURE_DISABLED_BY_DEFAULT); @@ -1346,7 +1399,7 @@ diff --git a/components/version_ui/version_handler_helper.cc b/components/versio diff --git a/content/common/features.cc b/content/common/features.cc --- a/content/common/features.cc +++ b/content/common/features.cc -@@ -596,4 +596,5 @@ BASE_FEATURE(kWindowOpenFileSelectFix, +@@ -579,4 +579,5 @@ BASE_FEATURE(kWindowOpenFileSelectFix, // Please keep features in alphabetical order. @@ -1355,7 +1408,7 @@ diff --git a/content/common/features.cc b/content/common/features.cc diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc --- a/content/public/common/content_features.cc +++ b/content/public/common/content_features.cc -@@ -1389,4 +1389,5 @@ bool IsVideoCaptureServiceEnabledForBrowserProcess() { +@@ -1295,4 +1295,5 @@ bool IsVideoCaptureServiceEnabledForBrowserProcess() { VideoCaptureServiceConfiguration::kEnabledForBrowserProcess; } @@ -1364,7 +1417,7 @@ diff --git a/content/public/common/content_features.cc b/content/public/common/c diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h --- a/content/public/common/content_features.h +++ b/content/public/common/content_features.h -@@ -332,6 +332,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebRtcPipeWireCapturer); +@@ -286,6 +286,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebRtcPipeWireCapturer); CONTENT_EXPORT bool IsVideoCaptureServiceEnabledForOutOfProcess(); CONTENT_EXPORT bool IsVideoCaptureServiceEnabledForBrowserProcess(); @@ -1376,7 +1429,7 @@ diff --git a/cromite_flags/BUILD.gn b/cromite_flags/BUILD.gn new file mode 100755 --- /dev/null +++ b/cromite_flags/BUILD.gn -@@ -0,0 +1,150 @@ +@@ -0,0 +1,168 @@ +# This file is part of Bromite. + +# Bromite is free software: you can redistribute it and/or modify @@ -1502,6 +1555,21 @@ new file mode 100755 + output_file = "services_network_public_cpp_features_h.inc" +} + ++cpp_bromite_include("ui_base_features_cc") { ++ inputs = [ "//cromite_flags/ui/base/features_cc/placeholder.txt" ] ++ output_file = "ui_base_features_cc.inc" ++} ++ ++cpp_bromite_include("ui_base_features_h") { ++ inputs = [ "//cromite_flags/ui/base/features_h/placeholder.txt" ] ++ output_file = "ui_base_features_h.inc" ++} ++ ++cpp_bromite_include("components_password_manager_core_browser_features_password_features_cc") { ++ inputs = [ "//cromite_flags/components/password_manager/core/browser/features/password_features_cc/placeholder.txt" ] ++ output_file = "components_password_manager_core_browser_features_password_features_cc.inc" ++} ++ +component("cromite_flags") { + deps = [ + ":content_common_features_cc", @@ -1511,6 +1579,7 @@ new file mode 100755 + ":components_permissions_features_cc", + ":components_offline_pages_core_offline_page_feature_cc", + ":components_offline_pages_core_offline_page_feature_h", ++ ":components_password_manager_core_browser_features_password_features_cc", + ":media_base_media_switches_cc", + ":media_base_media_switches_h", + ":net_base_features_cc", @@ -1525,6 +1594,8 @@ new file mode 100755 + ":services_network_public_cpp_features_h", + ":third_party_blink_common_features_cc", + ":third_party_blink_common_features_h", ++ ":ui_base_features_cc", ++ ":ui_base_features_h", + ] +} diff --git a/cromite_flags/chrome/browser/about_flags_cc/placeholder.txt b/cromite_flags/chrome/browser/about_flags_cc/placeholder.txt @@ -1587,6 +1658,12 @@ new file mode 100755 +++ b/cromite_flags/components/offline_pages/core/offline_page_feature_h/placeholder.txt @@ -0,0 +1 @@ +this file is intentionally empty +diff --git a/cromite_flags/components/password_manager/core/browser/features/password_features_cc/placeholder.txt b/cromite_flags/components/password_manager/core/browser/features/password_features_cc/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/components/password_manager/core/browser/features/password_features_cc/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty diff --git a/cromite_flags/components/permissions/features_cc/placeholder.txt b/cromite_flags/components/permissions/features_cc/placeholder.txt new file mode 100755 --- /dev/null @@ -1659,10 +1736,22 @@ new file mode 100755 +++ b/cromite_flags/third_party/blink/common/features_h/placeholder.txt @@ -0,0 +1 @@ +this file is intentionally empty +diff --git a/cromite_flags/ui/base/features_cc/placeholder.txt b/cromite_flags/ui/base/features_cc/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/ui/base/features_cc/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty +diff --git a/cromite_flags/ui/base/features_h/placeholder.txt b/cromite_flags/ui/base/features_h/placeholder.txt +new file mode 100755 +--- /dev/null ++++ b/cromite_flags/ui/base/features_h/placeholder.txt +@@ -0,0 +1 @@ ++this file is intentionally empty 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 -@@ -1860,5 +1860,5 @@ uint32_t GetPassthroughAudioFormats() { +@@ -1904,5 +1904,5 @@ uint32_t GetPassthroughAudioFormats() { return 0; #endif // BUILDFLAG(ENABLE_PASSTHROUGH_AUDIO_CODECS) } @@ -1672,7 +1761,7 @@ diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc diff --git a/media/base/media_switches.h b/media/base/media_switches.h --- a/media/base/media_switches.h +++ b/media/base/media_switches.h -@@ -547,5 +547,5 @@ MEDIA_EXPORT bool IsOutOfProcessVideoDecodingEnabled(); +@@ -576,5 +576,5 @@ MEDIA_EXPORT OOPVDMode GetOutOfProcessVideoDecodingMode(); MEDIA_EXPORT uint32_t GetPassthroughAudioFormats(); } // namespace media @@ -1682,8 +1771,8 @@ diff --git a/media/base/media_switches.h b/media/base/media_switches.h diff --git a/net/base/features.cc b/net/base/features.cc --- a/net/base/features.cc +++ b/net/base/features.cc -@@ -535,4 +535,5 @@ BASE_FEATURE(kTruncateBodyToContentLength, - "TruncateBodyToContentLength", +@@ -550,4 +550,5 @@ BASE_FEATURE(kSpdySessionForProxyAdditionalChecks, + "SpdySessionForProxyAdditionalChecks", base::FEATURE_ENABLED_BY_DEFAULT); +#include "cromite_flags/net_base_features_cc.inc" @@ -1691,9 +1780,9 @@ diff --git a/net/base/features.cc b/net/base/features.cc diff --git a/net/base/features.h b/net/base/features.h --- a/net/base/features.h +++ b/net/base/features.h -@@ -523,6 +523,7 @@ NET_EXPORT BASE_DECLARE_FEATURE(kTreatHTTPExpiresHeaderValueZeroAsExpired); - // Enables truncating the response body to the content length. - NET_EXPORT BASE_DECLARE_FEATURE(kTruncateBodyToContentLength); +@@ -522,6 +522,7 @@ NET_EXPORT BASE_DECLARE_FEATURE(kStorageAccessHeaders); + // not causing any problems. + NET_EXPORT BASE_DECLARE_FEATURE(kSpdySessionForProxyAdditionalChecks); +#include "cromite_flags/net_base_features_h.inc" } // namespace net::features @@ -1702,28 +1791,28 @@ diff --git a/net/base/features.h b/net/base/features.h diff --git a/services/network/public/cpp/features.cc b/services/network/public/cpp/features.cc --- a/services/network/public/cpp/features.cc +++ b/services/network/public/cpp/features.cc -@@ -467,4 +467,5 @@ const base::FeatureParam kSkipTpcdMitigationsForAdsTopLevelTrial{ - /*name=*/"SkipTpcdMitigationsForAdsTopLevelTrial", - /*default_value=*/false}; +@@ -518,4 +518,5 @@ const base::FeatureParam kNetworkContextPrefetchMaxLoaders{ + &kNetworkContextPrefetch, + /*name=*/"max_loaders", /*default_value=*/10}; +#include "cromite_flags/services_network_public_cpp_features_cc.inc" } // namespace network::features diff --git a/services/network/public/cpp/features.h b/services/network/public/cpp/features.h --- a/services/network/public/cpp/features.h +++ b/services/network/public/cpp/features.h -@@ -187,6 +187,7 @@ extern const base::FeatureParam kSkipTpcdMitigationsForAdsTrial; +@@ -212,6 +212,7 @@ BASE_DECLARE_FEATURE(kNetworkContextPrefetch); COMPONENT_EXPORT(NETWORK_CPP) - extern const base::FeatureParam kSkipTpcdMitigationsForAdsTopLevelTrial; + extern const base::FeatureParam kNetworkContextPrefetchMaxLoaders; +#include "cromite_flags/services_network_public_cpp_features_h.inc" - } // namespace features - } // namespace network + } // namespace network::features + #endif // SERVICES_NETWORK_PUBLIC_CPP_FEATURES_H_ diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc --- a/third_party/blink/common/features.cc +++ b/third_party/blink/common/features.cc -@@ -2546,5 +2546,6 @@ BASE_FEATURE(kSimplifyLoadingTransparentPlaceholderImage, - "SimplifyLoadingTransparentPlaceholderImage", +@@ -2678,5 +2678,6 @@ BASE_FEATURE(kOptimizeLoadingDataUrls, + "OptimizeLoadingDataUrls", base::FEATURE_DISABLED_BY_DEFAULT); +#include "cromite_flags/third_party_blink_common_features_cc.inc" @@ -1732,12 +1821,32 @@ diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/fea diff --git a/third_party/blink/public/common/features.h b/third_party/blink/public/common/features.h --- a/third_party/blink/public/common/features.h +++ b/third_party/blink/public/common/features.h -@@ -1638,6 +1638,7 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kInteractiveDetectorIgnoreFcp); - BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE( - kSimplifyLoadingTransparentPlaceholderImage); +@@ -1747,6 +1747,7 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kRenderSizeInScoreAdBrowserSignals); + // Optimize loading data: URLs. + BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kOptimizeLoadingDataUrls); +#include "cromite_flags/third_party_blink_common_features_h.inc" } // namespace features } // namespace blink +diff --git a/ui/base/ui_base_features.cc b/ui/base/ui_base_features.cc +--- a/ui/base/ui_base_features.cc ++++ b/ui/base/ui_base_features.cc +@@ -529,4 +529,5 @@ BASE_FEATURE(kEnableGestureBeginEndTypes, + "EnableGestureBeginEndTypes", + base::FEATURE_DISABLED_BY_DEFAULT); + ++#include "cromite_flags/ui_base_features_cc.inc" + } // namespace features +diff --git a/ui/base/ui_base_features.h b/ui/base/ui_base_features.h +--- a/ui/base/ui_base_features.h ++++ b/ui/base/ui_base_features.h +@@ -247,6 +247,7 @@ BASE_DECLARE_FEATURE(kBubbleFrameViewTitleIsHeading); + COMPONENT_EXPORT(UI_BASE_FEATURES) + BASE_DECLARE_FEATURE(kEnableGestureBeginEndTypes); + ++#include "cromite_flags/ui_base_features_h.inc" + } // namespace features + + #endif // UI_BASE_UI_BASE_FEATURES_H_ -- diff --git a/build/cromite_patches/Add-custom-tab-intents-privacy-option.patch b/build/cromite_patches/Add-custom-tab-intents-privacy-option.patch index 4aaca446..052e21d3 100644 --- a/build/cromite_patches/Add-custom-tab-intents-privacy-option.patch +++ b/build/cromite_patches/Add-custom-tab-intents-privacy-option.patch @@ -26,7 +26,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml --- a/chrome/android/java/res/xml/privacy_preferences.xml +++ b/chrome/android/java/res/xml/privacy_preferences.xml -@@ -43,6 +43,16 @@ found in the LICENSE file. +@@ -59,6 +59,16 @@ found in the LICENSE file. android:key="do_not_track" android:title="@string/do_not_track_title" android:fragment="org.chromium.chrome.browser.privacy.settings.DoNotTrackSettings" /> @@ -46,7 +46,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/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 -@@ -55,6 +55,9 @@ import java.lang.annotation.Retention; +@@ -52,6 +52,9 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.Set; @@ -56,7 +56,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDis /** * Dispatches incoming intents to the appropriate activity based on the current configuration and * Intent fired. -@@ -244,6 +247,9 @@ public class LaunchIntentDispatcher { +@@ -239,6 +242,9 @@ public class LaunchIntentDispatcher { */ public static boolean isCustomTabIntent(Intent intent) { if (intent == null) return false; @@ -66,7 +66,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDis Log.w( TAG, "CustomTabsIntent#shouldAlwaysUseBrowserUI() = " -@@ -265,6 +271,10 @@ public class LaunchIntentDispatcher { +@@ -260,6 +266,10 @@ public class LaunchIntentDispatcher { newIntent.setData(uri); newIntent.setClassName(context, CustomTabActivity.class.getName()); @@ -77,7 +77,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDis // Since configureIntentForResizableCustomTab() might change the componenet/class // associated with the passed intent, it needs to be called after #setClassName(context, // CustomTabActivity.class.getName()); -@@ -410,6 +420,17 @@ public class LaunchIntentDispatcher { +@@ -407,6 +417,17 @@ public class LaunchIntentDispatcher { if (Intent.ACTION_VIEW.equals(newIntent.getAction()) && !IntentHandler.wasIntentSenderChrome(newIntent)) { @@ -98,7 +98,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDis diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java -@@ -850,6 +850,7 @@ public class CustomTabsConnection { +@@ -867,6 +867,7 @@ public class CustomTabsConnection { PostTask.postTask( TaskTraits.UI_DEFAULT, () -> { @@ -109,7 +109,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/IncognitoCustomTabIntentDataProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/IncognitoCustomTabIntentDataProvider.java --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/IncognitoCustomTabIntentDataProvider.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/IncognitoCustomTabIntentDataProvider.java -@@ -38,6 +38,9 @@ import org.chromium.components.browser_ui.widget.TintedDrawable; +@@ -40,6 +40,9 @@ import org.chromium.components.browser_ui.widget.TintedDrawable; import java.util.ArrayList; import java.util.List; @@ -117,9 +117,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Inco +import org.chromium.chrome.browser.privacy.settings.PrivacySettings; + /** - * A model class that parses the incoming intent for incognito Custom Tabs specific customization - * data. -@@ -115,6 +118,9 @@ public class IncognitoCustomTabIntentDataProvider extends BrowserServicesIntentD + * A model class that parses the incoming intent for incognito and ephemeral Custom Tabs specific + * customization data. +@@ -130,6 +133,9 @@ public class IncognitoCustomTabIntentDataProvider extends BrowserServicesIntentD } private static boolean isIntentFromThirdPartyAllowed() { @@ -132,9 +132,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Inco 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 -@@ -96,6 +96,9 @@ public class PrivacySettings extends ChromeBaseSettingsFragment - private ManagedPreferenceDelegate mManagedPreferenceDelegate; +@@ -101,6 +101,9 @@ public class PrivacySettings extends ChromeBaseSettingsFragment private IncognitoLockSettings mIncognitoLockSettings; + private SettingsLauncher mSettingsLauncher; + private ChromeSwitchPreference allowCustomTabIntentsPref; + private ChromeSwitchPreference openExternalLinksPref; @@ -142,7 +142,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting @Override public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { getActivity().setTitle(R.string.prefs_privacy_security); -@@ -274,6 +277,9 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -319,6 +322,9 @@ public class PrivacySettings extends ChromeBaseSettingsFragment new SpanApplier.SpanInfo("", "", servicesLink)); } @@ -152,7 +152,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting @Override public boolean onPreferenceChange(Preference preference, Object newValue) { String key = preference.getKey(); -@@ -290,6 +296,14 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -335,6 +341,14 @@ public class PrivacySettings extends ChromeBaseSettingsFragment } else if (PREF_SEARCH_SUGGESTIONS.equals(key)) { UserPrefs.get(getProfile()) .setBoolean(Pref.SEARCH_SUGGEST_ENABLED, (boolean) newValue); @@ -167,7 +167,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting } return true; } -@@ -312,6 +326,16 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -357,6 +371,16 @@ public class PrivacySettings extends ChromeBaseSettingsFragment UserPrefs.get(getProfile()).getBoolean(Pref.CAN_MAKE_PAYMENT_ENABLED)); } @@ -203,7 +203,7 @@ diff --git a/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/TabAsso diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd -@@ -5152,6 +5152,20 @@ To change this setting, BEGIN_LINKclear the Chrome da +@@ -5454,6 +5454,20 @@ To change this setting, BEGIN_LINKdelete the Chrome d Resume diff --git a/build/cromite_patches/Add-exit-menu-item.patch b/build/cromite_patches/Add-exit-menu-item.patch index c270af0b..7b4f857a 100644 --- a/build/cromite_patches/Add-exit-menu-item.patch +++ b/build/cromite_patches/Add-exit-menu-item.patch @@ -10,14 +10,13 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../org/chromium/chrome/browser/ApplicationLifetime.java | 2 ++ .../org/chromium/chrome/browser/ChromeTabbedActivity.java | 4 ++++ .../src/org/chromium/chrome/browser/app/ChromeActivity.java | 6 ++++++ - .../chrome/browser/init/ChromeLifetimeController.java | 6 +++++- .../browser/ui/android/strings/android_chrome_strings.grd | 3 +++ - 6 files changed, 26 insertions(+), 1 deletion(-) + 5 files changed, 21 insertions(+) diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/res/menu/main_menu.xml --- a/chrome/android/java/res/menu/main_menu.xml +++ b/chrome/android/java/res/menu/main_menu.xml -@@ -166,6 +166,9 @@ found in the LICENSE file. +@@ -160,6 +160,9 @@ found in the LICENSE file. @@ -27,7 +26,7 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re -@@ -192,6 +195,9 @@ found in the LICENSE file. +@@ -186,6 +189,9 @@ found in the LICENSE file. @@ -59,8 +58,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ApplicationLife diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java -@@ -267,6 +267,8 @@ import java.util.concurrent.atomic.AtomicBoolean; - import java.util.function.BooleanSupplier; +@@ -268,6 +268,8 @@ import java.util.Set; + import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.DoubleConsumer; +import org.chromium.chrome.browser.ApplicationLifetime; @@ -68,9 +67,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct /** * This is the main activity for ChromeMobile when not running in document mode. All the tabs are * accessible via a chrome specific tab switching UI. -@@ -2925,6 +2927,8 @@ public class ChromeTabbedActivity extends ChromeActivity +@@ -2597,6 +2598,11 @@ public abstract class ChromeActivity return true; } @@ -100,26 +99,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv if (id == R.id.update_menu_id) { UpdateMenuItemHelper.getInstance( getProfileProviderSupplier().get().getOriginalProfile()) -diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLifetimeController.java b/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLifetimeController.java ---- a/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLifetimeController.java -+++ b/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLifetimeController.java -@@ -81,7 +81,11 @@ class ChromeLifetimeController - - // Kick off a timer to kill the process after a delay, which fires only if the Activities - // take too long to be finished. -- mHandler.postDelayed(mRestartRunnable, WATCHDOG_DELAY_MS); -+ if (restart) { -+ mHandler.postDelayed(mRestartRunnable, WATCHDOG_DELAY_MS); -+ } else { -+ fireBrowserRestartActivityIntent(); -+ } - } - - @Override 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 -@@ -3745,6 +3745,9 @@ To change this setting, BEGIN_LINKclear the Chrome da +@@ -4063,6 +4063,9 @@ To change this setting, BEGIN_LINKdelete the Chrome d Dark theme diff --git a/build/cromite_patches/Add-flag-for-omnibox-autocomplete-filtering.patch b/build/cromite_patches/Add-flag-for-omnibox-autocomplete-filtering.patch index be3279b5..3f1f7ecc 100644 --- a/build/cromite_patches/Add-flag-for-omnibox-autocomplete-filtering.patch +++ b/build/cromite_patches/Add-flag-for-omnibox-autocomplete-filtering.patch @@ -26,7 +26,7 @@ diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/ #include "base/feature_list.h" #include "base/format_macros.h" #include "base/functional/bind.h" -@@ -392,6 +393,15 @@ AutocompleteController::AutocompleteController( +@@ -500,6 +501,15 @@ AutocompleteController::AutocompleteController( provider_client_->GetOmniboxTriggeredFeatureService()), steady_state_omnibox_position_( metrics::OmniboxEventProto::UNKNOWN_POSITION) { @@ -45,7 +45,7 @@ diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/ diff --git a/components/omnibox/browser/history_url_provider.cc b/components/omnibox/browser/history_url_provider.cc --- a/components/omnibox/browser/history_url_provider.cc +++ b/components/omnibox/browser/history_url_provider.cc -@@ -479,6 +479,9 @@ void HistoryURLProvider::Start(const AutocompleteInput& input, +@@ -487,6 +487,9 @@ void HistoryURLProvider::Start(const AutocompleteInput& input, if (fixed_up_input.type() != metrics::OmniboxInputType::QUERY) matches_.push_back(what_you_typed_match); @@ -66,7 +66,7 @@ diff --git a/components/omnibox/browser/search_provider.cc b/components/omnibox/ #include "base/functional/callback.h" #include "base/i18n/break_iterator.h" #include "base/i18n/case_conversion.h" -@@ -644,6 +645,9 @@ void SearchProvider::Run(bool query_is_private) { +@@ -647,6 +648,9 @@ void SearchProvider::Run(bool query_is_private) { } void SearchProvider::DoHistoryQuery(bool minimal_changes) { @@ -79,8 +79,8 @@ diff --git a/components/omnibox/browser/search_provider.cc b/components/omnibox/ 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 -@@ -7,6 +7,8 @@ - #include +@@ -9,6 +9,8 @@ + #include #include "base/check_op.h" +#include "base/containers/contains.h" @@ -88,7 +88,7 @@ diff --git a/components/url_formatter/url_fixer.cc b/components/url_formatter/ur #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/i18n/char_iterator.h" -@@ -621,6 +623,8 @@ GURL FixupURLInternal(const std::string& text, +@@ -620,6 +622,8 @@ GURL FixupURLInternal(const std::string& text, FixupHost(trimmed, parts.host, parts.scheme.is_valid(), desired_tld, &url); if (chrome_url && !parts.host.is_valid()) diff --git a/build/cromite_patches/Add-flag-to-configure-maximum-connections-per-host.patch b/build/cromite_patches/Add-flag-to-configure-maximum-connections-per-host.patch index ad440cc8..dfceddc8 100644 --- a/build/cromite_patches/Add-flag-to-configure-maximum-connections-per-host.patch +++ b/build/cromite_patches/Add-flag-to-configure-maximum-connections-per-host.patch @@ -92,7 +92,7 @@ new file mode 100644 diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket_pool_manager.cc --- a/net/socket/client_socket_pool_manager.cc +++ b/net/socket/client_socket_pool_manager.cc -@@ -22,6 +22,10 @@ +@@ -26,6 +26,10 @@ #include "net/socket/client_socket_handle.h" #include "net/socket/client_socket_pool.h" #include "net/socket/connect_job.h" @@ -103,7 +103,7 @@ diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket #include "net/ssl/ssl_config.h" #include "url/gurl.h" #include "url/scheme_host_port.h" -@@ -168,6 +172,19 @@ void ClientSocketPoolManager::set_max_sockets_per_pool( +@@ -172,6 +176,19 @@ void ClientSocketPoolManager::set_max_sockets_per_pool( int ClientSocketPoolManager::max_sockets_per_group( HttpNetworkSession::SocketPoolType pool_type) { DCHECK_LT(pool_type, HttpNetworkSession::NUM_SOCKET_POOL_TYPES); diff --git a/build/cromite_patches/Add-flag-to-disable-IPv6-probes.patch b/build/cromite_patches/Add-flag-to-disable-IPv6-probes.patch index 7b1266f8..fd65a850 100644 --- a/build/cromite_patches/Add-flag-to-disable-IPv6-probes.patch +++ b/build/cromite_patches/Add-flag-to-disable-IPv6-probes.patch @@ -45,7 +45,7 @@ new file mode 100644 diff --git a/net/BUILD.gn b/net/BUILD.gn --- a/net/BUILD.gn +++ b/net/BUILD.gn -@@ -1030,6 +1030,7 @@ component("net") { +@@ -1047,6 +1047,7 @@ component("net") { "//build:chromeos_buildflags", "//components/miracle_parameter/common", "//net/http:transport_security_state_generated_files", @@ -64,7 +64,7 @@ diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc #include "net/log/net_log_with_source.h" #include "net/socket/client_socket_factory.h" #include "net/url_request/url_request_context.h" -@@ -1373,6 +1374,13 @@ int HostResolverManager::StartIPv6ReachabilityCheck( +@@ -1429,6 +1430,13 @@ int HostResolverManager::StartIPv6ReachabilityCheck( return OK; } diff --git a/build/cromite_patches/Add-flag-to-disable-vibration.patch b/build/cromite_patches/Add-flag-to-disable-vibration.patch index 2d34235a..9d4b7e34 100644 --- a/build/cromite_patches/Add-flag-to-disable-vibration.patch +++ b/build/cromite_patches/Add-flag-to-disable-vibration.patch @@ -104,7 +104,7 @@ diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.c diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -635,6 +635,10 @@ +@@ -672,6 +672,10 @@ status: {"Android": "stable"}, base_feature: "none", }, diff --git a/build/cromite_patches/Add-lifetime-options-for-permissions.patch b/build/cromite_patches/Add-lifetime-options-for-permissions.patch index bf0c088d..3c5ab86b 100644 --- a/build/cromite_patches/Add-lifetime-options-for-permissions.patch +++ b/build/cromite_patches/Add-lifetime-options-for-permissions.patch @@ -57,6 +57,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../one_time_permissions_tracker.h | 5 +- .../one_time_permissions_tracker_factory.cc | 2 +- .../permissions/embedded_permission_prompt.cc | 2 +- + ...exclusive_access_permission_prompt_view.cc | 2 +- .../permission_prompt_bubble_base_view.cc | 2 +- .../site_settings/PermissionInfo.java | 1 + .../site_settings/SingleWebsiteSettings.java | 9 ++ @@ -64,7 +65,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../strings/android/browser_ui_strings.grd | 5 ++ .../core/browser/content_settings_utils.cc | 36 ++++++++ .../core/browser/content_settings_utils.h | 6 ++ - .../common/content_settings_constraints.h | 9 ++ + .../core/common/content_settings_enums.mojom | 9 ++ .../page_info/PageInfoController.java | 4 +- .../PermissionParamsListBuilder.java | 13 ++- .../android/page_info_controller_android.cc | 10 ++- @@ -86,7 +87,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html components/permissions/permission_request.h | 16 +++- .../permissions/permission_request_manager.cc | 45 ++++++---- .../permissions/permission_request_manager.h | 11 ++- - 34 files changed, 488 insertions(+), 61 deletions(-) + 35 files changed, 489 insertions(+), 62 deletions(-) diff --git a/chrome/browser/permissions/last_tab_standing_tracker.cc b/chrome/browser/permissions/last_tab_standing_tracker.cc --- a/chrome/browser/permissions/last_tab_standing_tracker.cc @@ -106,12 +107,12 @@ diff --git a/chrome/browser/permissions/last_tab_standing_tracker.cc b/chrome/br + ContentSettingsType type) { + ContentSettingsForOneType session_settings = + content_settings->GetSettingsForOneType( -+ type, content_settings::SessionModel::UserSession); ++ type, content_settings::mojom::SessionModel::USER_SESSION); + + GURL url = origin.GetURL(); + for (ContentSettingPatternSource& entry : session_settings) { + if (content_settings::IsConstraintSessionExpiration(entry, -+ content_settings::LifetimeMode::UntilOriginClosed) && ++ content_settings::mojom::LifetimeMode::UNTIL_ORIGIN_CLOSED) && + entry.primary_pattern.Matches(url)) { + content_settings->SetWebsiteSettingCustomScope( + entry.primary_pattern, entry.secondary_pattern, @@ -153,12 +154,12 @@ diff --git a/chrome/browser/permissions/one_time_permissions_tracker.cc b/chrome + ContentSettingsType type) { + ContentSettingsForOneType session_settings = + content_settings->GetSettingsForOneType( -+ type, content_settings::SessionModel::UserSession); ++ type, content_settings::mojom::SessionModel::USER_SESSION); + + GURL url = origin.GetURL(); + for (ContentSettingPatternSource& entry : session_settings) { + if (content_settings::IsConstraintSessionExpiration(entry, -+ content_settings::LifetimeMode::UntilOriginClosed) && ++ content_settings::mojom::LifetimeMode::UNTIL_ORIGIN_CLOSED) && + entry.primary_pattern.Matches(url)) { + content_settings->SetWebsiteSettingCustomScope( + entry.primary_pattern, entry.secondary_pattern, @@ -228,24 +229,36 @@ diff --git a/chrome/browser/permissions/one_time_permissions_tracker_factory.cc diff --git a/chrome/browser/ui/views/permissions/embedded_permission_prompt.cc b/chrome/browser/ui/views/permissions/embedded_permission_prompt.cc --- a/chrome/browser/ui/views/permissions/embedded_permission_prompt.cc +++ b/chrome/browser/ui/views/permissions/embedded_permission_prompt.cc -@@ -237,7 +237,7 @@ void EmbeddedPermissionPrompt::Allow() { - } - - void EmbeddedPermissionPrompt::AllowThisTime() { -- delegate_->AcceptThisTime(); -+ delegate_->AcceptThisTime(content_settings::LifetimeMode::OnlyThisTime); - CloseCurrentViewAndMaybeShowNext(/*first_prompt=*/false); - } - +@@ -658,7 +658,7 @@ void EmbeddedPermissionPrompt::SendDelegateAction(Action action) { + delegate_->Accept(); + break; + case Action::kAllowThisTime: +- delegate_->AcceptThisTime(); ++ delegate_->AcceptThisTime(content_settings::mojom::LifetimeMode::ONLY_THIS_TIME); + break; + case Action::kDeny: + delegate_->Deny(); +diff --git a/chrome/browser/ui/views/permissions/exclusive_access_permission_prompt_view.cc b/chrome/browser/ui/views/permissions/exclusive_access_permission_prompt_view.cc +--- a/chrome/browser/ui/views/permissions/exclusive_access_permission_prompt_view.cc ++++ b/chrome/browser/ui/views/permissions/exclusive_access_permission_prompt_view.cc +@@ -99,7 +99,7 @@ void ExclusiveAccessPermissionPromptView::RunButtonCallback(int button_id) { + } + ButtonType button = GetButtonType(button_id); + if (button == ButtonType::kAllowThisTime) { +- delegate_->AcceptThisTime(); ++ delegate_->AcceptThisTime(content_settings::mojom::LifetimeMode::ONLY_THIS_TIME); + } else if (button == ButtonType::kAlwaysAllow) { + delegate_->Accept(); + } else if (button == ButtonType::kNeverAllow) { diff --git a/chrome/browser/ui/views/permissions/permission_prompt_bubble_base_view.cc b/chrome/browser/ui/views/permissions/permission_prompt_bubble_base_view.cc --- a/chrome/browser/ui/views/permissions/permission_prompt_bubble_base_view.cc +++ b/chrome/browser/ui/views/permissions/permission_prompt_bubble_base_view.cc -@@ -267,7 +267,7 @@ void PermissionPromptBubbleBaseView::RunButtonCallback(int button_id) { +@@ -241,7 +241,7 @@ void PermissionPromptBubbleBaseView::RunButtonCallback(int button_id) { delegate_->Accept(); return; case PermissionDialogButton::kAcceptOnce: - delegate_->AcceptThisTime(); -+ delegate_->AcceptThisTime(content_settings::LifetimeMode::OnlyThisTime); ++ delegate_->AcceptThisTime(content_settings::mojom::LifetimeMode::ONLY_THIS_TIME); return; case PermissionDialogButton::kDeny: delegate_->Deny(); @@ -263,7 +276,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java -@@ -559,6 +559,11 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -561,6 +561,11 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment } } @@ -275,9 +288,9 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c private void setUpClearDataPreference() { ClearWebsiteStorage preference = findPreference(PREF_CLEAR_DATA); long usage = mSite.getTotalUsage(); -@@ -1070,6 +1075,10 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment - if (contentType == mHighlightedPermission) { - switchPreference.setBackgroundColor(mHighlightColor); +@@ -1091,6 +1096,10 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment + AppCompatResources.getColorStateList(getContext(), mHighlightColor) + .getDefaultColor()); } + if (isSessionPermission(contentType)) { + switchPreference.setSummary(switchPreference.getSummary() + " " + @@ -289,7 +302,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c diff --git a/components/browser_ui/site_settings/android/website_preference_bridge.cc b/components/browser_ui/site_settings/android/website_preference_bridge.cc --- a/components/browser_ui/site_settings/android/website_preference_bridge.cc +++ b/components/browser_ui/site_settings/android/website_preference_bridge.cc -@@ -198,7 +198,7 @@ void GetOrigins(JNIEnv* env, +@@ -199,7 +199,7 @@ void GetOrigins(JNIEnv* env, seen_origins.push_back(origin); insertionFunc(env, static_cast(content_type), list, ConvertOriginToJavaString(env, origin), jembedder, @@ -301,7 +314,7 @@ diff --git a/components/browser_ui/site_settings/android/website_preference_brid diff --git a/components/browser_ui/strings/android/browser_ui_strings.grd b/components/browser_ui/strings/android/browser_ui_strings.grd --- a/components/browser_ui/strings/android/browser_ui_strings.grd +++ b/components/browser_ui/strings/android/browser_ui_strings.grd -@@ -673,6 +673,11 @@ +@@ -651,6 +651,11 @@ URL truncated @@ -316,41 +329,41 @@ diff --git a/components/browser_ui/strings/android/browser_ui_strings.grd b/comp diff --git a/components/content_settings/core/browser/content_settings_utils.cc b/components/content_settings/core/browser/content_settings_utils.cc --- a/components/content_settings/core/browser/content_settings_utils.cc +++ b/components/content_settings/core/browser/content_settings_utils.cc -@@ -174,6 +174,42 @@ bool IsConstraintPersistent(const ContentSettingConstraints& constraints) { - return constraints.session_model() == SessionModel::Durable; +@@ -155,6 +155,42 @@ bool IsConstraintPersistent(const ContentSettingConstraints& constraints) { + return constraints.session_model() == mojom::SessionModel::DURABLE; } -+ContentSettingConstraints GetConstraintSessionExpiration(LifetimeMode lifetime_mode) { ++ContentSettingConstraints GetConstraintSessionExpiration(content_settings::mojom::LifetimeMode lifetime_mode) { + int lifetime; + base::Time now; -+ if (lifetime_mode == LifetimeMode::OnlyThisTime) { ++ if (lifetime_mode == content_settings::mojom::LifetimeMode::ONLY_THIS_TIME) { + // note: this content settings will be discarded immediately + // 1h is used as a magic constant to identify the one-time lifetime mode + lifetime = 1; -+ } else if (lifetime_mode == LifetimeMode::UntilOriginClosed) { ++ } else if (lifetime_mode == content_settings::mojom::LifetimeMode::UNTIL_ORIGIN_CLOSED) { + now = base::Time::Now(); + lifetime = 24; + } else { + lifetime = 0; + } -+ content_settings::ContentSettingConstraints c(now); ++ ContentSettingConstraints c(now); + c.set_lifetime(base::Hours(lifetime)); -+ c.set_session_model(content_settings::SessionModel::UserSession); ++ c.set_session_model(mojom::SessionModel::USER_SESSION); + return c; +} + +bool IsConstraintSessionExpiration(const ContentSettingPatternSource& source, -+ LifetimeMode lifetime_mode) { -+ if (source.metadata.session_model() != content_settings::SessionModel::UserSession) ++ content_settings::mojom::LifetimeMode lifetime_mode) { ++ if (source.metadata.session_model() != content_settings::mojom::SessionModel::USER_SESSION) + return false; + -+ LifetimeMode type; ++ mojom::LifetimeMode type; + if (source.metadata.lifetime() == base::Hours(24)) { -+ type = LifetimeMode::UntilOriginClosed; ++ type = content_settings::mojom::LifetimeMode::UNTIL_ORIGIN_CLOSED; + } else if (source.metadata.expiration() == (base::Time() + base::Hours(1))) { -+ type = LifetimeMode::OnlyThisTime; ++ type = content_settings::mojom::LifetimeMode::ONLY_THIS_TIME; + } else { -+ type = LifetimeMode::UntilBrowserClosed; ++ type = content_settings::mojom::LifetimeMode::UNTIL_BROWSER_CLOSED; + } + + return lifetime_mode == type; @@ -362,42 +375,42 @@ diff --git a/components/content_settings/core/browser/content_settings_utils.cc diff --git a/components/content_settings/core/browser/content_settings_utils.h b/components/content_settings/core/browser/content_settings_utils.h --- a/components/content_settings/core/browser/content_settings_utils.h +++ b/components/content_settings/core/browser/content_settings_utils.h -@@ -73,6 +73,12 @@ bool IsConstraintPersistent(const ContentSettingConstraints& constraints); +@@ -74,6 +74,12 @@ bool IsConstraintPersistent(const ContentSettingConstraints& constraints); // Returns whether the given type supports tracking last_visit timestamps. bool CanTrackLastVisit(ContentSettingsType type); -+ContentSettingConstraints GetConstraintSessionExpiration(LifetimeMode lifetime_mode); ++ContentSettingConstraints GetConstraintSessionExpiration(mojom::LifetimeMode lifetime_mode); + +bool IsConstraintSessionExpiration( + const ContentSettingPatternSource& source, -+ LifetimeMode lifetime_mode); ++ mojom::LifetimeMode lifetime_mode); + // Get a timestamp with week-precision. base::Time GetCoarseVisitedTime(base::Time time); -diff --git a/components/content_settings/core/common/content_settings_constraints.h b/components/content_settings/core/common/content_settings_constraints.h ---- a/components/content_settings/core/common/content_settings_constraints.h -+++ b/components/content_settings/core/common/content_settings_constraints.h -@@ -33,6 +33,15 @@ enum class SessionModel : int32_t { - kMaxValue = OneTime, +diff --git a/components/content_settings/core/common/content_settings_enums.mojom b/components/content_settings/core/common/content_settings_enums.mojom +--- a/components/content_settings/core/common/content_settings_enums.mojom ++++ b/components/content_settings/core/common/content_settings_enums.mojom +@@ -58,6 +58,15 @@ enum SessionModel { + ONE_TIME, }; +// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.components.content_settings +// GENERATED_JAVA_CLASS_NAME_OVERRIDE: LifetimeMode -+enum class LifetimeMode { -+ Always = 99, -+ OnlyThisTime = 1, -+ UntilOriginClosed = 2, -+ UntilBrowserClosed = 0, ++enum LifetimeMode { ++ ALWAYS = 99, ++ ONLY_THIS_TIME = 1, ++ UNTIL_ORIGIN_CLOSED = 2, ++ UNTIL_BROWSER_CLOSED = 0, +}; + - // Constraints to be applied when setting a content setting. - class ContentSettingConstraints { - public: + // Identifies the content settings provider of a content setting. + // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.components.content_settings + // GENERATED_JAVA_CLASS_NAME_OVERRIDE: ProviderType diff --git a/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoController.java b/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoController.java --- a/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoController.java +++ b/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoController.java -@@ -378,9 +378,9 @@ public class PageInfoController +@@ -421,9 +421,9 @@ public class PageInfoController String name, String nameMidSentence, int type, @@ -455,7 +468,7 @@ diff --git a/components/page_info/android/java/src/org/chromium/components/page_ diff --git a/components/page_info/android/page_info_controller_android.cc b/components/page_info/android/page_info_controller_android.cc --- a/components/page_info/android/page_info_controller_android.cc +++ b/components/page_info/android/page_info_controller_android.cc -@@ -154,6 +154,8 @@ void PageInfoControllerAndroid::SetPermissionInfo( +@@ -153,6 +153,8 @@ void PageInfoControllerAndroid::SetPermissionInfo( std::map user_specified_settings_to_display; @@ -464,7 +477,7 @@ diff --git a/components/page_info/android/page_info_controller_android.cc b/comp for (const auto& permission : permission_info_list) { if (base::Contains(permissions_to_display, permission.type)) { -@@ -162,6 +164,8 @@ void PageInfoControllerAndroid::SetPermissionInfo( +@@ -161,6 +163,8 @@ void PageInfoControllerAndroid::SetPermissionInfo( if (setting_to_display) { user_specified_settings_to_display[permission.type] = *setting_to_display; @@ -473,7 +486,7 @@ diff --git a/components/page_info/android/page_info_controller_android.cc b/comp } } } -@@ -178,7 +182,8 @@ void PageInfoControllerAndroid::SetPermissionInfo( +@@ -177,7 +181,8 @@ void PageInfoControllerAndroid::SetPermissionInfo( ConvertUTF16ToJavaString(env, setting_title), ConvertUTF16ToJavaString(env, setting_title_mid_sentence), static_cast(permission), @@ -483,7 +496,7 @@ diff --git a/components/page_info/android/page_info_controller_android.cc b/comp } } -@@ -191,7 +196,8 @@ void PageInfoControllerAndroid::SetPermissionInfo( +@@ -190,7 +195,8 @@ void PageInfoControllerAndroid::SetPermissionInfo( env, controller_jobject_, ConvertUTF16ToJavaString(env, object_title), ConvertUTF16ToJavaString(env, object_title), static_cast(chosen_object->ui_info->content_settings_type), @@ -496,20 +509,20 @@ diff --git a/components/page_info/android/page_info_controller_android.cc b/comp diff --git a/components/page_info/page_info.cc b/components/page_info/page_info.cc --- a/components/page_info/page_info.cc +++ b/components/page_info/page_info.cc -@@ -1163,6 +1163,8 @@ void PageInfo::PopulatePermissionInfo(PermissionInfo& permission_info, - permission_info.source = info.source; - permission_info.is_one_time = (info.metadata.session_model() == - content_settings::SessionModel::OneTime); +@@ -1171,6 +1171,8 @@ void PageInfo::PopulatePermissionInfo(PermissionInfo& permission_info, + permission_info.is_one_time = + (info.metadata.session_model() == + content_settings::mojom::SessionModel::ONE_TIME); + permission_info.is_user_session = -+ (info.metadata.session_model() == content_settings::SessionModel::UserSession); ++ (info.metadata.session_model() == content_settings::mojom::SessionModel::USER_SESSION); auto* page_specific_content_settings = GetPageSpecificContentSettings(); if (page_specific_content_settings && setting == CONTENT_SETTING_ALLOW) { diff --git a/components/page_info/page_info.h b/components/page_info/page_info.h --- a/components/page_info/page_info.h +++ b/components/page_info/page_info.h -@@ -199,6 +199,7 @@ class PageInfo : private content_settings::CookieControlsObserver { - content_settings::SETTING_SOURCE_NONE; +@@ -150,6 +150,7 @@ class PageInfo : private content_settings::CookieControlsObserver, + content_settings::SettingSource::kNone; // Whether the permission is a one-time grant. bool is_one_time = false; + bool is_user_session = false; @@ -527,8 +540,8 @@ diff --git a/components/permissions/android/java/src/org/chromium/components/per import java.util.ArrayList; import java.util.List; -@@ -57,6 +58,9 @@ public class PermissionDialogDelegate { - /** The {@link ContentSettingsType}s requested in this dialog. */ +@@ -60,6 +61,9 @@ public class PermissionDialogDelegate { + /** The {@link ContentSettingsType}s requested in this dialog. */ private int[] mContentSettingsTypes; + /** Lifetime option selected by the user. */ @@ -537,7 +550,7 @@ diff --git a/components/permissions/android/java/src/org/chromium/components/per /** * Defines a (potentially empty) list of ranges represented as pairs of , * which shall be used by the UI to format the specified ranges as bold text. -@@ -110,6 +114,15 @@ public class PermissionDialogDelegate { +@@ -117,6 +121,15 @@ public class PermissionDialogDelegate { .acceptThisTime(mNativeDelegatePtr, PermissionDialogDelegate.this); } @@ -575,7 +588,7 @@ diff --git a/components/permissions/android/java/src/org/chromium/components/per /** This class creates the model for the permission dialog. */ class PermissionDialogModelFactory { public static PropertyModel getModel( -@@ -60,6 +72,74 @@ class PermissionDialogModelFactory { +@@ -72,6 +84,74 @@ class PermissionDialogModelFactory { ModalDialogProperties.NEGATIVE_BUTTON_TEXT, delegate.getNegativeButtonText()); } @@ -654,7 +667,7 @@ diff --git a/components/permissions/android/java/src/org/chromium/components/per diff --git a/components/permissions/android/permission_prompt/permission_dialog_delegate.cc b/components/permissions/android/permission_prompt/permission_dialog_delegate.cc --- a/components/permissions/android/permission_prompt/permission_dialog_delegate.cc +++ b/components/permissions/android/permission_prompt/permission_dialog_delegate.cc -@@ -144,6 +144,11 @@ void PermissionDialogJavaDelegate::DismissDialog() { +@@ -159,6 +159,11 @@ void PermissionDialogJavaDelegate::DismissDialog() { Java_PermissionDialogDelegate_dismissFromNative(env, j_delegate_); } @@ -666,27 +679,27 @@ diff --git a/components/permissions/android/permission_prompt/permission_dialog_ // static void PermissionDialogDelegate::Create( content::WebContents* web_contents, -@@ -172,6 +177,13 @@ PermissionDialogDelegate* PermissionDialogDelegate::CreateForTesting( +@@ -187,6 +192,13 @@ PermissionDialogDelegate* PermissionDialogDelegate::CreateForTesting( void PermissionDialogDelegate::Accept(JNIEnv* env, const JavaParamRef& obj) { CHECK(permission_prompt_); -+ content_settings::LifetimeMode lifetimeOption = -+ static_cast( ++ content_settings::mojom::LifetimeMode lifetimeOption = ++ static_cast( + java_delegate_->GetSelectedLifetimeOption()); -+ if (lifetimeOption != content_settings::LifetimeMode::Always) { ++ if (lifetimeOption != content_settings::mojom::LifetimeMode::ALWAYS) { + permission_prompt_->AcceptThisTime(lifetimeOption); + return; + } permission_prompt_->Accept(); } -@@ -179,12 +191,22 @@ void PermissionDialogDelegate::AcceptThisTime( +@@ -194,12 +206,22 @@ void PermissionDialogDelegate::AcceptThisTime( JNIEnv* env, const JavaParamRef& obj) { CHECK(permission_prompt_); - permission_prompt_->AcceptThisTime(); -+ content_settings::LifetimeMode lifetimeOption = -+ static_cast( ++ content_settings::mojom::LifetimeMode lifetimeOption = ++ static_cast( + java_delegate_->GetSelectedLifetimeOption()); + permission_prompt_->AcceptThisTime(lifetimeOption); } @@ -694,10 +707,10 @@ diff --git a/components/permissions/android/permission_prompt/permission_dialog_ void PermissionDialogDelegate::Cancel(JNIEnv* env, const JavaParamRef& obj) { CHECK(permission_prompt_); -+ content_settings::LifetimeMode lifetimeOption = -+ static_cast( ++ content_settings::mojom::LifetimeMode lifetimeOption = ++ static_cast( + java_delegate_->GetSelectedLifetimeOption()); -+ if (lifetimeOption != content_settings::LifetimeMode::Always) { ++ if (lifetimeOption != content_settings::mojom::LifetimeMode::ALWAYS) { + permission_prompt_->DenyThisTime(lifetimeOption); + return; + } @@ -718,17 +731,17 @@ diff --git a/components/permissions/android/permission_prompt/permission_dialog_ diff --git a/components/permissions/android/permission_prompt/permission_prompt_android.cc b/components/permissions/android/permission_prompt/permission_prompt_android.cc --- a/components/permissions/android/permission_prompt/permission_prompt_android.cc +++ b/components/permissions/android/permission_prompt/permission_prompt_android.cc -@@ -53,8 +53,12 @@ void PermissionPromptAndroid::Accept() { +@@ -62,8 +62,12 @@ void PermissionPromptAndroid::Accept() { delegate_->Accept(); } -void PermissionPromptAndroid::AcceptThisTime() { - delegate_->AcceptThisTime(); -+void PermissionPromptAndroid::AcceptThisTime(content_settings::LifetimeMode lifetimeOption) { ++void PermissionPromptAndroid::AcceptThisTime(content_settings::mojom::LifetimeMode lifetimeOption) { + delegate_->AcceptThisTime(lifetimeOption); +} + -+void PermissionPromptAndroid::DenyThisTime(content_settings::LifetimeMode lifetimeOption) { ++void PermissionPromptAndroid::DenyThisTime(content_settings::mojom::LifetimeMode lifetimeOption) { + delegate_->DenyThisTime(lifetimeOption); } @@ -736,14 +749,14 @@ diff --git a/components/permissions/android/permission_prompt/permission_prompt_ diff --git a/components/permissions/android/permission_prompt/permission_prompt_android.h b/components/permissions/android/permission_prompt/permission_prompt_android.h --- a/components/permissions/android/permission_prompt/permission_prompt_android.h +++ b/components/permissions/android/permission_prompt/permission_prompt_android.h -@@ -44,8 +44,9 @@ class PermissionPromptAndroid : public PermissionPrompt { +@@ -47,8 +47,9 @@ class PermissionPromptAndroid : public PermissionPrompt { void Closing(); void Accept(); - void AcceptThisTime(); -+ void AcceptThisTime(content_settings::LifetimeMode lifetimeOption); ++ void AcceptThisTime(content_settings::mojom::LifetimeMode lifetimeOption); void Deny(); -+ void DenyThisTime(content_settings::LifetimeMode lifetimeOption); ++ void DenyThisTime(content_settings::mojom::LifetimeMode lifetimeOption); void SetManageClicked(); void SetLearnMoreClicked(); bool ShouldCurrentRequestUseQuietUI(); @@ -783,7 +796,7 @@ diff --git a/components/permissions/contexts/geolocation_permission_context_andr DCHECK(is_final_decision); + NotifyPermissionSetWithLifetime(id, requesting_origin, embedding_origin, + std::move(callback), persist, content_setting, is_one_time, is_final_decision, -+ content_settings::LifetimeMode::Always); ++ content_settings::mojom::LifetimeMode::ALWAYS); +} +void GeolocationPermissionContextAndroid::NotifyPermissionSetWithLifetime( @@ -794,7 +807,7 @@ diff --git a/components/permissions/contexts/geolocation_permission_context_andr + bool persist, + ContentSetting content_setting, + bool is_one_time, bool is_final_decision, -+ content_settings::LifetimeMode lifetime_option) { ++ content_settings::mojom::LifetimeMode lifetime_option) { bool is_default_search = IsRequestingOriginDSE(requesting_origin); if (content_setting == CONTENT_SETTING_ALLOW && !location_settings_->IsSystemLocationSettingEnabled()) { @@ -834,16 +847,16 @@ diff --git a/components/permissions/contexts/geolocation_permission_context_andr } content::PermissionResult -@@ -377,7 +392,7 @@ void GeolocationPermissionContextAndroid::OnLocationSettingsDialogShown( +@@ -381,7 +396,7 @@ void GeolocationPermissionContextAndroid::OnLocationSettingsDialogShown( const GURL& embedding_origin, bool persist, ContentSetting content_setting, - bool is_one_time, -+ bool is_one_time, content_settings::LifetimeMode lifetime_option, ++ bool is_one_time, content_settings::mojom::LifetimeMode lifetime_option, LocationSettingsDialogOutcome prompt_outcome) { bool is_default_search = IsRequestingOriginDSE(requesting_origin); if (prompt_outcome == GRANTED) { -@@ -396,7 +411,8 @@ void GeolocationPermissionContextAndroid::OnLocationSettingsDialogShown( +@@ -400,7 +415,8 @@ void GeolocationPermissionContextAndroid::OnLocationSettingsDialogShown( FinishNotifyPermissionSet(location_settings_dialog_request_id_, requesting_origin, embedding_origin, std::move(location_settings_dialog_callback_), @@ -853,13 +866,13 @@ diff --git a/components/permissions/contexts/geolocation_permission_context_andr location_settings_dialog_request_id_ = PermissionRequestID(content::GlobalRenderFrameHostId(0, 0), -@@ -410,10 +426,10 @@ void GeolocationPermissionContextAndroid::FinishNotifyPermissionSet( +@@ -414,10 +430,10 @@ void GeolocationPermissionContextAndroid::FinishNotifyPermissionSet( BrowserPermissionCallback callback, bool persist, ContentSetting content_setting, - bool is_one_time) { - GeolocationPermissionContext::NotifyPermissionSet( -+ bool is_one_time, content_settings::LifetimeMode lifetime_option) { ++ bool is_one_time, content_settings::mojom::LifetimeMode lifetime_option) { + GeolocationPermissionContext::NotifyPermissionSetWithLifetime( id, requesting_origin, embedding_origin, std::move(callback), persist, - content_setting, is_one_time, /*is_final_decision=*/true); @@ -882,25 +895,25 @@ diff --git a/components/permissions/contexts/geolocation_permission_context_andr + ContentSetting content_setting, + bool is_one_time, + bool is_final_decision, -+ content_settings::LifetimeMode lifetime_option) override; ++ content_settings::mojom::LifetimeMode lifetime_option) override; content::PermissionResult UpdatePermissionStatusWithDeviceStatus( content::PermissionResult result, const GURL& requesting_origin, -@@ -132,6 +141,7 @@ class GeolocationPermissionContextAndroid +@@ -133,6 +142,7 @@ class GeolocationPermissionContextAndroid bool persist, ContentSetting content_setting, bool is_one_time, -+ content_settings::LifetimeMode lifetime_option, ++ content_settings::mojom::LifetimeMode lifetime_option, LocationSettingsDialogOutcome prompt_outcome); void FinishNotifyPermissionSet(const PermissionRequestID& id, -@@ -140,7 +150,8 @@ class GeolocationPermissionContextAndroid +@@ -141,7 +151,8 @@ class GeolocationPermissionContextAndroid BrowserPermissionCallback callback, bool persist, ContentSetting content_setting, - bool is_one_time); + bool is_one_time, -+ content_settings::LifetimeMode lifetime_option); ++ content_settings::mojom::LifetimeMode lifetime_option); std::unique_ptr location_settings_; @@ -925,17 +938,17 @@ diff --git a/components/permissions/permission_context_base.cc b/components/perm content::PermissionResult PermissionContextBase::GetPermissionStatus( content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, -@@ -511,7 +522,8 @@ void PermissionContextBase::PermissionDecided(const PermissionRequestID& id, +@@ -501,7 +512,8 @@ void PermissionContextBase::PermissionDecided(const PermissionRequestID& id, const GURL& embedding_origin, ContentSetting content_setting, bool is_one_time, - bool is_final_decision) { + bool is_final_decision, -+ content_settings::LifetimeMode lifetime_option) { ++ content_settings::mojom::LifetimeMode lifetime_option) { DCHECK(content_setting == CONTENT_SETTING_ALLOW || content_setting == CONTENT_SETTING_BLOCK || content_setting == CONTENT_SETTING_DEFAULT); -@@ -526,13 +538,14 @@ void PermissionContextBase::PermissionDecided(const PermissionRequestID& id, +@@ -516,13 +528,14 @@ void PermissionContextBase::PermissionDecided(const PermissionRequestID& id, // missing if a permission prompt was preignored and we already notified an // origin about it. if (request->second.second) { @@ -954,14 +967,14 @@ diff --git a/components/permissions/permission_context_base.cc b/components/perm } } -@@ -578,11 +591,27 @@ void PermissionContextBase::NotifyPermissionSet( +@@ -590,11 +603,27 @@ void PermissionContextBase::NotifyPermissionSet( ContentSetting content_setting, bool is_one_time, bool is_final_decision) { + DCHECK(is_one_time == false); + NotifyPermissionSetWithLifetime(id, requesting_origin, embedding_origin, std::move(callback), + persist, content_setting, is_one_time, is_final_decision, -+ content_settings::LifetimeMode::Always); ++ content_settings::mojom::LifetimeMode::ALWAYS); +} + +void PermissionContextBase::NotifyPermissionSetWithLifetime( @@ -973,7 +986,7 @@ diff --git a/components/permissions/permission_context_base.cc b/components/perm + ContentSetting content_setting, + bool is_one_time, + bool is_final_decision, -+ content_settings::LifetimeMode lifetime_option) { ++ content_settings::mojom::LifetimeMode lifetime_option) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); if (persist) { @@ -983,35 +996,35 @@ diff --git a/components/permissions/permission_context_base.cc b/components/perm } if (is_final_decision) { -@@ -612,6 +641,15 @@ void PermissionContextBase::UpdateContentSetting(const GURL& requesting_origin, +@@ -634,6 +663,15 @@ void PermissionContextBase::UpdateContentSetting(const GURL& requesting_origin, const GURL& embedding_origin, ContentSetting content_setting, bool is_one_time) { + UpdateContentSetting(requesting_origin, embedding_origin, content_setting, -+ is_one_time, content_settings::LifetimeMode::Always); ++ is_one_time, content_settings::mojom::LifetimeMode::ALWAYS); +} + +void PermissionContextBase::UpdateContentSetting(const GURL& requesting_origin, + const GURL& embedding_origin, + ContentSetting content_setting, + bool is_one_time, -+ content_settings::LifetimeMode lifetime_option) { ++ content_settings::mojom::LifetimeMode lifetime_option) { DCHECK_EQ(requesting_origin, requesting_origin.DeprecatedGetOriginAsURL()); DCHECK_EQ(embedding_origin, embedding_origin.DeprecatedGetOriginAsURL()); DCHECK(content_setting == CONTENT_SETTING_ALLOW || -@@ -621,6 +659,8 @@ void PermissionContextBase::UpdateContentSetting(const GURL& requesting_origin, - constraints.set_session_model(is_one_time - ? content_settings::SessionModel::OneTime - : content_settings::SessionModel::Durable); +@@ -643,6 +681,8 @@ void PermissionContextBase::UpdateContentSetting(const GURL& requesting_origin, + constraints.set_session_model( + is_one_time ? content_settings::mojom::SessionModel::ONE_TIME + : content_settings::mojom::SessionModel::DURABLE); + if (is_one_time) + constraints = content_settings::GetConstraintSessionExpiration(lifetime_option); - #if !BUILDFLAG(IS_ANDROID) - // The Permissions module in Safety check will revoke permissions after + #if BUILDFLAG(IS_ANDROID) + if (base::FeatureList::IsEnabled( diff --git a/components/permissions/permission_context_base.h b/components/permissions/permission_context_base.h --- a/components/permissions/permission_context_base.h +++ b/components/permissions/permission_context_base.h -@@ -153,6 +153,15 @@ class PermissionContextBase : public content_settings::Observer { +@@ -163,6 +163,15 @@ class PermissionContextBase : public content_settings::Observer { // Updates stored content setting if persist is set, updates tab indicators // and runs the callback to finish the request. @@ -1023,11 +1036,11 @@ diff --git a/components/permissions/permission_context_base.h b/components/permi + ContentSetting content_setting, + bool is_one_time, + bool is_final_decision, -+ content_settings::LifetimeMode lifetime_option); ++ content_settings::mojom::LifetimeMode lifetime_option); virtual void NotifyPermissionSet(const PermissionRequestID& id, const GURL& requesting_origin, const GURL& embedding_origin, -@@ -174,6 +183,11 @@ class PermissionContextBase : public content_settings::Observer { +@@ -184,6 +193,11 @@ class PermissionContextBase : public content_settings::Observer { // Store the decided permission as a content setting. // virtual since the permission might be stored with different restrictions // (for example for desktop notifications). @@ -1035,11 +1048,11 @@ diff --git a/components/permissions/permission_context_base.h b/components/permi + const GURL& embedding_origin, + ContentSetting content_setting, + bool is_one_time, -+ content_settings::LifetimeMode lifetime_option); ++ content_settings::mojom::LifetimeMode lifetime_option); virtual void UpdateContentSetting(const GURL& requesting_origin, const GURL& embedding_origin, ContentSetting content_setting, -@@ -207,6 +221,12 @@ class PermissionContextBase : public content_settings::Observer { +@@ -217,6 +231,12 @@ class PermissionContextBase : public content_settings::Observer { // Implementors can override this method to avoid using automatic embargo. virtual bool UsesAutomaticEmbargo() const; @@ -1052,13 +1065,13 @@ diff --git a/components/permissions/permission_context_base.h b/components/permi base::ObserverList permission_observers_; // Set by subclasses to inform the base class that they will handle adding -@@ -229,7 +249,8 @@ class PermissionContextBase : public content_settings::Observer { +@@ -240,7 +260,8 @@ class PermissionContextBase : public content_settings::Observer { const GURL& embedding_origin, ContentSetting content_setting, bool is_one_time, - bool is_final_decision); + bool is_final_decision, -+ content_settings::LifetimeMode lifetime_option); ++ content_settings::mojom::LifetimeMode lifetime_option); void NotifyObservers(const ContentSettingsPattern& primary_pattern, const ContentSettingsPattern& secondary_pattern, @@ -1070,9 +1083,9 @@ diff --git a/components/permissions/permission_prompt.h b/components/permissions virtual void Accept() = 0; - virtual void AcceptThisTime() = 0; -+ virtual void AcceptThisTime(content_settings::LifetimeMode lifetime_option) = 0; ++ virtual void AcceptThisTime(content_settings::mojom::LifetimeMode lifetime_option) = 0; virtual void Deny() = 0; -+ virtual void DenyThisTime(content_settings::LifetimeMode lifetime_option) = 0; ++ virtual void DenyThisTime(content_settings::mojom::LifetimeMode lifetime_option) = 0; virtual void Dismiss() = 0; virtual void Ignore() = 0; @@ -1094,13 +1107,13 @@ diff --git a/components/permissions/permission_request.cc b/components/permissio PermissionRequest::~PermissionRequest() { DCHECK(delete_callback_.is_null()); } -@@ -357,19 +365,37 @@ bool PermissionRequest::ShouldUseTwoOriginPrompt() const { - permissions::features::kPermissionStorageAccessAPI); +@@ -370,19 +378,37 @@ bool PermissionRequest::ShouldUseTwoOriginPrompt() const { + return request_type() == RequestType::kStorageAccess; } -void PermissionRequest::PermissionGranted(bool is_one_time) { +void PermissionRequest::PermissionGranted(bool is_one_time, -+ content_settings::LifetimeMode lifetime_option) { ++ content_settings::mojom::LifetimeMode lifetime_option) { + if (permission_decided_callback_withlifetime_) { + std::move(permission_decided_callback_withlifetime_) + .Run(CONTENT_SETTING_ALLOW, is_one_time, /*is_final_decision=*/true, lifetime_option); @@ -1113,7 +1126,7 @@ diff --git a/components/permissions/permission_request.cc b/components/permissio -void PermissionRequest::PermissionDenied() { +void PermissionRequest::PermissionDenied(bool is_one_time, -+ content_settings::LifetimeMode lifetime_option) { ++ content_settings::mojom::LifetimeMode lifetime_option) { + if (permission_decided_callback_withlifetime_) { + std::move(permission_decided_callback_withlifetime_) + .Run(CONTENT_SETTING_BLOCK, is_one_time, /*is_final_decision=*/true, lifetime_option); @@ -1128,7 +1141,7 @@ diff --git a/components/permissions/permission_request.cc b/components/permissio + if (permission_decided_callback_withlifetime_) { + std::move(permission_decided_callback_withlifetime_) + .Run(CONTENT_SETTING_DEFAULT, false, is_final_decision, -+ content_settings::LifetimeMode::Always); ++ content_settings::mojom::LifetimeMode::ALWAYS); + return; + } if (permission_decided_callback_) { @@ -1144,7 +1157,7 @@ diff --git a/components/permissions/permission_request.h b/components/permission + using PermissionDecidedCallbackWithLifetime = + base::OnceCallback; ++ content_settings::mojom::LifetimeMode /*lifetime_option*/)>; + // `permission_decided_callback` is called when the permission request is // resolved by the user (see comment on PermissionDecidedCallback above). @@ -1160,20 +1173,20 @@ diff --git a/components/permissions/permission_request.h b/components/permission PermissionRequest(const PermissionRequest&) = delete; PermissionRequest& operator=(const PermissionRequest&) = delete; -@@ -159,10 +168,10 @@ class PermissionRequest { +@@ -162,10 +171,10 @@ class PermissionRequest { // If |is_one_time| is true the permission will last until all tabs of // |origin| are closed or navigated away from, and then the permission will // automatically expire after 1 day. - void PermissionGranted(bool is_one_time); -+ void PermissionGranted(bool is_one_time, content_settings::LifetimeMode lifetime_option); ++ void PermissionGranted(bool is_one_time, content_settings::mojom::LifetimeMode lifetime_option); // Called when the user has denied the requested permission. - void PermissionDenied(); -+ void PermissionDenied(bool is_one_time, content_settings::LifetimeMode lifetime_option); ++ void PermissionDenied(bool is_one_time, content_settings::mojom::LifetimeMode lifetime_option); // Called when the user has cancelled the permission request. This // corresponds to a denial, but is segregated in case the context needs to -@@ -216,6 +225,9 @@ class PermissionRequest { +@@ -221,6 +230,9 @@ class PermissionRequest { // Called once a decision is made about the permission. PermissionDecidedCallback permission_decided_callback_; @@ -1186,44 +1199,44 @@ diff --git a/components/permissions/permission_request.h b/components/permission diff --git a/components/permissions/permission_request_manager.cc b/components/permissions/permission_request_manager.cc --- a/components/permissions/permission_request_manager.cc +++ b/components/permissions/permission_request_manager.cc -@@ -156,7 +156,7 @@ void PermissionRequestManager::AddRequest( +@@ -169,7 +169,7 @@ void PermissionRequestManager::AddRequest( if (base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kDenyPermissionPrompts)) { - request->PermissionDenied(); -+ request->PermissionDenied(/*is_one_time*/false, content_settings::LifetimeMode::Always); ++ request->PermissionDenied(/*is_one_time*/false, content_settings::mojom::LifetimeMode::ALWAYS); request->RequestFinished(); return; } -@@ -232,7 +232,7 @@ void PermissionRequestManager::AddRequest( - if (auto_approval_origin) { - if (url::Origin::Create(request->requesting_origin()) == - auto_approval_origin.value()) { +@@ -246,7 +246,7 @@ void PermissionRequestManager::AddRequest( + + if (should_auto_approve_request) { + if (should_auto_approve_request == PermissionAction::GRANTED) { - request->PermissionGranted(/*is_one_time=*/false); -+ request->PermissionGranted(/*is_one_time=*/false, content_settings::LifetimeMode::Always); ++ request->PermissionGranted(/*is_one_time=*/false, content_settings::mojom::LifetimeMode::ALWAYS); } request->RequestFinished(); return; -@@ -593,7 +593,8 @@ void PermissionRequestManager::Accept() { +@@ -615,7 +615,8 @@ void PermissionRequestManager::Accept() { (*requests_iter)->request_type(), PermissionAction::GRANTED); PermissionGrantedIncludingDuplicates(*requests_iter, - /*is_one_time=*/false); + /*is_one_time=*/false, -+ content_settings::LifetimeMode::Always); ++ content_settings::mojom::LifetimeMode::ALWAYS); #if !BUILDFLAG(IS_ANDROID) std::optional content_settings_type = -@@ -611,7 +612,7 @@ void PermissionRequestManager::Accept() { +@@ -633,7 +634,7 @@ void PermissionRequestManager::Accept() { CurrentRequestsDecided(PermissionAction::GRANTED); } -void PermissionRequestManager::AcceptThisTime() { -+void PermissionRequestManager::AcceptThisTime(content_settings::LifetimeMode mode) { ++void PermissionRequestManager::AcceptThisTime(content_settings::mojom::LifetimeMode mode) { if (ignore_callbacks_from_prompt_) return; DCHECK(view_); -@@ -623,7 +624,8 @@ void PermissionRequestManager::AcceptThisTime() { +@@ -645,7 +646,8 @@ void PermissionRequestManager::AcceptThisTime() { (*requests_iter)->request_type(), PermissionAction::GRANTED_ONCE); PermissionGrantedIncludingDuplicates(*requests_iter, @@ -1233,23 +1246,23 @@ diff --git a/components/permissions/permission_request_manager.cc b/components/p } NotifyRequestDecided(PermissionAction::GRANTED_ONCE); -@@ -631,6 +633,15 @@ void PermissionRequestManager::AcceptThisTime() { +@@ -653,6 +655,15 @@ void PermissionRequestManager::AcceptThisTime() { } void PermissionRequestManager::Deny() { -+ Deny_(/*is_one_time*/ false, content_settings::LifetimeMode::Always); ++ Deny_(/*is_one_time*/ false, content_settings::mojom::LifetimeMode::ALWAYS); +} + -+void PermissionRequestManager::DenyThisTime(content_settings::LifetimeMode mode) { ++void PermissionRequestManager::DenyThisTime(content_settings::mojom::LifetimeMode mode) { + Deny_(/*is_one_time*/ true, mode); +} + +void PermissionRequestManager::Deny_(bool is_one_time, -+ content_settings::LifetimeMode lifetime_option) { ++ content_settings::mojom::LifetimeMode lifetime_option) { if (ignore_callbacks_from_prompt_) return; DCHECK(view_); -@@ -654,7 +665,7 @@ void PermissionRequestManager::Deny() { +@@ -676,7 +687,7 @@ void PermissionRequestManager::Deny() { StorePermissionActionForUMA((*requests_iter)->requesting_origin(), (*requests_iter)->request_type(), PermissionAction::DENIED); @@ -1258,12 +1271,12 @@ diff --git a/components/permissions/permission_request_manager.cc b/components/p } NotifyRequestDecided(PermissionAction::DENIED); -@@ -1213,32 +1224,32 @@ PermissionRequestManager::VisitDuplicateRequests( +@@ -1243,32 +1254,32 @@ PermissionRequestManager::VisitDuplicateRequests( void PermissionRequestManager::PermissionGrantedIncludingDuplicates( PermissionRequest* request, - bool is_one_time) { -+ bool is_one_time, content_settings::LifetimeMode lifetime_option) { ++ bool is_one_time, content_settings::mojom::LifetimeMode lifetime_option) { DCHECK_EQ(1ul, base::ranges::count(requests_, request) + pending_permission_requests_.Count(request)) << "Only requests in [pending_permission_]requests_ can have duplicates"; @@ -1272,7 +1285,7 @@ diff --git a/components/permissions/permission_request_manager.cc b/components/p VisitDuplicateRequests( base::BindRepeating( - [](bool is_one_time, -+ [](bool is_one_time, content_settings::LifetimeMode lifetime_option, ++ [](bool is_one_time, content_settings::mojom::LifetimeMode lifetime_option, const base::WeakPtr& weak_request) { - weak_request->PermissionGranted(is_one_time); + weak_request->PermissionGranted(is_one_time, lifetime_option); @@ -1284,7 +1297,7 @@ diff --git a/components/permissions/permission_request_manager.cc b/components/p void PermissionRequestManager::PermissionDeniedIncludingDuplicates( - PermissionRequest* request) { -+ PermissionRequest* request, bool is_one_time, content_settings::LifetimeMode lifetime_option) { ++ PermissionRequest* request, bool is_one_time, content_settings::mojom::LifetimeMode lifetime_option) { DCHECK_EQ(1ul, base::ranges::count(requests_, request) + pending_permission_requests_.Count(request)) << "Only requests in [pending_permission_]requests_ can have duplicates"; @@ -1295,18 +1308,18 @@ diff --git a/components/permissions/permission_request_manager.cc b/components/p - [](const base::WeakPtr& weak_request) { - weak_request->PermissionDenied(); - }), -+ [](bool is_one_time, content_settings::LifetimeMode lifetime_option, const base::WeakPtr& weak_request) { ++ [](bool is_one_time, content_settings::mojom::LifetimeMode lifetime_option, const base::WeakPtr& weak_request) { + weak_request->PermissionDenied(is_one_time, lifetime_option); + }, is_one_time, lifetime_option), request); } -@@ -1495,7 +1506,7 @@ void PermissionRequestManager::DoAutoResponseForTesting() { +@@ -1529,7 +1540,7 @@ void PermissionRequestManager::DoAutoResponseForTesting() { } switch (auto_response_for_test_) { case ACCEPT_ONCE: - AcceptThisTime(); -+ AcceptThisTime(content_settings::LifetimeMode::OnlyThisTime); ++ AcceptThisTime(content_settings::mojom::LifetimeMode::ONLY_THIS_TIME); break; case ACCEPT_ALL: Accept(); @@ -1318,25 +1331,25 @@ diff --git a/components/permissions/permission_request_manager.h b/components/pe GURL GetEmbeddingOrigin() const override; void Accept() override; - void AcceptThisTime() override; -+ void AcceptThisTime(content_settings::LifetimeMode lifetime_option) override; ++ void AcceptThisTime(content_settings::mojom::LifetimeMode lifetime_option) override; void Deny() override; -+ void Deny_(bool is_one_time, content_settings::LifetimeMode lifetime_option); -+ void DenyThisTime(content_settings::LifetimeMode lifetime_option) override; ++ void Deny_(bool is_one_time, content_settings::mojom::LifetimeMode lifetime_option); ++ void DenyThisTime(content_settings::mojom::LifetimeMode lifetime_option) override; void Dismiss() override; void Ignore() override; void FinalizeCurrentRequests() override; -@@ -368,9 +370,12 @@ class PermissionRequestManager +@@ -372,9 +374,12 @@ class PermissionRequestManager // Calls PermissionGranted on a request and all its duplicates. void PermissionGrantedIncludingDuplicates(PermissionRequest* request, - bool is_one_time); + bool is_one_time, -+ content_settings::LifetimeMode lifetime_option); ++ content_settings::mojom::LifetimeMode lifetime_option); // Calls PermissionDenied on a request and all its duplicates. - void PermissionDeniedIncludingDuplicates(PermissionRequest* request); + void PermissionDeniedIncludingDuplicates(PermissionRequest* request, + bool is_one_time, -+ content_settings::LifetimeMode lifetime_option); ++ content_settings::mojom::LifetimeMode lifetime_option); // Calls Cancelled on a request and all its duplicates. void CancelledIncludingDuplicates(PermissionRequest* request, bool is_final_decision = true); diff --git a/build/cromite_patches/Add-menu-item-to-bookmark-all-tabs.patch b/build/cromite_patches/Add-menu-item-to-bookmark-all-tabs.patch index 25d8f614..afe20bf1 100644 --- a/build/cromite_patches/Add-menu-item-to-bookmark-all-tabs.patch +++ b/build/cromite_patches/Add-menu-item-to-bookmark-all-tabs.patch @@ -7,7 +7,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html chrome/android/java/res/menu/main_menu.xml | 7 ++ .../chrome/browser/ChromeTabbedActivity.java | 24 +++++++ .../browser/bookmarks/BookmarkBridge.java | 67 +++++++++++++++++++ - .../bookmarks/android/bookmark_bridge.cc | 44 ++++++++++++ + .../bookmarks/android/bookmark_bridge.cc | 44 +++++++++++- .../bookmarks/android/bookmark_bridge.h | 8 +++ .../browser/bookmarks/bookmark_html_writer.cc | 11 ++- .../dialogs/DownloadLocationCustomView.java | 4 +- @@ -15,7 +15,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html components/bookmark_bar_strings.grdp | 6 ++ .../bookmarks/browser/bookmark_codec.cc | 20 +++++- components/bookmarks/browser/bookmark_codec.h | 7 +- - .../browser/bookmark_load_details.cc | 8 ++- + .../browser/bookmark_load_details.cc | 14 +++- .../bookmarks/browser/bookmark_load_details.h | 2 + .../bookmarks/browser/bookmark_model.cc | 3 +- components/bookmarks/browser/bookmark_model.h | 7 ++ @@ -26,7 +26,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html components/bookmarks/browser/bookmark_uuids.h | 1 + components/bookmarks/browser/model_loader.cc | 8 ++- .../bookmark_specifics_conversions.cc | 1 + - 22 files changed, 236 insertions(+), 14 deletions(-) + 22 files changed, 241 insertions(+), 15 deletions(-) diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/res/menu/main_menu.xml --- a/chrome/android/java/res/menu/main_menu.xml @@ -42,7 +42,7 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re -@@ -186,6 +190,9 @@ found in the LICENSE file. +@@ -180,6 +184,9 @@ found in the LICENSE file. @@ -55,7 +55,7 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java -@@ -89,6 +89,7 @@ import org.chromium.chrome.browser.base.ColdStartTracker; +@@ -91,6 +91,7 @@ import org.chromium.chrome.browser.base.ColdStartTracker; import org.chromium.chrome.browser.bookmarks.BookmarkUtils; import org.chromium.chrome.browser.browserservices.intents.WebappConstants; import org.chromium.chrome.browser.compositor.CompositorViewHolder; @@ -63,16 +63,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct import org.chromium.chrome.browser.compositor.layouts.Layout; import org.chromium.chrome.browser.compositor.layouts.LayoutManagerChrome; import org.chromium.chrome.browser.compositor.layouts.LayoutManagerChromePhone; -@@ -2950,6 +2951,8 @@ public class ChromeTabbedActivity extends ChromeActivity getTabModelSelector().closeAllTabs()); + this::closeAllTabsHidingTabGroups); RecordUserAction.record("MobileMenuCloseAllTabs"); + } else if (id == R.id.bookmark_all_tabs_menu_id) { + bookmarkAllTabs(); } else if (id == R.id.close_all_incognito_tabs_menu_id) { // Close only incognito tabs CloseAllTabsDialog.show( -@@ -3021,6 +3024,27 @@ public class ChromeTabbedActivity extends ChromeActivityGetJavaObject(), +- ConvertUTF8ToJavaString(env, export_path_), ++ base::android::ConvertUTF8ToJavaString(env, export_path_), + result == Result::kSuccess); + delete this; + } +@@ -349,6 +349,33 @@ jboolean BookmarkBridge::AreAccountBookmarkFoldersActive(JNIEnv* env) { + return bookmark_model_->account_mobile_node() != nullptr; } +base::android::ScopedJavaLocalRef @@ -230,7 +239,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse + const JavaParamRef& url) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + -+ GURL gurl = *url::GURLAndroid::ToNativeGURL(env, url); ++ GURL gurl = url::GURLAndroid::ToNativeGURL(env, url); + + bookmarks::BookmarkModel* model = + BookmarkModelFactory::GetForBrowserContext(profile_); @@ -252,9 +261,9 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse +} + base::android::ScopedJavaLocalRef - BookmarkBridge::GetMostRecentlyAddedUserBookmarkIdForUrl( - JNIEnv* env, -@@ -482,6 +509,7 @@ void BookmarkBridge::GetAllFoldersWithDepths( + BookmarkBridge::GetMostRecentlyAddedUserBookmarkIdForUrl(JNIEnv* env, + const GURL& url) { +@@ -461,6 +488,7 @@ void BookmarkBridge::GetAllFoldersWithDepths( // Vector to temporarily contain all child bookmarks at same level for sorting std::vector bookmarks = { bookmark_model_->mobile_node(), @@ -262,19 +271,17 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse bookmark_model_->bookmark_bar_node(), bookmark_model_->other_node(), }; -@@ -539,6 +567,11 @@ std::vector BookmarkBridge::GetTopLevelFolderIdsImpl( - top_level_folders.push_back(root_child.get()); +@@ -554,6 +582,9 @@ std::vector BookmarkBridge::GetTopLevelFolderIdsImpl( + top_level_folders.push_back(other_node); } -+ for (const auto& node : bookmark_model_->tabs_collection_node()->children()) { -+ if (node->is_folder()) -+ top_level_folders.push_back(node.get()); -+ } ++ const BookmarkNode* tabs_collection_node = bookmark_model_->tabs_collection_node(); ++ top_level_folders.push_back(tabs_collection_node); + - if (account_reading_list_manager_ && - account_reading_list_manager_->GetRoot()) { - top_level_folders.push_back(account_reading_list_manager_->GetRoot()); -@@ -1176,6 +1209,17 @@ void BookmarkBridge::GetBookmarksOfType( + const BookmarkNode* reading_list_node = + local_or_syncable_reading_list_manager_->GetRoot(); + if (IsPermanentFolderVisible(ignore_visibility, reading_list_node)) { +@@ -1266,6 +1297,17 @@ void BookmarkBridge::GetBookmarksOfType( AddBookmarkNodesToBookmarkIdList(env, j_list, results); } @@ -295,18 +302,18 @@ 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 -@@ -77,6 +77,10 @@ class BookmarkBridge : public ProfileObserver, - const base::android::JavaParamRef& j_url, - const base::android::JavaParamRef& j_callback); +@@ -79,6 +79,10 @@ class BookmarkBridge : public ProfileObserver, + + jboolean AreAccountBookmarkFoldersActive(JNIEnv* env); + base::android::ScopedJavaLocalRef GetBookmarkIdForTabsCollection( + JNIEnv* env, + const base::android::JavaParamRef& url); + base::android::ScopedJavaLocalRef - GetMostRecentlyAddedUserBookmarkIdForUrl( - JNIEnv* env, -@@ -227,6 +231,10 @@ class BookmarkBridge : public ProfileObserver, + GetMostRecentlyAddedUserBookmarkIdForUrl(JNIEnv* env, const GURL& url); + const bookmarks::BookmarkNode* GetMostRecentlyAddedUserBookmarkIdForUrlImpl( +@@ -223,6 +227,10 @@ class BookmarkBridge : public ProfileObserver, const base::android::JavaParamRef& j_list, jint type); @@ -384,7 +391,7 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd -@@ -3875,6 +3875,9 @@ To change this setting, BEGIN_LINKclear the Chrome da +@@ -4196,6 +4196,9 @@ To change this setting, BEGIN_LINKdelete the Chrome d Select tabs @@ -420,7 +427,7 @@ diff --git a/components/bookmark_bar_strings.grdp b/components/bookmark_bar_stri diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmarks/browser/bookmark_codec.cc --- a/components/bookmarks/browser/bookmark_codec.cc +++ b/components/bookmarks/browser/bookmark_codec.cc -@@ -35,6 +35,7 @@ const char BookmarkCodec::kBookmarkBarFolderNameKey[] = "bookmark_bar"; +@@ -36,6 +36,7 @@ const char BookmarkCodec::kBookmarkBarFolderNameKey[] = "bookmark_bar"; const char BookmarkCodec::kOtherBookmarkFolderNameKey[] = "other"; // The value is left as 'synced' for historical reasons. const char BookmarkCodec::kMobileBookmarkFolderNameKey[] = "synced"; @@ -428,7 +435,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmar const char BookmarkCodec::kVersionKey[] = "version"; const char BookmarkCodec::kChecksumKey[] = "checksum"; const char BookmarkCodec::kIdKey[] = "id"; -@@ -72,6 +73,7 @@ base::Value::Dict BookmarkCodec::Encode( +@@ -73,6 +74,7 @@ base::Value::Dict BookmarkCodec::Encode( const BookmarkNode* bookmark_bar_node, const BookmarkNode* other_folder_node, const BookmarkNode* mobile_folder_node, @@ -436,16 +443,16 @@ diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmar std::string sync_metadata_str) { ids_reassigned_ = false; uuids_reassigned_ = false; -@@ -91,6 +93,8 @@ base::Value::Dict BookmarkCodec::Encode( - roots.Set(kBookmarkBarFolderNameKey, EncodeNode(bookmark_bar_node)); - roots.Set(kOtherBookmarkFolderNameKey, EncodeNode(other_folder_node)); - roots.Set(kMobileBookmarkFolderNameKey, EncodeNode(mobile_folder_node)); -+ if (tabs_folder_node) -+ roots.Set(kTabsBookmarkFolderNameKey, EncodeNode(tabs_folder_node)); - - FinalizeChecksum(); - // We are going to store the computed checksum. So set stored checksum to be -@@ -107,6 +111,7 @@ bool BookmarkCodec::Decode(const base::Value::Dict& value, +@@ -98,6 +100,8 @@ base::Value::Dict BookmarkCodec::Encode( + roots.Set(kBookmarkBarFolderNameKey, EncodeNode(bookmark_bar_node)); + roots.Set(kOtherBookmarkFolderNameKey, EncodeNode(other_folder_node)); + roots.Set(kMobileBookmarkFolderNameKey, EncodeNode(mobile_folder_node)); ++ if (tabs_folder_node) ++ roots.Set(kTabsBookmarkFolderNameKey, EncodeNode(tabs_folder_node)); + } else { + // No permanent node should have been provided. + CHECK(!other_folder_node); +@@ -119,6 +123,7 @@ bool BookmarkCodec::Decode(const base::Value::Dict& value, BookmarkNode* bb_node, BookmarkNode* other_folder_node, BookmarkNode* mobile_folder_node, @@ -453,7 +460,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmar int64_t* max_id, std::string* sync_metadata_str) { const int64_t max_already_assigned_id = -@@ -117,7 +122,8 @@ bool BookmarkCodec::Decode(const base::Value::Dict& value, +@@ -133,7 +138,8 @@ bool BookmarkCodec::Decode(const base::Value::Dict& value, base::Uuid::ParseLowercase(kBookmarkBarNodeUuid), base::Uuid::ParseLowercase(kOtherBookmarksNodeUuid), base::Uuid::ParseLowercase(kMobileBookmarksNodeUuid), @@ -463,7 +470,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmar ids_reassigned_ = false; uuids_reassigned_ = false; ids_valid_ = true; -@@ -125,13 +131,14 @@ bool BookmarkCodec::Decode(const base::Value::Dict& value, +@@ -141,13 +147,14 @@ bool BookmarkCodec::Decode(const base::Value::Dict& value, stored_checksum_.clear(); InitializeChecksum(); bool success = DecodeHelper(bb_node, other_folder_node, mobile_folder_node, @@ -479,7 +486,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmar } *max_id = maximum_id_ + 1; return success; -@@ -189,6 +196,7 @@ base::Value::Dict BookmarkCodec::EncodeMetaInfo( +@@ -205,6 +212,7 @@ base::Value::Dict BookmarkCodec::EncodeMetaInfo( bool BookmarkCodec::DecodeHelper(BookmarkNode* bb_node, BookmarkNode* other_folder_node, BookmarkNode* mobile_folder_node, @@ -487,7 +494,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmar const base::Value::Dict& value, std::string* sync_metadata_str) { std::optional version = value.FindInt(kVersionKey); -@@ -213,6 +221,8 @@ bool BookmarkCodec::DecodeHelper(BookmarkNode* bb_node, +@@ -237,6 +245,8 @@ bool BookmarkCodec::DecodeHelper(BookmarkNode* bb_node, roots->FindDict(kOtherBookmarkFolderNameKey); const base::Value::Dict* mobile_folder_value = roots->FindDict(kMobileBookmarkFolderNameKey); @@ -496,16 +503,16 @@ diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmar if (!bb_value || !other_folder_value || !mobile_folder_value) return false; -@@ -220,6 +230,8 @@ bool BookmarkCodec::DecodeHelper(BookmarkNode* bb_node, +@@ -244,6 +254,8 @@ bool BookmarkCodec::DecodeHelper(BookmarkNode* bb_node, DecodeNode(*bb_value, nullptr, bb_node); DecodeNode(*other_folder_value, nullptr, other_folder_node); DecodeNode(*mobile_folder_value, nullptr, mobile_folder_node); + if (tabs_folder_value) + DecodeNode(*tabs_folder_value, nullptr, tabs_folder_node); - if (sync_metadata_str) { - const std::string* sync_metadata_str_base64 = -@@ -459,11 +471,13 @@ void BookmarkCodec::DecodeMetaInfoHelper( + // Need to reset the title as the title is persisted and restored from + // the file. +@@ -477,12 +489,14 @@ void BookmarkCodec::DecodeMetaInfoHelper( void BookmarkCodec::ReassignIDs(BookmarkNode* bb_node, BookmarkNode* other_node, @@ -513,6 +520,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmar + BookmarkNode* mobile_node, + BookmarkNode* tabs_folder_node) { ids_.clear(); + reassigned_ids_per_old_id_.clear(); ReassignIDsHelper(bb_node); ReassignIDsHelper(other_node); ReassignIDsHelper(mobile_node); @@ -523,7 +531,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmar diff --git a/components/bookmarks/browser/bookmark_codec.h b/components/bookmarks/browser/bookmark_codec.h --- a/components/bookmarks/browser/bookmark_codec.h +++ b/components/bookmarks/browser/bookmark_codec.h -@@ -39,6 +39,7 @@ class BookmarkCodec { +@@ -43,6 +43,7 @@ class BookmarkCodec { const BookmarkNode* bookmark_bar_node, const BookmarkNode* other_folder_node, const BookmarkNode* mobile_folder_node, @@ -531,7 +539,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.h b/components/bookmark std::string sync_metadata_str); // Decodes the previously encoded value to the specified nodes as well as -@@ -57,6 +58,7 @@ class BookmarkCodec { +@@ -61,6 +62,7 @@ class BookmarkCodec { BookmarkNode* bb_node, BookmarkNode* other_folder_node, BookmarkNode* mobile_folder_node, @@ -539,7 +547,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.h b/components/bookmark int64_t* max_node_id, std::string* sync_metadata_str); -@@ -82,6 +84,7 @@ class BookmarkCodec { +@@ -92,6 +94,7 @@ class BookmarkCodec { static const char kBookmarkBarFolderNameKey[]; static const char kOtherBookmarkFolderNameKey[]; static const char kMobileBookmarkFolderNameKey[]; @@ -547,7 +555,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.h b/components/bookmark static const char kVersionKey[]; static const char kChecksumKey[]; static const char kIdKey[]; -@@ -114,6 +117,7 @@ class BookmarkCodec { +@@ -124,6 +127,7 @@ class BookmarkCodec { bool DecodeHelper(BookmarkNode* bb_node, BookmarkNode* other_folder_node, BookmarkNode* mobile_folder_node, @@ -555,7 +563,7 @@ diff --git a/components/bookmarks/browser/bookmark_codec.h b/components/bookmark const base::Value::Dict& value, std::string* sync_metadata_str); -@@ -124,7 +128,8 @@ class BookmarkCodec { +@@ -134,7 +138,8 @@ class BookmarkCodec { // Reassigns bookmark IDs for all nodes. void ReassignIDs(BookmarkNode* bb_node, BookmarkNode* other_node, @@ -586,7 +594,26 @@ diff --git a/components/bookmarks/browser/bookmark_load_details.cc b/components/ CHECK_EQ(kNumDefaultTopLevelPermanentFolders, root_node_->children().size()); } -@@ -105,8 +107,8 @@ void BookmarkLoadDetails::AddManagedNode( +@@ -86,6 +88,10 @@ void BookmarkLoadDetails::PopulateNodeIdsForLocalOrSyncablePermanentNodes() { + if (mobile_folder_node_->id() == 0) { + mobile_folder_node_->set_id(max_id_++); + } ++ ++ if (tabs_collection_folder_node_->id() == 0) { ++ tabs_collection_folder_node_->set_id(max_id_++); ++ } + } + + void BookmarkLoadDetails::AddManagedNode( +@@ -98,6 +104,7 @@ void BookmarkLoadDetails::AddManagedNode( + CHECK_NE(bb_node_->id(), 0); + CHECK_NE(other_folder_node_->id(), 0); + CHECK_NE(mobile_folder_node_->id(), 0); ++ CHECK_NE(tabs_collection_folder_node_->id(), 0); + + has_managed_node_ = true; + root_node_->Add(std::move(managed_node)); +@@ -105,8 +112,8 @@ void BookmarkLoadDetails::AddManagedNode( void BookmarkLoadDetails::CreateIndices() { local_or_syncable_uuid_index_.insert(root_node_.get()); @@ -597,10 +624,18 @@ diff --git a/components/bookmarks/browser/bookmark_load_details.cc b/components/ for (const auto& child : root_node_->children()) { if (child.get() == account_bb_node_ || child.get() == account_other_folder_node_ || +@@ -125,6 +132,7 @@ void BookmarkLoadDetails::ResetPermanentNodePointers() { + bb_node_ = nullptr; + other_folder_node_ = nullptr; + mobile_folder_node_ = nullptr; ++ tabs_collection_folder_node_ = nullptr; + account_bb_node_ = nullptr; + account_other_folder_node_ = nullptr; + account_mobile_folder_node_ = nullptr; diff --git a/components/bookmarks/browser/bookmark_load_details.h b/components/bookmarks/browser/bookmark_load_details.h --- a/components/bookmarks/browser/bookmark_load_details.h +++ b/components/bookmarks/browser/bookmark_load_details.h -@@ -39,6 +39,7 @@ class BookmarkLoadDetails { +@@ -40,6 +40,7 @@ class BookmarkLoadDetails { BookmarkPermanentNode* bb_node() { return bb_node_; } BookmarkPermanentNode* mobile_folder_node() { return mobile_folder_node_; } BookmarkPermanentNode* other_folder_node() { return other_folder_node_; } @@ -608,7 +643,7 @@ diff --git a/components/bookmarks/browser/bookmark_load_details.h b/components/b // Account permanent nodes (null unless `AddAccountPermanentNodes()` is // called). -@@ -138,6 +139,7 @@ class BookmarkLoadDetails { +@@ -151,6 +152,7 @@ class BookmarkLoadDetails { raw_ptr bb_node_; raw_ptr other_folder_node_; raw_ptr mobile_folder_node_; @@ -619,7 +654,7 @@ diff --git a/components/bookmarks/browser/bookmark_load_details.h b/components/b diff --git a/components/bookmarks/browser/bookmark_model.cc b/components/bookmarks/browser/bookmark_model.cc --- a/components/bookmarks/browser/bookmark_model.cc +++ b/components/bookmarks/browser/bookmark_model.cc -@@ -846,7 +846,7 @@ bool BookmarkModel::HasBookmarks() const { +@@ -914,7 +914,7 @@ bool BookmarkModel::HasBookmarks() const { bool BookmarkModel::HasNoUserCreatedBookmarksOrFolders() const { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); return bookmark_bar_node_->children().empty() && @@ -628,7 +663,7 @@ diff --git a/components/bookmarks/browser/bookmark_model.cc b/components/bookmar } bool BookmarkModel::IsBookmarked(const GURL& url) const { -@@ -1191,6 +1191,7 @@ void BookmarkModel::DoneLoading(std::unique_ptr details) { +@@ -1246,6 +1246,7 @@ void BookmarkModel::DoneLoading(std::unique_ptr details) { bookmark_bar_node_ = details->bb_node(); other_node_ = details->other_folder_node(); mobile_node_ = details->mobile_folder_node(); @@ -639,7 +674,7 @@ diff --git a/components/bookmarks/browser/bookmark_model.cc b/components/bookmar diff --git a/components/bookmarks/browser/bookmark_model.h b/components/bookmarks/browser/bookmark_model.h --- a/components/bookmarks/browser/bookmark_model.h +++ b/components/bookmarks/browser/bookmark_model.h -@@ -159,6 +159,12 @@ class BookmarkModel final : public BookmarkUndoProvider, +@@ -157,6 +157,12 @@ class BookmarkModel : public CoreBookmarkModel, // bookmarks in the account storage). const BookmarkNode* account_mobile_node() const; @@ -652,7 +687,7 @@ diff --git a/components/bookmarks/browser/bookmark_model.h b/components/bookmark bool is_root_node(const BookmarkNode* node) const { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); return node == root_; -@@ -619,6 +625,7 @@ class BookmarkModel final : public BookmarkUndoProvider, +@@ -639,6 +645,7 @@ class BookmarkModel : public CoreBookmarkModel, raw_ptr account_bookmark_bar_node_ = nullptr; raw_ptr account_other_node_ = nullptr; raw_ptr account_mobile_node_ = nullptr; @@ -699,7 +734,7 @@ diff --git a/components/bookmarks/browser/bookmark_node.h b/components/bookmarks MOBILE }; -@@ -231,6 +232,8 @@ class BookmarkPermanentNode : public BookmarkNode { +@@ -236,6 +237,8 @@ class BookmarkPermanentNode : public BookmarkNode { int64_t id); static std::unique_ptr CreateMobileBookmarks( int64_t id); @@ -718,8 +753,8 @@ diff --git a/components/bookmarks/browser/bookmark_storage.cc b/components/bookm + model->tabs_collection_node(), model->client()->EncodeLocalOrSyncableBookmarkSyncMetadata()); case BookmarkStorage::kSelectAccountNodes: - if (!model->account_bookmark_bar_node()) { -@@ -59,6 +60,7 @@ base::Value::Dict EncodeModelToDict( + // Either all permanent folders or none should exist. +@@ -61,6 +62,7 @@ base::Value::Dict EncodeModelToDict( return codec.Encode(model->account_bookmark_bar_node(), model->account_other_node(), model->account_mobile_node(), @@ -773,7 +808,7 @@ diff --git a/components/bookmarks/browser/model_loader.cc b/components/bookmarks &sync_metadata_str)) { ids_assigned_to_account_nodes = codec.release_assigned_ids(); -@@ -110,7 +113,8 @@ std::unique_ptr LoadBookmarks( +@@ -127,7 +130,8 @@ std::unique_ptr LoadBookmarks( if (root_dict.has_value() && codec.Decode(*root_dict, std::move(ids_assigned_to_account_nodes), details->bb_node(), details->other_folder_node(), @@ -786,7 +821,7 @@ diff --git a/components/bookmarks/browser/model_loader.cc b/components/bookmarks diff --git a/components/sync_bookmarks/bookmark_specifics_conversions.cc b/components/sync_bookmarks/bookmark_specifics_conversions.cc --- a/components/sync_bookmarks/bookmark_specifics_conversions.cc +++ b/components/sync_bookmarks/bookmark_specifics_conversions.cc -@@ -445,6 +445,7 @@ sync_pb::BookmarkSpecifics::Type GetProtoTypeFromBookmarkNode( +@@ -444,6 +444,7 @@ sync_pb::BookmarkSpecifics::Type GetProtoTypeFromBookmarkNode( case bookmarks::BookmarkNode::BOOKMARK_BAR: case bookmarks::BookmarkNode::OTHER_NODE: case bookmarks::BookmarkNode::MOBILE: diff --git a/build/cromite_patches/Add-menu-item-to-view-source.patch b/build/cromite_patches/Add-menu-item-to-view-source.patch index ccc2db86..b0ff0eb6 100644 --- a/build/cromite_patches/Add-menu-item-to-view-source.patch +++ b/build/cromite_patches/Add-menu-item-to-view-source.patch @@ -29,7 +29,7 @@ diff --git a/chrome/android/java/res/menu/custom_tabs_menu.xml b/chrome/android/ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/res/menu/main_menu.xml --- a/chrome/android/java/res/menu/main_menu.xml +++ b/chrome/android/java/res/menu/main_menu.xml -@@ -113,6 +113,9 @@ found in the LICENSE file. +@@ -107,6 +107,9 @@ found in the LICENSE file. @@ -42,7 +42,7 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java -@@ -2976,6 +2976,8 @@ public class ChromeTabbedActivity extends ChromeActivity +@@ -2748,6 +2748,11 @@ public abstract class ChromeActivity return doOpenWebApk(currentTab); } @@ -69,16 +69,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java --- a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java -@@ -585,6 +585,7 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate - isChromeScheme, isFileScheme, isContentScheme, isIncognito, url)); +@@ -576,6 +576,7 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate + isNativePage, isFileScheme, isContentScheme, isIncognito, url)); - updateRequestDesktopSiteMenuItem(menu, currentTab, true /* can show */, isChromeScheme); + updateRequestDesktopSiteMenuItem(menu, currentTab, true /* can show */, isNativePage); + updateViewSourceMenuItem(menu, currentTab); - updateAutoDarkMenuItem(menu, currentTab, isChromeScheme); + updateAutoDarkMenuItem(menu, currentTab, isNativePage); -@@ -1236,6 +1237,23 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate - } +@@ -1304,6 +1305,23 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate + findInPageMenuRow.setVisible(itemVisible); } + /** @@ -104,10 +104,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabAppMenuPropertiesDelegate.java -@@ -295,6 +295,7 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat +@@ -294,6 +294,7 @@ public class CustomTabAppMenuPropertiesDelegate extends AppMenuPropertiesDelegat updateRequestDesktopSiteMenuItem( - menu, currentTab, requestDesktopSiteVisible, isChromeScheme); + menu, currentTab, requestDesktopSiteVisible, isNativePage); + updateViewSourceMenuItem(menu, currentTab); prepareAddToHomescreenMenuItem(menu, currentTab, addToHomeScreenVisible); } @@ -115,7 +115,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd -@@ -317,6 +317,10 @@ CHAR_LIMIT guidelines: +@@ -311,6 +311,10 @@ CHAR_LIMIT guidelines: USB diff --git a/build/cromite_patches/Add-option-to-force-tablet-UI.patch b/build/cromite_patches/Add-option-to-force-tablet-UI.patch index d53407aa..7fde5ed0 100644 --- a/build/cromite_patches/Add-option-to-force-tablet-UI.patch +++ b/build/cromite_patches/Add-option-to-force-tablet-UI.patch @@ -1,30 +1,206 @@ -From: Wengling Chen -Date: Mon, 1 Feb 2021 19:18:55 +0200 +From: uazo +Date: Sun, 5 May 2024 09:34:39 +0000 Subject: Add option to force tablet UI -License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html +License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html --- - .../ChromeAccessibilitySettingsDelegate.java | 19 +++++++++++++++++++ - .../browser/tasks/ReturnToChromeUtil.java | 4 +++- - .../chrome/browser/ui/RootUiCoordinator.java | 5 ++++- + .../start_surface/StartSurfaceMediator.java | 5 +++- + .../layout/custom_tabs_control_container.xml | 2 +- + .../java/res/layout/recent_tabs_page.xml | 2 +- + .../java/res/values-sw600dp/dimens.xml | 4 +-- + chrome/android/java/res/values/dimens.xml | 6 +++- + .../chrome/browser/ChromeTabbedActivity.java | 4 ++- + .../chrome/browser/WarmupManager.java | 5 +++- + .../settings/AccessibilitySettings.java | 13 +++++++++ + .../ChromeAccessibilitySettingsDelegate.java | 19 +++++++++++++ + .../chrome/browser/app/ChromeActivity.java | 4 ++- + .../overlays/strip/StripLayoutHelper.java | 10 +++++-- + .../strip/StripLayoutHelperManager.java | 7 ++++- + .../chrome/browser/ui/RootUiCoordinator.java | 5 +++- chrome/browser/preferences/BUILD.gn | 1 + .../preferences/ChromePreferenceKeys.java | 1 + - .../preferences/ChromeSharedPreferences.java | 8 ++++++++ + .../preferences/ChromeSharedPreferences.java | 8 ++++++ .../LegacyChromePreferenceKeys.java | 1 + + .../SingleTabSwitcherOnNtpMediator.java | 1 + .../omnibox/LocationBarCoordinator.java | 2 +- - .../strings/android_chrome_strings.grd | 7 +++++++ - components/BUILD.gn | 6 +++--- - .../res/xml/accessibility_preferences.xml | 5 +++++ - .../accessibility/AccessibilitySettings.java | 10 ++++++++++ - .../AccessibilitySettingsDelegate.java | 2 ++ - .../chromium/ui/base/DeviceFormFactor.java | 6 ++++++ - 14 files changed, 71 insertions(+), 6 deletions(-) + .../strings/android_chrome_strings.grd | 7 +++++ + .../java/res/layout/control_container.xml | 12 ++++---- + .../java/res/layout/toolbar_tablet.xml | 2 +- + .../java/res/values-sw600dp/dimens.xml | 5 ++-- + .../toolbar/java/res/values/dimens.xml | 5 ++-- + .../browser/toolbar/ControlContainer.java | 2 +- + .../top/TabStripTransitionCoordinator.java | 2 +- + .../toolbar/top/ToolbarControlContainer.java | 28 ++++++++++++++++++- + .../browser/toolbar/top/ToolbarLayout.java | 5 +++- + components/BUILD.gn | 6 ++-- + .../res/xml/accessibility_preferences.xml | 5 ++++ + .../AccessibilitySettingsDelegate.java | 11 ++++++++ + .../chromium/ui/base/DeviceFormFactor.java | 9 ++++++ + 32 files changed, 167 insertions(+), 32 deletions(-) +diff --git a/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/start_surface/StartSurfaceMediator.java b/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/start_surface/StartSurfaceMediator.java +--- a/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/start_surface/StartSurfaceMediator.java ++++ b/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/start_surface/StartSurfaceMediator.java +@@ -97,6 +97,7 @@ import org.chromium.components.browser_ui.widget.gesture.BackPressHandler; + import org.chromium.components.embedder_support.util.UrlUtilities; + import org.chromium.components.prefs.PrefService; + import org.chromium.content_public.browser.LoadUrlParams; ++import org.chromium.ui.base.DeviceFormFactor; + import org.chromium.ui.modelutil.PropertyModel; + import org.chromium.ui.text.EmptyTextWatcher; + import org.chromium.ui.util.ColorUtils; +@@ -1124,7 +1125,9 @@ class StartSurfaceMediator + int getTopToolbarPlaceholderHeight() { + // If logo is visible in Start surface instead of in the toolbar, we don't need to show the + // top margin of the fake search box. +- return getPixelSize(R.dimen.control_container_height) ++ return DeviceFormFactor.isForceTabletUI() ++ ? getPixelSize(R.dimen.control_container_height_tabletui) ++ : getPixelSize(R.dimen.control_container_height_cromite) + + (isLogoVisible() + ? 0 + : getPixelSize(R.dimen.start_surface_fake_search_box_top_margin)); +diff --git a/chrome/android/java/res/layout/custom_tabs_control_container.xml b/chrome/android/java/res/layout/custom_tabs_control_container.xml +--- a/chrome/android/java/res/layout/custom_tabs_control_container.xml ++++ b/chrome/android/java/res/layout/custom_tabs_control_container.xml +@@ -32,7 +32,7 @@ found in the LICENSE file. + android:id="@+id/find_toolbar_stub" + android:inflatedId="@+id/find_toolbar" + android:visibility="gone" +- android:layout_marginTop="@dimen/tab_strip_height" ++ android:layout_marginTop="@dimen/tab_strip_height_cromite" + android:layout_width="match_parent" + android:layout_height="@dimen/custom_tabs_control_container_height" + android:layout="@layout/find_toolbar" /> +diff --git a/chrome/android/java/res/layout/recent_tabs_page.xml b/chrome/android/java/res/layout/recent_tabs_page.xml +--- a/chrome/android/java/res/layout/recent_tabs_page.xml ++++ b/chrome/android/java/res/layout/recent_tabs_page.xml +@@ -11,7 +11,7 @@ found in the LICENSE file. + android:id="@+id/history_navigation" + android:layout_width="match_parent" + android:layout_height="match_parent" +- android:paddingTop="@dimen/tab_strip_height" > ++ android:paddingTop="@dimen/tab_strip_height_cromite" > + + 14sp + + +- 96dp +- 64dp ++ 96dp ++ 96dp + + + 60dp +diff --git a/chrome/android/java/res/values/dimens.xml b/chrome/android/java/res/values/dimens.xml +--- a/chrome/android/java/res/values/dimens.xml ++++ b/chrome/android/java/res/values/dimens.xml +@@ -120,9 +120,13 @@ found in the LICENSE file. + 16dp + + +- @dimen/default_action_bar_height ++ @dimen/default_action_bar_height ++ 96dp + @dimen/default_action_bar_height + ++ ++ 56dp ++ + + 375dp + 60dp +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 +@@ -2280,7 +2280,9 @@ public class ChromeTabbedActivity extends ChromeActivity { +@@ -214,6 +224,9 @@ public class AccessibilitySettings extends PreferenceFragmentCompat + mFontSizePrefs.setUserFontScaleFactor((Float) newValue); + } else if (PREF_FORCE_ENABLE_ZOOM.equals(preference.getKey())) { + mFontSizePrefs.setForceEnableZoomFromUser((Boolean) newValue); ++ } else if (PREF_FORCE_TABLET_UI.equals(preference.getKey())) { ++ mForceTabletUIDelegate.setEnabled((Boolean) newValue); ++ mDelegate.requestRestart(getActivity()); + } else if (PREF_READER_FOR_ACCESSIBILITY.equals(preference.getKey())) { + mPrefService.setBoolean(Pref.READER_FOR_ACCESSIBILITY, (Boolean) newValue); + } else if (PREF_PAGE_ZOOM_DEFAULT_ZOOM.equals(preference.getKey())) { diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java --- a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java -@@ -94,6 +94,25 @@ public class ChromeAccessibilitySettingsDelegate implements AccessibilitySetting - return new TextSizeContrastAccessibilityDelegate(getBrowserContextHandle()); +@@ -38,6 +38,25 @@ public class ChromeAccessibilitySettingsDelegate implements AccessibilitySetting + } } + private static class ForceTabletUIDelegate implements BooleanPreferenceDelegate { @@ -46,35 +222,90 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s + return new ForceTabletUIDelegate(); + } + - @Override - public void addExtraPreferences(PreferenceFragmentCompat fragment) { - if (ImageDescriptionsController.getInstance().shouldShowImageDescriptionsMenuItem()) { -diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToChromeUtil.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToChromeUtil.java ---- a/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToChromeUtil.java -+++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToChromeUtil.java -@@ -979,7 +979,9 @@ public final class ReturnToChromeUtil { - - public static boolean isScrollableMvtEnabled(Context context) { - boolean isSurfacePolishEnabled = ChromeFeatureList.sSurfacePolish.isEnabled(); -- if (!DeviceFormFactor.isNonMultiDisplayContextOnTablet(context)) { -+ if (!DeviceFormFactor.isNonMultiDisplayContextOnTablet(context) || -+ ChromeSharedPreferences.getInstance().readBoolean( -+ ChromePreferenceKeys.FLAGS_FORCE_TABLET_UI_ENABLED, false)) { - // On phones, parameter SURFACE_POLISH_SCROLLABLE_MVT is checked when feature flag - // surface polish is enabled; otherwise, feature flag - // SHOW_SCROLLABLE_MVT_ON_NTP_PHONE_ANDROID is checked. + private final Profile mProfile; + + /** +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 +@@ -862,7 +862,9 @@ public abstract class ChromeActivity + // Inflate the correct toolbar layout for the device. + int toolbarLayoutId = getToolbarLayoutId(); + if (toolbarLayoutId != ActivityUtils.NO_RESOURCE_ID && controlContainer != null) { +- controlContainer.initWithToolbar(toolbarLayoutId); ++ controlContainer.initWithToolbar(toolbarLayoutId, ++ DeviceFormFactor.isForceTabletUI() ++ ? R.dimen.control_container_height_tabletui : 0); + } + onInitialLayoutInflationComplete(); + } +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java +--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java +@@ -84,6 +84,7 @@ import org.chromium.components.feature_engagement.Tracker; + import org.chromium.components.prefs.PrefService; + import org.chromium.components.tab_groups.TabGroupColorId; + import org.chromium.components.user_prefs.UserPrefs; ++import org.chromium.ui.base.DeviceFormFactor; + import org.chromium.ui.base.LocalizationUtils; + import org.chromium.ui.base.WindowAndroid; + import org.chromium.ui.interpolators.Interpolators; +@@ -5059,8 +5060,13 @@ public class StripLayoutHelper implements StripLayoutTabDelegate, StripLayoutGro + mTabMenu.setAnchorView(tabView); + // 3. Set the vertical offset to align the tab menu with bottom of the tab strip + int tabHeight = mManagerHost.getHeight(); +- int verticalOffset = +- -(tabHeight - (int) mContext.getResources().getDimension(R.dimen.tab_strip_height)); ++ int tab_strip_height = ++ (int) mContext.getResources().getDimension(R.dimen.tab_strip_height_cromite); ++ if (DeviceFormFactor.isForceTabletUI()) { ++ tab_strip_height = ++ (int) mContext.getResources().getDimension(R.dimen.tab_strip_height_tabletui); ++ } ++ int verticalOffset = -(tabHeight - tab_strip_height); + mTabMenu.setVerticalOffset(verticalOffset); + + // 4. Set the horizontal offset to align the tab menu with the right side of the tab +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java +--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java +@@ -80,6 +80,7 @@ import org.chromium.chrome.browser.ui.system.StatusBarColorController; + import org.chromium.components.browser_ui.styles.SemanticColorUtils; + import org.chromium.components.browser_ui.widget.scrim.ScrimProperties; + import org.chromium.content_public.browser.LoadUrlParams; ++import org.chromium.ui.base.DeviceFormFactor; + import org.chromium.ui.base.LocalizationUtils; + import org.chromium.ui.base.PageTransition; + import org.chromium.ui.base.WindowAndroid; +@@ -405,11 +406,15 @@ public class StripLayoutHelperManager + + mIsLayoutOptimizationsEnabled = + ToolbarFeatures.isTabStripWindowLayoutOptimizationEnabled(true); +- mScrollableStripHeight = res.getDimension(R.dimen.tab_strip_height) / mDensity; ++ mScrollableStripHeight = ++ (DeviceFormFactor.isForceTabletUI() ++ ? res.getDimension(R.dimen.tab_strip_height_tabletui) ++ : res.getDimension(R.dimen.tab_strip_height_cromite)) / mDensity; + mHeight = + mIsLayoutOptimizationsEnabled + ? toolbarManager.getTabStripHeightSupplier().get() / mDensity + : mScrollableStripHeight; ++ + mTopPadding = mHeight - mScrollableStripHeight; + mDesktopWindowStateProvider = desktopWindowStateProvider; + 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 -@@ -98,6 +98,7 @@ import org.chromium.chrome.browser.paint_preview.DemoPaintPreview; - import org.chromium.chrome.browser.password_manager.ManagePasswordsReferrer; +@@ -98,6 +98,7 @@ import org.chromium.chrome.browser.password_manager.ManagePasswordsReferrer; import org.chromium.chrome.browser.password_manager.PasswordManagerLauncher; + import org.chromium.chrome.browser.pdf.PdfPage; import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; +import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; + import org.chromium.chrome.browser.price_tracking.CurrentTabPriceTrackingStateSupplier; import org.chromium.chrome.browser.price_tracking.PriceTrackingButtonController; import org.chromium.chrome.browser.profiles.Profile; - import org.chromium.chrome.browser.profiles.ProfileManager; -@@ -1595,7 +1596,9 @@ public class RootUiCoordinator +@@ -1611,7 +1612,9 @@ public class RootUiCoordinator if (!mSupportsFindInPageSupplier.getAsBoolean()) return; int stubId = R.id.find_toolbar_stub; @@ -99,10 +330,10 @@ diff --git a/chrome/browser/preferences/BUILD.gn b/chrome/browser/preferences/BU 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 -@@ -270,6 +270,7 @@ public final class ChromePreferenceKeys { - AccessibilityConstants.FONT_USER_SET_FORCE_ENABLE_ZOOM; - - public static final String HISTORY_SHOW_HISTORY_INFO = "history_home_show_info"; +@@ -265,6 +265,7 @@ public final class ChromePreferenceKeys { + /** Whether the app-specific history info text was already seen by users. */ + public static final String HISTORY_APP_SPECIFIC_INFO_SEEN = + "Chrome.History.AppSpecificInfoSeen"; + public static final String FLAGS_FORCE_TABLET_UI_ENABLED = "force_tablet_ui_enabled"; /** Keys used to save settings related to homepage. */ @@ -110,16 +341,16 @@ diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/bro diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromeSharedPreferences.java b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromeSharedPreferences.java --- a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromeSharedPreferences.java +++ b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromeSharedPreferences.java -@@ -11,6 +11,8 @@ import org.chromium.base.shared_preferences.PreferenceKeyRegistry; - import org.chromium.base.shared_preferences.SharedPreferencesManager; +@@ -12,6 +12,8 @@ import org.chromium.base.shared_preferences.SharedPreferencesManager; import org.chromium.build.BuildConfig; + import org.chromium.build.annotations.AssumeNonNull; +import org.chromium.ui.base.DeviceFormFactor; + @JNINamespace("android::shared_preferences") public class ChromeSharedPreferences { public static final PreferenceKeyRegistry REGISTRY = -@@ -22,6 +24,12 @@ public class ChromeSharedPreferences { +@@ -23,6 +25,12 @@ public class ChromeSharedPreferences { LegacyChromePreferenceKeys.getPrefixesInUse()) : null); @@ -135,7 +366,7 @@ diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/bro diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/LegacyChromePreferenceKeys.java b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/LegacyChromePreferenceKeys.java --- a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/LegacyChromePreferenceKeys.java +++ b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/LegacyChromePreferenceKeys.java -@@ -58,6 +58,7 @@ public class LegacyChromePreferenceKeys { +@@ -57,6 +57,7 @@ public class LegacyChromePreferenceKeys { ChromePreferenceKeys.FIRST_RUN_LIGHTWEIGHT_FLOW_COMPLETE, ChromePreferenceKeys.FIRST_RUN_SKIP_WELCOME_PAGE, ChromePreferenceKeys.FONT_USER_FONT_SCALE_FACTOR, @@ -143,10 +374,21 @@ diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/bro ChromePreferenceKeys.FONT_USER_SET_FORCE_ENABLE_ZOOM, ChromePreferenceKeys.HISTORY_SHOW_HISTORY_INFO, ChromePreferenceKeys.HOMEPAGE_ENABLED, +diff --git a/chrome/browser/single_tab/android/java/src/org/chromium/chrome/browser/single_tab/SingleTabSwitcherOnNtpMediator.java b/chrome/browser/single_tab/android/java/src/org/chromium/chrome/browser/single_tab/SingleTabSwitcherOnNtpMediator.java +--- a/chrome/browser/single_tab/android/java/src/org/chromium/chrome/browser/single_tab/SingleTabSwitcherOnNtpMediator.java ++++ b/chrome/browser/single_tab/android/java/src/org/chromium/chrome/browser/single_tab/SingleTabSwitcherOnNtpMediator.java +@@ -40,6 +40,7 @@ import org.chromium.components.browser_ui.widget.displaystyle.HorizontalDisplayS + import org.chromium.components.browser_ui.widget.displaystyle.UiConfig; + import org.chromium.components.browser_ui.widget.displaystyle.UiConfig.DisplayStyle; + import org.chromium.components.embedder_support.util.UrlUtilities; ++import org.chromium.ui.base.DeviceFormFactor; + import org.chromium.ui.modelutil.PropertyModel; + import org.chromium.url.GURL; + diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java -@@ -771,7 +771,7 @@ public class LocationBarCoordinator +@@ -778,7 +778,7 @@ public class LocationBarCoordinator } private boolean isTabletWindow() { @@ -158,8 +400,8 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd -@@ -1564,6 +1564,13 @@ Your Google account may have other forms of browsing history like searches and a - Manage third-party cookies and tracking protections +@@ -1664,6 +1664,13 @@ Your Google account may have other forms of browsing history like searches and a + Hide your IP address + @@ -172,6 +414,194 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro Safety check +diff --git a/chrome/browser/ui/android/toolbar/java/res/layout/control_container.xml b/chrome/browser/ui/android/toolbar/java/res/layout/control_container.xml +--- a/chrome/browser/ui/android/toolbar/java/res/layout/control_container.xml ++++ b/chrome/browser/ui/android/toolbar/java/res/layout/control_container.xml +@@ -9,7 +9,7 @@ found in the LICENSE file. + android:id="@+id/control_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" +- android:minHeight="@dimen/control_container_height" > ++ android:minHeight="@dimen/control_container_height_cromite" > + + + + + +@@ -36,7 +36,7 @@ found in the LICENSE file. + android:id="@+id/find_toolbar_stub" + android:inflatedId="@+id/find_toolbar" + android:visibility="gone" +- android:layout_marginTop="@dimen/tab_strip_height" ++ android:layout_marginTop="@dimen/tab_strip_height_cromite" + android:layout_width="match_parent" + android:layout_height="@dimen/toolbar_height_no_shadow" + android:layout="@layout/find_toolbar" /> +@@ -55,14 +55,14 @@ found in the LICENSE file. + android:id="@+id/target_view_stub" + android:inflatedId="@+id/toolbar_drag_drop_target_view" + android:layout_width="match_parent" +- android:layout_marginTop="@dimen/tab_strip_height" ++ android:layout_marginTop="@dimen/tab_strip_height_cromite" + android:layout_height="@dimen/toolbar_height_no_shadow" + android:layout="@layout/drag_drop_target_view" /> + + +diff --git a/chrome/browser/ui/android/toolbar/java/res/layout/toolbar_tablet.xml b/chrome/browser/ui/android/toolbar/java/res/layout/toolbar_tablet.xml +--- a/chrome/browser/ui/android/toolbar/java/res/layout/toolbar_tablet.xml ++++ b/chrome/browser/ui/android/toolbar/java/res/layout/toolbar_tablet.xml +@@ -15,7 +15,7 @@ found in the LICENSE file. + android:id="@+id/toolbar" + android:layout_width="match_parent" + android:layout_height="@dimen/toolbar_height_no_shadow" +- android:layout_marginTop="@dimen/tab_strip_height" ++ android:layout_marginTop="@dimen/tab_strip_height_tabletui" + android:background="@macro/default_bg_color" + > + +diff --git a/chrome/browser/ui/android/toolbar/java/res/values-sw600dp/dimens.xml b/chrome/browser/ui/android/toolbar/java/res/values-sw600dp/dimens.xml +--- a/chrome/browser/ui/android/toolbar/java/res/values-sw600dp/dimens.xml ++++ b/chrome/browser/ui/android/toolbar/java/res/values-sw600dp/dimens.xml +@@ -7,6 +7,7 @@ found in the LICENSE file. + + + +- 40dp +- 2dp ++ 40dp ++ 40dp ++ 2dp + +diff --git a/chrome/browser/ui/android/toolbar/java/res/values/dimens.xml b/chrome/browser/ui/android/toolbar/java/res/values/dimens.xml +--- a/chrome/browser/ui/android/toolbar/java/res/values/dimens.xml ++++ b/chrome/browser/ui/android/toolbar/java/res/values/dimens.xml +@@ -10,8 +10,9 @@ found in the LICENSE file. + 10dp + + +- 0dp +- 0dp ++ 0dp ++ 40dp ++ 0dp + + true @@ -254,9 +254,9 @@ new file mode 100644 diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml --- a/chrome/android/java/res/xml/main_preferences.xml +++ b/chrome/android/java/res/xml/main_preferences.xml -@@ -78,6 +78,11 @@ found in the LICENSE file. - android:key="safety_check" - android:order="13" +@@ -83,6 +83,11 @@ found in the LICENSE file. + android:key="safety_hub" + android:order="14" android:title="@string/prefs_safety_check"/> + @@ -469,7 +469,7 @@ diff --git a/chrome/browser/after_startup_task_utils.cc b/chrome/browser/after_s using content::BrowserThread; namespace { -@@ -132,6 +134,8 @@ void SetBrowserStartupIsComplete() { +@@ -134,6 +136,8 @@ void SetBrowserStartupIsComplete() { } GetAfterStartupTasks().clear(); GetAfterStartupTasks().shrink_to_fit(); @@ -500,7 +500,7 @@ diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h namespace extensions { class EventRouterForwarder; } -@@ -245,6 +250,7 @@ class BrowserProcess { +@@ -254,6 +259,7 @@ class BrowserProcess { #endif virtual component_updater::ComponentUpdateService* component_updater() = 0; @@ -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 -@@ -1168,6 +1168,27 @@ BrowserProcessImpl::component_updater() { +@@ -1197,6 +1197,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 -@@ -209,6 +209,7 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -215,6 +215,7 @@ class BrowserProcessImpl : public BrowserProcess, #endif component_updater::ComponentUpdateService* component_updater() override; @@ -550,18 +550,18 @@ 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; -@@ -405,6 +406,7 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -420,6 +421,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_; + std::unique_ptr adblock_updater_; - #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) + #if !BUILDFLAG(IS_ANDROID) // Used to create a singleton instance of SodaInstallerImpl, which can be 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 -@@ -446,6 +446,9 @@ StartupProfileInfo CreateInitialProfile( +@@ -470,6 +470,9 @@ StartupProfileInfo CreateInitialProfile( // missing code in the above test. CHECK(profile_info.profile) << "Cannot get default profile."; @@ -598,14 +598,6 @@ diff --git a/chrome/browser/flags/BUILD.gn b/chrome/browser/flags/BUILD.gn deps = [ ":jni_headers", "//base", -@@ -71,6 +74,7 @@ robolectric_library("flags_junit_tests") { - "android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlagsAnnotationUnitTest.java", - "android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureListWithProcessorUnitTest.java", - "android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureListWithoutProcessorUnitTest.java", -+ "android/java/src/org/chromium/chrome/browser/flags/AdBlockNativeGateway.java", - ] - deps = [ - ":java", diff --git a/chrome/browser/flags/android/adblock_native_gateway.cc b/chrome/browser/flags/android/adblock_native_gateway.cc new file mode 100755 --- /dev/null @@ -680,15 +672,11 @@ 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 -@@ -640,6 +640,14 @@ SystemNetworkContextManager::~SystemNetworkContextManager() { +@@ -642,6 +642,10 @@ SystemNetworkContextManager::~SystemNetworkContextManager() { void SystemNetworkContextManager::RegisterPrefs(PrefRegistrySimple* registry) { StubResolverConfigReader::RegisterPrefs(registry); -+#if BUILDFLAG(IS_ANDROID) -+ registry->RegisterBooleanPref(prefs::kAdBlockEnabled, true); -+#else + registry->RegisterBooleanPref(prefs::kAdBlockEnabled, false); -+#endif + registry->RegisterStringPref(prefs::kAdBlockFiltersURL, + "https://www.bromite.org/filters/filters.dat"); + @@ -714,7 +702,7 @@ diff --git a/chrome/browser/sessions/session_restore_android.cc b/chrome/browser diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd -@@ -220,6 +220,20 @@ CHAR_LIMIT guidelines: +@@ -217,6 +217,20 @@ CHAR_LIMIT guidelines: Advanced @@ -738,7 +726,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 -@@ -2653,6 +2653,11 @@ inline constexpr char kAudioCaptureAllowed[] = "hardware.audio_capture_enabled"; +@@ -2754,6 +2754,11 @@ inline constexpr char kAudioCaptureAllowed[] = "hardware.audio_capture_enabled"; inline constexpr char kAudioCaptureAllowedUrls[] = "hardware.audio_capture_allowed_urls"; @@ -753,7 +741,7 @@ diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h diff --git a/components/browser_ui/strings/android/site_settings.grdp b/components/browser_ui/strings/android/site_settings.grdp --- a/components/browser_ui/strings/android/site_settings.grdp +++ b/components/browser_ui/strings/android/site_settings.grdp -@@ -359,6 +359,9 @@ +@@ -368,6 +368,9 @@ This site shows intrusive or misleading ads @@ -1111,7 +1099,7 @@ new file mode 100644 +#include "components/component_updater/update_scheduler.h" +#include "url/gurl.h" +#include "components/component_updater/download_filters_task.h" -+#include "components/subresource_filter/content/browser/ruleset_service.h" ++#include "components/subresource_filter/content/shared/browser/ruleset_service.h" +#include "services/network/public/cpp/shared_url_loader_factory.h" + +namespace adblock_updater { @@ -1562,17 +1550,17 @@ new file mode 100644 diff --git a/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc b/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc --- a/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc +++ b/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.cc -@@ -14,6 +14,9 @@ - #include "base/metrics/histogram_macros.h" +@@ -17,6 +17,9 @@ + #include "base/strings/stringprintf.h" #include "base/trace_event/trace_event.h" #include "base/trace_event/traced_value.h" +#include "components/content_settings/core/common/content_settings_types.h" +#include "components/subresource_filter/content/browser/subresource_filter_content_settings_manager.h" +#include "components/subresource_filter/content/browser/subresource_filter_profile_context.h" - #include "components/subresource_filter/content/browser/activation_state_computing_navigation_throttle.h" - #include "components/subresource_filter/content/browser/async_document_subresource_filter.h" + #include "components/subresource_filter/content/browser/ad_tagging_utils.h" #include "components/subresource_filter/content/browser/content_subresource_filter_web_contents_helper.h" -@@ -148,6 +151,7 @@ ContentSubresourceFilterThrottleManager:: + #include "components/subresource_filter/content/browser/profile_interaction_manager.h" +@@ -108,6 +111,7 @@ ContentSubresourceFilterThrottleManager:: profile_interaction_manager_( std::make_unique( profile_context)), @@ -1580,7 +1568,7 @@ diff --git a/components/subresource_filter/content/browser/content_subresource_f web_contents_helper_(web_contents_helper) {} ContentSubresourceFilterThrottleManager:: -@@ -667,6 +671,17 @@ ContentSubresourceFilterThrottleManager:: +@@ -641,6 +645,17 @@ ContentSubresourceFilterThrottleManager:: throttle->NotifyPageActivationWithRuleset(EnsureRulesetHandle(), ad_tagging_state); } @@ -1610,21 +1598,21 @@ diff --git a/components/subresource_filter/content/browser/content_subresource_f // Unowned since the throttle manager cannot outlive the Page that owns it. // The throttle manager is held as user data first on NavigationHandle, then // transferred to Page once it is created. Once the Page is created and this -diff --git a/components/subresource_filter/content/browser/ruleset_service.cc b/components/subresource_filter/content/browser/ruleset_service.cc ---- a/components/subresource_filter/content/browser/ruleset_service.cc -+++ b/components/subresource_filter/content/browser/ruleset_service.cc -@@ -46,9 +46,7 @@ namespace { - +diff --git a/components/subresource_filter/content/shared/browser/ruleset_service.cc b/components/subresource_filter/content/shared/browser/ruleset_service.cc +--- a/components/subresource_filter/content/shared/browser/ruleset_service.cc ++++ b/components/subresource_filter/content/shared/browser/ruleset_service.cc +@@ -52,9 +52,7 @@ namespace { void RecordIndexAndWriteRulesetResult( + std::string_view uma_tag, RulesetService::IndexAndWriteRulesetResult result) { -- UMA_HISTOGRAM_ENUMERATION( -- "SubresourceFilter.WriteRuleset.Result", static_cast(result), -- static_cast(RulesetService::IndexAndWriteRulesetResult::MAX)); +- base::UmaHistogramEnumeration( +- base::StrCat({uma_tag, ".WriteRuleset.Result"}), result, +- RulesetService::IndexAndWriteRulesetResult::MAX); + VLOG(1) << "SubresourceFilter.WriteRuleset.Result: " << static_cast(result); } // Implements operations on a `sentinel file`, which is used as a safeguard to -@@ -228,10 +226,13 @@ RulesetService::RulesetService( +@@ -235,10 +233,13 @@ RulesetService::RulesetService( RulesetService::~RulesetService() {} void RulesetService::IndexAndStoreAndPublishRulesetIfNeeded( @@ -1640,7 +1628,7 @@ diff --git a/components/subresource_filter/content/browser/ruleset_service.cc b/ // Trying to store a ruleset with the same version for a second time would // not only be futile, but would fail on Windows due to "File System // Tunneling" as long as the previously stored copy of the rules is still -@@ -241,13 +242,16 @@ void RulesetService::IndexAndStoreAndPublishRulesetIfNeeded( +@@ -248,13 +249,16 @@ void RulesetService::IndexAndStoreAndPublishRulesetIfNeeded( if (most_recently_indexed_version.IsCurrentFormatVersion() && most_recently_indexed_version.content_version == unindexed_ruleset_info.content_version) { @@ -1657,11 +1645,15 @@ diff --git a/components/subresource_filter/content/browser/ruleset_service.cc b/ return; } -@@ -266,6 +270,18 @@ IndexedRulesetVersion RulesetService::GetMostRecentlyIndexedVersion() const { - IndexedRulesetVersion RulesetService::IndexAndWriteRuleset( +@@ -274,6 +278,23 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset( + const RulesetConfig& config, const base::FilePath& indexed_ruleset_base_dir, const UnindexedRulesetInfo& unindexed_ruleset_info) { -+ IndexedRulesetVersion version = IndexAndWriteRulesetInternal(indexed_ruleset_base_dir, unindexed_ruleset_info); ++ IndexedRulesetVersion version = ++ IndexAndWriteRulesetInternal( ++ config, ++ indexed_ruleset_base_dir, ++ unindexed_ruleset_info); + // cleanup temporary file when done + if (unindexed_ruleset_info.delete_ruleset_path) { + base::DeleteFile(unindexed_ruleset_info.ruleset_path); @@ -1671,84 +1663,78 @@ diff --git a/components/subresource_filter/content/browser/ruleset_service.cc b/ + +// static +IndexedRulesetVersion RulesetService::IndexAndWriteRulesetInternal( ++ const RulesetConfig& config, + const base::FilePath& indexed_ruleset_base_dir, + const UnindexedRulesetInfo& unindexed_ruleset_info) { base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, base::BlockingType::MAY_BLOCK); -@@ -273,6 +289,7 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset( +@@ -281,6 +302,7 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset( unindexed_ruleset_info); if (!unindexed_ruleset_stream_generator.ruleset_stream()) { + LOG(WARNING) << "RulesetService: failed to open: " << unindexed_ruleset_info.ruleset_path; RecordIndexAndWriteRulesetResult( + config.uma_tag, IndexAndWriteRulesetResult::FAILED_OPENING_UNINDEXED_RULESET); - return IndexedRulesetVersion(); -@@ -286,6 +303,7 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset( +@@ -295,6 +317,7 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset( indexed_ruleset_base_dir, indexed_version); if (!base::CreateDirectory(indexed_ruleset_version_dir)) { + LOG(WARNING) << "RulesetService: failed to create version dir: " << indexed_ruleset_version_dir; RecordIndexAndWriteRulesetResult( + config.uma_tag, IndexAndWriteRulesetResult::FAILED_CREATING_VERSION_DIR); - return IndexedRulesetVersion(); -@@ -293,12 +311,11 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset( +@@ -303,13 +326,11 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset( SentinelFile sentinel_file(indexed_ruleset_version_dir); if (sentinel_file.IsPresent()) { - RecordIndexAndWriteRulesetResult( +- config.uma_tag, - IndexAndWriteRulesetResult::ABORTED_BECAUSE_SENTINEL_FILE_PRESENT); -- return IndexedRulesetVersion(); +- return IndexedRulesetVersion(config.filter_tag); + LOG(WARNING) << "RulesetService: sentinel file is present in " << indexed_ruleset_version_dir; } if (!sentinel_file.Create()) { + LOG(WARNING) << "RulesetService: cannot create sentinel file in " << indexed_ruleset_version_dir; RecordIndexAndWriteRulesetResult( + config.uma_tag, IndexAndWriteRulesetResult::FAILED_CREATING_SENTINEL_FILE); - return IndexedRulesetVersion(); -@@ -311,6 +328,7 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset( - +@@ -324,6 +345,7 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset( RulesetIndexer indexer; - if (!(*g_index_ruleset_func)(&unindexed_ruleset_stream_generator, &indexer)) { + if (!(*g_index_ruleset_func)(config, &unindexed_ruleset_stream_generator, + &indexer)) { + LOG(WARNING) << "RulesetService: failed parsing."; RecordIndexAndWriteRulesetResult( + config.uma_tag, IndexAndWriteRulesetResult::FAILED_PARSING_UNINDEXED_RULESET); - return IndexedRulesetVersion(); -@@ -328,8 +346,12 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset( +@@ -343,8 +365,12 @@ IndexedRulesetVersion RulesetService::IndexAndWriteRuleset( WriteRuleset(indexed_ruleset_version_dir, unindexed_ruleset_info.license_path, indexer.data()); - RecordIndexAndWriteRulesetResult(result); + RecordIndexAndWriteRulesetResult(config.uma_tag, result); - if (result != IndexAndWriteRulesetResult::SUCCESS) + if (result != IndexAndWriteRulesetResult::SUCCESS) { + LOG(INFO) << "RulesetService: failed to index."; - return IndexedRulesetVersion(); + return IndexedRulesetVersion(config.filter_tag); + } + + LOG(INFO) << "RulesetService: successful parsing."; - DCHECK(indexed_version.IsValid()); + CHECK(indexed_version.IsValid(), base::NotFatalUntil::M129); return indexed_version; -@@ -449,6 +471,7 @@ void RulesetService::IndexAndStoreRuleset( +@@ -472,6 +498,7 @@ void RulesetService::IndexAndStoreRuleset( void RulesetService::OnWrittenRuleset(WriteRulesetCallback result_callback, const IndexedRulesetVersion& version) { - DCHECK(!result_callback.is_null()); + CHECK(!result_callback.is_null(), base::NotFatalUntil::M129); + LOG(INFO) << "RulesetService: valid version: " << version.IsValid(); if (!version.IsValid()) return; version.SaveToPrefs(local_state_); -@@ -461,7 +484,6 @@ void RulesetService::OpenAndPublishRuleset( - IndexedRulesetLocator::GetRulesetDataFilePath( - IndexedRulesetLocator::GetSubdirectoryPathForVersion( - indexed_ruleset_base_dir_, version)); -- - publisher_->TryOpenAndSetRulesetFile( - file_path, version.checksum, - base::BindOnce(&RulesetService::OnRulesetSet, -diff --git a/components/subresource_filter/content/browser/ruleset_service.h b/components/subresource_filter/content/browser/ruleset_service.h ---- a/components/subresource_filter/content/browser/ruleset_service.h -+++ b/components/subresource_filter/content/browser/ruleset_service.h -@@ -182,7 +182,7 @@ class RulesetService { +diff --git a/components/subresource_filter/content/shared/browser/ruleset_service.h b/components/subresource_filter/content/shared/browser/ruleset_service.h +--- a/components/subresource_filter/content/shared/browser/ruleset_service.h ++++ b/components/subresource_filter/content/shared/browser/ruleset_service.h +@@ -185,7 +185,7 @@ class RulesetService { // // Virtual so that it can be mocked out in tests. virtual void IndexAndStoreAndPublishRulesetIfNeeded( @@ -1757,36 +1743,23 @@ diff --git a/components/subresource_filter/content/browser/ruleset_service.h b/c // Get the ruleset version associated with the current local_state_. IndexedRulesetVersion GetMostRecentlyIndexedVersion() const; -@@ -215,6 +215,11 @@ class RulesetService { +@@ -221,6 +221,12 @@ class RulesetService { const base::FilePath& indexed_ruleset_base_dir, const UnindexedRulesetInfo& unindexed_ruleset_info); + // internal function used to wrap the temporary file deletion for unindexed rulesets + static IndexedRulesetVersion IndexAndWriteRulesetInternal( ++ const RulesetConfig& config, + const base::FilePath& indexed_ruleset_base_dir, + const UnindexedRulesetInfo& unindexed_ruleset_info); + // Reads the rules via the |unindexed_ruleset_stream_generator|, and indexes // them using |indexer|. Returns whether the entire ruleset could be parsed. static bool IndexRuleset( -diff --git a/components/subresource_filter/content/browser/ruleset_version.h b/components/subresource_filter/content/browser/ruleset_version.h ---- a/components/subresource_filter/content/browser/ruleset_version.h -+++ b/components/subresource_filter/content/browser/ruleset_version.h -@@ -53,6 +53,10 @@ struct UnindexedRulesetInfo { - // can be indicated not only by setting |license_path| to empty, but also by - // setting it to any non existent path. - base::FilePath license_path; -+ -+ // Whether to delete or not the ruleset path once done indexing; useful for disposal -+ // of temporary files. -+ bool delete_ruleset_path; - }; - - // Encapsulates the combination of the binary format version of the indexed -diff --git a/components/subresource_filter/content/browser/unindexed_ruleset_stream_generator.cc b/components/subresource_filter/content/browser/unindexed_ruleset_stream_generator.cc ---- a/components/subresource_filter/content/browser/unindexed_ruleset_stream_generator.cc -+++ b/components/subresource_filter/content/browser/unindexed_ruleset_stream_generator.cc -@@ -12,6 +12,7 @@ +diff --git a/components/subresource_filter/content/shared/browser/unindexed_ruleset_stream_generator.cc b/components/subresource_filter/content/shared/browser/unindexed_ruleset_stream_generator.cc +--- a/components/subresource_filter/content/shared/browser/unindexed_ruleset_stream_generator.cc ++++ b/components/subresource_filter/content/shared/browser/unindexed_ruleset_stream_generator.cc +@@ -13,6 +13,7 @@ #include "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h" #include "third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h" #include "ui/base/resource/resource_bundle.h" @@ -1794,7 +1767,7 @@ diff --git a/components/subresource_filter/content/browser/unindexed_ruleset_str namespace subresource_filter { -@@ -46,6 +47,8 @@ void UnindexedRulesetStreamGenerator::GenerateStreamFromFile( +@@ -49,6 +50,8 @@ void UnindexedRulesetStreamGenerator::GenerateStreamFromFile( ruleset_size_ = unindexed_ruleset_file.GetLength(); @@ -1803,19 +1776,20 @@ diff --git a/components/subresource_filter/content/browser/unindexed_ruleset_str copying_stream_ = std::make_unique( std::move(unindexed_ruleset_file)); ruleset_stream_ = -diff --git a/components/subresource_filter/content/browser/verified_ruleset_dealer.cc b/components/subresource_filter/content/browser/verified_ruleset_dealer.cc ---- a/components/subresource_filter/content/browser/verified_ruleset_dealer.cc -+++ b/components/subresource_filter/content/browser/verified_ruleset_dealer.cc -@@ -38,6 +38,9 @@ RulesetFilePtr VerifiedRulesetDealer::OpenAndSetRulesetFile( - TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("loading"), - "VerifiedRulesetDealer::OpenAndSetRulesetFile", "file_valid", - file->IsValid()); -+ -+ LOG(INFO) << "OpenAndSetRulesetFile: " << file_path << " is valid: " << file->IsValid(); +diff --git a/components/subresource_filter/core/browser/ruleset_version.h b/components/subresource_filter/core/browser/ruleset_version.h +--- a/components/subresource_filter/core/browser/ruleset_version.h ++++ b/components/subresource_filter/core/browser/ruleset_version.h +@@ -54,6 +54,10 @@ struct UnindexedRulesetInfo { + // can be indicated not only by setting |license_path| to empty, but also by + // setting it to any non existent path. + base::FilePath license_path; + - if (file->IsValid()) { - SetRulesetFile(file->Duplicate()); - expected_checksum_ = expected_checksum; ++ // Whether to delete or not the ruleset path once done indexing; useful for disposal ++ // of temporary files. ++ bool delete_ruleset_path; + }; + + // Encapsulates the combination of the binary format version of the indexed diff --git a/components/subresource_filter/core/browser/subresource_filter_features.cc b/components/subresource_filter/core/browser/subresource_filter_features.cc --- a/components/subresource_filter/core/browser/subresource_filter_features.cc +++ b/components/subresource_filter/core/browser/subresource_filter_features.cc @@ -1967,6 +1941,27 @@ diff --git a/components/subresource_filter/core/browser/subresource_filter_featu return configs; } +diff --git a/components/subresource_filter/core/browser/verified_ruleset_dealer.cc b/components/subresource_filter/core/browser/verified_ruleset_dealer.cc +--- a/components/subresource_filter/core/browser/verified_ruleset_dealer.cc ++++ b/components/subresource_filter/core/browser/verified_ruleset_dealer.cc +@@ -11,6 +11,7 @@ + #include "base/functional/bind.h" + #include "base/functional/callback_helpers.h" + #include "base/location.h" ++#include "base/logging.h" + #include "base/not_fatal_until.h" + #include "base/notreached.h" + #include "base/task/sequenced_task_runner.h" +@@ -39,6 +40,9 @@ RulesetFilePtr VerifiedRulesetDealer::OpenAndSetRulesetFile( + TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("loading"), + "VerifiedRulesetDealer::OpenAndSetRulesetFile", "file_valid", + file->IsValid()); ++ ++ LOG(INFO) << "OpenAndSetRulesetFile: " << file_path << " is valid: " << file->IsValid(); ++ + if (file->IsValid()) { + SetRulesetFile(file->Duplicate()); + expected_checksum_ = expected_checksum; diff --git a/components/subresource_filter/core/common/indexed_ruleset.cc b/components/subresource_filter/core/common/indexed_ruleset.cc --- a/components/subresource_filter/core/common/indexed_ruleset.cc +++ b/components/subresource_filter/core/common/indexed_ruleset.cc @@ -1976,9 +1971,9 @@ diff --git a/components/subresource_filter/core/common/indexed_ruleset.cc b/comp #include "base/hash/hash.h" +#include "base/logging.h" #include "base/metrics/histogram_macros.h" + #include "base/not_fatal_until.h" #include "base/trace_event/trace_event.h" - #include "components/subresource_filter/core/common/first_party_origin.h" -@@ -36,7 +37,9 @@ VerifyStatus GetVerifyStatus(base::span buffer, +@@ -37,7 +38,9 @@ VerifyStatus GetVerifyStatus(base::span buffer, // least once. The verifier detects a subset of the errors detected by the // checksum, and is unneeded once expected_checksum is consistently nonzero. flatbuffers::Verifier verifier(buffer.data(), buffer.size()); diff --git a/build/cromite_patches/Client-hints-overrides.patch b/build/cromite_patches/Client-hints-overrides.patch index f7065661..9583bb15 100644 --- a/build/cromite_patches/Client-hints-overrides.patch +++ b/build/cromite_patches/Client-hints-overrides.patch @@ -10,17 +10,20 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html components/embedder_support/user_agent_utils.cc | 4 +--- content/browser/client_hints/client_hints.cc | 17 +++++++++++------ .../loader/navigation_url_loader_impl.cc | 5 +++++ + .../about_flags_cc/Client-hints-overrides.inc | 9 +++++++++ .../features_cc/Client-hints-overrides.inc | 1 + .../cpp/features_cc/Client-hints-overrides.inc | 1 + net/http/http_network_transaction.cc | 1 + services/network/public/cpp/client_hints.cc | 1 + - .../blink/common/client_hints/client_hints.cc | 1 + + .../blink/common/client_hints/client_hints.cc | 6 ++++-- .../common/client_hints/enabled_client_hints.cc | 4 +++- .../blink/renderer/core/frame/navigator_ua.idl | 4 +++- + .../renderer/core/frame/navigator_ua_data.cc | 1 + .../renderer/core/frame/navigator_ua_data.idl | 5 ++++- .../renderer/core/loader/base_fetch_context.cc | 6 ++++-- - .../platform/runtime_enabled_features.json5 | 4 ++++ - 13 files changed, 40 insertions(+), 14 deletions(-) + .../platform/runtime_enabled_features.json5 | 5 +++++ + 15 files changed, 54 insertions(+), 16 deletions(-) + create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Client-hints-overrides.inc create mode 100644 cromite_flags/content/common/features_cc/Client-hints-overrides.inc create mode 100644 cromite_flags/services/network/public/cpp/features_cc/Client-hints-overrides.inc @@ -41,7 +44,7 @@ diff --git a/components/embedder_support/user_agent_utils.cc b/components/embedd diff --git a/content/browser/client_hints/client_hints.cc b/content/browser/client_hints/client_hints.cc --- a/content/browser/client_hints/client_hints.cc +++ b/content/browser/client_hints/client_hints.cc -@@ -55,6 +55,7 @@ +@@ -60,6 +60,7 @@ #include "third_party/blink/public/common/permissions_policy/origin_with_possible_wildcards.h" #include "third_party/blink/public/common/permissions_policy/permissions_policy.h" #include "third_party/blink/public/common/user_agent/user_agent_metadata.h" @@ -49,7 +52,7 @@ diff --git a/content/browser/client_hints/client_hints.cc b/content/browser/clie #include "ui/display/display.h" #include "ui/display/screen.h" #include "url/origin.h" -@@ -516,7 +517,8 @@ void AddPrefersReducedTransparencyHeader(net::HttpRequestHeaders* headers, +@@ -521,7 +522,8 @@ void AddPrefersReducedTransparencyHeader(net::HttpRequestHeaders* headers, : network::kPrefersReducedTransparencyNoPreference); } @@ -59,7 +62,7 @@ diff --git a/content/browser/client_hints/client_hints.cc b/content/browser/clie return network::IsOriginPotentiallyTrustworthy(origin); } -@@ -718,7 +720,8 @@ void UpdateNavigationRequestClientUaHeadersImpl( +@@ -723,7 +725,8 @@ void UpdateNavigationRequestClientUaHeadersImpl( // value, disable them. This overwrites previous decision from UI. disable_due_to_custom_ua = !ua_metadata.has_value(); } @@ -69,7 +72,7 @@ diff --git a/content/browser/client_hints/client_hints.cc b/content/browser/clie if (!disable_due_to_custom_ua) { if (!ua_metadata.has_value()) ua_metadata = delegate->GetUserAgentMetadata(); -@@ -900,10 +903,12 @@ void AddRequestClientHintsHeaders( +@@ -905,10 +908,12 @@ void AddRequestClientHintsHeaders( AddEctHeader(headers, network_quality_tracker, url); } @@ -89,7 +92,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 -@@ -1091,6 +1091,11 @@ void NavigationURLLoaderImpl::OnAcceptCHFrameReceived( +@@ -1202,6 +1202,11 @@ void NavigationURLLoaderImpl::OnAcceptCHFrameReceived( return; } @@ -101,6 +104,20 @@ diff --git a/content/browser/loader/navigation_url_loader_impl.cc b/content/brow LogAcceptCHFrameStatus(AcceptCHFrameRestart::kFramePresent); // Given that this is happening in the middle of navigation, there should +diff --git a/cromite_flags/chrome/browser/about_flags_cc/Client-hints-overrides.inc b/cromite_flags/chrome/browser/about_flags_cc/Client-hints-overrides.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/about_flags_cc/Client-hints-overrides.inc +@@ -0,0 +1,9 @@ ++#ifdef FLAG_SECTION ++ ++ {"enable-ua-client-hint", ++ "Enable UA client hint", ++ "Allow sending base low entropy client hints as " ++ "UA, UAMobile and UAPlatform for compatibility", kOsAll, ++ FEATURE_VALUE_TYPE(blink::features::kUserAgentClientHint)}, ++ ++#endif diff --git a/cromite_flags/content/common/features_cc/Client-hints-overrides.inc b/cromite_flags/content/common/features_cc/Client-hints-overrides.inc new file mode 100644 --- /dev/null @@ -116,7 +133,7 @@ new file mode 100644 diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc -@@ -101,6 +101,7 @@ const size_t kMaxRestarts = 32; +@@ -107,6 +107,7 @@ const size_t kMaxRestarts = 32; // Returns true when Early Hints are allowed on the given protocol. bool EarlyHintsAreAllowedOn(HttpConnectionInfo connection_info) { @@ -131,21 +148,36 @@ diff --git a/services/network/public/cpp/client_hints.cc b/services/network/publ std::optional> ParseClientHintsHeader(const std::string& header) { -+ if ((true)) return absl::nullopt; ++ if ((true)) return std::nullopt; // Accept-CH is an sh-list of tokens; see: // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-header-structure-19#section-3.1 std::optional maybe_list = diff --git a/third_party/blink/common/client_hints/client_hints.cc b/third_party/blink/common/client_hints/client_hints.cc --- a/third_party/blink/common/client_hints/client_hints.cc +++ b/third_party/blink/common/client_hints/client_hints.cc -@@ -105,6 +105,7 @@ const PolicyFeatureToClientHintMap& GetPolicyFeatureToClientHintMap() { - } +@@ -14,6 +14,7 @@ + #include "base/strings/string_util.h" + #include "services/network/public/cpp/client_hints.h" + #include "third_party/blink/public/common/features.h" ++#include "third_party/blink/renderer/platform/runtime_enabled_features.h" + #include "third_party/blink/public/common/permissions_policy/permissions_policy.h" + #include "url/origin.h" + +@@ -106,11 +107,12 @@ const PolicyFeatureToClientHintMap& GetPolicyFeatureToClientHintMap() { bool IsClientHintSentByDefault(network::mojom::WebClientHintsType type) { -+ if ((true)) return false; switch (type) { - case network::mojom::WebClientHintsType::kSaveData: +- case network::mojom::WebClientHintsType::kSaveData: case network::mojom::WebClientHintsType::kUA: + case network::mojom::WebClientHintsType::kUAMobile: + case network::mojom::WebClientHintsType::kUAPlatform: +- return true; ++ return RuntimeEnabledFeatures::UserAgentClientHintEnabled(); ++ case network::mojom::WebClientHintsType::kSaveData: ++ return false; + default: + return false; + } diff --git a/third_party/blink/common/client_hints/enabled_client_hints.cc b/third_party/blink/common/client_hints/enabled_client_hints.cc --- a/third_party/blink/common/client_hints/enabled_client_hints.cc +++ b/third_party/blink/common/client_hints/enabled_client_hints.cc @@ -187,6 +219,17 @@ diff --git a/third_party/blink/renderer/core/frame/navigator_ua.idl b/third_part +] interface mixin NavigatorUA { [SecureContext] readonly attribute NavigatorUAData userAgentData; }; +diff --git a/third_party/blink/renderer/core/frame/navigator_ua_data.cc b/third_party/blink/renderer/core/frame/navigator_ua_data.cc +--- a/third_party/blink/renderer/core/frame/navigator_ua_data.cc ++++ b/third_party/blink/renderer/core/frame/navigator_ua_data.cc +@@ -219,6 +219,7 @@ ScriptPromise NavigatorUAData::getHighEntropyValues( + Dactyloscoper::RecordDirectSurface( + GetExecutionContext(), WebFeature::kNavigatorUAData_Platform, platform()); + ++ if ((false)) + for (const String& hint : hints) { + if (hint == "platformVersion") { + values->setPlatformVersion(platform_version_); diff --git a/third_party/blink/renderer/core/frame/navigator_ua_data.idl b/third_party/blink/renderer/core/frame/navigator_ua_data.idl --- a/third_party/blink/renderer/core/frame/navigator_ua_data.idl +++ b/third_party/blink/renderer/core/frame/navigator_ua_data.idl @@ -223,7 +266,7 @@ diff --git a/third_party/blink/renderer/core/loader/base_fetch_context.cc b/thir if (ShouldSendClientHint(policy, resource_origin, is_1p_origin, WebClientHintsType::kUAArch, hints_preferences)) { SetHttpHeader(WebClientHintsType::kUAArch, -@@ -652,6 +652,8 @@ bool BaseFetchContext::ShouldSendClientHint( +@@ -667,6 +667,8 @@ bool BaseFetchContext::ShouldSendClientHint( bool is_1p_origin, network::mojom::blink::WebClientHintsType type, const ClientHintsPreferences& hints_preferences) const { @@ -235,15 +278,16 @@ diff --git a/third_party/blink/renderer/core/loader/base_fetch_context.cc b/thir 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 -@@ -499,6 +499,10 @@ - name: "ByobFetch", - status: "stable", +@@ -337,6 +337,11 @@ + name: "AtomicMoveAPI", + status: "test", }, + { -+ name: "UserAgentClientHint", // always disabled -+ status: "experimental", // in bromite ++ name: "UserAgentClientHint", ++ status: "stable", ++ base_feature: "UserAgentClientHint", + }, { - name: "CacheStorageCodeCacheHint", - origin_trial_feature_name: "CacheStorageCodeCacheHint", + name: "AttributionReporting", + origin_trial_feature_name: "PrivacySandboxAdsAPIs", -- diff --git a/build/cromite_patches/Content-settings-infrastructure.patch b/build/cromite_patches/Content-settings-infrastructure.patch index c49add3e..16f9ffc2 100644 --- a/build/cromite_patches/Content-settings-infrastructure.patch +++ b/build/cromite_patches/Content-settings-infrastructure.patch @@ -12,12 +12,12 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html Require: bromite-build-utils.patch --- .../ChromeSiteSettingsDelegate.java | 17 +- - .../installable/installed_webapp_bridge.cc | 2 +- + ...page_specific_content_settings_delegate.cc | 2 +- .../settings/privacy_page/privacy_page.html | 1 + .../settings/privacy_page/privacy_page.ts | 77 +++- chrome/browser/resources/settings/route.ts | 2 + ...settings_category_default_radio_group.html | 12 + - .../settings_category_default_radio_group.ts | 22 +- + .../settings_category_default_radio_group.ts | 23 +- .../settings/site_settings/site_details.html | 1 + .../settings/site_settings/site_details.ts | 33 +- .../site_details_permission.html | 8 +- @@ -28,30 +28,29 @@ Require: bromite-build-utils.patch chrome/browser/ui/BUILD.gn | 1 + .../controls/rich_controls_container_view.h | 7 + .../ui/views/page_info/page_info_main_view.cc | 28 +- - .../views/page_info/page_info_view_factory.cc | 19 + - .../views/page_info/page_info_view_factory.h | 3 + + .../views/page_info/page_info_view_factory.cc | 20 + + .../views/page_info/page_info_view_factory.h | 5 + .../page_info/permission_toggle_row_view.cc | 163 ++++++- .../page_info/permission_toggle_row_view.h | 18 +- - .../privacy_sandbox_internals_handler.cc | 2 +- .../settings_localized_strings_provider.cc | 54 +++ - .../ui/webui/settings/site_settings_helper.cc | 34 +- + .../ui/webui/settings/site_settings_helper.cc | 46 +- .../browser_ui/settings/android/BUILD.gn | 1 + .../preference_spinner_single_widget.xml | 92 ++++ .../settings/SpinnerPreference.java | 24 + .../browser_ui/site_settings/android/BUILD.gn | 18 + .../site_settings/AllSiteSettings.java | 5 +- .../BromiteCustomContentSetting.java | 155 +++++++ - .../BromiteCustomContentSettingImpl.java | 409 ++++++++++++++++++ + .../BromiteCustomContentSettingImpl.java | 412 ++++++++++++++++++ ...tomTriStateSiteSettingsPreferenceImpl.java | 24 + .../ContentSettingsResources.java | 16 +- .../site_settings/SingleCategorySettings.java | 50 ++- - .../site_settings/SingleWebsiteSettings.java | 58 ++- + .../site_settings/SingleWebsiteSettings.java | 54 ++- .../site_settings/SiteSettings.java | 31 +- .../site_settings/SiteSettingsCategory.java | 18 +- .../site_settings/SiteSettingsDelegate.java | 2 + .../TriStateSiteSettingsPreference.java | 13 +- .../browser_ui/site_settings/Website.java | 6 +- - .../WebsitePermissionsFetcher.java | 4 +- + .../WebsitePermissionsFetcher.java | 2 +- .../WebsitePreferenceBridge.java | 3 +- .../impl/include_all_directory.java | 1 + ...miteCustomContentSettingImplBase.java.tmpl | 48 ++ @@ -60,32 +59,31 @@ Require: bromite-build-utils.patch .../content_settings/core/browser/BUILD.gn | 7 + .../bromite_content_settings/placeholder.txt | 1 + .../core/browser/content_settings_registry.cc | 2 + - .../core/browser/content_settings_uma_util.cc | 3 +- + .../core/browser/content_settings_uma_util.cc | 6 +- .../core/browser/content_settings_utils.cc | 12 + .../core/browser/website_settings_info.h | 38 ++ .../core/browser/website_settings_registry.cc | 6 + .../core/browser/website_settings_registry.h | 1 + .../content_settings/core/common/BUILD.gn | 7 + .../bromite_content_settings/placeholder.txt | 1 + - .../core/common/content_settings.cc | 18 + - .../core/common/content_settings.h | 10 + + .../core/common/content_settings.cc | 30 +- + .../core/common/content_settings.h | 12 + .../core/common/content_settings.mojom | 6 + .../common/content_settings_mojom_traits.cc | 12 +- .../common/content_settings_mojom_traits.h | 24 + - .../common/content_settings_param_traits.h | 2 +- - .../core/common/content_settings_types.mojom | 4 +- - .../renderer/content_settings_agent_impl.cc | 33 ++ - .../renderer/content_settings_agent_impl.h | 5 + + .../core/common/content_settings_types.mojom | 1 + + .../renderer/content_settings_agent_impl.cc | 45 +- + .../renderer/content_settings_agent_impl.h | 9 +- .../PageInfoPermissionsController.java | 9 + .../PermissionParamsListBuilder.java | 1 + .../android/page_info_controller_android.cc | 18 + components/page_info/page_info.cc | 23 +- components/page_info/page_info_ui.cc | 18 + components/site_settings_strings.grdp | 1 + - .../platform/web_content_settings_client.h | 5 + + .../platform/web_content_settings_client.h | 9 + .../execution_context/execution_context.cc | 16 + .../execution_context/execution_context.h | 5 + - 74 files changed, 1833 insertions(+), 86 deletions(-) + 72 files changed, 1867 insertions(+), 95 deletions(-) create mode 100644 components/browser_ui/settings/android/java/res/layout/preference_spinner_single_widget.xml 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 @@ -99,7 +97,7 @@ Require: bromite-build-utils.patch diff --git a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java --- a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java -@@ -58,6 +58,10 @@ import org.chromium.url.GURL; +@@ -59,6 +59,10 @@ import org.chromium.url.GURL; import java.util.Set; @@ -110,7 +108,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/C /** A SiteSettingsDelegate instance that contains Chrome-specific Site Settings logic. */ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate { public static final String EMBEDDED_CONTENT_HELP_CENTER_URL = -@@ -199,7 +203,7 @@ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate { +@@ -216,7 +220,7 @@ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate { @Override public boolean isHelpAndFeedbackEnabled() { @@ -119,8 +117,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/C } @Override -@@ -312,6 +316,17 @@ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate { - return PrivacySandboxBridge.getFirstPartySetOwner(memberOrigin); +@@ -337,6 +341,17 @@ public class ChromeSiteSettingsDelegate implements SiteSettingsDelegate { + return mPrivacySandboxBridge.getFirstPartySetOwner(memberOrigin); } + @Override @@ -137,31 +135,31 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/C @Override public boolean canLaunchClearBrowsingDataDialog() { return true; -diff --git a/chrome/browser/installable/installed_webapp_bridge.cc b/chrome/browser/installable/installed_webapp_bridge.cc ---- a/chrome/browser/installable/installed_webapp_bridge.cc -+++ b/chrome/browser/installable/installed_webapp_bridge.cc -@@ -18,7 +18,7 @@ using base::android::ScopedJavaLocalRef; - static void JNI_InstalledWebappBridge_NotifyPermissionsChange(JNIEnv* env, - jlong j_provider, - int type) { -- DCHECK_LT(type, static_cast(ContentSettingsType::NUM_TYPES)); -+ DCHECK_LT(type, static_cast(ContentSettingsType::NUM_TYPES_BROMITE)); - InstalledWebappProvider* provider = - reinterpret_cast(j_provider); - provider->Notify(static_cast(type)); +diff --git a/chrome/browser/content_settings/page_specific_content_settings_delegate.cc b/chrome/browser/content_settings/page_specific_content_settings_delegate.cc +--- a/chrome/browser/content_settings/page_specific_content_settings_delegate.cc ++++ b/chrome/browser/content_settings/page_specific_content_settings_delegate.cc +@@ -168,7 +168,7 @@ namespace { + void GetGuestViewDefaultContentSettingRules( + bool incognito, + RendererContentSettingRules* rules) { +- rules->mixed_content_rules.clear(); ++ rules->mixed_content_rules.clear(); // do not remove + rules->mixed_content_rules.push_back(ContentSettingPatternSource( + ContentSettingsPattern::Wildcard(), ContentSettingsPattern::Wildcard(), + content_settings::ContentSettingToValue(CONTENT_SETTING_BLOCK), 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 -@@ -1369,4 +1369,5 @@ +@@ -1489,4 +1489,5 @@ - + +
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 -@@ -51,6 +51,7 @@ import {SiteSettingsPrefsBrowserProxyImpl} from '../site_settings/site_settings_ +@@ -52,6 +52,7 @@ import {SiteSettingsPrefsBrowserProxyImpl} from '../site_settings/site_settings_ import {PrivacyGuideAvailabilityMixin} from './privacy_guide/privacy_guide_availability_mixin.js'; import {getTemplate} from './privacy_page.html.js'; @@ -169,7 +167,7 @@ diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.ts b/ch interface BlockAutoplayStatus { enabled: boolean; -@@ -74,8 +75,82 @@ export class SettingsPrivacyPageElement extends SettingsPrivacyPageElementBase { +@@ -75,8 +76,82 @@ export class SettingsPrivacyPageElement extends SettingsPrivacyPageElementBase { return 'settings-privacy-page'; } @@ -256,7 +254,7 @@ diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.ts b/ch diff --git a/chrome/browser/resources/settings/route.ts b/chrome/browser/resources/settings/route.ts --- a/chrome/browser/resources/settings/route.ts +++ b/chrome/browser/resources/settings/route.ts -@@ -8,6 +8,7 @@ import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; +@@ -8,6 +8,7 @@ import {loadTimeData} from './i18n_setup.js'; import {pageVisibility} from './page_visibility.js'; import type {SettingsRoutes} from './router.js'; import {Route, Router} from './router.js'; @@ -264,9 +262,9 @@ 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, -@@ -141,6 +142,7 @@ function addPrivacyChildRoutes(r: Partial) { - r.SITE_SETTINGS_STORAGE_ACCESS = - r.SITE_SETTINGS.createChild('storageAccess'); +@@ -156,6 +157,7 @@ function addPrivacyChildRoutes(r: Partial) { + r.SITE_SETTINGS_AUTOMATIC_FULLSCREEN = + r.SITE_SETTINGS.createChild('automaticFullScreen'); } + setupContentSettingsRoutes(r); } @@ -296,7 +294,7 @@ diff --git a/chrome/browser/resources/settings/site_settings/settings_category_d diff --git a/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts b/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts --- a/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts +++ b/chrome/browser/resources/settings/site_settings/settings_category_default_radio_group.ts -@@ -30,6 +30,7 @@ import {ContentSettingProvider} from './site_settings_prefs_browser_proxy.js'; +@@ -31,6 +31,7 @@ import {ContentSettingProvider} from './site_settings_prefs_browser_proxy.js'; export enum SiteContentRadioSetting { DISABLED = 0, ENABLED = 1, @@ -304,7 +302,7 @@ diff --git a/chrome/browser/resources/settings/site_settings/settings_category_d } export interface SettingsCategoryDefaultRadioGroupElement { -@@ -77,6 +78,10 @@ export class SettingsCategoryDefaultRadioGroupElement extends +@@ -79,6 +80,10 @@ export class SettingsCategoryDefaultRadioGroupElement extends blockOptionSubLabel: String, blockOptionIcon: String, @@ -315,7 +313,7 @@ diff --git a/chrome/browser/resources/settings/site_settings/settings_category_d siteContentRadioSettingEnum_: { type: Object, value: SiteContentRadioSetting, -@@ -112,6 +117,9 @@ export class SettingsCategoryDefaultRadioGroupElement extends +@@ -114,6 +119,9 @@ export class SettingsCategoryDefaultRadioGroupElement extends blockOptionLabel: string; blockOptionSubLabel: string; blockOptionIcon: string; @@ -325,7 +323,7 @@ diff --git a/chrome/browser/resources/settings/site_settings/settings_category_d private pref_: chrome.settingsPrivate.PrefObject; override ready() { -@@ -122,6 +130,13 @@ export class SettingsCategoryDefaultRadioGroupElement extends +@@ -124,6 +132,13 @@ export class SettingsCategoryDefaultRadioGroupElement extends (category: ContentSettingsTypes) => this.onCategoryChanged_(category)); } @@ -339,7 +337,7 @@ diff --git a/chrome/browser/resources/settings/site_settings/settings_category_d private getAllowOptionForCategory_(): ContentSetting { switch (this.category) { case ContentSettingsTypes.ADS: -@@ -163,6 +178,8 @@ export class SettingsCategoryDefaultRadioGroupElement extends +@@ -169,6 +184,8 @@ export class SettingsCategoryDefaultRadioGroupElement extends // "Ask" vs "Blocked". return ContentSetting.ASK; default: @@ -348,7 +346,7 @@ diff --git a/chrome/browser/resources/settings/site_settings/settings_category_d assertNotReached('Invalid category: ' + this.category); } } -@@ -187,6 +204,7 @@ export class SettingsCategoryDefaultRadioGroupElement extends +@@ -193,6 +210,7 @@ export class SettingsCategoryDefaultRadioGroupElement extends /** @type {!ContentSetting} */ (this.getAllowOptionForCategory_()); this.browserProxy.setDefaultValueForContentType( this.category, @@ -356,12 +354,13 @@ diff --git a/chrome/browser/resources/settings/site_settings/settings_category_d this.categoryEnabled_ ? allowOption : ContentSetting.BLOCK); } -@@ -218,7 +236,9 @@ export class SettingsCategoryDefaultRadioGroupElement extends +@@ -224,7 +242,10 @@ export class SettingsCategoryDefaultRadioGroupElement extends } const enabled = this.computeIsSettingEnabled(update.setting); - const prefValue = enabled ? SiteContentRadioSetting.ENABLED : -+ const ask = this.computeIsSettingAsk(update.setting); ++ const ask = this.computeIsSettingAsk(update.setting) ++ && this.showAskSetting_(this.category); + const prefValue = ask ? SiteContentRadioSetting.ASK : + enabled ? SiteContentRadioSetting.ENABLED : SiteContentRadioSetting.DISABLED; @@ -370,11 +369,11 @@ 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 -@@ -282,4 +282,5 @@ - label="$i18n{siteSettingsAutoPictureInPicture}"> +@@ -308,4 +308,5 @@ + label="$i18n{siteSettingsPointerLock}"> - -+
+ ++
diff --git a/chrome/browser/resources/settings/site_settings/site_details.ts b/chrome/browser/resources/settings/site_settings/site_details.ts --- a/chrome/browser/resources/settings/site_settings/site_details.ts @@ -589,7 +588,7 @@ diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_ { route: routes.SITE_SETTINGS_ADS, id: Id.ADS, -@@ -391,10 +391,36 @@ function getCategoryItemMap(): Map { +@@ -434,10 +434,36 @@ function getCategoryItemMap(): Map { disabledLabel: 'trackingProtectionLinkRowSubLabel', }); } @@ -626,7 +625,7 @@ diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_ function buildItemListFromIds(orderedIdList: ContentSettingsTypes[]): CategoryListItem[] { const map = getCategoryItemMap(); -@@ -486,7 +512,7 @@ export class SettingsSiteSettingsPageElement extends +@@ -523,7 +549,7 @@ export class SettingsSiteSettingsPageElement extends Id.IMAGES, Id.POPUPS, ]), @@ -693,8 +692,8 @@ 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|. -@@ -92,6 +140,13 @@ export function getLocalizationStringForContentType( - case ContentSettingsTypes.SITE_DATA: +@@ -102,6 +150,13 @@ export function getLocalizationStringForContentType( + case ContentSettingsTypes.OFFER_WRITING_HELP: return null; default: + for (let index=0; index < loadTimeData.getInteger("br_cs_count"); index++) { @@ -710,7 +709,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 -@@ -2043,6 +2043,7 @@ static_library("ui") { +@@ -2165,6 +2165,7 @@ static_library("ui") { "//components/commerce/core:shopping_service", "//components/commerce/core/webui", "//components/endpoint_fetcher:endpoint_fetcher", @@ -721,7 +720,7 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn diff --git a/chrome/browser/ui/views/controls/rich_controls_container_view.h b/chrome/browser/ui/views/controls/rich_controls_container_view.h --- a/chrome/browser/ui/views/controls/rich_controls_container_view.h +++ b/chrome/browser/ui/views/controls/rich_controls_container_view.h -@@ -43,6 +43,13 @@ class RichControlsContainerView : public views::FlexLayoutView { +@@ -45,6 +45,13 @@ class RichControlsContainerView : public views::FlexLayoutView { return AddChildView(std::move(control_view)); } @@ -746,7 +745,7 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_main_view.cc b/chrome/b #include "ui/views/view_class_properties.h" #if BUILDFLAG(FULL_SAFE_BROWSING) -@@ -244,8 +245,20 @@ void PageInfoMainView::SetPermissionInfo( +@@ -251,8 +252,20 @@ void PageInfoMainView::SetPermissionInfo( scroll_view->SetDrawOverflowIndicator(false); auto* content_view = scroll_view->SetContents(std::make_unique()); @@ -769,7 +768,7 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_main_view.cc b/chrome/b content_view->SetID(PageInfoViewFactory::VIEW_ID_PAGE_INFO_PERMISSION_VIEW); content_view->SetProperty(views::kElementIdentifierKey, kPermissionsElementId); -@@ -260,17 +273,24 @@ void PageInfoMainView::SetPermissionInfo( +@@ -267,11 +280,16 @@ void PageInfoMainView::SetPermissionInfo( } } @@ -777,7 +776,7 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_main_view.cc b/chrome/b for (const auto& permission : permission_info_list) { + if (++count % 2 == 0) + table_layout->AddRows(/*n=*/1, views::TableLayout::kFixedSize); - auto* toggle_row = + PermissionToggleRowView* toggle_row = content_view->AddChildView(std::make_unique( ui_delegate_, navigation_handler_, permission, should_show_spacer)); toggle_row->AddObserver(this); @@ -785,7 +784,8 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_main_view.cc b/chrome/b + gfx::Insets::TLBR(0, 0, 0, 0)); toggle_row->SetProperty(views::kCrossAxisAlignmentKey, views::LayoutAlignment::kStretch); - toggle_rows_.push_back(std::move(toggle_row)); + syncable_permission_rows_.emplace(permission.type, toggle_row); +@@ -279,6 +297,8 @@ void PageInfoMainView::SetPermissionInfo( } for (auto& object : chosen_object_info_list) { @@ -794,7 +794,7 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_main_view.cc b/chrome/b // The view takes ownership of the object info. auto object_view = std::make_unique( std::move(object), -@@ -281,6 +301,10 @@ void PageInfoMainView::SetPermissionInfo( +@@ -289,6 +309,10 @@ void PageInfoMainView::SetPermissionInfo( content_view->AddChildView(std::move(object_view))); } @@ -808,7 +808,7 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_main_view.cc b/chrome/b diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.cc b/chrome/browser/ui/views/page_info/page_info_view_factory.cc --- a/chrome/browser/ui/views/page_info/page_info_view_factory.cc +++ b/chrome/browser/ui/views/page_info/page_info_view_factory.cc -@@ -25,6 +25,8 @@ +@@ -26,6 +26,8 @@ #include "chrome/browser/ui/views/page_info/page_info_navigation_handler.h" #include "chrome/browser/ui/views/page_info/page_info_permission_content_view.h" #include "chrome/browser/ui/views/page_info/page_info_security_content_view.h" @@ -817,22 +817,23 @@ 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" -@@ -254,7 +256,13 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon( +@@ -246,7 +248,14 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon( ContentSetting setting = info.setting == CONTENT_SETTING_DEFAULT ? info.default_setting : info.setting; -+ return GetPermissionIcon(info, setting); ++ return GetPermissionIcon(info, blocked_on_system_level, setting); +} +// static +const ui::ImageModel PageInfoViewFactory::GetPermissionIcon( + const PageInfo::PermissionInfo& info, ++ bool blocked_on_system_level, + ContentSetting setting) { // For guard content settings and Automatic Picture-in-Picture, ASK is treated // as an "on" state. const bool show_blocked_badge = -@@ -509,6 +517,17 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon( - icon = &kFullscreenIcon; +@@ -530,6 +539,17 @@ const ui::ImageModel PageInfoViewFactory::GetPermissionIcon( + icon = &vector_icons::kPointerLockIcon; break; default: + bool found = false; @@ -852,12 +853,14 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.cc b/chrom diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.h b/chrome/browser/ui/views/page_info/page_info_view_factory.h --- a/chrome/browser/ui/views/page_info/page_info_view_factory.h +++ b/chrome/browser/ui/views/page_info/page_info_view_factory.h -@@ -83,6 +83,9 @@ class PageInfoViewFactory { - static const ui::ImageModel GetPermissionIcon( - const PageInfo::PermissionInfo& info); +@@ -87,6 +87,11 @@ class PageInfoViewFactory { + const PageInfo::PermissionInfo& info, + bool blocked_on_system_level = false); + static const ui::ImageModel GetPermissionIcon( -+ const PageInfo::PermissionInfo& info, ContentSetting setting); ++ const PageInfo::PermissionInfo& info, ++ bool blocked_on_system_level, ++ ContentSetting setting); + // Returns the icon for the given object |info|. static const ui::ImageModel GetChosenObjectIcon( @@ -865,8 +868,8 @@ diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.h b/chrome diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc b/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc --- a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc +++ b/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc -@@ -35,6 +35,30 @@ - #include "ui/views/controls/label.h" +@@ -39,6 +39,30 @@ + #include "ui/views/controls/styled_label.h" #include "ui/views/style/typography.h" #include "ui/views/view_class_properties.h" +#include "components/content_settings/core/browser/content_settings_registry.h" @@ -894,9 +897,9 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc b/c + } +} - PermissionToggleRowView::PermissionToggleRowView( - ChromePageInfoUiDelegate* delegate, -@@ -48,16 +72,12 @@ PermissionToggleRowView::PermissionToggleRowView( + DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(PermissionToggleRowView, + kRowSubTitleCameraElementId); +@@ -62,16 +86,12 @@ PermissionToggleRowView::PermissionToggleRowView( // instead of adding it as the only child. SetUseDefaultFillLayout(true); row_view_ = AddChildView(std::make_unique()); @@ -914,8 +917,8 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc b/c if (permission.requesting_origin.has_value()) { std::u16string requesting_origin_string; switch (permission.type) { -@@ -115,6 +135,90 @@ void PermissionToggleRowView::PermissionChanged() { - } +@@ -167,6 +187,90 @@ void PermissionToggleRowView::UpdatePermission( + UpdateUiOnPermissionChanged(); } +void PermissionToggleRowView::OnShowOptionsMenu() { @@ -1005,7 +1008,7 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc b/c void PermissionToggleRowView::OnToggleButtonPressed() { PageInfoUI::ToggleBetweenAllowAndBlock(permission_); PermissionChanged(); -@@ -123,24 +227,19 @@ void PermissionToggleRowView::OnToggleButtonPressed() { +@@ -175,24 +279,19 @@ void PermissionToggleRowView::OnToggleButtonPressed() { void PermissionToggleRowView::InitForUserSource( bool should_show_spacer_view, const std::u16string& toggle_accessible_name) { @@ -1030,14 +1033,14 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc b/c - gfx::Insets::VH(0, icon_label_spacing)); toggle_button->SetTooltipText(PageInfoUI::PermissionTooltipUiString( permission_.type, permission_.requesting_origin)); - toggle_button->SetAccessibleName(toggle_accessible_name); + toggle_button->GetViewAccessibility().SetName(toggle_accessible_name); - toggle_button_ = row_view_->AddControl(std::move(toggle_button)); + choose_button_ = row_view_->AddControlUnderLabel(std::move(toggle_button)); const int icon_size = GetLayoutConstant(PAGE_INFO_ICON_SIZE); - // TODO(crbug.com/1011533): Remove separate handling of -@@ -187,9 +286,6 @@ void PermissionToggleRowView::InitForUserSource( + // TODO(crbug.com/40101962): Update below code to only display the updated +@@ -250,9 +349,6 @@ void PermissionToggleRowView::InitForUserSource( auto spacer_view = std::make_unique(); spacer_view->SetPreferredSize(gfx::Size(icon_size, icon_size)); spacer_view_ = row_view_->AddControl(std::move(spacer_view)); @@ -1047,8 +1050,8 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc b/c } } } -@@ -245,6 +341,33 @@ void PermissionToggleRowView::UpdateUiOnPermissionChanged() { - state_label_ = row_view_->AddSecondaryLabel(state_text); +@@ -324,6 +420,33 @@ void PermissionToggleRowView::UpdateUiOnPermissionChanged() { + } } } + @@ -1084,8 +1087,8 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.cc b/c diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.h b/chrome/browser/ui/views/page_info/permission_toggle_row_view.h --- a/chrome/browser/ui/views/page_info/permission_toggle_row_view.h +++ b/chrome/browser/ui/views/page_info/permission_toggle_row_view.h -@@ -14,6 +14,11 @@ - #include "ui/base/metadata/metadata_header_macros.h" +@@ -16,6 +16,11 @@ + #include "ui/views/controls/label.h" #include "ui/views/view.h" +#include "components/content_settings/core/browser/website_settings_registry.h" @@ -1096,7 +1099,7 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.h b/ch class ChromePageInfoUiDelegate; class PageInfoNavigationHandler; -@@ -29,7 +34,8 @@ class PageInfoBubbleViewTestApi; +@@ -31,7 +36,8 @@ class PageInfoBubbleViewTestApi; // A view that shows a permission that a site is able to access, and // allows the user to control via toggle whether that access is granted. Has a // button that opens a subpage with more controls. @@ -1106,7 +1109,7 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.h b/ch METADATA_HEADER(PermissionToggleRowView, views::View) public: -@@ -55,6 +61,12 @@ class PermissionToggleRowView : public views::View { +@@ -66,6 +72,12 @@ class PermissionToggleRowView : public views::View { private: friend class test::PageInfoBubbleViewTestApi; @@ -1119,7 +1122,7 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.h b/ch void OnToggleButtonPressed(); void InitForUserSource(bool should_show_spacer_view, const std::u16string& toggle_accessible_name); -@@ -68,6 +80,10 @@ class PermissionToggleRowView : public views::View { +@@ -82,6 +94,10 @@ class PermissionToggleRowView : public views::View { raw_ptr toggle_button_ = nullptr; raw_ptr spacer_view_ = nullptr; @@ -1130,18 +1133,6 @@ diff --git a/chrome/browser/ui/views/page_info/permission_toggle_row_view.h b/ch raw_ptr delegate_ = nullptr; raw_ptr navigation_handler_ = nullptr; -diff --git a/chrome/browser/ui/webui/privacy_sandbox/privacy_sandbox_internals_handler.cc b/chrome/browser/ui/webui/privacy_sandbox/privacy_sandbox_internals_handler.cc ---- a/chrome/browser/ui/webui/privacy_sandbox/privacy_sandbox_internals_handler.cc -+++ b/chrome/browser/ui/webui/privacy_sandbox/privacy_sandbox_internals_handler.cc -@@ -41,7 +41,7 @@ void PrivacySandboxInternalsHandler::ReadPref(const std::string& pref_name, - void PrivacySandboxInternalsHandler::ReadContentSettings( - const ContentSettingsType type, - ReadContentSettingsCallback callback) { -- if (!IsKnownEnumValue(type) || type == ContentSettingsType::NUM_TYPES) { -+ if (!IsKnownEnumValue(type) || type == ContentSettingsType::NUM_TYPES_BROMITE) { - mojo::ReportBadMessage( - "ReadContentSettings received invalid ContentSettingsType"); - return; 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 @@ -1153,7 +1144,7 @@ diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provide #include "build/branding_buildflags.h" #include "build/build_config.h" #include "build/buildflag.h" -@@ -72,6 +73,9 @@ +@@ -74,6 +75,9 @@ #include "components/google/core/common/google_util.h" #include "components/history/core/common/pref_names.h" #include "components/omnibox/common/omnibox_features.h" @@ -1163,7 +1154,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" -@@ -3789,6 +3793,56 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source, +@@ -3717,6 +3721,56 @@ void AddLocalizedStrings(content::WebUIDataSource* html_source, policy_indicator::AddLocalizedStrings(html_source); AddSecurityKeysStrings(html_source); @@ -1223,25 +1214,37 @@ diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provide diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/browser/ui/webui/settings/site_settings_helper.cc --- a/chrome/browser/ui/webui/settings/site_settings_helper.cc +++ b/chrome/browser/ui/webui/settings/site_settings_helper.cc -@@ -42,6 +42,8 @@ - #include "chrome/common/url_constants.h" +@@ -48,6 +48,8 @@ #include "chrome/grit/generated_resources.h" + #include "components/content_settings/core/browser/content_settings_provider.h" #include "components/content_settings/core/browser/host_content_settings_map.h" +#include "components/content_settings/core/browser/website_settings_info.h" +#include "components/content_settings/core/browser/website_settings_registry.h" #include "components/content_settings/core/common/content_settings.h" #include "components/content_settings/core/common/content_settings_pattern.h" - #include "components/content_settings/core/common/content_settings_utils.h" -@@ -219,7 +221,7 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = { - - static_assert(std::size(kContentSettingsTypeGroupNames) == - // ContentSettingsType starts at -1, so add 1 here. -- static_cast(ContentSettingsType::NUM_TYPES) + 1, -+ static_cast(ContentSettingsType::NUM_TYPES_CHROMIUM) + 1, - "kContentSettingsTypeGroupNames should have " - "CONTENT_SETTINGS_NUM_TYPES elements"); + #include "components/content_settings/core/common/content_settings_types.h" +@@ -231,13 +233,13 @@ const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = { + {ContentSettingsType::TOP_LEVEL_TPCD_ORIGIN_TRIAL, nullptr}, + }; -@@ -471,6 +473,13 @@ bool HasRegisteredGroupName(ContentSettingsType type) { +-static_assert( +- std::size(kContentSettingsTypeGroupNames) == +- // Add one since the sequence is kMinValue = -1, 0, ..., kMaxValue +- 1 + static_cast(ContentSettingsType::kMaxValue) - +- static_cast(ContentSettingsType::kMinValue), +- "kContentSettingsTypeGroupNames should have the correct number " +- "of elements"); ++// static_assert( ++// std::size(kContentSettingsTypeGroupNames) == ++// // Add one since the sequence is kMinValue = -1, 0, ..., kMaxValue ++// 1 + static_cast(ContentSettingsType::kMaxValue) - ++// static_cast(ContentSettingsType::kMinValue), ++// "kContentSettingsTypeGroupNames should have the correct number " ++// "of elements"); + + struct SiteSettingSourceStringMapping { + SiteSettingSource source; +@@ -469,6 +471,13 @@ bool HasRegisteredGroupName(ContentSettingsType type) { return true; } } @@ -1255,7 +1258,7 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b return false; } -@@ -484,11 +493,24 @@ ContentSettingsType ContentSettingsTypeFromGroupName(base::StringPiece name) { +@@ -482,11 +491,24 @@ ContentSettingsType ContentSettingsTypeFromGroupName(std::string_view name) { return entry.type; } } @@ -1270,7 +1273,7 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b return ContentSettingsType::DEFAULT; } - base::StringPiece ContentSettingsTypeToGroupName(ContentSettingsType type) { + std::string_view ContentSettingsTypeToGroupName(ContentSettingsType type) { + content_settings::WebsiteSettingsRegistry* website_settings = + content_settings::WebsiteSettingsRegistry::GetInstance(); + for (const content_settings::WebsiteSettingsInfo* cs : *website_settings) { @@ -1281,16 +1284,16 @@ 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 -@@ -503,7 +525,6 @@ base::StringPiece ContentSettingsTypeToGroupName(ContentSettingsType type) { - return entry.name ? entry.name : base::StringPiece(); +@@ -501,7 +523,6 @@ std::string_view ContentSettingsTypeToGroupName(ContentSettingsType type) { + return entry.name ? entry.name : std::string_view(); } } - - NOTREACHED() << static_cast(type) - << " is not a recognized content settings type."; - return base::StringPiece(); -@@ -587,6 +608,13 @@ const std::vector& GetVisiblePermissionCategories() { - base_types->push_back(ContentSettingsType::SPEAKER_SELECTION); + NOTREACHED_IN_MIGRATION() << static_cast(type) + << " is not a recognized content settings type."; + return std::string_view(); +@@ -599,6 +620,13 @@ std::vector GetVisiblePermissionCategories( + base_types->push_back(ContentSettingsType::POINTER_LOCK); } + content_settings::WebsiteSettingsRegistry* website_settings = @@ -1306,7 +1309,7 @@ diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/b diff --git a/components/browser_ui/settings/android/BUILD.gn b/components/browser_ui/settings/android/BUILD.gn --- a/components/browser_ui/settings/android/BUILD.gn +++ b/components/browser_ui/settings/android/BUILD.gn -@@ -82,6 +82,7 @@ android_resources("java_resources") { +@@ -83,6 +83,7 @@ android_resources("java_resources") { "java/res/layout/managed_disclaimer_preference_for_radio_groups.xml", "java/res/layout/preference_chrome_image_view.xml", "java/res/layout/preference_spinner.xml", @@ -1469,7 +1472,7 @@ diff --git a/components/browser_ui/settings/android/widget/java/src/org/chromium 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 -@@ -141,6 +141,23 @@ android_library("java") { +@@ -147,6 +147,23 @@ android_library("java") { ":site_settings_jni_headers", "//components/content_settings/android:java_pref_names_srcjar", ] @@ -1493,7 +1496,7 @@ diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/b } android_library("javatests") { -@@ -186,6 +203,7 @@ robolectric_library("junit") { +@@ -195,6 +212,7 @@ robolectric_library("junit") { } android_resources("java_resources") { @@ -1504,7 +1507,7 @@ diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/b diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/AllSiteSettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/AllSiteSettings.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/AllSiteSettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/AllSiteSettings.java -@@ -366,7 +366,8 @@ public class AllSiteSettings extends BaseSiteSettingsFragment +@@ -372,7 +372,8 @@ public class AllSiteSettings extends BaseSiteSettingsFragment if (queryHasChanged) getInfoForOrigins(); }); @@ -1514,7 +1517,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c MenuItem help = menu.add( Menu.NONE, -@@ -378,6 +379,8 @@ public class AllSiteSettings extends BaseSiteSettingsFragment +@@ -384,6 +385,8 @@ public class AllSiteSettings extends BaseSiteSettingsFragment getResources(), R.drawable.ic_help_and_feedback, getContext().getTheme())); @@ -1687,7 +1690,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/BromiteCustomContentSettingImpl.java -@@ -0,0 +1,409 @@ +@@ -0,0 +1,412 @@ +/* + This file is part of Bromite. + @@ -1716,6 +1719,7 @@ new file mode 100644 +import org.chromium.components.browser_ui.site_settings.SiteSettingsCategory; +import org.chromium.components.content_settings.ContentSettingValues; +import org.chromium.components.content_settings.ContentSettingsType; ++import org.chromium.components.content_settings.ProviderType; +import org.chromium.content_public.browser.BrowserContextHandle; +import org.chromium.components.browser_ui.settings.ChromeBasePreference; + @@ -1988,8 +1992,10 @@ new file mode 100644 + + Context styledContext = settings.getPreferenceManager().getContext(); + for (BromiteCustomContentSetting cs : mItemList) { ++ String preferenceKey = cs.getPreferenceKey(); ++ if (settings.findPreference(preferenceKey) != null) continue; + ChromeBasePreference pref = new ChromeBasePreference(styledContext); -+ pref.setKey(cs.getPreferenceKey()); ++ pref.setKey(preferenceKey); + pref.setFragment(SingleCategorySettings.class.getCanonicalName()); + preferenceScreen.addPreference(pref); + } @@ -2045,7 +2051,7 @@ new file mode 100644 + ContentSettingException exception = cs.createCustomException(type, value, websiteAddress); + if (exception == null) { + exception = new ContentSettingException( -+ cs.getContentSetting(), websiteAddress.getHost(), value, "", ++ cs.getContentSetting(), websiteAddress.getHost(), value, ProviderType.NONE, + /*isEmbargoed=*/false); + } + return exception; @@ -2147,7 +2153,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c int icon, int title, @ContentSettingValues @Nullable Integer defaultEnabledValue, -@@ -427,6 +427,8 @@ public class ContentSettingsResources { +@@ -415,6 +415,8 @@ public class ContentSettingsResources { R.string.website_settings_category_vr_blocked, R.string.website_settings_category_vr_a11y); } @@ -2156,8 +2162,8 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c assert false; // NOTREACHED return null; } -@@ -590,6 +592,14 @@ public class ContentSettingsResources { - return getResourceItem(contentType, null).getDefaultDisabledValue(); +@@ -573,6 +575,14 @@ public class ContentSettingsResources { + return getResourceItem(contentType).getDefaultDisabledValue(); } + public static int getCategorySummary(int contentType, @@ -2171,7 +2177,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c /** * Returns the string resource id for a given ContentSetting to show with a permission category. * -@@ -752,6 +762,8 @@ public class ContentSettingsResources { +@@ -736,6 +746,8 @@ public class ContentSettingsResources { * Blocked states, in that order. */ public static int[] getTriStateSettingDescriptionIDs(int contentType) { @@ -2183,7 +2189,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java -@@ -329,6 +329,10 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -332,6 +332,10 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment website.site() .getContentSetting( browserContextHandle, mCategory.getContentSettingsType()); @@ -2194,7 +2200,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (contentSetting != null) { return ContentSettingValues.BLOCK == contentSetting; } -@@ -493,6 +497,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -496,6 +500,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment ? new HashSet<>(getArguments().getStringArrayList(EXTRA_SELECTED_DOMAINS)) : null; @@ -2202,7 +2208,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c configureGlobalToggles(); if (mCategory.getType() == SiteSettingsCategory.Type.REQUEST_DESKTOP_SITE) { RecordUserAction.record("DesktopSiteContentSetting.SettingsPage.Entered"); -@@ -523,7 +528,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -526,7 +531,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment if (queryHasChanged) getInfoForOrigins(); }); @@ -2212,7 +2218,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c MenuItem help = menu.add( Menu.NONE, -@@ -535,12 +541,20 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -538,12 +544,20 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment getResources(), R.drawable.ic_help_and_feedback, getContext().getTheme())); @@ -2233,7 +2239,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (mCategory.getType() == SiteSettingsCategory.Type.PROTECTED_MEDIA) { getSiteSettingsDelegate() .launchProtectedContentHelpAndFeedbackActivity(getActivity()); -@@ -612,6 +626,11 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -615,6 +629,11 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment BrowserContextHandle browserContextHandle = getSiteSettingsDelegate().getBrowserContextHandle(); PrefService prefService = UserPrefs.get(browserContextHandle); @@ -2245,7 +2251,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (BINARY_TOGGLE_KEY.equals(preference.getKey())) { assert !mCategory.isManaged(); boolean toggleValue = (boolean) newValue; -@@ -804,6 +823,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -809,6 +828,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment .website_settings_allowed_group_heading_request_desktop_site; break; } @@ -2254,7 +2260,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c assert resource > 0; return getString(resource); } -@@ -919,6 +940,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -924,6 +945,8 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment default: break; } @@ -2263,7 +2269,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c if (allowSpecifyingExceptions) { getPreferenceScreen() .addPreference( -@@ -1107,8 +1130,16 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -1110,8 +1133,16 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment private boolean isBlocked() { switch (mGlobalToggleLayout) { case GlobalToggleLayout.TRI_STATE_TOGGLE: @@ -2280,7 +2286,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c return (triStateToggle.getCheckedSetting() == ContentSettingValues.BLOCK); case GlobalToggleLayout.TRI_STATE_COOKIE_TOGGLE: TriStateCookieSettingsPreference triStateCookieToggle = -@@ -1173,7 +1204,11 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -1178,7 +1209,11 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment } else if (mCategory.getType() == SiteSettingsCategory.Type.STORAGE_ACCESS) { infoText.setSummary(getStorageAccessSummary()); } else { @@ -2293,15 +2299,15 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } // Hide the anti-abuse text preferences, as needed. -@@ -1197,6 +1232,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment - screen.removePreference(antiAbuseThingsToConsiderHeader); - screen.removePreference(antiAbuseThingsToConsiderSectionOne); +@@ -1215,6 +1250,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment + } else { + screen.removePreference(mLocationTriStatePref); } + BromiteCustomContentSettingImpl.configureGlobalToggles(mCategory, this); if (permissionBlockedByOs) { maybeShowOsWarning(screen); -@@ -1348,7 +1384,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -1372,7 +1408,7 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment getSiteSettingsDelegate().getBrowserContextHandle(), contentType); int[] descriptionIds = ContentSettingsResources.getTriStateSettingDescriptionIDs(contentType); @@ -2310,7 +2316,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } private void configureBinaryToggle(ChromeSwitchPreference binaryToggle, int contentType) { -@@ -1459,6 +1495,14 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment +@@ -1496,6 +1532,14 @@ public class SingleCategorySettings extends BaseSiteSettingsFragment @ContentSettingValues Integer value = site.getContentSetting(browserContextHandle, contentSettingsType); @@ -2328,7 +2334,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java -@@ -46,6 +46,7 @@ import java.util.Collection; +@@ -48,6 +48,7 @@ import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -2336,7 +2342,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c /** Shows the permissions and other settings for a particular website. */ public class SingleWebsiteSettings extends BaseSiteSettingsFragment -@@ -164,7 +165,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -166,7 +167,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment case ContentSettingsType.CLIPBOARD_READ_WRITE: return "clipboard_permission_list"; default: @@ -2345,7 +2351,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } } -@@ -534,8 +535,21 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -536,8 +537,21 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment private void setupContentSettingsPreferences() { mMaxPermissionOrder = findPreference(PREF_PERMISSIONS_HEADER).getOrder(); @@ -2369,7 +2375,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c preference.setKey(getPreferenceKey(type)); if (type == ContentSettingsType.ADS) { -@@ -1060,20 +1074,32 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1079,20 +1093,32 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment @ContentSettingValues @Nullable Integer value, boolean isEmbargoed, boolean isOneTime) { @@ -2402,22 +2408,13 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c @ContentSettingsType.EnumType int contentType = getContentSettingsTypeFromPreferenceKey(preference.getKey()); - if (contentType == mHighlightedPermission) { -- switchPreference.setBackgroundColor(mHighlightColor); +- switchPreference.setBackgroundColor( + if (preference instanceof ChromeSwitchPreference && contentType == mHighlightedPermission) { -+ ((ChromeSwitchPreference)switchPreference).setBackgroundColor(mHighlightColor); ++ ((ChromeSwitchPreference)switchPreference).setBackgroundColor( + AppCompatResources.getColorStateList(getContext(), mHighlightColor) + .getDefaultColor()); } - if (isSessionPermission(contentType)) { - switchPreference.setSummary(switchPreference.getSummary() + " " + -@@ -1250,7 +1276,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment - if (mPreferenceMap == null) { - mPreferenceMap = new HashMap<>(); - for (@ContentSettingsType.EnumType int type = 0; -- type < ContentSettingsType.NUM_TYPES; -+ type < ContentSettingsType.NUM_TYPES_BROMITE; - type++) { - String key = getPreferenceKey(type); - if (key != null) { -@@ -1288,14 +1314,20 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1308,14 +1334,20 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment permission = (Boolean) newValue ? ContentSettingValues.ALLOW : ContentSettingValues.BLOCK; } else { @@ -2440,15 +2437,6 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c preference.setIcon(getContentSettingsIcon(type, permission)); if (mWebsiteSettingsObserver != null) { -@@ -1324,7 +1356,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment - // for its logic. This class should maintain its own data model, and only update the screen - // after a change is made. - for (@ContentSettingsType.EnumType int type = 0; -- type < ContentSettingsType.NUM_TYPES; -+ type < ContentSettingsType.NUM_TYPES_BROMITE; - type++) { - String key = getPreferenceKey(type); - if (key != null) { diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java @@ -2478,7 +2466,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. -@@ -142,19 +143,21 @@ public class SiteSettings extends BaseSiteSettingsFragment +@@ -140,19 +141,21 @@ 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. @@ -2505,9 +2493,9 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c + checked + ? ContentSettingsResources.getDefaultEnabledValue(contentType) + : ContentSettingsResources.getDefaultDisabledValue(contentType); -+ p.setSummary( -+ ContentSettingsResources.getCategorySummary( -+ defaultForToggle, /* isOneTime= */ false)); ++ summary = ContentSettingsResources.getCategorySummary( ++ contentType, defaultForToggle, /* isOneTime= */ false); ++ p.setSummary(summary); + } } @@ -2587,7 +2575,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 -@@ -149,6 +149,8 @@ public interface SiteSettingsDelegate { +@@ -174,6 +174,8 @@ public interface SiteSettingsDelegate { */ String getFirstPartySetOwner(String memberOrigin); @@ -2643,7 +2631,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java -@@ -325,7 +325,11 @@ public final class Website implements WebsiteEntry { +@@ -326,7 +326,11 @@ public final class Website implements WebsiteEntry { RecordUserAction.record("SoundContentSetting.UnmuteBy.SiteSettings"); } } @@ -2659,7 +2647,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/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 -@@ -108,7 +108,7 @@ public class WebsitePermissionsFetcher { +@@ -106,7 +106,7 @@ public class WebsitePermissionsFetcher { case ContentSettingsType.USB_GUARD: return WebsitePermissionsType.CHOSEN_OBJECT_INFO; default: @@ -2668,15 +2656,6 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } } -@@ -220,7 +220,7 @@ public class WebsitePermissionsFetcher { - addFetcherForStorage(queue); - queue.add(new CookiesInfoFetcher()); - for (@ContentSettingsType.EnumType int type = 0; -- type < ContentSettingsType.NUM_TYPES; -+ type < ContentSettingsType.NUM_TYPES_BROMITE; - type++) { - addFetcherForContentSettingsType(queue, type); - } 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 @@ -2765,7 +2744,7 @@ new file mode 100644 diff --git a/components/content_settings/android/BUILD.gn b/components/content_settings/android/BUILD.gn --- a/components/content_settings/android/BUILD.gn +++ b/components/content_settings/android/BUILD.gn -@@ -57,6 +57,7 @@ android_library("content_settings_enums_java") { +@@ -87,6 +87,7 @@ android_library("content_settings_enums_java") { } java_cpp_enum("content_settings_enums_javagen") { @@ -2776,7 +2755,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 -@@ -89,6 +89,13 @@ static_library("browser") { +@@ -85,6 +85,13 @@ static_library("browser") { } configs += [ "//build/config/compiler:wexit_time_destructors" ] @@ -2789,7 +2768,7 @@ diff --git a/components/content_settings/core/browser/BUILD.gn b/components/cont + output_file = "bromite_content_settings.inc" } - source_set("unit_tests") { + source_set("cookie_settings") { diff --git a/components/content_settings/core/browser/bromite_content_settings/placeholder.txt b/components/content_settings/core/browser/bromite_content_settings/placeholder.txt new file mode 100644 --- /dev/null @@ -2807,10 +2786,10 @@ diff --git a/components/content_settings/core/browser/content_settings_registry. namespace content_settings { -@@ -730,6 +731,7 @@ void ContentSettingsRegistry::Init() { - WebsiteSettingsRegistry::ALL_PLATFORMS, - ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE, - ContentSettingsInfo::EXCEPTIONS_ON_SECURE_ORIGINS_ONLY); +@@ -779,6 +780,7 @@ void ContentSettingsRegistry::Init() { + WebsiteSettingsRegistry::PLATFORM_ANDROID, + ContentSettingsInfo::INHERIT_IN_INCOGNITO, + ContentSettingsInfo::EXCEPTIONS_ON_SECURE_AND_INSECURE_ORIGINS); +#include "components/content_settings/core/browser/bromite_content_settings.inc" } @@ -2818,17 +2797,19 @@ 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 -@@ -187,8 +187,9 @@ void RecordContentSettingsHistogram(const std::string& name, +@@ -198,11 +198,7 @@ void RecordContentSettingsHistogram(const std::string& name, } int ContentSettingTypeToHistogramValue(ContentSettingsType content_setting) { +- static_assert( +- kHistogramValue.size() == +- // DEFAULT is not in the histogram, so we want [0, kMaxValue] +- 1 + static_cast(ContentSettingsType::kMaxValue), +- "Update content settings histogram lookup"); + if ((true)) return 0; - static_assert(kHistogramValue.size() == -- static_cast(ContentSettingsType::NUM_TYPES), -+ static_cast(ContentSettingsType::NUM_TYPES_CHROMIUM), - "Update content settings histogram lookup"); - auto* found = kHistogramValue.find(content_setting); + auto found = kHistogramValue.find(content_setting); + if (found != kHistogramValue.end()) { diff --git a/components/content_settings/core/browser/content_settings_utils.cc b/components/content_settings/core/browser/content_settings_utils.cc --- a/components/content_settings/core/browser/content_settings_utils.cc +++ b/components/content_settings/core/browser/content_settings_utils.cc @@ -2856,8 +2837,8 @@ diff --git a/components/content_settings/core/browser/content_settings_utils.cc + } + } #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) - rules->image_rules = map->GetSettingsForOneType(ContentSettingsType::IMAGES); rules->mixed_content_rules = + map->GetSettingsForOneType(ContentSettingsType::MIXEDSCRIPT); diff --git a/components/content_settings/core/browser/website_settings_info.h b/components/content_settings/core/browser/website_settings_info.h --- a/components/content_settings/core/browser/website_settings_info.h +++ b/components/content_settings/core/browser/website_settings_info.h @@ -2943,7 +2924,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 -@@ -57,6 +57,13 @@ static_library("common") { +@@ -56,6 +56,13 @@ static_library("common") { "//net", "//url", ] @@ -2966,7 +2947,7 @@ new file mode 100644 diff --git a/components/content_settings/core/common/content_settings.cc b/components/content_settings/core/common/content_settings.cc --- a/components/content_settings/core/common/content_settings.cc +++ b/components/content_settings/core/common/content_settings.cc -@@ -15,6 +15,7 @@ +@@ -16,10 +16,11 @@ #include "components/content_settings/core/common/content_settings_metadata.h" #include "components/content_settings/core/common/content_settings_types.h" #include "components/content_settings/core/common/content_settings_utils.h" @@ -2974,7 +2955,12 @@ diff --git a/components/content_settings/core/common/content_settings.cc b/compo namespace { -@@ -103,6 +104,13 @@ std::ostream& operator<<(std::ostream& os, +-void FilterRulesForType(ContentSettingsForOneType& settings, ++void FilterRulesForType(ContentSettingsForOneType& settings, // do not remove + const GURL& primary_url) { + std::erase_if(settings, + [&primary_url](const ContentSettingPatternSource& source) { +@@ -98,6 +99,13 @@ std::ostream& operator<<(std::ostream& os, // static bool RendererContentSettingRules::IsRendererContentSetting( ContentSettingsType content_type) { @@ -2988,20 +2974,27 @@ diff --git a/components/content_settings/core/common/content_settings.cc b/compo return content_type == ContentSettingsType::IMAGES || content_type == ContentSettingsType::JAVASCRIPT || content_type == ContentSettingsType::POPUPS || -@@ -112,6 +120,9 @@ bool RendererContentSettingRules::IsRendererContentSetting( +@@ -107,7 +115,10 @@ bool RendererContentSettingRules::IsRendererContentSetting( void RendererContentSettingRules::FilterRulesByOutermostMainFrameURL( const GURL& outermost_main_frame_url) { +- FilterRulesForType(mixed_content_rules, outermost_main_frame_url); + for (ContentSettingRuleSource& info : settings_rules) { + FilterRulesForType(info.rules, outermost_main_frame_url); + } - FilterRulesForType(image_rules, outermost_main_frame_url); - FilterRulesForType(script_rules, outermost_main_frame_url); - FilterRulesForType(popup_redirect_rules, outermost_main_frame_url); -@@ -143,3 +154,10 @@ bool RendererContentSettingRules::operator==( - other.popup_redirect_rules, other.mixed_content_rules, - other.auto_dark_content_rules); ++ FilterRulesForType(mixed_content_rules, outermost_main_frame_url); // do not remove } + + RendererContentSettingRules::RendererContentSettingRules() = default; +@@ -127,4 +138,17 @@ RendererContentSettingRules& RendererContentSettingRules::operator=( + RendererContentSettingRules&& rules) = default; + + bool RendererContentSettingRules::operator==( +- const RendererContentSettingRules& other) const = default; ++ const RendererContentSettingRules& other) const { ++ return std::tie(settings_rules, mixed_content_rules) == ++ std::tie(other.settings_rules, other.mixed_content_rules); ++} + +ContentSettingRuleSource::ContentSettingRuleSource() = default; + @@ -3009,10 +3002,13 @@ diff --git a/components/content_settings/core/common/content_settings.cc b/compo + +ContentSettingRuleSource::ContentSettingRuleSource( + const ContentSettingRuleSource&) = default; ++ ++bool ContentSettingRuleSource::operator==( ++ const ContentSettingRuleSource& other) const = default; diff --git a/components/content_settings/core/common/content_settings.h b/components/content_settings/core/common/content_settings.h --- a/components/content_settings/core/common/content_settings.h +++ b/components/content_settings/core/common/content_settings.h -@@ -71,10 +71,20 @@ std::ostream& operator<<(std::ostream& os, +@@ -74,10 +74,22 @@ std::ostream& operator<<(std::ostream& os, typedef std::vector ContentSettingsForOneType; @@ -3023,6 +3019,8 @@ diff --git a/components/content_settings/core/common/content_settings.h b/compon + ContentSettingRuleSource(); + ~ContentSettingRuleSource(); + ContentSettingRuleSource(const ContentSettingRuleSource& source); ++ ++ bool operator==(const ContentSettingRuleSource& other) const; +}; + struct RendererContentSettingRules { @@ -3036,8 +3034,8 @@ diff --git a/components/content_settings/core/common/content_settings.h b/compon diff --git a/components/content_settings/core/common/content_settings.mojom b/components/content_settings/core/common/content_settings.mojom --- a/components/content_settings/core/common/content_settings.mojom +++ b/components/content_settings/core/common/content_settings.mojom -@@ -78,6 +78,11 @@ struct RuleMetaData { - TpcdMetadataRuleSource tpcd_metadata_rule_source; +@@ -71,6 +71,11 @@ struct RuleMetaData { + TpcdMetadataCohort tpcd_metadata_cohort; }; +struct ContentSettingRuleSource { @@ -3048,18 +3046,17 @@ diff --git a/components/content_settings/core/common/content_settings.mojom b/co // This mirrors the C++ type in content_settings.h. struct ContentSettingPatternSource { ContentSettingsPattern primary_pattern; -@@ -91,6 +96,7 @@ struct ContentSettingPatternSource { +@@ -84,5 +89,6 @@ struct ContentSettingPatternSource { // This mirrors the C++ type in content_settings.h. - // TODO(https://crbug.com/1485360): This should be removed. + // TODO(crbug.com/40282541): This should be removed. struct RendererContentSettingRules { + array settings_rules; - array image_rules; - array script_rules; - array popup_redirect_rules; + array mixed_content_rules; + }; diff --git a/components/content_settings/core/common/content_settings_mojom_traits.cc b/components/content_settings/core/common/content_settings_mojom_traits.cc --- a/components/content_settings/core/common/content_settings_mojom_traits.cc +++ b/components/content_settings/core/common/content_settings_mojom_traits.cc -@@ -155,12 +155,22 @@ bool StructTraitsmetadata) && data.ReadSource(&out->source); } @@ -3077,16 +3074,16 @@ diff --git a/components/content_settings/core/common/content_settings_mojom_trai RendererContentSettingRules>:: Read(content_settings::mojom::RendererContentSettingRulesDataView data, RendererContentSettingRules* out) { -- return data.ReadImageRules(&out->image_rules) && +- return data.ReadMixedContentRules(&out->mixed_content_rules); + return data.ReadSettingsRules(&out->settings_rules) && -+ data.ReadImageRules(&out->image_rules) && - data.ReadScriptRules(&out->script_rules) && - data.ReadPopupRedirectRules(&out->popup_redirect_rules) && - data.ReadMixedContentRules(&out->mixed_content_rules) && ++ data.ReadMixedContentRules(&out->mixed_content_rules); + } + + } // namespace mojo diff --git a/components/content_settings/core/common/content_settings_mojom_traits.h b/components/content_settings/core/common/content_settings_mojom_traits.h --- a/components/content_settings/core/common/content_settings_mojom_traits.h +++ b/components/content_settings/core/common/content_settings_mojom_traits.h -@@ -174,10 +174,34 @@ struct StructTraits< +@@ -171,10 +171,34 @@ struct StructTraits< ContentSettingPatternSource* out); }; @@ -3118,37 +3115,23 @@ diff --git a/components/content_settings/core/common/content_settings_mojom_trai + return r.settings_rules; + } + - static const std::vector& image_rules( + static const std::vector& mixed_content_rules( const RendererContentSettingRules& r) { - return r.image_rules; -diff --git a/components/content_settings/core/common/content_settings_param_traits.h b/components/content_settings/core/common/content_settings_param_traits.h ---- a/components/content_settings/core/common/content_settings_param_traits.h -+++ b/components/content_settings/core/common/content_settings_param_traits.h -@@ -9,7 +9,7 @@ - #include "ipc/ipc_message_macros.h" - - IPC_ENUM_TRAITS_MAX_VALUE(ContentSettingsType, -- static_cast(ContentSettingsType::NUM_TYPES) - -+ static_cast(ContentSettingsType::NUM_TYPES_BROMITE) - - 1) - - #endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_CONTENT_SETTINGS_PARAM_TRAITS_H_ + return r.mixed_content_rules; diff --git a/components/content_settings/core/common/content_settings_types.mojom b/components/content_settings/core/common/content_settings_types.mojom --- a/components/content_settings/core/common/content_settings_types.mojom +++ b/components/content_settings/core/common/content_settings_types.mojom -@@ -399,5 +399,7 @@ enum ContentSettingsType { - SPEAKER_SELECTION, - - -- NUM_TYPES, -+ NUM_TYPES_CHROMIUM, +@@ -429,5 +429,6 @@ enum ContentSettingsType { + // BLOCK: Protections enabled. This is the default state. + // ALLOW: Protections disabled. + TRACKING_PROTECTION, +#include "components/content_settings/core/common/bromite_content_settings.inc" -+ NUM_TYPES_BROMITE, }; + // LINT.ThenChange(/tools/metrics/histograms/metadata/settings/enums.xml:SafetyHubPermissionType) 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 -@@ -200,6 +200,39 @@ void ContentSettingsAgentImpl::SendRendererContentSettingRules( +@@ -202,6 +202,49 @@ void ContentSettingsAgentImpl::SendRendererContentSettingRules( std::move(renderer_settings)); } @@ -3176,6 +3159,16 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc + blink::WebLocalFrame* frame = render_frame()->GetWebFrame(); + const GURL secondary_url = + url::Origin(frame->GetDocument().GetSecurityOrigin()).GetURL(); ++ return AllowContentSetting(type, secondary_url, default_value); ++} ++ ++bool ContentSettingsAgentImpl::AllowContentSetting( ++ ContentSettingsType type, ++ const blink::WebURL& secondary_url, ++ bool default_value) { ++ if (!content_setting_rules_) ++ return default_value; ++ + for (ContentSettingRuleSource& info : content_setting_rules_->settings_rules) { + if (info.type == (int)type) { + return CONTENT_SETTING_ALLOW == GetContentSettingFromRules( @@ -3188,13 +3181,24 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc void ContentSettingsAgentImpl::OnContentSettingsAgentRequest( mojo::PendingAssociatedReceiver receiver) { receivers_.Add(this, std::move(receiver)); +@@ -353,7 +396,7 @@ void ContentSettingsAgentImpl::ClearBlockedContentSettings() { + cached_storage_permissions_.clear(); + } + +-bool ContentSettingsAgentImpl::IsAllowlistedForContentSettings() const { ++bool ContentSettingsAgentImpl::IsAllowlistedForContentSettingsCromite() const { + if (should_allowlist_) + return true; + 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 -@@ -76,6 +76,11 @@ class ContentSettingsAgentImpl +@@ -80,6 +80,13 @@ class ContentSettingsAgentImpl static mojom::ContentSettingsManager::StorageType ConvertToMojoStorageType( StorageType storage_type); ++ bool AllowContentSetting( ++ ContentSettingsType type, const blink::WebURL& secondary_url, bool default_value) override; + bool AllowContentSetting( + ContentSettingsType type, bool default_value) override; + ContentSetting GetContentSetting( @@ -3203,6 +3207,15 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.h // blink::WebContentSettingsClient: void AllowStorageAccess(StorageType storage_type, base::OnceCallback callback) override; +@@ -135,7 +142,7 @@ class ContentSettingsAgentImpl + // Helpers. + // True if `render_frame()` contains content that is allowlisted for content + // settings. +- bool IsAllowlistedForContentSettings() const; ++ bool IsAllowlistedForContentSettingsCromite() const; + + // A getter for `content_settings_manager_` that ensures it is bound. + mojom::ContentSettingsManager& GetContentSettingsManager(); 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 @@ -3243,10 +3256,10 @@ diff --git a/components/page_info/android/page_info_controller_android.cc b/comp +#include "components/content_settings/core/browser/website_settings_registry.h" #include "components/content_settings/core/common/content_settings.h" #include "components/content_settings/core/common/content_settings_types.h" - #include "components/page_info/android/jni_headers/PageInfoController_jni.h" -@@ -152,6 +153,15 @@ void PageInfoControllerAndroid::SetPermissionInfo( - permissions_to_display.push_back(ContentSettingsType::STORAGE_ACCESS); + #include "components/page_info/android/page_info_client.h" +@@ -151,6 +152,15 @@ void PageInfoControllerAndroid::SetPermissionInfo( } + permissions_to_display.push_back(ContentSettingsType::STORAGE_ACCESS); + content_settings::WebsiteSettingsRegistry* website_settings = + content_settings::WebsiteSettingsRegistry::GetInstance(); @@ -3260,7 +3273,7 @@ diff --git a/components/page_info/android/page_info_controller_android.cc b/comp std::map user_specified_settings_to_display; std::map -@@ -211,6 +221,14 @@ std::optional PageInfoControllerAndroid::GetSettingToDisplay( +@@ -210,6 +220,14 @@ std::optional PageInfoControllerAndroid::GetSettingToDisplay( return permission.setting; } @@ -3278,15 +3291,15 @@ diff --git a/components/page_info/android/page_info_controller_android.cc b/comp diff --git a/components/page_info/page_info.cc b/components/page_info/page_info.cc --- a/components/page_info/page_info.cc +++ b/components/page_info/page_info.cc -@@ -24,6 +24,7 @@ +@@ -23,6 +23,7 @@ + #include "build/build_config.h" #include "build/chromeos_buildflags.h" #include "components/browsing_data/content/browsing_data_helper.h" - #include "components/content_settings/browser/page_specific_content_settings.h" +#include "components/content_settings/core/browser/website_settings_registry.h" #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" -@@ -1225,6 +1226,14 @@ void PageInfo::PopulatePermissionInfo(PermissionInfo& permission_info, +@@ -1232,6 +1233,14 @@ void PageInfo::PopulatePermissionInfo(PermissionInfo& permission_info, // applies to permissions listed in |kPermissionType|. bool PageInfo::ShouldShowPermission( const PageInfo::PermissionInfo& info) const { @@ -3301,7 +3314,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) { -@@ -1331,7 +1340,19 @@ void PageInfo::PresentSitePermissions() { +@@ -1339,7 +1348,19 @@ void PageInfo::PresentSitePermissions() { HostContentSettingsMap* content_settings = GetContentSettings(); DCHECK(web_contents_); @@ -3333,7 +3346,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" -@@ -615,6 +616,12 @@ PageInfoUI::~PageInfoUI() = default; +@@ -610,6 +611,12 @@ PageInfoUI::~PageInfoUI() = default; // static std::u16string PageInfoUI::PermissionTypeToUIString(ContentSettingsType type) { @@ -3346,7 +3359,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); -@@ -626,6 +633,12 @@ std::u16string PageInfoUI::PermissionTypeToUIString(ContentSettingsType type) { +@@ -621,6 +628,12 @@ std::u16string PageInfoUI::PermissionTypeToUIString(ContentSettingsType type) { // static std::u16string PageInfoUI::PermissionTypeToUIStringMidSentence( ContentSettingsType type) { @@ -3359,7 +3372,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); -@@ -1060,6 +1073,11 @@ bool PageInfoUI::ContentSettingsTypeInPageInfo(ContentSettingsType type) { +@@ -1058,6 +1071,11 @@ bool PageInfoUI::ContentSettingsTypeInPageInfo(ContentSettingsType type) { if (info.type == type) return true; } @@ -3392,21 +3405,25 @@ diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/t #include "third_party/blink/public/common/client_hints/enabled_client_hints.h" #include "third_party/blink/public/mojom/navigation/renderer_content_settings.mojom.h" -@@ -51,6 +52,10 @@ class WebContentSettingsClient { - return enabled_per_settings; - } +@@ -46,6 +47,14 @@ class WebContentSettingsClient { + // Blocks until done. + virtual bool AllowStorageAccessSync(StorageType storage_type) { return true; } + virtual bool AllowContentSetting(ContentSettingsType type, bool enabled_per_settings) { + return enabled_per_settings; + } + - // Controls whether scripts are allowed to execute for this frame. - virtual bool AllowScript(bool enabled_per_settings) { - return enabled_per_settings; ++ virtual bool AllowContentSetting(ContentSettingsType type, const WebURL& secondary_url, bool enabled_per_settings) { ++ return enabled_per_settings; ++ } ++ + // Controls whether insecure scripts are allowed to execute for this frame. + virtual bool AllowRunningInsecureContent(bool enabled_per_settings, + const WebURL&) { 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 -@@ -68,6 +68,22 @@ +@@ -69,6 +69,22 @@ namespace blink { @@ -3440,7 +3457,7 @@ diff --git a/third_party/blink/renderer/core/execution_context/execution_context #include "third_party/blink/renderer/bindings/core/v8/sanitize_script_errors.h" #include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/execution_context/security_context.h" -@@ -102,6 +103,10 @@ class SecurityOrigin; +@@ -103,6 +104,10 @@ class SecurityOrigin; class ScriptState; class ScriptWrappable; class TrustedTypePolicyFactory; diff --git a/build/cromite_patches/Dictionary-suggestions-for-the-Omnibox.patch b/build/cromite_patches/Dictionary-suggestions-for-the-Omnibox.patch index 2795c689..0c454dc6 100644 --- a/build/cromite_patches/Dictionary-suggestions-for-the-Omnibox.patch +++ b/build/cromite_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 -@@ -289,8 +289,17 @@ class LocationBarMediator +@@ -293,8 +293,17 @@ class LocationBarMediator if (mNativeInitialized) RecordUserAction.record("FocusLocation"); // Don't clear Omnibox if the user just pasted text to NTP Omnibox. if (mShouldClearOmniboxOnFocus) { @@ -58,15 +58,15 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow import android.os.SystemClock; import android.text.Editable; import android.text.InputType; -@@ -99,6 +100,7 @@ public abstract class UrlBar extends AutocompleteEditText { +@@ -102,6 +103,7 @@ public abstract class UrlBar extends AutocompleteEditText { private boolean mFocused; private boolean mAllowFocus = true; + private boolean mPendingSelectAll; private boolean mPendingScroll; + private int mLocationBarVerticalInset; - // Captures the current intended text scroll type. -@@ -294,6 +296,27 @@ public abstract class UrlBar extends AutocompleteEditText { +@@ -298,6 +300,27 @@ public abstract class UrlBar extends AutocompleteEditText { mPendingScroll = false; } fixupTextDirection(); diff --git a/build/cromite_patches/Disable-Accessibility-service-by-default.patch b/build/cromite_patches/Disable-Accessibility-service-by-default.patch index 65bf7ebb..ef6ead43 100644 --- a/build/cromite_patches/Disable-Accessibility-service-by-default.patch +++ b/build/cromite_patches/Disable-Accessibility-service-by-default.patch @@ -36,13 +36,13 @@ diff --git a/components/browser_ui/accessibility/android/java/res/xml/accessibil + android:summary="@string/enable_accessibility_summary" + android:title="@string/enable_accessibility_title" /> + - +@@ -27,6 +27,7 @@ found in the LICENSE file. + app:isPreferenceVisible="false" /> IsChild(); +- base::FeatureList::IsEnabled(features::kPrivacyGuideForceAvailable) || +- (!chrome::ShouldDisplayManagedUi(profile) && !profile->IsChild()); + false; html_source->AddBoolean("showPrivacyGuide", show_privacy_guide); - html_source->AddBoolean("enablePrivacyGuide3", base::FeatureList::IsEnabled( + html_source->AddBoolean( diff --git a/cromite_flags/chrome/common/chrome_features_cc/Disable-PrivacyGuide.inc b/cromite_flags/chrome/common/chrome_features_cc/Disable-PrivacyGuide.inc new file mode 100644 --- /dev/null +++ b/cromite_flags/chrome/common/chrome_features_cc/Disable-PrivacyGuide.inc -@@ -0,0 +1,9 @@ -+SET_CROMITE_FEATURE_DISABLED(kPrivacyGuide3); -+SET_CROMITE_FEATURE_DISABLED(kPrivacyGuidePreload); -+ +@@ -0,0 +1,6 @@ +#if BUILDFLAG(IS_ANDROID) + +SET_CROMITE_FEATURE_DISABLED(kPrivacyGuideAndroid3); diff --git a/build/cromite_patches/Disable-StartSurface-feature.patch b/build/cromite_patches/Disable-StartSurface-feature.patch index 4b730709..4ff5bd61 100644 --- a/build/cromite_patches/Disable-StartSurface-feature.patch +++ b/build/cromite_patches/Disable-StartSurface-feature.patch @@ -14,15 +14,15 @@ 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 -@@ -634,7 +634,7 @@ public abstract class ChromeFeatureList { +@@ -668,7 +668,7 @@ public abstract class ChromeFeatureList { public static final CachedFlag sSmallerTabStripTitleLimit = - newCachedFlag(SMALLER_TAB_STRIP_TITLE_LIMIT, false); + newCachedFlag(SMALLER_TAB_STRIP_TITLE_LIMIT, true); public static final CachedFlag sStartSurfaceAndroid = - newCachedFlag(START_SURFACE_ANDROID, true); + newCachedFlag(START_SURFACE_ANDROID, false); - public static final CachedFlag sStartSurfaceOnTablet = - newCachedFlag(START_SURFACE_ON_TABLET, true); - public static final CachedFlag sStartSurfaceRefactor = + public static final CachedFlag sStartSurfaceReturnTime = + newCachedFlag(START_SURFACE_RETURN_TIME, true); + public static final CachedFlag sStopAppIndexingReport = diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Disable-StartSurface-feature.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Disable-StartSurface-feature.inc new file mode 100644 --- /dev/null diff --git a/build/cromite_patches/Disable-TLS-resumption.patch b/build/cromite_patches/Disable-TLS-resumption.patch index 3fb174e0..369b5e5f 100644 --- a/build/cromite_patches/Disable-TLS-resumption.patch +++ b/build/cromite_patches/Disable-TLS-resumption.patch @@ -79,7 +79,7 @@ new file mode 100644 diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc --- a/net/http/http_network_session.cc +++ b/net/http/http_network_session.cc -@@ -208,6 +208,7 @@ HttpNetworkSession::HttpNetworkSession(const HttpNetworkSessionParams& params, +@@ -209,6 +209,7 @@ HttpNetworkSession::HttpNetworkSession(const HttpNetworkSessionParams& params, next_protos_.push_back(kProtoHTTP11); @@ -90,7 +90,7 @@ diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc diff --git a/net/quic/quic_session_pool.cc b/net/quic/quic_session_pool.cc --- a/net/quic/quic_session_pool.cc +++ b/net/quic/quic_session_pool.cc -@@ -69,6 +69,7 @@ +@@ -78,6 +78,7 @@ #include "net/third_party/quiche/src/quiche/quic/platform/api/quic_flags.h" #include "net/traffic_annotation/network_traffic_annotation.h" #include "third_party/boringssl/src/include/openssl/aead.h" @@ -98,7 +98,7 @@ diff --git a/net/quic/quic_session_pool.cc b/net/quic/quic_session_pool.cc #include "url/gurl.h" #include "url/scheme_host_port.h" #include "url/url_constants.h" -@@ -156,6 +157,38 @@ std::set HostsFromOrigins(std::set origins) { +@@ -195,6 +196,38 @@ void LogUsingExistingSession(const NetLogWithSource& request_net_log, } // namespace @@ -137,7 +137,7 @@ diff --git a/net/quic/quic_session_pool.cc b/net/quic/quic_session_pool.cc QuicSessionRequest::QuicSessionRequest(QuicSessionPool* pool) : pool_(pool) {} QuicSessionRequest::~QuicSessionRequest() { -@@ -1716,7 +1749,7 @@ QuicSessionPool::CreateCryptoConfigHandle( +@@ -1881,7 +1914,7 @@ QuicSessionPool::CreateCryptoConfigHandle( cert_verifier_, transport_security_state_, sct_auditing_delegate_, HostsFromOrigins(params_.origins_to_force_quic_on), actual_network_anonymization_key), @@ -149,7 +149,7 @@ diff --git a/net/quic/quic_session_pool.cc b/net/quic/quic_session_pool.cc diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket_impl.cc --- a/net/socket/ssl_client_socket_impl.cc +++ b/net/socket/ssl_client_socket_impl.cc -@@ -380,7 +380,33 @@ SSLClientSocketImpl::SSLClientSocketImpl( +@@ -293,7 +293,33 @@ SSLClientSocketImpl::SSLClientSocketImpl( CHECK(context_); } @@ -183,7 +183,7 @@ diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket Disconnect(); } -@@ -764,6 +790,8 @@ int SSLClientSocketImpl::Init() { +@@ -677,6 +703,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(); -@@ -1062,6 +1090,35 @@ int SSLClientSocketImpl::DoHandshakeComplete(int result) { +@@ -963,6 +991,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. -@@ -1699,6 +1756,8 @@ bool SSLClientSocketImpl::IsRenegotiationAllowed() const { +@@ -1588,6 +1645,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 -@@ -124,6 +124,8 @@ class SSLClientSocketImpl : public SSLClientSocket, +@@ -125,6 +125,8 @@ class SSLClientSocketImpl : public SSLClientSocket, friend class SSLClientSocket; friend class SSLContext; diff --git a/build/cromite_patches/Disable-all-predictors-code.patch b/build/cromite_patches/Disable-all-predictors-code.patch index df28baa1..443d280b 100644 --- a/build/cromite_patches/Disable-all-predictors-code.patch +++ b/build/cromite_patches/Disable-all-predictors-code.patch @@ -5,43 +5,47 @@ Subject: Disable all predictors code Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/BUILD.gn | 2 -- - .../preloading_model_keyed_service.cc | 1 + - .../preloading_model_keyed_service_factory.cc | 4 +-- - .../chrome_hints_manager.cc | 1 + - .../model_validator_keyed_service.cc | 7 +++++- - .../optimization_guide_keyed_service.cc | 1 - - .../predictors/loading_predictor_config.cc | 4 +-- - .../browser/predictors/predictors_features.cc | 11 ++------ - chrome/browser/ui/tab_helpers.cc | 1 - - .../ui/webui/omnibox/omnibox_page_handler.cc | 14 +++++++++++ - .../browser/autofill_optimization_guide.cc | 5 ++-- - .../metrics/shadow_prediction_metrics.cc | 2 +- - .../browser/autocomplete_controller.cc | 2 ++ - .../optimization_guide/core/hints_fetcher.cc | 1 + - .../optimization_guide/core/hints_manager.cc | 5 ++++ - .../core/optimization_guide_features.cc | 25 +++++++++++-------- - .../core/prediction_model_download_manager.cc | 6 +++-- - .../core/prediction_model_fetcher_impl.cc | 1 + - components/optimization_guide/features.gni | 3 +-- - .../phishing_classifier.cc | 2 +- - components/search/ntp_features.cc | 3 +++ - .../Disable-all-predictors-code.inc | 4 +++ - .../Disable-all-predictors-code.inc | 7 ++++++ - .../Disable-all-predictors-code.inc | 4 +++ - .../Disable-all-predictors-code.inc | 2 ++ - .../document_speculation_rules.cc | 1 + - .../platform/runtime_enabled_features.json5 | 2 +- - 27 files changed, 83 insertions(+), 38 deletions(-) + chrome/browser/BUILD.gn | 2 -- + .../preloading_model_keyed_service.cc | 3 +++ + .../preloading_model_keyed_service_factory.cc | 4 +--- + .../optimization_guide/chrome_hints_manager.cc | 1 + + .../model_validator_keyed_service.cc | 6 +++++- + .../optimization_guide_keyed_service.cc | 1 - + .../predictors/loading_predictor_config.cc | 4 ++-- + chrome/browser/predictors/predictors_features.cc | 3 +-- + chrome/browser/ui/tab_helpers.cc | 1 - + .../ui/webui/omnibox/omnibox_page_handler.cc | 2 ++ + chrome/utility/BUILD.gn | 2 +- + chrome/utility/services.cc | 8 -------- + .../core/browser/autofill_optimization_guide.cc | 5 +++-- + .../omnibox/browser/autocomplete_controller.cc | 4 ++++ + .../optimization_guide/core/hints_fetcher.cc | 1 + + .../optimization_guide/core/hints_manager.cc | 5 +++++ + .../core/optimization_guide_features.cc | 15 +++++++++------ + .../core/prediction_model_download_manager.cc | 6 ++++-- + .../core/prediction_model_fetcher_impl.cc | 1 + + components/optimization_guide/features.gni | 3 +-- + .../core/page_content_annotations_features.cc | 5 +++++ + components/search/ntp_features.cc | 3 +++ + .../Disable-all-predictors-code.inc | 4 ++++ + .../Disable-all-predictors-code.inc | 1 + + .../features_cc/Disable-all-predictors-code.inc | 4 ++++ + .../features_cc/Disable-all-predictors-code.inc | 1 + + .../features_cc/Disable-all-predictors-code.inc | 2 ++ + services/webnn/features.gni | 2 +- + .../document_speculation_rules.cc | 1 + + .../platform/runtime_enabled_features.json5 | 2 +- + 30 files changed, 67 insertions(+), 35 deletions(-) create mode 100644 cromite_flags/chrome/browser/browser_features_cc/Disable-all-predictors-code.inc create mode 100644 cromite_flags/chrome/common/chrome_features_cc/Disable-all-predictors-code.inc create mode 100644 cromite_flags/components/permissions/features_cc/Disable-all-predictors-code.inc + create mode 100644 cromite_flags/services/network/public/cpp/features_cc/Disable-all-predictors-code.inc create mode 100644 cromite_flags/third_party/blink/common/features_cc/Disable-all-predictors-code.inc diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -851,8 +851,6 @@ static_library("browser") { +@@ -842,8 +842,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", @@ -53,7 +57,22 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn diff --git a/chrome/browser/navigation_predictor/preloading_model_keyed_service.cc b/chrome/browser/navigation_predictor/preloading_model_keyed_service.cc --- a/chrome/browser/navigation_predictor/preloading_model_keyed_service.cc +++ b/chrome/browser/navigation_predictor/preloading_model_keyed_service.cc -@@ -16,6 +16,7 @@ PreloadingModelKeyedService::Inputs::Inputs() = default; +@@ -11,6 +11,7 @@ + #include "chrome/browser/navigation_predictor/preloading_model_handler.h" + #endif + ++#if BUILDFLAG(BUILD_WITH_TFLITE_LIB) + namespace { + + // The model takes all of its inputs as floats, so this is a convenience +@@ -28,12 +29,14 @@ constexpr float ToInput(base::TimeDelta val) { + static_assert(1.0f == ToInput(true)); + + } // namespace ++#endif + + PreloadingModelKeyedService::Inputs::Inputs() = default; + PreloadingModelKeyedService::PreloadingModelKeyedService( OptimizationGuideKeyedService* optimization_guide_keyed_service) { #if BUILDFLAG(BUILD_WITH_TFLITE_LIB) @@ -87,15 +106,7 @@ diff --git a/chrome/browser/optimization_guide/chrome_hints_manager.cc b/chrome/ diff --git a/chrome/browser/optimization_guide/model_validator_keyed_service.cc b/chrome/browser/optimization_guide/model_validator_keyed_service.cc --- a/chrome/browser/optimization_guide/model_validator_keyed_service.cc +++ b/chrome/browser/optimization_guide/model_validator_keyed_service.cc -@@ -8,6 +8,7 @@ - #include "base/files/file_util.h" - #include "base/task/sequenced_task_runner.h" - #include "base/task/task_traits.h" -+#include "base/task/thread_pool.h" - #include "build/build_config.h" - #include "chrome/browser/profiles/profile.h" - #include "chrome/browser/signin/identity_manager_factory.h" -@@ -55,13 +56,13 @@ namespace optimization_guide { +@@ -53,13 +53,13 @@ namespace optimization_guide { ModelValidatorKeyedService::ModelValidatorKeyedService(Profile* profile) : profile_(profile) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -110,7 +121,7 @@ diff --git a/chrome/browser/optimization_guide/model_validator_keyed_service.cc if (switches::ShouldValidateModel()) { // Create the validator object which will get destroyed when the model // load is complete. -@@ -122,6 +123,7 @@ void ModelValidatorKeyedService::OnPrimaryAccountChanged( +@@ -120,6 +120,7 @@ void ModelValidatorKeyedService::OnPrimaryAccountChanged( void ModelValidatorKeyedService::StartModelExecutionValidation() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -118,15 +129,15 @@ diff --git a/chrome/browser/optimization_guide/model_validator_keyed_service.cc auto* opt_guide_service = OptimizationGuideKeyedServiceFactory::GetForProfile(profile_); if (!opt_guide_service) { -@@ -139,6 +141,7 @@ void ModelValidatorKeyedService::StartModelExecutionValidation() { - proto::ModelExecutionFeature::MODEL_EXECUTION_FEATURE_TEST, request, +@@ -137,6 +138,7 @@ void ModelValidatorKeyedService::StartModelExecutionValidation() { + ModelBasedCapabilityKey::kTest, request, base::BindOnce(&ModelValidatorKeyedService::OnModelExecuteResponse, weak_ptr_factory_.GetWeakPtr())); +#endif } void ModelValidatorKeyedService::StartOnDeviceModelExecutionValidation( -@@ -156,6 +159,7 @@ void ModelValidatorKeyedService::StartOnDeviceModelExecutionValidation( +@@ -154,6 +156,7 @@ void ModelValidatorKeyedService::StartOnDeviceModelExecutionValidation( void ModelValidatorKeyedService::PerformOnDeviceModelExecutionValidation( std::unique_ptr request) { @@ -134,7 +145,7 @@ diff --git a/chrome/browser/optimization_guide/model_validator_keyed_service.cc DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); auto* opt_guide_service = OptimizationGuideKeyedServiceFactory::GetForProfile(profile_); -@@ -168,6 +172,7 @@ void ModelValidatorKeyedService::PerformOnDeviceModelExecutionValidation( +@@ -167,6 +170,7 @@ void ModelValidatorKeyedService::PerformOnDeviceModelExecutionValidation( *request, base::RepeatingCallback(base::BindRepeating( &ModelValidatorKeyedService::OnDeviceModelExecuteResponse, weak_ptr_factory_.GetWeakPtr()))); @@ -145,7 +156,7 @@ diff --git a/chrome/browser/optimization_guide/model_validator_keyed_service.cc 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 -@@ -528,7 +528,6 @@ void OptimizationGuideKeyedService::RemoveObserverForOptimizationTargetModel( +@@ -544,7 +544,6 @@ void OptimizationGuideKeyedService::RemoveObserverForOptimizationTargetModel( void OptimizationGuideKeyedService::RegisterOptimizationTypes( const std::vector& optimization_types) { @@ -170,41 +181,20 @@ diff --git a/chrome/browser/predictors/loading_predictor_config.cc b/chrome/brow diff --git a/chrome/browser/predictors/predictors_features.cc b/chrome/browser/predictors/predictors_features.cc --- a/chrome/browser/predictors/predictors_features.cc +++ b/chrome/browser/predictors/predictors_features.cc -@@ -39,11 +39,7 @@ BASE_FEATURE(kLoadingPredictorDisregardAlwaysAccessesNetwork, - - const base::FeatureState - kLoadingPredictorUseOptimizationGuideDefaultFeatureState = --#if BUILDFLAG(IS_ANDROID) -- base::FEATURE_ENABLED_BY_DEFAULT; --#else -- base::FEATURE_DISABLED_BY_DEFAULT; --#endif -+ base::FEATURE_DISABLED_BY_DEFAULT; - - // Modifies loading predictor so that it can also use predictions coming from - // the optimization guide. -@@ -52,11 +48,7 @@ BASE_FEATURE(kLoadingPredictorUseOptimizationGuide, - kLoadingPredictorUseOptimizationGuideDefaultFeatureState); +@@ -12,8 +12,7 @@ namespace features { + namespace { - const base::FeatureState kLoadingPredictorPrefetchDefaultFeatureState = --#if BUILDFLAG(IS_ANDROID) -- base::FEATURE_ENABLED_BY_DEFAULT; --#else - base::FEATURE_DISABLED_BY_DEFAULT; --#endif + constexpr base::FeatureState kFeatureEnabledOnlyOnAndroid = +- BUILDFLAG(IS_ANDROID) ? base::FEATURE_ENABLED_BY_DEFAULT +- : base::FEATURE_DISABLED_BY_DEFAULT; ++ base::FEATURE_DISABLED_BY_DEFAULT; - // Modifies loading predictor so that it does prefetches of subresources instead - // of preconnects. -@@ -103,4 +95,5 @@ size_t GetMaxInflightPrefetches() { - 3)); - } + } // namespace -+SET_CROMITE_FEATURE_DISABLED(kLoadingPredictorUseLocalPredictions); - } // namespace features diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc --- a/chrome/browser/ui/tab_helpers.cc +++ b/chrome/browser/ui/tab_helpers.cc -@@ -414,7 +414,6 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { +@@ -435,7 +435,6 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { } MixedContentSettingsTabHelper::CreateForWebContents(web_contents); NavigationMetricsRecorder::CreateForWebContents(web_contents); @@ -220,61 +210,52 @@ diff --git a/chrome/browser/ui/webui/omnibox/omnibox_page_handler.cc b/chrome/br #include "components/omnibox/browser/autocomplete_provider.h" #include "components/omnibox/browser/autocomplete_result.h" +#if BUILDFLAG(BUILD_WITH_TFLITE_LIB) - #include "components/omnibox/browser/autocomplete_scoring_model_service.h" -+#endif #include "components/omnibox/browser/omnibox_field_trial.h" ++#endif + #include "components/optimization_guide/machine_learning_tflite_buildflags.h" #include "components/search_engines/template_url.h" #include "content/public/browser/web_ui.h" -@@ -498,6 +500,7 @@ void OmniboxPageHandler::StartOmniboxQuery(const std::string& input_string, - } - - void OmniboxPageHandler::GetMlModelVersion(GetMlModelVersionCallback callback) { -+#if BUILDFLAG(BUILD_WITH_TFLITE_LIB) - if (auto* service = GetMlService()) { - auto version = service->GetModelVersion(); - if (version == -1) { -@@ -510,10 +513,14 @@ void OmniboxPageHandler::GetMlModelVersion(GetMlModelVersionCallback callback) { - } else { - std::move(callback).Run(-1); - } -+#else -+ std::move(callback).Run(-1); -+#endif +diff --git a/chrome/utility/BUILD.gn b/chrome/utility/BUILD.gn +--- a/chrome/utility/BUILD.gn ++++ b/chrome/utility/BUILD.gn +@@ -65,7 +65,7 @@ static_library("utility") { + "//printing/buildflags", + "//services/data_decoder:lib", + "//services/network:network_service", +- "//services/passage_embeddings:passage_embeddings", ++ # "//services/passage_embeddings:passage_embeddings", + "//services/passage_embeddings/public/mojom", + "//services/screen_ai/buildflags", + "//services/service_manager/public/cpp", +diff --git a/chrome/utility/services.cc b/chrome/utility/services.cc +--- a/chrome/utility/services.cc ++++ b/chrome/utility/services.cc +@@ -250,13 +250,6 @@ auto RunMirroringService( + std::move(receiver), content::UtilityThread::Get()->GetIOTaskRunner()); } - void OmniboxPageHandler::StartMl(mojom::SignalsPtr mojom_signals, - StartMlCallback callback) { -+#if BUILDFLAG(BUILD_WITH_TFLITE_LIB) - if (auto* service = GetMlService()) { - AutocompleteMatch::ScoringSignals signals = - mojo::ConvertTo(mojom_signals); -@@ -523,6 +530,9 @@ void OmniboxPageHandler::StartMl(mojom::SignalsPtr mojom_signals, - } else { - std::move(callback).Run(-1); - } -+#else -+ std::move(callback).Run(-1); -+#endif - } +-auto RunPassageEmbeddingsService( +- mojo::PendingReceiver +- receiver) { +- return std::make_unique( +- std::move(receiver)); +-} +- + #endif // !BUILDFLAG(IS_ANDROID) - std::unique_ptr OmniboxPageHandler::CreateController( -@@ -547,8 +557,12 @@ OmniboxPageHandler::GetAutocompleteControllerType( - } + #if BUILDFLAG(ENABLE_BROWSER_SPEECH_SERVICE) +@@ -463,7 +456,6 @@ void RegisterMainThreadServices(mojo::ServiceFactory& services) { + #if !BUILDFLAG(IS_ANDROID) + services.Add(RunProfileImporter); + services.Add(RunMirroringService); +- services.Add(RunPassageEmbeddingsService); + #endif // !BUILDFLAG(IS_ANDROID) - AutocompleteScoringModelService* OmniboxPageHandler::GetMlService() { -+#if BUILDFLAG(BUILD_WITH_TFLITE_LIB) - return OmniboxFieldTrial::IsMlUrlScoringEnabled() - ? AutocompleteScoringModelServiceFactory::GetInstance() - ->GetForProfile(profile_) - : nullptr; -+#else -+ return nullptr; -+#endif - } + #if BUILDFLAG(ENABLE_BROWSER_SPEECH_SERVICE) diff --git a/components/autofill/core/browser/autofill_optimization_guide.cc b/components/autofill/core/browser/autofill_optimization_guide.cc --- a/components/autofill/core/browser/autofill_optimization_guide.cc +++ b/components/autofill/core/browser/autofill_optimization_guide.cc -@@ -163,6 +163,7 @@ void AutofillOptimizationGuide::OnDidParseForm( +@@ -172,6 +172,7 @@ void AutofillOptimizationGuide::OnDidParseForm( // If we do not have any optimization types to register, do not do anything. if (!optimization_types.empty()) { // Register all optimization types that we need based on `form_structure`. @@ -282,7 +263,7 @@ diff --git a/components/autofill/core/browser/autofill_optimization_guide.cc b/c decider_->RegisterOptimizationTypes( std::vector( std::move(optimization_types).extract())); -@@ -214,7 +215,7 @@ bool AutofillOptimizationGuide::ShouldBlockSingleFieldSuggestions( +@@ -223,7 +224,7 @@ bool AutofillOptimizationGuide::ShouldBlockSingleFieldSuggestions( AutofillField* field) const { // If the field's storable type is `IBAN_VALUE`, check whether IBAN // suggestions should be blocked based on `url`. @@ -291,47 +272,51 @@ diff --git a/components/autofill/core/browser/autofill_optimization_guide.cc b/c optimization_guide::OptimizationGuideDecision decision = decider_->CanApplyOptimization( url, optimization_guide::proto::IBAN_AUTOFILL_BLOCKED, -@@ -240,7 +241,7 @@ bool AutofillOptimizationGuide::ShouldBlockFormFieldSuggestion( - const CreditCard* card) const { +@@ -249,7 +250,7 @@ bool AutofillOptimizationGuide::ShouldBlockFormFieldSuggestion( + const CreditCard& card) const { if (auto optimization_type = - GetVcnMerchantOptOutOptimizationTypeForCard(*card); + GetVcnMerchantOptOutOptimizationTypeForCard(card); - optimization_type != optimization_guide::proto::TYPE_UNSPECIFIED) { + decider_ && optimization_type != optimization_guide::proto::TYPE_UNSPECIFIED) { optimization_guide::OptimizationGuideDecision decision = decider_->CanApplyOptimization(url, optimization_type, /*optimization_metadata=*/nullptr); -diff --git a/components/autofill/core/browser/metrics/shadow_prediction_metrics.cc b/components/autofill/core/browser/metrics/shadow_prediction_metrics.cc ---- a/components/autofill/core/browser/metrics/shadow_prediction_metrics.cc -+++ b/components/autofill/core/browser/metrics/shadow_prediction_metrics.cc -@@ -74,7 +74,7 @@ void LogRegexShadowPredictions(const AutofillField& field) { - - void LogMlShadowPredictions(const AutofillField& field) { - #if !BUILDFLAG(BUILD_WITH_TFLITE_LIB) -- return; -+ if ((true)) return; - #endif - if (!base::FeatureList::IsEnabled(features::kAutofillModelPredictions)) { - return; diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/omnibox/browser/autocomplete_controller.cc --- a/components/omnibox/browser/autocomplete_controller.cc +++ b/components/omnibox/browser/autocomplete_controller.cc -@@ -47,7 +47,9 @@ +@@ -46,7 +46,9 @@ + #include "components/omnibox/browser/autocomplete_input.h" #include "components/omnibox/browser/autocomplete_match_type.h" #include "components/omnibox/browser/autocomplete_provider.h" - #include "components/omnibox/browser/autocomplete_provider_client.h" +#if BUILDFLAG(BUILD_WITH_TFLITE_LIB) - #include "components/omnibox/browser/autocomplete_scoring_model_service.h" + #include "components/omnibox/browser/autocomplete_provider_client.h" +#endif #include "components/omnibox/browser/autocomplete_scoring_signals_annotator.h" #include "components/omnibox/browser/bookmark_provider.h" #include "components/omnibox/browser/bookmark_scoring_signals_annotator.h" +@@ -119,6 +121,7 @@ using ProviderType = AutocompleteProvider::Type; + + constexpr bool is_android = !!BUILDFLAG(IS_ANDROID); + ++#if BUILDFLAG(BUILD_WITH_TFLITE_LIB) + void RecordMlScoreCoverage(size_t matches_with_non_null_scores, + size_t total_scored_matches) { + int percent_score_coverage = +@@ -207,6 +210,7 @@ void RecordScoringSignalCoverageForProvider( + pair.second); + } + } ++#endif + + // Appends available autocompletion of the given type, subtype, and number to + // the existing available autocompletions string, encoding according to the diff --git a/components/optimization_guide/core/hints_fetcher.cc b/components/optimization_guide/core/hints_fetcher.cc --- a/components/optimization_guide/core/hints_fetcher.cc +++ b/components/optimization_guide/core/hints_fetcher.cc -@@ -183,6 +183,7 @@ bool HintsFetcher::FetchOptimizationGuideServiceHints( +@@ -185,6 +185,7 @@ bool HintsFetcher::FetchOptimizationGuideServiceHints( bool skip_cache, HintsFetchedCallback hints_fetched_callback, - proto::RequestContextMetadata* request_context_metadata) { + std::optional request_context_metadata) { + if ((true)) return false; DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_GT(optimization_types.size(), 0u); @@ -339,7 +324,7 @@ diff --git a/components/optimization_guide/core/hints_fetcher.cc b/components/op diff --git a/components/optimization_guide/core/hints_manager.cc b/components/optimization_guide/core/hints_manager.cc --- a/components/optimization_guide/core/hints_manager.cc +++ b/components/optimization_guide/core/hints_manager.cc -@@ -390,6 +390,7 @@ void HintsManager::Shutdown() { +@@ -393,6 +393,7 @@ void HintsManager::Shutdown() { OptimizationGuideDecision HintsManager::GetOptimizationGuideDecisionFromOptimizationTypeDecision( OptimizationTypeDecision optimization_type_decision) { @@ -347,15 +332,15 @@ diff --git a/components/optimization_guide/core/hints_manager.cc b/components/op switch (optimization_type_decision) { case OptimizationTypeDecision::kAllowedByOptimizationFilter: case OptimizationTypeDecision::kAllowedByHint: -@@ -1110,6 +1111,7 @@ void HintsManager::CanApplyOptimizationOnDemand( +@@ -1116,6 +1117,7 @@ void HintsManager::CanApplyOptimizationOnDemand( OnDemandOptimizationGuideDecisionRepeatingCallback callback, - proto::RequestContextMetadata* request_context_metadata) { + std::optional request_context_metadata) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + if ((true)) return; // no consent on bromite InsertionOrderedSet urls_to_fetch; InsertionOrderedSet hosts_to_fetch; -@@ -1416,6 +1418,9 @@ OptimizationTypeDecision HintsManager::CanApplyOptimization( +@@ -1421,6 +1423,9 @@ OptimizationTypeDecision HintsManager::CanApplyOptimization( bool skip_cache, OptimizationMetadata* optimization_metadata) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -368,16 +353,9 @@ diff --git a/components/optimization_guide/core/hints_manager.cc b/components/op diff --git a/components/optimization_guide/core/optimization_guide_features.cc b/components/optimization_guide/core/optimization_guide_features.cc --- a/components/optimization_guide/core/optimization_guide_features.cc +++ b/components/optimization_guide/core/optimization_guide_features.cc -@@ -37,18 +37,10 @@ namespace features { +@@ -37,11 +37,7 @@ namespace features { namespace { - constexpr auto enabled_by_default_desktop_only = --#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) - base::FEATURE_DISABLED_BY_DEFAULT; --#else -- base::FEATURE_ENABLED_BY_DEFAULT; --#endif - constexpr auto enabled_by_default_mobile_only = -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) - base::FEATURE_ENABLED_BY_DEFAULT; @@ -385,9 +363,9 @@ diff --git a/components/optimization_guide/core/optimization_guide_features.cc b base::FEATURE_DISABLED_BY_DEFAULT; -#endif - // Returns whether |locale| is a supported locale for |feature|. - // -@@ -575,8 +567,7 @@ size_t MaxURLKeyedHintCacheSize() { + } // namespace + +@@ -430,8 +426,7 @@ size_t MaxURLKeyedHintCacheSize() { } bool ShouldPersistHintsToDisk() { @@ -397,8 +375,8 @@ diff --git a/components/optimization_guide/core/optimization_guide_features.cc b } RequestContextSet GetAllowedContextsForPersonalizedMetadata() { -@@ -1080,5 +1071,19 @@ bool GetOnDeviceModelRetractRepeats() { - return kOnDeviceModelRetractRepeats.Get(); +@@ -871,5 +866,13 @@ int GetOnDeviceModelValidationAttemptCount() { + return kParam.Get(); } +SET_CROMITE_FEATURE_DISABLED(kOptimizationHints); @@ -406,14 +384,8 @@ diff --git a/components/optimization_guide/core/optimization_guide_features.cc b +SET_CROMITE_FEATURE_DISABLED(kRemoteOptimizationGuideFetchingAnonymousDataConsent); +SET_CROMITE_FEATURE_DISABLED(kOptimizationTargetPrediction); +SET_CROMITE_FEATURE_DISABLED(kOptimizationGuideModelDownloading); -+SET_CROMITE_FEATURE_DISABLED(kPageContentAnnotations); -+SET_CROMITE_FEATURE_DISABLED(kRemotePageMetadata); -+SET_CROMITE_FEATURE_DISABLED(kPageEntitiesPageContentAnnotations); +SET_CROMITE_FEATURE_DISABLED(kPushNotifications); -+SET_CROMITE_FEATURE_DISABLED(kPageVisibilityBatchAnnotations); -+SET_CROMITE_FEATURE_DISABLED(kPageContentAnnotationsValidation); +SET_CROMITE_FEATURE_DISABLED(kPreventLongRunningPredictionModels); -+SET_CROMITE_FEATURE_DISABLED(kPageContentAnnotationsPersistSalientImageMetadata); +SET_CROMITE_FEATURE_DISABLED(kOptimizationGuideFetchingForSRP); } // namespace features } // namespace optimization_guide @@ -429,7 +401,7 @@ diff --git a/components/optimization_guide/core/prediction_model_download_manage 0x5c, 0x7f, 0xd0, 0x0c, 0xa1, 0x6e, 0xef, 0xdd, 0x63, 0x7a}; const net::NetworkTrafficAnnotationTag kOptimizationGuidePredictionModelsTrafficAnnotation = -@@ -104,7 +104,7 @@ PredictionModelDownloadManager::PredictionModelDownloadManager( +@@ -105,7 +105,7 @@ PredictionModelDownloadManager::PredictionModelDownloadManager( GetBaseModelDirForDownloadCallback get_base_model_dir_for_download_callback, scoped_refptr background_task_runner) : download_service_(download_service), @@ -438,7 +410,7 @@ diff --git a/components/optimization_guide/core/prediction_model_download_manage api_key_(features::GetOptimizationGuideServiceAPIKey()), get_base_model_dir_for_download_callback_( get_base_model_dir_for_download_callback), -@@ -115,6 +115,7 @@ PredictionModelDownloadManager::~PredictionModelDownloadManager() = default; +@@ -116,6 +116,7 @@ PredictionModelDownloadManager::~PredictionModelDownloadManager() = default; void PredictionModelDownloadManager::StartDownload( const GURL& download_url, proto::OptimizationTarget optimization_target) { @@ -446,7 +418,7 @@ diff --git a/components/optimization_guide/core/prediction_model_download_manage download::DownloadParams download_params; download_params.client = download::DownloadClient::OPTIMIZATION_GUIDE_PREDICTION_MODELS; -@@ -260,6 +261,7 @@ bool PredictionModelDownloadManager::VerifyDownload( +@@ -265,6 +266,7 @@ bool PredictionModelDownloadManager::VerifyDownload( const base::FilePath& download_file_path, const base::FilePath& base_model_dir, bool delete_file_on_error) { @@ -478,22 +450,23 @@ diff --git a/components/optimization_guide/features.gni b/components/optimizatio } declare_args() { -diff --git a/components/safe_browsing/content/renderer/phishing_classifier/phishing_classifier.cc b/components/safe_browsing/content/renderer/phishing_classifier/phishing_classifier.cc ---- a/components/safe_browsing/content/renderer/phishing_classifier/phishing_classifier.cc -+++ b/components/safe_browsing/content/renderer/phishing_classifier/phishing_classifier.cc -@@ -234,7 +234,7 @@ void PhishingClassifier::VisualExtractionFinished(bool success) { - *bitmap_, base::BindOnce(&PhishingClassifier::OnVisualTfLiteModelDone, - weak_factory_.GetWeakPtr(), std::move(verdict))); - #else -- RunCallback(*verdict); -+ //RunCallback(*verdict); - #endif +diff --git a/components/page_content_annotations/core/page_content_annotations_features.cc b/components/page_content_annotations/core/page_content_annotations_features.cc +--- a/components/page_content_annotations/core/page_content_annotations_features.cc ++++ b/components/page_content_annotations/core/page_content_annotations_features.cc +@@ -280,4 +280,9 @@ size_t MaxRelatedSearchesCacheSize() { + "max_related_searches_cache_size", 10); } ++SET_CROMITE_FEATURE_DISABLED(kPageContentAnnotations); ++SET_CROMITE_FEATURE_DISABLED(kRemotePageMetadata); ++SET_CROMITE_FEATURE_DISABLED(kPageVisibilityBatchAnnotations); ++SET_CROMITE_FEATURE_DISABLED(kPageContentAnnotationsValidation); ++SET_CROMITE_FEATURE_DISABLED(kPageContentAnnotationsPersistSalientImageMetadata); + } // namespace page_content_annotations::features 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 -@@ -544,4 +544,7 @@ std::vector GetModulesOrder() { +@@ -574,4 +574,7 @@ std::vector GetModulesOrder() { base::SplitResult::SPLIT_WANT_NONEMPTY); } @@ -514,14 +487,8 @@ diff --git a/cromite_flags/chrome/common/chrome_features_cc/Disable-all-predicto new file mode 100644 --- /dev/null +++ b/cromite_flags/chrome/common/chrome_features_cc/Disable-all-predictors-code.inc -@@ -0,0 +1,7 @@ +@@ -0,0 +1 @@ +SET_CROMITE_FEATURE_DISABLED(kPrerenderFallbackToPreconnect); -+ -+#if !BUILDFLAG(IS_ANDROID) -+ -+SET_CROMITE_FEATURE_DISABLED(kSafetyCheckNotificationPermissions); -+ -+#endif diff --git a/cromite_flags/components/permissions/features_cc/Disable-all-predictors-code.inc b/cromite_flags/components/permissions/features_cc/Disable-all-predictors-code.inc new file mode 100644 --- /dev/null @@ -531,6 +498,12 @@ new file mode 100644 +SET_CROMITE_FEATURE_DISABLED(kPermissionOnDeviceNotificationPredictions); +SET_CROMITE_FEATURE_DISABLED(kPermissionOnDeviceGeolocationPredictions); +SET_CROMITE_FEATURE_DISABLED(kPermissionPredictionsV2); +diff --git a/cromite_flags/services/network/public/cpp/features_cc/Disable-all-predictors-code.inc b/cromite_flags/services/network/public/cpp/features_cc/Disable-all-predictors-code.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/services/network/public/cpp/features_cc/Disable-all-predictors-code.inc +@@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kNetworkContextPrefetch); diff --git a/cromite_flags/third_party/blink/common/features_cc/Disable-all-predictors-code.inc b/cromite_flags/third_party/blink/common/features_cc/Disable-all-predictors-code.inc new file mode 100644 --- /dev/null @@ -538,21 +511,33 @@ new file mode 100644 @@ -0,0 +1,2 @@ +SET_CROMITE_FEATURE_DISABLED(kNavigationPredictor); +SET_CROMITE_FEATURE_DISABLED(kPreloadingHeuristicsMLModel); +diff --git a/services/webnn/features.gni b/services/webnn/features.gni +--- a/services/webnn/features.gni ++++ b/services/webnn/features.gni +@@ -5,7 +5,7 @@ + import("//build/config/features.gni") + + declare_args() { +- webnn_use_tflite = is_android || is_chromeos || is_linux || is_win ++ webnn_use_tflite = false #is_android || is_chromeos || is_linux || is_win + + # Enable logging of TFLite profiling information on MLGraph destruction. + webnn_enable_tflite_profiler = false 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 -@@ -599,6 +599,7 @@ void DocumentSpeculationRules::UpdateSpeculationCandidates() { +@@ -660,6 +660,7 @@ void DocumentSpeculationRules::UpdateSpeculationCandidates() { return; } + if ((true)) return; HeapVector> candidates; - auto push_candidates = [&candidates, &execution_context]( + auto push_candidates = [&candidates, &document]( 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 -@@ -2961,7 +2961,7 @@ +@@ -3115,7 +3115,7 @@ // // It also has some feature params defined throughout the codebase. name: "Prerender2", diff --git a/build/cromite_patches/Disable-all-promo-dialogs.patch b/build/cromite_patches/Disable-all-promo-dialogs.patch index 9481c107..a3b1a672 100644 --- a/build/cromite_patches/Disable-all-promo-dialogs.patch +++ b/build/cromite_patches/Disable-all-promo-dialogs.patch @@ -17,7 +17,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java -@@ -1243,6 +1243,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { +@@ -1312,6 +1312,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { } private boolean maybeShowPromo(Profile profile) { @@ -28,7 +28,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/Tab 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 -@@ -138,7 +138,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { +@@ -144,7 +144,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 -@@ -132,6 +132,7 @@ ui::ElementContext BrowserFeaturePromoController::GetAnchorContext() const { +@@ -75,6 +75,7 @@ ui::ElementContext BrowserFeaturePromoController::GetAnchorContext() const { bool BrowserFeaturePromoController::CanShowPromoForElement( ui::TrackedElement* anchor_element) const { @@ -51,7 +51,7 @@ diff --git a/chrome/browser/ui/views/user_education/browser_feature_promo_contro diff --git a/chrome/browser/user_education/java/src/org/chromium/chrome/browser/user_education/UserEducationHelper.java b/chrome/browser/user_education/java/src/org/chromium/chrome/browser/user_education/UserEducationHelper.java --- a/chrome/browser/user_education/java/src/org/chromium/chrome/browser/user_education/UserEducationHelper.java +++ b/chrome/browser/user_education/java/src/org/chromium/chrome/browser/user_education/UserEducationHelper.java -@@ -74,6 +74,7 @@ public class UserEducationHelper { +@@ -125,6 +125,7 @@ public class UserEducationHelper { } private void showIPH(Tracker tracker, IPHCommand iphCommand) { @@ -62,19 +62,19 @@ diff --git a/chrome/browser/user_education/java/src/org/chromium/chrome/browser/ 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 -@@ -589,6 +589,7 @@ FeaturePromoResult FeaturePromoControllerCommon::CanShowPromoCommon( - const FeaturePromoSpecification** spec_out, +@@ -669,6 +669,7 @@ FeaturePromoResult FeaturePromoControllerCommon::CanShowPromoCommon( + const FeaturePromoSpecification** display_spec_out, std::unique_ptr* lifecycle_out, ui::TrackedElement** anchor_element_out) const { + if ((true)) return FeaturePromoResult::kBlockedByContext; + const bool for_demo = source == ShowSource::kDemo; + // Ensure that this promo isn't already queued for startup. - // - // Note that this check is bypassed if this is for an explicit demo, but not diff --git a/components/user_education/common/feature_promo_registry.cc b/components/user_education/common/feature_promo_registry.cc --- a/components/user_education/common/feature_promo_registry.cc +++ b/components/user_education/common/feature_promo_registry.cc -@@ -29,6 +29,7 @@ const FeaturePromoSpecification* FeaturePromoRegistry::GetParamsForFeature( - } +@@ -20,6 +20,7 @@ FeaturePromoRegistry& FeaturePromoRegistry::operator=( + FeaturePromoRegistry::~FeaturePromoRegistry() = default; void FeaturePromoRegistry::RegisterFeature(FeaturePromoSpecification spec) { + if ((true)) return; diff --git a/build/cromite_patches/Disable-conversion-measurement-api.patch b/build/cromite_patches/Disable-conversion-measurement-api.patch index 5bf57fd0..adafaf8f 100644 --- a/build/cromite_patches/Disable-conversion-measurement-api.patch +++ b/build/cromite_patches/Disable-conversion-measurement-api.patch @@ -14,7 +14,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../browser/aw_content_browser_client.cc | 3 + .../chromium/android_webview/AwSettings.java | 4 +- chrome/android/java/AndroidManifest.xml | 4 - - components/attribution_reporting/features.cc | 2 + + .../aggregatable_trigger_config.cc | 2 +- + components/attribution_reporting/features.cc | 1 + .../origin_trials/features.cc | 2 + .../render_view_context_menu_base.cc | 3 - .../aggregatable_report_sender.cc | 15 +- @@ -26,7 +27,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 | 312 +----------------- + .../browser/AttributionOsLevelManager.java | 349 +----------------- .../public/browser/content_browser_client.cc | 7 +- .../public/browser/navigation_controller.cc | 1 - .../Disable-conversion-measurement-api.inc | 1 + @@ -36,8 +37,9 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../attribution/request_headers_internal.cc | 1 + .../network/public/cpp/attribution_utils.cc | 2 + third_party/blink/renderer/core/page/page.cc | 2 +- + .../platform/runtime_enabled_features.json5 | 1 + ui/events/android/motion_event_android.cc | 6 +- - 26 files changed, 72 insertions(+), 338 deletions(-) + 28 files changed, 73 insertions(+), 376 deletions(-) create mode 100644 cromite_flags/content/common/features_cc/Disable-conversion-measurement-api.inc 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 @@ -46,36 +48,36 @@ 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 -@@ -1163,6 +1163,7 @@ network::mojom::AttributionSupport +@@ -1246,6 +1246,7 @@ network::mojom::AttributionSupport AwContentBrowserClient::GetAttributionSupport( AttributionReportingOsApiState state, - content::WebContents* web_contents) { + bool client_os_disabled) { + if ((true)) return network::mojom::AttributionSupport::kNone; - AwSettings* aw_settings = AwSettings::FromWebContents(web_contents); - if (aw_settings && aw_settings->GetAttributionBehavior() == - AwSettings::AttributionBehavior::DISABLED) { -@@ -1187,6 +1188,8 @@ bool AwContentBrowserClient::IsAttributionReportingOperationAllowed( + // WebView only supports OS-level attribution and not web-attribution. + switch (state) { + case AttributionReportingOsApiState::kDisabled: +@@ -1264,6 +1265,8 @@ bool AwContentBrowserClient::IsAttributionReportingOperationAllowed( const url::Origin* destination_origin, const url::Origin* reporting_origin, bool* can_bypass) { + if ((true)) + return false; - // Check if attribution reporting has been disabled. - // This method should not be called at all if the configured behavior is - // DISABLED. + AwBrowserContext* aw_context = + static_cast(browser_context); + // WebView only supports OS-level attribution and not web-attribution. diff --git a/android_webview/java/src/org/chromium/android_webview/AwSettings.java b/android_webview/java/src/org/chromium/android_webview/AwSettings.java --- a/android_webview/java/src/org/chromium/android_webview/AwSettings.java +++ b/android_webview/java/src/org/chromium/android_webview/AwSettings.java -@@ -162,7 +162,7 @@ public class AwSettings { +@@ -172,7 +172,7 @@ public class AwSettings { private boolean mSpatialNavigationEnabled; // Default depends on device features. private boolean mEnableSupportedHardwareAcceleratedFeatures; private int mMixedContentMode = WebSettings.MIXED_CONTENT_NEVER_ALLOW; - private int mAttributionBehavior = AttributionBehavior.APP_SOURCE_AND_WEB_TRIGGER; + private int mAttributionBehavior = AttributionBehavior.DISABLED; - private boolean mCSSHexAlphaColorEnabled; - private boolean mScrollTopLeftInteropEnabled; - private boolean mWillSuppressErrorPage; -@@ -1689,7 +1689,7 @@ public class AwSettings { + + @SpeculativeLoadingAllowedFlags + private int mSpeculativeLoadingAllowedFlags = +@@ -1773,7 +1773,7 @@ public class AwSettings { public void setAttributionBehavior(@AttributionBehavior int behavior) { synchronized (mAwSettingsLock) { if (mAttributionBehavior != behavior) { @@ -95,7 +97,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro +diff --git a/components/attribution_reporting/aggregatable_trigger_config.cc b/components/attribution_reporting/aggregatable_trigger_config.cc +--- a/components/attribution_reporting/aggregatable_trigger_config.cc ++++ b/components/attribution_reporting/aggregatable_trigger_config.cc +@@ -86,7 +86,7 @@ bool IsValid(SourceRegistrationTimeConfig source_registration_time_config, + + base::expected, TriggerRegistrationError> + ParseTriggerContextId(base::Value* value) { +- if (!value) { ++ if ((true)) { + return std::nullopt; + } + 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,6 @@ BASE_FEATURE(kAttributionReportingTriggerContextId, - "AttributionReportingTriggerContextId", +@@ -17,4 +17,5 @@ BASE_FEATURE(kAttributionAggregatableDebugReporting, + "AttributionAggregatableDebugReporting", 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 @@ -128,7 +141,7 @@ diff --git a/components/embedder_support/origin_trials/features.cc b/components/ diff --git a/components/renderer_context_menu/render_view_context_menu_base.cc b/components/renderer_context_menu/render_view_context_menu_base.cc --- a/components/renderer_context_menu/render_view_context_menu_base.cc +++ b/components/renderer_context_menu/render_view_context_menu_base.cc -@@ -502,9 +502,6 @@ RenderViewContextMenuBase::GetOpenURLParamsWithExtraHeaders( +@@ -503,9 +503,6 @@ RenderViewContextMenuBase::GetOpenURLParamsWithExtraHeaders( open_url_params.source_site_instance = site_instance_; @@ -141,7 +154,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 -@@ -137,19 +137,18 @@ void AggregatableReportSender::SendReport(const GURL& url, +@@ -138,19 +138,18 @@ void AggregatableReportSender::SendReport(const GURL& url, // Allow bodies of non-2xx responses to be returned. simple_url_loader_ptr->SetAllowHttpErrorResults(true); @@ -171,8 +184,8 @@ diff --git a/content/browser/aggregation_service/aggregatable_report_sender.cc b 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 -@@ -20,4 +20,5 @@ BASE_FEATURE(kPrivacySandboxAggregationServiceReportPadding, - "PrivacySandboxAggregationServiceReportPadding", +@@ -20,4 +20,5 @@ BASE_FEATURE(kPrivacySandboxAggregationServiceFilteringIds, + "PrivacySandboxAggregationServiceFilteringIds", base::FEATURE_ENABLED_BY_DEFAULT); +SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxAggregationService); @@ -180,10 +193,10 @@ 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 -@@ -924,6 +924,7 @@ void AttributionDataHostManagerImpl::ParseHeader( +@@ -1134,6 +1134,7 @@ void AttributionDataHostManagerImpl::ParseHeader( HeaderPendingDecode pending_decode, Registrar registrar) { - DCHECK(it != registrations_.end()); + CHECK(it != registrations_.end()); + if ((true)) return; switch (it->eligibility()) { @@ -191,7 +204,7 @@ diff --git a/content/browser/attribution_reporting/attribution_data_host_manager 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 -@@ -257,6 +257,7 @@ void AttributionHost::NotifyNavigationRegistrationData( +@@ -258,6 +258,7 @@ void AttributionHost::NotifyNavigationRegistrationData( return; } @@ -202,15 +215,15 @@ diff --git a/content/browser/attribution_reporting/attribution_host.cc b/content diff --git a/content/browser/attribution_reporting/attribution_os_level_manager.cc b/content/browser/attribution_reporting/attribution_os_level_manager.cc --- a/content/browser/attribution_reporting/attribution_os_level_manager.cc +++ b/content/browser/attribution_reporting/attribution_os_level_manager.cc -@@ -47,6 +47,7 @@ std::optional g_state GUARDED_BY_CONTEXT(GetSequenceChecker()); +@@ -46,6 +46,7 @@ std::optional g_state GUARDED_BY_CONTEXT(GetSequenceChecker()); + // static - bool AttributionOsLevelManager::ShouldUseOsWebSource( - GlobalRenderFrameHostId render_frame_id) { + bool AttributionOsLevelManager::ShouldInitializeApiState() { + if ((true)) return false; - return GetContentClient() - ->browser() - ->ShouldUseOsWebSourceAttributionReporting( -@@ -75,7 +76,7 @@ bool AttributionOsLevelManager::ShouldInitializeApiState() { + DCHECK_CALLED_ON_VALID_SEQUENCE(GetSequenceChecker()); + if (g_state.has_value()) { + return false; +@@ -57,7 +58,7 @@ bool AttributionOsLevelManager::ShouldInitializeApiState() { // static ApiState AttributionOsLevelManager::GetApiState() { DCHECK_CALLED_ON_VALID_SEQUENCE(GetSequenceChecker()); @@ -222,7 +235,7 @@ diff --git a/content/browser/attribution_reporting/attribution_os_level_manager. diff --git a/content/browser/attribution_reporting/attribution_report_network_sender.cc b/content/browser/attribution_reporting/attribution_report_network_sender.cc --- a/content/browser/attribution_reporting/attribution_report_network_sender.cc +++ b/content/browser/attribution_reporting/attribution_report_network_sender.cc -@@ -89,6 +89,9 @@ void AttributionReportNetworkSender::SendReport(GURL url, +@@ -125,6 +125,9 @@ void AttributionReportNetworkSender::SendReport(GURL url, const std::string& body, net::HttpRequestHeaders headers, UrlLoaderCallback callback) { @@ -232,7 +245,7 @@ diff --git a/content/browser/attribution_reporting/attribution_report_network_se auto resource_request = std::make_unique(); resource_request->url = std::move(url); resource_request->headers = std::move(headers); -@@ -164,6 +167,12 @@ void AttributionReportNetworkSender::OnReportSent( +@@ -200,6 +203,12 @@ void AttributionReportNetworkSender::OnReportSent( ReportSentCallback sent_callback, UrlLoaderList::iterator it, scoped_refptr headers) { @@ -248,7 +261,7 @@ diff --git a/content/browser/attribution_reporting/attribution_report_network_se diff --git a/content/browser/attribution_reporting/attribution_storage_sql.cc b/content/browser/attribution_reporting/attribution_storage_sql.cc --- a/content/browser/attribution_reporting/attribution_storage_sql.cc +++ b/content/browser/attribution_reporting/attribution_storage_sql.cc -@@ -459,14 +459,16 @@ base::FilePath DatabasePath(const base::FilePath& user_data_directory) { +@@ -471,14 +471,16 @@ base::FilePath DatabasePath(const base::FilePath& user_data_directory) { return user_data_directory.Append(kDatabasePath); } @@ -258,7 +271,7 @@ diff --git a/content/browser/attribution_reporting/attribution_storage_sql.cc b/ AttributionStorageSql::AttributionStorageSql( const base::FilePath& user_data_directory, - std::unique_ptr delegate) + AttributionResolverDelegate* delegate) - : path_to_database_(user_data_directory.empty() - ? base::FilePath() - : DatabasePath(user_data_directory)), @@ -266,12 +279,12 @@ diff --git a/content/browser/attribution_reporting/attribution_storage_sql.cc b/ + ? base::FilePath() + : DatabasePath(user_data_directory)), db_(sql::DatabaseOptions{.page_size = 4096, .cache_size = 32}), - delegate_(std::move(delegate)), - rate_limit_table_(delegate_.get()) { + delegate_(delegate), + rate_limit_table_(delegate_), 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 -@@ -1443,15 +1443,6 @@ void StoragePartitionImpl::Initialize( +@@ -1488,15 +1488,6 @@ void StoragePartitionImpl::Initialize( bucket_manager_ = std::make_unique(this); @@ -290,7 +303,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 -@@ -181,8 +181,6 @@ android_library("content_full_java") { +@@ -189,8 +189,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", @@ -321,7 +334,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib import org.jni_zero.CalledByNative; import org.jni_zero.JNINamespace; -@@ -54,6 +42,10 @@ import java.util.concurrent.TimeoutException; +@@ -56,6 +44,10 @@ import java.util.concurrent.TimeoutException; */ @JNINamespace("content") public class AttributionOsLevelManager { @@ -332,27 +345,62 @@ 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 = -@@ -118,63 +110,11 @@ public class AttributionOsLevelManager { +@@ -140,100 +132,11 @@ public class AttributionOsLevelManager { } private static boolean supportsAttribution() { - return Build.VERSION.SDK_INT >= Build.VERSION_CODES.R; - } - +- private static @OperationResult int getOperationResultFromMessage(String message) { +- if (message == null) { +- return OperationResult.ERROR_UNKNOWN; +- } else { +- String lowerMessage = message.toLowerCase(Locale.US); +- if (lowerMessage.contains("background")) { +- return OperationResult.ERROR_BACKGROUND_CALLER; +- } else if (lowerMessage.contains("unable to find the service")) { +- return OperationResult.ERROR_SERVICE_NOT_FOUND; +- } else if (lowerMessage.contains("service is not available")) { +- return OperationResult.ERROR_SERVICE_UNAVAILABLE; +- } else if (lowerMessage.contains("api rate limit exceeded")) { +- return OperationResult.ERROR_API_RATE_LIMIT_EXCEEDED; +- } else if (lowerMessage.contains("server rate limit exceeded")) { +- return OperationResult.ERROR_SERVER_RATE_LIMIT_EXCEEDED; +- } else if (lowerMessage.contains( +- "caller is not authorized to access information from another user")) { +- return OperationResult.ERROR_CALLER_NOT_ALLOWED_TO_CROSS_USER_BOUNDARIES; +- } else if (lowerMessage.contains( +- "caller is not allowed to perform this operation on behalf of the given" +- + " package")) { +- return OperationResult.ERROR_CALLER_NOT_ALLOWED_ON_BEHALF; +- } else if (lowerMessage.contains("permission was not requested")) { +- return OperationResult.ERROR_PERMISSION_NOT_REQUESTED; +- } else if (lowerMessage.contains("caller is not allowed")) { +- return OperationResult.ERROR_CALLER_NOT_ALLOWED; +- } else if (lowerMessage.contains("api time out")) { +- return OperationResult.ERROR_TIMEOUT; +- } else if (lowerMessage.contains("failed to encrypt responses")) { +- return OperationResult.ERROR_ENCRYPTION_FAILURE; +- } else if (lowerMessage.contains( +- "service received an invalid object from the server")) { +- return OperationResult.ERROR_INVALID_OBJECT; +- } else { +- return OperationResult.ERROR_UNKNOWN; +- } +- } +- } +- - private static @OperationResult int convertToOperationResult(Throwable thrown) { -- if (thrown instanceof IllegalArgumentException) { +- @OperationResult int result = getOperationResultFromMessage(thrown.getMessage()); +- if (result != OperationResult.ERROR_UNKNOWN) { +- return result; +- } else 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() != null -- && thrown.getMessage().toLowerCase(Locale.US).contains("background")) { -- return OperationResult.ERROR_BACKGROUND_CALLER; -- } else { -- return OperationResult.ERROR_ILLEGAL_STATE; -- } +- return OperationResult.ERROR_ILLEGAL_STATE; - } else if (thrown instanceof SecurityException) { - return OperationResult.ERROR_SECURITY; - } else if (thrown instanceof TimeoutException) { @@ -360,6 +408,8 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib - } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R - && thrown instanceof LimitExceededException) { - return OperationResult.ERROR_LIMIT_EXCEEDED; +- } else if (thrown instanceof InvalidObjectException) { +- return OperationResult.ERROR_INVALID_OBJECT; - } else { - return OperationResult.ERROR_UNKNOWN; - } @@ -393,11 +443,11 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib - assert suffix.length() > 0; - - RecordHistogram.recordEnumeratedHistogram( -- "Conversions.AndroidOperationResult." + suffix, result, OperationResult.COUNT); +- "Conversions.AndroidOperationResult2." + suffix, result, OperationResult.COUNT); } @CalledByNative -@@ -183,22 +123,7 @@ public class AttributionOsLevelManager { +@@ -242,22 +145,7 @@ public class AttributionOsLevelManager { } private MeasurementManagerFutures getManager() { @@ -421,7 +471,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib } private void onRegistrationCompleted( -@@ -212,28 +137,6 @@ public class AttributionOsLevelManager { +@@ -271,28 +159,6 @@ public class AttributionOsLevelManager { } } @@ -450,7 +500,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib @CalledByNative private static List createWebSourceParamsList(int size) { if (!supportsAttribution()) { -@@ -248,7 +151,6 @@ public class AttributionOsLevelManager { +@@ -307,7 +173,6 @@ public class AttributionOsLevelManager { if (!supportsAttribution()) { return; } @@ -458,7 +508,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib } /** -@@ -265,32 +167,12 @@ public class AttributionOsLevelManager { +@@ -324,32 +189,12 @@ public class AttributionOsLevelManager { OperationResult.ERROR_VERSION_UNSUPPORTED); return; } @@ -490,8 +540,8 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib - .RegisterSourceOptIn.class) @CalledByNative private void registerAttributionSource( - int requestId, GURL[] registrationUrls, MotionEvent event) { -@@ -301,37 +183,16 @@ public class AttributionOsLevelManager { + int requestId, @JniType("std::vector") GURL[] registrationUrls, MotionEvent event) { +@@ -360,37 +205,16 @@ public class AttributionOsLevelManager { OperationResult.ERROR_VERSION_UNSUPPORTED); return; } @@ -530,7 +580,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib } /** -@@ -348,18 +209,6 @@ public class AttributionOsLevelManager { +@@ -407,18 +231,6 @@ public class AttributionOsLevelManager { OperationResult.ERROR_VERSION_UNSUPPORTED); return; } @@ -549,7 +599,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib } /** -@@ -375,15 +224,6 @@ public class AttributionOsLevelManager { +@@ -434,15 +246,6 @@ public class AttributionOsLevelManager { OperationResult.ERROR_VERSION_UNSUPPORTED); return; } @@ -565,7 +615,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib } private void onDataDeletionCompleted(int requestId) { -@@ -418,96 +258,7 @@ public class AttributionOsLevelManager { +@@ -477,96 +280,7 @@ public class AttributionOsLevelManager { onDataDeletionCompleted(requestId); return; } @@ -663,7 +713,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib } private static void onMeasurementStateReturned(int status, @OperationResult int result) { -@@ -523,6 +274,10 @@ public class AttributionOsLevelManager { +@@ -582,6 +296,10 @@ public class AttributionOsLevelManager { private static void getMeasurementApiStatus() { ThreadUtils.assertOnBackgroundThread(); @@ -674,7 +724,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib if (sManagerForTesting != null) { AttributionOsLevelManagerJni.get().onMeasurementStateReturned(1); return; -@@ -542,49 +297,6 @@ public class AttributionOsLevelManager { +@@ -601,49 +319,6 @@ public class AttributionOsLevelManager { onMeasurementStateReturned(/* status= */ 0, OperationResult.ERROR_PERMISSION_UNGRANTED); return; } @@ -727,15 +777,15 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/Attrib diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -543,6 +543,7 @@ void ContentBrowserClient::OnAuctionComplete( +@@ -550,6 +550,7 @@ void ContentBrowserClient::OnAuctionComplete( network::mojom::AttributionSupport ContentBrowserClient::GetAttributionSupport( AttributionReportingOsApiState state, - content::WebContents* web_contents) { + bool client_os_disabled) { + if ((true)) return network::mojom::AttributionSupport::kNone; switch (state) { case AttributionReportingOsApiState::kDisabled: return network::mojom::AttributionSupport::kWeb; -@@ -559,17 +560,17 @@ bool ContentBrowserClient::IsAttributionReportingOperationAllowed( +@@ -567,13 +568,13 @@ bool ContentBrowserClient::IsAttributionReportingOperationAllowed( const url::Origin* destination_origin, const url::Origin* reporting_origin, bool* can_bypass) { @@ -743,14 +793,18 @@ diff --git a/content/public/browser/content_browser_client.cc b/content/public/b + return false; } - bool ContentBrowserClient::ShouldUseOsWebSourceAttributionReporting( - content::RenderFrameHost* rfh) { -- return true; -+ return false; + ContentBrowserClient::AttributionReportingOsRegistrars + ContentBrowserClient::GetAttributionReportingOsRegistrars( + WebContents* web_contents) { +- return {AttributionReportType::kWeb, AttributionReportType::kWeb}; ++ return {AttributionReportType::kDisabled, AttributionReportType::kDisabled}; } - bool ContentBrowserClient::ShouldUseOsWebTriggerAttributionReporting( - content::RenderFrameHost* rfh) { + bool ContentBrowserClient::IsAttributionReportingAllowedForContext( +@@ -581,7 +582,7 @@ bool ContentBrowserClient::IsAttributionReportingAllowedForContext( + content::RenderFrameHost* rfh, + const url::Origin& context_origin, + const url::Origin& reporting_origin) { - return true; + return false; } @@ -832,7 +886,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 -@@ -1352,7 +1352,7 @@ void Page::UpdateBrowsingContextGroup( +@@ -1436,7 +1436,7 @@ void Page::UpdateBrowsingContextGroup( void Page::SetAttributionSupport( network::mojom::AttributionSupport attribution_support) { @@ -841,10 +895,21 @@ diff --git a/third_party/blink/renderer/core/page/page.cc b/third_party/blink/re } template class CORE_TEMPLATE_EXPORT Supplement; +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 +@@ -4022,6 +4022,7 @@ + }, + { + name: "TopicsAPI", ++ status: "experimental", + base_feature: "none", + origin_trial_feature_name: "PrivacySandboxAdsAPIs", + origin_trial_allows_third_party: true, diff --git a/ui/events/android/motion_event_android.cc b/ui/events/android/motion_event_android.cc --- a/ui/events/android/motion_event_android.cc +++ b/ui/events/android/motion_event_android.cc -@@ -162,7 +162,11 @@ int ToEventFlags(int meta_state, int button_state) { +@@ -166,7 +166,11 @@ int ToEventFlags(int meta_state, int button_state) { } base::TimeTicks FromAndroidTime(base::TimeTicks time) { diff --git a/build/cromite_patches/Disable-crash-reporting.patch b/build/cromite_patches/Disable-crash-reporting.patch index 004f99bc..b6f61e3c 100644 --- a/build/cromite_patches/Disable-crash-reporting.patch +++ b/build/cromite_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 -@@ -2509,15 +2509,6 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( +@@ -2584,15 +2584,6 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( base::NumberToString(pid)); } #endif diff --git a/build/cromite_patches/Disable-feeds-support-by-default.patch b/build/cromite_patches/Disable-feeds-support-by-default.patch index 38d9642d..48459cfa 100644 --- a/build/cromite_patches/Disable-feeds-support-by-default.patch +++ b/build/cromite_patches/Disable-feeds-support-by-default.patch @@ -4,17 +4,114 @@ Subject: Disable feeds support by default License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/prefs/browser_prefs.cc | 4 ++-- - components/feed/core/common/pref_names.cc | 13 +------------ - components/feed/core/shared_prefs/pref_names.cc | 2 +- - components/feed/feed_feature_list.cc | 2 ++ - 4 files changed, 6 insertions(+), 15 deletions(-) + chrome/browser/BUILD.gn | 9 +++++++++ + chrome/browser/feed/android/web_feed_bridge.cc | 18 ++++++++++++++++++ + chrome/browser/prefs/browser_prefs.cc | 4 ++-- + components/feed/core/common/pref_names.cc | 13 +------------ + .../feed/core/shared_prefs/pref_names.cc | 2 +- + components/feed/feed_feature_list.cc | 3 +++ + 6 files changed, 34 insertions(+), 15 deletions(-) +diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn +--- a/chrome/browser/BUILD.gn ++++ b/chrome/browser/BUILD.gn +@@ -2663,6 +2663,15 @@ static_library("browser") { + ] + } + ++ if (is_android && !enable_feed_v2) { ++ sources += [ ++ "feed/feed_service_factory.cc", ++ "feed/feed_service_factory.h", ++ ] ++ deps += [ ++ "//components/feed:feature_list", ++ ] ++ } + if (enable_feed_v2) { + sources += [ + "feed/feed_service_factory.cc", +diff --git a/chrome/browser/feed/android/web_feed_bridge.cc b/chrome/browser/feed/android/web_feed_bridge.cc +--- a/chrome/browser/feed/android/web_feed_bridge.cc ++++ b/chrome/browser/feed/android/web_feed_bridge.cc +@@ -24,6 +24,7 @@ + #include "chrome/browser/profiles/profile.h" + #include "chrome/browser/profiles/profile_manager.h" + #include "components/country_codes/country_codes.h" ++#include "components/feed/buildflags.h" + #include "components/feed/core/v2/config.h" + #include "components/feed/core/v2/public/feed_service.h" + #include "components/feed/core/v2/public/types.h" +@@ -80,10 +81,14 @@ base::android::ScopedJavaLocalRef ToJavaWebFeedId( + } + + WebFeedSubscriptions* GetSubscriptions() { ++#if BUILDFLAG(ENABLE_FEED_V2) + Profile* profile = ProfileManager::GetLastUsedProfile(); + if (!profile) + return nullptr; + return GetSubscriptionsForProfile(profile); ++#else ++ return nullptr; ++#endif + } + + FeedApi* GetStream() { +@@ -219,10 +224,14 @@ static void JNI_WebFeedBridge_FollowWebFeed( + return; + } + ++#if BUILDFLAG(ENABLE_FEED_V2) + FollowWebFeed( + page_info.web_contents, + static_cast(change_reason), + std::move(callback)); ++#else ++ std::move(callback).Run({}); ++#endif + } + + static jboolean JNI_WebFeedBridge_IsCormorantEnabledForLocale(JNIEnv* env) { +@@ -266,11 +275,16 @@ static void JNI_WebFeedBridge_UnfollowWebFeed( + auto callback = + AdaptCallbackForJava( + env, j_callback); ++ ++#if BUILDFLAG(ENABLE_FEED_V2) + UnfollowWebFeed( + ToNativeWebFeedId(env, webFeedId), + /*is_durable_request=*/is_durable, + static_cast(change_reason), + std::move(callback)); ++#else ++ std::move(callback).Run({}); ++#endif + } + + static void JNI_WebFeedBridge_FindWebFeedInfoForPage( +@@ -282,6 +296,7 @@ static void JNI_WebFeedBridge_FindWebFeedInfoForPage( + AdaptCallbackForJava(env, j_callback); + + PageInformation page_info = ToNativePageInformation(env, pageInfo); ++#if BUILDFLAG(ENABLE_FEED_V2) + // Make sure web_contents is not NULL since the user might navigate away from + // the current tab that is requested to find info. + if (!page_info.web_contents) { +@@ -292,6 +307,9 @@ static void JNI_WebFeedBridge_FindWebFeedInfoForPage( + page_info.web_contents, + static_cast(reason), + std::move(callback)); ++#else ++ std::move(callback).Run({}); ++#endif + } + + static void JNI_WebFeedBridge_FindWebFeedInfoForWebFeedId( 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 -@@ -1840,10 +1840,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, - supervised_user::RegisterProfilePrefs(registry); +@@ -2109,10 +2109,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, + ChromeRLZTrackerDelegate::RegisterProfilePrefs(registry); #endif -#if BUILDFLAG(ENABLE_FEED_V2) @@ -29,7 +126,7 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse diff --git a/components/feed/core/common/pref_names.cc b/components/feed/core/common/pref_names.cc --- a/components/feed/core/common/pref_names.cc +++ b/components/feed/core/common/pref_names.cc -@@ -105,18 +105,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) { +@@ -107,18 +107,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) { } void MigrateObsoleteProfilePrefsOct_2022(PrefService* prefs) { @@ -64,11 +161,12 @@ 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 -@@ -164,4 +164,6 @@ BASE_FEATURE(kRefreshFeedOnRestart, - "RefreshFeedOnRestart", - base::FEATURE_DISABLED_BY_DEFAULT); +@@ -161,4 +161,7 @@ bool IsWebFeedEnabledForLocale(const std::string& country) { + !base::FeatureList::IsEnabled(kWebFeedKillSwitch); + } +SET_CROMITE_FEATURE_DISABLED(kInterestFeedV2); -+SET_CROMITE_FEATURE_DISABLED(kWebFeed); ++SET_CROMITE_FEATURE_ENABLED(kWebFeedKillSwitch); ++ } // namespace feed -- diff --git a/build/cromite_patches/Disable-fetching-of-all-field-trials.patch b/build/cromite_patches/Disable-fetching-of-all-field-trials.patch index 3627fad4..feb48d8d 100644 --- a/build/cromite_patches/Disable-fetching-of-all-field-trials.patch +++ b/build/cromite_patches/Disable-fetching-of-all-field-trials.patch @@ -7,7 +7,8 @@ Disable reporting of Omnibox suggestions header. License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - android_webview/common/aw_features.cc | 4 +-- + .../origin_trials_component_loader.cc | 1 + + android_webview/common/aw_content_client.cc | 2 ++ android_webview/nonembedded/BUILD.gn | 2 -- ...eddedFastVariationsSeedSafeModeAction.java | 2 -- ...SafeModeVariationsSeedContentProvider.java | 5 --- @@ -27,35 +28,44 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../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(+), 91 deletions(-) + 21 files changed, 29 insertions(+), 89 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 -@@ -113,8 +113,8 @@ BASE_FEATURE(kWebViewJavaJsBridgeMojo, +diff --git a/android_webview/browser/component_updater/origin_trials_component_loader.cc b/android_webview/browser/component_updater/origin_trials_component_loader.cc +--- a/android_webview/browser/component_updater/origin_trials_component_loader.cc ++++ b/android_webview/browser/component_updater/origin_trials_component_loader.cc +@@ -14,6 +14,7 @@ namespace android_webview { - // Field trial feature for controlling support of Origin Trials on WebView. - BASE_FEATURE(kWebViewOriginTrials, -- "WebViewOriginTrials", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "WebViewOriginTrials", // disabled -+ base::FEATURE_DISABLED_BY_DEFAULT); // by default + void LoadOriginTrialsComponent( + component_updater::ComponentLoaderPolicyVector& policies) { ++ if ((true)) return; + policies.push_back(std::make_unique()); + } - // Whether to record size of the embedding app's data directory to the UMA - // histogram Android.WebView.AppDataDirectorySize. +diff --git a/android_webview/common/aw_content_client.cc b/android_webview/common/aw_content_client.cc +--- a/android_webview/common/aw_content_client.cc ++++ b/android_webview/common/aw_content_client.cc +@@ -115,6 +115,8 @@ void AwContentClient::ExposeInterfacesToBrowser( + } + + blink::OriginTrialPolicy* AwContentClient::GetOriginTrialPolicy() { ++ if ((true)) return nullptr; ++ + // Prevent initialization race (see crbug.com/721144). There may be a + // race when the policy is needed for worker startup (which happens on a + // separate worker thread). diff --git a/android_webview/nonembedded/BUILD.gn b/android_webview/nonembedded/BUILD.gn --- a/android_webview/nonembedded/BUILD.gn +++ b/android_webview/nonembedded/BUILD.gn -@@ -104,7 +104,6 @@ android_library("services_java") { - sources = [ +@@ -106,7 +106,6 @@ android_library("services_java") { "java/src/org/chromium/android_webview/services/AwMinidumpUploadJobService.java", "java/src/org/chromium/android_webview/services/AwMinidumpUploaderDelegate.java", + "java/src/org/chromium/android_webview/services/AwNetLogService.java", - "java/src/org/chromium/android_webview/services/AwVariationsSeedFetcher.java", "java/src/org/chromium/android_webview/services/ComponentUpdaterResetSafeModeAction.java", "java/src/org/chromium/android_webview/services/ComponentUpdaterSafeModeUtils.java", "java/src/org/chromium/android_webview/services/ComponentsProviderPathUtil.java", -@@ -123,7 +122,6 @@ android_library("services_java") { +@@ -125,7 +124,6 @@ android_library("services_java") { "java/src/org/chromium/android_webview/services/SafeModeService.java", "java/src/org/chromium/android_webview/services/SafeModeVariationsSeedContentProvider.java", "java/src/org/chromium/android_webview/services/StartupFeatureMetadataHolder.java", @@ -142,7 +152,7 @@ diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/brows diff --git a/components/ukm/ukm_recorder_impl.cc b/components/ukm/ukm_recorder_impl.cc --- a/components/ukm/ukm_recorder_impl.cc +++ b/components/ukm/ukm_recorder_impl.cc -@@ -164,6 +164,9 @@ bool HasUnknownMetrics(const builders::DecodeMap& decode_map, +@@ -189,6 +189,9 @@ std::string WebDXFeaturesToStringForDebug(const std::set& features) { UkmRecorderImpl::UkmRecorderImpl() : sampling_seed_(static_cast(base::RandUint64())) { @@ -167,7 +177,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 -@@ -468,39 +468,13 @@ public class VariationsSeedFetcher { +@@ -469,39 +469,13 @@ public class VariationsSeedFetcher { */ public void fetchSeed(String restrictMode, String milestone, String channel) { assert !ThreadUtils.runningOnUiThread(); @@ -211,7 +221,7 @@ diff --git a/components/variations/android/java/src/org/chromium/components/vari } private void recordFetchResultOrCode(int resultOrCode) { -@@ -552,7 +526,7 @@ public class VariationsSeedFetcher { +@@ -553,7 +527,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. */ @@ -301,7 +311,7 @@ diff --git a/components/variations/service/variations_field_trial_creator_base.c diff --git a/components/variations/service/variations_service.cc b/components/variations/service/variations_service.cc --- a/components/variations/service/variations_service.cc +++ b/components/variations/service/variations_service.cc -@@ -224,17 +224,8 @@ bool GetInstanceManipulations(const net::HttpResponseHeaders* headers, +@@ -226,17 +226,8 @@ bool GetInstanceManipulations(const net::HttpResponseHeaders* headers, // Variations seed fetching is only enabled in official Chrome builds, if a URL // is specified on the command line, and for testing. bool IsFetchingEnabled() { @@ -321,7 +331,7 @@ diff --git a/components/variations/service/variations_service.cc b/components/va } // Returns the already downloaded first run seed, and clear the seed from the -@@ -612,7 +603,7 @@ bool VariationsService::DoFetchFromURL(const GURL& url, bool is_http_retry) { +@@ -625,7 +616,7 @@ bool VariationsService::DoFetchFromURL(const GURL& url, bool is_http_retry) { // debugger or if the machine was suspended) and OnURLFetchComplete() hasn't // had a chance to run yet from the previous request. In this case, don't // start a new request and just let the previous one finish. @@ -334,20 +344,20 @@ diff --git a/content/browser/loader/url_loader_throttles.cc b/content/browser/lo --- a/content/browser/loader/url_loader_throttles.cc +++ b/content/browser/loader/url_loader_throttles.cc @@ -52,8 +52,6 @@ CreateContentBrowserURLLoaderThrottles( - // TODO(crbug.com/1094303): Consider whether we want to use the WebContents to - // determine the value for variations::Owner. Alternatively, this is the + // TODO(crbug.com/40135370): Consider whether we want to use the WebContents + // to determine the value for variations::Owner. Alternatively, this is the // browser side, and we might be fine with Owner::kUnknown. - variations::VariationsURLLoaderThrottle::AppendThrottleIfNeeded( - browser_context->GetVariationsClient(), &throttles); ClientHintsControllerDelegate* client_hint_delegate = browser_context->GetClientHintsControllerDelegate(); -@@ -132,11 +130,6 @@ CreateContentBrowserURLLoaderThrottlesForKeepAlive( +@@ -137,11 +135,6 @@ CreateContentBrowserURLLoaderThrottlesForKeepAlive( GetContentClient()->browser()->CreateURLLoaderThrottlesForKeepAlive( request, browser_context, wc_getter, frame_tree_node_id); variations::OmniboxURLLoaderThrottle::AppendThrottleIfNeeded(&throttles); -- // TODO(crbug.com/1094303): Consider whether we want to use the WebContents to -- // determine the value for variations::Owner. Alternatively, this is the +- // TODO(crbug.com/40135370): Consider whether we want to use the WebContents +- // to determine the value for variations::Owner. Alternatively, this is the - // browser side, and we might be fine with Owner::kUnknown. - variations::VariationsURLLoaderThrottle::AppendThrottleIfNeeded( - browser_context->GetVariationsClient(), &throttles); @@ -357,9 +367,9 @@ diff --git a/content/browser/loader/url_loader_throttles.cc b/content/browser/lo diff --git a/content/browser/origin_trials/origin_trials_utils.cc b/content/browser/origin_trials/origin_trials_utils.cc --- a/content/browser/origin_trials/origin_trials_utils.cc +++ b/content/browser/origin_trials/origin_trials_utils.cc -@@ -14,7 +14,7 @@ namespace { +@@ -15,7 +15,7 @@ namespace { std::vector GetHeaderValues( - base::StringPiece header_name, + std::string_view header_name, const net::HttpResponseHeaders* headers) { - if (!headers) { + if ((true)) { @@ -394,7 +404,7 @@ new file mode 100644 diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc --- a/third_party/blink/renderer/core/loader/document_loader.cc +++ b/third_party/blink/renderer/core/loader/document_loader.cc -@@ -197,13 +197,6 @@ WebVector CopyInitiatorOriginTrials( +@@ -202,13 +202,6 @@ WebVector CopyInitiatorOriginTrials( const Vector& initiator_origin_trial_features) { WebVector result; diff --git a/build/cromite_patches/Disable-idle-detection.patch b/build/cromite_patches/Disable-idle-detection.patch index c9f98a0c..db409f60 100644 --- a/build/cromite_patches/Disable-idle-detection.patch +++ b/build/cromite_patches/Disable-idle-detection.patch @@ -31,7 +31,7 @@ new file mode 100644 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 -@@ -280,6 +280,7 @@ +@@ -297,6 +297,7 @@ { name: "IdleDetection", permissions_policy_name: "idle-detection", @@ -55,9 +55,9 @@ diff --git a/third_party/blink/renderer/modules/idle/idle_detector.idl b/third_p 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 -@@ -2054,6 +2054,11 @@ - name: "HTMLUnsafeMethods", - status: "experimental", +@@ -2094,6 +2094,11 @@ + name: "IgnoresCSSTextTransformsForPlainTextCopy", + status: "stable", }, + { + name: "IdleDetection", // disabled diff --git a/build/cromite_patches/Disable-lock-icon-in-address-bar-by-default.patch b/build/cromite_patches/Disable-lock-icon-in-address-bar-by-default.patch index 7f6f2284..083de5a7 100644 --- a/build/cromite_patches/Disable-lock-icon-in-address-bar-by-default.patch +++ b/build/cromite_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 -@@ -434,8 +434,8 @@ BASE_FEATURE(kOmniboxModernizeVisualUpdate, +@@ -393,8 +393,8 @@ BASE_FEATURE(kOmniboxSteadyStateTextColor, // used, on non-Android platforms this is controlled through the // ChromeRefresh2023 flag. BASE_FEATURE(kUpdatedConnectionSecurityIndicators, diff --git a/build/cromite_patches/Disable-media-router-and-remoting-by-default.patch b/build/cromite_patches/Disable-media-router-and-remoting-by-default.patch index 65a2b1fe..437525ec 100644 --- a/build/cromite_patches/Disable-media-router-and-remoting-by-default.patch +++ b/build/cromite_patches/Disable-media-router-and-remoting-by-default.patch @@ -15,7 +15,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/media/router/media_router_feature.cc b/chrome/browser/media/router/media_router_feature.cc --- a/chrome/browser/media/router/media_router_feature.cc +++ b/chrome/browser/media/router/media_router_feature.cc -@@ -106,6 +106,7 @@ void ClearMediaRouterStoredPrefsForTesting() { +@@ -110,6 +110,7 @@ void ClearMediaRouterStoredPrefsForTesting() { } bool MediaRouterEnabled(content::BrowserContext* context) { @@ -23,7 +23,7 @@ diff --git a/chrome/browser/media/router/media_router_feature.cc b/chrome/browse #if !BUILDFLAG(IS_ANDROID) if (!base::FeatureList::IsEnabled(kMediaRouter)) return false; -@@ -147,7 +148,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) { +@@ -152,7 +153,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) { registry->RegisterStringPref(prefs::kMediaRouterReceiverIdHashToken, "", PrefRegistry::PUBLIC); registry->RegisterBooleanPref( @@ -32,7 +32,7 @@ diff --git a/chrome/browser/media/router/media_router_feature.cc b/chrome/browse registry->RegisterBooleanPref( media_router::prefs::kMediaRouterShowCastSessionsStartedByOtherDevices, true); -@@ -218,4 +219,7 @@ std::optional GetCastMirroringPlayoutDelay() { +@@ -223,4 +224,7 @@ std::optional GetCastMirroringPlayoutDelay() { #endif // !BUILDFLAG(IS_ANDROID) @@ -43,7 +43,7 @@ diff --git a/chrome/browser/media/router/media_router_feature.cc b/chrome/browse diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc -@@ -425,7 +425,7 @@ void ProfileImpl::RegisterProfilePrefs( +@@ -423,7 +423,7 @@ void ProfileImpl::RegisterProfilePrefs( #endif registry->RegisterBooleanPref(prefs::kForceEphemeralProfiles, false); @@ -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 -@@ -586,6 +586,8 @@ void SetCustomizedRuntimeFeaturesFromCombinedArgs( +@@ -572,6 +572,8 @@ void SetCustomizedRuntimeFeaturesFromCombinedArgs( WebRuntimeFeatures::EnableBackForwardCache( content::IsBackForwardCacheEnabled()); @@ -79,7 +79,7 @@ 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 -@@ -3086,14 +3086,10 @@ +@@ -3280,14 +3280,10 @@ base_feature: "none", }, { diff --git a/build/cromite_patches/Disable-minidump-upload-scheduling.patch b/build/cromite_patches/Disable-minidump-upload-scheduling.patch index 794d8dec..d053167b 100644 --- a/build/cromite_patches/Disable-minidump-upload-scheduling.patch +++ b/build/cromite_patches/Disable-minidump-upload-scheduling.patch @@ -11,7 +11,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/components/endpoint_fetcher/endpoint_fetcher.cc b/components/endpoint_fetcher/endpoint_fetcher.cc --- a/components/endpoint_fetcher/endpoint_fetcher.cc +++ b/components/endpoint_fetcher/endpoint_fetcher.cc -@@ -367,7 +367,7 @@ void EndpointFetcher::OnResponseFetched( +@@ -369,7 +369,7 @@ void EndpointFetcher::OnResponseFetched( } } else { std::string net_error = net::ErrorToString(net_error_code); diff --git a/build/cromite_patches/Disable-omission-of-URL-elements-in-Omnibox.patch b/build/cromite_patches/Disable-omission-of-URL-elements-in-Omnibox.patch deleted file mode 100644 index e5d82da8..00000000 --- a/build/cromite_patches/Disable-omission-of-URL-elements-in-Omnibox.patch +++ /dev/null @@ -1,56 +0,0 @@ -From: csagan5 <32685696+csagan5@users.noreply.github.com> -Date: Wed, 11 Oct 2017 23:24:58 +0200 -Subject: Disable omission of URL elements in Omnibox - -Disable all omissions because they are used throughout the code without -a corresponding user option to individually disable their usage. - -License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html ---- - .../toolbar/chrome_location_bar_model_delegate.cc | 2 +- - components/url_formatter/url_formatter.cc | 14 +++++++------- - ...disable-omission-of-URL-elements-in-Omnibox.inc | 1 + - 3 files changed, 9 insertions(+), 8 deletions(-) - create mode 100755 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/disable-omission-of-URL-elements-in-Omnibox.inc - -diff --git a/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc b/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc ---- a/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc -+++ b/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc -@@ -266,5 +266,5 @@ TemplateURLService* ChromeLocationBarModelDelegate::GetTemplateURLService() { - // static - void ChromeLocationBarModelDelegate::RegisterProfilePrefs( - user_prefs::PrefRegistrySyncable* registry) { -- registry->RegisterBooleanPref(omnibox::kPreventUrlElisionsInOmnibox, false); -+ registry->RegisterBooleanPref(omnibox::kPreventUrlElisionsInOmnibox, true); - } -diff --git a/components/url_formatter/url_formatter.cc b/components/url_formatter/url_formatter.cc ---- a/components/url_formatter/url_formatter.cc -+++ b/components/url_formatter/url_formatter.cc -@@ -533,13 +533,13 @@ bool HasTwoViewSourceSchemes(base::StringPiece spec) { - } // namespace - - const FormatUrlType kFormatUrlOmitNothing = 0; --const FormatUrlType kFormatUrlOmitUsernamePassword = 1 << 0; --const FormatUrlType kFormatUrlOmitHTTP = 1 << 1; --const FormatUrlType kFormatUrlOmitTrailingSlashOnBareHostname = 1 << 2; --const FormatUrlType kFormatUrlOmitHTTPS = 1 << 3; --const FormatUrlType kFormatUrlOmitTrivialSubdomains = 1 << 5; --const FormatUrlType kFormatUrlTrimAfterHost = 1 << 6; --const FormatUrlType kFormatUrlOmitFileScheme = 1 << 7; -+const FormatUrlType kFormatUrlOmitUsernamePassword = 0 << 0; -+const FormatUrlType kFormatUrlOmitHTTP = 0 << 1; -+const FormatUrlType kFormatUrlOmitTrailingSlashOnBareHostname = 0 << 2; -+const FormatUrlType kFormatUrlOmitHTTPS = 0 << 3; -+const FormatUrlType kFormatUrlOmitTrivialSubdomains = 0 << 5; -+const FormatUrlType kFormatUrlTrimAfterHost = 0 << 6; -+const FormatUrlType kFormatUrlOmitFileScheme = 0 << 7; - const FormatUrlType kFormatUrlOmitMailToScheme = 1 << 8; - const FormatUrlType kFormatUrlOmitMobilePrefix = 1 << 9; - -diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/disable-omission-of-URL-elements-in-Omnibox.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/disable-omission-of-URL-elements-in-Omnibox.inc -new file mode 100755 ---- /dev/null -+++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/disable-omission-of-URL-elements-in-Omnibox.inc -@@ -0,0 +1 @@ -+SET_CROMITE_FEATURE_DISABLED(kAndroidVisibleUrlTruncationV2); --- diff --git a/build/cromite_patches/Disable-omission-of-URL-elements.patch b/build/cromite_patches/Disable-omission-of-URL-elements.patch new file mode 100644 index 00000000..51dd2d6b --- /dev/null +++ b/build/cromite_patches/Disable-omission-of-URL-elements.patch @@ -0,0 +1,125 @@ +From: uazo +Date: Wed, 11 Oct 2017 23:24:58 +0200 +Subject: Disable omission of URL elements + +Disabling some omissions of complete urls + +License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html +--- + .../ephemeraltab/EphemeralTabSheetContent.java | 3 +-- + .../share_sheet/ShareSheetBottomSheetContent.java | 4 +--- + .../toolbar/chrome_location_bar_model_delegate.cc | 2 +- + .../ui/views/page_info/page_info_main_view.cc | 15 ++++++++++----- + .../components/bookmarks/BookmarkItem.java | 1 + + .../omnibox/browser/titled_url_match_utils.cc | 2 +- + .../components/page_info/PageInfoController.java | 3 +-- + 7 files changed, 16 insertions(+), 14 deletions(-) + +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/ephemeraltab/EphemeralTabSheetContent.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/ephemeraltab/EphemeralTabSheetContent.java +--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/ephemeraltab/EphemeralTabSheetContent.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/ephemeraltab/EphemeralTabSheetContent.java +@@ -235,8 +235,7 @@ public class EphemeralTabSheetContent implements BottomSheetContent { + /** Sets the ephemeral tab URL. */ + public void updateURL(GURL url) { + TextView originView = mToolbarView.findViewById(R.id.origin); +- originView.setText( +- UrlFormatter.formatUrlForSecurityDisplay(url, SchemeDisplay.OMIT_HTTP_AND_HTTPS)); ++ originView.setText(url.getSpec()); + } + + /** Sets the security icon. */ +diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/share_sheet/ShareSheetBottomSheetContent.java b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/share_sheet/ShareSheetBottomSheetContent.java +--- a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/share_sheet/ShareSheetBottomSheetContent.java ++++ b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/share_sheet/ShareSheetBottomSheetContent.java +@@ -268,9 +268,7 @@ class ShareSheetBottomSheetContent implements BottomSheetContent, OnItemClickLis + ShareSheetLinkToggleCoordinator shareSheetLinkToggleCoordinator) { + // Default preview is to show title + url. + String title = mParams.getTitle(); +- String subtitle = +- UrlFormatter.formatUrlForSecurityDisplay( +- mParams.getUrl(), SchemeDisplay.OMIT_HTTP_AND_HTTPS); ++ String subtitle = mParams.getUrl(); + + if (contentTypes.contains(ContentType.IMAGE) + || contentTypes.contains(ContentType.IMAGE_AND_LINK)) { +diff --git a/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc b/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc +--- a/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc ++++ b/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc +@@ -261,5 +261,5 @@ TemplateURLService* ChromeLocationBarModelDelegate::GetTemplateURLService() { + // static + void ChromeLocationBarModelDelegate::RegisterProfilePrefs( + user_prefs::PrefRegistrySyncable* registry) { +- registry->RegisterBooleanPref(omnibox::kPreventUrlElisionsInOmnibox, false); ++ registry->RegisterBooleanPref(omnibox::kPreventUrlElisionsInOmnibox, true); + } +diff --git a/chrome/browser/ui/views/page_info/page_info_main_view.cc b/chrome/browser/ui/views/page_info/page_info_main_view.cc +--- a/chrome/browser/ui/views/page_info/page_info_main_view.cc ++++ b/chrome/browser/ui/views/page_info/page_info_main_view.cc +@@ -562,10 +562,14 @@ void PageInfoMainView::ChildPreferredSizeChanged(views::View* child) { + } + + std::unique_ptr PageInfoMainView::CreateBubbleHeaderView() { +- auto header = std::make_unique(); +- header->SetLayoutManager(std::make_unique()) ++ auto cromite_header = std::make_unique(); ++ cromite_header->SetVerticalScrollBarMode(views::ScrollView::ScrollBarMode::kHiddenButEnabled); ++ cromite_header->SetHorizontalScrollBarMode(views::ScrollView::ScrollBarMode::kDisabled); ++ cromite_header->ClipHeightTo(0, 150); ++ auto scroll_contents = std::make_unique(); ++ scroll_contents->SetLayoutManager(std::make_unique()) + ->SetInteriorMargin(gfx::Insets::VH(0, 20)); +- title_ = header->AddChildView(std::make_unique( ++ title_ = scroll_contents->AddChildView(std::make_unique( + std::u16string(), views::style::CONTEXT_DIALOG_TITLE, + views::style::STYLE_HEADLINE_4, + gfx::DirectionalityMode::DIRECTIONALITY_AS_URL)); +@@ -589,9 +593,10 @@ std::unique_ptr PageInfoMainView::CreateBubbleHeaderView() { + // button padding when calculating margins. + close_button->SetProperty(views::kInternalPaddingKey, + close_button->GetInsets()); +- header->AddChildView(close_button.release()); ++ scroll_contents->AddChildView(close_button.release()); ++ cromite_header->SetContents(std::move(scroll_contents)); + +- return header; ++ return cromite_header; + } + + std::unique_ptr PageInfoMainView::CreateAboutThisSiteSection( +diff --git a/components/bookmarks/common/android/java/src/org/chromium/components/bookmarks/BookmarkItem.java b/components/bookmarks/common/android/java/src/org/chromium/components/bookmarks/BookmarkItem.java +--- a/components/bookmarks/common/android/java/src/org/chromium/components/bookmarks/BookmarkItem.java ++++ b/components/bookmarks/common/android/java/src/org/chromium/components/bookmarks/BookmarkItem.java +@@ -61,6 +61,7 @@ public class BookmarkItem { + + /** Returns the string to display for the item's url. */ + public String getUrlForDisplay() { ++ if ((true)) return getUrl().getSpec(); + return UrlFormatter.formatUrlForSecurityDisplay( + getUrl(), SchemeDisplay.OMIT_HTTP_AND_HTTPS); + } +diff --git a/components/omnibox/browser/titled_url_match_utils.cc b/components/omnibox/browser/titled_url_match_utils.cc +--- a/components/omnibox/browser/titled_url_match_utils.cc ++++ b/components/omnibox/browser/titled_url_match_utils.cc +@@ -81,7 +81,7 @@ AutocompleteMatch TitledUrlMatchToAutocompleteMatch( + // Otherwise, display the path, even if the input matches both or neither. + bool show_path = titled_url_match.has_ancestor_match || + titled_url_match.url_match_positions.empty(); +- match.contents = show_path ? path : formatted_url; ++ match.contents = /*show_path ? path :*/ formatted_url; + // The path can become stale (when the bookmark is moved). So persist the URL + // instead when creating shortcuts. + if (show_path) +diff --git a/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoController.java b/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoController.java +--- a/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoController.java ++++ b/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoController.java +@@ -226,8 +226,7 @@ public class PageInfoController + OmniboxUrlEmphasizer.getOriginEndIndex( + displayUrlBuilder.toString(), autocompleteSchemeClassifier); + autocompleteSchemeClassifier.destroy(); +- containerParams.truncatedUrl = +- UrlFormatter.formatUrlForDisplayOmitSchemePathAndTrivialSubdomains(mFullUrl); ++ containerParams.truncatedUrl = url; + containerParams.backButtonClickCallback = this::exitSubpage; + containerParams.urlTitleClickCallback = mContainer::toggleUrlTruncation; + // Long press the url text to copy it to the clipboard. +-- diff --git a/build/cromite_patches/Disable-plugins-enumeration.patch b/build/cromite_patches/Disable-plugins-enumeration.patch index f292e74b..2f11d87c 100644 --- a/build/cromite_patches/Disable-plugins-enumeration.patch +++ b/build/cromite_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 -@@ -2147,9 +2147,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() { +@@ -2256,9 +2256,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() { } PluginData* LocalFrame::GetPluginData() const { diff --git a/build/cromite_patches/Disable-FLoC-and-privacy-sandbox.patch b/build/cromite_patches/Disable-privacy-sandbox.patch similarity index 54% rename from build/cromite_patches/Disable-FLoC-and-privacy-sandbox.patch rename to build/cromite_patches/Disable-privacy-sandbox.patch index e24f7185..0a87a60b 100644 --- a/build/cromite_patches/Disable-FLoC-and-privacy-sandbox.patch +++ b/build/cromite_patches/Disable-privacy-sandbox.patch @@ -1,15 +1,20 @@ From: uazo Date: Sat, 13 Nov 2021 09:17:06 +0000 -Subject: Disable FLoC and privacy sandbox +Subject: Disable privacy sandbox Remove UI from the settings and set the flags to inactive Permanently removes FLoC support, disabling the download of LSH clusters, the marking the history navigation and the javascript API and permission policies. +Also disable FirstPartySets and StorageAccessAPI. Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- .../browser/chrome_content_browser_client.cc | 3 +++ + .../first_party_sets_navigation_throttle.cc | 2 +- + .../first_party_sets_policy_service.cc | 3 ++- + chrome/browser/prefs/browser_prefs.cc | 2 +- + .../privacy_sandbox_service_impl.cc | 2 +- .../privacy_sandbox_settings_delegate.cc | 1 + .../privacy_sandbox/privacy_sandbox_prompt.cc | 1 + .../history/core/browser/history_backend.cc | 13 +------------ @@ -17,15 +22,19 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../privacy_sandbox_features.cc | 4 ++++ .../privacy_sandbox/privacy_sandbox_prefs.cc | 4 ++-- .../privacy_sandbox_settings_impl.cc | 19 ++++++++++++++----- - .../Disable-FLoC-and-privacy-sandbox.inc | 1 + + .../tracking_protection_prefs.cc | 4 ++-- + .../identity_manager/account_capabilities.cc | 2 +- + .../features_cc/Disable-privacy-sandbox.inc | 1 + + .../features_cc/Disable-privacy-sandbox.inc | 4 ++++ third_party/blink/common/features.cc | 1 + - 10 files changed, 28 insertions(+), 21 deletions(-) - create mode 100644 cromite_flags/third_party/blink/common/features_cc/Disable-FLoC-and-privacy-sandbox.inc + 17 files changed, 40 insertions(+), 28 deletions(-) + create mode 100644 cromite_flags/content/common/features_cc/Disable-privacy-sandbox.inc + create mode 100644 cromite_flags/third_party/blink/common/features_cc/Disable-privacy-sandbox.inc 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 -@@ -3239,6 +3239,9 @@ bool ChromeContentBrowserClient::IsAttributionReportingOperationAllowed( +@@ -3339,6 +3339,9 @@ bool ChromeContentBrowserClient::IsAttributionReportingOperationAllowed( const url::Origin* destination_origin, const url::Origin* reporting_origin, bool* can_bypass) { @@ -35,10 +44,66 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch Profile* profile = Profile::FromBrowserContext(browser_context); auto* privacy_sandbox_settings = +diff --git a/chrome/browser/first_party_sets/first_party_sets_navigation_throttle.cc b/chrome/browser/first_party_sets/first_party_sets_navigation_throttle.cc +--- a/chrome/browser/first_party_sets/first_party_sets_navigation_throttle.cc ++++ b/chrome/browser/first_party_sets/first_party_sets_navigation_throttle.cc +@@ -77,7 +77,7 @@ FirstPartySetsNavigationThrottle::MaybeCreateNavigationThrottle( + // The `service` might be null for some irregular profiles. + // TODO(crbug.com/40233408): regular profiles and guest sessions + // aren't mutually exclusive on ChromeOS. +- if (!profile->IsRegularProfile() || profile->IsGuestSession()) ++ if (((true)) || !profile->IsRegularProfile() || profile->IsGuestSession()) + return nullptr; + + FirstPartySetsPolicyService* service = +diff --git a/chrome/browser/first_party_sets/first_party_sets_policy_service.cc b/chrome/browser/first_party_sets/first_party_sets_policy_service.cc +--- a/chrome/browser/first_party_sets/first_party_sets_policy_service.cc ++++ b/chrome/browser/first_party_sets/first_party_sets_policy_service.cc +@@ -59,6 +59,7 @@ const base::Value::Dict* GetOverridesPolicyForProfile( + } + + ServiceState GetServiceState(Profile* profile, bool pref_enabled) { ++ if ((true)) return ServiceState::kPermanentlyDisabled; + if (profile->IsSystemProfile() || profile->IsGuestSession() || + profile->IsOffTheRecord()) { + return ServiceState::kPermanentlyDisabled; +@@ -112,7 +113,7 @@ void FirstPartySetsPolicyService::Init() { + profile, profile->GetPrefs() && + profile->GetPrefs()->GetBoolean( + prefs::kPrivacySandboxRelatedWebsiteSetsEnabled)); +- ++ service_state_ = ServiceState::kPermanentlyDisabled; + if (service_state_ == ServiceState::kPermanentlyDisabled) { + OnReadyToNotifyDelegates(net::FirstPartySetsContextConfig(), + net::FirstPartySetsCacheFilter()); +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 +@@ -1577,7 +1577,7 @@ void RegisterProfilePrefsForMigration( + registry->RegisterTimePref(kPlusAddressLastFetchedTime, base::Time()); + + // Deprecated 03/2024. +- registry->RegisterBooleanPref(kPrivacySandboxApisEnabled, true); ++ registry->RegisterBooleanPref(kPrivacySandboxApisEnabled, false); + + // Deprecated 03/2024. + registry->RegisterBooleanPref(kShowInternalAccessibilityTree, false); +diff --git a/chrome/browser/privacy_sandbox/privacy_sandbox_service_impl.cc b/chrome/browser/privacy_sandbox/privacy_sandbox_service_impl.cc +--- a/chrome/browser/privacy_sandbox/privacy_sandbox_service_impl.cc ++++ b/chrome/browser/privacy_sandbox/privacy_sandbox_service_impl.cc +@@ -471,7 +471,7 @@ bool PrivacySandboxServiceImpl::IsRestrictedNoticeEnabled() { + void PrivacySandboxServiceImpl::SetFirstPartySetsDataAccessEnabled( + bool enabled) { + pref_service_->SetBoolean(prefs::kPrivacySandboxRelatedWebsiteSetsEnabled, +- enabled); ++ false); + } + + bool PrivacySandboxServiceImpl::IsFirstPartySetsDataAccessEnabled() const { diff --git a/chrome/browser/privacy_sandbox/privacy_sandbox_settings_delegate.cc b/chrome/browser/privacy_sandbox/privacy_sandbox_settings_delegate.cc --- a/chrome/browser/privacy_sandbox/privacy_sandbox_settings_delegate.cc +++ b/chrome/browser/privacy_sandbox/privacy_sandbox_settings_delegate.cc -@@ -159,6 +159,7 @@ bool PrivacySandboxSettingsDelegate::HasAppropriateTopicsConsent() const { +@@ -164,6 +164,7 @@ bool PrivacySandboxSettingsDelegate::HasAppropriateTopicsConsent() const { bool PrivacySandboxSettingsDelegate::PrivacySandboxRestrictedNoticeRequired() const { @@ -82,7 +147,7 @@ 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 -@@ -478,8 +478,6 @@ void PrivacySandboxAttestations::OnAttestationsParsed( +@@ -502,8 +502,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. @@ -94,9 +159,9 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_attestations/privacy_san diff --git a/components/privacy_sandbox/privacy_sandbox_features.cc b/components/privacy_sandbox/privacy_sandbox_features.cc --- a/components/privacy_sandbox/privacy_sandbox_features.cc +++ b/components/privacy_sandbox/privacy_sandbox_features.cc -@@ -167,4 +167,8 @@ BASE_FEATURE(kTrackingProtectionNoticeRequestTracking, - base::FEATURE_DISABLED_BY_DEFAULT); - #endif // BUILDFLAG(IS_ANDROID) +@@ -261,4 +261,8 @@ const base::FeatureParam + &kPrivacySandboxLocalNoticeConfirmation, "default-to-os-country", + false}; +SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxSettings4); +SET_CROMITE_FEATURE_ENABLED(kDisablePrivacySandboxPrompts); @@ -106,16 +171,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_features.cc b/components diff --git a/components/privacy_sandbox/privacy_sandbox_prefs.cc b/components/privacy_sandbox/privacy_sandbox_prefs.cc --- a/components/privacy_sandbox/privacy_sandbox_prefs.cc +++ b/components/privacy_sandbox/privacy_sandbox_prefs.cc -@@ -12,7 +12,7 @@ namespace privacy_sandbox { - - void RegisterProfilePrefs(PrefRegistrySimple* registry) { - registry->RegisterBooleanPref( -- prefs::kPrivacySandboxApisEnabled, true, -+ prefs::kPrivacySandboxApisEnabled, false, - user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); - registry->RegisterBooleanPref(prefs::kPrivacySandboxM1ConsentDecisionMade, - false); -@@ -27,7 +27,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) { +@@ -24,7 +24,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) { registry->RegisterBooleanPref(prefs::kPrivacySandboxM1FledgeEnabled, false); registry->RegisterBooleanPref(prefs::kPrivacySandboxM1AdMeasurementEnabled, false); @@ -124,10 +180,19 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_prefs.cc b/components/pr registry->RegisterTimePref(prefs::kPrivacySandboxTopicsDataAccessibleSince, base::Time()); +@@ -48,7 +48,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) { + registry->RegisterBooleanPref( + prefs::kPrivacySandboxFirstPartySetsDataAccessAllowedInitialized, false); + registry->RegisterBooleanPref( +- prefs::kPrivacySandboxRelatedWebsiteSetsEnabled, true, ++ prefs::kPrivacySandboxRelatedWebsiteSetsEnabled, false, // must be disabled + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); + + registry->RegisterBooleanPref(prefs::kPrivacySandboxTopicsConsentGiven, diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/components/privacy_sandbox/privacy_sandbox_settings_impl.cc --- a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc +++ b/components/privacy_sandbox/privacy_sandbox_settings_impl.cc -@@ -123,7 +123,7 @@ std::set GetTopicsSetFromString( +@@ -125,7 +125,7 @@ std::set GetTopicsSetFromString( // static bool PrivacySandboxSettingsImpl::IsAllowed(Status status) { @@ -136,7 +201,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo } // static -@@ -232,7 +232,8 @@ PrivacySandboxSettingsImpl::GetFinchPrioritizedTopics() { +@@ -245,7 +245,8 @@ PrivacySandboxSettingsImpl::GetFinchPrioritizedTopics() { return finch_prioritized_topics_; } @@ -146,7 +211,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo Status status = GetM1TopicAllowedStatus(); JoinHistogram(kIsTopicsAllowedHistogram, status); return IsAllowed(status); -@@ -264,7 +265,8 @@ bool PrivacySandboxSettingsImpl::IsTopicsAllowedForContext( +@@ -277,7 +278,8 @@ bool PrivacySandboxSettingsImpl::IsTopicsAllowedForContext( return IsAllowed(status); } @@ -156,7 +221,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo const auto& blocked_topics = pref_service_->GetList(prefs::kPrivacySandboxBlockedTopics); -@@ -466,6 +468,7 @@ bool PrivacySandboxSettingsImpl:: +@@ -479,6 +481,7 @@ bool PrivacySandboxSettingsImpl:: void PrivacySandboxSettingsImpl::SetFledgeJoiningAllowed( const std::string& top_frame_etld_plus1, bool allowed) { @@ -164,7 +229,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo ScopedDictPrefUpdate scoped_pref_update( pref_service_, prefs::kPrivacySandboxFledgeJoinBlocked); -@@ -536,7 +539,8 @@ void PrivacySandboxSettingsImpl::ClearFledgeJoiningAllowedSettings( +@@ -550,7 +553,8 @@ void PrivacySandboxSettingsImpl::ClearFledgeJoiningAllowedSettings( } bool PrivacySandboxSettingsImpl::IsFledgeJoiningAllowed( @@ -174,7 +239,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo ScopedDictPrefUpdate scoped_pref_update( pref_service_, prefs::kPrivacySandboxFledgeJoinBlocked); auto& pref_data = scoped_pref_update.Get(); -@@ -782,7 +786,10 @@ void PrivacySandboxSettingsImpl::SetDelegateForTesting( +@@ -813,7 +817,10 @@ void PrivacySandboxSettingsImpl::SetDelegateForTesting( delegate_ = std::move(delegate); } @@ -186,7 +251,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo pref_service_->SetTime(prefs::kPrivacySandboxTopicsDataAccessibleSince, base::Time::Now()); -@@ -795,6 +802,7 @@ PrivacySandboxSettingsImpl::Status +@@ -826,6 +833,7 @@ PrivacySandboxSettingsImpl::Status PrivacySandboxSettingsImpl::GetSiteAccessAllowedStatus( const url::Origin& top_frame_origin, const GURL& url) const { @@ -194,7 +259,7 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo // Relying on |host_content_settings_map_| instead of |cookie_settings_| // allows to query whether the site associated with the |url| is allowed to // access Site data (aka ContentSettingsType::COOKIES) without considering any -@@ -809,6 +817,7 @@ PrivacySandboxSettingsImpl::GetSiteAccessAllowedStatus( +@@ -840,6 +848,7 @@ PrivacySandboxSettingsImpl::GetSiteAccessAllowedStatus( PrivacySandboxSettingsImpl::Status PrivacySandboxSettingsImpl::GetPrivacySandboxAllowedStatus( bool should_ignore_restriction /*=false*/) const { @@ -202,17 +267,58 @@ diff --git a/components/privacy_sandbox/privacy_sandbox_settings_impl.cc b/compo if (delegate_->IsIncognitoProfile()) { return Status::kIncognitoProfile; } -diff --git a/cromite_flags/third_party/blink/common/features_cc/Disable-FLoC-and-privacy-sandbox.inc b/cromite_flags/third_party/blink/common/features_cc/Disable-FLoC-and-privacy-sandbox.inc +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 +@@ -53,14 +53,14 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) { + + // Tracking Protection Settings Prefs + registry->RegisterBooleanPref( +- prefs::kBlockAll3pcToggleEnabled, false, ++ prefs::kBlockAll3pcToggleEnabled, false, // with true enables FPS + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); + registry->RegisterBooleanPref(prefs::kAllowAll3pcToggleEnabled, false); + registry->RegisterIntegerPref( + prefs::kTrackingProtectionLevel, + static_cast(TrackingProtectionLevel::kStandard), + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); +- registry->RegisterBooleanPref(prefs::kTrackingProtection3pcdEnabled, false); ++ registry->RegisterBooleanPref(prefs::kTrackingProtection3pcdEnabled, false); // with true enables FPS + registry->RegisterBooleanPref( + prefs::kIpProtectionEnabled, false, + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); +diff --git a/components/signin/public/identity_manager/account_capabilities.cc b/components/signin/public/identity_manager/account_capabilities.cc +--- a/components/signin/public/identity_manager/account_capabilities.cc ++++ b/components/signin/public/identity_manager/account_capabilities.cc +@@ -82,7 +82,7 @@ signin::Tribool AccountCapabilities:: + + signin::Tribool AccountCapabilities::can_run_chrome_privacy_sandbox_trials() + const { +- return GetCapabilityByName(kCanRunChromePrivacySandboxTrialsCapabilityName); ++ return signin::Tribool::kFalse; + } + + signin::Tribool AccountCapabilities::is_opted_in_to_parental_supervision() +diff --git a/cromite_flags/content/common/features_cc/Disable-privacy-sandbox.inc b/cromite_flags/content/common/features_cc/Disable-privacy-sandbox.inc new file mode 100644 --- /dev/null -+++ b/cromite_flags/third_party/blink/common/features_cc/Disable-FLoC-and-privacy-sandbox.inc ++++ b/cromite_flags/content/common/features_cc/Disable-privacy-sandbox.inc @@ -0,0 +1 @@ ++SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxAdsAPIsM1Override); +diff --git a/cromite_flags/third_party/blink/common/features_cc/Disable-privacy-sandbox.inc b/cromite_flags/third_party/blink/common/features_cc/Disable-privacy-sandbox.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/third_party/blink/common/features_cc/Disable-privacy-sandbox.inc +@@ -0,0 +1,4 @@ +SET_CROMITE_FEATURE_DISABLED(kFencedFrames); ++SET_CROMITE_FEATURE_DISABLED(kSharedStorageAPI); ++SET_CROMITE_FEATURE_DISABLED(kSharedStorageAPIM118); ++SET_CROMITE_FEATURE_DISABLED(kSharedStorageAPIM125); diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc --- a/third_party/blink/common/features.cc +++ b/third_party/blink/common/features.cc -@@ -2462,6 +2462,7 @@ bool IsAllowPageWithIDBConnectionAndTransactionInBFCacheEnabled() { - } +@@ -2601,6 +2601,7 @@ BASE_FEATURE(kWebviewAccelerateSmallCanvases, + // constants for features in the section above. bool IsAllowURNsInIframeEnabled() { + if ((true)) return false; // see https://chromium-review.googlesource.com/c/chromium/src/+/3690741 diff --git a/build/cromite_patches/Disable-references-to-fonts.googleapis.com.patch b/build/cromite_patches/Disable-references-to-fonts.googleapis.com.patch index 6012bb56..e3a0a085 100644 --- a/build/cromite_patches/Disable-references-to-fonts.googleapis.com.patch +++ b/build/cromite_patches/Disable-references-to-fonts.googleapis.com.patch @@ -4,16 +4,31 @@ Subject: Disable references to fonts.googleapis.com License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- + .../side_panel/read_anything/read_anything_toolbar.ts | 3 --- .../content/browser/dom_distiller_viewer_source.cc | 2 +- + components/dom_distiller/core/html/dom_distiller_viewer.html | 2 -- components/dom_distiller/core/html/preview.html | 2 +- .../dom_distiller/core/javascript/dom_distiller_viewer.js | 2 +- third_party/crashpad/crashpad/doc/support/crashpad_doxygen.css | 3 +-- - 4 files changed, 4 insertions(+), 5 deletions(-) + 6 files changed, 4 insertions(+), 10 deletions(-) +diff --git a/chrome/browser/resources/side_panel/read_anything/read_anything_toolbar.ts b/chrome/browser/resources/side_panel/read_anything/read_anything_toolbar.ts +--- a/chrome/browser/resources/side_panel/read_anything/read_anything_toolbar.ts ++++ b/chrome/browser/resources/side_panel/read_anything/read_anything_toolbar.ts +@@ -472,9 +472,6 @@ export class ReadAnythingToolbarElement extends ReadAnythingToolbarElementBase { + const link = document.createElement('link'); + link.rel = 'preload'; + link.as = 'style'; +- link.href = +- 'https://fonts.googleapis.com/css?family=Poppins|Comic+Neue|Lexend+Deca|' + +- 'EB+Garamond|STIX+Two+Text|Andika'; + + link.addEventListener('load', () => { + link.media = 'all'; diff --git a/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc b/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc --- a/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc +++ b/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc -@@ -291,7 +291,7 @@ bool DomDistillerViewerSource::ShouldServiceRequest( +@@ -292,7 +292,7 @@ bool DomDistillerViewerSource::ShouldServiceRequest( std::string DomDistillerViewerSource::GetContentSecurityPolicy( network::mojom::CSPDirectiveName directive) { if (directive == network::mojom::CSPDirectiveName::StyleSrc) { @@ -22,6 +37,18 @@ diff --git a/components/dom_distiller/content/browser/dom_distiller_viewer_sourc } else if (directive == network::mojom::CSPDirectiveName::ChildSrc) { return "child-src *;"; } else if (directive == +diff --git a/components/dom_distiller/core/html/dom_distiller_viewer.html b/components/dom_distiller/core/html/dom_distiller_viewer.html +--- a/components/dom_distiller/core/html/dom_distiller_viewer.html ++++ b/components/dom_distiller/core/html/dom_distiller_viewer.html +@@ -12,8 +12,6 @@ found in the LICENSE file. + + $1 + $i18n{title} +- + + $2 + diff --git a/components/dom_distiller/core/html/preview.html b/components/dom_distiller/core/html/preview.html --- a/components/dom_distiller/core/html/preview.html +++ b/components/dom_distiller/core/html/preview.html diff --git a/build/cromite_patches/Disable-safety-check.patch b/build/cromite_patches/Disable-safety-check.patch index b8d14c26..391fdd55 100644 --- a/build/cromite_patches/Disable-safety-check.patch +++ b/build/cromite_patches/Disable-safety-check.patch @@ -4,55 +4,55 @@ 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 | 15 --------------- - .../browser/settings/SettingsLauncherImpl.java | 5 +---- - chrome/browser/BUILD.gn | 1 - - .../omnibox/suggestions/action/OmniboxPedal.java | 3 --- - 7 files changed, 1 insertion(+), 34 deletions(-) + chrome/android/BUILD.gn | 5 ----- + chrome/android/chrome_java_sources.gni | 1 - + .../android/java/res/xml/main_preferences.xml | 5 ----- + .../browser/settings/SettingsActivity.java | 19 ------------------- + .../settings/SettingsLauncherImpl.java | 6 ++---- + chrome/browser/BUILD.gn | 1 - + .../suggestions/action/OmniboxPedal.java | 3 --- + 7 files changed, 2 insertions(+), 38 deletions(-) diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -401,7 +401,6 @@ if (current_toolchain == default_toolchain) { +@@ -438,7 +438,6 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/recent_tabs:helper_java", "//chrome/browser/recent_tabs:java", "//chrome/browser/safe_browsing/android:java", - "//chrome/browser/safety_check/android:java", + "//chrome/browser/safety_hub/android:java", "//chrome/browser/screenshot_monitor:java", "//chrome/browser/search_engines/android:java", - "//chrome/browser/search_resumption:java", -@@ -1039,8 +1038,6 @@ if (current_toolchain == default_toolchain) { +@@ -1101,8 +1100,6 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/recent_tabs:java", "//chrome/browser/recent_tabs:junit", "//chrome/browser/recent_tabs/internal:junit", - "//chrome/browser/safety_check/android:java", - "//chrome/browser/safety_check/android:junit", + "//chrome/browser/safety_hub/android:java", + "//chrome/browser/safety_hub/android:junit", "//chrome/browser/screenshot_monitor:java", - "//chrome/browser/search_engines/android:java", - "//chrome/browser/search_engines/android:junit", -@@ -1661,8 +1658,6 @@ if (current_toolchain == default_toolchain) { +@@ -1754,8 +1751,6 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/quick_delete:javatests", "//chrome/browser/safe_browsing/android:java", "//chrome/browser/safe_browsing/android:javatests", - "//chrome/browser/safety_check/android:java", - "//chrome/browser/safety_check/android:javatests", + "//chrome/browser/safety_hub/android:java", + "//chrome/browser/safety_hub/android:javatests", "//chrome/browser/screenshot_monitor:java", - "//chrome/browser/search_engines/android:java", - "//chrome/browser/segmentation_platform:javatests", 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 -@@ -1009,7 +1009,6 @@ chrome_java_sources = [ +@@ -996,7 +996,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", - "java/src/org/chromium/chrome/browser/safety_check/SafetyCheckUpdatesDelegateImpl.java", "java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java", + "java/src/org/chromium/chrome/browser/searchwidget/SearchActivityClientImpl.java", "java/src/org/chromium/chrome/browser/searchwidget/SearchActivityLocationBarLayout.java", - "java/src/org/chromium/chrome/browser/searchwidget/SearchBoxDataProvider.java", diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml --- a/chrome/android/java/res/xml/main_preferences.xml +++ b/chrome/android/java/res/xml/main_preferences.xml @@ -66,12 +66,12 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j - android:order="13" - android:title="@string/prefs_safety_check"/> RegisterBooleanPref(prefs::kEnableEncryptedMedia, true); + registry->RegisterStringPref(prefs::kPrefixedVideoFullscreenApiAvailability, + "runtime-enabled"); - registry->RegisterBooleanPref(prefs::kScrollToTextFragmentEnabled, true); + registry->RegisterBooleanPref(prefs::kScrollToTextFragmentEnabled, false); #if BUILDFLAG(IS_ANDROID) @@ -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 -@@ -306,6 +306,8 @@ void SetRuntimeFeaturesFromChromiumFeatures() { +@@ -291,6 +291,8 @@ void SetRuntimeFeaturesFromChromiumFeatures() { #endif {wf::EnableTouchDragAndContextMenu, raw_ref(features::kTouchDragAndContextMenu)}, @@ -42,7 +42,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features. + raw_ref(blink::features::kTextFragmentAnchor)}, {wf::EnableUserActivationSameOriginVisibility, raw_ref(features::kUserActivationSameOriginVisibility)}, - {wf::EnableVideoPlaybackQuality, + {wf::EnableWebBluetooth, raw_ref(features::kWebBluetooth), diff --git a/cromite_flags/chrome/browser/about_flags_cc/Disable-text-fragments-by-default.inc b/cromite_flags/chrome/browser/about_flags_cc/Disable-text-fragments-by-default.inc new file mode 100644 --- /dev/null @@ -74,9 +74,9 @@ 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 -@@ -4624,9 +4624,14 @@ void Document::SetURL(const KURL& url) { - TRACE_EVENT1("navigation", "Document::SetURL", "url", - new_url.GetString().Utf8()); +@@ -4599,9 +4599,14 @@ void Document::SetURL(const KURL& url) { + TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT, + "url", new_url.GetString().Utf8()); + // If text fragment identifiers are enabled, we strip the fragment directive + // from the URL fragment. @@ -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 -@@ -3687,10 +3687,9 @@ +@@ -3972,10 +3972,9 @@ }, { name: "TextFragmentIdentifiers", diff --git a/build/cromite_patches/Disable-third-party-origin-trials.patch b/build/cromite_patches/Disable-third-party-origin-trials.patch index 743f06b9..3db71015 100644 --- a/build/cromite_patches/Disable-third-party-origin-trials.patch +++ b/build/cromite_patches/Disable-third-party-origin-trials.patch @@ -8,19 +8,19 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../origin_trials/origin_trial_policy_impl.cc | 7 ++++--- .../origin_trials/origin_trial_policy_impl.h | 2 +- .../browser/renderer_host/navigation_request.cc | 1 - - .../origin_trial_state_host_impl.cc | 9 --------- + .../origin_trial_state_host_impl.cc | 8 -------- content/renderer/render_frame_impl.cc | 17 +---------------- .../shell/common/shell_origin_trial_policy.cc | 10 ++++------ .../origin_trials/trial_token_validator.cc | 1 + .../renderer/core/loader/document_loader.cc | 17 ----------------- .../blink/renderer/core/loader/http_equiv.cc | 2 +- .../core/origin_trials/origin_trial_context.cc | 6 ++++-- - 11 files changed, 16 insertions(+), 57 deletions(-) + 11 files changed, 16 insertions(+), 56 deletions(-) diff --git a/android_webview/common/aw_content_client.cc b/android_webview/common/aw_content_client.cc --- a/android_webview/common/aw_content_client.cc +++ b/android_webview/common/aw_content_client.cc -@@ -127,7 +127,6 @@ blink::OriginTrialPolicy* AwContentClient::GetOriginTrialPolicy() { +@@ -128,7 +128,6 @@ blink::OriginTrialPolicy* AwContentClient::GetOriginTrialPolicy() { // flag to true after construction. This will work because trial token // validator will always get the current instance of policy when needed. if (IsDisableOriginTrialsSafeModeActionOn()) { @@ -58,7 +58,7 @@ diff --git a/components/embedder_support/origin_trials/origin_trial_policy_impl. --- a/components/embedder_support/origin_trials/origin_trial_policy_impl.h +++ b/components/embedder_support/origin_trials/origin_trial_policy_impl.h @@ -34,6 +34,7 @@ class OriginTrialPolicyImpl : public blink::OriginTrialPolicy { - bool IsTokenDisabled(base::StringPiece token_signature) const override; + bool IsTokenDisabled(std::string_view token_signature) const override; bool IsOriginSecure(const GURL& url) const override; + private: @@ -76,7 +76,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 -@@ -8686,7 +8686,6 @@ void NavigationRequest::SetSourceSiteInstanceToInitiatorIfNeeded() { +@@ -8971,7 +8971,6 @@ void NavigationRequest::SetSourceSiteInstanceToInitiatorIfNeeded() { void NavigationRequest::ForceEnableOriginTrials( const std::vector& trials) { DCHECK(!HasCommitted()); @@ -87,13 +87,12 @@ diff --git a/content/browser/renderer_host/navigation_request.cc b/content/brows diff --git a/content/browser/renderer_host/origin_trial_state_host_impl.cc b/content/browser/renderer_host/origin_trial_state_host_impl.cc --- a/content/browser/renderer_host/origin_trial_state_host_impl.cc +++ b/content/browser/renderer_host/origin_trial_state_host_impl.cc -@@ -99,15 +99,6 @@ void OriginTrialStateHostImpl::ApplyFeatureDiffForOriginTrial( - feature_pair.second->tokens; - } - } -- // Apply the diff changes to the mutable RuntimeFeatureStateReadContext. +@@ -108,14 +108,6 @@ void OriginTrialStateHostImpl::ApplyFeatureDiffForOriginTrial( + // This issue should be revisited to avoid silently dropping any feature + // overrides that are stored in the RFSDocumentData, in these corner cases + // when the data has become a nullptr. - RuntimeFeatureStateDocumentData* document_data = -- RuntimeFeatureStateDocumentData::GetForCurrentDocument( +- RuntimeFeatureStateDocumentData::GetOrCreateForCurrentDocument( - &render_frame_host()); - CHECK(document_data); - document_data @@ -130,7 +129,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) { -@@ -636,11 +626,6 @@ blink::mojom::CommonNavigationParamsPtr MakeCommonNavigationParams( +@@ -635,11 +625,6 @@ blink::mojom::CommonNavigationParamsPtr MakeCommonNavigationParams( info->url_request.GetURLRequestExtraData().get()); DCHECK(url_request_extra_data); @@ -142,7 +141,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(), -@@ -663,7 +648,7 @@ blink::mojom::CommonNavigationParamsPtr MakeCommonNavigationParams( +@@ -662,7 +647,7 @@ blink::mojom::CommonNavigationParamsPtr MakeCommonNavigationParams( info->url_request.HasUserGesture(), info->url_request.HasTextFragmentToken(), info->should_check_main_world_content_security_policy, @@ -183,7 +182,7 @@ diff --git a/content/shell/common/shell_origin_trial_policy.cc b/content/shell/c diff --git a/third_party/blink/common/origin_trials/trial_token_validator.cc b/third_party/blink/common/origin_trials/trial_token_validator.cc --- a/third_party/blink/common/origin_trials/trial_token_validator.cc +++ b/third_party/blink/common/origin_trials/trial_token_validator.cc -@@ -425,6 +425,7 @@ TrialTokenValidator::GetValidTokens(const url::Origin& origin, +@@ -427,6 +427,7 @@ TrialTokenValidator::GetValidTokens(const url::Origin& origin, // static bool TrialTokenValidator::IsTrialPossibleOnOrigin(const GURL& url) { @@ -194,7 +193,7 @@ diff --git a/third_party/blink/common/origin_trials/trial_token_validator.cc b/t diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc --- a/third_party/blink/renderer/core/loader/document_loader.cc +++ b/third_party/blink/renderer/core/loader/document_loader.cc -@@ -183,13 +183,6 @@ namespace { +@@ -188,13 +188,6 @@ namespace { Vector CopyInitiatorOriginTrials( const WebVector& initiator_origin_trial_features) { Vector result; @@ -208,7 +207,7 @@ diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_p return result; } -@@ -203,18 +196,12 @@ WebVector CopyInitiatorOriginTrials( +@@ -208,18 +201,12 @@ WebVector CopyInitiatorOriginTrials( Vector CopyForceEnabledOriginTrials( const WebVector& force_enabled_origin_trials) { Vector result; @@ -227,7 +226,7 @@ diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_p return result; } -@@ -2936,10 +2923,6 @@ void DocumentLoader::CreateParserPostCommit() { +@@ -3070,10 +3057,6 @@ void DocumentLoader::CreateParserPostCommit() { mojom::blink::OriginTrialFeature::kTouchEventFeatureDetection); } @@ -241,7 +240,7 @@ diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_p diff --git a/third_party/blink/renderer/core/loader/http_equiv.cc b/third_party/blink/renderer/core/loader/http_equiv.cc --- a/third_party/blink/renderer/core/loader/http_equiv.cc +++ b/third_party/blink/renderer/core/loader/http_equiv.cc -@@ -108,7 +108,7 @@ void HttpEquiv::ProcessHttpEquivDefaultStyle(Document& document, +@@ -107,7 +107,7 @@ void HttpEquiv::ProcessHttpEquivDefaultStyle(Document& document, void HttpEquiv::ProcessHttpEquivOriginTrial(LocalDOMWindow* window, const AtomicString& content) { @@ -253,7 +252,7 @@ diff --git a/third_party/blink/renderer/core/loader/http_equiv.cc b/third_party/ diff --git a/third_party/blink/renderer/core/origin_trials/origin_trial_context.cc b/third_party/blink/renderer/core/origin_trials/origin_trial_context.cc --- a/third_party/blink/renderer/core/origin_trials/origin_trial_context.cc +++ b/third_party/blink/renderer/core/origin_trials/origin_trial_context.cc -@@ -314,6 +314,9 @@ void OriginTrialContext::AddToken(const String& token) { +@@ -315,6 +315,9 @@ void OriginTrialContext::AddToken(const String& token) { void OriginTrialContext::AddTokenFromExternalScript( const String& token, const Vector>& external_origins) { @@ -263,7 +262,7 @@ diff --git a/third_party/blink/renderer/core/origin_trials/origin_trial_context. Vector script_origins; for (const scoped_refptr& origin : external_origins) { OriginInfo origin_info = {.origin = origin, -@@ -466,8 +469,6 @@ bool OriginTrialContext::InstallSettingFeature( +@@ -470,8 +473,6 @@ bool OriginTrialContext::InstallSettingFeature( } void OriginTrialContext::AddFeature(mojom::blink::OriginTrialFeature feature) { @@ -272,7 +271,7 @@ diff --git a/third_party/blink/renderer/core/origin_trials/origin_trial_context. } bool OriginTrialContext::IsFeatureEnabled( -@@ -511,6 +512,7 @@ void OriginTrialContext::AddForceEnabledTrials( +@@ -515,6 +516,7 @@ void OriginTrialContext::AddForceEnabledTrials( } bool OriginTrialContext::CanEnableTrialFromName(const StringView& trial_name) { diff --git a/build/cromite_patches/Disable-update-scheduler.patch b/build/cromite_patches/Disable-update-scheduler.patch index 08d35e40..d72be243 100644 --- a/build/cromite_patches/Disable-update-scheduler.patch +++ b/build/cromite_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 -@@ -67,7 +67,7 @@ public class ChromeBackgroundTaskFactory implements BackgroundTaskFactory { +@@ -69,7 +69,7 @@ public class ChromeBackgroundTaskFactory implements BackgroundTaskFactory { case TaskIds.WEBAPK_UPDATE_JOB_ID: return new WebApkUpdateTask(); case TaskIds.COMPONENT_UPDATE_JOB_ID: diff --git a/build/cromite_patches/Disable-various-metrics.patch b/build/cromite_patches/Disable-various-metrics.patch index 0dd65422..ba5e1e25 100644 --- a/build/cromite_patches/Disable-various-metrics.patch +++ b/build/cromite_patches/Disable-various-metrics.patch @@ -36,15 +36,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstR diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/browser/android/ntp/most_visited_sites_bridge.cc --- a/chrome/browser/android/ntp/most_visited_sites_bridge.cc +++ b/chrome/browser/android/ntp/most_visited_sites_bridge.cc -@@ -26,7 +26,6 @@ - #include "chrome/browser/profiles/profile_android.h" +@@ -23,7 +23,6 @@ + #include "chrome/browser/profiles/profile.h" #include "components/favicon_base/favicon_types.h" #include "components/history/core/browser/history_service.h" -#include "components/ntp_tiles/metrics.h" #include "components/ntp_tiles/most_visited_sites.h" #include "components/ntp_tiles/section_type.h" #include "ui/gfx/android/java_bitmap.h" -@@ -46,7 +45,6 @@ using ntp_tiles::NTPTilesVector; +@@ -43,7 +42,6 @@ using ntp_tiles::NTPTilesVector; using ntp_tiles::SectionType; using ntp_tiles::TileTitleSource; using ntp_tiles::TileSource; @@ -52,7 +52,7 @@ diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/br namespace { -@@ -233,7 +231,6 @@ void MostVisitedSitesBridge::RecordPageImpression( +@@ -219,7 +217,6 @@ void MostVisitedSitesBridge::RecordPageImpression( JNIEnv* env, const JavaParamRef& obj, jint jtiles_count) { @@ -60,11 +60,11 @@ diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/br } void MostVisitedSitesBridge::RecordTileImpression( -@@ -245,15 +242,6 @@ void MostVisitedSitesBridge::RecordTileImpression( +@@ -231,15 +228,6 @@ void MostVisitedSitesBridge::RecordTileImpression( jint jtitle_source, jint jsource, const JavaParamRef& jurl) { -- std::unique_ptr url = url::GURLAndroid::ToNativeGURL(env, jurl); +- GURL url = url::GURLAndroid::ToNativeGURL(env, jurl); - TileTitleSource title_source = static_cast(jtitle_source); - TileSource source = static_cast(jsource); - TileVisualType visual_type = static_cast(jvisual_type); @@ -72,11 +72,11 @@ diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/br - static_cast(jicon_type); - - ntp_tiles::metrics::RecordTileImpression(ntp_tiles::NTPTileImpression( -- jindex, source, title_source, visual_type, icon_type, *url)); +- jindex, source, title_source, visual_type, icon_type, url)); } void MostVisitedSitesBridge::RecordOpenedMostVisitedItem( -@@ -263,11 +251,6 @@ void MostVisitedSitesBridge::RecordOpenedMostVisitedItem( +@@ -249,11 +237,6 @@ void MostVisitedSitesBridge::RecordOpenedMostVisitedItem( jint tile_type, jint title_source, jint source) { @@ -87,11 +87,11 @@ diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/br - /*url_for_rappor=*/GURL())); } - static jlong JNI_MostVisitedSitesBridge_Init( + static jlong JNI_MostVisitedSitesBridge_Init(JNIEnv* env, 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 -@@ -1081,7 +1081,7 @@ void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { +@@ -1099,7 +1099,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 -@@ -83,7 +83,6 @@ - #include "chrome/browser/hid/chrome_hid_delegate.h" +@@ -85,7 +85,6 @@ + #include "chrome/browser/history/history_service_factory.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" -@@ -4908,16 +4907,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( +@@ -5106,16 +5105,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( content::NavigationHandle* handle) { std::vector> throttles; @@ -125,11 +125,11 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch - page_load_metrics::MetricsNavigationThrottle::Create(handle)); - } - - #if BUILDFLAG(ENABLE_SUPERVISED_USERS) - MaybeAddThrottle( - SupervisedUserNavigationThrottle::MaybeCreateThrottleFor(handle), -@@ -5018,10 +5007,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( - throttle_manager->MaybeAppendNavigationThrottles(handle, &throttles); + #if BUILDFLAG(IS_ANDROID) + // TODO(davidben): This is insufficient to integrate with prerender properly. + // https://crbug.com/370595 +@@ -5223,10 +5212,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( + } } - MaybeAddThrottle( @@ -142,7 +142,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch diff --git a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc --- a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc +++ b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc -@@ -92,6 +92,10 @@ BASE_FEATURE(kPostFREFixMetricsReportingFeature, +@@ -93,6 +93,10 @@ BASE_FEATURE(kPostFREFixMetricsReportingFeature, // Name of the variations param that defines the sampling rate. const char kRateParamName[] = "sampling_rate_per_mille"; @@ -179,7 +179,7 @@ diff --git a/chrome/browser/ui/search/ntp_user_data_logger.cc b/chrome/browser/u diff --git a/components/ntp_tiles/BUILD.gn b/components/ntp_tiles/BUILD.gn --- a/components/ntp_tiles/BUILD.gn +++ b/components/ntp_tiles/BUILD.gn -@@ -23,8 +23,6 @@ static_library("ntp_tiles") { +@@ -24,8 +24,6 @@ static_library("ntp_tiles") { "icon_cacher.h", "icon_cacher_impl.cc", "icon_cacher_impl.h", @@ -188,7 +188,7 @@ diff --git a/components/ntp_tiles/BUILD.gn b/components/ntp_tiles/BUILD.gn "most_visited_sites.cc", "most_visited_sites.h", "ntp_tile.cc", -@@ -91,7 +89,6 @@ source_set("unit_tests") { +@@ -97,7 +95,6 @@ source_set("unit_tests") { "custom_links_manager_impl_unittest.cc", "custom_links_store_unittest.cc", "icon_cacher_impl_unittest.cc", @@ -199,7 +199,7 @@ diff --git a/components/ntp_tiles/BUILD.gn b/components/ntp_tiles/BUILD.gn diff --git a/components/ntp_tiles/custom_links_manager_impl.cc b/components/ntp_tiles/custom_links_manager_impl.cc --- a/components/ntp_tiles/custom_links_manager_impl.cc +++ b/components/ntp_tiles/custom_links_manager_impl.cc -@@ -203,7 +203,6 @@ void CustomLinksManagerImpl::RemoveCustomLinksForPreinstalledApps() { +@@ -217,7 +217,6 @@ void CustomLinksManagerImpl::RemoveCustomLinksForPreinstalledApps() { } } if (default_app_links_deleted) { @@ -210,7 +210,7 @@ diff --git a/components/ntp_tiles/custom_links_manager_impl.cc b/components/ntp_ diff --git a/components/ntp_tiles/most_visited_sites.cc b/components/ntp_tiles/most_visited_sites.cc --- a/components/ntp_tiles/most_visited_sites.cc +++ b/components/ntp_tiles/most_visited_sites.cc -@@ -704,8 +704,6 @@ void MostVisitedSites::SaveTilesAndNotify( +@@ -747,8 +747,6 @@ void MostVisitedSites::SaveTilesAndNotify( : new_tiles; if (fixed_tiles.size() != new_tiles.size()) { diff --git a/build/cromite_patches/Do-not-build-API-keys-infobar.patch b/build/cromite_patches/Do-not-build-API-keys-infobar.patch index 551c58d0..47186ea5 100644 --- a/build/cromite_patches/Do-not-build-API-keys-infobar.patch +++ b/build/cromite_patches/Do-not-build-API-keys-infobar.patch @@ -5,16 +5,16 @@ Subject: Do not build API keys infobar License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- chrome/browser/ui/BUILD.gn | 2 -- - chrome/browser/ui/startup/infobar_utils.cc | 3 --- - 2 files changed, 5 deletions(-) + chrome/browser/ui/startup/infobar_utils.cc | 4 ---- + 2 files changed, 6 deletions(-) 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 -@@ -1416,8 +1416,6 @@ static_library("ui") { - "singleton_tabs.h", - "startup/automation_infobar_delegate.cc", - "startup/automation_infobar_delegate.h", +@@ -1500,8 +1500,6 @@ static_library("ui") { + "startup/default_browser_prompt/default_browser_prompt_manager.h", + "startup/default_browser_prompt/default_browser_prompt_prefs.cc", + "startup/default_browser_prompt/default_browser_prompt_prefs.h", - "startup/google_api_keys_infobar_delegate.cc", - "startup/google_api_keys_infobar_delegate.h", "startup/infobar_utils.cc", @@ -23,12 +23,13 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn diff --git a/chrome/browser/ui/startup/infobar_utils.cc b/chrome/browser/ui/startup/infobar_utils.cc --- a/chrome/browser/ui/startup/infobar_utils.cc +++ b/chrome/browser/ui/startup/infobar_utils.cc -@@ -146,9 +146,6 @@ void AddInfoBarsIfNecessary(Browser* browser, +@@ -154,10 +154,6 @@ void AddInfoBarsIfNecessary(Browser* browser, infobars::ContentInfoBarManager* infobar_manager = infobars::ContentInfoBarManager::FromWebContents(web_contents); -- if (!google_apis::HasAPIKeyConfigured()) +- if (!google_apis::HasAPIKeyConfigured()) { - GoogleApiKeysInfoBarDelegate::Create(infobar_manager); +- } - if (ObsoleteSystem::IsObsoleteNowOrSoon()) { PrefService* local_state = g_browser_process->local_state(); diff --git a/build/cromite_patches/Do-not-compile-QR-code-sharing.patch b/build/cromite_patches/Do-not-compile-QR-code-sharing.patch index 9c15a26a..c888b015 100644 --- a/build/cromite_patches/Do-not-compile-QR-code-sharing.patch +++ b/build/cromite_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 | 1 - - ...omeProvidedSharingOptionsProviderBase.java | 22 ------------------- - chrome/browser/share/android/java_sources.gni | 11 ---------- - 5 files changed, 40 deletions(-) + ...omeProvidedSharingOptionsProviderBase.java | 23 ------------------- + chrome/browser/share/android/java_sources.gni | 11 --------- + 5 files changed, 41 deletions(-) diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -3509,7 +3509,6 @@ generate_jni("chrome_jni_headers") { +@@ -3606,7 +3606,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 -@@ -113,7 +113,6 @@ import org.chromium.chrome.browser.share.ShareButtonController; +@@ -114,7 +114,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; -@@ -595,10 +594,6 @@ public class RootUiCoordinator +@@ -604,10 +603,6 @@ public class RootUiCoordinator } public void onAttachFragment(Fragment fragment) { @@ -47,10 +47,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordi diff --git a/chrome/browser/share/BUILD.gn b/chrome/browser/share/BUILD.gn --- a/chrome/browser/share/BUILD.gn +++ b/chrome/browser/share/BUILD.gn -@@ -43,7 +43,6 @@ source_set("share") { - "default_ranking_android.cc", - "editor_screenshot_task.cc", +@@ -45,7 +45,6 @@ source_set("share") { "link_to_text_bridge.cc", + "page_info_sharing_bridge.cc", + "page_info_sharing_bridge.h", - "qr_code_generator_android.cc", ] deps += [ @@ -58,15 +58,15 @@ diff --git a/chrome/browser/share/BUILD.gn b/chrome/browser/share/BUILD.gn diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/ChromeProvidedSharingOptionsProviderBase.java b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/ChromeProvidedSharingOptionsProviderBase.java --- a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/ChromeProvidedSharingOptionsProviderBase.java +++ b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/ChromeProvidedSharingOptionsProviderBase.java -@@ -19,7 +19,6 @@ import org.chromium.chrome.browser.preferences.Pref; - import org.chromium.chrome.browser.profiles.Profile; +@@ -20,7 +20,6 @@ import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.share.ChromeShareExtras.DetailedContentType; import org.chromium.chrome.browser.share.ShareContentTypeHelper.ContentType; + import org.chromium.chrome.browser.share.ShareMetricsUtils.ShareCustomAction; -import org.chromium.chrome.browser.share.qrcode.QrCodeCoordinator; 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; -@@ -268,9 +267,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase { +@@ -291,9 +290,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase { } private void maybeAddQrCodeFirstPartyOption() { @@ -76,7 +76,7 @@ diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/s } private void maybeAddLongScreenshotFirstPartyOption() { -@@ -386,24 +382,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase { +@@ -414,25 +410,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase { .build(); } @@ -87,6 +87,7 @@ diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/s - ContentType.IMAGE) - .setDetailedContentTypesToDisableFor(DetailedContentType.SCREENSHOT) - .setIcon(R.drawable.qr_code, R.string.qr_code_share_icon_label) +- .setShareActionType(ShareCustomAction.QR_CODE) - .setFeatureNameForMetrics(USER_ACTION_QR_CODE_SELECTED) - .setOnClickCallback( - (view) -> { @@ -104,10 +105,10 @@ diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/s diff --git a/chrome/browser/share/android/java_sources.gni b/chrome/browser/share/android/java_sources.gni --- a/chrome/browser/share/android/java_sources.gni +++ b/chrome/browser/share/android/java_sources.gni -@@ -33,17 +33,6 @@ share_java_sources = [ - "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/page_info_sheet/PageInfoBottomSheetCoordinator.java", - "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/page_info_sheet/PageInfoBottomSheetMediator.java", - "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/page_info_sheet/PageInfoBottomSheetProperties.java", +@@ -44,17 +44,6 @@ share_java_sources = [ + "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/page_info_sheet/feedback/FeedbackSheetMediator.java", + "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/page_info_sheet/feedback/FeedbackSheetProperties.java", + "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/page_info_sheet/feedback/FeedbackSheetViewBinder.java", - "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/QRCodeGenerator.java", - "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/QrCodeCoordinator.java", - "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/QrCodeDialog.java", diff --git a/build/cromite_patches/Do-not-ignore-download-location-prompt-setting.patch b/build/cromite_patches/Do-not-ignore-download-location-prompt-setting.patch index bf8ea4b5..e3fae0ed 100644 --- a/build/cromite_patches/Do-not-ignore-download-location-prompt-setting.patch +++ b/build/cromite_patches/Do-not-ignore-download-location-prompt-setting.patch @@ -16,7 +16,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html 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 -@@ -141,22 +141,6 @@ public class DownloadLocationDialogCoordinator implements ModalDialogProperties. +@@ -142,22 +142,6 @@ public class DownloadLocationDialogCoordinator implements ModalDialogProperties. * @param dirs An list of available download directories. */ private void onDirectoryOptionsRetrieved(ArrayList dirs) { @@ -26,7 +26,7 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse - if (dirs.size() == 1 - && !mLocationDialogManaged - && mDialogType == DownloadLocationDialogType.DEFAULT -- && !shouldShowIncognitoWarning()) { +- && !mProfile.isOffTheRecord()) { - final DirectoryOption dir = dirs.get(0); - if (dir.type == DirectoryOption.DownloadLocationDirectoryType.DEFAULT) { - assert (!TextUtils.isEmpty(dir.location)); diff --git a/build/cromite_patches/Do-not-link-with-libatomic.patch b/build/cromite_patches/Do-not-link-with-libatomic.patch index 82b65105..46d8b821 100644 --- a/build/cromite_patches/Do-not-link-with-libatomic.patch +++ b/build/cromite_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 -@@ -1128,7 +1128,7 @@ component("base") { +@@ -1121,7 +1121,7 @@ component("base") { # more robust check for this. if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos)) && host_toolchain != "//build/toolchain/cros:host") { diff --git a/build/cromite_patches/Do-not-store-passwords-by-default.patch b/build/cromite_patches/Do-not-store-passwords-by-default.patch index 4c933132..136b2823 100644 --- a/build/cromite_patches/Do-not-store-passwords-by-default.patch +++ b/build/cromite_patches/Do-not-store-passwords-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/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc --- a/components/password_manager/core/browser/password_manager.cc +++ b/components/password_manager/core/browser/password_manager.cc -@@ -254,14 +254,14 @@ base::CallbackListSubscription AddSyncEnabledOrDisabledCallback( +@@ -277,14 +277,14 @@ bool HasManuallyFilledFields(const PasswordForm& form) { void PasswordManager::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref( @@ -27,13 +27,14 @@ diff --git a/components/password_manager/core/browser/password_manager.cc b/comp user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF); registry->RegisterStringPref(prefs::kSyncPasswordHash, std::string(), PrefRegistry::NO_REGISTRATION_FLAGS); -@@ -301,8 +301,8 @@ void PasswordManager::RegisterProfilePrefs( +@@ -324,9 +324,9 @@ void PasswordManager::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); registry->RegisterBooleanPref(prefs::kPasswordsPrefWithNewLabelUsed, false); #if BUILDFLAG(IS_ANDROID) - registry->RegisterBooleanPref(prefs::kOfferToSavePasswordsEnabledGMS, true); -- registry->RegisterBooleanPref(prefs::kAutoSignInEnabledGMS, true); + registry->RegisterBooleanPref(prefs::kOfferToSavePasswordsEnabledGMS, false); + registry->RegisterBooleanPref(prefs::kAccountStorageNoticeShown, false); +- registry->RegisterBooleanPref(prefs::kAutoSignInEnabledGMS, true); + registry->RegisterBooleanPref(prefs::kAutoSignInEnabledGMS, false); registry->RegisterBooleanPref(prefs::kSettingsMigratedToUPMLocal, false); registry->RegisterIntegerPref( diff --git a/build/cromite_patches/DoH-improvements.patch b/build/cromite_patches/DoH-improvements.patch index 63b4b9e9..5e0fd6bd 100644 --- a/build/cromite_patches/DoH-improvements.patch +++ b/build/cromite_patches/DoH-improvements.patch @@ -7,46 +7,92 @@ Always enforce DoH even with inconsistent system DNS configuration License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - .../browser/net/stub_resolver_config_reader.cc | 17 +---------------- - net/dns/dns_client.cc | 11 ++++++++--- - net/dns/host_resolver_manager.cc | 1 + - 3 files changed, 10 insertions(+), 19 deletions(-) + chrome/browser/net/secure_dns_config.cc | 2 +- + chrome/browser/net/secure_dns_util.cc | 2 +- + chrome/browser/net/stub_resolver_config_reader.cc | 3 +++ + chrome/browser/privacy/secure_dns_bridge.cc | 2 +- + .../ui/webui/settings/settings_secure_dns_handler.cc | 2 +- + net/dns/dns_client.cc | 11 ++++++++--- + net/dns/host_resolver_manager.cc | 1 + + net/dns/public/doh_provider_entry.cc | 9 +++------ + net/dns/public/doh_provider_entry.h | 4 ++-- + 9 files changed, 21 insertions(+), 15 deletions(-) +diff --git a/chrome/browser/net/secure_dns_config.cc b/chrome/browser/net/secure_dns_config.cc +--- a/chrome/browser/net/secure_dns_config.cc ++++ b/chrome/browser/net/secure_dns_config.cc +@@ -27,7 +27,7 @@ std::optional SecureDnsConfig::ParseMode( + if (name == kModeSecure) { + return net::SecureDnsMode::kSecure; + } else if (name == kModeAutomatic) { +- return net::SecureDnsMode::kAutomatic; ++ return net::SecureDnsMode::kSecure; + } else if (name == kModeOff) { + return net::SecureDnsMode::kOff; + } +diff --git a/chrome/browser/net/secure_dns_util.cc b/chrome/browser/net/secure_dns_util.cc +--- a/chrome/browser/net/secure_dns_util.cc ++++ b/chrome/browser/net/secure_dns_util.cc +@@ -42,7 +42,7 @@ bool EntryIsForCountry(const net::DohProviderEntry* entry, int country_id) { + country_id; + }); + if (matches) { +- DCHECK(!entry->ui_name.empty()); ++ DCHECK(!entry->ui_name_cromite.empty()); + DCHECK(!entry->privacy_policy.empty()); + } + return matches; diff --git a/chrome/browser/net/stub_resolver_config_reader.cc b/chrome/browser/net/stub_resolver_config_reader.cc --- a/chrome/browser/net/stub_resolver_config_reader.cc +++ b/chrome/browser/net/stub_resolver_config_reader.cc -@@ -151,7 +151,7 @@ StubResolverConfigReader::StubResolverConfigReader(PrefService* local_state, - if (entries.count("dns-over-https@1")) { - // The user has "Enabled" selected. - local_state_->SetString(prefs::kDnsOverHttpsMode, -- SecureDnsConfig::kModeAutomatic); -+ SecureDnsConfig::kModeSecure); - } else if (entries.count("dns-over-https@2")) { - // The user has "Disabled" selected. - local_state_->SetString(prefs::kDnsOverHttpsMode, -@@ -346,22 +346,7 @@ SecureDnsConfig StubResolverConfigReader::GetAndUpdateConfiguration( - check_parental_controls = false; - } +@@ -83,6 +83,7 @@ enum class SecureDnsModeDetailsForHistogram { -- // Check parental controls last because it can be expensive and should only be -- // checked if necessary for the otherwise-determined mode. - if (check_parental_controls) { -- if (ShouldDisableDohForParentalControls()) { -- forced_management_mode = -- SecureDnsConfig::ManagementMode::kDisabledParentalControls; -- secure_dns_mode = net::SecureDnsMode::kOff; -- mode_details = -- SecureDnsModeDetailsForHistogram::kOffByDetectedParentalControls; -- -- // If parental controls had not previously been checked, need to update -- // network service. -- if (!parental_controls_checked_) -- update_network_service = true; -- } -- - parental_controls_checked_ = true; - } + #if BUILDFLAG(IS_WIN) + bool ShouldDisableDohForWindowsParentalControls() { ++ if ((true)) return false; + return GetWinParentalControls().web_filter; + } + #endif // BUILDFLAG(IS_WIN) +@@ -189,6 +190,7 @@ void StubResolverConfigReader::UpdateNetworkService(bool record_metrics) { + } + bool StubResolverConfigReader::ShouldDisableDohForManaged() { ++ if ((true)) return false; + // This function ignores cloud policies which are loaded on a per-profile basis. + #if BUILDFLAG(IS_ANDROID) + // Check for MDM/management/owner apps. android_has_owner_ is true if either a +@@ -217,6 +219,7 @@ bool StubResolverConfigReader::ShouldDisableDohForManaged() { + } + + bool StubResolverConfigReader::ShouldDisableDohForParentalControls() { ++ if ((true)) return false; + if (parental_controls_testing_override_.has_value()) + return parental_controls_testing_override_.value(); + +diff --git a/chrome/browser/privacy/secure_dns_bridge.cc b/chrome/browser/privacy/secure_dns_bridge.cc +--- a/chrome/browser/privacy/secure_dns_bridge.cc ++++ b/chrome/browser/privacy/secure_dns_bridge.cc +@@ -109,7 +109,7 @@ static ScopedJavaLocalRef JNI_SecureDnsBridge_GetProviders( + providers, std::back_inserter(ret), + [](const net::DohProviderEntry* entry) -> std::vector { + net::DnsOverHttpsConfig config({entry->doh_server_config}); +- return {base::UTF8ToUTF16(entry->ui_name), ++ return {base::UTF8ToUTF16(entry->ui_name_cromite.empty() ? entry->provider : entry->ui_name_cromite), + base::UTF8ToUTF16(config.ToString()), + base::UTF8ToUTF16(entry->privacy_policy)}; + }); +diff --git a/chrome/browser/ui/webui/settings/settings_secure_dns_handler.cc b/chrome/browser/ui/webui/settings/settings_secure_dns_handler.cc +--- a/chrome/browser/ui/webui/settings/settings_secure_dns_handler.cc ++++ b/chrome/browser/ui/webui/settings/settings_secure_dns_handler.cc +@@ -120,7 +120,7 @@ base::Value::List SecureDnsHandler::GetSecureDnsResolverList() { + for (const net::DohProviderEntry* entry : providers_) { + net::DnsOverHttpsConfig doh_config({entry->doh_server_config}); + base::Value::Dict dict; +- dict.Set("name", entry->ui_name); ++ dict.Set("name", entry->ui_name_cromite.empty() ? entry->provider : entry->ui_name_cromite); + dict.Set("value", doh_config.ToString()); + dict.Set("policy", entry->privacy_policy); + resolvers.Append(std::move(dict)); diff --git a/net/dns/dns_client.cc b/net/dns/dns_client.cc --- a/net/dns/dns_client.cc +++ b/net/dns/dns_client.cc @@ -82,7 +128,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 -@@ -599,6 +599,7 @@ void HostResolverManager::SetDnsConfigOverrides(DnsConfigOverrides overrides) { +@@ -639,6 +639,7 @@ void HostResolverManager::SetDnsConfigOverrides(DnsConfigOverrides overrides) { bool changed = dns_client_->SetConfigOverrides(std::move(overrides)); if (changed) { @@ -90,4 +136,48 @@ diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc NetworkChangeNotifier::TriggerNonSystemDnsChange(); // Only invalidate cache if new overrides have resulted in a config change. +diff --git a/net/dns/public/doh_provider_entry.cc b/net/dns/public/doh_provider_entry.cc +--- a/net/dns/public/doh_provider_entry.cc ++++ b/net/dns/public/doh_provider_entry.cc +@@ -350,16 +350,13 @@ DohProviderEntry::DohProviderEntry( + doh_server_config( + ParseValidDohTemplate(std::move(dns_over_https_template), + std::move(dns_over_https_server_ip_strs))), +- ui_name(std::move(ui_name)), ++ ui_name_cromite(std::move(ui_name)), + privacy_policy(std::move(privacy_policy)), +- display_globally(display_globally), ++ display_globally(true), + display_countries(std::move(display_countries)), + logging_level(logging_level) { + DCHECK(!display_globally || this->display_countries.empty()); +- if (display_globally || !this->display_countries.empty()) { +- DCHECK(!this->ui_name.empty()); +- DCHECK(!this->privacy_policy.empty()); +- } ++ if (this->privacy_policy.empty()) this->display_globally = false; + for (const auto& display_country : this->display_countries) { + DCHECK_EQ(2u, display_country.size()); + } +diff --git a/net/dns/public/doh_provider_entry.h b/net/dns/public/doh_provider_entry.h +--- a/net/dns/public/doh_provider_entry.h ++++ b/net/dns/public/doh_provider_entry.h +@@ -55,7 +55,7 @@ struct NET_EXPORT DohProviderEntry { + std::set ip_addresses; + std::set dns_over_tls_hostnames; + DnsOverHttpsServerConfig doh_server_config; +- std::string ui_name; ++ std::string ui_name_cromite; + std::string privacy_policy; + bool display_globally; + std::set display_countries; +@@ -95,7 +95,7 @@ struct NET_EXPORT DohProviderEntry { + std::set dns_over_53_server_ip_strs, + std::set dns_over_tls_hostnames, + std::string dns_over_https_template, +- std::string ui_name, ++ std::string ui_name_cromite, + std::string privacy_policy, + bool display_globally, + std::set display_countries, -- diff --git a/build/cromite_patches/Enable-Certificate-Transparency.patch b/build/cromite_patches/Enable-Certificate-Transparency.patch index 8f54e988..0ed7f62a 100644 --- a/build/cromite_patches/Enable-Certificate-Transparency.patch +++ b/build/cromite_patches/Enable-Certificate-Transparency.patch @@ -14,9 +14,9 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../about_flags_cc/Enable-Certificate-Transparency.inc | 9 +++++++++ .../Enable-Certificate-Transparency.inc | 6 ++++++ .../Enable-Certificate-Transparency.inc | 2 ++ - net/http/transport_security_state.cc | 5 +++-- + net/http/transport_security_state.cc | 1 + services/network/sct_auditing/sct_auditing_handler.cc | 2 ++ - 8 files changed, 29 insertions(+), 3 deletions(-) + 8 files changed, 27 insertions(+), 1 deletion(-) 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 @@ -24,18 +24,18 @@ 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 -@@ -72,6 +72,7 @@ BASE_DECLARE_FEATURE(kTabCaptureBlueBorderCrOS); - - BASE_DECLARE_FEATURE(kWebUsbDeviceDetection); - +@@ -21,6 +21,7 @@ namespace features { + BASE_DECLARE_FEATURE(kAutocompleteActionPredictorConfidenceCutoff); + BASE_DECLARE_FEATURE(kBookmarksTreeView); + BASE_DECLARE_FEATURE(kBookmarkTriggerForPrerender2); +BASE_DECLARE_FEATURE(kCertificateTransparency); BASE_DECLARE_FEATURE(kCertificateTransparencyAskBeforeEnabling); + BASE_DECLARE_FEATURE(kClosedTabCache); - BASE_DECLARE_FEATURE(kLargeFaviconFromGoogle); 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 -@@ -1034,7 +1034,7 @@ bool SystemNetworkContextManager::IsCertificateTransparencyEnabled() { +@@ -1032,7 +1032,7 @@ bool SystemNetworkContextManager::IsCertificateTransparencyEnabled() { // - on an opt-in basis for other builds and embedders, controlled with the // kCertificateTransparencyAskBeforeEnabling flag return base::FeatureList::IsEnabled( @@ -43,7 +43,7 @@ diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/brows + features::kCertificateTransparency); } - #if BUILDFLAG(CHROME_ROOT_STORE_OPTIONAL) + network::mojom::NetworkContextParamsPtr 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 @@ -94,7 +94,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 -@@ -190,6 +190,7 @@ class HSTSPreloadDecoder : public net::extras::PreloadDecoder { +@@ -191,6 +191,7 @@ class HSTSPreloadDecoder : public extras::PreloadDecoder { bool DecodeHSTSPreload(const std::string& search_hostname, PreloadResult* out) { #if !BUILDFLAG(INCLUDE_TRANSPORT_SECURITY_STATE_PRELOAD_LIST) @@ -102,17 +102,6 @@ diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_ if (g_hsts_source == nullptr) return false; #endif -@@ -235,8 +236,8 @@ bool DecodeHSTSPreload(const std::string& search_hostname, PreloadResult* out) { - - // static - BASE_FEATURE(kCertificateTransparencyEnforcement, -- "CertificateTransparencyEnforcement", -- base::FEATURE_ENABLED_BY_DEFAULT); -+ "CertificateTransparencyEnforcement", // must be enabled -+ base::FEATURE_ENABLED_BY_DEFAULT); // in Bromite - - void SetTransportSecurityStateSourceForTesting( - const TransportSecurityStateSource* source) { diff --git a/services/network/sct_auditing/sct_auditing_handler.cc b/services/network/sct_auditing/sct_auditing_handler.cc --- a/services/network/sct_auditing/sct_auditing_handler.cc +++ b/services/network/sct_auditing/sct_auditing_handler.cc diff --git a/build/cromite_patches/Enable-HEVC-by-default.patch b/build/cromite_patches/Enable-HEVC-by-default.patch index c491be80..53ab917f 100644 --- a/build/cromite_patches/Enable-HEVC-by-default.patch +++ b/build/cromite_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 -@@ -333,8 +333,8 @@ BASE_FEATURE(kEnableTabMuting, +@@ -339,8 +339,8 @@ BASE_FEATURE(kEnableTabMuting, #if BUILDFLAG(ENABLE_PLATFORM_HEVC) // Enables HEVC hardware accelerated decoding. BASE_FEATURE(kPlatformHEVCDecoderSupport, diff --git a/build/cromite_patches/Enable-ImprovedBookmarks-by-default.patch b/build/cromite_patches/Enable-ImprovedBookmarks-by-default.patch index 5e83b81b..cfcb3480 100644 --- a/build/cromite_patches/Enable-ImprovedBookmarks-by-default.patch +++ b/build/cromite_patches/Enable-ImprovedBookmarks-by-default.patch @@ -62,15 +62,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java -@@ -39,6 +39,7 @@ import org.chromium.chrome.browser.app.bookmarks.BookmarkActivity; - import org.chromium.chrome.browser.app.bookmarks.BookmarkAddEditFolderActivity; +@@ -39,6 +39,7 @@ import org.chromium.chrome.browser.IntentHandler; + import org.chromium.chrome.browser.app.bookmarks.BookmarkActivity; import org.chromium.chrome.browser.app.bookmarks.BookmarkEditActivity; - import org.chromium.chrome.browser.app.bookmarks.BookmarkFolderSelectActivity; + import org.chromium.chrome.browser.app.bookmarks.BookmarkFolderPickerActivity; +import org.chromium.chrome.browser.bookmarks.BookmarkFeatures; import org.chromium.chrome.browser.bookmarks.BookmarkUiPrefs.BookmarkRowDisplayPref; import org.chromium.chrome.browser.commerce.ShoppingServiceFactory; import org.chromium.chrome.browser.document.ChromeLauncherActivity; -@@ -526,7 +527,7 @@ public class BookmarkUtils { +@@ -539,7 +540,7 @@ public class BookmarkUtils { RecordUserAction.record("MobileBookmarkManagerReopenBookmarksInSameSession"); } @@ -82,15 +82,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm 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 -@@ -797,7 +797,7 @@ public abstract class ChromeFeatureList { - public static final MutableFlagWithSafeDefault sAdvancedPeripheralsSupportTabStrip = - newMutableFlagWithSafeDefault(ADVANCED_PERIPHERALS_SUPPORT_TAB_STRIP, true); +@@ -834,7 +834,7 @@ public abstract class ChromeFeatureList { + public static final MutableFlagWithSafeDefault sAdaptiveButtonInTopToolbarCustomizationV2 = + newMutableFlagWithSafeDefault(ADAPTIVE_BUTTON_IN_TOP_TOOLBAR_CUSTOMIZATION_V2, false); public static final MutableFlagWithSafeDefault sAndroidImprovedBookmarks = - newMutableFlagWithSafeDefault(ANDROID_IMPROVED_BOOKMARKS, false); + newMutableFlagWithSafeDefault(ANDROID_IMPROVED_BOOKMARKS, true); - public static final MutableFlagWithSafeDefault sDeferKeepScreenOnDuringGesture = - newMutableFlagWithSafeDefault(DEFER_KEEP_SCREEN_ON_DURING_GESTURE, false); - public static final MutableFlagWithSafeDefault sDeferNotifyInMotion = + public static final MutableFlagWithSafeDefault sAndroidTabDeclutter = + newMutableFlagWithSafeDefault(ANDROID_TAB_DECLUTTER, false); + public static final MutableFlagWithSafeDefault sAndroidTabDeclutterRescueKillSwitch = diff --git a/components/bookmarks/browser/bookmark_node.cc b/components/bookmarks/browser/bookmark_node.cc --- a/components/bookmarks/browser/bookmark_node.cc +++ b/components/bookmarks/browser/bookmark_node.cc diff --git a/build/cromite_patches/Enable-PermuteTLSExtensions-by-default.patch b/build/cromite_patches/Enable-PermuteTLSExtensions-by-default.patch deleted file mode 100644 index 01f9ac50..00000000 --- a/build/cromite_patches/Enable-PermuteTLSExtensions-by-default.patch +++ /dev/null @@ -1,17 +0,0 @@ -From: csagan5 <32685696+csagan5@users.noreply.github.com> -Date: Fri, 2 Dec 2022 01:18:14 +0100 -Subject: Enable PermuteTLSExtensions by default - -License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html ---- - .../base/features_cc/Enable-PermuteTLSExtensions-by-default.inc | 1 + - 1 file changed, 1 insertion(+) - create mode 100644 cromite_flags/net/base/features_cc/Enable-PermuteTLSExtensions-by-default.inc - -diff --git a/cromite_flags/net/base/features_cc/Enable-PermuteTLSExtensions-by-default.inc b/cromite_flags/net/base/features_cc/Enable-PermuteTLSExtensions-by-default.inc -new file mode 100644 ---- /dev/null -+++ b/cromite_flags/net/base/features_cc/Enable-PermuteTLSExtensions-by-default.inc -@@ -0,0 +1 @@ -+SET_CROMITE_FEATURE_ENABLED(kPermuteTLSExtensions); --- diff --git a/build/cromite_patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch b/build/cromite_patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch index f9847068..2ff98adf 100644 --- a/build/cromite_patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch +++ b/build/cromite_patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch @@ -20,7 +20,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc -@@ -1456,7 +1456,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs( +@@ -1531,7 +1531,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs( registry->RegisterFilePathPref(prefs::kDiskCacheDir, base::FilePath()); registry->RegisterIntegerPref(prefs::kDiskCacheSize, 0); registry->RegisterStringPref(prefs::kIsolateOrigins, std::string()); @@ -28,8 +28,8 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch + registry->RegisterBooleanPref(prefs::kSitePerProcess, true); registry->RegisterBooleanPref(prefs::kTabFreezingEnabled, true); registry->RegisterIntegerPref(prefs::kSCTAuditingHashdanceReportCount, 0); - registry->RegisterBooleanPref( -@@ -1481,7 +1481,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs( + #if BUILDFLAG(IS_CHROMEOS) +@@ -1552,7 +1552,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs( // user policy in addition to the same named ones in Local State (which are // used for mapping the command-line flags). registry->RegisterStringPref(prefs::kIsolateOrigins, std::string()); diff --git a/build/cromite_patches/Enable-darken-websites-checkbox-in-themes.patch b/build/cromite_patches/Enable-darken-websites-checkbox-in-themes.patch index 2f663e0c..1feea0d6 100644 --- a/build/cromite_patches/Enable-darken-websites-checkbox-in-themes.patch +++ b/build/cromite_patches/Enable-darken-websites-checkbox-in-themes.patch @@ -14,19 +14,19 @@ 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 -@@ -1635,9 +1635,9 @@ - "expiry_milestone": 125 +@@ -1850,9 +1850,9 @@ + "expiry_milestone": -1 }, { - "name": "darken-websites-checkbox-in-themes-setting", - "owners": [ "nemco@google.com", "wenyufu@google.com", "twellington@chromium.org" ], -- "expiry_milestone": 125 -+ "name": "darken-websites-checkbox-in-themes-setting", // this is always enabled in Bromite +- "expiry_milestone": 130 ++ "name": "darken-websites-checkbox-in-themes-setting", // this is always enabled in Bromite + "owners": [ "nemco@google.com", "wenyufu@google.com", "twellington@chromium.org" ], // - + "expiry_milestone": -1 }, { - "name": "data-sharing-android", + "name": "dcheck-is-fatal", diff --git a/cromite_flags/components/content_settings/core/common/features_cc/Enable-darken-websites-checkbox-in-themes.inc b/cromite_flags/components/content_settings/core/common/features_cc/Enable-darken-websites-checkbox-in-themes.inc new file mode 100644 --- /dev/null diff --git a/build/cromite_patches/Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch b/build/cromite_patches/Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch index f45d2544..199b80ed 100644 --- a/build/cromite_patches/Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch +++ b/build/cromite_patches/Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch @@ -45,7 +45,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn -@@ -394,6 +394,10 @@ config("compiler") { +@@ -378,6 +378,10 @@ config("compiler") { } } diff --git a/build/cromite_patches/Enable-native-Android-autofill.patch b/build/cromite_patches/Enable-native-Android-autofill.patch index 97e78d9a..071e6653 100644 --- a/build/cromite_patches/Enable-native-Android-autofill.patch +++ b/build/cromite_patches/Enable-native-Android-autofill.patch @@ -15,52 +15,53 @@ 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 --- - chrome/android/BUILD.gn | 1 + - .../settings/PasswordSettings.java | 81 ++++++++++++++++++- - .../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 + + .../settings/PasswordSettings.java | 82 ++++++++++++++++++- + .../chrome/browser/settings/MainSettings.java | 3 +- + .../chromium/chrome/browser/tab/TabImpl.java | 43 ++++++++-- + chrome/browser/about_flags.cc | 22 ----- + chrome/browser/android/tab_android.cc | 3 +- + chrome/browser/autofill/android/BUILD.gn | 2 +- + .../autofill/AutofillClientProviderUtils.java | 2 +- + chrome/browser/flag_descriptions.cc | 6 -- + chrome/browser/flag_descriptions.h | 3 - .../strings/android_chrome_strings.grd | 6 ++ + .../ui/autofill/autofill_client_provider.cc | 34 +------- + .../ui/autofill/autofill_client_provider.h | 6 -- + chrome/browser/ui/tab_helpers.cc | 4 +- components/android_autofill/browser/BUILD.gn | 1 + .../browser/android_autofill_manager.cc | 2 + .../browser/android_autofill_manager.h | 2 + .../autofill/AutofillManagerWrapper.java | 5 +- .../components/autofill/AutofillProvider.java | 7 ++ .../BrowserSelectionActionMenuDelegate.java | 62 ++++++++++++++ - .../browser/content_autofill_driver.cc | 57 +++++++++++++ + .../browser/content_autofill_driver.cc | 13 +++ .../content/browser/content_autofill_driver.h | 10 +++ - .../content_autofill_driver_factory.cc | 13 +++ + .../content_autofill_driver_factory.cc | 12 +++ .../content/renderer/autofill_agent.cc | 6 ++ .../renderer/password_autofill_agent.cc | 5 +- .../autofill/core/browser/autofill_driver.h | 2 + .../autofill/core/browser/autofill_manager.h | 2 + .../core/browser/browser_autofill_manager.cc | 2 + .../core/browser/browser_autofill_manager.h | 2 + - .../autofill/core/common/autofill_prefs.cc | 2 + + .../autofill/core/common/autofill_features.cc | 2 +- + .../autofill/core/common/autofill_features.h | 4 - + .../autofill/core/common/autofill_prefs.cc | 4 +- .../autofill/core/common/autofill_prefs.h | 5 ++ - .../embedder_support/view/ContentView.java | 46 +++++++++++ - .../selection/FloatingPastePopupMenu.java | 3 +- - .../chromium/ui/base/ViewAndroidDelegate.java | 8 ++ - 28 files changed, 419 insertions(+), 4 deletions(-) + 32 files changed, 268 insertions(+), 96 deletions(-) create mode 100644 components/android_autofill/browser/java/src/org/chromium/components/autofill/BrowserSelectionActionMenuDelegate.java -diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn ---- a/chrome/android/BUILD.gn -+++ b/chrome/android/BUILD.gn -@@ -429,6 +429,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", -+ "//components/android_autofill/browser:java", - "//chrome/browser/ui/android/logo:java", - "//chrome/browser/ui/android/management:java", - "//chrome/browser/ui/android/multiwindow:java", 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,6 +59,11 @@ import java.lang.annotation.Retention; +@@ -28,6 +28,7 @@ import androidx.preference.PreferenceCategory; + import androidx.preference.PreferenceGroup; + + import org.chromium.base.BuildInfo; ++import org.chromium.base.StrictModeContext; + import org.chromium.base.metrics.RecordHistogram; + import org.chromium.chrome.R; + import org.chromium.chrome.browser.password_check.PasswordCheck; +@@ -59,6 +60,11 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.Locale; @@ -72,7 +73,7 @@ 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; +@@ -66,7 +72,7 @@ import java.util.Locale; public class PasswordSettings extends ChromeBaseSettingsFragment implements PasswordListObserver, Preference.OnPreferenceClickListener, @@ -81,7 +82,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage @IntDef({ TrustedVaultBannerState.NOT_SHOWN, TrustedVaultBannerState.OFFER_OPT_IN, -@@ -96,6 +101,12 @@ public class PasswordSettings extends ChromeBaseSettingsFragment +@@ -96,6 +102,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"; @@ -94,7 +95,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"; -@@ -128,6 +139,8 @@ public class PasswordSettings extends ChromeBaseSettingsFragment +@@ -128,6 +140,8 @@ public class PasswordSettings extends ChromeBaseSettingsFragment private Preference mLinkPref; private Menu mMenu; @@ -103,7 +104,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage private @ManagePasswordsReferrer int mManagePasswordsReferrer; private BottomSheetController mBottomSheetController; -@@ -302,6 +315,7 @@ public class PasswordSettings extends ChromeBaseSettingsFragment +@@ -307,6 +321,7 @@ public class PasswordSettings extends ChromeBaseSettingsFragment } createSavePasswordsSwitch(); @@ -111,7 +112,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage if (shouldShowAutoSigninOption()) { createAutoSignInCheckbox(); } -@@ -575,6 +589,71 @@ public class PasswordSettings extends ChromeBaseSettingsFragment +@@ -580,6 +595,71 @@ public class PasswordSettings extends ChromeBaseSettingsFragment getPrefService().getBoolean(Pref.CREDENTIALS_ENABLE_SERVICE)); } @@ -183,38 +184,37 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage private void createAutoSignInCheckbox() { ChromeSwitchPreference autoSignInSwitch = new ChromeSwitchPreference(getStyledContext(), null); +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java +--- a/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java +@@ -436,8 +436,7 @@ public class MainSettings extends ChromeBaseSettingsFragment + + private void updateAutofillPreferences() { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O +- && ChromeFeatureList.isEnabled( +- AutofillFeatures.AUTOFILL_VIRTUAL_VIEW_STRUCTURE_ANDROID)) { ++ && ((false))) { + addPreferenceIfAbsent(PREF_AUTOFILL_OPTIONS); + Preference preference = findPreference(PREF_AUTOFILL_OPTIONS); + preference.setFragment(null); 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 -@@ -76,6 +76,18 @@ import org.chromium.url.GURL; +@@ -91,6 +91,13 @@ import java.lang.annotation.RetentionPolicy; import java.nio.ByteBuffer; import java.util.Objects; -+import android.os.Build; -+import android.util.SparseArray; -+import org.chromium.ui.base.EventOffsetHandler; -+import android.view.ViewStructure; -+import android.view.autofill.AutofillValue; -+import org.chromium.components.autofill.AutofillProvider; +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.chrome.browser.profiles.ProfileManager; +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 +248,8 @@ class TabImpl implements Tab { - - private String mPendingNativePageHost; - -+ AutofillProvider mAutofillProvider; -+ - /** - * Creates an instance of a {@link TabImpl}. Package-private. Use {@link TabBuilder} to create - * an instance. -@@ -857,6 +871,11 @@ class TabImpl implements Tab { +@@ -984,6 +991,11 @@ class TabImpl implements Tab { for (TabObserver observer : mObservers) observer.onDestroyed(this); mObservers.clear(); @@ -226,156 +226,171 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav mUserDataHost.destroy(); mTabViewManager.destroy(); hideNativePage(false, null); -@@ -1454,6 +1473,16 @@ class TabImpl implements Tab { - return mWebContentsState == null ? -1 : mWebContentsState.version(); +@@ -1256,8 +1268,7 @@ class TabImpl implements Tab { + */ + boolean providesAutofillStructure() { + // TODO(b/326231439): Check pref and AutofillService! +- return ChromeFeatureList.isEnabled( +- AutofillFeatures.AUTOFILL_VIRTUAL_VIEW_STRUCTURE_ANDROID); ++ return true; } -+ public void onProvideAutofillVirtualStructure(ViewStructure structure, int flags) { -+ if (mAutofillProvider != null) -+ mAutofillProvider.onProvideAutoFillVirtualStructure(structure, flags); -+ } -+ -+ public void autofill(final SparseArray values) { -+ if (mAutofillProvider != null) -+ mAutofillProvider.autofill(values); -+ } -+ - /** - * Initializes the {@link WebContents}. Completes the browser content components initialization - * around a native WebContents pointer. -@@ -1521,6 +1550,30 @@ class TabImpl implements Tab { - this)); - - mWebContents.notifyRendererPreferenceUpdate(); -+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { -+ boolean autofillEnabled = false; -+ if (isIncognito()) { -+ autofillEnabled = UserPrefs.get(Profile.getLastUsedRegularProfile()) -+ .getBoolean(Pref.AUTOFILL_ANDROID_INCOGNITO_ENABLED); -+ } else { -+ autofillEnabled = UserPrefs.get(Profile.getLastUsedRegularProfile()) -+ .getBoolean(Pref.AUTOFILL_ANDROID_ENABLED); -+ } -+ -+ if (autofillEnabled) { -+ SelectionPopupController selectionController = -+ SelectionPopupController.fromWebContents(mWebContents); -+ mAutofillProvider = new AutofillProvider(getContext(), cv, webContents, "bromite"); -+ TabImplJni.get().initializeAutofillIfNecessary(mNativeTabAndroid); -+ mAutofillProvider.setWebContents(webContents); -+ cv.setWebContents(webContents); -+ BrowserSelectionActionMenuDelegate selectionActionMenuDelegate = -+ new BrowserSelectionActionMenuDelegate(); -+ selectionActionMenuDelegate.setAutofillSelectionMenuItemHelper( -+ new AutofillSelectionMenuItemHelper(getContext(), mAutofillProvider)); -+ selectionController.setSelectionActionMenuDelegate(selectionActionMenuDelegate); -+ } -+ } - TabHelpers.initWebContentsHelpers(this); - notifyContentChanged(); - } finally { -@@ -1991,6 +2044,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 -@@ -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. */ - public class TabViewAndroidDelegate extends ViewAndroidDelegate { - private final TabImpl mTab; -@@ -83,6 +87,16 @@ public class TabViewAndroidDelegate extends ViewAndroidDelegate { - mTab.onBackgroundColorChanged(color); + // Forwarded from TabWebContentsDelegateAndroid. +@@ -1972,15 +1983,20 @@ class TabImpl implements Tab { + * @return true if the the provider is available for the given WebContents. + */ + private boolean prepareAutofillProvider(WebContents newWebContents) { +- assert isInitialized(); +- if (!providesAutofillStructure()) { ++ boolean autofillEnabled = false; ++ if (isIncognito()) { ++ autofillEnabled = UserPrefs.get(ProfileManager.getLastUsedRegularProfile()) ++ .getBoolean(Pref.AUTOFILL_ANDROID_INCOGNITO_ENABLED); ++ } else { ++ autofillEnabled = UserPrefs.get(ProfileManager.getLastUsedRegularProfile()) ++ .getBoolean(Pref.AUTOFILL_ANDROID_ENABLED); ++ } ++ if (!autofillEnabled) { + mAutofillProvider = null; + return false; // Autofill provider can't be prepared. + } +- if (mAutofillProvider != null) { +- // Provider already existed. Swapping contents suffices. +- mAutofillProvider.setWebContents(newWebContents); +- } else { ++ assert isInitialized(); ++ if (mAutofillProvider == null) { + mAutofillProvider = + new AutofillProvider( + getContext(), +@@ -1989,7 +2005,16 @@ class TabImpl implements Tab { + getContext().getString(R.string.app_name)); + TabImplJni.get().initializeAutofillIfNecessary(mNativeTabAndroid); + } +- addAutofillItemsToSelectionActionMenu(newWebContents); ++ SelectionPopupController selectionController = ++ SelectionPopupController.fromWebContents(newWebContents); ++ mAutofillProvider.setWebContents(newWebContents); ++ mContentView.setWebContents(newWebContents); ++ BrowserSelectionActionMenuDelegate selectionActionMenuDelegate = ++ new BrowserSelectionActionMenuDelegate(); ++ selectionActionMenuDelegate.setAutofillSelectionMenuItemHelper( ++ new AutofillSelectionMenuItemHelper(getContext(), mAutofillProvider)); ++ selectionController.setSelectionActionMenuDelegate(selectionActionMenuDelegate); ++ + return true; } -+ @Override -+ public void onProvideAutofillVirtualStructure(ViewStructure structure, int flags) { -+ mTab.onProvideAutofillVirtualStructure(structure, flags); -+ } -+ -+ @Override -+ public void autofill(final SparseArray values) { -+ mTab.autofill(values); -+ } -+ - @Override - public void onTopControlsChanged( - int topControlsOffsetY, int contentOffsetY, int topControlsMinHeightOffsetY) { -diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn ---- a/chrome/browser/BUILD.gn -+++ b/chrome/browser/BUILD.gn -@@ -2662,6 +2662,13 @@ static_library("browser") { - deps += [ "//chrome/browser/error_reporting" ] - } - -+ if (is_android) { -+ deps += [ -+ "//components/android_autofill/browser", -+ "//components/android_autofill/browser:android" -+ ] -+ } -+ - if (use_ozone) { - deps += [ - "//ui/events/ozone", +diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc +--- a/chrome/browser/about_flags.cc ++++ b/chrome/browser/about_flags.cc +@@ -3944,19 +3944,6 @@ const FeatureEntry::FeatureVariation kAutofillGranularFillingAvailableVariations + kAutofillGranularFillingAvailableVariationWithExpandControlVisibleOnSelectionOnly), + nullptr}}; + +-#if BUILDFLAG(IS_ANDROID) +-inline constexpr flags_ui::FeatureEntry::FeatureParam +- kAutofillVirtualViewStructureAndroidSkipsCompatibilityCheckParam = { +- autofill::features:: +- kAutofillVirtualViewStructureAndroidSkipsCompatibilityCheck.name, +- "true"}; +-inline constexpr flags_ui::FeatureEntry::FeatureVariation +- kAutofillVirtualViewStructureVariation[] = { +- {"Enabled without compatibility check", +- &kAutofillVirtualViewStructureAndroidSkipsCompatibilityCheckParam, 1, +- nullptr}}; +-#endif // BUILDFLAG(IS_ANDROID) +- + const FeatureEntry::FeatureParam kDefaultBrowserPromptRefreshAggressive[] = { + {"max_prompt_count", "-1"}, + {"reprompt_duration", "7d"}, +@@ -6019,15 +6006,6 @@ const FeatureEntry kFeatureEntries[] = { + #endif // BUILDFLAG(IS_CHROMEOS_ASH) + + #if BUILDFLAG(IS_ANDROID) +- {"enable-autofill-virtual-view-structure", +- flag_descriptions::kAutofillVirtualViewStructureAndroidName, +- flag_descriptions::kAutofillVirtualViewStructureAndroidDescription, +- kOsAndroid, +- FEATURE_WITH_PARAMS_VALUE_TYPE( +- autofill::features::kAutofillVirtualViewStructureAndroid, +- kAutofillVirtualViewStructureVariation, +- "Skip AutofillService Check")}, +- + {"enable-pix-detection", flag_descriptions::kEnablePixDetectionName, + flag_descriptions::kEnablePixDetectionDescription, kOsAndroid, + FEATURE_VALUE_TYPE(payments::facilitated::kEnablePixDetection)}, diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc --- a/chrome/browser/android/tab_android.cc +++ b/chrome/browser/android/tab_android.cc -@@ -52,6 +52,13 @@ - #include "url/android/gurl_android.h" - #include "url/gurl.h" - -+#include "components/android_autofill/browser/android_autofill_manager.h" -+#include "components/android_autofill/browser/autofill_provider.h" -+#include "components/android_autofill/browser/autofill_provider_android.h" -+#include "components/autofill/content/browser/content_autofill_driver_factory.h" -+#include "chrome/browser/ui/autofill/chrome_autofill_client.h" -+#include "chrome/browser/browser_process.h" -+ - using base::android::AttachCurrentThread; - using base::android::ConvertUTF8ToJavaString; - using base::android::JavaParamRef; -@@ -507,3 +514,11 @@ static void JNI_TabImpl_Init(JNIEnv* env, - // This will automatically bind to the Java object and pass ownership there. - new TabAndroid(env, obj, profile, id); - } -+ -+void TabAndroid::InitializeAutofillIfNecessary(JNIEnv* env) { -+ if (!autofill::ContentAutofillDriverFactory::FromWebContents( -+ web_contents_.get())) { -+ content::WebContents* web_contents = web_contents_.get(); -+ autofill::ChromeAutofillClient::CreateForWebContents(web_contents); -+ } -+} -diff --git a/chrome/browser/android/tab_android.h b/chrome/browser/android/tab_android.h ---- a/chrome/browser/android/tab_android.h -+++ b/chrome/browser/android/tab_android.h -@@ -172,6 +172,8 @@ class TabAndroid : public base::SupportsUserData { - - void SetDevToolsAgentHost(scoped_refptr host); +@@ -360,8 +360,7 @@ void TabAndroid::InitializeAutofillIfNecessary(JNIEnv* env) { + if (autofill::ContentAutofillClient::FromWebContents(web_contents_.get())) { + return; + } +- android_autofill::AndroidAutofillClient::CreateForWebContents( +- web_contents_.get()); ++ autofill::ChromeAutofillClient::CreateForWebContents(web_contents_.get()); + + // We need to initialize the keyboard suppressor before creating any + // AutofillManagers and after the autofill client is available. +diff --git a/chrome/browser/autofill/android/BUILD.gn b/chrome/browser/autofill/android/BUILD.gn +--- a/chrome/browser/autofill/android/BUILD.gn ++++ b/chrome/browser/autofill/android/BUILD.gn +@@ -124,7 +124,7 @@ android_library("bottom_sheet_utils_java") { + generate_jni("jni_headers") { + sources = [ + "java/src/org/chromium/chrome/browser/autofill/AddressNormalizerFactory.java", +- "java/src/org/chromium/chrome/browser/autofill/AutofillClientProviderUtils.java", ++ #"java/src/org/chromium/chrome/browser/autofill/AutofillClientProviderUtils.java", + "java/src/org/chromium/chrome/browser/autofill/AutofillImageFetcher.java", + "java/src/org/chromium/chrome/browser/autofill/AutofillProfileBridge.java", + "java/src/org/chromium/chrome/browser/autofill/PersonalDataManager.java", +diff --git a/chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/AutofillClientProviderUtils.java b/chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/AutofillClientProviderUtils.java +--- a/chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/AutofillClientProviderUtils.java ++++ b/chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/AutofillClientProviderUtils.java +@@ -37,8 +37,8 @@ public class AutofillClientProviderUtils { + * Android: The AutofillManager exists, is enabled, and its provider is not Autofill with + * Google. + */ +- @CalledByNative + public static boolean isAllowedToUseAndroidAutofillFramework() { ++ if ((true)) return true; + if (sAllowedToUseAutofillFrameworkForTesting != null) { + return sAllowedToUseAutofillFrameworkForTesting; + } +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 +@@ -652,12 +652,6 @@ const char kAutofillUpstreamUpdatedUiDescription[] = + "When enabled, shows different text and images in the UI of the credit " + "card upload save bubble."; + +-const char kAutofillVirtualViewStructureAndroidName[] = +- "Enable the setting to provide a virtual view structure for Autofill"; +-const char kAutofillVirtualViewStructureAndroidDescription[] = +- "When enabled, a setting allows to switch to using Android Autofill. Chrome" +- " then provides a virtual view structure but no own suggestions."; +- + const char kAutoPictureInPictureForVideoPlaybackName[] = + "Auto picture in picture for video playback"; + const char kAutoPictureInPictureForVideoPlaybackDescription[] = +diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h +--- a/chrome/browser/flag_descriptions.h ++++ b/chrome/browser/flag_descriptions.h +@@ -388,9 +388,6 @@ extern const char kAutofillSyncEwalletAccountsDescription[]; + extern const char kAutofillUpstreamUpdatedUiName[]; + extern const char kAutofillUpstreamUpdatedUiDescription[]; + +-extern const char kAutofillVirtualViewStructureAndroidName[]; +-extern const char kAutofillVirtualViewStructureAndroidDescription[]; +- + extern const char kAutoPictureInPictureForVideoPlaybackName[]; + extern const char kAutoPictureInPictureForVideoPlaybackDescription[]; -+ void InitializeAutofillIfNecessary(JNIEnv* env); -+ - // This should never return null, unless it is called in a state where no - // tabs exist (such as on FRE), which should never happen. If it is called - // then, a nullptr will be returned and must be handled accordingly. 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 -@@ -637,6 +637,12 @@ CHAR_LIMIT guidelines: +@@ -672,6 +672,12 @@ For more settings that use data to improve your Chrome experience, go to Save passwords @@ -385,15 +400,111 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro + + Enable native Android autofill in incognito + - - Auto Sign-in + + Use and save passwords in your Google Account +diff --git a/chrome/browser/ui/autofill/autofill_client_provider.cc b/chrome/browser/ui/autofill/autofill_client_provider.cc +--- a/chrome/browser/ui/autofill/autofill_client_provider.cc ++++ b/chrome/browser/ui/autofill/autofill_client_provider.cc +@@ -13,7 +13,6 @@ + + #if BUILDFLAG(IS_ANDROID) + #include "base/android/jni_android.h" +-#include "chrome/browser/autofill/android/jni_headers/AutofillClientProviderUtils_jni.h" + #include "chrome/browser/keyboard_accessory/android/manual_filling_controller_impl.h" + #include "components/android_autofill/browser/android_autofill_client.h" + #endif // BUILDFLAG(IS_ANDROID) +@@ -21,35 +20,14 @@ + namespace autofill { + namespace { + +-bool UsesVirtualViewStructureForAutofill(const PrefService* prefs) { +-#if BUILDFLAG(IS_ANDROID) +- if (!base::FeatureList::IsEnabled( +- features::kAutofillVirtualViewStructureAndroid)) { +- return false; +- } +- if (!prefs->GetBoolean(prefs::kAutofillThirdPartyPasswordManagersAllowed)) { +- return false; +- } +- if (!prefs->GetBoolean(prefs::kAutofillUsingVirtualViewStructure)) { +- return false; +- } +- return features::kAutofillVirtualViewStructureAndroidSkipsCompatibilityCheck +- .Get() || +- Java_AutofillClientProviderUtils_isAllowedToUseAndroidAutofillFramework( +- base::android::AttachCurrentThread()); +-#else +- return false; +-#endif // BUILDFLAG(IS_ANDROID) +-} + + } // namespace + +-AutofillClientProvider::AutofillClientProvider(PrefService* prefs) +- : uses_platform_autofill_(UsesVirtualViewStructureForAutofill(prefs)) { ++AutofillClientProvider::AutofillClientProvider(PrefService* prefs) { + #if BUILDFLAG(IS_ANDROID) + // Ensure the pref is reset if platform autofill is restricted. + prefs->SetBoolean(prefs::kAutofillUsingVirtualViewStructure, +- uses_platform_autofill_); ++ true); + #endif // BUILDFLAG(IS_ANDROID) + } + +@@ -57,15 +35,7 @@ AutofillClientProvider::~AutofillClientProvider() = default; + + void AutofillClientProvider::CreateClientForWebContents( + content::WebContents* web_contents) { +- if (uses_platform_autofill()) { +-#if BUILDFLAG(IS_ANDROID) +- android_autofill::AndroidAutofillClient::CreateForWebContents(web_contents); +-#else +- NOTREACHED_IN_MIGRATION(); +-#endif +- } else { + ChromeAutofillClient::CreateForWebContents(web_contents); +- } + } + + } // namespace autofill +diff --git a/chrome/browser/ui/autofill/autofill_client_provider.h b/chrome/browser/ui/autofill/autofill_client_provider.h +--- a/chrome/browser/ui/autofill/autofill_client_provider.h ++++ b/chrome/browser/ui/autofill/autofill_client_provider.h +@@ -33,13 +33,7 @@ class AutofillClientProvider : public KeyedService { + // given `web_contents`. + void CreateClientForWebContents(content::WebContents* web_contents); + +- // The return value is constant once this provider has been created. The +- // method returns true iff platform autofill should be used instead of +- // built-in autofill. +- bool uses_platform_autofill() const { return uses_platform_autofill_; } +- + private: +- const bool uses_platform_autofill_; + }; + + } // namespace autofill +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 +@@ -382,9 +382,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { + web_contents); + chrome::ChainedBackNavigationTracker::CreateForWebContents(web_contents); + chrome_browser_net::NetErrorTabHelper::CreateForWebContents(web_contents); +- if (!autofill_client_provider.uses_platform_autofill()) { +- ChromePasswordManagerClient::CreateForWebContents(web_contents); +- } ++ ChromePasswordManagerClient::CreateForWebContents(web_contents); + ChromePasswordReuseDetectionManagerClient::CreateForWebContents(web_contents); + CreateSubresourceFilterWebContentsHelper(web_contents); + #if BUILDFLAG(ENABLE_RLZ) 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 @@ -41,6 +41,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/AutofillSelectionActionMenuDelegate.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", @@ -402,7 +513,7 @@ diff --git a/components/android_autofill/browser/BUILD.gn b/components/android_a 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 -@@ -34,6 +34,8 @@ AndroidAutofillManager::~AndroidAutofillManager() { +@@ -33,6 +33,8 @@ AndroidAutofillManager::~AndroidAutofillManager() { Reset(); } @@ -462,7 +573,7 @@ diff --git a/components/android_autofill/browser/java/src/org/chromium/component 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 -@@ -192,13 +192,19 @@ public class AutofillProvider { +@@ -193,13 +193,19 @@ public class AutofillProvider { /** @return whether query autofill suggestion. */ public boolean shouldQueryAutofillSuggestion() { @@ -482,14 +593,14 @@ diff --git a/components/android_autofill/browser/java/src/org/chromium/component FocusField focusField = mRequest.getFocusField(); mAutofillManager.requestAutofill( mContainerView, -@@ -258,6 +264,7 @@ public class AutofillProvider { +@@ -259,6 +265,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) { + Rect absBound = transformToWindowBounds(new RectF(x, y, x + width, y + height)); + if (mRequest != null) notifyViewExitBeforeDestroyRequest(); + 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 @@ -560,168 +671,30 @@ new file mode 100644 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 -@@ -423,6 +423,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( -+ WithNewVersion(updated_forms), removed_forms); -+ } - }); - } - -@@ -440,6 +444,10 @@ void ContentAutofillDriver::FormSubmitted( - bool known_success, mojom::SubmissionSource submission_source) { - target->GetAutofillManager().OnFormSubmitted( - WithNewVersion(form), known_success, submission_source); -+ if (target->secondary_autofill_manager()) { -+ target->secondary_autofill_manager()->OnFormSubmitted( -+ WithNewVersion(form), known_success, submission_source); -+ } - }); - } - -@@ -461,6 +469,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( -+ WithNewVersion(form), field, bounding_box, timestamp); -+ } - }); - } - -@@ -480,6 +492,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( -+ WithNewVersion(form), field, bounding_box); -+ } - }); - } - -@@ -500,6 +516,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( -+ WithNewVersion(form), field, bounding_box); -+ } - }); - } - -@@ -522,6 +542,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( -+ WithNewVersion(form), field, bounding_box, trigger_source); -+ } - }); - } - -@@ -533,6 +557,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(); - }); - } - -@@ -544,6 +570,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); - }); - } - -@@ -563,9 +591,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( -+ WithNewVersion(form), field, bounding_box); +@@ -247,6 +247,13 @@ void RouteToManager(ContentAutofillDriver& source, + AutofillManager& manager = target.GetAutofillManager(); + (manager.* + manager_fun)(WithNewVersion(std::forward(args))...); ++ ++ raw_ptr secondary_autofill_manager = ++ target.secondary_autofill_manager(); ++ if (secondary_autofill_manager) { ++ (secondary_autofill_manager->* ++ manager_fun)(WithNewVersion(std::forward(args))...); + } }, - [](autofill::AutofillDriver* target) { - target->GetAutofillManager().OnFocusNoLongerOnForm(true); -+ if (target->secondary_autofill_manager()) { -+ target->secondary_autofill_manager()->OnFocusNoLongerOnForm(true); -+ } - }); - } - -@@ -580,6 +615,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( -+ WithNewVersion(form), timestamp); -+ } - }); - } - -@@ -589,6 +628,8 @@ void ContentAutofillDriver::DidEndTextFieldEditing() { - } - router().DidEndTextFieldEditing(this, [](autofill::AutofillDriver* target) { - target->GetAutofillManager().OnDidEndTextFieldEditing(); -+ if (target->secondary_autofill_manager()) -+ target->secondary_autofill_manager()->OnDidEndTextFieldEditing(); - }); - } - -@@ -603,6 +644,10 @@ void ContentAutofillDriver::SelectOrSelectListFieldOptionsDidChange( - cast(target) - ->GetAutofillManager() - .OnSelectOrSelectListFieldOptionsDidChange(WithNewVersion(form)); -+ if (target->secondary_autofill_manager()) { -+ target->secondary_autofill_manager()->OnSelectOrSelectListFieldOptionsDidChange( -+ WithNewVersion(form)); -+ } - }); + source, Lift(source, std::forward(args))...); } - -@@ -622,6 +667,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( -+ WithNewVersion(form), field, old_value); -+ } - }); - } - -@@ -634,6 +683,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); - }); - } - -@@ -641,6 +692,8 @@ void ContentAutofillDriver::Reset() { - owner_->router().UnregisterDriver(this, - /*driver_is_dying=*/false); +@@ -589,6 +596,8 @@ void ContentAutofillDriver::JavaScriptChangedAutofilledValue( + void ContentAutofillDriver::Reset() { + owner_->router().UnregisterDriver(*this, /*driver_is_dying=*/false); autofill_manager_->Reset(); + if (secondary_autofill_manager_) + secondary_autofill_manager_->Reset(); } const mojo::AssociatedRemote& -@@ -653,6 +706,10 @@ ContentAutofillDriver::GetAutofillAgent() { +@@ -601,6 +610,10 @@ ContentAutofillDriver::GetAutofillAgent() { return autofill_agent_; } @@ -729,13 +702,13 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co + return secondary_autofill_manager_.get(); +} + - void ContentAutofillDriver::SetFrameAndFormMetaData( - FormData& form, - base::optional_ref field) const { + void ContentAutofillDriver::LiftForTest(FormData& form) { + form = Lift(*this, form); + } 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 -@@ -128,6 +128,12 @@ class ContentAutofillDriver : public AutofillDriver, +@@ -123,6 +123,12 @@ class ContentAutofillDriver : public AutofillDriver, ContentAutofillDriver& operator=(const ContentAutofillDriver&) = delete; ~ContentAutofillDriver() override; @@ -748,7 +721,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.h b/com content::RenderFrameHost* render_frame_host() { return &*render_frame_host_; } const content::RenderFrameHost* render_frame_host() const { return &*render_frame_host_; -@@ -326,6 +332,10 @@ class ContentAutofillDriver : public AutofillDriver, +@@ -282,6 +288,10 @@ class ContentAutofillDriver : public AutofillDriver, // The factory that created this driver. Outlives `this`. const raw_ref owner_; @@ -769,21 +742,20 @@ diff --git a/components/autofill/content/browser/content_autofill_driver_factory +#if BUILDFLAG(IS_ANDROID) +#include "components/android_autofill/browser/android_autofill_manager.h" +#include "components/android_autofill/browser/autofill_provider.h" -+#include "components/android_autofill/browser/autofill_provider_android.h" ++#include "components/android_autofill/browser/android_autofill_provider.h" +#endif + namespace autofill { class ScopedAutofillManagersObservation; -@@ -95,6 +101,13 @@ ContentAutofillDriver* ContentAutofillDriverFactory::DriverForFrame( +@@ -95,6 +101,12 @@ ContentAutofillDriver* ContentAutofillDriverFactory::DriverForFrame( // 5. `render_frame_host->~RenderFrameHostImpl()` finishes. if (render_frame_host->IsRenderFrameLive()) { driver = std::make_unique(render_frame_host, this); +#if BUILDFLAG(IS_ANDROID) + if (!driver->GetAutofillManager().IsAndroidAutofill()) { + driver->set_secondary_autofill_manager( -+ base::WrapUnique(new AndroidAutofillManager(driver.get(), -+ &client_.get()))); ++ base::WrapUnique(new AndroidAutofillManager(driver.get()))); + } +#endif for (Observer& observer : observers_) { @@ -792,7 +764,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver_factory diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc --- a/components/autofill/content/renderer/autofill_agent.cc +++ b/components/autofill/content/renderer/autofill_agent.cc -@@ -942,12 +942,16 @@ void AutofillAgent::ShowSuggestions( +@@ -1250,12 +1250,16 @@ void AutofillAgent::ShowSuggestions( password_generation_agent_->ShowPasswordGenerationSuggestions( input_element)) { is_popup_possibly_visible_ = true; @@ -809,13 +781,12 @@ diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components } } -@@ -959,11 +963,13 @@ void AutofillAgent::ShowSuggestions( - // match a regex). In this specific case we are actually interested in whether - // the field is currently a password field, not whether it has ever been a - // password field. +@@ -1266,10 +1270,12 @@ void AutofillAgent::ShowSuggestions( + // parenthesis to not match a regex). In this specific case we are actually + // interested in whether the field is currently a password field, not whether + // it has ever been a password field. +#if !BUILDFLAG(IS_ANDROID) - if (!input_element.IsNull() && - input_element.IsPasswordField /*disable presubmit*/ () && + if (input_element && input_element.IsPasswordField /*disable presubmit*/ () && !config_.query_password_suggestions) { return; } @@ -826,7 +797,7 @@ diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components 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 -@@ -832,7 +832,10 @@ void PasswordAutofillAgent::UpdatePasswordStateForTextChange( +@@ -849,7 +849,10 @@ void PasswordAutofillAgent::UpdatePasswordStateForTextChange( void PasswordAutofillAgent::TrackAutofilledElement( const blink::WebFormControlElement& element) { @@ -841,7 +812,7 @@ diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/c 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 -@@ -70,6 +70,8 @@ class AutofillDriver { +@@ -77,6 +77,8 @@ class AutofillDriver { // Returns the AutofillManager owned by the AutofillDriver. virtual AutofillManager& GetAutofillManager() = 0; @@ -849,23 +820,23 @@ diff --git a/components/autofill/core/browser/autofill_driver.h b/components/aut + // Returns whether the AutofillDriver instance is associated with an active // frame in the MPArch sense. - virtual bool IsInActiveFrame() const = 0; + virtual bool IsActive() const = 0; diff --git a/components/autofill/core/browser/autofill_manager.h b/components/autofill/core/browser/autofill_manager.h --- a/components/autofill/core/browser/autofill_manager.h +++ b/components/autofill/core/browser/autofill_manager.h -@@ -183,6 +183,8 @@ class AutofillManager +@@ -201,6 +201,8 @@ class AutofillManager ~AutofillManager() override; + virtual bool IsAndroidAutofill() const = 0; + - // The following will fail a DCHECK if called for a prerendered main frame. - AutofillClient& client() { - DCHECK(!driver().IsPrerendering()); + AutofillClient& client() { return driver_->GetAutofillClient(); } + const AutofillClient& client() const { return driver_->GetAutofillClient(); } + diff --git a/components/autofill/core/browser/browser_autofill_manager.cc b/components/autofill/core/browser/browser_autofill_manager.cc --- a/components/autofill/core/browser/browser_autofill_manager.cc +++ b/components/autofill/core/browser/browser_autofill_manager.cc -@@ -477,6 +477,8 @@ BrowserAutofillManager::~BrowserAutofillManager() { +@@ -693,6 +693,8 @@ BrowserAutofillManager::~BrowserAutofillManager() { // (due to a navigation). } @@ -877,7 +848,7 @@ diff --git a/components/autofill/core/browser/browser_autofill_manager.cc b/comp diff --git a/components/autofill/core/browser/browser_autofill_manager.h b/components/autofill/core/browser/browser_autofill_manager.h --- a/components/autofill/core/browser/browser_autofill_manager.h +++ b/components/autofill/core/browser/browser_autofill_manager.h -@@ -121,6 +121,8 @@ class BrowserAutofillManager : public AutofillManager { +@@ -146,6 +146,8 @@ class BrowserAutofillManager : public AutofillManager { ~BrowserAutofillManager() override; @@ -886,10 +857,36 @@ diff --git a/components/autofill/core/browser/browser_autofill_manager.h b/compo // Whether the |field| should show an entry to scan a credit card. virtual bool ShouldShowScanCreditCard(const FormData& form, const FormFieldData& field) const; +diff --git a/components/autofill/core/common/autofill_features.cc b/components/autofill/core/common/autofill_features.cc +--- a/components/autofill/core/common/autofill_features.cc ++++ b/components/autofill/core/common/autofill_features.cc +@@ -779,7 +779,7 @@ BASE_FEATURE(kAutofillEnableSecurityTouchEventFilteringAndroid, + BASE_FEATURE(kAutofillVirtualViewStructureAndroid, + "AutofillVirtualViewStructureAndroid", + base::FEATURE_DISABLED_BY_DEFAULT); +- ++SET_CROMITE_FEATURE_ENABLED(kAutofillVirtualViewStructureAndroid); + #endif // BUILDFLAG(IS_ANDROID) + + namespace test { +diff --git a/components/autofill/core/common/autofill_features.h b/components/autofill/core/common/autofill_features.h +--- a/components/autofill/core/common/autofill_features.h ++++ b/components/autofill/core/common/autofill_features.h +@@ -242,10 +242,6 @@ BASE_DECLARE_FEATURE(kAutofillEnableSecurityTouchEventFilteringAndroid); + + COMPONENT_EXPORT(AUTOFILL) + BASE_DECLARE_FEATURE(kAutofillVirtualViewStructureAndroid); +-inline constexpr base::FeatureParam +- kAutofillVirtualViewStructureAndroidSkipsCompatibilityCheck{ +- &kAutofillVirtualViewStructureAndroid, "skip_compatibility_check", +- false}; + #endif // BUILDFLAG(IS_ANDROID) + + #if BUILDFLAG(IS_APPLE) 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 -@@ -64,6 +64,8 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { +@@ -66,6 +66,8 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref( prefs::kAutofillCreditCardFidoAuthOfferCheckboxState, true); #endif @@ -898,10 +895,19 @@ diff --git a/components/autofill/core/common/autofill_prefs.cc b/components/auto registry->RegisterIntegerPref(prefs::kAutocompleteLastVersionRetentionPolicy, 0); registry->RegisterStringPref(prefs::kAutofillUploadEncodingSeed, ""); +@@ -107,7 +109,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { + + #if BUILDFLAG(IS_ANDROID) + registry->RegisterBooleanPref(prefs::kAutofillUsingVirtualViewStructure, +- false); ++ true); + registry->RegisterBooleanPref( + prefs::kAutofillThirdPartyPasswordManagersAllowed, true); + registry->RegisterBooleanPref( diff --git a/components/autofill/core/common/autofill_prefs.h b/components/autofill/core/common/autofill_prefs.h --- a/components/autofill/core/common/autofill_prefs.h +++ b/components/autofill/core/common/autofill_prefs.h -@@ -87,6 +87,11 @@ inline constexpr char kAutofillUploadEventsLastResetTimestamp[] = +@@ -100,6 +100,11 @@ inline constexpr char kAutofillUploadEventsLastResetTimestamp[] = // retention policy was run. inline constexpr char kAutocompleteLastVersionRetentionPolicy[] = "autocomplete.retention_policy_last_version"; @@ -913,114 +919,4 @@ diff --git a/components/autofill/core/common/autofill_prefs.h b/components/autof #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || \ BUILDFLAG(IS_IOS) // Boolean that is set when payment methods mandatory re-auth is enabled by the -diff --git a/components/embedder_support/android/java/src/org/chromium/components/embedder_support/view/ContentView.java b/components/embedder_support/android/java/src/org/chromium/components/embedder_support/view/ContentView.java ---- a/components/embedder_support/android/java/src/org/chromium/components/embedder_support/view/ContentView.java -+++ b/components/embedder_support/android/java/src/org/chromium/components/embedder_support/view/ContentView.java -@@ -42,6 +42,11 @@ import org.chromium.ui.dragdrop.DragEventDispatchHelper.DragEventDispatchDestina - - import java.util.function.Supplier; - -+import org.chromium.base.Log; -+import android.util.SparseArray; -+import android.view.autofill.AutofillValue; -+import org.chromium.ui.base.ViewAndroidDelegate; -+ - /** - * The containing view for {@link WebContents} that exists in the Android UI hierarchy and exposes - * the various {@link View} functionality to it. -@@ -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); - } - -@@ -642,4 +649,43 @@ public class ContentView extends FrameLayout - mDragDropEventOffsetHandler.onPostDispatchDragEvent(event.getAction()); - return ret; - } -+ -+ /** -+ * API level 26 implementation that includes autofill. -+ */ -+ public static class ContentViewWithAutofill extends ContentView { -+ private ViewAndroidDelegate viewAndroidDelegate; -+ -+ private ContentViewWithAutofill(Context context, EventOffsetHandler eventOffsetHandler, WebContents webContents) { -+ super(context, eventOffsetHandler, webContents); -+ -+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { -+ // The Autofill system-level infrastructure has heuristics for which Views it considers -+ // important for autofill; only these Views will be queried for their autofill -+ // structure on notifications that a new (virtual) View was entered. By default, -+ // FrameLayout is not considered important for autofill. Thus, for ContentView to be -+ // queried for its autofill structure, we must explicitly inform the autofill system -+ // that this View is important for autofill. -+ setImportantForAutofill(View.IMPORTANT_FOR_AUTOFILL_YES); -+ } -+ } -+ -+ @Override -+ public void setWebContents(WebContents webContents) { -+ viewAndroidDelegate = webContents.getViewAndroidDelegate(); -+ super.setWebContents(webContents); -+ } -+ -+ @Override -+ public void onProvideAutofillVirtualStructure(ViewStructure structure, int flags) { -+ if (viewAndroidDelegate != null) -+ viewAndroidDelegate.onProvideAutofillVirtualStructure(structure, flags); -+ } -+ -+ @Override -+ public void autofill(final SparseArray values) { -+ if (viewAndroidDelegate != null) -+ viewAndroidDelegate.autofill(values); -+ } -+ } - } -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 -@@ -32,6 +32,10 @@ import org.chromium.ui.dragdrop.DragStateTracker; - import org.chromium.ui.dragdrop.DropDataAndroid; - import org.chromium.ui.mojom.CursorType; - -+import android.util.SparseArray; -+import android.view.autofill.AutofillValue; -+import android.view.ViewStructure; -+ - /** Class to acquire, position, and remove anchor views from the implementing View. */ - @JNINamespace("ui") - public class ViewAndroidDelegate { -@@ -573,4 +577,8 @@ public class ViewAndroidDelegate { - sDragAndDropDelegateForTesting = testDelegate; - ResettersForTesting.register(() -> sDragAndDropDelegateForTesting = null); - } -+ -+ public void onProvideAutofillVirtualStructure(ViewStructure structure, int flags) {} -+ -+ public void autofill(final SparseArray values) {} - } -- diff --git a/build/cromite_patches/Enable-network-isolation-features.patch b/build/cromite_patches/Enable-network-isolation-features.patch index 33f66f43..c66b6fe3 100644 --- a/build/cromite_patches/Enable-network-isolation-features.patch +++ b/build/cromite_patches/Enable-network-isolation-features.patch @@ -9,9 +9,9 @@ PartitionNelAndReportingByNetworkIsolationKey License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - .../features_cc/Enable-network-isolation-features.inc | 10 ++++++++++ - .../features_cc/Enable-network-isolation-features.inc | 1 + - 2 files changed, 11 insertions(+) + .../base/features_cc/Enable-network-isolation-features.inc | 6 ++++++ + .../cpp/features_cc/Enable-network-isolation-features.inc | 1 + + 2 files changed, 7 insertions(+) create mode 100644 cromite_flags/net/base/features_cc/Enable-network-isolation-features.inc create mode 100644 cromite_flags/services/network/public/cpp/features_cc/Enable-network-isolation-features.inc @@ -19,14 +19,10 @@ diff --git a/cromite_flags/net/base/features_cc/Enable-network-isolation-feature new file mode 100644 --- /dev/null +++ b/cromite_flags/net/base/features_cc/Enable-network-isolation-features.inc -@@ -0,0 +1,10 @@ +@@ -0,0 +1,6 @@ +SET_CROMITE_FEATURE_ENABLED(kSplitCacheByNetworkIsolationKey); +SET_CROMITE_FEATURE_ENABLED(kSplitCodeCacheByNetworkIsolationKey); -+SET_CROMITE_FEATURE_ENABLED(kSplitHostCacheByNetworkIsolationKey); +SET_CROMITE_FEATURE_ENABLED(kPartitionConnectionsByNetworkIsolationKey); -+SET_CROMITE_FEATURE_ENABLED(kPartitionHttpServerPropertiesByNetworkIsolationKey); -+SET_CROMITE_FEATURE_ENABLED(kPartitionSSLSessionsByNetworkIsolationKey); -+SET_CROMITE_FEATURE_ENABLED(kPartitionNelAndReportingByNetworkIsolationKey); + +SET_CROMITE_FEATURE_DISABLED(kEnableCrossSiteFlagNetworkIsolationKey); +SET_CROMITE_FEATURE_DISABLED(kEnableFrameSiteSharedOpaqueNetworkIsolationKey); diff --git a/build/cromite_patches/Enable-share-intent.patch b/build/cromite_patches/Enable-share-intent.patch index 204bed4d..4b8516e1 100644 --- a/build/cromite_patches/Enable-share-intent.patch +++ b/build/cromite_patches/Enable-share-intent.patch @@ -12,12 +12,12 @@ 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 | 28 +++- + chrome/android/java/AndroidManifest.xml | 28 ++- .../res/layout/sharing_intent_content.xml | 88 ++++++++++ .../chrome/browser/IntentHandler.java | 16 +- .../browser/LaunchIntentDispatcher.java | 14 +- - .../init/ProcessInitializationHandler.java | 3 + - .../SharedIntentShareActivity.java | 158 ++++++++++++++++++ + .../init/ProcessInitializationHandler.java | 2 + + .../SharedIntentShareActivity.java | 159 ++++++++++++++++++ .../flags/android/chrome_feature_list.cc | 1 + .../browser/flags/ChromeFeatureList.java | 1 + .../strings/android_chrome_strings.grd | 13 ++ @@ -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 -@@ -584,6 +584,7 @@ chrome_java_resources = [ +@@ -571,6 +571,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 -@@ -1048,6 +1048,7 @@ chrome_java_sources = [ +@@ -1035,6 +1035,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", @@ -56,7 +56,7 @@ diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml --- a/chrome/android/java/AndroidManifest.xml +++ b/chrome/android/java/AndroidManifest.xml -@@ -242,12 +242,6 @@ by a child template that "extends" this file. +@@ -245,12 +245,6 @@ by a child template that "extends" this file. @@ -69,7 +69,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro -@@ -326,6 +320,10 @@ by a child template that "extends" this file. +@@ -329,6 +323,10 @@ by a child template that "extends" this file. @@ -80,7 +80,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro -@@ -362,6 +360,24 @@ by a child template that "extends" this file. +@@ -365,6 +363,24 @@ by a child template that "extends" this file. @@ -201,7 +201,7 @@ new file mode 100644 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java --- a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java -@@ -174,6 +174,9 @@ public class IntentHandler { +@@ -178,6 +178,9 @@ public class IntentHandler { private static final String EXTRA_TAB_LAUNCH_TYPE = "org.chromium.chrome.browser.tab_launch_type"; @@ -211,7 +211,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.j /** A hash code for the URL to verify intent data hasn't been modified. */ public static final String EXTRA_DATA_HASH_CODE = "org.chromium.chrome.browser.data_hash"; -@@ -1284,6 +1287,17 @@ public class IntentHandler { +@@ -1306,6 +1309,17 @@ public class IntentHandler { return IntentUtils.safeGetSerializableExtra(intent, EXTRA_TAB_LAUNCH_TYPE); } @@ -229,7 +229,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. -@@ -1413,7 +1427,7 @@ public class IntentHandler { +@@ -1435,7 +1449,7 @@ public class IntentHandler { String headers = getExtraHeadersFromIntent(intent); headers = maybeAddAdditionalContentHeaders(intent, url, headers); @@ -241,7 +241,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 -@@ -44,6 +44,7 @@ import org.chromium.chrome.browser.intents.BrowserIntentUtils; +@@ -41,6 +41,7 @@ import org.chromium.chrome.browser.intents.BrowserIntentUtils; import org.chromium.chrome.browser.multiwindow.MultiWindowUtils; import org.chromium.chrome.browser.notifications.NotificationPlatformBridge; import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomizations; @@ -249,7 +249,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDis import org.chromium.chrome.browser.searchwidget.SearchActivity; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.util.AndroidTaskUtils; -@@ -202,11 +203,22 @@ public class LaunchIntentDispatcher { +@@ -199,11 +200,22 @@ public class LaunchIntentDispatcher { String query = null; final String action = intent.getAction(); @@ -272,7 +272,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDis // Only the ChromeLauncherActivity can handle search intents. Drop the intent and abort the // launch. -@@ -428,8 +440,8 @@ public class LaunchIntentDispatcher { +@@ -425,8 +437,8 @@ public class LaunchIntentDispatcher { /*incognito*/true); newIntent.setData(mIntent.getData()); newIntent.setPackage(applicationContext.getPackageName()); @@ -285,28 +285,27 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDis diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java --- a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java -@@ -86,6 +86,7 @@ import org.chromium.chrome.browser.tabpersistence.TabStateFileManager; +@@ -99,6 +99,7 @@ import org.chromium.chrome.browser.tabmodel.TabPersistentStore; import org.chromium.chrome.browser.ui.cars.DrivingRestrictionsManager; import org.chromium.chrome.browser.ui.hats.SurveyClientFactory; import org.chromium.chrome.browser.ui.searchactivityutils.SearchActivityPreferencesManager; +import org.chromium.chrome.browser.sharing.shared_intent.SharedIntentShareActivity; import org.chromium.chrome.browser.usb.UsbNotificationManager; import org.chromium.chrome.browser.util.AfterStartupTaskUtils; - import org.chromium.chrome.browser.webapps.WebApkUninstallTracker; -@@ -471,6 +472,8 @@ public class ProcessInitializationHandler { + import org.chromium.chrome.browser.webapps.ChromeWebApkHost; +@@ -683,6 +684,7 @@ public class ProcessInitializationHandler { ::makeDeferredRecordings); - deferredStartupHandler.addDeferredTask(WebApkUninstallTracker::runDeferredTasks); + tasks.add(WebApkUninstallTracker::runDeferredTasks); -+ deferredStartupHandler.addDeferredTask( -+ () -> SharedIntentShareActivity.updateComponentEnabledState()); - deferredStartupHandler.addDeferredTask( - () -> IncognitoTabLauncher.updateComponentEnabledState()); - deferredStartupHandler.addDeferredTask( ++ tasks.add(SharedIntentShareActivity::updateComponentEnabledState); + tasks.add(OfflineContentAvailabilityStatusProvider::getInstance); + tasks.add(() -> EnterpriseInfo.getInstance().logDeviceEnterpriseInfo()); + tasks.add(TosDialogBehaviorSharedPrefInvalidator::refreshSharedPreferenceIfTosSkipped); diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sharing/shared_intent/SharedIntentShareActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/sharing/shared_intent/SharedIntentShareActivity.java new file mode 100644 --- /dev/null +++ b/chrome/android/java/src/org/chromium/chrome/browser/sharing/shared_intent/SharedIntentShareActivity.java -@@ -0,0 +1,158 @@ +@@ -0,0 +1,159 @@ +// 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. @@ -340,6 +339,7 @@ new file mode 100644 +import org.chromium.chrome.browser.profiles.ProfileProvider; +import org.chromium.ui.widget.ButtonCompat; +import org.chromium.chrome.browser.profiles.Profile; ++import org.chromium.chrome.browser.profiles.ProfileManager; +import org.chromium.chrome.browser.search_engines.TemplateUrlServiceFactory; +import org.chromium.chrome.browser.privacy.settings.PrivacySettings; + @@ -427,7 +427,7 @@ new file mode 100644 + String scheme = Uri.parse(linkUrl).getScheme(); + if (scheme == null) { + linkUrl = -+ TemplateUrlServiceFactory.getForProfile(Profile.getLastUsedRegularProfile()) ++ TemplateUrlServiceFactory.getForProfile(ProfileManager.getLastUsedRegularProfile()) + .getUrlForSearchQuery(linkUrl); + } + updateTextLink(); @@ -468,7 +468,7 @@ new file mode 100644 diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc --- a/chrome/browser/flags/android/chrome_feature_list.cc +++ b/chrome/browser/flags/android/chrome_feature_list.cc -@@ -257,6 +257,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -275,6 +275,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kReengagementNotification, &kSearchReadyOmniboxFeature, &kRelatedSearchesAllLanguage, @@ -479,19 +479,19 @@ 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 -@@ -408,6 +408,7 @@ public abstract class ChromeFeatureList { - public static final String READALOUD_PLAYBACK = "ReadAloudPlayback"; - public static final String READALOUD_TAP_TO_SEEK = "ReadAloudTapToSeek"; +@@ -421,6 +421,7 @@ public abstract class ChromeFeatureList { public static final String READER_MODE_IN_CCT = "ReaderModeInCCT"; + public static final String READING_LIST_ENABLE_SYNC_TRANSPORT_MODE_UPON_SIGNIN = + "ReadingListEnableSyncTransportModeUponSignIn"; + public static final String SHARED_INTENT_UI = "SharedIntentUI"; public static final String RECORD_SUPPRESSION_METRICS = "RecordSuppressionMetrics"; - public static final String RECOVER_FROM_NEVER_SAVE_ANDROID = - "RecoverFromNeverSaveAndroid_LAUNCHED"; + public static final String REDIRECT_EXPLICIT_CTA_INTENTS_TO_EXISTING_ACTIVITY = + "RedirectExplicitCTAIntentsToExistingActivity"; 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 -@@ -5226,6 +5226,19 @@ To change this setting, BEGIN_LINKclear the Chrome da - Copied to your clipboard +@@ -5519,6 +5519,19 @@ To change this setting, BEGIN_LINKdelete the Chrome d + Make sure a phone app is enabled on this device + diff --git a/build/cromite_patches/Experimental-user-scripts-support.patch b/build/cromite_patches/Experimental-user-scripts-support.patch index ad5252ad..5e4108ce 100644 --- a/build/cromite_patches/Experimental-user-scripts-support.patch +++ b/build/cromite_patches/Experimental-user-scripts-support.patch @@ -37,7 +37,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html chrome/browser/prefs/browser_prefs.cc | 4 + chrome/browser/profiles/BUILD.gn | 3 + ...hrome_browser_main_extra_parts_profiles.cc | 7 + - chrome/browser/profiles/profile_manager.cc | 13 + + chrome/browser/profiles/profile_manager.cc | 11 + chrome/browser/profiles/renderer_updater.cc | 19 +- chrome/browser/profiles/renderer_updater.h | 3 + .../webui/chrome_web_ui_controller_factory.cc | 5 + @@ -114,7 +114,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../user_scripts/renderer/script_context.h | 67 ++ .../user_scripts/renderer/script_injection.cc | 295 +++++++ .../user_scripts/renderer/script_injection.h | 155 ++++ - .../renderer/script_injection_manager.cc | 415 +++++++++ + .../renderer/script_injection_manager.cc | 414 +++++++++ .../renderer/script_injection_manager.h | 100 +++ .../user_scripts/renderer/script_injector.h | 96 +++ .../user_scripts/renderer/scripts_run_info.cc | 31 + @@ -123,7 +123,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../renderer/user_script_injector.h | 86 ++ .../user_scripts/renderer/user_script_set.cc | 264 ++++++ .../user_scripts/renderer/user_script_set.h | 101 +++ - .../renderer/user_script_set_manager.cc | 77 ++ + .../renderer/user_script_set_manager.cc | 76 ++ .../renderer/user_script_set_manager.h | 63 ++ .../renderer/user_scripts_dispatcher.cc | 36 + .../renderer/user_scripts_dispatcher.h | 49 ++ @@ -135,7 +135,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../Experimental-user-scripts-support.inc | 13 + ipc/ipc_message_start.h | 1 + tools/gritsettings/resource_ids.spec | 6 + - 108 files changed, 9496 insertions(+), 2 deletions(-) + 108 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 @@ -226,7 +226,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 -@@ -170,7 +170,11 @@ if (current_toolchain == default_toolchain) { +@@ -198,7 +198,11 @@ if (current_toolchain == default_toolchain) { sources = chrome_java_resources sources += [ "//chrome/android/java/res_app/layout/main.xml" ] @@ -239,7 +239,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", -@@ -588,6 +592,7 @@ if (current_toolchain == default_toolchain) { +@@ -647,6 +651,7 @@ if (current_toolchain == default_toolchain) { "//components/ukm/android:java", "//components/url_formatter/android:url_formatter_java", "//components/user_prefs/android:java", @@ -250,7 +250,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml --- a/chrome/android/java/res/xml/main_preferences.xml +++ b/chrome/android/java/res/xml/main_preferences.xml -@@ -127,6 +127,11 @@ found in the LICENSE file. +@@ -137,6 +137,11 @@ found in the LICENSE file. android:key="useragent_settings" android:order="20" android:title="@string/prefs_useragent_settings"/> @@ -265,15 +265,15 @@ 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 -@@ -72,6 +72,7 @@ import org.chromium.ui.UiUtils; - import org.chromium.ui.base.DeviceFormFactor; +@@ -75,6 +75,7 @@ import org.chromium.ui.base.DeviceFormFactor; + import org.chromium.ui.base.MimeTypeUtils; import org.chromium.ui.widget.Toast; import org.chromium.url.GURL; +import org.chromium.chrome.browser.user_scripts.UserScriptsUtils; import java.io.File; -@@ -398,6 +399,11 @@ public class DownloadUtils { +@@ -409,6 +410,11 @@ public class DownloadUtils { String referrer, @DownloadOpenSource int source, Context context) { @@ -288,28 +288,28 @@ 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; - import java.util.Date; +@@ -146,6 +146,8 @@ import java.util.Date; import java.util.List; + import java.util.Locale; +import org.chromium.chrome.browser.user_scripts.UserScriptsUtils; + /** - * Handles the initialization dependences of the browser process. This is meant to handle the + * 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 -@@ -354,6 +356,8 @@ public class ProcessInitializationHandler { +@@ -620,6 +622,8 @@ public class ProcessInitializationHandler { - DefaultBrowserInfo.initBrowserFetcher(); + DefaultBrowserInfo.initBrowserFetcher(); -+ UserScriptsUtils.Initialize(); ++ UserScriptsUtils.Initialize(); + - AfterStartupTaskUtils.setStartupComplete(); + AfterStartupTaskUtils.setStartupComplete(); - PartnerBrowserCustomizations.getInstance() + 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 -@@ -23,6 +23,7 @@ import("//chrome/common/features.gni") +@@ -24,6 +24,7 @@ import("//chrome/common/features.gni") import("//components/feed/features.gni") import("//components/offline_pages/buildflags/features.gni") import("//device/vr/buildflags/buildflags.gni") @@ -317,7 +317,7 @@ diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni # Only used for testing, should not be shipped to end users. if (enable_offline_pages_harness) { -@@ -60,3 +61,5 @@ if (enable_cardboard) { +@@ -62,3 +63,5 @@ if (enable_cardboard) { "java/src/org/chromium/chrome/browser/vr/VrCompositorDelegateProviderImpl.java", ] } @@ -326,7 +326,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 -@@ -3645,6 +3645,13 @@ static_library("browser") { +@@ -3748,6 +3748,13 @@ static_library("browser") { ] deps += [ "//chrome/android/modules/dev_ui/provider:native" ] } @@ -343,7 +343,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -171,6 +171,7 @@ +@@ -175,6 +175,7 @@ #include "components/ui_devtools/switches.h" #include "components/variations/variations_switches.h" #include "components/version_info/channel.h" @@ -362,7 +362,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" -@@ -1792,6 +1793,9 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -2065,6 +2066,9 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, translate::TranslatePrefs::RegisterProfilePrefs(registry); omnibox::RegisterProfilePrefs(registry); ZeroSuggestProvider::RegisterProfilePrefs(registry); @@ -375,7 +375,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 -@@ -84,6 +84,9 @@ source_set("profile") { +@@ -76,6 +76,9 @@ source_set("profile") { "//content/public/browser", "//extensions/buildflags", ] @@ -388,8 +388,8 @@ 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 -@@ -511,6 +511,10 @@ - #include "chrome/browser/enterprise/data_controls/rules_service.h" +@@ -531,6 +531,10 @@ + #include "chrome/browser/enterprise/data_controls/reporting_service.h" #endif +#if BUILDFLAG(IS_ANDROID) @@ -399,7 +399,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc namespace chrome { void AddProfilesExtraParts(ChromeBrowserMainParts* main_parts) { -@@ -1258,6 +1262,9 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1308,6 +1312,9 @@ void ChromeBrowserMainExtraPartsProfiles:: #endif WebDataServiceFactory::GetInstance(); webrtc_event_logging::WebRtcEventLogManagerKeyedServiceFactory::GetInstance(); @@ -412,7 +412,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 -@@ -112,6 +112,10 @@ +@@ -115,6 +115,10 @@ #include "extensions/common/manifest.h" #endif @@ -423,11 +423,10 @@ 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" -@@ -1530,6 +1534,15 @@ void ProfileManager::DoFinalInitForServices(Profile* profile, - #endif - - #endif -+ +@@ -1526,6 +1530,13 @@ void ProfileManager::DoFinalInitForServices(Profile* profile, + // initializing the supervised flag if necessary). + ChildAccountServiceFactory::GetForProfile(profile)->Init(); + SupervisedUserServiceFactory::GetForProfile(profile)->Init(); +#if BUILDFLAG(IS_ANDROID) + user_scripts::UserScriptsBrowserClient* userscript_client = + user_scripts::UserScriptsBrowserClient::GetInstance(); @@ -435,10 +434,9 @@ diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profile + userscript_client->SetProfile(profile); + } +#endif -+ - #if BUILDFLAG(ENABLE_SUPERVISED_USERS) - // Initialization needs to happen after extension system initialization (for - // extension::ManagementPolicy) and InitProfileUserPrefs (for setting the + #if BUILDFLAG(ENABLE_EXTENSIONS) + // After the ManagementPolicy has been set, update it for the Supervised User + // Extension Delegate, which has been created before the profile diff --git a/chrome/browser/profiles/renderer_updater.cc b/chrome/browser/profiles/renderer_updater.cc --- a/chrome/browser/profiles/renderer_updater.cc +++ b/chrome/browser/profiles/renderer_updater.cc @@ -451,7 +449,7 @@ diff --git a/chrome/browser/profiles/renderer_updater.cc b/chrome/browser/profil RendererUpdater::RendererUpdater(Profile* profile) : profile_(profile), is_off_the_record_(profile_->IsOffTheRecord()), -@@ -77,6 +79,9 @@ RendererUpdater::RendererUpdater(Profile* profile) +@@ -74,6 +76,9 @@ RendererUpdater::RendererUpdater(Profile* profile) force_youtube_restrict_.Init(policy::policy_prefs::kForceYouTubeRestrict, pref_service); allowed_domains_for_apps_.Init(prefs::kAllowedDomainsForApps, pref_service); @@ -461,7 +459,7 @@ diff --git a/chrome/browser/profiles/renderer_updater.cc b/chrome/browser/profil pref_change_registrar_.Init(pref_service); pref_change_registrar_.Add( -@@ -91,6 +96,12 @@ RendererUpdater::RendererUpdater(Profile* profile) +@@ -88,6 +93,12 @@ RendererUpdater::RendererUpdater(Profile* profile) prefs::kAllowedDomainsForApps, base::BindRepeating(&RendererUpdater::UpdateAllRenderers, base::Unretained(this))); @@ -474,7 +472,7 @@ diff --git a/chrome/browser/profiles/renderer_updater.cc b/chrome/browser/profil } RendererUpdater::~RendererUpdater() { -@@ -244,5 +255,11 @@ chrome::mojom::DynamicParamsPtr RendererUpdater::CreateRendererDynamicParams() +@@ -231,5 +242,11 @@ chrome::mojom::DynamicParamsPtr RendererUpdater::CreateRendererDynamicParams() GetBoundSessionThrottlerParams(), #endif force_google_safesearch_.GetValue(), force_youtube_restrict_.GetValue(), @@ -490,7 +488,7 @@ diff --git a/chrome/browser/profiles/renderer_updater.cc b/chrome/browser/profil diff --git a/chrome/browser/profiles/renderer_updater.h b/chrome/browser/profiles/renderer_updater.h --- a/chrome/browser/profiles/renderer_updater.h +++ b/chrome/browser/profiles/renderer_updater.h -@@ -109,6 +109,9 @@ class RendererUpdater : public KeyedService, +@@ -102,6 +102,9 @@ class RendererUpdater : public KeyedService // Prefs that we sync to the renderers. BooleanPrefMember force_google_safesearch_; @@ -503,15 +501,15 @@ 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 -@@ -95,6 +95,7 @@ +@@ -91,6 +91,7 @@ + #include "components/security_interstitials/content/known_interception_disclosure_ui.h" #include "components/security_interstitials/content/urls.h" #include "components/site_engagement/content/site_engagement_service.h" - #include "components/supervised_user/core/common/buildflags.h" +#include "components/user_scripts/browser/ui/user_scripts_ui.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" #include "content/public/common/content_client.h" -@@ -506,6 +507,10 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, +@@ -488,6 +489,10 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, return &NewWebUI; if (url.host_piece() == chrome::kChromeUIVersionHost) return &NewWebUI; @@ -525,7 +523,7 @@ diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrom diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni --- a/chrome/chrome_paks.gni +++ b/chrome/chrome_paks.gni -@@ -119,6 +119,7 @@ template("chrome_extra_paks") { +@@ -129,6 +129,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", @@ -533,7 +531,7 @@ diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni "$root_gen_dir/ui/resources/webui_resources.pak", ] deps = [ -@@ -136,6 +137,7 @@ template("chrome_extra_paks") { +@@ -146,6 +147,7 @@ template("chrome_extra_paks") { "//third_party/blink/public:devtools_inspector_resources", "//third_party/blink/public:resources", "//ui/resources", @@ -544,7 +542,7 @@ diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni diff --git a/chrome/common/renderer_configuration.mojom b/chrome/common/renderer_configuration.mojom --- a/chrome/common/renderer_configuration.mojom +++ b/chrome/common/renderer_configuration.mojom -@@ -29,6 +29,7 @@ struct DynamicParams { +@@ -30,6 +30,7 @@ struct DynamicParams { bool force_safe_search = true; int32 youtube_restrict = 0; string allowed_domains_for_apps; @@ -555,7 +553,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 -@@ -239,6 +239,12 @@ static_library("renderer") { +@@ -243,6 +243,12 @@ static_library("renderer") { "//v8", ] @@ -571,8 +569,8 @@ diff --git a/chrome/renderer/BUILD.gn b/chrome/renderer/BUILD.gn 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 -@@ -260,6 +260,11 @@ - #include "chrome/renderer/cco/multiline_detector.h" +@@ -256,6 +256,11 @@ + #include "chrome/renderer/media/chrome_key_systems.h" #endif +#if BUILDFLAG(IS_ANDROID) @@ -583,7 +581,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer using autofill::AutofillAgent; using autofill::PasswordAutofillAgent; using autofill::PasswordGenerationAgent; -@@ -450,6 +455,14 @@ void ChromeContentRendererClient::RenderThreadStarted() { +@@ -451,6 +456,14 @@ void ChromeContentRendererClient::RenderThreadStarted() { WebString::FromASCII(extensions::kExtensionScheme)); #endif @@ -614,7 +612,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer #if BUILDFLAG(ENABLE_PPAPI) new PepperHelper(render_frame); #endif -@@ -1635,6 +1657,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentStart( +@@ -1637,6 +1659,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentStart( render_frame); // |render_frame| might be dead by now. #endif @@ -632,7 +630,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer } void ChromeContentRendererClient::RunScriptsAtDocumentEnd( -@@ -1644,6 +1677,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentEnd( +@@ -1646,6 +1679,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentEnd( render_frame); // |render_frame| might be dead by now. #endif @@ -650,7 +648,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer } void ChromeContentRendererClient::RunScriptsAtDocumentIdle( -@@ -1653,6 +1697,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentIdle( +@@ -1655,6 +1699,17 @@ void ChromeContentRendererClient::RunScriptsAtDocumentIdle( render_frame); // |render_frame| might be dead by now. #endif @@ -680,7 +678,7 @@ diff --git a/chrome/renderer/chrome_render_thread_observer.cc b/chrome/renderer/ #if BUILDFLAG(IS_CHROMEOS_ASH) #include "chrome/renderer/ash_merge_session_loader_throttle.h" #endif -@@ -227,6 +229,9 @@ void ChromeRenderThreadObserver::SetConfiguration( +@@ -224,6 +226,9 @@ void ChromeRenderThreadObserver::SetConfiguration( chrome::mojom::DynamicParamsPtr params) { base::AutoLock lock(dynamic_params_lock_); dynamic_params_ = std::move(params); @@ -698,9 +696,9 @@ diff --git a/components/components_strings.grd b/components/components_strings.g + - - - + + + diff --git a/components/user_scripts/README.md b/components/user_scripts/README.md new file mode 100644 --- /dev/null @@ -1301,7 +1299,7 @@ new file mode 100755 + + SettingsLauncher settingsLauncher = new SettingsLauncherImpl(); + Intent intent = settingsLauncher.createSettingsActivityIntent( -+ context, UserScriptsPreferences.class.getName(), ++ context, UserScriptsPreferences.class, + UserScriptsPreferences.createFragmentArgsForInstall(filePath)); + IntentUtils.safeStartActivity(context, intent); + @@ -5416,7 +5414,7 @@ new file mode 100755 + MatchesPath(StripTrailingWildcard(other.path())); +} + -+absl::optional URLPattern::CreateIntersection( ++std::optional URLPattern::CreateIntersection( + const URLPattern& other) const { + // Easy case: Schemes don't overlap. Return nullopt. + int intersection_schemes = URLPattern::SCHEME_NONE; @@ -5818,7 +5816,7 @@ new file mode 100755 + // contains another, it will be handled correctly, but this method does not + // deal with cases like /*a* and /*b* (where technically the intersection + // is /*a*b*|/*b*a*); the intersection returned for that case will be empty. -+ absl::optional CreateIntersection(const URLPattern& other) const; ++ std::optional CreateIntersection(const URLPattern& other) const; + + // Converts this URLPattern into an equivalent set of URLPatterns that don't + // use a wildcard in the scheme component. If this URLPattern doesn't use a @@ -5986,7 +5984,7 @@ new file mode 100755 + // they have with the other patterns. + for (const auto* pattern : unique_set1) { + for (const auto* pattern2 : unique_set2) { -+ absl::optional intersection = ++ std::optional intersection = + pattern->CreateIntersection(*pattern2); + if (intersection) + result.patterns_.insert(std::move(*intersection)); @@ -8282,7 +8280,7 @@ new file mode 100755 + } + +void ScriptInjection::OnJsInjectionCompleted( -+ absl::optional results, ++ std::optional results, + base::TimeTicks start_time) { + DCHECK(!did_inject_js_); + @@ -8306,13 +8304,13 @@ new file mode 100755 + run_location_, injected_stylesheets, num_injected_stylesheets); + blink::WebLocalFrame* web_frame = render_frame_->GetWebFrame(); + // Default CSS origin is "author", but can be overridden to "user" by scripts. -+ absl::optional css_origin = injector_->GetCssOrigin(); ++ std::optional css_origin = injector_->GetCssOrigin(); + blink::WebCssOrigin blink_css_origin = + css_origin && *css_origin == CSS_ORIGIN_USER + ? blink::WebCssOrigin::kUser + : blink::WebCssOrigin::kAuthor; + blink::WebStyleSheetKey style_sheet_key; -+ if (const absl::optional& injection_key = ++ if (const std::optional& injection_key = + injector_->GetInjectionKey()) + style_sheet_key = blink::WebString::FromASCII(*injection_key); + for (const blink::WebString& css : css_sources) @@ -8416,7 +8414,7 @@ new file mode 100755 + + // Called when JS injection for the given frame has been completed or + // cancelled. -+ void OnJsInjectionCompleted(absl::optional results, ++ void OnJsInjectionCompleted(std::optional results, + base::TimeTicks start_time); + + private: @@ -8467,7 +8465,7 @@ new file mode 100755 + bool log_activity_; + + // Results storage. -+ absl::optional execution_result_; ++ std::optional execution_result_; + + // The callback to run upon completing asynchronously. + CompletionCallback async_completion_callback_; @@ -8485,7 +8483,7 @@ diff --git a/components/user_scripts/renderer/script_injection_manager.cc b/comp new file mode 100755 --- /dev/null +++ b/components/user_scripts/renderer/script_injection_manager.cc -@@ -0,0 +1,415 @@ +@@ -0,0 +1,414 @@ +// 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. @@ -8540,8 +8538,7 @@ new file mode 100755 + case UserScript::RUN_LOCATION_LAST: + break; + } -+ NOTREACHED(); -+ return UserScript::RUN_LOCATION_LAST; ++ NOTREACHED_NORETURN(); +} + +} // namespace @@ -9055,10 +9052,10 @@ new file mode 100755 + virtual bool IsUserGesture() const = 0; + + // Returns the CSS origin of this injection. -+ virtual absl::optional GetCssOrigin() const = 0; ++ virtual std::optional GetCssOrigin() const = 0; + + // Returns the key for this injection, if it's a CSS injection. -+ virtual const absl::optional GetInjectionKey() const = 0; ++ virtual const std::optional GetInjectionKey() const = 0; + + // Returns true if the script expects results. + virtual bool ExpectsResults() const = 0; @@ -9093,7 +9090,7 @@ new file mode 100755 + // |render_frame| contains the render frame, or null if the frame was + // invalidated. + virtual void OnInjectionComplete( -+ absl::optional execution_result, ++ std::optional execution_result, + UserScript::RunLocation run_location, + content::RenderFrame* render_frame) = 0; + @@ -9358,11 +9355,11 @@ new file mode 100755 + return false; +} + -+absl::optional UserScriptInjector::GetCssOrigin() const { ++std::optional UserScriptInjector::GetCssOrigin() const { + return absl::nullopt; +} + -+const absl::optional UserScriptInjector::GetInjectionKey() const { ++const std::optional UserScriptInjector::GetInjectionKey() const { + return absl::nullopt; +} + @@ -9440,7 +9437,7 @@ new file mode 100755 +} + +void UserScriptInjector::OnInjectionComplete( -+ absl::optional execution_result, ++ std::optional execution_result, + UserScript::RunLocation run_location, + content::RenderFrame* render_frame) {} + @@ -9496,8 +9493,8 @@ new file mode 100755 + // ScriptInjector implementation. + UserScript::InjectionType script_type() const override; + bool IsUserGesture() const override; -+ absl::optional GetCssOrigin() const override; -+ const absl::optional GetInjectionKey() const override; ++ std::optional GetCssOrigin() const override; ++ const std::optional GetInjectionKey() const override; + bool ExpectsResults() const override; + bool ShouldInjectJs( + UserScript::RunLocation run_location, @@ -9513,7 +9510,7 @@ new file mode 100755 + UserScript::RunLocation run_location, + std::set* injected_stylesheets, + size_t* num_injected_stylesheets) const override; -+ void OnInjectionComplete(absl::optional execution_result, ++ void OnInjectionComplete(std::optional execution_result, + UserScript::RunLocation run_location, + content::RenderFrame* render_frame) override; + void OnWillNotInject(InjectFailureReason reason, @@ -9651,11 +9648,11 @@ new file mode 100755 + + // Unpickle scripts. + uint32_t num_scripts = 0; -+ auto memory = shared_memory_mapping_.GetMemoryAsSpan(pickle_size); ++ auto memory = shared_memory_mapping_.GetMemoryAsSpan(pickle_size); + if (!memory.size()) + return false; + -+ base::Pickle pickle(memory.data(), pickle_size); ++ base::Pickle pickle = base::Pickle::WithUnownedBuffer(memory); + base::PickleIterator iter(pickle); + base::debug::Alias(&pickle_size); + CHECK(iter.ReadUInt32(&num_scripts)); @@ -9919,7 +9916,7 @@ diff --git a/components/user_scripts/renderer/user_script_set_manager.cc b/compo new file mode 100755 --- /dev/null +++ b/components/user_scripts/renderer/user_script_set_manager.cc -@@ -0,0 +1,77 @@ +@@ -0,0 +1,76 @@ +#include "user_script_set_manager.h" + +#include "base/logging.h" @@ -9973,8 +9970,7 @@ new file mode 100755 +void UserScriptSetManager::OnUpdateUserScripts( + base::ReadOnlySharedMemoryRegion shared_memory) { + if (!shared_memory.IsValid()) { -+ NOTREACHED() << "Bad scripts handle"; -+ return; ++ NOTREACHED_NORETURN() << "Bad scripts handle"; + } + + UserScriptSet* scripts = NULL; @@ -9997,7 +9993,6 @@ new file mode 100755 +} + +} -\ No newline at end of file diff --git a/components/user_scripts/renderer/user_script_set_manager.h b/components/user_scripts/renderer/user_script_set_manager.h new file mode 100755 --- /dev/null @@ -10486,7 +10481,7 @@ diff --git a/ipc/ipc_message_start.h b/ipc/ipc_message_start.h 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 -@@ -980,6 +980,12 @@ +@@ -1041,6 +1041,12 @@ "components/search_engine_descriptions_strings.grd": { "messages": [7260], }, diff --git a/build/cromite_patches/Eyeo-Adblock-Remove-Privacy-Issues.patch b/build/cromite_patches/Eyeo-Adblock-for-Cromite.patch similarity index 62% rename from build/cromite_patches/Eyeo-Adblock-Remove-Privacy-Issues.patch rename to build/cromite_patches/Eyeo-Adblock-for-Cromite.patch index 1f7a9d9d..a0204980 100644 --- a/build/cromite_patches/Eyeo-Adblock-Remove-Privacy-Issues.patch +++ b/build/cromite_patches/Eyeo-Adblock-for-Cromite.patch @@ -1,6 +1,6 @@ From: uazo Date: Thu, 29 Sep 2022 11:27:35 +0000 -Subject: Eyeo Adblock for Bromite +Subject: Eyeo Adblock for Cromite Change the normal behaviour of Eyeo Chromium SDK to suit Bromite logic. @@ -12,16 +12,17 @@ deactivation of all pop-ups (default disabled) --- .../android/java/res/xml/main_preferences.xml | 19 +- chrome/browser/BUILD.gn | 2 - - .../adblock/adblock_content_browser_client.cc | 280 +- - .../adblock/adblock_content_browser_client.h | 47 +- + .../adblock/adblock_content_browser_client.cc | 291 +- + .../adblock/adblock_content_browser_client.h | 54 +- .../browser/chrome_content_browser_client.cc | 6 +- .../browser/chrome_content_browser_client.h | 6 +- .../adblock_private/adblock_private_api.cc | 74 +- .../api/adblock_private/adblock_private_api.h | 49 + .../eyeo_filtering_private_api.cc | 25 +- ...hrome_browser_main_extra_parts_profiles.cc | 2 - + .../resources/adblock_internals/BUILD.gn | 8 +- chrome/browser/resources/settings/BUILD.gn | 2 + - .../settings/adblock_page/adblock_page.html | 207 + + .../settings/adblock_page/adblock_page.html | 212 + .../settings/adblock_page/adblock_page.ts | 286 ++ .../settings/basic_page/basic_page.html | 7 + .../settings/basic_page/basic_page.ts | 1 + @@ -31,7 +32,8 @@ deactivation of all pop-ups (default disabled) chrome/browser/resources/settings/settings.ts | 1 + .../settings/settings_menu/settings_menu.html | 5 + chrome/browser/ui/tab_helpers.cc | 6 +- - .../adblock_internals_page_handler_impl.cc | 20 +- + .../adblock_internals_page_handler_impl.cc | 23 +- + .../common/extensions/api/_api_features.json | 4 +- .../extensions/api/_permission_features.json | 8 - .../common/extensions/api/adblock_private.idl | 8 + components/adblock/android/BUILD.gn | 3 +- @@ -46,19 +48,19 @@ deactivation of all pop-ups (default disabled) .../AdblockCustomFiltersFragment.java | 7 +- .../settings/AdblockCustomItemFragment.java | 20 +- .../settings/AdblockFilterListsAdapter.java | 6 + - .../settings/AdblockSettingsFragment.java | 45 +- + .../settings/AdblockSettingsFragment.java | 51 +- components/adblock/content/browser/BUILD.gn | 18 +- .../adblock_controller_factory_base.cc | 5 +- - .../browser/adblock_url_loader_factory.cc | 17 +- + .../browser/adblock_url_loader_factory.cc | 68 +- .../browser/adblock_url_loader_factory.h | 7 +- .../browser/adblock_webcontents_observer.cc | 25 +- .../browser/adblock_webcontents_observer.h | 5 +- .../content_security_policy_injector_impl.cc | 1 + .../content/browser/element_hider_impl.cc | 2 +- .../browser/frame_hierarchy_builder.cc | 3 +- - .../browser/resource_classification_runner.h | 8 + - .../resource_classification_runner_impl.cc | 30 +- - .../resource_classification_runner_impl.h | 8 + + .../browser/resource_classification_runner.h | 9 + + .../resource_classification_runner_impl.cc | 83 +- + .../resource_classification_runner_impl.h | 10 + .../subscription_service_factory_base.cc | 11 +- .../subscription_service_factory_base.h | 1 + components/adblock/core/BUILD.gn | 39 - @@ -67,7 +69,7 @@ deactivation of all pop-ups (default disabled) .../adblock/core/adblock_controller_impl.cc | 10 +- components/adblock/core/adblock_switches.cc | 1 - components/adblock/core/adblock_switches.h | 1 - - .../adblock/core/adblock_telemetry_service.cc | 258 -- + .../adblock/core/adblock_telemetry_service.cc | 258 - .../adblock/core/adblock_telemetry_service.h | 120 - components/adblock/core/common/BUILD.gn | 8 - .../adblock/core/common/adblock_constants.cc | 2 - @@ -83,7 +85,8 @@ deactivation of all pop-ups (default disabled) .../core/converter/parser/test/test_rules.txt | 21 + .../core/converter/parser/url_filter.cc | 10 +- .../converter/parser/url_filter_options.cc | 21 +- - .../serializer/flatbuffer_serializer.cc | 75 +- + .../serializer/flatbuffer_serializer.cc | 82 +- + components/adblock/core/features.cc | 3 +- components/adblock/core/hash/schema_hash.h | 10 + .../adblock/core/sitekey_storage_impl.cc | 7 + .../core/subscription/conversion_executors.h | 1 + @@ -92,7 +95,7 @@ deactivation of all pop-ups (default disabled) .../filtering_configuration_maintainer_impl.h | 4 +- .../ongoing_subscription_request_impl.cc | 33 +- .../preloaded_subscription_provider_impl.cc | 4 +- - .../adblock/core/subscription/subscription.cc | 19 + + .../adblock/core/subscription/subscription.cc | 18 + .../adblock/core/subscription/subscription.h | 3 + .../subscription_collection_impl.cc | 1 + .../core/subscription/subscription_config.cc | 20 +- @@ -113,22 +116,21 @@ deactivation of all pop-ups (default disabled) components/resources/BUILD.gn | 1 - components/resources/adblock_resources.grdp | 3 - components/resources/adblocking/.gitignore | 2 +- - components/resources/adblocking/BUILD.gn | 30 +- + components/resources/adblocking/BUILD.gn | 34 +- .../adblocking/elemhide_for_selector.jst | 2 +- .../resources/adblocking/elemhideemu.jst | 2 + - .../snippets/dist/isolated-first-xpath3.jst | 62 + - .../dist/isolated-first-xpath3.source.jst | 3696 +++++++++++++++++ - .../snippets/dist/isolated-first.jst | 65 + - .../snippets/dist/isolated-first.source.jst | 3624 ++++++++++++++++ + .../snippets/dist/isolated-first.jst | 66 + + .../snippets/dist/isolated-first.source.jst | 4215 +++++++++++++++++ .../websockets/websocket_connector_impl.cc | 6 +- .../public/browser/content_browser_client.cc | 4 +- .../public/browser/content_browser_client.h | 4 +- + content/public/common/isolated_world_ids.h | 6 +- .../about_flags_cc/Stricter-popup-blocker.inc | 14 + .../blink/renderer/core/css/style_engine.cc | 8 + .../blink/renderer/core/css/style_engine.h | 1 + .../renderer/core/exported/web_document.cc | 15 +- .../definitions/adblock_private.d.ts | 14 + - 118 files changed, 9188 insertions(+), 1264 deletions(-) + 120 files changed, 6147 insertions(+), 1309 deletions(-) create mode 100644 chrome/browser/resources/settings/adblock_page/adblock_page.html create mode 100644 chrome/browser/resources/settings/adblock_page/adblock_page.ts rename components/adblock/android/java/res/xml/{adblock_preferences.xml => eyeo_adblock_preferences.xml} (56%) @@ -139,10 +141,8 @@ deactivation of all pop-ups (default disabled) create mode 100644 components/adblock/core/converter/parser/test/test_rules.txt create mode 100644 components/adblock/core/hash/schema_hash.h create mode 100644 components/content_settings/core/browser/bromite_content_settings/ads.inc - create mode 100644 components/resources/adblocking/snippets/dist/isolated-first-xpath3.jst - create mode 100644 components/resources/adblocking/snippets/dist/isolated-first-xpath3.source.jst - create mode 100755 components/resources/adblocking/snippets/dist/isolated-first.jst - create mode 100755 components/resources/adblocking/snippets/dist/isolated-first.source.jst + create mode 100644 components/resources/adblocking/snippets/dist/isolated-first.jst + create mode 100644 components/resources/adblocking/snippets/dist/isolated-first.source.jst create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Stricter-popup-blocker.inc diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml @@ -162,7 +162,7 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j -@@ -81,6 +72,11 @@ Use of this source code is governed by the GPLv3 that can be found in the compon +@@ -86,6 +77,11 @@ Use of this source code is governed by the GPLv3 that can be found in the compon android:key="adblock" android:order="13" android:title="@string/prefs_adblock"/> @@ -173,10 +173,10 @@ diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/j + android:title="@string/adblock_settings_title" /> - GetContentSetting(embedder_url, GURL(), ContentSettingsType::ADS) + == CONTENT_SETTING_ALLOW) { @@ -262,7 +266,7 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.cc b/chrome/b } } return false; -@@ -79,10 +102,11 @@ class AdblockContextData : public base::SupportsUserData::Data { +@@ -79,10 +106,11 @@ class AdblockContextData : public base::SupportsUserData::Data { static void StartProxying( Profile* profile, @@ -276,7 +280,7 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.cc b/chrome/b bool use_test_loader) { const void* const kAdblockContextUserDataKey = &kAdblockContextUserDataKey; auto* self = static_cast( -@@ -91,8 +115,6 @@ class AdblockContextData : public base::SupportsUserData::Data { +@@ -91,8 +119,6 @@ class AdblockContextData : public base::SupportsUserData::Data { self = new AdblockContextData(); profile->SetUserData(kAdblockContextUserDataKey, base::WrapUnique(self)); } @@ -285,7 +289,7 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.cc b/chrome/b adblock::AdblockURLLoaderFactoryConfig config{ adblock::SubscriptionServiceFactory::GetForBrowserContext( browser_context), -@@ -102,28 +124,12 @@ class AdblockContextData : public base::SupportsUserData::Data { +@@ -102,28 +128,12 @@ class AdblockContextData : public base::SupportsUserData::Data { adblock::SitekeyStorageFactory::GetForBrowserContext(browser_context), adblock::ContentSecurityPolicyInjectorFactory::GetForBrowserContext( browser_context)}; @@ -317,7 +321,7 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.cc b/chrome/b embedder_support::GetUserAgent(), base::BindOnce(&AdblockContextData::RemoveProxy, self->weak_factory_.GetWeakPtr())); -@@ -163,47 +169,50 @@ void AdblockContentBrowserClient::ForceAdblockProxyForTesting() { +@@ -163,47 +173,50 @@ void AdblockContentBrowserClient::ForceAdblockProxyForTesting() { #endif bool AdblockContentBrowserClient::WillInterceptWebSocket( @@ -346,7 +350,8 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.cc b/chrome/b const GURL& url, + const url::Origin& initiator_origin, const net::SiteForCookies& site_for_cookies, - const absl::optional& user_agent, +- const std::optional& user_agent, ++ const std::optional& user_agent, mojo::PendingRemote handshake_client) { - if (IsFilteringNeeded(frame)) { @@ -373,7 +378,8 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.cc b/chrome/b const GURL& url, + const url::Origin& initiator_origin, const net::SiteForCookies& site_for_cookies, - const absl::optional& user_agent, +- const std::optional& user_agent, ++ const std::optional& user_agent, mojo::PendingRemote handshake_client) { - auto* frame = content::RenderFrameHost::FromID(render_frame_host_id); @@ -385,7 +391,7 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.cc b/chrome/b auto* subscription_service = adblock::SubscriptionServiceFactory::GetForBrowserContext( browser_context); -@@ -211,33 +220,33 @@ void AdblockContentBrowserClient::CreateWebSocketInternal( +@@ -211,33 +224,33 @@ void AdblockContentBrowserClient::CreateWebSocketInternal( adblock::ResourceClassificationRunnerFactory::GetForBrowserContext( browser_context); classification_runner->CheckRequestFilterMatchForWebSocket( @@ -407,7 +413,8 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.cc b/chrome/b const GURL& url, + const url::Origin& initiator_origin, const net::SiteForCookies& site_for_cookies, - const absl::optional& user_agent, +- const std::optional& user_agent, ++ const std::optional& user_agent, mojo::PendingRemote handshake_client, adblock::FilterMatchResult result) { @@ -427,7 +434,7 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.cc b/chrome/b std::move(handshake_client)); return; } -@@ -254,15 +263,133 @@ void AdblockContentBrowserClient::OnWebSocketFilterCheckCompleted( +@@ -254,15 +267,134 @@ void AdblockContentBrowserClient::OnWebSocketFilterCheckCompleted( VLOG(1) << "[eyeo] Web socket blocked for " << url; } @@ -556,7 +563,8 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.cc b/chrome/b int render_process_id, URLLoaderFactoryType type, const url::Origin& request_initiator, -- absl::optional navigation_id, +- std::optional navigation_id, ++ const net::IsolationInfo& isolation_info, + std::optional navigation_id, ukm::SourceIdObj ukm_source_id, - mojo::PendingReceiver* factory_receiver, @@ -564,7 +572,7 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.cc b/chrome/b mojo::PendingRemote* header_client, bool* bypass_redirect_checks, -@@ -271,30 +398,17 @@ bool AdblockContentBrowserClient::WillCreateURLLoaderFactory( +@@ -271,30 +403,17 @@ bool AdblockContentBrowserClient::WillCreateURLLoaderFactory( scoped_refptr navigation_response_task_runner) { // Create Chromium proxy first as WebRequestProxyingURLLoaderFactory logic // depends on being first proxy @@ -589,7 +597,7 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.cc b/chrome/b -#endif + ChromeContentBrowserClient::WillCreateURLLoaderFactory( + browser_context, frame, render_process_id, type, request_initiator, -+ navigation_id, ukm_source_id, factory_builder, header_client, ++ isolation_info, navigation_id, ukm_source_id, factory_builder, header_client, + bypass_redirect_checks, disable_secure_dns, factory_override, + navigation_response_task_runner); + auto* profile = Profile::FromBrowserContext(browser_context); @@ -604,7 +612,7 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.cc b/chrome/b bool use_test_loader = false; #ifdef EYEO_INTERCEPT_DEBUG_URL -@@ -309,12 +423,8 @@ bool AdblockContentBrowserClient::WillCreateURLLoaderFactory( +@@ -309,12 +428,8 @@ bool AdblockContentBrowserClient::WillCreateURLLoaderFactory( #endif if (use_adblock_proxy) { @@ -622,7 +630,7 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.cc b/chrome/b diff --git a/chrome/browser/adblock/adblock_content_browser_client.h b/chrome/browser/adblock/adblock_content_browser_client.h --- a/chrome/browser/adblock/adblock_content_browser_client.h +++ b/chrome/browser/adblock/adblock_content_browser_client.h -@@ -44,25 +44,36 @@ class AdblockContentBrowserClient : public ChromeContentBrowserClient { +@@ -44,25 +44,37 @@ class AdblockContentBrowserClient : public ChromeContentBrowserClient { static void ForceAdblockProxyForTesting(); #endif @@ -635,7 +643,8 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.h b/chrome/br const GURL& url, + const url::Origin& initiator_origin, const net::SiteForCookies& site_for_cookies, - const absl::optional& user_agent, +- const std::optional& user_agent, ++ const std::optional& user_agent, mojo::PendingRemote handshake_client) override; @@ -655,7 +664,8 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.h b/chrome/br int render_process_id, URLLoaderFactoryType type, const url::Origin& request_initiator, -- absl::optional navigation_id, +- std::optional navigation_id, ++ const net::IsolationInfo& isolation_info, + std::optional navigation_id, ukm::SourceIdObj ukm_source_id, - mojo::PendingReceiver* factory_receiver, @@ -663,7 +673,7 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.h b/chrome/br mojo::PendingRemote* header_client, bool* bypass_redirect_checks, -@@ -71,25 +82,51 @@ class AdblockContentBrowserClient : public ChromeContentBrowserClient { +@@ -71,25 +83,51 @@ class AdblockContentBrowserClient : public ChromeContentBrowserClient { scoped_refptr navigation_response_task_runner) override; @@ -689,7 +699,8 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.h b/chrome/br const GURL& url, + const url::Origin& initiator_origin, const net::SiteForCookies& site_for_cookies, - const absl::optional& user_agent, +- const std::optional& user_agent, ++ const std::optional& user_agent, mojo::PendingRemote handshake_client); void OnWebSocketFilterCheckCompleted( @@ -699,7 +710,8 @@ diff --git a/chrome/browser/adblock/adblock_content_browser_client.h b/chrome/br const GURL& url, + const url::Origin& initiator_origin, const net::SiteForCookies& site_for_cookies, - const absl::optional& user_agent, +- const std::optional& user_agent, ++ const std::optional& user_agent, mojo::PendingRemote handshake_client, adblock::FilterMatchResult result); @@ -719,7 +731,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 -@@ -6173,7 +6173,9 @@ ChromeContentBrowserClient:: +@@ -6399,7 +6399,9 @@ ChromeContentBrowserClient:: } bool ChromeContentBrowserClient::WillInterceptWebSocket( @@ -730,7 +742,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch #if BUILDFLAG(ENABLE_EXTENSIONS) if (!frame) { return false; -@@ -6196,9 +6198,11 @@ bool ChromeContentBrowserClient::WillInterceptWebSocket( +@@ -6422,9 +6424,11 @@ bool ChromeContentBrowserClient::WillInterceptWebSocket( } void ChromeContentBrowserClient::CreateWebSocket( @@ -745,7 +757,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 -@@ -645,11 +645,15 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -663,11 +663,15 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { CreateURLLoaderHandlerForServiceWorkerNavigationPreload( int frame_tree_node_id, const network::ResourceRequest& resource_request) override; @@ -842,7 +854,7 @@ diff --git a/chrome/browser/extensions/api/adblock_private/adblock_private_api.c +AdblockPrivateSetPrivilegedFiltersEnabledFunction::~AdblockPrivateSetPrivilegedFiltersEnabledFunction() {} + +ExtensionFunction::ResponseAction AdblockPrivateSetPrivilegedFiltersEnabledFunction::Run() { -+ absl::optional params = ++ std::optional params = + api::adblock_private::SetEnabled::Params::Create(args()); + EXTENSION_FUNCTION_VALIDATE(params); + @@ -997,15 +1009,15 @@ diff --git a/chrome/browser/extensions/api/eyeo_filtering_private/eyeo_filtering 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 -@@ -17,7 +17,6 @@ - #include "chrome/browser/accessibility/accessibility_labels_service_factory.h" +@@ -18,7 +18,6 @@ #include "chrome/browser/accessibility/page_colors_factory.h" + #include "chrome/browser/affiliations/affiliation_service_factory.h" #include "chrome/browser/adblock/adblock_controller_factory.h" -#include "chrome/browser/adblock/adblock_telemetry_service_factory.h" #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" -@@ -826,7 +825,6 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -861,7 +860,6 @@ void ChromeBrowserMainExtraPartsProfiles:: FakeSmartCardDeviceServiceFactory::GetInstance(); #endif adblock::AdblockControllerFactory::GetInstance(); @@ -1013,10 +1025,33 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc adblock::ContentSecurityPolicyInjectorFactory::GetInstance(); adblock::ElementHiderFactory::GetInstance(); adblock::ResourceClassificationRunnerFactory::GetInstance(); +diff --git a/chrome/browser/resources/adblock_internals/BUILD.gn b/chrome/browser/resources/adblock_internals/BUILD.gn +--- a/chrome/browser/resources/adblock_internals/BUILD.gn ++++ b/chrome/browser/resources/adblock_internals/BUILD.gn +@@ -18,12 +18,18 @@ import("//ui/webui/resources/tools/build_webui.gni") + + build_webui("build") { + grd_prefix = "adblock_internals" ++ + static_files = [ "adblock_internals.html" ] ++ + non_web_component_files = [ "adblock_internals.ts" ] +- mojo_files_deps = [ "//chrome/browser/ui/webui/adblock_internals:mojo_bindings_ts__generator" ] ++ ++ mojo_files_deps = ++ [ "//chrome/browser/ui/webui/adblock_internals:mojo_bindings_ts__generator" ] + mojo_files = [ "$root_gen_dir/chrome/browser/ui/webui/adblock_internals/adblock_internals.mojom-webui.ts" ] ++ + ts_deps = [ + "//ui/webui/resources/js:build_ts", + "//ui/webui/resources/mojo:build_ts", + ] ++ webui_context_type = "trusted" + } diff --git a/chrome/browser/resources/settings/BUILD.gn b/chrome/browser/resources/settings/BUILD.gn --- a/chrome/browser/resources/settings/BUILD.gn +++ b/chrome/browser/resources/settings/BUILD.gn -@@ -74,6 +74,7 @@ build_webui("build") { +@@ -62,6 +62,7 @@ build_webui("build") { "a11y_page/a11y_page.ts", "about_page/about_page.ts", "ai_page/ai_page.ts", @@ -1024,10 +1059,10 @@ diff --git a/chrome/browser/resources/settings/BUILD.gn b/chrome/browser/resourc "appearance_page/appearance_fonts_page.ts", "appearance_page/appearance_page.ts", "appearance_page/home_url_input.ts", -@@ -389,6 +390,7 @@ build_webui("build") { - ts_composite = true +@@ -397,6 +398,7 @@ build_webui("build") { ts_definitions = [ "//tools/typescript/definitions/autofill_private.d.ts", + "//tools/typescript/definitions/chrome_event.d.ts", + "//tools/typescript/definitions/adblock_private.d.ts", "//tools/typescript/definitions/chrome_send.d.ts", "//tools/typescript/definitions/language_settings_private.d.ts", @@ -1036,7 +1071,7 @@ diff --git a/chrome/browser/resources/settings/adblock_page/adblock_page.html b/ new file mode 100644 --- /dev/null +++ b/chrome/browser/resources/settings/adblock_page/adblock_page.html -@@ -0,0 +1,207 @@ +@@ -0,0 +1,212 @@ + @@ -2422,10 +2528,10 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro diff --git a/chrome/browser/ui/android/toolbar/BUILD.gn b/chrome/browser/ui/android/toolbar/BUILD.gn --- a/chrome/browser/ui/android/toolbar/BUILD.gn +++ b/chrome/browser/ui/android/toolbar/BUILD.gn -@@ -174,6 +174,7 @@ android_library("java") { - "//components/user_prefs/android:java", +@@ -177,6 +177,7 @@ android_library("java") { "//content/public/android:content_java", "//third_party/android_deps:material_design_java", + "//third_party/androidx:androidx_annotation_annotation_experimental_java", + "//third_party/androidx:androidx_coordinatorlayout_coordinatorlayout_java", "//third_party/androidx:androidx_annotation_annotation_java", "//third_party/androidx:androidx_appcompat_appcompat_java", @@ -2433,7 +2539,7 @@ diff --git a/chrome/browser/ui/android/toolbar/BUILD.gn b/chrome/browser/ui/andr diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/LocationBarFocusScrimHandler.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/LocationBarFocusScrimHandler.java --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/LocationBarFocusScrimHandler.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/LocationBarFocusScrimHandler.java -@@ -17,6 +17,7 @@ import org.chromium.components.browser_ui.widget.scrim.ScrimProperties; +@@ -16,6 +16,7 @@ import org.chromium.components.browser_ui.widget.scrim.ScrimProperties; import org.chromium.ui.base.DeviceFormFactor; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.util.ColorUtils; @@ -2441,7 +2547,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow /** Handles showing and hiding a scrim when url bar focus changes. */ public class LocationBarFocusScrimHandler implements UrlFocusChangeListener { -@@ -61,6 +62,10 @@ public class LocationBarFocusScrimHandler implements UrlFocusChangeListener { +@@ -60,6 +61,10 @@ public class LocationBarFocusScrimHandler implements UrlFocusChangeListener { mContext = context; int topMargin = tabStripHeightSupplier.get() == null ? 0 : tabStripHeightSupplier.get(); @@ -2485,41 +2591,41 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsCoordinator.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsCoordinator.java --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsCoordinator.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsCoordinator.java -@@ -26,6 +26,8 @@ import org.chromium.ui.modelutil.PropertyModel; - import org.chromium.ui.modelutil.PropertyModelChangeProcessor; +@@ -30,6 +30,8 @@ import org.chromium.ui.modelutil.PropertyModelChangeProcessor; import org.chromium.ui.resources.ResourceManager; + import org.chromium.ui.resources.dynamics.ViewResourceAdapter; import org.chromium.ui.widget.Toast; +import org.chromium.chrome.browser.theme.TopUiThemeColorProvider; +import org.chromium.chrome.browser.tab.Tab; /** * The root coordinator for the bottom controls component. This component is intended for use with -@@ -60,6 +62,8 @@ public class BottomControlsCoordinator implements BackPressHandler { - * @param tabObscuringHandler Delegate object handling obscuring views. - * @param overlayPanelVisibilitySupplier Notifies overlay panel visibility event. +@@ -72,6 +74,8 @@ public class BottomControlsCoordinator implements BackPressHandler { * @param constraintsSupplier Used to access current constraints of the browser controls. + * @param readAloudRestoringSupplier Supplier that returns true if Read Aloud is currently + * restoring its player, e.g. after theme change. + * @param topUiThemeColorProvider {@link ThemeColorProvider} for top UI. + * @param tabSupplier Activity tab supplier. */ @SuppressLint("CutPasteId") // Not actually cut and paste since it's View vs ViewGroup. public BottomControlsCoordinator( -@@ -73,7 +77,9 @@ public class BottomControlsCoordinator implements BackPressHandler { - BottomControlsContentDelegate contentDelegate, +@@ -87,7 +91,9 @@ public class BottomControlsCoordinator implements BackPressHandler { TabObscuringHandler tabObscuringHandler, ObservableSupplier overlayPanelVisibilitySupplier, -- ObservableSupplier constraintsSupplier) { -+ ObservableSupplier constraintsSupplier, + ObservableSupplier constraintsSupplier, +- Supplier readAloudRestoringSupplier) { ++ Supplier readAloudRestoringSupplier, + TopUiThemeColorProvider topUiThemeColorProvider, + ObservableSupplier tabSupplier) { + mRootFrameLayout = root; root.setConstraintsSupplier(constraintsSupplier); PropertyModel model = new PropertyModel(BottomControlsProperties.ALL_KEYS); - -@@ -115,7 +121,8 @@ public class BottomControlsCoordinator implements BackPressHandler { - - if (mContentDelegate != null) { - mContentDelegate.initializeWithNative( -- activity, mMediator::setBottomControlsVisible, root::onModelTokenChange); -+ activity, mMediator::setBottomControlsVisible, root::onModelTokenChange, +@@ -146,7 +152,8 @@ public class BottomControlsCoordinator implements BackPressHandler { + mMediator.setBottomControlsColor(color); + } + }, +- root::onModelTokenChange); ++ root::onModelTokenChange, + topUiThemeColorProvider, tabSupplier); } } @@ -2527,7 +2633,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsMediator.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsMediator.java --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsMediator.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsMediator.java -@@ -16,6 +16,7 @@ import org.chromium.chrome.browser.tab.TabObscuringHandler; +@@ -25,6 +25,7 @@ import org.chromium.chrome.browser.ui.edge_to_edge.EdgeToEdgeSupplier.ChangeObse import org.chromium.ui.KeyboardVisibilityDelegate; import org.chromium.ui.base.WindowAndroid; import org.chromium.ui.modelutil.PropertyModel; @@ -2535,7 +2641,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow /** * This class is responsible for reacting to events from the outside world, interacting with other -@@ -108,6 +109,12 @@ class BottomControlsMediator +@@ -148,6 +149,12 @@ class BottomControlsMediator } void setBottomControlsVisible(boolean visible) { @@ -2543,23 +2649,40 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow + && mIsBottomControlsVisible == false + && ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled()) { + // always show the toolbar if the bottom controls are visible, so as not to leave the hole below. -+ mBrowserControlsSizer.getBrowserVisibilityDelegate().showControlsTransient(); ++ mBottomControlsStacker.getBrowserControls().getBrowserVisibilityDelegate().showControlsTransient(); + } mIsBottomControlsVisible = visible; updateCompositedViewVisibility(); updateAndroidViewVisibility(); -@@ -132,6 +139,7 @@ class BottomControlsMediator +@@ -181,6 +188,7 @@ class BottomControlsMediator int bottomOffset, int bottomControlsMinHeightOffset, boolean needsAnimate) { + mModel.set(BottomControlsProperties.TOPCONTROLSMINHEIGHT_OFFSET, topControlsMinHeightOffset); - int minHeight = mBrowserControlsSizer.getBottomControlsMinHeight(); + int minHeight = getBrowserControls().getBottomControlsMinHeight(); mModel.set(BottomControlsProperties.Y_OFFSET, bottomOffset - minHeight); +@@ -296,10 +304,12 @@ class BottomControlsMediator + && !mIsInSwipeLayout + && getBrowserControls().getBottomControlOffset() == 0; + if (visible) { +- // Translate view so that its bottom is aligned with browser controls min height. +- mModel.set( +- BottomControlsProperties.ANDROID_VIEW_TRANSLATE_Y, +- -getBrowserControls().getBottomControlsMinHeight()); ++ if (!ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled()) { ++ // Translate view so that its bottom is aligned with browser controls min height. ++ mModel.set( ++ BottomControlsProperties.ANDROID_VIEW_TRANSLATE_Y, ++ -getBrowserControls().getBottomControlsMinHeight()); ++ } + } + mModel.set(BottomControlsProperties.ANDROID_VIEW_VISIBLE, visible); + } diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsProperties.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsProperties.java --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsProperties.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsProperties.java -@@ -23,6 +23,9 @@ class BottomControlsProperties { +@@ -22,6 +22,9 @@ class BottomControlsProperties { */ static final WritableIntPropertyKey ANDROID_VIEW_TRANSLATE_Y = new WritableIntPropertyKey(); @@ -2569,7 +2692,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow /** Whether the Android view version of the bottom controls component is visible. */ static final WritableBooleanPropertyKey ANDROID_VIEW_VISIBLE = new WritableBooleanPropertyKey(); -@@ -41,6 +44,7 @@ class BottomControlsProperties { +@@ -40,6 +43,7 @@ class BottomControlsProperties { ANDROID_VIEW_TRANSLATE_Y, ANDROID_VIEW_VISIBLE, COMPOSITED_VIEW_VISIBLE, @@ -2581,7 +2704,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsViewBinder.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsViewBinder.java --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsViewBinder.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsViewBinder.java -@@ -42,6 +42,8 @@ class BottomControlsViewBinder { +@@ -53,6 +53,8 @@ class BottomControlsViewBinder { view.sceneLayer.setYOffset(model.get(BottomControlsProperties.Y_OFFSET)); } else if (BottomControlsProperties.ANDROID_VIEW_TRANSLATE_Y == propertyKey) { view.root.setTranslationY(model.get(BottomControlsProperties.ANDROID_VIEW_TRANSLATE_Y)); @@ -2650,7 +2773,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/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 -@@ -60,6 +60,10 @@ import java.lang.annotation.Retention; +@@ -62,6 +62,10 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.function.BooleanSupplier; @@ -2659,18 +2782,17 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow +import androidx.coordinatorlayout.widget.CoordinatorLayout; + /** Layout for the browser controls (omnibox, menu, tab strip, etc..). */ - public class ToolbarControlContainer extends OptimizedFrameLayout implements ControlContainer { - private boolean mIncognito; -@@ -114,6 +118,12 @@ public class ToolbarControlContainer extends OptimizedFrameLayout implements Con - @Override - public void initWithToolbar(int toolbarLayoutId) { - try (TraceEvent te = TraceEvent.scoped("ToolbarControlContainer.initWithToolbar")) { + public class ToolbarControlContainer extends OptimizedFrameLayout + implements ControlContainer, DesktopWindowStateProvider.AppHeaderObserver { +@@ -147,6 +151,11 @@ public class ToolbarControlContainer extends OptimizedFrameLayout + if (view != null) + ((MarginLayoutParams)view.getLayoutParams()).topMargin = tab_strip_height; + } + if (ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled()) { + // the top toolbar is docked at the bottom + CoordinatorLayout.LayoutParams layoutParams = (CoordinatorLayout.LayoutParams)getLayoutParams(); + layoutParams.gravity = Gravity.START | Gravity.BOTTOM; + } -+ mToolbarContainer = (ToolbarViewResourceFrameLayout) findViewById(R.id.toolbar_container); ViewStub toolbarStub = findViewById(R.id.toolbar_stub); @@ -2707,9 +2829,9 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarOverlayProperties.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarOverlayProperties.java --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarOverlayProperties.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarOverlayProperties.java -@@ -46,6 +46,12 @@ public class TopToolbarOverlayProperties { - /** The current y offset of the top toolbar. */ - public static final WritableFloatPropertyKey CONTENT_OFFSET = new WritableFloatPropertyKey(); +@@ -51,6 +51,12 @@ public class TopToolbarOverlayProperties { + public static final WritableObjectPropertyKey TOOLBAR_OFFSET_TAG = + new WritableObjectPropertyKey<>(); + /** The current height of the main visible view. */ + public static final WritableFloatPropertyKey VIEWPORT_HEIGHT = new WritableFloatPropertyKey(); @@ -2720,17 +2842,17 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow public static final PropertyKey[] ALL_KEYS = new PropertyKey[] { ANONYMIZE, -@@ -58,5 +64,5 @@ public class TopToolbarOverlayProperties { - VISIBLE, +@@ -64,5 +70,5 @@ public class TopToolbarOverlayProperties { X_OFFSET, - CONTENT_OFFSET + CONTENT_OFFSET, + TOOLBAR_OFFSET_TAG - }; + , VIEWPORT_HEIGHT, TOOLBAR_HEIGHT}; } diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarSceneLayer.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarSceneLayer.java --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarSceneLayer.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarSceneLayer.java -@@ -14,6 +14,7 @@ import org.chromium.components.browser_ui.widget.ClipDrawableProgressBar.Drawing +@@ -15,6 +15,7 @@ import org.chromium.components.browser_ui.widget.ClipDrawableProgressBar.Drawing import org.chromium.ui.modelutil.PropertyKey; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.resources.ResourceManager; @@ -2738,7 +2860,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow /** A SceneLayer to render the top toolbar. This is the "view" piece of the top toolbar overlay. */ @JNINamespace("android") -@@ -39,6 +40,13 @@ class TopToolbarSceneLayer extends SceneOverlayLayer { +@@ -40,6 +41,13 @@ class TopToolbarSceneLayer extends SceneOverlayLayer { /** Push all information about the texture to native at once. */ private void pushProperties(PropertyModel model) { if (mResourceManagerSupplier.get() == null) return; @@ -2752,7 +2874,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow TopToolbarSceneLayerJni.get() .updateToolbarLayer( mNativePtr, -@@ -49,7 +57,7 @@ class TopToolbarSceneLayer extends SceneOverlayLayer { +@@ -50,7 +58,7 @@ class TopToolbarSceneLayer extends SceneOverlayLayer { model.get(TopToolbarOverlayProperties.URL_BAR_RESOURCE_ID), model.get(TopToolbarOverlayProperties.URL_BAR_COLOR), model.get(TopToolbarOverlayProperties.X_OFFSET), @@ -2760,91 +2882,43 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow + offsetY, model.get(TopToolbarOverlayProperties.SHOW_SHADOW), model.get(TopToolbarOverlayProperties.VISIBLE), - model.get(TopToolbarOverlayProperties.ANONYMIZE)); + model.get(TopToolbarOverlayProperties.ANONYMIZE), diff --git a/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml b/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml --- a/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml +++ b/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml -@@ -54,4 +54,8 @@ found in the LICENSE file. - android:key="captions" - android:title="@string/accessibility_captions_title"/> +@@ -59,4 +59,12 @@ found in the LICENSE file. + android:key="image_descriptions" + android:title="@string/image_descriptions_settings_title" /> + - -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 -@@ -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"; - private TextScalePreference mTextScalePref; - private PageZoomPreference mPageZoomDefaultZoomPref; - private ChromeSwitchPreference mPageZoomIncludeOSAdjustment; -@@ -43,6 +44,7 @@ public class AccessibilitySettings extends PreferenceFragmentCompat - private AccessibilitySettingsDelegate mDelegate; - private BooleanPreferenceDelegate mReaderForAccessibilityDelegate; - private double mPageZoomLatestDefaultZoomPrefValue; -+ private BooleanPreferenceDelegate mMoveTopToolbarToBottomDelegate; - - private FontSizePrefs mFontSizePrefs; - private FontSizePrefsObserver mFontSizePrefsObserver = -@@ -65,6 +67,10 @@ public class AccessibilitySettings extends PreferenceFragmentCompat - mFontSizePrefs = FontSizePrefs.getInstance(delegate.getBrowserContextHandle()); - } - -+ public AccessibilitySettingsDelegate getDelegate() { -+ return mDelegate; -+ } + - @Override - public void onActivityCreated(Bundle savedInstanceState) { - super.onActivityCreated(savedInstanceState); -@@ -137,6 +143,12 @@ public class AccessibilitySettings extends PreferenceFragmentCompat - forceTabletUiPref.setChecked(mForceTabletUIDelegate.isEnabled()); - forceTabletUiPref.setOnPreferenceChangeListener(this); - -+ ChromeSwitchPreference mMoveToolbarToBottomPref = -+ (ChromeSwitchPreference) findPreference(PREF_MOVE_TOOLBAR_TO_BOTTOM); -+ mMoveTopToolbarToBottomDelegate = mDelegate.getMoveTopToolbarToBottomDelegate(); -+ mMoveToolbarToBottomPref.setChecked(mMoveTopToolbarToBottomDelegate.isEnabled()); -+ mMoveToolbarToBottomPref.setOnPreferenceChangeListener(this); ++ + - Preference captions = findPreference(PREF_CAPTIONS); - captions.setOnPreferenceClickListener( - preference -> { -@@ -211,6 +223,9 @@ public class AccessibilitySettings extends PreferenceFragmentCompat - mDelegate.getBrowserContextHandle(), (Integer) newValue); - } else if (PREF_PAGE_ZOOM_ALWAYS_SHOW.equals(preference.getKey())) { - PageZoomUtils.setShouldAlwaysShowZoomMenuItem((Boolean) newValue); -+ } else if (PREF_MOVE_TOOLBAR_TO_BOTTOM.equals(preference.getKey())) { -+ mMoveTopToolbarToBottomDelegate.setEnabled((Boolean) newValue); -+ mDelegate.requestRestart(getActivity()); - } else if (PREF_PAGE_ZOOM_INCLUDE_OS_ADJUSTMENT.equals(preference.getKey())) { - // TODO(mschillaci): Implement the override behavior for OS level. - } + 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 -@@ -6,6 +6,8 @@ package org.chromium.components.browser_ui.accessibility; +@@ -4,6 +4,8 @@ - import android.content.Context; + package org.chromium.components.browser_ui.accessibility; +import android.app.Activity; + - import androidx.annotation.NonNull; - import androidx.preference.PreferenceFragmentCompat; + import org.chromium.content_public.browser.BrowserContextHandle; -@@ -37,6 +39,10 @@ public interface AccessibilitySettingsDelegate { + /** +@@ -32,6 +34,11 @@ public interface AccessibilitySettingsDelegate { void setValue(int value); } + void requestRestart(Activity activity); + + BooleanPreferenceDelegate getMoveTopToolbarToBottomDelegate(); ++ BooleanPreferenceDelegate getDisableToolbarSwipeUpDelegate(); + /** @return The BrowserContextHandle that should be used to read and update settings. */ BrowserContextHandle getBrowserContextHandle(); @@ -2858,9 +2932,9 @@ diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/ #include "base/threading/scoped_blocking_call.h" +#include "cc/base/features.h" #include "cc/base/math_util.h" + #include "cc/input/browser_controls_offset_tags_info.h" #include "cc/slim/layer.h" - #include "components/viz/common/features.h" -@@ -866,6 +867,8 @@ void RenderWidgetHostViewAndroid::OnRenderFrameMetadataChangedBeforeActivation( +@@ -857,6 +858,8 @@ void RenderWidgetHostViewAndroid::OnRenderFrameMetadataChangedBeforeActivation( // factor. Thus, |top_content_offset| in CSS pixels is also in DIPs. float top_content_offset = metadata.top_controls_height * metadata.top_controls_shown_ratio; @@ -2873,7 +2947,7 @@ diff --git a/cromite_flags/chrome/browser/about_flags_cc/Move-navigation-bar-to- new file mode 100644 --- /dev/null +++ b/cromite_flags/chrome/browser/about_flags_cc/Move-navigation-bar-to-bottom.inc -@@ -0,0 +1,12 @@ +@@ -0,0 +1,17 @@ +#if BUILDFLAG(IS_ANDROID) + +#ifdef FLAG_SECTION @@ -2883,6 +2957,11 @@ new file mode 100644 + "Move the top toolbar to the bottom.", kOsAndroid, + FEATURE_VALUE_TYPE(features::kMoveTopToolbarToBottom)}, + ++ {"disable-toolbar-swipe-up", ++ "Disable toolbar swipe up", ++ "Disable toolbar swipe up.", kOsAndroid, ++ FEATURE_VALUE_TYPE(features::kDisableToolbarSwipeUp)}, ++ +#endif + +#endif diff --git a/build/cromite_patches/Move-some-account-settings-back-to-privacy-settings.patch b/build/cromite_patches/Move-some-account-settings-back-to-privacy-settings.patch index 52b48ed2..d220332e 100644 --- a/build/cromite_patches/Move-some-account-settings-back-to-privacy-settings.patch +++ b/build/cromite_patches/Move-some-account-settings-back-to-privacy-settings.patch @@ -14,7 +14,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml --- a/chrome/android/java/res/xml/privacy_preferences.xml +++ b/chrome/android/java/res/xml/privacy_preferences.xml -@@ -66,6 +66,19 @@ found in the LICENSE file. +@@ -82,6 +82,19 @@ found in the LICENSE file. android:key="secure_dns" android:title="@string/settings_secure_dns_title" android:fragment="org.chromium.chrome.browser.privacy.secure_dns.SecureDnsSettings" /> @@ -37,7 +37,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 -@@ -53,6 +53,14 @@ import org.chromium.components.user_prefs.UserPrefs; +@@ -51,6 +51,14 @@ import org.chromium.components.user_prefs.UserPrefs; import org.chromium.ui.text.NoUnderlineClickableSpan; import org.chromium.ui.text.SpanApplier; @@ -51,11 +51,11 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting + /** Fragment to keep track of the all the privacy related preferences. */ public class PrivacySettings extends ChromeBaseSettingsFragment - implements Preference.OnPreferenceChangeListener { -@@ -70,6 +78,16 @@ public class PrivacySettings extends ChromeBaseSettingsFragment + implements Preference.OnPreferenceChangeListener, FragmentSettingsLauncher { +@@ -67,6 +75,16 @@ public class PrivacySettings extends ChromeBaseSettingsFragment + private static final String PREF_INCOGNITO_LOCK = "incognito_lock"; private static final String PREF_THIRD_PARTY_COOKIES = "third_party_cookies"; private static final String PREF_TRACKING_PROTECTION = "tracking_protection"; - + // moved from SyncAndServicesSettings.java + private static final String PREF_SERVICES_CATEGORY = "services_category"; + private static final String PREF_SEARCH_SUGGESTIONS = "search_suggestions"; @@ -66,10 +66,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting + ChromeSharedPreferences.getInstance(); + + private ManagedPreferenceDelegate mManagedPreferenceDelegate; - private IncognitoLockSettings mIncognitoLockSettings; - - @Override -@@ -141,6 +159,16 @@ public class PrivacySettings extends ChromeBaseSettingsFragment + @VisibleForTesting static final String PREF_FP_PROTECTION = "fp_protection"; + @VisibleForTesting static final String PREF_IP_PROTECTION = "ip_protection"; + @VisibleForTesting static final String PREF_CLEAR_BROWSING_DATA = "clear_browsing_data"; +@@ -159,6 +177,16 @@ public class PrivacySettings extends ChromeBaseSettingsFragment setHasOptionsMenu(true); @@ -86,7 +86,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting ChromeSwitchPreference canMakePaymentPref = (ChromeSwitchPreference) findPreference(PREF_CAN_MAKE_PAYMENT); canMakePaymentPref.setOnPreferenceChangeListener(this); -@@ -249,6 +277,9 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -294,6 +322,9 @@ public class PrivacySettings extends ChromeBaseSettingsFragment } else if (PREF_HTTPS_FIRST_MODE.equals(key)) { UserPrefs.get(getProfile()) .setBoolean(Pref.HTTPS_ONLY_MODE_ENABLED, (boolean) newValue); @@ -96,7 +96,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting } return true; } -@@ -261,6 +292,9 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -306,6 +337,9 @@ public class PrivacySettings extends ChromeBaseSettingsFragment /** Updates the preferences. */ public void updatePreferences() { @@ -109,7 +109,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd -@@ -438,6 +438,10 @@ CHAR_LIMIT guidelines: +@@ -450,6 +450,10 @@ For more settings that use data to improve your Chrome experience, go to diff --git a/build/cromite_patches/Multiple-fingerprinting-mitigations.patch b/build/cromite_patches/Multiple-fingerprinting-mitigations.patch index 642e19b9..868f1a15 100644 --- a/build/cromite_patches/Multiple-fingerprinting-mitigations.patch +++ b/build/cromite_patches/Multiple-fingerprinting-mitigations.patch @@ -43,17 +43,17 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../renderer/core/html/canvas/text_metrics.h | 2 + .../renderer/core/svg/svg_graphics_element.cc | 2 + .../core/svg/svg_text_content_element.cc | 28 +++- - .../canvas2d/base_rendering_context_2d.cc | 24 ++- + .../canvas2d/base_rendering_context_2d.cc | 25 ++- third_party/blink/renderer/platform/BUILD.gn | 5 +- .../platform/exported/web_runtime_features.cc | 13 ++ - .../platform/graphics/image_data_buffer.cc | 7 + + .../platform/graphics/image_data_buffer.cc | 8 + .../platform/graphics/static_bitmap_image.cc | 155 ++++++++++++++++++ .../platform/graphics/static_bitmap_image.h | 2 + .../platform/runtime_enabled_features.json5 | 9 + third_party/ungoogled/BUILD.gn | 10 ++ third_party/ungoogled/ungoogled_switches.cc | 18 ++ third_party/ungoogled/ungoogled_switches.h | 18 ++ - 27 files changed, 391 insertions(+), 8 deletions(-) + 27 files changed, 393 insertions(+), 8 deletions(-) create mode 100755 cromite_flags/chrome/browser/about_flags_cc/Multiple-fingerprinting-mitigations.inc create mode 100644 third_party/ungoogled/BUILD.gn create mode 100644 third_party/ungoogled/ungoogled_switches.cc @@ -62,7 +62,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -2517,6 +2517,7 @@ static_library("browser") { +@@ -2555,6 +2555,7 @@ static_library("browser") { "//services/device/public/cpp:device_features", "//services/device/public/cpp/geolocation", "//services/device/public/cpp/usb", @@ -73,7 +73,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -235,6 +235,8 @@ +@@ -239,6 +239,8 @@ #include "ui/ui_features.h" #include "url/url_features.h" @@ -85,14 +85,14 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -250,6 +250,7 @@ source_set("browser") { +@@ -254,6 +254,7 @@ source_set("browser") { "//third_party/libyuv", "//third_party/re2", "//third_party/sqlite", + "//third_party/ungoogled:switches", "//third_party/webrtc_overrides:webrtc_component", "//third_party/zlib", - "//third_party/zlib/google:zip", + "//tools/v8_context_snapshot:buildflags", diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -104,7 +104,7 @@ diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content #if BUILDFLAG(IS_ANDROID) #include "base/android/child_process_binding_types.h" #include "content/browser/android/java_interfaces_impl.h" -@@ -3395,6 +3396,9 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3471,6 +3472,9 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( switches::kDisableBreakpad, switches::kDisableDatabases, switches::kDisableFileSystem, @@ -117,7 +117,7 @@ diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content diff --git a/content/child/BUILD.gn b/content/child/BUILD.gn --- a/content/child/BUILD.gn +++ b/content/child/BUILD.gn -@@ -106,6 +106,7 @@ target(link_target_type, "child") { +@@ -105,6 +105,7 @@ target(link_target_type, "child") { "//third_party/blink/public/common:buildflags", "//third_party/blink/public/strings", "//third_party/ced", @@ -137,7 +137,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features. #if BUILDFLAG(IS_ANDROID) #include "base/android/build_info.h" #endif -@@ -557,6 +559,12 @@ void SetRuntimeFeaturesFromCommandLine(const base::CommandLine& command_line) { +@@ -543,6 +545,12 @@ void SetRuntimeFeaturesFromCommandLine(const base::CommandLine& command_line) { // as a last resort. void SetCustomizedRuntimeFeaturesFromCombinedArgs( const base::CommandLine& command_line) { @@ -195,9 +195,9 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink #include "base/notreached.h" #include "base/ranges/algorithm.h" #include "base/task/single_thread_task_runner.h" -@@ -932,6 +933,17 @@ Document::Document(const DocumentInit& initializer, - : nullptr), - data_(MakeGarbageCollected(GetExecutionContext())) { +@@ -910,6 +911,17 @@ Document::Document(const DocumentInit& initializer, + TRACE_EVENT_WITH_FLOW0("blink", "Document::Document", TRACE_ID_LOCAL(this), + TRACE_EVENT_FLAG_FLOW_OUT); DCHECK(agent_); + if (RuntimeEnabledFeatures::FingerprintingClientRectsNoiseEnabled() || + RuntimeEnabledFeatures::FingerprintingCanvasMeasureTextNoiseEnabled() || @@ -213,7 +213,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink if (base::FeatureList::IsEnabled(features::kDelayAsyncScriptExecution) && features::kDelayAsyncScriptExecutionDelayByDefaultParam.Get()) { script_runner_delayer_->Activate(); -@@ -2479,6 +2491,14 @@ void Document::UpdateStyleAndLayoutTreeForThisDocument() { +@@ -2491,6 +2503,14 @@ void Document::UpdateStyleAndLayoutTreeForThisDocument() { #endif } @@ -231,7 +231,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink diff --git a/third_party/blink/renderer/core/dom/document.h b/third_party/blink/renderer/core/dom/document.h --- a/third_party/blink/renderer/core/dom/document.h +++ b/third_party/blink/renderer/core/dom/document.h -@@ -531,6 +531,10 @@ class CORE_EXPORT Document : public ContainerNode, +@@ -549,6 +549,10 @@ class CORE_EXPORT Document : public ContainerNode, has_xml_declaration_ = has_xml_declaration ? 1 : 0; } @@ -242,7 +242,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.h b/third_party/blink/ AtomicString visibilityState() const; bool IsPageVisible() const; bool hidden() const; -@@ -2510,6 +2514,9 @@ class CORE_EXPORT Document : public ContainerNode, +@@ -2557,6 +2561,9 @@ class CORE_EXPORT Document : public ContainerNode, base::ElapsedTimer start_time_; @@ -255,7 +255,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.h b/third_party/blink/ diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/renderer/core/dom/element.cc --- a/third_party/blink/renderer/core/dom/element.cc +++ b/third_party/blink/renderer/core/dom/element.cc -@@ -2316,6 +2316,7 @@ void Element::ClientQuads(Vector& quads) const { +@@ -2399,6 +2399,7 @@ void Element::ClientQuads(Vector& quads) const { quads.push_back(element_layout_object->LocalToAbsoluteQuad( gfx::QuadF(element_layout_object->ObjectBoundingBox()))); } @@ -263,7 +263,7 @@ diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/ return; } -@@ -2324,6 +2325,10 @@ void Element::ClientQuads(Vector& quads) const { +@@ -2407,6 +2408,10 @@ void Element::ClientQuads(Vector& quads) const { element_layout_object->IsBR()) { element_layout_object->AbsoluteQuads(quads); } @@ -274,7 +274,7 @@ diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/ } DOMRectList* Element::getClientRects() { -@@ -2369,6 +2374,9 @@ gfx::RectF Element::GetBoundingClientRectNoLifecycleUpdate() const { +@@ -2452,6 +2457,9 @@ gfx::RectF Element::GetBoundingClientRectNoLifecycleUpdate() const { DCHECK(element_layout_object); GetDocument().AdjustRectForScrollAndAbsoluteZoom(result, *element_layout_object); @@ -287,7 +287,7 @@ diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/ diff --git a/third_party/blink/renderer/core/dom/range.cc b/third_party/blink/renderer/core/dom/range.cc --- a/third_party/blink/renderer/core/dom/range.cc +++ b/third_party/blink/renderer/core/dom/range.cc -@@ -1624,6 +1624,12 @@ DOMRectList* Range::getClientRects() const { +@@ -1607,6 +1607,12 @@ DOMRectList* Range::getClientRects() const { Vector quads; GetBorderAndTextQuads(quads); @@ -300,7 +300,7 @@ diff --git a/third_party/blink/renderer/core/dom/range.cc b/third_party/blink/re return MakeGarbageCollected(quads); } -@@ -1762,7 +1768,11 @@ gfx::RectF Range::BoundingRect() const { +@@ -1745,7 +1751,11 @@ gfx::RectF Range::BoundingRect() const { // If all rects are empty, return the first rect. if (result.IsEmpty() && !quads.empty()) @@ -338,7 +338,7 @@ diff --git a/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creat diff --git a/third_party/blink/renderer/core/html/canvas/text_metrics.cc b/third_party/blink/renderer/core/html/canvas/text_metrics.cc --- a/third_party/blink/renderer/core/html/canvas/text_metrics.cc +++ b/third_party/blink/renderer/core/html/canvas/text_metrics.cc -@@ -69,6 +69,24 @@ TextMetrics::TextMetrics(const Font& font, +@@ -74,6 +74,24 @@ TextMetrics::TextMetrics(const Font& font, Update(font, direction, baseline, align, text); } @@ -366,7 +366,7 @@ diff --git a/third_party/blink/renderer/core/html/canvas/text_metrics.cc b/third diff --git a/third_party/blink/renderer/core/html/canvas/text_metrics.h b/third_party/blink/renderer/core/html/canvas/text_metrics.h --- a/third_party/blink/renderer/core/html/canvas/text_metrics.h +++ b/third_party/blink/renderer/core/html/canvas/text_metrics.h -@@ -66,6 +66,8 @@ class CORE_EXPORT TextMetrics final : public ScriptWrappable { +@@ -72,6 +72,8 @@ class CORE_EXPORT TextMetrics final : public ScriptWrappable { void Trace(Visitor*) const override; @@ -378,7 +378,7 @@ diff --git a/third_party/blink/renderer/core/html/canvas/text_metrics.h b/third_ diff --git a/third_party/blink/renderer/core/svg/svg_graphics_element.cc b/third_party/blink/renderer/core/svg/svg_graphics_element.cc --- a/third_party/blink/renderer/core/svg/svg_graphics_element.cc +++ b/third_party/blink/renderer/core/svg/svg_graphics_element.cc -@@ -143,6 +143,8 @@ SVGRectTearOff* SVGGraphicsElement::getBBoxFromJavascript() { +@@ -147,6 +147,8 @@ SVGRectTearOff* SVGGraphicsElement::getBBoxFromJavascript() { if (const auto* layout_object = GetLayoutObject()) { bounding_box = GetBBox(); @@ -469,18 +469,19 @@ diff --git a/third_party/blink/renderer/core/svg/svg_text_content_element.cc b/t diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc --- a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc +++ b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc -@@ -75,6 +75,10 @@ - #include "ui/gfx/geometry/quad_f.h" +@@ -184,6 +184,11 @@ + #include "ui/gfx/geometry/size.h" + #include "ui/gfx/geometry/size_f.h" #include "ui/gfx/geometry/skia_conversions.h" - ++ +#include "third_party/blink/renderer/core/offscreencanvas/offscreen_canvas.h" +#include "third_party/blink/renderer/core/frame/local_dom_window.h" +#include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h" + - namespace blink { - - BASE_FEATURE(kDisableCanvasOverdrawOptimization, -@@ -2486,6 +2490,10 @@ ImageData* BaseRenderingContext2D::getImageDataInternal( + #include "ui/gfx/geometry/vector2d.h" + #include "ui/gfx/geometry/vector2d_f.h" + #include "v8/include/v8-local-handle.h" +@@ -2740,6 +2745,10 @@ ImageData* BaseRenderingContext2D::getImageDataInternal( snapshot->PaintImageForCurrentFrame().GetSkImageInfo().bounds(); DCHECK(!bounds.intersect(SkIRect::MakeXYWH(sx, sy, sw, sh))); } @@ -491,7 +492,7 @@ diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_c } return image_data; -@@ -3163,8 +3171,22 @@ TextMetrics* BaseRenderingContext2D::measureText(const String& text) { +@@ -3419,8 +3428,22 @@ TextMetrics* BaseRenderingContext2D::measureText(const String& text) { const CanvasRenderingContext2DState& state = GetState(); TextDirection direction = ToTextDirection(state.GetDirection(), canvas); @@ -518,7 +519,7 @@ diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_c diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn -@@ -1661,7 +1661,9 @@ component("platform") { +@@ -1690,7 +1690,9 @@ component("platform") { "//third_party/blink/renderer:non_test_config", ] @@ -529,7 +530,7 @@ diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/re allow_circular_includes_from = [ "//third_party/blink/renderer/platform/blob", -@@ -1738,6 +1740,7 @@ component("platform") { +@@ -1768,6 +1770,7 @@ component("platform") { "//third_party/blink/public/strings", "//third_party/blink/renderer/platform/wtf", "//third_party/ced", @@ -561,7 +562,7 @@ diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.c diff --git a/third_party/blink/renderer/platform/graphics/image_data_buffer.cc b/third_party/blink/renderer/platform/graphics/image_data_buffer.cc --- a/third_party/blink/renderer/platform/graphics/image_data_buffer.cc +++ b/third_party/blink/renderer/platform/graphics/image_data_buffer.cc -@@ -36,6 +36,8 @@ +@@ -36,8 +36,11 @@ #include "base/compiler_specific.h" #include "base/memory/ptr_util.h" @@ -569,8 +570,11 @@ diff --git a/third_party/blink/renderer/platform/graphics/image_data_buffer.cc b +#include "base/logging.h" #include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h" #include "third_party/blink/renderer/platform/image-encoders/image_encoder.h" - #include "third_party/blink/renderer/platform/runtime_enabled_features.h" -@@ -146,6 +148,11 @@ bool ImageDataBuffer::EncodeImageInternal(const ImageEncodingMimeType mime_type, ++#include "third_party/blink/renderer/platform/runtime_enabled_features.h" + #include "third_party/blink/renderer/platform/wtf/text/base64.h" + #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" + #include "third_party/blink/renderer/platform/wtf/vector.h" +@@ -145,6 +148,11 @@ bool ImageDataBuffer::EncodeImageInternal(const ImageEncodingMimeType mime_type, const SkPixmap& pixmap) const { DCHECK(is_valid_); @@ -774,7 +778,7 @@ diff --git a/third_party/blink/renderer/platform/graphics/static_bitmap_image.h diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 -@@ -2528,6 +2528,15 @@ +@@ -2699,6 +2699,15 @@ status: {"Mac": "test", "default": "stable"}, base_feature: "none", }, diff --git a/build/cromite_patches/Never-fetch-popular-sites.patch b/build/cromite_patches/Never-fetch-popular-sites.patch index 595474e4..8f049101 100644 --- a/build/cromite_patches/Never-fetch-popular-sites.patch +++ b/build/cromite_patches/Never-fetch-popular-sites.patch @@ -18,7 +18,7 @@ diff --git a/components/ntp_tiles/popular_sites_impl.cc b/components/ntp_tiles/p #if BUILDFLAG(IS_IOS) const char kIOSDefaultPopularSitesLocaleUS[] = "https://www.gstatic.com/chrome/ntp/ios/" -@@ -330,7 +329,12 @@ bool PopularSitesImpl::MaybeStartFetch(bool force_download, +@@ -343,7 +342,12 @@ bool PopularSitesImpl::MaybeStartFetch(bool force_download, DCHECK(!callback_); callback_ = std::move(callback); @@ -32,7 +32,7 @@ diff --git a/components/ntp_tiles/popular_sites_impl.cc b/components/ntp_tiles/p prefs_->GetInt64(prefs::kPopularSitesLastDownloadPref)); const base::TimeDelta time_since_last_download = base::Time::Now() - last_download_time; -@@ -347,7 +351,7 @@ bool PopularSitesImpl::MaybeStartFetch(bool force_download, +@@ -360,7 +364,7 @@ bool PopularSitesImpl::MaybeStartFetch(bool force_download, (time_since_last_download > redownload_interval) || url_changed) { FetchPopularSites(); return true; diff --git a/build/cromite_patches/Offer-builtin-autocomplete-for-chrome-flags.patch b/build/cromite_patches/Offer-builtin-autocomplete-for-chrome-flags.patch index 2b6ed21e..0fad235c 100644 --- a/build/cromite_patches/Offer-builtin-autocomplete-for-chrome-flags.patch +++ b/build/cromite_patches/Offer-builtin-autocomplete-for-chrome-flags.patch @@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc --- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc +++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc -@@ -301,6 +301,8 @@ std::vector ChromeAutocompleteProviderClient::GetBuiltinURLs() { +@@ -302,6 +302,8 @@ std::vector ChromeAutocompleteProviderClient::GetBuiltinURLs() { std::vector ChromeAutocompleteProviderClient::GetBuiltinsToProvideAsUserTypes() { std::vector builtins_to_provide; diff --git a/build/cromite_patches/OpenSearch-miscellaneous.patch b/build/cromite_patches/OpenSearch-miscellaneous.patch index be44a33e..bffc7e37 100644 --- a/build/cromite_patches/OpenSearch-miscellaneous.patch +++ b/build/cromite_patches/OpenSearch-miscellaneous.patch @@ -188,7 +188,7 @@ diff --git a/chrome/renderer/chrome_render_frame_observer.cc b/chrome/renderer/c #include "base/metrics/histogram_macros.h" #include "base/no_destructor.h" #include "base/strings/string_number_conversions.h" -@@ -252,6 +253,7 @@ void ChromeRenderFrameObserver::DidFinishLoad() { +@@ -258,6 +259,7 @@ void ChromeRenderFrameObserver::DidFinishLoad() { GURL osdd_url = frame->GetDocument().OpenSearchDescriptionURL(); if (!osdd_url.is_empty()) { @@ -252,7 +252,7 @@ diff --git a/components/search_engines/template_url_parser.cc b/components/searc 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 -@@ -339,7 +339,10 @@ class TemplateURLService final : public WebDataServiceConsumer, +@@ -357,7 +357,10 @@ class TemplateURLService final : public WebDataServiceConsumer, void UpdateProviderFavicons(const GURL& potential_search_url, const GURL& favicon_url); @@ -264,7 +264,7 @@ diff --git a/components/search_engines/template_url_service.h b/components/searc // regardless of |url| if the default search provider is managed by policy or // controlled by an extension. bool CanMakeDefault(const TemplateURL* url) const; -@@ -748,9 +751,6 @@ class TemplateURLService final : public WebDataServiceConsumer, +@@ -766,9 +769,6 @@ class TemplateURLService final : public WebDataServiceConsumer, // SetKeywordSearchTermsForURL is invoked. void UpdateKeywordSearchTermsForURL(const URLVisitedDetails& details); diff --git a/build/cromite_patches/Override-Navigator-Language.patch b/build/cromite_patches/Override-Navigator-Language.patch index 283bc69b..c68b5739 100644 --- a/build/cromite_patches/Override-Navigator-Language.patch +++ b/build/cromite_patches/Override-Navigator-Language.patch @@ -8,9 +8,9 @@ and fix the selection in the UI for the browser language Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - .../browser/language/AppLocaleUtils.java | 20 +++++++++++++++++++ - .../renderer_host/render_process_host_impl.cc | 6 +++++- - 2 files changed, 25 insertions(+), 1 deletion(-) + .../browser/language/AppLocaleUtils.java | 22 ++++++++++++++++++- + .../renderer_host/render_process_host_impl.cc | 6 ++++- + 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/AppLocaleUtils.java b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/AppLocaleUtils.java --- a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/AppLocaleUtils.java @@ -49,18 +49,27 @@ diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browse /** * Gets the first original system locale from {@link LocaleManager}. This is the language that * Chrome would use if there was no override set. If there are no possible UI languages en-US is +@@ -186,7 +206,7 @@ public class AppLocaleUtils { + */ + @ChecksSdkIntAtLeast(api = 33) + public static boolean shouldUseSystemManagedLocale() { +- return Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU; ++ return false; // Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU; + } + + /** diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -69,6 +69,7 @@ - #include "cc/base/switches.h" +@@ -71,6 +71,7 @@ #include "components/discardable_memory/public/mojom/discardable_shared_memory_manager.mojom.h" #include "components/discardable_memory/service/discardable_shared_memory_manager.h" + #include "components/metrics/histogram_controller.h" +#include "components/language/core/browser/language_prefs.h" #include "components/metrics/single_sample_metrics.h" #include "components/services/storage/privileged/mojom/indexed_db_control.mojom.h" #include "components/services/storage/public/cpp/buckets/bucket_id.h" -@@ -3307,8 +3308,11 @@ void RenderProcessHostImpl::AppendRendererCommandLine( +@@ -3380,8 +3381,11 @@ void RenderProcessHostImpl::AppendRendererCommandLine( PropagateBrowserCommandLineToRenderer(browser_command_line, command_line); // Pass on the browser locale. diff --git a/build/cromite_patches/Partition-Blink-memory-cache.patch b/build/cromite_patches/Partition-Blink-memory-cache.patch index b9d519f4..3926fdd5 100644 --- a/build/cromite_patches/Partition-Blink-memory-cache.patch +++ b/build/cromite_patches/Partition-Blink-memory-cache.patch @@ -18,11 +18,11 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../core/inspector/inspector_network_agent.cc | 2 +- .../core/inspector/inspector_page_agent.cc | 4 ++-- .../renderer/core/loader/image_loader.cc | 3 ++- - .../platform/loader/fetch/memory_cache.cc | 7 ++----- - .../platform/loader/fetch/memory_cache.h | 4 ++-- + .../platform/loader/fetch/memory_cache.cc | 8 ++------ + .../platform/loader/fetch/memory_cache.h | 5 ++--- .../platform/loader/fetch/resource_fetcher.cc | 19 +++++++++++++------ .../platform/loader/fetch/resource_fetcher.h | 3 ++- - 8 files changed, 25 insertions(+), 19 deletions(-) + 8 files changed, 25 insertions(+), 21 deletions(-) diff --git a/third_party/blink/renderer/core/html/parser/html_srcset_parser.cc b/third_party/blink/renderer/core/html/parser/html_srcset_parser.cc --- a/third_party/blink/renderer/core/html/parser/html_srcset_parser.cc @@ -39,7 +39,7 @@ diff --git a/third_party/blink/renderer/core/html/parser/html_srcset_parser.cc b diff --git a/third_party/blink/renderer/core/inspector/inspector_network_agent.cc b/third_party/blink/renderer/core/inspector/inspector_network_agent.cc --- a/third_party/blink/renderer/core/inspector/inspector_network_agent.cc +++ b/third_party/blink/renderer/core/inspector/inspector_network_agent.cc -@@ -2387,7 +2387,7 @@ bool InspectorNetworkAgent::FetchResourceContent(Document* document, +@@ -2436,7 +2436,7 @@ bool InspectorNetworkAgent::FetchResourceContent(Document* document, Resource* cached_resource = document->Fetcher()->CachedResource(url); if (!cached_resource) { cached_resource = MemoryCache::Get()->ResourceForURL( @@ -51,7 +51,7 @@ diff --git a/third_party/blink/renderer/core/inspector/inspector_network_agent.c diff --git a/third_party/blink/renderer/core/inspector/inspector_page_agent.cc b/third_party/blink/renderer/core/inspector/inspector_page_agent.cc --- a/third_party/blink/renderer/core/inspector/inspector_page_agent.cc +++ b/third_party/blink/renderer/core/inspector/inspector_page_agent.cc -@@ -168,9 +168,9 @@ Resource* CachedResource(LocalFrame* frame, +@@ -169,9 +169,9 @@ Resource* CachedResource(LocalFrame* frame, if (!document) return nullptr; Resource* cached_resource = document->Fetcher()->CachedResource(url); @@ -66,7 +66,7 @@ diff --git a/third_party/blink/renderer/core/inspector/inspector_page_agent.cc b diff --git a/third_party/blink/renderer/core/loader/image_loader.cc b/third_party/blink/renderer/core/loader/image_loader.cc --- a/third_party/blink/renderer/core/loader/image_loader.cc +++ b/third_party/blink/renderer/core/loader/image_loader.cc -@@ -739,7 +739,8 @@ bool ImageLoader::ShouldLoadImmediately(const KURL& url) const { +@@ -705,7 +705,8 @@ bool ImageLoader::ShouldLoadImmediately(const KURL& url) const { // content when style recalc is over and DOM mutation is allowed again. if (!url.IsNull()) { Resource* resource = MemoryCache::Get()->ResourceForURL( @@ -88,11 +88,12 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/memory_cache.cc b/ return false; const auto resource_maps_it = -@@ -223,12 +223,9 @@ bool MemoryCache::Contains(const Resource* resource) const { +@@ -223,13 +223,9 @@ bool MemoryCache::Contains(const Resource* resource) const { return resource == resources_it->value->GetResource(); } --Resource* MemoryCache::ResourceForURL(const KURL& resource_url) const { +-Resource* MemoryCache::ResourceForURLForTesting( +- const KURL& resource_url) const { - return ResourceForURL(resource_url, DefaultCacheIdentifier()); -} - @@ -105,17 +106,18 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/memory_cache.cc b/ diff --git a/third_party/blink/renderer/platform/loader/fetch/memory_cache.h b/third_party/blink/renderer/platform/loader/fetch/memory_cache.h --- a/third_party/blink/renderer/platform/loader/fetch/memory_cache.h +++ b/third_party/blink/renderer/platform/loader/fetch/memory_cache.h -@@ -119,9 +119,7 @@ class PLATFORM_EXPORT MemoryCache final : public GarbageCollected, - TypeStatistic other; - }; - -- Resource* ResourceForURL(const KURL&) const; +@@ -122,10 +122,7 @@ class PLATFORM_EXPORT MemoryCache final : public GarbageCollected, + // Do not use this method outside test purposes. + // A resourfe URL is not enough to do a correct MemoryCache lookup, and + // relying on the method would likely yield wrong results. +- Resource* ResourceForURLForTesting(const KURL&) const; +- Resource* ResourceForURL(const KURL&, const String& cache_identifier) const; - HeapVector> ResourcesForURL(const KURL&) const; void Add(Resource*); void Remove(Resource*); -@@ -173,6 +171,8 @@ class PLATFORM_EXPORT MemoryCache final : public GarbageCollected, +@@ -177,6 +174,8 @@ class PLATFORM_EXPORT MemoryCache final : public GarbageCollected, base::MemoryPressureListener::MemoryPressureLevel) override; private: @@ -127,7 +129,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/memory_cache.h b/t diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc --- a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc +++ b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc -@@ -826,7 +826,8 @@ Resource* ResourceFetcher::CreateResourceForStaticData( +@@ -963,7 +963,8 @@ Resource* ResourceFetcher::CreateResourceForStaticData( if (!archive_ && factory.GetType() == ResourceType::kRaw) return nullptr; @@ -137,7 +139,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.c // Most off-main-thread resource fetches use Resource::kRaw and don't reach // this point, but off-main-thread module fetches might. if (IsMainThread()) { -@@ -1184,7 +1185,9 @@ Resource* ResourceFetcher::RequestResource(FetchParameters& params, +@@ -1392,7 +1393,9 @@ Resource* ResourceFetcher::RequestResource(FetchParameters& params, resource = nullptr; } else { resource = MemoryCache::Get()->ResourceForURL( @@ -148,7 +150,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.c } if (resource) { policy = DetermineRevalidationPolicy(resource_type, params, *resource, -@@ -1473,7 +1476,8 @@ Resource* ResourceFetcher::CreateResourceForLoading( +@@ -1690,7 +1693,8 @@ Resource* ResourceFetcher::CreateResourceForLoading( const FetchParameters& params, const ResourceFactory& factory) { const String cache_identifier = @@ -158,7 +160,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.c if (!base::FeatureList::IsEnabled( blink::features::kScopeMemoryCachePerContext)) { DCHECK(!IsMainThread() || params.IsStaleRevalidation() || -@@ -2504,10 +2508,13 @@ void ResourceFetcher::UpdateAllImageResourcePriorities() { +@@ -2762,10 +2766,13 @@ void ResourceFetcher::UpdateAllImageResourcePriorities() { to_be_removed.clear(); } @@ -174,7 +176,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.c } // Requests that can be satisfied via `archive_` (i.e. MHTML) or -@@ -2520,7 +2527,7 @@ String ResourceFetcher::GetCacheIdentifier(const KURL& url) const { +@@ -2778,7 +2785,7 @@ String ResourceFetcher::GetCacheIdentifier(const KURL& url) const { if (bundle) return bundle->GetCacheIdentifier(); @@ -186,7 +188,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.c diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h --- a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h +++ b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h -@@ -272,7 +272,8 @@ class PLATFORM_EXPORT ResourceFetcher +@@ -274,7 +274,8 @@ class PLATFORM_EXPORT ResourceFetcher uint32_t inflight_keepalive_bytes); blink::mojom::ControllerServiceWorkerMode IsControlledByServiceWorker() const; diff --git a/build/cromite_patches/Partition-blobs-by-top-frame-URL.patch b/build/cromite_patches/Partition-blobs-by-top-frame-URL.patch index 71760995..ab955788 100644 --- a/build/cromite_patches/Partition-blobs-by-top-frame-URL.patch +++ b/build/cromite_patches/Partition-blobs-by-top-frame-URL.patch @@ -24,13 +24,13 @@ diff --git a/storage/browser/blob/blob_url_store_impl.cc b/storage/browser/blob/ +bool BlobURLStoreImpl::IsSamePartition( + const GURL& blob_url, + const base::UnguessableToken& unsafe_agent_cluster_id, -+ const absl::optional& unsafe_top_level_site) { -+ const absl::optional& top_level_site = ++ const std::optional& unsafe_top_level_site) { ++ const std::optional& top_level_site = + registry_->GetUnsafeTopLevelSite(blob_url); + if (top_level_site.has_value()) + return top_level_site == unsafe_top_level_site; + -+ absl::optional agent_cluster_id = ++ std::optional agent_cluster_id = + registry_->GetUnsafeAgentClusterID(blob_url); + return agent_cluster_id == unsafe_agent_cluster_id; +} @@ -45,14 +45,14 @@ diff --git a/storage/browser/blob/blob_url_store_impl.cc b/storage/browser/blob/ -void BlobURLStoreImpl::Resolve(const GURL& url, ResolveCallback callback) { +void BlobURLStoreImpl::Resolve(const GURL& url, + const base::UnguessableToken& unsafe_agent_cluster_id, -+ const absl::optional& unsafe_top_level_site, ++ const std::optional& unsafe_top_level_site, + ResolveCallback callback) { if (!registry_) { std::move(callback).Run(mojo::NullRemote(), std::nullopt); return; } + if (!IsSamePartition(url, unsafe_agent_cluster_id, unsafe_top_level_site)) { -+ std::move(callback).Run(mojo::NullRemote(), absl::nullopt); ++ std::move(callback).Run(mojo::NullRemote(), std::nullopt); + return; + } mojo::PendingRemote blob = registry_->GetBlobFromUrl(url); @@ -63,7 +63,7 @@ diff --git a/storage/browser/blob/blob_url_store_impl.cc b/storage/browser/blob/ const GURL& url, mojo::PendingReceiver receiver, + const base::UnguessableToken& unsafe_agent_cluster_id, -+ const absl::optional& unsafe_top_level_site, ++ const std::optional& unsafe_top_level_site, ResolveAsURLLoaderFactoryCallback callback) { if (!registry_) { BlobURLLoaderFactory::Create(mojo::NullRemote(), url, std::move(receiver)); @@ -73,7 +73,7 @@ diff --git a/storage/browser/blob/blob_url_store_impl.cc b/storage/browser/blob/ + if (!IsSamePartition(url, unsafe_agent_cluster_id, unsafe_top_level_site)) { + BlobURLLoaderFactory::Create(mojo::NullRemote(), url, std::move(receiver)); -+ std::move(callback).Run(absl::nullopt, absl::nullopt); ++ std::move(callback).Run(std::nullopt, std::nullopt); + return; + } + @@ -85,14 +85,14 @@ diff --git a/storage/browser/blob/blob_url_store_impl.cc b/storage/browser/blob/ const GURL& url, mojo::PendingReceiver token, + const base::UnguessableToken& unsafe_agent_cluster_id, -+ const absl::optional& unsafe_top_level_site, ++ const std::optional& unsafe_top_level_site, ResolveForNavigationCallback callback) { if (!registry_) { std::move(callback).Run(std::nullopt); return; } + if (!IsSamePartition(url, unsafe_agent_cluster_id, unsafe_top_level_site)) { -+ std::move(callback).Run(absl::nullopt); ++ std::move(callback).Run(std::nullopt); + return; + } mojo::PendingRemote blob = registry_->GetBlobFromUrl(url); @@ -108,19 +108,19 @@ diff --git a/storage/browser/blob/blob_url_store_impl.h b/storage/browser/blob/b - void Resolve(const GURL& url, ResolveCallback callback) override; + void Resolve(const GURL& url, + const base::UnguessableToken& unsafe_agent_cluster_id, -+ const absl::optional& unsafe_top_level_site, ++ const std::optional& unsafe_top_level_site, + ResolveCallback callback) override; void ResolveAsURLLoaderFactory( const GURL& url, mojo::PendingReceiver receiver, + const base::UnguessableToken& unsafe_agent_cluster_id, -+ const absl::optional& unsafe_top_level_site, ++ const std::optional& unsafe_top_level_site, ResolveAsURLLoaderFactoryCallback callback) override; void ResolveForNavigation( const GURL& url, mojo::PendingReceiver token, + const base::UnguessableToken& unsafe_agent_cluster_id, -+ const absl::optional& unsafe_top_level_site, ++ const std::optional& unsafe_top_level_site, ResolveForNavigationCallback callback) override; private: @@ -131,7 +131,7 @@ diff --git a/storage/browser/blob/blob_url_store_impl.h b/storage/browser/blob/b + bool IsSamePartition( + const GURL& blob_url, + const base::UnguessableToken& unsafe_agent_cluster_id, -+ const absl::optional& unsafe_top_level_site); ++ const std::optional& unsafe_top_level_site); + const blink::StorageKey storage_key_; @@ -175,13 +175,13 @@ diff --git a/third_party/blink/public/mojom/blob/blob_url_store.mojom b/third_pa diff --git a/third_party/blink/renderer/core/fileapi/public_url_manager.cc b/third_party/blink/renderer/core/fileapi/public_url_manager.cc --- a/third_party/blink/renderer/core/fileapi/public_url_manager.cc +++ b/third_party/blink/renderer/core/fileapi/public_url_manager.cc -@@ -65,6 +65,21 @@ static void RemoveFromNullOriginMapIfNecessary(const KURL& blob_url) { +@@ -63,6 +63,21 @@ static void RemoveFromNullOriginMapIfNecessary(const KURL& blob_url) { BlobURLNullOriginMap::GetInstance()->Remove(blob_url); } -+static absl::optional GetInsecureTopLevelSite( ++static std::optional GetInsecureTopLevelSite( + ExecutionContext* execution_context) { -+ absl::optional top_level_site; ++ std::optional top_level_site; + if (execution_context->IsWindow()) { + auto* window = To(execution_context); + if (window->top() && window->top()->GetFrame()) { @@ -196,8 +196,8 @@ diff --git a/third_party/blink/renderer/core/fileapi/public_url_manager.cc b/thi + } // namespace - // Execution context names corresponding to the entries from -@@ -317,6 +332,7 @@ void PublicURLManager::Resolve( + PublicURLManager::PublicURLManager(ExecutionContext* execution_context) +@@ -278,6 +293,7 @@ void PublicURLManager::Resolve( GetBlobURLStore().ResolveAsURLLoaderFactory( url, std::move(factory_receiver), @@ -205,7 +205,7 @@ diff --git a/third_party/blink/renderer/core/fileapi/public_url_manager.cc b/thi WTF::BindOnce(metrics_callback, WrapPersistent(GetExecutionContext()))); } -@@ -340,6 +356,7 @@ void PublicURLManager::Resolve( +@@ -301,6 +317,7 @@ void PublicURLManager::Resolve( GetBlobURLStore().ResolveForNavigation( url, std::move(token_receiver), diff --git a/build/cromite_patches/Re-introduce-modal-dialog-flag-to-close-all-tabs.patch b/build/cromite_patches/Re-introduce-modal-dialog-flag-to-close-all-tabs.patch index ae9557ce..da2b3cdc 100644 --- a/build/cromite_patches/Re-introduce-modal-dialog-flag-to-close-all-tabs.patch +++ b/build/cromite_patches/Re-introduce-modal-dialog-flag-to-close-all-tabs.patch @@ -45,25 +45,25 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser 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 -@@ -171,6 +171,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { - &kBackGestureActivityTabProvider, +@@ -181,6 +181,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kBackGestureMoveToBackDuringStartup, &kBackGestureRefactorAndroid, + &kBackToHomeAnimation, + &kCloseAllTabsModalDialog, &kBackgroundThreadPool, &kBlockIntentsWhileLocked, - &kCacheActivityTaskID, + &kBottomBrowserControlsRefactor, 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 -@@ -225,6 +225,7 @@ public abstract class ChromeFeatureList { - "CCTPageInsightsHubBetterScroll"; +@@ -257,6 +257,7 @@ public abstract class ChromeFeatureList { + public static final String CCT_PREWARM_TAB = "CCTPrewarmTab"; public static final String CCT_REPORT_PARALLEL_REQUEST_STATUS = "CCTReportParallelRequestStatus"; + public static final String CLOSE_ALL_TABS_MODAL_DIALOG = "CloseAllTabsModalDialog"; public static final String CCT_RESIZABLE_FOR_THIRD_PARTIES = "CCTResizableForThirdParties"; - public static final String CCT_RESIZABLE_SIDE_SHEET = "CCTResizableSideSheet"; - public static final String CCT_RESIZABLE_SIDE_SHEET_FOR_THIRD_PARTIES = + public static final String CCT_REVAMPED_BRANDING = "CCTRevampedBranding"; + public static final String CCT_TAB_MODAL_DIALOG = "CCTTabModalDialog"; diff --git a/cromite_flags/chrome/browser/about_flags_cc/Re-introduce-modal-dialog-flag-to-close-all-tabs.inc b/cromite_flags/chrome/browser/about_flags_cc/Re-introduce-modal-dialog-flag-to-close-all-tabs.inc new file mode 100644 --- /dev/null diff --git a/build/cromite_patches/Re-introduce-override_build_timestamp.patch b/build/cromite_patches/Re-introduce-override_build_timestamp.patch index 229d82a1..11fe0d22 100644 --- a/build/cromite_patches/Re-introduce-override_build_timestamp.patch +++ b/build/cromite_patches/Re-introduce-override_build_timestamp.patch @@ -16,7 +16,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/base/BUILD.gn b/base/BUILD.gn --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -4202,8 +4202,13 @@ action("build_date") { +@@ -4222,8 +4222,13 @@ action("build_date") { args = [ rebase_path("$target_gen_dir/generated_build_date.h", root_build_dir), @@ -34,7 +34,7 @@ diff --git a/base/BUILD.gn b/base/BUILD.gn diff --git a/build_overrides/build.gni b/build_overrides/build.gni --- a/build_overrides/build.gni +++ b/build_overrides/build.gni -@@ -53,6 +53,11 @@ declare_args() { +@@ -45,6 +45,11 @@ declare_args() { # //third_party/robolectric . limit_android_deps = false diff --git a/build/cromite_patches/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch b/build/cromite_patches/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch index 1c745d49..0b0565cc 100644 --- a/build/cromite_patches/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch +++ b/build/cromite_patches/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch @@ -35,7 +35,7 @@ diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc --- a/net/url_request/url_request_http_job.cc +++ b/net/url_request/url_request_http_job.cc -@@ -428,6 +428,7 @@ void URLRequestHttpJob::OnGotFirstPartySetMetadata( +@@ -485,6 +485,7 @@ void URLRequestHttpJob::OnGotFirstPartySetMetadata( // fields in the referrer. GURL referrer(request_->referrer()); @@ -43,7 +43,7 @@ diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_reque // Our consumer should have made sure that this is a safe referrer (e.g. via // URLRequestJob::ComputeReferrerForPolicy). if (referrer.is_valid()) { -@@ -435,11 +436,14 @@ void URLRequestHttpJob::OnGotFirstPartySetMetadata( +@@ -492,11 +493,14 @@ void URLRequestHttpJob::OnGotFirstPartySetMetadata( request_info_.extra_headers.SetHeader(HttpRequestHeaders::kReferer, referer_value); } @@ -58,7 +58,7 @@ diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_reque AddExtraHeaders(); -@@ -682,10 +686,10 @@ void URLRequestHttpJob::StartTransactionInternal() { +@@ -742,10 +746,10 @@ void URLRequestHttpJob::StartTransactionInternal() { void URLRequestHttpJob::AddExtraHeaders() { request_info_.extra_headers.SetAcceptEncodingIfMissing( request()->url(), request()->accepted_stream_types(), diff --git a/build/cromite_patches/Remove-HTTP-referrals-in-cross-origin-navigation.patch b/build/cromite_patches/Remove-HTTP-referrals-in-cross-origin-navigation.patch index 724dc9cd..05a83596 100644 --- a/build/cromite_patches/Remove-HTTP-referrals-in-cross-origin-navigation.patch +++ b/build/cromite_patches/Remove-HTTP-referrals-in-cross-origin-navigation.patch @@ -18,7 +18,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../res/xml/referer_policy_preferences.xml | 31 +++++++ .../privacy/settings/PrivacySettings.java | 6 ++ .../RadioButtonGroupRefererSettings.java | 89 +++++++++++++++++++ - .../settings/RefererSettingsFragment.java | 79 ++++++++++++++++ + .../settings/RefererSettingsFragment.java | 80 +++++++++++++++++ .../api/settings_private/prefs_util.cc | 5 ++ .../net/system_network_context_manager.cc | 4 + chrome/browser/renderer_preferences_util.cc | 1 + @@ -34,7 +34,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../renderer_host/navigation_request.cc | 9 ++ .../network/public/cpp/resource_request.h | 2 +- .../renderer_preferences.h | 1 + - 23 files changed, 371 insertions(+), 1 deletion(-) + 23 files changed, 372 insertions(+), 1 deletion(-) create mode 100644 chrome/android/java/res/layout/radio_button_group_referer_policy_preference.xml create mode 100644 chrome/android/java/res/xml/referer_policy_preferences.xml create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/RadioButtonGroupRefererSettings.java @@ -44,7 +44,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 -@@ -651,6 +651,8 @@ chrome_java_resources = [ +@@ -639,6 +639,8 @@ chrome_java_resources = [ "java/res/xml/phone_as_a_security_key_accessory_filter.xml", "java/res/xml/incognito_preferences.xml", "java/res/xml/privacy_preferences.xml", @@ -52,13 +52,13 @@ diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_ja + "java/res/layout/radio_button_group_referer_policy_preference.xml", "java/res/xml/search_widget_info.xml", "java/res/xml/tracing_preferences.xml", - "java/res/xml/useragent_preferences.xml", + "java/res/xml/unified_account_settings_preferences.xml", diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni --- a/chrome/android/chrome_java_sources.gni +++ b/chrome/android/chrome_java_sources.gni -@@ -990,6 +990,8 @@ chrome_java_sources = [ - "java/src/org/chromium/chrome/browser/privacy_sandbox/ChromeTrackingProtectionDelegate.java", - "java/src/org/chromium/chrome/browser/privacy_sandbox/TrackingProtectionNoticeController.java", +@@ -977,6 +977,8 @@ chrome_java_sources = [ + "java/src/org/chromium/chrome/browser/privacy_sandbox/TrackingProtectionOnboardingView.java", + "java/src/org/chromium/chrome/browser/privacy_sandbox/TrackingProtectionSnackbarController.java", "java/src/org/chromium/chrome/browser/privacy/settings/IncognitoSettings.java", + "java/src/org/chromium/chrome/browser/privacy/settings/RefererSettingsFragment.java", + "java/src/org/chromium/chrome/browser/privacy/settings/RadioButtonGroupRefererSettings.java", @@ -120,7 +120,7 @@ new file mode 100644 diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml --- a/chrome/android/java/res/xml/privacy_preferences.xml +++ b/chrome/android/java/res/xml/privacy_preferences.xml -@@ -91,6 +91,10 @@ found in the LICENSE file. +@@ -107,6 +107,10 @@ found in the LICENSE file. android:title="@string/close_tabs_on_exit_title" android:summary="@string/close_tabs_on_exit_summary" android:defaultValue="false" /> @@ -170,7 +170,7 @@ new file mode 100644 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 -@@ -29,6 +29,7 @@ import org.chromium.chrome.browser.flags.ChromeFeatureList; +@@ -27,6 +27,7 @@ import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.incognito.reauth.IncognitoReauthSettingSwitchPreference; import org.chromium.chrome.browser.preferences.Pref; import org.chromium.chrome.browser.prefetch.settings.PreloadPagesSettingsFragment; @@ -178,7 +178,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting import org.chromium.chrome.browser.privacy.secure_dns.SecureDnsSettings; import org.chromium.chrome.browser.privacy_guide.PrivacyGuideInteractions; import org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxBridge; -@@ -79,6 +80,7 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -77,6 +78,7 @@ public class PrivacySettings extends ChromeBaseSettingsFragment private static final String PREF_DO_NOT_TRACK = "do_not_track"; private static final String PREF_SAFE_BROWSING = "safe_browsing"; private static final String PREF_SYNC_AND_SERVICES_LINK = "sync_and_services_link"; @@ -186,7 +186,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting private static final String PREF_PRIVACY_SANDBOX = "privacy_sandbox"; private static final String PREF_PROXY_OPTIONS = "proxy"; private static final String PREF_PRIVACY_GUIDE = "privacy_guide"; -@@ -384,6 +386,10 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -445,6 +447,10 @@ public class PrivacySettings extends ChromeBaseSettingsFragment : R.string.text_off); } @@ -295,7 +295,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting new file mode 100644 --- /dev/null +++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/RefererSettingsFragment.java -@@ -0,0 +1,79 @@ +@@ -0,0 +1,80 @@ +/* + This file is part of Bromite. + @@ -324,6 +324,7 @@ new file mode 100644 +import org.chromium.chrome.R; +import org.chromium.chrome.browser.preferences.Pref; +import org.chromium.chrome.browser.profiles.Profile; ++import org.chromium.chrome.browser.profiles.ProfileManager; +import org.chromium.components.browser_ui.settings.TextMessagePreference; +import org.chromium.components.browser_ui.settings.SettingsUtils; +import org.chromium.components.prefs.PrefService; @@ -336,10 +337,10 @@ new file mode 100644 + static final String PREF_REFERER_POLICY = "referer_page_radio_button_group"; + + private RadioButtonGroupRefererSettings mRefererPreference; -+ private final PrefService prefService = UserPrefs.get(Profile.getLastUsedRegularProfile()); ++ private final PrefService prefService = UserPrefs.get(ProfileManager.getLastUsedRegularProfile()); + + public static String getRefererSummaryString(Context context) { -+ int policy = UserPrefs.get(Profile.getLastUsedRegularProfile()) ++ int policy = UserPrefs.get(ProfileManager.getLastUsedRegularProfile()) + .getInteger(Pref.REFERRERS_POLICY); + + if (policy == 0) { @@ -368,9 +369,9 @@ new file mode 100644 + + @Override + public boolean onPreferenceChange(Preference preference, Object newValue) { -+ UserPrefs.get(Profile.getLastUsedRegularProfile()) ++ UserPrefs.get(ProfileManager.getLastUsedRegularProfile()) + .setInteger(Pref.REFERRERS_POLICY, (int)newValue); -+ UserPrefs.get(Profile.getLastUsedRegularProfile()) ++ UserPrefs.get(ProfileManager.getLastUsedRegularProfile()) + .setBoolean(Pref.ENABLE_REFERRERS, (int)newValue != 0); + return true; + } @@ -378,7 +379,7 @@ new file mode 100644 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 -@@ -215,6 +215,11 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() { +@@ -214,6 +214,11 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() { (*s_allowlist)[::prefs::kExpireDaysThreshold] = settings_api::PrefType::kNumber; @@ -393,7 +394,7 @@ diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.cc b/chro 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 -@@ -594,6 +594,9 @@ SystemNetworkContextManager::SystemNetworkContextManager( +@@ -596,6 +596,9 @@ SystemNetworkContextManager::SystemNetworkContextManager( base::BindRepeating(&SystemNetworkContextManager::UpdateReferrersEnabled, base::Unretained(this))); @@ -403,7 +404,7 @@ diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/brows pref_change_registrar_.Add( prefs::kExplicitlyAllowedNetworkPorts, base::BindRepeating( -@@ -689,6 +692,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRegistrySimple* registry) { +@@ -687,6 +690,7 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRegistrySimple* registry) { // the system NetworkContext, and the per-profile pref values are used for // the profile NetworkContexts. registry->RegisterBooleanPref(prefs::kEnableReferrers, true); @@ -414,7 +415,7 @@ diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/brows diff --git a/chrome/browser/renderer_preferences_util.cc b/chrome/browser/renderer_preferences_util.cc --- a/chrome/browser/renderer_preferences_util.cc +++ b/chrome/browser/renderer_preferences_util.cc -@@ -110,6 +110,7 @@ void UpdateFromSystemSettings(blink::RendererPreferences* prefs, +@@ -114,6 +114,7 @@ void UpdateFromSystemSettings(blink::RendererPreferences* prefs, prefs->accept_languages = GetLanguageListForProfile( profile, pref_service->GetString(language::prefs::kAcceptLanguages)); prefs->enable_referrers = pref_service->GetBoolean(prefs::kEnableReferrers); @@ -445,7 +446,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 -@@ -97,6 +97,17 @@ export class SettingsPrivacyPageElement extends SettingsPrivacyPageElementBase { +@@ -98,6 +98,17 @@ export class SettingsPrivacyPageElement extends SettingsPrivacyPageElementBase { }, }, @@ -463,7 +464,7 @@ diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.ts b/ch /** * Preferences state. */ -@@ -464,6 +475,12 @@ export class SettingsPrivacyPageElement extends SettingsPrivacyPageElementBase { +@@ -482,6 +493,12 @@ export class SettingsPrivacyPageElement extends SettingsPrivacyPageElementBase { Router.getInstance().navigateTo(routes.TRACKING_PROTECTION); } @@ -479,7 +480,7 @@ diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.ts b/ch 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 -@@ -1017,6 +1017,30 @@ CHAR_LIMIT guidelines: +@@ -1076,6 +1076,30 @@ For more settings that use data to improve your Chrome experience, go to @@ -513,7 +514,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro diff --git a/chrome/browser/ui/prefs/pref_watcher.cc b/chrome/browser/ui/prefs/pref_watcher.cc --- a/chrome/browser/ui/prefs/pref_watcher.cc +++ b/chrome/browser/ui/prefs/pref_watcher.cc -@@ -93,6 +93,8 @@ PrefWatcher::PrefWatcher(Profile* profile) +@@ -95,6 +95,8 @@ PrefWatcher::PrefWatcher(Profile* profile) renderer_callback); profile_pref_change_registrar_.Add(prefs::kEnableReferrers, renderer_callback); @@ -521,23 +522,23 @@ diff --git a/chrome/browser/ui/prefs/pref_watcher.cc b/chrome/browser/ui/prefs/p + renderer_callback); profile_pref_change_registrar_.Add(prefs::kEnableEncryptedMedia, renderer_callback); - profile_pref_change_registrar_.Add(prefs::kWebRTCIPHandlingPolicy, + profile_pref_change_registrar_.Add( diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.cc b/chrome/browser/ui/prefs/prefs_tab_helper.cc --- a/chrome/browser/ui/prefs/prefs_tab_helper.cc +++ b/chrome/browser/ui/prefs/prefs_tab_helper.cc -@@ -365,6 +365,8 @@ void PrefsTabHelper::RegisterProfilePrefs( +@@ -380,6 +380,8 @@ void PrefsTabHelper::RegisterProfilePrefs( registry->RegisterBooleanPref( prefs::kEnableReferrers, !base::FeatureList::IsEnabled(features::kNoReferrers)); + registry->RegisterIntegerPref( + prefs::kReferrersPolicy, 2); // NoCrossOriginReferer registry->RegisterBooleanPref(prefs::kEnableEncryptedMedia, true); - registry->RegisterBooleanPref(prefs::kScrollToTextFragmentEnabled, false); - #if BUILDFLAG(IS_ANDROID) + registry->RegisterStringPref(prefs::kPrefixedVideoFullscreenApiAvailability, + "runtime-enabled"); 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 -@@ -1722,6 +1722,10 @@ void AddPrivacyStrings(content::WebUIDataSource* html_source, +@@ -1819,6 +1819,10 @@ void AddPrivacyStrings(content::WebUIDataSource* html_source, {"dayHistory", IDS_SETTINGS_DAY_HISTORY_DESCRIPTION}, {"daysHistory", IDS_SETTINGS_DAYS_HISTORY_DESCRIPTION}, {"foreverHistory", IDS_SETTINGS_FOREVER_HISTORY_DESCRIPTION}, @@ -551,9 +552,9 @@ diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provide 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 -@@ -1484,6 +1484,9 @@ inline constexpr char kEnableReferrers[] = "enable_referrers"; - inline constexpr char kEnableEncryptedMedia[] = - "webkit.webprefs.encrypted_media_enabled"; +@@ -1536,6 +1536,9 @@ inline constexpr char kEnableEncryptedMedia[] = + inline constexpr char kPrefixedVideoFullscreenApiAvailability[] = + "media.prefixed_fullscreen_video_api_availability"; +// Set referrer policy. +inline constexpr char kReferrersPolicy[] = "referrers_policy"; @@ -614,7 +615,7 @@ diff --git a/components/download/content/internal/context_menu_download.cc b/com 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 -@@ -401,6 +401,15 @@ void AddAdditionalRequestHeaders( +@@ -391,6 +391,15 @@ void AddAdditionalRequestHeaders( blink::mojom::Referrer(GURL(), network::mojom::ReferrerPolicy::kNever); } @@ -633,7 +634,7 @@ diff --git a/content/browser/renderer_host/navigation_request.cc b/content/brows diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h --- a/services/network/public/cpp/resource_request.h +++ b/services/network/public/cpp/resource_request.h -@@ -145,7 +145,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest { +@@ -152,7 +152,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest { std::vector navigation_redirect_chain; GURL referrer; diff --git a/build/cromite_patches/Remove-SMS-integration.patch b/build/cromite_patches/Remove-SMS-integration.patch index b4679fb2..6cd5234b 100644 --- a/build/cromite_patches/Remove-SMS-integration.patch +++ b/build/cromite_patches/Remove-SMS-integration.patch @@ -64,8 +64,8 @@ diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browse - } - /** - * Sets the {@link LocaleManager} App language to |languageName|. - * TODO(crbug.com/1333981) Move to Android T. + * Sets the {@link LocaleManager} App language to |languageName|. TODO(crbug.com/40228013) Move + * to Android T. diff --git a/content/public/android/java/src/org/chromium/content/browser/sms/SmsProviderGms.java b/content/public/android/java/src/org/chromium/content/browser/sms/SmsProviderGms.java --- a/content/public/android/java/src/org/chromium/content/browser/sms/SmsProviderGms.java +++ b/content/public/android/java/src/org/chromium/content/browser/sms/SmsProviderGms.java diff --git a/build/cromite_patches/Remove-binary-blob-integrations.patch b/build/cromite_patches/Remove-binary-blob-integrations.patch index 61034470..4bb3d66d 100644 --- a/build/cromite_patches/Remove-binary-blob-integrations.patch +++ b/build/cromite_patches/Remove-binary-blob-integrations.patch @@ -28,31 +28,32 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html build/android/gyp/proguard.py | 2 + build/config/android/config.gni | 4 +- chrome/android/BUILD.gn | 47 +- - chrome/android/chrome_java_sources.gni | 5 - + chrome/android/chrome_java_sources.gni | 6 - .../features/cablev2_authenticator/BUILD.gn | 2 - chrome/android/java/AndroidManifest.xml | 50 -- .../org/chromium/chrome/browser/AppHooks.java | 1 - .../browser/ChromeBackgroundService.java | 11 +- .../browser/PlayServicesVersionInfo.java | 11 +- - .../ChromeBackgroundTaskFactory.java | 3 - + .../ChromeBackgroundTaskFactory.java | 8 - .../gcore/ChromeGoogleApiClientImpl.java | 25 +- .../browser/gcore/GoogleApiClientHelper.java | 89 +-- .../instantapps/InstantAppsHandler.java | 6 +- - .../browser/omaha/UpdateStatusProvider.java | 2 - .../settings/PasswordSettings.java | 9 - .../modules/chrome_feature_modules.gni | 3 - chrome/browser/language/android/BUILD.gn | 3 - .../language/AppLanguagePromoDialog.java | 31 - .../language/settings/LanguageSettings.java | 6 - + chrome/browser/omaha/android/BUILD.gn | 1 - .../browser/password_manager/android/BUILD.gn | 4 - .../PasswordManagerAndroidBackendUtil.java | 38 +- - .../PasswordManagerHelper.java | 23 +- + .../PasswordManagerHelper.java | 32 +- ...swordSyncControllerDelegateBridgeImpl.java | 7 - .../push_messaging_service_factory.cc | 8 +- chrome/browser/resources/settings/route.ts | 2 - chrome/browser/ui/BUILD.gn | 3 - - .../ui/signin/fre/SigninFirstRunMediator.java | 12 +- - chrome/browser/ui/webauthn/sheet_models.cc | 7 +- + chrome/browser/ui/android/omnibox/BUILD.gn | 4 - + .../FullscreenSigninMediator.java | 12 +- + chrome/browser/ui/webauthn/sheet_models.cc | 9 +- .../webui/chrome_web_ui_controller_factory.cc | 3 - chrome/browser/webauthn/android/BUILD.gn | 1 - .../CableAuthenticatorModuleProvider.java | 35 +- @@ -61,7 +62,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html chrome/test/android/BUILD.gn | 2 - .../ExternalNavigationHandler.java | 8 - components/externalauth/android/BUILD.gn | 3 - - .../externalauth/ExternalAuthUtils.java | 33 +- + .../externalauth/ExternalAuthUtils.java | 34 +- .../UserRecoverableErrorHandler.java | 8 - .../gcm_driver/GoogleCloudMessagingV2.java | 2 + components/gcm_driver/gcm_client_impl.cc | 4 + @@ -78,7 +79,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../media_router/caf/CafMessageHandler.java | 102 +-- .../media_router/caf/CastMediaSource.java | 10 +- .../media_router/caf/CastOptionsProvider.java | 22 +- - .../caf/CastSessionController.java | 84 --- + .../caf/CastSessionController.java | 84 -- .../media_router/caf/CastUtils.java | 8 - .../CafExpandedControllerActivity.java | 35 +- .../CafRemotingMediaRouteProvider.java | 4 +- @@ -90,25 +91,24 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html components/signin/public/android/BUILD.gn | 3 - .../signin/AccountRenameChecker.java | 16 - components/webauthn/android/BUILD.gn | 14 +- - .../webauthn/AuthenticatorImpl.java | 72 -- + .../webauthn/AuthenticatorImpl.java | 66 -- .../webauthn/ConditionalUiState.java | 15 + .../components/webauthn/GmsCoreUtils.java | 21 +- - .../webauthn/WebauthnModeProvider.java | 12 - + .../webauthn/WebauthnModeProvider.java | 13 - .../webauthn/cred_man/CredManHelper.java | 16 +- .../cred_man/CredManMetricsHelper.java | 2 +- .../push_messaging/push_messaging_manager.cc | 2 +- content/public/android/BUILD.gn | 4 - content/test/BUILD.gn | 4 - device/BUILD.gn | 3 - - remoting/android/client_java_tmpl.gni | 3 - services/BUILD.gn | 9 - services/device/geolocation/BUILD.gn | 4 - services/shape_detection/BUILD.gn | 2 - - third_party/android_deps/BUILD.gn | 685 +----------------- + third_party/android_deps/BUILD.gn | 728 +----------------- .../preconditions/javatests/BUILD.gn | 1 - .../gms/ChromiumPlayServicesAvailability.java | 10 +- third_party/cardboard/BUILD.gn | 4 - - 84 files changed, 114 insertions(+), 2174 deletions(-) + 84 files changed, 116 insertions(+), 2228 deletions(-) create mode 100644 components/webauthn/android/java/src/org/chromium/components/webauthn/ConditionalUiState.java diff --git a/android_webview/expectations/system_webview_bundle.AndroidManifest.expected b/android_webview/expectations/system_webview_bundle.AndroidManifest.expected @@ -148,7 +148,7 @@ diff --git a/build/android/gyp/proguard.py b/build/android/gyp/proguard.py diff --git a/build/config/android/config.gni b/build/config/android/config.gni --- a/build/config/android/config.gni +++ b/build/config/android/config.gni -@@ -161,9 +161,7 @@ if (is_android || is_chromeos) { +@@ -170,9 +170,7 @@ if (is_android || is_chromeos) { # google_play_services_package contains the path where individual client # targets (e.g. google_play_services_base_java) are located. @@ -162,9 +162,9 @@ diff --git a/build/config/android/config.gni b/build/config/android/config.gni diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -290,14 +290,6 @@ if (current_toolchain == default_toolchain) { +@@ -326,14 +326,6 @@ if (current_toolchain == default_toolchain) { + ":chrome_public_apk_template_resources", ":google_api_keys_java", - ":update_proto_java", ":usage_stats_proto_java", - "$google_play_services_package:google_play_services_auth_base_java", - "$google_play_services_package:google_play_services_base_java", @@ -177,7 +177,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn "//base/version_info/android:version_constants_java", "//cc:cc_java", "//cc/mojom:mojom_java", -@@ -628,13 +620,23 @@ if (current_toolchain == default_toolchain) { +@@ -689,13 +681,23 @@ if (current_toolchain == default_toolchain) { "//services/shape_detection:shape_detection_java", "//services/shape_detection/public/mojom:mojom_java", "//skia/public/mojom:mojom_java", @@ -203,7 +203,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn "//third_party/android_deps:protobuf_lite_runtime_java", "//third_party/android_media:android_media_java", "//third_party/android_swipe_refresh:android_swipe_refresh_java", -@@ -916,12 +918,6 @@ if (current_toolchain == default_toolchain) { +@@ -972,12 +974,6 @@ if (current_toolchain == default_toolchain) { ":chrome_jni_headers", ":chrome_unit_test_util_java", ":delegate_public_impl_java", @@ -216,7 +216,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn "//base:base_java_test_support", "//base:base_java_test_support_uncommon", "//base:base_junit_test_support", -@@ -1555,13 +1551,6 @@ if (current_toolchain == default_toolchain) { +@@ -1648,13 +1644,6 @@ if (current_toolchain == default_toolchain) { ":chrome_app_java_resources", ":chrome_test_util_java", ":delegate_public_impl_java", @@ -230,7 +230,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn "//base:base_java", "//base:base_java_test_support", "//base:base_java_test_support_uncommon", -@@ -2442,7 +2431,6 @@ if (current_toolchain == default_toolchain) { +@@ -2551,7 +2540,6 @@ if (current_toolchain == default_toolchain) { ] deps = [ ":chrome_java", @@ -238,7 +238,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn "//base:base_java", "//base:base_java_test_support", "//build/android:build_java", -@@ -2536,7 +2524,6 @@ if (current_toolchain == default_toolchain) { +@@ -2653,7 +2641,6 @@ if (current_toolchain == default_toolchain) { # is in a DFM. android_library("base_module_java") { sources = [ @@ -246,7 +246,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn "java/src/org/chromium/chrome/app/TrichromeZygotePreload.java", "java/src/org/chromium/chrome/browser/ChromeBackgroundService.java", "java/src/org/chromium/chrome/browser/ChromeBackupAgent.java", -@@ -2553,8 +2540,6 @@ if (current_toolchain == default_toolchain) { +@@ -2670,8 +2657,6 @@ if (current_toolchain == default_toolchain) { "java/src/org/chromium/chrome/browser/base/SplitCompatBackupAgent.java", "java/src/org/chromium/chrome/browser/base/SplitCompatContentProvider.java", "java/src/org/chromium/chrome/browser/base/SplitCompatCustomTabsService.java", @@ -255,7 +255,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn "java/src/org/chromium/chrome/browser/base/SplitCompatIntentService.java", "java/src/org/chromium/chrome/browser/base/SplitCompatJobService.java", "java/src/org/chromium/chrome/browser/base/SplitCompatMinidumpUploadJobService.java", -@@ -2577,16 +2562,10 @@ if (current_toolchain == default_toolchain) { +@@ -2695,16 +2680,10 @@ if (current_toolchain == default_toolchain) { "java/src/org/chromium/chrome/browser/notifications/NotificationService.java", "java/src/org/chromium/chrome/browser/photo_picker/DecoderService.java", "java/src/org/chromium/chrome/browser/provider/ChromeBrowserProvider.java", @@ -272,7 +272,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn "//base:base_java", "//chrome/browser/download/android:file_provider_java", "//chrome/browser/flags:java", -@@ -2599,7 +2578,6 @@ if (current_toolchain == default_toolchain) { +@@ -2717,7 +2696,6 @@ if (current_toolchain == default_toolchain) { "//components/media_router/browser/android:cast_options_provider_java", "//components/minidump_uploader:minidump_uploader_java", "//components/module_installer/android:module_installer_java", @@ -280,9 +280,9 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn "//third_party/androidx:androidx_annotation_annotation_java", "//third_party/androidx:androidx_collection_collection_java", "//third_party/jni_zero:jni_zero_java", -@@ -2619,7 +2597,6 @@ if (current_toolchain == default_toolchain) { +@@ -2737,7 +2715,6 @@ if (current_toolchain == default_toolchain) { # Deps to pull services into base module. - # TODO(crbug.com/1126301): Consider moving these to the chrome module to + # TODO(crbug.com/40148088): Consider moving these to the chrome module to # reduce base dex size. - "$google_play_services_package:google_play_services_cast_framework_java", "//components/background_task_scheduler:background_task_scheduler_java", @@ -299,13 +299,14 @@ diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java "java/src/org/chromium/chrome/browser/ChromeBackupAgentImpl.java", "java/src/org/chromium/chrome/browser/ChromeBackupWatcher.java", "java/src/org/chromium/chrome/browser/ChromeBaseAppCompatActivity.java", -@@ -1012,10 +1011,6 @@ chrome_java_sources = [ +@@ -1003,11 +1002,6 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/segmentation_platform/ReaderModeActionProvider.java", "java/src/org/chromium/chrome/browser/segmentation_platform/SignalAccumulator.java", "java/src/org/chromium/chrome/browser/selection/ChromeSelectionDropdownMenuDelegate.java", - "java/src/org/chromium/chrome/browser/services/gcm/ChromeGcmListenerServiceImpl.java", - "java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundServiceImpl.java", - "java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundTask.java", +- "java/src/org/chromium/chrome/browser/services/gcm/GCMNativeBackgroundTask.java", - "java/src/org/chromium/chrome/browser/services/gcm/GcmUma.java", "java/src/org/chromium/chrome/browser/settings/MainSettings.java", "java/src/org/chromium/chrome/browser/settings/SettingsActivity.java", @@ -325,7 +326,7 @@ diff --git a/chrome/android/features/cablev2_authenticator/BUILD.gn b/chrome/and diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml --- a/chrome/android/java/AndroidManifest.xml +++ b/chrome/android/java/AndroidManifest.xml -@@ -122,19 +122,14 @@ by a child template that "extends" this file. +@@ -125,19 +125,14 @@ by a child template that "extends" this file. @@ -345,7 +346,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro -@@ -790,16 +785,6 @@ by a child template that "extends" this file. +@@ -775,16 +770,6 @@ by a child template that "extends" this file. @@ -362,7 +363,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro @@ -389,7 +390,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro -@@ -1048,15 +1013,6 @@ by a child template that "extends" this file. +@@ -1033,15 +998,6 @@ by a child template that "extends" this file. @@ -405,7 +406,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro -@@ -1303,12 +1259,6 @@ by a child template that "extends" this file. +@@ -1289,12 +1245,6 @@ by a child template that "extends" this file. {% endif %} @@ -486,20 +487,25 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/PlayServicesVer diff --git a/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java --- a/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java -@@ -14,7 +14,6 @@ import org.chromium.chrome.browser.notifications.NotificationTriggerBackgroundTa - import org.chromium.chrome.browser.notifications.scheduler.NotificationSchedulerTask; +@@ -16,8 +16,6 @@ import org.chromium.chrome.browser.notifications.scheduler.NotificationScheduler import org.chromium.chrome.browser.offlinepages.OfflineBackgroundTask; import org.chromium.chrome.browser.omaha.OmahaService; + import org.chromium.chrome.browser.safety_hub.SafetyHubFetchTask; -import org.chromium.chrome.browser.services.gcm.GCMBackgroundTask; +-import org.chromium.chrome.browser.services.gcm.GCMNativeBackgroundTask; import org.chromium.chrome.browser.webapps.WebApkUpdateTask; import org.chromium.components.background_task_scheduler.BackgroundTask; import org.chromium.components.background_task_scheduler.BackgroundTaskFactory; -@@ -56,8 +55,6 @@ public class ChromeBackgroundTaskFactory implements BackgroundTaskFactory { +@@ -59,12 +57,6 @@ public class ChromeBackgroundTaskFactory implements BackgroundTaskFactory { switch (taskId) { case TaskIds.OMAHA_JOB_ID: return new OmahaService(); - case TaskIds.GCM_BACKGROUND_TASK_JOB_ID: -- return new GCMBackgroundTask(); +- if (ChromeFeatureList.sGcmNativeBackgroundTask.isEnabled()) { +- return new GCMNativeBackgroundTask(); +- } else { +- return new GCMBackgroundTask(); +- } case TaskIds.OFFLINE_PAGES_BACKGROUND_JOB_ID: return new OfflineBackgroundTask(); case TaskIds.DOWNLOAD_SERVICE_JOB_ID: @@ -732,18 +738,6 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/instantapps/Ins + return false; // guard this } } -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 -+++ b/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java -@@ -16,8 +16,6 @@ import androidx.annotation.IntDef; - import androidx.annotation.NonNull; - import androidx.annotation.Nullable; - --import com.google.android.gms.common.GooglePlayServicesUtil; -- - import org.chromium.base.BuildInfo; - import org.chromium.base.Callback; - import org.chromium.base.ObserverList; 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 @@ -755,7 +749,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage private @ManagePasswordsReferrer int mManagePasswordsReferrer; private BottomSheetController mBottomSheetController; -@@ -201,7 +200,6 @@ public class PasswordSettings extends ChromeBaseSettingsFragment +@@ -206,7 +205,6 @@ public class PasswordSettings extends ChromeBaseSettingsFragment @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -763,7 +757,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage computeTrustedVaultBannerState(); } -@@ -306,9 +304,6 @@ public class PasswordSettings extends ChromeBaseSettingsFragment +@@ -311,9 +309,6 @@ public class PasswordSettings extends ChromeBaseSettingsFragment if (shouldShowAutoSigninOption()) { createAutoSignInCheckbox(); } @@ -773,10 +767,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manage if (mTrustedVaultBannerState == TrustedVaultBannerState.OPTED_IN) { createTrustedVaultBanner( -@@ -509,10 +504,6 @@ public class PasswordSettings extends ChromeBaseSettingsFragment +@@ -514,10 +509,6 @@ public class PasswordSettings extends ChromeBaseSettingsFragment // by the system. if (getActivity().isFinishing()) { - PasswordManagerHandlerProvider.getInstance().removeObserver(this); + PasswordManagerHandlerProvider.getForProfile(getProfile()).removeObserver(this); - if (mPasswordCheck != null - && mManagePasswordsReferrer != ManagePasswordsReferrer.CHROME_SETTINGS) { - PasswordCheckFactory.destroy(); @@ -826,7 +820,7 @@ diff --git a/chrome/browser/language/android/BUILD.gn b/chrome/browser/language/ diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/AppLanguagePromoDialog.java b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/AppLanguagePromoDialog.java --- a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/AppLanguagePromoDialog.java +++ b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/AppLanguagePromoDialog.java -@@ -576,12 +576,6 @@ public class AppLanguagePromoDialog { +@@ -585,12 +585,6 @@ public class AppLanguagePromoDialog { mLoadingModal.set(ModalDialogProperties.CUSTOM_VIEW, customView); @@ -839,7 +833,7 @@ diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browse boolean isSelectedCurrentUI = AppLocaleUtils.isAppLanguagePref(selectedLanguage.getCode()); if (!isSelectedCurrentUI) { // Only record isTopLanguage if the app language has changed. -@@ -589,31 +583,6 @@ public class AppLanguagePromoDialog { +@@ -598,31 +592,6 @@ public class AppLanguagePromoDialog { } AndroidLanguageMetricsBridge.reportAppLanguagePromptLanguage( selectedLanguage.isSystemDefault() ? "" : selectedLanguage.getCode()); @@ -894,27 +888,38 @@ diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browse SettingsUtils.addPreferencesFromResource(this, R.xml.languages_detailed_preferences); setupAppLanguageSection(); +diff --git a/chrome/browser/omaha/android/BUILD.gn b/chrome/browser/omaha/android/BUILD.gn +--- a/chrome/browser/omaha/android/BUILD.gn ++++ b/chrome/browser/omaha/android/BUILD.gn +@@ -21,7 +21,6 @@ android_library("java") { + ] + deps = [ + ":update_proto_java", +- "$google_play_services_package:google_play_services_base_java", + "//base:base_cached_flags_java", + "//base:base_java", + "//base:base_shared_preferences_java", diff --git a/chrome/browser/password_manager/android/BUILD.gn b/chrome/browser/password_manager/android/BUILD.gn --- a/chrome/browser/password_manager/android/BUILD.gn +++ b/chrome/browser/password_manager/android/BUILD.gn -@@ -116,8 +116,6 @@ android_library("java") { +@@ -121,8 +121,6 @@ android_library("java") { ":android_backend_java_enums", ":java_resources", ":settings_interface_java", - "$google_play_services_package:google_play_services_base_java", - "$google_play_services_package:google_play_services_basement_java", + "account_storage_notice:java", "//base:base_java", "//build/android:build_java", - "//chrome/browser/device_reauth/android:java", -@@ -246,8 +244,6 @@ robolectric_binary("password_manager_junit_tests") { +@@ -261,8 +259,6 @@ robolectric_binary("password_manager_junit_tests") { ":settings_interface_java", ":test_support_java", ":unified_password_manager_proto_java", - "$google_play_services_package:google_play_services_base_java", - "$google_play_services_package:google_play_services_basement_java", + "account_storage_notice:junit", "add_username_dialog:junit", "pwd_migration:junit", - "//base:base_java", diff --git a/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerAndroidBackendUtil.java b/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerAndroidBackendUtil.java --- a/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerAndroidBackendUtil.java +++ b/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerAndroidBackendUtil.java @@ -986,17 +991,17 @@ diff --git a/chrome/browser/password_manager/android/java/src/org/chromium/chrom diff --git a/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerHelper.java b/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerHelper.java --- a/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerHelper.java +++ b/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerHelper.java -@@ -22,9 +22,6 @@ import androidx.annotation.IntDef; +@@ -21,9 +21,6 @@ import androidx.annotation.IntDef; import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; -import com.google.android.gms.common.GoogleApiAvailability; -import com.google.android.gms.common.api.ApiException; - - import org.chromium.base.Callback; - import org.chromium.base.ContextUtils; - import org.chromium.base.metrics.RecordHistogram; -@@ -404,24 +401,6 @@ public class PasswordManagerHelper { + import org.jni_zero.JniType; + import org.jni_zero.NativeMethods; + +@@ -401,34 +398,9 @@ public class PasswordManagerHelper { } public static void launchGmsUpdate(Context context) { @@ -1013,15 +1018,26 @@ diff --git a/chrome/browser/password_manager/android/java/src/org/chromium/chrom - - // Request for overlay flow, Play Store will fallback to the default - // behaviour if overlay is not available. -- // TODO(crbug.com/1348506): Use AlleyOop v3 overlay UI after fixing Chrome restart +- // TODO(crbug.com/40855336): Use AlleyOop v3 overlay UI after fixing Chrome restart - // during the GMS Core installation. - // intent.putExtra("overlay", true); - -- context.startActivity(intent); +- try { +- context.startActivity(intent); +- } catch (ActivityNotFoundException e) { +- // In case that Google Play Store isn't present on the device, its activity could not +- // have been started. +- // TODO: b/334051261 - Instead of silently failing to open Google Play Store to offer +- // updating GMS Core, either don't offer the option at all or indicate why the update +- // button didn't work. +- } } ++ @VisibleForTesting -@@ -539,7 +518,7 @@ public class PasswordManagerHelper { + void launchTheCredentialManager( + @ManagePasswordsReferrer int referrer, +@@ -540,7 +512,7 @@ public class PasswordManagerHelper { CredentialManagerError.API_ERROR, CredentialManagerError.COUNT); @@ -1075,7 +1091,7 @@ diff --git a/chrome/browser/push_messaging/push_messaging_service_factory.cc b/c diff --git a/chrome/browser/resources/settings/route.ts b/chrome/browser/resources/settings/route.ts --- a/chrome/browser/resources/settings/route.ts +++ b/chrome/browser/resources/settings/route.ts -@@ -60,8 +60,6 @@ function addPrivacyChildRoutes(r: Partial) { +@@ -62,8 +62,6 @@ function addPrivacyChildRoutes(r: Partial) { if (loadTimeData.getBoolean('enableSecurityKeysSubpage')) { r.SECURITY_KEYS = r.SECURITY.createChild('/securityKeys'); @@ -1087,7 +1103,7 @@ diff --git a/chrome/browser/resources/settings/route.ts b/chrome/browser/resourc diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn -@@ -275,8 +275,6 @@ static_library("ui") { +@@ -301,8 +301,6 @@ static_library("ui") { "webui/flags/flags_ui.h", "webui/flags/flags_ui_handler.cc", "webui/flags/flags_ui_handler.h", @@ -1096,70 +1112,100 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn "webui/internals/internals_ui.cc", "webui/internals/internals_ui.h", "webui/interstitials/interstitial_ui.cc", -@@ -518,7 +516,6 @@ static_library("ui") { - "//components/feedback/redaction_tool", +@@ -554,7 +552,6 @@ static_library("ui") { "//components/find_in_page", + "//components/fingerprinting_protection_filter/browser", "//components/flags_ui", - "//components/gcm_driver", "//components/google/core/common", "//components/heap_profiling/multi_process", "//components/history/content/browser", -diff --git a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/fre/SigninFirstRunMediator.java b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/fre/SigninFirstRunMediator.java ---- a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/fre/SigninFirstRunMediator.java -+++ b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/fre/SigninFirstRunMediator.java -@@ -218,17 +218,11 @@ public class SigninFirstRunMediator - boolean isMetricsReportingDisabledByPolicy = false; +diff --git a/chrome/browser/ui/android/omnibox/BUILD.gn b/chrome/browser/ui/android/omnibox/BUILD.gn +--- a/chrome/browser/ui/android/omnibox/BUILD.gn ++++ b/chrome/browser/ui/android/omnibox/BUILD.gn +@@ -155,8 +155,6 @@ android_library("java") { + + deps = [ + ":java_resources", +- "$google_play_services_package:google_play_services_location_java", +- "$google_play_services_package:google_play_services_tasks_java", + "//base:base_java", + "//build/android:build_java", + "//chrome/browser/android/lifecycle:java", +@@ -469,8 +467,6 @@ robolectric_library("junit") { + deps = [ + ":java", + ":java_resources", +- "$google_play_services_package:google_play_services_location_java", +- "$google_play_services_package:google_play_services_tasks_java", + "//base:base_java", + "//base:base_java_test_support", + "//base:base_junit_test_support", +diff --git a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/fullscreen_signin/FullscreenSigninMediator.java b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/fullscreen_signin/FullscreenSigninMediator.java +--- a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/fullscreen_signin/FullscreenSigninMediator.java ++++ b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/fullscreen_signin/FullscreenSigninMediator.java +@@ -224,21 +224,17 @@ public class FullscreenSigninMediator + * also means that native has been initialized. + */ + void onInitialLoadCompleted(boolean hasPolicies) { +- boolean isSigninDisabledByPolicy = false; +- boolean isMetricsReportingDisabledByPolicy = false; ++ boolean isSigninDisabledByPolicy = true; ++ boolean isMetricsReportingDisabledByPolicy = true; Log.i(TAG, "#onInitialLoadCompleted() hasPolicies:" + hasPolicies); + Profile profile = mDelegate.getProfileSupplier().get().getOriginalProfile(); if (hasPolicies) { - isSigninDisabledByPolicy = - IdentityServicesProvider.get() -- .getSigninManager( -- mDelegate.getProfileSupplier().get().getOriginalProfile()) +- .getSigninManager(profile) - .isSigninDisabledByPolicy(); -- Log.i( -- TAG, + isSigninDisabledByPolicy = true; -+ Log.i(TAG, + Log.i( + TAG, "#onInitialLoadCompleted() isSigninDisabledByPolicy:" + isSigninDisabledByPolicy); - isMetricsReportingDisabledByPolicy = - !mPrivacyPreferencesManager.isUsageAndCrashReportingPermittedByPolicy(); + isMetricsReportingDisabledByPolicy = true; - - final FrePolicy frePolicy = new FrePolicy(); - frePolicy.metricsReportingDisabledByPolicy = isMetricsReportingDisabledByPolicy; + mModel.set( + FullscreenSigninProperties.SHOW_ENTERPRISE_MANAGEMENT_NOTICE, + mDelegate.shouldDisplayManagementNoticeOnManagedDevices()); diff --git a/chrome/browser/ui/webauthn/sheet_models.cc b/chrome/browser/ui/webauthn/sheet_models.cc --- a/chrome/browser/ui/webauthn/sheet_models.cc +++ b/chrome/browser/ui/webauthn/sheet_models.cc -@@ -184,12 +184,7 @@ bool AuthenticatorMechanismSelectorSheetModel::IsManageDevicesButtonVisible() +@@ -1605,16 +1605,9 @@ AuthenticatorMultiSourcePickerSheetModel:: + + bool AuthenticatorMultiSourcePickerSheetModel::IsManageDevicesButtonVisible() const { - // If any phones are shown then also show a button that goes to the settings - // page to manage them. +- using Mechanism = AuthenticatorRequestDialogModel::Mechanism; + // If any phones or passkeys from a phone are shown then also show a button + // that goes to the settings page to manage them. - return base::ranges::any_of( -- dialog_model()->mechanisms(), -- [](const AuthenticatorRequestDialogModel::Mechanism& mechanism) { -- return absl::holds_alternative< -- AuthenticatorRequestDialogModel::Mechanism::Phone>(mechanism.type); +- dialog_model()->mechanisms, [](const Mechanism& mech) { +- return absl::holds_alternative(mech.type) || +- (absl::holds_alternative(mech.type) && +- absl::get(mech.type).value().source == +- device::AuthenticatorType::kPhone); - }); + return false; } - void AuthenticatorMechanismSelectorSheetModel::OnManageDevices() { + void AuthenticatorMultiSourcePickerSheetModel::OnManageDevices() { 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 -@@ -37,7 +37,6 @@ - #include "chrome/browser/ui/webui/download_internals/download_internals_ui.h" +@@ -39,7 +39,6 @@ #include "chrome/browser/ui/webui/engagement/site_engagement_ui.h" + #include "chrome/browser/ui/webui/family_link_user_internals/family_link_user_internals_ui.h" #include "chrome/browser/ui/webui/flags/flags_ui.h" -#include "chrome/browser/ui/webui/gcm_internals_ui.h" #include "chrome/browser/ui/webui/internals/internals_ui.h" #include "chrome/browser/ui/webui/interstitials/interstitial_ui.h" #include "chrome/browser/ui/webui/intro/intro_ui.h" -@@ -451,8 +450,6 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, - return &NewWebUI; - if (url.host_piece() == chrome::kChromeUIFlagsHost) - return &NewWebUI; +@@ -433,8 +432,6 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, + return &NewWebUI; + if (url.host_piece() == chrome::kChromeUIDownloadInternalsHost) + return &NewWebUI; - if (url.host_piece() == chrome::kChromeUIGCMInternalsHost) - return &NewWebUI; if (url.host_piece() == chrome::kChromeUIInternalsHost) @@ -1168,10 +1214,10 @@ diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrom diff --git a/chrome/browser/webauthn/android/BUILD.gn b/chrome/browser/webauthn/android/BUILD.gn --- a/chrome/browser/webauthn/android/BUILD.gn +++ b/chrome/browser/webauthn/android/BUILD.gn -@@ -17,7 +17,6 @@ android_library("java") { +@@ -20,7 +20,6 @@ android_library("java") { + deps = [ ":java_resources", - ":jni_headers", - "$google_play_services_package:google_play_services_tasks_java", "//base:base_java", "//build/android:build_java", @@ -1238,9 +1284,9 @@ diff --git a/chrome/browser/webauthn/android/java/src/org/chromium/chrome/browse diff --git a/chrome/browser/webauthn/authenticator_request_dialog_model.cc b/chrome/browser/webauthn/authenticator_request_dialog_model.cc --- a/chrome/browser/webauthn/authenticator_request_dialog_model.cc +++ b/chrome/browser/webauthn/authenticator_request_dialog_model.cc -@@ -2137,10 +2137,6 @@ void AuthenticatorRequestDialogModel::PopulateMechanisms() { - if (cable_ui_type_) { - switch (*cable_ui_type_) { +@@ -2180,10 +2180,6 @@ void AuthenticatorRequestDialogController::PopulateMechanisms() { + if (model_->cable_ui_type) { + switch (*model_->cable_ui_type) { case AuthenticatorRequestDialogModel::CableUIType::CABLE_V2_2ND_FACTOR: - if (base::Contains(transport_availability_.available_transports, - kCable)) { @@ -1252,7 +1298,7 @@ diff --git a/chrome/browser/webauthn/authenticator_request_dialog_model.cc b/chr diff --git a/chrome/browser/webauthn/cablev2_devices.cc b/chrome/browser/webauthn/cablev2_devices.cc --- a/chrome/browser/webauthn/cablev2_devices.cc +++ b/chrome/browser/webauthn/cablev2_devices.cc -@@ -365,6 +365,9 @@ void AddPairing(Profile* profile, std::unique_ptr pairing) { +@@ -366,6 +366,9 @@ void AddPairing(Profile* profile, std::unique_ptr pairing) { // This is called when doing a QR-code pairing with a phone and the phone // sends long-term pairing information during the handshake. The pairing // information is saved in preferences for future operations. @@ -1265,7 +1311,7 @@ diff --git a/chrome/browser/webauthn/cablev2_devices.cc b/chrome/browser/webauth diff --git a/chrome/test/android/BUILD.gn b/chrome/test/android/BUILD.gn --- a/chrome/test/android/BUILD.gn +++ b/chrome/test/android/BUILD.gn -@@ -299,8 +299,6 @@ android_library("chrome_java_integration_test_support") { +@@ -335,8 +335,6 @@ android_library("chrome_java_integration_test_support") { deps = [ ":chrome_java_test_support_common", @@ -1277,7 +1323,7 @@ diff --git a/chrome/test/android/BUILD.gn b/chrome/test/android/BUILD.gn diff --git a/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java b/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java --- a/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java +++ b/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java -@@ -2555,14 +2555,6 @@ public class ExternalNavigationHandler { +@@ -2559,14 +2559,6 @@ public class ExternalNavigationHandler { * @return Whether the given intent is going to open an Instant App. */ private static boolean isIntentToInstantApp(Intent intent) { @@ -1333,7 +1379,7 @@ diff --git a/components/externalauth/android/java/src/org/chromium/components/ex /** * Utility class for external authentication tools. -@@ -168,9 +164,7 @@ public class ExternalAuthUtils { +@@ -169,9 +165,7 @@ public class ExternalAuthUtils { * when it is updating. */ public boolean isGooglePlayServicesMissing(final Context context) { @@ -1344,7 +1390,7 @@ diff --git a/components/externalauth/android/java/src/org/chromium/components/ex } /** -@@ -185,21 +179,6 @@ public class ExternalAuthUtils { +@@ -186,21 +180,6 @@ public class ExternalAuthUtils { * @return true if and only if Google Play Services can be used */ public boolean canUseGooglePlayServices(final UserRecoverableErrorHandler errorHandler) { @@ -1366,11 +1412,12 @@ diff --git a/components/externalauth/android/java/src/org/chromium/components/ex return false; } -@@ -256,11 +235,7 @@ public class ExternalAuthUtils { +@@ -258,12 +237,7 @@ public class ExternalAuthUtils { * @return The code produced by calling the external code */ protected int checkGooglePlayServicesAvailable(final Context context) { -- // TODO(crbug.com/577190): Temporarily allowing disk access until more permanent fix is in. +- // TODO(crbug.com/41233964): Temporarily allowing disk access until more permanent fix is +- // in. - try (StrictModeContext ignored = StrictModeContext.allowDiskWrites(); - TraceEvent e = TraceEvent.scoped("checkGooglePlayServicesAvailable")) { - return ChromiumPlayServicesAvailability.getGooglePlayServicesConnectionResult(context); @@ -1379,7 +1426,7 @@ diff --git a/components/externalauth/android/java/src/org/chromium/components/ex } /** -@@ -271,7 +246,7 @@ public class ExternalAuthUtils { +@@ -274,7 +248,7 @@ public class ExternalAuthUtils { * @return true If the code represents a user-recoverable error */ protected boolean isUserRecoverableError(final int errorCode) { @@ -1388,7 +1435,7 @@ diff --git a/components/externalauth/android/java/src/org/chromium/components/ex } /** -@@ -281,7 +256,7 @@ public class ExternalAuthUtils { +@@ -284,7 +258,7 @@ public class ExternalAuthUtils { * @return a textual description of the error code */ protected String describeError(final int errorCode) { @@ -1445,7 +1492,7 @@ diff --git a/components/gcm_driver/android/java/src/org/chromium/components/gcm_ diff --git a/components/gcm_driver/gcm_client_impl.cc b/components/gcm_driver/gcm_client_impl.cc --- a/components/gcm_driver/gcm_client_impl.cc +++ b/components/gcm_driver/gcm_client_impl.cc -@@ -448,6 +448,7 @@ void GCMClientImpl::StartGCM() { +@@ -449,6 +449,7 @@ void GCMClientImpl::StartGCM() { void GCMClientImpl::InitializeMCSClient() { DCHECK(network_connection_tracker_); @@ -1453,7 +1500,7 @@ diff --git a/components/gcm_driver/gcm_client_impl.cc b/components/gcm_driver/gc std::vector endpoints; endpoints.push_back(gservices_settings_.GetMCSMainEndpoint()); GURL fallback_endpoint = gservices_settings_.GetMCSFallbackEndpoint(); -@@ -641,6 +642,7 @@ void GCMClientImpl::AddHeartbeatInterval(const std::string& scope, +@@ -642,6 +643,7 @@ void GCMClientImpl::AddHeartbeatInterval(const std::string& scope, int interval_ms) { DCHECK(io_task_runner_->RunsTasksInCurrentSequence()); DCHECK(mcs_client_); @@ -1461,7 +1508,7 @@ diff --git a/components/gcm_driver/gcm_client_impl.cc b/components/gcm_driver/gc mcs_client_->AddHeartbeatInterval(scope, interval_ms); } -@@ -652,6 +654,7 @@ void GCMClientImpl::RemoveHeartbeatInterval(const std::string& scope) { +@@ -653,6 +655,7 @@ void GCMClientImpl::RemoveHeartbeatInterval(const std::string& scope) { void GCMClientImpl::StartCheckin() { DCHECK(io_task_runner_->RunsTasksInCurrentSequence()); @@ -1469,7 +1516,7 @@ diff --git a/components/gcm_driver/gcm_client_impl.cc b/components/gcm_driver/gc // Make sure no checkin is in progress. if (checkin_request_) -@@ -730,6 +733,7 @@ void GCMClientImpl::SetGServicesSettingsCallback(bool success) { +@@ -731,6 +734,7 @@ void GCMClientImpl::SetGServicesSettingsCallback(bool success) { void GCMClientImpl::SchedulePeriodicCheckin() { DCHECK(io_task_runner_->RunsTasksInCurrentSequence()); @@ -1537,7 +1584,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com @Override protected String doBackgroundWork() { - try { -- // TODO(crbug.com/1247170): Migrate stored LazySubscriptionsManager data to +- // TODO(crbug.com/40789764): Migrate stored LazySubscriptionsManager data to - // SubscriptionFlagManager. - LazySubscriptionsManager.storeLazinessInformation( - LazySubscriptionsManager.buildSubscriptionUniqueId( @@ -3104,7 +3151,7 @@ diff --git a/components/signin/public/android/BUILD.gn b/components/signin/publi "//base:base_java", "//build/android:build_java", "//components/externalauth/android:java", -@@ -188,7 +186,6 @@ robolectric_library("junit") { +@@ -189,7 +187,6 @@ robolectric_library("junit") { deps = [ ":java", ":signin_java_test_support", @@ -3156,8 +3203,8 @@ diff --git a/components/webauthn/android/BUILD.gn b/components/webauthn/android/ - "java/src/org/chromium/components/webauthn/Fido2CredentialRequest.java", "java/src/org/chromium/components/webauthn/InternalAuthenticator.java", "java/src/org/chromium/components/webauthn/WebauthnBrowserBridge.java", - "java/src/org/chromium/components/webauthn/cred_man/CredManSupportProvider.java", -@@ -30,11 +28,7 @@ android_library("java") { + "java/src/org/chromium/components/webauthn/WebauthnModeProvider.java", +@@ -35,11 +33,7 @@ android_library("java") { "java/src/org/chromium/components/webauthn/AuthenticatorImpl.java", "java/src/org/chromium/components/webauthn/Barrier.java", "java/src/org/chromium/components/webauthn/CreateConfirmationUiDelegate.java", @@ -3170,8 +3217,8 @@ diff --git a/components/webauthn/android/BUILD.gn b/components/webauthn/android/ "java/src/org/chromium/components/webauthn/FidoIntentSender.java", "java/src/org/chromium/components/webauthn/GetAssertionResponseCallback.java", "java/src/org/chromium/components/webauthn/GetMatchingCredentialIdsResponseCallback.java", -@@ -60,9 +54,6 @@ android_library("java") { - jar_excluded_patterns = [ "*/cred_man/CredManUiModeRecommender.class" ] +@@ -65,9 +59,6 @@ android_library("java") { + ] deps = [ - "$google_play_services_package:google_play_services_base_java", @@ -3180,7 +3227,7 @@ diff --git a/components/webauthn/android/BUILD.gn b/components/webauthn/android/ "//base:base_java", "//base/version_info/android:version_constants_java", "//build/android:build_java", -@@ -119,8 +110,6 @@ android_library("test_support_java") { +@@ -120,8 +111,6 @@ android_library("test_support_java") { source_set("android") { sources = [ "cred_man_support.h", @@ -3189,8 +3236,8 @@ diff --git a/components/webauthn/android/BUILD.gn b/components/webauthn/android/ "internal_authenticator_android.cc", "internal_authenticator_android.h", "webauthn_browser_bridge.cc", -@@ -187,7 +176,6 @@ robolectric_library("junit") { - ":delegate_public_java", +@@ -190,7 +179,6 @@ robolectric_library("junit") { + deps = [ ":java", ":test_support_java", - "$google_play_services_package:google_play_services_tasks_java", @@ -3200,7 +3247,7 @@ diff --git a/components/webauthn/android/BUILD.gn b/components/webauthn/android/ diff --git a/components/webauthn/android/java/src/org/chromium/components/webauthn/AuthenticatorImpl.java b/components/webauthn/android/java/src/org/chromium/components/webauthn/AuthenticatorImpl.java --- a/components/webauthn/android/java/src/org/chromium/components/webauthn/AuthenticatorImpl.java +++ b/components/webauthn/android/java/src/org/chromium/components/webauthn/AuthenticatorImpl.java -@@ -67,14 +67,6 @@ public final class AuthenticatorImpl implements Authenticator { +@@ -71,14 +71,6 @@ public final class AuthenticatorImpl implements Authenticator, AuthenticationCon // Similar to the above, but for pending isConditionalMediationAvailable request callbacks. private Queue mIsConditionalMediationAvailableCallbackQueue = new LinkedList<>(); @@ -3215,7 +3262,7 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut /** * Builds the Authenticator service implementation. -@@ -104,19 +96,6 @@ public final class AuthenticatorImpl implements Authenticator { +@@ -110,19 +102,6 @@ public final class AuthenticatorImpl implements Authenticator, AuthenticationCon mCreateConfirmationUiDelegate = createConfirmationUiDelegate; } @@ -3227,7 +3274,7 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut - if (sFido2CredentialRequestOverrideForTesting != null) { - return sFido2CredentialRequestOverrideForTesting; - } -- Fido2CredentialRequest request = new Fido2CredentialRequest(mIntentSender); +- Fido2CredentialRequest request = new Fido2CredentialRequest(this); - mUnclosedFido2CredentialRequests.add(request); - return request; - } @@ -3235,42 +3282,39 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut /** * Called by InternalAuthenticatorAndroid, which facilitates WebAuthn for processes that * originate from the browser process. Since the request is from the browser process, the -@@ -163,15 +142,6 @@ public final class AuthenticatorImpl implements Authenticator { +@@ -169,14 +148,6 @@ public final class AuthenticatorImpl implements Authenticator, AuthenticationCon private void continueMakeCredential( PublicKeyCredentialCreationOptions options, MakeCredential_Response callback) { - mPendingFido2CredentialRequest = getFido2CredentialRequest(); - mPendingFido2CredentialRequest.handleMakeCredentialRequest( -- mContext, - options, -- mRenderFrameHost, - /* maybeClientDataHash= */ null, +- maybeCreateBrowserOptions(), - mOrigin, -- (status, response) -> onRegisterResponse(status, response), -- status -> onError(status)); +- this::onRegisterResponse, +- this::onError); } - @Override -@@ -190,18 +160,6 @@ public final class AuthenticatorImpl implements Authenticator { + private @Nullable Bundle maybeCreateBrowserOptions() { +@@ -204,16 +175,6 @@ public final class AuthenticatorImpl implements Authenticator, AuthenticationCon onError(AuthenticatorStatus.NOT_IMPLEMENTED); return; } - - mPendingFido2CredentialRequest = getFido2CredentialRequest(); - mPendingFido2CredentialRequest.handleGetAssertionRequest( -- mContext, - options, -- mRenderFrameHost, - /* maybeClientDataHash= */ null, - mOrigin, - mTopOrigin, - mPayment, -- (status, response) -> onSignResponse(status, response), -- status -> onError(status)); +- this::onSignResponse, +- this::onError); } @Override -@@ -218,13 +176,6 @@ public final class AuthenticatorImpl implements Authenticator { +@@ -231,11 +192,6 @@ public final class AuthenticatorImpl implements Authenticator, AuthenticationCon decoratedCallback.call(false); return; } @@ -3278,29 +3322,26 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut - mIsUserVerifyingPlatformAuthenticatorAvailableCallbackQueue.add(decoratedCallback); - getFido2CredentialRequest() - .handleIsUserVerifyingPlatformAuthenticatorAvailableRequest( -- mContext, -- isUvpaa -> -- onIsUserVerifyingPlatformAuthenticatorAvailableResponse(isUvpaa)); +- this::onIsUserVerifyingPlatformAuthenticatorAvailableResponse); } /** -@@ -245,15 +196,6 @@ public final class AuthenticatorImpl implements Authenticator { +@@ -256,14 +212,6 @@ public final class AuthenticatorImpl implements Authenticator, AuthenticationCon callback.onResponse(new ArrayList()); return; } - - getFido2CredentialRequest() - .handleGetMatchingCredentialIdsRequest( -- mRenderFrameHost, - relyingPartyId, - credentialIds, - requireThirdPartyPayment, - callback, -- status -> onError(status)); +- this::onError); } @Override -@@ -265,14 +207,6 @@ public final class AuthenticatorImpl implements Authenticator { +@@ -275,14 +223,6 @@ public final class AuthenticatorImpl implements Authenticator, AuthenticationCon callback.call(false); return; } @@ -3311,20 +3352,20 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut - mIsConditionalMediationAvailableCallbackQueue.add(callback); - getFido2CredentialRequest() - .handleIsUserVerifyingPlatformAuthenticatorAvailableRequest( -- mContext, isUvpaa -> onIsConditionalMediationAvailableResponse(isUvpaa)); +- this::onIsConditionalMediationAvailableResponse); } @Override -@@ -284,8 +218,6 @@ public final class AuthenticatorImpl implements Authenticator { +@@ -294,8 +234,6 @@ public final class AuthenticatorImpl implements Authenticator, AuthenticationCon if (!mIsOperationPending || mGetAssertionCallback == null) { return; } - -- mPendingFido2CredentialRequest.cancelConditionalGetAssertion(mRenderFrameHost); +- mPendingFido2CredentialRequest.cancelConditionalGetAssertion(); } /** Callbacks for receiving responses from the internal handlers. */ -@@ -330,7 +262,6 @@ public final class AuthenticatorImpl implements Authenticator { +@@ -340,7 +278,6 @@ public final class AuthenticatorImpl implements Authenticator, AuthenticationCon } else if (mGetAssertionCallback != null) { mGetAssertionCallback.call(status, null, null); } @@ -3332,7 +3373,7 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut cleanupRequest(); } -@@ -338,13 +269,10 @@ public final class AuthenticatorImpl implements Authenticator { +@@ -348,13 +285,10 @@ public final class AuthenticatorImpl implements Authenticator, AuthenticationCon mIsOperationPending = false; mMakeCredentialCallback = null; mGetAssertionCallback = null; @@ -3419,38 +3460,39 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut diff --git a/components/webauthn/android/java/src/org/chromium/components/webauthn/WebauthnModeProvider.java b/components/webauthn/android/java/src/org/chromium/components/webauthn/WebauthnModeProvider.java --- a/components/webauthn/android/java/src/org/chromium/components/webauthn/WebauthnModeProvider.java +++ b/components/webauthn/android/java/src/org/chromium/components/webauthn/WebauthnModeProvider.java -@@ -6,7 +6,6 @@ package org.chromium.components.webauthn; - - import androidx.annotation.IntDef; +@@ -7,7 +7,6 @@ package org.chromium.components.webauthn; + import org.jni_zero.JNINamespace; + import org.jni_zero.NativeMethods; -import org.chromium.components.webauthn.Fido2ApiCall.Fido2ApiCallParams; import org.chromium.components.webauthn.cred_man.AppCredManRequestDecorator; import org.chromium.components.webauthn.cred_man.BrowserCredManRequestDecorator; import org.chromium.components.webauthn.cred_man.CredManRequestDecorator; -@@ -37,17 +36,6 @@ public class WebauthnModeProvider { +@@ -47,18 +46,6 @@ public class WebauthnModeProvider { return null; } -- public Fido2ApiCallParams getFido2ApiCallParams() { -- if (mMode == WebauthnMode.APP) { +- public Fido2ApiCallParams getFido2ApiCallParams(WebContents webContents) { +- int mode = getWebauthnMode(webContents); +- if (mode == WebauthnMode.APP) { - return Fido2ApiCall.APP_API; -- } else if (mMode == WebauthnMode.BROWSER || mMode == WebauthnMode.CHROME) { +- } else if (mode == WebauthnMode.BROWSER || mode == WebauthnMode.CHROME) { - return Fido2ApiCall.BROWSER_API; - } else { -- assert false : "WebauthnMode not set! Please set using WebAuthnModeProvider.setMode()"; +- assert false : "WebauthnMode not set! See this class's JavaDoc."; - } - return null; - } - - public @WebauthnMode int getWebauthnMode() { - return mMode; - } + public @WebauthnMode int getWebauthnMode(WebContents webContents) { + if (mGlobalMode != WebauthnMode.NONE) return mGlobalMode; + return WebauthnModeProviderJni.get().getWebauthnModeForWebContents(webContents); diff --git a/components/webauthn/android/java/src/org/chromium/components/webauthn/cred_man/CredManHelper.java b/components/webauthn/android/java/src/org/chromium/components/webauthn/cred_man/CredManHelper.java --- a/components/webauthn/android/java/src/org/chromium/components/webauthn/cred_man/CredManHelper.java +++ b/components/webauthn/android/java/src/org/chromium/components/webauthn/cred_man/CredManHelper.java -@@ -29,8 +29,7 @@ import org.chromium.blink.mojom.MakeCredentialAuthenticatorResponse; - import org.chromium.blink.mojom.PublicKeyCredentialCreationOptions; +@@ -32,8 +32,7 @@ import org.chromium.blink.mojom.PublicKeyCredentialCreationOptions; import org.chromium.blink.mojom.PublicKeyCredentialRequestOptions; + import org.chromium.components.webauthn.AuthenticationContextProvider; import org.chromium.components.webauthn.Barrier; -import org.chromium.components.webauthn.Fido2CredentialRequest.ConditionalUiState; -import org.chromium.components.webauthn.Fido2CredentialRequestJni; @@ -3458,17 +3500,17 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut import org.chromium.components.webauthn.GetAssertionResponseCallback; import org.chromium.components.webauthn.MakeCredentialResponseCallback; import org.chromium.components.webauthn.WebauthnBrowserBridge; -@@ -93,8 +92,7 @@ public class CredManHelper { +@@ -96,8 +95,7 @@ public class CredManHelper { + byte[] maybeClientDataHash, + MakeCredentialResponseCallback makeCallback, Callback errorCallback) { - mContext = context; - mFrameHost = frameHost; - final String requestAsJson = - Fido2CredentialRequestJni.get().createOptionsToJson(options.serialize()); + final String requestAsJson = ""; final byte[] clientDataHash = maybeClientDataHash != null ? maybeClientDataHash -@@ -148,9 +146,7 @@ public class CredManHelper { +@@ -151,9 +149,7 @@ public class CredManHelper { String json = data.getString( CRED_MAN_PREFIX + "BUNDLE_KEY_REGISTRATION_RESPONSE_JSON"); @@ -3479,7 +3521,7 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut if (responseSerialized == null) { Log.e( TAG, -@@ -418,8 +414,7 @@ public class CredManHelper { +@@ -416,8 +412,7 @@ public class CredManHelper { data.getString( CRED_MAN_PREFIX + "BUNDLE_KEY_AUTHENTICATION_RESPONSE_JSON"); @@ -3489,7 +3531,7 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut if (responseSerialized == null) { Log.e( TAG, -@@ -584,8 +579,7 @@ public class CredManHelper { +@@ -597,8 +592,7 @@ public class CredManHelper { boolean requestPasswords, boolean preferImmediatelyAvailable, boolean ignoreGpm) { @@ -3514,7 +3556,7 @@ diff --git a/components/webauthn/android/java/src/org/chromium/components/webaut diff --git a/content/browser/push_messaging/push_messaging_manager.cc b/content/browser/push_messaging/push_messaging_manager.cc --- a/content/browser/push_messaging/push_messaging_manager.cc +++ b/content/browser/push_messaging/push_messaging_manager.cc -@@ -802,7 +802,7 @@ void PushMessagingManager::GetSubscriptionInfo( +@@ -803,7 +803,7 @@ void PushMessagingManager::GetSubscriptionInfo( } PushMessagingService* PushMessagingManager::GetService() { @@ -3526,10 +3568,10 @@ diff --git a/content/browser/push_messaging/push_messaging_manager.cc b/content/ diff --git a/content/public/android/BUILD.gn b/content/public/android/BUILD.gn --- a/content/public/android/BUILD.gn +++ b/content/public/android/BUILD.gn -@@ -144,10 +144,6 @@ android_library("content_full_java") { - deps = [ +@@ -150,10 +150,6 @@ android_library("content_full_java") { ":content_java_resources", ":content_main_dex_java", + ":content_util_java", - "$google_play_services_package:google_play_services_auth_api_phone_java", - "$google_play_services_package:google_play_services_base_java", - "$google_play_services_package:google_play_services_basement_java", @@ -3540,7 +3582,7 @@ diff --git a/content/public/android/BUILD.gn b/content/public/android/BUILD.gn diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn -@@ -3471,10 +3471,6 @@ if (is_android) { +@@ -3551,10 +3551,6 @@ if (is_android) { testonly = true sources = content_java_sources_needing_jni deps = [ @@ -3554,7 +3596,7 @@ diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn diff --git a/device/BUILD.gn b/device/BUILD.gn --- a/device/BUILD.gn +++ b/device/BUILD.gn -@@ -510,9 +510,6 @@ if (is_android) { +@@ -529,9 +529,6 @@ if (is_android) { "gamepad/android/junit/src/org/chromium/device/gamepad/GamepadMappingsTest.java", ] deps = [ @@ -3564,23 +3606,10 @@ diff --git a/device/BUILD.gn b/device/BUILD.gn "//base:base_java_test_support", "//base:base_junit_test_support", "//device/gamepad:java", -diff --git a/remoting/android/client_java_tmpl.gni b/remoting/android/client_java_tmpl.gni ---- a/remoting/android/client_java_tmpl.gni -+++ b/remoting/android/client_java_tmpl.gni -@@ -105,9 +105,6 @@ template("remoting_android_client_java_tmpl") { - - if (defined(invoker.play_services_package)) { - deps += [ -- "${invoker.play_services_package}:google_play_services_auth_base_java", -- "${invoker.play_services_package}:google_play_services_base_java", -- "${invoker.play_services_package}:google_play_services_basement_java", - ] - } - diff --git a/services/BUILD.gn b/services/BUILD.gn --- a/services/BUILD.gn +++ b/services/BUILD.gn -@@ -123,11 +123,6 @@ if (is_android) { +@@ -144,11 +144,6 @@ if (is_android) { "shape_detection/android/junit/src/org/chromium/shape_detection/BitmapUtilsTest.java", ] deps = [ @@ -3592,7 +3621,7 @@ diff --git a/services/BUILD.gn b/services/BUILD.gn "//base:base_java", "//base:base_java_test_support", "//base:base_junit_test_support", -@@ -157,10 +152,6 @@ if (is_android) { +@@ -178,10 +173,6 @@ if (is_android) { "shape_detection/android/javatests/src/org/chromium/shape_detection/TextDetectionImplTest.java", ] deps = [ @@ -3632,7 +3661,7 @@ diff --git a/services/shape_detection/BUILD.gn b/services/shape_detection/BUILD. diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.gn --- a/third_party/android_deps/BUILD.gn +++ b/third_party/android_deps/BUILD.gn -@@ -83,22 +83,13 @@ if (!limit_android_deps) { +@@ -90,22 +90,13 @@ if (!limit_android_deps) { android_library("chromium_play_services_availability_java") { sources = [ "util/org/chromium/gms/ChromiumPlayServicesAvailability.java" ] @@ -3656,7 +3685,37 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD. } # TODO(crbug.com/1366370) Remove this once all depencencies are updated to -@@ -777,255 +768,6 @@ if (!limit_android_deps) { +@@ -737,29 +728,6 @@ if (!limit_android_deps) { + ] + } + +- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. +- android_aar_prebuilt("com_android_support_support_core_ui_java") { +- aar_path = +- "libs/com_android_support_support_core_ui/support-core-ui-28.0.0.aar" +- info_path = "libs/com_android_support_support_core_ui/com_android_support_support_core_ui.info" +- enable_bytecode_checks = false +- deps = [ +- ":com_android_support_asynclayoutinflater_java", +- ":com_android_support_coordinatorlayout_java", +- ":com_android_support_cursoradapter_java", +- ":com_android_support_customview_java", +- ":com_android_support_drawerlayout_java", +- ":com_android_support_interpolator_java", +- ":com_android_support_slidingpanelayout_java", +- ":com_android_support_support_annotations_java", +- ":com_android_support_support_compat_java", +- ":com_android_support_support_core_utils_java", +- ":com_android_support_swiperefreshlayout_java", +- ":com_android_support_viewpager_java", +- ] +- resource_overlay = true +- } +- + # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. + android_aar_prebuilt( + "com_google_android_apps_common_testing_accessibility_framework_accessibility_test_framework_java") { +@@ -781,237 +749,6 @@ if (!limit_android_deps) { ] } @@ -3839,13 +3898,12 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD. - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. - if (google_play_services_package == "//third_party/android_deps") { - android_aar_prebuilt("google_play_services_location_java") { -- aar_path = "libs/com_google_android_gms_play_services_location/play-services-location-19.0.1.aar" +- aar_path = "libs/com_google_android_gms_play_services_location/play-services-location-21.0.1.aar" - info_path = "libs/com_google_android_gms_play_services_location/com_google_android_gms_play_services_location.info" - enable_bytecode_checks = false - deps = [ - "$google_play_services_package:google_play_services_base_java", - "$google_play_services_package:google_play_services_basement_java", -- "$google_play_services_package:google_play_services_places_placereport_java", - "$google_play_services_package:google_play_services_tasks_java", - ] - } @@ -3864,23 +3922,6 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD. - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. - if (google_play_services_package == "//third_party/android_deps") { -- android_aar_prebuilt("google_play_services_tflite_java_java") { -- aar_path = "libs/com_google_android_gms_play_services_tflite_java/play-services-tflite-java-16.0.1.aar" -- info_path = "libs/com_google_android_gms_play_services_tflite_java/com_google_android_gms_play_services_tflite_java.info" -- enable_bytecode_checks = false -- deps = [ -- ":org_tensorflow_tensorflow_lite_api_java", -- "$google_play_services_package:google_play_services_base_java", -- "$google_play_services_package:google_play_services_basement_java", -- "$google_play_services_package:google_play_services_tasks_java", -- "$google_play_services_package:google_play_services_tflite_impl_java", -- ] -- extract_native_libraries = true -- } -- } -- -- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- if (google_play_services_package == "//third_party/android_deps") { - android_aar_prebuilt("google_play_services_vision_java") { - aar_path = "libs/com_google_android_gms_play_services_vision/play-services-vision-20.1.3.aar" - info_path = "libs/com_google_android_gms_play_services_vision/com_google_android_gms_play_services_vision.info" @@ -3912,7 +3953,7 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD. # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. if (!defined(material_design_target)) { android_aar_prebuilt("com_google_android_material_material_java") { -@@ -1074,73 +816,6 @@ if (!limit_android_deps) { +@@ -1060,73 +797,6 @@ if (!limit_android_deps) { } } @@ -3986,12 +4027,69 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD. # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. if (!defined(guava_android_target)) { java_prebuilt("com_google_guava_guava_android_java") { -@@ -1941,364 +1616,6 @@ if (!limit_android_deps) { - "//third_party/androidx:*", +@@ -1244,20 +914,6 @@ if (!limit_android_deps) { + requires_android = true + } + +- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. +- android_aar_prebuilt("io_grpc_grpc_binder_java") { +- aar_path = "libs/io_grpc_grpc_binder/grpc-binder-1.49.0.aar" +- info_path = "libs/io_grpc_grpc_binder/io_grpc_grpc_binder.info" +- enable_bytecode_checks = false +- deps = [ +- ":io_grpc_grpc_core_java", +- "//third_party/android_deps:guava_android_java", +- "//third_party/androidx:androidx_annotation_annotation_java", +- "//third_party/androidx:androidx_core_core_java", +- "//third_party/androidx:androidx_lifecycle_lifecycle_common_java", +- ] +- } +- + # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. + java_prebuilt("io_grpc_grpc_context_java") { + jar_path = "libs/io_grpc_grpc_context/grpc-context-1.49.0.jar" +@@ -1897,361 +1553,6 @@ if (!limit_android_deps) { + "androidx/*", ] } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. +- android_aar_prebuilt("com_android_support_viewpager_java") { +- aar_path = "libs/com_android_support_viewpager/viewpager-28.0.0.aar" +- info_path = +- "libs/com_android_support_viewpager/com_android_support_viewpager.info" +- enable_bytecode_checks = false +- +- # To remove visibility constraint, add this dependency to +- # //third_party/android_deps/build.gradle. +- visibility = [ +- ":*", +- "//third_party/androidx:*", +- ] +- deps = [ +- ":com_android_support_customview_java", +- ":com_android_support_support_annotations_java", +- ":com_android_support_support_compat_java", +- ] +- resource_overlay = true +- } +- +- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. +- java_prebuilt("com_google_android_annotations_java") { +- jar_path = "libs/com_google_android_annotations/annotations-4.1.1.4.jar" +- output_name = "com_google_android_annotations" +- supports_android = true +- enable_bytecode_checks = false +- +- # To remove visibility constraint, add this dependency to +- # //third_party/android_deps/build.gradle. +- visibility = [ +- ":*", +- "//third_party/androidx:*", +- ] +- } +- +- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. - if (google_play_services_package == "//third_party/android_deps") { - android_aar_prebuilt("google_android_datatransport_transport_api_java") { - aar_path = "libs/com_google_android_datatransport_transport_api/transport-api-2.2.1.aar" @@ -4095,24 +4193,6 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD. - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. - if (google_play_services_package == "//third_party/android_deps") { -- android_aar_prebuilt("google_play_services_places_placereport_java") { -- aar_path = "libs/com_google_android_gms_play_services_places_placereport/play-services-places-placereport-17.0.0.aar" -- info_path = "libs/com_google_android_gms_play_services_places_placereport/com_google_android_gms_play_services_places_placereport.info" -- enable_bytecode_checks = false -- -- # To remove visibility constraint, add this dependency to -- # //third_party/android_deps/build.gradle. -- visibility = [ -- ":*", -- "//third_party/androidx:*", -- ] -- deps = -- [ "$google_play_services_package:google_play_services_basement_java" ] -- } -- } -- -- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- if (google_play_services_package == "//third_party/android_deps") { - android_aar_prebuilt("google_play_services_stats_java") { - aar_path = "libs/com_google_android_gms_play_services_stats/play-services-stats-17.0.0.aar" - info_path = "libs/com_google_android_gms_play_services_stats/com_google_android_gms_play_services_stats.info" @@ -4132,27 +4212,6 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD. - } - - # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. -- if (google_play_services_package == "//third_party/android_deps") { -- android_aar_prebuilt("google_play_services_tflite_impl_java") { -- aar_path = "libs/com_google_android_gms_play_services_tflite_impl/play-services-tflite-impl-16.0.1.aar" -- info_path = "libs/com_google_android_gms_play_services_tflite_impl/com_google_android_gms_play_services_tflite_impl.info" -- enable_bytecode_checks = false -- -- # To remove visibility constraint, add this dependency to -- # //third_party/android_deps/build.gradle. -- visibility = [ -- ":*", -- "//third_party/androidx:*", -- ] -- deps = [ -- "$google_play_services_package:google_play_services_base_java", -- "$google_play_services_package:google_play_services_basement_java", -- "$google_play_services_package:google_play_services_tasks_java", -- ] -- } -- } -- -- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. - android_aar_prebuilt("com_google_android_play_core_common_java") { - aar_path = "libs/com_google_android_play_core_common/core-common-2.0.2.aar" - info_path = "libs/com_google_android_play_core_common/com_google_android_play_core_common.info" @@ -4351,6 +4410,40 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD. # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. java_prebuilt("com_squareup_javawriter_java") { jar_path = "libs/com_squareup_javawriter/javawriter-2.1.1.jar" +@@ -2305,33 +1606,6 @@ if (!limit_android_deps) { + deps = [ "//third_party/kotlin_stdlib:kotlin_stdlib_java" ] + } + +- # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. +- java_prebuilt("io_grpc_grpc_core_java") { +- jar_path = "libs/io_grpc_grpc_core/grpc-core-1.49.0.jar" +- output_name = "io_grpc_grpc_core" +- supports_android = true +- enable_bytecode_checks = false +- +- # To remove visibility constraint, add this dependency to +- # //third_party/android_deps/build.gradle. +- visibility = [ +- ":*", +- "//third_party/androidx:*", +- ] +- deps = [ +- ":com_google_android_annotations_java", +- ":com_google_code_gson_gson_java", +- ":com_google_errorprone_error_prone_annotations_java", +- ":io_grpc_grpc_api_java", +- ":io_perfmark_perfmark_api_java", +- ":org_codehaus_mojo_animal_sniffer_annotations_java", +- "//third_party/android_deps:guava_android_java", +- ] +- +- # https://crbug.com/1412551 +- requires_android = true +- } +- + # This is generated, do not edit. Update BuildConfigGenerator.groovy instead. + java_prebuilt("io_perfmark_perfmark_api_java") { + jar_path = "libs/io_perfmark_perfmark_api/perfmark-api-0.25.0.jar" diff --git a/third_party/android_deps/local_modifications/preconditions/javatests/BUILD.gn b/third_party/android_deps/local_modifications/preconditions/javatests/BUILD.gn --- a/third_party/android_deps/local_modifications/preconditions/javatests/BUILD.gn +++ b/third_party/android_deps/local_modifications/preconditions/javatests/BUILD.gn diff --git a/build/cromite_patches/Remove-blocklisted-URLs-upon-bookmark-creation.patch b/build/cromite_patches/Remove-blocklisted-URLs-upon-bookmark-creation.patch index 70f454c0..8975cb68 100644 --- a/build/cromite_patches/Remove-blocklisted-URLs-upon-bookmark-creation.patch +++ b/build/cromite_patches/Remove-blocklisted-URLs-upon-bookmark-creation.patch @@ -4,17 +4,18 @@ Subject: Remove blocklisted URLs upon bookmark creation License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - .../chrome/browser/bookmarks/TabBookmarker.java | 13 +++++++++++++ - 1 file changed, 13 insertions(+) + .../chrome/browser/bookmarks/TabBookmarker.java | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/TabBookmarker.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/TabBookmarker.java --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/TabBookmarker.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/TabBookmarker.java -@@ -19,6 +19,11 @@ import org.chromium.components.bookmarks.BookmarkItem; +@@ -19,6 +19,12 @@ import org.chromium.components.bookmarks.BookmarkItem; import org.chromium.components.bookmarks.BookmarkType; import org.chromium.components.browser_ui.bottomsheet.BottomSheetController; +import org.chromium.chrome.browser.profiles.Profile; ++import org.chromium.chrome.browser.profiles.ProfileManager; +import org.chromium.chrome.browser.suggestions.SuggestionsDependencyFactory; +import org.chromium.chrome.browser.suggestions.mostvisited.MostVisitedSites; +import org.chromium.url.GURL; @@ -22,7 +23,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/TabBo /** * Helper class for managing the UI flow for bookmarking the active tab and kicking off the backend. * Shows a snackbar if a new bookmark was added. If the bookmark already exists, kicks off edit -@@ -30,6 +35,7 @@ public class TabBookmarker { +@@ -30,6 +36,7 @@ public class TabBookmarker { private final Supplier mBottomSheetControllerSupplier; private final Supplier mSnackbarManagerSupplier; private final boolean mIsCustomTab; @@ -30,14 +31,14 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/TabBo /** * Constructor. -@@ -105,6 +111,13 @@ public class TabBookmarker { +@@ -105,6 +112,13 @@ public class TabBookmarker { return; } + // remove blocklisted URL from most visited sites + if (mMostVisitedSites == null) { + mMostVisitedSites = -+ SuggestionsDependencyFactory.getInstance().createMostVisitedSites(Profile.getLastUsedRegularProfile()); ++ SuggestionsDependencyFactory.getInstance().createMostVisitedSites(ProfileManager.getLastUsedRegularProfile()); + } + mMostVisitedSites.removeBlocklistedUrl(tabToBookmark.getOriginalUrl()); + diff --git a/build/cromite_patches/Remove-help-menu-item.patch b/build/cromite_patches/Remove-help-menu-item.patch index 85c1e8f9..a9c42c43 100644 --- a/build/cromite_patches/Remove-help-menu-item.patch +++ b/build/cromite_patches/Remove-help-menu-item.patch @@ -29,7 +29,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/res/menu/main_menu.xml --- a/chrome/android/java/res/menu/main_menu.xml +++ b/chrome/android/java/res/menu/main_menu.xml -@@ -158,9 +158,6 @@ found in the LICENSE file. +@@ -152,9 +152,6 @@ found in the LICENSE file. @@ -66,7 +66,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcu diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java -@@ -2591,15 +2591,6 @@ public abstract class ChromeActivity +@@ -2612,15 +2612,6 @@ public abstract class ChromeActivity final Tab currentTab = getActivityTab(); @@ -85,7 +85,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillPaymentMethodsFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillPaymentMethodsFragment.java --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillPaymentMethodsFragment.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillPaymentMethodsFragment.java -@@ -92,6 +92,7 @@ public class AutofillPaymentMethodsFragment extends ChromeBaseSettingsFragment +@@ -101,6 +101,7 @@ public class AutofillPaymentMethodsFragment extends ChromeBaseSettingsFragment MenuItem help = menu.add(Menu.NONE, R.id.menu_id_targeted_help, Menu.NONE, R.string.menu_help); help.setIcon(R.drawable.ic_help_and_feedback); @@ -96,7 +96,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/settin diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillProfilesFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillProfilesFragment.java --- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillProfilesFragment.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillProfilesFragment.java -@@ -112,6 +112,7 @@ public class AutofillProfilesFragment extends ChromeBaseSettingsFragment +@@ -113,6 +113,7 @@ public class AutofillProfilesFragment extends ChromeBaseSettingsFragment MenuItem help = menu.add(Menu.NONE, R.id.menu_id_targeted_help, Menu.NONE, R.string.menu_help); help.setIcon(R.drawable.ic_help_and_feedback); @@ -107,7 +107,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/settin diff --git a/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragment.java --- a/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragment.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragment.java -@@ -888,6 +888,7 @@ public abstract class ClearBrowsingDataFragment extends PreferenceFragmentCompat +@@ -892,6 +892,7 @@ public abstract class ClearBrowsingDataFragment extends PreferenceFragmentCompat TraceEventVectorDrawableCompat.create( getResources(), R.drawable.ic_help_and_feedback, getActivity().getTheme())); help.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); @@ -118,7 +118,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/C diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java -@@ -735,7 +735,6 @@ public abstract class BaseCustomTabActivity extends ChromeActivity { @@ -62,7 +63,7 @@ diff --git a/chrome/android/features/start_surface/java/src/org/chromium/chrome/ }); mPropertyModel.set( -@@ -1562,13 +1549,6 @@ class StartSurfaceMediator +@@ -1056,13 +1043,6 @@ class StartSurfaceMediator ThreadUtils.postOnUiThread( () -> { if (mOmniboxStub != null) { @@ -76,30 +77,6 @@ diff --git a/chrome/android/features/start_surface/java/src/org/chromium/chrome/ mPropertyModel.set( IS_LENS_BUTTON_VISIBLE, mOmniboxStub.isLensEnabled(LensEntryPoint.TASKS_SURFACE)); -diff --git a/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/tasks/TasksSurfaceMediator.java b/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/tasks/TasksSurfaceMediator.java ---- a/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/tasks/TasksSurfaceMediator.java -+++ b/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/tasks/TasksSurfaceMediator.java -@@ -32,7 +32,6 @@ import org.chromium.chrome.browser.lens.LensMetrics; - import org.chromium.chrome.browser.ntp.IncognitoCookieControlsManager; - import org.chromium.chrome.browser.omnibox.OmniboxFocusReason; - import org.chromium.chrome.browser.omnibox.OmniboxStub; --import org.chromium.chrome.browser.omnibox.voice.VoiceRecognitionHandler; - import org.chromium.chrome.browser.tasks.tab_management.TabSwitcher.TabSwitcherViewObserver; - import org.chromium.components.content_settings.CookieControlsEnforcement; - import org.chromium.ui.modelutil.PropertyModel; -@@ -111,12 +110,6 @@ class TasksSurfaceMediator implements TabSwitcherViewObserver { - if (feedReliabilityLogger != null) { - feedReliabilityLogger.onVoiceSearch(); - } -- mOmniboxStub -- .getVoiceRecognitionHandler() -- .startVoiceRecognition( -- VoiceRecognitionHandler.VoiceInteractionSource -- .TASKS_SURFACE); -- RecordUserAction.record("TasksSurface.FakeBox.VoiceSearch"); - } - }); - diff --git a/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaSessionStats.java b/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaSessionStats.java --- a/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaSessionStats.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaSessionStats.java @@ -139,15 +116,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaSess diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java -@@ -69,7 +69,6 @@ import org.chromium.chrome.browser.native_page.ContextMenuManager; +@@ -61,7 +61,6 @@ import org.chromium.chrome.browser.magic_stack.ModuleRegistry; + import org.chromium.chrome.browser.native_page.ContextMenuManager; import org.chromium.chrome.browser.omnibox.OmniboxFocusReason; import org.chromium.chrome.browser.omnibox.OmniboxStub; - import org.chromium.chrome.browser.omnibox.suggestions.AutocompleteControllerProvider; -import org.chromium.chrome.browser.omnibox.voice.VoiceRecognitionHandler; import org.chromium.chrome.browser.privacy.settings.PrivacyPreferencesManagerImpl; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.search_engines.TemplateUrlServiceFactory; -@@ -128,7 +127,6 @@ public class NewTabPage +@@ -125,7 +124,6 @@ public class NewTabPage TemplateUrlServiceObserver, BrowserControlsStateProvider.Observer, FeedSurfaceDelegate, @@ -155,7 +132,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage. ModuleDelegateHost { private static final String TAG = "NewTabPage"; -@@ -158,7 +156,6 @@ public class NewTabPage +@@ -155,7 +153,6 @@ public class NewTabPage protected boolean mSearchProviderHasLogo; protected OmniboxStub mOmniboxStub; @@ -163,7 +140,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage. // The timestamp at which the constructor was called. protected final long mConstructedTimeNs; -@@ -260,8 +257,7 @@ public class NewTabPage +@@ -257,8 +254,7 @@ public class NewTabPage @Override public boolean isVoiceSearchEnabled() { @@ -173,7 +150,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage. } @Override -@@ -269,24 +265,6 @@ public class NewTabPage +@@ -266,24 +262,6 @@ public class NewTabPage if (mIsDestroyed) return; FeedReliabilityLogger feedReliabilityLogger = mFeedSurfaceProvider.getReliabilityLogger(); @@ -198,7 +175,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage. } @Override -@@ -869,12 +847,6 @@ public class NewTabPage +@@ -864,12 +842,6 @@ public class NewTabPage mOmniboxStub.addUrlFocusChangeListener(feedReliabilityLogger); } } @@ -211,7 +188,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage. } @Override -@@ -885,11 +857,6 @@ public class NewTabPage +@@ -880,11 +852,6 @@ public class NewTabPage } } @@ -223,26 +200,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage. /** Adds an observer to be notified on most visited tile clicks. */ public void addMostVisitedTileClickObserver(MostVisitedTileClickObserver observer) { mMostVisitedTileClickObservers.addObserver(observer); -@@ -909,10 +876,6 @@ public class NewTabPage - RecordUserAction.record("MobileNTPShown"); - mJankTracker.startTrackingScenario(JankScenario.NEW_TAB_PAGE); - SuggestionsMetrics.recordSurfaceVisible(); -- -- FeatureNotificationUtils.registerIPHCallback( -- FeatureType.VOICE_SEARCH, -- mNewTabPageLayout::maybeShowFeatureNotificationVoiceSearchIPH); - } - - /** Records UMA for the NTP being hidden and the time spent on it. */ -@@ -922,7 +885,6 @@ public class NewTabPage - "NewTabPage.TimeSpent", - (System.nanoTime() - mLastShownTimeNs) / TimeUtils.NANOSECONDS_PER_MILLISECOND); - SuggestionsMetrics.recordSurfaceHidden(); -- FeatureNotificationUtils.unregisterIPHCallback(FeatureType.VOICE_SEARCH); - } - - /** -@@ -1006,9 +968,6 @@ public class NewTabPage +@@ -996,9 +963,6 @@ public class NewTabPage } mFeedSurfaceProvider.destroy(); mTab.getWindowAndroid().removeContextMenuCloseListener(mContextMenuManager); @@ -255,10 +213,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage. diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/search/SearchBoxMediator.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/search/SearchBoxMediator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/search/SearchBoxMediator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/search/SearchBoxMediator.java -@@ -90,7 +90,6 @@ class SearchBoxMediator implements DestroyObserver, NativeInitObserver { - mContext, R.color.default_icon_color_accent1_container_tint_list) - : ThemeUtils.getThemedToolbarIconTint( - mContext, BrandedColorScheme.APP_DEFAULT); +@@ -79,7 +79,6 @@ class SearchBoxMediator implements DestroyObserver, NativeInitObserver { + + ColorStateList colorStateList = + ThemeUtils.getThemedToolbarIconTint(mContext, BrandedColorScheme.APP_DEFAULT); - mModel.set(SearchBoxProperties.VOICE_SEARCH_COLOR_STATE_LIST, colorStateList); } @@ -266,160 +224,60 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/search/Sear diff --git a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java --- a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java -@@ -57,7 +57,6 @@ import org.chromium.chrome.browser.omnibox.styles.OmniboxResourceProvider; - import org.chromium.chrome.browser.omnibox.suggestions.OmniboxSuggestionsDropdownScrollListener; - import org.chromium.chrome.browser.omnibox.suggestions.action.OmniboxActionDelegateImpl; - import org.chromium.chrome.browser.omnibox.suggestions.history_clusters.HistoryClustersProcessor.OpenHistoryClustersDelegate; --import org.chromium.chrome.browser.omnibox.voice.VoiceRecognitionHandler; - import org.chromium.chrome.browser.password_manager.ManagePasswordsReferrer; - import org.chromium.chrome.browser.password_manager.PasswordManagerLauncher; - import org.chromium.chrome.browser.privacy.settings.PrivacyPreferencesManagerImpl; -@@ -489,13 +488,11 @@ public class SearchActivity extends AsyncInitializationActivity - // will navigate to Tabbed mode. Investigate whether this can inflate - // the tabbed mode layout in the background instead of CCTs. - CustomTabsConnection.getInstance().warmup(0); -- VoiceRecognitionHandler voiceRecognitionHandler = -- mLocationBarCoordinator.getVoiceRecognitionHandler(); - @SearchType int searchType = getSearchType(getIntent().getAction()); - if (isFromQuickActionSearchWidget()) { - recordQuickActionSearchType(searchType); - } -- mSearchBox.onDeferredStartup(searchType, voiceRecognitionHandler, getWindowAndroid()); -+ mSearchBox.onDeferredStartup(searchType, getWindowAndroid()); - RecordUserAction.record("SearchWidget.WidgetSelected"); - - getActivityDelegate().onFinishDeferredInitialization(); -@@ -598,7 +595,6 @@ public class SearchActivity extends AsyncInitializationActivity - mSearchBox.beginQuery( - searchType, - getOptionalIntentQuery(), -- mLocationBarCoordinator.getVoiceRecognitionHandler(), - getWindowAndroid()); - } - +@@ -66,7 +66,6 @@ import org.chromium.chrome.browser.settings.SettingsLauncherImpl; + import org.chromium.chrome.browser.tab.Tab; + import org.chromium.chrome.browser.tab.TabBuilder; + import org.chromium.chrome.browser.tab.TabLaunchType; +-import org.chromium.chrome.browser.toolbar.VoiceToolbarButtonController; + import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; + import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager.SnackbarManageable; + import org.chromium.chrome.browser.ui.native_page.NativePage; +@@ -328,7 +327,7 @@ public class SearchActivity extends AsyncInitializationActivity + /*omniboxUma*/ (url, transition, isNtp) -> {}, + TabWindowManagerSingleton::getInstance, + /* bookmarkState= */ (url) -> false, +- VoiceToolbarButtonController::isToolbarMicEnabled, ++ /* isToolbarMicEnabled */ () -> false, + /* merchantTrustSignalsCoordinatorSupplier= */ null, + new OmniboxActionDelegateImpl( + this, diff --git a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityLocationBarLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityLocationBarLayout.java --- a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityLocationBarLayout.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityLocationBarLayout.java -@@ -28,7 +28,6 @@ import org.chromium.chrome.browser.omnibox.UrlBarCoordinator.SelectionState; +@@ -24,7 +24,6 @@ import org.chromium.chrome.browser.omnibox.UrlBarCoordinator.SelectionState; import org.chromium.chrome.browser.omnibox.UrlBarData; import org.chromium.chrome.browser.omnibox.status.StatusCoordinator; import org.chromium.chrome.browser.omnibox.suggestions.AutocompleteCoordinator; -import org.chromium.chrome.browser.omnibox.voice.VoiceRecognitionHandler; import org.chromium.chrome.browser.toolbar.top.ToolbarPhone; - import org.chromium.chrome.browser.ui.searchactivityutils.SearchActivityPreferencesManager; - import org.chromium.components.browser_ui.styles.ChromeColors; -@@ -100,7 +99,6 @@ public class SearchActivityLocationBarLayout extends LocationBarLayout { - /** Called when the SearchActivity has finished initialization. */ - void onDeferredStartup( - @SearchType int searchType, -- @NonNull VoiceRecognitionHandler voiceRecognitionHandler, - @NonNull WindowAndroid windowAndroid) { - SearchActivityPreferencesManager.updateFeatureAvailability(getContext(), windowAndroid); - assert !LocaleManager.getInstance().needToCheckForSearchEnginePromo(); -@@ -111,7 +109,7 @@ public class SearchActivityLocationBarLayout extends LocationBarLayout { - mAutocompleteCoordinator.onTextChanged(mUrlCoordinator.getTextWithoutAutocomplete()); - - if (mPendingBeginQuery) { -- beginQueryInternal(searchType, voiceRecognitionHandler, windowAndroid); -+ beginQueryInternal(searchType, windowAndroid); - mPendingBeginQuery = false; - } - } -@@ -121,14 +119,12 @@ public class SearchActivityLocationBarLayout extends LocationBarLayout { - * - * @param searchType The type of search to invoke. - * @param optionalText Prepopulate with a query, this may be null. -- * @param voiceRecognitionHandler Handler responsible for managing voice searches. - * @param windowAndroid WindowAndroid context. - */ - @VisibleForTesting - public void beginQuery( - @SearchType int searchType, - @Nullable String optionalText, -- @NonNull VoiceRecognitionHandler voiceRecognitionHandler, - @NonNull WindowAndroid windowAndroid) { - // Clear the text regardless of the promo decision. This allows the user to enter text - // before native has been initialized and have it not be cleared one the delayed beginQuery -@@ -143,12 +139,11 @@ public class SearchActivityLocationBarLayout extends LocationBarLayout { - return; - } - -- beginQueryInternal(searchType, voiceRecognitionHandler, windowAndroid); -+ beginQueryInternal(searchType, windowAndroid); + import org.chromium.chrome.browser.ui.searchactivityutils.SearchActivityExtras.IntentOrigin; + import org.chromium.chrome.browser.ui.searchactivityutils.SearchActivityExtras.SearchType; +@@ -196,13 +195,6 @@ public class SearchActivityLocationBarLayout extends LocationBarLayout { + mUrlBar.post(() -> mUrlBar.clearFocus()); } - private void beginQueryInternal( - @SearchType int searchType, -- @NonNull VoiceRecognitionHandler voiceRecognitionHandler, - @NonNull WindowAndroid windowAndroid) { - assert !mPendingSearchPromoDecision; - -@@ -158,7 +153,6 @@ public class SearchActivityLocationBarLayout extends LocationBarLayout { - } - - if (searchType == SearchType.VOICE) { -- runVoiceSearch(voiceRecognitionHandler); - } else if (searchType == SearchType.LENS) { - runGoogleLens(windowAndroid); - } else { -@@ -166,35 +160,6 @@ public class SearchActivityLocationBarLayout extends LocationBarLayout { - } - } - -- /** -- * Begins a new Voice query. -- * -- * @param voiceRecognitionHandler Handler responsible for managing voice searches. -- */ -- @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) -- void runVoiceSearch(@NonNull VoiceRecognitionHandler voiceRecognitionHandler) { -- assert mNativeInitialized; -- // Run Voice before focusing the Omnibox. Voice search may trigger omnibox focus as part of -- // its own flow in the event where the input is ambiguous. Focusing the Omnibox early may -- // affect this flow. -- // -- // Note that the Voice search will call us back in the event of any failure via -- // notifyVoiceRecognitionCanceled() call, giving us the opportunity to focus the Omnibox. -- if (voiceRecognitionHandler.isVoiceSearchEnabled()) { -- voiceRecognitionHandler.startVoiceRecognition( -- VoiceRecognitionHandler.VoiceInteractionSource.SEARCH_WIDGET); -- return; -- } -- -- // Voice recognition is not available. Fall back to regular text search. -- Toast.makeText( -- getContext(), -- R.string.quick_action_search_widget_message_no_voice_search, -- Toast.LENGTH_LONG) -- .show(); -- focusTextBox(); -- } -- - /** - * Begins a new Lens query. - * -@@ -250,9 +215,4 @@ public class SearchActivityLocationBarLayout extends LocationBarLayout { - mAutocompleteCoordinator.startCachedZeroSuggest(); - }); - } -- - @Override -- public void notifyVoiceRecognitionCanceled() { -- focusTextBox(); +- public int getVoiceRecogintionSource() { +- return mInteractionFromWidget +- ? VoiceRecognitionHandler.VoiceInteractionSource.SEARCH_WIDGET +- : super.getVoiceRecogintionSource(); - } - } +- + @Override + public int getLensEntryPoint() { + return mInteractionFromWidget diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java -@@ -92,7 +92,6 @@ import org.chromium.chrome.browser.omnibox.OverrideUrlLoadingDelegate; +@@ -95,7 +95,6 @@ import org.chromium.chrome.browser.omnibox.OmniboxStub; + import org.chromium.chrome.browser.omnibox.OverrideUrlLoadingDelegate; import org.chromium.chrome.browser.omnibox.UrlFocusChangeListener; import org.chromium.chrome.browser.omnibox.suggestions.OmniboxSuggestionsDropdownScrollListener; - import org.chromium.chrome.browser.omnibox.suggestions.history_clusters.HistoryClustersProcessor.OpenHistoryClustersDelegate; -import org.chromium.chrome.browser.omnibox.voice.VoiceRecognitionHandler; import org.chromium.chrome.browser.page_info.ChromePageInfo; import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomizations; import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; -@@ -2533,10 +2532,6 @@ public class ToolbarManager +@@ -2596,10 +2595,6 @@ public class ToolbarManager return mLocationBar.getOmniboxStub(); } @@ -433,16 +291,24 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar 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 -@@ -94,8 +94,6 @@ import org.chromium.chrome.browser.omnibox.OmniboxFocusReason; +@@ -94,8 +94,6 @@ import org.chromium.chrome.browser.messages.MessagesResourceMapperInitializer; + import org.chromium.chrome.browser.omnibox.OmniboxFocusReason; import org.chromium.chrome.browser.omnibox.geo.GeolocationHeader; import org.chromium.chrome.browser.omnibox.suggestions.action.OmniboxActionDelegateImpl; - import org.chromium.chrome.browser.omnibox.suggestions.history_clusters.HistoryClustersProcessor.OpenHistoryClustersDelegate; -import org.chromium.chrome.browser.omnibox.voice.VoiceRecognitionHandler; -import org.chromium.chrome.browser.omnibox.voice.VoiceRecognitionHandler.VoiceInteractionSource; import org.chromium.chrome.browser.paint_preview.DemoPaintPreview; import org.chromium.chrome.browser.password_manager.ManagePasswordsReferrer; import org.chromium.chrome.browser.password_manager.PasswordManagerLauncher; -@@ -292,7 +290,6 @@ public class RootUiCoordinator +@@ -135,7 +133,6 @@ import org.chromium.chrome.browser.theme.TopUiThemeColorProvider; + import org.chromium.chrome.browser.toolbar.ButtonDataProvider; + import org.chromium.chrome.browser.toolbar.ToolbarIntentMetadata; + import org.chromium.chrome.browser.toolbar.ToolbarManager; +-import org.chromium.chrome.browser.toolbar.VoiceToolbarButtonController; + import org.chromium.chrome.browser.toolbar.adaptive.AdaptiveButtonActionMenuCoordinator; + import org.chromium.chrome.browser.toolbar.adaptive.AdaptiveToolbarButtonController; + import org.chromium.chrome.browser.toolbar.adaptive.AdaptiveToolbarButtonVariant; +@@ -296,7 +293,6 @@ public class RootUiCoordinator protected OneshotSupplier mIntentMetadataOneshotSupplier; protected OneshotSupplierImpl mPromoShownOneshotSupplier = new OneshotSupplierImpl<>(); protected Supplier mStartSurfaceParentTabSupplier; @@ -450,7 +316,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordi private MediaCaptureOverlayController mCaptureController; private @Nullable ScrollCaptureManager mScrollCaptureManager; protected final ActivityLifecycleDispatcher mActivityLifecycleDispatcher; -@@ -643,9 +640,6 @@ public class RootUiCoordinator +@@ -653,9 +649,6 @@ public class RootUiCoordinator } if (mToolbarManager != null) { @@ -460,28 +326,56 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordi mToolbarManager.destroy(); mToolbarManager = null; } -@@ -1286,19 +1280,11 @@ public class RootUiCoordinator - new VoiceToolbarButtonController.VoiceSearchDelegate() { - @Override - public boolean isVoiceSearchEnabled() { +@@ -1323,39 +1316,12 @@ public class RootUiCoordinator + () -> + mToolbarManager.setUrlBarFocus( + false, OmniboxFocusReason.UNFOCUS)); +- VoiceToolbarButtonController.VoiceSearchDelegate voiceSearchDelegate = +- new VoiceToolbarButtonController.VoiceSearchDelegate() { +- @Override +- public boolean isVoiceSearchEnabled() { - VoiceRecognitionHandler voiceRecognitionHandler = - mToolbarManager.getVoiceRecognitionHandler(); - if (voiceRecognitionHandler == null) return false; - return voiceRecognitionHandler.isVoiceSearchEnabled(); -+ return false; - } - - @Override - public void startVoiceRecognition() { +- } +- +- @Override +- public void startVoiceRecognition() { - VoiceRecognitionHandler voiceRecognitionHandler = - mToolbarManager.getVoiceRecognitionHandler(); - if (voiceRecognitionHandler == null) return; - voiceRecognitionHandler.startVoiceRecognition( - VoiceInteractionSource.TOOLBAR); - } - }; +- } +- }; TranslateToolbarButtonController translateToolbarButtonController = -@@ -1464,13 +1450,6 @@ public class RootUiCoordinator + new TranslateToolbarButtonController( + mActivityTabProvider, + AppCompatResources.getDrawable(mActivity, R.drawable.ic_translate), + mActivity.getString(R.string.menu_translate), + trackerSupplier); +- VoiceToolbarButtonController voiceToolbarButtonController = +- new VoiceToolbarButtonController( +- mActivity, +- AppCompatResources.getDrawable(mActivity, R.drawable.ic_mic_white_24dp), +- mActivityTabProvider, +- trackerSupplier, +- mModalDialogManagerSupplier.get(), +- voiceSearchDelegate); + OptionalNewTabButtonController newTabButtonController = + new OptionalNewTabButtonController( + mActivity, +@@ -1385,8 +1351,6 @@ public class RootUiCoordinator + AdaptiveToolbarButtonVariant.NEW_TAB, newTabButtonController); + adaptiveToolbarButtonController.addButtonVariant( + AdaptiveToolbarButtonVariant.SHARE, shareButtonController); +- adaptiveToolbarButtonController.addButtonVariant( +- AdaptiveToolbarButtonVariant.VOICE, voiceToolbarButtonController); + adaptiveToolbarButtonController.addButtonVariant( + AdaptiveToolbarButtonVariant.ADD_TO_BOOKMARKS, + addToBookmarksToolbarButtonController); +@@ -1504,13 +1468,6 @@ public class RootUiCoordinator if (!mSupportsAppMenuSupplier.getAsBoolean()) { mToolbarManager.getToolbar().disableMenuButton(); } @@ -498,7 +392,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordi diff --git a/chrome/browser/ui/android/omnibox/BUILD.gn b/chrome/browser/ui/android/omnibox/BUILD.gn --- a/chrome/browser/ui/android/omnibox/BUILD.gn +++ b/chrome/browser/ui/android/omnibox/BUILD.gn -@@ -143,7 +143,6 @@ android_library("java") { +@@ -145,7 +145,6 @@ android_library("java") { "java/src/org/chromium/chrome/browser/omnibox/suggestions/tail/TailSuggestionView.java", "java/src/org/chromium/chrome/browser/omnibox/suggestions/tail/TailSuggestionViewBinder.java", "java/src/org/chromium/chrome/browser/omnibox/suggestions/tail/TailSuggestionViewProperties.java", @@ -509,15 +403,15 @@ diff --git a/chrome/browser/ui/android/omnibox/BUILD.gn b/chrome/browser/ui/andr diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBar.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBar.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBar.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBar.java -@@ -10,7 +10,6 @@ import android.view.ViewGroup; - import androidx.annotation.Nullable; +@@ -12,7 +12,6 @@ import androidx.annotation.Nullable; import org.chromium.chrome.browser.omnibox.suggestions.OmniboxSuggestionsDropdownScrollListener; + import org.chromium.chrome.browser.omnibox.suggestions.OmniboxSuggestionsVisualState; -import org.chromium.chrome.browser.omnibox.voice.VoiceRecognitionHandler; import org.chromium.chrome.browser.tab.Tab; - /** Container that holds the {@link UrlBar} and SSL state related with the current {@link Tab}. */ -@@ -82,11 +81,6 @@ public interface LocationBar { + import java.util.Optional; +@@ -86,11 +85,6 @@ public interface LocationBar { */ View getSecurityIconView(); @@ -534,13 +428,13 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java @@ -41,7 +41,6 @@ import org.chromium.chrome.browser.omnibox.suggestions.OmniboxLoadUrlParams; import org.chromium.chrome.browser.omnibox.suggestions.OmniboxSuggestionsDropdownScrollListener; + import org.chromium.chrome.browser.omnibox.suggestions.OmniboxSuggestionsVisualState; import org.chromium.chrome.browser.omnibox.suggestions.basic.BasicSuggestionProcessor.BookmarkState; - import org.chromium.chrome.browser.omnibox.suggestions.history_clusters.HistoryClustersProcessor.OpenHistoryClustersDelegate; -import org.chromium.chrome.browser.omnibox.voice.VoiceRecognitionHandler; import org.chromium.chrome.browser.privacy.settings.PrivacyPreferencesManager; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.search_engines.TemplateUrlServiceFactory; -@@ -460,13 +459,6 @@ public class LocationBarCoordinator +@@ -468,13 +467,6 @@ public class LocationBarCoordinator return mLocationBarLayout.getSecurityIconView(); } @@ -554,7 +448,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow @Nullable @Override public OmniboxStub getOmniboxStub() { -@@ -762,11 +754,6 @@ public class LocationBarCoordinator +@@ -771,11 +763,6 @@ public class LocationBarCoordinator // End tablet-specific methods. @@ -566,10 +460,33 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow public void onUrlChangedForTesting() { mLocationBarMediator.onUrlChanged(); } +diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java +--- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java ++++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java +@@ -30,7 +30,6 @@ import org.chromium.chrome.browser.omnibox.status.StatusCoordinator; + import org.chromium.chrome.browser.omnibox.status.StatusView; + import org.chromium.chrome.browser.omnibox.styles.OmniboxResourceProvider; + import org.chromium.chrome.browser.omnibox.suggestions.AutocompleteCoordinator; +-import org.chromium.chrome.browser.omnibox.voice.VoiceRecognitionHandler; + import org.chromium.components.browser_ui.widget.CompositeTouchDelegate; + import org.chromium.components.embedder_support.util.UrlUtilities; + import org.chromium.ui.base.DeviceFormFactor; +@@ -590,11 +589,6 @@ public class LocationBarLayout extends FrameLayout { + mSearchEngineUtils = searchEngineUtils; + } + +- /** Returns the source of Voice Recognition interactions. */ +- public int getVoiceRecogintionSource() { +- return VoiceRecognitionHandler.VoiceInteractionSource.OMNIBOX; +- } +- + /** Returns the entrypoint used to launch Lens. */ + public int getLensEntryPoint() { + return LensEntryPoint.OMNIBOX; 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 -@@ -52,7 +52,6 @@ import org.chromium.chrome.browser.omnibox.status.StatusCoordinator; +@@ -53,7 +53,6 @@ import org.chromium.chrome.browser.omnibox.status.StatusCoordinator; import org.chromium.chrome.browser.omnibox.styles.OmniboxResourceProvider; import org.chromium.chrome.browser.omnibox.suggestions.AutocompleteCoordinator; import org.chromium.chrome.browser.omnibox.suggestions.OmniboxLoadUrlParams; @@ -577,7 +494,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow import org.chromium.chrome.browser.prefetch.settings.PreloadPagesSettingsBridge; import org.chromium.chrome.browser.prefetch.settings.PreloadPagesState; import org.chromium.chrome.browser.privacy.settings.PrivacyPreferencesManager; -@@ -92,8 +91,6 @@ import java.util.function.BooleanSupplier; +@@ -94,8 +93,6 @@ import java.util.function.BooleanSupplier; class LocationBarMediator implements LocationBarDataProvider.Observer, OmniboxStub, @@ -586,16 +503,16 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow UrlBarDelegate, OnKeyListener, ComponentCallbacks, -@@ -157,7 +154,6 @@ class LocationBarMediator +@@ -160,7 +157,6 @@ class LocationBarMediator }; private final LocationBarLayout mLocationBarLayout; - private VoiceRecognitionHandler mVoiceRecognitionHandler; private final LocationBarDataProvider mLocationBarDataProvider; + private final LocationBarEmbedderUiOverrides mEmbedderUiOverrides; private StatusCoordinator mStatusCoordinator; - private AutocompleteCoordinator mAutocompleteCoordinator; -@@ -231,8 +227,6 @@ class LocationBarMediator - mLocationBarDataProvider.addObserver(this); +@@ -236,8 +232,6 @@ class LocationBarMediator + mEmbedderUiOverrides = embedderUiOverrides; mOverrideUrlLoadingDelegate = overrideUrlLoadingDelegate; mLocaleManager = localeManager; - mVoiceRecognitionHandler = new VoiceRecognitionHandler(this, profileSupplier); @@ -603,7 +520,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow mProfileSupplier = profileSupplier; mProfileSupplier.addObserver(mCallbackController.makeCancelable(this::setProfile)); mPrivacyPreferencesManager = privacyPreferencesManager; -@@ -277,8 +271,6 @@ class LocationBarMediator +@@ -282,8 +276,6 @@ class LocationBarMediator mAutocompleteCoordinator = null; mUrlCoordinator = null; mPrivacyPreferencesManager = null; @@ -612,7 +529,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow mLocationBarDataProvider.removeObserver(this); mDeferredNativeRunnables.clear(); mUrlFocusChangeListeners.clear(); -@@ -407,11 +399,6 @@ class LocationBarMediator +@@ -417,11 +409,6 @@ class LocationBarMediator mLocationBarLayout.setUnfocusedWidth(unfocusedWidth); } @@ -624,27 +541,30 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow /* package */ void setLensControllerForTesting(LensController lensController) { mLensController = lensController; } -@@ -662,8 +649,6 @@ class LocationBarMediator +@@ -676,10 +663,6 @@ class LocationBarMediator + // Hide keyboard before launch voice search to avoid keyboard action announcement in + // TalkBack to be picked up by voice search. mUrlCoordinator.setKeyboardVisibility(false, false); - - RecordUserAction.record("MobileOmniboxVoiceSearch"); +- +- RecordUserAction.record("MobileOmniboxVoiceSearch"); - mVoiceRecognitionHandler.startVoiceRecognition( -- VoiceRecognitionHandler.VoiceInteractionSource.OMNIBOX); +- mLocationBarLayout.getVoiceRecogintionSource()); } /** package */ -@@ -1132,9 +1117,7 @@ class LocationBarMediator +@@ -1153,10 +1136,7 @@ class LocationBarMediator private boolean shouldShowMicButton() { if (shouldShowDeleteButton()) return false; - if (!mNativeInitialized - || mVoiceRecognitionHandler == null -- || !mVoiceRecognitionHandler.isVoiceSearchEnabled()) { +- || !mVoiceRecognitionHandler.isVoiceSearchEnabled() +- || !mEmbedderUiOverrides.isVoiceEntrypointAllowed()) { + if ((true)) { return false; } boolean isToolbarMicEnabled = mIsToolbarMicEnabledSupplier.getAsBoolean(); -@@ -1151,6 +1134,7 @@ class LocationBarMediator +@@ -1173,6 +1153,7 @@ class LocationBarMediator } private boolean shouldShowLensButton() { @@ -652,29 +572,13 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow if (shouldShowDeleteButton()) return false; // When this method is called on UI inflation, return false as the native is not ready. -@@ -1158,15 +1142,6 @@ class LocationBarMediator - return false; - } - -- // Never show Lens in the old search widget page context. -- // This widget must guarantee consistent feature set regardless of search engine choice or -- // other aspects that may not be met by Lens. -- LocationBarDataProvider dataProvider = getLocationBarDataProvider(); -- if (dataProvider.getPageClassification(dataProvider.isIncognito(), /* isPrefetch= */ false) -- == PageClassification.ANDROID_SEARCH_WIDGET_VALUE) { -- return false; -- } -- - // When this method is called after native initialized, check omnibox conditions and Lens - // eligibility. - if (mIsTablet && mShouldShowButtonsWhenUnfocused) { -@@ -1371,16 +1346,6 @@ class LocationBarMediator +@@ -1391,16 +1372,6 @@ class LocationBarMediator } } - @Override - public @Nullable VoiceRecognitionHandler getVoiceRecognitionHandler() { -- // TODO(crbug.com/1140333): StartSurfaceMediator can call this method after destroy(). +- // TODO(crbug.com/40153763): StartSurfaceMediator can call this method after destroy(). - if (mLocationBarLayout == null) { - return null; - } @@ -685,7 +589,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow @Override public void addUrlFocusChangeListener(UrlFocusChangeListener listener) { mUrlFocusChangeListeners.addObserver(listener); -@@ -1396,33 +1361,13 @@ class LocationBarMediator +@@ -1416,31 +1387,13 @@ class LocationBarMediator return mUrlHasFocus; } @@ -697,9 +601,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow } - @Override -- public void notifyVoiceRecognitionCanceled() { -- mLocationBarLayout.notifyVoiceRecognitionCanceled(); -- } +- public void notifyVoiceRecognitionCanceled() {} - - // VoiceRecognitionHandler.Delegate implementation. - @@ -721,7 +623,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow public void setSearchQuery(String query) { if (TextUtils.isEmpty(query)) return; -@@ -1445,20 +1390,6 @@ class LocationBarMediator +@@ -1463,20 +1416,6 @@ class LocationBarMediator mUrlCoordinator.setKeyboardVisibility(true, false); } @@ -771,15 +673,15 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteController.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteController.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteController.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteController.java -@@ -14,7 +14,6 @@ import org.jni_zero.NativeMethods; - import org.chromium.base.lifetime.Destroyable; - import org.chromium.chrome.browser.omnibox.OmniboxFeatures; +@@ -14,7 +14,6 @@ import org.jni_zero.JniType; + import org.jni_zero.NativeMethods; + import org.chromium.chrome.browser.omnibox.OmniboxMetrics; -import org.chromium.chrome.browser.omnibox.voice.VoiceRecognitionHandler.VoiceResult; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.tab.Tab; import org.chromium.components.omnibox.AutocompleteMatch; -@@ -345,25 +344,6 @@ public class AutocompleteController implements Destroyable { +@@ -334,25 +333,6 @@ public class AutocompleteController { mNativeController, match.getNativeObjectRef(), matchIndex, webContents); } @@ -805,7 +707,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow /** * Updates searchbox stats parameters on the selected match that we will navigate to and * returns the updated URL. -@@ -457,11 +437,6 @@ public class AutocompleteController implements Destroyable { +@@ -473,11 +453,6 @@ public class AutocompleteController { Tab getMatchingTabForSuggestion( long nativeAutocompleteControllerAndroid, long nativeAutocompleteMatch); @@ -814,22 +716,22 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow - String[] matches, - float[] confidenceScores); - - // Destroy supplied instance of the AutocompleteControllerAndroid. - // The instance cannot be used after this call completes. - void destroy(long nativeAutocompleteControllerAndroid); + // Sends a zero suggest request to the server in order to pre-populate the result cache. + void startPrefetch( + long nativeAutocompleteControllerAndroid, diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteCoordinator.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteCoordinator.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteCoordinator.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteCoordinator.java -@@ -45,7 +45,6 @@ import org.chromium.chrome.browser.omnibox.suggestions.header.HeaderViewBinder; - import org.chromium.chrome.browser.omnibox.suggestions.history_clusters.HistoryClustersProcessor.OpenHistoryClustersDelegate; +@@ -44,7 +44,6 @@ import org.chromium.chrome.browser.omnibox.suggestions.header.HeaderView; + import org.chromium.chrome.browser.omnibox.suggestions.header.HeaderViewBinder; import org.chromium.chrome.browser.omnibox.suggestions.tail.TailSuggestionView; import org.chromium.chrome.browser.omnibox.suggestions.tail.TailSuggestionViewBinder; -import org.chromium.chrome.browser.omnibox.voice.VoiceRecognitionHandler; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.share.ShareDelegate; import org.chromium.chrome.browser.tab.Tab; -@@ -344,13 +343,6 @@ public class AutocompleteCoordinator implements UrlFocusChangeListener, UrlTextC - mRecycledViewPool.onNativeInitialized(); +@@ -372,13 +371,6 @@ public class AutocompleteCoordinator + mRecycledViewPool.ifPresent(p -> p.onNativeInitialized()); } - /** @@ -845,15 +747,15 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteMediator.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteMediator.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteMediator.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteMediator.java -@@ -38,7 +38,6 @@ import org.chromium.chrome.browser.omnibox.suggestions.AutocompleteDelegate.Auto +@@ -39,7 +39,6 @@ import org.chromium.chrome.browser.omnibox.suggestions.AutocompleteDelegate.Auto import org.chromium.chrome.browser.omnibox.suggestions.action.OmniboxActionFactoryImpl; + import org.chromium.chrome.browser.omnibox.suggestions.action.OmniboxAnswerAction; import org.chromium.chrome.browser.omnibox.suggestions.basic.BasicSuggestionProcessor.BookmarkState; - import org.chromium.chrome.browser.omnibox.suggestions.history_clusters.HistoryClustersProcessor.OpenHistoryClustersDelegate; -import org.chromium.chrome.browser.omnibox.voice.VoiceRecognitionHandler; import org.chromium.chrome.browser.profiles.Profile; - import org.chromium.chrome.browser.search_engines.TemplateUrlServiceFactory; import org.chromium.chrome.browser.share.ShareDelegate; -@@ -430,14 +429,6 @@ class AutocompleteMediator + import org.chromium.chrome.browser.tab.Tab; +@@ -484,13 +483,6 @@ class AutocompleteMediator mShouldPreventOmniboxAutocomplete = prevent; } @@ -861,11 +763,21 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow - * @see AutocompleteController#onVoiceResults(List) - */ - void onVoiceResults(@Nullable List results) { -- if (!mNativeInitialized || mAutocomplete == null) return; -- mAutocomplete.onVoiceResults(results); +- mAutocomplete.ifPresent(a -> a.onVoiceResults(results)); - } - /** - * @return The current native pointer to the autocomplete results. TODO(crbug.com/1138587): - * Figure out how to remove this. + * TODO(crbug.com/40725530): Figure out how to remove this. + * +diff --git a/chrome/browser/ui/android/toolbar/BUILD.gn b/chrome/browser/ui/android/toolbar/BUILD.gn +--- a/chrome/browser/ui/android/toolbar/BUILD.gn ++++ b/chrome/browser/ui/android/toolbar/BUILD.gn +@@ -36,7 +36,6 @@ android_library("java") { + "java/src/org/chromium/chrome/browser/toolbar/ToolbarProgressBarAnimatingView.java", + "java/src/org/chromium/chrome/browser/toolbar/ToolbarTabController.java", + "java/src/org/chromium/chrome/browser/toolbar/ToolbarTabControllerImpl.java", +- "java/src/org/chromium/chrome/browser/toolbar/VoiceToolbarButtonController.java", + "java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveButtonActionMenuCoordinator.java", + "java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarBridge.java", + "java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarButtonController.java", -- diff --git a/build/cromite_patches/Remove-window-name-on-cross-origin-navigation.patch b/build/cromite_patches/Remove-window-name-on-cross-origin-navigation.patch index cd71879d..7d938749 100644 --- a/build/cromite_patches/Remove-window-name-on-cross-origin-navigation.patch +++ b/build/cromite_patches/Remove-window-name-on-cross-origin-navigation.patch @@ -21,7 +21,7 @@ new file mode 100644 diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc --- a/third_party/blink/renderer/core/loader/document_loader.cc +++ b/third_party/blink/renderer/core/loader/document_loader.cc -@@ -2696,7 +2696,7 @@ void DocumentLoader::CommitNavigation() { +@@ -2808,7 +2808,7 @@ void DocumentLoader::CommitNavigation() { // that the name would be nulled and if the name is accessed after we will // fire a UseCounter. If we decide to move forward with this change, we'd // actually clean the name here. @@ -30,7 +30,7 @@ diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_p frame_->Tree().ExperimentalSetNulledName(); } -@@ -2707,6 +2707,7 @@ void DocumentLoader::CommitNavigation() { +@@ -2819,6 +2819,7 @@ void DocumentLoader::CommitNavigation() { // TODO(shuuran): CrossSiteCrossBrowsingContextGroupSetNulledName will just // record the fact that the name would be nulled and if the name is accessed // after we will fire a UseCounter. diff --git a/build/cromite_patches/Replace-DoH-probe-domain-with-RIPE-domain.patch b/build/cromite_patches/Replace-DoH-probe-domain-with-RIPE-domain.patch index ef244d96..05f27a0a 100644 --- a/build/cromite_patches/Replace-DoH-probe-domain-with-RIPE-domain.patch +++ b/build/cromite_patches/Replace-DoH-probe-domain-with-RIPE-domain.patch @@ -29,8 +29,8 @@ diff --git a/net/dns/dns_transaction.h b/net/dns/dns_transaction.h class ResolveContext; // The hostname probed by CreateDohProbeRunner(). --inline constexpr base::StringPiece kDohProbeHostname = "www.gstatic.com"; -+inline constexpr base::StringPiece kDohProbeHostname = "www.ripe.net"; +-inline constexpr std::string_view kDohProbeHostname = "www.gstatic.com"; ++inline constexpr std::string_view kDohProbeHostname = "www.ripe.net"; // DnsTransaction implements a stub DNS resolver as defined in RFC 1034. // The DnsTransaction takes care of retransmissions, name server fallback (or diff --git a/build/cromite_patches/Restore-BookmarkToolbar-setCurrentFolder.patch b/build/cromite_patches/Restore-BookmarkToolbar-setCurrentFolder.patch new file mode 100644 index 00000000..a3b3d2b5 --- /dev/null +++ b/build/cromite_patches/Restore-BookmarkToolbar-setCurrentFolder.patch @@ -0,0 +1,150 @@ +From: uazo +Date: Thu, 18 Jul 2024 14:03:12 +0000 +Subject: Restore BookmarkToolbar#setCurrentFolder + +restore https://chromium-review.googlesource.com/c/chromium/src/+/5554182 + +License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html +--- + .../chrome/browser/bookmarks/BookmarkToolbar.java | 12 ++++++++++++ + .../bookmarks/BookmarkToolbarCoordinator.java | 1 + + .../browser/bookmarks/BookmarkToolbarMediator.java | 1 + + .../browser/bookmarks/BookmarkToolbarProperties.java | 9 +++++++++ + .../browser/bookmarks/BookmarkToolbarViewBinder.java | 4 ++++ + 5 files changed, 27 insertions(+) + +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbar.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbar.java +--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbar.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbar.java +@@ -10,11 +10,13 @@ import android.view.MenuItem; + import android.view.View.OnClickListener; + + import androidx.annotation.IdRes; ++import androidx.annotation.Nullable; + import androidx.appcompat.widget.Toolbar.OnMenuItemClickListener; + import androidx.core.view.MenuCompat; + + import org.chromium.chrome.R; + import org.chromium.chrome.browser.bookmarks.BookmarkUiState.BookmarkUiMode; ++import org.chromium.components.bookmarks.BookmarkItem; + import org.chromium.components.bookmarks.BookmarkId; + import org.chromium.components.browser_ui.util.ToolbarUtils; + import org.chromium.components.browser_ui.widget.selectable_list.SelectableListToolbar; +@@ -30,9 +32,11 @@ import java.util.function.Function; + */ + public class BookmarkToolbar extends SelectableListToolbar + implements OnMenuItemClickListener, OnClickListener { ++ private BookmarkModel mBookmarkModel; + private BookmarkOpener mBookmarkOpener; + private SelectionDelegate mSelectionDelegate; + ++ private @Nullable BookmarkItem mCurrentFolder; + private boolean mEditButtonVisible; + private boolean mNewFolderButtonVisible; + private boolean mNewFolderButtonEnabled; +@@ -60,6 +64,10 @@ public class BookmarkToolbar extends SelectableListToolbar + setOnMenuItemClickListener(this); + } + ++ void setBookmarkModel(BookmarkModel bookmarkModel) { ++ mBookmarkModel = bookmarkModel; ++ } ++ + void setBookmarkOpener(BookmarkOpener bookmarkOpener) { + mBookmarkOpener = bookmarkOpener; + } +@@ -167,6 +175,10 @@ public class BookmarkToolbar extends SelectableListToolbar + getMenu().findItem(id).setChecked(true); + } + ++ void setCurrentFolder(BookmarkId folder) { ++ mCurrentFolder = mBookmarkModel.getBookmarkById(folder); ++ } ++ + void setNavigateBackRunnable(Runnable navigateBackRunnable) { + mNavigateBackRunnable = navigateBackRunnable; + } +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarCoordinator.java +--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarCoordinator.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarCoordinator.java +@@ -55,6 +55,7 @@ public class BookmarkToolbarCoordinator { + searchDelegate, R.string.bookmark_toolbar_search, R.id.search_menu_id); + + mModel = new PropertyModel.Builder(BookmarkToolbarProperties.ALL_KEYS).build(); ++ mModel.set(BookmarkToolbarProperties.BOOKMARK_MODEL, bookmarkModel); + mModel.set(BookmarkToolbarProperties.BOOKMARK_OPENER, bookmarkOpener); + mModel.set(BookmarkToolbarProperties.SELECTION_DELEGATE, selectionDelegate); + mModel.set(BookmarkToolbarProperties.BOOKMARK_UI_MODE, BookmarkUiMode.LOADING); +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarMediator.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarMediator.java +--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarMediator.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarMediator.java +@@ -290,6 +290,7 @@ class BookmarkToolbarMediator + @Override + public void onFolderStateSet(BookmarkId folder) { + mCurrentFolder = folder; ++ mModel.set(BookmarkToolbarProperties.CURRENT_FOLDER, mCurrentFolder); + + BookmarkItem folderItem = + mCurrentFolder == null ? null : mBookmarkModel.getBookmarkById(mCurrentFolder); +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarProperties.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarProperties.java +--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarProperties.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarProperties.java +@@ -4,6 +4,7 @@ + + package org.chromium.chrome.browser.bookmarks; + ++import org.chromium.components.bookmarks.BookmarkId; + import org.chromium.components.browser_ui.widget.selectable_list.SelectionDelegate; + import org.chromium.ui.modelutil.PropertyKey; + import org.chromium.ui.modelutil.PropertyModel.WritableBooleanPropertyKey; +@@ -19,6 +20,8 @@ import java.util.function.Function; + */ + class BookmarkToolbarProperties { + /** Dependencies */ ++ static final WritableObjectPropertyKey BOOKMARK_MODEL = ++ new WritableObjectPropertyKey<>(); + static final WritableObjectPropertyKey BOOKMARK_OPENER = + new WritableObjectPropertyKey<>(); + +@@ -68,6 +71,10 @@ class BookmarkToolbarProperties { + static final WritableObjectPropertyKey FAKE_SELECTION_STATE_CHANGE = + new WritableObjectPropertyKey<>(/* skipEquality= */ true); + ++ /** Bookmark state properties. */ ++ static final WritableObjectPropertyKey CURRENT_FOLDER = ++ new WritableObjectPropertyKey<>(/* skipEquality= */ true); ++ + /** Callables to delegate business logic back to the mediator */ + static final WritableObjectPropertyKey> MENU_ID_CLICKED_FUNCTION = + new WritableObjectPropertyKey<>(); +@@ -88,6 +95,8 @@ class BookmarkToolbarProperties { + NEW_FOLDER_BUTTON_VISIBLE, + NEW_FOLDER_BUTTON_ENABLED, + NAVIGATION_BUTTON_STATE, ++ BOOKMARK_MODEL, ++ CURRENT_FOLDER, + SORT_MENU_IDS, + SORT_MENU_IDS_ENABLED, + CHECKED_SORT_MENU_ID, +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarViewBinder.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarViewBinder.java +--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarViewBinder.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkToolbarViewBinder.java +@@ -13,6 +13,8 @@ class BookmarkToolbarViewBinder { + public static void bind(PropertyModel model, BookmarkToolbar bookmarkToolbar, PropertyKey key) { + if (key == BookmarkToolbarProperties.BOOKMARK_OPENER) { + bookmarkToolbar.setBookmarkOpener(model.get(BookmarkToolbarProperties.BOOKMARK_OPENER)); ++ } else if (key == BookmarkToolbarProperties.BOOKMARK_MODEL) { ++ bookmarkToolbar.setBookmarkModel(model.get(BookmarkToolbarProperties.BOOKMARK_MODEL)); + } else if (key == BookmarkToolbarProperties.SELECTION_DELEGATE) { + bookmarkToolbar.setSelectionDelegate( + model.get(BookmarkToolbarProperties.SELECTION_DELEGATE)); +@@ -52,6 +54,8 @@ class BookmarkToolbarViewBinder { + } else if (key == BookmarkToolbarProperties.CHECKED_VIEW_MENU_ID) { + bookmarkToolbar.setCheckedViewMenuId( + model.get(BookmarkToolbarProperties.CHECKED_VIEW_MENU_ID)); ++ } else if (key == BookmarkToolbarProperties.CURRENT_FOLDER) { ++ bookmarkToolbar.setCurrentFolder(model.get(BookmarkToolbarProperties.CURRENT_FOLDER)); + } else if (key == BookmarkToolbarProperties.NAVIGATE_BACK_RUNNABLE) { + bookmarkToolbar.setNavigateBackRunnable( + model.get(BookmarkToolbarProperties.NAVIGATE_BACK_RUNNABLE)); +-- diff --git a/build/cromite_patches/Restore-LastTabStandingTracker.patch b/build/cromite_patches/Restore-LastTabStandingTracker.patch index 6c067ce0..a8dd5bca 100644 --- a/build/cromite_patches/Restore-LastTabStandingTracker.patch +++ b/build/cromite_patches/Restore-LastTabStandingTracker.patch @@ -54,14 +54,14 @@ diff --git a/chrome/browser/content_settings/host_content_settings_map_factory.c +#include "chrome/browser/permissions/last_tab_standing_tracker_factory.h" #include "chrome/browser/profiles/off_the_record_profile_impl.h" #include "chrome/browser/profiles/profile.h" - #include "chrome/browser/profiles/profiles_state.h" -@@ -57,6 +58,7 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory() - // Guest mode. + #include "chrome/browser/profiles/profile_key.h" +@@ -56,6 +57,7 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory() .WithGuest(ProfileSelection::kOwnInstance) .Build()) { -+ DependsOn(LastTabStandingTrackerFactory::GetInstance()); - #if BUILDFLAG(ENABLE_SUPERVISED_USERS) DependsOn(SupervisedUserSettingsServiceFactory::GetInstance()); ++ DependsOn(LastTabStandingTrackerFactory::GetInstance()); + #if BUILDFLAG(IS_ANDROID) + DependsOn(TemplateURLServiceFactory::GetInstance()); #endif diff --git a/chrome/browser/permissions/last_tab_standing_tracker.cc b/chrome/browser/permissions/last_tab_standing_tracker.cc new file mode 100644 @@ -372,7 +372,7 @@ new file mode 100644 + private: + explicit LastTabStandingTrackerTabHelper(content::WebContents* webContents); + friend class content::WebContentsUserData; -+ absl::optional last_committed_origin_; ++ std::optional last_committed_origin_; + + WEB_CONTENTS_USER_DATA_KEY_DECL(); +}; @@ -381,7 +381,7 @@ new file mode 100644 diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc -@@ -112,6 +112,7 @@ +@@ -114,6 +114,7 @@ #include "chrome/browser/password_manager/password_reuse_manager_factory.h" #include "chrome/browser/password_manager/profile_password_store_factory.h" #include "chrome/browser/permissions/adaptive_quiet_notification_permission_ui_enabler.h" @@ -389,18 +389,18 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc #include "chrome/browser/permissions/notifications_engagement_service_factory.h" #include "chrome/browser/permissions/one_time_permissions_tracker_factory.h" #include "chrome/browser/permissions/origin_keyed_permission_action_service_factory.h" -@@ -963,6 +964,7 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -1006,6 +1007,7 @@ void ChromeBrowserMainExtraPartsProfiles:: #if BUILDFLAG(BUILD_WITH_TFLITE_LIB) OnDeviceTailModelServiceFactory::GetInstance(); #endif + LastTabStandingTrackerFactory::GetInstance(); #if !BUILDFLAG(IS_ANDROID) OneGoogleBarServiceFactory::GetInstance(); - if (base::FeatureList::IsEnabled(permissions::features::kOneTimePermission)) { + OneTimePermissionsTrackerFactory::GetInstance(); 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 -@@ -52,6 +52,7 @@ +@@ -55,6 +55,7 @@ #include "chrome/browser/page_info/page_info_features.h" #include "chrome/browser/page_load_metrics/page_load_metrics_initialize.h" #include "chrome/browser/password_manager/chrome_password_manager_client.h" @@ -408,8 +408,8 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc #include "chrome/browser/permissions/one_time_permissions_tracker_helper.h" #include "chrome/browser/predictors/loading_predictor_factory.h" #include "chrome/browser/predictors/loading_predictor_tab_helper.h" -@@ -400,6 +401,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { - HistoryClustersTabHelper::CreateForWebContents(web_contents); +@@ -421,6 +422,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { + HistoryEmbeddingsTabHelper::CreateForWebContents(web_contents); HttpsOnlyModeTabHelper::CreateForWebContents(web_contents); webapps::InstallableManager::CreateForWebContents(web_contents); + LastTabStandingTrackerTabHelper::CreateForWebContents(web_contents); diff --git a/build/cromite_patches/Restore-Search-Ready-Omnibox-flag.patch b/build/cromite_patches/Restore-Search-Ready-Omnibox-flag.patch index 3c11602b..45ba51e0 100644 --- a/build/cromite_patches/Restore-Search-Ready-Omnibox-flag.patch +++ b/build/cromite_patches/Restore-Search-Ready-Omnibox-flag.patch @@ -23,7 +23,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc --- a/chrome/browser/flags/android/chrome_feature_list.cc +++ b/chrome/browser/flags/android/chrome_feature_list.cc -@@ -250,6 +250,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -268,6 +268,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { &kReaderModeInCCT, &kRecordSuppressionMetrics, &kReengagementNotification, @@ -34,34 +34,34 @@ 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 -@@ -325,6 +325,7 @@ public abstract class ChromeFeatureList { +@@ -347,6 +347,7 @@ public abstract class ChromeFeatureList { + public static final String MAYLAUNCHURL_USES_SEPARATE_STORAGE_PARTITION = + "MayLaunchUrlUsesSeparateStoragePartition"; public static final String MESSAGES_FOR_ANDROID_ADS_BLOCKED = "MessagesForAndroidAdsBlocked"; - public static final String MESSAGES_FOR_ANDROID_INFRASTRUCTURE = - "MessagesForAndroidInfrastructure"; + public static final String SEARCH_READY_OMNIBOX = "SearchReadyOmnibox"; - public static final String MESSAGES_FOR_ANDROID_PERMISSION_UPDATE = - "MessagesForAndroidPermissionUpdate"; public static final String MIGRATE_ACCOUNT_MANAGEMENT_SETTINGS_TO_CAPABILITIES = + "MigrateAccountManagementSettingsToCapabilities"; + public static final String MUlTI_INSTANCE_APPLICATION_STATUS_CLEANUP = diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListBuilder.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListBuilder.java --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListBuilder.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListBuilder.java -@@ -12,6 +12,7 @@ import androidx.annotation.Nullable; - import androidx.annotation.Px; +@@ -11,6 +11,7 @@ import androidx.annotation.NonNull; + import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; +import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.base.supplier.Supplier; - import org.chromium.chrome.browser.omnibox.OmniboxFeatures; import org.chromium.chrome.browser.omnibox.UrlBarEditingTextStateProvider; -@@ -55,6 +56,7 @@ class DropdownItemViewInfoListBuilder { + import org.chromium.chrome.browser.omnibox.styles.OmniboxImageSupplier; +@@ -49,6 +50,7 @@ class DropdownItemViewInfoListBuilder { + private @Nullable Supplier mShareDelegateSupplier; + private @NonNull Optional mImageSupplier; private @NonNull BookmarkState mBookmarkState; - @Px private int mDropdownHeight; - private OpenHistoryClustersDelegate mOpenHistoryClustersDelegate; + private EditUrlSuggestionProcessor mEditUrlSuggestionProcessor; DropdownItemViewInfoListBuilder( - @NonNull Supplier tabSupplier, -@@ -87,9 +89,11 @@ class DropdownItemViewInfoListBuilder { + @NonNull Supplier tabSupplier, @NonNull BookmarkState bookmarkState) { +@@ -81,9 +83,11 @@ class DropdownItemViewInfoListBuilder { mGroupSeparatorProcessor = new GroupSeparatorProcessor(context); mHeaderProcessor = new HeaderProcessor(context); @@ -75,10 +75,10 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow registerSuggestionProcessor( new AnswerSuggestionProcessor(context, host, textProvider, mImageSupplier)); registerSuggestionProcessor( -@@ -206,6 +210,9 @@ class DropdownItemViewInfoListBuilder { - /** Signals that native initialization has completed. */ - void onNativeInitialized() { +@@ -170,6 +174,9 @@ class DropdownItemViewInfoListBuilder { mHeaderProcessor.onNativeInitialized(); + mImageSupplier.ifPresent(s -> s.onNativeInitialized()); + + if (ChromeFeatureList.isEnabled(ChromeFeatureList.SEARCH_READY_OMNIBOX) == false) { + mPriorityOrderedSuggestionProcessors.remove(mEditUrlSuggestionProcessor); + } diff --git a/build/cromite_patches/Restore-Simplified-NTP-launch.patch b/build/cromite_patches/Restore-Simplified-NTP-launch.patch index 622313d9..4c8a14c9 100644 --- a/build/cromite_patches/Restore-Simplified-NTP-launch.patch +++ b/build/cromite_patches/Restore-Simplified-NTP-launch.patch @@ -6,24 +6,34 @@ This reverts commit 4d0e4483c5f77c66a8b6193e8a3bec5d0624d6ad. 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 + - .../java/res/layout/new_tab_page_layout.xml | 7 ++ - .../android/java/res/layout/ntp_shortcuts.xml | 65 +++++++++++++++++++ - .../feedback/ChromeFeedbackCollector.java | 1 + - .../feedback/SimplifiedNtpFeedbackSource.java | 38 +++++++++++ - .../identity_disc/IdentityDiscController.java | 5 +- - .../NativePageNavigationDelegateImpl.java | 4 +- - .../chrome/browser/ntp/NewTabPageLayout.java | 31 ++++++++- - .../SuggestionsNavigationDelegate.java | 17 +++++ - .../flags/android/chrome_feature_list.cc | 1 + - .../browser/flags/ChromeFeatureList.java | 3 +- - .../Restore-Simplified-NTP-launch.inc | 12 ++++ - .../Restore-Simplified-NTP-launch.inc | 5 ++ - .../Restore-Simplified-NTP-launch.inc | 1 + - 15 files changed, 186 insertions(+), 6 deletions(-) + chrome/android/chrome_java_resources.gni | 1 + + chrome/android/chrome_java_sources.gni | 2 + + .../java/res/layout/mv_tiles_layout.xml | 13 +- + .../java/res/layout/new_tab_page_layout.xml | 7 + + .../android/java/res/layout/ntp_shortcuts.xml | 65 ++++++ + chrome/android/java/res/values/attrs.xml | 4 + + chrome/android/java/res/values/dimens.xml | 2 + + .../feedback/ChromeFeedbackCollector.java | 1 + + .../feedback/SimplifiedNtpFeedbackSource.java | 38 ++++ + .../identity_disc/IdentityDiscController.java | 5 +- + .../NativePageNavigationDelegateImpl.java | 4 +- + .../chrome/browser/ntp/NewTabPageLayout.java | 25 ++- + .../SuggestionsNavigationDelegate.java | 17 ++ + .../mostvisited/MostVisitedSitesBridge.java | 2 +- + .../tile/MostVisitedTilesCoordinator.java | 10 +- + .../tile/MostVisitedTilesGridLayout.java | 194 ++++++++++++++++++ + .../tile/MostVisitedTilesMediator.java | 9 +- + .../engagement/important_sites_util.cc | 2 +- + .../flags/android/chrome_feature_list.cc | 1 + + .../browser/flags/ChromeFeatureList.java | 5 +- + .../history/core/browser/top_sites_impl.h | 2 +- + .../Restore-Simplified-NTP-launch.inc | 12 ++ + .../Restore-Simplified-NTP-launch.inc | 6 + + .../Restore-Simplified-NTP-launch.inc | 1 + + 24 files changed, 397 insertions(+), 31 deletions(-) create mode 100644 chrome/android/java/res/layout/ntp_shortcuts.xml create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/feedback/SimplifiedNtpFeedbackSource.java + create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesGridLayout.java create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Restore-Simplified-NTP-launch.inc create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Restore-Simplified-NTP-launch.inc create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Restore-Simplified-NTP-launch.inc @@ -31,10 +41,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni --- a/chrome/android/chrome_java_resources.gni +++ b/chrome/android/chrome_java_resources.gni -@@ -545,6 +545,7 @@ chrome_java_resources = [ - "java/res/layout/new_tab_page_incognito.xml", +@@ -538,6 +538,7 @@ chrome_java_resources = [ "java/res/layout/new_tab_page_layout.xml", "java/res/layout/new_tab_page_tile_grid_placeholder.xml", + "java/res/layout/open_full_chrome_history_header.xml", + "java/res/layout/ntp_shortcuts.xml", "java/res/layout/optional_toolbar_button.xml", "java/res/layout/os_version_unsupported_text.xml", @@ -42,7 +52,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 -@@ -626,6 +626,7 @@ chrome_java_sources = [ +@@ -622,6 +622,7 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/feedback/FeedFeedbackCollector.java", "java/src/org/chromium/chrome/browser/feedback/HelpAndFeedbackLauncherImpl.java", "java/src/org/chromium/chrome/browser/feedback/ScreenshotTask.java", @@ -50,10 +60,40 @@ diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java "java/src/org/chromium/chrome/browser/findinpage/FindToolbar.java", "java/src/org/chromium/chrome/browser/findinpage/FindToolbarManager.java", "java/src/org/chromium/chrome/browser/findinpage/FindToolbarObserver.java", +@@ -1058,6 +1059,7 @@ chrome_java_sources = [ + "java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSitesMetadataUtils.java", + "java/src/org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesCoordinator.java", + "java/src/org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesLayout.java", ++ "java/src/org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesGridLayout.java", + "java/src/org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesMediator.java", + "java/src/org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesProperties.java", + "java/src/org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesViewBinder.java", +diff --git a/chrome/android/java/res/layout/mv_tiles_layout.xml b/chrome/android/java/res/layout/mv_tiles_layout.xml +--- a/chrome/android/java/res/layout/mv_tiles_layout.xml ++++ b/chrome/android/java/res/layout/mv_tiles_layout.xml +@@ -5,14 +5,9 @@ Use of this source code is governed by a BSD-style license that can be + found in the LICENSE file. + --> + +- +- +- +- ++ android:layout_gravity="center_horizontal" /> diff --git a/chrome/android/java/res/layout/new_tab_page_layout.xml b/chrome/android/java/res/layout/new_tab_page_layout.xml --- a/chrome/android/java/res/layout/new_tab_page_layout.xml +++ b/chrome/android/java/res/layout/new_tab_page_layout.xml -@@ -37,6 +37,13 @@ found in the LICENSE file. +@@ -38,6 +38,13 @@ found in the LICENSE file. android:layout_marginTop="16dp" android:visibility="gone"/> @@ -137,6 +177,32 @@ new file mode 100644 + app:chromeDrawableTint="@color/default_icon_color_light" /> + + +diff --git a/chrome/android/java/res/values/attrs.xml b/chrome/android/java/res/values/attrs.xml +--- a/chrome/android/java/res/values/attrs.xml ++++ b/chrome/android/java/res/values/attrs.xml +@@ -15,6 +15,10 @@ found in the LICENSE file. + + + ++ ++ ++ ++ + + + +diff --git a/chrome/android/java/res/values/dimens.xml b/chrome/android/java/res/values/dimens.xml +--- a/chrome/android/java/res/values/dimens.xml ++++ b/chrome/android/java/res/values/dimens.xml +@@ -129,6 +129,8 @@ found in the LICENSE file. + 62dp + + ++ 6dp ++ 4dp + 20dp + @dimen/signin_promo_lateral_paddings + 17dp diff --git a/chrome/android/java/src/org/chromium/chrome/browser/feedback/ChromeFeedbackCollector.java b/chrome/android/java/src/org/chromium/chrome/browser/feedback/ChromeFeedbackCollector.java --- a/chrome/android/java/src/org/chromium/chrome/browser/feedback/ChromeFeedbackCollector.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/feedback/ChromeFeedbackCollector.java @@ -194,7 +260,7 @@ new file mode 100644 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/identity_disc/IdentityDiscController.java b/chrome/android/java/src/org/chromium/chrome/browser/identity_disc/IdentityDiscController.java --- a/chrome/android/java/src/org/chromium/chrome/browser/identity_disc/IdentityDiscController.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/identity_disc/IdentityDiscController.java -@@ -175,7 +175,10 @@ public class IdentityDiscController +@@ -169,7 +169,10 @@ public class IdentityDiscController mButtonData.setButtonSpec( buttonSpecWithDrawableAndDescription(mButtonData.getButtonSpec(), email)); @@ -209,13 +275,14 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/identity_disc/I diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageNavigationDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageNavigationDelegateImpl.java --- a/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageNavigationDelegateImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageNavigationDelegateImpl.java -@@ -23,9 +23,9 @@ import org.chromium.ui.mojom.WindowOpenDisposition; +@@ -29,10 +29,10 @@ import java.util.List; /** {@link NativePageNavigationDelegate} implementation. */ public class NativePageNavigationDelegateImpl implements NativePageNavigationDelegate { - private final Profile mProfile; + protected final Profile mProfile; private final TabModelSelector mTabModelSelector; + private final TabGroupCreationDialogManager mTabGroupCreationDialogManager; - private final Tab mTab; + protected final Tab mTab; @@ -224,23 +291,23 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/native_page/Nat diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java -@@ -18,6 +18,7 @@ import android.util.AttributeSet; +@@ -16,6 +16,7 @@ import android.text.Editable; + import android.util.AttributeSet; import android.view.DragEvent; - import android.view.Gravity; import android.view.LayoutInflater; +import android.view.ViewStub; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; -@@ -37,6 +38,7 @@ import org.chromium.chrome.browser.compositor.layouts.content.InvalidationAwareT +@@ -32,6 +33,7 @@ import org.chromium.base.supplier.ObservableSupplier; + import org.chromium.chrome.R; import org.chromium.chrome.browser.feed.FeedSurfaceScrollDelegate; - import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.lens.LensEntryPoint; +import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.lens.LensMetrics; import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher; import org.chromium.chrome.browser.logo.LogoBridge.Logo; -@@ -103,6 +105,8 @@ public class NewTabPageLayout extends LinearLayout { +@@ -92,6 +94,8 @@ public class NewTabPageLayout extends LinearLayout { private @Nullable DisplayStyleObserver mDisplayStyleObserver; private CallbackController mCallbackController = new CallbackController(); @@ -249,45 +316,34 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageL /** * Whether the tiles shown in the layout have finished loading. * With {@link #mHasShownView}, it's one of the 2 flags used to track initialisation progress. -@@ -309,6 +313,7 @@ public class NewTabPageLayout extends LinearLayout { - isScrollableMvtEnabled(), - searchProviderIsGoogle); +@@ -104,7 +108,7 @@ public class NewTabPageLayout extends LinearLayout { + */ + private boolean mHasShownView; + +- private boolean mSearchProviderHasLogo = true; ++ private boolean mSearchProviderHasLogo = false; + private boolean mSearchProviderIsGoogle; + private boolean mShowingNonStandardGoogleLogo; + +@@ -278,6 +282,7 @@ public class NewTabPageLayout extends LinearLayout { + initializeMostVisitedTilesCoordinator( + mProfile, lifecycleDispatcher, tileGroupDelegate, touchEnabledDelegate); initializeSearchBoxBackground(); + initializeShortcuts(); initializeSearchBoxTextView(); initializeVoiceSearchButton(); initializeLensButton(); -@@ -782,12 +787,15 @@ public class NewTabPageLayout extends LinearLayout { - marginLayoutParams.leftMargin = lateralPaddingsForNtp; - marginLayoutParams.rightMargin = lateralPaddingsForNtp; - } -- marginLayoutParams.topMargin = -+ // when simplified NTP is enabled the top marging is included in its view's padding -+ if (mShortcutsView == null) { -+ marginLayoutParams.topMargin = - getResources() - .getDimensionPixelSize( - shouldShowLogo() - ? R.dimen.tile_grid_layout_top_margin - : R.dimen.tile_grid_layout_no_logo_top_margin); -+ } - marginLayoutParams.bottomMargin = - getResources() - .getDimensionPixelSize(R.dimen.tile_carousel_layout_bottom_margin); -@@ -795,7 +803,10 @@ public class NewTabPageLayout extends LinearLayout { - // Set a bit more top padding on the tile grid if there is no logo. - ViewGroup.LayoutParams layoutParams = mMvTilesContainerLayout.getLayoutParams(); - layoutParams.width = ViewGroup.LayoutParams.WRAP_CONTENT; -- marginLayoutParams.topMargin = getGridMvtTopMargin(); -+ // when simplified NTP is enabled the top marging is included in its view's padding -+ if (mShortcutsView == null) { -+ marginLayoutParams.topMargin = getGridMvtTopMargin(); -+ } - marginLayoutParams.bottomMargin = getGridMvtBottomMargin(); +@@ -645,7 +650,7 @@ public class NewTabPageLayout extends LinearLayout { + && mInitialized) { + return; } +- mSearchProviderHasLogo = hasLogo; ++ mSearchProviderHasLogo = false; + mSearchProviderIsGoogle = isGoogle; -@@ -1093,6 +1104,22 @@ public class NewTabPageLayout extends LinearLayout { - return iphCommandBuilder; + boolean isSearchProviderMarginUpdated = +@@ -1017,6 +1022,22 @@ public class NewTabPageLayout extends LinearLayout { + return mMostVisitedTilesCoordinator; } + private void initializeShortcuts() { @@ -312,7 +368,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageL diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsNavigationDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsNavigationDelegate.java --- a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsNavigationDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsNavigationDelegate.java -@@ -14,6 +14,11 @@ import org.chromium.chrome.browser.ui.native_page.NativePageHost; +@@ -15,6 +15,11 @@ import org.chromium.chrome.browser.ui.native_page.NativePageHost; import org.chromium.content_public.browser.LoadUrlParams; import org.chromium.ui.base.PageTransition; @@ -324,8 +380,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/Sug /** Extension of {@link NativePageNavigationDelegate} with suggestions-specific methods. */ public class SuggestionsNavigationDelegate extends NativePageNavigationDelegateImpl { public SuggestionsNavigationDelegate( -@@ -25,6 +30,18 @@ public class SuggestionsNavigationDelegate extends NativePageNavigationDelegateI - super(activity, profile, host, tabModelSelector, tab); +@@ -27,6 +32,18 @@ public class SuggestionsNavigationDelegate extends NativePageNavigationDelegateI + super(activity, profile, host, tabModelSelector, tabGroupCreationDialogManager, tab); } + public void navigateToBookmarks() { @@ -343,37 +399,352 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/Sug /** * Opens the suggestions page without recording metrics. * +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSitesBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSitesBridge.java +--- a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSitesBridge.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSitesBridge.java +@@ -21,7 +21,7 @@ public class MostVisitedSitesBridge implements MostVisitedSites { + * Maximum number of tiles that is explicitly supported. UMA relies on this value, so even if + * the UI supports it, getting more can raise unexpected issues. + */ +- public static final int MAX_TILE_COUNT = 12; ++ public static final int MAX_TILE_COUNT = 12 * 2; + + private long mNativeMostVisitedSitesBridge; + +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesCoordinator.java +--- a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesCoordinator.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesCoordinator.java +@@ -38,7 +38,7 @@ public class MostVisitedTilesCoordinator implements ConfigurationChangedObserver + private final MostVisitedTilesMediator mMediator; + private final WindowAndroid mWindowAndroid; + private final UiConfig mUiConfig; +- private final PropertyModelChangeProcessor mModelChangeProcessor; ++ private PropertyModelChangeProcessor mModelChangeProcessor; + private TileRenderer mRenderer; + private ContextMenuManager mContextMenuManager; + private OfflinePageBridge mOfflinePageBridge; +@@ -66,17 +66,11 @@ public class MostVisitedTilesCoordinator implements ConfigurationChangedObserver + mWindowAndroid = windowAndroid; + + ((ViewStub) mvTilesContainerLayout.findViewById(R.id.mv_tiles_layout_stub)).inflate(); +- MostVisitedTilesLayout tilesLayout = ++ MostVisitedTilesGridLayout tilesLayout = + mvTilesContainerLayout.findViewById(R.id.mv_tiles_layout); + + mUiConfig = new UiConfig(tilesLayout); + PropertyModel propertyModel = new PropertyModel(MostVisitedTilesProperties.ALL_KEYS); +- mModelChangeProcessor = +- PropertyModelChangeProcessor.create( +- propertyModel, +- new MostVisitedTilesViewBinder.ViewHolder( +- mvTilesContainerLayout, tilesLayout), +- MostVisitedTilesViewBinder::bind); + mRenderer = + new TileRenderer( + mActivity, SuggestionsConfig.getTileStyle(mUiConfig), TITLE_LINES, null); +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesGridLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesGridLayout.java +new file mode 100644 +--- /dev/null ++++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesGridLayout.java +@@ -0,0 +1,194 @@ ++// Copyright 2015 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.chrome.browser.suggestions.tile; ++ ++import android.content.Context; ++import android.content.res.Configuration; ++import android.content.res.Resources; ++import android.content.res.TypedArray; ++import android.util.AttributeSet; ++import android.util.Pair; ++import android.view.View; ++import android.widget.FrameLayout; ++ ++import androidx.annotation.Nullable; ++import androidx.annotation.VisibleForTesting; ++ ++import org.chromium.base.MathUtils; ++import org.chromium.base.library_loader.LibraryLoader; ++import org.chromium.chrome.R; ++import org.chromium.chrome.browser.flags.ChromeFeatureList; ++import org.chromium.chrome.browser.ntp.FeedPositionUtils; ++import org.chromium.chrome.browser.suggestions.SiteSuggestion; ++import org.chromium.ui.base.DeviceFormFactor; ++ ++/** A layout that arranges tiles in a grid. */ ++public class MostVisitedTilesGridLayout extends FrameLayout { ++ private final int mMinHorizontalSpacing; ++ private final int mMaxHorizontalSpacing; ++ private final int mMaxWidth; ++ ++ private int mVerticalSpacing; ++ private int mMaxRows = 4; ++ private int mMaxColumns = 4; ++ ++ /** ++ * Constructor for inflating from XML. ++ * ++ * @param context The view context in which this item will be shown. ++ * @param attrs The attributes of the XML tag that is inflating the view. ++ */ ++ public MostVisitedTilesGridLayout(Context context, AttributeSet attrs) { ++ super(context, attrs); ++ ++ Resources res = getResources(); ++ mVerticalSpacing = ++ getResources().getDimensionPixelOffset(getGridMVTVerticalSpacingResourcesId()); ++ TypedArray styledAttrs = ++ context.obtainStyledAttributes(attrs, R.styleable.MostVisitedTilesGridLayout); ++ mMinHorizontalSpacing = ++ styledAttrs.getDimensionPixelOffset( ++ R.styleable.MostVisitedTilesGridLayout_minHorizontalSpacing, ++ res.getDimensionPixelOffset( ++ R.dimen.tile_grid_layout_min_horizontal_spacing)); ++ styledAttrs.recycle(); ++ mMaxHorizontalSpacing = Integer.MAX_VALUE; ++ mMaxWidth = Integer.MAX_VALUE; ++ } ++ ++ /** Sets the maximum number of rows to display. Any items that don't fit will be hidden. */ ++ public void setMaxRows(int rows) { ++ mMaxRows = rows; ++ } ++ ++ /** Sets the maximum number of columns to display. Any items that don't fit will be hidden. */ ++ public void setMaxColumns(int columns) { ++ mMaxColumns = columns; ++ } ++ ++ @Override ++ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { ++ int totalWidth = Math.min(MeasureSpec.getSize(widthMeasureSpec), mMaxWidth); ++ int childCount = getChildCount(); ++ if (childCount == 0) { ++ setMeasuredDimension(totalWidth, resolveSize(0, heightMeasureSpec)); ++ return; ++ } ++ ++ // Measure the children. We don't use the ViewGroup.measureChildren() method here because ++ // it only measures visible children. In a situation where a child is invisible before ++ // this measurement and we decide to show it after the measurement, it will not have its ++ // dimensions and will not be displayed. ++ for (int i = 0; i < childCount; i++) { ++ measureChild(getChildAt(i), MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED); ++ } ++ ++ // Determine the number of columns that will fit. ++ int childHeight = getChildAt(0).getMeasuredHeight(); ++ int childWidth = getChildAt(0).getMeasuredWidth(); ++ int numColumns = ++ MathUtils.clamp( ++ (totalWidth + mMinHorizontalSpacing) / (childWidth + mMinHorizontalSpacing), ++ 1, ++ mMaxColumns); ++ ++ // Determine how much padding to use between and around the tiles. ++ int gridWidthMinusColumns = Math.max(0, totalWidth - numColumns * childWidth); ++ Pair gridProperties = ++ computeHorizontalDimensions(gridWidthMinusColumns, numColumns); ++ int gridStart = gridProperties.first; ++ int horizontalSpacing = gridProperties.second; ++ ++ // Limit the number of rows to mMaxRows. ++ int visibleChildCount = Math.min(childCount, mMaxRows * numColumns); ++ ++ // Arrange the visible children in a grid. ++ int numRows = (visibleChildCount + numColumns - 1) / numColumns; ++ int paddingTop = getPaddingTop(); ++ boolean isRtl = getLayoutDirection() == LAYOUT_DIRECTION_RTL; ++ ++ for (int i = 0; i < visibleChildCount; i++) { ++ View child = getChildAt(i); ++ child.setVisibility(View.VISIBLE); ++ int row = i / numColumns; ++ int column = i % numColumns; ++ int childTop = row * (childHeight + mVerticalSpacing); ++ int childStart = gridStart + (column * (childWidth + horizontalSpacing)); ++ MarginLayoutParams layoutParams = (MarginLayoutParams) child.getLayoutParams(); ++ layoutParams.setMargins(isRtl ? 0 : childStart, childTop, isRtl ? childStart : 0, 0); ++ child.setLayoutParams(layoutParams); ++ } ++ ++ // Hide any extra children in case there are more than needed for the maximum number of ++ // rows. ++ for (int i = visibleChildCount; i < childCount; i++) { ++ getChildAt(i).setVisibility(View.GONE); ++ } ++ ++ int totalHeight = ++ paddingTop ++ + getPaddingBottom() ++ + numRows * childHeight ++ + (numRows - 1) * mVerticalSpacing; ++ ++ setMeasuredDimension(totalWidth, resolveSize(totalHeight, heightMeasureSpec)); ++ } ++ ++ /** ++ * @param availableWidth The space available to spread between and around the tiles. ++ * @param numColumns The number of columns to be organised. ++ * @return The [gridStart, horizontalSpacing] pair of dimensions. ++ */ ++ @VisibleForTesting ++ Pair computeHorizontalDimensions(int availableWidth, int numColumns) { ++ int gridStart; ++ float horizontalSpacing; ++ ++ // Identically sized spacers are added both between and around the tiles. ++ int spacerCount = numColumns + 1; ++ horizontalSpacing = (float) availableWidth / spacerCount; ++ gridStart = Math.round(horizontalSpacing); ++ ++ if (horizontalSpacing < mMinHorizontalSpacing ++ || horizontalSpacing > mMaxHorizontalSpacing) { ++ // Ensure column spacing isn't greater than mMaxHorizontalSpacing. ++ long gridSidePadding = availableWidth - (long) mMaxHorizontalSpacing * (numColumns - 1); ++ if (gridSidePadding > 0) { ++ horizontalSpacing = mMaxHorizontalSpacing; ++ gridStart = (int) (gridSidePadding / 2); ++ } else { ++ horizontalSpacing = (float) availableWidth / Math.max(1, numColumns - 1); ++ gridStart = 0; ++ } ++ } ++ int screenWidth = getResources().getDisplayMetrics().widthPixels; ++ int screenHeight = getResources().getDisplayMetrics().heightPixels; ++ String logMessage = ++ "|horizontalSpacing| = " ++ + horizontalSpacing ++ + " |numColumns| = " ++ + numColumns ++ + " |availableWidth| = " ++ + availableWidth ++ + " |screenWidth| = " ++ + screenWidth ++ + " |screenHeight| = " ++ + screenHeight ++ + "."; ++ assert horizontalSpacing >= mMinHorizontalSpacing ++ : "Horizontal spacing shouldn't be smaller than minimal horizontal spacing: " ++ + logMessage; ++ assert horizontalSpacing <= mMaxHorizontalSpacing ++ : "Horizontal spacing shouldn't be larger than maximal horizontal spacing: " ++ + logMessage; ++ ++ return Pair.create(gridStart, Math.round(horizontalSpacing)); ++ } ++ ++ // TODO(crbug.com/40226731): Remove this method when the Feed position experiment is cleaned up. ++ private int getGridMVTVerticalSpacingResourcesId() { ++ return R.dimen.tile_grid_layout_vertical_spacing; ++ } ++} +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesMediator.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesMediator.java +--- a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesMediator.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/tile/MostVisitedTilesMediator.java +@@ -12,6 +12,7 @@ import static org.chromium.chrome.browser.suggestions.tile.MostVisitedTilesPrope + + import android.content.res.Configuration; + import android.content.res.Resources; ++import android.view.ViewGroup; + import android.view.ViewStub; + + import androidx.annotation.Nullable; +@@ -37,7 +38,7 @@ public class MostVisitedTilesMediator implements TileGroup.Observer, TemplateUrl + + private final Resources mResources; + private final UiConfig mUiConfig; +- private final MostVisitedTilesLayout mMvTilesLayout; ++ private final ViewGroup mMvTilesLayout; + private final ViewStub mNoMvPlaceholderStub; + private final PropertyModel mModel; + private final boolean mIsTablet; +@@ -59,7 +60,7 @@ public class MostVisitedTilesMediator implements TileGroup.Observer, TemplateUrl + public MostVisitedTilesMediator( + Resources resources, + UiConfig uiConfig, +- MostVisitedTilesLayout mvTilesLayout, ++ ViewGroup mvTilesLayout, + ViewStub noMvPlaceholderStub, + TileRenderer renderer, + PropertyModel propertyModel, +@@ -166,8 +167,8 @@ public class MostVisitedTilesMediator implements TileGroup.Observer, TemplateUrl + } + + public void destroy() { +- if (mMvTilesLayout != null) { +- mMvTilesLayout.destroy(); ++ if (mMvTilesLayout instanceof MostVisitedTilesLayout) { ++ ((MostVisitedTilesLayout)mMvTilesLayout).destroy(); + } + + if (mTileGroup != null) { +diff --git a/chrome/browser/engagement/important_sites_util.cc b/chrome/browser/engagement/important_sites_util.cc +--- a/chrome/browser/engagement/important_sites_util.cc ++++ b/chrome/browser/engagement/important_sites_util.cc +@@ -66,7 +66,7 @@ static const int kTimesIgnoredForSuppression = 3; + // These are the maximum # of bookmarks we can use as signals. If the user has + // <= kMaxBookmarks, then we just use those bookmarks. Otherwise we filter all + // bookmarks on site engagement > 0, sort, and trim to kMaxBookmarks. +-static const int kMaxBookmarks = 5; ++static const int kMaxBookmarks = 4 * 4 + 2; + + // We need this to be a macro, as the histogram macros cache their pointers + // after the first call, so when we change the uma name we check fail if we're 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 -@@ -223,6 +223,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { - &kGridTabSwitcherAndroidAnimations, +@@ -240,6 +240,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { + &kGcmNativeBackgroundTask, &kIncognitoReauthenticationForAndroid, &kIncognitoScreenshot, + &kSimplifiedNTP, - &kInstantStart, &kLensOnQuickActionSearchWidget, + &kLogoPolish, &kMagicStackAndroid, 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 -@@ -325,6 +325,7 @@ public abstract class ChromeFeatureList { - "LookalikeUrlNavigationSuggestionsUI"; - public static final String MAGIC_STACK_ANDROID = "MagicStackAndroid"; +@@ -349,6 +349,7 @@ public abstract class ChromeFeatureList { + public static final String MAYLAUNCHURL_USES_SEPARATE_STORAGE_PARTITION = + "MayLaunchUrlUsesSeparateStoragePartition"; public static final String MESSAGES_FOR_ANDROID_ADS_BLOCKED = "MessagesForAndroidAdsBlocked"; + public static final String SIMPLIFIED_NTP = "SimplifiedNTP"; - public static final String MESSAGES_FOR_ANDROID_INFRASTRUCTURE = - "MessagesForAndroidInfrastructure"; public static final String SEARCH_READY_OMNIBOX = "SearchReadyOmnibox"; -@@ -634,7 +635,7 @@ public abstract class ChromeFeatureList { - newCachedFlag(ACCOUNT_REAUTHENTICATION_RECENT_TIME_WINDOW, true); - public static final CachedFlag sStartSurfaceWithAccessibility = - newCachedFlag(START_SURFACE_WITH_ACCESSIBILITY, true); + public static final String MIGRATE_ACCOUNT_MANAGEMENT_SETTINGS_TO_CAPABILITIES = + "MigrateAccountManagementSettingsToCapabilities"; +@@ -625,7 +626,7 @@ public abstract class ChromeFeatureList { + public static final CachedFlag sIncognitoReauthenticationForAndroid = + newCachedFlag(INCOGNITO_REAUTHENTICATION_FOR_ANDROID, true); + public static final CachedFlag sLogoPolish = newCachedFlag(LOGO_POLISH, false); +- public static final CachedFlag sMagicStackAndroid = newCachedFlag(MAGIC_STACK_ANDROID, true); ++ public static final CachedFlag sMagicStackAndroid = newCachedFlag(MAGIC_STACK_ANDROID, false); + public static final CachedFlag sMultiInstanceApplicationStatusCleanup = + newCachedFlag(MUlTI_INSTANCE_APPLICATION_STATUS_CLEANUP, false); + public static final CachedFlag sNavBarColorMatchesTabBackground = +@@ -658,7 +659,7 @@ public abstract class ChromeFeatureList { + newCachedFlag(START_SURFACE_RETURN_TIME, true); + public static final CachedFlag sStopAppIndexingReport = + newCachedFlag(STOP_APP_INDEXING_REPORT, true); - public static final CachedFlag sSurfacePolish = newCachedFlag(SURFACE_POLISH, true); + public static final CachedFlag sSurfacePolish = newCachedFlag(SURFACE_POLISH, false); + public static final CachedFlag sSurfacePolishForToolbarKillSwitch = + newCachedFlag(SURFACE_POLISH_FOR_TOOLBAR_KILL_SWITCH, true); public static final CachedFlag sTabDragDropAsWindowAndroid = - newCachedFlag(TAB_DRAG_DROP_ANDROID, false); - public static final CachedFlag sTabGroupPaneAndroid = +diff --git a/components/history/core/browser/top_sites_impl.h b/components/history/core/browser/top_sites_impl.h +--- a/components/history/core/browser/top_sites_impl.h ++++ b/components/history/core/browser/top_sites_impl.h +@@ -40,7 +40,7 @@ class TopSitesImplTest; + struct SitesAndQueriesRequest; + + // How many top sites to store in the cache. +-static constexpr size_t kTopSitesNumber = 10; ++static constexpr size_t kTopSitesNumber = 4 * 4 + 2; + + // This class allows requests for most visited urls on any thread. All other + // methods must be invoked on the UI thread. All mutations to internal state diff --git a/cromite_flags/chrome/browser/about_flags_cc/Restore-Simplified-NTP-launch.inc b/cromite_flags/chrome/browser/about_flags_cc/Restore-Simplified-NTP-launch.inc new file mode 100644 --- /dev/null @@ -395,12 +766,13 @@ diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/R new file mode 100644 --- /dev/null +++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Restore-Simplified-NTP-launch.inc -@@ -0,0 +1,5 @@ +@@ -0,0 +1,6 @@ +CROMITE_FEATURE(kSimplifiedNTP, + "SimplifiedNTP", + base::FEATURE_ENABLED_BY_DEFAULT); + +SET_CROMITE_FEATURE_DISABLED(kSurfacePolish); ++SET_CROMITE_FEATURE_DISABLED(kMagicStackAndroid); diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Restore-Simplified-NTP-launch.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/Restore-Simplified-NTP-launch.inc new file mode 100644 --- /dev/null diff --git a/build/cromite_patches/Restore-adaptive-button-in-top-toolbar-customization.patch b/build/cromite_patches/Restore-adaptive-button-in-top-toolbar-customization.patch index 455ebcca..e64267d3 100644 --- a/build/cromite_patches/Restore-adaptive-button-in-top-toolbar-customization.patch +++ b/build/cromite_patches/Restore-adaptive-button-in-top-toolbar-customization.patch @@ -13,24 +13,28 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html chrome/browser/flag-metadata.json | 3 +- .../flags/android/chrome_feature_list.cc | 5 ++ .../browser/flags/ChromeFeatureList.java | 1 + - .../AdaptiveToolbarButtonController.java | 6 +- + .../AdaptiveToolbarButtonController.java | 9 +++ .../adaptive/AdaptiveToolbarFeatures.java | 65 ++++++++++++++++++- + .../adaptive/AdaptiveToolbarPrefs.java | 2 +- .../AdaptiveToolbarStatePredictor.java | 9 ++- .../AdaptiveToolbarStatePredictorTest.java | 15 +++++ - 10 files changed, 138 insertions(+), 12 deletions(-) + ...oButtonGroupAdaptiveToolbarPreference.java | 1 + + ...ve-button-in-top-toolbar-customization.inc | 3 + + 13 files changed, 147 insertions(+), 12 deletions(-) + create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Restore-adaptive-button-in-top-toolbar-customization.inc diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java --- a/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java -@@ -46,6 +46,7 @@ import org.chromium.chrome.browser.sync.settings.ManageSyncSettings; +@@ -50,6 +50,7 @@ import org.chromium.chrome.browser.sync.settings.ManageSyncSettings; import org.chromium.chrome.browser.sync.settings.SignInPreference; import org.chromium.chrome.browser.sync.settings.SyncPromoPreference; import org.chromium.chrome.browser.sync.settings.SyncSettingsUtils; +import org.chromium.chrome.browser.toolbar.adaptive.AdaptiveToolbarFeatures; import org.chromium.chrome.browser.toolbar.adaptive.AdaptiveToolbarStatePredictor; import org.chromium.chrome.browser.tracing.settings.DeveloperSettings; - import org.chromium.chrome.browser.ui.signin.SyncPromoController; -@@ -247,7 +248,7 @@ public class MainSettings extends ChromeBaseSettingsFragment + import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; +@@ -272,7 +273,7 @@ public class MainSettings extends ChromeBaseSettingsFragment uiState -> { // We don't show the toolbar shortcut settings page if disabled from // finch. @@ -89,7 +93,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/share/ShareButt diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc -@@ -658,18 +658,12 @@ const FeatureEntry::FeatureParam kAdaptiveButtonCustomization_Share[] = { +@@ -657,18 +657,12 @@ const FeatureEntry::FeatureParam kAdaptiveButtonCustomization_Share[] = { {"default_segment", "share"}, {"show_ui_only_after_ready", "false"}, {"ignore_segmentation_results", "true"}}; @@ -111,14 +115,14 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json -@@ -42,9 +42,10 @@ - "expiry_milestone": 125 +@@ -47,9 +47,10 @@ + "expiry_milestone": 130 }, { + // restored in Bromite "name": "adaptive-button-in-top-toolbar-customization", "owners": [ "salg@google.com", "chrome-segmentation-platform@google.com" ], -- "expiry_milestone": 125 +- "expiry_milestone": 130 + "expiry_milestone": -1 }, { @@ -126,31 +130,31 @@ diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.js 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 -@@ -150,6 +150,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -155,6 +155,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { + &history::kOrganicRepeatableQueries, &history_clusters::internal::kJourneys, &history_clusters::internal::kOmniboxAction, - &history_clusters::internal::kOmniboxHistoryClusterProvider, + &kAdaptiveButtonInTopToolbar, &kAdaptiveButtonInTopToolbarTranslate, &kAdaptiveButtonInTopToolbarAddToBookmarks, &kAdaptiveButtonInTopToolbarCustomizationV2, -@@ -388,6 +389,10 @@ static jlong JNI_ChromeFeatureMap_GetNativeMap(JNIEnv* env) { +@@ -406,6 +407,10 @@ static jlong JNI_ChromeFeatureMap_GetNativeMap(JNIEnv* env) { // Alphabetical: +CROMITE_FEATURE(kAdaptiveButtonInTopToolbar, + "AdaptiveButtonInTopToolbar", -+ base::FEATURE_DISABLED_BY_DEFAULT); ++ base::FEATURE_ENABLED_BY_DEFAULT); + BASE_FEATURE(kAdaptiveButtonInTopToolbarTranslate, "AdaptiveButtonInTopToolbarTranslate", - base::FEATURE_DISABLED_BY_DEFAULT); + base::FEATURE_ENABLED_BY_DEFAULT); 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 -@@ -142,6 +142,7 @@ public abstract class ChromeFeatureList { - } - +@@ -154,6 +154,7 @@ public abstract class ChromeFeatureList { + public static final String ACCOUNT_REAUTHENTICATION_RECENT_TIME_WINDOW = + "AccountReauthenticationRecentTimeWindow"; public static final String ALLOW_USER_CERTIFICATES = "AllowUserCertificates"; + public static final String ADAPTIVE_BUTTON_IN_TOP_TOOLBAR = "AdaptiveButtonInTopToolbar"; public static final String ADAPTIVE_BUTTON_IN_TOP_TOOLBAR_TRANSLATE = @@ -159,23 +163,26 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarButtonController.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarButtonController.java --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarButtonController.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarButtonController.java -@@ -253,7 +253,11 @@ public class AdaptiveToolbarButtonController +@@ -278,6 +278,15 @@ public class AdaptiveToolbarButtonController + new AdaptiveToolbarStatePredictor(profile, mAndroidPermissionDelegate); + ContextUtils.getAppSharedPreferences().registerOnSharedPreferenceChangeListener(this); - @Override - public void onFinishNativeInitialization() { -- if (AdaptiveToolbarFeatures.isCustomizationEnabled()) { + if (AdaptiveToolbarFeatures.isSingleVariantModeEnabled()) { + @AdaptiveToolbarButtonVariant + int variant = AdaptiveToolbarFeatures.getSingleVariantMode(); + setSingleProvider(variant); -+ } else if (AdaptiveToolbarFeatures.isCustomizationEnabled()) { - mAdaptiveToolbarStatePredictor.recomputeUiState( - uiState -> { - mSessionButtonVariant = ++ ++ mOriginalButtonSpec = null; ++ notifyObservers(mButtonData.canShow()); ++ return; ++ } + if (!AdaptiveToolbarFeatures.isCustomizationEnabled()) return; + mAdaptiveToolbarStatePredictor.recomputeUiState(mUiStateCallback); + AdaptiveToolbarStats.recordSelectedSegmentFromSegmentationPlatformAsync( diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarFeatures.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarFeatures.java --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarFeatures.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarFeatures.java -@@ -17,8 +17,18 @@ import org.chromium.chrome.browser.readaloud.ReadAloudFeatures; +@@ -16,8 +16,18 @@ import org.chromium.chrome.browser.readaloud.ReadAloudFeatures; import java.util.HashMap; @@ -195,7 +202,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow /** Finch default group for new tab variation. */ static final String NEW_TAB = "new-tab"; -@@ -34,6 +44,7 @@ public class AdaptiveToolbarFeatures { +@@ -33,6 +43,7 @@ public class AdaptiveToolbarFeatures { private static final String VARIATION_PARAM_DISABLE_UI = "disable_ui"; private static final String VARIATION_PARAM_IGNORE_SEGMENTATION_RESULTS = "ignore_segmentation_results"; @@ -203,7 +210,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow private static final String VARIATION_PARAM_SHOW_UI_ONLY_AFTER_READY = "show_ui_only_after_ready"; @VisibleForTesting static final String VARIATION_PARAM_MIN_VERSION = "min_version_adaptive"; -@@ -102,6 +113,21 @@ public class AdaptiveToolbarFeatures { +@@ -113,6 +124,21 @@ public class AdaptiveToolbarFeatures { } } @@ -225,7 +232,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow /** * Returns whether the adaptive toolbar is enabled with segmentation and customization. * -@@ -242,11 +268,48 @@ public class AdaptiveToolbarFeatures { +@@ -252,11 +278,48 @@ public class AdaptiveToolbarFeatures { ChromeFeatureList.CONTEXTUAL_PAGE_ACTIONS, "enable_ui", true); } @@ -274,10 +281,22 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow assert isCustomizationEnabled(); if (sButtonVariant != null) return sButtonVariant; String defaultSegment = getDefaultSegment(); +diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarPrefs.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarPrefs.java +--- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarPrefs.java ++++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarPrefs.java +@@ -21,7 +21,7 @@ public class AdaptiveToolbarPrefs { + */ + public static boolean isCustomizationPreferenceEnabled() { + return ChromeSharedPreferences.getInstance() +- .readBoolean(ADAPTIVE_TOOLBAR_CUSTOMIZATION_ENABLED, true); ++ .readBoolean(ADAPTIVE_TOOLBAR_CUSTOMIZATION_ENABLED, false); + } + + /** diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarStatePredictor.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarStatePredictor.java --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarStatePredictor.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarStatePredictor.java -@@ -87,10 +87,15 @@ public class AdaptiveToolbarStatePredictor { +@@ -91,10 +91,15 @@ public class AdaptiveToolbarStatePredictor { // Early return if the feature isn't enabled. if (!AdaptiveToolbarFeatures.isCustomizationEnabled()) { @@ -298,7 +317,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarStatePredictorTest.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarStatePredictorTest.java --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarStatePredictorTest.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarStatePredictorTest.java -@@ -72,6 +72,21 @@ public class AdaptiveToolbarStatePredictorTest { +@@ -74,6 +74,21 @@ public class AdaptiveToolbarStatePredictorTest { statePredictor.recomputeUiState(verifyResultCallback(expected)); } @@ -320,4 +339,23 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow @Test @SmallTest public void testManualOverride() { +diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/settings/RadioButtonGroupAdaptiveToolbarPreference.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/settings/RadioButtonGroupAdaptiveToolbarPreference.java +--- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/settings/RadioButtonGroupAdaptiveToolbarPreference.java ++++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/settings/RadioButtonGroupAdaptiveToolbarPreference.java +@@ -57,6 +57,7 @@ public class RadioButtonGroupAdaptiveToolbarPreference extends Preference + mAutoButton = + (RadioButtonWithDescription) + holder.findViewById(R.id.adaptive_option_based_on_usage); ++ mAutoButton.setVisibility(View.GONE); + mNewTabButton = + (RadioButtonWithDescription) holder.findViewById(R.id.adaptive_option_new_tab); + mShareButton = (RadioButtonWithDescription) holder.findViewById(R.id.adaptive_option_share); +diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Restore-adaptive-button-in-top-toolbar-customization.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Restore-adaptive-button-in-top-toolbar-customization.inc +new file mode 100644 +--- /dev/null ++++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/Restore-adaptive-button-in-top-toolbar-customization.inc +@@ -0,0 +1,3 @@ ++SET_CROMITE_FEATURE_ENABLED(kAdaptiveButtonInTopToolbarCustomizationV2); ++ ++SET_CROMITE_FEATURE_DISABLED(kAdaptiveButtonInTopToolbarTranslate); -- diff --git a/build/cromite_patches/Restore-classic-new-tab-page.patch b/build/cromite_patches/Restore-classic-new-tab-page.patch index 19f93aa5..3a4b818b 100644 --- a/build/cromite_patches/Restore-classic-new-tab-page.patch +++ b/build/cromite_patches/Restore-classic-new-tab-page.patch @@ -4,13 +4,13 @@ Subject: Restore classic new tab page License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/browser/search/search.cc | 55 +-------------------------------- - 1 file changed, 1 insertion(+), 54 deletions(-) + chrome/browser/search/search.cc | 53 +-------------------------------- + 1 file changed, 1 insertion(+), 52 deletions(-) diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc --- a/chrome/browser/search/search.cc +++ b/chrome/browser/search/search.cc -@@ -98,17 +98,6 @@ enum NewTabURLState { +@@ -95,17 +95,6 @@ enum NewTabURLState { NEW_TAB_URL_MAX }; @@ -28,13 +28,12 @@ diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc bool IsMatchingServiceWorker(const GURL& my_url, const GURL& document_url) { // The origin should match. if (!MatchesOrigin(my_url, document_url)) { -@@ -145,23 +134,6 @@ bool IsNTPOrRelatedURLHelper(const GURL& url, Profile* profile) { +@@ -142,21 +131,6 @@ bool IsNTPOrRelatedURLHelper(const GURL& url, Profile* profile) { IsMatchingServiceWorker(url, new_tab_url)); } -bool IsURLAllowedForSupervisedUser(const GURL& url, Profile& profile) { --#if BUILDFLAG(ENABLE_SUPERVISED_USERS) -- if (!supervised_user::IsUrlFilteringEnabled(*profile.GetPrefs())) { +- if (!supervised_user::IsSubjectToParentalControls(*profile.GetPrefs())) { - return true; - } - supervised_user::SupervisedUserService* supervised_user_service = @@ -45,14 +44,13 @@ diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc - supervised_user::FilteringBehavior::kBlock) { - return false; - } --#endif - return true; -} - // Used to look up the URL to use for the New Tab page. Also tracks how we // arrived at that URL so it can be logged with UMA. struct NewTabURLDetails { -@@ -184,33 +156,8 @@ struct NewTabURLDetails { +@@ -179,33 +153,8 @@ struct NewTabURLDetails { const GURL local_url(default_is_google ? chrome::kChromeUINewTabPageURL : chrome::kChromeUINewTabPageThirdPartyURL); diff --git a/build/cromite_patches/Restore-offline-indicator-v2-flag.patch b/build/cromite_patches/Restore-offline-indicator-v2-flag.patch index ec90f355..aeca5ab5 100644 --- a/build/cromite_patches/Restore-offline-indicator-v2-flag.patch +++ b/build/cromite_patches/Restore-offline-indicator-v2-flag.patch @@ -92,9 +92,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/in diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java --- a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java -@@ -1101,7 +1101,8 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { +@@ -1130,7 +1130,8 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { private void initStatusIndicatorCoordinator(LayoutManagerImpl layoutManager) { - // TODO(crbug.com/1035584): Disable on tablets for now as we need to do one or two extra + // TODO(crbug.com/40112282): Disable on tablets for now as we need to do one or two extra // things for tablets. - if (DeviceFormFactor.isNonMultiDisplayContextOnTablet(mActivity)) { + if (DeviceFormFactor.isNonMultiDisplayContextOnTablet(mActivity) @@ -102,7 +102,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/Tab return; } -@@ -1135,6 +1136,11 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { +@@ -1164,6 +1165,11 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator { hubManager.setStatusIndicatorHeight(mStatusIndicatorHeight); }); @@ -117,18 +117,18 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/Tab diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc --- a/chrome/browser/flags/android/chrome_feature_list.cc +++ b/chrome/browser/flags/android/chrome_feature_list.cc -@@ -234,6 +234,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { +@@ -252,6 +252,7 @@ const base::Feature* const kFeaturesExposedToJava[] = { + &kNewTabSearchEngineUrlAndroid, &kNotificationPermissionVariant, &kNotificationPermissionBottomSheet, - &kOpenDownloadDialog, + &kOfflineIndicatorV2, &kPageAnnotationsService, - &kPaintPreviewNewColdStartHeuristic, &kPreconnectOnTabCreation, + &kPriceChangeModule, 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 -@@ -342,6 +342,7 @@ public abstract class ChromeFeatureList { +@@ -364,6 +364,7 @@ public abstract class ChromeFeatureList { public static final String NOTIFICATION_PERMISSION_VARIANT = "NotificationPermissionVariant"; public static final String NOTIFICATION_PERMISSION_BOTTOM_SHEET = "NotificationPermissionBottomSheet"; diff --git a/build/cromite_patches/Revert-Delete-block-external-form-redirects.patch b/build/cromite_patches/Revert-Delete-block-external-form-redirects.patch index c8284b06..fa99eb5e 100644 --- a/build/cromite_patches/Revert-Delete-block-external-form-redirects.patch +++ b/build/cromite_patches/Revert-Delete-block-external-form-redirects.patch @@ -18,7 +18,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/components/external_intents/android/external_intents_features.cc b/components/external_intents/android/external_intents_features.cc --- a/components/external_intents/android/external_intents_features.cc +++ b/components/external_intents/android/external_intents_features.cc -@@ -20,7 +20,6 @@ namespace { +@@ -22,7 +22,6 @@ namespace { const base::Feature* kFeaturesExposedToJava[] = { &kExternalNavigationDebugLogs, &kBlockFrameRenavigations, &kBlockIntentsToSelf, &kTrustedClientGestureBypass}; @@ -26,7 +26,7 @@ diff --git a/components/external_intents/android/external_intents_features.cc b/ } // namespace // Alphabetical: -@@ -41,7 +40,13 @@ BASE_FEATURE(kTrustedClientGestureBypass, +@@ -43,7 +42,13 @@ BASE_FEATURE(kTrustedClientGestureBypass, "TrustedClientGestureBypass", base::FEATURE_ENABLED_BY_DEFAULT); @@ -70,7 +70,7 @@ diff --git a/components/external_intents/android/java/src/org/chromium/component diff --git a/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java b/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java --- a/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java +++ b/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java -@@ -1551,6 +1551,12 @@ public class ExternalNavigationHandler { +@@ -1545,6 +1545,12 @@ public class ExternalNavigationHandler { || ignoreBackForwardNav(params); } @@ -83,7 +83,7 @@ diff --git a/components/external_intents/android/java/src/org/chromium/component private OverrideUrlLoadingResult shouldOverrideUrlLoadingInternal( ExternalNavigationParams params, Intent targetIntent, -@@ -1614,6 +1620,21 @@ public class ExternalNavigationHandler { +@@ -1608,6 +1614,21 @@ public class ExternalNavigationHandler { return OverrideUrlLoadingResult.forNoOverride(); } diff --git a/build/cromite_patches/Revert-flags-remove-disable-pull-to-refresh-effect.patch b/build/cromite_patches/Revert-flags-remove-disable-pull-to-refresh-effect.patch index 0a6b60d7..f30a2a3e 100644 --- a/build/cromite_patches/Revert-flags-remove-disable-pull-to-refresh-effect.patch +++ b/build/cromite_patches/Revert-flags-remove-disable-pull-to-refresh-effect.patch @@ -15,7 +15,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json -@@ -1843,6 +1843,10 @@ +@@ -2069,6 +2069,10 @@ "yangsharon@google.com", "alexmos@google.com", "creis@google.com" ], "expiry_milestone": 140 }, diff --git a/build/cromite_patches/Revert-removal-of-execution-context-address-space.patch b/build/cromite_patches/Revert-removal-of-execution-context-address-space.patch index ccf4fd46..f724288f 100644 --- a/build/cromite_patches/Revert-removal-of-execution-context-address-space.patch +++ b/build/cromite_patches/Revert-removal-of-execution-context-address-space.patch @@ -28,8 +28,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html ...ed_service_worker_module_script_fetcher.cc | 1 + .../modulescript/module_script_loader_test.cc | 1 + .../worker_module_script_fetcher.cc | 3 +- - .../renderer/core/workers/dedicated_worker.cc | 22 +++++++----- - .../renderer/core/workers/dedicated_worker.h | 4 ++- + .../renderer/core/workers/dedicated_worker.cc | 14 ++++++-- + .../renderer/core/workers/dedicated_worker.h | 5 ++- .../workers/dedicated_worker_global_scope.cc | 9 ++++- .../workers/dedicated_worker_global_scope.h | 1 + .../workers/global_scope_creation_params.cc | 2 ++ @@ -53,7 +53,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../audio_worklet_global_scope_test.cc | 1 + .../webaudio/audio_worklet_thread_test.cc | 1 + .../worklet/worklet_thread_test_common.cc | 2 +- - 36 files changed, 192 insertions(+), 24 deletions(-) + 36 files changed, 191 insertions(+), 18 deletions(-) create mode 100644 cromite_flags/content/public/common/content_features_cc/Revert-removal-of-execution-context-address-space.inc diff --git a/cromite_flags/content/public/common/content_features_cc/Revert-removal-of-execution-context-address-space.inc b/cromite_flags/content/public/common/content_features_cc/Revert-removal-of-execution-context-address-space.inc @@ -66,7 +66,7 @@ new file mode 100644 diff --git a/third_party/blink/renderer/core/execution_context/execution_context.cc b/third_party/blink/renderer/core/execution_context/execution_context.cc --- a/third_party/blink/renderer/core/execution_context/execution_context.cc +++ b/third_party/blink/renderer/core/execution_context/execution_context.cc -@@ -511,6 +511,15 @@ void ExecutionContext::SetReferrerPolicy( +@@ -519,6 +519,15 @@ void ExecutionContext::SetReferrerPolicy( policy_container_->UpdateReferrerPolicy(referrer_policy); } @@ -93,7 +93,7 @@ diff --git a/third_party/blink/renderer/core/execution_context/execution_context #include "services/network/public/mojom/referrer_policy.mojom-blink-forward.h" #include "third_party/blink/public/common/tokens/tokens.h" #include "third_party/blink/public/common/user_agent/user_agent_metadata.h" -@@ -385,6 +386,9 @@ class CORE_EXPORT ExecutionContext : public Supplementable, +@@ -386,6 +387,9 @@ class CORE_EXPORT ExecutionContext : public Supplementable, const String& message = g_empty_string, const String& source_file = g_empty_string) const {} @@ -110,7 +110,7 @@ diff --git a/third_party/blink/renderer/core/exported/web_shared_worker_impl.cc MakeGarbageCollected(), std::make_unique( std::move(content_settings)), -+ absl::nullopt /* response_address_space */, ++ std::nullopt /* response_address_space */, nullptr /* inherited_trial_features */, devtools_worker_token, std::move(worker_settings), mojom::blink::V8CacheOptions::kDefault, nullptr /* worklet_module_response_map */, @@ -171,7 +171,7 @@ diff --git a/third_party/blink/renderer/core/frame/policy_container.h b/third_pa diff --git a/third_party/blink/renderer/core/frame/web_frame_test.cc b/third_party/blink/renderer/core/frame/web_frame_test.cc --- a/third_party/blink/renderer/core/frame/web_frame_test.cc +++ b/third_party/blink/renderer/core/frame/web_frame_test.cc -@@ -8083,6 +8083,40 @@ TEST_F(WebFrameTest, PushStateStartsAndStops) { +@@ -8087,6 +8087,40 @@ TEST_F(WebFrameTest, PushStateStartsAndStops) { EXPECT_EQ(client.StopLoadingCount(), 2); } @@ -237,7 +237,7 @@ diff --git a/third_party/blink/renderer/core/loader/modulescript/installed_servi diff --git a/third_party/blink/renderer/core/loader/modulescript/module_script_loader_test.cc b/third_party/blink/renderer/core/loader/modulescript/module_script_loader_test.cc --- a/third_party/blink/renderer/core/loader/modulescript/module_script_loader_test.cc +++ b/third_party/blink/renderer/core/loader/modulescript/module_script_loader_test.cc -@@ -228,6 +228,7 @@ void ModuleScriptLoaderTest::InitializeForWorklet() { +@@ -216,6 +216,7 @@ void ModuleScriptLoaderTest::InitializeForWorklet() { network::mojom::ReferrerPolicy::kDefault, security_origin_.get(), true /* is_secure_context */, HttpsState::kModern, nullptr /* worker_clients */, nullptr /* content_settings_client */, @@ -268,34 +268,23 @@ diff --git a/third_party/blink/renderer/core/loader/modulescript/worker_module_s diff --git a/third_party/blink/renderer/core/workers/dedicated_worker.cc b/third_party/blink/renderer/core/workers/dedicated_worker.cc --- a/third_party/blink/renderer/core/workers/dedicated_worker.cc +++ b/third_party/blink/renderer/core/workers/dedicated_worker.cc -@@ -276,12 +276,12 @@ void DedicatedWorker::OnHostCreated( - if (options_->type() == script_type_names::kModule) { - // Specify empty source code etc. here because scripts will be fetched on - // the worker thread. -- ContinueStart(script_request_url_, -- nullptr /* worker_main_script_load_params */, -- network::mojom::ReferrerPolicy::kDefault, -- Vector(), -- String() /* source_code */, reject_coep_unsafe_none, -- std::move(back_forward_cache_controller_host)); -+ ContinueStart( -+ script_request_url_, nullptr /* worker_main_script_load_params */, -+ network::mojom::ReferrerPolicy::kDefault, -+ Vector(), -+ absl::nullopt /* response_address_space */, String() /* source_code */, -+ reject_coep_unsafe_none, std::move(back_forward_cache_controller_host)); +@@ -300,6 +300,7 @@ void DedicatedWorker::OnHostCreated( + nullptr /* worker_main_script_load_params */, + network::mojom::ReferrerPolicy::kDefault, + Vector(), ++ std::nullopt /* response_address_space */, + String() /* source_code */, reject_coep_unsafe_none, + std::move(back_forward_cache_controller_host)); return; - } - NOTREACHED() << "Invalid type: " << IDLEnumAsString(options_->type()); -@@ -329,6 +329,7 @@ void DedicatedWorker::OnScriptLoadStarted( +@@ -355,6 +356,7 @@ void DedicatedWorker::OnScriptLoadStarted( ContinueStart(script_request_url_, std::move(worker_main_script_load_params), network::mojom::ReferrerPolicy::kDefault, Vector(), -+ absl::nullopt /* response_address_space */, ++ std::nullopt /* response_address_space */, String() /* source_code */, RejectCoepUnsafeNone(false), std::move(back_forward_cache_controller_host)); } -@@ -392,6 +393,7 @@ void DedicatedWorker::OnFinished( +@@ -427,6 +429,7 @@ void DedicatedWorker::OnFinished( ? mojo::Clone(classic_script_loader_->GetContentSecurityPolicy() ->GetParsedPolicies()) : Vector(), @@ -303,15 +292,39 @@ diff --git a/third_party/blink/renderer/core/workers/dedicated_worker.cc b/third classic_script_loader_->SourceText(), RejectCoepUnsafeNone(false), std::move(back_forward_cache_controller_host)); probe::ScriptImported(GetExecutionContext(), -@@ -408,6 +410,7 @@ void DedicatedWorker::ContinueStart( +@@ -443,6 +446,7 @@ void DedicatedWorker::ContinueStart( + network::mojom::ReferrerPolicy referrer_policy, + Vector + response_content_security_policies, ++ std::optional response_address_space, + const String& source_code, + RejectCoepUnsafeNone reject_coep_unsafe_none, + mojo::PendingRemote +@@ -465,6 +469,7 @@ void DedicatedWorker::ContinueStart( + std::move(worker_main_script_load_params), + std::move(referrer_policy), + std::move(response_content_security_policies), ++ response_address_space, + source_code, reject_coep_unsafe_none, + std::move(back_forward_cache_controller_host)), + base::Milliseconds(features::kDedicatedWorkerStartDelayInMs.Get())); +@@ -473,6 +478,7 @@ void DedicatedWorker::ContinueStart( + ContinueStartInternal(script_url, std::move(worker_main_script_load_params), + std::move(referrer_policy), + std::move(response_content_security_policies), ++ response_address_space, + source_code, reject_coep_unsafe_none, + std::move(back_forward_cache_controller_host)); + } +@@ -484,6 +490,7 @@ void DedicatedWorker::ContinueStartInternal( network::mojom::ReferrerPolicy referrer_policy, Vector response_content_security_policies, -+ absl::optional response_address_space, ++ std::optional response_address_space, const String& source_code, RejectCoepUnsafeNone reject_coep_unsafe_none, mojo::PendingRemote -@@ -415,7 +418,8 @@ void DedicatedWorker::ContinueStart( +@@ -495,7 +502,8 @@ void DedicatedWorker::ContinueStartInternal( context_proxy_->StartWorkerGlobalScope( CreateGlobalScopeCreationParams( script_url, referrer_policy, @@ -321,17 +334,17 @@ diff --git a/third_party/blink/renderer/core/workers/dedicated_worker.cc b/third std::move(worker_main_script_load_params), options_, script_url, *outside_fetch_client_settings_object_, v8_stack_trace_id_, source_code, reject_coep_unsafe_none, token_, -@@ -452,7 +456,8 @@ DedicatedWorker::CreateGlobalScopeCreationParams( +@@ -532,7 +540,8 @@ DedicatedWorker::CreateGlobalScopeCreationParams( const KURL& script_url, network::mojom::ReferrerPolicy referrer_policy, Vector - response_content_security_policies) { + response_content_security_policies, -+ absl::optional response_address_space) { ++ std::optional response_address_space) { base::UnguessableToken parent_devtools_token; std::unique_ptr settings; ExecutionContext* execution_context = GetExecutionContext(); -@@ -501,6 +506,7 @@ DedicatedWorker::CreateGlobalScopeCreationParams( +@@ -581,6 +590,7 @@ DedicatedWorker::CreateGlobalScopeCreationParams( execution_context->GetSecurityOrigin(), execution_context->IsSecureContext(), execution_context->GetHttpsState(), MakeGarbageCollected(), CreateWebContentSettingsClient(), @@ -346,33 +359,41 @@ diff --git a/third_party/blink/renderer/core/workers/dedicated_worker.h b/third_ network::mojom::ReferrerPolicy, Vector response_content_security_policies, -+ absl::optional response_address_space, ++ std::optional response_address_space, + const String& source_code, + RejectCoepUnsafeNone reject_coep_unsafe_none, + mojo::PendingRemote +@@ -148,6 +149,7 @@ class CORE_EXPORT DedicatedWorker final + network::mojom::ReferrerPolicy, + Vector + response_content_security_policies, ++ std::optional response_address_space, const String& source_code, RejectCoepUnsafeNone reject_coep_unsafe_none, mojo::PendingRemote -@@ -145,7 +146,8 @@ class CORE_EXPORT DedicatedWorker final +@@ -156,7 +158,8 @@ class CORE_EXPORT DedicatedWorker final const KURL& script_url, network::mojom::ReferrerPolicy, Vector - response_content_security_policies); + response_content_security_policies, -+ absl::optional response_address_space); ++ std::optional response_address_space); scoped_refptr CreateWebWorkerFetchContext(); // May return nullptr. std::unique_ptr CreateWebContentSettingsClient(); diff --git a/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.cc b/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.cc --- a/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.cc +++ b/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.cc -@@ -85,6 +85,8 @@ DedicatedWorkerGlobalScope* DedicatedWorkerGlobalScope::Create( +@@ -91,6 +91,8 @@ DedicatedWorkerGlobalScope* DedicatedWorkerGlobalScope::Create( KURL response_script_url = creation_params->script_url; network::mojom::ReferrerPolicy response_referrer_policy = creation_params->referrer_policy; -+ absl::optional response_address_space = ++ std::optional response_address_space = + creation_params->response_address_space; const bool parent_cross_origin_isolated_capability = creation_params->parent_cross_origin_isolated_capability; const bool parent_is_isolated_context = -@@ -104,7 +106,7 @@ DedicatedWorkerGlobalScope* DedicatedWorkerGlobalScope::Create( +@@ -119,7 +121,7 @@ DedicatedWorkerGlobalScope* DedicatedWorkerGlobalScope::Create( // Pass dummy origin trial tokens here as it is already set to outside's // origin trial tokens in DedicatedWorkerGlobalScope's constructor. global_scope->Initialize(response_script_url, response_referrer_policy, @@ -381,15 +402,15 @@ diff --git a/third_party/blink/renderer/core/workers/dedicated_worker_global_sco nullptr /* response_origin_trial_tokens */); return global_scope; } else { -@@ -226,6 +228,7 @@ const AtomicString& DedicatedWorkerGlobalScope::InterfaceName() const { +@@ -245,6 +247,7 @@ const AtomicString& DedicatedWorkerGlobalScope::InterfaceName() const { void DedicatedWorkerGlobalScope::Initialize( const KURL& response_url, network::mojom::ReferrerPolicy response_referrer_policy, + network::mojom::IPAddressSpace response_address_space, Vector response_csp, const Vector* /* response_origin_trial_tokens */) { - // Step 14.3. "Set worker global scope's url to response's url." -@@ -239,6 +242,9 @@ void DedicatedWorkerGlobalScope::Initialize( + TRACE_EVENT("blink.worker", "DedicatedWorkerGlobalScope::Initialize", +@@ -260,6 +263,9 @@ void DedicatedWorkerGlobalScope::Initialize( // parsing the `Referrer-Policy` header of response." SetReferrerPolicy(response_referrer_policy); @@ -399,7 +420,7 @@ diff --git a/third_party/blink/renderer/core/workers/dedicated_worker_global_sco // The following is the Content-Security-Policy part of "Initialize worker // global scope's policy container" // https://html.spec.whatwg.org/#initialize-worker-policy-container -@@ -451,6 +457,7 @@ void DedicatedWorkerGlobalScope::DidFetchClassicScript( +@@ -499,6 +505,7 @@ void DedicatedWorkerGlobalScope::DidFetchClassicScript( // Pass dummy origin trial tokens here as it is already set to outside's // origin trial tokens in DedicatedWorkerGlobalScope's constructor. Initialize(classic_script_loader->ResponseURL(), response_referrer_policy, @@ -410,7 +431,7 @@ diff --git a/third_party/blink/renderer/core/workers/dedicated_worker_global_sco diff --git a/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.h b/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.h --- a/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.h +++ b/third_party/blink/renderer/core/workers/dedicated_worker_global_scope.h -@@ -110,6 +110,7 @@ class CORE_EXPORT DedicatedWorkerGlobalScope final : public WorkerGlobalScope { +@@ -111,6 +111,7 @@ class CORE_EXPORT DedicatedWorkerGlobalScope final : public WorkerGlobalScope { void Initialize( const KURL& response_url, network::mojom::ReferrerPolicy response_referrer_policy, @@ -425,7 +446,7 @@ diff --git a/third_party/blink/renderer/core/workers/global_scope_creation_param HttpsState starter_https_state, WorkerClients* worker_clients, std::unique_ptr content_settings_client, -+ absl::optional response_address_space, ++ std::optional response_address_space, const Vector* inherited_trial_features, const base::UnguessableToken& parent_devtools_token, std::unique_ptr worker_settings, @@ -452,7 +473,7 @@ diff --git a/third_party/blink/renderer/core/workers/global_scope_creation_param HttpsState starter_https_state, WorkerClients*, std::unique_ptr, -+ absl::optional, ++ std::optional, const Vector* inherited_trial_features, const base::UnguessableToken& parent_devtools_token, std::unique_ptr, @@ -463,7 +484,7 @@ diff --git a/third_party/blink/renderer/core/workers/global_scope_creation_param + // Worker script response's address space. This is valid only when the worker + // script is fetched on the main thread (i.e., when + // |off_main_thread_fetch_option| is kDisabled). -+ absl::optional response_address_space; ++ std::optional response_address_space; + base::UnguessableToken parent_devtools_token; @@ -544,7 +565,7 @@ diff --git a/third_party/blink/renderer/core/workers/main_thread_worklet_test.cc diff --git a/third_party/blink/renderer/core/workers/shared_worker_global_scope.cc b/third_party/blink/renderer/core/workers/shared_worker_global_scope.cc --- a/third_party/blink/renderer/core/workers/shared_worker_global_scope.cc +++ b/third_party/blink/renderer/core/workers/shared_worker_global_scope.cc -@@ -82,6 +82,7 @@ const AtomicString& SharedWorkerGlobalScope::InterfaceName() const { +@@ -81,6 +81,7 @@ const AtomicString& SharedWorkerGlobalScope::InterfaceName() const { void SharedWorkerGlobalScope::Initialize( const KURL& response_url, network::mojom::ReferrerPolicy response_referrer_policy, @@ -552,7 +573,7 @@ diff --git a/third_party/blink/renderer/core/workers/shared_worker_global_scope. Vector response_csp, const Vector* response_origin_trial_tokens) { // Step 12.3. "Set worker global scope's url to response's url." -@@ -95,6 +96,9 @@ void SharedWorkerGlobalScope::Initialize( +@@ -94,6 +95,9 @@ void SharedWorkerGlobalScope::Initialize( // parsing the `Referrer-Policy` header of response." SetReferrerPolicy(response_referrer_policy); @@ -562,7 +583,7 @@ diff --git a/third_party/blink/renderer/core/workers/shared_worker_global_scope. // Step 12.6. "Execute the Initialize a global object's CSP list algorithm // on worker global scope and response. [CSP]" // SharedWorkerGlobalScope inherits the outside's CSP instead of the response -@@ -104,6 +108,8 @@ void SharedWorkerGlobalScope::Initialize( +@@ -103,6 +107,8 @@ void SharedWorkerGlobalScope::Initialize( // https://fetch.spec.whatwg.org/#local-scheme // // https://w3c.github.io/webappsec-csp/#initialize-global-object-csp @@ -571,7 +592,7 @@ diff --git a/third_party/blink/renderer/core/workers/shared_worker_global_scope. Vector csp_headers = response_url.ProtocolIsAbout() || response_url.ProtocolIsData() || response_url.ProtocolIs("blob") -@@ -251,6 +257,7 @@ void SharedWorkerGlobalScope::DidFetchClassicScript( +@@ -250,6 +256,7 @@ void SharedWorkerGlobalScope::DidFetchClassicScript( // Step 12.3-12.6 are implemented in Initialize(). Initialize(classic_script_loader->ResponseURL(), response_referrer_policy, @@ -604,7 +625,7 @@ diff --git a/third_party/blink/renderer/core/workers/threaded_worklet_messaging_ /*parent_devtools_token=*/ client_provided_global_scope_creation_params->devtools_token, /*worker_settings=*/nullptr, -@@ -140,6 +142,7 @@ void ThreadedWorkletMessagingProxy::Initialize( +@@ -143,6 +145,7 @@ void ThreadedWorkletMessagingProxy::Initialize( window->GetReferrerPolicy(), window->GetSecurityOrigin(), window->IsSecureContext(), window->GetHttpsState(), worker_clients, frame_client->CreateWorkerContentSettingsClient(), @@ -615,7 +636,7 @@ diff --git a/third_party/blink/renderer/core/workers/threaded_worklet_messaging_ diff --git a/third_party/blink/renderer/core/workers/threaded_worklet_test.cc b/third_party/blink/renderer/core/workers/threaded_worklet_test.cc --- a/third_party/blink/renderer/core/workers/threaded_worklet_test.cc +++ b/third_party/blink/renderer/core/workers/threaded_worklet_test.cc -@@ -223,6 +223,7 @@ class ThreadedWorkletMessagingProxyForTest +@@ -221,6 +221,7 @@ class ThreadedWorkletMessagingProxyForTest GetExecutionContext()->IsSecureContext(), GetExecutionContext()->GetHttpsState(), worker_clients, nullptr /* content_settings_client */, @@ -747,7 +768,7 @@ diff --git a/third_party/blink/renderer/core/workers/worker_thread_test_helper.h InitContentSecurityPolicyFromVector(std::move(response_csp)); BindContentSecurityPolicyToExecutionContext(); -@@ -162,6 +167,7 @@ class WorkerThreadForTest : public WorkerThread { +@@ -161,6 +166,7 @@ class WorkerThreadForTest : public WorkerThread { false /* starter_secure_context */, CalculateHttpsState(security_origin), worker_clients, nullptr /* content_settings_client */, @@ -776,7 +797,7 @@ diff --git a/third_party/blink/renderer/modules/exported/web_embedded_worker_imp starter_secure_context, starter_https_state, nullptr /* worker_clients */, - std::move(content_settings_proxy), nullptr /* inherited_trial_features */, + std::move(content_settings_proxy), -+ absl::nullopt /* response_address_space */, ++ std::nullopt /* response_address_space */, + nullptr /* inherited_trial_features */, worker_start_data->devtools_worker_token, std::move(worker_settings), // Generate the full code cache in the first execution of the script. @@ -784,7 +805,7 @@ diff --git a/third_party/blink/renderer/modules/exported/web_embedded_worker_imp diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc --- a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc +++ b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.cc -@@ -476,6 +476,7 @@ void ServiceWorkerGlobalScope::DidFetchClassicScript( +@@ -475,6 +475,7 @@ void ServiceWorkerGlobalScope::DidFetchClassicScript( // is set, and with the following callback steps given evaluationStatus:" RunClassicScript( classic_script_loader->ResponseURL(), referrer_policy, @@ -792,7 +813,7 @@ diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_gl classic_script_loader->GetContentSecurityPolicy() ? mojo::Clone(classic_script_loader->GetContentSecurityPolicy() ->GetParsedPolicies()) -@@ -489,6 +490,7 @@ void ServiceWorkerGlobalScope::DidFetchClassicScript( +@@ -488,6 +489,7 @@ void ServiceWorkerGlobalScope::DidFetchClassicScript( void ServiceWorkerGlobalScope::Initialize( const KURL& response_url, network::mojom::ReferrerPolicy response_referrer_policy, @@ -800,7 +821,7 @@ diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_gl Vector response_csp, const Vector* response_origin_trial_tokens) { // Step 4.5. "Set workerGlobalScope's url to serviceWorker's script url." -@@ -502,6 +504,9 @@ void ServiceWorkerGlobalScope::Initialize( +@@ -501,6 +503,9 @@ void ServiceWorkerGlobalScope::Initialize( // script resource's referrer policy." SetReferrerPolicy(response_referrer_policy); @@ -810,7 +831,7 @@ diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_gl // This is quoted from the "Content Security Policy" algorithm in the service // workers spec: // "Whenever a user agent invokes Run Service Worker algorithm with a service -@@ -512,6 +517,9 @@ void ServiceWorkerGlobalScope::Initialize( +@@ -511,6 +516,9 @@ void ServiceWorkerGlobalScope::Initialize( // - If serviceWorker's script resource was delivered with a // Content-Security-Policy-Report-Only HTTP header containing the value // policy, the user agent must monitor policy for serviceWorker." @@ -820,7 +841,7 @@ diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_gl InitContentSecurityPolicyFromVector(std::move(response_csp)); BindContentSecurityPolicyToExecutionContext(); -@@ -552,26 +560,27 @@ void ServiceWorkerGlobalScope::LoadAndRunInstalledClassicScript( +@@ -551,26 +559,27 @@ void ServiceWorkerGlobalScope::LoadAndRunInstalledClassicScript( kDoNotSupportReferrerPolicyLegacyKeywords, &referrer_policy); } @@ -859,7 +880,7 @@ diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_gl diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h --- a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h +++ b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h -@@ -129,6 +129,7 @@ class MODULES_EXPORT ServiceWorkerGlobalScope final +@@ -128,6 +128,7 @@ class MODULES_EXPORT ServiceWorkerGlobalScope final void Initialize( const KURL& response_url, network::mojom::ReferrerPolicy response_referrer_policy, @@ -867,7 +888,7 @@ diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_gl Vector response_csp, const Vector* response_origin_trial_tokens) override; // Fetches and runs the top-level classic worker script. -@@ -400,6 +401,7 @@ class MODULES_EXPORT ServiceWorkerGlobalScope final +@@ -399,6 +400,7 @@ class MODULES_EXPORT ServiceWorkerGlobalScope final void RunClassicScript( const KURL& response_url, network::mojom::ReferrerPolicy response_referrer_policy, @@ -889,7 +910,7 @@ diff --git a/third_party/blink/renderer/modules/webaudio/audio_worklet_global_sc diff --git a/third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc b/third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc --- a/third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc +++ b/third_party/blink/renderer/modules/webaudio/audio_worklet_thread_test.cc -@@ -100,6 +100,7 @@ class AudioWorkletThreadTest : public PageTestBase, public ModuleTestBase { +@@ -106,6 +106,7 @@ class AudioWorkletThreadTest : public PageTestBase, public ModuleTestBase { window->GetReferrerPolicy(), window->GetSecurityOrigin(), window->IsSecureContext(), window->GetHttpsState(), nullptr /* worker_clients */, nullptr /* content_settings_client */, diff --git a/build/cromite_patches/Revert-remove-allowscript-content-setting-secondary-url.patch b/build/cromite_patches/Revert-remove-allowscript-content-setting-secondary-url.patch new file mode 100644 index 00000000..d064ff11 --- /dev/null +++ b/build/cromite_patches/Revert-remove-allowscript-content-setting-secondary-url.patch @@ -0,0 +1,371 @@ +From: uazo +Date: Sun, 14 Apr 2024 07:35:57 +0000 +Subject: Revert remove AllowScript content settings per secondary url + +https://chromium-review.googlesource.com/c/chromium/src/+/5307559 +--- + .../worker_content_settings_client.cc | 35 +++++++++++++++++ + .../renderer/worker_content_settings_client.h | 2 + + .../renderer/content_settings_agent_impl.cc | 38 ++++++++++++++++++- + .../renderer/content_settings_agent_impl.h | 6 +++ + .../platform/web_content_settings_client.h | 12 ++++++ + .../blink/renderer/core/frame/local_frame.cc | 8 ---- + .../blink/renderer/core/frame/local_frame.h | 6 --- + .../renderer/core/html/html_meta_element.cc | 4 +- + .../core/loader/base_fetch_context.cc | 2 +- + .../renderer/core/loader/base_fetch_context.h | 2 +- + .../core/loader/frame_fetch_context.cc | 30 ++++++++++----- + .../core/loader/frame_fetch_context.h | 13 ++++++- + .../core/loader/worker_fetch_context.cc | 12 ++++-- + .../core/loader/worker_fetch_context.h | 2 +- + 14 files changed, 139 insertions(+), 33 deletions(-) + +diff --git a/chrome/renderer/worker_content_settings_client.cc b/chrome/renderer/worker_content_settings_client.cc +--- a/chrome/renderer/worker_content_settings_client.cc ++++ b/chrome/renderer/worker_content_settings_client.cc +@@ -114,6 +114,41 @@ bool WorkerContentSettingsClient::AllowRunningInsecureContent( + return true; + } + ++bool WorkerContentSettingsClient::AllowScriptFromSource( ++ bool enabled_per_settings, ++ const blink::WebURL& script_url) { ++ bool allow = enabled_per_settings; ++ if (allow && content_setting_rules_) { ++ GURL top_frame_origin_url = top_frame_origin_.GetURL(); ++ // Allow DevTools to run worker scripts. ++ if (top_frame_origin_url.SchemeIs(content::kChromeDevToolsScheme)) ++ return true; ++ for (ContentSettingRuleSource& info : content_setting_rules_->settings_rules) { ++ if (info.type == (int)ContentSettingsType::JAVASCRIPT) { ++ for (const auto& rule : info.rules) { ++ // The primary pattern was already matched in the browser process (see ++ // PageSpecificContentSettings::ReadyToCommitNavigation), so we only need ++ // to match the secondary pattern here. ++ if (rule.secondary_pattern.Matches(script_url)) { ++ allow = rule.GetContentSetting() != CONTENT_SETTING_BLOCK; ++ break; ++ } ++ } ++ break; ++ } ++ } ++ } ++ ++ if (!allow) { ++ EnsureContentSettingsManager(); ++ content_settings_manager_->OnContentBlocked( ++ frame_token_, ContentSettingsType::JAVASCRIPT); ++ return false; ++ } ++ ++ return true; ++} ++ + bool WorkerContentSettingsClient::ShouldAutoupgradeMixedContent() { + if (content_setting_rules_) { + if (content_setting_rules_->mixed_content_rules.size() > 0) +diff --git a/chrome/renderer/worker_content_settings_client.h b/chrome/renderer/worker_content_settings_client.h +--- a/chrome/renderer/worker_content_settings_client.h ++++ b/chrome/renderer/worker_content_settings_client.h +@@ -38,6 +38,8 @@ class WorkerContentSettingsClient : public blink::WebContentSettingsClient { + bool AllowStorageAccessSync(StorageType storage_type) override; + bool AllowRunningInsecureContent(bool allowed_per_settings, + const blink::WebURL& url) override; ++ bool AllowScriptFromSource(bool enabled_per_settings, ++ const blink::WebURL& script_url) override; + bool ShouldAutoupgradeMixedContent() override; + + private: +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 +@@ -168,7 +168,7 @@ void ContentSettingsAgentImpl::DidCommitProvisionalLoad( + // `allowPlugins()` is called for the new page so that these functions can + // correctly detect that a piece of content flipped from "not blocked" to + // "blocked". +- ClearBlockedContentSettings(); ++ ClearBlockedContentSettings(); // do not remove + + blink::WebLocalFrame* frame = render_frame()->GetWebFrame(); + if (frame->Parent()) +@@ -351,6 +351,41 @@ bool ContentSettingsAgentImpl::AllowImage(bool enabled_per_settings, + return allow; + } + ++bool ContentSettingsAgentImpl::AllowScript(bool enabled_per_settings) { ++ if (!enabled_per_settings) ++ return false; ++ ++ blink::WebLocalFrame* frame = render_frame()->GetWebFrame(); ++ const auto it = cached_script_permissions_.find(frame); ++ if (it != cached_script_permissions_.end()) ++ return it->second; ++ ++ // Evaluate the content setting rules before ++ // IsAllowlistedForContentSettings(); if there is only the default rule ++ // allowing all scripts, it's quicker this way. ++ bool allow = AllowContentSetting( ++ ContentSettingsType::JAVASCRIPT, enabled_per_settings); ++ allow = allow || IsAllowlistedForContentSettingsCromite(); ++ ++ cached_script_permissions_[frame] = allow; ++ return allow; ++} ++ ++bool ContentSettingsAgentImpl::AllowScriptFromSource( ++ bool enabled_per_settings, ++ const blink::WebURL& script_url) { ++ if (!enabled_per_settings) ++ return false; ++ ++ bool allow = true; ++ if (content_setting_rules_) { ++ allow = AllowContentSetting( ++ ContentSettingsType::JAVASCRIPT, script_url, enabled_per_settings); ++ } ++ allow = allow || IsAllowlistedForContentSettingsCromite(); ++ return allow; ++} ++ + bool ContentSettingsAgentImpl::AllowReadFromClipboard() { + return delegate_->AllowReadFromClipboard(); + } +@@ -409,6 +444,7 @@ void ContentSettingsAgentImpl::DidNotAllowImage() { + void ContentSettingsAgentImpl::ClearBlockedContentSettings() { + content_blocked_.clear(); + cached_storage_permissions_.clear(); ++ cached_script_permissions_.clear(); + } + + bool ContentSettingsAgentImpl::IsAllowlistedForContentSettingsCromite() const { +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 +@@ -93,6 +93,9 @@ class ContentSettingsAgentImpl + bool AllowStorageAccessSync(StorageType type) override; + bool AllowImage(bool enabled_per_settings, + const blink::WebURL& image_url) override; ++ bool AllowScript(bool enabled_per_settings) override; ++ bool AllowScriptFromSource(bool enabled_per_settings, ++ const blink::WebURL& script_url) override; + bool AllowReadFromClipboard() override; + bool AllowWriteToClipboard() override; + bool AllowMutationEvents(bool default_value) override; +@@ -163,6 +166,9 @@ class ContentSettingsAgentImpl + using StoragePermissionsKey = std::pair; + base::flat_map cached_storage_permissions_; + ++ // Caches the result of AllowScript. ++ base::flat_map cached_script_permissions_; ++ + // If true, IsAllowlistedForContentSettings will always return true. + const bool should_allowlist_; + +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 +@@ -60,6 +60,18 @@ class WebContentSettingsClient { + return enabled_per_settings; + } + ++ // Controls whether scripts are allowed to execute for this frame. ++ virtual bool AllowScript(bool enabled_per_settings) { ++ return enabled_per_settings; ++ } ++ ++ // Controls whether scripts loaded from the given URL are allowed to execute ++ // for this frame. ++ virtual bool AllowScriptFromSource(bool enabled_per_settings, ++ const WebURL& script_url) { ++ return enabled_per_settings; ++ } ++ + // Controls whether insecure scripts are allowed to execute for this frame. + virtual bool AllowRunningInsecureContent(bool enabled_per_settings, + const WebURL&) { +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 +@@ -4042,14 +4042,6 @@ const mojom::RendererContentSettingsPtr& LocalFrame::GetContentSettings() { + } + + +-bool LocalFrame::ScriptEnabled() { +- DCHECK(!IsDetached()); +- +- bool allow_script_renderer = GetSettings()->GetScriptEnabled(); +- bool allow_script_content_setting = GetContentSettings()->allow_script; +- return allow_script_renderer && allow_script_content_setting; +-} +- + const WebPrintParams& LocalFrame::GetPrintParams() const { + // If this fails, it's probably because nobody called StartPrinting(). + DCHECK(GetDocument()->Printing()); +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 +@@ -930,12 +930,6 @@ class CORE_EXPORT LocalFrame final + // Can only be called while the frame is not detached. + const mojom::RendererContentSettingsPtr& GetContentSettings(); + +- // Returns whether script is allowed to run for the current frame. This is a +- // convenience method that checks both renderer content settings and frame +- // settings. +- // Can only be called while the frame is not detached. +- bool ScriptEnabled(); +- + const WebPrintParams& GetPrintParams() const; + + // Return a keep alive handle for the browser side NavigationStateKeepAlive. +diff --git a/third_party/blink/renderer/core/html/html_meta_element.cc b/third_party/blink/renderer/core/html/html_meta_element.cc +--- a/third_party/blink/renderer/core/html/html_meta_element.cc ++++ b/third_party/blink/renderer/core/html/html_meta_element.cc +@@ -773,7 +773,9 @@ void HTMLMetaElement::ProcessMetaCH(Document& document, + return; + } + +- if (!frame->ScriptEnabled()) { ++ if (!FrameFetchContext::AllowScriptFromSourceWithoutNotifying( ++ document.Url(), frame->GetContentSettingsClient(), ++ frame->GetSettings())) { + // Do not allow configuring client hints if JavaScript is disabled. + return; + } +diff --git a/third_party/blink/renderer/core/loader/base_fetch_context.cc b/third_party/blink/renderer/core/loader/base_fetch_context.cc +--- a/third_party/blink/renderer/core/loader/base_fetch_context.cc ++++ b/third_party/blink/renderer/core/loader/base_fetch_context.cc +@@ -574,7 +574,7 @@ BaseFetchContext::CanRequestInternal( + } + + if (type == ResourceType::kScript) { +- if (!AllowScript()) { ++ if (!AllowScriptFromSource(url)) { + // TODO(estark): Use a different ResourceRequestBlockedReason here, since + // this check has nothing to do with CSP. https://crbug.com/600795 + return ResourceRequestBlockedReason::kCSP; +diff --git a/third_party/blink/renderer/core/loader/base_fetch_context.h b/third_party/blink/renderer/core/loader/base_fetch_context.h +--- a/third_party/blink/renderer/core/loader/base_fetch_context.h ++++ b/third_party/blink/renderer/core/loader/base_fetch_context.h +@@ -117,7 +117,7 @@ class CORE_EXPORT BaseFetchContext : public FetchContext { + : fetcher_properties_(properties), console_logger_(logger) {} + + // Used for security checks. +- virtual bool AllowScript() const = 0; ++ virtual bool AllowScriptFromSource(const KURL&) const = 0; + + // Note: subclasses are expected to override following methods. + // Used in the default implementation for CanRequest, CanFollowRedirect +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 +@@ -451,7 +451,8 @@ void FrameFetchContext::AddClientHintsIfNecessary( + + // Check if |url| is allowed to run JavaScript. If not, client hints are not + // attached to the requests that initiate on the render side. +- if (!GetFrame()->ScriptEnabled()) { ++ if (!AllowScriptFromSourceWithoutNotifying( ++ request.Url(), GetContentSettingsClient(), GetSettings())) { + return; + } + +@@ -588,15 +589,26 @@ void FrameFetchContext::SetFirstPartyCookie(ResourceRequest& request) { + request.SetSiteForCookies(GetSiteForCookies()); + } + +-bool FrameFetchContext::AllowScript() const { +- bool script_enabled = GetFrame()->ScriptEnabled(); +- if (!script_enabled) { +- WebContentSettingsClient* settings_client = GetContentSettingsClient(); +- if (settings_client) { +- settings_client->DidNotAllowScript(); +- } ++bool FrameFetchContext::AllowScriptFromSource(const KURL& url) const { ++ if (AllowScriptFromSourceWithoutNotifying(url, GetContentSettingsClient(), ++ GetSettings())) { ++ return true; + } +- return script_enabled; ++ WebContentSettingsClient* settings_client = GetContentSettingsClient(); ++ if (settings_client) ++ settings_client->DidNotAllowScript(); ++ return false; ++} ++ ++// static ++bool FrameFetchContext::AllowScriptFromSourceWithoutNotifying( ++ const KURL& url, ++ WebContentSettingsClient* settings_client, ++ Settings* settings) { ++ bool allow_script = !settings || settings->GetScriptEnabled(); ++ if (settings_client) ++ allow_script = settings_client->AllowScriptFromSource(allow_script, url); ++ return allow_script; + } + + bool FrameFetchContext::IsFirstPartyOrigin( +diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.h b/third_party/blink/renderer/core/loader/frame_fetch_context.h +--- a/third_party/blink/renderer/core/loader/frame_fetch_context.h ++++ b/third_party/blink/renderer/core/loader/frame_fetch_context.h +@@ -68,6 +68,17 @@ class WebContentSettingsClient; + class CORE_EXPORT FrameFetchContext final : public BaseFetchContext, + public LoadingBehaviorObserver { + public: ++ // Returns true if execution of scripts from the url are allowed. Compared to ++ // AllowScriptFromSource(), this method does not generate any ++ // notification to the `WebContentSettingsClient` that the execution of the ++ // script was blocked. This method should be called only when there is a need ++ // to check the settings, and where blocked setting doesn't really imply that ++ // JavaScript was blocked from being executed. ++ static bool AllowScriptFromSourceWithoutNotifying( ++ const KURL& url, ++ WebContentSettingsClient* settings_client, ++ Settings* settings); ++ + static ResourceFetcher* CreateFetcherForCommittedDocument(DocumentLoader&, + Document&); + FrameFetchContext(DocumentLoader& document_loader, +@@ -158,7 +169,7 @@ class CORE_EXPORT FrameFetchContext final : public BaseFetchContext, + // BaseFetchContext overrides: + net::SiteForCookies GetSiteForCookies() const override; + SubresourceFilter* GetSubresourceFilter() const override; +- bool AllowScript() const override; ++ bool AllowScriptFromSource(const KURL&) const override; + bool ShouldBlockRequestByInspector(const KURL&) const override; + void DispatchDidBlockRequest(const ResourceRequest&, + const ResourceLoaderOptions&, +diff --git a/third_party/blink/renderer/core/loader/worker_fetch_context.cc b/third_party/blink/renderer/core/loader/worker_fetch_context.cc +--- a/third_party/blink/renderer/core/loader/worker_fetch_context.cc ++++ b/third_party/blink/renderer/core/loader/worker_fetch_context.cc +@@ -79,10 +79,14 @@ SubresourceFilter* WorkerFetchContext::GetSubresourceFilter() const { + return subresource_filter_.Get(); + } + +-bool WorkerFetchContext::AllowScript() const { +- // Script is always allowed in worker fetch contexts, since the fact that +- // they're running is already evidence that script is allowed. +- return true; ++bool WorkerFetchContext::AllowScriptFromSource(const KURL& url) const { ++ if (!global_scope_->ContentSettingsClient()) { ++ return true; ++ } ++ // If we're on a worker, script should be enabled, so no need to plumb ++ // Settings::GetScriptEnabled() here. ++ return global_scope_->ContentSettingsClient()->AllowScriptFromSource(true, ++ url); + } + + bool WorkerFetchContext::ShouldBlockRequestByInspector(const KURL& url) const { +diff --git a/third_party/blink/renderer/core/loader/worker_fetch_context.h b/third_party/blink/renderer/core/loader/worker_fetch_context.h +--- a/third_party/blink/renderer/core/loader/worker_fetch_context.h ++++ b/third_party/blink/renderer/core/loader/worker_fetch_context.h +@@ -48,7 +48,7 @@ class WorkerFetchContext final : public BaseFetchContext { + // BaseFetchContext implementation: + net::SiteForCookies GetSiteForCookies() const override; + SubresourceFilter* GetSubresourceFilter() const override; +- bool AllowScript() const override; ++ bool AllowScriptFromSource(const KURL&) const override; + bool ShouldBlockRequestByInspector(const KURL&) const override; + void DispatchDidBlockRequest(const ResourceRequest&, + const ResourceLoaderOptions&, +-- diff --git a/build/cromite_patches/Show-site-settings-for-cookies-javascript-and-ads.patch b/build/cromite_patches/Show-site-settings-for-cookies-javascript-and-ads.patch index 94682e34..d5a69360 100644 --- a/build/cromite_patches/Show-site-settings-for-cookies-javascript-and-ads.patch +++ b/build/cromite_patches/Show-site-settings-for-cookies-javascript-and-ads.patch @@ -8,14 +8,14 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- .../site_settings/SingleWebsiteSettings.java | 51 ++++++++++++------- .../browser_ui/site_settings/Website.java | 14 ++++- - .../bromite_content_settings/javascript.inc | 3 ++ - 3 files changed, 49 insertions(+), 19 deletions(-) + .../bromite_content_settings/javascript.inc | 4 ++ + 3 files changed, 50 insertions(+), 19 deletions(-) create mode 100644 components/content_settings/core/browser/bromite_content_settings/javascript.inc 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 -@@ -558,6 +558,8 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -560,6 +560,8 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment setUpSoundPreference(preference); } else if (type == ContentSettingsType.JAVASCRIPT) { setUpJavascriptPreference(preference); @@ -24,7 +24,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } else if (type == ContentSettingsType.GEOLOCATION) { setUpLocationPreference(preference); } else if (type == ContentSettingsType.NOTIFICATIONS) { -@@ -991,17 +993,8 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1010,17 +1012,8 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment private void setUpAdsInformationalBanner() { // Add the informational banner which shows at the top of the UI if ad blocking is // activated on this site. @@ -42,7 +42,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } private SiteSettingsCategory getWarningCategory() { -@@ -1199,12 +1192,13 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1219,12 +1212,13 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment @Nullable Integer currentValue = mSite.getContentSetting(browserContextHandle, ContentSettingsType.JAVASCRIPT); @@ -62,7 +62,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c } // Not possible to embargo JAVASCRIPT. setupContentSettingsPreference( -@@ -1214,6 +1208,29 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1234,6 +1228,29 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment isOneTime(ContentSettingsType.JAVASCRIPT)); } @@ -92,7 +92,7 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c /** * Updates the ads list preference based on whether the site is a candidate for blocking. This * has some custom behavior. -@@ -1232,9 +1249,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment +@@ -1252,9 +1269,7 @@ public class SingleWebsiteSettings extends BaseSiteSettingsFragment } // If the ad blocker is activated, then this site will have ads blocked unless there is an // explicit permission disallowing the blocking. @@ -106,13 +106,13 @@ 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 -@@ -280,7 +280,19 @@ public final class Website implements WebsiteEntry { +@@ -281,7 +281,19 @@ public final class Website implements WebsiteEntry { new ContentSettingException( ContentSettingsType.ADS, getAddress().getOrigin(), - ContentSettingValues.BLOCK, + value, -+ "", ++ ProviderType.NONE, + /* isEmbargoed= */ false); + setContentSettingException(type, exception); + } @@ -124,15 +124,16 @@ diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/c + ContentSettingsType.COOKIES, + getAddress().getOrigin(), + value, - "", + ProviderType.NONE, /* isEmbargoed= */ false); setContentSettingException(type, exception); diff --git a/components/content_settings/core/browser/bromite_content_settings/javascript.inc b/components/content_settings/core/browser/bromite_content_settings/javascript.inc new file mode 100644 --- /dev/null +++ b/components/content_settings/core/browser/bromite_content_settings/javascript.inc -@@ -0,0 +1,3 @@ +@@ -0,0 +1,4 @@ + content_settings::WebsiteSettingsRegistry::GetInstance() + ->GetMutable(ContentSettingsType::JAVASCRIPT) -+ ->set_show_into_info_page(); ++ ->set_show_into_info_page() ++ .set_is_renderer_content_setting(); -- diff --git a/build/cromite_patches/Site-setting-for-images.patch b/build/cromite_patches/Site-setting-for-images.patch index 401c7232..9e4ecdd4 100644 --- a/build/cromite_patches/Site-setting-for-images.patch +++ b/build/cromite_patches/Site-setting-for-images.patch @@ -15,8 +15,19 @@ Require: Content-settings-infrastructure.patch .../bromite_content_settings/images.grdp | 23 +++++ .../bromite_content_settings/images.inc | 6 ++ .../core/browser/content_settings_registry.cc | 2 +- - .../core/browser/content_settings_utils.cc | 7 +- - 10 files changed, 124 insertions(+), 7 deletions(-) + .../renderer/content_settings_agent_impl.cc | 15 +++ + .../renderer/content_settings_agent_impl.h | 2 + + .../platform/web_content_settings_client.h | 5 + + .../blink/renderer/core/frame/local_frame.cc | 7 -- + .../blink/renderer/core/frame/local_frame.h | 6 -- + .../renderer/core/html/image_document.cc | 5 +- + .../core/loader/frame_fetch_context.cc | 12 +-- + .../core/loader/frame_fetch_context.h | 2 +- + third_party/blink/renderer/core/page/page.cc | 5 +- + .../platform/loader/fetch/fetch_context.h | 2 +- + .../platform/loader/fetch/resource_fetcher.cc | 17 +++- + .../platform/loader/fetch/resource_fetcher.h | 4 +- + 21 files changed, 175 insertions(+), 31 deletions(-) create mode 100644 components/browser_ui/site_settings/android/java/res/drawable-hdpi/permission_images.png create mode 100644 components/browser_ui/site_settings/android/java/res/drawable-mdpi/permission_images.png create mode 100644 components/browser_ui/site_settings/android/java/res/drawable-xhdpi/permission_images.png @@ -248,8 +259,8 @@ 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 -@@ -99,7 +99,7 @@ void ContentSettingsRegistry::Init() { - {kChromeUIScheme, kChromeDevToolsScheme, kExtensionScheme}, +@@ -101,7 +101,7 @@ void ContentSettingsRegistry::Init() { + kChromeUIUntrustedScheme}, /*valid_settings=*/{CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK}, WebsiteSettingsInfo::TOP_ORIGIN_WITH_RESOURCE_EXCEPTIONS_SCOPE, - WebsiteSettingsRegistry::DESKTOP, @@ -257,21 +268,238 @@ diff --git a/components/content_settings/core/browser/content_settings_registry. ContentSettingsInfo::INHERIT_IN_INCOGNITO, ContentSettingsInfo::EXCEPTIONS_ON_SECURE_AND_INSECURE_ORIGINS); -diff --git a/components/content_settings/core/browser/content_settings_utils.cc b/components/content_settings/core/browser/content_settings_utils.cc ---- a/components/content_settings/core/browser/content_settings_utils.cc -+++ b/components/content_settings/core/browser/content_settings_utils.cc -@@ -145,12 +145,7 @@ void GetRendererContentSettingRules(const HostContentSettingsMap* map, - ContentSettingToValue(CONTENT_SETTING_ALLOW), std::string(), - map->IsOffTheRecord())); - #else -- // Android doesn't use image content settings, so ALLOW rule is added for -- // all origins. -- rules->image_rules.push_back(ContentSettingPatternSource( -- ContentSettingsPattern::Wildcard(), ContentSettingsPattern::Wildcard(), -- ContentSettingToValue(CONTENT_SETTING_ALLOW), std::string(), -- map->IsOffTheRecord())); -+ rules->image_rules = map->GetSettingsForOneType(ContentSettingsType::IMAGES); - // In Android active mixed content is hard blocked, with no option to allow - // it. - rules->mixed_content_rules.push_back(ContentSettingPatternSource( +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 +@@ -336,6 +336,21 @@ bool ContentSettingsAgentImpl::AllowStorageAccessSync( + return result; + } + ++bool ContentSettingsAgentImpl::AllowImage(bool enabled_per_settings, ++ const WebURL& image_url) { ++ bool allow = enabled_per_settings; ++ if (enabled_per_settings) { ++ allow = allow || IsAllowlistedForContentSettingsCromite(); ++ if (content_setting_rules_) { ++ allow = AllowContentSetting(ContentSettingsType::IMAGES, ++ image_url, enabled_per_settings); ++ } ++ } ++ if (!allow) ++ DidBlockContentType(ContentSettingsType::IMAGES); ++ return allow; ++} ++ + bool ContentSettingsAgentImpl::AllowReadFromClipboard() { + return delegate_->AllowReadFromClipboard(); + } +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 +@@ -91,6 +91,8 @@ class ContentSettingsAgentImpl + void AllowStorageAccess(StorageType storage_type, + base::OnceCallback callback) override; + bool AllowStorageAccessSync(StorageType type) override; ++ bool AllowImage(bool enabled_per_settings, ++ const blink::WebURL& image_url) override; + bool AllowReadFromClipboard() override; + bool AllowWriteToClipboard() override; + bool AllowMutationEvents(bool default_value) override; +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 +@@ -55,6 +55,11 @@ class WebContentSettingsClient { + return enabled_per_settings; + } + ++ // Controls whether images are allowed for this frame. ++ virtual bool AllowImage(bool enabled_per_settings, const WebURL& image_url) { ++ return enabled_per_settings; ++ } ++ + // Controls whether insecure scripts are allowed to execute for this frame. + virtual bool AllowRunningInsecureContent(bool enabled_per_settings, + const WebURL&) { +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 +@@ -4028,13 +4028,6 @@ const mojom::RendererContentSettingsPtr& LocalFrame::GetContentSettings() { + return loader_.GetDocumentLoader()->GetContentSettings(); + } + +-bool LocalFrame::ImagesEnabled() { +- DCHECK(!IsDetached()); +- +- bool allow_image_renderer = GetSettings()->GetImagesEnabled(); +- bool allow_image_content_setting = GetContentSettings()->allow_image; +- return allow_image_renderer && allow_image_content_setting; +-} + + bool LocalFrame::ScriptEnabled() { + DCHECK(!IsDetached()); +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 +@@ -929,12 +929,6 @@ class CORE_EXPORT LocalFrame final + // Can only be called while the frame is not detached. + const mojom::RendererContentSettingsPtr& GetContentSettings(); + +- // Returns whether images are allowed to load for the current frame. This is a +- // convenience method that checks both renderer content settings and frame +- // settings. +- // Can only be called while the frame is not detached. +- bool ImagesEnabled(); +- + // Returns whether script is allowed to run for the current frame. This is a + // convenience method that checks both renderer content settings and frame + // settings. +diff --git a/third_party/blink/renderer/core/html/image_document.cc b/third_party/blink/renderer/core/html/image_document.cc +--- a/third_party/blink/renderer/core/html/image_document.cc ++++ b/third_party/blink/renderer/core/html/image_document.cc +@@ -140,7 +140,10 @@ void ImageDocumentParser::AppendBytes(const char* data, size_t length) { + return; + + LocalFrame* frame = GetDocument()->GetFrame(); +- bool allow_image = frame->ImagesEnabled(); ++ Settings* settings = frame->GetSettings(); ++ bool allow_image_renderer = !settings || settings->GetImagesEnabled(); ++ bool allow_image_content_setting = frame->GetContentSettings()->allow_image; ++ bool allow_image = allow_image_renderer && allow_image_content_setting; + if (!allow_image) { + auto* client = frame->GetContentSettingsClient(); + if (client) { +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 +@@ -244,6 +244,7 @@ ResourceFetcher* FrameFetchContext::CreateFetcherForCommittedDocument( + fetcher->SetResourceLoadObserver( + MakeGarbageCollected( + loader, document, fetcher->GetProperties())); ++ fetcher->SetImagesEnabled(frame->GetSettings()->GetImagesEnabled()); + fetcher->SetAutoLoadImages( + frame->GetSettings()->GetLoadsImagesAutomatically()); + fetcher->SetEarlyHintsPreloadedResources( +@@ -418,16 +419,11 @@ void FrameFetchContext::AddResourceTiming( + ->AddResourceTiming(std::move(info), initiator_type); + } + +-bool FrameFetchContext::AllowImage() const { ++bool FrameFetchContext::AllowImage(bool images_enabled, const KURL& url) const { + if (GetResourceFetcherProperties().IsDetached()) + return true; +- +- bool images_enabled = GetFrame()->ImagesEnabled(); +- if (!images_enabled) { +- if (auto* settings_client = GetContentSettingsClient()) { +- settings_client->DidNotAllowImage(); +- } +- } ++ if (auto* settings_client = GetContentSettingsClient()) ++ images_enabled = settings_client->AllowImage(images_enabled, url); + return images_enabled; + } + +diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.h b/third_party/blink/renderer/core/loader/frame_fetch_context.h +--- a/third_party/blink/renderer/core/loader/frame_fetch_context.h ++++ b/third_party/blink/renderer/core/loader/frame_fetch_context.h +@@ -94,7 +94,7 @@ class CORE_EXPORT FrameFetchContext final : public BaseFetchContext, + + void AddResourceTiming(mojom::blink::ResourceTimingInfoPtr, + const AtomicString& initiator_type) override; +- bool AllowImage() const override; ++ bool AllowImage(bool images_enabled, const KURL&) const override; + + void PopulateResourceRequest(ResourceType, + const std::optional resource_width, +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 +@@ -892,9 +892,8 @@ void Page::SettingsChanged(ChangeType change_type) { + for (Frame* frame = MainFrame(); frame; + frame = frame->Tree().TraverseNext()) { + if (auto* local_frame = DynamicTo(frame)) { +- // Notify the fetcher that the image loading setting has changed, +- // which may cause previously deferred requests to load. +- local_frame->GetDocument()->Fetcher()->ReloadImagesIfNotDeferred(); ++ local_frame->GetDocument()->Fetcher()->SetImagesEnabled( ++ GetSettings().GetImagesEnabled()); + local_frame->GetDocument()->Fetcher()->SetAutoLoadImages( + GetSettings().GetLoadsImagesAutomatically()); + } +diff --git a/third_party/blink/renderer/platform/loader/fetch/fetch_context.h b/third_party/blink/renderer/platform/loader/fetch/fetch_context.h +--- a/third_party/blink/renderer/platform/loader/fetch/fetch_context.h ++++ b/third_party/blink/renderer/platform/loader/fetch/fetch_context.h +@@ -106,7 +106,7 @@ class PLATFORM_EXPORT FetchContext : public GarbageCollected { + + virtual void AddResourceTiming(mojom::blink::ResourceTimingInfoPtr, + const AtomicString& initiator_type); +- virtual bool AllowImage() const { return false; } ++ virtual bool AllowImage(bool, const KURL&) const { return false; } + virtual std::optional CanRequest( + ResourceType, + const ResourceRequest&, +diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc +--- a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc ++++ b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc +@@ -768,6 +768,7 @@ ResourceFetcher::ResourceFetcher(const ResourceFetcherInit& init) + blob_registry_remote_(init.context_lifecycle_notifier), + context_lifecycle_notifier_(init.context_lifecycle_notifier), + auto_load_images_(true), ++ images_enabled_(true), + allow_stale_resources_(false), + image_fetched_(false) { + InstanceCounters::IncrementCounter(InstanceCounters::kResourceFetcherCounter); +@@ -1894,7 +1895,7 @@ bool ResourceFetcher::IsImageResourceDisallowedToBeReused( + if (existing_resource.GetType() != ResourceType::kImage) + return false; + +- return !Context().AllowImage(); ++ return !Context().AllowImage(images_enabled_, existing_resource.Url()); + } + + ResourceFetcher::RevalidationPolicy +@@ -2137,8 +2138,20 @@ void ResourceFetcher::SetAutoLoadImages(bool enable) { + ReloadImagesIfNotDeferred(); + } + ++void ResourceFetcher::SetImagesEnabled(bool enable) { ++ if (enable == images_enabled_) ++ return; ++ ++ images_enabled_ = enable; ++ ++ if (!images_enabled_) ++ return; ++ ++ ReloadImagesIfNotDeferred(); ++} ++ + bool ResourceFetcher::ShouldDeferImageLoad(const KURL& url) const { +- return !Context().AllowImage() || ++ return !Context().AllowImage(images_enabled_, url) || + (!auto_load_images_ && !url.ProtocolIsData()); + } + +diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h +--- a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h ++++ b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h +@@ -225,6 +225,7 @@ class PLATFORM_EXPORT ResourceFetcher + bool StartLoad(Resource*, bool is_potentially_unused_preload = false); + + void SetAutoLoadImages(bool); ++ void SetImagesEnabled(bool); + + FetchContext& Context() const; + void ClearContext(); +@@ -686,8 +687,9 @@ class PLATFORM_EXPORT ResourceFetcher + // This is not in the bit field below because we want to use AutoReset. + bool is_in_request_resource_ = false; + +- // 28 bits left ++ // 27 bits left + bool auto_load_images_ : 1; ++ bool images_enabled_ : 1; + bool allow_stale_resources_ : 1; + bool image_fetched_ : 1; + bool stale_while_revalidate_enabled_ : 1; -- diff --git a/build/cromite_patches/Switch-to-fstack-protector-strong.patch b/build/cromite_patches/Switch-to-fstack-protector-strong.patch index cbf3ee8f..57f0ba7d 100644 --- a/build/cromite_patches/Switch-to-fstack-protector-strong.patch +++ b/build/cromite_patches/Switch-to-fstack-protector-strong.patch @@ -19,7 +19,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn -@@ -382,7 +382,7 @@ config("compiler") { +@@ -366,7 +366,7 @@ config("compiler") { } else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) { if (current_os != "aix") { # Not available on aix. diff --git a/build/cromite_patches/Timezone-customization.patch b/build/cromite_patches/Timezone-customization.patch index 41652122..c5d87880 100644 --- a/build/cromite_patches/Timezone-customization.patch +++ b/build/cromite_patches/Timezone-customization.patch @@ -30,9 +30,9 @@ Require: Content-settings-infrastructure.patch .../common/content_settings_mojom_traits.cc | 3 +- .../common/content_settings_mojom_traits.h | 5 + .../content_settings/core/common/pref_names.h | 3 + - .../renderer/content_settings_agent_impl.cc | 81 +++++++- + .../renderer/content_settings_agent_impl.cc | 78 +++++++ .../renderer/content_settings_agent_impl.h | 11 + - 22 files changed, 681 insertions(+), 2 deletions(-) + 22 files changed, 679 insertions(+), 1 deletion(-) create mode 100755 components/browser_ui/site_settings/android/java/res/layout/time_zone_select_dialog.xml create mode 100755 components/browser_ui/site_settings/android/java/res/layout/timezoneoverride_site_settings_preference.xml create mode 100755 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/TimezoneOverrideSiteSettingsPreference.java @@ -44,7 +44,7 @@ Require: Content-settings-infrastructure.patch diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/browser_ui/site_settings/android/BUILD.gn --- a/components/browser_ui/site_settings/android/BUILD.gn +++ b/components/browser_ui/site_settings/android/BUILD.gn -@@ -96,6 +96,7 @@ android_library("java") { +@@ -99,6 +99,7 @@ android_library("java") { "java/src/org/chromium/components/browser_ui/site_settings/WebsitePreference.java", "java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java", "java/src/org/chromium/components/browser_ui/site_settings/WebsiteRowPreference.java", @@ -52,7 +52,7 @@ diff --git a/components/browser_ui/site_settings/android/BUILD.gn b/components/b ] resources_package = "org.chromium.components.browser_ui.site_settings" -@@ -270,6 +271,8 @@ android_resources("java_resources") { +@@ -280,6 +281,8 @@ android_resources("java_resources") { "java/res/xml/site_settings_preferences.xml", "java/res/xml/storage_access_settings.xml", "java/res/xml/website_preferences.xml", @@ -559,7 +559,7 @@ new file mode 100644 diff --git a/components/browser_ui/site_settings/android/website_preference_bridge.cc b/components/browser_ui/site_settings/android/website_preference_bridge.cc --- a/components/browser_ui/site_settings/android/website_preference_bridge.cc +++ b/components/browser_ui/site_settings/android/website_preference_bridge.cc -@@ -1123,3 +1123,19 @@ JNI_WebsitePreferenceBridge_ToHostOnlyPattern( +@@ -1121,3 +1121,19 @@ JNI_WebsitePreferenceBridge_ToHostOnlyPattern( ContentSettingsPattern::FromString(pattern_string)); return ConvertUTF8ToJavaString(env, host_only_pattern.ToString()); } @@ -675,8 +675,8 @@ diff --git a/components/content_settings/core/browser/content_settings_pref_prov } PrefProvider::~PrefProvider() { -@@ -437,4 +443,14 @@ void PrefProvider::SetClockForTesting(base::Clock* clock) { - clock_ = clock; +@@ -444,4 +450,14 @@ void PrefProvider::SetClockForTesting(base::Clock* clock) { + } } +void PrefProvider::GetPrefTimezoneOverrideValue(std::string& timezone) const { @@ -714,10 +714,10 @@ diff --git a/components/content_settings/core/browser/content_settings_pref_prov diff --git a/components/content_settings/core/browser/content_settings_utils.cc b/components/content_settings/core/browser/content_settings_utils.cc --- a/components/content_settings/core/browser/content_settings_utils.cc +++ b/components/content_settings/core/browser/content_settings_utils.cc -@@ -159,6 +159,11 @@ void GetRendererContentSettingRules(const HostContentSettingsMap* map, - map->GetSettingsForOneType(ContentSettingsType::JAVASCRIPT); - rules->popup_redirect_rules = - map->GetSettingsForOneType(ContentSettingsType::POPUPS); +@@ -145,6 +145,11 @@ void GetRendererContentSettingRules(const HostContentSettingsMap* map, + ContentSettingToValue(CONTENT_SETTING_BLOCK), ProviderType::kNone, + map->IsOffTheRecord())); + #endif + + // pass custom timezone value to the render process + std::string timezone; @@ -729,7 +729,7 @@ diff --git a/components/content_settings/core/browser/content_settings_utils.cc diff --git a/components/content_settings/core/browser/host_content_settings_map.cc b/components/content_settings/core/browser/host_content_settings_map.cc --- a/components/content_settings/core/browser/host_content_settings_map.cc +++ b/components/content_settings/core/browser/host_content_settings_map.cc -@@ -676,6 +676,14 @@ void HostContentSettingsMap::SetClockForTesting(base::Clock* clock) { +@@ -673,6 +673,14 @@ void HostContentSettingsMap::SetClockForTesting(base::Clock* clock) { } } @@ -747,7 +747,7 @@ diff --git a/components/content_settings/core/browser/host_content_settings_map. diff --git a/components/content_settings/core/browser/host_content_settings_map.h b/components/content_settings/core/browser/host_content_settings_map.h --- a/components/content_settings/core/browser/host_content_settings_map.h +++ b/components/content_settings/core/browser/host_content_settings_map.h -@@ -394,6 +394,9 @@ class HostContentSettingsMap : public content_settings::Observer, +@@ -367,6 +367,9 @@ class HostContentSettingsMap : public content_settings::Observer, allow_invalid_secondary_pattern_for_testing_ = allow; } @@ -767,10 +767,10 @@ new file mode 100644 diff --git a/components/content_settings/core/common/content_settings.h b/components/content_settings/core/common/content_settings.h --- a/components/content_settings/core/common/content_settings.h +++ b/components/content_settings/core/common/content_settings.h -@@ -107,6 +107,7 @@ struct RendererContentSettingRules { - ContentSettingsForOneType popup_redirect_rules; +@@ -108,6 +108,7 @@ struct RendererContentSettingRules { + bool operator==(const RendererContentSettingRules& other) const; + ContentSettingsForOneType mixed_content_rules; - ContentSettingsForOneType auto_dark_content_rules; + std::string timezone_override_value; }; @@ -778,21 +778,21 @@ diff --git a/components/content_settings/core/common/content_settings.h b/compon diff --git a/components/content_settings/core/common/content_settings.mojom b/components/content_settings/core/common/content_settings.mojom --- a/components/content_settings/core/common/content_settings.mojom +++ b/components/content_settings/core/common/content_settings.mojom -@@ -102,4 +102,5 @@ struct RendererContentSettingRules { - array popup_redirect_rules; +@@ -91,4 +91,5 @@ struct ContentSettingPatternSource { + struct RendererContentSettingRules { + array settings_rules; array mixed_content_rules; - array auto_dark_content_rules; + string timezone_override_value; }; diff --git a/components/content_settings/core/common/content_settings_mojom_traits.cc b/components/content_settings/core/common/content_settings_mojom_traits.cc --- a/components/content_settings/core/common/content_settings_mojom_traits.cc +++ b/components/content_settings/core/common/content_settings_mojom_traits.cc -@@ -174,7 +174,8 @@ bool StructTraitsscript_rules) && - data.ReadPopupRedirectRules(&out->popup_redirect_rules) && - data.ReadMixedContentRules(&out->mixed_content_rules) && -- data.ReadAutoDarkContentRules(&out->auto_dark_content_rules); -+ data.ReadAutoDarkContentRules(&out->auto_dark_content_rules) && +@@ -133,7 +133,8 @@ bool StructTraitssettings_rules) && +- data.ReadMixedContentRules(&out->mixed_content_rules); ++ data.ReadMixedContentRules(&out->mixed_content_rules) && + data.ReadTimezoneOverrideValue(&out->timezone_override_value); } @@ -800,8 +800,8 @@ diff --git a/components/content_settings/core/common/content_settings_mojom_trai diff --git a/components/content_settings/core/common/content_settings_mojom_traits.h b/components/content_settings/core/common/content_settings_mojom_traits.h --- a/components/content_settings/core/common/content_settings_mojom_traits.h +++ b/components/content_settings/core/common/content_settings_mojom_traits.h -@@ -227,6 +227,11 @@ struct StructTraits< - return r.auto_dark_content_rules; +@@ -204,6 +204,11 @@ struct StructTraits< + return r.mixed_content_rules; } + static const std::string& timezone_override_value( @@ -815,7 +815,7 @@ diff --git a/components/content_settings/core/common/content_settings_mojom_trai diff --git a/components/content_settings/core/common/pref_names.h b/components/content_settings/core/common/pref_names.h --- a/components/content_settings/core/common/pref_names.h +++ b/components/content_settings/core/common/pref_names.h -@@ -224,6 +224,9 @@ inline constexpr char kDesktopSiteWindowSettingEnabled[] = +@@ -232,6 +232,9 @@ inline constexpr char kDesktopSiteWindowSettingEnabled[] = "desktop_site.window_setting"; #endif @@ -839,26 +839,23 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc #include "components/content_settings/core/common/content_settings.h" #include "components/content_settings/core/common/content_settings.mojom.h" #include "components/content_settings/core/common/content_settings_pattern.h" -@@ -353,6 +355,7 @@ bool ContentSettingsAgentImpl::AllowScript(bool enabled_per_settings) { - allow = allow || IsAllowlistedForContentSettings(); +@@ -368,6 +370,7 @@ bool ContentSettingsAgentImpl::AllowScript(bool enabled_per_settings) { + allow = allow || IsAllowlistedForContentSettingsCromite(); cached_script_permissions_[frame] = allow; + if (allow) UpdateOverrides(); return allow; } -@@ -368,7 +371,9 @@ bool ContentSettingsAgentImpl::AllowScriptFromSource( - content_setting_rules_->script_rules, script_url); - allow = setting != CONTENT_SETTING_BLOCK; +@@ -383,6 +386,7 @@ bool ContentSettingsAgentImpl::AllowScriptFromSource( + ContentSettingsType::JAVASCRIPT, script_url, enabled_per_settings); } -- return allow || IsAllowlistedForContentSettings(); -+ allow = allow || IsAllowlistedForContentSettings(); + allow = allow || IsAllowlistedForContentSettingsCromite(); + if (allow) UpdateOverrides(); -+ return allow; + return allow; } - bool ContentSettingsAgentImpl::AllowReadFromClipboard() { -@@ -468,4 +473,78 @@ bool ContentSettingsAgentImpl::IsAllowlistedForContentSettings() const { +@@ -480,4 +484,78 @@ bool ContentSettingsAgentImpl::IsAllowlistedForContentSettingsCromite() const { return false; } @@ -952,7 +949,7 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.h namespace blink { class WebFrame; class WebURL; -@@ -172,6 +177,12 @@ class ContentSettingsAgentImpl +@@ -175,6 +180,12 @@ class ContentSettingsAgentImpl std::unique_ptr delegate_; mojo::AssociatedReceiverSet receivers_; diff --git a/build/cromite_patches/Use-4-tile-rows-never-show-logo.patch b/build/cromite_patches/Use-4-tile-rows-never-show-logo.patch deleted file mode 100644 index 1cc6e94d..00000000 --- a/build/cromite_patches/Use-4-tile-rows-never-show-logo.patch +++ /dev/null @@ -1,79 +0,0 @@ -From: csagan5 <32685696+csagan5@users.noreply.github.com> -Date: Wed, 21 Feb 2018 00:32:09 +0100 -Subject: Use 4 tile rows, never show logo - -License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html ---- - .../org/chromium/chrome/browser/ntp/NewTabPageLayout.java | 6 +++--- - .../suggestions/mostvisited/MostVisitedSitesBridge.java | 2 +- - chrome/browser/engagement/important_sites_util.cc | 2 +- - components/history/core/browser/top_sites_impl.h | 2 +- - 4 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java ---- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java -+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageLayout.java -@@ -115,7 +115,7 @@ public class NewTabPageLayout extends LinearLayout { - */ - private boolean mHasShownView; - -- private boolean mSearchProviderHasLogo = true; -+ private boolean mSearchProviderHasLogo = false; - private boolean mSearchProviderIsGoogle; - private boolean mShowingNonStandardLogo; - -@@ -498,7 +498,7 @@ public class NewTabPageLayout extends LinearLayout { - boolean searchProviderIsGoogle) { - assert mMvTilesContainerLayout != null; - -- int maxRows = 2; -+ int maxRows = 4; - - mMostVisitedTilesCoordinator = - new MostVisitedTilesCoordinator( -@@ -732,7 +732,7 @@ public class NewTabPageLayout extends LinearLayout { - && mInitialized) { - return; - } -- mSearchProviderHasLogo = hasLogo; -+ mSearchProviderHasLogo = false; - mSearchProviderIsGoogle = isGoogle; - - updateTilesLayoutMargins(); -diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSitesBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSitesBridge.java ---- a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSitesBridge.java -+++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/mostvisited/MostVisitedSitesBridge.java -@@ -21,7 +21,7 @@ public class MostVisitedSitesBridge implements MostVisitedSites { - * Maximum number of tiles that is explicitly supported. UMA relies on this value, so even if - * the UI supports it, getting more can raise unexpected issues. - */ -- public static final int MAX_TILE_COUNT = 12; -+ public static final int MAX_TILE_COUNT = 12 * 2; - - private long mNativeMostVisitedSitesBridge; - -diff --git a/chrome/browser/engagement/important_sites_util.cc b/chrome/browser/engagement/important_sites_util.cc ---- a/chrome/browser/engagement/important_sites_util.cc -+++ b/chrome/browser/engagement/important_sites_util.cc -@@ -67,7 +67,7 @@ static const int kTimesIgnoredForSuppression = 3; - // These are the maximum # of bookmarks we can use as signals. If the user has - // <= kMaxBookmarks, then we just use those bookmarks. Otherwise we filter all - // bookmarks on site engagement > 0, sort, and trim to kMaxBookmarks. --static const int kMaxBookmarks = 5; -+static const int kMaxBookmarks = 4 * 4 + 2; - - // We need this to be a macro, as the histogram macros cache their pointers - // after the first call, so when we change the uma name we check fail if we're -diff --git a/components/history/core/browser/top_sites_impl.h b/components/history/core/browser/top_sites_impl.h ---- a/components/history/core/browser/top_sites_impl.h -+++ b/components/history/core/browser/top_sites_impl.h -@@ -40,7 +40,7 @@ class TopSitesImplTest; - struct SitesAndQueriesRequest; - - // How many top sites to store in the cache. --static constexpr size_t kTopSitesNumber = 10; -+static constexpr size_t kTopSitesNumber = 4 * 4 + 2; - - // This class allows requests for most visited urls on any thread. All other - // methods must be invoked on the UI thread. All mutations to internal state --- diff --git a/build/cromite_patches/User-agent-customization.patch b/build/cromite_patches/User-agent-customization.patch index 6d671382..e5ae7e19 100644 --- a/build/cromite_patches/User-agent-customization.patch +++ b/build/cromite_patches/User-agent-customization.patch @@ -2,10 +2,10 @@ From: uazo Date: Fri, 9 Apr 2021 20:09:08 +0000 Subject: User agent customization -Add flag to always view the desktop site for all websites Add possibility to define a custom User agent for mobile and desktop mode. -Add possibility to reactivate the metatag view for desktop mode, allowing users to choose -to use the flag in the hamburger menu to navigate with a custom useragent leaving the standard navigation unchanged. +Add possibility to reactivate the metatag view for desktop mode. +The menu item in the hamburger menu applies to the tab only, +whereas the content setting is intended for use in a specific site. 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 @@ -16,40 +16,48 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html chrome/android/chrome_java_sources.gni | 1 + .../layout/custom_useragent_preferences.xml | 106 ++++++++++ .../android/java/res/xml/main_preferences.xml | 5 + - .../java/res/xml/useragent_preferences.xml | 31 +++ + .../java/res/xml/useragent_preferences.xml | 25 +++ + .../chrome/browser/app/ChromeActivity.java | 2 +- .../init/ChromeBrowserInitializer.java | 3 + .../PrivacyPreferencesManagerImpl.java | 42 ++++ - .../settings/UserAgentPreferences.java | 188 ++++++++++++++++++ - .../chromium/chrome/browser/tab/TabImpl.java | 91 ++++++++- - .../chromium/chrome/browser/tab/TabUtils.java | 24 ++- - .../browser/android/content/content_utils.cc | 28 +++ + .../settings/UserAgentPreferences.java | 183 ++++++++++++++++++ + .../browser/tab/RequestDesktopUtils.java | 1 + + .../chromium/chrome/browser/tab/TabImpl.java | 62 +++++- + .../chromium/chrome/browser/tab/TabUtils.java | 17 +- + .../browser/android/content/content_utils.cc | 30 +++ .../preferences/browser_prefs_android.cc | 7 + .../privacy_preferences_manager_impl.cc | 124 ++++++++++++ - .../preferences/ChromePreferenceKeys.java | 7 +- + ...ktop_site_web_contents_observer_android.cc | 11 ++ + ...sktop_site_web_contents_observer_android.h | 2 + + .../preferences/ChromePreferenceKeys.java | 2 - .../settings/PrivacyPreferencesManager.java | 8 + .../org/chromium/chrome/browser/tab/Tab.java | 2 + .../browser/tabmodel/TabWindowManager.java | 2 + .../tabmodel/TabWindowManagerImpl.java | 18 ++ - .../strings/android_chrome_strings.grd | 35 ++++ + .../strings/android_chrome_strings.grd | 26 +++ chrome/common/pref_names.h | 8 + - .../widget/RadioButtonWithEditText.java | 11 + - .../embedder_support/user_agent_utils.cc | 7 +- + ...omiteRequestDesktopSiteContentSetting.java | 76 ++++++++ + .../request_desktop_site.grdp | 18 ++ + .../widget/RadioButtonWithEditText.java | 11 ++ + .../embedder_support/user_agent_utils.cc | 3 +- .../navigation_controller_android.cc | 4 + .../navigation_controller_android.h | 1 + .../renderer_host/render_process_host_impl.cc | 1 + - .../browser/web_contents/web_contents_impl.cc | 4 + + .../browser/web_contents/web_contents_impl.cc | 6 +- .../framehost/NavigationControllerImpl.java | 3 +- content/renderer/render_thread_impl.cc | 1 - - 30 files changed, 749 insertions(+), 19 deletions(-) + 36 files changed, 794 insertions(+), 23 deletions(-) create mode 100644 chrome/android/java/res/layout/custom_useragent_preferences.xml create mode 100644 chrome/android/java/res/xml/useragent_preferences.xml create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/settings/UserAgentPreferences.java + create mode 100644 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/impl/BromiteRequestDesktopSiteContentSetting.java + create mode 100644 components/browser_ui/strings/bromite_content_settings/request_desktop_site.grdp diff --git a/base/base_switches.cc b/base/base_switches.cc --- a/base/base_switches.cc +++ b/base/base_switches.cc -@@ -176,6 +176,8 @@ const char kPackageVersionName[] = "package-version-name"; - const char kPackageVersionCode[] = "package-version-code"; +@@ -176,6 +176,8 @@ const char kPackageName[] = "package-name"; + const char kPackageVersionName[] = "package-version-name"; #endif +const char kDesktopModeViewportMetaEnabled[] = "dm-viewport-meta-enabled"; @@ -60,7 +68,7 @@ diff --git a/base/base_switches.cc b/base/base_switches.cc diff --git a/base/base_switches.h b/base/base_switches.h --- a/base/base_switches.h +++ b/base/base_switches.h -@@ -65,6 +65,8 @@ extern const char kPackageVersionCode[]; +@@ -64,6 +64,8 @@ extern const char kPackageVersionName[]; extern const char kSchedulerBoostUrgent[]; #endif @@ -72,17 +80,17 @@ diff --git a/base/base_switches.h b/base/base_switches.h diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni --- a/chrome/android/chrome_java_resources.gni +++ b/chrome/android/chrome_java_resources.gni -@@ -651,4 +651,6 @@ chrome_java_resources = [ - "java/res/xml/privacy_preferences.xml", +@@ -640,4 +640,6 @@ chrome_java_resources = [ "java/res/xml/search_widget_info.xml", "java/res/xml/tracing_preferences.xml", + "java/res/xml/unified_account_settings_preferences.xml", + "java/res/xml/useragent_preferences.xml", + "java/res/layout/custom_useragent_preferences.xml", ] diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni --- a/chrome/android/chrome_java_sources.gni +++ b/chrome/android/chrome_java_sources.gni -@@ -963,6 +963,7 @@ chrome_java_sources = [ +@@ -944,6 +944,7 @@ chrome_java_sources = [ "java/src/org/chromium/chrome/browser/payments/ui/DimmingDialog.java", "java/src/org/chromium/chrome/browser/payments/ui/LineItem.java", "java/src/org/chromium/chrome/browser/payments/ui/PaymentAppComparator.java", @@ -204,9 +212,9 @@ new file mode 100644 diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml --- a/chrome/android/java/res/xml/main_preferences.xml +++ b/chrome/android/java/res/xml/main_preferences.xml -@@ -122,6 +122,11 @@ found in the LICENSE file. +@@ -132,6 +132,11 @@ found in the LICENSE file. android:key="content_settings" - android:order="21" + android:order="23" android:title="@string/prefs_site_settings"/> + + + & removed_headers, + const net::HttpRequestHeaders& modified_headers, + const net::HttpRequestHeaders& modified_cors_exempt_headers, -+ const absl::optional& new_url) override; ++ const std::optional& new_url) override; + void SetPriority(net::RequestPriority priority, + int32_t intra_priority_value) override; + void PauseReadingBodyFromNet() override; @@ -2686,7 +2665,7 @@ new file mode 100644 + void OnReceiveResponse( + ::network::mojom::URLResponseHeadPtr head, + ::mojo::ScopedDataPipeConsumerHandle body, -+ absl::optional cached_metadata) override; ++ std::optional cached_metadata) override; + void OnReceiveRedirect(const ::net::RedirectInfo& redirect_info, + ::network::mojom::URLResponseHeadPtr head) override; + void OnUploadProgress(int64_t current_position, @@ -2700,7 +2679,7 @@ new file mode 100644 + base::OnceCallback; + using CheckRewriteFilterMatchCallback = -+ base::OnceCallback&)>; ++ base::OnceCallback&)>; + + void OnBindingsClosed(); + void OnClientDisconnected(); @@ -2709,7 +2688,7 @@ new file mode 100644 + const net::MutableNetworkTrafficAnnotationTag& traffic_annotation, + mojo::PendingReceiver target_loader, + mojo::PendingRemote proxy_client, -+ const absl::optional& rewrite); ++ const std::optional& rewrite); + void OnRequestFilterMatchResult( + ::mojo::PendingReceiver loader, + uint32_t options, @@ -2723,7 +2702,7 @@ new file mode 100644 + void OnProcessHeadersResult( + ::network::mojom::URLResponseHeadPtr head, + ::mojo::ScopedDataPipeConsumerHandle body, -+ absl::optional cached_metadata, ++ std::optional cached_metadata, + FilterMatchResult result, + network::mojom::ParsedHeadersPtr parsed_headers); + void OnRequestError(int error_code); @@ -2745,8 +2724,8 @@ new file mode 100644 + FilterMatchResult result, + network::mojom::ParsedHeadersPtr parsed_headers); + void PostRewriteCallbackToUI( -+ base::OnceCallback&)> callback, -+ const absl::optional& url); ++ base::OnceCallback&)> callback, ++ const std::optional& url); + + GURL request_url_; + int request_id_; @@ -2801,7 +2780,7 @@ new file mode 100644 + const std::vector& removed_headers, + const net::HttpRequestHeaders& modified_headers, + const net::HttpRequestHeaders& modified_cors_exempt_headers, -+ const absl::optional& new_url) { ++ const std::optional& new_url) { + if (target_loader_.is_bound()) { + target_loader_->FollowRedirect(removed_headers, modified_headers, + modified_cors_exempt_headers, new_url); @@ -2836,7 +2815,7 @@ new file mode 100644 +void AdblockURLLoaderFactory::InProgressRequest::OnReceiveResponse( + network::mojom::URLResponseHeadPtr head, + mojo::ScopedDataPipeConsumerHandle body, -+ absl::optional cached_metadata) { ++ std::optional cached_metadata) { + if (net::IsLocalhost(request_url_) || (!request_url_.SchemeIsHTTPOrHTTPS() && + !request_url_.SchemeIsWSOrWSS())) { + VLOG(1) @@ -2859,7 +2838,7 @@ new file mode 100644 +void AdblockURLLoaderFactory::InProgressRequest::OnProcessHeadersResult( + ::network::mojom::URLResponseHeadPtr head, + ::mojo::ScopedDataPipeConsumerHandle body, -+ absl::optional cached_metadata, ++ std::optional cached_metadata, + FilterMatchResult result, + network::mojom::ParsedHeadersPtr parsed_headers) { + if (result == FilterMatchResult::kBlockRule) { @@ -2966,7 +2945,7 @@ new file mode 100644 +void AdblockURLLoaderFactory::InProgressRequest::CheckRewriteFilterMatch( + CheckRewriteFilterMatchCallback callback) { + if (!factory_->CheckHostValid()) { -+ PostRewriteCallbackToUI(std::move(callback), absl::optional{}); ++ PostRewriteCallbackToUI(std::move(callback), std::optional{}); + return; + } + @@ -3053,8 +3032,8 @@ new file mode 100644 +} + +void AdblockURLLoaderFactory::InProgressRequest::PostRewriteCallbackToUI( -+ base::OnceCallback&)> callback, -+ const absl::optional& url) { ++ base::OnceCallback&)> callback, ++ const std::optional& url) { + content::GetUIThreadTaskRunner({kTaskResponsePriority}) + ->PostTask(FROM_HERE, base::BindOnce(std::move(callback), url)); +} @@ -3136,7 +3115,7 @@ new file mode 100644 + const net::MutableNetworkTrafficAnnotationTag& traffic_annotation, + mojo::PendingReceiver target_loader, + mojo::PendingRemote proxy_client, -+ const absl::optional& rewrite) { ++ const std::optional& rewrite) { + if (rewrite) { + constexpr int kInternalRedirectStatusCode = net::HTTP_TEMPORARY_REDIRECT; + net::RedirectInfo redirect_info = net::RedirectInfo::ComputeRedirectInfo( @@ -3815,7 +3794,7 @@ new file mode 100644 + response += enabled ? "enabled" : "disabled"; + return response; + } -+ absl::optional value = absl::nullopt; ++ std::optional value = absl::nullopt; + if (action == kActionEnable) { + value = true; + } else if (action == kActionDisable) { @@ -5409,7 +5388,7 @@ new file mode 100644 + SubscriptionService::Snapshot subscription_collections, + const GURL& request_url, + content::GlobalRenderFrameHostId render_frame_host_id, -+ base::OnceCallback&)> result) = 0; ++ base::OnceCallback&)> result) = 0; +}; + +} // namespace adblock @@ -5481,7 +5460,7 @@ new file mode 100644 + const GURL& popup_url, + const std::vector& frame_hierarchy, + content::GlobalRenderFrameHostId render_frame_host_id, -+ absl::optional callback, ++ std::optional callback, + const ResourceClassifier::ClassificationResult& classification_result) { + if (classification_result.decision != ClassificationDecision::Ignored) { + FilterMatchResult result = @@ -5849,14 +5828,14 @@ new file mode 100644 + SubscriptionService::Snapshot subscription_collections, + const GURL& request_url, + content::GlobalRenderFrameHostId render_frame_host_id, -+ base::OnceCallback&)> callback) { ++ base::OnceCallback&)> callback) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + DVLOG(1) << "[eyeo] CheckRewriteFilterMatch for " << request_url.spec(); + + content::RenderFrameHost* host = + frame_hierarchy_builder_->FindRenderFrameHost(render_frame_host_id); + if (!host) { -+ std::move(callback).Run(absl::optional{}); ++ std::move(callback).Run(std::optional{}); + return; + } + @@ -5957,7 +5936,7 @@ new file mode 100644 + SubscriptionService::Snapshot subscription_collections, + const GURL& request_url, + content::GlobalRenderFrameHostId render_frame_host_id, -+ base::OnceCallback&)> result) final; ++ base::OnceCallback&)> result) final; + + private: + struct CheckResourceFilterMatchResult { @@ -5986,7 +5965,7 @@ new file mode 100644 + const GURL& popup_url, + const std::vector& frame_hierarchy, + content::GlobalRenderFrameHostId render_frame_host_id, -+ absl::optional callback, ++ std::optional callback, + const ResourceClassifier::ClassificationResult& result); + + static CheckResourceFilterMatchResult CheckResponseFilterMatchInternal( @@ -6009,8 +5988,8 @@ new file mode 100644 + FilterMatchResult result); + + void PostRewriteCallbackToUI( -+ base::OnceCallback&)> callback, -+ absl::optional url); ++ base::OnceCallback&)> callback, ++ std::optional url); + + static CheckResourceFilterMatchResult CheckDocumentAllowlistedInternal( + const SubscriptionService::Snapshot subscription_collections, @@ -7194,7 +7173,7 @@ new file mode 100644 + return results; +} + -+absl::optional MigrateBoolFromPrefs(PrefService* pref_service, ++std::optional MigrateBoolFromPrefs(PrefService* pref_service, + const std::string& pref_name) { + if (pref_service->FindPreference(pref_name)->HasUserSetting()) { + bool value = pref_service->GetBoolean(pref_name); @@ -8145,7 +8124,7 @@ new file mode 100644 + const scoped_refptr& response_headers) + const = 0; + -+ virtual absl::optional CheckRewrite( ++ virtual std::optional CheckRewrite( + const SubscriptionService::Snapshot subscription_collections, + const GURL& request_url, + const std::vector& frame_hierarchy) const = 0; @@ -8191,7 +8170,7 @@ new file mode 100644 + +using ClassificationResult = ResourceClassifier::ClassificationResult; + -+absl::optional IsHeaderFilterOverruled( ++std::optional IsHeaderFilterOverruled( + base::StringPiece blocking_header_filter, + std::set& allowing_filters) { + for (auto filter : allowing_filters) { @@ -8422,7 +8401,7 @@ new file mode 100644 + std::move(blocking_filters), std::move(allowing_filters)); +} + -+absl::optional CheckRewriteWithSingleCollection( ++std::optional CheckRewriteWithSingleCollection( + const SubscriptionCollection& subscription_collection, + const GURL& request_url, + const std::vector& frame_hierarchy) { @@ -8459,7 +8438,7 @@ new file mode 100644 + request_url, frame_hierarchy, FilterCategory::Allowing); + if (allowing_rewrites.empty()) { + // Any filter will do, take the 1st one. -+ return absl::optional(GURL{*blocking_rewrites.begin()}); ++ return std::optional(GURL{*blocking_rewrites.begin()}); + } + + // Change set to vector to call algorithm @@ -8482,7 +8461,7 @@ new file mode 100644 + } + + // Any filter will do, take the 1st one. -+ return absl::optional(GURL{*blocking_rewrites_v.begin()}); ++ return std::optional(GURL{*blocking_rewrites_v.begin()}); +} + +} // namespace @@ -8552,7 +8531,7 @@ new file mode 100644 + return classification; +} + -+absl::optional ResourceClassifierImpl::CheckRewrite( ++std::optional ResourceClassifierImpl::CheckRewrite( + const SubscriptionService::Snapshot subscription_collections, + const GURL& request_url, + const std::vector& frame_hierarchy) const { @@ -8623,7 +8602,7 @@ new file mode 100644 + const scoped_refptr& response_headers) + const final; + -+ absl::optional CheckRewrite( ++ std::optional CheckRewrite( + const SubscriptionService::Snapshot subscription_collections, + const GURL& request_url, + const std::vector& frame_hierarchy) const final; @@ -9599,7 +9578,7 @@ new file mode 100644 +// Destroys memory mapped to a file on disk, and optionally removes the file +// itself. Performs blocking operations, must run on a MayBlock() task runner. +void DestroyMemoryMappedFile(std::unique_ptr memory, -+ absl::optional path_to_remove) { ++ std::optional path_to_remove) { + memory.reset(); + // Deleting the file should happen *after* removing the memory mapping. + if (path_to_remove) { @@ -9633,7 +9612,7 @@ new file mode 100644 +MemoryMappedFlatbufferData::~MemoryMappedFlatbufferData() { + const auto path_to_remove = + permanently_remove_path_.load() -+ ? absl::optional(std::move(path_)) ++ ? std::optional(std::move(path_)) + : absl::nullopt; + base::ThreadPool::PostTask( + FROM_HERE, {base::MayBlock()}, @@ -9893,7 +9872,7 @@ new file mode 100644 + +namespace adblock { + -+absl::optional ExtractRegexFilterFromPattern( ++std::optional ExtractRegexFilterFromPattern( + base::StringPiece filter_pattern) { + if (!(filter_pattern.size() > 2 && filter_pattern.front() == '/' && + filter_pattern.back() == '/')) { @@ -9936,7 +9915,7 @@ new file mode 100644 +// For a regex filter "/{expression}/" returns "{expression}". +// For non-regex filters, returns nullopt. +// Cheap, may be used to identify regex filter patterns. -+absl::optional ExtractRegexFilterFromPattern( ++std::optional ExtractRegexFilterFromPattern( + base::StringPiece filter_pattern); +} // namespace adblock + @@ -11085,7 +11064,7 @@ new file mode 100644 +static constexpr char kDomainSeparator[] = ","; + +// static -+absl::optional ContentFilter::FromString( ++std::optional ContentFilter::FromString( + base::StringPiece domain_list, + FilterType filter_type, + base::StringPiece selector) { @@ -11163,7 +11142,7 @@ new file mode 100644 + +class ContentFilter { + public: -+ static absl::optional FromString(base::StringPiece domain_list, ++ static std::optional FromString(base::StringPiece domain_list, + FilterType type, + base::StringPiece selector); + @@ -11495,13 +11474,13 @@ new file mode 100644 +// Parses the stream line by line until it finds comments. After the first non +// comment line any upcoming comments will be skipped. +// static -+absl::optional Metadata::FromStream(std::istream& filter_stream) { ++std::optional Metadata::FromStream(std::istream& filter_stream) { + static re2::RE2 comment_re("^!\\s*(.*?)\\s*:\\s*(.*)"); + + std::string homepage; + std::string title; + std::string version; -+ absl::optional redirect_url; ++ std::optional redirect_url; + base::TimeDelta expires = kDefaultExpirationInterval; + + std::string line; @@ -11559,7 +11538,7 @@ new file mode 100644 +Metadata::Metadata(std::string homepage, + std::string title, + std::string version, -+ absl::optional redirect_url, ++ std::optional redirect_url, + base::TimeDelta expires) + : homepage(std::move(homepage)), + title(std::move(title)), @@ -11646,7 +11625,7 @@ new file mode 100644 + +class Metadata { + public: -+ static absl::optional FromStream(std::istream& filter_stream); ++ static std::optional FromStream(std::istream& filter_stream); + static Metadata Default(); + + Metadata(const Metadata& other); @@ -11656,7 +11635,7 @@ new file mode 100644 + const std::string homepage; + const std::string title; + const std::string version; -+ const absl::optional redirect_url; ++ const std::optional redirect_url; + const base::TimeDelta expires; + + static constexpr base::TimeDelta kDefaultExpirationInterval = base::Days(5); @@ -11667,7 +11646,7 @@ new file mode 100644 + Metadata(std::string homepage, + std::string title, + std::string version, -+ absl::optional redirect_url, ++ std::optional redirect_url, + base::TimeDelta expires); + Metadata(); + @@ -11710,7 +11689,7 @@ new file mode 100644 +static constexpr char kDomainSeparator[] = ","; + +// static -+absl::optional SnippetFilter::FromString( ++std::optional SnippetFilter::FromString( + base::StringPiece domain_list, + base::StringPiece snippet) { + if (snippet.empty()) { @@ -11779,7 +11758,7 @@ new file mode 100644 + +class SnippetFilter { + public: -+ static absl::optional FromString(base::StringPiece domain_list, ++ static std::optional FromString(base::StringPiece domain_list, + base::StringPiece snippet); + + SnippetFilter(const SnippetFilter& other); @@ -12038,7 +12017,7 @@ new file mode 100644 + +bool IsGenericFilterIsNotSpecificEnough( + base::StringPiece filter_str, -+ const absl::optional& options) { ++ const std::optional& options) { + if (options.has_value() && (!options->Domains().GetExcludeDomains().empty() || + !options->Domains().GetIncludeDomains().empty() || + !options->Sitekeys().empty())) { @@ -12052,8 +12031,8 @@ new file mode 100644 +} + +// static -+absl::optional UrlFilter::FromString(std::string filter_str) { -+ absl::optional options; ++std::optional UrlFilter::FromString(std::string filter_str) { ++ std::optional options; + bool is_allowing = base::StartsWith(filter_str, kAllowingSymbol); + if (is_allowing) { + filter_str.erase(0, 2); @@ -12214,7 +12193,7 @@ new file mode 100644 + +class UrlFilter { + public: -+ static absl::optional FromString(std::string filter_str); ++ static std::optional FromString(std::string filter_str); + + UrlFilter(const UrlFilter& other); + UrlFilter(UrlFilter&& other); @@ -12270,17 +12249,17 @@ new file mode 100644 +static constexpr char kInverseSymbol = '~'; + +// static -+absl::optional UrlFilterOptions::FromString( ++std::optional UrlFilterOptions::FromString( + const std::string& option_list) { + bool is_match_case = false; + bool is_popup_filter = false; + bool is_subresource = false; + ThirdPartyOption third_party = ThirdPartyOption::Ignore; -+ absl::optional rewrite; ++ std::optional rewrite; + DomainOption domains; + SiteKeys sitekeys; -+ absl::optional csp; -+ absl::optional headers; ++ std::optional csp; ++ std::optional headers; + uint32_t content_types = 0; + std::set exception_types; + @@ -12394,7 +12373,7 @@ new file mode 100644 + content_types_(ContentType::Default) {} + +// static -+absl::optional UrlFilterOptions::ParseRewrite( ++std::optional UrlFilterOptions::ParseRewrite( + const std::string& rewrite_value) { + if (rewrite_value == "abp-resource:blank-text") { + return RewriteOption::AbpResource_BlankText; @@ -12455,7 +12434,7 @@ new file mode 100644 +} + +// static -+absl::optional ++std::optional +UrlFilterOptions::ExceptionTypeFromString(const std::string& exception_type) { + if (exception_type == "document") { + return ExceptionType::Document; @@ -12475,11 +12454,11 @@ new file mode 100644 + const bool is_subresource, + const ThirdPartyOption third_party, + const uint32_t content_types, -+ const absl::optional rewrite, ++ const std::optional rewrite, + const DomainOption domains, + const SiteKeys sitekeys, -+ const absl::optional csp, -+ const absl::optional headers, ++ const std::optional csp, ++ const std::optional headers, + const std::set exception_types) + : is_match_case_(is_match_case), + is_popup_filter_(is_popup_filter), @@ -12565,7 +12544,7 @@ new file mode 100644 + Genericblock, + }; + -+ static absl::optional FromString( ++ static std::optional FromString( + const std::string& option_list); + + UrlFilterOptions(); @@ -12579,13 +12558,13 @@ new file mode 100644 + inline bool IsPopup() const { return is_popup_filter_; } + inline bool IsSubresource() const { return is_subresource_; } + inline ThirdPartyOption ThirdParty() const { return third_party_; } -+ inline const absl::optional& Rewrite() const { ++ inline const std::optional& Rewrite() const { + return rewrite_; + } + inline const DomainOption& Domains() const { return domains_; } + inline const std::vector& Sitekeys() const { return sitekeys_; } -+ inline const absl::optional& Csp() const { return csp_; } -+ inline const absl::optional& Headers() const { return headers_; } ++ inline const std::optional& Csp() const { return csp_; } ++ inline const std::optional& Headers() const { return headers_; } + inline uint32_t ContentTypes() const { return content_types_; } + inline const std::set& ExceptionTypes() const { + return exception_types_; @@ -12597,19 +12576,19 @@ new file mode 100644 + bool is_subresource, + ThirdPartyOption third_party, + uint32_t content_types, -+ absl::optional rewrite, ++ std::optional rewrite, + DomainOption domains, + std::vector sitekeys, -+ absl::optional csp, -+ absl::optional headers, ++ std::optional csp, ++ std::optional headers, + std::set exception_types); + -+ static absl::optional ParseRewrite( ++ static std::optional ParseRewrite( + const std::string& rewrite_value); + static std::vector ParseSitekeys(const std::string& sitekey_value); + static bool IsValidCsp(const std::string& csp_value); + static void ParseHeaders(std::string& headers_value); -+ static absl::optional ExceptionTypeFromString( ++ static std::optional ExceptionTypeFromString( + const std::string& exception_type); + + bool is_match_case_; @@ -12617,11 +12596,11 @@ new file mode 100644 + bool is_subresource_; + ThirdPartyOption third_party_; + uint32_t content_types_; -+ absl::optional rewrite_; ++ std::optional rewrite_; + DomainOption domains_; + std::vector sitekeys_; -+ absl::optional csp_; -+ absl::optional headers_; ++ std::optional csp_; ++ std::optional headers_; + std::set exception_types_; +}; + @@ -12716,7 +12695,7 @@ new file mode 100644 + +namespace adblock { + -+absl::optional FilterKeywordExtractor::GetNextKeyword() { ++std::optional FilterKeywordExtractor::GetNextKeyword() { + std::string current_keyword; + do { + // In case that we are extracting keyword to store a filter @@ -12805,7 +12784,7 @@ new file mode 100644 + public: + explicit FilterKeywordExtractor(base::StringPiece url); + ~FilterKeywordExtractor(); -+ absl::optional GetNextKeyword(); ++ std::optional GetNextKeyword(); + + private: + re2::StringPiece input_; @@ -12985,9 +12964,9 @@ new file mode 100644 + ? builder_.CreateSharedString(options.Headers().value()) + : flatbuffers::Offset()); + -+ const absl::optional keyword_pattern = ++ const std::optional keyword_pattern = + ExtractRegexFilterFromPattern(url_filter.pattern).has_value() -+ ? absl::optional() ++ ? std::optional() + : url_filter.pattern; + + if (options.Headers().has_value()) { @@ -13043,7 +13022,7 @@ new file mode 100644 + +void FlatbufferSerializer::AddUrlFilterToIndex( + UrlFilterIndex& index, -+ absl::optional pattern_text, ++ std::optional pattern_text, + flatbuffers::Offset filter) { + const auto keyword = + pattern_text ? FindCandidateKeyword(index, *pattern_text) : ""; @@ -13280,7 +13259,7 @@ new file mode 100644 + std::vector>>; + + void AddUrlFilterToIndex(UrlFilterIndex& index, -+ absl::optional pattern_text, ++ std::optional pattern_text, + flatbuffers::Offset filter); + void AddElemhideFilterForDomains( + ElemhideIndex& index, @@ -13728,7 +13707,7 @@ new file mode 100644 + const scoped_refptr& headers, + const std::string& user_agent) = 0; + -+ virtual absl::optional> FindSiteKeyForAnyUrl( ++ virtual std::optional> FindSiteKeyForAnyUrl( + const std::vector& urls) const = 0; +}; + @@ -13793,7 +13772,7 @@ new file mode 100644 + ProcessSiteKey(request_url, site_key, user_agent); +} + -+absl::optional> ++std::optional> +SitekeyStorageImpl::FindSiteKeyForAnyUrl(const std::vector& urls) const { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + for (const auto& url : urls) { @@ -13930,7 +13909,7 @@ new file mode 100644 + const scoped_refptr& headers, + const std::string& user_agent) final; + -+ absl::optional> FindSiteKeyForAnyUrl( ++ std::optional> FindSiteKeyForAnyUrl( + const std::vector& urls) const final; + + private: @@ -14220,7 +14199,7 @@ new file mode 100644 +DomainSplitter::DomainSplitter(base::StringPiece domain) + : domain_(base::TrimString(domain, ".", base::TRIM_ALL)) {} + -+absl::optional DomainSplitter::FindNextSubdomain() { ++std::optional DomainSplitter::FindNextSubdomain() { + const auto old_dot_pos = dot_pos_; + if (dot_pos_ < domain_.size()) { + // Find next dot in domain, for future iteration to consume. @@ -14279,7 +14258,7 @@ new file mode 100644 + // |domain| must outlive this, no copy made. + explicit DomainSplitter(base::StringPiece domain); + // Returns reference to part of |domain|. -+ absl::optional FindNextSubdomain(); ++ std::optional FindNextSubdomain(); + + private: + const base::StringPiece domain_; @@ -15467,7 +15446,7 @@ new file mode 100644 +std::vector InstalledSubscriptionImpl::FindInternal( + const UrlFilterIndex* index, + const GURL& url, -+ absl::optional content_type, ++ std::optional content_type, + const std::string& document_domain, + const std::string& sitekey, + FilterCategory category, @@ -15506,7 +15485,7 @@ new file mode 100644 + base::StringPiece keyword, + const GURL& url, + const GURL& lowercase_url, -+ absl::optional content_type, ++ std::optional content_type, + const std::string& document_domain, + const std::string& sitekey, + FilterCategory category, @@ -15559,7 +15538,7 @@ new file mode 100644 + +bool InstalledSubscriptionImpl::CandidateFilterViable( + const flat::UrlFilter* candidate, -+ absl::optional content_type, ++ std::optional content_type, + const std::string& document_domain, + const std::string& sitekey, + FilterCategory category, @@ -15818,7 +15797,7 @@ new file mode 100644 + std::vector FindInternal( + const UrlFilterIndex* index, + const GURL& url, -+ absl::optional content_type, ++ std::optional content_type, + const std::string& document_domain, + const std::string& sitekey, + FilterCategory category, @@ -15828,7 +15807,7 @@ new file mode 100644 + base::StringPiece keyword, + const GURL& url, + const GURL& lowercase_url, -+ absl::optional content_type, ++ std::optional content_type, + const std::string& document_domain, + const std::string& sitekey, + FilterCategory category, @@ -15836,7 +15815,7 @@ new file mode 100644 + FindStrategy strategy, + std::vector& out_results) const; + bool CandidateFilterViable(const flat::UrlFilter* candidate, -+ absl::optional content_type, ++ std::optional content_type, + const std::string& document_domain, + const std::string& sitekey, + FilterCategory category, @@ -16311,7 +16290,7 @@ new file mode 100644 + base::StringPiece consumed_filter_pattern_; +}; + -+absl::optional FindNextTokenInInput( ++std::optional FindNextTokenInInput( + base::StringPiece consumed_input, + PatternTokenizer tokenizer, + int recursion_depth); @@ -16365,7 +16344,7 @@ new file mode 100644 + +// Returns characters skipped in order to reach next token from |tokenizer|, or +// nullopt if not found. -+absl::optional FindNextTokenInInput( ++std::optional FindNextTokenInInput( + base::StringPiece consumed_input, + PatternTokenizer tokenizer, + int recursion_depth) { @@ -16398,7 +16377,7 @@ new file mode 100644 + // It is OK as long as there are no further tokens that require matching + // input. The "^" symbol matches EOF too. + return NextTokenBeginsInput(base::StringPiece(), tokenizer, recursion_depth) -+ ? absl::optional{consumed_input} ++ ? std::optional{consumed_input} + : absl::nullopt; + } else if (token == "|") { + // If we're skipping characters, we can always skip enough to reach the end @@ -17153,23 +17132,23 @@ new file mode 100644 + // Name of the FilteringConfiguration this collection represents + virtual const std::string& GetFilteringConfigurationName() const = 0; + -+ virtual absl::optional FindBySubresourceFilter( ++ virtual std::optional FindBySubresourceFilter( + const GURL& request_url, + const std::vector& frame_hierarchy, + ContentType content_type, + const SiteKey& sitekey, + FilterCategory category) const = 0; -+ virtual absl::optional FindByPopupFilter( ++ virtual std::optional FindByPopupFilter( + const GURL& popup_url, + const std::vector& frame_hierarchy, + const SiteKey& sitekey, + FilterCategory category) const = 0; -+ virtual absl::optional FindByAllowFilter( ++ virtual std::optional FindByAllowFilter( + const GURL& request_url, + const std::vector& frame_hierarchy, + ContentType content_type, + const SiteKey& sitekey) const = 0; -+ virtual absl::optional FindBySpecialFilter( ++ virtual std::optional FindBySpecialFilter( + SpecialFilterType filter_type, + const GURL& request_url, + const std::vector& frame_hierarchy, @@ -17340,7 +17319,7 @@ new file mode 100644 + return configuration_name_; +} + -+absl::optional SubscriptionCollectionImpl::FindBySubresourceFilter( ++std::optional SubscriptionCollectionImpl::FindBySubresourceFilter( + const GURL& request_url, + const std::vector& frame_hierarchy, + ContentType content_type, @@ -17359,7 +17338,7 @@ new file mode 100644 + return absl::nullopt; +} + -+absl::optional SubscriptionCollectionImpl::FindByPopupFilter( ++std::optional SubscriptionCollectionImpl::FindByPopupFilter( + const GURL& popup_url, + const std::vector& frame_hierarchy, + const SiteKey& sitekey, @@ -17377,7 +17356,7 @@ new file mode 100644 + return absl::nullopt; +} + -+absl::optional SubscriptionCollectionImpl::FindByAllowFilter( ++std::optional SubscriptionCollectionImpl::FindByAllowFilter( + const GURL& request_url, + const std::vector& frame_hierarchy, + ContentType content_type, @@ -17391,7 +17370,7 @@ new file mode 100644 + return absl::nullopt; +} + -+absl::optional SubscriptionCollectionImpl::FindBySpecialFilter( ++std::optional SubscriptionCollectionImpl::FindBySpecialFilter( + SpecialFilterType filter_type, + const GURL& request_url, + const std::vector& frame_hierarchy, @@ -17609,26 +17588,26 @@ new file mode 100644 + + const std::string& GetFilteringConfigurationName() const final; + -+ absl::optional FindBySubresourceFilter( ++ std::optional FindBySubresourceFilter( + const GURL& request_url, + const std::vector& frame_hierarchy, + ContentType content_type, + const SiteKey& sitekey, + FilterCategory category) const final; + -+ absl::optional FindByPopupFilter( ++ std::optional FindByPopupFilter( + const GURL& popup_url, + const std::vector& frame_hierarchy, + const SiteKey& sitekey, + FilterCategory category) const final; + -+ absl::optional FindByAllowFilter( ++ std::optional FindByAllowFilter( + const GURL& request_url, + const std::vector& frame_hierarchy, + ContentType content_type, + const SiteKey& sitekey) const final; + -+ absl::optional FindBySpecialFilter( ++ std::optional FindBySpecialFilter( + SpecialFilterType filter_type, + const GURL& request_url, + const std::vector& frame_hierarchy, @@ -18598,7 +18577,7 @@ new file mode 100644 + raw_ptr conversion_executor_; + raw_ptr persistent_metadata_; + OngoingDownloads ongoing_downloads_; -+ absl::optional ongoing_ping_; ++ std::optional ongoing_ping_; + base::WeakPtrFactory weak_ptr_factory_{this}; +}; + @@ -20211,7 +20190,7 @@ new file mode 100644 + +} // namespace + -+absl::optional UrlKeywordExtractor::GetNextKeyword() { ++std::optional UrlKeywordExtractor::GetNextKeyword() { + base::StringPiece current_keyword; + do { + const auto start_of_next_keyword = input_.find_first_not_of('\0'); @@ -20298,7 +20277,7 @@ new file mode 100644 + public: + explicit UrlKeywordExtractor(base::StringPiece url); + ~UrlKeywordExtractor(); -+ absl::optional GetNextKeyword(); ++ std::optional GetNextKeyword(); + + private: + std::string url_with_nulls_; @@ -52324,7 +52303,7 @@ diff --git a/content/browser/loader/navigation_url_loader_impl.cc b/content/brow #include "content/browser/loader/navigation_url_loader_impl.h" #include -@@ -999,7 +1003,7 @@ void NavigationURLLoaderImpl::OnReceiveRedirect( +@@ -1110,7 +1114,7 @@ void NavigationURLLoaderImpl::OnReceiveRedirect( LogQueueTimeHistogram("Navigation.QueueTime.OnReceiveRedirect", resource_request_->is_outermost_main_frame); net::Error error = net::OK; @@ -52347,7 +52326,7 @@ diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/b #include "content/browser/renderer_host/render_frame_host_impl.h" -@@ -2646,6 +2650,12 @@ void RenderFrameHostImpl::ExecuteJavaScriptMethod( +@@ -2752,6 +2756,12 @@ void RenderFrameHostImpl::ExecuteJavaScriptMethod( std::move(callback)); } @@ -52374,7 +52353,7 @@ diff --git a/content/browser/renderer_host/render_frame_host_impl.h b/content/br #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_ #define CONTENT_BROWSER_RENDERER_HOST_RENDER_FRAME_HOST_IMPL_H_ -@@ -435,6 +439,10 @@ class CONTENT_EXPORT RenderFrameHostImpl +@@ -465,6 +469,10 @@ class CONTENT_EXPORT RenderFrameHostImpl const std::u16string& method_name, base::Value::List arguments, JavaScriptResultCallback callback) override; @@ -52399,7 +52378,7 @@ diff --git a/content/public/browser/render_frame_host.h b/content/public/browser #ifndef CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ #define CONTENT_PUBLIC_BROWSER_RENDER_FRAME_HOST_H_ -@@ -525,6 +529,9 @@ class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, +@@ -537,6 +541,9 @@ class CONTENT_EXPORT RenderFrameHost : public IPC::Listener, virtual void AddMessageToConsole(blink::mojom::ConsoleMessageLevel level, const std::string& message) = 0; @@ -52517,7 +52496,7 @@ diff --git a/third_party/blink/public/mojom/frame/frame.mojom b/third_party/blin module blink.mojom; -@@ -897,6 +901,10 @@ interface LocalFrame { +@@ -944,6 +948,10 @@ interface LocalFrame { // the given point in the view coordinate space. PluginActionAt(gfx.mojom.Point location, blink.mojom.PluginActionType action); @@ -52571,7 +52550,7 @@ diff --git a/third_party/blink/renderer/core/exported/web_document.cc b/third_pa #include "third_party/blink/public/web/web_document.h" #include "base/memory/scoped_refptr.h" -@@ -263,6 +267,54 @@ WebStyleSheetKey WebDocument::InsertStyleSheet( +@@ -264,6 +268,54 @@ WebStyleSheetKey WebDocument::InsertStyleSheet( return injection_key; } @@ -52669,7 +52648,7 @@ diff --git a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.h b/ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_FRAME_LOCAL_FRAME_MOJO_HANDLER_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_FRAME_LOCAL_FRAME_MOJO_HANDLER_H_ -@@ -111,6 +115,7 @@ class LocalFrameMojoHandler +@@ -110,6 +114,7 @@ class LocalFrameMojoHandler void AddMessageToConsole(mojom::blink::ConsoleMessageLevel level, const WTF::String& message, bool discard_duplicates) final; @@ -52691,7 +52670,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/url_loader/mojo_ur #include "third_party/blink/renderer/platform/loader/fetch/url_loader/mojo_url_loader_client.h" #include -@@ -395,7 +399,7 @@ void MojoURLLoaderClient::OnReceiveRedirect( +@@ -388,7 +392,7 @@ void MojoURLLoaderClient::OnReceiveRedirect( OnComplete(network::URLLoaderCompletionStatus(net::ERR_ABORTED)); return; } @@ -53149,15 +53128,16 @@ diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ # This file is used to assign starting resource ids for resources and strings # used by Chromium. This is done to ensure that resource ids are unique # across all the grd files. If you are adding a new grd file, please add -@@ -705,6 +709,10 @@ - "META": {"sizes": {"includes": [10]}}, - "includes": [5240], +@@ -1344,6 +1348,11 @@ + "includes": [8460], }, + + "<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resources/adblock_internals/resources.grd": { -+ "META": {"sizes": {"includes": [10],}}, -+ "includes": [5250], ++ "META": {"sizes": {"includes": [10]}}, ++ "includes": [8480], + }, - "<(SHARED_INTERMEDIATE_DIR)/chrome/browser/resources/on_device_internals/resources.grd": { - "META": {"sizes": {"includes": [10]}}, - "includes": [5260], ++ + # END "everything else" section. + # Everything but chrome/, components/, content/, and ios/ + -- diff --git a/build/cromite_patches/eyeo-beta-118.0.5993.48-chrome_integration.patch b/build/cromite_patches/eyeo-beta-118.0.5993.48-chrome_integration.patch index cfccbfb6..dd651768 100644 --- a/build/cromite_patches/eyeo-beta-118.0.5993.48-chrome_integration.patch +++ b/build/cromite_patches/eyeo-beta-118.0.5993.48-chrome_integration.patch @@ -35,7 +35,6 @@ Pre-requisites: eyeo Browser Ad filtering Solution: Base Module chrome/browser/preferences/BUILD.gn | 5 + .../prefs/chrome_pref_service_factory.cc | 11 + ...hrome_browser_main_extra_parts_profiles.cc | 26 ++ - .../profile_keyed_service_browsertest.cc | 42 ++- chrome/browser/resources/BUILD.gn | 5 + .../resources/adblock_internals/BUILD.gn | 29 ++ .../adblock_internals/adblock_internals.html | 38 +++ @@ -55,7 +54,7 @@ Pre-requisites: eyeo Browser Ad filtering Solution: Base Module chrome/common/BUILD.gn | 3 + chrome/common/webui_url_constants.cc | 5 + chrome/common/webui_url_constants.h | 5 + - 49 files changed, 2337 insertions(+), 5 deletions(-) + 48 files changed, 2298 insertions(+), 2 deletions(-) create mode 100644 chrome/browser/adblock/README.md create mode 100644 chrome/browser/adblock/adblock_content_browser_client.cc create mode 100644 chrome/browser/adblock/adblock_content_browser_client.h @@ -103,7 +102,7 @@ diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegat #include "chrome/app/chrome_main_delegate.h" -@@ -41,6 +45,7 @@ +@@ -37,6 +41,7 @@ #include "base/trace_event/trace_event_impl.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" @@ -111,7 +110,7 @@ diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegat #include "chrome/browser/buildflags.h" #include "chrome/browser/chrome_content_browser_client.h" #include "chrome/browser/chrome_resource_bundle_helper.h" -@@ -1896,7 +1901,7 @@ content::ContentClient* ChromeMainDelegate::CreateContentClient() { +@@ -1921,7 +1926,7 @@ content::ContentClient* ChromeMainDelegate::CreateContentClient() { content::ContentBrowserClient* ChromeMainDelegate::CreateContentBrowserClient() { chrome_content_browser_client_ = @@ -133,10 +132,10 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn import("//base/allocator/allocator.gni") import("//build/buildflag_header.gni") -@@ -153,6 +156,26 @@ static_library("browser") { - "accessibility/page_colors_factory.h", - "accessibility/prefers_default_scrollbar_styles_prefs.cc", +@@ -151,6 +154,26 @@ static_library("browser") { "accessibility/prefers_default_scrollbar_styles_prefs.h", + "affiliations/affiliation_service_factory.cc", + "affiliations/affiliation_service_factory.h", + "adblock/adblock_content_browser_client.cc", + "adblock/adblock_content_browser_client.h", + "adblock/adblock_controller_factory.cc", @@ -159,36 +158,36 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn + "adblock/subscription_service_factory.h", "after_startup_task_utils.cc", "after_startup_task_utils.h", - "app_mode/app_mode_utils.cc", -@@ -2123,6 +2146,7 @@ static_library("browser") { - "//chrome/browser/ui/color:color_headers", + "ai/ai_manager_impl.cc", +@@ -2138,6 +2161,7 @@ static_library("browser") { "//chrome/browser/ui/color:mixers", + "//chrome/browser/ui/tabs", "//chrome/browser/ui/webui:configs", + "//chrome/browser/ui/webui/adblock_internals:mojo_bindings", "//chrome/browser/ui/webui/app_service_internals:mojo_bindings", - "//chrome/browser/ui/webui/feed:mojo_bindings", + "//chrome/browser/ui/webui/data_sharing_internals:mojo_bindings", "//chrome/browser/ui/webui/internals/user_education:mojo_bindings", -@@ -2145,6 +2169,8 @@ static_library("browser") { - "//chrome/common/notifications", +@@ -2162,6 +2186,8 @@ static_library("browser") { "//chrome/installer/util:with_no_strings", + "//chrome/services/on_device_translation:on_device_translation_service", "//chrome/services/speech/buildflags", + "//components/adblock/content:browser", + "//components/adblock/core/converter", "//components/assist_ranker", "//components/autofill/content/browser", "//components/autofill/content/common:features", -@@ -3425,6 +3451,8 @@ static_library("browser") { - "webauthn/android/webauthn_request_delegate_android.cc", - "webauthn/android/webauthn_request_delegate_android.h", +@@ -3523,6 +3549,8 @@ static_library("browser") { + "webid/digital_identity_provider_android.cc", + "webid/digital_identity_provider_android.h", ] + + public_deps += [ "//chrome/android/features/dev_ui:buildflags", "//components/image_fetcher/core", -@@ -3613,6 +3641,7 @@ static_library("browser") { - "//url", - ] +@@ -3733,6 +3761,7 @@ static_library("browser") { + # `IdentityManagerFactory` in facilitated payments. + allow_circular_includes_from += [ "//chrome/browser/facilitated_payments" ] + if (safe_browsing_mode == 2) { @@ -385,7 +384,7 @@ new file mode 100644 + WebSocketFactory factory, + const GURL& url, + const net::SiteForCookies& site_for_cookies, -+ const absl::optional& user_agent, ++ const std::optional& user_agent, + mojo::PendingRemote + handshake_client) { + if (IsFilteringNeeded(frame)) { @@ -405,7 +404,7 @@ new file mode 100644 + WebSocketFactory factory, + const GURL& url, + const net::SiteForCookies& site_for_cookies, -+ const absl::optional& user_agent, ++ const std::optional& user_agent, + mojo::PendingRemote + handshake_client) { + auto* frame = content::RenderFrameHost::FromID(render_frame_host_id); @@ -432,7 +431,7 @@ new file mode 100644 + ChromeContentBrowserClient::WebSocketFactory factory, + const GURL& url, + const net::SiteForCookies& site_for_cookies, -+ const absl::optional& user_agent, ++ const std::optional& user_agent, + mojo::PendingRemote + handshake_client, + adblock::FilterMatchResult result) { @@ -469,7 +468,7 @@ new file mode 100644 + int render_process_id, + URLLoaderFactoryType type, + const url::Origin& request_initiator, -+ absl::optional navigation_id, ++ std::optional navigation_id, + ukm::SourceIdObj ukm_source_id, + mojo::PendingReceiver* factory_receiver, + mojo::PendingRemote* @@ -584,7 +583,7 @@ new file mode 100644 + WebSocketFactory factory, + const GURL& url, + const net::SiteForCookies& site_for_cookies, -+ const absl::optional& user_agent, ++ const std::optional& user_agent, + mojo::PendingRemote + handshake_client) override; + @@ -594,7 +593,7 @@ new file mode 100644 + int render_process_id, + URLLoaderFactoryType type, + const url::Origin& request_initiator, -+ absl::optional navigation_id, ++ std::optional navigation_id, + ukm::SourceIdObj ukm_source_id, + mojo::PendingReceiver* factory_receiver, + mojo::PendingRemote* @@ -611,7 +610,7 @@ new file mode 100644 + WebSocketFactory factory, + const GURL& url, + const net::SiteForCookies& site_for_cookies, -+ const absl::optional& user_agent, ++ const std::optional& user_agent, + mojo::PendingRemote + handshake_client); + void OnWebSocketFilterCheckCompleted( @@ -619,7 +618,7 @@ new file mode 100644 + ChromeContentBrowserClient::WebSocketFactory factory, + const GURL& url, + const net::SiteForCookies& site_for_cookies, -+ const absl::optional& user_agent, ++ const std::optional& user_agent, + mojo::PendingRemote + handshake_client, + adblock::FilterMatchResult result); @@ -2041,14 +2040,14 @@ diff --git a/chrome/browser/chrome_browser_interface_binders.cc b/chrome/browser #include "chrome/browser/chrome_browser_interface_binders.h" @@ -38,6 +42,7 @@ - #include "chrome/browser/ui/side_panel/companion/companion_utils.h" + #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" + #include "chrome/browser/ui/views/side_panel/companion/companion_utils.h" #include "chrome/browser/ui/ui_features.h" - #include "chrome/browser/ui/web_applications/draggable_region_host_impl.h" +#include "chrome/browser/ui/webui/adblock_internals/adblock_internals_ui.h" #include "chrome/browser/ui/webui/browsing_topics/browsing_topics_internals_ui.h" + #include "chrome/browser/ui/webui/data_sharing_internals/data_sharing_internals_ui.h" #include "chrome/browser/ui/webui/engagement/site_engagement_ui.h" - #include "chrome/browser/ui/webui/internals/internals_ui.h" -@@ -1092,6 +1097,10 @@ void PopulateChromeWebUIFrameBinders( +@@ -1121,6 +1126,10 @@ void PopulateChromeWebUIFrameBinders( media::mojom::MediaEngagementScoreDetailsProvider, MediaEngagementUI>( map); @@ -2095,7 +2094,7 @@ diff --git a/chrome/browser/prefs/chrome_pref_service_factory.cc b/chrome/browse #include "chrome/browser/prefs/chrome_pref_service_factory.h" -@@ -40,6 +44,7 @@ +@@ -41,6 +45,7 @@ #include "chrome/grit/branded_strings.h" #include "chrome/grit/browser_resources.h" #include "chrome/grit/generated_resources.h" @@ -2103,10 +2102,10 @@ diff --git a/chrome/browser/prefs/chrome_pref_service_factory.cc b/chrome/browse #include "components/component_updater/pref_names.h" #include "components/policy/core/browser/configuration_policy_pref_store.h" #include "components/pref_registry/pref_registry_syncable.h" -@@ -186,6 +191,12 @@ const prefs::TrackedPreferenceMetadata kTrackedPrefs[] = { - {32, prefs::kMediaCdmOriginData, EnforcementLevel::ENFORCE_ON_LOAD, - PrefTrackingStrategy::ATOMIC, ValueType::IMPERSONAL}, - #endif // BUILDFLAG(IS_WIN) +@@ -189,6 +194,12 @@ const prefs::TrackedPreferenceMetadata kTrackedPrefs[] = { + {34, enterprise_signin::prefs::kPolicyRecoveryToken, + EnforcementLevel::ENFORCE_ON_LOAD, PrefTrackingStrategy::ATOMIC, + ValueType::IMPERSONAL}, + {100, adblock::common::prefs::kSubscriptionSignatures, + EnforcementLevel::ENFORCE_ON_LOAD, PrefTrackingStrategy::SPLIT, + ValueType::IMPERSONAL}, @@ -2130,10 +2129,10 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h" -@@ -12,6 +16,15 @@ - #include "build/chromeos_buildflags.h" +@@ -13,6 +17,15 @@ #include "chrome/browser/accessibility/accessibility_labels_service_factory.h" #include "chrome/browser/accessibility/page_colors_factory.h" + #include "chrome/browser/affiliations/affiliation_service_factory.h" +#include "chrome/browser/adblock/adblock_controller_factory.h" +#include "chrome/browser/adblock/adblock_telemetry_service_factory.h" +#include "chrome/browser/adblock/content_security_policy_injector_factory.h" @@ -2146,7 +2145,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h" #include "chrome/browser/autocomplete/document_suggestions_service_factory.h" #include "chrome/browser/autocomplete/in_memory_url_index_factory.h" -@@ -257,6 +270,8 @@ +@@ -273,6 +286,8 @@ #include "chrome/browser/signin/signin_manager_android_factory.h" #include "components/commerce/core/commerce_feature_list.h" #include "components/commerce/core/proto/merchant_signal_db_content.pb.h" @@ -2155,7 +2154,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc #else #include "chrome/browser/accessibility/live_caption/live_caption_controller_factory.h" #include "chrome/browser/accessibility/live_translate_controller_factory.h" -@@ -805,8 +820,19 @@ void ChromeBrowserMainExtraPartsProfiles:: +@@ -840,8 +855,19 @@ void ChromeBrowserMainExtraPartsProfiles:: // Makes manual testing possible. FakeSmartCardDeviceServiceFactory::GetInstance(); #endif @@ -2175,90 +2174,6 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc #endif FaviconServiceFactory::GetInstance(); feature_engagement::TrackerFactory::GetInstance(); -diff --git a/chrome/browser/profiles/profile_keyed_service_browsertest.cc b/chrome/browser/profiles/profile_keyed_service_browsertest.cc ---- a/chrome/browser/profiles/profile_keyed_service_browsertest.cc -+++ b/chrome/browser/profiles/profile_keyed_service_browsertest.cc -@@ -2,6 +2,10 @@ - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - -+// This source code is a part of eyeo Chromium SDK. -+// Use of this source code is governed by the GPLv3 that can be found in the -+// components/adblock/LICENSE file. -+ - #include - - #include "base/memory/raw_ptr.h" -@@ -221,12 +225,22 @@ IN_PROC_BROWSER_TEST_F(ProfileKeyedServiceBrowserTest, - - IN_PROC_BROWSER_TEST_F(ProfileKeyedServiceBrowserTest, - SystemProfileParent_NeededServices) { -+ // clang-format off -+ // List of services expected to be created for the Parent System Profile. -+ std::set system_active_services { -+ // eyeo Chromium SDK services: -+ "AdblockController", -+ "AdblockSubscriptionPersistentMetadata", -+ "AdblockSubscriptionService", -+ "AdblockTelemetryService", -+ }; -+ // clang-format on -+ - Profile* system_profile = - CreateProfileAndWaitForAllTasks(ProfileManager::GetSystemProfilePath()); - ASSERT_FALSE(system_profile->IsOffTheRecord()); - ASSERT_TRUE(system_profile->IsSystemProfile()); -- TestKeyedProfileServicesActives(system_profile, -- /*expected_active_services_names=*/{}); -+ TestKeyedProfileServicesActives(system_profile, system_active_services); - } - - IN_PROC_BROWSER_TEST_F(ProfileKeyedServiceBrowserTest, -@@ -314,7 +328,7 @@ IN_PROC_BROWSER_TEST_F(ProfileKeyedServiceBrowserTest, - "UpdaterService", - "UsbDeviceManager", - "UsbDeviceResourceManager", -- "sct_reporting::Factory" -+ "sct_reporting::Factory", - }; - // clang-format on - -@@ -577,6 +591,17 @@ IN_PROC_BROWSER_TEST_F(ProfileKeyedServiceBrowserTest, - "feedback::FeedbackUploaderChrome", - "sct_reporting::Factory", - "ZeroSuggestCacheServiceFactory", -+ -+ // eyeo Chromium SDK services: -+ "AdblockController", -+ "AdblockPrivateAPI", -+ "AdblockSubscriptionPersistentMetadata", -+ "AdblockSubscriptionService", -+ "AdblockTelemetryService", -+ "EyeoFilteringPrivateAPI", -+ "ResourceClassificationRunner", -+ "SessionStats", -+ "SitekeyStorage", - }; - // clang-format on - -@@ -622,6 +647,17 @@ IN_PROC_BROWSER_TEST_F(ProfileKeyedServiceBrowserTest, - "PermissionsUpdaterShutdownFactory", - "PluginInfoHostImpl", - "TurnSyncOnHelperShutdownNotifier", -+ -+ // Eyeo services: -+ "AdblockController", -+ "AdblockSubscriptionPersistentMetadata", -+ "AdblockSubscriptionService", -+ "AdblockTelemetryService", -+ "ContentSecurityPolicyInjector", -+ "ElementHider", -+ "ResourceClassificationRunner", -+ "SessionStats", -+ "SitekeyStorage", - }; - // clang-format on - diff --git a/chrome/browser/resources/BUILD.gn b/chrome/browser/resources/BUILD.gn --- a/chrome/browser/resources/BUILD.gn +++ b/chrome/browser/resources/BUILD.gn @@ -2272,7 +2187,7 @@ diff --git a/chrome/browser/resources/BUILD.gn b/chrome/browser/resources/BUILD. import("//build/config/chromeos/ui_mode.gni") import("//chrome/browser/buildflags.gni") -@@ -225,6 +228,7 @@ if (!is_android) { +@@ -249,6 +252,7 @@ if (!is_android) { group("dev_ui_resources") { public_deps = [ "accessibility:resources", @@ -2280,7 +2195,7 @@ diff --git a/chrome/browser/resources/BUILD.gn b/chrome/browser/resources/BUILD. "bluetooth_internals:resources", "browsing_topics:resources", "components:resources", -@@ -283,6 +287,7 @@ repack("dev_ui_paks") { +@@ -311,6 +315,7 @@ repack("dev_ui_paks") { sources = [ "$root_gen_dir/chrome/accessibility_resources.pak", @@ -2427,7 +2342,7 @@ diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc b/ #include "components/safe_browsing/content/browser/safe_browsing_blocking_page.h" -@@ -67,6 +71,7 @@ +@@ -70,6 +74,7 @@ #include "chrome/common/url_constants.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" @@ -2435,9 +2350,9 @@ diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc b/ #include "components/google/core/common/google_util.h" #include "components/grit/components_resources.h" #include "components/omnibox/browser/omnibox_prefs.h" -@@ -673,6 +678,8 @@ class SafeBrowsingBlockingPageBrowserTest +@@ -683,6 +688,8 @@ class SafeBrowsingBlockingPageBrowserTest {tag_and_attribute, add_warning_shown_timestamp_csbrrs, - create_warning_shown_csbrrs}, + create_warning_shown_csbrrs, abusive_notification_revocation}, {}); + scoped_feature_list_.InitWithFeaturesAndParameters( + {tag_and_attribute}, {adblock::kAdblockPlusFeature}); @@ -2490,7 +2405,7 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn import("//build/config/buildflags_paint_preview.gni") import("//build/config/chromeos/ui_mode.gni") -@@ -241,6 +245,10 @@ static_library("ui") { +@@ -261,6 +265,10 @@ static_library("ui") { "webui/about/about_ui.h", "webui/accessibility/accessibility_ui.cc", "webui/accessibility/accessibility_ui.h", @@ -2501,15 +2416,15 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn "webui/autofill_and_password_manager_internals/autofill_internals_ui.cc", "webui/autofill_and_password_manager_internals/autofill_internals_ui.h", "webui/autofill_and_password_manager_internals/internals_ui_handler.cc", -@@ -447,6 +455,7 @@ static_library("ui") { - "//chrome/browser/storage_access_api", - "//chrome/browser/ui/side_panel:side_panel_enums", +@@ -479,6 +487,7 @@ static_library("ui") { + "//chrome/browser/ui/webui", + "//chrome/browser/ui/webui/data_sharing_internals:mojo_bindings", "//chrome/browser/ui/webui/location_internals:mojo_bindings", + "//chrome/browser/ui/webui/adblock_internals:mojo_bindings", "//chrome/browser/ui/webui/omnibox:mojo_bindings", "//chrome/browser/ui/webui/privacy_sandbox:mojo_bindings", "//chrome/browser/ui/webui/segmentation_internals:mojo_bindings", -@@ -463,6 +472,7 @@ static_library("ui") { +@@ -495,6 +504,7 @@ static_library("ui") { "//components/access_code_cast/common:metrics", "//components/account_id", "//components/affiliations/core/browser:affiliations", @@ -2539,7 +2454,7 @@ diff --git a/chrome/browser/ui/prefs/pref_watcher.cc b/chrome/browser/ui/prefs/p #include "components/language/core/browser/pref_names.h" #include "components/live_caption/pref_names.h" #include "components/privacy_sandbox/tracking_protection_settings.h" -@@ -68,6 +73,14 @@ const char* const kWebPrefsToObserve[] = { +@@ -69,6 +74,14 @@ const char* const kWebPrefsToObserve[] = { #else prefs::kAccessibilityFocusHighlightEnabled, #endif @@ -2578,7 +2493,7 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc #include "chrome/browser/bookmarks/bookmark_model_factory.h" #include "chrome/browser/breadcrumbs/breadcrumb_manager_tab_helper.h" #include "chrome/browser/browser_process.h" -@@ -111,6 +118,7 @@ +@@ -116,6 +123,7 @@ #include "chrome/common/chrome_features.h" #include "chrome/common/chrome_isolated_world_ids.h" #include "chrome/common/chrome_switches.h" @@ -2586,7 +2501,7 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc #include "components/autofill/content/browser/content_autofill_client.h" #include "components/autofill/content/browser/content_autofill_driver_factory.h" #include "components/autofill/core/browser/browser_autofill_manager.h" -@@ -364,6 +372,16 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { +@@ -373,6 +381,16 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { optimization_guide_decider); } } @@ -2600,9 +2515,9 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc + adblock::SitekeyStorageFactory::GetForBrowserContext( + web_contents->GetBrowserContext()), + std::make_unique()); - autofill::ChromeAutofillClient::CreateForWebContents(web_contents); - if (breadcrumbs::IsEnabled(g_browser_process->local_state())) { - BreadcrumbManagerTabHelper::CreateForWebContents(web_contents); + autofill::AutofillClientProvider& autofill_client_provider = + autofill::AutofillClientProviderFactory::GetForProfile(profile); + autofill_client_provider.CreateClientForWebContents(web_contents); diff --git a/chrome/browser/ui/webui/adblock_internals/BUILD.gn b/chrome/browser/ui/webui/adblock_internals/BUILD.gn new file mode 100644 --- /dev/null @@ -2951,24 +2866,24 @@ diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrom #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h" -@@ -29,6 +33,7 @@ +@@ -31,6 +35,7 @@ #include "chrome/browser/profiles/profile.h" - #include "chrome/browser/signin/signin_features.h" + #include "chrome/browser/safe_browsing/chrome_safe_browsing_local_state_delegate.h" #include "chrome/browser/ui/webui/about/about_ui.h" +#include "chrome/browser/ui/webui/adblock_internals/adblock_internals_ui.h" - #include "chrome/browser/ui/webui/browsing_topics/browsing_topics_internals_ui.h" #include "chrome/browser/ui/webui/components/components_ui.h" #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h" -@@ -429,6 +434,9 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, - - if (url.host_piece() == chrome::kChromeUIBrowsingTopicsInternalsHost) - return &NewWebUI; + #include "chrome/browser/ui/webui/crashes_ui.h" +@@ -489,6 +494,9 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui, + return &NewWebUI; + if (url.host_piece() == chrome::kChromeUIUserActionsHost) + return &NewWebUI; + if (url.host_piece() == chrome::kChromeUIAdblockInternalsHost) { + return &NewWebUI; + } - if (url.host_piece() == chrome::kChromeUIComponentsHost) - return &NewWebUI; - #if !BUILDFLAG(IS_ANDROID) + if (url.host_piece() == chrome::kChromeUIVersionHost) + return &NewWebUI; + #if BUILDFLAG(IS_ANDROID) diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn --- a/chrome/common/BUILD.gn +++ b/chrome/common/BUILD.gn @@ -2996,7 +2911,7 @@ diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_cons #include "chrome/common/webui_url_constants.h" -@@ -30,6 +34,7 @@ const char kChromeUIAboutURL[] = "chrome://about/"; +@@ -31,6 +35,7 @@ const char kChromeUIAboutURL[] = "chrome://about/"; const char kChromeUIActivateSafetyCheckSettingsURL[] = "chrome://settings/safetyCheck?activateSafetyCheck"; const char kChromeUIAccessibilityHost[] = "accessibility"; @@ -3018,7 +2933,7 @@ diff --git a/chrome/common/webui_url_constants.h b/chrome/common/webui_url_const // Contains constants for WebUI UI/Host/SubPage constants. Anything else go in // chrome/common/url_constants.h. -@@ -31,6 +35,7 @@ extern const char kChromeUIAboutHost[]; +@@ -32,6 +36,7 @@ extern const char kChromeUIAboutHost[]; extern const char kChromeUIAboutURL[]; extern const char kChromeUIActivateSafetyCheckSettingsURL[]; extern const char kChromeUIAccessibilityHost[]; diff --git a/build/cromite_patches/eyeo-beta-118.0.5993.48-extension_api.patch b/build/cromite_patches/eyeo-beta-118.0.5993.48-extension_api.patch index 7660633e..4a7f16c6 100644 --- a/build/cromite_patches/eyeo-beta-118.0.5993.48-extension_api.patch +++ b/build/cromite_patches/eyeo-beta-118.0.5993.48-extension_api.patch @@ -56,7 +56,7 @@ diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUIL import("//build/config/chromebox_for_meetings/buildflags.gni") import("//build/config/chromeos/ui_mode.gni") -@@ -48,6 +52,8 @@ static_library("extensions") { +@@ -52,6 +56,8 @@ source_set("extensions") { # here. "api/activity_log_private/activity_log_private_api.cc", "api/activity_log_private/activity_log_private_api.h", @@ -65,7 +65,7 @@ diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUIL "api/api_browser_context_keyed_service_factories.cc", "api/api_browser_context_keyed_service_factories.h", "api/autofill_private/autofill_private_api.cc", -@@ -149,6 +155,8 @@ static_library("extensions") { +@@ -153,6 +159,8 @@ source_set("extensions") { "api/extension_action/extension_action_api.h", "api/extension_action/extension_page_actions_api_constants.cc", "api/extension_action/extension_page_actions_api_constants.h", @@ -74,7 +74,7 @@ diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUIL "api/favicon/favicon_util.cc", "api/favicon/favicon_util.h", "api/feedback_private/chrome_feedback_private_delegate.cc", -@@ -812,6 +820,7 @@ static_library("extensions") { +@@ -853,6 +861,7 @@ source_set("extensions") { "//chrome/browser/safe_browsing:metrics_collector", "//chrome/browser/ui/tabs:tab_enums", "//chrome/browser/web_applications", @@ -463,7 +463,7 @@ new file mode 100644 +AdblockPrivateSetEnabledFunction::~AdblockPrivateSetEnabledFunction() {} + +ExtensionFunction::ResponseAction AdblockPrivateSetEnabledFunction::Run() { -+ absl::optional params = ++ std::optional params = + api::adblock_private::SetEnabled::Params::Create(args()); + EXTENSION_FUNCTION_VALIDATE(params); + @@ -501,7 +501,7 @@ new file mode 100644 + +ExtensionFunction::ResponseAction +AdblockPrivateSetAcceptableAdsEnabledFunction::Run() { -+ absl::optional params = ++ std::optional params = + api::adblock_private::SetAcceptableAdsEnabled::Params::Create(args()); + EXTENSION_FUNCTION_VALIDATE(params); + @@ -574,7 +574,7 @@ new file mode 100644 + +ExtensionFunction::ResponseAction +AdblockPrivateInstallSubscriptionFunction::Run() { -+ absl::optional params = ++ std::optional params = + api::adblock_private::InstallSubscription::Params::Create(args()); + EXTENSION_FUNCTION_VALIDATE(params); + auto url = GURL{params->url}; @@ -595,7 +595,7 @@ new file mode 100644 + +ExtensionFunction::ResponseAction +AdblockPrivateUninstallSubscriptionFunction::Run() { -+ absl::optional params = ++ std::optional params = + api::adblock_private::UninstallSubscription::Params::Create(args()); + EXTENSION_FUNCTION_VALIDATE(params); + auto url = GURL{params->url}; @@ -637,7 +637,7 @@ new file mode 100644 + +ExtensionFunction::ResponseAction +AdblockPrivateAddAllowedDomainFunction::Run() { -+ absl::optional params = ++ std::optional params = + api::adblock_private::AddAllowedDomain::Params::Create(args()); + EXTENSION_FUNCTION_VALIDATE(params); + auto* adblock_configuration = @@ -658,7 +658,7 @@ new file mode 100644 + +ExtensionFunction::ResponseAction +AdblockPrivateRemoveAllowedDomainFunction::Run() { -+ absl::optional params = ++ std::optional params = + api::adblock_private::RemoveAllowedDomain::Params::Create(args()); + EXTENSION_FUNCTION_VALIDATE(params); + auto* adblock_configuration = @@ -698,7 +698,7 @@ new file mode 100644 + ~AdblockPrivateAddCustomFilterFunction() {} + +ExtensionFunction::ResponseAction AdblockPrivateAddCustomFilterFunction::Run() { -+ absl::optional params = ++ std::optional params = + api::adblock_private::AddCustomFilter::Params::Create(args()); + EXTENSION_FUNCTION_VALIDATE(params); + auto* adblock_configuration = @@ -738,7 +738,7 @@ new file mode 100644 + +ExtensionFunction::ResponseAction +AdblockPrivateRemoveCustomFilterFunction::Run() { -+ absl::optional params = ++ std::optional params = + api::adblock_private::RemoveCustomFilter::Params::Create(args()); + EXTENSION_FUNCTION_VALIDATE(params); + auto* adblock_configuration = @@ -2134,7 +2134,7 @@ diff --git a/chrome/browser/extensions/api/api_browser_context_keyed_service_fac #include "chrome/browser/extensions/api/font_settings/font_settings_api.h" #include "chrome/browser/extensions/api/history/history_api.h" #include "chrome/browser/extensions/api/identity/identity_api.h" -@@ -79,6 +85,7 @@ namespace chrome_extensions { +@@ -75,6 +81,7 @@ namespace chrome_extensions { void EnsureApiBrowserContextKeyedServiceFactoriesBuilt() { extensions::ActivityLogAPI::GetFactoryInstance(); @@ -2142,7 +2142,7 @@ diff --git a/chrome/browser/extensions/api/api_browser_context_keyed_service_fac extensions::AutofillPrivateEventRouterFactory::GetInstance(); extensions::BluetoothLowEnergyAPI::GetFactoryInstance(); extensions::BookmarksAPI::GetFactoryInstance(); -@@ -91,6 +98,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt() { +@@ -87,6 +94,7 @@ void EnsureApiBrowserContextKeyedServiceFactoriesBuilt() { extensions::DocumentScanAPIHandler::GetFactoryInstance(); #endif extensions::ExtensionActionAPI::GetFactoryInstance(); @@ -2551,7 +2551,7 @@ new file mode 100644 + +ExtensionFunction::ResponseAction +EyeoFilteringPrivateCreateConfigurationFunction::Run() { -+ absl::optional ++ std::optional + params(api::eyeo_filtering_private::CreateConfiguration::Params::Create( + args())); + EXTENSION_FUNCTION_VALIDATE(params); @@ -2584,7 +2584,7 @@ new file mode 100644 + +ExtensionFunction::ResponseAction +EyeoFilteringPrivateRemoveConfigurationFunction::Run() { -+ absl::optional ++ std::optional + params(api::eyeo_filtering_private::RemoveConfiguration::Params::Create( + args())); + EXTENSION_FUNCTION_VALIDATE(params); @@ -2635,7 +2635,7 @@ new file mode 100644 + +ExtensionFunction::ResponseAction +EyeoFilteringPrivateSetEnabledFunction::Run() { -+ absl::optional params( ++ std::optional params( + api::eyeo_filtering_private::SetEnabled::Params::Create(args())); + EXTENSION_FUNCTION_VALIDATE(params); + auto* configuration = @@ -2655,7 +2655,7 @@ new file mode 100644 + ~EyeoFilteringPrivateIsEnabledFunction() = default; + +ExtensionFunction::ResponseAction EyeoFilteringPrivateIsEnabledFunction::Run() { -+ absl::optional params( ++ std::optional params( + api::eyeo_filtering_private::IsEnabled::Params::Create(args())); + EXTENSION_FUNCTION_VALIDATE(params); + auto* configuration = @@ -2690,7 +2690,7 @@ new file mode 100644 + +ExtensionFunction::ResponseAction +EyeoFilteringPrivateSubscribeToFilterListFunction::Run() { -+ absl::optional ++ std::optional + params(api::eyeo_filtering_private::SubscribeToFilterList::Params::Create( + args())); + EXTENSION_FUNCTION_VALIDATE(params); @@ -2718,7 +2718,7 @@ new file mode 100644 + +ExtensionFunction::ResponseAction +EyeoFilteringPrivateUnsubscribeFromFilterListFunction::Run() { -+ absl::optional ++ std::optional + params(api::eyeo_filtering_private::UnsubscribeFromFilterList::Params:: + Create(args())); + EXTENSION_FUNCTION_VALIDATE(params); @@ -2746,7 +2746,7 @@ new file mode 100644 + +ExtensionFunction::ResponseAction +EyeoFilteringPrivateGetFilterListsFunction::Run() { -+ absl::optional params( ++ std::optional params( + api::eyeo_filtering_private::GetFilterLists::Params::Create(args())); + EXTENSION_FUNCTION_VALIDATE(params); + auto* configuration = @@ -2772,7 +2772,7 @@ new file mode 100644 + +ExtensionFunction::ResponseAction +EyeoFilteringPrivateAddAllowedDomainFunction::Run() { -+ absl::optional params( ++ std::optional params( + api::eyeo_filtering_private::AddAllowedDomain::Params::Create(args())); + EXTENSION_FUNCTION_VALIDATE(params); + auto* configuration = @@ -2793,7 +2793,7 @@ new file mode 100644 + +ExtensionFunction::ResponseAction +EyeoFilteringPrivateRemoveAllowedDomainFunction::Run() { -+ absl::optional ++ std::optional + params(api::eyeo_filtering_private::RemoveAllowedDomain::Params::Create( + args())); + EXTENSION_FUNCTION_VALIDATE(params); @@ -2815,7 +2815,7 @@ new file mode 100644 + +ExtensionFunction::ResponseAction +EyeoFilteringPrivateGetAllowedDomainsFunction::Run() { -+ absl::optional params( ++ std::optional params( + api::eyeo_filtering_private::GetAllowedDomains::Params::Create(args())); + EXTENSION_FUNCTION_VALIDATE(params); + auto* configuration = @@ -2837,7 +2837,7 @@ new file mode 100644 + +ExtensionFunction::ResponseAction +EyeoFilteringPrivateAddCustomFilterFunction::Run() { -+ absl::optional params( ++ std::optional params( + api::eyeo_filtering_private::AddCustomFilter::Params::Create(args())); + EXTENSION_FUNCTION_VALIDATE(params); + auto* configuration = @@ -2858,7 +2858,7 @@ new file mode 100644 + +ExtensionFunction::ResponseAction +EyeoFilteringPrivateRemoveCustomFilterFunction::Run() { -+ absl::optional ++ std::optional + params(api::eyeo_filtering_private::RemoveCustomFilter::Params::Create( + args())); + EXTENSION_FUNCTION_VALIDATE(params); @@ -2874,7 +2874,7 @@ new file mode 100644 + +ExtensionFunction::ResponseAction +EyeoFilteringPrivateGetCustomFiltersFunction::Run() { -+ absl::optional params( ++ std::optional params( + api::eyeo_filtering_private::GetCustomFilters::Params::Create(args())); + EXTENSION_FUNCTION_VALIDATE(params); + auto* configuration = @@ -3472,15 +3472,15 @@ diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.cc b/chro #include "chrome/browser/extensions/api/settings_private/prefs_util.h" #include -@@ -28,6 +32,7 @@ - #include "chrome/browser/ssl/generated_https_first_mode_pref.h" +@@ -29,6 +33,7 @@ + #include "chrome/browser/ui/tabs/tab_strip_prefs.h" #include "chrome/common/chrome_features.h" #include "chrome/common/pref_names.h" +#include "components/adblock/core/common/adblock_prefs.h" #include "components/autofill/core/common/autofill_prefs.h" #include "components/bookmarks/common/bookmark_pref_names.h" #include "components/browsing_data/core/pref_names.h" -@@ -182,6 +187,20 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() { +@@ -175,6 +180,20 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetAllowlistedKeys() { } s_allowlist = new PrefsUtil::TypedPrefMap(); @@ -3529,7 +3529,7 @@ diff --git a/chrome/browser/extensions/extension_function_registration_test.cc b #include "base/one_shot_event.h" #include "chrome/browser/extensions/extension_browsertest.h" -@@ -56,6 +60,12 @@ IN_PROC_BROWSER_TEST_F(ExtensionFunctionRegistrationTest, +@@ -57,6 +61,12 @@ IN_PROC_BROWSER_TEST_F(ExtensionFunctionRegistrationTest, base::CompareCase::SENSITIVE)) { continue; } @@ -3556,7 +3556,7 @@ diff --git a/chrome/common/extensions/api/_api_features.json b/chrome/common/ext // This features file defines extension APIs implemented under src/chrome. // See chrome/common/extensions/api/_features.md to understand this file, as -@@ -94,6 +98,16 @@ +@@ -60,6 +64,16 @@ "chrome://extensions/*" ] }], @@ -3573,7 +3573,7 @@ diff --git a/chrome/common/extensions/api/_api_features.json b/chrome/common/ext "app": { "blocklist": [ "2FC374607C2DF285634B67C64A2E356C607091C3", // Quickoffice -@@ -526,6 +540,14 @@ +@@ -507,6 +521,14 @@ "channel": "stable", "contexts": [] }, @@ -3587,7 +3587,7 @@ diff --git a/chrome/common/extensions/api/_api_features.json b/chrome/common/ext + }], "fileBrowserHandler": { "dependencies": ["permission:fileBrowserHandler"], - "contexts": ["blessed_extension"], + "contexts": ["privileged_extension"], diff --git a/chrome/common/extensions/api/_permission_features.json b/chrome/common/extensions/api/_permission_features.json --- a/chrome/common/extensions/api/_permission_features.json +++ b/chrome/common/extensions/api/_permission_features.json @@ -3613,7 +3613,7 @@ diff --git a/chrome/common/extensions/api/_permission_features.json b/chrome/com "autofillPrivate": { "channel": "trunk", "extension_types": ["extension", "platform_app"], -@@ -368,6 +376,10 @@ +@@ -367,6 +375,10 @@ "extension", "legacy_packaged_app", "hosted_app", "platform_app" ] }, @@ -4134,10 +4134,10 @@ diff --git a/extensions/common/mojom/api_permission_id.mojom b/extensions/common module extensions.mojom; -@@ -282,6 +286,8 @@ enum APIPermissionID { - kEnterpriseKioskInput = 255, +@@ -283,6 +287,8 @@ enum APIPermissionID { kOdfsConfigPrivate = 256, kChromeOSManagementAudio = 257, + kChromeOSDiagnosticsNetworkInfoForMlab = 258, + kAdblockPrivate = 999, + kEyeoFilteringPrivate = 1000, @@ -4146,18 +4146,18 @@ diff --git a/extensions/common/mojom/api_permission_id.mojom b/extensions/common diff --git a/tools/metrics/histograms/metadata/extensions/enums.xml b/tools/metrics/histograms/metadata/extensions/enums.xml --- a/tools/metrics/histograms/metadata/extensions/enums.xml +++ b/tools/metrics/histograms/metadata/extensions/enums.xml -@@ -751,6 +751,7 @@ Called by update_extension_histograms.py.--> - - label="ACCESSIBILITY_PRIVATE_ON_SELECT_TO_SPEAK_FOCUS_CHANGED"/> -+ + + ++ -@@ -3095,6 +3096,8 @@ Called by update_extension_permission.py.--> - +@@ -3117,6 +3118,8 @@ Called by update_extension_permission.py.--> + + + diff --git a/build/cromite_patches/kill-Auth.patch b/build/cromite_patches/kill-Auth.patch index 52d37c51..9a8eb0a8 100644 --- a/build/cromite_patches/kill-Auth.patch +++ b/build/cromite_patches/kill-Auth.patch @@ -37,7 +37,7 @@ diff --git a/components/signin/public/android/java/src/org/chromium/components/s - return accounts; - } // Don't report any accounts if we don't have permission. - // TODO(crbug.com/1502123): Throw an exception if permission was denied. + // TODO(crbug.com/40942462): Throw an exception if permission was denied. return new Account[] {}; @@ -110,31 +95,12 @@ public class SystemAccountManagerDelegate implements AccountManagerDelegate { throws AuthException { diff --git a/build/cromite_patches/kill-Location-fall-back-to-system.patch b/build/cromite_patches/kill-Location-fall-back-to-system.patch index d6f723f7..4b57fad6 100644 --- a/build/cromite_patches/kill-Location-fall-back-to-system.patch +++ b/build/cromite_patches/kill-Location-fall-back-to-system.patch @@ -6,7 +6,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- services/device/geolocation/BUILD.gn | 1 - .../device/geolocation/LocationProviderFactory.java | 11 ++--------- - 2 files changed, 2 insertions(+), 10 deletions(-) + services/device/public/cpp/device_features.cc | 3 ++- + 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/services/device/geolocation/BUILD.gn b/services/device/geolocation/BUILD.gn --- a/services/device/geolocation/BUILD.gn @@ -44,4 +45,24 @@ diff --git a/services/device/geolocation/android/java/src/org/chromium/device/ge return sProviderImpl; } } +diff --git a/services/device/public/cpp/device_features.cc b/services/device/public/cpp/device_features.cc +--- a/services/device/public/cpp/device_features.cc ++++ b/services/device/public/cpp/device_features.cc +@@ -38,6 +38,7 @@ BASE_FEATURE(kSerialPortConnected, + BASE_FEATURE(kLocationProviderManager, + "LocationProviderManager", + base::FEATURE_DISABLED_BY_DEFAULT); ++SET_CROMITE_FEATURE_DISABLED(kLocationProviderManager); + + const base::FeatureParam::Option + location_provider_manager_mode_options[] = { +@@ -52,7 +53,7 @@ const base::FeatureParam::Option + const base::FeatureParam + kLocationProviderManagerParam{ + &kLocationProviderManager, "LocationProviderManagerMode", +- device::mojom::LocationProviderManagerMode::kNetworkOnly, ++ device::mojom::LocationProviderManagerMode::kPlatformOnly, + &location_provider_manager_mode_options}; + + } // namespace features -- diff --git a/build/cromite_patches/kill-Vision.patch b/build/cromite_patches/kill-Vision.patch index aaff65c5..14e261fb 100644 --- a/build/cromite_patches/kill-Vision.patch +++ b/build/cromite_patches/kill-Vision.patch @@ -15,7 +15,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 -@@ -298,8 +298,6 @@ if (current_toolchain == default_toolchain) { +@@ -334,8 +334,6 @@ if (current_toolchain == default_toolchain) { "$google_play_services_package:google_play_services_gcm_java", "$google_play_services_package:google_play_services_iid_java", "$google_play_services_package:google_play_services_tasks_java", diff --git a/build/cromite_patches/net-cert-increase-default-key-length.patch b/build/cromite_patches/net-cert-increase-default-key-length.patch index f4dce995..ade38ec9 100644 --- a/build/cromite_patches/net-cert-increase-default-key-length.patch +++ b/build/cromite_patches/net-cert-increase-default-key-length.patch @@ -13,7 +13,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/net/cert/x509_util.cc b/net/cert/x509_util.cc --- a/net/cert/x509_util.cc +++ b/net/cert/x509_util.cc -@@ -286,7 +286,7 @@ bool GetTLSServerEndPointChannelBinding(const X509Certificate& certificate, +@@ -304,7 +304,7 @@ bool GetTLSServerEndPointChannelBinding(const X509Certificate& certificate, } // RSA keys created by CreateKeyAndSelfSignedCert will be of this length. diff --git a/build/cromite_patches/prefs-always-prompt-for-download-directory.patch b/build/cromite_patches/prefs-always-prompt-for-download-directory.patch index d22cadd8..8612a361 100644 --- a/build/cromite_patches/prefs-always-prompt-for-download-directory.patch +++ b/build/cromite_patches/prefs-always-prompt-for-download-directory.patch @@ -31,7 +31,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/download/download_prefs.cc b/chrome/browser/download/download_prefs.cc --- a/chrome/browser/download/download_prefs.cc +++ b/chrome/browser/download/download_prefs.cc -@@ -280,7 +280,7 @@ void DownloadPrefs::RegisterProfilePrefs( +@@ -279,7 +279,7 @@ void DownloadPrefs::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref( prefs::kPromptForDownload, diff --git a/build/cromite_patches/translate-disable-fetching-of-languages-from-server.patch b/build/cromite_patches/translate-disable-fetching-of-languages-from-server.patch index 448cf928..ba5a0aab 100644 --- a/build/cromite_patches/translate-disable-fetching-of-languages-from-server.patch +++ b/build/cromite_patches/translate-disable-fetching-of-languages-from-server.patch @@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/components/translate/core/browser/translate_language_list.cc b/components/translate/core/browser/translate_language_list.cc --- a/components/translate/core/browser/translate_language_list.cc +++ b/components/translate/core/browser/translate_language_list.cc -@@ -392,6 +392,7 @@ GURL TranslateLanguageList::TranslateLanguageUrl() { +@@ -393,6 +393,7 @@ GURL TranslateLanguageList::TranslateLanguageUrl() { } void TranslateLanguageList::RequestLanguageList() { @@ -18,7 +18,7 @@ diff --git a/components/translate/core/browser/translate_language_list.cc b/comp // If resource requests are not allowed, we'll get a callback when they are. if (!resource_requests_allowed_) { request_pending_ = true; -@@ -421,6 +422,7 @@ void TranslateLanguageList::RequestLanguageList() { +@@ -422,6 +423,7 @@ void TranslateLanguageList::RequestLanguageList() { if (!result) NotifyEvent(__LINE__, "Request is omitted due to retry limit"); } diff --git a/build/cromite_patches/ungoogled-chromium-Disable-profile-avatar.patch b/build/cromite_patches/ungoogled-chromium-Disable-profile-avatar.patch index e50494fb..24fad833 100644 --- a/build/cromite_patches/ungoogled-chromium-Disable-profile-avatar.patch +++ b/build/cromite_patches/ungoogled-chromium-Disable-profile-avatar.patch @@ -14,7 +14,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -1399,8 +1399,6 @@ static_library("browser") { +@@ -1397,8 +1397,6 @@ static_library("browser") { "profiles/profile_attributes_storage.cc", "profiles/profile_attributes_storage.h", "profiles/profile_attributes_storage_observer.h", @@ -26,7 +26,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn diff --git a/chrome/browser/profiles/profile_attributes_entry.cc b/chrome/browser/profiles/profile_attributes_entry.cc --- a/chrome/browser/profiles/profile_attributes_entry.cc +++ b/chrome/browser/profiles/profile_attributes_entry.cc -@@ -328,12 +328,6 @@ std::u16string ProfileAttributesEntry::GetUserName() const { +@@ -324,12 +324,6 @@ std::u16string ProfileAttributesEntry::GetUserName() const { gfx::Image ProfileAttributesEntry::GetAvatarIcon( int size_for_placeholder_avatar, bool use_high_res_file) const { @@ -37,7 +37,7 @@ diff --git a/chrome/browser/profiles/profile_attributes_entry.cc b/chrome/browse - } - #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) - // TODO(crbug.com/1100835): After launch, remove the treatment of placeholder + // TODO(crbug.com/40138086): After launch, remove the treatment of placeholder // avatars from GetHighResAvatar() and from any other places. diff --git a/chrome/browser/profiles/profile_attributes_storage.cc b/chrome/browser/profiles/profile_attributes_storage.cc --- a/chrome/browser/profiles/profile_attributes_storage.cc diff --git a/build/cromite_patches/ungoogled-chromium-Disable-translate-integration.patch b/build/cromite_patches/ungoogled-chromium-Disable-translate-integration.patch index ebf90a02..92ce51e5 100644 --- a/build/cromite_patches/ungoogled-chromium-Disable-translate-integration.patch +++ b/build/cromite_patches/ungoogled-chromium-Disable-translate-integration.patch @@ -97,7 +97,7 @@ diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browse @@ -95,35 +89,6 @@ public class LanguageSettings extends ChromeBaseSettingsFragment ContentLanguagesPreference mLanguageListPref = (ContentLanguagesPreference) findPreference(PREFERRED_LANGUAGES_KEY); - mLanguageListPref.initialize(this, getPrefService()); + mLanguageListPref.initialize(this, getProfile(), getPrefService()); - - ChromeSwitchPreference translateSwitch = - (ChromeSwitchPreference) findPreference(TRANSLATE_SWITCH_KEY); @@ -133,22 +133,22 @@ diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browse @@ -138,8 +103,6 @@ public class LanguageSettings extends ChromeBaseSettingsFragment ContentLanguagesPreference mLanguageListPref = (ContentLanguagesPreference) findPreference(CONTENT_LANGUAGES_KEY); - mLanguageListPref.initialize(this, getPrefService()); + mLanguageListPref.initialize(this, getProfile(), getPrefService()); - - setupTranslateSection(mLanguageListPref); } /** Setup the App Language section with a title and preference to choose the app language. */ -@@ -169,7 +132,7 @@ public class LanguageSettings extends ChromeBaseSettingsFragment +@@ -170,7 +133,7 @@ public class LanguageSettings extends ChromeBaseSettingsFragment * @param contentLanguagesPreference ContentLanguagesPreference reference to update about state - * changes. + * changes. */ - private void setupTranslateSection(ContentLanguagesPreference contentLanguagesPreference) { +/* private void setupTranslateSection(ContentLanguagesPreference contentLanguagesPreference) { // Setup expandable advanced settings section. PreferenceCategory translationAdvancedSection = (PreferenceCategory) findPreference(TRANSLATION_ADVANCED_SECTION); -@@ -245,7 +208,7 @@ public class LanguageSettings extends ChromeBaseSettingsFragment +@@ -248,7 +211,7 @@ public class LanguageSettings extends ChromeBaseSettingsFragment return getPrefService().isManagedPreference(Pref.OFFER_TRANSLATE_ENABLED); } }); @@ -157,14 +157,14 @@ diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browse @Override public void onStart() { -@@ -284,12 +247,6 @@ public class LanguageSettings extends ChromeBaseSettingsFragment +@@ -287,12 +250,6 @@ public class LanguageSettings extends ChromeBaseSettingsFragment // Set the default target language to match the new app language. - TranslateBridge.setDefaultTargetLanguage(code); + TranslateBridge.setDefaultTargetLanguage(getProfile(), code); } else if (requestCode == REQUEST_CODE_CHANGE_TARGET_LANGUAGE) { - LanguageItemPickerPreference targetLanguagePreference = - (LanguageItemPickerPreference) findPreference(TARGET_LANGUAGE_KEY); -- targetLanguagePreference.setLanguageItem(code); -- TranslateBridge.setDefaultTargetLanguage(code); +- targetLanguagePreference.setLanguageItem(getProfile(), code); +- TranslateBridge.setDefaultTargetLanguage(getProfile(), code); - LanguagesManager.recordAction( - LanguagesManager.LanguageSettingsActionType.CHANGE_TARGET_LANGUAGE); } @@ -173,7 +173,7 @@ diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browse diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd -@@ -1735,9 +1735,6 @@ Your Google account may have other forms of browsing history like searches and a +@@ -1884,9 +1884,6 @@ Your Google account may have other forms of browsing history like searches and a Let websites know the languages you speak. They’ll show content in those languages, when possible. @@ -221,9 +221,9 @@ diff --git a/components/translate/core/browser/translate_script.cc b/components/ - server_params.c_str()); - GURL security_origin = translate::GetTranslateSecurityOrigin(); -- base::StringAppendF(&data_, "var securityOrigin = '%s';", +- base::StringAppendF(&data_, "var securityOrigin = '%s';\n", - security_origin.spec().c_str()); -+ base::StringAppendF(&data_, "var securityOrigin = '';"); ++ base::StringAppendF(&data_, "var securityOrigin = '';\n"); // Load embedded translate.js. data_.append(ui::ResourceBundle::GetSharedInstance().LoadDataResourceString( diff --git a/build/cromite_patches/ungoogled-chromium-Disable-untraceable-URLs.patch b/build/cromite_patches/ungoogled-chromium-Disable-untraceable-URLs.patch index 2ccaef2a..c1a065a3 100644 --- a/build/cromite_patches/ungoogled-chromium-Disable-untraceable-URLs.patch +++ b/build/cromite_patches/ungoogled-chromium-Disable-untraceable-URLs.patch @@ -15,7 +15,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/chrome/browser/android/rlz/rlz_ping_handler.cc b/chrome/browser/android/rlz/rlz_ping_handler.cc --- a/chrome/browser/android/rlz/rlz_ping_handler.cc +++ b/chrome/browser/android/rlz/rlz_ping_handler.cc -@@ -75,7 +75,7 @@ void RlzPingHandler::Ping( +@@ -76,7 +76,7 @@ void RlzPingHandler::Ping( DCHECK_EQ(id.length(), 50u); GURL request_url(base::StringPrintf( diff --git a/build/cromite_patches/ungoogled-chromium-Disable-webRTC-log-uploader.patch b/build/cromite_patches/ungoogled-chromium-Disable-webRTC-log-uploader.patch index ef59b771..1ee27d65 100644 --- a/build/cromite_patches/ungoogled-chromium-Disable-webRTC-log-uploader.patch +++ b/build/cromite_patches/ungoogled-chromium-Disable-webRTC-log-uploader.patch @@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html 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 -@@ -101,7 +101,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { +@@ -107,7 +107,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { registry->RegisterStringPref(prefs::kWebRTCUDPPortRange, std::string()); registry->RegisterBooleanPref(prefs::kWebRtcEventLogCollectionAllowed, false); registry->RegisterListPref(prefs::kWebRtcLocalIpsAllowedUrls); diff --git a/build/cromite_patches/ungoogled-chromium-no-special-hosts-domains.patch b/build/cromite_patches/ungoogled-chromium-no-special-hosts-domains.patch index 50816de0..85d8d38c 100644 --- a/build/cromite_patches/ungoogled-chromium-no-special-hosts-domains.patch +++ b/build/cromite_patches/ungoogled-chromium-no-special-hosts-domains.patch @@ -7,16 +7,17 @@ Disable domain reliability detection License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- + .../chrome/browser/ui/RootUiCoordinator.java | 3 - chrome/browser/BUILD.gn | 8 - .../android/metrics/uma_session_stats.cc | 10 - .../android/signin/signin_manager_android.cc | 39 +-- chrome/browser/browser_process_impl.cc | 1 - chrome/browser/chrome_browser_main.cc | 10 - - .../browser/chrome_content_browser_client.cc | 35 +- + .../browser/chrome_content_browser_client.cc | 32 +- .../domain_reliability/service_factory.cc | 33 +- chrome/browser/extensions/BUILD.gn | 1 - .../log_sources/chrome_internal_log_source.cc | 5 - - chrome/browser/first_run/first_run.cc | 9 - + chrome/browser/first_run/first_run.cc | 8 - chrome/browser/google/BUILD.gn | 4 +- .../long_screenshots_tab_service.cc | 22 -- .../metrics/chrome_metrics_service_client.cc | 2 +- @@ -29,11 +30,15 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../from_gws_page_load_metrics_observer.cc | 6 +- .../page_load_metrics_initialize.cc | 2 - chrome/browser/safe_browsing/BUILD.gn | 1 - + chrome/browser/search_engines/BUILD.gn | 1 - .../ui_thread_search_terms_data.cc | 4 - chrome/browser/ui/BUILD.gn | 1 - + chrome/browser/ui/android/omnibox/BUILD.gn | 2 - + .../omnibox/LocationBarCoordinator.java | 2 - + .../browser/omnibox/LocationBarMediator.java | 25 -- .../ui/webui/new_tab_page/new_tab_page_ui.cc | 5 - .../webui/settings/reset_settings_handler.cc | 1 - - .../upgrade_detector/upgrade_detector_impl.cc | 2 +- + .../upgrade_detector/upgrade_detector_impl.cc | 6 - chrome/common/BUILD.gn | 2 - .../google_accounts_private_api_util.cc | 1 + .../url_loader_throttle_provider_impl.cc | 11 - @@ -45,7 +50,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html .../domain_reliability/google_configs.h | 8 +- components/domain_reliability/monitor.cc | 8 - components/domain_reliability/uploader.cc | 2 +- - components/google/core/common/google_util.cc | 312 +----------------- + components/google/core/common/google_util.cc | 313 +----------------- components/google/core/common/google_util.h | 15 +- .../browser/page_load_metrics_util.cc | 4 +- .../common/page_load_metrics_util.cc | 33 +- @@ -55,18 +60,39 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html components/search_provider_logos/BUILD.gn | 2 - .../logo_service_impl.cc | 16 +- components/url_matcher/url_util.cc | 83 ----- - ...gled-chromium-no-special-hosts-domains.inc | 1 + + .../webid/identity_url_loader_throttle.cc | 1 + ...gled-chromium-no-special-hosts-domains.inc | 1 + net/base/url_util.cc | 25 +- services/network/network_context.cc | 2 +- - 52 files changed, 58 insertions(+), 810 deletions(-) - create mode 100644 cromite_flags/content/common/features_cc/ungoogled-chromium-no-special-hosts-domains.inc + 57 files changed, 57 insertions(+), 845 deletions(-) create mode 100644 cromite_flags/content/public/common/content_features_cc/ungoogled-chromium-no-special-hosts-domains.inc +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 +@@ -92,7 +92,6 @@ import org.chromium.chrome.browser.messages.MessageContainerCoordinator; + import org.chromium.chrome.browser.messages.MessageContainerObserver; + import org.chromium.chrome.browser.messages.MessagesResourceMapperInitializer; + import org.chromium.chrome.browser.omnibox.OmniboxFocusReason; +-import org.chromium.chrome.browser.omnibox.geo.GeolocationHeader; + import org.chromium.chrome.browser.omnibox.suggestions.action.OmniboxActionDelegateImpl; + import org.chromium.chrome.browser.paint_preview.DemoPaintPreview; + import org.chromium.chrome.browser.password_manager.ManagePasswordsReferrer; +@@ -1079,10 +1078,8 @@ public class RootUiCoordinator + String url = + TemplateUrlServiceFactory.getForProfile(tab.getProfile()) + .getUrlForSearchQuery(query); +- String headers = GeolocationHeader.getGeoHeader(url, tab); + + LoadUrlParams loadUrlParams = new LoadUrlParams(url); +- loadUrlParams.setVerbatimHeaders(headers); + loadUrlParams.setTransitionType(PageTransition.GENERATED); + return loadUrlParams; + } diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -1005,10 +1005,6 @@ static_library("browser") { +@@ -1006,10 +1006,6 @@ static_library("browser") { "page_load_metrics/observers/foreground_duration_ukm_observer.h", "page_load_metrics/observers/formfill_page_load_metrics_observer.cc", "page_load_metrics/observers/formfill_page_load_metrics_observer.h", @@ -77,7 +103,16 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn "page_load_metrics/observers/histogram_suffixes.cc", "page_load_metrics/observers/histogram_suffixes.h", "page_load_metrics/observers/https_engagement_metrics/https_engagement_page_load_metrics_observer.cc", -@@ -1956,7 +1952,6 @@ static_library("browser") { +@@ -1720,8 +1716,6 @@ static_library("browser") { + "supervised_user/chrome_supervised_user_web_content_handler_base.h", + "supervised_user/supervised_user_browser_utils.cc", + "supervised_user/supervised_user_browser_utils.h", +- "supervised_user/supervised_user_google_auth_navigation_throttle.cc", +- "supervised_user/supervised_user_google_auth_navigation_throttle.h", + "supervised_user/supervised_user_interstitial_tab_closer.cc", + "supervised_user/supervised_user_interstitial_tab_closer.h", + "supervised_user/supervised_user_metrics_service_factory.cc", +@@ -1958,7 +1952,6 @@ static_library("browser") { "//chrome/browser/autofill", "//chrome/browser/devtools", "//chrome/browser/favicon", @@ -85,27 +120,18 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn # Circular dependency due to SystemNetworkContextManager. "//chrome/browser/image_fetcher", -@@ -1985,7 +1980,6 @@ static_library("browser") { +@@ -1995,7 +1988,6 @@ static_library("browser") { public_deps = [ "//base", - "//chrome/browser/google", "//chrome/browser/headless", "//chrome/browser/profiles", - "//chrome/common", -@@ -7790,8 +7784,6 @@ static_library("browser") { - "supervised_user/chrome_supervised_user_web_content_handler_base.h", - "supervised_user/supervised_user_browser_utils.cc", - "supervised_user/supervised_user_browser_utils.h", -- "supervised_user/supervised_user_google_auth_navigation_throttle.cc", -- "supervised_user/supervised_user_google_auth_navigation_throttle.h", - "supervised_user/supervised_user_interstitial_tab_closer.cc", - "supervised_user/supervised_user_interstitial_tab_closer.h", - "supervised_user/supervised_user_metrics_service_factory.cc", + "//chrome/browser/ui/tabs:tab_enums", diff --git a/chrome/browser/android/metrics/uma_session_stats.cc b/chrome/browser/android/metrics/uma_session_stats.cc --- a/chrome/browser/android/metrics/uma_session_stats.cc +++ b/chrome/browser/android/metrics/uma_session_stats.cc -@@ -257,16 +257,6 @@ static void JNI_UmaSessionStats_ChangeMetricsReportingConsent( +@@ -259,16 +259,6 @@ static void JNI_UmaSessionStats_ChangeMetricsReportingConsent( jint called_from) { UpdateMetricsPrefsOnPermissionChange( consent, static_cast(called_from)); @@ -125,7 +151,7 @@ diff --git a/chrome/browser/android/metrics/uma_session_stats.cc b/chrome/browse diff --git a/chrome/browser/android/signin/signin_manager_android.cc b/chrome/browser/android/signin/signin_manager_android.cc --- a/chrome/browser/android/signin/signin_manager_android.cc +++ b/chrome/browser/android/signin/signin_manager_android.cc -@@ -60,41 +60,10 @@ class ProfileDataRemover : public content::BrowsingDataRemover::Observer { +@@ -71,41 +71,10 @@ class ProfileDataRemover : public content::BrowsingDataRemover::Observer { origin_runner_(base::SingleThreadTaskRunner::GetCurrentDefault()), remover_(profile->GetBrowsingDataRemover()) { remover_->AddObserver(this); @@ -174,7 +200,7 @@ diff --git a/chrome/browser/android/signin/signin_manager_android.cc b/chrome/br diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc --- a/chrome/browser/browser_process_impl.cc +++ b/chrome/browser/browser_process_impl.cc -@@ -1159,7 +1159,6 @@ BrowserProcessImpl::component_updater() { +@@ -1188,7 +1188,6 @@ BrowserProcessImpl::component_updater() { std::make_unique(); std::string brand; @@ -185,7 +211,7 @@ diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_pro diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc -@@ -527,11 +527,6 @@ void ProcessSingletonNotificationCallbackImpl( +@@ -559,11 +559,6 @@ void ProcessSingletonNotificationCallbackImpl( StartupBrowserCreator::ProcessCommandLineAlreadyRunning( command_line, current_directory, startup_profile_path_info); @@ -197,7 +223,7 @@ diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_brows } #endif // BUILDFLAG(ENABLE_PROCESS_SINGLETON) -@@ -1781,11 +1776,6 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1811,11 +1806,6 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { upgrade_util::SaveLastModifiedTimeOfExe(); #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) @@ -212,7 +238,7 @@ diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_brows diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc -@@ -2744,7 +2744,6 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( +@@ -2836,7 +2836,6 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( switches::kForcePNaClSubzero, #endif switches::kForceUIDirection, @@ -220,20 +246,17 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch switches::kJavaScriptHarmony, switches::kEnableExperimentalWebAssemblyFeatures, embedder_support::kOriginTrialDisabledFeatures, -@@ -5010,12 +5009,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( +@@ -5202,9 +5201,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation( } #endif --#if BUILDFLAG(ENABLE_SUPERVISED_USERS) - MaybeAddThrottle( - SupervisedUserGoogleAuthNavigationThrottle::MaybeCreate(handle), - &throttles); --#endif -- - if (auto* throttle_manager = - subresource_filter::ContentSubresourceFilterThrottleManager:: - FromNavigationHandle(*handle)) { -@@ -5558,7 +5551,8 @@ GetClientDataHeader(int frame_tree_node_id) { + + MaybeAddThrottle( + SupervisedUserNavigationThrottle::MaybeCreateThrottleFor(handle), +@@ -5775,7 +5771,8 @@ GetClientDataHeader(int frame_tree_node_id) { } #endif @@ -243,7 +266,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch #if BUILDFLAG(IS_ANDROID) const std::string& client_data_header, #endif -@@ -5597,7 +5591,7 @@ std::unique_ptr CreateGoogleURLLoaderThrottle( +@@ -5815,7 +5812,7 @@ std::unique_ptr CreateGoogleURLLoaderThrottle( std::move(bound_session_request_throttled_handler), #endif std::move(dynamic_params)); @@ -252,7 +275,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch std::vector> ChromeContentBrowserClient::CreateURLLoaderThrottles( -@@ -5645,15 +5639,6 @@ ChromeContentBrowserClient::CreateURLLoaderThrottles( +@@ -5863,15 +5860,6 @@ ChromeContentBrowserClient::CreateURLLoaderThrottles( GetClientDataHeader(frame_tree_node_id); #endif @@ -268,7 +291,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch { auto* factory = ProtocolHandlerRegistryFactory::GetForBrowserContext(browser_context); -@@ -5708,20 +5693,6 @@ ChromeContentBrowserClient::CreateURLLoaderThrottlesForKeepAlive( +@@ -5926,20 +5914,6 @@ ChromeContentBrowserClient::CreateURLLoaderThrottlesForKeepAlive( } #endif @@ -338,7 +361,7 @@ diff --git a/chrome/browser/domain_reliability/service_factory.cc b/chrome/brows diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUILD.gn --- a/chrome/browser/extensions/BUILD.gn +++ b/chrome/browser/extensions/BUILD.gn -@@ -801,7 +801,6 @@ static_library("extensions") { +@@ -842,7 +842,6 @@ source_set("extensions") { "//chrome/browser/devtools", "//chrome/browser/extensions:cws_item_service_proto", "//chrome/browser/favicon", @@ -349,7 +372,7 @@ diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUIL diff --git a/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc b/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc --- a/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc +++ b/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc -@@ -122,7 +122,6 @@ constexpr char kOsVersionTag[] = "OS VERSION"; +@@ -123,7 +123,6 @@ constexpr char kOsVersionTag[] = "OS VERSION"; #if BUILDFLAG(IS_WIN) constexpr char kUsbKeyboardDetected[] = "usb_keyboard_detected"; constexpr char kIsEnrolledToDomain[] = "enrolled_to_domain"; @@ -357,7 +380,7 @@ diff --git a/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log #if BUILDFLAG(GOOGLE_CHROME_BRANDING) constexpr char kUpdateErrorCode[] = "update_error_code"; constexpr char kUpdateHresult[] = "update_hresult"; -@@ -627,10 +626,6 @@ void ChromeInternalLogSource::PopulateEnrolledToDomain( +@@ -626,10 +625,6 @@ void ChromeInternalLogSource::PopulateEnrolledToDomain( void ChromeInternalLogSource::PopulateInstallerBrandCode( SystemLogsResponse* response) { @@ -371,12 +394,11 @@ diff --git a/chrome/browser/feedback/system_logs/log_sources/chrome_internal_log diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc --- a/chrome/browser/first_run/first_run.cc +++ b/chrome/browser/first_run/first_run.cc -@@ -298,15 +298,6 @@ void SetupInitialPrefsFromInstallPrefs( +@@ -296,14 +296,6 @@ void SetupInitialPrefsFromInstallPrefs( // -- Platform-specific functions -- --#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) && \ -- !BUILDFLAG(IS_FUCHSIA) +-#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_BSD) -bool IsOrganicFirstRun() { - std::string brand; - google_brand::GetBrand(&brand); @@ -390,16 +412,16 @@ diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/fi diff --git a/chrome/browser/google/BUILD.gn b/chrome/browser/google/BUILD.gn --- a/chrome/browser/google/BUILD.gn +++ b/chrome/browser/google/BUILD.gn -@@ -5,7 +5,7 @@ - import("//build/config/chrome_build.gni") - import("//build/config/chromeos/ui_mode.gni") +@@ -7,7 +7,7 @@ import("//build/config/chromeos/ui_mode.gni") + + assert(!is_fuchsia, "Fuchsia shouldn't use anything in //chrome") -source_set("google") { +source_set("google_UNUSED") { sources = [ "google_brand.cc", "google_brand.h", -@@ -82,7 +82,7 @@ source_set("unit_tests") { +@@ -84,7 +84,7 @@ source_set("unit_tests") { sources = [ "google_update_settings_unittest.cc" ] deps = [ @@ -411,7 +433,7 @@ diff --git a/chrome/browser/google/BUILD.gn b/chrome/browser/google/BUILD.gn diff --git a/chrome/browser/long_screenshots/long_screenshots_tab_service.cc b/chrome/browser/long_screenshots/long_screenshots_tab_service.cc --- a/chrome/browser/long_screenshots/long_screenshots_tab_service.cc +++ b/chrome/browser/long_screenshots/long_screenshots_tab_service.cc -@@ -34,13 +34,11 @@ constexpr size_t kMaxPerCaptureSizeBytes = 50 * 1000L * 1000L; // 50 MB. +@@ -36,13 +36,11 @@ constexpr size_t kMaxPerCaptureSizeBytes = 50 * 1000L * 1000L; // 50 MB. // Host/regex pattern for Google AMP Cache URLs. // See https://developers.google.com/amp/cache/overview#amp-cache-url-format // for a definition of the format of AMP Cache URLs. @@ -425,7 +447,7 @@ diff --git a/chrome/browser/long_screenshots/long_screenshots_tab_service.cc b/c const char kGoogleNewsPathPattern[] = "/articles/(.*)"; } // namespace -@@ -229,26 +227,6 @@ bool LongScreenshotsTabService::IsAmpUrl(const GURL& url) { +@@ -231,26 +229,6 @@ bool LongScreenshotsTabService::IsAmpUrl(const GURL& url) { return false; } @@ -455,7 +477,7 @@ diff --git a/chrome/browser/long_screenshots/long_screenshots_tab_service.cc b/c diff --git a/chrome/browser/metrics/chrome_metrics_service_client.cc b/chrome/browser/metrics/chrome_metrics_service_client.cc --- a/chrome/browser/metrics/chrome_metrics_service_client.cc +++ b/chrome/browser/metrics/chrome_metrics_service_client.cc -@@ -646,7 +646,7 @@ ChromeMetricsServiceClient::GetNetworkTimeTracker() { +@@ -594,7 +594,7 @@ ChromeMetricsServiceClient::GetNetworkTimeTracker() { } bool ChromeMetricsServiceClient::GetBrand(std::string* brand_code) { @@ -467,7 +489,7 @@ diff --git a/chrome/browser/metrics/chrome_metrics_service_client.cc b/chrome/br diff --git a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc --- a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc +++ b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc -@@ -103,9 +103,6 @@ void PostStoreMetricsClientInfo(const metrics::ClientInfo& client_info) { +@@ -120,9 +120,6 @@ void PostStoreMetricsClientInfo(const metrics::ClientInfo& client_info) { // This must happen on the same sequence as the tasks to enable/disable // metrics reporting. Otherwise, this may run while disabling metrics // reporting if the user quickly enables and disables metrics reporting. @@ -477,7 +499,7 @@ diff --git a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc b/ } #if BUILDFLAG(IS_ANDROID) -@@ -343,7 +340,7 @@ ChromeMetricsServicesManagerClient::GetMetricsStateManager() { +@@ -404,7 +401,7 @@ ChromeMetricsServicesManagerClient::GetMetricsStateManager() { cc::switches::kEnableGpuBenchmarking), }, base::BindRepeating(&PostStoreMetricsClientInfo), @@ -611,7 +633,7 @@ diff --git a/chrome/browser/new_tab_page/modules/recipes/recipes_service.cc b/ch diff --git a/chrome/browser/new_tab_page/one_google_bar/one_google_bar_loader_impl.cc b/chrome/browser/new_tab_page/one_google_bar/one_google_bar_loader_impl.cc --- a/chrome/browser/new_tab_page/one_google_bar/one_google_bar_loader_impl.cc +++ b/chrome/browser/new_tab_page/one_google_bar/one_google_bar_loader_impl.cc -@@ -313,10 +313,11 @@ bool OneGoogleBarLoaderImpl::SetAdditionalQueryParams( +@@ -315,10 +315,11 @@ bool OneGoogleBarLoaderImpl::SetAdditionalQueryParams( } GURL OneGoogleBarLoaderImpl::GetApiUrl() const { @@ -666,7 +688,7 @@ diff --git a/chrome/browser/page_load_metrics/observers/from_gws_page_load_metri diff --git a/chrome/browser/page_load_metrics/page_load_metrics_initialize.cc b/chrome/browser/page_load_metrics/page_load_metrics_initialize.cc --- a/chrome/browser/page_load_metrics/page_load_metrics_initialize.cc +++ b/chrome/browser/page_load_metrics/page_load_metrics_initialize.cc -@@ -144,8 +144,6 @@ void PageLoadMetricsEmbedder::RegisterEmbedderObservers( +@@ -145,8 +145,6 @@ void PageLoadMetricsEmbedder::RegisterEmbedderObservers( tracker->AddObserver(std::make_unique()); tracker->AddObserver(std::make_unique()); tracker->AddObserver(std::make_unique()); @@ -685,7 +707,18 @@ diff --git a/chrome/browser/safe_browsing/BUILD.gn b/chrome/browser/safe_browsin - "//chrome/browser/google", "//chrome/browser/profiles", "//chrome/browser/profiles:profile", - "//chrome/common", + "//chrome/browser/sync", +diff --git a/chrome/browser/search_engines/BUILD.gn b/chrome/browser/search_engines/BUILD.gn +--- a/chrome/browser/search_engines/BUILD.gn ++++ b/chrome/browser/search_engines/BUILD.gn +@@ -32,7 +32,6 @@ source_set("search_engines") { + + deps = [ + "//chrome/browser:browser_process", +- "//chrome/browser/google", + "//chrome/common:channel_info", + "//chrome/common:non_code_constants", + "//components/google/core/common", diff --git a/chrome/browser/search_engines/ui_thread_search_terms_data.cc b/chrome/browser/search_engines/ui_thread_search_terms_data.cc --- a/chrome/browser/search_engines/ui_thread_search_terms_data.cc +++ b/chrome/browser/search_engines/ui_thread_search_terms_data.cc @@ -703,18 +736,118 @@ diff --git a/chrome/browser/search_engines/ui_thread_search_terms_data.cc b/chro diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn -@@ -427,7 +427,6 @@ static_library("ui") { - "//chrome/browser/companion/core", +@@ -456,7 +456,6 @@ static_library("ui") { "//chrome/browser/devtools", "//chrome/browser/favicon", + "//chrome/browser/fingerprinting_protection", - "//chrome/browser/google", "//chrome/browser/image_decoder", "//chrome/browser/image_fetcher", "//chrome/browser/media:mojo_bindings", +diff --git a/chrome/browser/ui/android/omnibox/BUILD.gn b/chrome/browser/ui/android/omnibox/BUILD.gn +--- a/chrome/browser/ui/android/omnibox/BUILD.gn ++++ b/chrome/browser/ui/android/omnibox/BUILD.gn +@@ -47,8 +47,6 @@ android_library("java") { + "java/src/org/chromium/chrome/browser/omnibox/UrlBarProperties.java", + "java/src/org/chromium/chrome/browser/omnibox/UrlBarViewBinder.java", + "java/src/org/chromium/chrome/browser/omnibox/UrlFocusChangeListener.java", +- "java/src/org/chromium/chrome/browser/omnibox/geo/GeolocationHeader.java", +- "java/src/org/chromium/chrome/browser/omnibox/geo/GeolocationTracker.java", + "java/src/org/chromium/chrome/browser/omnibox/geo/PlatformNetworksManager.java", + "java/src/org/chromium/chrome/browser/omnibox/geo/VisibleNetworks.java", + "java/src/org/chromium/chrome/browser/omnibox/geo/VisibleNetworksTracker.java", +diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java +--- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java ++++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarCoordinator.java +@@ -30,7 +30,6 @@ import org.chromium.chrome.browser.locale.LocaleManager; + import org.chromium.chrome.browser.merchant_viewer.MerchantTrustSignalsCoordinator; + import org.chromium.chrome.browser.omnibox.LocationBarMediator.OmniboxUma; + import org.chromium.chrome.browser.omnibox.LocationBarMediator.SaveOfflineButtonState; +-import org.chromium.chrome.browser.omnibox.geo.GeolocationHeader; + import org.chromium.chrome.browser.omnibox.status.StatusCoordinator; + import org.chromium.chrome.browser.omnibox.status.StatusCoordinator.PageInfoAction; + import org.chromium.chrome.browser.omnibox.status.StatusView; +@@ -384,7 +383,6 @@ public class LocationBarCoordinator + + mLocationBarMediator.destroy(); + mLocationBarMediator = null; +- GeolocationHeader.stopListeningForLocationUpdates(); + + mDestroyed = true; + } +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 +@@ -48,7 +48,6 @@ import org.chromium.chrome.browser.lifecycle.PauseResumeWithNativeObserver; + import org.chromium.chrome.browser.locale.LocaleManager; + import org.chromium.chrome.browser.omnibox.UrlBar.UrlBarDelegate; + import org.chromium.chrome.browser.omnibox.UrlBarCoordinator.SelectionState; +-import org.chromium.chrome.browser.omnibox.geo.GeolocationHeader; + import org.chromium.chrome.browser.omnibox.status.StatusCoordinator; + import org.chromium.chrome.browser.omnibox.styles.OmniboxResourceProvider; + import org.chromium.chrome.browser.omnibox.suggestions.AutocompleteCoordinator; +@@ -306,24 +305,6 @@ class LocationBarMediator + + if (!mUrlFocusedWithoutAnimations) handleUrlFocusAnimation(hasFocus); + +- if (hasFocus +- && mLocationBarDataProvider.hasTab() +- && !mLocationBarDataProvider.isIncognito()) { +- if (mTemplateUrlServiceSupplier.hasValue()) { +- if (mTemplateUrlServiceSupplier.get().isDefaultSearchEngineGoogle()) { +- GeolocationHeader.primeLocationForGeoHeaderIfEnabled( +- mProfileSupplier.get(), mTemplateUrlServiceSupplier.get()); +- } +- } else { +- mTemplateUrlServiceSupplier.onAvailable( +- (templateUrlService) -> { +- if (templateUrlService.isDefaultSearchEngineGoogle()) { +- GeolocationHeader.primeLocationForGeoHeaderIfEnabled( +- mProfileSupplier.get(), templateUrlService); +- } +- }); +- } +- } // Focus change caused by a closed tab may result in there not being an active tab. + if (!hasFocus && mLocationBarDataProvider.hasTab()) { + setUrl( + mLocationBarDataProvider.getCurrentGurl(), +@@ -339,8 +320,6 @@ class LocationBarMediator + templateUrlService.addObserver(this); + if (OmniboxFeatures.sUseFusedLocationProvider.isEnabled() + && templateUrlService.isDefaultSearchEngineGoogle()) { +- GeolocationHeader.primeLocationForGeoHeaderIfEnabled( +- mProfileSupplier.get(), mTemplateUrlServiceSupplier.get()); + } + }); + +@@ -570,7 +549,6 @@ class LocationBarMediator + LoadUrlParams loadUrlParams = new LoadUrlParams(url); + try (TimingMetric record = + TimingMetric.shortUptime("Android.Omnibox.SetGeolocationHeadersTime")) { +- loadUrlParams.setVerbatimHeaders(GeolocationHeader.getGeoHeader(url, currentTab)); + } + loadUrlParams.setTransitionType( + omniboxLoadUrlParams.transitionType | PageTransition.FROM_ADDRESS_BAR); +@@ -1549,15 +1527,12 @@ class LocationBarMediator + if (OmniboxFeatures.sUseFusedLocationProvider.isEnabled() + && mProfileSupplier.hasValue() + && mTemplateUrlServiceSupplier.hasValue()) { +- GeolocationHeader.primeLocationForGeoHeaderIfEnabled( +- mProfileSupplier.get(), mTemplateUrlServiceSupplier.get()); + } + } + + @Override + public void onPauseWithNative() { + if (OmniboxFeatures.sUseFusedLocationProvider.isEnabled()) { +- GeolocationHeader.stopListeningForLocationUpdates(); + } + } + diff --git a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc b/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc --- a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc +++ b/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc -@@ -643,11 +643,6 @@ content::WebUIDataSource* CreateAndAddNewTabPageUiHtmlSource(Profile* profile) { +@@ -693,11 +693,6 @@ content::WebUIDataSource* CreateAndAddNewTabPageUiHtmlSource(Profile* profile) { // chrome-untrusted://new-tab-page for other external content and resources. // NOTE: Use caution when overriding content security policies as that cean // lead to subtle security bugs such as https://crbug.com/1251541. @@ -740,19 +873,23 @@ diff --git a/chrome/browser/ui/webui/settings/reset_settings_handler.cc b/chrome diff --git a/chrome/browser/upgrade_detector/upgrade_detector_impl.cc b/chrome/browser/upgrade_detector/upgrade_detector_impl.cc --- a/chrome/browser/upgrade_detector/upgrade_detector_impl.cc +++ b/chrome/browser/upgrade_detector/upgrade_detector_impl.cc -@@ -213,7 +213,7 @@ void UpgradeDetectorImpl::StartOutdatedBuildDetector() { - // an outdated build is being simulated by command line switches. - if (!simulating_outdated_) { - std::string brand; -- if (google_brand::GetBrand(&brand) && !google_brand::IsOrganic(brand)) -+ if ((true)) - return; +@@ -67,12 +67,6 @@ constexpr auto kOutdatedBuildAge = base::Days(7) * 8; - #if BUILDFLAG(IS_WIN) + bool ShouldDetectOutdatedBuilds() { + #if BUILDFLAG(ENABLE_UPDATE_NOTIFICATIONS) && !BUILDFLAG(IS_CHROMEOS) +- // Don't show the bubble if we have a brand code that is NOT organic +- std::string brand; +- if (google_brand::GetBrand(&brand) && !google_brand::IsOrganic(brand)) { +- return false; +- } +- + // Don't show the bubble for Enterprise users. + if (policy::ManagementServiceFactory::GetForPlatform()->IsManaged()) { + return false; diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn --- a/chrome/common/BUILD.gn +++ b/chrome/common/BUILD.gn -@@ -142,8 +142,6 @@ static_library("common_lib") { +@@ -141,8 +141,6 @@ static_library("common_lib") { "content_restriction.h", "crash_keys.cc", "crash_keys.h", @@ -796,14 +933,14 @@ diff --git a/chrome/renderer/url_loader_throttle_provider_impl.cc b/chrome/rende diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -6674,7 +6674,6 @@ test("unit_tests") { +@@ -6932,7 +6932,6 @@ test("unit_tests") { "//chrome/browser/favicon", - "//chrome/browser/feature_guide/notifications:unit_tests", + "//chrome/browser/fingerprinting_protection", "//chrome/browser/first_party_sets", - "//chrome/browser/google:unit_tests", + "//chrome/browser/ip_protection:unit_tests", "//chrome/browser/media/prefs", "//chrome/browser/media/prefs:unit_tests", - "//chrome/browser/media/router", diff --git a/components/domain_reliability/BUILD.gn b/components/domain_reliability/BUILD.gn --- a/components/domain_reliability/BUILD.gn +++ b/components/domain_reliability/BUILD.gn @@ -938,12 +1075,12 @@ diff --git a/components/domain_reliability/google_configs.h b/components/domain_ diff --git a/components/domain_reliability/monitor.cc b/components/domain_reliability/monitor.cc --- a/components/domain_reliability/monitor.cc +++ b/components/domain_reliability/monitor.cc -@@ -95,14 +95,6 @@ void DomainReliabilityMonitor::Shutdown() { +@@ -96,14 +96,6 @@ void DomainReliabilityMonitor::Shutdown() { } void DomainReliabilityMonitor::AddBakedInConfigs() { - for (size_t i = 0; kBakedInJsonConfigs[i]; ++i) { -- base::StringPiece json(kBakedInJsonConfigs[i]); +- std::string_view json(kBakedInJsonConfigs[i]); - std::unique_ptr config = - DomainReliabilityConfig::FromJSON(json); - // Guard against accidentally checking in malformed JSON configs. @@ -968,16 +1105,16 @@ diff --git a/components/domain_reliability/uploader.cc b/components/domain_relia diff --git a/components/google/core/common/google_util.cc b/components/google/core/common/google_util.cc --- a/components/google/core/common/google_util.cc +++ b/components/google/core/common/google_util.cc -@@ -31,60 +31,6 @@ namespace google_util { +@@ -31,61 +31,6 @@ namespace google_util { namespace { --bool IsPathHomePageBase(base::StringPiece path) { +-bool IsPathHomePageBase(std::string_view path) { - return (path == "/") || (path == "/webhp"); -} - -// Removes a single trailing dot if present in |host|. --void StripTrailingDot(base::StringPiece* host) { +-void StripTrailingDot(std::string_view* host) { - if (base::EndsWith(*host, ".")) - host->remove_suffix(1); -} @@ -987,13 +1124,14 @@ diff --git a/components/google/core/common/google_util.cc b/components/google/co -// ALLOW_SUBDOMAIN, we check against host "*.." -// instead. -template --bool IsValidHostName(base::StringPiece host, -- base::StringPiece domain_in_lower_case, +-bool IsValidHostName(std::string_view host, +- std::string_view domain_in_lower_case, - SubdomainPermission subdomain_permission, - const Container& allowed_tlds) { - // Fast path to avoid searching the registry set. -- if (host.find(domain_in_lower_case) == base::StringPiece::npos) +- if (host.find(domain_in_lower_case) == std::string_view::npos) { - return false; +- } - - size_t tld_length = - net::registry_controlled_domains::GetCanonicalHostRegistryLength( @@ -1003,10 +1141,10 @@ diff --git a/components/google/core/common/google_util.cc b/components/google/co - return false; - - // Removes the tld and the preceding dot. -- base::StringPiece host_minus_tld = +- std::string_view host_minus_tld = - host.substr(0, host.length() - tld_length - 1); - -- base::StringPiece tld = host.substr(host.length() - tld_length); +- std::string_view tld = host.substr(host.length() - tld_length); - // Remove the trailing dot from tld if present, as for Google domains it's the - // same page. - StripTrailingDot(&tld); @@ -1029,24 +1167,24 @@ diff --git a/components/google/core/common/google_util.cc b/components/google/co // True if |url| is a valid URL with HTTP or HTTPS scheme. If |port_permission| // is DISALLOW_NON_STANDARD_PORTS, this also requires |url| to use the standard // port for its scheme (80 for HTTP, 443 for HTTPS). -@@ -99,57 +45,14 @@ bool IsValidURL(const GURL& url, PortPermission port_permission) { +@@ -100,57 +45,14 @@ bool IsValidURL(const GURL& url, PortPermission port_permission) { - bool IsCanonicalHostGoogleHostname(base::StringPiece canonical_host, + bool IsCanonicalHostGoogleHostname(std::string_view canonical_host, SubdomainPermission subdomain_permission) { - const GURL& base_url(CommandLineGoogleBaseURL()); - if (base_url.is_valid() && (canonical_host == base_url.host_piece())) - return true; - - static constexpr auto google_tlds = -- base::MakeFixedFlatSet({GOOGLE_TLD_LIST}); +- base::MakeFixedFlatSet({GOOGLE_TLD_LIST}); - return IsValidHostName(canonical_host, "google", subdomain_permission, - google_tlds); -} - --bool IsCanonicalHostYoutubeHostname(base::StringPiece canonical_host, +-bool IsCanonicalHostYoutubeHostname(std::string_view canonical_host, - SubdomainPermission subdomain_permission) { - static constexpr auto youtube_tlds = -- base::MakeFixedFlatSet({YOUTUBE_TLD_LIST}); +- base::MakeFixedFlatSet({YOUTUBE_TLD_LIST}); - - return IsValidHostName(canonical_host, "youtube", subdomain_permission, - youtube_tlds); @@ -1059,11 +1197,11 @@ diff --git a/components/google/core/common/google_util.cc b/components/google/co - if (!IsValidURL(url, PortPermission::DISALLOW_NON_STANDARD_PORTS)) - return false; - -- base::StringPiece host(url.host_piece()); +- std::string_view host(url.host_piece()); - StripTrailingDot(&host); - - static constexpr auto google_subdomains = -- base::MakeFixedFlatSet( +- base::MakeFixedFlatSet( - {"ipv4.google.com", "ipv6.google.com"}); - - return google_subdomains.contains(host); @@ -1076,10 +1214,10 @@ diff --git a/components/google/core/common/google_util.cc b/components/google/co -const char kGoogleHomepageURL[] = "https://www.google.com/"; - --bool HasGoogleSearchQueryParam(base::StringPiece str) { +-bool HasGoogleSearchQueryParam(std::string_view str) { - url::Component query(0, static_cast(str.length())), key, value; - while (url::ExtractQueryKeyValue(str, &query, &key, &value)) { -- base::StringPiece key_str = str.substr(key.begin, key.len); +- std::string_view key_str = str.substr(key.begin, key.len); - if (key_str == "q" || key_str == "as_q" || key_str == "imgurl") - return true; - } @@ -1089,7 +1227,7 @@ diff --git a/components/google/core/common/google_util.cc b/components/google/co std::string GetGoogleLocale(const std::string& application_locale) { // Google does not recognize "nb" for Norwegian Bokmal; it uses "no". -@@ -158,30 +61,11 @@ std::string GetGoogleLocale(const std::string& application_locale) { +@@ -159,30 +61,11 @@ std::string GetGoogleLocale(const std::string& application_locale) { GURL AppendGoogleLocaleParam(const GURL& url, const std::string& application_locale) { @@ -1099,13 +1237,13 @@ diff --git a/components/google/core/common/google_util.cc b/components/google/co } std::string GetGoogleCountryCode(const GURL& google_homepage_url) { -- base::StringPiece google_hostname = google_homepage_url.host_piece(); +- std::string_view google_hostname = google_homepage_url.host_piece(); - // TODO(igorcov): This needs a fix for case when the host has a trailing dot, - // like "google.com./". https://crbug.com/720295. - const size_t last_dot = google_hostname.find_last_of('.'); - if (last_dot == std::string::npos) - return std::string(); -- base::StringPiece country_code = google_hostname.substr(last_dot + 1); +- std::string_view country_code = google_hostname.substr(last_dot + 1); - // Assume the com TLD implies the US. - if (country_code == "com") - return "us"; @@ -1122,9 +1260,9 @@ diff --git a/components/google/core/common/google_util.cc b/components/google/co } GURL GetGoogleSearchURL(const GURL& google_homepage_url) { -@@ -227,205 +111,25 @@ bool IsGoogleDomainUrl(const GURL& url, +@@ -228,205 +111,25 @@ bool IsGoogleDomainUrl(const GURL& url, - bool IsGoogleHostname(base::StringPiece host, + bool IsGoogleHostname(std::string_view host, SubdomainPermission subdomain_permission) { - url::CanonHostInfo host_info; - return IsCanonicalHostGoogleHostname(net::CanonicalizeHost(host, &host_info), @@ -1141,7 +1279,7 @@ diff --git a/components/google/core/common/google_util.cc b/components/google/co - } - - // Make sure the path is a known home page path. -- base::StringPiece path(url.path_piece()); +- std::string_view path(url.path_piece()); - return IsPathHomePageBase(path) || - base::StartsWith(path, "/ig", base::CompareCase::INSENSITIVE_ASCII); + return false; @@ -1156,7 +1294,7 @@ diff --git a/components/google/core/common/google_util.cc b/components/google/co - } - - // Make sure the path is a known search path. -- base::StringPiece path(url.path_piece()); +- std::string_view path(url.path_piece()); - bool is_home_page_base = IsPathHomePageBase(path); - if (!is_home_page_base && path != "/search" && path != "/imgres") - return false; @@ -1252,12 +1390,12 @@ diff --git a/components/google/core/common/google_util.cc b/components/google/co - const std::string param_name = "async"; - const std::string key_value = key + ":" + value; - bool replaced = false; -- const base::StringPiece input = url.query_piece(); +- const std::string_view input = url.query_piece(); - url::Component cursor(0, input.size()); - std::string output; - url::Component key_range, value_range; - while (url::ExtractQueryKeyValue(input, &cursor, &key_range, &value_range)) { -- const base::StringPiece input_key = +- const std::string_view input_key = - input.substr(key_range.begin, key_range.len); - std::string key_value_pair( - input.substr(key_range.begin, value_range.end() - key_range.begin)); @@ -1289,12 +1427,12 @@ diff --git a/components/google/core/common/google_util.cc b/components/google/co - "This function should be updated if new values are added to " - "GoogleSearchMode"); - -- base::StringPiece query_str = url.query_piece(); +- std::string_view query_str = url.query_piece(); - url::Component query(0, static_cast(url.query_piece().length())); - url::Component key, value; - GoogleSearchMode mode = GoogleSearchMode::kUnspecified; - while (url::ExtractQueryKeyValue(query_str, &query, &key, &value)) { -- base::StringPiece key_str = query_str.substr(key.begin, key.len); +- std::string_view key_str = query_str.substr(key.begin, key.len); - if (key_str != "tbm") { - continue; - } @@ -1303,7 +1441,7 @@ diff --git a/components/google/core/common/google_util.cc b/components/google/co - // kUnknown to signify the result can't be trusted. - return GoogleSearchMode::kUnknown; - } -- base::StringPiece value_str = query_str.substr(value.begin, value.len); +- std::string_view value_str = query_str.substr(value.begin, value.len); - if (value_str == "isch") { - mode = GoogleSearchMode::kImages; - } else if (value_str == "web") { @@ -1335,7 +1473,7 @@ diff --git a/components/google/core/common/google_util.cc b/components/google/co diff --git a/components/google/core/common/google_util.h b/components/google/core/common/google_util.h --- a/components/google/core/common/google_util.h +++ b/components/google/core/common/google_util.h -@@ -40,7 +40,7 @@ enum class GoogleSearchMode { +@@ -39,7 +39,7 @@ enum class GoogleSearchMode { kMaxValue = kFlights, }; @@ -1344,7 +1482,7 @@ diff --git a/components/google/core/common/google_util.h b/components/google/cor // True iff |str| contains a "q=" or "as_q=" query parameter with a non-empty // value. |str| should be a query or a hash fragment, without the ? or # (as -@@ -133,14 +133,6 @@ bool IsYoutubeDomainUrl(const GURL& url, +@@ -132,14 +132,6 @@ bool IsYoutubeDomainUrl(const GURL& url, // True if |url| is hosted by Google. bool IsGoogleAssociatedDomainUrl(const GURL& url); @@ -1359,7 +1497,7 @@ diff --git a/components/google/core/common/google_util.h b/components/google/cor // Appends the provided |key| and |value| pair to the "async" query param list, // according to the format used by the Google servers: // -@@ -154,11 +146,6 @@ GURL AppendToAsyncQueryParam(const GURL& url, +@@ -153,11 +145,6 @@ GURL AppendToAsyncQueryParam(const GURL& url, const std::string& key, const std::string& value); @@ -1374,7 +1512,7 @@ diff --git a/components/google/core/common/google_util.h b/components/google/cor diff --git a/components/page_load_metrics/browser/page_load_metrics_util.cc b/components/page_load_metrics/browser/page_load_metrics_util.cc --- a/components/page_load_metrics/browser/page_load_metrics_util.cc +++ b/components/page_load_metrics/browser/page_load_metrics_util.cc -@@ -283,9 +283,7 @@ bool DidObserveLoadingBehaviorInAnyFrame( +@@ -284,9 +284,7 @@ bool DidObserveLoadingBehaviorInAnyFrame( } bool IsGoogleSearchHostname(const GURL& url) { @@ -1388,7 +1526,7 @@ diff --git a/components/page_load_metrics/browser/page_load_metrics_util.cc b/co diff --git a/components/page_load_metrics/common/page_load_metrics_util.cc b/components/page_load_metrics/common/page_load_metrics_util.cc --- a/components/page_load_metrics/common/page_load_metrics_util.cc +++ b/components/page_load_metrics/common/page_load_metrics_util.cc -@@ -24,38 +24,7 @@ const int kExtraBufferTimerDelayMillis = 50; +@@ -25,38 +25,7 @@ const int kExtraBufferTimerDelayMillis = 50; } // namespace std::optional GetGoogleHostnamePrefix(const GURL& url) { @@ -1404,14 +1542,14 @@ diff --git a/components/page_load_metrics/common/page_load_metrics_util.cc b/com - // want to match URLs like www.google.appspot.com. - net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES); - -- const base::StringPiece hostname = url.host_piece(); +- const std::string_view hostname = url.host_piece(); - if (registry_length == 0 || registry_length == std::string::npos || - registry_length >= hostname.length()) { -- return std::optional(); +- return std::nullopt; - } - - // Removes the tld and the preceding dot. -- const base::StringPiece hostname_minus_registry = +- const std::string_view hostname_minus_registry = - hostname.substr(0, hostname.length() - (registry_length + 1)); - - if (hostname_minus_registry == "google") @@ -1419,12 +1557,12 @@ diff --git a/components/page_load_metrics/common/page_load_metrics_util.cc b/com - - if (!base::EndsWith(hostname_minus_registry, ".google", - base::CompareCase::INSENSITIVE_ASCII)) { -- return std::optional(); +- return std::nullopt; - } - - return std::string(hostname_minus_registry.substr( - 0, hostname_minus_registry.length() - strlen(".google"))); -+ return std::optional(); ++ return std::nullopt; } bool IsGoogleHostname(const GURL& url) { @@ -1463,7 +1601,7 @@ diff --git a/components/search_engines/search_terms_data.cc b/components/search_ diff --git a/components/search_engines/template_url.cc b/components/search_engines/template_url.cc --- a/components/search_engines/template_url.cc +++ b/components/search_engines/template_url.cc -@@ -586,11 +586,7 @@ std::u16string TemplateURLRef::SearchTermToString16( +@@ -593,11 +593,7 @@ std::u16string TemplateURLRef::SearchTermToString16( bool TemplateURLRef::HasGoogleBaseURLs( const SearchTermsData& search_terms_data) const { ParseIfNecessary(search_terms_data); @@ -1638,12 +1776,17 @@ diff --git a/components/url_matcher/url_util.cc b/components/url_matcher/url_uti return GURL(); } -diff --git a/cromite_flags/content/common/features_cc/ungoogled-chromium-no-special-hosts-domains.inc b/cromite_flags/content/common/features_cc/ungoogled-chromium-no-special-hosts-domains.inc -new file mode 100644 ---- /dev/null -+++ b/cromite_flags/content/common/features_cc/ungoogled-chromium-no-special-hosts-domains.inc -@@ -0,0 +1 @@ -+SET_CROMITE_FEATURE_DISABLED(kFedCmIdpSigninStatusMetrics); +diff --git a/content/common/webid/identity_url_loader_throttle.cc b/content/common/webid/identity_url_loader_throttle.cc +--- a/content/common/webid/identity_url_loader_throttle.cc ++++ b/content/common/webid/identity_url_loader_throttle.cc +@@ -36,6 +36,7 @@ namespace content { + + std::unique_ptr MaybeCreateIdentityUrlLoaderThrottle( + SetIdpStatusCallback cb) { ++ if ((true)) return nullptr; + return std::make_unique(std::move(cb)); + } + diff --git a/cromite_flags/content/public/common/content_features_cc/ungoogled-chromium-no-special-hosts-domains.inc b/cromite_flags/content/public/common/content_features_cc/ungoogled-chromium-no-special-hosts-domains.inc new file mode 100644 --- /dev/null @@ -1653,7 +1796,7 @@ new file mode 100644 diff --git a/net/base/url_util.cc b/net/base/url_util.cc --- a/net/base/url_util.cc +++ b/net/base/url_util.cc -@@ -489,34 +489,11 @@ bool HasGoogleHost(const GURL& url) { +@@ -495,34 +495,11 @@ bool HasGoogleHost(const GURL& url) { } bool IsGoogleHost(std::string_view host) { @@ -1692,7 +1835,7 @@ diff --git a/net/base/url_util.cc b/net/base/url_util.cc diff --git a/services/network/network_context.cc b/services/network/network_context.cc --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -2707,7 +2707,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2813,7 +2813,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( } #endif // BUILDFLAG(IS_CT_SUPPORTED) diff --git a/build/cromite_patches/webRTC-do-not-expose-local-IP-addresses.patch b/build/cromite_patches/webRTC-do-not-expose-local-IP-addresses.patch index 26a7bc6f..bcae6d62 100644 --- a/build/cromite_patches/webRTC-do-not-expose-local-IP-addresses.patch +++ b/build/cromite_patches/webRTC-do-not-expose-local-IP-addresses.patch @@ -17,7 +17,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html 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 -@@ -97,7 +97,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { +@@ -103,7 +103,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { false); #endif registry->RegisterStringPref(prefs::kWebRTCIPHandlingPolicy, @@ -29,7 +29,7 @@ diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_u diff --git a/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc b/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc --- a/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc +++ b/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc -@@ -121,7 +121,9 @@ WebRTCIPHandlingPolicy GetWebRTCIPHandlingPolicy(const String& preference) { +@@ -119,7 +119,9 @@ WebRTCIPHandlingPolicy GetWebRTCIPHandlingPolicy(const String& preference) { return kDefaultPublicInterfaceOnly; if (preference == kWebRTCIPHandlingDisableNonProxiedUdp) return kDisableNonProxiedUdp; @@ -40,7 +40,7 @@ diff --git a/third_party/blink/renderer/modules/peerconnection/peer_connection_d } bool IsValidPortRange(uint16_t min_port, uint16_t max_port) { -@@ -865,7 +867,7 @@ PeerConnectionDependencyFactory::CreatePortAllocator( +@@ -859,7 +861,7 @@ PeerConnectionDependencyFactory::CreatePortAllocator( break; } diff --git a/build/cromite_patches/webview-Hard-no-to-persistent-histograms.patch b/build/cromite_patches/webview-Hard-no-to-persistent-histograms.patch index af33b22e..3a5d5c9c 100644 --- a/build/cromite_patches/webview-Hard-no-to-persistent-histograms.patch +++ b/build/cromite_patches/webview-Hard-no-to-persistent-histograms.patch @@ -18,7 +18,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html diff --git a/android_webview/browser/aw_field_trials.cc b/android_webview/browser/aw_field_trials.cc --- a/android_webview/browser/aw_field_trials.cc +++ b/android_webview/browser/aw_field_trials.cc -@@ -60,13 +60,6 @@ class AwFeatureOverrides { +@@ -62,13 +62,6 @@ class AwFeatureOverrides { } // namespace void AwFieldTrials::OnVariationsSetupComplete() { @@ -27,9 +27,9 @@ diff --git a/android_webview/browser/aw_field_trials.cc b/android_webview/browse - if (base::PathService::Get(base::DIR_ANDROID_APP_DATA, &metrics_dir)) { - InstantiatePersistentHistogramsWithFeaturesAndCleanup(metrics_dir); - } else { -- NOTREACHED(); +- NOTREACHED_IN_MIGRATION(); - } } - // TODO(crbug.com/1453407): Consider to migrate all WebView feature overrides + // TODO(crbug.com/40271903): Consider to migrate all WebView feature overrides -- diff --git a/build/cromite_patches_list.txt b/build/cromite_patches_list.txt index 859cc732..f8597291 100644 --- a/build/cromite_patches_list.txt +++ b/build/cromite_patches_list.txt @@ -21,7 +21,7 @@ Always-use-new-tab-page-for-default-home-page.patch disable-battery-status-updater.patch Battery-API-return-nothing.patch updater-disable-updater-pings.patch -Disable-omission-of-URL-elements-in-Omnibox.patch +Disable-omission-of-URL-elements.patch Modify-default-preferences.patch Do-not-store-passwords-by-default.patch Disable-NTP-remote-suggestions-by-default.patch @@ -40,7 +40,6 @@ Disable-all-promo-dialogs.patch Disable-update-scheduler.patch Add-search-engine.patch openH264-enable-ARM-ARM64-optimizations.patch -build-remove-calling-untrusted-hooks.patch Inject-scripts-for-AMP-tracking-ads-and-video.patch Allow-playing-audio-in-background.patch Add-flag-to-control-video-playback-resume-feature.patch @@ -50,6 +49,7 @@ Multiple-fingerprinting-mitigations.patch Add-flag-to-configure-maximum-connections-per-host.patch Do-not-ignore-download-location-prompt-setting.patch Add-support-for-writing-URIs.patch +Restore-BookmarkToolbar-setCurrentFolder.patch Add-bookmark-import-export-actions.patch Bookmarks-select-all-menu-entry.patch Add-an-always-incognito-mode.patch @@ -57,7 +57,7 @@ Keep-flag-to-allow-screenshots-in-Incognito-mode.patch Add-option-to-not-persist-tabs-across-sessions.patch Add-a-proxy-configuration-page.patch Add-custom-tab-intents-privacy-option.patch -Disable-FLoC-and-privacy-sandbox.patch +Disable-privacy-sandbox.patch History-number-of-days-privacy-setting.patch Disable-fetching-of-all-field-trials.patch Disable-plugins-enumeration.patch @@ -70,7 +70,6 @@ autofill-miscellaneous.patch Enable-native-Android-autofill.patch translate-disable-fetching-of-languages-from-server.patch Offer-builtin-autocomplete-for-chrome-flags.patch -Use-4-tile-rows-never-show-logo.patch Disable-various-metrics.patch Enable-StrictOriginIsolation-and-SitePerProcess.patch Use-64-bit-WebView-processes.patch @@ -171,7 +170,6 @@ Override-Navigator-Language.patch Disable-add-to-home-screen-prompt.patch Remove-HTTP-referrals-in-cross-origin-navigation.patch Disable-StartSurface-feature.patch -Enable-PermuteTLSExtensions-by-default.patch Enable-third-party-storage-partitioning.patch Restore-adaptive-button-in-top-toolbar-customization.patch Enable-ImprovedBookmarks-by-default.patch @@ -182,6 +180,7 @@ JIT-site-settings.patch Add-webGL-site-setting.patch Add-webRTC-site-settings.patch Show-site-settings-for-cookies-javascript-and-ads.patch +Revert-remove-allowscript-content-setting-secondary-url.patch Timezone-customization.patch AudioBuffer-AnalyserNode-fp-mitigations.patch Disable-Feeback-Collector.patch @@ -193,4 +192,4 @@ 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 -Eyeo-Adblock-Remove-Privacy-Issues.patch +Eyeo-Adblock-for-Cromite.patch diff --git a/build/e_patches/0001-fixup-Revert-removal-of-execution-context-address-sp.patch b/build/e_patches/0001-fixup-Revert-removal-of-execution-context-address-sp.patch index 203b351e..53aac9ac 100644 --- a/build/e_patches/0001-fixup-Revert-removal-of-execution-context-address-sp.patch +++ b/build/e_patches/0001-fixup-Revert-removal-of-execution-context-address-sp.patch @@ -1,7 +1,7 @@ -From 02877d29aa7c0e7c4562bca67c882e022e4dfc19 Mon Sep 17 00:00:00 2001 +From 0125e6381acba129ca52836eb45f124c496753a9 Mon Sep 17 00:00:00 2001 From: althafvly Date: Wed, 4 Oct 2023 13:51:29 +0530 -Subject: [PATCH 01/52] fixup Revert removal of execution context address space +Subject: [PATCH 01/53] fixup Revert removal of execution context address space --- .../blink/renderer/core/workers/installed_scripts_manager.cc | 4 ++-- diff --git a/build/e_patches/0002-fixup-Bromite-subresource-adblocker.patch b/build/e_patches/0002-fixup-Bromite-subresource-adblocker.patch index faeb1d1b..1bf5258f 100644 --- a/build/e_patches/0002-fixup-Bromite-subresource-adblocker.patch +++ b/build/e_patches/0002-fixup-Bromite-subresource-adblocker.patch @@ -1,17 +1,17 @@ -From d4d4d0a6ed5bf02c0c02fd666e96d0d861312927 Mon Sep 17 00:00:00 2001 +From 519f25ffea3ecc87a45d997d3681f79a02720d46 Mon Sep 17 00:00:00 2001 From: althafvly Date: Thu, 11 Apr 2024 19:45:52 +0530 -Subject: [PATCH 02/52] fixup Bromite subresource adblocker +Subject: [PATCH 02/53] fixup Bromite subresource adblocker --- chrome/android/BUILD.gn | 1 - 1 file changed, 1 deletion(-) diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn -index ba708adf41a03..2c8981d134d10 100644 +index 47e2216eb964b..b4fd312653ad4 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -315,7 +315,6 @@ if (current_toolchain == default_toolchain) { +@@ -350,7 +350,6 @@ if (current_toolchain == default_toolchain) { "//chrome/android/modules/cablev2_authenticator/public:java", "//chrome/android/modules/stack_unwinder/provider:java", "//chrome/android/webapk/libs/client:client_java", diff --git a/build/e_patches/0003-fixup-Disable-fetching-of-all-field-trials.patch b/build/e_patches/0003-fixup-Disable-fetching-of-all-field-trials.patch index 6627eb04..3d1e4194 100644 --- a/build/e_patches/0003-fixup-Disable-fetching-of-all-field-trials.patch +++ b/build/e_patches/0003-fixup-Disable-fetching-of-all-field-trials.patch @@ -1,7 +1,7 @@ -From 52661ac721fa0ea665adef67486b4612ca269acb Mon Sep 17 00:00:00 2001 +From d51ade8ad89630e39194b9dca6a187cff0477954 Mon Sep 17 00:00:00 2001 From: althafvly Date: Wed, 20 Sep 2023 09:48:52 +0530 -Subject: [PATCH 03/52] fixup Disable fetching of all field trials +Subject: [PATCH 03/53] fixup Disable fetching of all field trials --- .../services/SafeModeVariationsSeedContentProvider.java | 8 +------- @@ -29,7 +29,7 @@ index 4a5bbb81a6812..c3fd6b3fbd68a 100644 @Override diff --git a/build/android/gyp/proguard.py b/build/android/gyp/proguard.py -index 6dd997a29fba1..2e6efc605b77f 100755 +index 8ee6a884afd9b..ed8139dd90f4e 100755 --- a/build/android/gyp/proguard.py +++ b/build/android/gyp/proguard.py @@ -54,6 +54,8 @@ _IGNORE_WARNINGS = ( @@ -42,7 +42,7 @@ index 6dd997a29fba1..2e6efc605b77f 100755 # TODO(agrieve): Remove once we update to U SDK. r'OnBackAnimationCallback', diff --git a/components/variations/service/variations_field_trial_creator_base.cc b/components/variations/service/variations_field_trial_creator_base.cc -index e07314860950b..d5aa4aa8ac964 100644 +index bdfbaccfc0e70..2f44107f0110d 100644 --- a/components/variations/service/variations_field_trial_creator_base.cc +++ b/components/variations/service/variations_field_trial_creator_base.cc @@ -331,6 +331,8 @@ bool VariationsFieldTrialCreatorBase::SetUpFieldTrials( diff --git a/build/e_patches/0005-add-trichrome-browser-apk-targets.patch b/build/e_patches/0004-add-trichrome-browser-apk-targets.patch similarity index 76% rename from build/e_patches/0005-add-trichrome-browser-apk-targets.patch rename to build/e_patches/0004-add-trichrome-browser-apk-targets.patch index 72aaef50..e4c0223a 100644 --- a/build/e_patches/0005-add-trichrome-browser-apk-targets.patch +++ b/build/e_patches/0004-add-trichrome-browser-apk-targets.patch @@ -1,7 +1,7 @@ -From 46f9c2f106ddf77a3273c0a9cc28304f7eac925e Mon Sep 17 00:00:00 2001 +From 552ac68b9ccaf506ae34ad2b6973f6c4c73676fc Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Thu, 27 May 2021 07:30:02 -0400 -Subject: [PATCH 05/52] add trichrome browser apk targets +Subject: [PATCH 04/53] add trichrome browser apk targets --- chrome/android/BUILD.gn | 35 +++++++++++++++++++++++ @@ -9,10 +9,10 @@ Subject: [PATCH 05/52] add trichrome browser apk targets 2 files changed, 37 insertions(+) diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn -index 2c8981d134d10..5d6002fccb657 100644 +index b4fd312653ad4..937aeffaeabc6 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -2393,6 +2393,10 @@ if (current_toolchain == default_toolchain) { +@@ -2498,6 +2498,10 @@ if (current_toolchain == default_toolchain) { is_trichrome = true is_bundle_module = true } @@ -23,7 +23,7 @@ index 2c8981d134d10..5d6002fccb657 100644 # Exists separately from chrome_public_base_module_java_for_test to allow # downstream to depend on test support packages without needing to depend on -@@ -2760,6 +2764,37 @@ if (current_toolchain == default_toolchain) { +@@ -2861,6 +2865,37 @@ if (current_toolchain == default_toolchain) { } } } @@ -62,18 +62,18 @@ index 2c8981d134d10..5d6002fccb657 100644 # As compared to chrome_public_test_apk, this target contains only unit tests # that require on device capabilities. These tests are smaller, more tightly diff --git a/chrome/android/chrome_public_apk_tmpl.gni b/chrome/android/chrome_public_apk_tmpl.gni -index c039b68b8cca9..008cacc582d98 100644 +index 5cb39e4cb6712..5bb680bf3f79a 100644 --- a/chrome/android/chrome_public_apk_tmpl.gni +++ b/chrome/android/chrome_public_apk_tmpl.gni -@@ -454,6 +454,8 @@ template("chrome_common_apk_or_module_tmpl") { - deps += [ "//chrome/android:chrome_bundle_module_pak_assets" ] +@@ -475,6 +475,8 @@ template("chrome_common_apk_or_module_tmpl") { + asset_deps += [ "//chrome/android:chrome_bundle_module_pak_assets" ] } else if (_is_monochrome) { - deps += [ "//chrome/android:monochrome_apk_pak_assets" ] + asset_deps += [ "//chrome/android:monochrome_apk_pak_assets" ] + } else if (_is_trichrome) { -+ deps += [ "//chrome/android:trichrome_chrome_apk_pak_assets" ] ++ asset_deps += [ "//chrome/android:trichrome_chrome_apk_pak_assets" ] } else { assert(!_is_trichrome) - deps += [ "//chrome/android:chrome_apk_pak_assets" ] + asset_deps += [ "//chrome/android:chrome_apk_pak_assets" ] -- 2.34.1 diff --git a/build/e_patches/0006-Browser-disable-price-shopping-commerce-integration.patch b/build/e_patches/0005-Browser-disable-price-shopping-commerce-integration.patch similarity index 85% rename from build/e_patches/0006-Browser-disable-price-shopping-commerce-integration.patch rename to build/e_patches/0005-Browser-disable-price-shopping-commerce-integration.patch index ca5395e8..24229753 100644 --- a/build/e_patches/0006-Browser-disable-price-shopping-commerce-integration.patch +++ b/build/e_patches/0005-Browser-disable-price-shopping-commerce-integration.patch @@ -1,7 +1,7 @@ -From 8dd5b2e50c412c43628f138830d02d76cfc6689b Mon Sep 17 00:00:00 2001 +From 0d1302a7fff9ad140a333ed48a27d8152aaa469d Mon Sep 17 00:00:00 2001 From: althafvly Date: Wed, 4 Oct 2023 19:36:24 +0530 -Subject: [PATCH 06/52] Browser: disable price shopping commerce integration +Subject: [PATCH 05/53] Browser: disable price shopping commerce integration --- .../browser/app/appmenu/AppMenuPropertiesDelegateImpl.java | 6 ++++-- @@ -9,10 +9,10 @@ Subject: [PATCH 06/52] Browser: disable price shopping commerce integration 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java -index 1a5184b146a35..326be6126a152 100644 +index 4365c0e6e3128..e9ecbb52ad73e 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java -@@ -1201,7 +1201,7 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate +@@ -1252,7 +1252,7 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate } Profile profile = currentTab.getProfile(); @@ -21,7 +21,7 @@ index 1a5184b146a35..326be6126a152 100644 ShoppingService.ProductInfo info = null; if (service != null) { info = service.getAvailableProductInfoForUrl(currentTab.getUrl()); -@@ -1234,7 +1234,9 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate +@@ -1285,7 +1285,9 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate } else { startPriceTrackingMenuItem.setVisible(true); stopPriceTrackingMenuItem.setVisible(false); @@ -33,7 +33,7 @@ index 1a5184b146a35..326be6126a152 100644 /** diff --git a/components/commerce/core/commerce_feature_list.cc b/components/commerce/core/commerce_feature_list.cc -index 19a9609ce75cc..157b55a523098 100644 +index 0ae44673aec4b..01757249710a7 100644 --- a/components/commerce/core/commerce_feature_list.cc +++ b/components/commerce/core/commerce_feature_list.cc @@ -123,7 +123,7 @@ BASE_FEATURE(kCommerceAllowLocalImages, @@ -45,7 +45,7 @@ index 19a9609ce75cc..157b55a523098 100644 BASE_FEATURE(kCommerceAllowOnDemandBookmarkBatchUpdates, "CommerceAllowOnDemandBookmarkBatchUpdates", -@@ -270,7 +270,7 @@ BASE_FEATURE(kShoppingPageTypesRegionLaunched, +@@ -288,7 +288,7 @@ BASE_FEATURE(kShoppingPageTypesRegionLaunched, "ShoppingPageTypesRegionLaunched", base::FEATURE_ENABLED_BY_DEFAULT); diff --git a/build/e_patches/0004-Remove-bromite-auto-updater-option.patch b/build/e_patches/0006-Remove-bromite-auto-updater-option.patch similarity index 76% rename from build/e_patches/0004-Remove-bromite-auto-updater-option.patch rename to build/e_patches/0006-Remove-bromite-auto-updater-option.patch index e9d1838a..097604a1 100644 --- a/build/e_patches/0004-Remove-bromite-auto-updater-option.patch +++ b/build/e_patches/0006-Remove-bromite-auto-updater-option.patch @@ -1,15 +1,15 @@ -From 8604076eec8936dd672958f91f59d5e9680292d3 Mon Sep 17 00:00:00 2001 +From 0affd200c187cd075cb154c3c89493d59cb7be4c Mon Sep 17 00:00:00 2001 From: althafvly Date: Wed, 20 Sep 2023 09:59:55 +0530 -Subject: [PATCH 04/52] Remove bromite auto updater option +Subject: [PATCH 06/53] Remove bromite auto updater option --- .../firstrun/ToSAndUMAFirstRunFragment.java | 25 ------------------- - .../browser/omaha/UpdateStatusProvider.java | 4 +-- - 2 files changed, 1 insertion(+), 28 deletions(-) + .../browser/omaha/UpdateStatusProvider.java | 6 +---- + 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAndUMAFirstRunFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAndUMAFirstRunFragment.java -index 7af16cda502bf..983bf7c4c65d6 100644 +index 0d1b17e4da45a..fe2a152b7a873 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAndUMAFirstRunFragment.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/ToSAndUMAFirstRunFragment.java @@ -63,8 +63,6 @@ public class ToSAndUMAFirstRunFragment @@ -53,7 +53,7 @@ index 7af16cda502bf..983bf7c4c65d6 100644 assert !isWaitingForNativeAndPolicyInit(); setSpinnerVisible(false); -- mAutoUpdaterCheckBox.setChecked(true); +- mAutoUpdaterCheckBox.setChecked(false); } private void updateView() { @@ -71,7 +71,7 @@ index 7af16cda502bf..983bf7c4c65d6 100644 } - private void updateReportCheckbox() { -- mAutoUpdaterCheckBox.setChecked(true); +- mAutoUpdaterCheckBox.setChecked(false); - } - private void onPolicyServiceInitialized(boolean onDevicePolicyFound) { @@ -82,8 +82,8 @@ index 7af16cda502bf..983bf7c4c65d6 100644 mTosAcceptedTime = SystemClock.elapsedRealtime(); - // save updater configuration only on button click -- SharedPreferences.Editor sharedPreferenceEditor = OmahaBase.getSharedPreferences().edit(); -- sharedPreferenceEditor.putBoolean(OmahaBase.PREF_ALLOW_INLINE_UPDATE, mAutoUpdaterChecked); +- SharedPreferences.Editor sharedPreferenceEditor = OmahaPrefUtils.getSharedPreferences().edit(); +- sharedPreferenceEditor.putBoolean(OmahaPrefUtils.PREF_ALLOW_INLINE_UPDATE, mAutoUpdaterChecked); - sharedPreferenceEditor.apply(); - tryMarkTermsAccepted(true); @@ -97,11 +97,20 @@ index 7af16cda502bf..983bf7c4c65d6 100644 } protected View getToSAndPrivacyText() { -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 -index adda6ccad4420..afbe972a84643 100644 ---- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java -+++ b/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java -@@ -289,9 +289,7 @@ public class UpdateStatusProvider { +diff --git a/chrome/browser/omaha/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java b/chrome/browser/omaha/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java +index 8194988c68715..afbe972a84643 100644 +--- a/chrome/browser/omaha/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java ++++ b/chrome/browser/omaha/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java +@@ -16,8 +16,6 @@ import androidx.annotation.IntDef; + import androidx.annotation.NonNull; + import androidx.annotation.Nullable; + +-import com.google.android.gms.common.GooglePlayServicesUtil; +- + import org.chromium.base.BuildInfo; + import org.chromium.base.Callback; + import org.chromium.base.ObserverList; +@@ -291,9 +289,7 @@ public class UpdateStatusProvider { boolean allowedToUpdate = checkForSufficientStorage() // Disable the version update check for automotive. See b/297925838. diff --git a/build/e_patches/0007-Browser-Change-app-and-package-name-to-browser.patch b/build/e_patches/0007-Browser-Change-app-and-package-name-to-browser.patch index 55b53620..036f347f 100644 --- a/build/e_patches/0007-Browser-Change-app-and-package-name-to-browser.patch +++ b/build/e_patches/0007-Browser-Change-app-and-package-name-to-browser.patch @@ -1,7 +1,7 @@ -From ae04bc48993e0cab4703cbb1000092cc3cbdf7e0 Mon Sep 17 00:00:00 2001 +From fa81d2dc49db602698d7330953514a0446d04c72 Mon Sep 17 00:00:00 2001 From: Aayush Gupta Date: Fri, 26 Nov 2021 05:39:25 +0000 -Subject: [PATCH 07/52] Browser: Change app and package name to browser +Subject: [PATCH 07/53] Browser: Change app and package name to browser Signed-off-by: Aayush Gupta Signed-off-by: althafvly diff --git a/build/e_patches/0008-Browser-Point-to-our-default-popular-sites.patch b/build/e_patches/0008-Browser-Point-to-our-default-popular-sites.patch index 41cefc7d..07dc5bab 100644 --- a/build/e_patches/0008-Browser-Point-to-our-default-popular-sites.patch +++ b/build/e_patches/0008-Browser-Point-to-our-default-popular-sites.patch @@ -1,7 +1,7 @@ -From 1a8c6c8a6a8a3a721a09969861ff60a0f263a1a3 Mon Sep 17 00:00:00 2001 +From d6e0a77d71438d74dcc02eca129a0c2c96a11cde Mon Sep 17 00:00:00 2001 From: Aayush Gupta Date: Fri, 26 Nov 2021 07:29:59 +0000 -Subject: [PATCH 08/52] Browser: Point to our default popular sites +Subject: [PATCH 08/53] Browser: Point to our default popular sites Signed-off-by: Aayush Gupta --- diff --git a/build/e_patches/0009-Browser-Enable-do-not-track-by-default.patch b/build/e_patches/0009-Browser-Enable-do-not-track-by-default.patch index 4015ecf8..33b9227b 100644 --- a/build/e_patches/0009-Browser-Enable-do-not-track-by-default.patch +++ b/build/e_patches/0009-Browser-Enable-do-not-track-by-default.patch @@ -1,25 +1,25 @@ -From caeaa537c2e509e66780ec189f01530139b1523c Mon Sep 17 00:00:00 2001 +From 8cacd3a14cbe9852991d0c1766cd20a491a2f69d Mon Sep 17 00:00:00 2001 From: althafvly Date: Fri, 26 Nov 2021 07:34:57 +0000 -Subject: [PATCH 09/52] Browser: Enable do not track by default +Subject: [PATCH 09/53] Browser: Enable do not track by default --- components/privacy_sandbox/tracking_protection_prefs.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/privacy_sandbox/tracking_protection_prefs.cc b/components/privacy_sandbox/tracking_protection_prefs.cc -index 53c3561920258..b1a12fde70376 100644 +index 351c71ffe834e..59e7f17536a70 100644 --- a/components/privacy_sandbox/tracking_protection_prefs.cc +++ b/components/privacy_sandbox/tracking_protection_prefs.cc -@@ -75,7 +75,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) { - prefs::kIpProtectionEnabled, false, +@@ -70,7 +70,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) { + prefs::kFingerprintingProtectionEnabled, false, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); registry->RegisterBooleanPref( - prefs::kEnableDoNotTrack, false, + prefs::kEnableDoNotTrack, true, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); + } - // Sentiment Survey -- 2.34.1 diff --git a/build/e_patches/0010-Browser-Add-provider-to-share-default-search-engine.patch b/build/e_patches/0010-Browser-Add-provider-to-share-default-search-engine.patch index 078d8976..51d10db9 100644 --- a/build/e_patches/0010-Browser-Add-provider-to-share-default-search-engine.patch +++ b/build/e_patches/0010-Browser-Add-provider-to-share-default-search-engine.patch @@ -1,7 +1,7 @@ -From f4038bbcca7bd5a0226e4792637905a6b6c88a1f Mon Sep 17 00:00:00 2001 +From 9ac28ccf05cc55c860cd39699e91973a6bc327cd Mon Sep 17 00:00:00 2001 From: Aayush Gupta Date: Fri, 26 Nov 2021 08:03:13 +0000 -Subject: [PATCH 10/52] Browser: Add provider to share default search engine +Subject: [PATCH 10/53] Browser: Add provider to share default search engine Signed-off-by: Aayush Gupta --- @@ -12,10 +12,10 @@ Signed-off-by: Aayush Gupta create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/provider/SearchEngineProvider.java diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml -index 23982a560c77b..72ceff58b96d4 100644 +index 8c337f83cb187..602c7c4ec3c4d 100644 --- a/chrome/android/java/AndroidManifest.xml +++ b/chrome/android/java/AndroidManifest.xml -@@ -1321,6 +1321,12 @@ by a child template that "extends" this file. +@@ -1307,6 +1307,12 @@ by a child template that "extends" this file. android:readPermission="android.permission.GLOBAL_SEARCH" /> @@ -114,10 +114,10 @@ index 0000000000000..299562413fe05 + } +} diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni -index ba61e355c51b2..3b3f8134ef67b 100644 +index 7367abe5f7407..1ee2f16057ff5 100644 --- a/chrome/android/java_sources.gni +++ b/chrome/android/java_sources.gni -@@ -63,3 +63,4 @@ if (enable_cardboard) { +@@ -65,3 +65,4 @@ if (enable_cardboard) { } chrome_java_sources += userscripts_java_sources diff --git a/build/e_patches/0011-Browser-Enable-custom-tabs-by-default.patch b/build/e_patches/0011-Browser-Enable-custom-tabs-by-default.patch index 5069f463..db49a621 100644 --- a/build/e_patches/0011-Browser-Enable-custom-tabs-by-default.patch +++ b/build/e_patches/0011-Browser-Enable-custom-tabs-by-default.patch @@ -1,7 +1,7 @@ -From 2aeafbc69956b86b4e9b36bbb6aa10ab0e37b5d7 Mon Sep 17 00:00:00 2001 +From d430844bcbe0f214902c6a7dcb6105493ae62a9d Mon Sep 17 00:00:00 2001 From: Aayush Gupta Date: Mon, 29 Nov 2021 03:37:37 +0000 -Subject: [PATCH 11/52] Browser: Enable custom tabs by default +Subject: [PATCH 11/53] Browser: Enable custom tabs by default Signed-off-by: Aayush Gupta Signed-off-by: althafvly @@ -11,10 +11,10 @@ Signed-off-by: althafvly 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml -index ce2460b10a4fd..91c379f55e553 100644 +index 154151989288f..996dcf74b210f 100644 --- a/chrome/android/java/res/xml/privacy_preferences.xml +++ b/chrome/android/java/res/xml/privacy_preferences.xml -@@ -48,7 +48,7 @@ found in the LICENSE file. +@@ -64,7 +64,7 @@ found in the LICENSE file. android:key="allow_custom_tab_intents" android:title="@string/allow_custom_tab_intents_title" android:summary="@string/allow_custom_tab_intents_summary" @@ -24,10 +24,10 @@ index ce2460b10a4fd..91c379f55e553 100644 android:key="open_external_links_incognito" android:title="@string/open_external_links_incognito_title" diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java -index d49e5682ceeca..8967b5c96cd1d 100644 +index dacf95ddfaca0..f5cc831874f2a 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java -@@ -260,7 +260,7 @@ public class LaunchIntentDispatcher { +@@ -255,7 +255,7 @@ public class LaunchIntentDispatcher { public static boolean isCustomTabIntent(Intent intent) { if (intent == null) return false; if (!ContextUtils.getAppSharedPreferences() diff --git a/build/e_patches/0012-Browser-Enable-search-suggestion-by-default.patch b/build/e_patches/0012-Browser-Enable-search-suggestion-by-default.patch index 1ee8b08b..6a106f45 100644 --- a/build/e_patches/0012-Browser-Enable-search-suggestion-by-default.patch +++ b/build/e_patches/0012-Browser-Enable-search-suggestion-by-default.patch @@ -1,7 +1,7 @@ -From 93b7afba249ea5f0cfafd5a6d723c61d84007804 Mon Sep 17 00:00:00 2001 +From 167279a4b997215669d0d9f107b789b27f383008 Mon Sep 17 00:00:00 2001 From: Aayush Gupta Date: Mon, 29 Nov 2021 03:39:21 +0000 -Subject: [PATCH 12/52] Browser: Enable search suggestion by default +Subject: [PATCH 12/53] Browser: Enable search suggestion by default Signed-off-by: Aayush Gupta --- @@ -9,10 +9,10 @@ Signed-off-by: Aayush Gupta 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc -index c3f3b629d458e..2ec2a791c4943 100644 +index 757d919d6496d..cd4fd8104866c 100644 --- a/chrome/browser/profiles/profile.cc +++ b/chrome/browser/profiles/profile.cc -@@ -308,7 +308,7 @@ const char Profile::kProfileKey[] = "__PROFILE__"; +@@ -318,7 +318,7 @@ const char Profile::kProfileKey[] = "__PROFILE__"; void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref( prefs::kSearchSuggestEnabled, diff --git a/build/e_patches/0013-Browser-Modify-default-search-engines.patch b/build/e_patches/0013-Browser-Modify-default-search-engines.patch index bb5bf1c1..2ede5cb7 100644 --- a/build/e_patches/0013-Browser-Modify-default-search-engines.patch +++ b/build/e_patches/0013-Browser-Modify-default-search-engines.patch @@ -1,25 +1,26 @@ -From 1ed5cdf1eafe07b9c1352a8afdabfaac0265b09d Mon Sep 17 00:00:00 2001 +From fa052c6b4ee42d461d7b41332ae1e8c58557081a Mon Sep 17 00:00:00 2001 From: Aayush Gupta Date: Thu, 18 Mar 2021 13:42:44 +0100 -Subject: [PATCH 13/52] Browser: Modify default search engines +Subject: [PATCH 13/53] Browser: Modify default search engines Signed-off-by: althafvly --- - .../locale/locale_template_url_loader.cc | 41 +- - .../locale/locale_template_url_loader.h | 1 - - .../browser/locale/LocaleManagerDelegate.java | 1 - - .../locale/LocaleTemplateUrlLoader.java | 8 - - .../search_engines/prepopulated_engines.json | 10 + - .../search_engines/search_engine_type.h | 3 +- - .../search_engines/search_engine_utils.cc | 12 +- - .../template_url_prepopulate_data.cc | 1143 ++++++----------- - 8 files changed, 381 insertions(+), 838 deletions(-) + .../locale/locale_template_url_loader.cc | 41 +------------------ + .../locale/locale_template_url_loader.h | 1 - + .../browser/locale/LocaleManagerDelegate.java | 1 - + .../locale/LocaleTemplateUrlLoader.java | 8 ---- + .../search_engines/prepopulated_engines.json | 10 +++++ + .../search_engine_countries-inc.cc | 8 ++-- + .../search_engines/search_engine_type.h | 3 +- + .../search_engines/search_engine_utils.cc | 12 +----- + .../template_url_prepopulate_data.cc | 7 +++- + 9 files changed, 25 insertions(+), 66 deletions(-) diff --git a/chrome/browser/android/locale/locale_template_url_loader.cc b/chrome/browser/android/locale/locale_template_url_loader.cc -index 98aea134a714d..8be74c3be9560 100644 +index 4bc98e2170294..0afad62c32e82 100644 --- a/chrome/browser/android/locale/locale_template_url_loader.cc +++ b/chrome/browser/android/locale/locale_template_url_loader.cc -@@ -82,19 +82,6 @@ jboolean LocaleTemplateUrlLoader::LoadTemplateUrls(JNIEnv* env) { +@@ -84,19 +84,6 @@ jboolean LocaleTemplateUrlLoader::LoadTemplateUrls(JNIEnv* env) { const TemplateURL* matching_url = template_url_service_->GetTemplateURLForKeyword(data_url->keyword()); bool exists = matching_url != nullptr; @@ -39,7 +40,7 @@ index 98aea134a714d..8be74c3be9560 100644 if (exists) { continue; -@@ -138,8 +125,7 @@ void LocaleTemplateUrlLoader::OverrideDefaultSearchProvider(JNIEnv* env) { +@@ -140,8 +127,7 @@ void LocaleTemplateUrlLoader::OverrideDefaultSearchProvider(JNIEnv* env) { // If the user has changed their default search provider, no-op. const TemplateURL* current_dsp = template_url_service_->GetDefaultSearchProvider(); @@ -49,7 +50,7 @@ index 98aea134a714d..8be74c3be9560 100644 return; } -@@ -151,29 +137,6 @@ void LocaleTemplateUrlLoader::OverrideDefaultSearchProvider(JNIEnv* env) { +@@ -153,29 +139,6 @@ void LocaleTemplateUrlLoader::OverrideDefaultSearchProvider(JNIEnv* env) { } } @@ -79,7 +80,7 @@ index 98aea134a714d..8be74c3be9560 100644 std::vector> LocaleTemplateUrlLoader::GetLocalPrepopulatedEngines() { if (!template_url_service_) { -@@ -186,7 +149,7 @@ LocaleTemplateUrlLoader::GetLocalPrepopulatedEngines() { +@@ -188,7 +151,7 @@ LocaleTemplateUrlLoader::GetLocalPrepopulatedEngines() { } int LocaleTemplateUrlLoader::GetDesignatedSearchEngineForChina() { @@ -101,10 +102,10 @@ index c63dc8bd3eab2..b9c9db2d6d08d 100644 LocaleTemplateUrlLoader(const LocaleTemplateUrlLoader&) = delete; LocaleTemplateUrlLoader& operator=(const LocaleTemplateUrlLoader&) = delete; diff --git a/chrome/browser/locale/java/src/org/chromium/chrome/browser/locale/LocaleManagerDelegate.java b/chrome/browser/locale/java/src/org/chromium/chrome/browser/locale/LocaleManagerDelegate.java -index 9574eeab8e039..db00b10b08dc4 100644 +index 17d90fc7a3119..032786088061f 100644 --- a/chrome/browser/locale/java/src/org/chromium/chrome/browser/locale/LocaleManagerDelegate.java +++ b/chrome/browser/locale/java/src/org/chromium/chrome/browser/locale/LocaleManagerDelegate.java -@@ -143,7 +143,6 @@ public class LocaleManagerDelegate { +@@ -144,7 +144,6 @@ public class LocaleManagerDelegate { */ private void revertDefaultSearchEngineOverride() { if (!isSearchEngineAutoSwitchEnabled() || isSpecialLocaleEnabled()) return; @@ -113,10 +114,10 @@ index 9574eeab8e039..db00b10b08dc4 100644 } diff --git a/chrome/browser/locale/java/src/org/chromium/chrome/browser/locale/LocaleTemplateUrlLoader.java b/chrome/browser/locale/java/src/org/chromium/chrome/browser/locale/LocaleTemplateUrlLoader.java -index e68159823e45d..eb99d9bd7fd62 100644 +index 62cc958ac7857..ed1b48622109c 100644 --- a/chrome/browser/locale/java/src/org/chromium/chrome/browser/locale/LocaleTemplateUrlLoader.java +++ b/chrome/browser/locale/java/src/org/chromium/chrome/browser/locale/LocaleTemplateUrlLoader.java -@@ -64,12 +64,6 @@ public class LocaleTemplateUrlLoader { +@@ -71,12 +71,6 @@ public class LocaleTemplateUrlLoader { .overrideDefaultSearchProvider(mNativeLocaleTemplateUrlLoader); } @@ -128,8 +129,8 @@ index e68159823e45d..eb99d9bd7fd62 100644 - @NativeMethods interface Natives { - long init(String localeId); -@@ -81,7 +75,5 @@ public class LocaleTemplateUrlLoader { + long init(String localeId, @JniType("Profile*") Profile profile); +@@ -88,7 +82,5 @@ public class LocaleTemplateUrlLoader { void removeTemplateUrls(long nativeLocaleTemplateUrlLoader); void overrideDefaultSearchProvider(long nativeLocaleTemplateUrlLoader); @@ -138,7 +139,7 @@ index e68159823e45d..eb99d9bd7fd62 100644 } } diff --git a/components/search_engines/prepopulated_engines.json b/components/search_engines/prepopulated_engines.json -index 0efb2f9343b26..034f1acaaec19 100644 +index 64db7aba3ea27..95c5397c05693 100644 --- a/components/search_engines/prepopulated_engines.json +++ b/components/search_engines/prepopulated_engines.json @@ -123,6 +123,16 @@ @@ -158,15 +159,34 @@ index 0efb2f9343b26..034f1acaaec19 100644 "ecosia": { "name": "Ecosia", "keyword": "ecosia.org", +diff --git a/components/search_engines/search_engine_countries-inc.cc b/components/search_engines/search_engine_countries-inc.cc +index ec187025b9e0e..53e5947790fca 100644 +--- a/components/search_engines/search_engine_countries-inc.cc ++++ b/components/search_engines/search_engine_countries-inc.cc +@@ -33,10 +33,10 @@ struct EngineAndTier { + + // Default (for countries with no better engine set) + constexpr EngineAndTier engines_default[] = { +- {SearchEngineTier::kTopEngines, &googleen}, +- {SearchEngineTier::kTopEngines, &google}, +- {SearchEngineTier::kTopEngines, &bing}, +- {SearchEngineTier::kTopEngines, &yahoo}, ++ {SearchEngineTier::kTopEngines, &espot}, ++ {SearchEngineTier::kTopEngines, &qwant}, ++ {SearchEngineTier::kTopEngines, &duckduckgo}, ++ {SearchEngineTier::kTopEngines, &duckduckgo_light}, + }; + + // Note, the below entries are sorted by country code, not the name in comment. diff --git a/components/search_engines/search_engine_type.h b/components/search_engines/search_engine_type.h -index 755024ec7a0d1..df4c4b2ebc875 100644 +index 1c067e454fc49..6764f40d4ed1b 100644 --- a/components/search_engines/search_engine_type.h +++ b/components/search_engines/search_engine_type.h -@@ -92,11 +92,12 @@ enum SearchEngineType { - SEARCH_ENGINE_STARTER_PACK_ASK_GOOGLE = 73, - SEARCH_ENGINE_GOOGLE_EN = 74, - SEARCH_ENGINE_DUCKDUCKGOLIGHT = 75, -+ SEARCH_ENGINE_ESPOT = 76, +@@ -93,11 +93,12 @@ enum SearchEngineType { + SEARCH_ENGINE_LILO = 74, + SEARCH_ENGINE_GOOGLE_EN = 75, + SEARCH_ENGINE_DUCKDUCKGOLIGHT = 76, ++ SEARCH_ENGINE_ESPOT = 77, SEARCH_ENGINE_MAX // Bounding value needed for UMA histogram macro. }; @@ -200,1688 +220,30 @@ index 76c4864971fe3..480f404b581d6 100644 // First check the main search URL. if (SameDomain( diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc -index 63e9cb093a05b..ca13a504d961b 100644 +index 3a7798c2d1420..d22bca9b979aa 100644 --- a/components/search_engines/template_url_prepopulate_data.cc +++ b/components/search_engines/template_url_prepopulate_data.cc -@@ -63,10 +63,10 @@ struct EngineAndTier { - - // Default (for countries with no better engine set) - constexpr EngineAndTier engines_default[] = { -- {SearchEngineTier::kTopEngines, &googleen}, -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Note, the below entries are sorted by country code, not the name in comment. -@@ -74,1284 +74,875 @@ constexpr EngineAndTier engines_default[] = { - // clang-format off - // United Arab Emirates - constexpr EngineAndTier engines_AE[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &yandex_ru}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Albania - constexpr EngineAndTier engines_AL[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &yandex_tr}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Argentina - constexpr EngineAndTier engines_AR[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_ar}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Austria - constexpr EngineAndTier engines_AT[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yahoo_at}, -- {SearchEngineTier::kTopEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &yandex_com}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &brave}, -- {SearchEngineTier::kRemainingEngines, &quendu}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &metager_de}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -- {SearchEngineTier::kRemainingEngines, &info_com}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &you}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Australia - constexpr EngineAndTier engines_AU[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_au}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &ecosia}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Bosnia and Herzegovina - constexpr EngineAndTier engines_BA[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Belgium - constexpr EngineAndTier engines_BE[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &ecosia}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &yandex_com}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &you}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Bulgaria - constexpr EngineAndTier engines_BG[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &you}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Bahrain - constexpr EngineAndTier engines_BH[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Burundi - constexpr EngineAndTier engines_BI[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &yandex_ru}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Brunei - constexpr EngineAndTier engines_BN[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Bolivia - constexpr EngineAndTier engines_BO[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Brazil - constexpr EngineAndTier engines_BR[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_br}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Belarus - constexpr EngineAndTier engines_BY[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &yandex_by}, -- {SearchEngineTier::kTopEngines, &bing}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &mail_ru}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Belize - constexpr EngineAndTier engines_BZ[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Canada - constexpr EngineAndTier engines_CA[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_ca}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Switzerland - constexpr EngineAndTier engines_CH[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yahoo_ch}, -- {SearchEngineTier::kTopEngines, &ecosia}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Chile - constexpr EngineAndTier engines_CL[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_cl}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // China - constexpr EngineAndTier engines_CN[] = { -- {SearchEngineTier::kTopEngines, &baidu}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &sogou}, -- {SearchEngineTier::kTopEngines, &so_360}, -- {SearchEngineTier::kTopEngines, &google}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Colombia - constexpr EngineAndTier engines_CO[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_co}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &ecosia}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Costa Rica - constexpr EngineAndTier engines_CR[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Republic of Cyprus - constexpr EngineAndTier engines_CY[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &you}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Czech Republic - constexpr EngineAndTier engines_CZ[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &seznam_cz}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &yandex_ru}, -- {SearchEngineTier::kRemainingEngines, &duckduckgo}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &you}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Germany - constexpr EngineAndTier engines_DE[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_de}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &brave}, -- {SearchEngineTier::kRemainingEngines, &nona}, -- {SearchEngineTier::kRemainingEngines, &quendu}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &metager_de}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -- {SearchEngineTier::kRemainingEngines, &info_com}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &lilo}, -- {SearchEngineTier::kRemainingEngines, &you}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Denmark - constexpr EngineAndTier engines_DK[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_dk}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -- {SearchEngineTier::kRemainingEngines, &info_com}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &you}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Dominican Republic - constexpr EngineAndTier engines_DO[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Algeria - constexpr EngineAndTier engines_DZ[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_fr}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Ecuador - constexpr EngineAndTier engines_EC[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_es}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &ecosia}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Estonia - constexpr EngineAndTier engines_EE[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &you}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Egypt - constexpr EngineAndTier engines_EG[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Spain - constexpr EngineAndTier engines_ES[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_es}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &yandex_com}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &brave}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -- {SearchEngineTier::kRemainingEngines, &info_com}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &lilo}, -- {SearchEngineTier::kRemainingEngines, &you}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Finland - constexpr EngineAndTier engines_FI[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yahoo_fi}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -- {SearchEngineTier::kRemainingEngines, &info_com}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &you}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Faroe Islands - constexpr EngineAndTier engines_FO[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_uk}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &ecosia}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // France - constexpr EngineAndTier engines_FR[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_fr}, -- {SearchEngineTier::kTopEngines, &ecosia}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &yandex_com}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &brave}, -- {SearchEngineTier::kRemainingEngines, &lilo}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -- {SearchEngineTier::kRemainingEngines, &info_com}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &you}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // United Kingdom - constexpr EngineAndTier engines_GB[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_uk}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &ecosia}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Greece - constexpr EngineAndTier engines_GR[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &you}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Guatemala - constexpr EngineAndTier engines_GT[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Hong Kong - constexpr EngineAndTier engines_HK[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_hk}, -- {SearchEngineTier::kTopEngines, &baidu}, -- {SearchEngineTier::kTopEngines, &so_360}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Honduras - constexpr EngineAndTier engines_HN[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Croatia - constexpr EngineAndTier engines_HR[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &you}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Hungary - constexpr EngineAndTier engines_HU[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &you}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Indonesia - constexpr EngineAndTier engines_ID[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_id}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Ireland - constexpr EngineAndTier engines_IE[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_uk}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &yandex_com}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &brave}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -- {SearchEngineTier::kRemainingEngines, &info_com}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &you}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Israel - constexpr EngineAndTier engines_IL[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yandex_ru}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // India - constexpr EngineAndTier engines_IN[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_in}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Iraq - constexpr EngineAndTier engines_IQ[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yandex_tr}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Iran - constexpr EngineAndTier engines_IR[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Iceland - constexpr EngineAndTier engines_IS[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &you}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Italy - constexpr EngineAndTier engines_IT[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_it}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -- {SearchEngineTier::kRemainingEngines, &info_com}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &lilo}, -- {SearchEngineTier::kRemainingEngines, &you}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Jamaica - constexpr EngineAndTier engines_JM[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Jordan - constexpr EngineAndTier engines_JO[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Japan - constexpr EngineAndTier engines_JP[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &yahoo_jp}, -- {SearchEngineTier::kTopEngines, &bing}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &coccoc}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Kenya - constexpr EngineAndTier engines_KE[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // South Korea - constexpr EngineAndTier engines_KR[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &naver}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &daum}, -- {SearchEngineTier::kTopEngines, &coccoc}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Kuwait - constexpr EngineAndTier engines_KW[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yandex_tr}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Kazakhstan - constexpr EngineAndTier engines_KZ[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &yandex_kz}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &mail_ru}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Lebanon - constexpr EngineAndTier engines_LB[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Liechtenstein - constexpr EngineAndTier engines_LI[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &yandex_com}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &you}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Lithuania - constexpr EngineAndTier engines_LT[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &you}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Luxembourg - constexpr EngineAndTier engines_LU[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &lilo}, -- {SearchEngineTier::kRemainingEngines, &you}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Latvia - constexpr EngineAndTier engines_LV[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &you}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - - // Libya - constexpr EngineAndTier engines_LY[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yandex_tr}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Morocco - constexpr EngineAndTier engines_MA[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_fr}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Monaco - constexpr EngineAndTier engines_MC[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_fr}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Moldova - constexpr EngineAndTier engines_MD[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &yandex_ru}, -- {SearchEngineTier::kTopEngines, &bing}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &mail_ru}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Montenegro - constexpr EngineAndTier engines_ME[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yandex_ru}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Macedonia - constexpr EngineAndTier engines_MK[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Malta - constexpr EngineAndTier engines_MT[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &brave}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &you}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Mexico - constexpr EngineAndTier engines_MX[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_mx}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &ecosia}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Malaysia - constexpr EngineAndTier engines_MY[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_my}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Nicaragua - constexpr EngineAndTier engines_NI[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Netherlands - constexpr EngineAndTier engines_NL[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yahoo_nl}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -- {SearchEngineTier::kRemainingEngines, &info_com}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &you}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Norway - constexpr EngineAndTier engines_NO[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -- {SearchEngineTier::kRemainingEngines, &info_com}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &you}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // New Zealand - constexpr EngineAndTier engines_NZ[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_nz}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &ecosia}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Oman - constexpr EngineAndTier engines_OM[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Panama - constexpr EngineAndTier engines_PA[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_es}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Peru - constexpr EngineAndTier engines_PE[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_pe}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Philippines - constexpr EngineAndTier engines_PH[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_ph}, -- {SearchEngineTier::kTopEngines, &ecosia}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Pakistan - constexpr EngineAndTier engines_PK[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Poland - constexpr EngineAndTier engines_PL[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &you}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Puerto Rico - constexpr EngineAndTier engines_PR[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Portugal - constexpr EngineAndTier engines_PT[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &yandex_com}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &lilo}, -- {SearchEngineTier::kRemainingEngines, &you}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Paraguay - constexpr EngineAndTier engines_PY[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_es}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Qatar - constexpr EngineAndTier engines_QA[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_tr}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Romania - constexpr EngineAndTier engines_RO[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &you}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Serbia - constexpr EngineAndTier engines_RS[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &yandex_ru}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Russia - constexpr EngineAndTier engines_RU[] = { -- {SearchEngineTier::kTopEngines, &yandex_ru}, -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &mail_ru}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Rwanda - constexpr EngineAndTier engines_RW[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Saudi Arabia - constexpr EngineAndTier engines_SA[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Sweden - constexpr EngineAndTier engines_SE[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_se}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &info_com}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &you}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Singapore - constexpr EngineAndTier engines_SG[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_sg}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Slovenia - constexpr EngineAndTier engines_SI[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &you}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Slovakia - constexpr EngineAndTier engines_SK[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_ru}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kRemainingEngines, &qwant}, -- {SearchEngineTier::kRemainingEngines, &ecosia}, -- {SearchEngineTier::kRemainingEngines, &mojeek}, -- {SearchEngineTier::kRemainingEngines, &yep}, -- {SearchEngineTier::kRemainingEngines, &seznam_sk}, -- {SearchEngineTier::kRemainingEngines, &karma}, -- {SearchEngineTier::kRemainingEngines, &privacywall}, -- {SearchEngineTier::kRemainingEngines, &panda}, -- {SearchEngineTier::kRemainingEngines, &you}, -- {SearchEngineTier::kRemainingEngines, &oceanhero}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // El Salvador - constexpr EngineAndTier engines_SV[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_es}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Syria - constexpr EngineAndTier engines_SY[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yandex_ru}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Thailand - constexpr EngineAndTier engines_TH[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_th}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Tunisia - constexpr EngineAndTier engines_TN[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_fr}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Turkey - constexpr EngineAndTier engines_TR[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &yandex_tr}, -- {SearchEngineTier::kTopEngines, &yahoo_tr}, -- {SearchEngineTier::kTopEngines, &bing}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Trinidad and Tobago - constexpr EngineAndTier engines_TT[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Taiwan - constexpr EngineAndTier engines_TW[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &yahoo_tw}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &coccoc}, -- {SearchEngineTier::kTopEngines, &baidu}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, -+ {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Tanzania - constexpr EngineAndTier engines_TZ[] = { -- {SearchEngineTier::kTopEngines, &google}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Ukraine - constexpr EngineAndTier engines_UA[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &yandex_ru}, -- {SearchEngineTier::kTopEngines, &bing}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // United States - constexpr EngineAndTier engines_US[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Uruguay - constexpr EngineAndTier engines_UY[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_es}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Venezuela - constexpr EngineAndTier engines_VE[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo_es}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Vietnam - constexpr EngineAndTier engines_VN[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &coccoc}, -- {SearchEngineTier::kTopEngines, &yahoo}, -- {SearchEngineTier::kTopEngines, &bing}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Yemen - constexpr EngineAndTier engines_YE[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // South Africa - constexpr EngineAndTier engines_ZA[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &yandex_com}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // Zimbabwe - constexpr EngineAndTier engines_ZW[] = { -- {SearchEngineTier::kTopEngines, &google}, -- {SearchEngineTier::kTopEngines, &bing}, -- {SearchEngineTier::kTopEngines, &yahoo}, -+ {SearchEngineTier::kTopEngines, &espot}, -+ {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, -- {SearchEngineTier::kTopEngines, &sogou}, -+ {SearchEngineTier::kTopEngines, &duckduckgo_light}, - }; - - // clang-format on -@@ -1684,8 +1275,6 @@ const std::vector GetPrepopulationSetFromCountryID( - for (size_t i = 0; i < num_engines; i++) { - t_url.push_back(engines[i]); - } -- t_url.push_back({SearchEngineTier::kTopEngines, &googleen}); -- t_url.push_back({SearchEngineTier::kTopEngines, &duckduckgo_light}); - return t_url; +@@ -87,6 +87,11 @@ GetPrepopulatedEnginesForEeaRegionCountries(int country_id, + std::vector> GetPrepopulatedTemplateURLData( + int country_id, + PrefService* prefs) { ++ bool use_default = true; ++ if (use_default) { ++ return GetDefaultPrepopulatedEngines(); ++ } ++ + std::vector> t_urls; + + if (!prefs) { +@@ -325,7 +330,7 @@ std::unique_ptr GetPrepopulatedFallbackSearch( + PrefService* prefs, + search_engines::SearchEngineChoiceService* search_engine_choice_service) { + return FindPrepopulatedEngineInternal(prefs, search_engine_choice_service, +- google.id, ++ espot.id, + /*use_first_as_fallback=*/true); } -@@ -1912,7 +1501,7 @@ std::vector> GetPrepopulatedEngines( - } - if (default_search_provider_index) { - const auto itr = -- base::ranges::find(t_urls, google.id, &TemplateURLData::prepopulate_id); -+ base::ranges::find(t_urls, espot.id, &TemplateURLData::prepopulate_id); - *default_search_provider_index = - itr == t_urls.end() ? 0 : std::distance(t_urls.begin(), itr); - } -- 2.34.1 diff --git a/build/e_patches/0014-Add-Mojeek-Search-engine.patch b/build/e_patches/0014-Add-Mojeek-Search-engine.patch new file mode 100644 index 00000000..57dd3d58 --- /dev/null +++ b/build/e_patches/0014-Add-Mojeek-Search-engine.patch @@ -0,0 +1,24 @@ +From b7fe6198fec6e06c72588cd0863e4a5354768b9c Mon Sep 17 00:00:00 2001 +From: TheScarastic +Date: Wed, 16 Nov 2022 11:14:01 +0000 +Subject: [PATCH 14/53] Add Mojeek Search engine + +--- + components/search_engines/search_engine_countries-inc.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/components/search_engines/search_engine_countries-inc.cc b/components/search_engines/search_engine_countries-inc.cc +index 53e5947790fca..542e5b1aa800f 100644 +--- a/components/search_engines/search_engine_countries-inc.cc ++++ b/components/search_engines/search_engine_countries-inc.cc +@@ -37,6 +37,7 @@ constexpr EngineAndTier engines_default[] = { + {SearchEngineTier::kTopEngines, &qwant}, + {SearchEngineTier::kTopEngines, &duckduckgo}, + {SearchEngineTier::kTopEngines, &duckduckgo_light}, ++ {SearchEngineTier::kTopEngines, &mojeek}, + }; + + // Note, the below entries are sorted by country code, not the name in comment. +-- +2.34.1 + diff --git a/build/e_patches/0015-Add-Mojeek-Search-engine.patch b/build/e_patches/0015-Add-Mojeek-Search-engine.patch deleted file mode 100644 index 8015e8de..00000000 --- a/build/e_patches/0015-Add-Mojeek-Search-engine.patch +++ /dev/null @@ -1,896 +0,0 @@ -From b7848ed02bdecfb7a5a221f7f7ebaa4b32c40544 Mon Sep 17 00:00:00 2001 -From: TheScarastic -Date: Wed, 16 Nov 2022 11:14:01 +0000 -Subject: [PATCH 15/52] Add Mojeek Search engine - ---- - .../template_url_prepopulate_data.cc | 110 ++++++++++++++++++ - 1 file changed, 110 insertions(+) - -diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc -index ca13a504d961b..0cc9d3ae0c864 100644 ---- a/components/search_engines/template_url_prepopulate_data.cc -+++ b/components/search_engines/template_url_prepopulate_data.cc -@@ -67,6 +67,7 @@ constexpr EngineAndTier engines_default[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Note, the below entries are sorted by country code, not the name in comment. -@@ -78,6 +79,7 @@ constexpr EngineAndTier engines_AE[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Albania -@@ -86,6 +88,7 @@ constexpr EngineAndTier engines_AL[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Argentina -@@ -94,6 +97,7 @@ constexpr EngineAndTier engines_AR[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Austria -@@ -102,6 +106,7 @@ constexpr EngineAndTier engines_AT[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Australia -@@ -110,6 +115,7 @@ constexpr EngineAndTier engines_AU[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Bosnia and Herzegovina -@@ -118,6 +124,7 @@ constexpr EngineAndTier engines_BA[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Belgium -@@ -126,6 +133,7 @@ constexpr EngineAndTier engines_BE[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Bulgaria -@@ -134,6 +142,7 @@ constexpr EngineAndTier engines_BG[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Bahrain -@@ -142,6 +151,7 @@ constexpr EngineAndTier engines_BH[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Burundi -@@ -150,6 +160,7 @@ constexpr EngineAndTier engines_BI[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Brunei -@@ -158,6 +169,7 @@ constexpr EngineAndTier engines_BN[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Bolivia -@@ -166,6 +178,7 @@ constexpr EngineAndTier engines_BO[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Brazil -@@ -174,6 +187,7 @@ constexpr EngineAndTier engines_BR[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Belarus -@@ -182,6 +196,7 @@ constexpr EngineAndTier engines_BY[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Belize -@@ -190,6 +205,7 @@ constexpr EngineAndTier engines_BZ[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Canada -@@ -198,6 +214,7 @@ constexpr EngineAndTier engines_CA[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Switzerland -@@ -206,6 +223,7 @@ constexpr EngineAndTier engines_CH[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Chile -@@ -214,6 +232,7 @@ constexpr EngineAndTier engines_CL[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // China -@@ -222,6 +241,7 @@ constexpr EngineAndTier engines_CN[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Colombia -@@ -230,6 +250,7 @@ constexpr EngineAndTier engines_CO[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Costa Rica -@@ -238,6 +259,7 @@ constexpr EngineAndTier engines_CR[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Republic of Cyprus -@@ -246,6 +268,7 @@ constexpr EngineAndTier engines_CY[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Czech Republic -@@ -254,6 +277,7 @@ constexpr EngineAndTier engines_CZ[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Germany -@@ -262,6 +286,7 @@ constexpr EngineAndTier engines_DE[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Denmark -@@ -270,6 +295,7 @@ constexpr EngineAndTier engines_DK[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Dominican Republic -@@ -278,6 +304,7 @@ constexpr EngineAndTier engines_DO[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Algeria -@@ -286,6 +313,7 @@ constexpr EngineAndTier engines_DZ[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Ecuador -@@ -294,6 +322,7 @@ constexpr EngineAndTier engines_EC[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Estonia -@@ -302,6 +331,7 @@ constexpr EngineAndTier engines_EE[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Egypt -@@ -310,6 +340,7 @@ constexpr EngineAndTier engines_EG[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Spain -@@ -318,6 +349,7 @@ constexpr EngineAndTier engines_ES[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Finland -@@ -326,6 +358,7 @@ constexpr EngineAndTier engines_FI[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Faroe Islands -@@ -334,6 +367,7 @@ constexpr EngineAndTier engines_FO[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // France -@@ -342,6 +376,7 @@ constexpr EngineAndTier engines_FR[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // United Kingdom -@@ -350,6 +385,7 @@ constexpr EngineAndTier engines_GB[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Greece -@@ -358,6 +394,7 @@ constexpr EngineAndTier engines_GR[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Guatemala -@@ -366,6 +403,7 @@ constexpr EngineAndTier engines_GT[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Hong Kong -@@ -374,6 +412,7 @@ constexpr EngineAndTier engines_HK[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Honduras -@@ -382,6 +421,7 @@ constexpr EngineAndTier engines_HN[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Croatia -@@ -390,6 +430,7 @@ constexpr EngineAndTier engines_HR[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Hungary -@@ -398,6 +439,7 @@ constexpr EngineAndTier engines_HU[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Indonesia -@@ -406,6 +448,7 @@ constexpr EngineAndTier engines_ID[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Ireland -@@ -414,6 +457,7 @@ constexpr EngineAndTier engines_IE[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Israel -@@ -422,6 +466,7 @@ constexpr EngineAndTier engines_IL[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // India -@@ -430,6 +475,7 @@ constexpr EngineAndTier engines_IN[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Iraq -@@ -438,6 +484,7 @@ constexpr EngineAndTier engines_IQ[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Iran -@@ -446,6 +493,7 @@ constexpr EngineAndTier engines_IR[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Iceland -@@ -454,6 +502,7 @@ constexpr EngineAndTier engines_IS[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Italy -@@ -462,6 +511,7 @@ constexpr EngineAndTier engines_IT[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Jamaica -@@ -470,6 +520,7 @@ constexpr EngineAndTier engines_JM[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Jordan -@@ -478,6 +529,7 @@ constexpr EngineAndTier engines_JO[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Japan -@@ -486,6 +538,7 @@ constexpr EngineAndTier engines_JP[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Kenya -@@ -494,6 +547,7 @@ constexpr EngineAndTier engines_KE[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // South Korea -@@ -502,6 +556,7 @@ constexpr EngineAndTier engines_KR[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Kuwait -@@ -510,6 +565,7 @@ constexpr EngineAndTier engines_KW[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Kazakhstan -@@ -518,6 +574,7 @@ constexpr EngineAndTier engines_KZ[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Lebanon -@@ -526,6 +583,7 @@ constexpr EngineAndTier engines_LB[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Liechtenstein -@@ -534,6 +592,7 @@ constexpr EngineAndTier engines_LI[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Lithuania -@@ -542,6 +601,7 @@ constexpr EngineAndTier engines_LT[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Luxembourg -@@ -550,6 +610,7 @@ constexpr EngineAndTier engines_LU[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Latvia -@@ -558,6 +619,7 @@ constexpr EngineAndTier engines_LV[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - -@@ -567,6 +629,7 @@ constexpr EngineAndTier engines_LY[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Morocco -@@ -575,6 +638,7 @@ constexpr EngineAndTier engines_MA[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Monaco -@@ -583,6 +647,7 @@ constexpr EngineAndTier engines_MC[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Moldova -@@ -591,6 +656,7 @@ constexpr EngineAndTier engines_MD[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Montenegro -@@ -599,6 +665,7 @@ constexpr EngineAndTier engines_ME[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Macedonia -@@ -607,6 +674,7 @@ constexpr EngineAndTier engines_MK[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Malta -@@ -615,6 +683,7 @@ constexpr EngineAndTier engines_MT[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Mexico -@@ -623,6 +692,7 @@ constexpr EngineAndTier engines_MX[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Malaysia -@@ -631,6 +701,7 @@ constexpr EngineAndTier engines_MY[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Nicaragua -@@ -639,6 +710,7 @@ constexpr EngineAndTier engines_NI[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Netherlands -@@ -647,6 +719,7 @@ constexpr EngineAndTier engines_NL[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Norway -@@ -655,6 +728,7 @@ constexpr EngineAndTier engines_NO[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // New Zealand -@@ -663,6 +737,7 @@ constexpr EngineAndTier engines_NZ[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Oman -@@ -671,6 +746,7 @@ constexpr EngineAndTier engines_OM[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Panama -@@ -679,6 +755,7 @@ constexpr EngineAndTier engines_PA[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Peru -@@ -687,6 +764,7 @@ constexpr EngineAndTier engines_PE[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Philippines -@@ -695,6 +773,7 @@ constexpr EngineAndTier engines_PH[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Pakistan -@@ -703,6 +782,7 @@ constexpr EngineAndTier engines_PK[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Poland -@@ -711,6 +791,7 @@ constexpr EngineAndTier engines_PL[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Puerto Rico -@@ -719,6 +800,7 @@ constexpr EngineAndTier engines_PR[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Portugal -@@ -727,6 +809,7 @@ constexpr EngineAndTier engines_PT[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Paraguay -@@ -735,6 +818,7 @@ constexpr EngineAndTier engines_PY[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Qatar -@@ -743,6 +827,7 @@ constexpr EngineAndTier engines_QA[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Romania -@@ -751,6 +836,7 @@ constexpr EngineAndTier engines_RO[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Serbia -@@ -759,6 +845,7 @@ constexpr EngineAndTier engines_RS[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Russia -@@ -767,6 +854,7 @@ constexpr EngineAndTier engines_RU[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Rwanda -@@ -775,6 +863,7 @@ constexpr EngineAndTier engines_RW[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Saudi Arabia -@@ -783,6 +872,7 @@ constexpr EngineAndTier engines_SA[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Sweden -@@ -791,6 +881,7 @@ constexpr EngineAndTier engines_SE[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Singapore -@@ -799,6 +890,7 @@ constexpr EngineAndTier engines_SG[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Slovenia -@@ -807,6 +899,7 @@ constexpr EngineAndTier engines_SI[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Slovakia -@@ -815,6 +908,7 @@ constexpr EngineAndTier engines_SK[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // El Salvador -@@ -823,6 +917,7 @@ constexpr EngineAndTier engines_SV[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Syria -@@ -831,6 +926,7 @@ constexpr EngineAndTier engines_SY[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Thailand -@@ -839,6 +935,7 @@ constexpr EngineAndTier engines_TH[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Tunisia -@@ -847,6 +944,7 @@ constexpr EngineAndTier engines_TN[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Turkey -@@ -855,6 +953,7 @@ constexpr EngineAndTier engines_TR[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Trinidad and Tobago -@@ -863,6 +962,7 @@ constexpr EngineAndTier engines_TT[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Taiwan -@@ -871,6 +971,7 @@ constexpr EngineAndTier engines_TW[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Tanzania -@@ -879,6 +980,7 @@ constexpr EngineAndTier engines_TZ[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Ukraine -@@ -887,6 +989,7 @@ constexpr EngineAndTier engines_UA[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // United States -@@ -895,6 +998,7 @@ constexpr EngineAndTier engines_US[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Uruguay -@@ -903,6 +1007,7 @@ constexpr EngineAndTier engines_UY[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Venezuela -@@ -911,6 +1016,7 @@ constexpr EngineAndTier engines_VE[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Vietnam -@@ -919,6 +1025,7 @@ constexpr EngineAndTier engines_VN[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Yemen -@@ -927,6 +1034,7 @@ constexpr EngineAndTier engines_YE[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // South Africa -@@ -935,6 +1043,7 @@ constexpr EngineAndTier engines_ZA[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // Zimbabwe -@@ -943,6 +1052,7 @@ constexpr EngineAndTier engines_ZW[] = { - {SearchEngineTier::kTopEngines, &qwant}, - {SearchEngineTier::kTopEngines, &duckduckgo}, - {SearchEngineTier::kTopEngines, &duckduckgo_light}, -+ {SearchEngineTier::kTopEngines, &mojeek}, - }; - - // clang-format on --- -2.34.1 - diff --git a/build/e_patches/0014-Browser-Redirect-users-to-e-foundation-docs.patch b/build/e_patches/0015-Browser-Redirect-users-to-e-foundation-docs.patch similarity index 92% rename from build/e_patches/0014-Browser-Redirect-users-to-e-foundation-docs.patch rename to build/e_patches/0015-Browser-Redirect-users-to-e-foundation-docs.patch index bd107d30..d88a19d3 100644 --- a/build/e_patches/0014-Browser-Redirect-users-to-e-foundation-docs.patch +++ b/build/e_patches/0015-Browser-Redirect-users-to-e-foundation-docs.patch @@ -1,7 +1,7 @@ -From 57908ec01f430438cde001584c8c3cbe1ee70b67 Mon Sep 17 00:00:00 2001 +From b037f046c39e285860ac0efc46392c232d2d4b49 Mon Sep 17 00:00:00 2001 From: Aayush Gupta Date: Tue, 11 May 2021 14:22:00 +0200 -Subject: [PATCH 14/52] Browser: Redirect users to e foundation docs +Subject: [PATCH 15/53] Browser: Redirect users to e foundation docs Signed-off-by: Aayush Gupta --- @@ -10,7 +10,7 @@ Signed-off-by: Aayush Gupta 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/android/java/src/org/chromium/chrome/browser/feedback/HelpAndFeedbackLauncherImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/feedback/HelpAndFeedbackLauncherImpl.java -index 6b41ef2adcf85..426a5be62d41c 100644 +index 372e0f52170dd..bd055868e9a8a 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/feedback/HelpAndFeedbackLauncherImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/feedback/HelpAndFeedbackLauncherImpl.java @@ -30,7 +30,7 @@ import java.util.Map; diff --git a/build/e_patches/0016-Revert-TM-Add-themed-app-icons.patch b/build/e_patches/0016-Revert-TM-Add-themed-app-icons.patch index 3ab26683..cccca9d3 100644 --- a/build/e_patches/0016-Revert-TM-Add-themed-app-icons.patch +++ b/build/e_patches/0016-Revert-TM-Add-themed-app-icons.patch @@ -1,7 +1,7 @@ -From 5d0ab4446a65bbfb7e13568f87da54672d050051 Mon Sep 17 00:00:00 2001 +From 30da6ee1e7f865553181fa8d4377541fa271a3cd Mon Sep 17 00:00:00 2001 From: althafvly Date: Fri, 18 Nov 2022 09:48:02 +0000 -Subject: [PATCH 16/52] Revert "[TM] Add themed app icons" +Subject: [PATCH 16/53] Revert "[TM] Add themed app icons" This reverts commit 9faa242a0c09838268d7c969acdf493f29ef3db5. --- @@ -13,10 +13,10 @@ This reverts commit 9faa242a0c09838268d7c969acdf493f29ef3db5. delete mode 100644 chrome/android/java/res_chromium_base/drawable/themed_app_icon.xml diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn -index 5d6002fccb657..38ecdf2142e09 100644 +index 937aeffaeabc6..07c35fbc9df87 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -149,7 +149,6 @@ if (current_toolchain == default_toolchain) { +@@ -177,7 +177,6 @@ if (current_toolchain == default_toolchain) { "java/res_base/values/ic_launcher_round_alias.xml", "java/res_base/values/values.xml", "java/res_base/xml/network_security_config.xml", @@ -24,7 +24,7 @@ index 5d6002fccb657..38ecdf2142e09 100644 "java/res_chromium_base/mipmap-hdpi/app_icon.png", "java/res_chromium_base/mipmap-hdpi/layered_app_icon.png", "java/res_chromium_base/mipmap-hdpi/layered_app_icon_background.png", -@@ -2135,7 +2134,6 @@ if (current_toolchain == default_toolchain) { +@@ -2240,7 +2239,6 @@ if (current_toolchain == default_toolchain) { android_resources("chrome_public_apk_base_module_resources") { resource_overlay = true sources = [ diff --git a/build/e_patches/0017-Browser-Use-our-custom-icon-for-browser.patch b/build/e_patches/0017-Browser-Use-our-custom-icon-for-browser.patch index fdd1317a..8e99832c 100644 --- a/build/e_patches/0017-Browser-Use-our-custom-icon-for-browser.patch +++ b/build/e_patches/0017-Browser-Use-our-custom-icon-for-browser.patch @@ -1,7 +1,7 @@ -From a96d8debabc9920dabdfabf9800909ddbc603b5e Mon Sep 17 00:00:00 2001 +From d91815bb42cbe22975554d5fff99147c079956cd Mon Sep 17 00:00:00 2001 From: althafvly Date: Fri, 18 Nov 2022 10:07:39 +0000 -Subject: [PATCH 17/52] Browser: Use our custom icon for browser +Subject: [PATCH 17/53] Browser: Use our custom icon for browser --- chrome/android/BUILD.gn | 44 ++++++++++-------- @@ -64,10 +64,10 @@ Subject: [PATCH 17/52] Browser: Use our custom icon for browser delete mode 100644 chrome/android/java/res_chromium_base/mipmap-xxxhdpi/layered_app_icon_background.png diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn -index 38ecdf2142e09..8a57d1590db53 100644 +index 07c35fbc9df87..1b0dc1a9ae0e9 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -149,22 +149,24 @@ if (current_toolchain == default_toolchain) { +@@ -177,22 +177,24 @@ if (current_toolchain == default_toolchain) { "java/res_base/values/ic_launcher_round_alias.xml", "java/res_base/values/values.xml", "java/res_base/xml/network_security_config.xml", @@ -102,7 +102,7 @@ index 38ecdf2142e09..8a57d1590db53 100644 "java/res_chromium_base/values/channel_constants.xml", ] } -@@ -2134,22 +2136,24 @@ if (current_toolchain == default_toolchain) { +@@ -2239,22 +2241,24 @@ if (current_toolchain == default_toolchain) { android_resources("chrome_public_apk_base_module_resources") { resource_overlay = true sources = [ diff --git a/build/e_patches/0018-Browser-Rename-strings-to-browser.patch b/build/e_patches/0018-Browser-Rename-strings-to-browser.patch index 00e5de92..65fcfb4c 100644 --- a/build/e_patches/0018-Browser-Rename-strings-to-browser.patch +++ b/build/e_patches/0018-Browser-Rename-strings-to-browser.patch @@ -1,7 +1,7 @@ -From 11e67f703036909312c1e3bf3ca201ef7a6aa9e0 Mon Sep 17 00:00:00 2001 +From 753798c7e35f3e20f9b94dc0eb1e3cde913aa1be Mon Sep 17 00:00:00 2001 From: Aayush Gupta Date: Fri, 26 Nov 2021 07:12:30 +0000 -Subject: [PATCH 18/52] Browser: Rename strings to browser +Subject: [PATCH 18/53] Browser: Rename strings to browser Signed-off-by: Aayush Gupta --- @@ -53,7 +53,7 @@ index fe807929ef2ab..4abeadc40ba5b 100644 /** diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd -index 61316152478b1..e07afa3b12fcb 100644 +index ccb54fc503537..0f43d40af855e 100644 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd @@ -202,6 +202,8 @@ CHAR_LIMIT guidelines: diff --git a/build/e_patches/0019-Browser-Use-adaptive-icon-for-recents-UI.patch b/build/e_patches/0019-Browser-Use-adaptive-icon-for-recents-UI.patch index c0299fb7..72e6e88a 100644 --- a/build/e_patches/0019-Browser-Use-adaptive-icon-for-recents-UI.patch +++ b/build/e_patches/0019-Browser-Use-adaptive-icon-for-recents-UI.patch @@ -1,7 +1,7 @@ -From f4e784381fd9ae23b5d098dd5539c1301a00b01f Mon Sep 17 00:00:00 2001 +From 9f826669e65340e18ddaf7a58c240c9392c3b317 Mon Sep 17 00:00:00 2001 From: althafvly Date: Wed, 14 Dec 2022 12:18:50 +0530 -Subject: [PATCH 19/52] Browser: Use adaptive icon for recents UI +Subject: [PATCH 19/53] Browser: Use adaptive icon for recents UI --- .../chrome/browser/ChromeBaseAppCompatActivity.java | 8 +++++++- diff --git a/build/e_patches/0020-Browser-Change-info-bar-icon.patch b/build/e_patches/0020-Browser-Change-info-bar-icon.patch index 579cfcd0..dca97743 100644 --- a/build/e_patches/0020-Browser-Change-info-bar-icon.patch +++ b/build/e_patches/0020-Browser-Change-info-bar-icon.patch @@ -1,7 +1,7 @@ -From 90d8f0ea9011e3abf37e83ae8a4ca4b9a17b9a3d Mon Sep 17 00:00:00 2001 +From bf24c973a60fdcaea16fe7d098ffe5d3b1f98418 Mon Sep 17 00:00:00 2001 From: althafvly Date: Wed, 14 Dec 2022 16:17:58 +0530 -Subject: [PATCH 20/52] Browser: Change info bar icon +Subject: [PATCH 20/53] Browser: Change info bar icon --- .../java/res/drawable-hdpi/infobar_chrome.png | Bin 1039 -> 1450 bytes diff --git a/build/e_patches/0021-Browser-Remove-logo-from-chrome-version.patch b/build/e_patches/0021-Browser-Remove-logo-from-chrome-version.patch index 238f6c73..ad6ab7f9 100644 --- a/build/e_patches/0021-Browser-Remove-logo-from-chrome-version.patch +++ b/build/e_patches/0021-Browser-Remove-logo-from-chrome-version.patch @@ -1,7 +1,7 @@ -From 91a16b77d091740f800045838787473cc7f48887 Mon Sep 17 00:00:00 2001 +From 006ccdb2f12983c347ed07376fc724476f1199f7 Mon Sep 17 00:00:00 2001 From: A Mak Date: Sat, 25 Jul 2020 17:56:47 -0700 -Subject: [PATCH 21/52] Browser: Remove logo from chrome://version +Subject: [PATCH 21/53] Browser: Remove logo from chrome://version --- components/version_ui/resources/about_version.html | 7 ------- diff --git a/build/e_patches/0022-Browser-disable-search-provider-logo.patch b/build/e_patches/0022-Browser-disable-search-provider-logo.patch index e5d1cd9b..7828940c 100644 --- a/build/e_patches/0022-Browser-disable-search-provider-logo.patch +++ b/build/e_patches/0022-Browser-disable-search-provider-logo.patch @@ -1,17 +1,17 @@ -From fdfdf30f4a863b9f0df81dcd45dbd5c9f4c64f59 Mon Sep 17 00:00:00 2001 +From e3b3743631da8e59688c7dfce6cf65a9d2c71cf9 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Mon, 17 Jun 2019 12:03:52 -0400 -Subject: [PATCH 22/52] Browser: disable search provider logo +Subject: [PATCH 22/53] Browser: disable search provider logo --- .../android/template_url_service_android.cc | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/components/search_engines/android/template_url_service_android.cc b/components/search_engines/android/template_url_service_android.cc -index 37b52474159cf..c5111655b1d09 100644 +index 3bddb187b2289..4d1b805b8b29b 100644 --- a/components/search_engines/android/template_url_service_android.cc +++ b/components/search_engines/android/template_url_service_android.cc -@@ -109,28 +109,7 @@ jboolean TemplateUrlServiceAndroid::IsSearchByImageAvailable( +@@ -184,28 +184,7 @@ jboolean TemplateUrlServiceAndroid::IsSearchByImageAvailable( jboolean TemplateUrlServiceAndroid::DoesDefaultSearchEngineHaveLogo( JNIEnv* env, const JavaParamRef& obj) { diff --git a/build/e_patches/0023-Browser-disable-first-run-welcome-page.patch b/build/e_patches/0023-Browser-disable-first-run-welcome-page.patch index 80d81725..793e7436 100644 --- a/build/e_patches/0023-Browser-disable-first-run-welcome-page.patch +++ b/build/e_patches/0023-Browser-disable-first-run-welcome-page.patch @@ -1,7 +1,7 @@ -From 1d291164809e01bd3c46452d4b42dac4dd4f2876 Mon Sep 17 00:00:00 2001 +From af4064a5b573c301e2acd89e610c94e0601e6866 Mon Sep 17 00:00:00 2001 From: csagan5 <32685696+csagan5@users.noreply.github.com> Date: Sun, 26 Nov 2017 22:51:43 +0100 -Subject: [PATCH 23/52] Browser: disable first run welcome page +Subject: [PATCH 23/53] Browser: disable first run welcome page --- .../org/chromium/chrome/browser/firstrun/FirstRunUtils.java | 3 --- @@ -9,10 +9,10 @@ Subject: [PATCH 23/52] Browser: disable first run welcome page 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java -index cfc6c1f6d254e..97638164ecda9 100644 +index 6a83155e04e70..fd45dda7d78c8 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java -@@ -43,15 +43,12 @@ public class FirstRunUtils { +@@ -36,15 +36,12 @@ public class FirstRunUtils { boolean javaPrefValue = javaPrefs.readBoolean(ChromePreferenceKeys.FIRST_RUN_CACHED_TOS_ACCEPTED, false); boolean nativePrefValue = isFirstRunEulaAccepted(); diff --git a/build/e_patches/0024-disable-seed-based-field-trials.patch b/build/e_patches/0024-disable-seed-based-field-trials.patch index 8676d48d..559dfe11 100644 --- a/build/e_patches/0024-disable-seed-based-field-trials.patch +++ b/build/e_patches/0024-disable-seed-based-field-trials.patch @@ -1,14 +1,14 @@ -From 1e3db0008e2101e9ef8d7f1bc8932605ac91bb76 Mon Sep 17 00:00:00 2001 +From bb82d4ebaf4184906ac77d5996bfabfcbdba1d8e Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Tue, 25 Dec 2018 16:19:51 -0500 -Subject: [PATCH 24/52] disable seed-based field trials +Subject: [PATCH 24/53] disable seed-based field trials --- .../variations/service/variations_field_trial_creator_base.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/variations/service/variations_field_trial_creator_base.cc b/components/variations/service/variations_field_trial_creator_base.cc -index d5aa4aa8ac964..29c6052d8cc25 100644 +index 2f44107f0110d..8bb8a76ae6160 100644 --- a/components/variations/service/variations_field_trial_creator_base.cc +++ b/components/variations/service/variations_field_trial_creator_base.cc @@ -326,9 +326,11 @@ bool VariationsFieldTrialCreatorBase::SetUpFieldTrials( diff --git a/build/e_patches/0025-disable-fetching-variations.patch b/build/e_patches/0025-disable-fetching-variations.patch index 946fc4c7..74ed8c6d 100644 --- a/build/e_patches/0025-disable-fetching-variations.patch +++ b/build/e_patches/0025-disable-fetching-variations.patch @@ -1,14 +1,14 @@ -From f11ef01ede059618cb462abe9b3388b324510226 Mon Sep 17 00:00:00 2001 +From 445886f45bdb9f9344401c1d5f4cc10c2ecbf420 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Wed, 18 Nov 2020 19:08:58 -0500 -Subject: [PATCH 25/52] disable fetching variations +Subject: [PATCH 25/53] disable fetching variations --- .../org/chromium/chrome/browser/init/AsyncInitTaskRunner.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitTaskRunner.java b/chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitTaskRunner.java -index 54166ec82718e..7efa7ffe63813 100644 +index 14b47a9d148f5..4601ee31cf50b 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitTaskRunner.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitTaskRunner.java @@ -39,7 +39,7 @@ public abstract class AsyncInitTaskRunner { diff --git a/build/e_patches/0026-disable-navigation-error-correction-by-default.patch b/build/e_patches/0026-disable-navigation-error-correction-by-default.patch index 80708c12..e2563ec5 100644 --- a/build/e_patches/0026-disable-navigation-error-correction-by-default.patch +++ b/build/e_patches/0026-disable-navigation-error-correction-by-default.patch @@ -1,17 +1,17 @@ -From 19fefab51203b51090589766a1ee71a19fc94667 Mon Sep 17 00:00:00 2001 +From b7bab60e92d00fd6f20ab01e72ad52e708296fce Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Wed, 23 Nov 2016 08:29:58 -0500 -Subject: [PATCH 26/52] disable navigation error correction by default +Subject: [PATCH 26/53] disable navigation error correction by default --- chrome/browser/net/profile_network_context_service.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/browser/net/profile_network_context_service.cc b/chrome/browser/net/profile_network_context_service.cc -index 0525b84f86b29..34b05f37bb9ae 100644 +index 6a0d1c78df0df..b948773edbb39 100644 --- a/chrome/browser/net/profile_network_context_service.cc +++ b/chrome/browser/net/profile_network_context_service.cc -@@ -379,7 +379,7 @@ void ProfileNetworkContextService::UpdateAdditionalCertificates() { +@@ -383,7 +383,7 @@ void ProfileNetworkContextService::ConfigureNetworkContextParams( void ProfileNetworkContextService::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref(embedder_support::kAlternateErrorPagesEnabled, diff --git a/build/e_patches/0027-Handle-web-search-action-in-browser.patch b/build/e_patches/0027-Handle-web-search-action-in-browser.patch index 4bf7a4a3..e7a0951d 100644 --- a/build/e_patches/0027-Handle-web-search-action-in-browser.patch +++ b/build/e_patches/0027-Handle-web-search-action-in-browser.patch @@ -1,7 +1,7 @@ -From 931c049cc3d493ee54909b833c2a23ac4365e5fd Mon Sep 17 00:00:00 2001 +From e0a2a883481a87e9f6de2b44a312af11d907c06f Mon Sep 17 00:00:00 2001 From: fgei Date: Wed, 28 Sep 2022 05:37:00 +0200 -Subject: [PATCH 27/52] Handle web search action in browser +Subject: [PATCH 27/53] Handle web search action in browser --- .../src/org/chromium/base/PackageManagerUtils.java | 10 ++++++++++ @@ -10,10 +10,10 @@ Subject: [PATCH 27/52] Handle web search action in browser 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/base/android/java/src/org/chromium/base/PackageManagerUtils.java b/base/android/java/src/org/chromium/base/PackageManagerUtils.java -index 91d814c08fffa..9661167adf22b 100644 +index a467d72ad54c7..ee8af3392bf15 100644 --- a/base/android/java/src/org/chromium/base/PackageManagerUtils.java +++ b/base/android/java/src/org/chromium/base/PackageManagerUtils.java -@@ -84,6 +84,16 @@ public class PackageManagerUtils { +@@ -86,6 +86,16 @@ public class PackageManagerUtils { return canResolveActivity(intent, 0); } @@ -27,14 +27,14 @@ index 91d814c08fffa..9661167adf22b 100644 + return true; + } + - /** - * @return Intent to query a list of installed home launchers. - */ + /** Check if the system has the given system feature available. */ + public static boolean hasSystemFeature(String feature) { + PackageManager pm = ContextUtils.getApplicationContext().getPackageManager(); diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml -index 72ceff58b96d4..4f08cde73d447 100644 +index 602c7c4ec3c4d..9e729c13e133b 100644 --- a/chrome/android/java/AndroidManifest.xml +++ b/chrome/android/java/AndroidManifest.xml -@@ -336,6 +336,10 @@ by a child template that "extends" this file. +@@ -339,6 +339,10 @@ by a child template that "extends" this file. @@ -46,18 +46,18 @@ index 72ceff58b96d4..4f08cde73d447 100644 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java -index 8967b5c96cd1d..a1ca62992749b 100644 +index f5cc831874f2a..1fc8ca3ee1c0e 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java -@@ -228,7 +228,7 @@ public class LaunchIntentDispatcher { +@@ -224,7 +224,7 @@ public class LaunchIntentDispatcher { + Intent searchIntent = new Intent(Intent.ACTION_WEB_SEARCH); searchIntent.putExtra(SearchManager.QUERY, query); - try (StrictModeContext ignored = StrictModeContext.allowDiskReads()) { -- if (PackageManagerUtils.canResolveActivity( -+ if (PackageManagerUtils.canOnlyOthersResolveActivity( - searchIntent, PackageManager.GET_RESOLVED_FILTER)) { - mActivity.startActivity(searchIntent); - } else { +- if (PackageManagerUtils.canResolveActivity( ++ if (PackageManagerUtils.canOnlyOthersResolveActivity( + searchIntent, PackageManager.GET_RESOLVED_FILTER)) { + mActivity.startActivity(searchIntent); + } else { -- 2.34.1 diff --git a/build/e_patches/0028-Browser-Replace-default-tab-favicon.patch b/build/e_patches/0028-Browser-Replace-default-tab-favicon.patch index 42630fc8..f8bc9393 100644 --- a/build/e_patches/0028-Browser-Replace-default-tab-favicon.patch +++ b/build/e_patches/0028-Browser-Replace-default-tab-favicon.patch @@ -1,7 +1,7 @@ -From def24817616149b34d09be33ea4626b5f0f68ae4 Mon Sep 17 00:00:00 2001 +From 8c71d0b0a1258ca568edeabe27974c343c715e37 Mon Sep 17 00:00:00 2001 From: althafvly Date: Mon, 2 Jan 2023 15:12:41 +0530 -Subject: [PATCH 28/52] Browser: Replace default tab favicon +Subject: [PATCH 28/53] Browser: Replace default tab favicon --- .../java/res/drawable-hdpi/chromelogo16.png | Bin 425 -> 1016 bytes diff --git a/build/e_patches/0029-Browser-Spoof-as-Pixel-4a-by-default.patch b/build/e_patches/0029-Browser-Spoof-as-Pixel-4a-by-default.patch index de329fc0..a1974749 100644 --- a/build/e_patches/0029-Browser-Spoof-as-Pixel-4a-by-default.patch +++ b/build/e_patches/0029-Browser-Spoof-as-Pixel-4a-by-default.patch @@ -1,7 +1,7 @@ -From 45363adfd16248411b97eb3c887120deddb004d3 Mon Sep 17 00:00:00 2001 +From 8e7ce5290cc63b9fb3f09c200be79c7e51af2b96 Mon Sep 17 00:00:00 2001 From: althafvly Date: Thu, 19 Jan 2023 05:41:58 +0000 -Subject: [PATCH 29/52] Browser: Spoof as Pixel 4a by default +Subject: [PATCH 29/53] Browser: Spoof as Pixel 4a by default - Android 10 Pixel 4a QD4A.200805.003 --- diff --git a/build/e_patches/0030-Browser-Remove-broken-link-about-entries.patch b/build/e_patches/0030-Browser-Remove-broken-link-about-entries.patch index 579d0743..2802c054 100644 --- a/build/e_patches/0030-Browser-Remove-broken-link-about-entries.patch +++ b/build/e_patches/0030-Browser-Remove-broken-link-about-entries.patch @@ -1,7 +1,7 @@ -From 0873b6b6839fd1912a2c85308afadfab89828c52 Mon Sep 17 00:00:00 2001 +From 3d6bb3214d32cc1998c448a3b24c2d708ad0ccc5 Mon Sep 17 00:00:00 2001 From: althafvly Date: Mon, 20 Feb 2023 07:39:35 +0000 -Subject: [PATCH 30/52] Browser: Remove broken link about entries +Subject: [PATCH 30/53] Browser: Remove broken link about entries --- .../java/res/xml/legal_information_preferences.xml | 12 ------------ diff --git a/build/e_patches/0031-Browser-Disable-Android-native-autofill-by-default.patch b/build/e_patches/0031-Browser-Disable-Android-native-autofill-by-default.patch index e6a31225..6f84aa75 100644 --- a/build/e_patches/0031-Browser-Disable-Android-native-autofill-by-default.patch +++ b/build/e_patches/0031-Browser-Disable-Android-native-autofill-by-default.patch @@ -1,17 +1,17 @@ -From f82e0feba5fafe1ce998f58a43eeb555caa34530 Mon Sep 17 00:00:00 2001 +From 0c962d0b1a6b2b6a1a1e4ec6634e452405f99fad Mon Sep 17 00:00:00 2001 From: althafvly Date: Tue, 22 Aug 2023 06:16:40 +0000 -Subject: [PATCH 31/52] Browser: Disable Android native autofill by default +Subject: [PATCH 31/53] Browser: Disable Android native autofill by default --- components/autofill/core/common/autofill_prefs.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/autofill/core/common/autofill_prefs.cc b/components/autofill/core/common/autofill_prefs.cc -index a3a1cad6cce06..78580e4fd7298 100644 +index 729d9ff3c1b34..1bd2849aa37d7 100644 --- a/components/autofill/core/common/autofill_prefs.cc +++ b/components/autofill/core/common/autofill_prefs.cc -@@ -64,7 +64,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { +@@ -66,7 +66,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref( prefs::kAutofillCreditCardFidoAuthOfferCheckboxState, true); #endif diff --git a/build/e_patches/0032-Browser-Enable-unified-autoplay-by-default.patch b/build/e_patches/0032-Browser-Enable-unified-autoplay-by-default.patch index 5790c5b0..b0446e91 100644 --- a/build/e_patches/0032-Browser-Enable-unified-autoplay-by-default.patch +++ b/build/e_patches/0032-Browser-Enable-unified-autoplay-by-default.patch @@ -1,7 +1,7 @@ -From e8e3af8a4a5fe9ce53eefb227453b2fafcdef181 Mon Sep 17 00:00:00 2001 +From 01f41df5171dd48aec4b6beaa07f4d2474933a75 Mon Sep 17 00:00:00 2001 From: althafvly Date: Fri, 29 Sep 2023 16:30:17 +0530 -Subject: [PATCH 32/52] Browser: Enable unified autoplay by default +Subject: [PATCH 32/53] Browser: Enable unified autoplay by default --- .../content_settings/core/browser/content_settings_registry.cc | 2 +- @@ -9,10 +9,10 @@ Subject: [PATCH 32/52] Browser: Enable unified autoplay by default 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc -index 24ecc9d52539c..574e66d345c1b 100644 +index a380ea9f05953..62f6005865dc6 100644 --- a/components/content_settings/core/browser/content_settings_registry.cc +++ b/components/content_settings/core/browser/content_settings_registry.cc -@@ -255,7 +255,7 @@ void ContentSettingsRegistry::Init() { +@@ -248,7 +248,7 @@ void ContentSettingsRegistry::Init() { ContentSettingsInfo::INHERIT_IN_INCOGNITO, ContentSettingsInfo::EXCEPTIONS_ON_SECURE_ORIGINS_ONLY); @@ -22,10 +22,10 @@ index 24ecc9d52539c..574e66d345c1b 100644 /*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 -index b2fc62b3fc453..b52a09e0817dd 100644 +index d8127feaf6a87..74116c60fa7c4 100644 --- a/third_party/blink/renderer/core/html/media/autoplay_policy.cc +++ b/third_party/blink/renderer/core/html/media/autoplay_policy.cc -@@ -437,7 +437,7 @@ bool AutoplayPolicy::IsAutoplayAllowedPerSettings() const { +@@ -438,7 +438,7 @@ bool AutoplayPolicy::IsAutoplayAllowedPerSettings() const { return false; if (auto* settings_client = frame->GetContentSettingsClient()) { return settings_client->AllowContentSetting( diff --git a/build/e_patches/0033-Use-thirdparty-autofill-by-default.patch b/build/e_patches/0033-Use-thirdparty-autofill-by-default.patch index a16b9388..bf69b540 100644 --- a/build/e_patches/0033-Use-thirdparty-autofill-by-default.patch +++ b/build/e_patches/0033-Use-thirdparty-autofill-by-default.patch @@ -1,7 +1,7 @@ -From 3313021139ff07ef821dd28a7ce6faf42b3a96af Mon Sep 17 00:00:00 2001 +From 8ee886558ed4a9fc43b6c65454cc6743421eeefb Mon Sep 17 00:00:00 2001 From: althafvly Date: Mon, 12 Feb 2024 13:54:08 +0530 -Subject: [PATCH 33/52] Use thirdparty autofill by default +Subject: [PATCH 33/53] Use thirdparty autofill by default --- .../res/layout/radio_button_group_third_party_preference.xml | 2 +- diff --git a/build/e_patches/0034-Remove-some-privacy-UI-pref.patch b/build/e_patches/0034-Remove-some-privacy-UI-pref.patch index b1fc0611..a05ba102 100644 --- a/build/e_patches/0034-Remove-some-privacy-UI-pref.patch +++ b/build/e_patches/0034-Remove-some-privacy-UI-pref.patch @@ -1,36 +1,35 @@ -From 788b50603b793349f678d3a71b65721585ceb4b5 Mon Sep 17 00:00:00 2001 +From b3d9326f23fb1b661e0a7c9436862bcd2a4f09c1 Mon Sep 17 00:00:00 2001 From: althafvly Date: Mon, 12 Feb 2024 14:21:50 +0530 -Subject: [PATCH 34/52] Remove some privacy UI pref +Subject: [PATCH 34/53] Remove some privacy UI pref --- - .../chrome/browser/privacy/settings/PrivacySettings.java | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) + .../chrome/browser/privacy/settings/PrivacySettings.java | 5 +++++ + 1 file changed, 5 insertions(+) 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 -index c5b81a8f0b345..dc0c589fdc235 100644 +index 98485afdcd569..ace1ada0e5e34 100644 --- 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 -@@ -186,6 +186,9 @@ public class PrivacySettings extends ChromeBaseSettingsFragment +@@ -204,6 +204,9 @@ public class PrivacySettings extends ChromeBaseSettingsFragment mContextualSearch.setSummary( isContextualSearchEnabled ? R.string.text_on : R.string.text_off); + getPreferenceScreen().removePreference(findPreference("phone_as_a_security_key")); -+ getPreferenceScreen().removePreference(findPreference(PREF_CONTEXTUAL_SEARCH)); ++ getPreferenceScreen().removePreference(mContextualSearch); + ChromeSwitchPreference canMakePaymentPref = (ChromeSwitchPreference) findPreference(PREF_CAN_MAKE_PAYMENT); canMakePaymentPref.setOnPreferenceChangeListener(this); -@@ -226,8 +229,7 @@ public class PrivacySettings extends ChromeBaseSettingsFragment - Preference secureDnsPref = findPreference(PREF_SECURE_DNS); - secureDnsPref.setVisible(SecureDnsSettings.isUiEnabled()); - -- Preference syncAndServicesLink = findPreference(PREF_SYNC_AND_SERVICES_LINK); -- syncAndServicesLink.setSummary(buildSyncAndServicesLink()); -+ getPreferenceScreen().removePreference(findPreference(PREF_SYNC_AND_SERVICES_LINK)); +@@ -244,6 +247,8 @@ public class PrivacySettings extends ChromeBaseSettingsFragment + Preference syncAndServicesLink = findPreference(PREF_SYNC_AND_SERVICES_LINK); + syncAndServicesLink.setSummary(buildFooterString()); ++ getPreferenceScreen().removePreference(syncAndServicesLink); ++ // set up history expire days threshold preference List options = new ArrayList<>(); + options.add(new TimeFrequencySpinnerOption(0, -- 2.34.1 diff --git a/build/e_patches/0035-Browser-Remove-send-to-devices-option.patch b/build/e_patches/0035-Browser-Remove-send-to-devices-option.patch index ff0dce83..f2dfbc86 100644 --- a/build/e_patches/0035-Browser-Remove-send-to-devices-option.patch +++ b/build/e_patches/0035-Browser-Remove-send-to-devices-option.patch @@ -1,17 +1,17 @@ -From 207777a758ab4488f45d2d115bc1b2cd477523e3 Mon Sep 17 00:00:00 2001 +From fb0dacf7901ac7f941c5d917dcae93f5349bb6ea Mon Sep 17 00:00:00 2001 From: althafvly Date: Fri, 20 Oct 2023 18:23:09 +0530 -Subject: [PATCH 35/52] Browser: Remove send to devices option +Subject: [PATCH 35/53] Browser: Remove send to devices option --- - ...omeProvidedSharingOptionsProviderBase.java | 33 ------------------- - 1 file changed, 33 deletions(-) + ...omeProvidedSharingOptionsProviderBase.java | 34 ------------------- + 1 file changed, 34 deletions(-) diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/ChromeProvidedSharingOptionsProviderBase.java b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/ChromeProvidedSharingOptionsProviderBase.java -index 1048bb55781d5..87b815f05acd0 100644 +index e7a43ac7860ae..6dca7a9035501 100644 --- a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/ChromeProvidedSharingOptionsProviderBase.java +++ b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/ChromeProvidedSharingOptionsProviderBase.java -@@ -254,18 +254,9 @@ public abstract class ChromeProvidedSharingOptionsProviderBase { +@@ -270,7 +270,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase { maybeAddLongScreenshotFirstPartyOption(); maybeAddPrintFirstPartyOption(); } @@ -19,6 +19,10 @@ index 1048bb55781d5..87b815f05acd0 100644 maybeAddQrCodeFirstPartyOption(); } +@@ -281,14 +280,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase { + } + } + - private void maybeAddSendTabToSelfFirstPartyOption() { - Optional sendTabToSelfDisplayReason = - SendTabToSelfAndroidBridge.getEntryPointDisplayReason(mProfile, mUrl); @@ -30,7 +34,7 @@ index 1048bb55781d5..87b815f05acd0 100644 private void maybeAddQrCodeFirstPartyOption() { } -@@ -358,30 +349,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase { +@@ -385,31 +376,6 @@ public abstract class ChromeProvidedSharingOptionsProviderBase { .build(); } @@ -41,6 +45,7 @@ index 1048bb55781d5..87b815f05acd0 100644 - ContentType.IMAGE) - .setDetailedContentTypesToDisableFor(DetailedContentType.SCREENSHOT) - .setIcon(R.drawable.send_tab, R.string.sharing_send_tab_to_self) +- .setShareActionType(ShareCustomAction.SEND_TAB_TO_SELF) - .setFeatureNameForMetrics(USER_ACTION_SEND_TAB_TO_SELF_SELECTED) - .setOnClickCallback( - (view) -> { diff --git a/build/e_patches/0036-Browser-Enable-webRTC-by-default.patch b/build/e_patches/0036-Browser-Enable-webRTC-by-default.patch index 4e43ce7b..5a7f7b3e 100644 --- a/build/e_patches/0036-Browser-Enable-webRTC-by-default.patch +++ b/build/e_patches/0036-Browser-Enable-webRTC-by-default.patch @@ -1,7 +1,7 @@ -From 4efff8387b579e53de8cb76abcad066af5f71095 Mon Sep 17 00:00:00 2001 +From a232c571a9e7e3ef38e0c93ab0194f7ab3af5cd5 Mon Sep 17 00:00:00 2001 From: althafvly Date: Fri, 20 Oct 2023 18:49:36 +0530 -Subject: [PATCH 36/52] Browser: Enable webRTC by default +Subject: [PATCH 36/53] Browser: Enable webRTC by default --- .../core/browser/bromite_content_settings/webrtc.inc | 2 +- @@ -21,10 +21,10 @@ index 69b2de0ff52fa..c4ce181e6c88c 100644 /*allowlisted_schemes=*/{}, /*valid_settings=*/{CONTENT_SETTING_ALLOW, diff --git a/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc b/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc -index f0a7a40340b27..7790ac36a4f51 100644 +index cc77bf1e7f6b3..1eb1f85870ad6 100644 --- a/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc +++ b/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc -@@ -849,7 +849,7 @@ PeerConnectionDependencyFactory::CreatePortAllocator( +@@ -843,7 +843,7 @@ PeerConnectionDependencyFactory::CreatePortAllocator( WebRTCIPHandlingPolicy policy = GetWebRTCIPHandlingPolicy(webrtc_ip_handling_policy); blink::WebContentSettingsClient* settings = web_frame->GetContentSettingsClient(); @@ -34,10 +34,10 @@ index f0a7a40340b27..7790ac36a4f51 100644 } diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_rtp_receiver.cc b/third_party/blink/renderer/modules/peerconnection/rtc_rtp_receiver.cc -index b44d6fa54b0d5..65cab04928c7e 100644 +index 621c49d7435ad..cfd0d6b9e7eab 100644 --- a/third_party/blink/renderer/modules/peerconnection/rtc_rtp_receiver.cc +++ b/third_party/blink/renderer/modules/peerconnection/rtc_rtp_receiver.cc -@@ -293,7 +293,7 @@ RTCRtpCapabilities* RTCRtpReceiver::getCapabilities(ScriptState* state, +@@ -292,7 +292,7 @@ RTCRtpCapabilities* RTCRtpReceiver::getCapabilities(ScriptState* state, auto* web_frame = static_cast(WebFrame::FromCoreFrame(window->GetFrame())); blink::WebContentSettingsClient* settings = web_frame->GetContentSettingsClient(); @@ -47,10 +47,10 @@ index b44d6fa54b0d5..65cab04928c7e 100644 } diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_rtp_sender.cc b/third_party/blink/renderer/modules/peerconnection/rtc_rtp_sender.cc -index bb9442d1f06c5..6ef6851fb673a 100644 +index b2198a56f7065..d2ca5c096bdae 100644 --- a/third_party/blink/renderer/modules/peerconnection/rtc_rtp_sender.cc +++ b/third_party/blink/renderer/modules/peerconnection/rtc_rtp_sender.cc -@@ -1068,7 +1068,7 @@ RTCRtpCapabilities* RTCRtpSender::getCapabilities(ScriptState* state, +@@ -1050,7 +1050,7 @@ RTCRtpCapabilities* RTCRtpSender::getCapabilities(ScriptState* state, auto* web_frame = static_cast(WebFrame::FromCoreFrame(window->GetFrame())); blink::WebContentSettingsClient* settings = web_frame->GetContentSettingsClient(); diff --git a/build/e_patches/0037-Browser-Enable-webgl-by-default.patch b/build/e_patches/0037-Browser-Enable-webgl-by-default.patch index a50cce6e..03235962 100644 --- a/build/e_patches/0037-Browser-Enable-webgl-by-default.patch +++ b/build/e_patches/0037-Browser-Enable-webgl-by-default.patch @@ -1,7 +1,7 @@ -From e93e623772f54497b6db22b888934edc1af7b65e Mon Sep 17 00:00:00 2001 +From bf057ab978403f3947ec7df35dc5b279b24f94ae Mon Sep 17 00:00:00 2001 From: althafvly Date: Tue, 24 Oct 2023 14:39:06 +0530 -Subject: [PATCH 37/52] Browser: Enable webgl by default +Subject: [PATCH 37/53] Browser: Enable webgl by default --- .../core/browser/bromite_content_settings/webgl.inc | 2 +- @@ -19,10 +19,10 @@ index 3ff01832baef4..dd88ffeab7bbb 100644 /*allowlisted_schemes=*/{}, /*valid_settings=*/{CONTENT_SETTING_ALLOW, diff --git a/third_party/blink/renderer/core/execution_context/execution_context.cc b/third_party/blink/renderer/core/execution_context/execution_context.cc -index ccc9c3a15802c..409b342c06de3 100644 +index b5aa05f0eb600..e086365daeabc 100644 --- a/third_party/blink/renderer/core/execution_context/execution_context.cc +++ b/third_party/blink/renderer/core/execution_context/execution_context.cc -@@ -87,8 +87,8 @@ blink::WebContentSettingsClient* GetContentSettingsClientFor( +@@ -88,8 +88,8 @@ blink::WebContentSettingsClient* GetContentSettingsClientFor( bool AllowWebgl(ExecutionContext* context) { blink::WebContentSettingsClient* settings = GetContentSettingsClientFor(context); if (settings) diff --git a/build/e_patches/0038-Enable-sensors-by-default.patch b/build/e_patches/0038-Enable-sensors-by-default.patch index 48dc5f06..0afda1f1 100644 --- a/build/e_patches/0038-Enable-sensors-by-default.patch +++ b/build/e_patches/0038-Enable-sensors-by-default.patch @@ -1,18 +1,18 @@ -From d378f265aeaeeba3f0f7745939a18aa1ffa156de Mon Sep 17 00:00:00 2001 +From 969b2ba000c88bda75d188b552b0864b99ed9526 Mon Sep 17 00:00:00 2001 From: althafvly Date: Mon, 12 Feb 2024 15:07:39 +0530 -Subject: [PATCH 38/52] Enable sensors by default +Subject: [PATCH 38/53] Enable sensors by default --- .../content_settings/core/browser/content_settings_registry.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc -index 574e66d345c1b..e3c7f07646a43 100644 +index 62f6005865dc6..439d4832dd955 100644 --- a/components/content_settings/core/browser/content_settings_registry.cc +++ b/components/content_settings/core/browser/content_settings_registry.cc -@@ -371,7 +371,7 @@ void ContentSettingsRegistry::Init() { - // TODO(crbug.com/904439): Update this to "SECURE_ONLY" once +@@ -375,7 +375,7 @@ void ContentSettingsRegistry::Init() { + // TODO(crbug.com/40602007): Update this to "SECURE_ONLY" once // DeviceOrientationEvents and DeviceMotionEvents are only fired in secure // contexts. - Register(ContentSettingsType::SENSORS, "sensors", CONTENT_SETTING_BLOCK, diff --git a/build/e_patches/0039-disable-browser-sign-in-feature-by-default.patch b/build/e_patches/0039-disable-browser-sign-in-feature-by-default.patch index 21152b2e..8ec63c55 100644 --- a/build/e_patches/0039-disable-browser-sign-in-feature-by-default.patch +++ b/build/e_patches/0039-disable-browser-sign-in-feature-by-default.patch @@ -1,14 +1,14 @@ -From 2689f83fddaa12c639d3098e000f443bb1e9cbe7 Mon Sep 17 00:00:00 2001 +From 367ae23fd156d67fc8ae1a9620532b7db3785e90 Mon Sep 17 00:00:00 2001 From: althafvly Date: Mon, 12 Feb 2024 13:26:25 +0530 -Subject: [PATCH 39/52] disable browser sign in feature by default +Subject: [PATCH 39/53] disable browser sign in feature by default --- chrome/browser/signin/account_consistency_mode_manager.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/browser/signin/account_consistency_mode_manager.cc b/chrome/browser/signin/account_consistency_mode_manager.cc -index 79f00f9b96b74..1fd6ef457d351 100644 +index acf531439ae2c..5b898f5af1c0d 100644 --- a/chrome/browser/signin/account_consistency_mode_manager.cc +++ b/chrome/browser/signin/account_consistency_mode_manager.cc @@ -123,7 +123,7 @@ AccountConsistencyModeManager::~AccountConsistencyModeManager() {} diff --git a/build/e_patches/0040-Disable-adding-a-signed-out-avatar-on-new-tab-pages-.patch b/build/e_patches/0040-Disable-adding-a-signed-out-avatar-on-new-tab-pages-.patch index cf95f41a..c19ef73a 100644 --- a/build/e_patches/0040-Disable-adding-a-signed-out-avatar-on-new-tab-pages-.patch +++ b/build/e_patches/0040-Disable-adding-a-signed-out-avatar-on-new-tab-pages-.patch @@ -1,7 +1,7 @@ -From d3fba09658f147421709670ab66188e037282677 Mon Sep 17 00:00:00 2001 +From ccde175816a44f0dd88914ae241012175b01095c Mon Sep 17 00:00:00 2001 From: fgei Date: Tue, 8 Aug 2023 09:10:36 +0000 -Subject: [PATCH 40/52] Disable adding a signed out avatar on new tab pages by +Subject: [PATCH 40/53] Disable adding a signed out avatar on new tab pages by default --- @@ -9,10 +9,10 @@ Subject: [PATCH 40/52] Disable adding a signed out avatar on new tab pages by 1 file changed, 12 insertions(+) diff --git a/chrome/android/java/src/org/chromium/chrome/browser/identity_disc/IdentityDiscController.java b/chrome/android/java/src/org/chromium/chrome/browser/identity_disc/IdentityDiscController.java -index 459537c828a5a..5c0da689532a1 100644 +index d99622c0c3ea1..feb64aa9973c5 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/identity_disc/IdentityDiscController.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/identity_disc/IdentityDiscController.java -@@ -63,6 +63,9 @@ public class IdentityDiscController +@@ -61,6 +61,9 @@ public class IdentityDiscController ProfileDataCache.Observer, IdentityManager.Observer, ButtonDataProvider { @@ -22,7 +22,7 @@ index 459537c828a5a..5c0da689532a1 100644 // Context is used for fetching resources and launching preferences page. private final Context mContext; private ActivityLifecycleDispatcher mActivityLifecycleDispatcher; -@@ -170,6 +173,11 @@ public class IdentityDiscController +@@ -164,6 +167,11 @@ public class IdentityDiscController return; } @@ -34,7 +34,7 @@ index 459537c828a5a..5c0da689532a1 100644 String email = CoreAccountInfo.getEmailFrom(getSignedInAccountInfo()); ensureProfileDataCache(); -@@ -346,6 +354,10 @@ public class IdentityDiscController +@@ -341,6 +349,10 @@ public class IdentityDiscController } private String getContentDescription(@Nullable String email) { @@ -43,8 +43,8 @@ index 459537c828a5a..5c0da689532a1 100644 + } + if (email == null) { - return mContext.getString(R.string.accessibility_toolbar_btn_signed_out_identity_disc); - } + if (SigninUtils.shouldShowNewSigninFlow()) { + return mContext.getString( -- 2.34.1 diff --git a/build/e_patches/0041-Hide-Sign-In-preference-when-disallowed.patch b/build/e_patches/0041-Hide-Sign-In-preference-when-disallowed.patch index 135e0b28..6d17a458 100644 --- a/build/e_patches/0041-Hide-Sign-In-preference-when-disallowed.patch +++ b/build/e_patches/0041-Hide-Sign-In-preference-when-disallowed.patch @@ -1,17 +1,17 @@ -From 5a96506c37576976007fe036f5a158f64880c04b Mon Sep 17 00:00:00 2001 +From f4c0b6e5ee9eb31d3a3e4fc972b5b4bf62f64e65 Mon Sep 17 00:00:00 2001 From: fgei Date: Sun, 29 Aug 2021 19:31:00 +0000 -Subject: [PATCH 41/52] Hide Sign In preference when disallowed +Subject: [PATCH 41/53] Hide Sign In preference when disallowed --- .../chromium/chrome/browser/sync/settings/SignInPreference.java | 1 + 1 file changed, 1 insertion(+) diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SignInPreference.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SignInPreference.java -index a24437dfebf3e..e64daa47ae9ea 100644 +index adc0db6298faa..a3ba1c46006a4 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SignInPreference.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SignInPreference.java -@@ -163,6 +163,7 @@ public class SignInPreference extends Preference +@@ -176,6 +176,7 @@ public class SignInPreference extends Preference } private void setupSigninDisallowed() { diff --git a/build/e_patches/0042-Remove-google-pref-from-main-menu.patch b/build/e_patches/0042-Remove-google-pref-from-main-menu.patch index d58aa6e8..d4e0b27e 100644 --- a/build/e_patches/0042-Remove-google-pref-from-main-menu.patch +++ b/build/e_patches/0042-Remove-google-pref-from-main-menu.patch @@ -1,24 +1,24 @@ -From 13538c018e7e3a21a141e021ba1cb197518d221f Mon Sep 17 00:00:00 2001 +From 7df207c9601f04a238262b7613e39c174a886a7e Mon Sep 17 00:00:00 2001 From: althafvly Date: Mon, 12 Feb 2024 13:41:11 +0530 -Subject: [PATCH 42/52] Remove google pref from main menu +Subject: [PATCH 42/53] Remove google pref from main menu --- .../src/org/chromium/chrome/browser/settings/MainSettings.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java -index 8a4a657314a1d..a710f667f3868 100644 +index 5b9a2f35b22d2..39dac6eb4f224 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java -@@ -243,6 +243,9 @@ public class MainSettings extends ChromeBaseSettingsFragment +@@ -268,6 +268,9 @@ public class MainSettings extends ChromeBaseSettingsFragment templateUrlService.load(); } + getPreferenceScreen().removePreference(findPreference(PREF_ACCOUNT_AND_GOOGLE_SERVICES_SECTION)); + getPreferenceScreen().removePreference(findPreference(PREF_GOOGLE_SERVICES)); + - new AdaptiveToolbarStatePredictor(null) + new AdaptiveToolbarStatePredictor(getProfile(), null) .recomputeUiState( uiState -> { -- diff --git a/build/e_patches/0043-disable-contextual-search-by-default.patch b/build/e_patches/0043-disable-contextual-search-by-default.patch index 3ce46820..d4104d67 100644 --- a/build/e_patches/0043-disable-contextual-search-by-default.patch +++ b/build/e_patches/0043-disable-contextual-search-by-default.patch @@ -1,7 +1,7 @@ -From 12900ed97d8d1d47e70ef683d43ae0cb80a81a17 Mon Sep 17 00:00:00 2001 +From 622a98efd4965fc789994698c63729f86f7f9dc8 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Wed, 23 Nov 2016 09:26:51 -0500 -Subject: [PATCH 43/52] disable contextual search by default +Subject: [PATCH 43/53] disable contextual search by default --- .../browser/contextualsearch/ContextualSearchFieldTrial.java | 2 +- @@ -22,10 +22,10 @@ index 46146a968f9df..3eea0b291ed27 100644 /** diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc -index 2ec2a791c4943..aea8c5ee61f62 100644 +index cd4fd8104866c..8c8259537bef4 100644 --- a/chrome/browser/profiles/profile.cc +++ b/chrome/browser/profiles/profile.cc -@@ -313,7 +313,7 @@ void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { +@@ -323,7 +323,7 @@ void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { #if BUILDFLAG(IS_ANDROID) registry->RegisterStringPref( prefs::kContextualSearchEnabled, diff --git a/build/e_patches/0044-Disable-AGSA-by-default.patch b/build/e_patches/0044-Disable-AGSA-by-default.patch index 9e0aec98..04a14775 100644 --- a/build/e_patches/0044-Disable-AGSA-by-default.patch +++ b/build/e_patches/0044-Disable-AGSA-by-default.patch @@ -1,36 +1,49 @@ -From f9458ae931ac742f2fb18cd8711b207abc4b6917 Mon Sep 17 00:00:00 2001 +From 17110e9855f66cbc7a396640ce5c9ebb0c7cfd14 Mon Sep 17 00:00:00 2001 From: csagan5 <32685696+csagan5@users.noreply.github.com> Date: Sun, 26 Sep 2021 11:17:53 +0200 -Subject: [PATCH 44/52] Disable AGSA by default +Subject: [PATCH 44/53] Disable AGSA by default License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - chrome/android/BUILD.gn | 2 -- - .../org/chromium/chrome/browser/AppHooks.java | 1 - - .../chrome/browser/IntentHandler.java | 5 ---- - .../chrome/browser/app/ChromeActivity.java | 29 ------------------- - .../ChromeContextMenuPopulator.java | 8 ----- - ...stomTabActivityClientConnectionKeeper.java | 13 --------- - .../init/ProcessInitializationHandler.java | 9 ------ - .../chrome/browser/share/LensUtils.java | 17 ++--------- - .../flags/android/chrome_feature_list.cc | 4 +-- + chrome/android/BUILD.gn | 3 - + .../org/chromium/chrome/browser/AppHooks.java | 9 --- + .../chrome/browser/IntentHandler.java | 7 -- + .../chrome/browser/app/ChromeActivity.java | 78 ------------------- + .../ChromeContextMenuPopulator.java | 8 -- + .../ContextualSearchManager.java | 48 ------------ + .../ContextualSearchObserver.java | 15 ---- + .../BaseCustomTabRootUiCoordinator.java | 18 ----- + ...stomTabActivityClientConnectionKeeper.java | 13 ---- + .../init/ProcessInitializationHandler.java | 3 - + .../SafeBrowsingReferringAppBridge.java | 2 - + .../chrome/browser/share/LensUtils.java | 17 +--- + .../chrome/browser/ui/RootUiCoordinator.java | 15 ---- + .../flags/android/chrome_feature_list.cc | 4 +- .../browser/flags/ChromeFeatureList.java | 2 +- - chrome/browser/ui/android/omnibox/BUILD.gn | 2 -- - 11 files changed, 5 insertions(+), 87 deletions(-) + chrome/browser/ui/android/omnibox/BUILD.gn | 2 - + 16 files changed, 5 insertions(+), 239 deletions(-) diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn -index 8a57d1590db53..52bb7815d831b 100644 +index 1b0dc1a9ae0e9..cbecd1b41488b 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn -@@ -1004,7 +1004,6 @@ if (current_toolchain == default_toolchain) { +@@ -401,7 +401,6 @@ if (current_toolchain == default_toolchain) { + "//chrome/browser/flags:java", + "//chrome/browser/fullscreen/android:java", + "//chrome/browser/gesturenav/android:java", +- "//chrome/browser/gsa:java", + "//chrome/browser/history:java", + "//chrome/browser/history_clusters:java", + "//chrome/browser/hub:factory_java", +@@ -1060,7 +1059,6 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/flags:flags_junit_tests", "//chrome/browser/flags:java", "//chrome/browser/fullscreen/android:java", - "//chrome/browser/gsa:java", + "//chrome/browser/history:java", "//chrome/browser/history_clusters:java", "//chrome/browser/hub:factory_java", - "//chrome/browser/hub:java", -@@ -1629,7 +1628,6 @@ if (current_toolchain == default_toolchain) { +@@ -1718,7 +1716,6 @@ if (current_toolchain == default_toolchain) { "//chrome/browser/first_run/android:java", "//chrome/browser/flags:java", "//chrome/browser/fullscreen/android:java", @@ -39,7 +52,7 @@ index 8a57d1590db53..52bb7815d831b 100644 "//chrome/browser/hub:factory_java", "//chrome/browser/hub:java", diff --git a/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java b/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java -index 5b6b5b4f88b73..8ad7ad0c317fb 100644 +index 34a3189e6a014..bee68cfb576ca 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java @@ -8,7 +8,6 @@ import androidx.annotation.Nullable; @@ -48,10 +61,25 @@ index 5b6b5b4f88b73..8ad7ad0c317fb 100644 import org.chromium.chrome.browser.customtabs.CustomTabsConnection; -import org.chromium.chrome.browser.gsa.GSAHelper; import org.chromium.chrome.browser.historyreport.AppIndexingReporter; - import org.chromium.chrome.browser.init.ChromeStartupDelegate; import org.chromium.chrome.browser.init.ProcessInitializationHandler; + import org.chromium.chrome.browser.instantapps.InstantAppsHandler; +@@ -92,14 +91,6 @@ public abstract class AppHooks { + return new GoogleActivityController(); + } + +- /** +- * @return An instance of {@link GSAHelper} that handles the start point of chrome's integration +- * with GSA. +- */ +- public GSAHelper createGsaHelper() { +- return new GSAHelper(); +- } +- + public InstantAppsHandler createInstantAppsHandler() { + return new InstantAppsHandler(); + } diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java -index 5655df2574e33..87458d382fad8 100644 +index b91f6b4e0328f..789a7a751d13f 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java @@ -39,7 +39,6 @@ import org.chromium.chrome.browser.document.ChromeLauncherActivity; @@ -59,10 +87,10 @@ index 5655df2574e33..87458d382fad8 100644 import org.chromium.chrome.browser.externalnav.IntentWithRequestMetadataHandler.RequestMetadata; import org.chromium.chrome.browser.flags.ChromeFeatureList; -import org.chromium.chrome.browser.gsa.GSAState; - import org.chromium.chrome.browser.omnibox.suggestions.AutocompleteControllerProvider; + import org.chromium.chrome.browser.omnibox.suggestions.AutocompleteCoordinator; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.profiles.ProfileManager; -@@ -244,8 +243,6 @@ public class IntentHandler { +@@ -258,8 +257,6 @@ public class IntentHandler { private static int sReferrerId; private static String sPendingIncognitoUrl; @@ -71,7 +99,23 @@ index 5655df2574e33..87458d382fad8 100644 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"; -@@ -461,8 +458,6 @@ public class IntentHandler { +@@ -298,7 +295,6 @@ public class IntentHandler { + ExternalAppId.NEWS, + ExternalAppId.LINE, + ExternalAppId.WHATSAPP, +- ExternalAppId.GSA, + ExternalAppId.WEBAPK, + ExternalAppId.YAHOO_MAIL, + ExternalAppId.VIBER, +@@ -318,7 +314,6 @@ public class IntentHandler { + int NEWS = 8; + int LINE = 9; + int WHATSAPP = 10; +- int GSA = 11; + int WEBAPK = 12; + int YAHOO_MAIL = 13; + int VIBER = 14; +@@ -485,8 +480,6 @@ public class IntentHandler { return ExternalAppId.LINE; } else if (packageName.equals(PACKAGE_WHATSAPP)) { return ExternalAppId.WHATSAPP; @@ -81,10 +125,10 @@ index 5655df2574e33..87458d382fad8 100644 return ExternalAppId.CHROME; } else if (packageName.startsWith(WEBAPK_PACKAGE_PREFIX)) { 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 -index 3a568c91306f2..96fe19243500f 100644 +index e241f79baf946..56bb482fba039 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java -@@ -114,10 +114,6 @@ import org.chromium.chrome.browser.fullscreen.BrowserControlsManager; +@@ -113,10 +113,6 @@ import org.chromium.chrome.browser.fullscreen.BrowserControlsManager; import org.chromium.chrome.browser.fullscreen.BrowserControlsManagerSupplier; import org.chromium.chrome.browser.fullscreen.FullscreenBackPressHandler; import org.chromium.chrome.browser.fullscreen.FullscreenManager; @@ -95,16 +139,78 @@ index 3a568c91306f2..96fe19243500f 100644 import org.chromium.chrome.browser.history.HistoryManagerUtils; import org.chromium.chrome.browser.init.AsyncInitializationActivity; import org.chromium.chrome.browser.init.ProcessInitializationHandler; -@@ -391,8 +387,6 @@ public abstract class ChromeActivity +@@ -322,7 +318,6 @@ public abstract class ChromeActivity + private TabContentManager mTabContentManager; + + private final UmaActivityObserver mUmaActivityObserver; +- private ContextReporter mContextReporter; + + private boolean mPartnerBrowserRefreshNeeded; + +@@ -390,8 +385,6 @@ public abstract class ChromeActivity private LaunchCauseMetrics mLaunchCauseMetrics; - private GSAAccountChangeListener mGSAAccountChangeListener; - - // TODO(972867): Pull MenuOrKeyboardActionController out of ChromeActivity. + // TODO(crbug.com/40631552): Pull MenuOrKeyboardActionController out of ChromeActivity. private List mMenuActionHandlers = new ArrayList<>(); -@@ -1363,9 +1357,6 @@ public abstract class ChromeActivity +@@ -1171,53 +1164,6 @@ public abstract class ChromeActivity + return StatusBarColorController.UNDEFINED_STATUS_BAR_COLOR; + } + +- private void createContextReporterIfNeeded() { +- if (!mStarted) return; // Sync state reporting should work only in started state. +- if (mContextReporter != null || getActivityTab() == null) return; +- +- final SyncService syncService = getSyncServiceForOriginalProfile(); +- +- if (syncService != null && syncService.isSyncingUnencryptedUrls()) { +- ContextReporter.SelectionReporter controller = +- getContextualSearchManagerSupplier().hasValue() +- ? new ContextReporter.SelectionReporter() { +- @Override +- public void enable(Callback callback) { +- getContextualSearchManagerSupplier() +- .get() +- .enableContextReporting(callback); +- } +- +- @Override +- public void disable() { +- getContextualSearchManagerSupplier() +- .get() +- .disableContextReporting(); +- } +- } +- : null; +- mContextReporter = +- AppHooks.get() +- .createGsaHelper() +- .getContextReporter( +- getActivityTabProvider(), +- mTabModelSelectorSupplier, +- controller); +- +- if (mSyncStateChangedListener != null) { +- syncService.removeSyncStateChangedListener(mSyncStateChangedListener); +- mSyncStateChangedListener = null; +- } +- +- return; +- } +- +- if (mSyncStateChangedListener == null && syncService != null) { +- mSyncStateChangedListener = () -> createContextReporterIfNeeded(); +- syncService.addSyncStateChangedListener(mSyncStateChangedListener); +- } +- } +- + @Override + public void onResumeWithNative() { + // Close the current UMA record and start a new UMA one. +@@ -1364,9 +1310,6 @@ public abstract class ChromeActivity @Override public void onStopWithNative() { @@ -114,7 +220,15 @@ index 3a568c91306f2..96fe19243500f 100644 if (mSyncStateChangedListener != null) { SyncService syncService = getSyncServiceForOriginalProfile(); if (syncService != null) { -@@ -1462,26 +1453,6 @@ public abstract class ChromeActivity +@@ -1374,7 +1317,6 @@ public abstract class ChromeActivity + } + mSyncStateChangedListener = null; + } +- if (mContextReporter != null) mContextReporter.disable(); + super.onStopWithNative(); + } + +@@ -1480,26 +1422,6 @@ public abstract class ChromeActivity getProfileProviderSupplier().get().getOriginalProfile()); }); @@ -142,7 +256,7 @@ index 3a568c91306f2..96fe19243500f 100644 .addDeferredTask( () -> { 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 -index 45c19a11bb4ae..6d9ecc6d72289 100644 +index caa460dbe1079..c0c1e080cf7cd 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java @@ -36,7 +36,6 @@ import org.chromium.chrome.browser.contextmenu.ContextMenuCoordinator.ListItemTy @@ -167,6 +281,160 @@ index 45c19a11bb4ae..6d9ecc6d72289 100644 if (LensUtils.isDeviceOsBelowMinimum()) { LensMetrics.recordLensSupportStatus( +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java +index 6e67dfdf0a42d..38f14e52e05b4 100644 +--- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java +@@ -46,7 +46,6 @@ import org.chromium.chrome.browser.flags.ActivityType; + import org.chromium.chrome.browser.flags.ChromeFeatureList; + import org.chromium.chrome.browser.fullscreen.FullscreenManager; + import org.chromium.chrome.browser.fullscreen.FullscreenOptions; +-import org.chromium.chrome.browser.gsa.GSAContextDisplaySelection; + import org.chromium.chrome.browser.infobar.InfoBarContainer; + import org.chromium.chrome.browser.layouts.SceneOverlay; + import org.chromium.chrome.browser.profiles.Profile; +@@ -235,9 +234,6 @@ public class ContextualSearchManager + // TODO(donnd): replace with a more systematic approach using the InternalStateController. + private int mSelectAroundCaretCounter; + +- /** An observer that reports selected context to GSA for search quality. */ +- private ContextualSearchObserver mContextReportingObserver; +- + /** A means of accessing the currently active tab. */ + private Supplier mTabSupplier; + +@@ -1096,11 +1092,6 @@ public class ContextualSearchManager + new ContextualSearchSelection( + mContext.getEncoding(), surroundingText, startOffset, endOffset); + notifyInternalObservers(sel); +- +- GSAContextDisplaySelection selection = +- new GSAContextDisplaySelection( +- mContext.getEncoding(), surroundingText, startOffset, endOffset); +- notifyShowContextualSearch(selection); + } + + /** +@@ -1116,18 +1107,6 @@ public class ContextualSearchManager + } + } + +- /** +- * Notifies all Contextual Search observers that a search has occurred. +- * @param selectionContext The selection and context that triggered the search. +- */ +- private void notifyShowContextualSearch(GSAContextDisplaySelection selectionContext) { +- if (!mPolicy.canSendSurroundings()) selectionContext = null; +- +- for (ContextualSearchObserver observer : mObservers) { +- observer.onShowContextualSearch(selectionContext); +- } +- } +- + /** Notifies all Contextual Search observers that a search ended and is no longer in effect. */ + private void notifyHideContextualSearch() { + for (ContextualSearchObserver observer : mObservers) { +@@ -1937,33 +1916,6 @@ public class ContextualSearchManager + }; + } + +- /** +- * @param reporter A context reporter for the feature to report the current selection when +- * triggered. +- */ +- public void enableContextReporting(Callback reporter) { +- mContextReportingObserver = +- new ContextualSearchObserver() { +- @Override +- public void onShowContextualSearch( +- GSAContextDisplaySelection contextSelection) { +- if (contextSelection != null) reporter.onResult(contextSelection); +- } +- +- @Override +- public void onHideContextualSearch() { +- reporter.onResult(null); +- } +- }; +- addObserver(mContextReportingObserver); +- } +- +- /** Disable context reporting for Contextual Search. */ +- public void disableContextReporting() { +- removeObserver(mContextReportingObserver); +- mContextReportingObserver = null; +- } +- + /** + * @param profile The {@link Profile} associated with this Contextual Search session. + * @return Whether the Contextual Search feature was disabled by the user explicitly. +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchObserver.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchObserver.java +index 5a53bec2a1c67..25c055954815d 100644 +--- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchObserver.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchObserver.java +@@ -6,26 +6,11 @@ package org.chromium.chrome.browser.contextualsearch; + + import androidx.annotation.Nullable; + +-import org.chromium.chrome.browser.gsa.GSAContextDisplaySelection; +- + /** + * An interface to be notified when contextual searches are performed or are no longer active. + * Used to report context to the system for features like conversational search. + */ + public interface ContextualSearchObserver { +- /** +- * Notifies that a contextual search was performed, and provides the selection context if +- * the feature is fully enabled (and {@code null} otherwise). +- * This method may be called multiple times if the selection changes while Contextual Search is +- * showing. +- * NOTE: this context data can be quite privacy-sensitive because it contains text from the +- * page being viewed by the user, which may include sensitive or personal information. +- * Clients must follow standard privacy policy before logging or transmitting this information. +- * @param selectionContext The selection and context used for the Contextual Search, or +- * {@code null} if the feature has not yet been fully enabled. +- */ +- void onShowContextualSearch(@Nullable GSAContextDisplaySelection selectionContext); +- + /** + * Notifies that a contextual search is no longer in effect, and the results are no longer + * available in the UX. +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabRootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabRootUiCoordinator.java +index 6001189da8c90..13df59a39161f 100644 +--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabRootUiCoordinator.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabRootUiCoordinator.java +@@ -58,7 +58,6 @@ import org.chromium.chrome.browser.flags.ActivityType; + import org.chromium.chrome.browser.flags.ChromeFeatureList; + import org.chromium.chrome.browser.fullscreen.BrowserControlsManager; + import org.chromium.chrome.browser.fullscreen.FullscreenManager; +-import org.chromium.chrome.browser.gsa.GSAContextDisplaySelection; + import org.chromium.chrome.browser.history.HistoryManager; + import org.chromium.chrome.browser.incognito.reauth.IncognitoReauthCoordinatorFactory; + import org.chromium.chrome.browser.incognito.reauth.IncognitoReauthManager; +@@ -444,23 +443,6 @@ public class BaseCustomTabRootUiCoordinator extends RootUiCoordinator { + this::isPageInsightsHubEnabled, + this::isGoogleBottomBarEnabled, + this::getPageInsightsConfig); +- +- if (mContextualSearchManagerSupplier.get() != null) { +- mContextualSearchObserver = +- new ContextualSearchObserver() { +- @Override +- public void onShowContextualSearch( +- @Nullable GSAContextDisplaySelection selectionContext) { +- mPageInsightsCoordinator.onBottomUiStateChanged(true); +- } +- +- @Override +- public void onHideContextualSearch() { +- mPageInsightsCoordinator.onBottomUiStateChanged(false); +- } +- }; +- mContextualSearchManagerSupplier.get().addObserver(mContextualSearchObserver); +- } + } + + boolean isPageInsightsHubEnabled() { diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityClientConnectionKeeper.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityClientConnectionKeeper.java index 72f0702465c22..19e1e4ffc455d 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityClientConnectionKeeper.java @@ -198,27 +466,34 @@ index 72f0702465c22..19e1e4ffc455d 100644 } } 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 -index f35c3b5be7352..4e54036b4bec1 100644 +index 79fd0ad872769..dcb41e8dfb5af 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java -@@ -416,15 +416,6 @@ public class ProcessInitializationHandler { - } - }); +@@ -664,9 +664,6 @@ public class ProcessInitializationHandler { -- deferredStartupHandler.addDeferredTask( -- new Runnable() { -- @Override -- public void run() { -- // Starts syncing with GSA. -- AppHooks.get().createGsaHelper().startSync(); -- } -- }); + tasks.add(() -> HomepageManager.getInstance().recordHomepageLocationTypeIfEnabled()); + +- // Starts syncing with GSA. +- tasks.add(() -> AppHooks.get().createGsaHelper().startSync()); - - deferredStartupHandler.addDeferredTask( - new Runnable() { - @Override + // Record the saved restore state in a histogram + tasks.add(ChromeBackupAgentImpl::recordRestoreHistogram); + +diff --git a/chrome/android/java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingReferringAppBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingReferringAppBridge.java +index 886639fa753de..43e567f639e17 100644 +--- a/chrome/android/java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingReferringAppBridge.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingReferringAppBridge.java +@@ -151,8 +151,6 @@ public class SafeBrowsingReferringAppBridge { + return "line"; + case ExternalAppId.WHATSAPP: + return "whatsapp"; +- case ExternalAppId.GSA: +- return "google.search.app"; + case ExternalAppId.WEBAPK: + return "webapk"; + case ExternalAppId.YAHOO_MAIL: diff --git a/chrome/android/java/src/org/chromium/chrome/browser/share/LensUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/share/LensUtils.java -index 28710fc07b371..7159a1b76ae57 100644 +index d8c1d27800e50..8ac011c04c1b2 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/share/LensUtils.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/share/LensUtils.java @@ -10,7 +10,6 @@ import android.os.Build; @@ -259,11 +534,47 @@ index 28710fc07b371..7159a1b76ae57 100644 } public static boolean isGoogleLensFeatureEnabled(boolean isIncognito) { +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 +index 624405d654bb8..c7e341634e3d1 100644 +--- a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java ++++ b/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java +@@ -69,7 +69,6 @@ import org.chromium.chrome.browser.flags.ActivityType; + import org.chromium.chrome.browser.flags.ChromeFeatureList; + import org.chromium.chrome.browser.fullscreen.BrowserControlsManager; + import org.chromium.chrome.browser.fullscreen.FullscreenManager; +-import org.chromium.chrome.browser.gsa.GSAContextDisplaySelection; + import org.chromium.chrome.browser.identity_disc.IdentityDiscController; + import org.chromium.chrome.browser.image_descriptions.ImageDescriptionsController; + import org.chromium.chrome.browser.incognito.reauth.IncognitoReauthController; +@@ -909,23 +908,9 @@ public class RootUiCoordinator + selectionContext.endOffset); + } + }; +- mReadAloudContextualSearchObserver = +- new ContextualSearchObserver() { +- @Override +- public void onShowContextualSearch( +- @Nullable GSAContextDisplaySelection selectionContext) { +- controller.maybeHidePlayer(); +- } +- +- @Override +- public void onHideContextualSearch() { +- controller.maybeShowPlayer(); +- } +- }; + ContextualSearchManager contextualSearchManager = + mContextualSearchManagerSupplier.get(); + if (contextualSearchManager != null) { +- contextualSearchManager.addObserver(mReadAloudContextualSearchObserver); + contextualSearchManager.addObserver(mContextualSearchSelectionObserver); + } + } diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc -index e14dbd446486d..9040835049125 100644 +index 65d86dbac830f..bec5d8eb3de68 100644 --- a/chrome/browser/flags/android/chrome_feature_list.cc +++ b/chrome/browser/flags/android/chrome_feature_list.cc -@@ -650,8 +650,8 @@ BASE_FEATURE(kEarlyInitializeStartupMetrics, +@@ -703,8 +703,8 @@ BASE_FEATURE(kDrawWebEdgeToEdge, base::FEATURE_DISABLED_BY_DEFAULT); BASE_FEATURE(kExperimentsForAgsa, @@ -275,20 +586,20 @@ index e14dbd446486d..9040835049125 100644 BASE_FEATURE(kFullscreenInsetsApiMigration, "FullscreenInsetsApiMigration", 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 -index 7a5fa8125b344..454d3f6752f76 100644 +index 3f2a1b0159d47..af2cca40f98b3 100644 --- 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 -@@ -590,7 +590,7 @@ public abstract class ChromeFeatureList { - public static final CachedFlag sDynamicTopChrome = newCachedFlag(DYNAMIC_TOP_CHROME, false); - public static final CachedFlag sEarlyInitializeStartupMetrics = - newCachedFlag(EARLY_INITIALIZE_STARTUP_METRICS, false); +@@ -620,7 +620,7 @@ public abstract class ChromeFeatureList { + public static final CachedFlag sDrawNativeEdgeToEdge = + newCachedFlag(DRAW_NATIVE_EDGE_TO_EDGE, false); + public static final CachedFlag sDrawWebEdgeToEdge = newCachedFlag(DRAW_WEB_EDGE_TO_EDGE, false); - public static final CachedFlag sExperimentsForAgsa = newCachedFlag(EXPERIMENTS_FOR_AGSA, true); + public static final CachedFlag sExperimentsForAgsa = newCachedFlag(EXPERIMENTS_FOR_AGSA, false); public static final CachedFlag sFeedLoadingPlaceholder = newCachedFlag(FEED_LOADING_PLACEHOLDER, false); - public static final CachedFlag sFriendlierSafeBrowsingSettingsEnhancedProtection = + public static final CachedFlag sForceListTabSwitcher = diff --git a/chrome/browser/ui/android/omnibox/BUILD.gn b/chrome/browser/ui/android/omnibox/BUILD.gn -index 024f5c5ce1f08..45ffa16bcc9d7 100644 +index 0028caada75fa..b6b16dd64e282 100644 --- a/chrome/browser/ui/android/omnibox/BUILD.gn +++ b/chrome/browser/ui/android/omnibox/BUILD.gn @@ -161,7 +161,6 @@ android_library("java") { @@ -299,7 +610,7 @@ index 024f5c5ce1f08..45ffa16bcc9d7 100644 "//chrome/browser/history_clusters:java", "//chrome/browser/language/android:java", "//chrome/browser/lens:java", -@@ -474,7 +473,6 @@ robolectric_library("junit") { +@@ -475,7 +474,6 @@ robolectric_library("junit") { "//chrome/browser/device:java", "//chrome/browser/feature_engagement:java", "//chrome/browser/flags:java", diff --git a/build/e_patches/0045-Update-i18n-zh_CN-support.patch b/build/e_patches/0045-Update-i18n-zh_CN-support.patch index b8da7072..51f72ea6 100644 --- a/build/e_patches/0045-Update-i18n-zh_CN-support.patch +++ b/build/e_patches/0045-Update-i18n-zh_CN-support.patch @@ -1,7 +1,7 @@ -From 352f52e4a8fc1a10afce1ed101a9aa1b7bf4ecff Mon Sep 17 00:00:00 2001 +From 9b424dccfabf27515fddfcdb86d9ce81542377e4 Mon Sep 17 00:00:00 2001 From: mars Date: Sun, 2 Aug 2020 00:37:49 +0800 -Subject: [PATCH 45/52] Update i18n zh_CN support +Subject: [PATCH 45/53] Update i18n zh_CN support License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- @@ -14,10 +14,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html 6 files changed, 133 insertions(+), 6 deletions(-) diff --git a/chrome/app/resources/generated_resources_zh-CN.xtb b/chrome/app/resources/generated_resources_zh-CN.xtb -index c341ea9526f18..ecdd20fcd6b1c 100644 +index f566bbe815d3c..d1f16f3955db8 100644 --- a/chrome/app/resources/generated_resources_zh-CN.xtb +++ b/chrome/app/resources/generated_resources_zh-CN.xtb -@@ -10774,4 +10774,6 @@ +@@ -11206,4 +11206,6 @@ 网站会在您访问时自动采用此设置。网站通常会发送通知,以便您知悉重大新闻或聊天消息。 您需要开启 Chrome 同步才能使用 Wi-Fi 同步功能。了解详情 检查(&N) @@ -27,10 +27,10 @@ index c341ea9526f18..ecdd20fcd6b1c 100644 +配置广告拦截和过滤规则地址 + diff --git a/chrome/app/resources/google_chrome_strings_zh-CN.xtb b/chrome/app/resources/google_chrome_strings_zh-CN.xtb -index c6f3bc55df019..358db77eff69a 100644 +index 6eacee0ed41d7..e458a0ff28647 100644 --- a/chrome/app/resources/google_chrome_strings_zh-CN.xtb +++ b/chrome/app/resources/google_chrome_strings_zh-CN.xtb -@@ -497,4 +497,5 @@ +@@ -570,4 +570,5 @@ 更新服务器没有应用的任何哈希数据,因此安装失败。 Google Chrome 是您的默认浏览器 可用于切换 Chrome 个人资料 @@ -39,12 +39,12 @@ index c6f3bc55df019..358db77eff69a 100644 +关于 Bromite + diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_zh-CN.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_zh-CN.xtb -index 1f148bfe1225f..bfd844d570349 100644 +index 24edded18622c..2161c3cac8443 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_zh-CN.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_zh-CN.xtb -@@ -1617,4 +1617,74 @@ +@@ -1717,4 +1717,74 @@ + 若要删除您设备中的无痕浏览记录,请关闭所有无痕式标签页。 个标签页 - 也从这部车载设备中清除书签、历史记录等信息 动态卡片上的菜单已关闭 - \ No newline at end of file @@ -120,10 +120,10 @@ index 1f148bfe1225f..bfd844d570349 100644 +全选 + diff --git a/components/browser_ui/strings/android/translations/browser_ui_strings_zh-CN.xtb b/components/browser_ui/strings/android/translations/browser_ui_strings_zh-CN.xtb -index f697ce194c1cd..db75503f20093 100644 +index 52593dde70c24..145a7b5976c28 100644 --- a/components/browser_ui/strings/android/translations/browser_ui_strings_zh-CN.xtb +++ b/components/browser_ui/strings/android/translations/browser_ui_strings_zh-CN.xtb -@@ -510,4 +510,28 @@ +@@ -509,4 +509,28 @@ 移除此网站? 您访问的网站可以验证您是真人而非机器人 已存储的数据 @@ -155,12 +155,12 @@ index f697ce194c1cd..db75503f20093 100644 +WebRTC + diff --git a/components/strings/components_strings_zh-CN.xtb b/components/strings/components_strings_zh-CN.xtb -index 24fe28ce12e6b..ae27f8e29fd97 100644 +index e2b1fd0c567af..5221b9076de14 100644 --- a/components/strings/components_strings_zh-CN.xtb +++ b/components/strings/components_strings_zh-CN.xtb -@@ -4281,4 +4281,33 @@ - </ul> +@@ -4344,4 +4344,33 @@ JIS B1 + 添加 IBAN 来自 Google Pay - \ No newline at end of file diff --git a/build/e_patches/0046-Remove-mremap-from-seccomp-baseline-policy.patch b/build/e_patches/0046-Remove-mremap-from-seccomp-baseline-policy.patch index 3faccf7c..ae824cb1 100644 --- a/build/e_patches/0046-Remove-mremap-from-seccomp-baseline-policy.patch +++ b/build/e_patches/0046-Remove-mremap-from-seccomp-baseline-policy.patch @@ -1,7 +1,7 @@ -From d68f56865e5c3c226edbc13e3ca7a2b99c5fb5c6 Mon Sep 17 00:00:00 2001 +From f670e9554b354dad1a57cd4e20fa941db85eb4f3 Mon Sep 17 00:00:00 2001 From: csagan5 <32685696+csagan5@users.noreply.github.com> Date: Sat, 16 Apr 2022 10:14:28 +0200 -Subject: [PATCH 46/52] Remove mremap from seccomp baseline policy +Subject: [PATCH 46/53] Remove mremap from seccomp baseline policy See also: * https://bugs.chromium.org/p/chromium/issues/detail?id=1288042 @@ -13,10 +13,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html 1 file changed, 1 deletion(-) diff --git a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_android.cc b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_android.cc -index cf906b809b963..e3721682edb6e 100644 +index 91cec9d9a430c..24b7cb353c4b2 100644 --- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_android.cc +++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_android.cc -@@ -177,7 +177,6 @@ bool IsBaselinePolicyAllowed(int sysno) { +@@ -178,7 +178,6 @@ bool IsBaselinePolicyAllowed(int sysno) { // Used on pre-N to initialize threads in ART. case __NR_modify_ldt: #endif diff --git a/build/e_patches/0047-Re-introduce-kWebAuthCable.patch b/build/e_patches/0047-Re-introduce-kWebAuthCable.patch index 515c8e59..8714ea3b 100644 --- a/build/e_patches/0047-Re-introduce-kWebAuthCable.patch +++ b/build/e_patches/0047-Re-introduce-kWebAuthCable.patch @@ -1,7 +1,7 @@ -From d438b2da5e6d3bac8cea33ff6ef64044cba761c9 Mon Sep 17 00:00:00 2001 +From 6c3983cc5e908b9fa6fb2dd3e56f096a876ca360 Mon Sep 17 00:00:00 2001 From: csagan5 <32685696+csagan5@users.noreply.github.com> Date: Sun, 4 Sep 2022 18:47:58 +0200 -Subject: [PATCH 47/52] Re-introduce kWebAuthCable +Subject: [PATCH 47/53] Re-introduce kWebAuthCable This reverts commit ebfd987a57bf4a58588760e8a4342b4fffef36f2. @@ -9,48 +9,20 @@ Feature is disabled by default. License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- - .../org/chromium/chrome/browser/AppHooks.java | 8 --- - .../chrome/browser/app/ChromeActivity.java | 59 ------------------- - .../authenticator_dialog_view_browsertest.cc | 7 +++ - .../authenticator_dialog_browsertest.cc | 7 +++ - .../webauthn/chrome_webauthn_browsertest.cc | 2 + - .../webauth/authenticator_impl_unittest.cc | 7 ++- - content/public/common/content_features.cc | 7 +++ - content/public/common/content_features.h | 1 + - 8 files changed, 30 insertions(+), 68 deletions(-) + .../chromium/chrome/browser/app/ChromeActivity.java | 10 ---------- + .../webauthn/authenticator_dialog_view_browsertest.cc | 7 +++++++ + .../ui/webauthn/authenticator_dialog_browsertest.cc | 7 +++++++ + chrome/browser/webauthn/chrome_webauthn_browsertest.cc | 2 ++ + content/browser/webauth/authenticator_impl_unittest.cc | 7 ++++++- + content/public/common/content_features.cc | 7 +++++++ + content/public/common/content_features.h | 1 + + 7 files changed, 30 insertions(+), 11 deletions(-) -diff --git a/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java b/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java -index 8ad7ad0c317fb..9cdebb5b0987c 100644 ---- a/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java -+++ b/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java -@@ -92,14 +92,6 @@ public abstract class AppHooks { - return new GoogleActivityController(); - } - -- /** -- * @return An instance of {@link GSAHelper} that handles the start point of chrome's integration -- * with GSA. -- */ -- public GSAHelper createGsaHelper() { -- return new GSAHelper(); -- } -- - public InstantAppsHandler createInstantAppsHandler() { - return new InstantAppsHandler(); - } 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 -index 96fe19243500f..c496be7249fee 100644 +index 56bb482fba039..007941327b367 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java -@@ -317,7 +317,6 @@ public abstract class ChromeActivity - private TabContentManager mTabContentManager; - - private final UmaActivityObserver mUmaActivityObserver; -- private ContextReporter mContextReporter; - - private boolean mPartnerBrowserRefreshNeeded; - -@@ -330,9 +329,6 @@ public abstract class ChromeActivity +@@ -330,9 +330,6 @@ public abstract class ChromeActivity private boolean mNativeInitialized; private boolean mRemoveWindowBackgroundDone; @@ -60,61 +32,7 @@ index 96fe19243500f..c496be7249fee 100644 // The FullscreenVideoPictureInPictureController is initialized lazily https://crbug.com/729738. private FullscreenVideoPictureInPictureController mFullscreenVideoPictureInPictureController; -@@ -1169,53 +1165,6 @@ public abstract class ChromeActivity - return StatusBarColorController.UNDEFINED_STATUS_BAR_COLOR; - } - -- private void createContextReporterIfNeeded() { -- if (!mStarted) return; // Sync state reporting should work only in started state. -- if (mContextReporter != null || getActivityTab() == null) return; -- -- final SyncService syncService = getSyncServiceForOriginalProfile(); -- -- if (syncService != null && syncService.isSyncingUnencryptedUrls()) { -- ContextReporter.SelectionReporter controller = -- getContextualSearchManagerSupplier().hasValue() -- ? new ContextReporter.SelectionReporter() { -- @Override -- public void enable(Callback callback) { -- getContextualSearchManagerSupplier() -- .get() -- .enableContextReporting(callback); -- } -- -- @Override -- public void disable() { -- getContextualSearchManagerSupplier() -- .get() -- .disableContextReporting(); -- } -- } -- : null; -- mContextReporter = -- AppHooks.get() -- .createGsaHelper() -- .getContextReporter( -- getActivityTabProvider(), -- mTabModelSelectorSupplier, -- controller); -- -- if (mSyncStateChangedListener != null) { -- syncService.removeSyncStateChangedListener(mSyncStateChangedListener); -- mSyncStateChangedListener = null; -- } -- -- return; -- } -- -- if (mSyncStateChangedListener == null && syncService != null) { -- mSyncStateChangedListener = () -> createContextReporterIfNeeded(); -- syncService.addSyncStateChangedListener(mSyncStateChangedListener); -- } -- } -- - @Override - public void onResumeWithNative() { - // Close the current UMA record and start a new UMA one. -@@ -1357,14 +1306,6 @@ public abstract class ChromeActivity +@@ -1310,13 +1307,6 @@ public abstract class ChromeActivity @Override public void onStopWithNative() { @@ -125,12 +43,11 @@ index 96fe19243500f..c496be7249fee 100644 - } - mSyncStateChangedListener = null; - } -- if (mContextReporter != null) mContextReporter.disable(); super.onStopWithNative(); } diff --git a/chrome/browser/ui/views/webauthn/authenticator_dialog_view_browsertest.cc b/chrome/browser/ui/views/webauthn/authenticator_dialog_view_browsertest.cc -index e9752ac384b8d..ab5d819e058e4 100644 +index 36114470935e3..057fa8a10a275 100644 --- a/chrome/browser/ui/views/webauthn/authenticator_dialog_view_browsertest.cc +++ b/chrome/browser/ui/views/webauthn/authenticator_dialog_view_browsertest.cc @@ -119,6 +119,12 @@ class AuthenticatorDialogViewTest : public DialogBrowserTest { @@ -146,19 +63,19 @@ index e9752ac384b8d..ab5d819e058e4 100644 // DialogBrowserTest: void ShowUi(const std::string& name) override { dialog_model_ = std::make_unique( -@@ -182,6 +188,7 @@ class AuthenticatorDialogViewTest : public DialogBrowserTest { +@@ -184,6 +190,7 @@ class AuthenticatorDialogViewTest : public DialogBrowserTest { } } + base::test::ScopedFeatureList scoped_feature_list_; std::unique_ptr dialog_model_; + std::unique_ptr dialog_controller_; - protected: diff --git a/chrome/browser/ui/webauthn/authenticator_dialog_browsertest.cc b/chrome/browser/ui/webauthn/authenticator_dialog_browsertest.cc -index 5a5da8fc8d522..871fd69ffa824 100644 +index d3f83e6e5a7f3..fb3cb6d3e2f61 100644 --- a/chrome/browser/ui/webauthn/authenticator_dialog_browsertest.cc +++ b/chrome/browser/ui/webauthn/authenticator_dialog_browsertest.cc -@@ -45,6 +45,12 @@ class AuthenticatorDialogTest : public DialogBrowserTest { +@@ -59,6 +59,12 @@ class AuthenticatorDialogTest : public DialogBrowserTest { AuthenticatorDialogTest(const AuthenticatorDialogTest&) = delete; AuthenticatorDialogTest& operator=(const AuthenticatorDialogTest&) = delete; @@ -171,8 +88,8 @@ index 5a5da8fc8d522..871fd69ffa824 100644 // DialogBrowserTest: void ShowUi(const std::string& name) override { // Web modal dialogs' bounds may exceed the display's work area. -@@ -342,6 +348,7 @@ class AuthenticatorDialogTest : public DialogBrowserTest { - std::unique_ptr model_; +@@ -373,6 +379,7 @@ class AuthenticatorDialogTest : public DialogBrowserTest { + std::unique_ptr controller_; base::RepeatingTimer timer_; int bio_samples_remaining_ = 5; + base::test::ScopedFeatureList scoped_feature_list_; @@ -180,10 +97,10 @@ index 5a5da8fc8d522..871fd69ffa824 100644 IN_PROC_BROWSER_TEST_F(AuthenticatorDialogTest, InvokeUi_default) { diff --git a/chrome/browser/webauthn/chrome_webauthn_browsertest.cc b/chrome/browser/webauthn/chrome_webauthn_browsertest.cc -index 2f77d62333ccd..3680fe4f6f665 100644 +index 5303d76048d3d..7af080425d1a3 100644 --- a/chrome/browser/webauthn/chrome_webauthn_browsertest.cc +++ b/chrome/browser/webauthn/chrome_webauthn_browsertest.cc -@@ -756,6 +756,7 @@ IN_PROC_BROWSER_TEST_F(WebAuthnCableExtension, ServerLink) { +@@ -829,6 +829,7 @@ IN_PROC_BROWSER_TEST_F(WebAuthnCableExtension, ServerLink) { class WebAuthnCableSecondFactor : public WebAuthnBrowserTest { public: WebAuthnCableSecondFactor() { @@ -191,7 +108,7 @@ index 2f77d62333ccd..3680fe4f6f665 100644 // This makes it a little easier to compare against. trace_ << std::endl; } -@@ -1000,6 +1001,7 @@ class WebAuthnCableSecondFactor : public WebAuthnBrowserTest { +@@ -1074,6 +1075,7 @@ class WebAuthnCableSecondFactor : public WebAuthnBrowserTest { }; protected: @@ -200,10 +117,10 @@ index 2f77d62333ccd..3680fe4f6f665 100644 // This field is not a raw_ptr<> to avoid returning a reference to a temporary // T* (result of implicitly casting raw_ptr to T*). diff --git a/content/browser/webauth/authenticator_impl_unittest.cc b/content/browser/webauth/authenticator_impl_unittest.cc -index 17dcf43192b59..fb985d4d4e024 100644 +index bb44f395fd464..583661ebd3718 100644 --- a/content/browser/webauth/authenticator_impl_unittest.cc +++ b/content/browser/webauth/authenticator_impl_unittest.cc -@@ -1273,7 +1273,12 @@ TEST_F(AuthenticatorImplTest, OversizedCredentialId) { +@@ -1285,7 +1285,12 @@ TEST_F(AuthenticatorImplTest, OversizedCredentialId) { } } @@ -218,10 +135,10 @@ index 17dcf43192b59..fb985d4d4e024 100644 NavigateAndCommit(GURL(kTestOrigin1)); diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc -index 9b198a1775c89..b166d805a825b 100644 +index ad2cba36391aa..e7d5233d4fdab 100644 --- a/content/public/common/content_features.cc +++ b/content/public/common/content_features.cc -@@ -1188,6 +1188,13 @@ BASE_FEATURE(kWebAssemblyTrapHandler, +@@ -1100,6 +1100,13 @@ BASE_FEATURE(kWebAssemblyTrapHandler, #endif ); @@ -236,10 +153,10 @@ index 9b198a1775c89..b166d805a825b 100644 // https://webbluetoothcg.github.io/web-bluetooth/ BASE_FEATURE(kWebBluetooth, "WebBluetooth", base::FEATURE_DISABLED_BY_DEFAULT); diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h -index 20b78d196da6f..034c8e75a3b16 100644 +index e92cb19c6339a..2cb8af534bf8b 100644 --- a/content/public/common/content_features.h +++ b/content/public/common/content_features.h -@@ -293,6 +293,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebMidi); +@@ -240,6 +240,7 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebBluetoothNewPermissionsBackend); CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebOtpBackendAuto); CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebPayments); CONTENT_EXPORT BASE_DECLARE_FEATURE(kWebUICodeCache); diff --git a/build/e_patches/0048-Enable-SPPI-for-devices-with-enough-memory.patch b/build/e_patches/0048-Enable-SPPI-for-devices-with-enough-memory.patch index 0b70a475..3fb07bf7 100644 --- a/build/e_patches/0048-Enable-SPPI-for-devices-with-enough-memory.patch +++ b/build/e_patches/0048-Enable-SPPI-for-devices-with-enough-memory.patch @@ -1,7 +1,7 @@ -From 7179e173b85e77f7d7c1845da301bf713a582421 Mon Sep 17 00:00:00 2001 +From fd500092c808e8e77198454130cb79382eacff89 Mon Sep 17 00:00:00 2001 From: csagan5 <32685696+csagan5@users.noreply.github.com> Date: Sun, 17 Mar 2019 19:09:00 +0100 -Subject: [PATCH 48/52] Enable SPPI for devices with enough memory +Subject: [PATCH 48/53] Enable SPPI for devices with enough memory License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html --- diff --git a/build/e_patches/0049-Change-accent-and-switch-to-match-our-palette.patch b/build/e_patches/0049-Change-accent-and-switch-to-match-our-palette.patch index ca646ec6..6d7d2e7a 100644 --- a/build/e_patches/0049-Change-accent-and-switch-to-match-our-palette.patch +++ b/build/e_patches/0049-Change-accent-and-switch-to-match-our-palette.patch @@ -1,35 +1,36 @@ -From d7266d2642d743e7e9e6226842939703c701cb16 Mon Sep 17 00:00:00 2001 +From 8619b41c112eb525dfda32a0c9eb9a81dff04246 Mon Sep 17 00:00:00 2001 From: Nishith Khanna Date: Tue, 20 Feb 2024 20:35:25 +0530 -Subject: [PATCH 49/52] Change accent and switch to match our palette +Subject: [PATCH 49/53] Change accent and switch to match our palette --- - .../keyboard_accessory_sheet_tab_option_toggle.xml | 2 +- - .../tasks/tab_management/TabUiThemeProvider.java | 9 +++------ - .../android/java/res/layout/bookmark_save_flow.xml | 2 +- - .../java/res/layout/improved_bookmark_save_flow.xml | 2 +- - .../res/layout/incognito_cookie_controls_card.xml | 2 +- - .../revamped_incognito_cookie_controls_card.xml | 2 +- - .../java/res/layout/readaloud_toggle_switch.xml | 2 +- - .../layout/fast_checkout_autofill_profile_item.xml | 2 +- - .../res/layout/fast_checkout_credit_card_item.xml | 2 +- - .../java/res/layout/fast_checkout_footer_item.xml | 2 +- - .../chrome/browser/omnibox/UrlBarViewBinder.java | 2 +- - .../omnibox/styles/OmniboxResourceProvider.java | 2 +- - components/browser_ui/styles/android/BUILD.gn | 4 ++++ - .../android/java/res/color/e_switch_thumb_color.xml | 5 +++++ - .../android/java/res/color/e_switch_track_color.xml | 6 ++++++ - .../android/java/res/color/text_highlight_color.xml | 2 +- - .../android/java/res/drawable/e_switch_thumb.xml | 9 +++++++++ - .../android/java/res/drawable/e_switch_track.xml | 9 +++++++++ - .../java/res/values/semantic_colors_dynamic.xml | 6 +++--- - .../styles/android/java/res/values/styles.xml | 4 ++++ - .../styles/android/java/res/values/themes.xml | 2 +- - .../theme/android/java/res/values/themes.xml | 12 ++++++------ - .../android/java/res/layout/preference_switch.xml | 2 +- - .../android/res/layout/infobar_control_toggle.xml | 2 +- - ui/android/java/res/values/color_palette.xml | 9 +++++++-- - 25 files changed, 71 insertions(+), 32 deletions(-) + ...board_accessory_sheet_tab_option_toggle.xml | 2 +- + .../tab_management/TabUiThemeProvider.java | 18 ++++++------------ + .../java/res/layout/bookmark_save_flow.xml | 2 +- + .../res/layout/improved_bookmark_save_flow.xml | 2 +- + .../layout/incognito_cookie_controls_card.xml | 2 +- + .../res/layout/readaloud_toggle_switch.xml | 2 +- + .../chrome/browser/tab_ui/TabUiThemeUtils.java | 2 +- + .../fast_checkout_autofill_profile_item.xml | 2 +- + .../layout/fast_checkout_credit_card_item.xml | 2 +- + .../res/layout/fast_checkout_footer_item.xml | 2 +- + .../browser/omnibox/UrlBarViewBinder.java | 2 +- + .../styles/OmniboxResourceProvider.java | 2 +- + ...unt_picker_bottom_sheet_new_account_row.xml | 2 +- + components/browser_ui/styles/android/BUILD.gn | 4 ++++ + .../java/res/color/e_switch_thumb_color.xml | 5 +++++ + .../java/res/color/e_switch_track_color.xml | 6 ++++++ + .../java/res/color/text_highlight_color.xml | 2 +- + .../java/res/drawable/e_switch_thumb.xml | 9 +++++++++ + .../java/res/drawable/e_switch_track.xml | 9 +++++++++ + .../res/values/semantic_colors_dynamic.xml | 6 +++--- + .../styles/android/java/res/values/styles.xml | 4 ++++ + .../styles/android/java/res/values/themes.xml | 2 +- + .../theme/android/java/res/values/themes.xml | 10 +++++----- + .../java/res/layout/preference_switch.xml | 2 +- + .../res/layout/infobar_control_toggle.xml | 2 +- + ui/android/java/res/values/color_palette.xml | 9 +++++++-- + 26 files changed, 74 insertions(+), 38 deletions(-) create mode 100644 components/browser_ui/styles/android/java/res/color/e_switch_thumb_color.xml create mode 100644 components/browser_ui/styles/android/java/res/color/e_switch_track_color.xml create mode 100644 components/browser_ui/styles/android/java/res/drawable/e_switch_thumb.xml @@ -49,20 +50,10 @@ index 9d1713c43e8b1..5cefd325aae52 100644 android:layout_marginStart="16dp" android:layout_width="48dp" diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabUiThemeProvider.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabUiThemeProvider.java -index 309f6d03fd5ee..946900057aa55 100644 +index 952b51bd14cf4..f7edc88d5fbd8 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabUiThemeProvider.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabUiThemeProvider.java -@@ -49,8 +49,7 @@ public class TabUiThemeProvider { - @ColorInt - int colorInt = - isSelected -- ? MaterialColors.getColor( -- context, org.chromium.chrome.R.attr.colorPrimary, TAG) -+ ? context.getColor(R.color.default_control_color_active_baseline) - : new ElevationOverlayProvider(context) - .compositeOverlayWithThemeSurfaceColorIfNeeded(tabElevation); - return colorInt; -@@ -171,7 +170,7 @@ public class TabUiThemeProvider { +@@ -114,7 +114,7 @@ public class TabUiThemeProvider { context, R.color.incognito_tab_bg_selected_color); } return ColorStateList.valueOf( @@ -71,7 +62,7 @@ index 309f6d03fd5ee..946900057aa55 100644 } /** -@@ -288,9 +287,7 @@ public class TabUiThemeProvider { +@@ -166,9 +166,7 @@ public class TabUiThemeProvider { } else { if (isSelected) { @ColorInt @@ -82,6 +73,32 @@ index 309f6d03fd5ee..946900057aa55 100644 int alpha = context.getResources() .getInteger( +@@ -216,10 +214,8 @@ public class TabUiThemeProvider { + ? R.color.incognito_tab_grid_dialog_ungroup_bar_bg_hovered_color + : R.color.incognito_tab_grid_dialog_background_color); + } else { +- return MaterialColors.getColor( +- context, +- isTabHovered ? org.chromium.chrome.R.attr.colorPrimary : R.attr.colorSurface, +- TAG); ++ return isTabHovered ? context.getColor(R.color.default_control_color_active_baseline) ++ : MaterialColors.getColor(context, R.attr.colorSurface, TAG); + } + } + +@@ -231,10 +227,8 @@ public class TabUiThemeProvider { + ? R.color.incognito_tab_grid_dialog_ungroup_bar_text_hovered_color + : R.color.incognito_tab_grid_dialog_ungroup_bar_text_color); + } else { +- return MaterialColors.getColor( +- context, +- isTabHovered ? R.attr.colorOnPrimary : org.chromium.chrome.R.attr.colorPrimary, +- TAG); ++ return isTabHovered ? MaterialColors.getColor(context, R.attr.colorOnPrimary, TAG) ++ : context.getColor(R.color.default_control_color_active_baseline); + } + } + diff --git a/chrome/android/java/res/layout/bookmark_save_flow.xml b/chrome/android/java/res/layout/bookmark_save_flow.xml index 4a348e3e33318..73b1996129ae6 100644 --- a/chrome/android/java/res/layout/bookmark_save_flow.xml @@ -121,19 +138,6 @@ index 9efaf7fdd684b..750bff260cbef 100644 android:id="@+id/cookie_controls_card_toggle" android:layout_width="wrap_content" android:layout_height="wrap_content" -diff --git a/chrome/android/java/res/layout/revamped_incognito_cookie_controls_card.xml b/chrome/android/java/res/layout/revamped_incognito_cookie_controls_card.xml -index 55fdd14e4dbbc..1c601a6584603 100644 ---- a/chrome/android/java/res/layout/revamped_incognito_cookie_controls_card.xml -+++ b/chrome/android/java/res/layout/revamped_incognito_cookie_controls_card.xml -@@ -26,7 +26,7 @@ found in the LICENSE file. - android:layout_alignParentStart="true" - app:tint="@color/default_icon_color_light" /> - -- + app:drawableTint="@color/default_control_color_active_baseline" /> diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/UrlBarViewBinder.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/UrlBarViewBinder.java -index f3ffe354ed517..9f2ed4e77ff93 100644 +index 7aa71e85e1182..2d1f256e2464f 100644 --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/UrlBarViewBinder.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/UrlBarViewBinder.java -@@ -151,7 +151,7 @@ class UrlBarViewBinder { - final int color = - useIncognitoColors - ? view.getContext().getColor(R.color.default_control_color_active_dark) -- : MaterialColors.getColor(view, R.attr.colorPrimary); -+ : view.getContext().getColor(R.color.default_control_color_active_baseline); - textCursor.mutate().setTint(color); - textSelectHandle.mutate().setTint(color); - textSelectHandleLeft.mutate().setTint(color); +@@ -138,7 +138,7 @@ class UrlBarViewBinder { + final int color = + useIncognitoColors + ? view.getContext().getColor(R.color.default_control_color_active_dark) +- : MaterialColors.getColor(view, R.attr.colorPrimary); ++ : view.getContext().getColor(R.color.default_control_color_active_baseline); + textCursor.mutate().setTint(color); + textSelectHandle.mutate().setTint(color); + textSelectHandleLeft.mutate().setTint(color); diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/styles/OmniboxResourceProvider.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/styles/OmniboxResourceProvider.java -index 4aff4f28844f1..13ef150a2b4e9 100644 +index 2cc3b5cb844c1..0a4789a0bc7a4 100644 --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/styles/OmniboxResourceProvider.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/styles/OmniboxResourceProvider.java -@@ -352,7 +352,7 @@ public class OmniboxResourceProvider { +@@ -351,7 +351,7 @@ public class OmniboxResourceProvider { if (brandedColorScheme == BrandedColorScheme.INCOGNITO) { return context.getColor(R.color.locationbar_status_preview_color_incognito); } @@ -207,20 +224,30 @@ index 4aff4f28844f1..13ef150a2b4e9 100644 } /** +diff --git a/chrome/browser/ui/android/signin/java/res/layout/account_picker_bottom_sheet_new_account_row.xml b/chrome/browser/ui/android/signin/java/res/layout/account_picker_bottom_sheet_new_account_row.xml +index fce4445818aaa..55b1dda6b997f 100644 +--- a/chrome/browser/ui/android/signin/java/res/layout/account_picker_bottom_sheet_new_account_row.xml ++++ b/chrome/browser/ui/android/signin/java/res/layout/account_picker_bottom_sheet_new_account_row.xml +@@ -21,4 +21,4 @@ found in the LICENSE file. + android:text="@string/signin_add_account_to_device" + android:textAppearance="@style/TextAppearance.TextAccentMediumThick.Link" + app:drawableStartCompat="@drawable/ic_person_add_40dp" +- app:drawableTint="?attr/colorPrimary" /> ++ app:drawableTint="@color/default_control_color_active_baseline" /> diff --git a/components/browser_ui/styles/android/BUILD.gn b/components/browser_ui/styles/android/BUILD.gn -index 096e6d81cce6d..8a3b0bbc077dc 100644 +index cbaeac9fcc68e..d60de8a80f485 100644 --- a/components/browser_ui/styles/android/BUILD.gn +++ b/components/browser_ui/styles/android/BUILD.gn -@@ -51,6 +51,8 @@ android_resources("java_resources") { - "java/res/color/text_button_ripple_color_list.xml", +@@ -53,6 +53,8 @@ android_resources("java_resources") { "java/res/color/text_highlight_color.xml", "java/res/color/toolbar_button_highlight_color.xml", + "java/res/color/toolbar_icon_unfocused_activity_tint_list.xml", + "java/res/color/e_switch_thumb_color.xml", + "java/res/color/e_switch_track_color.xml", "java/res/drawable-hdpi/btn_star_filled.png", "java/res/drawable-hdpi/ic_chrome.png", "java/res/drawable-hdpi/ic_delete_white_24dp.png", -@@ -232,6 +234,8 @@ android_resources("java_resources") { +@@ -235,6 +237,8 @@ android_resources("java_resources") { "java/res/drawable/smartphone_black_24dp.xml", "java/res/drawable/star_outline_24dp.xml", "java/res/drawable/toolbar_hairline.xml", @@ -294,10 +321,10 @@ index 0000000000000..f5b1eed6f2e6f + + diff --git a/components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml b/components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml -index 0751e42592c15..f8fe65c139098 100644 +index bc6c50211415c..6cbf076d32ae9 100644 --- a/components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml +++ b/components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml -@@ -8,17 +8,17 @@ found in the LICENSE file. +@@ -8,18 +8,18 @@ found in the LICENSE file. ?attr/colorSurface ?attr/colorSurface @@ -310,6 +337,7 @@ index 0751e42592c15..f8fe65c139098 100644 + @color/default_control_color_active_baseline ?attr/colorOnSurfaceInverse ?attr/colorOnPrimary + ?attr/colorOnPrimaryContainer ?attr/colorOnSurfaceVariant ?attr/colorOnSurface @@ -319,7 +347,7 @@ index 0751e42592c15..f8fe65c139098 100644 ?attr/colorOnPrimaryContainer ?attr/colorOnSecondaryContainer diff --git a/components/browser_ui/styles/android/java/res/values/styles.xml b/components/browser_ui/styles/android/java/res/values/styles.xml -index e0861e7c69ef7..f58e9d9aa5e97 100644 +index adc4d32edc90f..0fb040a875a41 100644 --- a/components/browser_ui/styles/android/java/res/values/styles.xml +++ b/components/browser_ui/styles/android/java/res/values/styles.xml @@ -20,9 +20,13 @@ found in the LICENSE file. @@ -350,10 +378,10 @@ index dfa7fee5f41ec..2dd7479c7fcb1 100644 diff --git a/components/browser_ui/theme/android/java/res/values/themes.xml b/components/browser_ui/theme/android/java/res/values/themes.xml -index 31a0937f29df0..99b7a94cc3d4b 100644 +index e9263377e9e59..636228af40108 100644 --- a/components/browser_ui/theme/android/java/res/values/themes.xml +++ b/components/browser_ui/theme/android/java/res/values/themes.xml -@@ -47,7 +47,7 @@ found in the LICENSE file. +@@ -46,7 +46,7 @@ found in the LICENSE file. true @color/gm3_baseline_surface_tint @@ -362,16 +390,7 @@ index 31a0937f29df0..99b7a94cc3d4b 100644 @color/filled_button_bg_dynamic_list -@@ -58,7 +58,7 @@ found in the LICENSE file. - ?attr/colorPrimary - ?attr/colorPrimary - -- @style/Widget.BrowserUI.Switch -+ @style/Widget.BrowserUI.Switch - - -@@ -72,7 +72,7 @@ found in the LICENSE file. +@@ -68,7 +68,7 @@ found in the LICENSE file. @style/Widget.BrowserUI.CheckBox @style/Widget.BrowserUI.RadioButton @@ -380,7 +399,7 @@ index 31a0937f29df0..99b7a94cc3d4b 100644 @macro/default_bg_color -@@ -145,7 +145,7 @@ found in the LICENSE file. +@@ -153,7 +153,7 @@ found in the LICENSE file. true @color/gm3_baseline_surface_tint @@ -389,7 +408,7 @@ index 31a0937f29df0..99b7a94cc3d4b 100644 @color/filled_button_bg_dynamic_list -@@ -157,7 +157,7 @@ found in the LICENSE file. +@@ -165,7 +165,7 @@ found in the LICENSE file. ?attr/colorPrimary @@ -398,7 +417,7 @@ index 31a0937f29df0..99b7a94cc3d4b 100644 @style/SwitchPreference -@@ -226,7 +226,7 @@ found in the LICENSE file. +@@ -234,7 +234,7 @@ found in the LICENSE file. @style/SpinnerStyle @@ -434,10 +453,10 @@ index 209d2a1568df5..c615ca94ceffa 100644 android:layout_width="wrap_content" android:layout_height="wrap_content" /> diff --git a/ui/android/java/res/values/color_palette.xml b/ui/android/java/res/values/color_palette.xml -index 8d14a91d6e77e..37ce33895973b 100644 +index ac7dfdbe0539b..cc9f5b163bba9 100644 --- a/ui/android/java/res/values/color_palette.xml +++ b/ui/android/java/res/values/color_palette.xml -@@ -11,11 +11,11 @@ found in the LICENSE file. +@@ -11,12 +11,12 @@ found in the LICENSE file. @android:color/white #ECF3FE #D3E3FD @@ -446,12 +465,13 @@ index 8d14a91d6e77e..37ce33895973b 100644 #19A8C7FA #33A8C7FA #80A8C7FA + #4C8DF6 - #0B57D0 + #0086FF #0F0B57D0 #190B57D0 #1F0B57D0 -@@ -158,4 +158,9 @@ found in the LICENSE file. +@@ -144,4 +144,9 @@ found in the LICENSE file. @color/baseline_primary_40 @color/baseline_primary_20 @color/baseline_primary_10 diff --git a/build/e_patches/0050-Update-app-icon.patch b/build/e_patches/0050-Update-app-icon.patch index d32ac91c..2f0f8c26 100644 --- a/build/e_patches/0050-Update-app-icon.patch +++ b/build/e_patches/0050-Update-app-icon.patch @@ -1,7 +1,7 @@ -From c3c2dabba44ac33a20c4f2c43c81e5017bf9ff20 Mon Sep 17 00:00:00 2001 +From 5713243338dd83787bf8208057217a58a275f41e Mon Sep 17 00:00:00 2001 From: Nishith Khanna Date: Wed, 14 Feb 2024 15:09:43 +0530 -Subject: [PATCH 50/52] Update app icon +Subject: [PATCH 50/53] Update app icon --- .../drawable/ic_launcher_background.xml | 89 +++++++++++--- diff --git a/build/e_patches/0051-Update-default-sites.patch b/build/e_patches/0051-Update-default-sites.patch index 0ab49271..3da8d845 100644 --- a/build/e_patches/0051-Update-default-sites.patch +++ b/build/e_patches/0051-Update-default-sites.patch @@ -1,7 +1,7 @@ -From 9d382c838b15d8221b4896cdd170150fd533d67f Mon Sep 17 00:00:00 2001 +From 3375a24733ecf9830a953e5a82306016f77a8528 Mon Sep 17 00:00:00 2001 From: Nishith Khanna Date: Thu, 11 Apr 2024 20:54:43 +0530 -Subject: [PATCH 51/52] Update default sites +Subject: [PATCH 51/53] Update default sites --- components/ntp_tiles/resources/foundation_e.json | 16 +++++++++++++--- diff --git a/build/e_patches/0053-Browser-Hide-settings-when-parental-control-is-activ.patch b/build/e_patches/0052-Browser-Hide-settings-when-parental-control-is-activ.patch similarity index 81% rename from build/e_patches/0053-Browser-Hide-settings-when-parental-control-is-activ.patch rename to build/e_patches/0052-Browser-Hide-settings-when-parental-control-is-activ.patch index e1de597d..9693da60 100644 --- a/build/e_patches/0053-Browser-Hide-settings-when-parental-control-is-activ.patch +++ b/build/e_patches/0052-Browser-Hide-settings-when-parental-control-is-activ.patch @@ -1,7 +1,7 @@ -From 8ff36892c33d9d520d2a250998f29ce70f306402 Mon Sep 17 00:00:00 2001 +From a3671dd03c66767a9b1d7f45c7a86cd696da39d9 Mon Sep 17 00:00:00 2001 From: althafvly Date: Thu, 11 Jul 2024 11:11:15 +0530 -Subject: [PATCH] Browser: Hide settings when parental control is active +Subject: [PATCH 52/53] Browser: Hide settings when parental control is active --- .../chrome/browser/app/ChromeActivity.java | 2 +- @@ -11,10 +11,10 @@ Subject: [PATCH] Browser: Hide settings when parental control is active 4 files changed, 39 insertions(+), 1 deletion(-) 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 -index c496be7249fee..ccb1666c7b796 100644 +index 007941327b367..9117f169f5787 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java -@@ -2498,7 +2498,7 @@ public abstract class ChromeActivity +@@ -2511,7 +2511,7 @@ public abstract class ChromeActivity @BrowserProfileType int type = Profile.getBrowserProfileTypeFromProfile(getCurrentTabModel().getProfile()); @@ -24,7 +24,7 @@ index c496be7249fee..ccb1666c7b796 100644 settingsLauncher.launchSettingsActivity(this); RecordUserAction.record("MobileMenuSettings"); diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java -index 326be6126a152..04a23d4632af4 100644 +index e9ecbb52ad73e..c44b282714c8a 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java @@ -36,6 +36,7 @@ import org.chromium.base.supplier.ObservableSupplier; @@ -34,8 +34,8 @@ index 326be6126a152..04a23d4632af4 100644 +import org.chromium.chrome.browser.app.flags.ChromeCachedFlags; import org.chromium.chrome.browser.ActivityTabProvider; import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor; - import org.chromium.chrome.browser.bookmarks.BookmarkFeatures; -@@ -668,6 +669,10 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate + import org.chromium.chrome.browser.profiles.ProfileManager; +@@ -659,6 +660,10 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate item.setEnabled(isIncognitoEnabled() && !isIncognitoReauthShowing); } @@ -47,18 +47,18 @@ index 326be6126a152..04a23d4632af4 100644 item.setEnabled(false); } diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/flags/ChromeCachedFlags.java b/chrome/android/java/src/org/chromium/chrome/browser/app/flags/ChromeCachedFlags.java -index 51b65247e38a6..e981722ceecfc 100644 +index 94ab051777ff0..395c3b1979013 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/flags/ChromeCachedFlags.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/flags/ChromeCachedFlags.java -@@ -43,6 +43,7 @@ import org.chromium.chrome.browser.tasks.tab_management.TabUiFeatureUtilities; - import org.chromium.chrome.browser.toolbar.ToolbarFeatures; +@@ -45,6 +45,7 @@ import org.chromium.chrome.browser.ui.google_bottom_bar.BottomBarConfigCreator; import org.chromium.chrome.features.start_surface.StartSurfaceConfiguration; + import org.chromium.components.omnibox.OmniboxFeatures; +import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; -@@ -215,4 +216,32 @@ public class ChromeCachedFlags { +@@ -225,4 +226,32 @@ public class ChromeCachedFlags { return cachedFlag.isEnabled(); } @@ -92,18 +92,18 @@ index 51b65247e38a6..e981722ceecfc 100644 + } } diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java -index a710f667f3868..b5222372f39af 100644 +index 39dac6eb4f224..d918862d7adec 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java -@@ -20,6 +20,7 @@ import org.chromium.base.BuildInfo; - import org.chromium.base.ContextUtils; - import org.chromium.base.supplier.ObservableSupplier; +@@ -23,6 +23,7 @@ import org.chromium.base.supplier.ObservableSupplier; + import org.chromium.base.task.PostTask; + import org.chromium.base.task.TaskTraits; import org.chromium.chrome.R; +import org.chromium.chrome.browser.app.flags.ChromeCachedFlags; import org.chromium.chrome.browser.autofill.options.AutofillOptionsFragment; import org.chromium.chrome.browser.autofill.options.AutofillOptionsFragment.AutofillOptionsReferrer; import org.chromium.chrome.browser.autofill.settings.SettingsLauncherHelper; -@@ -138,6 +139,9 @@ public class MainSettings extends ChromeBaseSettingsFragment +@@ -160,6 +161,9 @@ public class MainSettings extends ChromeBaseSettingsFragment @Override public void onStart() { @@ -111,8 +111,8 @@ index a710f667f3868..b5222372f39af 100644 + getActivity().finish(); + } super.onStart(); - SigninManager signinManager = IdentityServicesProvider.get().getSigninManager(getProfile()); - if (signinManager.isSigninSupported(/* requireUpdatedPlayServices= */ false)) { + SyncService syncService = SyncServiceFactory.getForProfile(getProfile()); + if (syncService != null) { -- -2.43.0 +2.34.1 diff --git a/build/e_patches/0052-fixup-Add-menu-item-to-bookmark-all-tabs.patch b/build/e_patches/0052-fixup-Add-menu-item-to-bookmark-all-tabs.patch deleted file mode 100644 index fe3f8e0c..00000000 --- a/build/e_patches/0052-fixup-Add-menu-item-to-bookmark-all-tabs.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 29e4626ea625848f466631a9c261c04fce00ff9a Mon Sep 17 00:00:00 2001 -From: althafvly -Date: Wed, 17 Apr 2024 14:17:55 +0530 -Subject: [PATCH 52/52] fixup: Add menu item to bookmark all tabs - ---- - components/bookmarks/browser/bookmark_load_details.cc | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/components/bookmarks/browser/bookmark_load_details.cc b/components/bookmarks/browser/bookmark_load_details.cc -index 55fbd86187885..845055da90c6d 100644 ---- a/components/bookmarks/browser/bookmark_load_details.cc -+++ b/components/bookmarks/browser/bookmark_load_details.cc -@@ -88,6 +88,10 @@ void BookmarkLoadDetails::PopulateNodeIdsForLocalOrSyncablePermanentNodes() { - if (mobile_folder_node_->id() == 0) { - mobile_folder_node_->set_id(max_id_++); - } -+ -+ if (tabs_collection_folder_node_->id() == 0) { -+ tabs_collection_folder_node_->set_id(max_id_++); -+ } - } - - void BookmarkLoadDetails::AddManagedNode( -@@ -100,6 +104,7 @@ void BookmarkLoadDetails::AddManagedNode( - CHECK_NE(bb_node_->id(), 0); - CHECK_NE(other_folder_node_->id(), 0); - CHECK_NE(mobile_folder_node_->id(), 0); -+ CHECK_NE(tabs_collection_folder_node_->id(), 0); - - has_managed_node_ = true; - root_node_->Add(std::move(managed_node)); -@@ -127,6 +132,7 @@ void BookmarkLoadDetails::ResetPermanentNodePointers() { - bb_node_ = nullptr; - other_folder_node_ = nullptr; - mobile_folder_node_ = nullptr; -+ tabs_collection_folder_node_ = nullptr; - account_bb_node_ = nullptr; - account_other_folder_node_ = nullptr; - account_mobile_folder_node_ = nullptr; --- -2.34.1 - diff --git a/build/e_patches/0053-Browser-Use-correct-switch-scale.patch b/build/e_patches/0053-Browser-Use-correct-switch-scale.patch new file mode 100644 index 00000000..ce1770e4 --- /dev/null +++ b/build/e_patches/0053-Browser-Use-correct-switch-scale.patch @@ -0,0 +1,25 @@ +From fbb1edb41dde593b1f2e9d4ac0917dfd2ebc2fe1 Mon Sep 17 00:00:00 2001 +From: althafvly +Date: Wed, 7 Aug 2024 14:05:16 +0530 +Subject: [PATCH 53/53] Browser: Use correct switch scale + +--- + components/browser_ui/widget/android/java/res/values/dimens.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/components/browser_ui/widget/android/java/res/values/dimens.xml b/components/browser_ui/widget/android/java/res/values/dimens.xml +index eee6885ee03f8..ef3dc4ccd44c4 100644 +--- a/components/browser_ui/widget/android/java/res/values/dimens.xml ++++ b/components/browser_ui/widget/android/java/res/values/dimens.xml +@@ -198,7 +198,7 @@ found in the LICENSE file. + + + +- 0.8 ++ 1 + + 60dp + @dimen/min_touch_target_size +-- +2.34.1 + diff --git a/build/e_patches_list.txt b/build/e_patches_list.txt index 1ee8a890..8958172e 100644 --- a/build/e_patches_list.txt +++ b/build/e_patches_list.txt @@ -1,9 +1,9 @@ 0001-fixup-Revert-removal-of-execution-context-address-sp.patch 0002-fixup-Bromite-subresource-adblocker.patch 0003-fixup-Disable-fetching-of-all-field-trials.patch -0004-Remove-bromite-auto-updater-option.patch -0005-add-trichrome-browser-apk-targets.patch -0006-Browser-disable-price-shopping-commerce-integration.patch +0004-add-trichrome-browser-apk-targets.patch +0005-Browser-disable-price-shopping-commerce-integration.patch +0006-Remove-bromite-auto-updater-option.patch 0007-Browser-Change-app-and-package-name-to-browser.patch 0008-Browser-Point-to-our-default-popular-sites.patch 0009-Browser-Enable-do-not-track-by-default.patch @@ -11,8 +11,8 @@ 0011-Browser-Enable-custom-tabs-by-default.patch 0012-Browser-Enable-search-suggestion-by-default.patch 0013-Browser-Modify-default-search-engines.patch -0014-Browser-Redirect-users-to-e-foundation-docs.patch -0015-Add-Mojeek-Search-engine.patch +0014-Add-Mojeek-Search-engine.patch +0015-Browser-Redirect-users-to-e-foundation-docs.patch 0016-Revert-TM-Add-themed-app-icons.patch 0017-Browser-Use-our-custom-icon-for-browser.patch 0018-Browser-Rename-strings-to-browser.patch @@ -49,5 +49,6 @@ 0049-Change-accent-and-switch-to-match-our-palette.patch 0050-Update-app-icon.patch 0051-Update-default-sites.patch -0052-fixup-Add-menu-item-to-bookmark-all-tabs.patch -0053-Browser-Hide-settings-when-parental-control-is-activ.patch \ No newline at end of file +0052-Browser-Hide-settings-when-parental-control-is-activ.patch +0053-Browser-Use-correct-switch-scale.patch + diff --git a/domain_substitution/.gitignore b/domain_substitution/.gitignore index c18dd8d8..60baceb4 100644 --- a/domain_substitution/.gitignore +++ b/domain_substitution/.gitignore @@ -1 +1,3 @@ __pycache__/ +ungoogled-chromium/ + diff --git a/domain_substitution/copy_domain_substitution.sh b/domain_substitution/copy_domain_substitution.sh new file mode 100755 index 00000000..a81d3633 --- /dev/null +++ b/domain_substitution/copy_domain_substitution.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +if [ -d ungoogled-chromium ]; then + cd ungoogled-chromium + git fetch origin 127.0.6533.88-1 + git reset --hard FETCH_HEAD + cd .. +else + git clone https://github.com/ungoogled-software/ungoogled-chromium -b 127.0.6533.88-1 ungoogled-chromium --depth=1 +fi + +grep -vFf domain_blacklist.list ungoogled-chromium/domain_substitution.list > domain_substitution.list +cp -r ungoogled-chromium/domain_regex.list domain_regex.list + +echo "Copy done" + diff --git a/domain_substitution/domain_blacklist.list b/domain_substitution/domain_blacklist.list new file mode 100644 index 00000000..effe055e --- /dev/null +++ b/domain_substitution/domain_blacklist.list @@ -0,0 +1,2 @@ +components/safe_browsing/content/resources/real_time_url_checks_allowlist/store_real_time_url_allowlist_prefixes.py +components/safe_browsing/content/resources/real_time_url_checks_allowlist/validation_utils.py diff --git a/domain_substitution/domain_substitution.list b/domain_substitution/domain_substitution.list index 8942883e..c0862bf6 100644 --- a/domain_substitution/domain_substitution.list +++ b/domain_substitution/domain_substitution.list @@ -35,6 +35,7 @@ ash/ambient/ambient_controller_unittest.cc ash/ambient/backdrop/ambient_backend_controller_impl.cc ash/ambient/managed/screensaver_image_downloader.cc ash/ambient/metrics/ambient_metrics.cc +ash/api/tasks/fake_tasks_client.cc ash/api/tasks/tasks_types.h ash/app_list/PRESUBMIT.py ash/app_list/app_list_controller_impl_unittest.cc @@ -48,6 +49,10 @@ ash/assistant/ui/main_stage/assistant_onboarding_view_unittest.cc ash/assistant/ui/main_stage/suggestion_chip_view_unittest.cc ash/assistant/util/deep_link_util.cc ash/assistant/util/deep_link_util_unittest.cc +ash/birch/birch_item.cc +ash/birch/birch_item_unittest.cc +ash/birch/birch_model_unittest.cc +ash/birch/birch_weather_provider.cc ash/capture_mode/capture_mode_camera_unittests.cc ash/capture_mode/capture_mode_controller.cc ash/capture_mode/capture_mode_unittests.cc @@ -63,23 +68,24 @@ ash/constants/ash_features.cc ash/constants/ash_switches.cc ash/constants/url_constants.cc ash/controls/contextual_nudge.cc -ash/events/keyboard_capability_unittest.cc ash/fast_ink/laser/laser_pointer_view.cc ash/game_dashboard/game_dashboard_main_menu_view.cc ash/glanceables/classroom/fake_glanceables_classroom_client.cc ash/glanceables/classroom/glanceables_classroom_item_view_unittest.cc +ash/glanceables/classroom/glanceables_classroom_student_view.cc +ash/glanceables/classroom/glanceables_classroom_student_view_unittest.cc ash/glanceables/classroom/glanceables_classroom_types.h ash/glanceables/glanceables_pixeltest.cc +ash/glanceables/glanceables_unittest.cc ash/glanceables/tasks/glanceables_task_view.cc -ash/glanceables/tasks/glanceables_task_view_v2.cc ash/glanceables/tasks/glanceables_tasks_view.cc ash/glanceables/tasks/glanceables_tasks_view_unittest.cc +ash/glanceables/tasks/test/glanceables_tasks_test_util.cc ash/login/ui/auth_icon_view.cc ash/login/ui/login_remove_account_dialog_unittest.cc -ash/metrics/login_unlock_throughput_recorder.h ash/picker/picker_asset_fetcher_impl.cc -ash/picker/picker_controller.cc -ash/picker/picker_search_controller_unittest.cc +ash/picker/search/picker_search_controller_unittest.cc +ash/picker/search/picker_search_request_unittest.cc ash/projector/projector_metadata_model.cc ash/public/cpp/android_intent_helper_unittest.cc ash/public/cpp/system_notification_builder_unittest.cc @@ -116,11 +122,20 @@ ash/system/eche/eche_tray.cc ash/system/eche/eche_tray_unittest.cc ash/system/federated/federated_client_manager_unittest.cc ash/system/federated/federated_service_controller_impl_unittest.cc +ash/system/focus_mode/focus_mode_feature_pod_controller_unittest.cc +ash/system/focus_mode/sounds/focus_mode_sounds_controller.cc +ash/system/focus_mode/sounds/soundscape/soundscapes_downloader.cc +ash/system/focus_mode/youtube_music/youtube_music_client.cc +ash/system/focus_mode/youtube_music/youtube_music_types.h ash/system/human_presence/snooping_protection_controller_unittest.cc +ash/system/input_device_settings/device_image_downloader.cc ash/system/input_device_settings/input_device_settings_metrics_manager_unittest.cc ash/system/input_device_settings/input_device_settings_notification_controller.cc ash/system/input_device_settings/input_device_settings_notification_controller_unittest.cc +ash/system/magic_boost/magic_boost_disclaimer_view.cc ash/system/mahi/mahi_constants.h +ash/system/mahi/mahi_content_source_button_unittest.cc +ash/system/mahi/mahi_panel_view_unittest.cc ash/system/notification_center/message_center_test_util.cc ash/system/notification_center/notification_grouping_controller_unittest.cc ash/system/notification_center/views/ash_notification_view_unittest.cc @@ -131,19 +146,17 @@ ash/system/phonehub/phone_hub_ui_controller_unittest.cc ash/system/power/power_event_observer_unittest.cc ash/system/privacy_hub/privacy_hub_notification_controller.cc ash/system/status_area_widget_unittest.cc +ash/system/time/calendar_event_fetch_unittest.cc ash/system/time/calendar_event_list_item_view_unittest.cc +ash/system/time/calendar_list_model_unittest.cc ash/system/time/calendar_up_next_pixeltest.cc ash/system/time/calendar_up_next_view_unittest.cc -ash/system/unified/classroom_bubble_base_view.cc -ash/system/unified/classroom_bubble_student_view.cc -ash/system/unified/classroom_bubble_view_unittest.cc +ash/system/time/calendar_view_pixeltest.cc ash/system/unified/date_tray_unittest.cc ash/system/unified/notification_icons_controller_unittest.cc ash/system/unified/power_button_unittest.cc ash/system/unified/quick_settings_footer_pixeltest.cc ash/system/unified/quick_settings_header_unittest.cc -ash/system/unified/tasks_bubble_view.cc -ash/system/unified/tasks_bubble_view_unittest.cc ash/system/unified/user_chooser_detailed_view_controller_unittest.cc ash/system/usb_peripheral/usb_peripheral_notification_controller.cc ash/system/video_conference/bubble/bubble_view_pixeltest.cc @@ -160,6 +173,7 @@ ash/webui/camera_app_ui/resources/js/lib/analytics.js ash/webui/camera_app_ui/resources/js/metrics.ts ash/webui/camera_app_ui/resources/js/untrusted_ga_helper.ts ash/webui/camera_app_ui/resources/js/views/camera_intent.ts +ash/webui/camera_app_ui/resources/js/views/dialog.ts ash/webui/camera_app_ui/resources/js/views/document_fix_mode.ts ash/webui/camera_app_ui/resources/js/views/settings/primary.ts ash/webui/camera_app_ui/resources/strings/camera_strings.grd @@ -169,6 +183,8 @@ ash/webui/common/resources/cr_elements/icons.html ash/webui/common/resources/cr_picture/png.js ash/webui/common/resources/keyboard_layouts.js ash/webui/common/resources/quick_unlock/pin_keyboard_icons.html +ash/webui/common/resources/sea_pen/constants_generated.ts +ash/webui/common/resources/sea_pen/surface_effects/sparkle.ts ash/webui/diagnostics_ui/backend/input/input_data_provider_keyboard_unittest.cc ash/webui/diagnostics_ui/diagnostics_ui.cc ash/webui/diagnostics_ui/resources/PRESUBMIT.py @@ -213,12 +229,16 @@ ash/wm/desks/desks_unittests.cc ash/wm/desks/templates/admin_template_unittest.cc ash/wm/desks/templates/saved_desk_test_helper.cc ash/wm/desks/templates/saved_desk_unittest.cc +ash/wm/overview/birch/birch_bar_unittest.cc ash/wm/screen_pinning_controller.h ash/wm/window_restore/pine_controller.cc base/BUILD.gn base/PRESUBMIT.py base/allocator/partition_alloc_support.cc +base/allocator/partition_allocator/PRESUBMIT.py base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h +base/allocator/partition_allocator/src/partition_alloc/build_config.h +base/allocator/partition_allocator/src/partition_alloc/in_slot_metadata.h base/allocator/partition_allocator/src/partition_alloc/oom.cc base/allocator/partition_allocator/src/partition_alloc/oom.h base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_win.h @@ -232,12 +252,13 @@ base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_win.cc base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h base/allocator/partition_allocator/src/partition_alloc/partition_alloc_unittest.cc -base/allocator/partition_allocator/src/partition_alloc/partition_ref_count.h base/allocator/partition_allocator/src/partition_alloc/partition_tls.h base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc -base/allocator/partition_allocator/src/partition_alloc/starscan/stack/asm/x64/push_registers_asm.cc -base/allocator/partition_allocator/src/partition_alloc/starscan/stack/stack.cc +base/allocator/partition_allocator/src/partition_alloc/stack/asm/x64/push_registers_asm.cc +base/allocator/partition_allocator/src/partition_alloc/stack/stack.cc +base/allocator/partition_allocator/src/partition_alloc/tagging.h +base/allocator/partition_allocator/src/partition_alloc/use_death_tests.h base/android/jni_android.cc base/android/jni_string.cc base/android/library_loader/library_loader_hooks.h @@ -259,10 +280,18 @@ base/debug/stack_trace_posix.cc base/debug/stack_trace_win.cc base/file_version_info.h base/files/file_enumerator_posix.cc +base/files/file_path_watcher_unittest.cc +base/files/file_path_watcher_win.cc base/files/file_unittest.cc base/files/file_util_posix.cc +base/files/file_util_unittest.cc base/files/file_util_win.cc base/files/file_win.cc +base/fuchsia/filtered_service_directory_unittest.cc +base/fuchsia/scoped_natural_service_binding_unittest.cc +base/fuchsia/scoped_natural_service_publisher_unittest.cc +base/fuchsia/scoped_service_binding_unittest.cc +base/fuchsia/scoped_service_publisher_unittest.cc base/functional/bind_internal.h base/functional/callback.h base/hash/hash.cc @@ -282,6 +311,7 @@ base/memory/scoped_refptr.h base/memory/shared_memory_mapping_unittest.cc base/memory/shared_memory_security_policy.cc base/memory/weak_ptr.h +base/message_loop/message_pump_android.h base/message_loop/message_pump_win.cc base/metrics/field_trial_list_including_low_anonymity.h base/metrics/histogram_functions.h @@ -289,6 +319,7 @@ base/metrics/histogram_macros.h base/metrics/statistics_recorder.cc base/metrics/user_metrics.h base/power_monitor/battery_level_provider_win.cc +base/power_monitor/cpu_frequency_utils.cc base/power_monitor/power_monitor_device_source_android.cc base/power_monitor/speed_limit_observer_win.cc base/process/launch.h @@ -311,6 +342,7 @@ base/task/sequenced_task_runner.h base/task/single_thread_task_executor_unittest.cc base/task/single_thread_task_runner.h base/task/task_traits.h +base/test/file_path_reparse_point_win.cc base/test/gtest_links_unittest.cc base/test/gtest_xml_unittest_result_printer_unittest.cc base/test/launcher/test_launcher.cc @@ -321,7 +353,6 @@ base/test/test_file_util.h base/test/test_file_util_win.cc base/test/test_suite.cc base/third_party/cityhash/city.h -base/third_party/dynamic_annotations/dynamic_annotations.h base/third_party/nspr/prtime.cc base/third_party/nspr/prtime.h base/third_party/symbolize/symbolize.cc @@ -339,6 +370,7 @@ base/trace_event/trace_category.h base/trace_event/trace_event_etw_export_win.cc base/trace_event/trace_logging_minimal_win.h base/tracing/stdlib/chrome/page_loads.sql +base/tracing/test/test_data.py base/values_unittest.cc base/win/event_trace_consumer.h base/win/object_watcher.cc @@ -427,7 +459,6 @@ build/install-build-deps.py build/ios/presubmit_support.py build/lacros/test_runner.py build/linux/install-chromeos-fonts.py -build/linux/sysroot_scripts/build_and_upload.py build/linux/sysroot_scripts/sysroots.json build/linux/unbundle/remove_bundled_libraries.py build/mac_toolchain.py @@ -441,11 +472,11 @@ build/skia_gold_common/PRESUBMIT.py build/toolchain/check_rewrapper_cfg.py build/toolchain/cros_toolchain.gni build/toolchain/gcc_toolchain.gni -build/toolchain/goma.gni build/toolchain/nacl/BUILD.gn build/toolchain/win/midl.py build/toolchain/win/rc/rc.py build/util/lib/common/perf_tests_results_helper.py +build/util/lib/proto/PRESUBMIT.py build/util/lib/results/result_sink.py build/vs_toolchain.py build/whitespace_file.txt @@ -456,18 +487,21 @@ cc/PRESUBMIT.py cc/input/browser_controls_offset_manager.cc cc/input/scroll_state.h cc/input/scrollbar_controller.h +cc/layers/heads_up_display_layer_impl.cc cc/metrics/average_lag_tracker.h cc/metrics/ukm_smoothness_data.h cc/paint/paint_image.h cc/raster/one_copy_raster_buffer_provider.cc cc/tiles/gpu_image_decode_cache.h cc/trees/layer_tree_host_impl.cc +cc/trees/layer_tree_host_unittest_animation.cc cc/trees/proxy_main.cc chrome/BUILD.gn chrome/PRESUBMIT.py chrome/android/chrome_public_apk_tmpl.gni chrome/android/expectations/lint-baseline.xml chrome/android/expectations/lint-suppressions.xml +chrome/android/features/tab_ui/java/strings/android_chrome_tab_ui_strings.grd chrome/android/java/res/values-sw600dp/values.xml chrome/android/java/res/values/dimens.xml chrome/android/java/res/values/strings.xml @@ -479,7 +513,6 @@ chrome/android/javatests/src/org/chromium/chrome/test/smoke/AndroidManifest_bund chrome/android/trichrome.gni chrome/android/webapk/PRESUBMIT.py chrome/android/webapk/shell_apk/manifest/javatest_manifest_config_delta.json -chrome/android/webapk/shell_apk/manifest/maps_go_manifest_config.json chrome/android/webapk/shell_apk/res/values/dimens.xml chrome/app/PRESUBMIT.py chrome/app/app_management_strings.grdp @@ -496,6 +529,8 @@ chrome/app/os_settings_strings.grdp chrome/app/password_manager_ui_strings.grdp chrome/app/profiles_strings.grdp chrome/app/resources/locale_settings.grd +chrome/app/settings_chromium_strings.grdp +chrome/app/settings_google_chrome_strings.grdp chrome/app/settings_strings.grdp chrome/app/shared_settings_strings.grdp chrome/app/theme/PRESUBMIT.py @@ -503,6 +538,7 @@ chrome/app/welcome_strings.grdp chrome/browser/about_flags.cc chrome/browser/accessibility/live_caption/live_caption_speech_recognition_host_browsertest.cc chrome/browser/android/compositor/scene_layer/contextual_search_scene_layer.cc +chrome/browser/android/cookies/cookies_fetcher_restore_util_browsertest.cc chrome/browser/android/customtabs/custom_tabs_browsertest.cc chrome/browser/android/customtabs/detached_resource_request_unittest.cc chrome/browser/android/examples/custom_tabs_client/src/res/values/strings.xml @@ -512,7 +548,6 @@ chrome/browser/android/history_report/delta_file_commons_unittest.cc chrome/browser/android/omnibox/chrome_omnibox_navigation_observer_android_unittest.cc chrome/browser/android/search_permissions/search_permissions_service.h chrome/browser/android/search_permissions/search_permissions_service_unittest.cc -chrome/browser/android/signin/signin_manager_android_unittest.cc chrome/browser/android/signin/web_signin_bridge_unittest.cc chrome/browser/android/tab_android.cc chrome/browser/android/vr/PRESUBMIT.py @@ -523,18 +558,22 @@ chrome/browser/apps/almanac_api_client/almanac_api_util_unittest.cc chrome/browser/apps/almanac_api_client/almanac_icon_cache.cc chrome/browser/apps/almanac_api_client/device_info_manager.cc chrome/browser/apps/almanac_api_client/proto_file_manager_unittest.cc -chrome/browser/apps/app_deduplication_service/app_deduplication_server_connector.cc +chrome/browser/apps/app_deduplication_service/app_deduplication_almanac_endpoint.cc chrome/browser/apps/app_deduplication_service/app_deduplication_service_unittest.cc chrome/browser/apps/app_discovery_service/app_discovery_service_unittest.cc -chrome/browser/apps/app_discovery_service/launcher_app_almanac_connector.cc +chrome/browser/apps/app_discovery_service/launcher_app_almanac_endpoint.cc chrome/browser/apps/app_discovery_service/recommended_arc_app_fetcher_unittest.cc chrome/browser/apps/app_discovery_service/recommended_arc_apps/recommend_apps_fetcher_impl.cc chrome/browser/apps/app_discovery_service/recommended_arc_apps/recommend_apps_fetcher_impl_unittest.cc +chrome/browser/apps/app_preload_service/app_preload_almanac_endpoint.cc chrome/browser/apps/app_preload_service/app_preload_service_browsertest.cc chrome/browser/apps/app_preload_service/preload_app_definition_unittest.cc chrome/browser/apps/app_service/app_icon/app_icon_loader.cc -chrome/browser/apps/app_service/app_install/app_install_almanac_connector.cc -chrome/browser/apps/app_service/app_install/app_install_almanac_connector_unittest.cc +chrome/browser/apps/app_service/app_install/app_install_almanac_endpoint.cc +chrome/browser/apps/app_service/app_install/app_install_almanac_endpoint_unittest.cc +chrome/browser/apps/app_service/app_install/app_install_service_ash.cc +chrome/browser/apps/app_service/app_install/app_install_service_ash_browsertest.cc +chrome/browser/apps/app_service/app_install/app_install_service_ash_unittest.cc chrome/browser/apps/app_service/app_install/web_app_installer.cc chrome/browser/apps/app_service/app_install/web_app_installer_browsertest.cc chrome/browser/apps/app_service/app_service_proxy_lacros_unittest.cc @@ -552,6 +591,7 @@ chrome/browser/apps/digital_goods/digital_goods_ash.cc chrome/browser/apps/digital_goods/digital_goods_factory_impl.cc chrome/browser/apps/guest_view/web_view_browsertest.cc chrome/browser/apps/intent_helper/intent_chip_display_prefs_unittest.cc +chrome/browser/apps/link_capturing/link_capturing_navigation_throttle_browsertest.cc chrome/browser/apps/link_capturing/link_capturing_navigation_throttle_unittest.cc chrome/browser/apps/platform_apps/app_browsertest.cc chrome/browser/apps/platform_apps/app_window_browsertest.cc @@ -568,25 +608,26 @@ chrome/browser/ash/app_list/app_context_menu_unittest.cc chrome/browser/ash/app_list/app_list_sort_browsertest.cc chrome/browser/ash/app_list/app_list_test_util.cc chrome/browser/ash/app_list/app_service/app_service_app_model_builder_unittest.cc -chrome/browser/ash/app_list/arc/arc_usb_host_permission_browsertest.cc chrome/browser/ash/app_list/chrome_app_list_model_updater_browsertest.cc chrome/browser/ash/app_list/search/arc/arc_recommend_apps_fetcher_impl_unittest.cc chrome/browser/ash/app_list/search/arc/recommend_apps_fetcher_impl.cc chrome/browser/ash/app_list/search/common/string_util.cc chrome/browser/ash/app_list/search/common/string_util_unittest.cc chrome/browser/ash/app_list/search/essential_search/essential_search_manager.h +chrome/browser/ash/app_list/search/essential_search/essential_search_manager_unittest.cc chrome/browser/ash/app_list/search/essential_search/socs_cookie_fetcher.cc chrome/browser/ash/app_list/search/essential_search/socs_cookie_fetcher_unittest.cc chrome/browser/ash/app_list/search/local_image_search/image_annotation_worker.cc -chrome/browser/ash/app_list/search/manatee/manatee_cache.cc chrome/browser/ash/app_list/search/omnibox/omnibox_lacros_provider_unittest.cc chrome/browser/ash/app_list/search/omnibox/omnibox_provider_unittest.cc chrome/browser/ash/app_list/search/omnibox/omnibox_util.cc +chrome/browser/ash/app_mode/auto_sleep/device_weekly_scheduled_suspend_controller.cc chrome/browser/ash/app_mode/fake_cws.cc chrome/browser/ash/app_mode/kiosk_troubleshooting_tools_browsertest.cc chrome/browser/ash/app_restore/arc_app_single_restore_handler_unittest.cc chrome/browser/ash/app_restore/arc_ghost_window_view_unittest.cc chrome/browser/ash/app_restore/full_restore_service_unittest.cc +chrome/browser/ash/app_restore/informed_restore_browsertest.cc chrome/browser/ash/apps/apk_web_app_installer_browsertest.cc chrome/browser/ash/apps/apk_web_app_installer_unittest.cc chrome/browser/ash/arc/adbd/arc_adbd_monitor_bridge_unittest.cc @@ -601,7 +642,6 @@ chrome/browser/ash/arc/extensions/arc_support_message_host.cc chrome/browser/ash/arc/file_system_watcher/file_system_scanner.h chrome/browser/ash/arc/input_overlay/ui/editing_list.cc chrome/browser/ash/arc/input_overlay/ui/input_menu_view.cc -chrome/browser/ash/arc/instance_throttle/arc_kiosk_mode_throttle_observer_unittest.cc chrome/browser/ash/arc/intent_helper/arc_settings_service.cc chrome/browser/ash/arc/notification/arc_vm_data_migration_notifier_unittest.cc chrome/browser/ash/arc/policy/arc_android_management_checker_unittest.cc @@ -611,6 +651,7 @@ chrome/browser/ash/arc/session/arc_play_store_enabled_preference_handler_unittes chrome/browser/ash/arc/session/arc_session_manager_browsertest.cc chrome/browser/ash/arc/session/arc_session_manager_unittest.cc chrome/browser/ash/arc/tracing/arc_app_performance_tracing.cc +chrome/browser/ash/arc/tracing/overview_tracing_handler.cc chrome/browser/ash/assistant/assistant_util.cc chrome/browser/ash/assistant/assistant_util_unittest.cc chrome/browser/ash/attestation/attestation_ca_client.cc @@ -618,6 +659,7 @@ chrome/browser/ash/attestation/attestation_ca_client_unittest.cc chrome/browser/ash/attestation/platform_verification_flow_unittest.cc chrome/browser/ash/attestation/soft_bind_attestation_flow_impl_unittest.cc chrome/browser/ash/attestation/tpm_challenge_key_subtle_unittest.cc +chrome/browser/ash/bluetooth/bluetooth_log_controller_unittest.cc chrome/browser/ash/bluetooth/debug_logs_manager_unittest.cc chrome/browser/ash/bruschetta/bruschetta_download.cc chrome/browser/ash/cert_provisioning/cert_provisioning_test_helpers.cc @@ -630,9 +672,13 @@ chrome/browser/ash/crosapi/browser_data_back_migrator_browsertest.cc chrome/browser/ash/crosapi/browser_data_back_migrator_unittest.cc chrome/browser/ash/crosapi/browser_data_migrator_browsertest.cc chrome/browser/ash/crosapi/browser_data_migrator_unittest.cc +chrome/browser/ash/crosapi/browser_manager_unittest.cc chrome/browser/ash/crosapi/browser_util_unittest.cc chrome/browser/ash/crosapi/local_printer_ash_unittest.cc chrome/browser/ash/crosapi/network_settings_translation_unittest.cc +chrome/browser/ash/crosapi/one_drive_integration_service_ash_unittest.cc +chrome/browser/ash/crosapi/search_controller_ash_unittest.cc +chrome/browser/ash/crosapi/search_controller_factory_ash_unittest.cc chrome/browser/ash/crostini/crostini_installer.h chrome/browser/ash/crostini/crostini_simple_types.h chrome/browser/ash/crostini/crostini_util.h @@ -664,7 +710,9 @@ chrome/browser/ash/file_suggest/item_suggest_cache.h chrome/browser/ash/file_suggest/item_suggest_cache_unittest.cc chrome/browser/ash/file_system_provider/fileapi/provider_async_file_util.h chrome/browser/ash/floating_workspace/floating_workspace_service_unittest.cc +chrome/browser/ash/growth/campaigns_manager_interactive_uitest.cc chrome/browser/ash/growth/install_web_app_action_unittest.cc +chrome/browser/ash/growth/open_url_action_performer_unittest.cc chrome/browser/ash/hats/hats_dialog.cc chrome/browser/ash/http_auth_dialog.h chrome/browser/ash/input_method/assistive_input_denylist.cc @@ -673,8 +721,6 @@ chrome/browser/ash/input_method/assistive_suggester_client_filter.cc chrome/browser/ash/input_method/assistive_suggester_client_filter_unittest.cc chrome/browser/ash/input_method/editor_feedback_unittest.cc chrome/browser/ash/input_method/editor_switch_unittest.cc -chrome/browser/ash/input_method/input_method_settings.cc -chrome/browser/ash/input_method/input_method_settings_unittest.cc chrome/browser/ash/input_method/ui/candidate_window_view.cc chrome/browser/ash/kerberos/kerberos_credentials_manager_unittest.cc chrome/browser/ash/login/app_mode/kiosk_launch_controller_unittest.cc @@ -683,7 +729,6 @@ chrome/browser/ash/login/ash_hud_login_browsertest.cc chrome/browser/ash/login/device_family_link_allowed_policy_browsertest.cc chrome/browser/ash/login/encryption_migration_browsertest.cc chrome/browser/ash/login/existing_user_controller_browsertest.cc -chrome/browser/ash/login/hats_unlock_survey_trigger_unittest.cc chrome/browser/ash/login/help_app_launcher.h chrome/browser/ash/login/lock/lock_screen_integration_test.cc chrome/browser/ash/login/login_browsertest.cc @@ -692,6 +737,7 @@ chrome/browser/ash/login/login_ui_keyboard_browsertest.cc chrome/browser/ash/login/login_ui_shelf_visibility_browsertest.cc chrome/browser/ash/login/marketing_backend_connector.cc chrome/browser/ash/login/misconfigured_user_browsertest.cc +chrome/browser/ash/login/oobe_apps_service/oobe_apps_almanac_endpoint.cc chrome/browser/ash/login/oobe_quick_start/connectivity/account_transfer_client_data.h chrome/browser/ash/login/oobe_quick_start/connectivity/connection_unittest.cc chrome/browser/ash/login/oobe_quick_start/second_device_auth_broker.cc @@ -704,6 +750,8 @@ chrome/browser/ash/login/saml/saml_browsertest.cc chrome/browser/ash/login/saml/saml_lockscreen_browsertest.cc chrome/browser/ash/login/screens/arc_vm_data_migration_screen_unittest.cc chrome/browser/ash/login/screens/assistant_optin_flow_screen_browsertest.cc +chrome/browser/ash/login/screens/categories_selection_screen_browsertest.cc +chrome/browser/ash/login/screens/personalized_recommend_apps_screen_browsertest.cc chrome/browser/ash/login/screens/quick_start_screen_browsertest.cc chrome/browser/ash/login/screens/recommend_apps_screen_browsertest.cc chrome/browser/ash/login/screens/user_selection_screen_browsertest.cc @@ -711,6 +759,7 @@ chrome/browser/ash/login/shill_profile_loading_browsertest.cc chrome/browser/ash/login/signin/device_id_browsertest.cc chrome/browser/ash/login/signin/oauth2_browsertest.cc chrome/browser/ash/login/test/logged_in_user_mixin.cc +chrome/browser/ash/login/test/logged_in_user_mixin.h chrome/browser/ash/login/test/login_manager_mixin.cc chrome/browser/ash/login/test/login_manager_mixin.h chrome/browser/ash/login/ui/captive_portal_view.cc @@ -733,7 +782,6 @@ chrome/browser/ash/net/network_portal_detector_impl_browsertest.cc chrome/browser/ash/notifications/multi_capture_notifications_unittest.cc chrome/browser/ash/os_feedback/chrome_os_feedback_delegate_browsertest.cc chrome/browser/ash/os_url_handler_browsertest.cc -chrome/browser/ash/passkeys/passkey_authenticator_service_ash_unittest.cc chrome/browser/ash/phonehub/browser_tabs_model_provider_impl_unittest.cc chrome/browser/ash/plugin_vm/plugin_vm_diagnostics.cc chrome/browser/ash/plugin_vm/plugin_vm_installer_unittest.cc @@ -754,6 +802,7 @@ chrome/browser/ash/policy/dlp/dlp_files_controller_ash_unittest.cc chrome/browser/ash/policy/enrollment/account_status_check_fetcher_unittest.cc chrome/browser/ash/policy/enrollment/auto_enrollment_type_checker.cc chrome/browser/ash/policy/enrollment/auto_enrollment_type_checker_unittest.cc +chrome/browser/ash/policy/handlers/multi_screen_capture_policy_handler_unittest.cc chrome/browser/ash/policy/login/login_policy_test_base.cc chrome/browser/ash/policy/networking/network_policy_application_browsertest.cc chrome/browser/ash/policy/remote_commands/crd/crd_oauth_token_fetcher.cc @@ -772,6 +821,7 @@ chrome/browser/ash/printing/synced_printers_manager_unittest.cc chrome/browser/ash/proxy_config_service_impl_unittest.cc chrome/browser/ash/release_notes/release_notes_notification_unittest.cc chrome/browser/ash/release_notes/release_notes_storage_unittest.cc +chrome/browser/ash/scalable_iph/scalable_iph_browsertest.cc chrome/browser/ash/scalable_iph/scalable_iph_delegate_impl.cc chrome/browser/ash/scanning/chrome_scanning_app_delegate_unittest.cc chrome/browser/ash/scheduler_configuration_manager.h @@ -786,9 +836,10 @@ chrome/browser/ash/system_web_apps/apps/help_app/help_app_notification_controlle chrome/browser/ash/system_web_apps/apps/personalization_app/personalization_app_sea_pen_provider_impl_unittest.cc chrome/browser/ash/system_web_apps/apps/personalization_app/personalization_app_utils_unittest.cc chrome/browser/ash/tpm_firmware_update.h -chrome/browser/ash/trusted_vault/trusted_vault_backend_service_ash_unittest.cc +chrome/browser/ash/trusted_vault/trusted_vault_backend_ash_unittest.cc chrome/browser/ash/u2f_notification.cc chrome/browser/ash/url_handler_browsertest.cc +chrome/browser/ash/wallpaper_handlers/sea_pen_fetcher.cc chrome/browser/ash/wallpaper_handlers/wallpaper_handlers.cc chrome/browser/ash/wallpaper_handlers/wallpaper_handlers_unittest.cc chrome/browser/autocomplete/autocomplete_browsertest.cc @@ -800,7 +851,6 @@ chrome/browser/autofill/android/save_update_address_profile_prompt_controller_un chrome/browser/autofill/autofill_browsertest.cc chrome/browser/autofill/autofill_captured_sites_interactive_uitest.cc chrome/browser/autofill/autofill_interactive_uitest.cc -chrome/browser/autofill/autofill_offer_notification_infobar_delegate_mobile_unittest.cc chrome/browser/autofill/autofill_server_browsertest.cc chrome/browser/autofill/automated_tests/cache_replayer.cc chrome/browser/autofill/automated_tests/cache_replayer.h @@ -823,8 +873,6 @@ chrome/browser/browser_switcher/ieem_sitelist_parser_unittest.cc chrome/browser/browsing_data/browsing_data_remover_browsertest.cc chrome/browser/browsing_data/chrome_browsing_data_model_delegate_unittest.cc chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc -chrome/browser/browsing_data/cookies_tree_model.cc -chrome/browser/browsing_data/cookies_tree_model_unittest.cc chrome/browser/browsing_data/counters/bookmark_counter_unittest.cc chrome/browser/browsing_data/counters/history_counter_browsertest.cc chrome/browser/browsing_data/counters/passwords_counter_browsertest.cc @@ -856,7 +904,10 @@ chrome/browser/chromeos/extensions/desk_api/desk_api_extension_manager.cc chrome/browser/chromeos/extensions/desk_api/desk_api_extension_manager.h chrome/browser/chromeos/extensions/odfs_config_private/odfs_config_private_api_unittest.cc chrome/browser/chromeos/extensions/telemetry/api/common/api_guard_delegate_unittest.cc +chrome/browser/chromeos/launcher_search/search_util.cc +chrome/browser/chromeos/mahi/mahi_web_contents_manager.cc chrome/browser/chromeos/network/network_portal_signin_window_ash_browsertest.cc +chrome/browser/chromeos/network/network_portal_signin_window_lacros_browsertest.cc chrome/browser/chromeos/platform_keys/extension_key_permissions_service.cc chrome/browser/chromeos/platform_keys/extension_platform_keys_service.cc chrome/browser/chromeos/policy/default_notifications_setting_browsertest.cc @@ -867,6 +918,7 @@ chrome/browser/chromeos/policy/dlp/dlp_policy_constants.h chrome/browser/chromeos/policy/dlp/dlp_rules_manager_impl.cc chrome/browser/chromeos/policy/dlp/dlp_rules_manager_impl_unittest.cc chrome/browser/chromeos/policy/dlp/dlp_scoped_file_access_delegate_unittest.cc +chrome/browser/chromeos/printing/print_preview/print_settings_converter_unittest.cc chrome/browser/chromeos/reporting/metric_reporting_prefs_unittest.cc chrome/browser/chromeos/tablet_mode/chrome_content_browser_client_tablet_mode_part_unittest.cc chrome/browser/companion/core/utils.cc @@ -886,12 +938,13 @@ chrome/browser/content_settings/sound_content_setting_observer_unittest.cc chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc chrome/browser/device_identity/device_oauth2_token_service_unittest.cc chrome/browser/device_notifications/device_connection_tracker_unittest.cc -chrome/browser/devtools/aida_client.cc chrome/browser/devtools/device/adb/adb_client_socket_browsertest.cc chrome/browser/devtools/device/adb/mock_adb_server.cc chrome/browser/devtools/devtools_browsertest.cc +chrome/browser/devtools/devtools_ui_bindings.cc chrome/browser/devtools/devtools_ui_bindings_unittest.cc chrome/browser/devtools/protocol/devtools_protocol_browsertest.cc +chrome/browser/devtools/protocol/devtools_pwa_browsertest.cc chrome/browser/devtools/url_constants.cc chrome/browser/dips/cookie_access_filter_unittest.cc chrome/browser/dips/dips_bounce_detector_browsertest.cc @@ -906,7 +959,7 @@ chrome/browser/download/save_page_browsertest.cc chrome/browser/engagement/important_sites_util_browsertest.cc chrome/browser/engagement/important_sites_util_unittest.cc chrome/browser/engagement/site_engagement_service_unittest.cc -chrome/browser/enterprise/connectors/analysis/analysis_service_settings_unittest.cc +chrome/browser/enterprise/browser_management/browser_management_service.cc chrome/browser/enterprise/connectors/analysis/content_analysis_delegate_browsertest.cc chrome/browser/enterprise/connectors/analysis/content_analysis_delegate_unittest.cc chrome/browser/enterprise/connectors/analysis/content_analysis_dialog_browsertest.cc @@ -926,11 +979,13 @@ chrome/browser/enterprise/connectors/device_trust/signals/decorators/ash/ash_sig chrome/browser/enterprise/connectors/device_trust/signals/decorators/browser/browser_signals_decorator_unittest.cc chrome/browser/enterprise/connectors/device_trust/test/test_constants.cc chrome/browser/enterprise/connectors/reporting/reporting_service_settings_unittest.cc -chrome/browser/enterprise/connectors/service_provider_config.cc -chrome/browser/enterprise/connectors/service_provider_config_unittest.cc -chrome/browser/enterprise/data_controls/chrome_dlp_rules_manager_unittest.cc -chrome/browser/enterprise/data_controls/rules_service_unittest.cc -chrome/browser/enterprise/data_protection/data_protection_clipboard_utils_browsertests.cc +chrome/browser/enterprise/connectors/test/deep_scanning_test_utils.cc +chrome/browser/enterprise/data_controls/chrome_rules_service_unittest.cc +chrome/browser/enterprise/data_controls/reporting_service_unittest.cc +chrome/browser/enterprise/data_protection/clipboard_browsertest.cc +chrome/browser/enterprise/data_protection/data_protection_clipboard_utils_browsertest.cc +chrome/browser/enterprise/data_protection/data_protection_navigation_observer_unittest.cc +chrome/browser/enterprise/data_protection/paste_allowed_request_unittest.cc chrome/browser/enterprise/data_protection/print_utils_unittest.cc chrome/browser/enterprise/platform_auth/cloud_ap_provider_win.cc chrome/browser/enterprise/profile_management/profile_management_navigation_throttle.cc @@ -946,8 +1001,6 @@ chrome/browser/enterprise/util/managed_browser_utils.cc chrome/browser/enterprise/util/managed_browser_utils.h chrome/browser/error_reporting/chrome_js_error_report_processor_nonchromeos.cc chrome/browser/error_reporting/chrome_js_error_report_processor_unittest.cc -chrome/browser/extensions/active_tab_apitest.cc -chrome/browser/extensions/active_tab_unittest.cc chrome/browser/extensions/activity_log/activity_log_policy_unittest.cc chrome/browser/extensions/activity_log/activity_log_unittest.cc chrome/browser/extensions/activity_log/counting_policy_unittest.cc @@ -1020,7 +1073,6 @@ chrome/browser/extensions/chrome_extension_function_details.cc chrome/browser/extensions/component_extensions_allowlist/allowlist.h chrome/browser/extensions/content_script_apitest.cc chrome/browser/extensions/convert_user_script_unittest.cc -chrome/browser/extensions/corb_and_cors_extension_browsertest.cc chrome/browser/extensions/crx_installer_browsertest.cc chrome/browser/extensions/cws_info_service.cc chrome/browser/extensions/extension_action_runner_unittest.cc @@ -1032,6 +1084,7 @@ chrome/browser/extensions/extension_loading_browsertest.cc chrome/browser/extensions/extension_override_apitest.cc chrome/browser/extensions/extension_prefs_unittest.cc chrome/browser/extensions/extension_service_sync_unittest.cc +chrome/browser/extensions/extension_service_test_base.cc chrome/browser/extensions/extension_service_unittest.cc chrome/browser/extensions/extension_sync_data_unittest.cc chrome/browser/extensions/extension_tab_util_browsertest.cc @@ -1050,14 +1103,17 @@ chrome/browser/extensions/menu_manager_unittest.cc chrome/browser/extensions/native_bindings_apitest.cc chrome/browser/extensions/navigation_extension_enabler.cc chrome/browser/extensions/navigation_extension_enabler_browsertest.cc +chrome/browser/extensions/orb_and_cors_extension_browsertest.cc chrome/browser/extensions/permission_message_combinations_unittest.cc -chrome/browser/extensions/permissions_updater.cc -chrome/browser/extensions/permissions_updater_unittest.cc +chrome/browser/extensions/permissions/active_tab_apitest.cc +chrome/browser/extensions/permissions/active_tab_unittest.cc +chrome/browser/extensions/permissions/permissions_updater.cc +chrome/browser/extensions/permissions/permissions_updater_unittest.cc +chrome/browser/extensions/permissions/scripting_permissions_modifier.h +chrome/browser/extensions/permissions/scripting_permissions_modifier_unittest.cc chrome/browser/extensions/policy_handlers_unittest.cc chrome/browser/extensions/process_management_browsertest.cc chrome/browser/extensions/script_injection_tracker_browsertest.cc -chrome/browser/extensions/scripting_permissions_modifier.h -chrome/browser/extensions/scripting_permissions_modifier_unittest.cc chrome/browser/extensions/updater/chrome_extension_downloader_factory.cc chrome/browser/extensions/updater/chrome_update_client_config.cc chrome/browser/extensions/updater/extension_updater_unittest.cc @@ -1071,7 +1127,9 @@ chrome/browser/favicon/favicon_utils_unittest.cc chrome/browser/feed/android/feed_reliability_logging_bridge.cc chrome/browser/feedback/android/family_info_feedback_source_unittest.cc chrome/browser/feedback/show_feedback_page.cc +chrome/browser/feedback/system_logs/log_sources/chrome_root_store_log_source.cc chrome/browser/feedback/system_logs/log_sources/crash_ids_source.cc +chrome/browser/feedback/system_logs/log_sources/family_info_log_source_unittest.cc chrome/browser/file_system_access/cloud_identifier/cloud_identifier_util_ash.cc chrome/browser/file_system_access/cloud_identifier/cloud_identifier_util_ash_browsertest.cc chrome/browser/first_run/first_run_unittest.cc @@ -1094,7 +1152,6 @@ chrome/browser/importer/firefox_profile_lock_posix.cc chrome/browser/importer/firefox_profile_lock_win.cc chrome/browser/importer/ie_importer_browsertest_win.cc chrome/browser/importer/profile_writer_unittest.cc -chrome/browser/installable/installable_manager_browsertest.cc chrome/browser/ip_protection/ip_protection_config_http.cc chrome/browser/k_anonymity_service/k_anonymity_service_client_browsertest.cc chrome/browser/k_anonymity_service/k_anonymity_service_client_unittest.cc @@ -1106,6 +1163,7 @@ chrome/browser/lacros/app_mode/kiosk_session_service_browsertest.cc chrome/browser/lacros/browser_service_lacros.cc chrome/browser/lacros/browser_service_lacros_browsertest.cc chrome/browser/lacros/desk_template_client_lacros_browsertest.cc +chrome/browser/lacros/full_restore_client_lacros_browsertest.cc chrome/browser/lacros/fullscreen_controller_client_lacros_unittest.cc chrome/browser/lacros/lacros_url_handling_unittest.cc chrome/browser/lacros/net/network_settings_observer_browsertest.cc @@ -1144,12 +1202,15 @@ chrome/browser/media/webrtc/webrtc_browsertest_common.cc chrome/browser/media/webrtc/webrtc_event_log_uploader.cc chrome/browser/media/webrtc/webrtc_log_uploader.cc chrome/browser/media_galleries/fileapi/media_path_filter.cc +chrome/browser/metrics/chrome_metrics_service_client.cc chrome/browser/metrics/chrome_metrics_service_client_ash_unittest.cc chrome/browser/metrics/family_link_user_metrics_provider_unittest.cc chrome/browser/metrics/family_user_metrics_provider_browsertest.cc +chrome/browser/metrics/per_user_state_manager_chromeos_browsertest.cc chrome/browser/metrics/perf/perf_events_collector.cc chrome/browser/metrics/testing/sync_metrics_test_utils.cc chrome/browser/metrics/usage_scenario/tab_usage_scenario_tracker.cc +chrome/browser/metrics/usage_scenario/tab_usage_scenario_tracker_unittest.cc chrome/browser/metrics/variations/variations_http_headers_browsertest.cc chrome/browser/nacl_host/nacl_infobar_delegate.cc chrome/browser/navigation_predictor/anchor_element_preloader_browsertest.cc @@ -1168,7 +1229,6 @@ chrome/browser/nearby_sharing/instantmessaging/constants.h chrome/browser/nearby_sharing/instantmessaging/stream_parser.cc chrome/browser/nearby_sharing/local_device_data/nearby_share_device_data_updater_impl_unittest.cc chrome/browser/nearby_sharing/local_device_data/nearby_share_local_device_data_manager_impl_unittest.cc -chrome/browser/nearby_sharing/nearby_connections_manager_impl_unittest.cc chrome/browser/nearby_sharing/nearby_notification_manager_unittest.cc chrome/browser/nearby_sharing/nearby_share_profile_info_provider_impl_unittest.cc chrome/browser/nearby_sharing/network_traversal_ice_config_fetcher.cc @@ -1178,7 +1238,6 @@ chrome/browser/nearby_sharing/tachyon_ice_config_fetcher.cc chrome/browser/nearby_sharing/tachyon_ice_config_fetcher_unittest.cc chrome/browser/nearby_sharing/text_attachment_unittest.cc chrome/browser/net/cert_verify_proc_browsertest.cc -chrome/browser/net/dns_over_https_browsertest.cc chrome/browser/net/dns_probe_runner.cc chrome/browser/net/dns_probe_runner.h chrome/browser/net/errorpage_browsertest.cc @@ -1188,8 +1247,8 @@ chrome/browser/net/sandboxed_network_change_notifier_win_browsertest.cc chrome/browser/net/service_providers_win.cc chrome/browser/net/stub_resolver_config_reader_browsertest.cc chrome/browser/net/system_network_context_manager_browsertest.cc -chrome/browser/new_tab_page/modules/drive/drive_service.cc -chrome/browser/new_tab_page/modules/drive/drive_service_unittest.cc +chrome/browser/new_tab_page/modules/file_suggestion/drive_service.cc +chrome/browser/new_tab_page/modules/file_suggestion/drive_service_unittest.cc chrome/browser/new_tab_page/modules/history_clusters/cart/cart_processor.cc chrome/browser/new_tab_page/modules/history_clusters/cart/cart_processor_unittest.cc chrome/browser/new_tab_page/modules/history_clusters/history_clusters_module_util.cc @@ -1202,6 +1261,10 @@ chrome/browser/new_tab_page/modules/new_tab_page_modules_unittest.cc chrome/browser/new_tab_page/modules/photos/photos_service.cc chrome/browser/new_tab_page/modules/photos/photos_service_unittest.cc chrome/browser/new_tab_page/modules/recipes/recipes_service_unittest.cc +chrome/browser/new_tab_page/modules/v2/calendar/google_calendar_page_handler.cc +chrome/browser/new_tab_page/modules/v2/calendar/google_calendar_page_handler_unittest.cc +chrome/browser/new_tab_page/modules/v2/most_relevant_tab_resumption/most_relevant_tab_resumption_page_handler.cc +chrome/browser/new_tab_page/modules/v2/most_relevant_tab_resumption/most_relevant_tab_resumption_page_handler_unittest.cc chrome/browser/new_tab_page/modules/v2/tab_resumption/tab_resumption_util.h chrome/browser/new_tab_page/one_google_bar/one_google_bar_loader_impl.cc chrome/browser/new_tab_page/promos/promo_service_unittest.cc @@ -1221,8 +1284,10 @@ chrome/browser/optimization_guide/hints_fetcher_browsertest.cc chrome/browser/optimization_guide/model_execution/model_execution_browsertest.cc chrome/browser/optimization_guide/model_execution/model_execution_validation_browsertest.cc chrome/browser/optimization_guide/optimization_guide_keyed_service_browsertest.cc -chrome/browser/optimization_guide/page_content_annotations_service_browsertest.cc chrome/browser/origin_trials/origin_trials_browsertest.cc +chrome/browser/os_crypt/app_bound_encryption_win.cc +chrome/browser/page_content_annotations/page_content_annotations_service_browsertest.cc +chrome/browser/page_image_service/android/image_service_bridge_unittest.cc chrome/browser/page_load_metrics/observers/core/amp_page_load_metrics_observer.h chrome/browser/page_load_metrics/observers/core/amp_page_load_metrics_observer_unittest.cc chrome/browser/page_load_metrics/observers/core/ukm_page_load_metrics_observer_unittest.cc @@ -1244,11 +1309,15 @@ chrome/browser/page_load_metrics/observers/security_state_page_load_metrics_obse chrome/browser/page_load_metrics/observers/service_worker_page_load_metrics_observer.cc chrome/browser/page_load_metrics/observers/service_worker_page_load_metrics_observer_unittest.cc chrome/browser/password_check/android/password_check_manager_unittest.cc +chrome/browser/password_manager/android/account_storage_notice/BUILD.gn +chrome/browser/password_manager/android/android_backend_with_double_deletion_unittest.cc chrome/browser/password_manager/android/built_in_backend_to_android_backend_migrator_unittest.cc chrome/browser/password_manager/android/chromesync_status_code.h chrome/browser/password_manager/android/credential_leak_controller_android_unittest.cc +chrome/browser/password_manager/android/legacy_password_store_backend_migration_decorator_unittest.cc chrome/browser/password_manager/android/password_checkup_launcher_helper.h chrome/browser/password_manager/android/password_checkup_launcher_helper_impl.h +chrome/browser/password_manager/android/password_infobar_utils_unittest.cc chrome/browser/password_manager/android/password_manager_android_util_unittest.cc chrome/browser/password_manager/android/password_manager_settings_service_android_impl_unittest.cc chrome/browser/password_manager/android/password_settings_updater_android_bridge_helper_impl_unittest.cc @@ -1266,15 +1335,16 @@ chrome/browser/payments/manifest_verifier_browsertest.cc chrome/browser/payments/payment_handler_just_in_time_installation_browsertest.cc chrome/browser/payments/payment_request_app_store_billing_browsertest.cc chrome/browser/payments/service_worker_payment_app_finder_browsertest.cc -chrome/browser/pdf/pdf_extension_test.cc chrome/browser/performance_manager/policies/page_discarding_helper_unittest.cc chrome/browser/performance_manager/policies/report_page_processes_policy.cc chrome/browser/permissions/chrome_permission_manager_unittest.cc chrome/browser/permissions/chrome_permission_request_manager_unittest.cc chrome/browser/permissions/notifications_engagement_service_unittest.cc chrome/browser/permissions/permission_context_base_permissions_policy_unittest.cc +chrome/browser/permissions/permission_element_origin_trial_browsertest.cc chrome/browser/permissions/permissions_security_model_interactive_uitest.cc chrome/browser/permissions/quiet_permission_prompt_model_android.cc +chrome/browser/permissions/system/system_permission_settings.h chrome/browser/platform_util_win.cc chrome/browser/policy/cloud/cloud_policy_browsertest.cc chrome/browser/policy/cloud/cloud_policy_invalidator.h @@ -1297,9 +1367,11 @@ chrome/browser/policy/webusb_allow_devices_for_urls_policy_handler_unittest.cc chrome/browser/predictors/autocomplete_action_predictor_table_unittest.cc chrome/browser/predictors/lcp_critical_path_predictor/lcp_critical_path_predictor_util.cc chrome/browser/predictors/lcp_critical_path_predictor/lcp_critical_path_predictor_util.h +chrome/browser/predictors/lcp_critical_path_predictor/lcp_critical_path_predictor_util_unittest.cc chrome/browser/predictors/lcp_critical_path_predictor/prewarm_http_disk_cache_manager.cc chrome/browser/predictors/loading_data_collector_unittest.cc chrome/browser/predictors/loading_predictor_browsertest.cc +chrome/browser/predictors/loading_predictor_config.h chrome/browser/predictors/loading_predictor_unittest.cc chrome/browser/predictors/loading_stats_collector_unittest.cc chrome/browser/predictors/preconnect_manager_unittest.cc @@ -1321,6 +1393,7 @@ chrome/browser/preloading/preview/preview_navigation_throttle.h chrome/browser/preloading/preview/preview_zoom_controller.h chrome/browser/printing/print_preview_dialog_controller_unittest.cc chrome/browser/privacy/secure_dns_bridge.cc +chrome/browser/privacy_sandbox/privacy_sandbox_service.h chrome/browser/privacy_sandbox/privacy_sandbox_service_impl.cc chrome/browser/privacy_sandbox/privacy_sandbox_service_impl_unittest.cc chrome/browser/private_network_access/private_network_device_chooser_controller_unittest.cc @@ -1342,11 +1415,14 @@ chrome/browser/profiles/profile_manager_browsertest.cc chrome/browser/profiles/profile_manager_unittest.cc chrome/browser/profiles/profile_shortcut_manager_browsertest_win.cc chrome/browser/profiles/profile_shortcut_manager_win.cc +chrome/browser/profiles/profiles_state_unittest.cc chrome/browser/push_messaging/push_messaging_constants.cc chrome/browser/push_messaging/push_messaging_notification_manager.h chrome/browser/push_messaging/push_messaging_notification_manager_unittest.cc chrome/browser/push_messaging/push_messaging_service_impl.cc chrome/browser/push_notification/server_client/push_notification_desktop_api_call_flow_impl_unittest.cc +chrome/browser/push_notification/server_client/push_notification_server_client_desktop_impl.cc +chrome/browser/push_notification/server_client/push_notification_server_client_desktop_impl_unittest.cc chrome/browser/reading_list/android/reading_list_manager_impl_unittest.cc chrome/browser/renderer_context_menu/link_to_text_menu_observer_interactive_uitest.cc chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc @@ -1354,20 +1430,22 @@ chrome/browser/renderer_context_menu/render_view_context_menu_unittest.cc chrome/browser/renderer_host/chrome_navigation_ui_data.h chrome/browser/resource_coordinator/tab_load_tracker_unittest.cc chrome/browser/resources/PRESUBMIT.py -chrome/browser/resources/about_sys/log_entry.ts chrome/browser/resources/accessibility/chromevox_helper_manifest.json.jinja2 chrome/browser/resources/accessibility/embedded_a11y_helper/service_worker.ts chrome/browser/resources/accessibility/embedded_a11y_helper_manifest.json.jinja2 -chrome/browser/resources/app_home/app_home_empty_page.html +chrome/browser/resources/accessibility/reading_mode_gdocs_helper_manifest.json.jinja2 +chrome/browser/resources/app_home/app_home_empty_page.html.ts chrome/browser/resources/app_settings/icons.html chrome/browser/resources/ash/settings/app_management_icons.html +chrome/browser/resources/ash/settings/controls/v2/settings_row.ts chrome/browser/resources/ash/settings/crostini_page/crostini_disk_resize_dialog.html chrome/browser/resources/ash/settings/device_page/stylus.ts chrome/browser/resources/ash/settings/icons.html +chrome/browser/resources/ash/settings/internal/storybook/settings_dropdown_row_storybook.html +chrome/browser/resources/ash/settings/internal/storybook/settings_row_storybook.html chrome/browser/resources/ash/settings/os_a11y_page/bluetooth_braille_display_manager.ts chrome/browser/resources/ash/settings/os_a11y_page/captions_subpage.ts chrome/browser/resources/ash/settings/os_a11y_page/keyboard_and_text_input_page.ts -chrome/browser/resources/ash/settings/os_a11y_page/manage_a11y_subpage.ts chrome/browser/resources/ash/settings/os_a11y_page/os_a11y_page.ts chrome/browser/resources/ash/settings/os_about_page/channel_switcher_dialog.html chrome/browser/resources/ash/settings/os_about_page/os_about_page.html @@ -1384,16 +1462,19 @@ chrome/browser/resources/bookmarks/command_manager.ts chrome/browser/resources/browsing_topics/browsing_topics_internals.html chrome/browser/resources/chromeos/about_os_credits.html chrome/browser/resources/chromeos/accessibility/accessibility_common/dictation/macros/list_commands_macro.ts +chrome/browser/resources/chromeos/accessibility/accessibility_common/facegaze/camera_stream.html +chrome/browser/resources/chromeos/accessibility/accessibility_common/facegaze/mouse_controller.ts chrome/browser/resources/chromeos/accessibility/chromevox/background/background_test.js chrome/browser/resources/chromeos/accessibility/chromevox/background/braille/braille_input_handler_test.js chrome/browser/resources/chromeos/accessibility/chromevox/background/download_handler.js -chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/editable_text_base_test.js -chrome/browser/resources/chromeos/accessibility/chromevox/background/input/command_handler.js +chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/editable_text_test.js +chrome/browser/resources/chromeos/accessibility/chromevox/background/input/command_handler.ts chrome/browser/resources/chromeos/accessibility/chromevox/common/locale_output_helper_test.js chrome/browser/resources/chromeos/accessibility/chromevox/common/spannable_test.js chrome/browser/resources/chromeos/accessibility/chromevox/panel/tutorial_test.js chrome/browser/resources/chromeos/accessibility/chromevox_manifest.json.jinja2 chrome/browser/resources/chromeos/accessibility/common/cursors/cursors_test.js +chrome/browser/resources/chromeos/accessibility/common/cursors/recovery_strategy_test.js chrome/browser/resources/chromeos/accessibility/common/flags.ts chrome/browser/resources/chromeos/accessibility/common/node_navigation_utils.ts chrome/browser/resources/chromeos/accessibility/common/node_utils.ts @@ -1431,7 +1512,7 @@ chrome/browser/resources/chromeos/emulator/icons.html chrome/browser/resources/chromeos/input_method/google_xkb_manifest.json chrome/browser/resources/chromeos/login/components/web_view_loader.ts chrome/browser/resources/chromeos/login/debug/debug.js -chrome/browser/resources/chromeos/login/debug/quick_start_debugger.js +chrome/browser/resources/chromeos/login/debug/quick_start_debugger.ts chrome/browser/resources/chromeos/login/screens/common/marketing_opt_in.html chrome/browser/resources/chromeos/login/screens/login/encryption_migration.ts chrome/browser/resources/chromeos/login/screens/login/offline_login.html @@ -1447,11 +1528,13 @@ chrome/browser/resources/gaia_auth_host/authenticator.js chrome/browser/resources/gaia_auth_host/password_change_authenticator.js chrome/browser/resources/gaia_auth_host/saml_handler.js chrome/browser/resources/gaia_auth_host/saml_password_attributes.js -chrome/browser/resources/hangout_services/manifest.json +chrome/browser/resources/hangout_services/manifest_v2.json +chrome/browser/resources/hangout_services/manifest_v3.json chrome/browser/resources/hats/hats.ts chrome/browser/resources/inspect/inspect.html chrome/browser/resources/internals/query_tiles/query_tiles_internals.html chrome/browser/resources/internals/query_tiles/query_tiles_internals.ts +chrome/browser/resources/key_value_pair_viewer_shared/key_value_pair_entry.ts chrome/browser/resources/media/mei_preload/manifest.json chrome/browser/resources/media/webrtc_logs.ts chrome/browser/resources/media_router/cast_feedback/cast_feedback_ui.ts @@ -1468,7 +1551,8 @@ chrome/browser/resources/new_tab_page/lens_form.ts chrome/browser/resources/new_tab_page/modules/drive/module.ts chrome/browser/resources/new_tab_page/modules/history_clusters/suggest_tile.ts chrome/browser/resources/new_tab_page/modules/photos/module.html -chrome/browser/resources/new_tab_page/modules/v2/drive/module.ts +chrome/browser/resources/new_tab_page/modules/v2/calendar/google_calendar_module.html +chrome/browser/resources/new_tab_page/modules/v2/file_suggestion/module.ts chrome/browser/resources/new_tab_page/modules/v2/history_clusters/suggest_tile.ts chrome/browser/resources/new_tab_page/transparency.ts chrome/browser/resources/new_tab_page/voice_search_overlay.ts @@ -1490,11 +1574,12 @@ chrome/browser/resources/settings/icons.html chrome/browser/resources/settings/incompatible_applications_page/incompatible_application_item.ts chrome/browser/resources/settings/languages_page/edit_dictionary_page.ts chrome/browser/resources/settings/settings_shared.css -chrome/browser/resources/side_panel/read_anything/read_anything.html +chrome/browser/resources/side_panel/read_anything/read_anything_toolbar.ts +chrome/browser/resources/side_panel/read_anything/voice_language_util.ts chrome/browser/resources/usb_internals/descriptor_panel.ts chrome/browser/resources/webstore_app/manifest.json chrome/browser/resources/webui_gallery/demos/card/card_demo.ts -chrome/browser/resources/webui_gallery/demos/cr_input/cr_input_demo.html +chrome/browser/resources/webui_gallery/demos/cr_input/cr_input_demo.html.ts chrome/browser/resources/webui_gallery/demos/cr_url_list_item/cr_url_list_item_demo.html chrome/browser/resources/webui_gallery/demos/side_panel/sp_components_demo.ts chrome/browser/rlz/chrome_rlz_tracker_web_contents_observer_unittest.cc @@ -1507,6 +1592,7 @@ chrome/browser/safe_browsing/chrome_ping_manager_factory_unittest.cc chrome/browser/safe_browsing/client_side_detection_host_unittest.cc chrome/browser/safe_browsing/cloud_content_scanning/cloud_binary_upload_service.cc chrome/browser/safe_browsing/cloud_content_scanning/cloud_binary_upload_service_unittest.cc +chrome/browser/safe_browsing/cloud_content_scanning/resumable_uploader_unittest.cc chrome/browser/safe_browsing/download_protection/check_client_download_request_base.cc chrome/browser/safe_browsing/download_protection/deep_scanning_browsertest.cc chrome/browser/safe_browsing/download_protection/deep_scanning_request_unittest.cc @@ -1546,6 +1632,7 @@ chrome/browser/sessions/session_restore_observer_unittest.cc chrome/browser/sessions/session_service.h chrome/browser/sessions/session_service_base.cc chrome/browser/sessions/session_service_unittest.cc +chrome/browser/sessions/tab_restore_browsertest.cc chrome/browser/sessions/tab_restore_service_unittest.cc chrome/browser/share/default_ranking_android.cc chrome/browser/sharing/click_to_call/click_to_call_utils_unittest.cc @@ -1580,6 +1667,7 @@ chrome/browser/signin/chromeos_mirror_account_consistency_browsertest.cc chrome/browser/signin/dice_browsertest.cc chrome/browser/signin/dice_response_handler_unittest.cc chrome/browser/signin/dice_signed_in_profile_creator_unittest.cc +chrome/browser/signin/dice_tab_helper_unittest.cc chrome/browser/signin/dice_web_signin_interceptor_browsertest.cc chrome/browser/signin/dice_web_signin_interceptor_unittest.cc chrome/browser/signin/e2e_tests/live_test.cc @@ -1604,7 +1692,7 @@ chrome/browser/ssl/stateful_ssl_host_state_delegate_test.cc chrome/browser/ssl/typed_navigation_upgrade_throttle_browsertest.cc chrome/browser/startup_data.h chrome/browser/storage/durable_storage_permission_context_unittest.cc -chrome/browser/storage_access_api/storage_access_grant_permission_context.cc +chrome/browser/storage_access_api/api_browsertest.cc chrome/browser/subresource_filter/subresource_filter_browsertest.cc chrome/browser/subresource_filter/subresource_filter_fenced_frame_browsertest.cc chrome/browser/supervised_user/android/java/res/drawable/ic_family_link.xml @@ -1623,12 +1711,14 @@ chrome/browser/sync/test/integration/password_manager_sync_test.cc chrome/browser/sync/test/integration/password_sharing_invitation_helper.cc chrome/browser/sync/test/integration/passwords_helper.cc chrome/browser/sync/test/integration/single_client_bookmarks_sync_test.cc +chrome/browser/sync/test/integration/single_client_common_sync_test.cc chrome/browser/sync/test/integration/single_client_custom_passphrase_sync_test.cc chrome/browser/sync/test/integration/single_client_extension_apps_sync_test.cc chrome/browser/sync/test/integration/single_client_history_sync_test.cc chrome/browser/sync/test/integration/single_client_preferences_sync_test.cc chrome/browser/sync/test/integration/single_client_send_tab_to_self_sync_test.cc chrome/browser/sync/test/integration/single_client_user_events_sync_test.cc +chrome/browser/sync/test/integration/single_client_wallet_credential_sync_test.cc chrome/browser/sync/test/integration/sync_auth_test.cc chrome/browser/sync/test/integration/sync_errors_test.cc chrome/browser/sync/test/integration/sync_service_impl_harness.cc @@ -1660,11 +1750,21 @@ chrome/browser/ui/android/strings/android_chrome_strings.grd chrome/browser/ui/ash/ambient/ambient_client_impl.cc chrome/browser/ui/ash/ambient/ambient_client_impl_unittest.cc chrome/browser/ui/ash/api/tasks/chrome_tasks_delegate.cc +chrome/browser/ui/ash/api/tasks/tasks_client_impl.cc +chrome/browser/ui/ash/api/tasks/tasks_client_impl_unittest.cc chrome/browser/ui/ash/app_list/app_list_interactive_uitest.cc chrome/browser/ui/ash/arc_open_url_delegate_impl_browsertest.cc chrome/browser/ui/ash/ash_web_view_impl_browsertest.cc chrome/browser/ui/ash/assistant/assistant_state_client_unittest.cc chrome/browser/ui/ash/assistant/assistant_test_mixin.cc +chrome/browser/ui/ash/birch/birch_browsertest.cc +chrome/browser/ui/ash/birch/birch_calendar_fetcher.cc +chrome/browser/ui/ash/birch/birch_calendar_fetcher_unittest.cc +chrome/browser/ui/ash/birch/birch_keyed_service_unittest.cc +chrome/browser/ui/ash/birch/birch_weather_v2_provider.cc +chrome/browser/ui/ash/birch/refresh_token_waiter_unittest.cc +chrome/browser/ui/ash/calendar/calendar_client_impl.cc +chrome/browser/ui/ash/calendar/calendar_client_impl_unittest.cc chrome/browser/ui/ash/calendar/calendar_keyed_service.cc chrome/browser/ui/ash/calendar/calendar_keyed_service_unittest.cc chrome/browser/ui/ash/chrome_shell_delegate.cc @@ -1678,6 +1778,7 @@ chrome/browser/ui/ash/google_one_offer_iph_tab_helper_browsertest.cc chrome/browser/ui/ash/google_one_offer_iph_tab_helper_constants.h chrome/browser/ui/ash/holding_space/holding_space_keyed_service_unittest.cc chrome/browser/ui/ash/in_session_auth_dialog_client.cc +chrome/browser/ui/ash/network/network_portal_signin_controller_browsertest.cc chrome/browser/ui/ash/network/network_portal_signin_controller_unittest.cc chrome/browser/ui/ash/projector/pending_screencast_manager.cc chrome/browser/ui/ash/projector/pending_screencast_manager_browsertest.cc @@ -1687,9 +1788,13 @@ chrome/browser/ui/ash/shelf/app_shortcut_shelf_item_controller.cc chrome/browser/ui/ash/shelf/browser_app_shelf_item_controller.cc chrome/browser/ui/ash/shelf/browser_shortcut_shelf_item_controller.cc chrome/browser/ui/ash/shelf/chrome_shelf_controller_unittest.cc +chrome/browser/ui/ash/shelf/chrome_shelf_prefs_unittest.cc chrome/browser/ui/ash/system_tray_client_impl.cc chrome/browser/ui/ash/system_tray_client_impl_browsertest.cc +chrome/browser/ui/ash/wallpaper_controller_client_impl.cc chrome/browser/ui/autofill/address_editor_controller_unittest.cc +chrome/browser/ui/autofill/autofill_bubble_signin_promo_controller_unittest.cc +chrome/browser/ui/autofill/autofill_signin_promo_tab_helper_browsertest.cc chrome/browser/ui/autofill/delete_address_profile_dialog_controller_impl_unittest.cc chrome/browser/ui/autofill/payments/offer_notification_bubble_controller_impl_unittest.cc chrome/browser/ui/autofill/payments/offer_notification_controller_android_browsertest.cc @@ -1701,6 +1806,7 @@ chrome/browser/ui/bookmarks/bookmark_ui_utils_desktop_unittest.cc chrome/browser/ui/browser_browsertest.cc chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_content_setting_bubble_model_delegate.cc +chrome/browser/ui/browser_finder.h chrome/browser/ui/browser_finder_unittest.cc chrome/browser/ui/browser_focus_uitest.cc chrome/browser/ui/browser_instant_controller_unittest.cc @@ -1710,6 +1816,7 @@ chrome/browser/ui/browser_navigator_iwa_browsertest.cc chrome/browser/ui/browser_navigator_params.h chrome/browser/ui/browser_tabstrip_browsertest_chromeos.cc chrome/browser/ui/chrome_pages.cc +chrome/browser/ui/chromeos/magic_boost/magic_boost_disclaimer_view.cc chrome/browser/ui/cocoa/applescript/bookmark_folder_applescript_browsertest.mm chrome/browser/ui/cocoa/applescript/tab_applescript.mm chrome/browser/ui/cocoa/applescript/window_applescript_browsertest.mm @@ -1721,7 +1828,6 @@ chrome/browser/ui/cocoa/share_menu_controller_browsertest.mm chrome/browser/ui/commerce/price_tracking_page_action_controller.cc chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc chrome/browser/ui/content_settings/content_setting_image_model_unittest.cc -chrome/browser/ui/cookie_controls/cookie_controls_controller_unittest.cc chrome/browser/ui/crypto_module_password_dialog_nss.cc chrome/browser/ui/dialogs/outdated_upgrade_bubble.cc chrome/browser/ui/extensions/controlled_home_bubble_delegate_unittest.cc @@ -1731,6 +1837,13 @@ chrome/browser/ui/extensions/installation_error_infobar_delegate.cc chrome/browser/ui/global_media_controls/presentation_request_notification_producer_unittest.cc chrome/browser/ui/hid/hid_chooser_controller_unittest.cc chrome/browser/ui/intent_picker_tab_helper_unittest.cc +chrome/browser/ui/lens/lens_overlay_controller_browsertest.cc +chrome/browser/ui/lens/lens_overlay_query_controller.cc +chrome/browser/ui/lens/lens_overlay_query_controller_unittest.cc +chrome/browser/ui/lens/lens_overlay_side_panel_coordinator.cc +chrome/browser/ui/lens/lens_overlay_side_panel_navigation_throttle_unittest.cc +chrome/browser/ui/lens/lens_overlay_url_builder_unittest.cc +chrome/browser/ui/lens/lens_untrusted_ui.cc chrome/browser/ui/login/http_auth_coordinator.h chrome/browser/ui/managed_ui.cc chrome/browser/ui/managed_ui_browsertest.cc @@ -1739,10 +1852,12 @@ chrome/browser/ui/media_router/media_router_ui_unittest.cc chrome/browser/ui/media_router/query_result_manager.h chrome/browser/ui/omnibox/omnibox_pedal_implementations.cc chrome/browser/ui/omnibox/omnibox_view_browsertest.cc +chrome/browser/ui/page_info/chrome_page_info_ui_delegate.cc chrome/browser/ui/passwords/account_storage_auth_helper_unittest.cc chrome/browser/ui/passwords/bubble_controllers/manage_passwords_bubble_controller_unittest.cc chrome/browser/ui/passwords/bubble_controllers/move_to_account_store_bubble_controller_unittest.cc chrome/browser/ui/passwords/manage_passwords_ui_controller_unittest.cc +chrome/browser/ui/passwords/password_cross_domain_confirmation_popup_controller_impl_unittest.cc chrome/browser/ui/passwords/password_manager_navigation_throttle_unittest.cc chrome/browser/ui/passwords/well_known_change_password_navigation_throttle.cc chrome/browser/ui/passwords/well_known_change_password_navigation_throttle_browsertest.cc @@ -1756,9 +1871,10 @@ chrome/browser/ui/safety_hub/password_status_check_service_unittest.cc chrome/browser/ui/search/ntp_user_data_logger_unittest.cc chrome/browser/ui/search/search_tab_helper.h chrome/browser/ui/search/third_party_ntp_browsertest.cc -chrome/browser/ui/side_panel/companion/exps_registration_success_observer_unittest.cc +chrome/browser/ui/signin/cookie_clear_on_exit_migration_notice_browsertest.cc chrome/browser/ui/signin/signin_reauth_view_controller_browsertest.cc chrome/browser/ui/signin/signin_view_controller.cc +chrome/browser/ui/signin/signin_view_controller_browsertest.cc chrome/browser/ui/signin/signin_view_controller_interactive_uitest.cc chrome/browser/ui/singleton_tabs_unittest.cc chrome/browser/ui/startup/chrome_for_testing_infobar_delegate.cc @@ -1767,13 +1883,16 @@ chrome/browser/ui/startup/first_run_service_unittest.cc chrome/browser/ui/startup/launch_mode_recorder_unittest.cc chrome/browser/ui/startup/startup_browser_creator_browsertest.cc chrome/browser/ui/startup/startup_tab_provider_unittest.cc +chrome/browser/ui/tab_helpers.cc chrome/browser/ui/tab_helpers.h +chrome/browser/ui/tab_sharing/tab_sharing_infobar_delegate_unittest.cc chrome/browser/ui/tabs/pinned_tab_codec_unittest.cc chrome/browser/ui/tabs/pinned_tab_service_browsertest.cc chrome/browser/ui/tabs/pinned_tab_service_unittest.cc chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_keyed_service_unittest.cc chrome/browser/ui/tabs/tab_strip_model_unittest.cc chrome/browser/ui/test/popup_fullscreen_browsertest.cc +chrome/browser/ui/toolbar/app_menu_model_interactive_uitest.cc chrome/browser/ui/toolbar/location_bar_model_unittest.cc chrome/browser/ui/toolbar/media_router/media_router_contextual_menu.cc chrome/browser/ui/url_identity_unittest.cc @@ -1786,6 +1905,7 @@ chrome/browser/ui/views/autofill/payments/offer_notification_bubble_views_test_b chrome/browser/ui/views/autofill/payments/save_card_bubble_views_browsertest.cc chrome/browser/ui/views/autofill/payments/virtual_card_manual_fallback_bubble_views_interactive_uitest.cc chrome/browser/ui/views/autofill/popup/popup_separator_view.h +chrome/browser/ui/views/autofill/popup/popup_view_views_browsertest.cc chrome/browser/ui/views/autofill/popup/popup_view_views_unittest.cc chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc @@ -1794,7 +1914,6 @@ chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc chrome/browser/ui/views/bookmarks/bookmark_context_menu_unittest.cc chrome/browser/ui/views/bookmarks/bookmark_menu_delegate_unittest.cc chrome/browser/ui/views/borealis/borealis_disallowed_dialog.cc -chrome/browser/ui/views/borealis/borealis_installer_error_dialog.cc chrome/browser/ui/views/commerce/price_tracking_bubble_dialog_view_unittest.cc chrome/browser/ui/views/commerce/price_tracking_email_dialog_view.cc chrome/browser/ui/views/commerce/price_tracking_icon_view_integration_test.cc @@ -1810,7 +1929,6 @@ chrome/browser/ui/views/file_system_access/file_system_access_usage_bubble_view_ chrome/browser/ui/views/frame/browser_root_view_browsertest.cc chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/webui_tab_strip_interactive_uitest.cc -chrome/browser/ui/views/hats/hats_next_web_dialog.cc chrome/browser/ui/views/intent_picker_bubble_view_browsertest.cc chrome/browser/ui/views/intent_picker_bubble_view_unittest.cc chrome/browser/ui/views/lens/lens_side_panel_navigation_helper.cc @@ -1835,6 +1953,7 @@ chrome/browser/ui/views/passwords/password_dialog_view_browsertest.cc chrome/browser/ui/views/passwords/password_generation_popup_view_views_browsertest.cc chrome/browser/ui/views/payments/payment_method_view_controller_browsertest.cc chrome/browser/ui/views/plugin_vm/plugin_vm_installer_view.cc +chrome/browser/ui/views/profiles/avatar_toolbar_button_browsertest.cc chrome/browser/ui/views/profiles/dice_web_signin_interception_bubble_view_unittest.cc chrome/browser/ui/views/profiles/first_run_interactive_uitest.cc chrome/browser/ui/views/profiles/profile_menu_view_browsertest.cc @@ -1848,6 +1967,7 @@ chrome/browser/ui/views/sharing/click_to_call_browsertest.cc chrome/browser/ui/views/sharing/sharing_dialog_view_unittest.cc chrome/browser/ui/views/sharing_hub/preview_view_unittest.cc chrome/browser/ui/views/sharing_hub/sharing_hub_bubble_view_impl_unittest.cc +chrome/browser/ui/views/side_panel/companion/exps_registration_success_observer_unittest.cc chrome/browser/ui/views/side_panel/lens/lens_core_tab_side_panel_helper_browsertest.cc chrome/browser/ui/views/side_panel/lens/lens_unified_side_panel_view.cc chrome/browser/ui/views/side_panel/read_anything/read_anything_controller_unittest.cc @@ -1859,6 +1979,7 @@ chrome/browser/ui/views/sync/inline_login_ui_browsertest.cc chrome/browser/ui/views/tabs/tab_hover_card_controller_interactive_uitest.cc chrome/browser/ui/views/translate/translate_bubble_view_interactive_uitest.cc chrome/browser/ui/views/user_education/browser_user_education_service.cc +chrome/browser/ui/views/user_education/low_usage_promo.cc chrome/browser/ui/views/web_apps/force_installed_preinstalled_deprecated_app_dialog_view.cc chrome/browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_browsertest.cc chrome/browser/ui/views/webauthn/authenticator_request_bubble.cc @@ -1872,6 +1993,7 @@ chrome/browser/ui/web_applications/web_app_profile_deletion_browsertest.cc chrome/browser/ui/web_applications/web_app_ui_manager_impl.cc chrome/browser/ui/webauthn/authenticator_dialog_browsertest.cc chrome/browser/ui/webauthn/authenticator_request_window.cc +chrome/browser/ui/webauthn/sheet_models.cc chrome/browser/ui/webui/PRESUBMIT.py chrome/browser/ui/webui/access_code_cast/access_code_cast_handler_unittest.cc chrome/browser/ui/webui/app_home/app_home_page_handler.cc @@ -1880,7 +2002,6 @@ chrome/browser/ui/webui/app_management/app_management_page_handler_chromeos.cc chrome/browser/ui/webui/app_management/app_management_page_handler_unittest.cc chrome/browser/ui/webui/ash/add_supervision/add_supervision_ui.cc chrome/browser/ui/webui/ash/add_supervision/add_supervision_ui_browsertest.cc -chrome/browser/ui/webui/ash/arc_graphics_tracing/arc_graphics_tracing_handler.cc chrome/browser/ui/webui/ash/cloud_upload/cloud_upload_dialog.cc chrome/browser/ui/webui/ash/cloud_upload/cloud_upload_dialog_browsertest.cc chrome/browser/ui/webui/ash/cloud_upload/drive_upload_handler.cc @@ -1903,12 +2024,13 @@ chrome/browser/ui/webui/ash/settings/pages/power/power_section.cc chrome/browser/ui/webui/ash/settings/services/metrics/per_session_settings_user_action_tracker_unittest.cc chrome/browser/ui/webui/ash/settings/services/metrics/settings_user_action_tracker_unittest.cc chrome/browser/ui/webui/autofill_and_password_manager_internals/internals_ui_handler.cc +chrome/browser/ui/webui/commerce/shopping_ui_handler_delegate_browsertest.cc chrome/browser/ui/webui/components/components_handler.cc +chrome/browser/ui/webui/cr_components/history_embeddings/history_embeddings_handler_unittest.cc chrome/browser/ui/webui/devtools/devtools_ui_data_source_unittest.cc chrome/browser/ui/webui/discards/graph_dump_impl_unittest.cc chrome/browser/ui/webui/extensions/extensions_internals_unittest.cc chrome/browser/ui/webui/favicon_source_unittest.cc -chrome/browser/ui/webui/feed/feed_ui.cc chrome/browser/ui/webui/hats/hats_ui.cc chrome/browser/ui/webui/history/browsing_history_handler_unittest.cc chrome/browser/ui/webui/history_clusters/history_clusters_handler_unittest.cc @@ -1932,7 +2054,6 @@ chrome/browser/ui/webui/privacy_sandbox/privacy_sandbox_internals_handler_browse chrome/browser/ui/webui/profile_info_watcher.h chrome/browser/ui/webui/sanitized_image_source.cc chrome/browser/ui/webui/sanitized_image_source_unittest.cc -chrome/browser/ui/webui/search_engine_choice/generated_icon_utils-inc.cc chrome/browser/ui/webui/settings/about_handler_unittest.cc chrome/browser/ui/webui/settings/on_startup_handler_unittest.cc chrome/browser/ui/webui/settings/people_handler_unittest.cc @@ -1953,7 +2074,6 @@ chrome/browser/ui/webui/side_panel/customize_chrome/wallpaper_search/wallpaper_s chrome/browser/ui/webui/side_panel/customize_chrome/wallpaper_search/wallpaper_search_interactive_uitest.cc chrome/browser/ui/webui/side_panel/read_anything/read_anything_untrusted_ui.cc chrome/browser/ui/webui/side_panel/reading_list/reading_list_page_handler_unittest.cc -chrome/browser/ui/webui/side_panel/user_notes/user_notes_page_handler_unittest.cc chrome/browser/ui/webui/signin/ash/inline_login_handler_impl_browsertest.cc chrome/browser/ui/webui/signin/ash/signin_helper_browsertest.cc chrome/browser/ui/webui/signin/ash/user_cloud_signin_restriction_policy_fetcher.cc @@ -1963,6 +2083,7 @@ chrome/browser/ui/webui/signin/profile_picker_handler_unittest.cc chrome/browser/ui/webui/signin/signin_error_handler_unittest.cc chrome/browser/ui/webui/signin/signin_reauth_ui.h chrome/browser/ui/webui/signin/sync_confirmation_handler_unittest.cc +chrome/browser/ui/webui/signin/sync_confirmation_ui.cc chrome/browser/ui/webui/signin/turn_sync_on_helper_browsertest.cc chrome/browser/ui/webui/signin/turn_sync_on_helper_unittest.cc chrome/browser/ui/webui/tab_search/tab_search_page_handler.cc @@ -1970,8 +2091,9 @@ chrome/browser/ui/webui/theme_source_unittest.cc chrome/browser/ui/webui/webui_allowlist_provider_unittest.cc chrome/browser/ui/webui/welcome/google_apps_handler.cc chrome/browser/ui/webui/welcome/ntp_background_handler.cc +chrome/browser/ui/webui/whats_new/whats_new_fetcher.cc +chrome/browser/ui/webui/whats_new/whats_new_handler_unittest.cc chrome/browser/ui/webui/whats_new/whats_new_ui.cc -chrome/browser/ui/webui/whats_new/whats_new_util.cc chrome/browser/ui/webui/whats_new/whats_new_util_unittest.cc chrome/browser/ui/window_sizer/window_sizer_chromeos.cc chrome/browser/unified_consent/unified_consent_sync_to_signin_browsertest.cc @@ -1982,24 +2104,24 @@ chrome/browser/usb/usb_chooser_context_unittest.cc chrome/browser/usb/usb_chooser_controller_unittest.cc chrome/browser/usb/usb_policy_allowed_devices_unittest.cc chrome/browser/usb/web_usb_detector_unittest.cc -chrome/browser/user_notes/user_note_service_delegate_impl_unittest.cc -chrome/browser/user_notes/user_notes_tab_helper_unittest.cc +chrome/browser/visited_url_ranking/desktop_tab_model_url_visit_data_fetcher_unittest.cc chrome/browser/vr/PRESUBMIT.py chrome/browser/vr/test/gl_test_environment_unittest.cc chrome/browser/wallet/android/boarding_pass_detector_unittest.cc chrome/browser/web_applications/chromeos_web_app_experiments_browsertest.cc chrome/browser/web_applications/commands/fetch_manifest_and_install_command.cc -chrome/browser/web_applications/commands/install_preloaded_verified_app_command.cc -chrome/browser/web_applications/commands/install_preloaded_verified_app_command_browsertest.cc -chrome/browser/web_applications/extensions/bookmark_app_util_unittest.cc +chrome/browser/web_applications/commands/install_app_from_verified_manifest_command.cc +chrome/browser/web_applications/commands/install_app_from_verified_manifest_command_browsertest.cc chrome/browser/web_applications/isolated_web_apps/isolated_web_app_downloader.cc +chrome/browser/web_applications/isolated_web_apps/isolated_web_app_source_unittest.cc chrome/browser/web_applications/isolated_web_apps/isolated_web_app_update_manager.h chrome/browser/web_applications/isolated_web_apps/update_manifest/update_manifest_fetcher.cc +chrome/browser/web_applications/migrations/migrate_preinstalls_to_aps_browsertest.cc chrome/browser/web_applications/os_integration/web_app_handler_registration_utils_win.cc chrome/browser/web_applications/os_integration/web_app_handler_registration_utils_win.h chrome/browser/web_applications/os_integration/web_app_handler_registration_utils_win_unittest.cc chrome/browser/web_applications/preinstalled_web_app_manager_unittest.cc -chrome/browser/web_applications/preinstalled_web_app_window_experiment_browsertest.cc +chrome/browser/web_applications/preinstalled_web_apps/container.cc chrome/browser/web_applications/preinstalled_web_apps/gmail.cc chrome/browser/web_applications/preinstalled_web_apps/google_calendar.cc chrome/browser/web_applications/preinstalled_web_apps/google_chat.cc @@ -2016,13 +2138,20 @@ chrome/browser/web_applications/web_app_helpers_unittest.cc chrome/browser/web_applications/web_app_id_constants.h chrome/browser/web_applications/web_app_install_utils_unittest.cc chrome/browser/web_applications/web_app_provider.cc -chrome/browser/web_applications/web_app_registrar_unittest.cc chrome/browser/web_applications/web_contents/web_app_icon_downloader_unittest.cc +chrome/browser/webapps/installable/installable_manager_browsertest.cc chrome/browser/webauthn/authenticator_request_dialog_model.cc +chrome/browser/webauthn/authenticator_request_dialog_model.h chrome/browser/webauthn/cablev2_devices.h chrome/browser/webauthn/chrome_authenticator_request_delegate.cc chrome/browser/webauthn/chrome_authenticator_request_delegate_unittest.cc +chrome/browser/webauthn/chrome_webauthn_autofill_interactive_uitest.cc +chrome/browser/webauthn/enclave_authenticator_browsertest.cc +chrome/browser/webauthn/enclave_manager.cc chrome/browser/webauthn/enclave_manager_unittest.cc +chrome/browser/webauthn/fake_magic_arch.h +chrome/browser/webauthn/fake_recovery_key_store.h +chrome/browser/webauthn/fake_security_domain_service.cc chrome/browser/webshare/win/fake_random_access_stream.cc chrome/browser/webshare/win/share_operation.cc chrome/browser/win/chrome_process_finder.cc @@ -2031,6 +2160,7 @@ chrome/browser/win/conflicts/installed_applications.cc chrome/browser/win/jumplist.cc chrome/browser/win/jumplist_update_util_unittest.cc chrome/browser/win/parental_controls.cc +chrome/browser/window_management/window_management_browsertest.cc chrome/chrome_elf/chrome_elf_main.cc chrome/chrome_elf/nt_registry/nt_registry.cc chrome/chrome_elf/nt_registry/nt_registry.h @@ -2038,7 +2168,6 @@ chrome/chrome_elf/nt_registry/nt_registry_unittest.cc chrome/chrome_elf/pe_image_safe/pe_image_safe.h chrome/chrome_elf/third_party_dlls/hardcoded_blocklist.cc chrome/chrome_elf/third_party_dlls/main.h -chrome/common/accessibility/read_anything_constants.cc chrome/common/apps/platform_apps/api/PRESUBMIT.py chrome/common/chrome_features.cc chrome/common/chrome_switches.cc @@ -2072,7 +2201,6 @@ chrome/common/extensions/api/windows.json chrome/common/extensions/chrome_extensions_client.cc chrome/common/extensions/manifest_handlers/automation_unittest.cc chrome/common/extensions/manifest_tests/extension_manifests_default_extent_path_unittest.cc -chrome/common/extensions/manifest_tests/extension_manifests_homepage_unittest.cc chrome/common/extensions/manifest_tests/extension_manifests_launch_unittest.cc chrome/common/extensions/manifest_tests/extension_manifests_platformapp_unittest.cc chrome/common/extensions/manifest_tests/extension_manifests_validapp_unittest.cc @@ -2092,6 +2220,8 @@ chrome/common/pref_names.h chrome/common/url_constants.h chrome/common/webui_url_constants.cc chrome/common/win/delay_load_failure_hook.cc +chrome/common/win/delay_load_notify_hook.cc +chrome/common/win/delay_load_notify_hook.h chrome/credential_provider/extension/os_service_manager.h chrome/credential_provider/extension/service.h chrome/credential_provider/extension/task_manager_unittests.cc @@ -2119,6 +2249,7 @@ chrome/docs/devtools-pillar.html chrome/docs/index.html chrome/docs/platform-pillar.html chrome/elevation_service/caller_validation.cc +chrome/elevation_service/service_main.cc chrome/install_static/install_constants.h chrome/install_static/install_details.h chrome/install_static/install_modes_unittest.cc @@ -2187,13 +2318,14 @@ chrome/notification_helper/notification_activator.h chrome/notification_helper/notification_helper.cc chrome/renderer/accessibility/read_anything_app_controller.cc chrome/renderer/accessibility/read_anything_app_controller_browsertest.cc -chrome/renderer/accessibility/read_anything_app_model_browsertest.cc +chrome/renderer/accessibility/read_anything_app_model.cc chrome/renderer/app_categorizer_unittest.cc chrome/renderer/ash_merge_session_loader_throttle_unittest.cc chrome/renderer/autofill/autofill_renderer_browsertest.cc chrome/renderer/autofill/form_autofill_browsertest.cc chrome/renderer/autofill/page_passwords_analyser_browsertest.cc chrome/renderer/autofill/password_autofill_agent_browsertest.cc +chrome/renderer/bound_session_credentials/bound_session_request_throttled_in_renderer_manager_unittest.cc chrome/renderer/cart/commerce_hint_agent.cc chrome/renderer/cart/commerce_hint_agent_browsertest.cc chrome/renderer/cart/commerce_hint_agent_unittest.cc @@ -2211,12 +2343,11 @@ chrome/renderer/searchbox/searchbox_extension.cc chrome/renderer/searchbox/searchbox_extension.h chrome/renderer/searchbox/searchbox_unittest.cc chrome/renderer/translate/translate_agent_browsertest.cc -chrome/services/file_util/public/cpp/sandboxed_document_analyzer_unittest.cc chrome/services/mac_notifications/mac_notification_service_ns.mm chrome/services/mac_notifications/mac_notification_service_ns_unittest.mm chrome/services/mac_notifications/mac_notification_service_un_unittest.mm -chrome/services/sharing/nearby/nearby_connections_unittest.cc chrome/services/sharing/nearby/nearby_presence_unittest.cc +chrome/services/sharing/nearby/platform/wifi_direct_socket.cc chrome/services/sharing/nearby/quick_start_decoder/quick_start_decoder_unittest.cc chrome/services/util_win/av_products.cc chrome/test/base/android/android_browser_test.h @@ -2232,7 +2363,7 @@ chrome/test/base/in_process_browser_test_browsertest.cc chrome/test/chromedriver/capabilities_unittest.cc chrome/test/chromedriver/chrome/chrome_desktop_impl.cc chrome/test/chromedriver/chrome/chrome_finder.cc -chrome/test/chromedriver/chrome/javascript_dialog_manager.cc +chrome/test/chromedriver/chrome/devtools_client_impl.cc chrome/test/chromedriver/chrome/mobile_device.cc chrome/test/chromedriver/client/chromedriver.py chrome/test/chromedriver/command_listener_proxy.h @@ -2253,12 +2384,12 @@ chrome/test/enterprise/e2e/connector/local_content_analysis_connector/local_cont chrome/test/enterprise/e2e/connector/realtime_reporting_bce/reporting_server.py chrome/test/enterprise/e2e/connector/reporting_connector_chronicle/chronicle_api_service.py chrome/test/enterprise/e2e/connector/reporting_connector_pan/pan_api_service.py +chrome/test/enterprise/e2e/infra/test_binary_downloader.py chrome/test/enterprise/e2e/omaha/rollback_to_target_version/google_update_policy_cbcm.py chrome/test/enterprise/e2e/policy/allow_deleting_browser_history/allow_deleting_browser_history.py chrome/test/enterprise/e2e/policy/allow_deleting_browser_history/allow_deleting_browser_history_webdriver_test.py chrome/test/enterprise/e2e/policy/apps_shortcut/apps_shortcut.py chrome/test/enterprise/e2e/policy/bookmarkbar_enabled/bookmarkbar_enabled.py -chrome/test/enterprise/e2e/policy/cbcm_enroll.py chrome/test/enterprise/e2e/policy/cloud_management_enrollment_token/cloud_management_enrollment_token.py chrome/test/enterprise/e2e/policy/default_search_provider/default_search_provider.py chrome/test/enterprise/e2e/policy/encrypted_reporting/report_cbcm_events.py @@ -2325,9 +2456,9 @@ chrome/updater/tools/keystone_ticketstore_tool.mm chrome/updater/util/util_unittest.cc chrome/updater/util/util_win_unittest.cc chrome/updater/util/win_util.cc +chrome/updater/util/win_util.h chrome/updater/win/protocol_parser_xml_unittest.cc chrome/updater/win/signing/PRESUBMIT.py -chrome/updater/win/signing/enterprise_standalone_installer.wxs.xml chrome/updater/win/signing/msi_from_standalone.py chrome/updater/win/task_scheduler.cc chrome/utility/importer/bookmark_html_reader.h @@ -2355,6 +2486,8 @@ chromecast/net/connectivity_checker_impl.h chromecast/net/net_switches.cc chromecast/public/bluetooth/gatt.h chromecast/public/output_restrictions.h +chromecast/starboard/media/cdm/starboard_decryptor_cast.cc +chromecast/starboard/media/cdm/starboard_decryptor_cast_test.cc chromeos/BUILD.gn chromeos/ash/components/attestation/attestation_flow_adaptive_unittest.cc chromeos/ash/components/attestation/attestation_flow_integrated_unittest.cc @@ -2367,28 +2500,33 @@ chromeos/ash/components/carrier_lock/topic_subscription_request.cc chromeos/ash/components/carrier_lock/topic_subscription_request_unittest.cc chromeos/ash/components/chaps_util/chaps_util_impl.cc chromeos/ash/components/cryptohome/userdataauth_util.cc +chromeos/ash/components/data_migration/data_migration.cc chromeos/ash/components/dbus/arc/arc_obb_mounter_client.h chromeos/ash/components/dbus/biod/fake_biod_client_unittest.cc chromeos/ash/components/dbus/debug_daemon/debug_daemon_client.h chromeos/ash/components/dbus/dlcservice/dlcservice_client.h chromeos/ash/components/dbus/rmad/fake_rmad_client.cc +chromeos/ash/components/dbus/shill/shill_manager_client.h chromeos/ash/components/drivefs/drivefs_http_client_unittest.cc +chromeos/ash/components/file_manager/indexing/file_index_service_registry_unittest.cc +chromeos/ash/components/fwupd/firmware_update_manager.cc +chromeos/ash/components/fwupd/firmware_update_manager_unittest.cc chromeos/ash/components/geolocation/simple_geolocation_provider.h +chromeos/ash/components/growth/campaigns_constants.cc +chromeos/ash/components/growth/campaigns_manager_unittest.cc +chromeos/ash/components/growth/campaigns_model.h chromeos/ash/components/local_search_service/content_extraction_utils_unittest.cc chromeos/ash/components/login/auth/recovery/service_constants.cc -chromeos/ash/components/login/hibernate/hibernate_manager_unittest.cc chromeos/ash/components/multidevice/remote_device_test_util.cc chromeos/ash/components/multidevice/stub_multidevice_util.cc chromeos/ash/components/nearby/common/client/nearby_api_call_flow_impl_unittest.cc -chromeos/ash/components/nearby/presence/conversions/proto_conversions_unittest.cc chromeos/ash/components/nearby/presence/credentials/local_device_data_provider_impl_unittest.cc -chromeos/ash/components/nearby/presence/credentials/nearby_presence_credential_manager_impl_unittest.cc chromeos/ash/components/nearby/presence/credentials/nearby_presence_server_client_impl.cc chromeos/ash/components/nearby/presence/credentials/nearby_presence_server_client_impl_unittest.cc -chromeos/ash/components/nearby/presence/nearby_presence_service_impl_unittest.cc chromeos/ash/components/network/geolocation_handler.cc chromeos/ash/components/network/network_cert_loader.cc chromeos/ash/components/network/network_util.h +chromeos/ash/components/network/onc/network_onc_utils.cc chromeos/ash/components/network/profile_policies.h chromeos/ash/components/network/system_token_cert_db_storage.h chromeos/ash/components/phonehub/notification.h @@ -2403,6 +2541,7 @@ chromeos/ash/components/report/utils/network_utils_unittest.cc chromeos/ash/components/standalone_browser/lacros_availability.cc chromeos/ash/components/standalone_browser/lacros_availability.h chromeos/ash/components/standalone_browser/lacros_availability_unittest.cc +chromeos/ash/components/standalone_browser/lacros_selection_unittest.cc chromeos/ash/components/string_matching/tokenized_string_unittest.cc chromeos/ash/components/timezone/timezone_request.cc chromeos/ash/components/tpm/tpm_token_info_getter_unittest.cc @@ -2420,6 +2559,7 @@ chromeos/ash/services/device_sync/remote_device_provider_impl_unittest.cc chromeos/ash/services/device_sync/remote_device_v2_loader_impl_unittest.cc chromeos/ash/services/device_sync/switches.cc chromeos/ash/services/ime/constants.cc +chromeos/ash/services/ime/input_method_user_data_service_impl_unittest.cc chromeos/ash/services/ime/public/mojom/mojom_traits.cc chromeos/ash/services/libassistant/public/cpp/assistant_suggestion.h chromeos/ash/services/quick_pair/fast_pair_data_parser.cc @@ -2465,7 +2605,6 @@ components/affiliations/core/browser/hash_affiliation_fetcher.cc components/affiliations/core/browser/hash_affiliation_fetcher_unittest.cc components/aggregation_service/aggregation_coordinator_utils.h components/android_autofill/PRESUBMIT.py -components/android_autofill/browser/android_autofill_features.cc components/android_system_error_page/error_page_populator.cc components/app_restore/app_restore_info_unittest.cc components/arc/common/intent_helper/link_handler_model_unittest.cc @@ -2477,10 +2616,11 @@ components/autofill/content/renderer/html_based_username_detector_browsertest.cc components/autofill/content/renderer/page_passwords_analyser.cc components/autofill/content/renderer/password_form_conversion_utils.cc components/autofill/content/renderer/password_form_conversion_utils_browsertest.cc +components/autofill/core/browser/address_data_cleaner_unittest.cc components/autofill/core/browser/address_data_manager_unittest.cc +components/autofill/core/browser/address_suggestion_generator_unittest.cc components/autofill/core/browser/autofill_and_password_manager_internals/autofill_and_password_manager_internals.js components/autofill/core/browser/autofill_experiments_unittest.cc -components/autofill/core/browser/autofill_suggestion_generator_unittest.cc components/autofill/core/browser/autofill_test_utils.cc components/autofill/core/browser/browser_autofill_manager_unittest.cc components/autofill/core/browser/crowdsourcing/autofill_crowdsourcing_manager.cc @@ -2494,6 +2634,7 @@ components/autofill/core/browser/form_structure_unittest.cc components/autofill/core/browser/metrics/autofill_metrics.cc components/autofill/core/browser/metrics/autofill_metrics_test_base.cc components/autofill/core/browser/metrics/autofill_metrics_unittest.cc +components/autofill/core/browser/metrics/profile_deduplication_metrics_unittest.cc components/autofill/core/browser/metrics/quality_metrics_unittest.cc components/autofill/core/browser/metrics/shadow_prediction_metrics_unittest.cc components/autofill/core/browser/ml_model/autofill_ml_prediction_model_handler_unittest.cc @@ -2512,9 +2653,10 @@ components/autofill/core/browser/payments/payments_network_interface_unittest.cc components/autofill/core/browser/payments/payments_requests/unmask_card_request_unittest.cc components/autofill/core/browser/payments/payments_service_url.cc components/autofill/core/browser/payments/payments_service_url_unittest.cc -components/autofill/core/browser/personal_data_manager_unittest.cc +components/autofill/core/browser/payments_data_manager_unittest.cc components/autofill/core/browser/ui/autofill_image_fetcher.cc components/autofill/core/browser/webdata/addresses/autofill_profile_sync_bridge.h +components/autofill/core/browser/webdata/payments/autofill_wallet_sync_bridge.h components/autofill/core/browser/webdata/payments/autofill_wallet_sync_bridge_unittest.cc components/autofill/core/browser/webdata/payments/autofill_wallet_usage_data_sync_bridge_unittest.cc components/autofill/core/browser/webdata/payments/payments_autofill_table.h @@ -2562,6 +2704,7 @@ components/commerce/core/account_checker.cc components/commerce/core/account_checker_unittest.cc components/commerce/core/commerce_constants.cc components/commerce/core/commerce_feature_list.h +components/commerce/core/compare/product_specifications_server_proxy.cc components/commerce/core/heuristics/resources/cart_domain_cart_url_regex.json components/commerce/core/parcel/parcels_server_proxy.cc components/commerce/core/parcel/parcels_server_proxy_unittest.cc @@ -2600,6 +2743,8 @@ components/cronet/tools/cr_cronet.py components/cronet/tools/generate_javadoc.py components/cronet/tools/utils.py components/custom_handlers/protocol_handler_registry_unittest.cc +components/data_sharing/internal/data_sharing_service_impl_unittest.cc +components/data_sharing/internal/group_data_proto_utils_unittest.cc components/desks_storage/core/admin_template_service_unittests.cc components/desks_storage/core/desk_model_wrapper_unittests.cc components/desks_storage/core/desk_sync_bridge_unittest.cc @@ -2627,6 +2772,8 @@ components/drive/service/drive_api_service.cc components/drive/service/fake_drive_service.cc components/embedder_support/android/BUILD.gn components/endpoint_fetcher/endpoint_fetcher_unittest.cc +components/enterprise/connectors/service_provider_config.cc +components/enterprise/connectors/service_provider_config_unittest.cc components/enterprise/data_controls/attributes_condition_unittest.cc components/enterprise/data_controls/data_controls_policy_handler_unittest.cc components/enterprise/data_controls/rule_unittest.cc @@ -2656,19 +2803,22 @@ components/feed/core/v2/api_test/feed_api_stream_unittest.cc components/feed/core/v2/feed_network_impl.cc components/feed/core/v2/feed_network_impl_unittest.cc components/feed/core/v2/public/public_types_unittest.cc -components/feed/feed_feature_list.cc components/feedback/feedback_common.cc components/feedback/feedback_common_unittest.cc components/feedback/feedback_report.h components/feedback/feedback_uploader.cc components/feedback/feedback_uploader_dispatch_unittest.cc components/feedback/redaction_tool/url_parse.h +components/fingerprinting_protection_filter/browser/fingerprinting_protection_web_contents_helper.cc components/flags_ui/flags_test_helpers.cc components/flags_ui/resources/app.html components/gcm_driver/gcm_account_mapper.cc components/gcm_driver/gcm_account_mapper_unittest.cc components/gcm_driver/gcm_client_impl.cc components/gcm_driver/gcm_client_impl_unittest.cc +components/global_media_controls/public/media_session_notification_item_unittest.cc +components/global_media_controls/public/views/chapter_item_view_unittest.cc +components/global_media_controls/public/views/media_item_ui_detailed_view_unittest.cc components/google/core/common/google_util.cc components/google/core/common/google_util_unittest.cc components/guest_view/browser/guest_view_base.h @@ -2704,7 +2854,6 @@ components/history/metrics/domain_diversity_reporter_unittest.cc components/history_clusters/core/cluster_interaction_state_processor_unittest.cc components/history_clusters/core/cluster_similarity_heuristics_processor_unittest.cc components/history_clusters/core/clusterer_unittest.cc -components/history_clusters/core/content_annotations_cluster_processor_unittest.cc components/history_clusters/core/content_visibility_cluster_finalizer_unittest.cc components/history_clusters/core/file_clustering_backend_unittest.cc components/history_clusters/core/history_clusters_service_test_api.cc @@ -2720,12 +2869,14 @@ components/infobars/content/content_infobar_manager.cc components/invalidation/impl/fcm_invalidation_service_unittest.cc components/invalidation/impl/per_user_topic_subscription_manager.cc components/invalidation/impl/per_user_topic_subscription_manager_unittest.cc +components/ip_protection/ip_protection_proxy_config_retriever.cc components/javascript_dialogs/tab_modal_dialog_manager.cc components/javascript_dialogs_strings.grdp components/keyed_service/core/keyed_service_base_factory.cc components/keyed_service/core/simple_keyed_service_factory.h components/lens/lens_features.cc components/lens/lens_url_utils_unittest.cc +components/leveldb_proto/internal/leveldb_database.cc components/live_caption/greedy_text_stabilizer.h components/live_caption/live_translate_controller.cc components/login_dialog_strings.grdp @@ -2733,11 +2884,11 @@ components/lookalikes/core/lookalike_url_util.cc components/lookalikes/core/lookalike_url_util.h components/lookalikes/core/lookalike_url_util_unittest.cc components/management_strings.grdp +components/manta/base_provider.cc +components/manta/base_provider_test_helper.cc components/manta/manta_service_callbacks.cc components/manta/orca_provider.cc components/manta/orca_provider_unittest.cc -components/manta/snapper_provider.cc -components/manta/snapper_provider_unittest.cc components/media_router/browser/android/flinging_controller_bridge.cc components/media_router/browser/media_router_dialog_controller_unittest.cc components/media_router/browser/media_router_metrics_unittest.cc @@ -2756,6 +2907,8 @@ components/metrics/net/net_metrics_log_uploader.cc components/metrics/persistent_histograms.cc components/metrics/url_constants.cc components/mirroring/service/mirror_settings.h +components/mirroring/service/remoting_sender.h +components/mirroring/service/rtp_stream.h components/nacl/browser/nacl_process_host.cc components/nacl/browser/pnacl_host_unittest.cc components/nacl/browser/pnacl_translation_cache_unittest.cc @@ -2842,15 +2995,13 @@ components/omnibox/browser/zero_suggest_verbatim_match_provider_unittest.cc components/omnibox/resources/omnibox_pedal_synonyms.grd components/omnibox_pedal_ui_strings.grdp components/omnibox_strings.grdp -components/optimization_guide/content/browser/page_content_annotations_service_unittest.cc -components/optimization_guide/content/browser/page_content_annotations_web_contents_observer_unittest.cc -components/optimization_guide/core/entity_metadata.cc -components/optimization_guide/core/entity_metadata.h components/optimization_guide/core/hints_component_util_unittest.cc components/optimization_guide/core/hints_manager_unittest.cc components/optimization_guide/core/model_execution/model_execution_fetcher.cc components/optimization_guide/core/model_execution/model_execution_fetcher_unittest.cc components/optimization_guide/core/model_execution/model_execution_manager_unittest.cc +components/optimization_guide/core/model_execution/on_device_model_adaptation_loader.cc +components/optimization_guide/core/model_execution/on_device_model_adaptation_loader_unittest.cc components/optimization_guide/core/model_execution/on_device_model_service_controller_unittest.cc components/optimization_guide/core/model_handler_unittest.cc components/optimization_guide/core/model_quality/model_quality_logs_uploader_service.cc @@ -2859,14 +3010,14 @@ components/optimization_guide/core/optimization_guide_constants.cc components/optimization_guide/core/optimization_guide_util.h components/optimization_guide/core/optimization_guide_util_unittest.cc components/optimization_guide/core/optimization_metadata_unittest.cc -components/optimization_guide/core/page_entities_model_handler_impl.cc components/optimization_guide/core/prediction_manager.cc components/optimization_guide/core/prediction_manager_unittest.cc components/optimization_guide/core/tflite_model_executor_unittest.cc components/optimization_guide/optimization_guide_internals/resources/optimization_guide_internals.ts components/optimization_guide/tools/gen_on_device_proto_descriptors.py components/origin_trials/browser/leveldb_persistence_provider_unittest.cc -components/page_image_service/image_service_unittest.cc +components/page_content_annotations/core/page_content_annotations_service_unittest.cc +components/page_image_service/image_service_impl_unittest.cc components/page_info/core/about_this_site_service.cc components/page_info/core/about_this_site_service_unittest.cc components/page_info/page_info.cc @@ -2964,6 +3115,7 @@ components/password_manager/core/browser/sharing/fake_recipients_fetcher.cc components/password_manager/core/browser/sharing/incoming_password_sharing_invitation_sync_bridge_unittest.cc components/password_manager/core/browser/sharing/password_sharing_recipients_downloader.cc components/password_manager/core/browser/store_metrics_reporter_unittest.cc +components/password_manager/core/browser/sync/password_model_type_controller_unittest.cc components/password_manager/core/browser/sync/password_sync_bridge.h components/password_manager/core/browser/sync_credentials_filter_unittest.cc components/password_manager/core/browser/sync_username_test_base.cc @@ -3021,9 +3173,11 @@ components/permissions/prediction_service/prediction_common.h components/permissions/prediction_service/prediction_service_base.h components/permissions/test/mock_permission_request.h components/permissions_strings.grdp -components/plus_addresses/plus_address_http_client.cc -components/plus_addresses/plus_address_http_client_unittest.cc -components/plus_addresses/plus_address_parser_unittest.cc +components/plus_addresses/metrics/plus_address_submission_logger_unittest.cc +components/plus_addresses/plus_address_http_client_impl.cc +components/plus_addresses/plus_address_http_client_impl_unittest.cc +components/plus_addresses/plus_address_parsing_utils_unittest.cc +components/plus_addresses_strings.grdp components/policy/PRESUBMIT.py components/policy/core/browser/browser_policy_connector.cc components/policy/core/browser/configuration_policy_pref_store_unittest.cc @@ -3039,6 +3193,7 @@ components/policy/core/browser/url_scheme_list_policy_handler.cc components/policy/core/browser/url_scheme_list_policy_handler.h components/policy/core/common/cloud/cloud_policy_client_unittest.cc components/policy/core/common/cloud/profile_cloud_policy_store_unittest.cc +components/policy/core/common/cloud/test/policy_builder.cc components/policy/core/common/cloud/user_cloud_policy_store_unittest.cc components/policy/core/common/cloud/user_info_fetcher.cc components/policy/core/common/cloud/user_info_fetcher_unittest.cc @@ -3061,6 +3216,8 @@ components/policy/test/data/pref_mapping/AlwaysOnVpnPreConnectUrlAllowlist.json components/policy/test/data/pref_mapping/AppLaunchAutomation.json components/policy/test/data/pref_mapping/AudioCaptureAllowedUrls.json components/policy/test/data/pref_mapping/AutoOpenAllowedForURLs.json +components/policy/test/data/pref_mapping/AutomaticFullscreenAllowedForUrls.json +components/policy/test/data/pref_mapping/AutomaticFullscreenBlockedForUrls.json components/policy/test/data/pref_mapping/BrowserSwitcherUrlGreylist.json components/policy/test/data/pref_mapping/BrowserSwitcherUrlList.json components/policy/test/data/pref_mapping/ClipboardAllowedForUrls.json @@ -3078,12 +3235,16 @@ components/policy/test/data/pref_mapping/DeviceAuthenticationURLBlocklist.json components/policy/test/data/pref_mapping/DeviceLoginScreenExtensions.json components/policy/test/data/pref_mapping/DeviceLoginScreenWebHidAllowDevicesForUrls.json components/policy/test/data/pref_mapping/DeviceLoginScreenWebUsbAllowDevicesForUrls.json +components/policy/test/data/pref_mapping/DirectSocketsAllowedForUrls.json +components/policy/test/data/pref_mapping/DirectSocketsBlockedForUrls.json components/policy/test/data/pref_mapping/DisabledSchemes.json components/policy/test/data/pref_mapping/ExtensionInstallForcelist.json components/policy/test/data/pref_mapping/ExtensionOAuthRedirectUrls.json components/policy/test/data/pref_mapping/ExtensionSettings.json components/policy/test/data/pref_mapping/FileSystemReadBlockedForUrls.json components/policy/test/data/pref_mapping/FileSystemWriteBlockedForUrls.json +components/policy/test/data/pref_mapping/FloatingSsoDomainBlocklist.json +components/policy/test/data/pref_mapping/FloatingSsoDomainBlocklistExceptions.json components/policy/test/data/pref_mapping/GetDisplayMediaSetSelectAllScreensAllowedForUrls.json components/policy/test/data/pref_mapping/HomepageLocation.json components/policy/test/data/pref_mapping/ImagesAllowedForUrls.json @@ -3099,6 +3260,7 @@ components/policy/test/data/pref_mapping/LegacySameSiteCookieBehaviorEnabledForD components/policy/test/data/pref_mapping/LocalFontsAllowedForUrls.json components/policy/test/data/pref_mapping/LocalFontsBlockedForUrls.json components/policy/test/data/pref_mapping/ManagedBookmarks.json +components/policy/test/data/pref_mapping/MultiScreenCaptureAllowedForUrls.json components/policy/test/data/pref_mapping/NotificationsAllowedForUrls.json components/policy/test/data/pref_mapping/NotificationsBlockedForUrls.json components/policy/test/data/pref_mapping/PdfLocalFileAccessAllowedForDomains.json @@ -3168,14 +3330,13 @@ components/printing/renderer/print_render_frame_helper.cc components/printing/test/print_render_frame_helper_browsertest.cc components/privacy_sandbox/privacy_sandbox_settings_impl.cc components/privacy_sandbox/privacy_sandbox_settings_impl_unittest.cc -components/privacy_sandbox_strings.grdp +components/privacy_sandbox_chrome_strings.grdp components/protocol_handler_strings.grdp components/proxy_config/pref_proxy_config_tracker_impl_unittest.cc components/proxy_config/proxy_policy_handler_unittest.cc components/query_tiles/test/fake_tile_service.cc components/quirks/quirks_client.cc components/reading_list/core/offline_url_utils_unittest.cc -components/remote_cocoa/app_shim/select_file_dialog_bridge.mm components/reporting/PRESUBMIT.py components/reporting/storage/storage_queue_unittest.cc components/resources/PRESUBMIT.py @@ -3240,6 +3401,7 @@ components/safe_browsing/content/browser/password_protection/password_protection components/safe_browsing/content/browser/triggers/ad_sampler_trigger_unittest.cc components/safe_browsing/content/browser/triggers/suspicious_site_trigger.cc components/safe_browsing/content/browser/triggers/trigger_util.cc +components/safe_browsing/content/browser/ui_manager_unittest.cc components/safe_browsing/content/renderer/phishing_classifier/features.h components/safe_browsing/content/resources/PRESUBMIT.py components/safe_browsing/core/browser/db/v4_get_hash_protocol_manager.cc @@ -3259,27 +3421,29 @@ components/safe_browsing/core/browser/realtime/url_lookup_service_unittest.cc components/safe_browsing/core/browser/tailored_security_service/tailored_security_service.cc components/safe_browsing/core/browser/tailored_security_service/tailored_security_service_observer_util.cc components/safe_browsing/core/browser/tailored_security_service/tailored_security_service_unittest.cc -components/safe_browsing/core/browser/utils/scheme_logger_unittest.cc components/safe_browsing/core/browser/verdict_cache_manager.cc components/safe_browsing/core/browser/verdict_cache_manager_unittest.cc +components/safe_browsing/core/common/scheme_logger_unittest.cc components/safe_search_api/safe_search/safe_search_url_checker_client.cc components/safe_search_api/safe_search/safe_search_url_checker_client_unittest.cc components/safe_search_api/safe_search_util_unittest.cc components/safe_search_api/stub_url_checker.cc components/safety_check/update_check_helper.h components/safety_check/url_constants.cc -components/saved_tab_groups/saved_tab_group_model_unittest.cc +components/saved_tab_groups/android/tab_group_sync_service_android_unittest.cc components/saved_tab_groups/saved_tab_group_sync_bridge_unittest.cc +components/saved_tab_groups/saved_tab_group_test_utils.cc components/saved_tab_groups/saved_tab_group_unittest.cc +components/saved_tab_groups/tab_group_sync_service_unittest.cc components/search_engines/PRESUBMIT.py components/search_engines/android/template_url_service_android_unittest.cc components/search_engines/choice_made_location.h components/search_engines/default_search_policy_handler_unittest.cc -components/search_engines/generated_search_engine_resource_ids-inc.cc components/search_engines/keyword_table_unittest.cc components/search_engines/template_url.cc components/search_engines/template_url_data_unittest.cc components/search_engines/template_url_prepopulate_data_unittest.cc +components/search_engines/template_url_service_unittest.cc components/search_engines/template_url_starter_pack_data.cc components/search_engines/template_url_unittest.cc components/search_engines/util.cc @@ -3301,7 +3465,6 @@ components/security_state/core/security_state.h components/segmentation_platform/internal/execution/optimization_guide/optimization_guide_segmentation_model_provider.cc components/segmentation_platform/internal/execution/optimization_guide/optimization_guide_segmentation_model_provider_unittest.cc components/segmentation_platform/internal/execution/optimization_guide/segmentation_model_executor_unittest.cc -components/segmentation_platform/internal/execution/processing/uma_feature_processor.h components/segmentation_platform/internal/proto/PRESUBMIT.py components/send_tab_to_self/send_tab_to_self_bridge_unittest.cc components/send_tab_to_self/target_device_info_unittest.cc @@ -3312,6 +3475,7 @@ components/services/app_service/public/cpp/app_registry_cache_unittest.cc components/services/app_service/public/cpp/app_registry_cache_wrapper_unittest.cc components/services/app_service/public/cpp/app_storage/app_storage_file_handler_unittest.cc components/services/app_service/public/cpp/app_storage/app_storage_unittest.cc +components/services/app_service/public/cpp/app_types.h components/services/app_service/public/cpp/app_update_unittest.cc components/services/app_service/public/cpp/capability_access_update_unittest.cc components/services/app_service/public/cpp/intent.h @@ -3346,6 +3510,7 @@ components/signin/core/browser/dice_account_reconcilor_delegate_unittest.cc components/signin/core/browser/mirror_landing_account_reconcilor_delegate_unittest.cc components/signin/core/browser/resources/signin_internals.js components/signin/core/browser/signin_header_helper_unittest.cc +components/signin/core/browser/signin_metrics_service_unittests.cc components/signin/internal/identity_manager/account_capabilities_fetcher_unittest.cc components/signin/internal/identity_manager/account_tracker_service_unittest.cc components/signin/internal/identity_manager/gaia_cookie_manager_service.cc @@ -3372,14 +3537,18 @@ components/signin/public/identity_manager/diagnostics_provider_unittest.cc components/signin/public/identity_manager/identity_manager.h components/signin/public/identity_manager/identity_manager_unittest.cc components/signin/public/identity_manager/identity_test_environment.h +components/signin/public/identity_manager/identity_test_environment_unittest.cc components/signin/public/identity_manager/identity_test_utils.cc +components/signin/public/identity_manager/identity_utils_unittest.cc components/signin/public/identity_manager/primary_account_access_token_fetcher_unittest.cc components/signin/public/identity_manager/primary_account_change_event_unittest.cc components/site_engagement/content/site_engagement_helper.cc components/site_engagement/content/site_engagement_helper_unittest.cc components/site_engagement/content/site_engagement_score_unittest.cc components/site_isolation/site_isolation_policy_unittest.cc +components/speech/endpointer/energy_endpointer.cc components/spellcheck/browser/spelling_service_client.cc +components/spellcheck/browser/windows_spell_checker.cc components/ssl_errors/error_classification.h components/ssl_errors/error_classification_unittest.cc components/startup_metric_utils/browser/startup_metric_utils.cc @@ -3400,15 +3569,16 @@ components/supervised_user/core/browser/supervised_user_settings_service_unittes components/supervised_user/core/browser/supervised_user_url_filter.cc components/supervised_user/core/browser/supervised_user_url_filter.h components/supervised_user/core/browser/supervised_user_url_filter_unittest.cc -components/supervised_user/core/common/features.cc components/supervised_user/core/common/supervised_user_constants.cc components/supervised_user/core/common/supervised_user_constants.h components/supervised_user/test_support/kids_chrome_management_test_utils.cc components/supervised_user/test_support/kids_management_api_server_mock.cc components/sync/PRESUBMIT.py +components/sync/base/model_type.cc components/sync/base/sync_util.h components/sync/engine/bookmark_update_preprocessing.cc components/sync/engine/net/http_bridge_unittest.cc +components/sync/model/syncable_service.h components/sync/protocol/proto_value_conversions_unittest.cc components/sync/service/resources/about.ts components/sync/service/sync_prefs.cc @@ -3422,14 +3592,13 @@ components/sync_preferences/pref_service_syncable_unittest.cc components/sync_sessions/PRESUBMIT.py components/sync_sessions/session_sync_bridge.h components/system_cpu/cpu_probe_win.cc -components/tpcd/metadata/parser_unittest.cc +components/tpcd/metadata/browser/parser_unittest.cc components/tracing/common/etw_system_data_source_win.cc components/tracing/common/graphics_memory_dump_provider_android.h components/translate/core/browser/translate_language_list_unittest.cc components/translate/core/browser/translate_ranker_impl.cc components/translate/core/browser/translate_script.cc components/translate/core/common/translate_util.cc -components/translate/ios/browser/translate_controller_unittest.mm components/translate_strings.grdp components/trusted_vault/command_line_switches.cc components/trusted_vault/recovery_key_store_connection_impl.cc @@ -3466,6 +3635,7 @@ components/url_matcher/url_util_unittest.cc components/url_pattern_index/PRESUBMIT.py components/url_pattern_index/url_pattern_index_unittest.cc components/url_pattern_index/url_pattern_unittest.cc +components/user_manager/account_id_util_unittest.cc components/user_manager/known_user_unittest.cc components/user_manager/user.h components/user_manager/user_type.h @@ -3482,11 +3652,17 @@ components/variations/service/safe_seed_manager.h components/variations/variations_murmur_hash.h components/variations/variations_seed_processor.cc components/variations/variations_url_constants.cc +components/visited_url_ranking/internal/history_url_visit_data_fetcher_unittest.cc +components/visited_url_ranking/internal/session_url_visit_data_fetcher_unittest.cc +components/visited_url_ranking/internal/transformer/default_app_url_visit_aggregates_transformer_unittest.cc +components/visited_url_ranking/public/test_support.h +components/visited_url_ranking/public/url_visit_util.h components/visitedlink/test/visitedlink_perftest.cc components/visitedlink/test/visitedlink_unittest.cc components/viz/client/frame_eviction_manager.cc components/viz/common/features.h components/viz/common/quads/render_pass_io_unittest.cc +components/viz/common/resources/shared_image_format.h components/viz/common/switches.cc components/viz/service/display/output_surface.h components/viz/service/display/overlay_candidate.h @@ -3496,7 +3672,8 @@ components/viz/service/display_embedder/skia_render_copy_results.cc components/webapps/browser/android/add_to_homescreen_data_fetcher_unittest.cc components/webapps/browser/android/java/res/values/dimens.xml components/webapps/browser/android/shortcut_info.cc -components/webapps/browser/android/webapk/webapk_icon_hasher_unittest.cc +components/webapps/browser/android/webapk/webapk_icons_hasher_unittest.cc +components/webapps/browser/android/webapk/webapk_single_icon_hasher_unittest.cc components/webapps/browser/banners/app_banner_settings_helper_unittest.cc components/webapps/browser/installable/installable_evaluator_unittest.cc components/webdata/common/PRESUBMIT.py @@ -3538,6 +3715,7 @@ content/browser/browsing_data/browsing_data_filter_builder_impl_unittest.cc content/browser/browsing_topics/browsing_topics_url_loader_unittest.cc content/browser/buckets/bucket_manager_host_unittest.cc content/browser/cache_storage/cache_storage_context_unittest.cc +content/browser/cache_storage/cache_storage_dispatcher_host.cc content/browser/child_process_security_policy_unittest.cc content/browser/client_hints/client_hints.cc content/browser/content_security_policy_browsertest.cc @@ -3555,6 +3733,8 @@ content/browser/fenced_frame/fenced_frame_browsertest.cc content/browser/fenced_frame/fenced_frame_reporter.cc content/browser/fenced_frame/fenced_frame_unittest.cc content/browser/file_system/browser_file_system_helper_unittest.cc +content/browser/file_system_access/file_path_watcher/file_path_watcher_unittest.cc +content/browser/file_system_access/file_path_watcher/file_path_watcher_win.cc content/browser/file_system_access/file_system_access_observer_observation.h content/browser/font_access/font_enumeration_cache.cc content/browser/font_access/font_enumeration_data_source_win.cc @@ -3568,7 +3748,8 @@ content/browser/indexed_db/indexed_db_backing_store_unittest.cc content/browser/indexed_db/indexed_db_context_impl.h content/browser/indexed_db/indexed_db_context_unittest.cc content/browser/indexed_db/indexed_db_reporting.cc -content/browser/installedapp/installed_app_provider_impl_win.cc +content/browser/installedapp/fetch_related_win_apps_task.cc +content/browser/installedapp/native_win_app_fetcher_impl.cc content/browser/interest_group/ad_auction_headers_util_unittest.cc content/browser/interest_group/ad_auction_url_loader_interceptor_unittest.cc content/browser/interest_group/auction_runner_unittest.cc @@ -3587,6 +3768,8 @@ content/browser/media/media_devices_permission_checker_unittest.cc content/browser/media/session/media_session_impl_service_routing_unittest.cc content/browser/mojo_binder_policy_applier.h content/browser/navigation_browsertest.cc +content/browser/navigation_transitions/back_forward_transition_animation_manager_android_browsertest.cc +content/browser/navigation_transitions/back_forward_transition_animator.cc content/browser/network/accept_header_browsertest.cc content/browser/network/trust_token_browsertest.cc content/browser/network/trust_token_origin_trial_browsertest.cc @@ -3609,7 +3792,9 @@ content/browser/private_aggregation/PRESUBMIT.py content/browser/process_lock.h content/browser/push_messaging/push_messaging_manager.cc content/browser/renderer_host/back_forward_cache_metrics.cc +content/browser/renderer_host/back_forward_cache_subframe_navigation_throttle_unittest.cc content/browser/renderer_host/clipboard_host_impl_unittest.cc +content/browser/renderer_host/direct_manipulation_test_helper_win.cc content/browser/renderer_host/dwrite_font_proxy_impl_win.cc content/browser/renderer_host/frame_tree_unittest.cc content/browser/renderer_host/legacy_render_widget_host_win.cc @@ -3632,8 +3817,8 @@ content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_unittest.cc content/browser/renderer_host/render_view_host_impl.h content/browser/renderer_host/render_view_host_unittest.cc +content/browser/renderer_host/render_widget_host_delegate.h content/browser/renderer_host/render_widget_host_impl.h -content/browser/renderer_host/render_widget_host_input_event_router.cc content/browser/renderer_host/render_widget_host_view_aura.h content/browser/renderer_host/should_swap_browsing_instance.h content/browser/renderer_host/text_input_client_mac.h @@ -3644,9 +3829,9 @@ content/browser/resources/traces_internals/icons.html content/browser/sandbox_ipc_linux.h content/browser/screen_orientation/screen_orientation_provider_unittest.cc content/browser/serial/serial_unittest.cc -content/browser/service_worker/service_worker_container_host.cc content/browser/service_worker/service_worker_hid_delegate_observer_unittest.cc content/browser/service_worker/service_worker_main_resource_loader.h +content/browser/service_worker/service_worker_security_utils.cc content/browser/service_worker/service_worker_usb_delegate_observer_unittest.cc content/browser/service_worker/service_worker_version_browsertest.cc content/browser/session_history_browsertest.cc @@ -3658,14 +3843,14 @@ content/browser/site_per_process_unload_browsertest.cc content/browser/sms/sms_parser_unittest.cc content/browser/sms/sms_provider_gms_unittest.cc content/browser/sms/webotp_service_unittest.cc -content/browser/speech/endpointer/energy_endpointer.cc -content/browser/speech/speech_recognition_engine.cc +content/browser/speech/network_speech_recognition_engine_impl.cc content/browser/speech/tts_mac.mm content/browser/speech/tts_win.cc content/browser/storage_partition_impl_unittest.cc content/browser/system_dns_resolution/system_dns_resolver_browsertest.cc content/browser/text_fragment_browsertest.cc content/browser/url_info.h +content/browser/url_loader_factory_params_helper.cc content/browser/usb/web_usb_service_impl_unittest.cc content/browser/utility_sandbox_delegate_win.cc content/browser/web_contents/aura/gesture_nav_simple_unittest.cc @@ -3686,6 +3871,9 @@ content/browser/webid/idp_network_request_manager_unittest.cc content/browser/zygote_host/zygote_host_impl_linux.cc content/child/runtime_features.cc content/common/features.cc +content/common/input/render_input_router.h +content/common/input/render_widget_host_input_event_router.cc +content/common/input/render_widget_host_view_input.h content/common/input/touch_action_filter.h content/common/service_worker/race_network_request_url_loader_client.cc content/common/zygote/zygote_communication_linux.h @@ -3781,6 +3969,7 @@ crypto/nss_util.cc crypto/rsa_private_key_unittest.cc crypto/secure_util.h crypto/unexportable_key.h +crypto/unexportable_key_unittest.cc crypto/unexportable_key_win.cc device/bluetooth/bluetooth_adapter_android.cc device/bluetooth/bluetooth_adapter_mac.mm @@ -3798,6 +3987,7 @@ device/fido/aoa/android_accessory_discovery.cc device/fido/aoa/android_accessory_discovery.h device/fido/attestation_statement_formats.cc device/fido/discoverable_credential_metadata.h +device/fido/enclave/constants.cc device/fido/enclave/enclave_websocket_client.cc device/fido/features.h device/fido/fido_constants.h @@ -3893,6 +4083,7 @@ extensions/common/manifest_constants.h extensions/common/manifest_handlers/content_capabilities_manifest_unittest.cc extensions/common/manifest_handlers/csp_info_unittest.cc extensions/common/manifest_handlers/externally_connectable_unittest.cc +extensions/common/manifest_handlers/homepage_url_unittest.cc extensions/common/manifest_handlers/oauth2_manifest_unittest.cc extensions/common/manifest_handlers/replacement_apps_unittest.cc extensions/common/message_bundle.h @@ -3938,7 +4129,9 @@ google_apis/classroom/classroom_api_list_course_work_request.h google_apis/classroom/classroom_api_list_course_work_request_unittest.cc google_apis/classroom/classroom_api_list_courses_request.h google_apis/classroom/classroom_api_list_student_submissions_request.h +google_apis/classroom/classroom_api_list_students_request.h google_apis/classroom/classroom_api_student_submissions_response_types.h +google_apis/classroom/classroom_api_students_response_types.h google_apis/drive/drive_api_parser.cc google_apis/drive/drive_api_parser.h google_apis/drive/drive_api_parser_unittest.cc @@ -3975,10 +4168,11 @@ google_apis/gcm/engine/gservices_settings_unittest.cc google_apis/gcm/engine/mcs_client.cc google_apis/gcm/engine/registration_request_unittest.cc google_apis/gcm/tools/mcs_probe.cc -google_apis/google_api_keys.cc +google_apis/google_api_keys-inc.cc google_apis/google_api_keys.h google_apis/tasks/tasks_api_requests.h google_apis/tasks/tasks_api_response_types.h +google_apis/tasks/tasks_api_response_types_unittest.cc google_apis/tasks/tasks_api_task_status.h google_apis/tasks/tasks_api_url_generator_utils.h google_apis/tasks/tasks_api_url_generator_utils_unittest.cc @@ -3998,6 +4192,9 @@ google_apis/test/data/drive/changelist_with_new_start_page_token.json google_apis/test/data/drive/directory_entry.json google_apis/test/data/drive/file_entry.json google_apis/test/data/drive/filelist.json +google_apis/youtube_music/youtube_music_api_requests.cc +google_apis/youtube_music/youtube_music_api_requests.h +google_apis/youtube_music/youtube_music_api_response_types.h google_update/google_update_idl.idl gpu/GLES2/extensions/ANGLE/EGL_ANGLE_sync_control_rate.txt gpu/GLES2/extensions/CHROMIUM/EGL_CHROMIUM_sync_control.txt @@ -4005,6 +4202,7 @@ gpu/PRESUBMIT.py gpu/command_buffer/PRESUBMIT.py gpu/command_buffer/client/fenced_allocator.h gpu/command_buffer/client/shared_memory_limits.h +gpu/command_buffer/client/test_shared_image_interface.cc gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc gpu/command_buffer/service/shader_translator_unittest.cc @@ -4012,12 +4210,17 @@ gpu/command_buffer/service/shared_image/dcomp_image_backing_factory.cc gpu/command_buffer/service/shared_image/dcomp_surface_image_backing.cc gpu/command_buffer/service/shared_image/dxgi_swap_chain_image_representation.cc gpu/command_buffer/service/shared_image/ozone_image_backing_factory.cc +gpu/command_buffer/service/shared_image/shared_image_factory.cc gpu/command_buffer/service/shared_image/video_image_reader_image_backing.cc +gpu/command_buffer/service/shared_image_interface_in_process.cc gpu/command_buffer/service/surface_texture_gl_owner.cc gpu/config/PRESUBMIT.py gpu/config/gpu_control_list_format.txt gpu/config/gpu_info_collector_win.cc +gpu/config/gpu_switches.cc +gpu/ipc/client/shared_image_interface_proxy.cc gpu/ipc/common/PRESUBMIT.py +gpu/ipc/common/gpu_memory_buffer_impl_test_template.h gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc gpu/vulkan/PRESUBMIT.py headless/lib/browser/protocol/headless_handler.cc @@ -4069,8 +4272,8 @@ ios/chrome/browser/policy/model/cloud/user_policy_signin_service_unittest.mm ios/chrome/browser/policy/model/new_tab_page_location_policy_handler_unittest.cc ios/chrome/browser/policy/model/reporting/profile_report_generator_ios_unittest.mm ios/chrome/browser/policy/model/restrict_accounts_policy_handler_unittest.cc +ios/chrome/browser/prerender/model/preload_controller_unittest.mm ios/chrome/browser/prerender/model/prerender_service_impl_unittest.mm -ios/chrome/browser/qr_scanner/ui_bundled/qr_scanner_app_interface.mm ios/chrome/browser/reading_list/model/reading_list_browser_agent_unittest.mm ios/chrome/browser/safe_browsing/model/safe_browsing_client_impl_unittest.mm ios/chrome/browser/safe_browsing/model/tailored_security/tailored_security_tab_helper_unittest.mm @@ -4081,6 +4284,7 @@ ios/chrome/browser/search_engines/model/search_engine_js_unittest.mm ios/chrome/browser/search_engines/model/search_engine_tab_helper.h ios/chrome/browser/search_engines/model/search_engine_tab_helper.mm ios/chrome/browser/shared/coordinator/scene/scene_controller.mm +ios/chrome/browser/shared/coordinator/scene/scene_controller_unittest.mm ios/chrome/browser/shared/model/url/chrome_url_constants.cc ios/chrome/browser/shared/model/web_state_list/order_controller_source_from_web_state_list_unittest.mm ios/chrome/browser/shared/model/web_state_list/web_state_list_unittest.mm @@ -4096,14 +4300,14 @@ ios/chrome/browser/signin/model/pattern_account_restriction_unittest.mm ios/chrome/browser/signin/model/system_identity_manager.h ios/chrome/browser/ssl/model/ios_ssl_error_handler_unittest.mm ios/chrome/browser/supervised_user/model/supervised_user_url_filter_tab_helper_unittest.mm +ios/chrome/browser/ui/authentication/history_sync/history_sync_capabilities_fetcher_unittest.mm +ios/chrome/browser/ui/authentication/identity_chooser/identity_chooser_coordinator_unittest.mm ios/chrome/browser/ui/authentication/signin/add_account_signin/add_account_signin_manager_unittest.mm -ios/chrome/browser/ui/authentication/signin/advanced_settings_signin/advanced_settings_signin_mediator_unittest.mm ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_promo_signin_mediator_unittest.mm ios/chrome/browser/ui/authentication/signin/signin_utils_unittest.mm -ios/chrome/browser/ui/authentication/signin/user_signin/user_signin_mediator_unittest.mm ios/chrome/browser/ui/authentication/signin_earl_grey_ui_test_util.mm -ios/chrome/browser/ui/authentication/unified_consent/identity_chooser/identity_chooser_coordinator_unittest.mm -ios/chrome/browser/ui/authentication/unified_consent/unified_consent_view_controller_unittest.mm +ios/chrome/browser/ui/autofill/authentication/authentication_egtest_util.mm +ios/chrome/browser/ui/autofill/authentication/card_unmask_authentication_egtest.mm ios/chrome/browser/ui/autofill/cells/target_account_item_unittest.mm ios/chrome/browser/ui/autofill/manual_fill/form_observer_helper_unittest.mm ios/chrome/browser/ui/autofill/manual_fill/manual_fill_password_mediator_unittest.mm @@ -4113,16 +4317,18 @@ ios/chrome/browser/ui/bookmarks/bookmark_earl_grey.mm ios/chrome/browser/ui/bookmarks/bookmark_earl_grey_ui.h ios/chrome/browser/ui/bookmarks/bookmark_mediator_unittest.mm ios/chrome/browser/ui/bookmarks/bookmarks_egtest.mm +ios/chrome/browser/ui/bookmarks/folder_chooser/bookmarks_folder_chooser_egtest.mm ios/chrome/browser/ui/bring_android_tabs/tab_list_from_android_mediator_unittest.mm ios/chrome/browser/ui/content_suggestions/cells/most_visited_tiles_mediator_unittest.mm -ios/chrome/browser/ui/content_suggestions/content_suggestions_mediator_unittest.mm ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller_unittest.mm ios/chrome/browser/ui/content_suggestions/ntp_home_egtest.mm ios/chrome/browser/ui/content_suggestions/parcel_tracking/parcel_tracking_mediator_unittest.mm +ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_mediator.mm ios/chrome/browser/ui/context_menu/context_menu_configuration_provider_unittest.mm ios/chrome/browser/ui/credential_provider_promo/resources/CPE_promo_animation_edu_autofill.json ios/chrome/browser/ui/credential_provider_promo/resources/CPE_promo_animation_edu_autofill_darkmode.json ios/chrome/browser/ui/dialogs/nsurl_protection_space_util_unittest.mm +ios/chrome/browser/ui/first_run/first_run_search_engine_choice_egtest.mm ios/chrome/browser/ui/infobars/modals/autofill_address_profile/infobar_save_address_profile_table_view_controller_unittest.mm ios/chrome/browser/ui/infobars/test/test_infobar_password_delegate.mm ios/chrome/browser/ui/link_to_text/link_to_text_mediator_unittest.mm @@ -4137,6 +4343,7 @@ ios/chrome/browser/ui/omnibox/zero_suggest_prefetch_helper_unittest.mm ios/chrome/browser/ui/overlays/infobar_banner/passwords/password_infobar_banner_overlay_mediator_unittest.mm ios/chrome/browser/ui/overlays/infobar_banner/tab_pickup/tab_pickup_infobar_banner_overlay_mediator_unittest.mm ios/chrome/browser/ui/overlays/infobar_modal/passwords/password_infobar_modal_overlay_mediator_unittest.mm +ios/chrome/browser/ui/page_info/page_info_egtest.mm ios/chrome/browser/ui/page_info/page_info_security_egtest.mm ios/chrome/browser/ui/permissions/permissions_egtest.mm ios/chrome/browser/ui/popup_menu/overflow_menu/overflow_menu_mediator_unittest.mm @@ -4150,7 +4357,6 @@ ios/chrome/browser/ui/settings/clear_browsing_data/clear_browsing_data_egtest.mm ios/chrome/browser/ui/settings/google_services/manage_accounts/accounts_table_view_controller_unittest.mm ios/chrome/browser/ui/settings/google_services/manage_sync_settings_command_handler.h ios/chrome/browser/ui/settings/google_services/manage_sync_settings_mediator_unittest.mm -ios/chrome/browser/ui/settings/import_data_table_view_controller_unittest.mm ios/chrome/browser/ui/settings/password/password_checkup/password_checkup_constants.mm ios/chrome/browser/ui/settings/password/password_checkup/password_checkup_mediator_unittest.mm ios/chrome/browser/ui/settings/password/password_checkup/password_checkup_view_controller_unittest.mm @@ -4172,7 +4378,6 @@ ios/chrome/browser/ui/settings/password/password_sharing/sharing_status_mediator ios/chrome/browser/ui/settings/password/passwords_mediator_unittest.mm ios/chrome/browser/ui/settings/safety_check/safety_check_mediator_unittest.mm ios/chrome/browser/ui/settings/search_engine_table_view_controller_unittest.mm -ios/chrome/browser/ui/settings/settings_app_interface.mm ios/chrome/browser/ui/settings/supervised_user_settings_app_interface.mm ios/chrome/browser/ui/settings/table_cell_catalog_view_controller.mm ios/chrome/browser/ui/settings/translate_table_view_controller.mm @@ -4187,8 +4392,6 @@ ios/chrome/browser/ui/sharing/qr_generator/qr_generator_util_unittest.mm ios/chrome/browser/ui/start_surface/start_surface_scene_agent_unittest.mm ios/chrome/browser/ui/tab_switcher/tab_grid/grid/base_grid_mediator_unittest.mm ios/chrome/browser/ui/toolbar/adaptive_toolbar_mediator_unittest.mm -ios/chrome/browser/ui/whats_new/data_source/resources/m116/calendar_event.json -ios/chrome/browser/ui/whats_new/data_source/resources/m116/calendar_event_darkmode.json ios/chrome/browser/url_loading/model/image_search_param_generator_unittest.mm ios/chrome/browser/web/model/chrome_web_client_unittest.mm ios/chrome/browser/web/model/font_size/font_size_tab_helper_unittest.mm @@ -4220,13 +4423,7 @@ ios/net/cookies/system_cookie_store_unittest_template.h ios/net/crn_http_protocol_handler.mm ios/net/nsurlrequest_util_unittest.mm ios/testing/PRESUBMIT.py -ios/testing/data/http_server_files/email_signup_form.html ios/testing/data/http_server_files/opensearch.xml -ios/testing/data/http_server_files/simple_login_form.html -ios/testing/data/http_server_files/simple_login_form_empty.html -ios/testing/data/http_server_files/simple_login_form_empty_autofocus.html -ios/testing/data/http_server_files/simple_login_form_empty_passkey.html -ios/testing/data/http_server_files/simple_signup_form.html ios/testing/data/http_server_files/window_open.html ios/web/browsing_data/browsing_data_removing_util_unittest.mm ios/web/browsing_data/system_cookie_store_util_unittest.mm @@ -4259,6 +4456,7 @@ ios/web_view/internal/passwords/cwv_leak_check_credential_unittest.mm ios/web_view/internal/passwords/cwv_password_unittest.mm ios/web_view/internal/passwords/cwv_reuse_check_service_unittest.mm ios/web_view/internal/safe_browsing/cwv_unsafe_url_handler_unittest.mm +ios/web_view/internal/signin/account_capabilities_fetcher_ios_web_view_unittest.mm ios/web_view/internal/signin/cwv_identity_unittest.mm ios/web_view/internal/signin/web_view_device_accounts_provider_impl_unittest.mm ios/web_view/internal/sync/cwv_sync_controller_unittest.mm @@ -4300,6 +4498,7 @@ media/base/win/mf_helpers.h media/base/win/mf_initializer.cc media/capture/content/smooth_event_sampler_unittest.cc media/capture/video/android/video_capture_device_android.h +media/capture/video/apple/video_capture_device_avfoundation.mm media/capture/video/chromeos/camera_3a_controller.cc media/capture/video/chromeos/camera_3a_controller.h media/capture/video/chromeos/camera_device_delegate.cc @@ -4318,10 +4517,15 @@ media/cdm/win/media_foundation_cdm.cc media/cdm/win/test/media_foundation_clear_key_decryptor.cc media/cdm/win/test/mock_media_protection_pmp_server.h media/ffmpeg/ffmpeg_regression_tests.cc +media/ffmpeg/scripts/build_ffmpeg.py +media/ffmpeg/scripts/credits_updater.py +media/ffmpeg/scripts/generate_gn.py +media/ffmpeg/scripts/robo_setup.py media/filters/decrypting_audio_decoder.h media/filters/decrypting_video_decoder.h media/filters/source_buffer_stream_unittest.cc media/filters/video_cadence_estimator.h +media/filters/win/media_foundation_audio_decoder.cc media/formats/hls/media_playlist_unittest.cc media/formats/hls/multivariant_playlist_unittest.cc media/formats/hls/tags_unittest.cc @@ -4329,6 +4533,7 @@ media/fuchsia/common/vmo_buffer_writer_queue.cc media/gpu/android/android_video_encode_accelerator.h media/gpu/android/ndk_video_encode_accelerator.cc media/gpu/android/video_accelerator_util.h +media/gpu/av1_decoder_unittest.cc media/gpu/buffer_validation_unittest.cc media/gpu/chromeos/shaders/PRESUBMIT.py media/gpu/gpu_video_encode_accelerator_helpers.cc @@ -4338,10 +4543,11 @@ media/gpu/test/video_encoder/video_encoder_test_environment.cc media/gpu/v4l2/mt21/mt21_decompressor_unittest.cc media/gpu/v4l2/mt21/mt21_util.h media/gpu/v4l2/stateless/av1_delegate.cc +media/gpu/v4l2/stateless/v4l2_stateless_video_decoder.cc media/gpu/v4l2/test/av1_decoder.cc -media/gpu/v4l2/test/v4l2_unittest.cc media/gpu/v4l2/test/video_decoder.cc media/gpu/v4l2/v4l2_stateful_video_decoder.cc +media/gpu/v4l2/v4l2_unittest.cc media/gpu/v4l2/v4l2_video_decoder_delegate_av1.cc media/gpu/vaapi/test/av1_decoder.cc media/gpu/vaapi/test/vp8_decoder.cc @@ -4382,6 +4588,7 @@ media/renderers/win/media_foundation_stream_wrapper.cc media/renderers/win/media_foundation_stream_wrapper.h media/renderers/win/media_foundation_video_stream.cc media/test/PRESUBMIT.py +media/video/gpu_memory_buffer_video_frame_pool.cc media/video/video_encode_accelerator.h media/video/vpx_video_encoder.cc mojo/PRESUBMIT.py @@ -4578,6 +4785,9 @@ net/cookies/parsed_cookie.h net/data/filter_unittests/google.txt net/data/fuzzer_data/http_security_headers/http_security_header_047.txt net/data/parse_certificate_unittest/v3_certificate_template.txt +net/device_bound_sessions/device_bound_session_registration_fetcher_param.cc +net/device_bound_sessions/registration_fetcher.cc +net/device_bound_sessions/unexportable_key_service_factory.cc net/disk_cache/disk_cache.h net/disk_cache/simple/simple_backend_impl.h net/disk_cache/simple/simple_file_enumerator.h @@ -4684,10 +4894,10 @@ net/quic/properties_based_quic_server_info_test.cc net/quic/quic_chromium_client_session_test.cc net/quic/quic_chromium_client_stream_test.cc net/quic/quic_network_transaction_unittest.cc -net/quic/quic_proxy_client_socket_unittest.cc +net/quic/quic_proxy_client_socket_test_base.h net/quic/quic_session_pool.cc net/quic/quic_session_pool_test.cc -net/server/web_socket.h +net/quic/quic_test_packet_maker.h net/socket/socket_options.h net/socket/socket_test_util.cc net/socket/socks5_client_socket_unittest.cc @@ -4809,9 +5019,7 @@ printing/metafile_skia.cc printing/print_settings_initializer_win.cc printing/printing_context.h printing/test/PRESUBMIT.py -remoting/android/java/res/layout/host_offline.xml -remoting/android/java/res/layout/host_online.xml -remoting/base/corp_session_authz_service_client_factory.cc +remoting/base/corp_auth_util.cc remoting/base/is_google_email.cc remoting/base/service_urls.cc remoting/client/notification/gstatic_json_fetcher.cc @@ -4906,6 +5114,7 @@ sandbox/win/src/sandbox_nt_util.h sandbox/win/src/sandbox_policy.h sandbox/win/src/security_level.h services/BUILD.gn +services/accessibility/features/javascript/event.js services/device/generic_sensor/platform_sensor_ambient_light_mac.cc services/device/generic_sensor/platform_sensor_and_provider_unittest_win.cc services/device/generic_sensor/platform_sensor_provider_chromeos.cc @@ -4934,15 +5143,16 @@ services/network/http_cache_data_counter_unittest.cc services/network/http_cache_data_remover_unittest.cc services/network/mojo_host_resolver_impl_unittest.cc services/network/network_context_unittest.cc +services/network/orb/orb_impl.cc +services/network/orb/orb_impl.h +services/network/orb/orb_impl_unittest.cc +services/network/orb/orb_sniffers.cc services/network/proxy_resolver_factory_mojo_unittest.cc services/network/public/cpp/content_security_policy/content_security_policy_unittest.cc -services/network/public/cpp/corb/corb_impl.cc -services/network/public/cpp/corb/corb_impl_unittest.cc -services/network/public/cpp/corb/orb_impl.cc -services/network/public/cpp/corb/orb_impl.h services/network/public/cpp/cors/cors_unittest.cc services/network/public/cpp/cors/origin_access_entry_unittest.cc services/network/public/cpp/cors/origin_access_list_unittest.cc +services/network/public/cpp/cross_origin_resource_policy.cc services/network/public/cpp/is_potentially_trustworthy.cc services/network/public/cpp/network_switches.cc services/network/public/cpp/transferable_socket.cc @@ -4980,9 +5190,11 @@ services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler_unittest.cc services/video_capture/test/fake_video_capture_device_unittest.cc services/viz/public/cpp/gpu/gpu.cc services/webnn/dml/adapter.cc -services/webnn/dml/command_recorder.cc -services/webnn/dml/graph_builder.h -services/webnn/dml/graph_impl.cc +services/webnn/dml/adapter.h +services/webnn/dml/context_impl_dml.cc +services/webnn/dml/graph_builder_dml.h +services/webnn/dml/graph_impl_dml.cc +services/webnn/dml/graph_impl_dml.h services/webnn/dml/tensor_desc.cc services/webnn/dml/utils.cc services/webnn/webnn_graph_impl_backend_test.cc @@ -5004,29 +5216,14 @@ storage/common/database/database_identifier_unittest.cc storage/common/file_system/file_system_util_unittest.cc storage/test/PRESUBMIT.py testing/PRESUBMIT.py +testing/android/junit/shadows-allowlist.txt testing/android/native_test/java/AndroidManifest.xml.jinja2 testing/buildbot/PRESUBMIT.py testing/buildbot/check.py -testing/buildbot/chromium.android.fyi.json -testing/buildbot/chromium.android.json -testing/buildbot/chromium.clang.json -testing/buildbot/chromium.coverage.json -testing/buildbot/chromium.dawn.json -testing/buildbot/chromium.dev.json -testing/buildbot/chromium.fyi.json -testing/buildbot/chromium.gpu.fyi.json -testing/buildbot/chromium.memory.json -testing/buildbot/chromium.webrtc.fyi.json -testing/buildbot/chromium.webrtc.json testing/buildbot/filters/PRESUBMIT.py testing/buildbot/generate_buildbot_json.py -testing/buildbot/generate_buildbot_json_unittest.py -testing/buildbot/internal.optimization_guide.json testing/buildbot/query_optimal_shard_counts.py testing/buildbot/scripts/upload_test_result_artifacts.py -testing/buildbot/tryserver.chromium.android.json -testing/buildbot/unittest_expectations/test_android_output_options/chromium.test.json -testing/buildbot/unittest_expectations/test_isolated_script_tests_android/chromium.test.json testing/buildbot/waterfalls.pyl testing/chromoting/browser_test_commands_linux.txt testing/chromoting/chromoting_test_driver_commands_linux.txt @@ -5163,11 +5360,8 @@ third_party/android_deps/libs/com_google_android_gms_play_services_iid/3pp/fetch third_party/android_deps/libs/com_google_android_gms_play_services_instantapps/3pp/fetch.py third_party/android_deps/libs/com_google_android_gms_play_services_location/3pp/fetch.py third_party/android_deps/libs/com_google_android_gms_play_services_phenotype/3pp/fetch.py -third_party/android_deps/libs/com_google_android_gms_play_services_places_placereport/3pp/fetch.py third_party/android_deps/libs/com_google_android_gms_play_services_stats/3pp/fetch.py third_party/android_deps/libs/com_google_android_gms_play_services_tasks/3pp/fetch.py -third_party/android_deps/libs/com_google_android_gms_play_services_tflite_impl/3pp/fetch.py -third_party/android_deps/libs/com_google_android_gms_play_services_tflite_java/3pp/fetch.py third_party/android_deps/libs/com_google_android_gms_play_services_vision/3pp/fetch.py third_party/android_deps/libs/com_google_android_gms_play_services_vision_common/3pp/fetch.py third_party/android_deps/libs/com_google_android_material_material/3pp/fetch.py @@ -5204,6 +5398,7 @@ third_party/angle/extensions/ANGLE_logic_op.txt third_party/angle/extensions/ANGLE_lossy_etc_decode.txt third_party/angle/extensions/ANGLE_memory_size.txt third_party/angle/extensions/ANGLE_multi_draw.txt +third_party/angle/extensions/ANGLE_program_binary_readiness_query.txt third_party/angle/extensions/ANGLE_program_cache_control.txt third_party/angle/extensions/ANGLE_relaxed_vertex_attribute_type.txt third_party/angle/extensions/ANGLE_request_extension.txt @@ -5223,6 +5418,8 @@ third_party/angle/extensions/EGL_ANGLE_device_cgl.txt third_party/angle/extensions/EGL_ANGLE_device_creation.txt third_party/angle/extensions/EGL_ANGLE_device_creation_d3d11.txt third_party/angle/extensions/EGL_ANGLE_device_d3d.txt +third_party/angle/extensions/EGL_ANGLE_device_d3d11.txt +third_party/angle/extensions/EGL_ANGLE_device_d3d9.txt third_party/angle/extensions/EGL_ANGLE_device_eagl.txt third_party/angle/extensions/EGL_ANGLE_device_metal.txt third_party/angle/extensions/EGL_ANGLE_device_vulkan.txt @@ -5238,6 +5435,7 @@ third_party/angle/extensions/EGL_ANGLE_global_fence_sync.txt third_party/angle/extensions/EGL_ANGLE_iosurface_client_buffer.txt third_party/angle/extensions/EGL_ANGLE_keyed_mutex.txt third_party/angle/extensions/EGL_ANGLE_metal_texture_client_buffer.txt +third_party/angle/extensions/EGL_ANGLE_no_error.txt third_party/angle/extensions/EGL_ANGLE_platform_angle_d3d_luid.txt third_party/angle/extensions/EGL_ANGLE_platform_angle_device_id.txt third_party/angle/extensions/EGL_ANGLE_power_preference.txt @@ -5316,7 +5514,6 @@ third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cpp third_party/angle/src/libANGLE/renderer/vulkan/ImageVk.cpp third_party/angle/src/libANGLE/renderer/vulkan/PersistentCommandPool.cpp third_party/angle/src/libANGLE/renderer/vulkan/ProgramExecutableVk.cpp -third_party/angle/src/libANGLE/renderer/vulkan/RendererVk.cpp third_party/angle/src/libANGLE/renderer/vulkan/SurfaceVk.h third_party/angle/src/libANGLE/renderer/vulkan/VkImageImageSiblingVk.cpp third_party/angle/src/libANGLE/renderer/vulkan/android/HardwareBufferImageSiblingVkAndroid.cpp @@ -5325,6 +5522,7 @@ third_party/angle/src/libANGLE/renderer/vulkan/shaders/src/third_party/ffx_spd/f third_party/angle/src/libANGLE/renderer/vulkan/vk_cache_utils.h third_party/angle/src/libANGLE/renderer/vulkan/vk_format_utils.h third_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp +third_party/angle/src/libANGLE/renderer/vulkan/vk_renderer.cpp third_party/angle/src/libANGLE/validationEGL.cpp third_party/angle/src/libANGLE/validationES.cpp third_party/angle/src/libGLESv2/egl_stubs.cpp @@ -5350,8 +5548,10 @@ third_party/angle/src/tests/gl_tests/VulkanPerformanceCounterTest.cpp third_party/angle/src/tests/gl_tests/gles1/BootAnimationTest.cpp third_party/angle/src/tests/perf_tests/ANGLEPerfTest.h third_party/angle/src/tests/perf_tests/DrawCallPerf.cpp +third_party/angle/src/tests/perf_tests/TracePerfTest.cpp third_party/angle/src/tests/restricted_traces/gen_restricted_traces.py third_party/angle/src/tests/restricted_traces/sync_restricted_traces_to_cipd.py +third_party/angle/src/tests/run_perf_tests.py third_party/angle/src/tests/test_utils/angle_test_instantiate.cpp third_party/angle/src/tests/test_utils/runner/TestSuite.cpp third_party/angle/src/tests/test_utils/runner/android/java/AndroidManifest.xml.jinja2 @@ -5374,8 +5574,12 @@ third_party/anonymous_tokens/src/anonymous_tokens/cpp/shared/proto_utils.h third_party/ashmem/ashmem-dev.c third_party/axe-core/axe.js third_party/axe-core/axe.min.js +third_party/beto-core/src/nearby/presence/ldt_np_adv_ffi/c/fuzz/ldt_fuzzer.cc +third_party/beto-core/src/nearby/presence/np_cpp_ffi/shared/shared_test_util.h +third_party/bidimapper/mapper.js third_party/blink/PRESUBMIT.py third_party/blink/common/PRESUBMIT.py +third_party/blink/common/features.cc third_party/blink/common/loader/record_load_histograms.cc third_party/blink/common/origin_trials/trial_token.cc third_party/blink/common/origin_trials/trial_token_validator_unittest.cc @@ -5537,6 +5741,7 @@ third_party/blink/public/common/custom_handlers/protocol_handler_utils.h third_party/blink/public/common/frame/delegated_capability_request_token.h third_party/blink/public/common/frame/user_activation_state.h third_party/blink/public/common/input/web_keyboard_event.h +third_party/blink/public/common/loader/throttling_url_loader.h third_party/blink/public/common/origin_trials/trial_token.h third_party/blink/public/common/scheduler/PRESUBMIT.py third_party/blink/public/common/storage_key/storage_key.h @@ -5549,13 +5754,13 @@ third_party/blink/public/platform/platform.h third_party/blink/public/platform/web_audio_source_provider_impl.h third_party/blink/public/platform/web_url_response.h third_party/blink/public/strings/blink_strings.grd +third_party/blink/public/web/web_crypto_histograms.h third_party/blink/public/web/web_navigation_params.h third_party/blink/public/web/web_node.h third_party/blink/public/web/web_window_features.h third_party/blink/renderer/PRESUBMIT.py third_party/blink/renderer/bindings/PRESUBMIT.py third_party/blink/renderer/bindings/core/v8/generated_code_helper.cc -third_party/blink/renderer/bindings/core/v8/script_regexp.cc third_party/blink/renderer/bindings/core/v8/window_proxy.cc third_party/blink/renderer/bindings/core/v8/window_proxy.h third_party/blink/renderer/build/scripts/core/style/make_computed_style_base.py @@ -5590,6 +5795,7 @@ third_party/blink/renderer/core/css/remote_font_face_source.cc third_party/blink/renderer/core/css/resolver/style_adjuster.cc third_party/blink/renderer/core/css/rule_feature_set.cc third_party/blink/renderer/core/css/selector_checker.cc +third_party/blink/renderer/core/css/selector_query.cc third_party/blink/renderer/core/css/style_engine.cc third_party/blink/renderer/core/css/style_engine_test.cc third_party/blink/renderer/core/css/style_rule_import.cc @@ -5629,6 +5835,7 @@ third_party/blink/renderer/core/dom/node_iterator_base.h third_party/blink/renderer/core/dom/node_list.idl third_party/blink/renderer/core/dom/node_lists_node_data.h third_party/blink/renderer/core/dom/node_rare_data.h +third_party/blink/renderer/core/dom/observable.cc third_party/blink/renderer/core/dom/observable.h third_party/blink/renderer/core/dom/processing_instruction.idl third_party/blink/renderer/core/dom/range.cc @@ -5638,16 +5845,21 @@ third_party/blink/renderer/core/dom/transform_source.h third_party/blink/renderer/core/dom/tree_walker.cc third_party/blink/renderer/core/dom/tree_walker.h third_party/blink/renderer/core/dom/tree_walker.idl +third_party/blink/renderer/core/editing/commands/editor_command.cc third_party/blink/renderer/core/editing/commands/smart_replace_icu.cc third_party/blink/renderer/core/editing/commands/style_commands.cc third_party/blink/renderer/core/editing/dom_selection.cc third_party/blink/renderer/core/editing/editing_behavior.cc third_party/blink/renderer/core/editing/editing_utilities.cc +third_party/blink/renderer/core/editing/editing_utilities_test.cc +third_party/blink/renderer/core/editing/finder/find_buffer.cc third_party/blink/renderer/core/editing/finder/find_buffer.h +third_party/blink/renderer/core/editing/finder/find_buffer_test.cc third_party/blink/renderer/core/editing/serializers/serialization.cc third_party/blink/renderer/core/editing/spellcheck/cold_mode_spell_check_requester.h third_party/blink/renderer/core/editing/spellcheck/hot_mode_spell_check_requester.h third_party/blink/renderer/core/editing/spellcheck/idle_spell_check_controller.h +third_party/blink/renderer/core/editing/visible_units_line_test.cc third_party/blink/renderer/core/events/before_unload_event.cc third_party/blink/renderer/core/events/before_unload_event.h third_party/blink/renderer/core/events/clipboard_event.cc @@ -5668,6 +5880,7 @@ third_party/blink/renderer/core/events/ui_event_with_key_state.h third_party/blink/renderer/core/events/wheel_event.cc third_party/blink/renderer/core/events/wheel_event.h third_party/blink/renderer/core/events/wheel_event.idl +third_party/blink/renderer/core/execution_context/execution_context.h third_party/blink/renderer/core/execution_context/navigator_base.cc third_party/blink/renderer/core/exported/web_plugin_container_impl.cc third_party/blink/renderer/core/exported/web_searchable_form_data.cc @@ -5690,7 +5903,6 @@ third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc third_party/blink/renderer/core/frame/local_frame_view.cc third_party/blink/renderer/core/frame/local_frame_view.h third_party/blink/renderer/core/frame/navigator.cc -third_party/blink/renderer/core/frame/pending_beacon_dispatcher.h third_party/blink/renderer/core/frame/settings.h third_party/blink/renderer/core/frame/visual_viewport.h third_party/blink/renderer/core/frame/web_frame_serializer_impl.cc @@ -5756,6 +5968,7 @@ third_party/blink/renderer/core/input/event_handling_util.cc third_party/blink/renderer/core/input/mouse_event_manager.cc third_party/blink/renderer/core/input/pointer_event_manager.cc third_party/blink/renderer/core/inspector/devtools_session.h +third_party/blink/renderer/core/inspector/inspector_animation_agent.h third_party/blink/renderer/core/inspector/inspector_style_sheet.cc third_party/blink/renderer/core/intersection_observer/intersection_observer_controller.h third_party/blink/renderer/core/layout/adjust_for_absolute_zoom.h @@ -5848,7 +6061,6 @@ third_party/blink/renderer/core/scroll/scrollbar_theme_fluent.h third_party/blink/renderer/core/streams/readable_stream_transferring_optimizer.h third_party/blink/renderer/core/streams/transferable_streams.cc third_party/blink/renderer/core/streams/writable_stream_transferring_optimizer.h -third_party/blink/renderer/core/style/border_style.h third_party/blink/renderer/core/style/computed_style.h third_party/blink/renderer/core/style/computed_style_constants.h third_party/blink/renderer/core/style/content_data.h @@ -5877,6 +6089,8 @@ third_party/blink/renderer/core/svg/svg_path_element.idl third_party/blink/renderer/core/svg/svg_point.idl third_party/blink/renderer/core/svg/svg_rect.idl third_party/blink/renderer/core/svg/svg_rect_element.idl +third_party/blink/renderer/core/svg/svg_resource_document_cache.cc +third_party/blink/renderer/core/svg/svg_resource_document_cache.h third_party/blink/renderer/core/svg/svg_resource_document_content.cc third_party/blink/renderer/core/svg/svg_resource_document_content.h third_party/blink/renderer/core/svg/svg_style_element.idl @@ -5893,6 +6107,7 @@ third_party/blink/renderer/core/timing/performance.idl third_party/blink/renderer/core/timing/performance_entry.h third_party/blink/renderer/core/timing/performance_resource_timing.h third_party/blink/renderer/core/timing/responsiveness_metrics.cc +third_party/blink/renderer/core/timing/third_party_script_detector.cc third_party/blink/renderer/core/timing/window_performance.cc third_party/blink/renderer/core/timing/window_performance_test.cc third_party/blink/renderer/core/trustedtypes/generate_eventhandler_names.py @@ -5904,13 +6119,13 @@ third_party/blink/renderer/core/xml/xpath_ns_resolver.idl third_party/blink/renderer/core/xml/xslt_processor.cc third_party/blink/renderer/core/xml/xslt_processor.idl third_party/blink/renderer/core/xmlhttprequest/xml_http_request.cc -third_party/blink/renderer/modules/accessibility/ax_layout_object.cc +third_party/blink/renderer/modules/accessibility/ax_node_object.cc third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.h +third_party/blink/renderer/modules/accessibility/testing/internals_accessibility.h third_party/blink/renderer/modules/bluetooth/bluetooth_error.cc third_party/blink/renderer/modules/clipboard/clipboard_promise.cc third_party/blink/renderer/modules/credentialmanagement/authentication_credentials_container.cc -third_party/blink/renderer/modules/crypto/crypto_histograms.h third_party/blink/renderer/modules/encryptedmedia/encrypted_media_utils.h third_party/blink/renderer/modules/file_system_access/file_system_cloud_identifier.idl third_party/blink/renderer/modules/filesystem/dom_file_system_base_test.cc @@ -5931,12 +6146,12 @@ third_party/blink/renderer/modules/mediarecorder/vpx_encoder.cc third_party/blink/renderer/modules/mediastream/media_devices_test.cc third_party/blink/renderer/modules/mediastream/media_stream_utils.cc third_party/blink/renderer/modules/mediastream/media_stream_video_renderer_sink.h -third_party/blink/renderer/modules/ml/webnn/ml_graph_xnnpack.cc third_party/blink/renderer/modules/payments/android_pay_method_data.idl third_party/blink/renderer/modules/payments/on_payment_response_test.cc third_party/blink/renderer/modules/payments/payment_request.cc third_party/blink/renderer/modules/payments/payment_request_optional_total_test.cc third_party/blink/renderer/modules/payments/payment_response_test.cc +third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc third_party/blink/renderer/modules/presentation/presentation_connection_available_event.h third_party/blink/renderer/modules/scheduler/scheduler.idl third_party/blink/renderer/modules/service_worker/service_worker_content_settings_proxy.cc @@ -5948,7 +6163,7 @@ third_party/blink/renderer/modules/vibration/navigator_vibration.idl third_party/blink/renderer/modules/vibration/vibration_controller.cc third_party/blink/renderer/modules/webaudio/audio_context.cc third_party/blink/renderer/modules/webgl/webgl_unowned_texture.h -third_party/blink/renderer/modules/webgpu/gpu_external_texture.cc +third_party/blink/renderer/modules/webgpu/external_texture_helper.cc third_party/blink/renderer/modules/webgpu/gpu_render_pipeline.cc third_party/blink/renderer/modules/webmidi/navigator_web_midi.cc third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc @@ -5959,8 +6174,8 @@ third_party/blink/renderer/modules/xr/xr_session.h third_party/blink/renderer/modules/xr/xr_system.cc third_party/blink/renderer/platform/PRESUBMIT.py third_party/blink/renderer/platform/animation/timing_function.h +third_party/blink/renderer/platform/bindings/script_regexp.cc third_party/blink/renderer/platform/exported/web_crypto_algorithm.cc -third_party/blink/renderer/platform/exported/web_url_response.cc third_party/blink/renderer/platform/fonts/bitmap_glyphs_block_list.cc third_party/blink/renderer/platform/fonts/font_custom_platform_data.cc third_party/blink/renderer/platform/fonts/font_description.cc @@ -6007,18 +6222,15 @@ third_party/blink/renderer/platform/graphics/image.h third_party/blink/renderer/platform/graphics/paint/geometry_mapper.cc third_party/blink/renderer/platform/graphics/paint/geometry_mapper_transform_cache.h third_party/blink/renderer/platform/graphics/paint/region_capture_data.h -third_party/blink/renderer/platform/graphics/placeholder_image.cc -third_party/blink/renderer/platform/graphics/placeholder_image_test.cc third_party/blink/renderer/platform/heap/collection_support/heap_linked_stack.h third_party/blink/renderer/platform/image-decoders/bmp/bmp_image_decoder_test.cc -third_party/blink/renderer/platform/image-decoders/exif_reader.cc -third_party/blink/renderer/platform/image-decoders/exif_reader.h third_party/blink/renderer/platform/image-decoders/jpeg/jpeg_image_decoder.cc third_party/blink/renderer/platform/image-decoders/png/png_image_decoder.cc third_party/blink/renderer/platform/image-decoders/png/png_image_reader.cc third_party/blink/renderer/platform/image-decoders/webp/webp_image_decoder.cc third_party/blink/renderer/platform/instrumentation/use_counter.h third_party/blink/renderer/platform/loader/fetch/client_hints_preferences_test.cc +third_party/blink/renderer/platform/loader/fetch/fetch_utils.h third_party/blink/renderer/platform/loader/fetch/raw_resource.h third_party/blink/renderer/platform/loader/fetch/resource.cc third_party/blink/renderer/platform/loader/fetch/resource.h @@ -6040,6 +6252,7 @@ third_party/blink/renderer/platform/network/parsed_content_header_field_paramete third_party/blink/renderer/platform/peerconnection/rtc_video_decoder_factory.cc third_party/blink/renderer/platform/peerconnection/rtc_video_encoder.cc third_party/blink/renderer/platform/scheduler/main_thread/main_thread_task_queue.h +third_party/blink/renderer/platform/scheduler/main_thread/memory_purge_manager.cc third_party/blink/renderer/platform/scheduler/main_thread/memory_purge_manager.h third_party/blink/renderer/platform/scheduler/public/rail_mode_observer.h third_party/blink/renderer/platform/testing/image_decode_to_nia.cc @@ -6057,7 +6270,6 @@ third_party/blink/renderer/platform/transforms/skew_transform_operation.h third_party/blink/renderer/platform/transforms/transform_operation.h third_party/blink/renderer/platform/transforms/transform_operations.h third_party/blink/renderer/platform/transforms/translate_transform_operation.h -third_party/blink/renderer/platform/video_capture/video_capture_impl.cc third_party/blink/renderer/platform/weborigin/kurl.cc third_party/blink/renderer/platform/weborigin/kurl_test.cc third_party/blink/renderer/platform/weborigin/security_origin.cc @@ -6081,7 +6293,6 @@ third_party/blink/renderer/platform/wtf/vector_test.cc third_party/boringssl/roll_boringssl.py third_party/boringssl/src/CMakeLists.txt third_party/boringssl/src/crypto/cpu_aarch64_openbsd.c -third_party/boringssl/src/crypto/fipsmodule/CMakeLists.txt third_party/boringssl/src/crypto/fipsmodule/bn/mul.c third_party/boringssl/src/crypto/fipsmodule/rsa/rsa_impl.c third_party/boringssl/src/crypto/internal.h @@ -6089,6 +6300,7 @@ third_party/boringssl/src/crypto/pkcs7/pkcs7_test.cc third_party/boringssl/src/crypto/pkcs8/pkcs8_x509.c third_party/boringssl/src/crypto/rand_extra/windows.c third_party/boringssl/src/crypto/test/abi_test.h +third_party/boringssl/src/crypto/test/file_util.cc third_party/boringssl/src/crypto/thread_win.c third_party/boringssl/src/include/openssl/base.h third_party/boringssl/src/include/openssl/ssl.h @@ -6307,6 +6519,8 @@ third_party/catapult/dashboard/dashboard/pinpoint/elements/jobs-page/new-job-fab third_party/catapult/dashboard/dashboard/pinpoint/elements/navigation-bar-test.html third_party/catapult/dashboard/dashboard/pinpoint/elements/navigation-bar.html third_party/catapult/dashboard/dashboard/pinpoint/elements/results2-frame.html +third_party/catapult/dashboard/dashboard/pinpoint/handlers/job.py +third_party/catapult/dashboard/dashboard/pinpoint/handlers/job_test.py third_party/catapult/dashboard/dashboard/pinpoint/handlers/new_test.py third_party/catapult/dashboard/dashboard/pinpoint/index/index.html third_party/catapult/dashboard/dashboard/pinpoint/models/change/change_test.py @@ -6467,7 +6681,6 @@ third_party/catapult/telemetry/third_party/mox3/mox3/tests/test_mox.py third_party/catapult/telemetry/third_party/mox3/mox3/tests/test_stubout.py third_party/catapult/telemetry/third_party/png/png.py third_party/catapult/telemetry/third_party/websocket-client/setup.py -third_party/catapult/third_party/WebOb/docs/differences.txt third_party/catapult/third_party/apiclient/googleapiclient/discovery.py third_party/catapult/third_party/apiclient/googleapiclient/errors.py third_party/catapult/third_party/apiclient/googleapiclient/http.py @@ -7691,7 +7904,9 @@ third_party/crashpad/crashpad/util/win/safe_terminate_process_test.cc third_party/crashpad/crashpad/util/win/xp_compat.h third_party/crashpad/update.py third_party/cros-components/src/card/card.ts +third_party/cros-components/src/orca_feedback/orca-feedback.ts third_party/cros-components/src/snackbar/show_snackbar.ts +third_party/cros-components/src/snackbar/snackbar.ts third_party/cros-components/src/textfield/textfield.ts third_party/cros-components/src/tooltip/tooltip.ts third_party/cros_system_api/dbus/bluetooth/dbus-constants.h @@ -7711,6 +7926,7 @@ third_party/crossbench/crossbench/browsers/firefox/webdriver.py third_party/crossbench/crossbench/plt/android_adb.py third_party/crossbench/crossbench/probes/performance_entries.py third_party/crossbench/crossbench/probes/profiling/browser_profiling.py +third_party/crossbench/crossbench/probes/profiling/system_profiling.py third_party/crossbench/crossbench/probes/web_page_replay/recorder.py third_party/crossbench/tests/crossbench/benchmarks/test_loading.py third_party/crossbench/tests/end2end/test_cli.py @@ -7724,7 +7940,6 @@ third_party/dawn/.vscode/tasks.json third_party/dawn/CMakeLists.txt third_party/dawn/src/dawn/native/CommandAllocator.cpp third_party/dawn/src/dawn/native/CopyTextureForBrowserHelper.cpp -third_party/dawn/src/dawn/native/CreatePipelineAsyncTask.cpp third_party/dawn/src/dawn/native/Features.cpp third_party/dawn/src/dawn/native/PipelineLayout.cpp third_party/dawn/src/dawn/native/Sampler.h @@ -7735,6 +7950,7 @@ third_party/dawn/src/dawn/native/d3d11/BufferD3D11.cpp third_party/dawn/src/dawn/native/d3d11/DeviceInfoD3D11.cpp third_party/dawn/src/dawn/native/d3d11/PhysicalDeviceD3D11.cpp third_party/dawn/src/dawn/native/d3d11/PipelineLayoutD3D11.cpp +third_party/dawn/src/dawn/native/d3d11/QueueD3D11.cpp third_party/dawn/src/dawn/native/d3d11/SamplerD3D11.cpp third_party/dawn/src/dawn/native/d3d11/SwapChainD3D11.cpp third_party/dawn/src/dawn/native/d3d11/TextureD3D11.cpp @@ -7759,7 +7975,6 @@ third_party/dawn/src/dawn/partition_alloc/partition_alloc/pointers/raw_ptr.h third_party/dawn/src/dawn/partition_alloc/partition_alloc/pointers/raw_ptr_exclusion.h third_party/dawn/src/dawn/partition_alloc/partition_alloc/pointers/raw_ref.h third_party/dawn/src/dawn/platform/metrics/HistogramMacros.h -third_party/dawn/src/dawn/samples/SampleUtils.cpp third_party/dawn/src/dawn/tests/PartitionAllocSupport.cpp third_party/dawn/src/dawn/tests/end2end/DepthBiasTests.cpp third_party/dawn/src/dawn/tests/end2end/TextureFormatTests.cpp @@ -7769,16 +7984,12 @@ third_party/dawn/src/dawn/tests/end2end/VideoViewsTests.h third_party/dawn/src/dawn/tests/end2end/VideoViewsTests_gbm.cpp third_party/dawn/src/dawn/tests/end2end/VideoViewsTests_win.cpp third_party/dawn/src/dawn/tests/perf_tests/DawnPerfTestPlatform.h -third_party/dawn/src/dawn/tests/unittests/validation/BufferValidationTests.cpp third_party/dawn/src/dawn/tests/unittests/validation/ComputeValidationTests.cpp third_party/dawn/src/dawn/tests/unittests/validation/CopyCommandsValidationTests.cpp third_party/dawn/src/dawn/tests/unittests/validation/RenderPassDescriptorValidationTests.cpp -third_party/dawn/src/dawn/tests/unittests/validation/ValidationTest.cpp -third_party/dawn/src/dawn/tests/unittests/validation/VertexBufferValidationTests.cpp third_party/dawn/src/dawn/tests/white_box/SharedTextureMemoryTests_dmabuf.cpp third_party/dawn/src/dawn/tests/white_box/VulkanImageWrappingTests_DmaBuf.cpp third_party/dawn/src/dawn/utils/WindowsDebugLogger.cpp -third_party/dawn/src/tint/fuzzers/cli.cc third_party/dawn/src/tint/lang/core/constant/eval_builtin_test.cc third_party/dawn/src/tint/lang/hlsl/writer/ast_printer/ast_printer.cc third_party/dawn/src/tint/lang/spirv/reader/ast_parser/ast_parser.cc @@ -7950,6 +8161,7 @@ third_party/dawn/third_party/webgpu-cts/src/webgpu/api/operation/render_pipeline third_party/dawn/third_party/webgpu-cts/src/webgpu/api/operation/rendering/depth_bias.spec.ts third_party/dawn/third_party/webgpu-cts/src/webgpu/api/operation/sampling/filter_mode.spec.ts third_party/dawn/third_party/webgpu-cts/src/webgpu/multisample_info.ts +third_party/dawn/third_party/webgpu-cts/src/webgpu/shader/execution/shader_io/fragment_builtins.spec.ts third_party/dawn/third_party/webgpu-cts/standalone/index.html third_party/dawn/tools/src/cmd/cts/config.json third_party/dawn/tools/src/cmd/cts/treemap/treemap.html @@ -7969,7 +8181,6 @@ third_party/depot_tools/fetch_configs/depot_tools.py third_party/depot_tools/fetch_configs/devtools-frontend.py third_party/depot_tools/fetch_configs/devtools-internal.py third_party/depot_tools/fetch_configs/gn.py -third_party/depot_tools/fetch_configs/goma_client.py third_party/depot_tools/fetch_configs/gyp.py third_party/depot_tools/fetch_configs/infra_superproject.py third_party/depot_tools/fetch_configs/inspector_protocol.py @@ -7991,7 +8202,6 @@ third_party/depot_tools/gerrit_util.py third_party/depot_tools/git_cache.py third_party/depot_tools/git_cl.py third_party/depot_tools/git_common.py -third_party/depot_tools/git_migrate_default_branch.py third_party/depot_tools/git_number.py third_party/depot_tools/git_retry.py third_party/depot_tools/gsutil.py @@ -8024,6 +8234,7 @@ third_party/depot_tools/ninjalog_uploader_wrapper.py third_party/depot_tools/owners_client.py third_party/depot_tools/owners_finder.py third_party/depot_tools/presubmit_canned_checks.py +third_party/depot_tools/presubmit_diff.py third_party/depot_tools/presubmit_support.py third_party/depot_tools/rdb_wrapper.py third_party/depot_tools/recipes/recipe_modules/bot_update/api.py @@ -8107,6 +8318,7 @@ third_party/depot_tools/recipes/recipe_modules/gsutil/api.py third_party/depot_tools/recipes/recipe_modules/gsutil/examples/full.expected/basic.json third_party/depot_tools/recipes/recipe_modules/gsutil/examples/full.py third_party/depot_tools/recipes/recipe_modules/osx_sdk/__init__.py +third_party/depot_tools/recipes/recipe_modules/osx_sdk/api.py third_party/depot_tools/recipes/recipe_modules/presubmit/api.py third_party/depot_tools/recipes/recipe_modules/presubmit/tests/execute.py third_party/depot_tools/recipes/recipe_modules/tryserver/api.py @@ -8137,12 +8349,12 @@ third_party/depot_tools/tests/gerrit_util_test.py third_party/depot_tools/tests/git_cache_test.py third_party/depot_tools/tests/git_cl_creds_check_report.txt third_party/depot_tools/tests/git_cl_test.py -third_party/depot_tools/tests/git_migrate_default_branch_test.py third_party/depot_tools/tests/metrics_test.py third_party/depot_tools/tests/ninja_reclient_test.py third_party/depot_tools/tests/ninjalog_uploader_test.py third_party/depot_tools/tests/presubmit_unittest.py third_party/depot_tools/tests/reclient_metrics_test.py +third_party/depot_tools/tests/roll_dep_test.py third_party/depot_tools/tests/split_cl_test.py third_party/depot_tools/tests/watchlists_unittest.py third_party/depot_tools/watchlists.py @@ -8152,7 +8364,9 @@ third_party/devtools-frontend/src/PRESUBMIT.py third_party/devtools-frontend/src/extensions/cxx_debugging/third_party/lit-html/lib/template.js third_party/devtools-frontend/src/extensions/cxx_debugging/third_party/lit-html/src/lib/template.ts third_party/devtools-frontend/src/front_end/core/common/ColorConverter.ts +third_party/devtools-frontend/src/front_end/core/host/AidaClient.test.ts third_party/devtools-frontend/src/front_end/core/host/InspectorFrontendHost.ts +third_party/devtools-frontend/src/front_end/core/i18n/i18n.test.ts third_party/devtools-frontend/src/front_end/core/i18n/locales/af.json third_party/devtools-frontend/src/front_end/core/i18n/locales/am.json third_party/devtools-frontend/src/front_end/core/i18n/locales/ar.json @@ -8234,10 +8448,13 @@ third_party/devtools-frontend/src/front_end/core/i18n/locales/zh-HK.json third_party/devtools-frontend/src/front_end/core/i18n/locales/zh-TW.json third_party/devtools-frontend/src/front_end/core/i18n/locales/zh.json third_party/devtools-frontend/src/front_end/core/i18n/locales/zu.json +third_party/devtools-frontend/src/front_end/core/platform/StringUtilities.test.ts +third_party/devtools-frontend/src/front_end/core/platform/StringUtilities.ts third_party/devtools-frontend/src/front_end/core/platform/UIString.ts -third_party/devtools-frontend/src/front_end/core/platform/string-utilities.ts +third_party/devtools-frontend/src/front_end/core/root/Runtime.test.ts third_party/devtools-frontend/src/front_end/core/sdk/CSSMetadata.ts third_party/devtools-frontend/src/front_end/core/sdk/Cookie.ts +third_party/devtools-frontend/src/front_end/core/sdk/NetworkManager.ts third_party/devtools-frontend/src/front_end/core/sdk/NetworkRequest.ts third_party/devtools-frontend/src/front_end/core/sdk/ResourceTreeModel.ts third_party/devtools-frontend/src/front_end/core/sdk/SourceMap.ts @@ -8252,7 +8469,9 @@ third_party/devtools-frontend/src/front_end/generated/protocol-proxy-api.d.ts third_party/devtools-frontend/src/front_end/generated/protocol.ts third_party/devtools-frontend/src/front_end/integration_test_runner.html third_party/devtools-frontend/src/front_end/models/bindings/ResourceUtils.ts +third_party/devtools-frontend/src/front_end/models/extensions/ExtensionServer.test.ts third_party/devtools-frontend/src/front_end/models/extensions/ExtensionServer.ts +third_party/devtools-frontend/src/front_end/models/extensions/HostUrlPattern.test.ts third_party/devtools-frontend/src/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts third_party/devtools-frontend/src/front_end/models/issues_manager/CookieDeprecationMetadataIssue.ts third_party/devtools-frontend/src/front_end/models/issues_manager/CookieIssue.ts @@ -8261,11 +8480,19 @@ third_party/devtools-frontend/src/front_end/models/issues_manager/DeprecationIss third_party/devtools-frontend/src/front_end/models/issues_manager/GenericIssue.ts third_party/devtools-frontend/src/front_end/models/issues_manager/HeavyAdIssue.ts third_party/devtools-frontend/src/front_end/models/issues_manager/SharedArrayBufferIssue.ts +third_party/devtools-frontend/src/front_end/models/persistence/NetworkPersistenceManager.test.ts third_party/devtools-frontend/src/front_end/models/persistence/NetworkPersistenceManager.ts -third_party/devtools-frontend/src/front_end/models/timeline_model/TimelineModel.ts +third_party/devtools-frontend/src/front_end/models/persistence/PersistenceImpl.test.ts +third_party/devtools-frontend/src/front_end/models/trace/ModelImpl.test.ts +third_party/devtools-frontend/src/front_end/models/trace/handlers/MetaHandler.test.ts third_party/devtools-frontend/src/front_end/models/trace/handlers/MetaHandler.ts +third_party/devtools-frontend/src/front_end/models/trace/handlers/NetworkRequestsHandler.test.ts third_party/devtools-frontend/src/front_end/models/trace/handlers/UserInteractionsHandler.ts third_party/devtools-frontend/src/front_end/models/trace/handlers/UserTimingsHandler.ts +third_party/devtools-frontend/src/front_end/models/trace/helpers/Trace.test.ts +third_party/devtools-frontend/src/front_end/models/trace/insights/CumulativeLayoutShift.ts +third_party/devtools-frontend/src/front_end/models/trace/insights/InteractionToNextPaint.ts +third_party/devtools-frontend/src/front_end/models/trace/insights/RenderBlocking.test.ts third_party/devtools-frontend/src/front_end/models/trace/types/TraceEvents.ts third_party/devtools-frontend/src/front_end/panels/accessibility/AccessibilityNodeView.ts third_party/devtools-frontend/src/front_end/panels/accessibility/AccessibilityStrings.ts @@ -8273,8 +8500,8 @@ third_party/devtools-frontend/src/front_end/panels/application/AppManifestView.t third_party/devtools-frontend/src/front_end/panels/application/ApplicationPanelSidebar.ts third_party/devtools-frontend/src/front_end/panels/application/BackgroundServiceView.ts third_party/devtools-frontend/src/front_end/panels/application/InterestGroupTreeElement.ts +third_party/devtools-frontend/src/front_end/panels/application/ReportingApiReportsView.test.ts third_party/devtools-frontend/src/front_end/panels/application/ReportingApiReportsView.ts -third_party/devtools-frontend/src/front_end/panels/application/ResourcesPanel.ts third_party/devtools-frontend/src/front_end/panels/application/ServiceWorkerCacheTreeElement.ts third_party/devtools-frontend/src/front_end/panels/application/StorageView.ts third_party/devtools-frontend/src/front_end/panels/application/components/BackForwardCacheStrings.ts @@ -8284,12 +8511,17 @@ third_party/devtools-frontend/src/front_end/panels/application/components/Report third_party/devtools-frontend/src/front_end/panels/application/components/TrustTokensView.ts third_party/devtools-frontend/src/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts third_party/devtools-frontend/src/front_end/panels/application/preloading/components/PreloadingString.ts +third_party/devtools-frontend/src/front_end/panels/application/preloading/components/UsedPreloadingView.test.ts third_party/devtools-frontend/src/front_end/panels/application/preloading/components/UsedPreloadingView.ts +third_party/devtools-frontend/src/front_end/panels/autofill/AutofillView.ts +third_party/devtools-frontend/src/front_end/panels/console/ErrorStackParser.test.ts third_party/devtools-frontend/src/front_end/panels/css_overview/components/CSSOverviewStartView.ts third_party/devtools-frontend/src/front_end/panels/elements/CSSRuleValidator.ts third_party/devtools-frontend/src/front_end/panels/elements/ElementStatePaneWidget.ts +third_party/devtools-frontend/src/front_end/panels/elements/components/CSSPropertyDocsView.test.ts third_party/devtools-frontend/src/front_end/panels/emulation/DeviceModeToolbar.ts third_party/devtools-frontend/src/front_end/panels/emulation/emulation-meta.ts +third_party/devtools-frontend/src/front_end/panels/explain/components/ConsoleInsight.ts third_party/devtools-frontend/src/front_end/panels/issues/AffectedCookiesView.ts third_party/devtools-frontend/src/front_end/panels/issues/AffectedDirectivesView.ts third_party/devtools-frontend/src/front_end/panels/issues/AffectedMetadataAllowedSitesView.ts @@ -8302,23 +8534,31 @@ third_party/devtools-frontend/src/front_end/panels/network/RequestCookiesView.ts third_party/devtools-frontend/src/front_end/panels/network/RequestTimingView.ts third_party/devtools-frontend/src/front_end/panels/network/ResourceWebSocketFrameView.ts third_party/devtools-frontend/src/front_end/panels/network/components/RequestHeaderSection.ts +third_party/devtools-frontend/src/front_end/panels/network/components/RequestHeadersView.test.ts third_party/devtools-frontend/src/front_end/panels/network/components/RequestHeadersView.ts +third_party/devtools-frontend/src/front_end/panels/profiler/HeapSnapshotGridNodes.ts third_party/devtools-frontend/src/front_end/panels/recorder/RecorderController.ts third_party/devtools-frontend/src/front_end/panels/recorder/components/CreateRecordingView.ts third_party/devtools-frontend/src/front_end/panels/recorder/components/StartView.ts third_party/devtools-frontend/src/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts third_party/devtools-frontend/src/front_end/panels/settings/KeybindsSettingsTab.ts third_party/devtools-frontend/src/front_end/panels/settings/SettingsScreen.ts +third_party/devtools-frontend/src/front_end/panels/settings/components/SyncSection.test.ts third_party/devtools-frontend/src/front_end/panels/sources/BreakpointEditDialog.ts third_party/devtools-frontend/src/front_end/panels/sources/DebuggerPausedMessage.ts third_party/devtools-frontend/src/front_end/panels/sources/SourcesNavigator.ts +third_party/devtools-frontend/src/front_end/panels/sources/components/BreakpointsView.test.ts +third_party/devtools-frontend/src/front_end/panels/sources/components/BreakpointsViewUtils.test.ts third_party/devtools-frontend/src/front_end/panels/sources/components/BreakpointsViewUtils.ts +third_party/devtools-frontend/src/front_end/panels/sources/components/HeadersView.test.ts third_party/devtools-frontend/src/front_end/panels/sources/components/HeadersView.ts third_party/devtools-frontend/src/front_end/panels/timeline/EventUICategory.ts third_party/devtools-frontend/src/front_end/panels/timeline/ThreadAppender.ts -third_party/devtools-frontend/src/front_end/panels/timeline/TimelinePanel.ts -third_party/devtools-frontend/src/front_end/panels/timeline/TimelineUIUtils.ts +third_party/devtools-frontend/src/front_end/panels/timeline/TimelineLandingPage.ts +third_party/devtools-frontend/src/front_end/panels/timeline/TimelineTreeView.test.ts +third_party/devtools-frontend/src/front_end/panels/timeline/TimelineUIUtils.test.ts third_party/devtools-frontend/src/front_end/panels/timeline/components/DetailsView.ts +third_party/devtools-frontend/src/front_end/panels/timeline/track_appenders/ThreadAppender.test.ts third_party/devtools-frontend/src/front_end/panels/webauthn/WebauthnPane.ts third_party/devtools-frontend/src/front_end/services/tracing/PerformanceTracing.ts third_party/devtools-frontend/src/front_end/third_party/acorn/package/dist/acorn.js @@ -8447,11 +8687,11 @@ third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/cj third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Device.js third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FileChooser.d.ts third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/FileChooser.js +third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/PDFOptions.d.ts third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.d.ts third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.js third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/Viewport.d.ts third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.js -third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/FirefoxLauncher.js third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/PuppeteerNode.d.ts @@ -8484,11 +8724,11 @@ third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/es third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Device.js third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.d.ts third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/FileChooser.js +third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/PDFOptions.d.ts third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.js third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/Viewport.d.ts third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.js -third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.js third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/PuppeteerNode.d.ts @@ -8512,23 +8752,43 @@ third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/src/co third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/src/common/CustomQueryHandler.ts third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/src/common/Device.ts third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/src/common/FileChooser.ts +third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/src/common/PDFOptions.ts third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/src/common/QueryHandler.ts third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/src/common/Viewport.ts third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/src/common/util.ts -third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/src/node/FirefoxLauncher.ts third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/src/node/LaunchOptions.ts third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/src/node/PuppeteerNode.ts third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data/package/data/browsers.css-data.json third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data/package/data/browsers.html-data.json third_party/devtools-frontend/src/front_end/third_party/wasmparser/package/package.json +third_party/devtools-frontend/src/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.d.ts +third_party/devtools-frontend/src/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.js +third_party/devtools-frontend/src/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.d.ts +third_party/devtools-frontend/src/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +third_party/devtools-frontend/src/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.js +third_party/devtools-frontend/src/front_end/third_party/web-vitals/package/dist/modules/onCLS.d.ts +third_party/devtools-frontend/src/front_end/third_party/web-vitals/package/dist/modules/onCLS.js +third_party/devtools-frontend/src/front_end/third_party/web-vitals/package/dist/modules/onINP.d.ts +third_party/devtools-frontend/src/front_end/third_party/web-vitals/package/dist/modules/onINP.js +third_party/devtools-frontend/src/front_end/third_party/web-vitals/package/src/attribution/onCLS.ts +third_party/devtools-frontend/src/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +third_party/devtools-frontend/src/front_end/third_party/web-vitals/package/src/lib/getVisibilityWatcher.ts +third_party/devtools-frontend/src/front_end/third_party/web-vitals/package/src/onCLS.ts +third_party/devtools-frontend/src/front_end/third_party/web-vitals/package/src/onINP.ts third_party/devtools-frontend/src/front_end/ui/components/code_highlighter/CodeHighlighter.ts +third_party/devtools-frontend/src/front_end/ui/components/markdown_view/CodeBlock.ts third_party/devtools-frontend/src/front_end/ui/components/markdown_view/MarkdownLinksMap.ts third_party/devtools-frontend/src/front_end/ui/legacy/RemoteDebuggingTerminatedScreen.ts third_party/devtools-frontend/src/front_end/ui/legacy/SearchableView.ts +third_party/devtools-frontend/src/front_end/ui/legacy/UIUtils.test.ts third_party/devtools-frontend/src/front_end/ui/legacy/UIUtils.ts +third_party/devtools-frontend/src/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +third_party/devtools-frontend/src/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.test.ts +third_party/devtools-frontend/src/front_end/ui/legacy/components/utils/JSPresentationUtils.test.ts +third_party/devtools-frontend/src/front_end/ui/legacy/components/utils/Linkifier.test.ts third_party/devtools-frontend/src/front_end/ui/legacy/themeColors.css -third_party/devtools-frontend/src/front_end/ui/legacy/theme_support/theme_support_impl.ts +third_party/devtools-frontend/src/front_end/ui/legacy/theme_support/ThemeSupport.ts third_party/devtools-frontend/src/node_modules/@aashutoshrathi/word-wrap/package.json third_party/devtools-frontend/src/node_modules/@babel/core/node_modules/source-map/dist/source-map.debug.js third_party/devtools-frontend/src/node_modules/@babel/core/node_modules/source-map/dist/source-map.js @@ -8545,9 +8805,19 @@ third_party/devtools-frontend/src/node_modules/@eslint/eslintrc/node_modules/typ third_party/devtools-frontend/src/node_modules/@eslint/eslintrc/node_modules/type-fest/source/basic.d.ts third_party/devtools-frontend/src/node_modules/@eslint/eslintrc/node_modules/type-fest/source/entries.d.ts third_party/devtools-frontend/src/node_modules/@eslint/eslintrc/node_modules/type-fest/source/entry.d.ts +third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.d.ts +third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/lib/cjs/browser-data/browser-data.js +third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome-headless-shell.js +third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chrome.js +third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromedriver.js third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/lib/cjs/browser-data/chromium.js third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/lib/cjs/browser-data/firefox.js third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/lib/cjs/install.d.ts +third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.d.ts +third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/lib/esm/browser-data/browser-data.js +third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome-headless-shell.js +third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/lib/esm/browser-data/chrome.js +third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromedriver.js third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/lib/esm/browser-data/chromium.js third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/lib/esm/browser-data/firefox.js third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/lib/esm/install.d.ts @@ -8555,13 +8825,13 @@ third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/node_modules/ third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/node_modules/debug/package.json third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/node_modules/debug/src/browser.js third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/node_modules/strip-ansi/package.json +third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/src/browser-data/browser-data.ts +third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/src/browser-data/chrome-headless-shell.ts +third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/src/browser-data/chrome.ts +third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/src/browser-data/chromedriver.ts third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/src/browser-data/chromium.ts third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/src/browser-data/firefox.ts third_party/devtools-frontend/src/node_modules/@puppeteer/browsers/src/install.ts -third_party/devtools-frontend/src/node_modules/@puppeteer/replay/lib/main.js -third_party/devtools-frontend/src/node_modules/@puppeteer/replay/node_modules/ansi-regex/package.json -third_party/devtools-frontend/src/node_modules/@puppeteer/replay/node_modules/strip-ansi/package.json -third_party/devtools-frontend/src/node_modules/@puppeteer/replay/package.json third_party/devtools-frontend/src/node_modules/@rollup/plugin-node-resolve/node_modules/@rollup/pluginutils/package.json third_party/devtools-frontend/src/node_modules/@rollup/plugin-node-resolve/package.json third_party/devtools-frontend/src/node_modules/@rollup/pluginutils/package.json @@ -8657,12 +8927,13 @@ third_party/devtools-frontend/src/node_modules/chai/lib/chai/interface/assert.js third_party/devtools-frontend/src/node_modules/chai/lib/chai/interface/should.js third_party/devtools-frontend/src/node_modules/chai/lib/chai/utils/isNaN.js third_party/devtools-frontend/src/node_modules/chai/package.json -third_party/devtools-frontend/src/node_modules/chromium-bidi/lib/cjs/bidiMapper/domains/browser/BrowserProcessor.js -third_party/devtools-frontend/src/node_modules/chromium-bidi/lib/cjs/bidiMapper/domains/context/BrowsingContextProcessor.js -third_party/devtools-frontend/src/node_modules/chromium-bidi/lib/cjs/bidiMapper/domains/input/ActionDispatcher.js -third_party/devtools-frontend/src/node_modules/chromium-bidi/lib/cjs/bidiMapper/domains/input/InputSource.js -third_party/devtools-frontend/src/node_modules/chromium-bidi/lib/cjs/bidiMapper/domains/network/NetworkRequest.js +third_party/devtools-frontend/src/node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/browser/BrowserProcessor.js +third_party/devtools-frontend/src/node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/context/BrowsingContextProcessor.js +third_party/devtools-frontend/src/node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/input/ActionDispatcher.js +third_party/devtools-frontend/src/node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/input/InputSource.js +third_party/devtools-frontend/src/node_modules/chromium-bidi/lib/cjs/bidiMapper/modules/storage/StorageProcessor.js third_party/devtools-frontend/src/node_modules/chromium-bidi/lib/cjs/utils/uuid.js +third_party/devtools-frontend/src/node_modules/chromium-bidi/lib/iife/mapperTab.js third_party/devtools-frontend/src/node_modules/clone-regexp/index.d.ts third_party/devtools-frontend/src/node_modules/clone-regexp/package.json third_party/devtools-frontend/src/node_modules/clone/package.json @@ -8688,7 +8959,6 @@ third_party/devtools-frontend/src/node_modules/core-js-pure/modules/es.symbol.js third_party/devtools-frontend/src/node_modules/core-js-pure/modules/web.url.js third_party/devtools-frontend/src/node_modules/cors/package.json third_party/devtools-frontend/src/node_modules/cosmiconfig/package.json -third_party/devtools-frontend/src/node_modules/cross-fetch/package.json third_party/devtools-frontend/src/node_modules/css-select/node_modules/domutils/lib/stringify.d.ts third_party/devtools-frontend/src/node_modules/css-select/node_modules/domutils/lib/stringify.js third_party/devtools-frontend/src/node_modules/css-tree/data/patch.json @@ -8718,6 +8988,7 @@ third_party/devtools-frontend/src/node_modules/degenerator/node_modules/estraver third_party/devtools-frontend/src/node_modules/devtools-protocol/json/browser_protocol.json third_party/devtools-frontend/src/node_modules/devtools-protocol/types/protocol-mapping.d.ts third_party/devtools-frontend/src/node_modules/devtools-protocol/types/protocol-proxy-api.d.ts +third_party/devtools-frontend/src/node_modules/devtools-protocol/types/protocol-tests-proxy-api.d.ts third_party/devtools-frontend/src/node_modules/devtools-protocol/types/protocol.d.ts third_party/devtools-frontend/src/node_modules/di/package.json third_party/devtools-frontend/src/node_modules/diff/dist/diff.js @@ -8846,8 +9117,8 @@ third_party/devtools-frontend/src/node_modules/get-stream/package.json third_party/devtools-frontend/src/node_modules/get-symbol-description/package.json third_party/devtools-frontend/src/node_modules/get-uri/node_modules/debug/package.json third_party/devtools-frontend/src/node_modules/get-uri/node_modules/debug/src/browser.js +third_party/devtools-frontend/src/node_modules/get-uri/node_modules/fs-extra/lib/mkdirs/utils.js third_party/devtools-frontend/src/node_modules/get-uri/node_modules/fs-extra/package.json -third_party/devtools-frontend/src/node_modules/get-uri/node_modules/jsonfile/package.json third_party/devtools-frontend/src/node_modules/glob-parent/package.json third_party/devtools-frontend/src/node_modules/globals/package.json third_party/devtools-frontend/src/node_modules/globby/node_modules/slash/package.json @@ -9024,6 +9295,8 @@ third_party/devtools-frontend/src/node_modules/postcss-reduce-transforms/package third_party/devtools-frontend/src/node_modules/postcss-selector-parser/package.json third_party/devtools-frontend/src/node_modules/postcss-svgo/package.json third_party/devtools-frontend/src/node_modules/postcss-unique-selectors/package.json +third_party/devtools-frontend/src/node_modules/postcss/lib/comment.d.ts +third_party/devtools-frontend/src/node_modules/postcss/lib/declaration.d.ts third_party/devtools-frontend/src/node_modules/progress/package.json third_party/devtools-frontend/src/node_modules/proxy-agent/node_modules/debug/package.json third_party/devtools-frontend/src/node_modules/proxy-agent/node_modules/debug/src/browser.js @@ -9042,6 +9315,7 @@ third_party/devtools-frontend/src/node_modules/puppeteer-core/lib/cjs/puppeteer/ third_party/devtools-frontend/src/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Target.d.ts third_party/devtools-frontend/src/node_modules/puppeteer-core/lib/cjs/puppeteer/api/WebWorker.d.ts third_party/devtools-frontend/src/node_modules/puppeteer-core/lib/cjs/puppeteer/api/WebWorker.js +third_party/devtools-frontend/src/node_modules/puppeteer-core/lib/cjs/puppeteer/bidi/Frame.js third_party/devtools-frontend/src/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/FirefoxTargetManager.d.ts third_party/devtools-frontend/src/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/FirefoxTargetManager.js third_party/devtools-frontend/src/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Input.js @@ -9078,6 +9352,7 @@ third_party/devtools-frontend/src/node_modules/puppeteer-core/lib/esm/puppeteer/ third_party/devtools-frontend/src/node_modules/puppeteer-core/lib/esm/puppeteer/api/Target.d.ts third_party/devtools-frontend/src/node_modules/puppeteer-core/lib/esm/puppeteer/api/WebWorker.d.ts third_party/devtools-frontend/src/node_modules/puppeteer-core/lib/esm/puppeteer/api/WebWorker.js +third_party/devtools-frontend/src/node_modules/puppeteer-core/lib/esm/puppeteer/bidi/Frame.js third_party/devtools-frontend/src/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/FirefoxTargetManager.d.ts third_party/devtools-frontend/src/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/FirefoxTargetManager.js third_party/devtools-frontend/src/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/Input.js @@ -9103,7 +9378,6 @@ third_party/devtools-frontend/src/node_modules/puppeteer-core/lib/esm/puppeteer/ third_party/devtools-frontend/src/node_modules/puppeteer-core/lib/types.d.ts third_party/devtools-frontend/src/node_modules/puppeteer-core/node_modules/debug/package.json third_party/devtools-frontend/src/node_modules/puppeteer-core/node_modules/debug/src/browser.js -third_party/devtools-frontend/src/node_modules/puppeteer-core/node_modules/ws/package.json third_party/devtools-frontend/src/node_modules/puppeteer-core/src/api/Browser.ts third_party/devtools-frontend/src/node_modules/puppeteer-core/src/api/BrowserContext.ts third_party/devtools-frontend/src/node_modules/puppeteer-core/src/api/ElementHandle.ts @@ -9113,6 +9387,7 @@ third_party/devtools-frontend/src/node_modules/puppeteer-core/src/api/Input.ts third_party/devtools-frontend/src/node_modules/puppeteer-core/src/api/Page.ts third_party/devtools-frontend/src/node_modules/puppeteer-core/src/api/Target.ts third_party/devtools-frontend/src/node_modules/puppeteer-core/src/api/WebWorker.ts +third_party/devtools-frontend/src/node_modules/puppeteer-core/src/bidi/Frame.ts third_party/devtools-frontend/src/node_modules/puppeteer-core/src/cdp/FirefoxTargetManager.ts third_party/devtools-frontend/src/node_modules/puppeteer-core/src/cdp/Input.ts third_party/devtools-frontend/src/node_modules/puppeteer-core/src/cdp/PredefinedNetworkConditions.ts @@ -9226,8 +9501,6 @@ third_party/devtools-frontend/src/node_modules/stylelint/lib/rules/color-named/c third_party/devtools-frontend/src/node_modules/stylelint/lib/utils/isAutoprefixable.js third_party/devtools-frontend/src/node_modules/stylelint/lib/utils/isStandardSyntaxValue.js third_party/devtools-frontend/src/node_modules/stylelint/node_modules/ansi-regex/package.json -third_party/devtools-frontend/src/node_modules/stylelint/node_modules/debug/package.json -third_party/devtools-frontend/src/node_modules/stylelint/node_modules/debug/src/browser.js third_party/devtools-frontend/src/node_modules/stylelint/node_modules/resolve-from/package.json third_party/devtools-frontend/src/node_modules/stylelint/node_modules/strip-ansi/package.json third_party/devtools-frontend/src/node_modules/supports-color/package.json @@ -9286,6 +9559,7 @@ third_party/devtools-frontend/src/node_modules/typescript/lib/ja/diagnosticMessa third_party/devtools-frontend/src/node_modules/typescript/lib/ko/diagnosticMessages.generated.json third_party/devtools-frontend/src/node_modules/typescript/lib/lib.dom.d.ts third_party/devtools-frontend/src/node_modules/typescript/lib/lib.dom.iterable.d.ts +third_party/devtools-frontend/src/node_modules/typescript/lib/lib.es2016.intl.d.ts third_party/devtools-frontend/src/node_modules/typescript/lib/lib.es2020.bigint.d.ts third_party/devtools-frontend/src/node_modules/typescript/lib/lib.es2020.intl.d.ts third_party/devtools-frontend/src/node_modules/typescript/lib/lib.es2021.intl.d.ts @@ -9298,7 +9572,6 @@ third_party/devtools-frontend/src/node_modules/typescript/lib/ru/diagnosticMessa third_party/devtools-frontend/src/node_modules/typescript/lib/tr/diagnosticMessages.generated.json third_party/devtools-frontend/src/node_modules/typescript/lib/tsc.js third_party/devtools-frontend/src/node_modules/typescript/lib/tsserver.js -third_party/devtools-frontend/src/node_modules/typescript/lib/tsserverlibrary.js third_party/devtools-frontend/src/node_modules/typescript/lib/typescript.js third_party/devtools-frontend/src/node_modules/typescript/lib/typingsInstaller.js third_party/devtools-frontend/src/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json @@ -9336,7 +9609,7 @@ third_party/devtools-frontend/src/scripts/deps/download_emscripten.py third_party/devtools-frontend/src/scripts/deps/roll_to_chromium.py third_party/devtools-frontend/src/scripts/hosted_mode/server.js third_party/devtools-frontend/src/scripts/tools/update_goldens.py -third_party/devtools-frontend/src/test/conductor/mocha_hooks.ts +third_party/devtools-frontend/src/test/conductor/resultsdb.ts third_party/devtools-frontend/src/test/e2e/application/reporting-api_test.ts third_party/devtools-frontend/src/test/e2e/console/console-message-format_test.ts third_party/devtools-frontend/src/test/e2e/console/console-truncate-long-messages_test.ts @@ -9347,35 +9620,7 @@ third_party/devtools-frontend/src/test/e2e/lighthouse/timespan_test.ts third_party/devtools-frontend/src/test/e2e/rendering/Rendering_test.ts third_party/devtools-frontend/src/test/e2e/resources/console/primitives.html third_party/devtools-frontend/src/test/e2e/resources/elements/inactive-css-page.html -third_party/devtools-frontend/src/test/shared/resultsdb.ts -third_party/devtools-frontend/src/test/unittests/front_end/core/i18n/i18n_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/core/platform/StringUtilities_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/core/root/Runtime_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/core/sdk/CookieModel_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/models/extensions/ExtensionServer_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/models/extensions/HostUrlPattern_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/models/persistence/NetworkPersistenceManager_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/models/persistence/PersistenceImpl_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/models/trace/ModelImpl_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/models/trace/handlers/MetaHandler_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/models/trace/handlers/NetworkRequestsHandler_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/models/trace/helpers/Trace_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/panels/application/ReportingApiReportsView_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/panels/application/preloading/components/UsedPreloadingView_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/panels/console/ErrorStackParser_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/panels/elements/components/CSSPropertyDocsView_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/panels/explain/InsightProvider_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/panels/network/components/RequestHeadersView_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/panels/settings/components/SyncSection_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/panels/sources/components/BreakpointsViewUtils_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/panels/sources/components/BreakpointsView_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/panels/sources/components/HeadersView_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/panels/timeline/TimelineUIUtils_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/panels/timeline/track_appenders/ThreadAppender_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/ui/UIUtils_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/ui/legacy/components/utils/JSPresentationUtils_test.ts -third_party/devtools-frontend/src/test/unittests/front_end/ui/legacy/components/utils/Linkifier_test.ts +third_party/devtools-frontend/src/test/perf/report/report.ts third_party/devtools-frontend/src/third_party/blink/public/devtools_protocol/browser_protocol.json third_party/devtools-frontend/src/third_party/pyjson5/src/benchmarks/chromium.linux.json third_party/devtools-frontend/src/third_party/pyjson5/src/setup.py @@ -9405,6 +9650,7 @@ third_party/eigen3/src/Eigen/src/Core/CwiseUnaryView.h third_party/eigen3/src/Eigen/src/Core/DenseBase.h third_party/eigen3/src/Eigen/src/Core/DenseCoeffsBase.h third_party/eigen3/src/Eigen/src/Core/DenseStorage.h +third_party/eigen3/src/Eigen/src/Core/DeviceWrapper.h third_party/eigen3/src/Eigen/src/Core/Diagonal.h third_party/eigen3/src/Eigen/src/Core/DiagonalMatrix.h third_party/eigen3/src/Eigen/src/Core/DiagonalProduct.h @@ -9433,6 +9679,7 @@ third_party/eigen3/src/Eigen/src/Core/PlainObjectBase.h third_party/eigen3/src/Eigen/src/Core/Product.h third_party/eigen3/src/Eigen/src/Core/ProductEvaluators.h third_party/eigen3/src/Eigen/src/Core/Random.h +third_party/eigen3/src/Eigen/src/Core/RandomImpl.h third_party/eigen3/src/Eigen/src/Core/Redux.h third_party/eigen3/src/Eigen/src/Core/Ref.h third_party/eigen3/src/Eigen/src/Core/Replicate.h @@ -9655,6 +9902,7 @@ third_party/eigen3/src/Eigen/src/StlSupport/StdVector.h third_party/eigen3/src/Eigen/src/StlSupport/details.h third_party/eigen3/src/Eigen/src/SuperLUSupport/SuperLUSupport.h third_party/eigen3/src/Eigen/src/ThreadPool/Barrier.h +third_party/eigen3/src/Eigen/src/ThreadPool/CoreThreadPoolDevice.h third_party/eigen3/src/Eigen/src/ThreadPool/EventCount.h third_party/eigen3/src/Eigen/src/ThreadPool/NonBlockingThreadPool.h third_party/eigen3/src/Eigen/src/ThreadPool/RunQueue.h @@ -9731,6 +9979,7 @@ third_party/eigen3/src/test/array_for_matrix.cpp third_party/eigen3/src/test/array_of_string.cpp third_party/eigen3/src/test/array_replicate.cpp third_party/eigen3/src/test/array_reverse.cpp +third_party/eigen3/src/test/assignment_threaded.cpp third_party/eigen3/src/test/bandmatrix.cpp third_party/eigen3/src/test/basicstuff.cpp third_party/eigen3/src/test/bdcsvd.cpp @@ -9794,6 +10043,7 @@ third_party/eigen3/src/test/main.h third_party/eigen3/src/test/mapped_matrix.cpp third_party/eigen3/src/test/mapstaticmethods.cpp third_party/eigen3/src/test/mapstride.cpp +third_party/eigen3/src/test/matrix_cwise.cpp third_party/eigen3/src/test/meta.cpp third_party/eigen3/src/test/metis_support.cpp third_party/eigen3/src/test/miscmatrices.cpp @@ -9880,7 +10130,7 @@ third_party/eigen3/src/test/type_alias.cpp third_party/eigen3/src/test/umeyama.cpp third_party/eigen3/src/test/umfpack_support.cpp third_party/eigen3/src/test/unalignedcount.cpp -third_party/eigen3/src/test/unaryviewstride.cpp +third_party/eigen3/src/test/unaryview.cpp third_party/eigen3/src/test/upperbidiagonalization.cpp third_party/eigen3/src/test/vectorization_logic.cpp third_party/eigen3/src/test/vectorwiseop.cpp @@ -9961,6 +10211,7 @@ third_party/eigen3/src/unsupported/Eigen/CXX11/src/util/CXX11Workarounds.h third_party/eigen3/src/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h third_party/eigen3/src/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h third_party/eigen3/src/unsupported/Eigen/src/AutoDiff/AutoDiffVector.h +third_party/eigen3/src/unsupported/Eigen/src/AutoDiff/CoherentPadOp.h third_party/eigen3/src/unsupported/Eigen/src/BVH/BVAlgorithms.h third_party/eigen3/src/unsupported/Eigen/src/BVH/KdBVH.h third_party/eigen3/src/unsupported/Eigen/src/Eigenvalues/ArpackSelfAdjointEigenSolver.h @@ -10133,7 +10384,7 @@ third_party/expat/src/expat/lib/internal.h third_party/expat/src/expat/lib/xmlparse.c third_party/expat/src/expat/lib/xmltok.c third_party/expat/src/expat/lib/xmltok_impl.c -third_party/expat/src/expat/tests/runtests.c +third_party/expat/src/expat/tests/acc_tests.c third_party/expat/src/expat/xmlwf/readfilemap.c third_party/expat/src/expat/xmlwf/win32filemap.c third_party/expat/src/expat/xmlwf/xmlwf.c @@ -10157,12 +10408,6 @@ third_party/ffmpeg/chromium/config/Chrome/mac/x64/config.h third_party/ffmpeg/chromium/config/Chrome/win/arm64/config.h third_party/ffmpeg/chromium/config/Chrome/win/ia32/config.h third_party/ffmpeg/chromium/config/Chrome/win/x64/config.h -third_party/ffmpeg/chromium/config/ChromeOS/linux-noasm/x64/config.h -third_party/ffmpeg/chromium/config/ChromeOS/linux/arm-neon/config.h -third_party/ffmpeg/chromium/config/ChromeOS/linux/arm/config.h -third_party/ffmpeg/chromium/config/ChromeOS/linux/arm64/config.h -third_party/ffmpeg/chromium/config/ChromeOS/linux/ia32/config.h -third_party/ffmpeg/chromium/config/ChromeOS/linux/x64/config.h third_party/ffmpeg/chromium/config/Chromium/android/arm-neon/config.h third_party/ffmpeg/chromium/config/Chromium/android/arm64/config.h third_party/ffmpeg/chromium/config/Chromium/android/ia32/config.h @@ -10180,10 +10425,6 @@ third_party/ffmpeg/chromium/config/Chromium/mac/x64/config.h third_party/ffmpeg/chromium/config/Chromium/win/arm64/config.h third_party/ffmpeg/chromium/config/Chromium/win/ia32/config.h third_party/ffmpeg/chromium/config/Chromium/win/x64/config.h -third_party/ffmpeg/chromium/scripts/build_ffmpeg.py -third_party/ffmpeg/chromium/scripts/credits_updater.py -third_party/ffmpeg/chromium/scripts/generate_gn.py -third_party/ffmpeg/chromium/scripts/robo_setup.py third_party/ffmpeg/compat/msvcrt/snprintf.c third_party/ffmpeg/compat/msvcrt/snprintf.h third_party/ffmpeg/compat/msvcrt/strtod.h @@ -10192,9 +10433,17 @@ third_party/ffmpeg/compat/w32pthreads.h third_party/ffmpeg/doc/examples/transcode_aac.c third_party/ffmpeg/doc/style.min.css third_party/ffmpeg/ffmpeg_options.gni -third_party/ffmpeg/libavcodec/aac_adtstoasc_bsf.c -third_party/ffmpeg/libavcodec/aacdec.c -third_party/ffmpeg/libavcodec/aacdec_template.c +third_party/ffmpeg/libavcodec/aac/aacdec.c +third_party/ffmpeg/libavcodec/aac/aacdec_dsp_template.c +third_party/ffmpeg/libavcodec/aac/aacdec_fixed.c +third_party/ffmpeg/libavcodec/aac/aacdec_fixed_coupling.h +third_party/ffmpeg/libavcodec/aac/aacdec_fixed_dequant.h +third_party/ffmpeg/libavcodec/aac/aacdec_fixed_prediction.h +third_party/ffmpeg/libavcodec/aac/aacdec_float.c +third_party/ffmpeg/libavcodec/aac/aacdec_float_coupling.h +third_party/ffmpeg/libavcodec/aac/aacdec_float_prediction.h +third_party/ffmpeg/libavcodec/aac/aacdec_latm.h +third_party/ffmpeg/libavcodec/aac/aacdec_proc_template.c third_party/ffmpeg/libavcodec/aacps.c third_party/ffmpeg/libavcodec/aacps.h third_party/ffmpeg/libavcodec/aacps_common.c @@ -10229,17 +10478,22 @@ third_party/ffmpeg/libavcodec/aliaspixdec.c third_party/ffmpeg/libavcodec/aliaspixenc.c third_party/ffmpeg/libavcodec/atrac9dec.c third_party/ffmpeg/libavcodec/atrac9tab.h -third_party/ffmpeg/libavcodec/av1_frame_merge_bsf.c -third_party/ffmpeg/libavcodec/av1_frame_split_bsf.c third_party/ffmpeg/libavcodec/av1_parser.c third_party/ffmpeg/libavcodec/avs2_parser.c third_party/ffmpeg/libavcodec/avs3.h third_party/ffmpeg/libavcodec/avs3_parser.c +third_party/ffmpeg/libavcodec/bsf/aac_adtstoasc.c +third_party/ffmpeg/libavcodec/bsf/av1_frame_merge.c +third_party/ffmpeg/libavcodec/bsf/av1_frame_split.c +third_party/ffmpeg/libavcodec/bsf/chomp.c +third_party/ffmpeg/libavcodec/bsf/evc_frame_merge.c +third_party/ffmpeg/libavcodec/bsf/mpeg4_unpack_bframes.c +third_party/ffmpeg/libavcodec/bsf/pgs_frame_merge.c +third_party/ffmpeg/libavcodec/bsf/vp9_superframe.c third_party/ffmpeg/libavcodec/bytestream.h third_party/ffmpeg/libavcodec/c93.c third_party/ffmpeg/libavcodec/canopus.c third_party/ffmpeg/libavcodec/canopus.h -third_party/ffmpeg/libavcodec/chomp_bsf.c third_party/ffmpeg/libavcodec/cook_parser.c third_party/ffmpeg/libavcodec/cpia.c third_party/ffmpeg/libavcodec/d3d12va_decode.h @@ -10252,6 +10506,8 @@ third_party/ffmpeg/libavcodec/diracdec.c third_party/ffmpeg/libavcodec/diractab.c third_party/ffmpeg/libavcodec/diractab.h third_party/ffmpeg/libavcodec/dxv.c +third_party/ffmpeg/libavcodec/dxv.h +third_party/ffmpeg/libavcodec/dxvenc.c third_party/ffmpeg/libavcodec/eac3_data.c third_party/ffmpeg/libavcodec/eac3_data.h third_party/ffmpeg/libavcodec/eac3dec.c @@ -10261,7 +10517,6 @@ third_party/ffmpeg/libavcodec/elbg.c third_party/ffmpeg/libavcodec/elbg.h third_party/ffmpeg/libavcodec/escape124.c third_party/ffmpeg/libavcodec/escape130.c -third_party/ffmpeg/libavcodec/evc_frame_merge_bsf.c third_party/ffmpeg/libavcodec/flacenc.c third_party/ffmpeg/libavcodec/g723_1enc.c third_party/ffmpeg/libavcodec/hap.c @@ -10291,6 +10546,8 @@ third_party/ffmpeg/libavcodec/libjxl.c third_party/ffmpeg/libavcodec/libjxl.h third_party/ffmpeg/libavcodec/libjxldec.c third_party/ffmpeg/libavcodec/libjxlenc.c +third_party/ffmpeg/libavcodec/liblc3dec.c +third_party/ffmpeg/libavcodec/liblc3enc.c third_party/ffmpeg/libavcodec/librsvgdec.c third_party/ffmpeg/libavcodec/libtheoraenc.c third_party/ffmpeg/libavcodec/libuavs3d.c @@ -10301,6 +10558,7 @@ third_party/ffmpeg/libavcodec/libxavs.c third_party/ffmpeg/libavcodec/libxavs2.c third_party/ffmpeg/libavcodec/lpc.c third_party/ffmpeg/libavcodec/lpc.h +third_party/ffmpeg/libavcodec/lpc_functions.h third_party/ffmpeg/libavcodec/mediacodec.h third_party/ffmpeg/libavcodec/mediacodec_sw_buffer.c third_party/ffmpeg/libavcodec/mediacodec_wrapper.h @@ -10309,7 +10567,6 @@ third_party/ffmpeg/libavcodec/mfenc.c third_party/ffmpeg/libavcodec/mimic.c third_party/ffmpeg/libavcodec/mlz.c third_party/ffmpeg/libavcodec/mlz.h -third_party/ffmpeg/libavcodec/mpeg4_unpack_bframes_bsf.c third_party/ffmpeg/libavcodec/mpeg4audio.c third_party/ffmpeg/libavcodec/mpeg4audio_sample_rates.c third_party/ffmpeg/libavcodec/mpeg4audio_sample_rates.h @@ -10331,7 +10588,6 @@ third_party/ffmpeg/libavcodec/opusenc_psy.h third_party/ffmpeg/libavcodec/opusenc_utils.h third_party/ffmpeg/libavcodec/opustab.c third_party/ffmpeg/libavcodec/opustab.h -third_party/ffmpeg/libavcodec/pgs_frame_merge_bsf.c third_party/ffmpeg/libavcodec/roqvideoenc.c third_party/ffmpeg/libavcodec/rscc.c third_party/ffmpeg/libavcodec/s302m.c @@ -10354,7 +10610,6 @@ third_party/ffmpeg/libavcodec/vc2enc_dwt.c third_party/ffmpeg/libavcodec/vc2enc_dwt.h third_party/ffmpeg/libavcodec/videotoolboxenc.c third_party/ffmpeg/libavcodec/vp9_mc_template.c -third_party/ffmpeg/libavcodec/vp9_superframe_bsf.c third_party/ffmpeg/libavcodec/vp9recon.c third_party/ffmpeg/libavcodec/vvc_parser.c third_party/ffmpeg/libavcodec/webp.c @@ -10440,6 +10695,7 @@ third_party/ffmpeg/libavformat/av1dec.c third_party/ffmpeg/libavformat/avs3dec.c third_party/ffmpeg/libavformat/c93.c third_party/ffmpeg/libavformat/dnxhddec.c +third_party/ffmpeg/libavformat/ffjni.c third_party/ffmpeg/libavformat/ftp.c third_party/ffmpeg/libavformat/hevc.c third_party/ffmpeg/libavformat/hevc.h @@ -10448,12 +10704,15 @@ third_party/ffmpeg/libavformat/iamf.c third_party/ffmpeg/libavformat/iamf.h third_party/ffmpeg/libavformat/iamf_parse.c third_party/ffmpeg/libavformat/iamf_parse.h +third_party/ffmpeg/libavformat/iamf_reader.c +third_party/ffmpeg/libavformat/iamf_reader.h third_party/ffmpeg/libavformat/iamf_writer.c third_party/ffmpeg/libavformat/iamf_writer.h third_party/ffmpeg/libavformat/iamfdec.c third_party/ffmpeg/libavformat/iff.c third_party/ffmpeg/libavformat/ivfdec.c third_party/ffmpeg/libavformat/jpegxl_parse.c +third_party/ffmpeg/libavformat/lc3.c third_party/ffmpeg/libavformat/libsmbclient.c third_party/ffmpeg/libavformat/libssh.c third_party/ffmpeg/libavformat/matroskaenc.c @@ -10505,6 +10764,7 @@ third_party/ffmpeg/libavutil/stereo3d.h third_party/ffmpeg/libavutil/tests/color_utils.c third_party/ffmpeg/libavutil/tests/display.c third_party/ffmpeg/libavutil/tests/random_seed.c +third_party/ffmpeg/libavutil/tests/side_data_array.c third_party/ffmpeg/libavutil/timecode.c third_party/ffmpeg/libavutil/timecode.h third_party/ffmpeg/libavutil/tx.c @@ -10519,6 +10779,7 @@ third_party/ffmpeg/tests/checkasm/hevc_sao.c third_party/ffmpeg/tests/checkasm/vf_colorspace.c third_party/ffmpeg/tests/checkasm/videodsp.c third_party/ffmpeg/tests/checkasm/vp9dsp.c +third_party/ffmpeg/tests/checkasm/vvc_alf.c third_party/ffmpeg/tools/target_dec_fuzzer.c third_party/flac/include/share/compat.h third_party/flatbuffers/src/android/app/src/main/cpp/CMakeLists.txt @@ -10556,9 +10817,11 @@ third_party/freetype/src/src/sfnt/ttsvg.c third_party/freetype/src/src/truetype/ttgxvar.c third_party/freetype/src/src/truetype/ttinterp.h third_party/fuchsia-gn-sdk/src/gen_fidl_response_file.py +third_party/fuchsia-gn-sdk/src/gn_configs.gni third_party/fuchsia-gn-sdk/src/prepare_package_inputs.py third_party/gemmlowp/src/contrib/CMakeLists.txt third_party/gemmlowp/src/standalone/neon-gemm-kernel-benchmark.cc +third_party/glslang/src/glslang/HLSL/hlslParseHelper.cpp third_party/google-closure-library/closure-deps/lib/jsfile_parser.js third_party/google-closure-library/closure-deps/package.json third_party/google-closure-library/closure/bin/build/closurebuilder.py @@ -10811,7 +11074,6 @@ third_party/google-closure-library/doc/js/article.js third_party/google-closure-library/package.json third_party/google-closure-library/scripts/generate_deps_js.js third_party/google-closure-library/third_party/closure/goog/mochikit/async/deferred.js -third_party/google_benchmark/src/setup.py third_party/google_benchmark/src/src/cycleclock.h third_party/google_input_tools/src/chrome/os/inputview/adapter.js third_party/google_input_tools/src/chrome/os/inputview/canvas.js @@ -11079,7 +11341,8 @@ third_party/harfbuzz-ng/src/src/hb.hh third_party/harfbuzz-ng/src/test/api/hb-test.h third_party/harfbuzz-ng/src/test/api/test-draw.c third_party/harfbuzz-ng/src/test/api/test-ot-tag.c -third_party/highway/src/hwy/ops/wasm_128-inl.h +third_party/highway/src/.bcr/metadata.template.json +third_party/highway/src/hwy/stats.h third_party/hunspell/src/hunspell/affentry.cxx third_party/hunspell/src/hunspell/affentry.hxx third_party/hunspell/src/hunspell/affixmgr.cxx @@ -11103,6 +11366,7 @@ third_party/hunspell/src/hunspell/replist.cxx third_party/hunspell/src/hunspell/replist.hxx third_party/hunspell/src/hunspell/suggestmgr.cxx third_party/hunspell/src/hunspell/suggestmgr.hxx +third_party/hunspell/src/hunspell/utf_info.cxx third_party/hunspell/src/hunspell/w_char.hxx third_party/hunspell/src/parsers/firstparser.cxx third_party/hunspell/src/parsers/firstparser.hxx @@ -11165,13 +11429,11 @@ third_party/icu/source/tools/toolutil/pkg_genc.cpp third_party/inspector_protocol/crdtp/cbor.cc third_party/inspector_protocol/crdtp/json.cc third_party/inspector_protocol/roll.py -third_party/instrumented_libraries/focal/BUILD.gn third_party/ipcz/src/reference_drivers/random.cc third_party/isimpledom/ISimpleDOMDocument.idl third_party/isimpledom/ISimpleDOMNode.idl third_party/isimpledom/ISimpleDOMText.idl third_party/jni_zero/PRESUBMIT.py -third_party/js_code_coverage/package.json third_party/jstemplate/compile.py third_party/jstemplate/jsevalcontext.js third_party/jstemplate/jstemplate.js @@ -11204,7 +11466,6 @@ third_party/libaom/source/libaom/aom/src/aom_encoder.c third_party/libaom/source/libaom/aom_dsp/x86/variance_impl_avx2.c third_party/libaom/source/libaom/aom_ports/aarch64_cpudetect.c third_party/libaom/source/libaom/aom_ports/bitops.h -third_party/libaom/source/libaom/aom_ports/msvc.h third_party/libaom/source/libaom/aom_util/aom_thread.c third_party/libaom/source/libaom/aom_util/aom_thread.h third_party/libaom/source/libaom/av1/common/av1_common_int.h @@ -11227,6 +11488,7 @@ third_party/libaom/source/libaom/av1/encoder/speed_features.c third_party/libaom/source/libaom/av1/encoder/speed_features.h third_party/libaom/source/libaom/av1/encoder/tx_search.c third_party/libaom/source/libaom/av1/encoder/var_based_part.c +third_party/libaom/source/libaom/common/tools_common.h third_party/libaom/source/libaom/test/gviz_api.py third_party/libaom/source/libaom/test/metrics_template.html third_party/libaom/source/libaom/test/visual_metrics.py @@ -11262,6 +11524,8 @@ third_party/libc++/src/src/tzdb.cpp third_party/libc++/src/test/libcxx/containers/sequences/deque/asan_turning_off.pass.cpp third_party/libc++/src/test/libcxx/containers/sequences/vector/asan_turning_off.pass.cpp third_party/libc++/src/test/libcxx/containers/strings/basic.string/asan_turning_off.pass.cpp +third_party/libc++/src/test/std/time/time.zone/time.zone.db/time.zone.db.access/current_zone.pass.cpp +third_party/libc++/src/test/std/time/time.zone/time.zone.db/time.zone.db.tzdb/current_zone.pass.cpp third_party/libc++/src/utils/ci/BOT_OWNERS.txt third_party/libc++abi/src/CREDITS.TXT third_party/libdrm/src/android/gralloc_handle.h @@ -11325,6 +11589,7 @@ third_party/libphonenumber/dist/resources/geocoding/en/86.txt third_party/libphonenumber/dist/resources/geocoding/zh/86.txt third_party/libphonenumber/dist/tools/java/data/webapp/WEB-INF/appengine-web.xml third_party/libpng/contrib/oss-fuzz/README.txt +third_party/libpng/contrib/oss-fuzz/libpng_read_fuzzer.cc third_party/libprotobuf-mutator/src/examples/libfuzzer/libfuzzer_bin_example.cc third_party/libprotobuf-mutator/src/examples/libfuzzer/libfuzzer_example.cc third_party/libprotobuf-mutator/src/src/mutator_test.cc @@ -11337,6 +11602,7 @@ third_party/libusb/src/libusb/os/windows_usb.c third_party/libusb/src/msvc/inttypes.h third_party/libusb/src/msvc/stdint.h third_party/libvpx/BUILD.gn +third_party/libvpx/source/libvpx/build/make/Android.mk third_party/libvpx/source/libvpx/examples/vpx_dec_fuzzer.cc third_party/libvpx/source/libvpx/libs.mk third_party/libvpx/source/libvpx/test/vp8_datarate_test.cc @@ -11490,6 +11756,8 @@ third_party/libwebp/src/src/utils/huffman_encode_utils.c third_party/libwebp/src/src/utils/huffman_encode_utils.h third_party/libwebp/src/src/utils/huffman_utils.c third_party/libwebp/src/src/utils/huffman_utils.h +third_party/libwebp/src/src/utils/palette.c +third_party/libwebp/src/src/utils/palette.h third_party/libwebp/src/src/utils/quant_levels_dec_utils.c third_party/libwebp/src/src/utils/quant_levels_dec_utils.h third_party/libwebp/src/src/utils/quant_levels_utils.c @@ -11520,20 +11788,6 @@ third_party/libzip/src/lib/zip_crypto_win.c third_party/libzip/src/lib/zip_extra_field.c third_party/lottie/lottie_worker.js third_party/mako/mako/test/templates/internationalization.html -third_party/maldoca/src/maldoca/base/get_runfiles_dir.cc -third_party/maldoca/src/maldoca/base/status.h -third_party/maldoca/src/maldoca/base/status_payload_test.cc -third_party/maldoca/src/maldoca/ole/data_structures.h -third_party/maldoca/src/maldoca/ole/dir.h -third_party/maldoca/src/maldoca/ole/ooxml_to_proto_test.cc -third_party/maldoca/src/maldoca/ole/oss_utils.cc -third_party/maldoca/src/maldoca/ole/ppt.h -third_party/maldoca/src/maldoca/ole/property_set_stream.cc -third_party/maldoca/src/maldoca/ole/property_set_stream.h -third_party/maldoca/src/maldoca/ole/vba.cc -third_party/maldoca/src/maldoca/ole/vba_extract.cc -third_party/maldoca/src/third_party/chromium/third_party/zlib/google/zip_reader.cc -third_party/maldoca/src/third_party/chromium/third_party/zlib/google/zip_reader.h third_party/material_web_components/components-chromium/node_modules/@lit/reactive-element/decorators/event-options.d.ts third_party/material_web_components/components-chromium/node_modules/@lit/reactive-element/decorators/query-all.d.ts third_party/material_web_components/components-chromium/node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts @@ -11541,6 +11795,7 @@ third_party/material_web_components/components-chromium/node_modules/@lit/reacti third_party/material_web_components/components-chromium/node_modules/@lit/reactive-element/decorators/query-async.d.ts third_party/material_web_components/components-chromium/node_modules/@lit/reactive-element/decorators/query.d.ts third_party/material_web_components/components-chromium/node_modules/@lit/reactive-element/reactive-element.d.ts +third_party/material_web_components/components-chromium/node_modules/@lit/task/task.d.ts third_party/material_web_components/components-chromium/node_modules/@material/web/checkbox/internal/checkbox.d.ts third_party/material_web_components/components-chromium/node_modules/@material/web/checkbox/internal/checkbox.js third_party/material_web_components/components-chromium/node_modules/@material/web/dialog/internal/dialog.d.ts @@ -11613,7 +11868,6 @@ third_party/nearby/src/fastpair/scanning/fastpair/fast_pair_non_discoverable_sca third_party/nearby/src/fastpair/server_access/fast_pair_client_impl.cc third_party/nearby/src/fastpair/server_access/fast_pair_client_impl_test.cc third_party/nearby/src/internal/crypto_cros/hmac_unittest.cc -third_party/nearby/src/internal/crypto_cros/random.h third_party/nearby/src/internal/crypto_cros/rsa_private_key_unittest.cc third_party/nearby/src/internal/crypto_cros/secure_util.h third_party/nearby/src/internal/network/http_client_impl_test.cc @@ -11655,11 +11909,13 @@ third_party/nearby/src/sharing/contacts/nearby_share_contact_manager_impl_test.c third_party/nearby/src/sharing/contacts/nearby_share_contacts_sorter_test.cc third_party/nearby/src/sharing/local_device_data/nearby_share_local_device_data_manager_impl_test.cc third_party/nearby/src/sharing/nearby_share_profile_info_provider_impl_test.cc +third_party/nearby/src/sharing/nearby_sharing_service.h third_party/nearby/src/sharing/nearby_sharing_service_extension_test.cc third_party/nearby/src/sharing/text_attachment_test.cc third_party/node/node_modules/@aashutoshrathi/word-wrap/package.json third_party/node/node_modules/@eslint/eslintrc/node_modules/globals/package.json third_party/node/node_modules/@lit/reactive-element/reactive-element.d.ts +third_party/node/node_modules/@mediapipe/tasks-vision/vision.d.ts third_party/node/node_modules/@types/dom-speech-recognition/index.d.ts third_party/node/node_modules/@types/dom-webcodecs/index.d.ts third_party/node/node_modules/@types/google.analytics/index.d.ts @@ -11833,6 +12089,7 @@ third_party/node/node_modules/terser/package.json third_party/node/node_modules/type-fest/package.json third_party/node/node_modules/typescript/lib/lib.dom.d.ts third_party/node/node_modules/typescript/lib/lib.dom.iterable.d.ts +third_party/node/node_modules/typescript/lib/lib.es2016.intl.d.ts third_party/node/node_modules/typescript/lib/lib.es2020.bigint.d.ts third_party/node/node_modules/typescript/lib/lib.es2020.intl.d.ts third_party/node/node_modules/typescript/lib/lib.es2021.intl.d.ts @@ -11855,6 +12112,7 @@ third_party/openh264/src/module/task_utils.py third_party/openh264/src/module/task_utils_generated.h third_party/openh264/src/test/build/windowsphone/codec_ut/CodecUTApp/Properties/AppManifest.xml third_party/openh264/src/test/build/windowsphone/codec_ut/CodecUTApp/Properties/WMAppManifest.xml +third_party/openscreen/src/BUILD.gn third_party/openscreen/src/PRESUBMIT.py third_party/openscreen/src/buildtools/README.txt third_party/openscreen/src/buildtools/clang_format/README.txt @@ -11901,12 +12159,14 @@ third_party/openscreen/src/discovery/mdns/impl/mdns_responder_unittest.cc third_party/openscreen/src/discovery/mdns/public/mdns_reader.cc third_party/openscreen/src/discovery/public/dns_sd_service_watcher.h third_party/openscreen/src/osp/impl/message_demuxer.cc +third_party/openscreen/src/osp/impl/presentation/presentation_controller.cc +third_party/openscreen/src/osp/impl/quic/quic_client.h +third_party/openscreen/src/osp/impl/quic/quic_connection_factory_client.cc +third_party/openscreen/src/osp/impl/quic/quic_connection_factory_server.cc third_party/openscreen/src/platform/impl/tls_connection_factory_posix.cc third_party/openscreen/src/platform/impl/tls_connection_posix.cc third_party/openscreen/src/test/test_main.cc third_party/openscreen/src/testing/libfuzzer/BUILD.gn -third_party/openscreen/src/third_party/abseil/BUILD.gn -third_party/openscreen/src/third_party/boringssl/BUILD.gn third_party/openscreen/src/third_party/protobuf/CHANGES.txt third_party/openscreen/src/third_party/protobuf/src/google/protobuf/any.cc third_party/openscreen/src/third_party/protobuf/src/google/protobuf/any.h @@ -12367,7 +12627,7 @@ third_party/openscreen/src/third_party/protobuf/src/google/protobuf/wire_format. third_party/openscreen/src/third_party/protobuf/src/google/protobuf/wire_format_lite.cc third_party/openscreen/src/third_party/protobuf/src/google/protobuf/wire_format_lite.h third_party/openscreen/src/third_party/protobuf/src/google/protobuf/wire_format_unittest.cc -third_party/openscreen/src/third_party/zlib/BUILD.gn +third_party/openscreen/src/third_party/quiche/BUILD.gn third_party/openscreen/src/tools/cddl/sema.cc third_party/openscreen/src/tools/licenses.py third_party/openscreen/src/util/crypto/rsa_private_key_unittest.cc @@ -12413,6 +12673,7 @@ third_party/pdfium/PRESUBMIT.py third_party/pdfium/core/fpdfapi/cmaps/fpdf_cmaps.cpp third_party/pdfium/core/fpdfapi/edit/cpdf_contentstream_write_utils.cpp third_party/pdfium/core/fpdftext/cpdf_linkextract_unittest.cpp +third_party/pdfium/core/fxcrt/fx_memory.cpp third_party/pdfium/core/fxcrt/fx_memory_pa.cpp third_party/pdfium/core/fxcrt/widestring_unittest.cpp third_party/pdfium/core/fxge/win32/cgdi_device_driver.cpp @@ -12427,7 +12688,6 @@ third_party/pdfium/testing/gtest/BUILD.gn third_party/pdfium/testing/tools/PRESUBMIT.py third_party/pdfium/testing/tools/safetynet_compare.py third_party/pdfium/third_party/agg23/agg_math.h -third_party/pdfium/third_party/base/memory/aligned_memory.cc third_party/pdfium/third_party/freetype/include/freetype-custom-config/ftoption.h third_party/pdfium/third_party/libopenjpeg/j2k.c third_party/pdfium/third_party/libopenjpeg/opj_includes.h @@ -12478,6 +12738,7 @@ third_party/perfetto/python/perfetto/prebuilts/manifests/traceconv.py third_party/perfetto/python/perfetto/prebuilts/perfetto_prebuilts.py third_party/perfetto/python/perfetto/trace_processor/shell.py third_party/perfetto/python/setup.py +third_party/perfetto/python/tools/install_test_reporter_app.py third_party/perfetto/python/tools/record_android_trace.py third_party/perfetto/python/tools/update_permalink.py third_party/perfetto/src/android_internal/health_hal.cc @@ -12491,10 +12752,9 @@ third_party/perfetto/src/profiling/memory/shared_ring_buffer.cc third_party/perfetto/src/profiling/memory/system_property.h third_party/perfetto/src/profiling/symbolizer/breakpad_parser.cc third_party/perfetto/src/profiling/symbolizer/breakpad_parser.h -third_party/perfetto/src/trace_processor/forwarding_trace_parser.cc third_party/perfetto/src/trace_processor/importers/common/args_translation_table.cc +third_party/perfetto/src/trace_processor/importers/common/thread_state_tracker.cc third_party/perfetto/src/trace_processor/importers/ftrace/binder_tracker.cc -third_party/perfetto/src/trace_processor/importers/ftrace/thread_state_tracker.cc third_party/perfetto/src/trace_processor/importers/fuchsia/fuchsia_trace_tokenizer.h third_party/perfetto/src/trace_processor/importers/fuchsia/fuchsia_trace_utils.h third_party/perfetto/src/trace_processor/importers/ninja/ninja_log_parser.cc @@ -12503,12 +12763,17 @@ third_party/perfetto/src/trace_processor/importers/proto/statsd_module.cc third_party/perfetto/src/trace_processor/importers/proto/system_probes_parser.cc third_party/perfetto/src/trace_processor/metrics/sql/android/unsymbolized_frames.sql third_party/perfetto/src/trace_processor/metrics/sql/chrome/rail_modes.sql +third_party/perfetto/src/trace_processor/perfetto_sql/stdlib/android/startup/time_to_display.sql third_party/perfetto/src/trace_processor/perfetto_sql/stdlib/chrome/page_loads.sql +third_party/perfetto/src/trace_processor/perfetto_sql/stdlib/export/to_firefox_profile.sql +third_party/perfetto/src/trace_processor/util/trace_type.cc +third_party/perfetto/src/traceconv/trace_to_firefox.h third_party/perfetto/src/traceconv/trace_to_hprof.cc third_party/perfetto/src/traced/probes/android_log/android_log_data_source.cc third_party/perfetto/src/tracing/service/tracing_service_impl_unittest.cc third_party/perfetto/test/cts/AndroidTest.xml third_party/perfetto/test/cts/reporter/AndroidTest.xml +third_party/perfetto/test/trace_processor/diff_tests/parser/simpleperf/tests.py third_party/perfetto/test/vts/AndroidTest.xml third_party/perfetto/tools/download_changed_screenshots.py third_party/perfetto/ui/.eslintrc.js @@ -12528,18 +12793,20 @@ third_party/perfetto/ui/src/common/recordingV2/targets/android_target.ts third_party/perfetto/ui/src/common/upload_utils.ts third_party/perfetto/ui/src/controller/adb.ts third_party/perfetto/ui/src/controller/chrome_proxy_record_controller.ts -third_party/perfetto/ui/src/controller/permalink_controller.ts third_party/perfetto/ui/src/frontend/analytics.ts third_party/perfetto/ui/src/frontend/cookie_consent.ts third_party/perfetto/ui/src/frontend/error_dialog.ts third_party/perfetto/ui/src/frontend/home_page.ts third_party/perfetto/ui/src/frontend/index.ts third_party/perfetto/ui/src/frontend/pan_and_zoom_handler.ts +third_party/perfetto/ui/src/frontend/permalink.ts third_party/perfetto/ui/src/frontend/post_message_handler.ts +third_party/perfetto/ui/src/frontend/post_message_handler_unittest.ts third_party/perfetto/ui/src/frontend/record_page.ts third_party/perfetto/ui/src/frontend/sidebar.ts third_party/perfetto/ui/src/frontend/trace_info_page.ts third_party/perfetto/ui/src/frontend/trace_url_handler.ts +third_party/perfetto/ui/src/open_perfetto_trace/index.html third_party/perfetto/ui/src/test/diff_viewer/script.js third_party/perfetto/ui/src/trace_processor/engine.ts third_party/perfetto/ui/src/widgets/hotkey_context.ts @@ -12558,10 +12825,65 @@ third_party/polymer/v3_0/components-chromium/paper-tooltip/paper-tooltip.js third_party/polymer/v3_0/components-chromium/polymer/interfaces.d.ts third_party/polymer/v3_0/package.json third_party/private_membership/BUILD.gn +third_party/protobuf-javascript/src/binary/arith.js +third_party/protobuf-javascript/src/binary/arith_test.js +third_party/protobuf-javascript/src/binary/constants.js +third_party/protobuf-javascript/src/binary/decoder.js +third_party/protobuf-javascript/src/binary/decoder_test.js +third_party/protobuf-javascript/src/binary/encoder.js +third_party/protobuf-javascript/src/binary/message_test.js +third_party/protobuf-javascript/src/binary/proto_test.js +third_party/protobuf-javascript/src/binary/reader.js +third_party/protobuf-javascript/src/binary/reader_test.js +third_party/protobuf-javascript/src/binary/utils.js +third_party/protobuf-javascript/src/binary/utils_test.js +third_party/protobuf-javascript/src/binary/writer.js +third_party/protobuf-javascript/src/binary/writer_test.js +third_party/protobuf-javascript/src/commonjs/import_test.js +third_party/protobuf-javascript/src/commonjs/strict_test.js +third_party/protobuf-javascript/src/compatibility_tests/v3.0.0/binary/arith_test.js +third_party/protobuf-javascript/src/compatibility_tests/v3.0.0/binary/decoder_test.js +third_party/protobuf-javascript/src/compatibility_tests/v3.0.0/binary/proto_test.js +third_party/protobuf-javascript/src/compatibility_tests/v3.0.0/binary/reader_test.js +third_party/protobuf-javascript/src/compatibility_tests/v3.0.0/binary/utils_test.js +third_party/protobuf-javascript/src/compatibility_tests/v3.0.0/binary/writer_test.js +third_party/protobuf-javascript/src/compatibility_tests/v3.0.0/commonjs/import_test.js +third_party/protobuf-javascript/src/compatibility_tests/v3.0.0/debug_test.js +third_party/protobuf-javascript/src/compatibility_tests/v3.0.0/message_test.js +third_party/protobuf-javascript/src/compatibility_tests/v3.0.0/proto3_test.js +third_party/protobuf-javascript/src/compatibility_tests/v3.1.0/binary/arith_test.js +third_party/protobuf-javascript/src/compatibility_tests/v3.1.0/binary/decoder_test.js +third_party/protobuf-javascript/src/compatibility_tests/v3.1.0/binary/proto_test.js +third_party/protobuf-javascript/src/compatibility_tests/v3.1.0/binary/reader_test.js +third_party/protobuf-javascript/src/compatibility_tests/v3.1.0/binary/utils_test.js +third_party/protobuf-javascript/src/compatibility_tests/v3.1.0/binary/writer_test.js +third_party/protobuf-javascript/src/compatibility_tests/v3.1.0/debug_test.js +third_party/protobuf-javascript/src/compatibility_tests/v3.1.0/maps_test.js +third_party/protobuf-javascript/src/compatibility_tests/v3.1.0/message_test.js +third_party/protobuf-javascript/src/compatibility_tests/v3.1.0/proto3_test.js +third_party/protobuf-javascript/src/debug.js +third_party/protobuf-javascript/src/debug_test.js +third_party/protobuf-javascript/src/experimental/runtime/int64.js +third_party/protobuf-javascript/src/experimental/runtime/kernel/kernel_compatibility_test.js +third_party/protobuf-javascript/src/experimental/runtime/kernel/storage.js +third_party/protobuf-javascript/src/experimental/runtime/kernel/writer.js +third_party/protobuf-javascript/src/generator/js_generator.cc +third_party/protobuf-javascript/src/generator/js_generator.h +third_party/protobuf-javascript/src/generator/protoc-gen-js.cc +third_party/protobuf-javascript/src/generator/well_known_types_embed.cc +third_party/protobuf-javascript/src/generator/well_known_types_embed.h +third_party/protobuf-javascript/src/gulpfile.js +third_party/protobuf-javascript/src/map.js +third_party/protobuf-javascript/src/maps_test.js +third_party/protobuf-javascript/src/message.js +third_party/protobuf-javascript/src/message_test.js +third_party/protobuf-javascript/src/node_loader.js +third_party/protobuf-javascript/src/proto3_test.js +third_party/protobuf-javascript/src/test_bootstrap.js third_party/protobuf/CHANGES.txt +third_party/protobuf/CMakeLists.txt third_party/protobuf/CONTRIBUTORS.txt third_party/protobuf/benchmarks/cpp/cpp_benchmark.cc -third_party/protobuf/cmake/CMakeLists.txt third_party/protobuf/conformance/binary_json_conformance_suite.cc third_party/protobuf/conformance/binary_json_conformance_suite.h third_party/protobuf/conformance/conformance_cpp.cc @@ -12579,55 +12901,6 @@ third_party/protobuf/java/core/pom.xml third_party/protobuf/java/lite/pom.xml third_party/protobuf/java/pom.xml third_party/protobuf/java/util/pom.xml -third_party/protobuf/js/binary/arith.js -third_party/protobuf/js/binary/arith_test.js -third_party/protobuf/js/binary/constants.js -third_party/protobuf/js/binary/decoder.js -third_party/protobuf/js/binary/decoder_test.js -third_party/protobuf/js/binary/encoder.js -third_party/protobuf/js/binary/message_test.js -third_party/protobuf/js/binary/proto_test.js -third_party/protobuf/js/binary/reader.js -third_party/protobuf/js/binary/reader_test.js -third_party/protobuf/js/binary/utils.js -third_party/protobuf/js/binary/utils_test.js -third_party/protobuf/js/binary/writer.js -third_party/protobuf/js/binary/writer_test.js -third_party/protobuf/js/commonjs/import_test.js -third_party/protobuf/js/commonjs/strict_test.js -third_party/protobuf/js/compatibility_tests/v3.0.0/binary/arith_test.js -third_party/protobuf/js/compatibility_tests/v3.0.0/binary/decoder_test.js -third_party/protobuf/js/compatibility_tests/v3.0.0/binary/proto_test.js -third_party/protobuf/js/compatibility_tests/v3.0.0/binary/reader_test.js -third_party/protobuf/js/compatibility_tests/v3.0.0/binary/utils_test.js -third_party/protobuf/js/compatibility_tests/v3.0.0/binary/writer_test.js -third_party/protobuf/js/compatibility_tests/v3.0.0/commonjs/import_test.js -third_party/protobuf/js/compatibility_tests/v3.0.0/debug_test.js -third_party/protobuf/js/compatibility_tests/v3.0.0/message_test.js -third_party/protobuf/js/compatibility_tests/v3.0.0/proto3_test.js -third_party/protobuf/js/compatibility_tests/v3.1.0/binary/arith_test.js -third_party/protobuf/js/compatibility_tests/v3.1.0/binary/decoder_test.js -third_party/protobuf/js/compatibility_tests/v3.1.0/binary/proto_test.js -third_party/protobuf/js/compatibility_tests/v3.1.0/binary/reader_test.js -third_party/protobuf/js/compatibility_tests/v3.1.0/binary/utils_test.js -third_party/protobuf/js/compatibility_tests/v3.1.0/binary/writer_test.js -third_party/protobuf/js/compatibility_tests/v3.1.0/debug_test.js -third_party/protobuf/js/compatibility_tests/v3.1.0/maps_test.js -third_party/protobuf/js/compatibility_tests/v3.1.0/message_test.js -third_party/protobuf/js/compatibility_tests/v3.1.0/proto3_test.js -third_party/protobuf/js/debug.js -third_party/protobuf/js/debug_test.js -third_party/protobuf/js/experimental/runtime/int64.js -third_party/protobuf/js/experimental/runtime/kernel/kernel_compatibility_test.js -third_party/protobuf/js/experimental/runtime/kernel/storage.js -third_party/protobuf/js/experimental/runtime/kernel/writer.js -third_party/protobuf/js/map.js -third_party/protobuf/js/maps_test.js -third_party/protobuf/js/message.js -third_party/protobuf/js/message_test.js -third_party/protobuf/js/node_loader.js -third_party/protobuf/js/proto3_test.js -third_party/protobuf/js/test_bootstrap.js third_party/protobuf/objectivec/DevTools/pddm.py third_party/protobuf/objectivec/DevTools/pddm_tests.py third_party/protobuf/objectivec/GPBAny.pbobjc.h @@ -12662,9 +12935,6 @@ third_party/protobuf/objectivec/GPBUtilities.h third_party/protobuf/objectivec/GPBUtilities_PackagePrivate.h third_party/protobuf/objectivec/GPBWellKnownTypes.h third_party/protobuf/objectivec/GPBWireFormat.h -third_party/protobuf/objectivec/Tests/CocoaPods/OSXCocoaPodsTester/OSXCocoaPodsTester/AppDelegate.h -third_party/protobuf/objectivec/Tests/CocoaPods/iOSCocoaPodsTester/iOSCocoaPodsTester/AppDelegate.h -third_party/protobuf/objectivec/Tests/CocoaPods/iOSCocoaPodsTester/iOSCocoaPodsTester/ViewController.h third_party/protobuf/objectivec/Tests/GPBObjectiveCPlusPlusTest.mm third_party/protobuf/objectivec/Tests/GPBTestUtilities.h third_party/protobuf/php/composer.json @@ -12682,9 +12952,10 @@ third_party/protobuf/php/ext/google/protobuf/message.c third_party/protobuf/php/ext/google/protobuf/message.h third_party/protobuf/php/ext/google/protobuf/names.c third_party/protobuf/php/ext/google/protobuf/names.h -third_party/protobuf/php/ext/google/protobuf/package.xml +third_party/protobuf/php/ext/google/protobuf/php_protobuf.h third_party/protobuf/php/ext/google/protobuf/protobuf.c third_party/protobuf/php/ext/google/protobuf/protobuf.h +third_party/protobuf/php/ext/google/protobuf/template_package.xml third_party/protobuf/protoc-artifacts/pom.xml third_party/protobuf/python/docs/conf.py third_party/protobuf/python/docs/generate_docs.py @@ -12759,6 +13030,8 @@ third_party/protobuf/python/google/protobuf/pyext/repeated_scalar_container.cc third_party/protobuf/python/google/protobuf/pyext/repeated_scalar_container.h third_party/protobuf/python/google/protobuf/pyext/safe_numerics.h third_party/protobuf/python/google/protobuf/pyext/scoped_pyobject_ptr.h +third_party/protobuf/python/google/protobuf/pyext/unknown_field_set.cc +third_party/protobuf/python/google/protobuf/pyext/unknown_field_set.h third_party/protobuf/python/google/protobuf/pyext/unknown_fields.cc third_party/protobuf/python/google/protobuf/pyext/unknown_fields.h third_party/protobuf/python/google/protobuf/python_protobuf.h @@ -12768,6 +13041,7 @@ third_party/protobuf/python/google/protobuf/service_reflection.py third_party/protobuf/python/google/protobuf/symbol_database.py third_party/protobuf/python/google/protobuf/text_encoding.py third_party/protobuf/python/google/protobuf/text_format.py +third_party/protobuf/python/google/protobuf/unknown_fields.py third_party/protobuf/python/mox.py third_party/protobuf/python/protobuf_distutils/protobuf_distutils/generate_py_protobufs.py third_party/protobuf/python/protobuf_distutils/setup.py @@ -12810,45 +13084,46 @@ third_party/protobuf/src/google/protobuf/compiler/code_generator.h third_party/protobuf/src/google/protobuf/compiler/command_line_interface.cc third_party/protobuf/src/google/protobuf/compiler/command_line_interface.h third_party/protobuf/src/google/protobuf/compiler/command_line_interface_unittest.cc -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.h -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.h -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.h -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.cc -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_map_field.h -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message_layout_helper.h -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_move_unittest.cc -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_names.h -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_options.h -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.h -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_parse_function_generator.cc -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_parse_function_generator.h -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.h -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_service.cc -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_service.h -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.h -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.cc -third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.h +third_party/protobuf/src/google/protobuf/compiler/cpp/bootstrap_unittest.cc +third_party/protobuf/src/google/protobuf/compiler/cpp/enum.cc +third_party/protobuf/src/google/protobuf/compiler/cpp/enum.h +third_party/protobuf/src/google/protobuf/compiler/cpp/enum_field.cc +third_party/protobuf/src/google/protobuf/compiler/cpp/enum_field.h +third_party/protobuf/src/google/protobuf/compiler/cpp/extension.cc +third_party/protobuf/src/google/protobuf/compiler/cpp/extension.h +third_party/protobuf/src/google/protobuf/compiler/cpp/field.cc +third_party/protobuf/src/google/protobuf/compiler/cpp/field.h +third_party/protobuf/src/google/protobuf/compiler/cpp/file.cc +third_party/protobuf/src/google/protobuf/compiler/cpp/file.h +third_party/protobuf/src/google/protobuf/compiler/cpp/generator.cc +third_party/protobuf/src/google/protobuf/compiler/cpp/generator.h +third_party/protobuf/src/google/protobuf/compiler/cpp/helpers.cc +third_party/protobuf/src/google/protobuf/compiler/cpp/helpers.h +third_party/protobuf/src/google/protobuf/compiler/cpp/map_field.cc +third_party/protobuf/src/google/protobuf/compiler/cpp/map_field.h +third_party/protobuf/src/google/protobuf/compiler/cpp/message.cc +third_party/protobuf/src/google/protobuf/compiler/cpp/message.h +third_party/protobuf/src/google/protobuf/compiler/cpp/message_field.cc +third_party/protobuf/src/google/protobuf/compiler/cpp/message_field.h +third_party/protobuf/src/google/protobuf/compiler/cpp/message_layout_helper.h +third_party/protobuf/src/google/protobuf/compiler/cpp/message_size_unittest.cc third_party/protobuf/src/google/protobuf/compiler/cpp/metadata_test.cc +third_party/protobuf/src/google/protobuf/compiler/cpp/move_unittest.cc +third_party/protobuf/src/google/protobuf/compiler/cpp/names.h +third_party/protobuf/src/google/protobuf/compiler/cpp/options.h +third_party/protobuf/src/google/protobuf/compiler/cpp/padding_optimizer.cc +third_party/protobuf/src/google/protobuf/compiler/cpp/padding_optimizer.h +third_party/protobuf/src/google/protobuf/compiler/cpp/parse_function_generator.cc +third_party/protobuf/src/google/protobuf/compiler/cpp/parse_function_generator.h +third_party/protobuf/src/google/protobuf/compiler/cpp/plugin_unittest.cc +third_party/protobuf/src/google/protobuf/compiler/cpp/primitive_field.cc +third_party/protobuf/src/google/protobuf/compiler/cpp/primitive_field.h +third_party/protobuf/src/google/protobuf/compiler/cpp/service.cc +third_party/protobuf/src/google/protobuf/compiler/cpp/service.h +third_party/protobuf/src/google/protobuf/compiler/cpp/string_field.cc +third_party/protobuf/src/google/protobuf/compiler/cpp/string_field.h +third_party/protobuf/src/google/protobuf/compiler/cpp/unittest.cc +third_party/protobuf/src/google/protobuf/compiler/cpp/unittest.h third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_doc_comment.h @@ -12888,72 +13163,68 @@ third_party/protobuf/src/google/protobuf/compiler/csharp/csharp_wrapper_field.h third_party/protobuf/src/google/protobuf/compiler/importer.cc third_party/protobuf/src/google/protobuf/compiler/importer.h third_party/protobuf/src/google/protobuf/compiler/importer_unittest.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_context.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_context.h -third_party/protobuf/src/google/protobuf/compiler/java/java_doc_comment.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_doc_comment.h -third_party/protobuf/src/google/protobuf/compiler/java/java_doc_comment_unittest.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_enum.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_enum.h -third_party/protobuf/src/google/protobuf/compiler/java/java_enum_field.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_enum_field.h -third_party/protobuf/src/google/protobuf/compiler/java/java_enum_field_lite.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_enum_field_lite.h -third_party/protobuf/src/google/protobuf/compiler/java/java_enum_lite.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_enum_lite.h -third_party/protobuf/src/google/protobuf/compiler/java/java_extension.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_extension.h -third_party/protobuf/src/google/protobuf/compiler/java/java_extension_lite.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_extension_lite.h -third_party/protobuf/src/google/protobuf/compiler/java/java_field.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_field.h -third_party/protobuf/src/google/protobuf/compiler/java/java_file.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_file.h -third_party/protobuf/src/google/protobuf/compiler/java/java_generator.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_generator.h -third_party/protobuf/src/google/protobuf/compiler/java/java_generator_factory.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_generator_factory.h -third_party/protobuf/src/google/protobuf/compiler/java/java_helpers.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_helpers.h -third_party/protobuf/src/google/protobuf/compiler/java/java_kotlin_generator.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_kotlin_generator.h -third_party/protobuf/src/google/protobuf/compiler/java/java_map_field.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_map_field.h -third_party/protobuf/src/google/protobuf/compiler/java/java_map_field_lite.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_map_field_lite.h -third_party/protobuf/src/google/protobuf/compiler/java/java_message.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_message.h -third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder.h -third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder_lite.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_message_builder_lite.h -third_party/protobuf/src/google/protobuf/compiler/java/java_message_field.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_message_field.h -third_party/protobuf/src/google/protobuf/compiler/java/java_message_field_lite.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_message_field_lite.h -third_party/protobuf/src/google/protobuf/compiler/java/java_message_lite.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_message_lite.h -third_party/protobuf/src/google/protobuf/compiler/java/java_name_resolver.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_name_resolver.h -third_party/protobuf/src/google/protobuf/compiler/java/java_names.h -third_party/protobuf/src/google/protobuf/compiler/java/java_options.h -third_party/protobuf/src/google/protobuf/compiler/java/java_plugin_unittest.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_primitive_field.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_primitive_field.h -third_party/protobuf/src/google/protobuf/compiler/java/java_primitive_field_lite.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_primitive_field_lite.h -third_party/protobuf/src/google/protobuf/compiler/java/java_service.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_service.h -third_party/protobuf/src/google/protobuf/compiler/java/java_shared_code_generator.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_shared_code_generator.h -third_party/protobuf/src/google/protobuf/compiler/java/java_string_field.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_string_field.h -third_party/protobuf/src/google/protobuf/compiler/java/java_string_field_lite.cc -third_party/protobuf/src/google/protobuf/compiler/java/java_string_field_lite.h -third_party/protobuf/src/google/protobuf/compiler/js/js_generator.cc -third_party/protobuf/src/google/protobuf/compiler/js/js_generator.h -third_party/protobuf/src/google/protobuf/compiler/js/well_known_types_embed.cc -third_party/protobuf/src/google/protobuf/compiler/js/well_known_types_embed.h +third_party/protobuf/src/google/protobuf/compiler/java/context.cc +third_party/protobuf/src/google/protobuf/compiler/java/context.h +third_party/protobuf/src/google/protobuf/compiler/java/doc_comment.cc +third_party/protobuf/src/google/protobuf/compiler/java/doc_comment.h +third_party/protobuf/src/google/protobuf/compiler/java/doc_comment_unittest.cc +third_party/protobuf/src/google/protobuf/compiler/java/enum.cc +third_party/protobuf/src/google/protobuf/compiler/java/enum.h +third_party/protobuf/src/google/protobuf/compiler/java/enum_field.cc +third_party/protobuf/src/google/protobuf/compiler/java/enum_field.h +third_party/protobuf/src/google/protobuf/compiler/java/enum_field_lite.cc +third_party/protobuf/src/google/protobuf/compiler/java/enum_field_lite.h +third_party/protobuf/src/google/protobuf/compiler/java/enum_lite.cc +third_party/protobuf/src/google/protobuf/compiler/java/enum_lite.h +third_party/protobuf/src/google/protobuf/compiler/java/extension.cc +third_party/protobuf/src/google/protobuf/compiler/java/extension.h +third_party/protobuf/src/google/protobuf/compiler/java/extension_lite.cc +third_party/protobuf/src/google/protobuf/compiler/java/extension_lite.h +third_party/protobuf/src/google/protobuf/compiler/java/field.cc +third_party/protobuf/src/google/protobuf/compiler/java/field.h +third_party/protobuf/src/google/protobuf/compiler/java/file.cc +third_party/protobuf/src/google/protobuf/compiler/java/file.h +third_party/protobuf/src/google/protobuf/compiler/java/generator.cc +third_party/protobuf/src/google/protobuf/compiler/java/generator.h +third_party/protobuf/src/google/protobuf/compiler/java/generator_factory.cc +third_party/protobuf/src/google/protobuf/compiler/java/generator_factory.h +third_party/protobuf/src/google/protobuf/compiler/java/helpers.cc +third_party/protobuf/src/google/protobuf/compiler/java/helpers.h +third_party/protobuf/src/google/protobuf/compiler/java/kotlin_generator.cc +third_party/protobuf/src/google/protobuf/compiler/java/kotlin_generator.h +third_party/protobuf/src/google/protobuf/compiler/java/map_field.cc +third_party/protobuf/src/google/protobuf/compiler/java/map_field.h +third_party/protobuf/src/google/protobuf/compiler/java/map_field_lite.cc +third_party/protobuf/src/google/protobuf/compiler/java/map_field_lite.h +third_party/protobuf/src/google/protobuf/compiler/java/message.cc +third_party/protobuf/src/google/protobuf/compiler/java/message.h +third_party/protobuf/src/google/protobuf/compiler/java/message_builder.cc +third_party/protobuf/src/google/protobuf/compiler/java/message_builder.h +third_party/protobuf/src/google/protobuf/compiler/java/message_builder_lite.cc +third_party/protobuf/src/google/protobuf/compiler/java/message_builder_lite.h +third_party/protobuf/src/google/protobuf/compiler/java/message_field.cc +third_party/protobuf/src/google/protobuf/compiler/java/message_field.h +third_party/protobuf/src/google/protobuf/compiler/java/message_field_lite.cc +third_party/protobuf/src/google/protobuf/compiler/java/message_field_lite.h +third_party/protobuf/src/google/protobuf/compiler/java/message_lite.cc +third_party/protobuf/src/google/protobuf/compiler/java/message_lite.h +third_party/protobuf/src/google/protobuf/compiler/java/name_resolver.cc +third_party/protobuf/src/google/protobuf/compiler/java/name_resolver.h +third_party/protobuf/src/google/protobuf/compiler/java/names.h +third_party/protobuf/src/google/protobuf/compiler/java/options.h +third_party/protobuf/src/google/protobuf/compiler/java/plugin_unittest.cc +third_party/protobuf/src/google/protobuf/compiler/java/primitive_field.cc +third_party/protobuf/src/google/protobuf/compiler/java/primitive_field.h +third_party/protobuf/src/google/protobuf/compiler/java/primitive_field_lite.cc +third_party/protobuf/src/google/protobuf/compiler/java/primitive_field_lite.h +third_party/protobuf/src/google/protobuf/compiler/java/service.cc +third_party/protobuf/src/google/protobuf/compiler/java/service.h +third_party/protobuf/src/google/protobuf/compiler/java/shared_code_generator.cc +third_party/protobuf/src/google/protobuf/compiler/java/shared_code_generator.h +third_party/protobuf/src/google/protobuf/compiler/java/string_field.cc +third_party/protobuf/src/google/protobuf/compiler/java/string_field.h +third_party/protobuf/src/google/protobuf/compiler/java/string_field_lite.cc +third_party/protobuf/src/google/protobuf/compiler/java/string_field_lite.h third_party/protobuf/src/google/protobuf/compiler/main.cc third_party/protobuf/src/google/protobuf/compiler/mock_code_generator.cc third_party/protobuf/src/google/protobuf/compiler/mock_code_generator.h @@ -12990,13 +13261,13 @@ third_party/protobuf/src/google/protobuf/compiler/php/php_generator.cc third_party/protobuf/src/google/protobuf/compiler/php/php_generator.h third_party/protobuf/src/google/protobuf/compiler/plugin.cc third_party/protobuf/src/google/protobuf/compiler/plugin.h -third_party/protobuf/src/google/protobuf/compiler/python/python_generator.cc -third_party/protobuf/src/google/protobuf/compiler/python/python_generator.h -third_party/protobuf/src/google/protobuf/compiler/python/python_helpers.cc -third_party/protobuf/src/google/protobuf/compiler/python/python_helpers.h -third_party/protobuf/src/google/protobuf/compiler/python/python_plugin_unittest.cc -third_party/protobuf/src/google/protobuf/compiler/python/python_pyi_generator.cc -third_party/protobuf/src/google/protobuf/compiler/python/python_pyi_generator.h +third_party/protobuf/src/google/protobuf/compiler/python/generator.cc +third_party/protobuf/src/google/protobuf/compiler/python/generator.h +third_party/protobuf/src/google/protobuf/compiler/python/helpers.cc +third_party/protobuf/src/google/protobuf/compiler/python/helpers.h +third_party/protobuf/src/google/protobuf/compiler/python/plugin_unittest.cc +third_party/protobuf/src/google/protobuf/compiler/python/pyi_generator.cc +third_party/protobuf/src/google/protobuf/compiler/python/pyi_generator.h third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generator.cc third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generator.h third_party/protobuf/src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc @@ -13016,6 +13287,7 @@ third_party/protobuf/src/google/protobuf/drop_unknown_fields_test.cc third_party/protobuf/src/google/protobuf/dynamic_message.cc third_party/protobuf/src/google/protobuf/dynamic_message.h third_party/protobuf/src/google/protobuf/dynamic_message_unittest.cc +third_party/protobuf/src/google/protobuf/endian.h third_party/protobuf/src/google/protobuf/explicitly_constructed.h third_party/protobuf/src/google/protobuf/extension_set.cc third_party/protobuf/src/google/protobuf/extension_set.h @@ -13315,9 +13587,11 @@ third_party/re2/src/CMakeLists.txt third_party/re2/src/python/setup.py third_party/re2/src/re2/testing/re2_test.cc third_party/re2/src/util/pcre.h +third_party/rust/PRESUBMIT.py third_party/rust/aho_corasick/v1/BUILD.gn third_party/rust/anyhow/v1/BUILD.gn -third_party/rust/autocfg/v1/BUILD.gn +third_party/rust/bytemuck/v1/BUILD.gn +third_party/rust/bytemuck_derive/v1/BUILD.gn third_party/rust/cxx/v1/BUILD.gn third_party/rust/cxxbridge_cmd/v1/BUILD.gn third_party/rust/cxxbridge_flags/v1/BUILD.gn @@ -13326,7 +13600,6 @@ third_party/rust/heck/v0_4/BUILD.gn third_party/rust/itoa/v1/BUILD.gn third_party/rust/lazy_static/v1/BUILD.gn third_party/rust/memchr/v2/BUILD.gn -third_party/rust/memoffset/v0_6/BUILD.gn third_party/rust/proc_macro2/v1/BUILD.gn third_party/rust/prost/v0_12/BUILD.gn third_party/rust/prost_derive/v0_12/BUILD.gn @@ -13346,7 +13619,7 @@ third_party/rust/semver/v1/BUILD.gn third_party/rust/serde/v1/BUILD.gn third_party/rust/serde_derive/v1/BUILD.gn third_party/rust/serde_json/v1/BUILD.gn -third_party/rust/serde_json_lenient/v0_1/BUILD.gn +third_party/rust/serde_json_lenient/v0_2/BUILD.gn third_party/rust/strum/v0_25/BUILD.gn third_party/rust/strum_macros/v0_25/BUILD.gn third_party/rust/syn/v1/BUILD.gn @@ -13356,7 +13629,6 @@ third_party/rust/tinyvec/v1/BUILD.gn third_party/rust/unicode_ident/v1/BUILD.gn third_party/rust/unicode_linebreak/v0_1/BUILD.gn third_party/rust/unicode_width/v0_1/BUILD.gn -third_party/rust/winapi/v0_3/BUILD.gn third_party/rust/winapi_util/v0_1/BUILD.gn third_party/s2cellid/src/s2/_fpcontractoff.h third_party/s2cellid/src/s2/r1interval.h @@ -13387,6 +13659,7 @@ third_party/skia/demos.skia.org/demos/web_worker/index.html third_party/skia/demos.skia.org/demos/web_worker/main.js third_party/skia/demos.skia.org/demos/web_worker/worker.js third_party/skia/demos.skia.org/demos/webgpu/index.html +third_party/skia/example/external_client/src/gl_context_helper.mm third_party/skia/experimental/tools/pdf-comparison.py third_party/skia/fuzz/FuzzPathop.cpp third_party/skia/gm/addarc.cpp @@ -13409,6 +13682,7 @@ third_party/skia/gn/gn_to_bp.py third_party/skia/gn/skia/BUILD.gn third_party/skia/include/ports/SkImageGeneratorWIC.h third_party/skia/include/ports/SkTypeface_mac.h +third_party/skia/include/private/SkGainmapInfo.h third_party/skia/include/private/SkPathRef.h third_party/skia/infra/bots/assets/android_ndk_darwin/create.py third_party/skia/infra/bots/assets/android_ndk_linux/create.py @@ -13481,7 +13755,9 @@ third_party/skia/modules/pathkit/chaining.js third_party/skia/modules/pathkit/helper.js third_party/skia/modules/pathkit/npm-asmjs/package.json third_party/skia/modules/pathkit/npm-wasm/package.json +third_party/skia/modules/skottie/src/effects/SkSLEffect.cpp third_party/skia/modules/skottie/src/layers/TextLayer.cpp +third_party/skia/modules/skunicode/BUILD.gn third_party/skia/modules/skunicode/src/SkUnicode_icu.cpp third_party/skia/modules/svg/src/SkSVGOpenTypeSVGDecoder.cpp third_party/skia/platform_tools/android/tradefed/upload_dm_results.py @@ -13521,6 +13797,7 @@ third_party/skia/src/gpu/ganesh/gl/GrGLCaps.cpp third_party/skia/src/gpu/ganesh/gl/GrGLCaps.h third_party/skia/src/gpu/ganesh/gl/GrGLGpu.cpp third_party/skia/src/gpu/ganesh/vk/GrVkCaps.cpp +third_party/skia/src/gpu/graphite/Device.cpp third_party/skia/src/gpu/graphite/dawn/DawnCommandBuffer.cpp third_party/skia/src/gpu/graphite/render/AnalyticRRectRenderStep.cpp third_party/skia/src/gpu/graphite/render/PerEdgeAAQuadRenderStep.cpp @@ -13562,11 +13839,12 @@ third_party/skia/third_party/etc1/etc1.cpp third_party/skia/third_party/etc1/etc1.h third_party/skia/third_party/freetype2/include/freetype-android/freetype/config/ftoption.h third_party/skia/third_party/freetype2/include/freetype-no-type1/freetype/config/ftoption.h +third_party/skia/third_party/icu_bidi/BUILD.gn third_party/skia/tools/abandon_gerrit_cls.py -third_party/skia/tools/add_codereview_message.py third_party/skia/tools/bloaty_treemap.py third_party/skia/tools/copyright/main.py third_party/skia/tools/flags/CommandLineFlags.h +third_party/skia/tools/gpu/vk/VkTestMemoryAllocator.h third_party/skia/tools/perf-canvaskit-puppeteer/canvas_perf.js third_party/skia/tools/run-wasm-gm-tests/run-wasm-gm-tests.html third_party/skia/tools/skp/generate_page_set.py @@ -13624,7 +13902,7 @@ third_party/speedometer/v3.0/resources/newssite/news-next/dist/_next/static/chun third_party/speedometer/v3.0/resources/perf.webkit.org/public/data/manifest.json third_party/speedometer/v3.0/resources/react-stockcharts/package-lock.json third_party/speedometer/v3.0/resources/todomvc/architecture-examples/angular-complex/dist/3rdpartylicenses.txt -third_party/speedometer/v3.0/resources/todomvc/architecture-examples/angular-complex/dist/styles.4407ee83dbe11741.css +third_party/speedometer/v3.0/resources/todomvc/architecture-examples/angular-complex/dist/styles.746a93d9fd4de753.css third_party/speedometer/v3.0/resources/todomvc/architecture-examples/angular/dist/3rdpartylicenses.txt third_party/speedometer/v3.0/resources/todomvc/architecture-examples/backbone-complex/dist/index.css third_party/speedometer/v3.0/resources/todomvc/architecture-examples/backbone/dist/index.css @@ -13654,6 +13932,10 @@ third_party/speedometer/v3.0/resources/todomvc/vanilla-examples/javascript-es5/s third_party/speedometer/v3.0/resources/todomvc/vanilla-examples/javascript-es6-webpack-complex/dist/app.css third_party/speedometer/v3.0/resources/todomvc/vanilla-examples/javascript-es6-webpack/package-lock.json third_party/speedometer/v3.0/resources/todomvc/vanilla-examples/javascript-es6-webpack/src/helpers.js +third_party/spirv-cross/src/spirv_hlsl.cpp +third_party/spirv-headers/src/include/spirv/spir-v.xml +third_party/spirv-tools/src/PRESUBMIT.py +third_party/spirv-tools/src/tools/sva/package.json third_party/sqlite/src/amalgamation/shell/shell.c third_party/sqlite/src/amalgamation/sqlite3.c third_party/sqlite/src/amalgamation_dev/shell/shell.c @@ -13804,6 +14086,7 @@ third_party/tflite/src/tensorflow/core/util/example_proto_fast_parsing_test.cc third_party/tflite/src/tensorflow/examples/speech_commands/generate_streaming_test_wav.py third_party/tflite/src/tensorflow/examples/speech_commands/models.py third_party/tflite/src/tensorflow/examples/speech_commands/train.py +third_party/tflite/src/tensorflow/lite/core/c/common.h third_party/tflite/src/tensorflow/lite/delegates/gpu/android_hardware_buffer.h third_party/tflite/src/tensorflow/lite/delegates/nnapi/nnapi_delegate.h third_party/tflite/src/tensorflow/lite/delegates/nnapi/nnapi_delegate_c_api.h @@ -13843,9 +14126,6 @@ third_party/tflite/src/tensorflow/tools/android/test/jni/rgb2yuv.cc third_party/tflite/src/tensorflow/tools/compatibility/tf_upgrade_v2_safety_test.py third_party/tflite/src/tensorflow/tools/pip_package/THIRD_PARTY_NOTICES.txt third_party/tflite/src/tensorflow/tools/pip_package/setup.py -third_party/tflite/src/tensorflow/tools/pip_package/v2/setup.py -third_party/tflite/src/third_party/xla/third_party/tsl/tsl/distributed_runtime/coordination/coordination_service_error_util.h -third_party/tflite/src/third_party/xla/third_party/tsl/tsl/distributed_runtime/rpc/grpc_util.h third_party/tflite/src/third_party/xla/third_party/tsl/tsl/lib/io/format.h third_party/tflite/src/third_party/xla/third_party/tsl/tsl/platform/cloud/compute_engine_metadata_client.h third_party/tflite/src/third_party/xla/third_party/tsl/tsl/platform/cloud/curl_http_request.cc @@ -13865,11 +14145,14 @@ third_party/tflite/src/third_party/xla/third_party/tsl/tsl/platform/status.cc third_party/tflite/src/third_party/xla/third_party/tsl/tsl/platform/windows/env.cc third_party/tflite/src/third_party/xla/third_party/tsl/tsl/platform/windows/stacktrace.cc third_party/tflite/src/third_party/xla/third_party/tsl/tsl/platform/windows/stacktrace_handler.cc -third_party/tflite/src/third_party/xla/xla/mlir_hlo/mhlo/transforms/chlo_legalize_to_hlo/chlo_legalize_to_hlo.cc +third_party/tflite/src/third_party/xla/xla/pjrt/c/pjrt_c_api.h third_party/tflite/src/third_party/xla/xla/pjrt/pjrt_api.cc third_party/tflite/src/third_party/xla/xla/service/gpu/fusions/transpose.h +third_party/tflite/src/third_party/xla/xla/service/gpu/fusions/transpose_mlir.h third_party/tflite/src/third_party/xla/xla/service/hlo_graph_dumper.cc third_party/tflite/src/third_party/xla/xla/service/hlo_verifier.cc +third_party/tflite/src/third_party/xla/xla/tsl/distributed_runtime/coordination/coordination_service_error_util.h +third_party/tflite/src/third_party/xla/xla/tsl/distributed_runtime/rpc/grpc_util.h third_party/tflite_support/src/tensorflow_lite_support/c/task/processor/category.h third_party/updater/chrome_mac_universal/3pp/fetch.py third_party/updater/chrome_mac_universal_prod/3pp/fetch.py @@ -13879,39 +14162,34 @@ third_party/updater/chromium_mac_amd64/3pp/fetch.py third_party/updater/chromium_mac_arm64/3pp/fetch.py third_party/updater/chromium_win_x86/3pp/fetch.py third_party/updater/chromium_win_x86_64/3pp/fetch.py -third_party/vulkan-deps/glslang/src/glslang/HLSL/hlslParseHelper.cpp -third_party/vulkan-deps/spirv-cross/src/spirv_hlsl.cpp -third_party/vulkan-deps/spirv-headers/src/include/spirv/spir-v.xml -third_party/vulkan-deps/spirv-tools/src/PRESUBMIT.py -third_party/vulkan-deps/spirv-tools/src/tools/sva/package.json third_party/vulkan-deps/update-commit-message.py -third_party/vulkan-deps/vulkan-loader/src/loader/allocation.c -third_party/vulkan-deps/vulkan-loader/src/loader/allocation.h -third_party/vulkan-deps/vulkan-loader/src/loader/generated/vk_object_types.h -third_party/vulkan-deps/vulkan-loader/src/loader/loader.h -third_party/vulkan-deps/vulkan-loader/src/loader/loader_common.h -third_party/vulkan-deps/vulkan-loader/src/loader/loader_environment.c -third_party/vulkan-deps/vulkan-loader/src/loader/loader_environment.h -third_party/vulkan-deps/vulkan-loader/src/loader/loader_windows.c -third_party/vulkan-deps/vulkan-loader/src/loader/loader_windows.h -third_party/vulkan-deps/vulkan-loader/src/loader/log.c -third_party/vulkan-deps/vulkan-loader/src/loader/log.h -third_party/vulkan-deps/vulkan-loader/src/loader/stack_allocation.h -third_party/vulkan-deps/vulkan-loader/src/loader/wsi.c -third_party/vulkan-deps/vulkan-loader/src/scripts/gn/gn.py -third_party/vulkan-deps/vulkan-loader/src/scripts/helper_file_generator.py -third_party/vulkan-deps/vulkan-tools/src/cube/cube.c -third_party/vulkan-deps/vulkan-tools/src/cube/gettime.h -third_party/vulkan-deps/vulkan-tools/src/icd/generated/vk_typemap_helper.h -third_party/vulkan-deps/vulkan-tools/src/scripts/android.py -third_party/vulkan-deps/vulkan-tools/src/scripts/gn/gn.py -third_party/vulkan-deps/vulkan-tools/src/scripts/mock_icd_generator.py -third_party/vulkan-deps/vulkan-tools/src/scripts/vulkan_tools_helper_file_generator.py -third_party/vulkan-deps/vulkan-tools/src/windows-runtime-installer/VulkanRT-License.txt -third_party/vulkan-deps/vulkan-utility-libraries/src/scripts/gn/gn.py -third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/xxhash.h -third_party/vulkan-deps/vulkan-validation-layers/src/scripts/android.py -third_party/vulkan-deps/vulkan-validation-layers/src/scripts/gn/gn.py +third_party/vulkan-loader/src/loader/allocation.c +third_party/vulkan-loader/src/loader/allocation.h +third_party/vulkan-loader/src/loader/generated/vk_object_types.h +third_party/vulkan-loader/src/loader/loader.h +third_party/vulkan-loader/src/loader/loader_common.h +third_party/vulkan-loader/src/loader/loader_environment.c +third_party/vulkan-loader/src/loader/loader_environment.h +third_party/vulkan-loader/src/loader/loader_windows.c +third_party/vulkan-loader/src/loader/loader_windows.h +third_party/vulkan-loader/src/loader/log.c +third_party/vulkan-loader/src/loader/log.h +third_party/vulkan-loader/src/loader/stack_allocation.h +third_party/vulkan-loader/src/loader/wsi.c +third_party/vulkan-loader/src/scripts/gn/gn.py +third_party/vulkan-loader/src/scripts/helper_file_generator.py +third_party/vulkan-tools/src/cube/cube.c +third_party/vulkan-tools/src/cube/gettime.h +third_party/vulkan-tools/src/icd/generated/vk_typemap_helper.h +third_party/vulkan-tools/src/scripts/android.py +third_party/vulkan-tools/src/scripts/gn/gn.py +third_party/vulkan-tools/src/scripts/mock_icd_generator.py +third_party/vulkan-tools/src/scripts/vulkan_tools_helper_file_generator.py +third_party/vulkan-tools/src/windows-runtime-installer/VulkanRT-License.txt +third_party/vulkan-utility-libraries/src/scripts/gn/gn.py +third_party/vulkan-validation-layers/src/layers/external/xxhash.h +third_party/vulkan-validation-layers/src/scripts/android.py +third_party/vulkan-validation-layers/src/scripts/gn/gn.py third_party/wayland-protocols/gtk/.gitlab-ci/pages/fonts.css third_party/wayland-protocols/gtk/.gitlab-ci/pages/index.html third_party/wayland-protocols/gtk/demos/gtk-demo/links.c @@ -14157,6 +14435,7 @@ third_party/webgl/src/other/get.webgl.org/troubleshooting/DoNotCopyOrLinkThisFil third_party/webgl/src/other/get.webgl.org/webgl2/troubleshooting/DoNotCopyOrLinkThisFileElseYouWillNotGetAutoUpdatedHelpForYourUsers.js third_party/webgl/src/other/test-runner/android/PortForwarderService/proguard-project.txt third_party/webgl/src/other/test-runner/package.json +third_party/webgl/src/resources/html5lib-1.1/src/html5lib/tests/test_parser2.py third_party/webgl/src/resources/html5lib/src/html5lib/serializer/htmlserializer.py third_party/webgl/src/resources/html5lib/src/html5lib/tests/test_parser2.py third_party/webgl/src/sdk/demos/google/particles/index.html @@ -14262,7 +14541,6 @@ third_party/webgpu-cts/src/src/webgpu/shader/execution/shader_io/fragment_builti third_party/webgpu-cts/src/standalone/index.html third_party/webrtc/BUILD.gn third_party/webrtc/PRESUBMIT.py -third_party/webrtc/api/audio/audio_frame.cc third_party/webrtc/api/audio_codecs/opus/audio_encoder_opus_config.h third_party/webrtc/api/location.h third_party/webrtc/api/scoped_refptr.h @@ -14283,7 +14561,6 @@ third_party/webrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor.c third_party/webrtc/common_audio/third_party/spl_sqrt_floor/spl_sqrt_floor_mips.c third_party/webrtc/examples/peerconnection/client/defaults.cc third_party/webrtc/examples/stunprober/main.cc -third_party/webrtc/examples/unityplugin/simple_peer_connection.cc third_party/webrtc/infra/specs/gn_isolate_map.pyl third_party/webrtc/media/base/video_common.cc third_party/webrtc/media/base/video_common.h @@ -14358,6 +14635,7 @@ third_party/webrtc/rtc_base/network.cc third_party/webrtc/rtc_base/network.h third_party/webrtc/rtc_base/network_unittest.cc third_party/webrtc/rtc_base/numerics/safe_minmax.h +third_party/webrtc/rtc_base/openssl_adapter.cc third_party/webrtc/rtc_base/physical_socket_server.cc third_party/webrtc/rtc_base/physical_socket_server_unittest.cc third_party/webrtc/rtc_base/platform_thread_types.cc @@ -14368,7 +14646,6 @@ third_party/webrtc/rtc_base/system/arch.h third_party/webrtc/rtc_base/thread_annotations.h third_party/webrtc/rtc_base/thread_unittest.cc third_party/webrtc/rtc_base/timestamp_aligner_unittest.cc -third_party/webrtc/rtc_base/trace_event.h third_party/webrtc/rtc_base/win/scoped_com_initializer.h third_party/webrtc/rtc_base/win/windows_version.cc third_party/webrtc/rtc_base/win32_unittest.cc @@ -14378,7 +14655,6 @@ third_party/webrtc/rtc_tools/unpack_aecdump/unpack.cc third_party/webrtc/sdk/android/native_api/jni/class_loader.cc third_party/webrtc/sdk/android/native_api/jni/class_loader.h third_party/webrtc/sdk/android/native_api/jni/java_types.h -third_party/webrtc/sdk/android/native_api/jni/jni_int_wrapper.h third_party/webrtc/sdk/android/native_api/jni/scoped_java_ref.h third_party/webrtc/sdk/android/native_unittests/audio_device/audio_device_unittest.cc third_party/webrtc/sdk/android/src/jni/android_network_monitor.cc @@ -14495,26 +14771,22 @@ third_party/wpt_tools/wpt/tools/third_party_modified/mozlog/setup.py third_party/wpt_tools/wpt/tools/webdriver/webdriver/client.py third_party/wpt_tools/wpt/tools/wpt/android.py third_party/wpt_tools/wpt/tools/wpt/browser.py -third_party/wpt_tools/wpt/tools/wpt/run.py third_party/wpt_tools/wpt/tools/wptrunner/requirements.txt third_party/wpt_tools/wpt/tools/wptrunner/setup.py -third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/browsers/android_weblayer.py third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/browsers/android_webview.py third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/browsers/base.py third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/browsers/chrome.py -third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/browsers/content_shell.py third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/browsers/firefox.py -third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/executors/executorcontentshell.py third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/executors/executormarionette.py third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/executors/executorwebdriver.py third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/executors/test-wait.js third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/formatters/chromium.py third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/testharnessreport-content-shell.js third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/wpttest.py -third_party/wpt_tools/wpt/websockets/handlers/send-backpressure_wsh.py third_party/wuffs/BUILD.gn third_party/wuffs/src/release/c/wuffs-v0.3.c third_party/xdg-utils/scripts/desc/xdg-settings.xml +third_party/xnnpack/generate_build_gn.py third_party/xnnpack/src/CMakeLists.txt third_party/zlib/deflate.c third_party/zlib/google/compression_utils_portable.cc @@ -14607,9 +14879,12 @@ tools/chrome_extensions/open_my_editor/ext/cr-content.js tools/chrome_extensions/open_my_editor/ext/cs-content.js tools/chrome_extensions/open_my_editor/ext/manifest.json tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp +tools/clang/iterator_checker/tests/PRESUBMIT.py tools/clang/plugins/ChromeClassTester.cpp tools/clang/plugins/tests/bad_raw_ptr_cast_in_the_wild.cpp tools/clang/plugins/tests/raw_ptr_to_stack_allocated.cpp +tools/clang/raw_ptr_plugin/tests/bad_raw_ptr_cast_in_the_wild.cpp +tools/clang/raw_ptr_plugin/tests/raw_ptr_to_stack_allocated.cpp tools/clang/rewrite_raw_ptr_fields/RewriteRawPtrFields.cpp tools/clang/rewrite_raw_ptr_fields/manual-fields-to-ignore.txt tools/clang/rewrite_raw_ptr_fields/tests/gen-in-out-arg-test.cc @@ -14626,12 +14901,14 @@ tools/code_coverage/coverage.py tools/code_coverage/js_source_maps/create_js_source_maps/PRESUBMIT.py tools/cr/cr/base/android.py tools/cr/main.py +tools/crates/create_update_cl.py tools/crates/gnrt/lib/test_metadata.json tools/crbug/crbug.js tools/crbug/pinpoint.js tools/crbug/user-activity.js tools/cygprofile/PRESUBMIT.py tools/cygprofile/orderfile_generator_backend.py +tools/cygprofile/profile_android_startup.py tools/determinism/compare_build_artifacts.py tools/disable_tests/PRESUBMIT.py tools/disable_tests/disable.py @@ -14742,6 +15019,8 @@ tools/metrics/histograms/metadata/ash/enums.xml tools/metrics/histograms/metadata/ash/histograms.xml tools/metrics/histograms/metadata/ash_clipboard/enums.xml tools/metrics/histograms/metadata/ash_clipboard/histograms.xml +tools/metrics/histograms/metadata/ash_growth/enums.xml +tools/metrics/histograms/metadata/ash_growth/histograms.xml tools/metrics/histograms/metadata/ash_user_education/enums.xml tools/metrics/histograms/metadata/ash_user_education/histograms.xml tools/metrics/histograms/metadata/assistant/histograms.xml @@ -14810,6 +15089,8 @@ tools/metrics/histograms/metadata/event/enums.xml tools/metrics/histograms/metadata/event/histograms.xml tools/metrics/histograms/metadata/extensions/enums.xml tools/metrics/histograms/metadata/extensions/histograms.xml +tools/metrics/histograms/metadata/facilitated_payments/enums.xml +tools/metrics/histograms/metadata/facilitated_payments/histograms.xml tools/metrics/histograms/metadata/families/enums.xml tools/metrics/histograms/metadata/families/histograms.xml tools/metrics/histograms/metadata/fastpair/enums.xml @@ -14817,7 +15098,9 @@ tools/metrics/histograms/metadata/fastpair/histograms.xml tools/metrics/histograms/metadata/feature_engagement/histograms.xml tools/metrics/histograms/metadata/file/enums.xml tools/metrics/histograms/metadata/file/histograms.xml +tools/metrics/histograms/metadata/fingerprint/enums.xml tools/metrics/histograms/metadata/fingerprint/histograms.xml +tools/metrics/histograms/metadata/fingerprinting_protection/histograms.xml tools/metrics/histograms/metadata/game_mode/histograms.xml tools/metrics/histograms/metadata/gcm/histograms.xml tools/metrics/histograms/metadata/geolocation/enums.xml @@ -14847,9 +15130,14 @@ tools/metrics/histograms/metadata/kerberos/histograms.xml tools/metrics/histograms/metadata/kiosk/histograms.xml tools/metrics/histograms/metadata/language/enums.xml tools/metrics/histograms/metadata/language/histograms.xml +tools/metrics/histograms/metadata/lens/enums.xml +tools/metrics/histograms/metadata/lens/histograms.xml tools/metrics/histograms/metadata/leveldb_proto/histograms.xml tools/metrics/histograms/metadata/local/histograms.xml tools/metrics/histograms/metadata/login/histograms.xml +tools/metrics/histograms/metadata/mac/enums.xml +tools/metrics/histograms/metadata/mac/histograms.xml +tools/metrics/histograms/metadata/magic_stack/enums.xml tools/metrics/histograms/metadata/magic_stack/histograms.xml tools/metrics/histograms/metadata/media/enums.xml tools/metrics/histograms/metadata/media/histograms.xml @@ -14901,6 +15189,8 @@ tools/metrics/histograms/metadata/phonehub/histograms.xml tools/metrics/histograms/metadata/platform/enums.xml tools/metrics/histograms/metadata/platform/histograms.xml tools/metrics/histograms/metadata/plugin_vm/histograms.xml +tools/metrics/histograms/metadata/plus_addresses/enums.xml +tools/metrics/histograms/metadata/plus_addresses/histograms.xml tools/metrics/histograms/metadata/power/histograms.xml tools/metrics/histograms/metadata/prefetch/histograms.xml tools/metrics/histograms/metadata/preloading/histograms.xml @@ -14926,6 +15216,7 @@ tools/metrics/histograms/metadata/sb_client/enums.xml tools/metrics/histograms/metadata/sb_client/histograms.xml tools/metrics/histograms/metadata/scanning/enums.xml tools/metrics/histograms/metadata/scanning/histograms.xml +tools/metrics/histograms/metadata/scheduler/enums.xml tools/metrics/histograms/metadata/scheduler/histograms.xml tools/metrics/histograms/metadata/search/histograms.xml tools/metrics/histograms/metadata/security/enums.xml @@ -14937,7 +15228,10 @@ tools/metrics/histograms/metadata/session/enums.xml tools/metrics/histograms/metadata/session/histograms.xml tools/metrics/histograms/metadata/settings/enums.xml tools/metrics/histograms/metadata/settings/histograms.xml +tools/metrics/histograms/metadata/sharing/enums.xml tools/metrics/histograms/metadata/sharing/histograms.xml +tools/metrics/histograms/metadata/shortcuts/enums.xml +tools/metrics/histograms/metadata/shortcuts/histograms.xml tools/metrics/histograms/metadata/side_search/histograms.xml tools/metrics/histograms/metadata/signin/enums.xml tools/metrics/histograms/metadata/signin/histograms.xml @@ -14965,6 +15259,7 @@ tools/metrics/histograms/metadata/ukm/histograms.xml tools/metrics/histograms/metadata/uma/enums.xml tools/metrics/histograms/metadata/uma/histograms.xml tools/metrics/histograms/metadata/update_engine/histograms.xml +tools/metrics/histograms/metadata/user_education/histograms.xml tools/metrics/histograms/metadata/v8/enums.xml tools/metrics/histograms/metadata/v8/histograms.xml tools/metrics/histograms/metadata/variations/enums.xml @@ -14983,6 +15278,7 @@ tools/metrics/histograms/metadata/webapps/enums.xml tools/metrics/histograms/metadata/webapps/histograms.xml tools/metrics/histograms/metadata/webauthn/enums.xml tools/metrics/histograms/metadata/webauthn/histograms.xml +tools/metrics/histograms/metadata/webnn/histograms.xml tools/metrics/histograms/metadata/windows/enums.xml tools/metrics/histograms/metadata/windows/histograms.xml tools/metrics/histograms/metadata/xr/enums.xml @@ -14996,6 +15292,8 @@ tools/metrics/histograms/test_data/components/histograms.xml tools/metrics/histograms/test_data/histograms.xml tools/metrics/histograms/test_data/tokens/histograms.xml tools/metrics/histograms/test_data/ukm.xml +tools/metrics/histograms/visited_url_ranking/enums.xml +tools/metrics/histograms/visited_url_ranking/histograms.xml tools/metrics/md2xml.py tools/metrics/structured/PRESUBMIT.py tools/metrics/structured/sync/model.py @@ -15073,19 +15371,21 @@ tools/perf/core/services/buildbucket_service.py tools/perf/core/services/dashboard_service.py tools/perf/core/services/pinpoint_service.py tools/perf/core/services/request.py +tools/perf/core/shard_maps/timing_data/android-pixel-fold-perf_timing.json +tools/perf/core/shard_maps/timing_data/android-pixel-tangor-perf_timing.json tools/perf/core/shard_maps/timing_data/android-pixel2-perf_timing.json tools/perf/core/shard_maps/timing_data/android-pixel2_webview-perf_timing.json tools/perf/core/shard_maps/timing_data/android-pixel4-perf_timing.json tools/perf/core/shard_maps/timing_data/android-pixel4_webview-perf_timing.json tools/perf/core/shard_maps/timing_data/android-pixel6-perf_timing.json tools/perf/core/shard_maps/timing_data/android-pixel6-pro-perf_timing.json -tools/perf/core/shard_maps/timing_data/lacros-x86-perf_timing.json tools/perf/core/shard_maps/timing_data/linux-perf_timing.json tools/perf/core/shard_maps/timing_data/mac-laptop_high_end-perf_timing.json tools/perf/core/shard_maps/timing_data/mac-laptop_low_end-perf_timing.json tools/perf/core/shard_maps/timing_data/mac-m1_mini_2020-perf_timing.json tools/perf/core/shard_maps/timing_data/win-10-perf_timing.json tools/perf/core/shard_maps/timing_data/win-10_laptop_low_end-perf_timing.json +tools/perf/core/shard_maps/timing_data/win-11-perf_timing.json tools/perf/core/test_data/benchmarks_to_shard.json tools/perf/core/test_data/test_timing_data.json tools/perf/core/test_data/test_timing_data_1_build.json @@ -15266,6 +15566,7 @@ tools/run-swarmed.py tools/rust/build_bindgen.py tools/rust/build_rust.py tools/sample_clang_tidy_results.py +tools/search_engine_choice/download_search_engine_icons.py tools/search_engine_choice/generate_search_engine_icons.py tools/search_engine_choice/generate_search_engine_icons_config.json tools/site_compare/commands/measure.py @@ -15299,6 +15600,8 @@ tools/typescript/definitions/system_display.d.ts tools/usb_gadget/gadget.py tools/usb_gadget/msos20_descriptors.py tools/utr/cipd.py +tools/utr/output_adapter_test.py +tools/utr/recipe.py tools/variations/bisect_variations.py tools/variations/fieldtrial_util_unittest.py tools/visual_debugger/app.html @@ -15321,8 +15624,6 @@ ui/accessibility/ax_offscreen_result.h ui/accessibility/ax_position.h ui/accessibility/ax_range.h ui/accessibility/ax_role_properties.cc -ui/accessibility/extensions/caretbrowsing/caretbrowsing.js -ui/accessibility/extensions/caretbrowsing/traverse_util.js ui/accessibility/extensions/chromevoxclassic/chromevox/background/background.js ui/accessibility/extensions/chromevoxclassic/chromevox/background/prefs.js ui/accessibility/extensions/chromevoxclassic/chromevox/injected/event_watcher.js @@ -15343,7 +15644,6 @@ ui/accessibility/extensions/chromevoxclassic/manifest.json.jinja2 ui/accessibility/extensions/color_contrast_companion/help.html ui/accessibility/extensions/strings/accessibility_extensions_strings.grd ui/accessibility/extensions/tools/webstore_extension_util.py -ui/accessibility/platform/ax_platform_node_base.cc ui/accessibility/platform/ax_platform_node_base_unittest.cc ui/accessibility/platform/ax_platform_node_delegate_utils_win.cc ui/accessibility/platform/ax_platform_node_textrangeprovider_win.cc @@ -15390,8 +15690,9 @@ ui/color/color_provider_key.h ui/display/display_switches.cc ui/display/display_transform.cc ui/display/mac/display_link_mac.cc -ui/display/win/test/virtual_display_win_util.cc +ui/display/win/test/virtual_display_util_win.cc ui/events/android/motion_event_android_unittest.cc +ui/events/ash/keyboard_capability_unittest.cc ui/events/blink/blink_event_util.cc ui/events/devices/input_device_observer_win.cc ui/events/gesture_detection/gesture_provider_unittest.cc @@ -15412,6 +15713,7 @@ ui/file_manager/base/gn/PRESUBMIT.py ui/file_manager/file_manager/background/js/volume_info.ts ui/file_manager/file_manager/background/js/volume_manager_unittest.ts ui/file_manager/file_manager/common/js/files_app_entry_types.ts +ui/file_manager/file_manager/common/js/filtered_volume_manager.ts ui/file_manager/file_manager/common/js/trash.ts ui/file_manager/file_manager/foreground/elements/icons.html ui/file_manager/file_manager/foreground/js/file_manager_commands.ts @@ -15442,8 +15744,8 @@ ui/gfx/text_elider_unittest.cc ui/gfx/win/physical_size.cc ui/gfx/win/singleton_hwnd_hot_key_observer.cc ui/gl/android/scoped_a_native_window.cc +ui/gl/dcomp_presenter_unittest.cc ui/gl/direct_composition_support.cc -ui/gl/direct_composition_surface_win_unittest.cc ui/gl/gl_display.cc ui/gl/gl_surface_egl.cc ui/gl/gl_surface_presentation_helper.cc @@ -15458,6 +15760,7 @@ ui/ozone/platform/wayland/host/shell_popup_wrapper.cc ui/ozone/platform/wayland/host/wayland_clipboard.cc ui/ozone/platform/wayland/host/wayland_exchange_data_provider_unittest.cc ui/ozone/platform/wayland/host/wayland_output.h +ui/ozone/platform/wayland/host/wayland_window.cc ui/ozone/platform/x11/test/os_exchange_data_provider_x11_unittest.cc ui/ozone/platform/x11/x11_window.cc ui/resources/PRESUBMIT.py @@ -15471,8 +15774,11 @@ ui/strings/ui_strings.grd ui/views/PRESUBMIT.py ui/views/accessibility/view_accessibility.cc ui/views/accessibility/view_ax_platform_node_delegate_win_unittest.cc +ui/views/animation/animation_builder.cc +ui/views/animation/animation_builder.h ui/views/animation/ink_drop_ripple.h ui/views/bubble/bubble_dialog_delegate_view.cc +ui/views/controls/table/table_view_unittest.cc ui/views/controls/textfield/textfield_model_unittest.cc ui/views/examples/webview_example.cc ui/views/focus/focus_manager_unittest.cc @@ -15546,7 +15852,6 @@ v8/src/deoptimizer/deoptimizer.cc v8/src/diagnostics/unwinding-info-win64.cc v8/src/diagnostics/unwinding-info-win64.h v8/src/handles/handles.h -v8/src/heap/base/asm/x64/push_registers_asm.cc v8/src/heap/code-range.cc v8/src/init/v8.cc v8/src/inspector/v8-console.h @@ -15558,7 +15863,6 @@ v8/src/libsampler/sampler.cc v8/src/objects/js-array-buffer.h v8/src/objects/js-number-format.cc v8/src/objects/map.h -v8/src/objects/maybe-object.h v8/src/objects/objects.h v8/src/objects/ordered-hash-table.h v8/src/objects/string-inl.h @@ -15594,6 +15898,7 @@ v8/tools/callstats.py v8/tools/clusterfuzz/js_fuzzer/package.json v8/tools/cppgc/gen_cmake.py v8/tools/dev/gm.py +v8/tools/dev/setup-reclient.py v8/tools/grokdump.py v8/tools/heap-snapshot-processor.py v8/tools/heap-stats/index.html -- GitLab From 6fd4e2ab931e56c9e2d9f1fe202a1d34a88161d1 Mon Sep 17 00:00:00 2001 From: althafvly Date: Thu, 8 Aug 2024 13:02:33 +0530 Subject: [PATCH 2/4] add build patch option --- build.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index b2c17156..8276cccf 100755 --- a/build.sh +++ b/build.sh @@ -13,6 +13,7 @@ chromium_url=https://github.com/chromium/chromium.git clean=0 gsync=0 history=1 +patchonly=0 arch="" usage() { @@ -25,6 +26,7 @@ usage() { echo " -u Show this message" echo " -s Sync source" echo " -h Sync without history" + echo " -p Apply patches - Only after synced" echo exit 1 } @@ -214,20 +216,21 @@ init_repo(){ fi } -while getopts ":a:cur:sh" opt; do +while getopts ":a:cur:shp" opt; do case $opt in a) arch="$OPTARG" ;; c) clean=1 ;; u) usage ;; s) gsync=1 ;; h) history=0 ;; + p) patchonly=1 ;; :) echo "Option -$OPTARG requires an argument" echo usage ;; \?) - echo "Invalid option:-$OPTARG" + echo "Invalid option: -$OPTARG" echo usage ;; @@ -272,6 +275,12 @@ if [ $gsync -eq 1 ]; then init_repo fi sync +elif [ $patchonly -eq 1 ]; then + cd $chromium_dir/src + git fetch origin refs/tags/$chromium_version + git checkout main + git reset --hard FETCH_HEAD + patch fi cd $chromium_dir/src -- GitLab From 678a3f47ebe5409afc6bdfaf2c6da351d953028f Mon Sep 17 00:00:00 2001 From: althafvly Date: Thu, 8 Aug 2024 13:02:43 +0530 Subject: [PATCH 3/4] Bump to 127.0.6533.103 --- Dockerfile | 2 +- build.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index baffbcfc..754d8a1a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:20.04 ENV CHROMIUM_DIR "/srv/chromium" -ENV CHROMIUM_VER "127.0.6533.94" +ENV CHROMIUM_VER "127.0.6533.103" RUN dpkg --add-architecture i386 diff --git a/build.sh b/build.sh index 8276cccf..830d8f71 100755 --- a/build.sh +++ b/build.sh @@ -183,9 +183,9 @@ sync() { fi fi if [ $history -eq 1 ]; then - gclient sync -D --nohooks -R + gclient sync -D --nohooks -R --force else - gclient sync --no-history -D --nohooks -R + gclient sync --no-history -D --nohooks -R --force fi gclient runhooks patch -- GitLab From ffe4edd6d3e12136321d500eae9e51e037ee2f60 Mon Sep 17 00:00:00 2001 From: althafvly Date: Fri, 9 Aug 2024 12:33:11 +0530 Subject: [PATCH 4/4] Browser: Build legacy targets --- Dockerfile | 3 +++ build.sh | 14 +++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 754d8a1a..4aeec0c7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,9 @@ RUN apt-get update &&\ apt-get -f -y install sudo lsb-release cl-base64 bash wget apt-utils ccache jq python3 \ python-is-python3 sed tzdata build-essential lib32gcc-9-dev g++-multilib dos2unix wiggle git curl +RUN apt-get update &&\ + apt-get -y install p7zip-full + RUN mkdir ${CHROMIUM_DIR} RUN curl -s https://raw.githubusercontent.com/chromium/chromium/${CHROMIUM_VER}/build/install-build-deps.py \ diff --git a/build.sh b/build.sh index 830d8f71..4a8f8c36 100755 --- a/build.sh +++ b/build.sh @@ -33,7 +33,8 @@ usage() { build() { echo ">> [$(date)] Head commit: $(git show -s --format=%s)" - apks="TrichromeChrome TrichromeLibrary TrichromeWebView TrichromeChrome6432 \ + apks="ChromePublic MonochromePublic SystemWebView TrichromeChrome \ + TrichromeLibrary TrichromeWebView TrichromeChrome6432 \ TrichromeLibrary6432 TrichromeWebView6432" build_args="$(cat "${root_dir}"/build/browser.gn_args) target_cpu=\"${1}\" " @@ -67,6 +68,7 @@ build() { gn gen "out/$1" --args="$build_args" if [ $1 '==' "x64" ] || [ $1 '==' "arm64" ]; then build_targets="trichrome_webview_64_32_apk trichrome_chrome_64_32_apk trichrome_library_64_32_apk" + build_targets="$build_targets chrome_public_apk system_webview_apk monochrome_public_apk" else build_targets="trichrome_webview_apk trichrome_chrome_apk trichrome_library_apk" fi @@ -93,12 +95,10 @@ build() { gn gen "out/$1" --args="$build_args" ninja -C out/$1 $build_targets - for apk in $apks; do - if [ -f "out/${1}/apks/$apk.apk" ]; then - echo ">> [$(date)] Moving debug $apk for ${apk_arch} to output folder" - mv "out/${1}/apks/$apk.apk" "${root_dir}/apks/${apk_arch}/$(echo "$apk" | sed 's/[0-9]*//g')_debug.apk" - fi - done + # Create the 7z archive + echo ">> [$(date)] Creating archive with debug apks" + archive_name="${root_dir}/apks/${apk_arch}/browser_${apk_arch}_debug_apks.7z" + 7z a -t7z -mx=9 "$archive_name" "out/${1}/apks"/*.apk } setup_ccache() { -- GitLab