Browse Source

Patches for v104 (#2232)

Carl 2 years ago
parent
commit
dca45015a4
100 changed files with 1441 additions and 1352 deletions
  1. 1 1
      build/LASTCHANGE
  2. 1 1
      build/RELEASE
  3. 1 1
      build/RELEASE_COMMIT
  4. 1 0
      build/bromite_patches_list.txt
  5. 14 14
      build/patches/AImageReader-CFI-crash-mitigations.patch
  6. 10 10
      build/patches/Add-AllowUserCertificates-flag.patch
  7. 1 1
      build/patches/Add-DuckDuckGo-Lite-search-engine.patch
  8. 1 1
      build/patches/Add-English-only-search-engine.patch
  9. 3 3
      build/patches/Add-IsCleartextPermitted-flag.patch
  10. 13 13
      build/patches/Add-a-proxy-configuration-page.patch
  11. 37 77
      build/patches/Add-an-always-incognito-mode.patch
  12. 37 37
      build/patches/Add-bookmark-import-export-actions.patch
  13. 2 2
      build/patches/Add-custom-tab-intents-privacy-option.patch
  14. 6 6
      build/patches/Add-exit-menu-item.patch
  15. 8 8
      build/patches/Add-flag-for-omnibox-autocomplete-filtering.patch
  16. 3 3
      build/patches/Add-flag-for-save-data-header.patch
  17. 5 5
      build/patches/Add-flag-to-configure-maximum-connections-per-host.patch
  18. 5 5
      build/patches/Add-flag-to-control-video-playback-resume-feature.patch
  19. 4 4
      build/patches/Add-flag-to-disable-IPv6-probes.patch
  20. 3 3
      build/patches/Add-flag-to-disable-external-intent-requests.patch
  21. 6 6
      build/patches/Add-flag-to-disable-vibration.patch
  22. 3 3
      build/patches/Add-gn-flag-for-clangd-builds.patch
  23. 37 37
      build/patches/Add-lifetime-options-for-permissions.patch
  24. 17 17
      build/patches/Add-menu-item-to-bookmark-all-tabs.patch
  25. 6 6
      build/patches/Add-menu-item-to-view-source.patch
  26. 15 15
      build/patches/Add-option-to-force-tablet-UI.patch
  27. 3 3
      build/patches/Add-option-to-not-persist-tabs-across-sessions.patch
  28. 6 6
      build/patches/Add-option-to-use-home-page-as-NTP.patch
  29. 5 5
      build/patches/Add-site-engagement-flag.patch
  30. 1 1
      build/patches/Add-support-for-ISupportHelpAndFeedback.patch
  31. 3 3
      build/patches/Add-webGL-site-setting.patch
  32. 2 2
      build/patches/Add-webRTC-site-settings.patch
  33. 27 28
      build/patches/Allow-building-without-enable_reporting.patch
  34. 3 3
      build/patches/Allow-playing-audio-in-background.patch
  35. 1 1
      build/patches/Ask-user-before-closing-all-tabs.patch
  36. 1 1
      build/patches/AudioBuffer-AnalyserNode-fp-mitigations.patch
  37. 188 101
      build/patches/Automated-domain-substitution.patch
  38. 3 3
      build/patches/Block-gateway-attacks-via-websockets.patch
  39. 13 13
      build/patches/Block-qjz9zk-or-trk-requests.patch
  40. 33 31
      build/patches/Bromite-AdBlockUpdaterService.patch
  41. 284 278
      build/patches/Bromite-auto-updater.patch
  42. 1 1
      build/patches/Bromite-package-name.patch
  43. 1 1
      build/patches/Chromium-package-name.patch
  44. 14 14
      build/patches/Client-hints-overrides.patch
  45. 3 3
      build/patches/Content-settings-infrastructure.patch
  46. 17 25
      build/patches/Disable-AGSA-by-default.patch
  47. 4 4
      build/patches/Disable-Accessibility-service-by-default.patch
  48. 1 1
      build/patches/Disable-AsyncDNS-by-default.patch
  49. 1 1
      build/patches/Disable-DRM-media-origin-IDs-preprovisioning.patch
  50. 3 3
      build/patches/Disable-FLoC-and-privacy-sandbox.patch
  51. 46 0
      build/patches/Disable-PrivacyGuide.patch
  52. 9 9
      build/patches/Disable-TLS-resumption.patch
  53. 21 19
      build/patches/Disable-all-predictors-code.patch
  54. 2 2
      build/patches/Disable-all-promo-dialogs.patch
  55. 9 9
      build/patches/Disable-conversion-measurement-api.patch
  56. 1 1
      build/patches/Disable-crash-reporting.patch
  57. 1 1
      build/patches/Disable-feeds-support-by-default.patch
  58. 3 3
      build/patches/Disable-fetching-of-all-field-trials.patch
  59. 1 1
      build/patches/Disable-idle-detection.patch
  60. 1 1
      build/patches/Disable-lock-icon-in-address-bar-by-default.patch
  61. 5 5
      build/patches/Disable-minidump-upload-scheduling.patch
  62. 1 1
      build/patches/Disable-plugins-enumeration.patch
  63. 132 119
      build/patches/Disable-safe-browsing.patch
  64. 6 6
      build/patches/Disable-safety-check.patch
  65. 8 8
      build/patches/Disable-smart-selection-by-default.patch
  66. 2 2
      build/patches/Disable-some-signed-exchange-features.patch
  67. 10 10
      build/patches/Disable-text-fragments-by-default.patch
  68. 2 2
      build/patches/Disable-third-party-origin-trials.patch
  69. 5 26
      build/patches/Disable-various-metrics.patch
  70. 1 1
      build/patches/Do-not-build-API-keys-infobar.patch
  71. 12 12
      build/patches/Do-not-compile-QR-code-sharing.patch
  72. 1 1
      build/patches/Do-not-hide-component-extensions.patch
  73. 2 2
      build/patches/Do-not-link-with-libatomic.patch
  74. 1 1
      build/patches/DoH-improvements.patch
  75. 10 10
      build/patches/Enable-Certificate-Transparency.patch
  76. 1 1
      build/patches/Enable-SPPI-for-devices-with-enough-memory.patch
  77. 6 6
      build/patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch
  78. 1 1
      build/patches/Enable-darken-websites-checkbox-in-themes.patch
  79. 41 41
      build/patches/Enable-native-Android-autofill.patch
  80. 1 1
      build/patches/Enable-prefetch-privacy-changes-by-default.patch
  81. 25 25
      build/patches/Enable-share-intent.patch
  82. 1 1
      build/patches/Enable-user-agent-freeze-by-default.patch
  83. 37 37
      build/patches/Experimental-user-scripts-support.patch
  84. 6 6
      build/patches/History-number-of-days-privacy-setting.patch
  85. 6 6
      build/patches/Ignore-enterprise-policies-for-secure-DNS.patch
  86. 1 1
      build/patches/Increase-number-of-autocomplete-matches-to-10.patch
  87. 5 5
      build/patches/Inject-scripts-for-AMP-tracking-ads-and-video.patch
  88. 3 3
      build/patches/JIT-site-settings.patch
  89. 1 1
      build/patches/Keep-flag-to-allow-screenshots-in-Incognito-mode.patch
  90. 1 1
      build/patches/Logcat-crash-reports-UI.patch
  91. 9 9
      build/patches/Modify-default-preferences.patch
  92. 85 83
      build/patches/Move-navigation-bar-to-bottom.patch
  93. 1 1
      build/patches/Move-some-account-settings-back-to-privacy-settings.patch
  94. 18 18
      build/patches/Multiple-fingerprinting-mitigations.patch
  95. 1 1
      build/patches/Offer-builtin-autocomplete-for-chrome-flags.patch
  96. 1 1
      build/patches/Open-YouTube-links-in-Bromite.patch
  97. 5 5
      build/patches/OpenSearch-miscellaneous.patch
  98. 6 6
      build/patches/Partition-Blink-memory-cache.patch
  99. 23 23
      build/patches/Partition-DNS-requests-by-top-frame-NIK.patch
  100. 6 6
      build/patches/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch

+ 1 - 1
build/LASTCHANGE

@@ -1 +1 @@
-51ecbe42916b78159bd646807da8580213ae2316-
+ccd4eb2a7cf58a237c7fed668eecf35c32a1fd99-

+ 1 - 1
build/RELEASE

@@ -1 +1 @@
-103.0.5060.140
+104.0.5112.63

+ 1 - 1
build/RELEASE_COMMIT

@@ -1 +1 @@
-e4e07e53c4ea2e8c573d029470ecfc244647fa98
+7b45de2c5189db31432f355a266bd521b071d237

+ 1 - 0
build/bromite_patches_list.txt

@@ -195,4 +195,5 @@ Remove-preload-of-com.google.android.gms.fonts.patch
 Partition-Blink-memory-cache.patch
 Partition-Blink-memory-cache.patch
 Add-gn-flag-for-clangd-builds.patch
 Add-gn-flag-for-clangd-builds.patch
 Remove-navigator.connection-info.patch
 Remove-navigator.connection-info.patch
+Disable-PrivacyGuide.patch
 Automated-domain-substitution.patch
 Automated-domain-substitution.patch

+ 14 - 14
build/patches/AImageReader-CFI-crash-mitigations.patch

@@ -84,7 +84,7 @@ diff --git a/base/android/android_image_reader_compat.h b/base/android/android_i
 diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
 diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
 --- a/chrome/browser/flag-metadata.json
 --- a/chrome/browser/flag-metadata.json
 +++ b/chrome/browser/flag-metadata.json
 +++ b/chrome/browser/flag-metadata.json
-@@ -2247,9 +2247,9 @@
+@@ -2278,9 +2278,9 @@
      "expiry_milestone": 106
      "expiry_milestone": 106
    },
    },
    {
    {
@@ -126,9 +126,9 @@ 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
 diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc
 --- a/gpu/config/gpu_finch_features.cc
 --- a/gpu/config/gpu_finch_features.cc
 +++ b/gpu/config/gpu_finch_features.cc
 +++ b/gpu/config/gpu_finch_features.cc
-@@ -52,6 +52,11 @@ bool IsDeviceBlocked(const char* field, const std::string& block_list) {
- 
- }  // namespace
+@@ -63,6 +63,11 @@ const base::Feature kUseGles2ForOopR {
+ #endif
+ };
  
  
 +
 +
 +// Use android AImageReader when playing videos with MediaPlayer.
 +// Use android AImageReader when playing videos with MediaPlayer.
@@ -136,23 +136,23 @@ diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc
 +                                  base::FEATURE_ENABLED_BY_DEFAULT};
 +                                  base::FEATURE_ENABLED_BY_DEFAULT};
 +
 +
  #if BUILDFLAG(IS_ANDROID)
  #if BUILDFLAG(IS_ANDROID)
- // Used to limit GL version to 2.0 for skia raster on Android.
- const base::Feature kUseGles2ForOopR{"UseGles2ForOopR",
+ // Use android SurfaceControl API for managing display compositor's buffer queue
+ // and using overlays on Android. Also used by webview to disable surface
 diff --git a/gpu/config/gpu_finch_features.h b/gpu/config/gpu_finch_features.h
 diff --git a/gpu/config/gpu_finch_features.h b/gpu/config/gpu_finch_features.h
 --- a/gpu/config/gpu_finch_features.h
 --- a/gpu/config/gpu_finch_features.h
 +++ b/gpu/config/gpu_finch_features.h
 +++ b/gpu/config/gpu_finch_features.h
 @@ -17,6 +17,7 @@ namespace features {
 @@ -17,6 +17,7 @@ namespace features {
+ GPU_EXPORT extern const base::Feature kUseGles2ForOopR;
+ 
  // All features in alphabetical order. The features should be documented
  // All features in alphabetical order. The features should be documented
++GPU_EXPORT extern const base::Feature kAImageReaderMediaPlayer;
  // alongside the definition of their values in the .cc file.
  // alongside the definition of their values in the .cc file.
  #if BUILDFLAG(IS_ANDROID)
  #if BUILDFLAG(IS_ANDROID)
-+GPU_EXPORT extern const base::Feature kAImageReaderMediaPlayer;
- GPU_EXPORT extern const base::Feature kUseGles2ForOopR;
  GPU_EXPORT extern const base::Feature kAndroidSurfaceControl;
  GPU_EXPORT extern const base::Feature kAndroidSurfaceControl;
- GPU_EXPORT extern const base::Feature kWebViewSurfaceControl;
 diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc
 diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc
 --- a/gpu/config/gpu_util.cc
 --- a/gpu/config/gpu_util.cc
 +++ b/gpu/config/gpu_util.cc
 +++ b/gpu/config/gpu_util.cc
-@@ -120,6 +120,9 @@ GpuFeatureStatus GetAndroidSurfaceControlFeatureStatus(
+@@ -122,6 +122,9 @@ GpuFeatureStatus GetAndroidSurfaceControlFeatureStatus(
  #if !BUILDFLAG(IS_ANDROID)
  #if !BUILDFLAG(IS_ANDROID)
    return kGpuFeatureStatusDisabled;
    return kGpuFeatureStatusDisabled;
  #else
  #else
@@ -162,7 +162,7 @@ diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc
    if (!gpu_preferences.enable_android_surface_control)
    if (!gpu_preferences.enable_android_surface_control)
      return kGpuFeatureStatusDisabled;
      return kGpuFeatureStatusDisabled;
  
  
-@@ -343,6 +346,11 @@ void AdjustGpuFeatureStatusToWorkarounds(GpuFeatureInfo* gpu_feature_info) {
+@@ -345,6 +348,11 @@ void AdjustGpuFeatureStatusToWorkarounds(GpuFeatureInfo* gpu_feature_info) {
      gpu_feature_info->status_values[GPU_FEATURE_TYPE_CANVAS_OOP_RASTERIZATION] =
      gpu_feature_info->status_values[GPU_FEATURE_TYPE_CANVAS_OOP_RASTERIZATION] =
          kGpuFeatureStatusBlocklisted;
          kGpuFeatureStatusBlocklisted;
    }
    }
@@ -188,7 +188,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
 diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc
 --- a/gpu/ipc/service/gpu_init.cc
 --- a/gpu/ipc/service/gpu_init.cc
 +++ b/gpu/ipc/service/gpu_init.cc
 +++ b/gpu/ipc/service/gpu_init.cc
-@@ -588,6 +588,11 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line,
+@@ -589,6 +589,11 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line,
    }
    }
  #endif  // BUILDFLAG(IS_WIN)
  #endif  // BUILDFLAG(IS_WIN)
  
  
@@ -231,7 +231,7 @@ diff --git a/gpu/ipc/service/stream_texture_android.cc b/gpu/ipc/service/stream_
 diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
 diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
 --- a/media/base/media_switches.cc
 --- a/media/base/media_switches.cc
 +++ b/media/base/media_switches.cc
 +++ b/media/base/media_switches.cc
-@@ -730,6 +730,10 @@ const base::Feature kMediaDrmPreprovisioning{"MediaDrmPreprovisioning",
+@@ -746,6 +746,10 @@ const base::Feature kMediaDrmPreprovisioning{"MediaDrmPreprovisioning",
  // Note: Has no effect if kMediaDrmPreprovisioning feature is disabled.
  // Note: Has no effect if kMediaDrmPreprovisioning feature is disabled.
  const base::Feature kMediaDrmPreprovisioningAtStartup{
  const base::Feature kMediaDrmPreprovisioningAtStartup{
      "MediaDrmPreprovisioningAtStartup", base::FEATURE_ENABLED_BY_DEFAULT};
      "MediaDrmPreprovisioningAtStartup", base::FEATURE_ENABLED_BY_DEFAULT};
@@ -245,7 +245,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
 diff --git a/media/base/media_switches.h b/media/base/media_switches.h
 --- a/media/base/media_switches.h
 --- a/media/base/media_switches.h
 +++ b/media/base/media_switches.h
 +++ b/media/base/media_switches.h
-@@ -227,6 +227,7 @@ MEDIA_EXPORT extern const base::Feature kForceHardwareAudioDecoders;
+@@ -228,6 +228,7 @@ MEDIA_EXPORT extern const base::Feature kForceHardwareAudioDecoders;
  MEDIA_EXPORT extern const base::Feature kAllowNonSecureOverlays;
  MEDIA_EXPORT extern const base::Feature kAllowNonSecureOverlays;
  MEDIA_EXPORT extern const base::Feature kMediaControlsExpandGesture;
  MEDIA_EXPORT extern const base::Feature kMediaControlsExpandGesture;
  MEDIA_EXPORT extern const base::Feature kMediaDrmPersistentLicense;
  MEDIA_EXPORT extern const base::Feature kMediaDrmPersistentLicense;

+ 10 - 10
build/patches/Add-AllowUserCertificates-flag.patch

@@ -20,7 +20,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
 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
 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
-@@ -225,6 +225,7 @@ import org.chromium.content_public.browser.ScreenOrientationProvider;
+@@ -220,6 +220,7 @@ import org.chromium.content_public.browser.ScreenOrientationProvider;
  import org.chromium.content_public.browser.SelectionPopupController;
  import org.chromium.content_public.browser.SelectionPopupController;
  import org.chromium.content_public.browser.WebContents;
  import org.chromium.content_public.browser.WebContents;
  import org.chromium.content_public.common.ContentSwitches;
  import org.chromium.content_public.common.ContentSwitches;
@@ -28,7 +28,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv
  import org.chromium.printing.PrintManagerDelegateImpl;
  import org.chromium.printing.PrintManagerDelegateImpl;
  import org.chromium.printing.PrintingController;
  import org.chromium.printing.PrintingController;
  import org.chromium.printing.PrintingControllerImpl;
  import org.chromium.printing.PrintingControllerImpl;
-@@ -949,6 +950,8 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+@@ -932,6 +933,8 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
          UpdateMenuItemHelper.getInstance().onStart();
          UpdateMenuItemHelper.getInstance().onStart();
          ChromeActivitySessionTracker.getInstance().onStartWithNative();
          ChromeActivitySessionTracker.getInstance().onStartWithNative();
          ChromeCachedFlags.getInstance().cacheNativeFlags();
          ChromeCachedFlags.getInstance().cacheNativeFlags();
@@ -40,8 +40,8 @@ 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/flags/ChromeCachedFlags.java b/chrome/android/java/src/org/chromium/chrome/browser/app/flags/ChromeCachedFlags.java
 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
 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/flags/ChromeCachedFlags.java
 --- 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
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/flags/ChromeCachedFlags.java
-@@ -96,6 +96,7 @@ public class ChromeCachedFlags {
-                                 .GIVE_JAVA_UI_THREAD_DEFAULT_TASK_TRAITS_USER_BLOCKING_PRIORITY);
+@@ -94,6 +94,7 @@ public class ChromeCachedFlags {
+                 add(ChromeFeatureList.FEED_LOADING_PLACEHOLDER);
                  add(ChromeFeatureList.GRID_TAB_SWITCHER_FOR_TABLETS);
                  add(ChromeFeatureList.GRID_TAB_SWITCHER_FOR_TABLETS);
                  add(ChromeFeatureList.IMMERSIVE_UI_MODE);
                  add(ChromeFeatureList.IMMERSIVE_UI_MODE);
 +                add(ChromeFeatureList.ALLOW_USER_CERTIFICATES);
 +                add(ChromeFeatureList.ALLOW_USER_CERTIFICATES);
@@ -51,7 +51,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/flags/Chrom
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -3242,7 +3242,11 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -3381,7 +3381,11 @@ const FeatureEntry kFeatureEntries[] = {
      {"enable-container-queries", flag_descriptions::kCSSContainerQueriesName,
      {"enable-container-queries", flag_descriptions::kCSSContainerQueriesName,
       flag_descriptions::kCSSContainerQueriesDescription, kOsAll,
       flag_descriptions::kCSSContainerQueriesDescription, kOsAll,
       FEATURE_VALUE_TYPE(blink::features::kCSSContainerQueries)},
       FEATURE_VALUE_TYPE(blink::features::kCSSContainerQueries)},
@@ -82,7 +82,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -38,6 +38,9 @@ namespace flag_descriptions {
+@@ -39,6 +39,9 @@ namespace flag_descriptions {
  
  
  // Cross-platform -------------------------------------------------------------
  // Cross-platform -------------------------------------------------------------
  
  
@@ -95,7 +95,7 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
 diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
 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
 --- a/chrome/browser/flags/android/chrome_feature_list.cc
 +++ b/chrome/browser/flags/android/chrome_feature_list.cc
 +++ b/chrome/browser/flags/android/chrome_feature_list.cc
-@@ -144,6 +144,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
+@@ -145,6 +145,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
      &feed::kFeedLoadingPlaceholder,
      &feed::kFeedLoadingPlaceholder,
      &feed::kInterestFeedContentSuggestions,
      &feed::kInterestFeedContentSuggestions,
      &feed::kInterestFeedSpinnerAlwaysAnimate,
      &feed::kInterestFeedSpinnerAlwaysAnimate,
@@ -103,7 +103,7 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse
      &feed::kInterestFeedV1ClicksAndViewsConditionalUpload,
      &feed::kInterestFeedV1ClicksAndViewsConditionalUpload,
      &feed::kInterestFeedV2,
      &feed::kInterestFeedV2,
      &feed::kInterestFeedV2Autoplay,
      &feed::kInterestFeedV2Autoplay,
-@@ -408,6 +409,9 @@ const base::Feature kAdaptiveButtonInTopToolbarCustomizationV2{
+@@ -425,6 +426,9 @@ const base::Feature kAdaptiveButtonInTopToolbarCustomizationV2{
      "AdaptiveButtonInTopToolbarCustomizationV2",
      "AdaptiveButtonInTopToolbarCustomizationV2",
      base::FEATURE_DISABLED_BY_DEFAULT};
      base::FEATURE_DISABLED_BY_DEFAULT};
  
  
@@ -133,8 +133,8 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f
                      .put(ChromeFeatureList.CONDITIONAL_TAB_STRIP_ANDROID, false)
                      .put(ChromeFeatureList.CONDITIONAL_TAB_STRIP_ANDROID, false)
 +                    .put(ChromeFeatureList.ALLOW_USER_CERTIFICATES, false)
 +                    .put(ChromeFeatureList.ALLOW_USER_CERTIFICATES, false)
                      .put(ChromeFeatureList.LENS_CAMERA_ASSISTED_SEARCH, false)
                      .put(ChromeFeatureList.LENS_CAMERA_ASSISTED_SEARCH, false)
-                     .put(ChromeFeatureList.SERVICE_MANAGER_FOR_DOWNLOAD, true)
-                     .put(ChromeFeatureList.SERVICE_MANAGER_FOR_BACKGROUND_PREFETCH, true)
+                     .put(ChromeFeatureList.COMMAND_LINE_ON_NON_ROOTED, false)
+                     .put(ChromeFeatureList.DOWNLOADS_AUTO_RESUMPTION_NATIVE, true)
 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
 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
 --- 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
 +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java

+ 1 - 1
build/patches/Add-DuckDuckGo-Lite-search-engine.patch

@@ -37,9 +37,9 @@ diff --git a/components/search_engines/search_engine_type.h b/components/search_
    SEARCH_ENGINE_STARTER_PACK_HISTORY = 62,
    SEARCH_ENGINE_STARTER_PACK_HISTORY = 62,
    SEARCH_ENGINE_GOOGLE_EN = 63,
    SEARCH_ENGINE_GOOGLE_EN = 63,
 +  SEARCH_ENGINE_DUCKDUCKGOLIGHT = 64,
 +  SEARCH_ENGINE_DUCKDUCKGOLIGHT = 64,
+   SEARCH_ENGINE_STARTER_PACK_TABS = 63,
  
  
    SEARCH_ENGINE_MAX  // Bounding value needed for UMA histogram macro.
    SEARCH_ENGINE_MAX  // Bounding value needed for UMA histogram macro.
- };
 diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc
 diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc
 --- a/components/search_engines/template_url_prepopulate_data.cc
 --- a/components/search_engines/template_url_prepopulate_data.cc
 +++ b/components/search_engines/template_url_prepopulate_data.cc
 +++ b/components/search_engines/template_url_prepopulate_data.cc

+ 1 - 1
build/patches/Add-English-only-search-engine.patch

@@ -51,9 +51,9 @@ diff --git a/components/search_engines/search_engine_type.h b/components/search_
    SEARCH_ENGINE_STARTER_PACK_BOOKMARKS = 61,
    SEARCH_ENGINE_STARTER_PACK_BOOKMARKS = 61,
    SEARCH_ENGINE_STARTER_PACK_HISTORY = 62,
    SEARCH_ENGINE_STARTER_PACK_HISTORY = 62,
 +  SEARCH_ENGINE_GOOGLE_EN = 63,
 +  SEARCH_ENGINE_GOOGLE_EN = 63,
+   SEARCH_ENGINE_STARTER_PACK_TABS = 63,
  
  
    SEARCH_ENGINE_MAX  // Bounding value needed for UMA histogram macro.
    SEARCH_ENGINE_MAX  // Bounding value needed for UMA histogram macro.
- };
 diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc
 diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc
 --- a/components/search_engines/template_url_prepopulate_data.cc
 --- a/components/search_engines/template_url_prepopulate_data.cc
 +++ b/components/search_engines/template_url_prepopulate_data.cc
 +++ b/components/search_engines/template_url_prepopulate_data.cc

+ 3 - 3
build/patches/Add-IsCleartextPermitted-flag.patch

@@ -16,7 +16,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -8210,6 +8210,10 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -8466,6 +8466,10 @@ const FeatureEntry kFeatureEntries[] = {
       flag_descriptions::kRequestDesktopSiteExceptionsName,
       flag_descriptions::kRequestDesktopSiteExceptionsName,
       flag_descriptions::kRequestDesktopSiteExceptionsDescription, kOsAndroid,
       flag_descriptions::kRequestDesktopSiteExceptionsDescription, kOsAndroid,
       FEATURE_VALUE_TYPE(features::kRequestDesktopSiteExceptions)},
       FEATURE_VALUE_TYPE(features::kRequestDesktopSiteExceptions)},
@@ -30,7 +30,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -1510,6 +1510,10 @@ const char kHttpsOnlyModeDescription[] =
+@@ -1533,6 +1533,10 @@ const char kHttpsOnlyModeDescription[] =
      "Adds a setting under chrome://settings/security to opt-in to HTTPS-First "
      "Adds a setting under chrome://settings/security to opt-in to HTTPS-First "
      "Mode.";
      "Mode.";
  
  
@@ -44,7 +44,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -848,6 +848,9 @@ extern const char kHideShelfControlsInTabletModeDescription[];
+@@ -863,6 +863,9 @@ extern const char kHideShelfControlsInTabletModeDescription[];
  extern const char kHttpsOnlyModeName[];
  extern const char kHttpsOnlyModeName[];
  extern const char kHttpsOnlyModeDescription[];
  extern const char kHttpsOnlyModeDescription[];
  
  

+ 13 - 13
build/patches/Add-a-proxy-configuration-page.patch

@@ -83,7 +83,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
 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
 --- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
 +++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
 +++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
-@@ -277,6 +277,8 @@ ChromeAutocompleteProviderClient::GetBuiltinsToProvideAsUserTypes() {
+@@ -267,6 +267,8 @@ ChromeAutocompleteProviderClient::GetBuiltinsToProvideAsUserTypes() {
    builtins_to_provide.push_back(
    builtins_to_provide.push_back(
        base::ASCIIToUTF16(chrome::kChromeUISettingsURL));
        base::ASCIIToUTF16(chrome::kChromeUISettingsURL));
  #endif
  #endif
@@ -95,7 +95,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
 diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd
 --- a/chrome/browser/browser_resources.grd
 --- a/chrome/browser/browser_resources.grd
 +++ b/chrome/browser/browser_resources.grd
 +++ b/chrome/browser/browser_resources.grd
-@@ -79,6 +79,12 @@
+@@ -80,6 +80,12 @@
          <include name="IDR_CONTACT_CENTER_INSIGHTS_MANIFEST" file="resources\chromeos\contact_center_insights\manifest.json" type="BINDATA" />
          <include name="IDR_CONTACT_CENTER_INSIGHTS_MANIFEST" file="resources\chromeos\contact_center_insights\manifest.json" type="BINDATA" />
        </if>
        </if>
  
  
@@ -128,7 +128,7 @@ diff --git a/chrome/browser/net/proxy_service_factory.cc b/chrome/browser/net/pr
 +#include "components/prefs/pref_registry_simple.h"
 +#include "components/prefs/pref_registry_simple.h"
  
  
  #if BUILDFLAG(IS_CHROMEOS_ASH)
  #if BUILDFLAG(IS_CHROMEOS_ASH)
- #include "chromeos/network/proxy/proxy_config_service_impl.h"
+ #include "chromeos/ash/components/network/proxy/proxy_config_service_impl.h"
 @@ -72,7 +76,20 @@ ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
 @@ -72,7 +76,20 @@ ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
    return std::make_unique<chromeos::ProxyConfigServiceImpl>(
    return std::make_unique<chromeos::ProxyConfigServiceImpl>(
        profile_prefs, local_state_prefs, nullptr);
        profile_prefs, local_state_prefs, nullptr);
@@ -192,7 +192,7 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse
  #if BUILDFLAG(ENABLE_BACKGROUND_MODE)
  #if BUILDFLAG(ENABLE_BACKGROUND_MODE)
  #include "chrome/browser/background/background_mode_manager.h"
  #include "chrome/browser/background/background_mode_manager.h"
  #endif
  #endif
-@@ -983,6 +985,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
+@@ -1025,6 +1027,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
    chrome::enterprise_util::RegisterLocalStatePrefs(registry);
    chrome::enterprise_util::RegisterLocalStatePrefs(registry);
    component_updater::RegisterPrefs(registry);
    component_updater::RegisterPrefs(registry);
    embedder_support::OriginTrialPrefs::RegisterPrefs(registry);
    embedder_support::OriginTrialPrefs::RegisterPrefs(registry);
@@ -637,7 +637,7 @@ new file mode 100644
 diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
 diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
 --- a/chrome/browser/ui/BUILD.gn
 --- a/chrome/browser/ui/BUILD.gn
 +++ b/chrome/browser/ui/BUILD.gn
 +++ b/chrome/browser/ui/BUILD.gn
-@@ -286,6 +286,8 @@ static_library("ui") {
+@@ -288,6 +288,8 @@ static_library("ui") {
      "webui/metrics_handler.h",
      "webui/metrics_handler.h",
      "webui/net_export_ui.cc",
      "webui/net_export_ui.cc",
      "webui/net_export_ui.h",
      "webui/net_export_ui.h",
@@ -657,7 +657,7 @@ diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrom
  #include "chrome/browser/ui/webui/predictors/predictors_ui.h"
  #include "chrome/browser/ui/webui/predictors/predictors_ui.h"
  #include "chrome/browser/ui/webui/segmentation_internals/segmentation_internals_ui.h"
  #include "chrome/browser/ui/webui/segmentation_internals/segmentation_internals_ui.h"
  #include "chrome/browser/ui/webui/signin_internals_ui.h"
  #include "chrome/browser/ui/webui/signin_internals_ui.h"
-@@ -765,6 +766,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
+@@ -775,6 +776,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
      return &NewWebUI<MemoryInternalsUI>;
      return &NewWebUI<MemoryInternalsUI>;
    if (url.host_piece() == chrome::kChromeUINetExportHost)
    if (url.host_piece() == chrome::kChromeUINetExportHost)
      return &NewWebUI<NetExportUI>;
      return &NewWebUI<NetExportUI>;
@@ -1138,14 +1138,14 @@ diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_cons
  const char kChromeUIChromeURLsURL[] = "chrome://chrome-urls/";
  const char kChromeUIChromeURLsURL[] = "chrome://chrome-urls/";
  const char kChromeUIComponentsHost[] = "components";
  const char kChromeUIComponentsHost[] = "components";
 @@ -419,6 +421,7 @@ bool IsSystemWebUIHost(base::StringPiece host) {
 @@ -419,6 +421,7 @@ bool IsSystemWebUIHost(base::StringPiece host) {
+     kChromeUILockScreenNetworkHost,
+     kChromeUILockScreenStartReauthHost,
      kChromeUIMobileSetupHost,
      kChromeUIMobileSetupHost,
++    kChromeUIProxyConfigHost,
      kChromeUIMultiDeviceSetupHost,
      kChromeUIMultiDeviceSetupHost,
      kChromeUINetworkHost,
      kChromeUINetworkHost,
-+    kChromeUIProxyConfigHost,
-     kChromeUIOobeHost,
-     kChromeUIOSCreditsHost,
-     kChromeUIOSSettingsHost,
-@@ -671,6 +674,7 @@ const char* const kChromeHostURLs[] = {
+     kChromeUINotificationTesterHost,
+@@ -674,6 +677,7 @@ const char* const kChromeHostURLs[] = {
  #if !BUILDFLAG(IS_ANDROID)
  #if !BUILDFLAG(IS_ANDROID)
  #if !BUILDFLAG(IS_CHROMEOS_ASH)
  #if !BUILDFLAG(IS_CHROMEOS_ASH)
      kChromeUIAppLauncherPageHost,
      kChromeUIAppLauncherPageHost,
@@ -1316,7 +1316,7 @@ diff --git a/components/proxy_config/proxy_policy_handler.cc b/components/proxy_
 diff --git a/net/proxy_resolution/proxy_config.cc b/net/proxy_resolution/proxy_config.cc
 diff --git a/net/proxy_resolution/proxy_config.cc b/net/proxy_resolution/proxy_config.cc
 --- a/net/proxy_resolution/proxy_config.cc
 --- a/net/proxy_resolution/proxy_config.cc
 +++ b/net/proxy_resolution/proxy_config.cc
 +++ b/net/proxy_resolution/proxy_config.cc
-@@ -112,7 +112,7 @@ void ProxyConfig::ProxyRules::ParseFromString(const std::string& proxy_rules) {
+@@ -109,7 +109,7 @@ void ProxyConfig::ProxyRules::ParseFromString(const std::string& proxy_rules) {
                                     &single_proxies,
                                     &single_proxies,
                                     ProxyServer::SCHEME_HTTP);
                                     ProxyServer::SCHEME_HTTP);
          type = Type::PROXY_LIST;
          type = Type::PROXY_LIST;
@@ -1325,7 +1325,7 @@ diff --git a/net/proxy_resolution/proxy_config.cc b/net/proxy_resolution/proxy_c
        }
        }
  
  
        // Trim whitespace off the url scheme.
        // Trim whitespace off the url scheme.
-@@ -143,6 +143,56 @@ void ProxyConfig::ProxyRules::ParseFromString(const std::string& proxy_rules) {
+@@ -140,6 +140,56 @@ void ProxyConfig::ProxyRules::ParseFromString(const std::string& proxy_rules) {
    }
    }
  }
  }
  
  

+ 37 - 77
build/patches/Add-an-always-incognito-mode.patch

@@ -34,7 +34,6 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
  .../browser/download/DownloadUtils.java       |  16 +-
  .../browser/download/DownloadUtils.java       |  16 +-
  .../browser/history/HistoryManager.java       |  18 +-
  .../browser/history/HistoryManager.java       |  18 +-
  .../chrome/browser/history/HistoryPage.java   |  16 ++
  .../chrome/browser/history/HistoryPage.java   |  16 ++
- .../browser/init/StartupTabPreloader.java     |  14 +-
  .../native_page/NativePageFactory.java        |   4 +-
  .../native_page/NativePageFactory.java        |   4 +-
  .../chrome/browser/ntp/RecentTabsManager.java |   3 +-
  .../chrome/browser/ntp/RecentTabsManager.java |   3 +-
  .../privacy/settings/IncognitoSettings.java   | 160 ++++++++++++++++++
  .../privacy/settings/IncognitoSettings.java   | 160 ++++++++++++++++++
@@ -83,7 +82,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
  .../omnibox/browser/base_search_provider.cc   |   2 +-
  .../omnibox/browser/base_search_provider.cc   |   2 +-
  components/omnibox/browser/search_provider.cc |   4 +-
  components/omnibox/browser/search_provider.cc |   4 +-
  .../host_content_settings_map_factory.cc      |   1 +
  .../host_content_settings_map_factory.cc      |   1 +
- 64 files changed, 687 insertions(+), 75 deletions(-)
+ 63 files changed, 676 insertions(+), 72 deletions(-)
  create mode 100644 chrome/android/java/res/xml/incognito_preferences.xml
  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/AlwaysIncognitoLinkInterceptor.java
  create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/IncognitoSettings.java
  create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/IncognitoSettings.java
@@ -92,7 +91,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
 diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni
 --- a/chrome/android/chrome_java_resources.gni
 --- a/chrome/android/chrome_java_resources.gni
 +++ b/chrome/android/chrome_java_resources.gni
 +++ b/chrome/android/chrome_java_resources.gni
-@@ -679,6 +679,7 @@ chrome_java_resources = [
+@@ -672,6 +672,7 @@ chrome_java_resources = [
    "java/res/xml/main_preferences.xml",
    "java/res/xml/main_preferences.xml",
    "java/res/xml/manage_sync_preferences.xml",
    "java/res/xml/manage_sync_preferences.xml",
    "java/res/xml/phone_as_a_security_key_accessory_filter.xml",
    "java/res/xml/phone_as_a_security_key_accessory_filter.xml",
@@ -111,7 +110,7 @@ diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java
    "java/src/com/google/android/apps/chrome/appwidget/bookmarks/BookmarkThumbnailWidgetProvider.java",
    "java/src/com/google/android/apps/chrome/appwidget/bookmarks/BookmarkThumbnailWidgetProvider.java",
    "java/src/org/chromium/chrome/browser/ActivityTabProvider.java",
    "java/src/org/chromium/chrome/browser/ActivityTabProvider.java",
    "java/src/org/chromium/chrome/browser/ActivityUtils.java",
    "java/src/org/chromium/chrome/browser/ActivityUtils.java",
-@@ -959,6 +960,7 @@ chrome_java_sources = [
+@@ -953,6 +954,7 @@ chrome_java_sources = [
    "java/src/org/chromium/chrome/browser/privacy/settings/IncognitoLockSettings.java",
    "java/src/org/chromium/chrome/browser/privacy/settings/IncognitoLockSettings.java",
    "java/src/org/chromium/chrome/browser/privacy/settings/PrivacyPreferencesManagerImpl.java",
    "java/src/org/chromium/chrome/browser/privacy/settings/PrivacyPreferencesManagerImpl.java",
    "java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java",
    "java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java",
@@ -237,7 +236,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
 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
 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
-@@ -53,6 +53,7 @@ import org.chromium.base.supplier.UnownedUserDataSupplier;
+@@ -54,6 +54,7 @@ import org.chromium.base.supplier.UnownedUserDataSupplier;
  import org.chromium.base.task.PostTask;
  import org.chromium.base.task.PostTask;
  import org.chromium.cc.input.BrowserControlsState;
  import org.chromium.cc.input.BrowserControlsState;
  import org.chromium.chrome.R;
  import org.chromium.chrome.R;
@@ -245,7 +244,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct
  import org.chromium.chrome.browser.IntentHandler.IntentHandlerDelegate;
  import org.chromium.chrome.browser.IntentHandler.IntentHandlerDelegate;
  import org.chromium.chrome.browser.IntentHandler.TabOpenType;
  import org.chromium.chrome.browser.IntentHandler.TabOpenType;
  import org.chromium.chrome.browser.accessibility_tab_switcher.OverviewListLayout;
  import org.chromium.chrome.browser.accessibility_tab_switcher.OverviewListLayout;
-@@ -1812,8 +1813,9 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
+@@ -1842,8 +1843,9 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
          Bundle savedInstanceState = getSavedInstanceState();
          Bundle savedInstanceState = getSavedInstanceState();
  
  
          // We determine the model as soon as possible so every systems get initialized coherently.
          // We determine the model as soon as possible so every systems get initialized coherently.
@@ -260,7 +259,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct
 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
 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
 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
-@@ -98,6 +98,7 @@ import org.chromium.chrome.browser.contextualsearch.ContextualSearchFieldTrial;
+@@ -97,6 +97,7 @@ import org.chromium.chrome.browser.contextualsearch.ContextualSearchFieldTrial;
  import org.chromium.chrome.browser.contextualsearch.ContextualSearchManager;
  import org.chromium.chrome.browser.contextualsearch.ContextualSearchManager;
  import org.chromium.chrome.browser.contextualsearch.ContextualSearchManager.ContextualSearchTabPromotionDelegate;
  import org.chromium.chrome.browser.contextualsearch.ContextualSearchManager.ContextualSearchTabPromotionDelegate;
  import org.chromium.chrome.browser.dependency_injection.ChromeActivityCommonsModule;
  import org.chromium.chrome.browser.dependency_injection.ChromeActivityCommonsModule;
@@ -268,7 +267,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv
  import org.chromium.chrome.browser.dependency_injection.ChromeActivityComponent;
  import org.chromium.chrome.browser.dependency_injection.ChromeActivityComponent;
  import org.chromium.chrome.browser.dependency_injection.ModuleFactoryOverrides;
  import org.chromium.chrome.browser.dependency_injection.ModuleFactoryOverrides;
  import org.chromium.chrome.browser.device.DeviceClassManager;
  import org.chromium.chrome.browser.device.DeviceClassManager;
-@@ -1903,6 +1904,9 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+@@ -1803,6 +1804,9 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
              throw new IllegalStateException(
              throw new IllegalStateException(
                      "Attempting to access TabCreator before initialization");
                      "Attempting to access TabCreator before initialization");
          }
          }
@@ -289,7 +288,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App
  import org.chromium.chrome.browser.banners.AppMenuVerbiage;
  import org.chromium.chrome.browser.banners.AppMenuVerbiage;
  import org.chromium.chrome.browser.bookmarks.BookmarkBridge;
  import org.chromium.chrome.browser.bookmarks.BookmarkBridge;
  import org.chromium.chrome.browser.bookmarks.BookmarkFeatures;
  import org.chromium.chrome.browser.bookmarks.BookmarkFeatures;
-@@ -97,6 +98,10 @@ import java.util.ArrayList;
+@@ -99,6 +100,10 @@ import java.util.ArrayList;
  import java.util.List;
  import java.util.List;
  import java.util.Map;
  import java.util.Map;
  
  
@@ -300,7 +299,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
   * Base implementation of {@link AppMenuPropertiesDelegate} that handles hiding and showing menu
   * items based on activity state.
   * items based on activity state.
-@@ -527,6 +532,13 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
+@@ -549,6 +554,13 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
      }
      }
  
  
      private void prepareCommonMenuItems(Menu menu, @MenuGroup int menuGroup, boolean isIncognito) {
      private void prepareCommonMenuItems(Menu menu, @MenuGroup int menuGroup, boolean isIncognito) {
@@ -314,7 +313,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App
          // We have to iterate all menu items since same menu item ID may be associated with more
          // We have to iterate all menu items since same menu item ID may be associated with more
          // than one menu items.
          // than one menu items.
          boolean isOverviewModeMenu = menuGroup == MenuGroup.OVERVIEW_MODE_MENU;
          boolean isOverviewModeMenu = menuGroup == MenuGroup.OVERVIEW_MODE_MENU;
-@@ -583,7 +595,15 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
+@@ -609,7 +621,15 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
              }
              }
  
  
              if (item.getItemId() == R.id.recent_tabs_menu_id) {
              if (item.getItemId() == R.id.recent_tabs_menu_id) {
@@ -331,7 +330,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App
              }
              }
              if (item.getItemId() == R.id.menu_group_tabs) {
              if (item.getItemId() == R.id.menu_group_tabs) {
                  item.setVisible(isMenuGroupTabsVisible);
                  item.setVisible(isMenuGroupTabsVisible);
-@@ -820,7 +840,9 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
+@@ -846,7 +866,9 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
          //                is not persisted when adding to the homescreen.
          //                is not persisted when adding to the homescreen.
          // * If creating shortcuts it not supported by the current home screen.
          // * If creating shortcuts it not supported by the current home screen.
          return WebappsUtils.isAddToHomeIntentSupported() && !isChromeScheme && !isFileScheme
          return WebappsUtils.isAddToHomeIntentSupported() && !isChromeScheme && !isFileScheme
@@ -383,7 +382,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/Chr
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java
-@@ -39,31 +39,6 @@ public class CustomTabActivityLifecycleUmaTracker implements PauseResumeWithNati
+@@ -66,31 +66,6 @@ public class CustomTabActivityLifecycleUmaTracker implements PauseResumeWithNati
      private boolean mIsInitialResume = true;
      private boolean mIsInitialResume = true;
  
  
      private void recordIncognitoLaunchReason() {
      private void recordIncognitoLaunchReason() {
@@ -449,7 +448,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust
  import java.lang.annotation.Retention;
  import java.lang.annotation.Retention;
  import java.lang.annotation.RetentionPolicy;
  import java.lang.annotation.RetentionPolicy;
  import java.util.ArrayList;
  import java.util.ArrayList;
-@@ -771,7 +774,7 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid
+@@ -777,7 +780,7 @@ public class CustomTabIntentDataProvider extends BrowserServicesIntentDataProvid
  
  
      @Override
      @Override
      public boolean isIncognito() {
      public boolean isIncognito() {
@@ -501,7 +500,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/HistoryManager.java b/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryManager.java
 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
 --- a/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryManager.java
 +++ b/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 org.chromium.base.metrics.RecordHistogram;
+@@ -31,6 +31,7 @@ import org.chromium.base.metrics.RecordHistogram;
  import org.chromium.base.metrics.RecordUserAction;
  import org.chromium.base.metrics.RecordUserAction;
  import org.chromium.base.supplier.Supplier;
  import org.chromium.base.supplier.Supplier;
  import org.chromium.chrome.R;
  import org.chromium.chrome.R;
@@ -509,7 +508,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History
  import org.chromium.chrome.browser.browsing_data.ClearBrowsingDataTabsFragment;
  import org.chromium.chrome.browser.browsing_data.ClearBrowsingDataTabsFragment;
  import org.chromium.chrome.browser.flags.ChromeFeatureList;
  import org.chromium.chrome.browser.flags.ChromeFeatureList;
  import org.chromium.chrome.browser.history_clusters.HistoryClustersCoordinator;
  import org.chromium.chrome.browser.history_clusters.HistoryClustersCoordinator;
-@@ -46,6 +47,12 @@ import org.chromium.ui.base.Clipboard;
+@@ -57,6 +58,12 @@ import org.chromium.url.GURL;
  
  
  import java.util.List;
  import java.util.List;
  
  
@@ -522,7 +521,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History
  /**
  /**
   * Combines and manages the different UI components of browsing history.
   * Combines and manages the different UI components of browsing history.
   */
   */
-@@ -255,7 +262,16 @@ public class HistoryManager implements OnMenuItemClickListener, SelectionObserve
+@@ -330,7 +337,16 @@ public class HistoryManager implements OnMenuItemClickListener, SelectionObserve
          return mRootView;
          return mRootView;
      }
      }
  
  
@@ -580,45 +579,6 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/history/History
          Uri uri = Uri.parse(url);
          Uri uri = Uri.parse(url);
          assert uri.getHost().equals(UrlConstants.HISTORY_HOST);
          assert uri.getHost().equals(UrlConstants.HISTORY_HOST);
  
  
-diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/StartupTabPreloader.java b/chrome/android/java/src/org/chromium/chrome/browser/init/StartupTabPreloader.java
---- a/chrome/android/java/src/org/chromium/chrome/browser/init/StartupTabPreloader.java
-+++ b/chrome/android/java/src/org/chromium/chrome/browser/init/StartupTabPreloader.java
-@@ -42,6 +42,9 @@ import org.chromium.url.GURL;
- import java.lang.annotation.Retention;
- import java.lang.annotation.RetentionPolicy;
- 
-+import org.chromium.base.ContextUtils;
-+import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor;
-+
- /**
-  * This class attempts to preload the tab if the url is known from the intent when the profile
-  * is created. This is done to improve startup latency.
-@@ -446,17 +449,22 @@ public class StartupTabPreloader implements ProfileManager.Observer, DestroyObse
-         Intent intent = mIntentSupplier.get();
-         GURL url = UrlFormatter.fixupUrl(getUrlFromIntent(intent));
- 
-+        boolean isIncognito = AlwaysIncognitoLinkInterceptor.isAlwaysIncognito();
-+
-+        Profile profile = Profile.getLastUsedRegularProfile();
-         ChromeTabCreator chromeTabCreator =
--                (ChromeTabCreator) mTabCreatorManager.getTabCreator(false);
-+                (ChromeTabCreator) mTabCreatorManager.getTabCreator(isIncognito);
-         WebContents webContents =
--                WebContentsFactory.createWebContents(Profile.getLastUsedRegularProfile(), false);
-+                WebContentsFactory.createWebContents(
-+                    isIncognito ? profile.getPrimaryOTRProfile(true /* createIfNeeded */) : profile,
-+                    false);
- 
-         mLoadUrlParams = mIntentHandler.createLoadUrlParamsForIntent(url.getSpec(), intent);
- 
-         // Create a detached tab, but don't add it to the tab model yet. We'll do that
-         // later if the loadUrlParams etc... match.
-         mTab = TabBuilder.createLiveTab(false)
--                       .setIncognito(false)
-+                       .setIncognito(isIncognito)
-                        .setLaunchType(TabLaunchType.FROM_EXTERNAL_APP)
-                        .setWindow(mWindowAndroid)
-                        .setWebContents(webContents)
 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
 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
 --- 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
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java
@@ -829,7 +789,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin
  import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager;
  import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager;
  import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager.SnackbarManageable;
  import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager.SnackbarManageable;
  import org.chromium.components.browser_ui.accessibility.AccessibilitySettings;
  import org.chromium.components.browser_ui.accessibility.AccessibilitySettings;
-@@ -257,6 +258,9 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity
+@@ -258,6 +259,9 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity
          if (fragment instanceof AdPersonalizationRemovedFragment) {
          if (fragment instanceof AdPersonalizationRemovedFragment) {
              ((AdPersonalizationRemovedFragment) fragment).setSnackbarManager(getSnackbarManager());
              ((AdPersonalizationRemovedFragment) fragment).setSnackbarManager(getSnackbarManager());
          }
          }
@@ -952,7 +912,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/tab_restore
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java
 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
 --- 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
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java
-@@ -123,6 +123,8 @@ import org.chromium.ui.base.DeviceFormFactor;
+@@ -126,6 +126,8 @@ import org.chromium.ui.base.DeviceFormFactor;
  import org.chromium.ui.base.IntentRequestTracker;
  import org.chromium.ui.base.IntentRequestTracker;
  import org.chromium.ui.modaldialog.ModalDialogManager;
  import org.chromium.ui.modaldialog.ModalDialogManager;
  import org.chromium.ui.util.TokenHolder;
  import org.chromium.ui.util.TokenHolder;
@@ -961,7 +921,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/Tab
  
  
  /**
  /**
   * A {@link RootUiCoordinator} variant that controls tabbed-mode specific UI.
   * A {@link RootUiCoordinator} variant that controls tabbed-mode specific UI.
-@@ -499,7 +501,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator {
+@@ -505,7 +507,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator {
                      mAppMenuCoordinator == null ? null : mAppMenuCoordinator.getAppMenuHandler();
                      mAppMenuCoordinator == null ? null : mAppMenuCoordinator.getAppMenuHandler();
              mEmptyBackgroundViewWrapper =
              mEmptyBackgroundViewWrapper =
                      new EmptyBackgroundViewWrapper(mTabModelSelectorSupplier.get(),
                      new EmptyBackgroundViewWrapper(mTabModelSelectorSupplier.get(),
@@ -973,7 +933,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/Tab
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java
-@@ -43,6 +43,10 @@ import org.chromium.ui.base.PageTransition;
+@@ -42,6 +42,10 @@ import org.chromium.ui.base.PageTransition;
  import org.chromium.ui.base.WindowAndroid;
  import org.chromium.ui.base.WindowAndroid;
  import org.chromium.url.GURL;
  import org.chromium.url.GURL;
  
  
@@ -984,7 +944,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/Chrome
  /**
  /**
   * This class creates various kinds of new tabs and adds them to the right {@link TabModel}.
   * This class creates various kinds of new tabs and adds them to the right {@link TabModel}.
   */
   */
-@@ -338,7 +342,6 @@ public class ChromeTabCreator extends TabCreator {
+@@ -327,7 +331,6 @@ public class ChromeTabCreator extends TabCreator {
      // TODO(crbug.com/1081924): Clean up the launches from SearchActivity/Chrome.
      // TODO(crbug.com/1081924): Clean up the launches from SearchActivity/Chrome.
      public Tab launchUrlFromExternalApp(
      public Tab launchUrlFromExternalApp(
              LoadUrlParams loadUrlParams, String appId, boolean forceNewTab, Intent intent) {
              LoadUrlParams loadUrlParams, String appId, boolean forceNewTab, Intent intent) {
@@ -1086,7 +1046,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappI
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -4384,6 +4384,10 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -4550,6 +4550,10 @@ const FeatureEntry kFeatureEntries[] = {
       flag_descriptions::kOfflinePagesLivePageSharingName,
       flag_descriptions::kOfflinePagesLivePageSharingName,
       flag_descriptions::kOfflinePagesLivePageSharingDescription, kOsAndroid,
       flag_descriptions::kOfflinePagesLivePageSharingDescription, kOsAndroid,
       FEATURE_VALUE_TYPE(offline_pages::kOfflinePagesLivePageSharingFeature)},
       FEATURE_VALUE_TYPE(offline_pages::kOfflinePagesLivePageSharingFeature)},
@@ -1153,7 +1113,7 @@ diff --git a/chrome/browser/android/historical_tab_saver.cc b/chrome/browser/and
 diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
 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
 --- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
 +++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
 +++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
-@@ -303,6 +303,13 @@ signin::IdentityManager* ChromeAutocompleteProviderClient::GetIdentityManager()
+@@ -293,6 +293,13 @@ signin::IdentityManager* ChromeAutocompleteProviderClient::GetIdentityManager()
    return IdentityManagerFactory::GetForProfile(profile_);
    return IdentityManagerFactory::GetForProfile(profile_);
  }
  }
  
  
@@ -1170,7 +1130,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
 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
 --- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.h
 +++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.h
 +++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.h
-@@ -78,6 +78,7 @@ class ChromeAutocompleteProviderClient : public AutocompleteProviderClient {
+@@ -77,6 +77,7 @@ class ChromeAutocompleteProviderClient : public AutocompleteProviderClient {
        const override;
        const override;
    signin::IdentityManager* GetIdentityManager() const override;
    signin::IdentityManager* GetIdentityManager() const override;
    bool IsOffTheRecord() const override;
    bool IsOffTheRecord() const override;
@@ -1227,7 +1187,7 @@ diff --git a/chrome/browser/content_settings/host_content_settings_map_factory.c
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -3363,6 +3363,12 @@ const char kOfflinePagesLivePageSharingDescription[] =
+@@ -3463,6 +3463,12 @@ const char kOfflinePagesLivePageSharingDescription[] =
      "Enables to share current loaded page as offline page by saving as MHTML "
      "Enables to share current loaded page as offline page by saving as MHTML "
      "first.";
      "first.";
  
  
@@ -1243,7 +1203,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -1912,6 +1912,9 @@ extern const char kNotificationPermissionRationaleDescription[];
+@@ -1973,6 +1973,9 @@ extern const char kNotificationPermissionRationaleDescription[];
  extern const char kOfflinePagesLivePageSharingName[];
  extern const char kOfflinePagesLivePageSharingName[];
  extern const char kOfflinePagesLivePageSharingDescription[];
  extern const char kOfflinePagesLivePageSharingDescription[];
  
  
@@ -1256,7 +1216,7 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
 diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
 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
 --- a/chrome/browser/flags/android/chrome_feature_list.cc
 +++ b/chrome/browser/flags/android/chrome_feature_list.cc
 +++ b/chrome/browser/flags/android/chrome_feature_list.cc
-@@ -478,8 +478,8 @@ const base::Feature kCCTExternalLinkHandling{"CCTExternalLinkHandling",
+@@ -495,8 +495,8 @@ const base::Feature kCCTNewDownloadTab{"CCTNewDownloadTab",
  const base::Feature kCCTIncognito{"CCTIncognito",
  const base::Feature kCCTIncognito{"CCTIncognito",
                                    base::FEATURE_ENABLED_BY_DEFAULT};
                                    base::FEATURE_ENABLED_BY_DEFAULT};
  
  
@@ -1265,8 +1225,8 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse
 +const base::Feature kCCTIncognitoAvailableToThirdParty{                     // Enabled by default in Bromite
 +const base::Feature kCCTIncognitoAvailableToThirdParty{                     // Enabled by default in Bromite
 +    "CCTIncognitoAvailableToThirdParty", base::FEATURE_ENABLED_BY_DEFAULT};
 +    "CCTIncognitoAvailableToThirdParty", base::FEATURE_ENABLED_BY_DEFAULT};
  
  
- const base::Feature kCCTPostMessageAPI{"CCTPostMessageAPI",
-                                        base::FEATURE_ENABLED_BY_DEFAULT};
+ const base::Feature kCCTPackageNameRecording{"CCTPackageNameRecording",
+                                              base::FEATURE_DISABLED_BY_DEFAULT};
 diff --git a/chrome/browser/history/history_tab_helper.cc b/chrome/browser/history/history_tab_helper.cc
 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
 --- a/chrome/browser/history/history_tab_helper.cc
 +++ b/chrome/browser/history/history_tab_helper.cc
 +++ b/chrome/browser/history/history_tab_helper.cc
@@ -1564,7 +1524,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
 diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
 --- a/chrome/browser/prefs/browser_prefs.cc
 --- a/chrome/browser/prefs/browser_prefs.cc
 +++ b/chrome/browser/prefs/browser_prefs.cc
 +++ b/chrome/browser/prefs/browser_prefs.cc
-@@ -224,6 +224,7 @@
+@@ -226,6 +226,7 @@
  #include "components/feed/core/shared_prefs/pref_names.h"
  #include "components/feed/core/shared_prefs/pref_names.h"
  
  
  #if BUILDFLAG(IS_ANDROID)
  #if BUILDFLAG(IS_ANDROID)
@@ -1572,7 +1532,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/bookmarks/partner_bookmarks_shim.h"
  #include "chrome/browser/android/explore_sites/history_statistics_reporter.h"
  #include "chrome/browser/android/explore_sites/history_statistics_reporter.h"
  #include "chrome/browser/android/ntp/recent_tabs_page_prefs.h"
  #include "chrome/browser/android/ntp/recent_tabs_page_prefs.h"
-@@ -1354,6 +1355,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
+@@ -1402,6 +1403,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
    usage_stats::UsageStatsBridge::RegisterProfilePrefs(registry);
    usage_stats::UsageStatsBridge::RegisterProfilePrefs(registry);
    variations::VariationsService::RegisterProfilePrefs(registry);
    variations::VariationsService::RegisterProfilePrefs(registry);
    video_tutorials::RegisterPrefs(registry);
    video_tutorials::RegisterPrefs(registry);
@@ -1731,7 +1691,7 @@ new file mode 100644
 diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
 diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
 --- a/chrome/common/pref_names.cc
 --- a/chrome/common/pref_names.cc
 +++ b/chrome/common/pref_names.cc
 +++ b/chrome/common/pref_names.cc
-@@ -3397,6 +3397,12 @@ const char kShowCaretBrowsingDialog[] =
+@@ -3409,6 +3409,12 @@ const char kShowCaretBrowsingDialog[] =
  const char kLacrosLaunchSwitch[] = "lacros_launch_switch";
  const char kLacrosLaunchSwitch[] = "lacros_launch_switch";
  #endif
  #endif
  
  
@@ -1747,7 +1707,7 @@ diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
 diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
 diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
 --- a/chrome/common/pref_names.h
 --- a/chrome/common/pref_names.h
 +++ b/chrome/common/pref_names.h
 +++ b/chrome/common/pref_names.h
-@@ -1205,6 +1205,8 @@ extern const char kDiscountConsentShowInterestIn[];
+@@ -1208,6 +1208,8 @@ extern const char kDiscountConsentShowInterestIn[];
  
  
  #if BUILDFLAG(IS_ANDROID)
  #if BUILDFLAG(IS_ANDROID)
  extern const char kWebXRImmersiveArEnabled[];
  extern const char kWebXRImmersiveArEnabled[];
@@ -1756,7 +1716,7 @@ diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
  #endif
  #endif
  
  
  #if !BUILDFLAG(IS_ANDROID)
  #if !BUILDFLAG(IS_ANDROID)
-@@ -1241,6 +1243,10 @@ extern const char kPrivacyGuideViewed[];
+@@ -1244,6 +1246,10 @@ extern const char kPrivacyGuideViewed[];
  
  
  extern const char kCorsNonWildcardRequestHeadersSupport[];
  extern const char kCorsNonWildcardRequestHeadersSupport[];
  
  
@@ -1888,7 +1848,7 @@ diff --git a/components/offline_pages/core/offline_page_feature.h b/components/o
 diff --git a/components/omnibox/browser/autocomplete_provider_client.cc b/components/omnibox/browser/autocomplete_provider_client.cc
 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
 --- a/components/omnibox/browser/autocomplete_provider_client.cc
 +++ b/components/omnibox/browser/autocomplete_provider_client.cc
 +++ b/components/omnibox/browser/autocomplete_provider_client.cc
-@@ -34,3 +34,7 @@ base::WeakPtr<AutocompleteProviderClient>
+@@ -29,3 +29,7 @@ base::WeakPtr<AutocompleteProviderClient>
  AutocompleteProviderClient::GetWeakPtr() {
  AutocompleteProviderClient::GetWeakPtr() {
    return nullptr;
    return nullptr;
  }
  }
@@ -1899,7 +1859,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
 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
 --- a/components/omnibox/browser/autocomplete_provider_client.h
 +++ b/components/omnibox/browser/autocomplete_provider_client.h
 +++ b/components/omnibox/browser/autocomplete_provider_client.h
-@@ -129,6 +129,7 @@ class AutocompleteProviderClient : public OmniboxAction::Client {
+@@ -124,6 +124,7 @@ class AutocompleteProviderClient : public OmniboxAction::Client {
    virtual signin::IdentityManager* GetIdentityManager() const = 0;
    virtual signin::IdentityManager* GetIdentityManager() const = 0;
  
  
    virtual bool IsOffTheRecord() const = 0;
    virtual bool IsOffTheRecord() const = 0;
@@ -1922,7 +1882,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
 diff --git a/components/omnibox/browser/search_provider.cc b/components/omnibox/browser/search_provider.cc
 --- a/components/omnibox/browser/search_provider.cc
 --- a/components/omnibox/browser/search_provider.cc
 +++ b/components/omnibox/browser/search_provider.cc
 +++ b/components/omnibox/browser/search_provider.cc
-@@ -814,7 +814,9 @@ bool SearchProvider::IsQuerySuitableForSuggest(bool* query_is_private) const {
+@@ -808,7 +808,9 @@ bool SearchProvider::IsQuerySuitableForSuggest(bool* query_is_private) const {
    // keyword input to a keyword suggest server, if any.)
    // keyword input to a keyword suggest server, if any.)
    const TemplateURL* default_url = providers_.GetDefaultProviderURL();
    const TemplateURL* default_url = providers_.GetDefaultProviderURL();
    const TemplateURL* keyword_url = providers_.GetKeywordProviderURL();
    const TemplateURL* keyword_url = providers_.GetKeywordProviderURL();

+ 37 - 37
build/patches/Add-bookmark-import-export-actions.patch

@@ -22,8 +22,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
  .../native_page/NativePageFactory.java        |  11 +-
  .../native_page/NativePageFactory.java        |  11 +-
  chrome/browser/BUILD.gn                       |  11 +-
  chrome/browser/BUILD.gn                       |  11 +-
  chrome/browser/about_flags.cc                 |   6 +
  chrome/browser/about_flags.cc                 |   6 +
- .../android/bookmarks/bookmark_bridge.cc      | 283 ++++++++++++++++++
- .../android/bookmarks/bookmark_bridge.h       |  30 +-
+ .../bookmarks/android/bookmark_bridge.cc      | 283 ++++++++++++++++++
+ .../bookmarks/android/bookmark_bridge.h       |  30 +-
  .../browser/bookmarks/bookmark_html_writer.cc |   8 +-
  .../browser/bookmarks/bookmark_html_writer.cc |   8 +-
  .../dialogs/DownloadLocationCustomView.java   |   8 +-
  .../dialogs/DownloadLocationCustomView.java   |   8 +-
  .../DownloadLocationDialogCoordinator.java    |   8 +-
  .../DownloadLocationDialogCoordinator.java    |   8 +-
@@ -703,9 +703,9 @@ 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
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
 --- a/chrome/browser/BUILD.gn
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -1864,6 +1864,13 @@ static_library("browser") {
-     "webid/federated_identity_sharing_permission_context_factory.h",
-   ]
+@@ -1860,6 +1860,13 @@ static_library("browser") {
+     ]
+   }
  
  
 +  if (is_android) {
 +  if (is_android) {
 +    sources += [
 +    sources += [
@@ -717,7 +717,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
    configs += [
    configs += [
      "//build/config/compiler:wexit_time_destructors",
      "//build/config/compiler:wexit_time_destructors",
      "//build/config:precompiled_headers",
      "//build/config:precompiled_headers",
-@@ -3021,6 +3028,8 @@ static_library("browser") {
+@@ -2876,6 +2883,8 @@ static_library("browser") {
        "autofill/manual_filling_controller.h",
        "autofill/manual_filling_controller.h",
        "autofill/manual_filling_controller_impl.cc",
        "autofill/manual_filling_controller_impl.cc",
        "autofill/manual_filling_controller_impl.h",
        "autofill/manual_filling_controller_impl.h",
@@ -726,7 +726,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
        "autofill/manual_filling_utils.cc",
        "autofill/manual_filling_utils.cc",
        "autofill/manual_filling_utils.h",
        "autofill/manual_filling_utils.h",
        "autofill/manual_filling_view_interface.h",
        "autofill/manual_filling_view_interface.h",
-@@ -3658,8 +3667,6 @@ static_library("browser") {
+@@ -3519,8 +3528,6 @@ static_library("browser") {
        "badging/badge_manager_factory.h",
        "badging/badge_manager_factory.h",
        "banners/app_banner_manager_desktop.cc",
        "banners/app_banner_manager_desktop.cc",
        "banners/app_banner_manager_desktop.h",
        "banners/app_banner_manager_desktop.h",
@@ -738,7 +738,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
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -8235,6 +8235,12 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -8491,6 +8491,12 @@ const FeatureEntry kFeatureEntries[] = {
       FEATURE_VALUE_TYPE(features::kRequestDesktopSiteExceptions)},
       FEATURE_VALUE_TYPE(features::kRequestDesktopSiteExceptions)},
  #endif
  #endif
  
  
@@ -751,9 +751,9 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
  #if BUILDFLAG(IS_CHROMEOS_ASH)
  #if BUILDFLAG(IS_CHROMEOS_ASH)
      {"snooping-protection", flag_descriptions::kSnoopingProtectionName,
      {"snooping-protection", flag_descriptions::kSnoopingProtectionName,
       flag_descriptions::kSnoopingProtectionDescription, kOsCrOS,
       flag_descriptions::kSnoopingProtectionDescription, kOsCrOS,
-diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browser/android/bookmarks/bookmark_bridge.cc
---- a/chrome/browser/android/bookmarks/bookmark_bridge.cc
-+++ b/chrome/browser/android/bookmarks/bookmark_bridge.cc
+diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browser/bookmarks/android/bookmark_bridge.cc
+--- a/chrome/browser/bookmarks/android/bookmark_bridge.cc
++++ b/chrome/browser/bookmarks/android/bookmark_bridge.cc
 @@ -56,6 +56,25 @@
 @@ -56,6 +56,25 @@
  #include "content/public/browser/browser_thread.h"
  #include "content/public/browser/browser_thread.h"
  #include "content/public/browser/web_contents.h"
  #include "content/public/browser/web_contents.h"
@@ -778,10 +778,10 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
 +#include "content/public/browser/browser_task_traits.h"
 +#include "content/public/browser/browser_task_traits.h"
 +
 +
  using base::android::AttachCurrentThread;
  using base::android::AttachCurrentThread;
- using base::android::ConvertUTF8ToJavaString;
  using base::android::ConvertUTF16ToJavaString;
  using base::android::ConvertUTF16ToJavaString;
-@@ -72,8 +91,92 @@ using bookmarks::BookmarkNode;
- using bookmarks::BookmarkType;
+ using base::android::ConvertUTF8ToJavaString;
+@@ -72,8 +91,92 @@ using bookmarks::android::JavaBookmarkIdGetId;
+ using bookmarks::android::JavaBookmarkIdGetType;
  using content::BrowserThread;
  using content::BrowserThread;
  
  
 +namespace internal {
 +namespace internal {
@@ -873,7 +873,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
  class BookmarkTitleComparer {
  class BookmarkTitleComparer {
   public:
   public:
    explicit BookmarkTitleComparer(BookmarkBridge* bookmark_bridge,
    explicit BookmarkTitleComparer(BookmarkBridge* bookmark_bridge,
-@@ -160,6 +263,10 @@ BookmarkBridge::~BookmarkBridge() {
+@@ -159,6 +262,10 @@ BookmarkBridge::~BookmarkBridge() {
    if (partner_bookmarks_shim_)
    if (partner_bookmarks_shim_)
      partner_bookmarks_shim_->RemoveObserver(this);
      partner_bookmarks_shim_->RemoveObserver(this);
    reading_list_manager_->RemoveObserver(this);
    reading_list_manager_->RemoveObserver(this);
@@ -884,7 +884,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
  }
  }
  
  
  void BookmarkBridge::Destroy(JNIEnv*, const JavaParamRef<jobject>&) {
  void BookmarkBridge::Destroy(JNIEnv*, const JavaParamRef<jobject>&) {
-@@ -577,6 +684,182 @@ jint BookmarkBridge::GetTotalBookmarkCount(
+@@ -569,6 +676,182 @@ jint BookmarkBridge::GetTotalBookmarkCount(
    return count;
    return count;
  }
  }
  
  
@@ -1065,11 +1065,11 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
 +}
 +}
 +
 +
  void BookmarkBridge::SetBookmarkTitle(JNIEnv* env,
  void BookmarkBridge::SetBookmarkTitle(JNIEnv* env,
-                                        const JavaParamRef<jobject>& obj,
-                                        jlong id,
-diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.h b/chrome/browser/android/bookmarks/bookmark_bridge.h
---- a/chrome/browser/android/bookmarks/bookmark_bridge.h
-+++ b/chrome/browser/android/bookmarks/bookmark_bridge.h
+                                       const JavaParamRef<jobject>& obj,
+                                       jlong id,
+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
 @@ -18,6 +18,7 @@
 @@ -18,6 +18,7 @@
  #include "base/scoped_observation.h"
  #include "base/scoped_observation.h"
  #include "base/strings/utf_string_conversions.h"
  #include "base/strings/utf_string_conversions.h"
@@ -1127,7 +1127,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.h b/chrome/browser
    void SetBookmarkTitle(JNIEnv* env,
    void SetBookmarkTitle(JNIEnv* env,
                          const base::android::JavaParamRef<jobject>& obj,
                          const base::android::JavaParamRef<jobject>& obj,
                          jlong id,
                          jlong id,
-@@ -381,12 +401,16 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
+@@ -380,12 +400,16 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
    void DestroyJavaObject();
    void DestroyJavaObject();
  
  
    raw_ptr<Profile> profile_;
    raw_ptr<Profile> profile_;
@@ -1144,7 +1144,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.h b/chrome/browser
  
  
    // Information about the Partner bookmarks (must check for IsLoaded()).
    // Information about the Partner bookmarks (must check for IsLoaded()).
    // This is owned by profile.
    // This is owned by profile.
-@@ -398,6 +422,10 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
+@@ -397,6 +421,10 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
    // Observes the profile destruction and creation.
    // Observes the profile destruction and creation.
    base::ScopedObservation<Profile, ProfileObserver> profile_observation_{this};
    base::ScopedObservation<Profile, ProfileObserver> profile_observation_{this};
  
  
@@ -1250,7 +1250,7 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -5915,6 +5915,11 @@ const char kWebKioskEnableLacrosDescription[] =
+@@ -6068,6 +6068,11 @@ const char kWebKioskEnableLacrosDescription[] =
      "ChromeOS. When disabled, the Ash-chrome will be used";
      "ChromeOS. When disabled, the Ash-chrome will be used";
  #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
  #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
  
  
@@ -1265,7 +1265,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -3422,6 +3422,9 @@ extern const char kWebKioskEnableLacrosName[];
+@@ -3510,6 +3510,9 @@ extern const char kWebKioskEnableLacrosName[];
  extern const char kWebKioskEnableLacrosDescription[];
  extern const char kWebKioskEnableLacrosDescription[];
  #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
  #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
  
  
@@ -1278,7 +1278,7 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
 diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
 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
 --- a/chrome/browser/flags/android/chrome_feature_list.cc
 +++ b/chrome/browser/flags/android/chrome_feature_list.cc
 +++ b/chrome/browser/flags/android/chrome_feature_list.cc
-@@ -174,6 +174,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
+@@ -176,6 +176,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
      &kBulkTabRestore,
      &kBulkTabRestore,
      &kCastDeviceFilter,
      &kCastDeviceFilter,
      &kCloseTabSuggestions,
      &kCloseTabSuggestions,
@@ -1286,7 +1286,7 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse
      &kCriticalPersistedTabData,
      &kCriticalPersistedTabData,
      &kCCTBackgroundTab,
      &kCCTBackgroundTab,
      &kCCTClientDataHeader,
      &kCCTClientDataHeader,
-@@ -876,6 +877,10 @@ const base::Feature kWebApkInstallService{"WebApkInstallService",
+@@ -899,6 +900,10 @@ const base::Feature kWebApkInstallService{"WebApkInstallService",
  const base::Feature kWebApkTrampolineOnInitialIntent{
  const base::Feature kWebApkTrampolineOnInitialIntent{
      "WebApkTrampolineOnInitialIntent", base::FEATURE_ENABLED_BY_DEFAULT};
      "WebApkTrampolineOnInitialIntent", base::FEATURE_ENABLED_BY_DEFAULT};
  
  
@@ -1300,18 +1300,18 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse
 diff --git a/chrome/browser/flags/android/chrome_feature_list.h b/chrome/browser/flags/android/chrome_feature_list.h
 diff --git a/chrome/browser/flags/android/chrome_feature_list.h b/chrome/browser/flags/android/chrome_feature_list.h
 --- a/chrome/browser/flags/android/chrome_feature_list.h
 --- a/chrome/browser/flags/android/chrome_feature_list.h
 +++ b/chrome/browser/flags/android/chrome_feature_list.h
 +++ b/chrome/browser/flags/android/chrome_feature_list.h
-@@ -154,6 +154,7 @@ extern const base::Feature kTestDefaultDisabled;
+@@ -154,6 +154,7 @@ extern const base::Feature kTabSwitcherOnReturn;
+ extern const base::Feature kTabToGTSAnimation;
+ extern const base::Feature kTestDefaultDisabled;
  extern const base::Feature kTestDefaultEnabled;
  extern const base::Feature kTestDefaultEnabled;
++extern const base::Feature kBookmarksExportUseSaf;
  extern const base::Feature kToolbarIphAndroid;
  extern const base::Feature kToolbarIphAndroid;
  extern const base::Feature kToolbarMicIphAndroid;
  extern const base::Feature kToolbarMicIphAndroid;
-+extern const base::Feature kBookmarksExportUseSaf;
- extern const base::Feature kToolbarUseHardwareBitmapDraw;
- extern const base::Feature kTrustedWebActivityLocationDelegation;
- extern const base::Feature kTrustedWebActivityNewDisclosure;
+ extern const base::Feature kToolbarScrollAblationAndroid;
 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
 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
 --- 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
 +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
-@@ -557,6 +557,7 @@ public abstract class ChromeFeatureList {
+@@ -565,6 +565,7 @@ public abstract class ChromeFeatureList {
      public static final String USE_CHIME_ANDROID_SDK = "UseChimeAndroidSdk";
      public static final String USE_CHIME_ANDROID_SDK = "UseChimeAndroidSdk";
      public static final String USE_CLIENT_CONFIG_IPH = "UseClientConfigIPH";
      public static final String USE_CLIENT_CONFIG_IPH = "UseClientConfigIPH";
      public static final String VOICE_SEARCH_AUDIO_CAPTURE_POLICY = "VoiceSearchAudioCapturePolicy";
      public static final String VOICE_SEARCH_AUDIO_CAPTURE_POLICY = "VoiceSearchAudioCapturePolicy";
@@ -1389,7 +1389,7 @@ diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/bro
  
  
      /**
      /**
       * Whether Chrome is set as the default browser.
       * Whether Chrome is set as the default browser.
-@@ -1031,6 +1033,7 @@ public final class ChromePreferenceKeys {
+@@ -960,6 +962,7 @@ public final class ChromePreferenceKeys {
                  ASSISTANT_VOICE_SEARCH_ENABLED,
                  ASSISTANT_VOICE_SEARCH_ENABLED,
                  APP_LAUNCH_LAST_KNOWN_ACTIVE_TAB_STATE,
                  APP_LAUNCH_LAST_KNOWN_ACTIVE_TAB_STATE,
                  APP_LAUNCH_SEARCH_ENGINE_HAD_LOGO,
                  APP_LAUNCH_SEARCH_ENGINE_HAD_LOGO,
@@ -1428,7 +1428,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
 diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn
 --- a/chrome/common/BUILD.gn
 --- a/chrome/common/BUILD.gn
 +++ b/chrome/common/BUILD.gn
 +++ b/chrome/common/BUILD.gn
-@@ -390,6 +390,9 @@ static_library("common_lib") {
+@@ -397,6 +397,9 @@ static_library("common_lib") {
      sources += [
      sources += [
        "media/chrome_media_drm_bridge_client.cc",
        "media/chrome_media_drm_bridge_client.cc",
        "media/chrome_media_drm_bridge_client.h",
        "media/chrome_media_drm_bridge_client.h",
@@ -1441,7 +1441,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
 diff --git a/chrome/utility/BUILD.gn b/chrome/utility/BUILD.gn
 --- a/chrome/utility/BUILD.gn
 --- a/chrome/utility/BUILD.gn
 +++ b/chrome/utility/BUILD.gn
 +++ b/chrome/utility/BUILD.gn
-@@ -82,8 +82,6 @@ static_library("utility") {
+@@ -83,8 +83,6 @@ static_library("utility") {
  
  
    if (!is_android) {
    if (!is_android) {
      sources += [
      sources += [
@@ -1450,7 +1450,7 @@ diff --git a/chrome/utility/BUILD.gn b/chrome/utility/BUILD.gn
        "importer/bookmarks_file_importer.cc",
        "importer/bookmarks_file_importer.cc",
        "importer/bookmarks_file_importer.h",
        "importer/bookmarks_file_importer.h",
        "importer/external_process_importer_bridge.cc",
        "importer/external_process_importer_bridge.cc",
-@@ -202,6 +200,11 @@ static_library("utility") {
+@@ -204,6 +202,11 @@ static_library("utility") {
      ]
      ]
    }
    }
  
  

+ 2 - 2
build/patches/Add-custom-tab-intents-privacy-option.patch

@@ -80,7 +80,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDis
          // Since configureIntentForResizableCustomTab() might change the componenet/class
          // Since configureIntentForResizableCustomTab() might change the componenet/class
          // associated with the passed intent, it needs to be called after #setClassName(context,
          // associated with the passed intent, it needs to be called after #setClassName(context,
          // CustomTabActivity.class.getName());
          // CustomTabActivity.class.getName());
-@@ -411,6 +421,18 @@ public class LaunchIntentDispatcher implements IntentHandler.IntentHandlerDelega
+@@ -415,6 +425,18 @@ public class LaunchIntentDispatcher implements IntentHandler.IntentHandlerDelega
  
  
          if (Intent.ACTION_VIEW.equals(newIntent.getAction())
          if (Intent.ACTION_VIEW.equals(newIntent.getAction())
                  && !IntentHandler.wasIntentSenderChrome(newIntent)) {
                  && !IntentHandler.wasIntentSenderChrome(newIntent)) {
@@ -196,7 +196,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
 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
 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
-@@ -4669,6 +4669,21 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+@@ -4702,6 +4702,21 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
        <message name="IDS_NEAR_OOM_REDUCTION_DECLINE" desc="The text of the button letting the user decline the browser's intervention, so that the page can be reloaded.">
        <message name="IDS_NEAR_OOM_REDUCTION_DECLINE" desc="The text of the button letting the user decline the browser's intervention, so that the page can be reloaded.">
           Show original
           Show original
        </message>
        </message>

+ 6 - 6
build/patches/Add-exit-menu-item.patch

@@ -17,7 +17,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/res/menu/main_menu.xml
 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
 --- a/chrome/android/java/res/menu/main_menu.xml
 +++ b/chrome/android/java/res/menu/main_menu.xml
 +++ b/chrome/android/java/res/menu/main_menu.xml
-@@ -156,6 +156,9 @@
+@@ -159,6 +159,9 @@
          <item android:id="@+id/managed_by_menu_id"
          <item android:id="@+id/managed_by_menu_id"
              android:title="@string/managed_browser"
              android:title="@string/managed_browser"
              android:icon="@drawable/ic_business" />
              android:icon="@drawable/ic_business" />
@@ -27,7 +27,7 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re
      </group>
      </group>
  
  
      <!-- Items shown only in the tab switcher -->
      <!-- Items shown only in the tab switcher -->
-@@ -182,6 +185,9 @@
+@@ -185,6 +188,9 @@
          <item android:id="@id/preferences_id"
          <item android:id="@id/preferences_id"
              android:title="@string/menu_settings"
              android:title="@string/menu_settings"
              android:icon="@drawable/settings_cog" />
              android:icon="@drawable/settings_cog" />
@@ -59,7 +59,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ApplicationLife
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 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
 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
-@@ -213,6 +213,8 @@ import java.util.HashSet;
+@@ -220,6 +220,8 @@ import java.util.HashSet;
  import java.util.List;
  import java.util.List;
  import java.util.Locale;
  import java.util.Locale;
  
  
@@ -68,7 +68,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct
  /**
  /**
   * This is the main activity for ChromeMobile when not running in document mode.  All the tabs
   * 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.
   * are accessible via a chrome specific tab switching UI.
-@@ -2097,6 +2099,8 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
+@@ -2126,6 +2128,8 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
          } else if (id == R.id.close_tab) {
          } else if (id == R.id.close_tab) {
              getCurrentTabModel().closeTab(currentTab, true, false, true);
              getCurrentTabModel().closeTab(currentTab, true, false, true);
              RecordUserAction.record("MobileTabClosed");
              RecordUserAction.record("MobileTabClosed");
@@ -88,7 +88,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv
  import org.chromium.chrome.browser.ChromeActivitySessionTracker;
  import org.chromium.chrome.browser.ChromeActivitySessionTracker;
  import org.chromium.chrome.browser.ChromeApplicationImpl;
  import org.chromium.chrome.browser.ChromeApplicationImpl;
  import org.chromium.chrome.browser.ChromeKeyboardVisibilityDelegate;
  import org.chromium.chrome.browser.ChromeKeyboardVisibilityDelegate;
-@@ -2395,6 +2396,11 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+@@ -2313,6 +2314,11 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
              return true;
              return true;
          }
          }
  
  
@@ -119,7 +119,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLife
 diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 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
 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
-@@ -3407,6 +3407,9 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+@@ -3443,6 +3443,9 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
        <message name="IDS_MENU_AUTO_DARK_WEB_CONTENTS" desc="Menu item in Chrome's overflow/options menu. When Chrome's browser UI is set to dark theme and this option is checked, sites will have a dark theme automatically applied as well. [CHAR_LIMIT=24]">
        <message name="IDS_MENU_AUTO_DARK_WEB_CONTENTS" desc="Menu item in Chrome's overflow/options menu. When Chrome's browser UI is set to dark theme and this option is checked, sites will have a dark theme automatically applied as well. [CHAR_LIMIT=24]">
          Dark theme
          Dark theme
        </message>
        </message>

+ 8 - 8
build/patches/Add-flag-for-omnibox-autocomplete-filtering.patch

@@ -17,7 +17,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -467,6 +467,22 @@ const FeatureEntry::FeatureVariation kReaderModeDiscoverabilityVariations[] = {
+@@ -469,6 +469,22 @@ const FeatureEntry::FeatureVariation kReaderModeDiscoverabilityVariations[] = {
  #endif  // BUILDFLAG(IS_ANDROID)
  #endif  // BUILDFLAG(IS_ANDROID)
  
  
  #if BUILDFLAG(IS_ANDROID)
  #if BUILDFLAG(IS_ANDROID)
@@ -40,7 +40,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
  const FeatureEntry::FeatureParam kAdaptiveButton_AlwaysNone[] = {
  const FeatureEntry::FeatureParam kAdaptiveButton_AlwaysNone[] = {
      {"mode", "always-none"}};
      {"mode", "always-none"}};
  const FeatureEntry::FeatureParam kAdaptiveButton_AlwaysNewTab[] = {
  const FeatureEntry::FeatureParam kAdaptiveButton_AlwaysNewTab[] = {
-@@ -3898,7 +3914,11 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -4058,7 +4074,11 @@ const FeatureEntry kFeatureEntries[] = {
       kOsMac | kOsLinux | kOsLacros | kOsWin,
       kOsMac | kOsLinux | kOsLacros | kOsWin,
       FEATURE_VALUE_TYPE(features::kSystemNotifications)},
       FEATURE_VALUE_TYPE(features::kSystemNotifications)},
  #endif  // BUILDFLAG(ENABLE_SYSTEM_NOTIFICATIONS) && !BUILDFLAG(IS_CHROMEOS_ASH)
  #endif  // BUILDFLAG(ENABLE_SYSTEM_NOTIFICATIONS) && !BUILDFLAG(IS_CHROMEOS_ASH)
@@ -65,7 +65,7 @@ diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/
  #include "base/feature_list.h"
  #include "base/feature_list.h"
  #include "base/format_macros.h"
  #include "base/format_macros.h"
  #include "base/metrics/histogram.h"
  #include "base/metrics/histogram.h"
-@@ -292,6 +294,15 @@ AutocompleteController::AutocompleteController(
+@@ -295,6 +297,15 @@ AutocompleteController::AutocompleteController(
        search_service_worker_signal_sent_(false),
        search_service_worker_signal_sent_(false),
        template_url_service_(provider_client_->GetTemplateURLService()) {
        template_url_service_(provider_client_->GetTemplateURLService()) {
    provider_types &= ~OmniboxFieldTrial::GetDisabledProviderTypes();
    provider_types &= ~OmniboxFieldTrial::GetDisabledProviderTypes();
@@ -78,13 +78,13 @@ diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/
 +    if (!base::Contains(flag_value, "chrome"))
 +    if (!base::Contains(flag_value, "chrome"))
 +      provider_types &= ~AutocompleteProvider::TYPE_BUILTIN;
 +      provider_types &= ~AutocompleteProvider::TYPE_BUILTIN;
 +  }
 +  }
-   if (provider_types & AutocompleteProvider::TYPE_BOOKMARK)
-     providers_.push_back(new BookmarkProvider(provider_client_.get()));
-   if (provider_types & AutocompleteProvider::TYPE_BUILTIN)
+   if (provider_types & AutocompleteProvider::TYPE_BOOKMARK) {
+     bookmark_provider_ = new BookmarkProvider(provider_client_.get());
+     providers_.push_back(bookmark_provider_.get());
 diff --git a/components/omnibox/browser/history_url_provider.cc b/components/omnibox/browser/history_url_provider.cc
 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
 --- a/components/omnibox/browser/history_url_provider.cc
 +++ b/components/omnibox/browser/history_url_provider.cc
 +++ b/components/omnibox/browser/history_url_provider.cc
-@@ -472,6 +472,9 @@ void HistoryURLProvider::Start(const AutocompleteInput& input,
+@@ -480,6 +480,9 @@ void HistoryURLProvider::Start(const AutocompleteInput& input,
    if (fixed_up_input.type() != metrics::OmniboxInputType::QUERY)
    if (fixed_up_input.type() != metrics::OmniboxInputType::QUERY)
      matches_.push_back(what_you_typed_match);
      matches_.push_back(what_you_typed_match);
  
  
@@ -105,7 +105,7 @@ diff --git a/components/omnibox/browser/search_provider.cc b/components/omnibox/
  #include "base/feature_list.h"
  #include "base/feature_list.h"
  #include "base/i18n/break_iterator.h"
  #include "base/i18n/break_iterator.h"
  #include "base/i18n/case_conversion.h"
  #include "base/i18n/case_conversion.h"
-@@ -658,6 +659,9 @@ void SearchProvider::Run(bool query_is_private) {
+@@ -652,6 +653,9 @@ void SearchProvider::Run(bool query_is_private) {
  }
  }
  
  
  void SearchProvider::DoHistoryQuery(bool minimal_changes) {
  void SearchProvider::DoHistoryQuery(bool minimal_changes) {

+ 3 - 3
build/patches/Add-flag-for-save-data-header.patch

@@ -15,7 +15,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -4472,7 +4472,10 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -4638,7 +4638,10 @@ const FeatureEntry kFeatureEntries[] = {
      {"force-text-direction", flag_descriptions::kForceTextDirectionName,
      {"force-text-direction", flag_descriptions::kForceTextDirectionName,
       flag_descriptions::kForceTextDirectionDescription, kOsAll,
       flag_descriptions::kForceTextDirectionDescription, kOsAll,
       MULTI_VALUE_TYPE(kForceTextDirectionChoices)},
       MULTI_VALUE_TYPE(kForceTextDirectionChoices)},
@@ -30,7 +30,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -1137,6 +1137,10 @@ const char kDeprecateAltBasedSixPackDescription[] =
+@@ -1145,6 +1145,10 @@ const char kDeprecateAltBasedSixPackDescription[] =
      "Show deprecation notifications and disable functionality for Alt based "
      "Show deprecation notifications and disable functionality for Alt based "
      "six pack deprecations. The Search based versions continue to work.";
      "six pack deprecations. The Search based versions continue to work.";
  
  
@@ -44,7 +44,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -594,6 +594,9 @@ extern const char kDeprecateAltClickDescription[];
+@@ -606,6 +606,9 @@ extern const char kDeprecateAltClickDescription[];
  extern const char kDeprecateAltBasedSixPackName[];
  extern const char kDeprecateAltBasedSixPackName[];
  extern const char kDeprecateAltBasedSixPackDescription[];
  extern const char kDeprecateAltBasedSixPackDescription[];
  
  

+ 5 - 5
build/patches/Add-flag-to-configure-maximum-connections-per-host.patch

@@ -21,8 +21,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -902,6 +902,11 @@ const FeatureEntry::FeatureVariation
-          std::size(kIsolatedPrerenderPrefetchLimitFifteen), nullptr},
+@@ -901,6 +901,11 @@ const FeatureEntry::Choice kForceColorProfileChoices[] = {
+      switches::kForceDisplayColorProfile, "hdr10"},
  };
  };
  
  
 +const FeatureEntry::Choice kMaxConnectionsPerHostChoices[] = {
 +const FeatureEntry::Choice kMaxConnectionsPerHostChoices[] = {
@@ -33,7 +33,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
  const FeatureEntry::Choice kMemlogModeChoices[] = {
  const FeatureEntry::Choice kMemlogModeChoices[] = {
      {flags_ui::kGenericExperimentChoiceDisabled, "", ""},
      {flags_ui::kGenericExperimentChoiceDisabled, "", ""},
      {flag_descriptions::kMemlogModeMinimal, heap_profiling::kMemlogMode,
      {flag_descriptions::kMemlogModeMinimal, heap_profiling::kMemlogMode,
-@@ -4428,6 +4433,9 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -4594,6 +4599,9 @@ const FeatureEntry kFeatureEntries[] = {
       flag_descriptions::kAndroidPictureInPictureAPIName,
       flag_descriptions::kAndroidPictureInPictureAPIName,
       flag_descriptions::kAndroidPictureInPictureAPIDescription, kOsAndroid,
       flag_descriptions::kAndroidPictureInPictureAPIDescription, kOsAndroid,
       FEATURE_VALUE_TYPE(media::kPictureInPictureAPI)},
       FEATURE_VALUE_TYPE(media::kPictureInPictureAPI)},
@@ -46,7 +46,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -1637,6 +1637,10 @@ const char kUnthrottledNestedTimeoutDescription[] =
+@@ -1672,6 +1672,10 @@ const char kUnthrottledNestedTimeoutDescription[] =
      "websites abusing the API will still eventually have their setTimeouts "
      "websites abusing the API will still eventually have their setTimeouts "
      "clamped.";
      "clamped.";
  
  
@@ -60,7 +60,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -920,6 +920,9 @@ extern const char kLogJsConsoleMessagesDescription[];
+@@ -941,6 +941,9 @@ extern const char kLogJsConsoleMessagesDescription[];
  extern const char kUnthrottledNestedTimeoutName[];
  extern const char kUnthrottledNestedTimeoutName[];
  extern const char kUnthrottledNestedTimeoutDescription[];
  extern const char kUnthrottledNestedTimeoutDescription[];
  
  

+ 5 - 5
build/patches/Add-flag-to-control-video-playback-resume-feature.patch

@@ -15,7 +15,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -3190,6 +3190,10 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -3329,6 +3329,10 @@ const FeatureEntry kFeatureEntries[] = {
       flag_descriptions::kWebRtcRemoteEventLogName,
       flag_descriptions::kWebRtcRemoteEventLogName,
       flag_descriptions::kWebRtcRemoteEventLogDescription, kOsDesktop,
       flag_descriptions::kWebRtcRemoteEventLogDescription, kOsDesktop,
       FEATURE_VALUE_TYPE(features::kWebRtcRemoteEventLog)},
       FEATURE_VALUE_TYPE(features::kWebRtcRemoteEventLog)},
@@ -29,7 +29,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -1221,6 +1221,11 @@ const char kEnablePenetratingImageSelectionDescription[] =
+@@ -1236,6 +1236,11 @@ const char kEnablePenetratingImageSelectionDescription[] =
      "Enables image options to be surfaced in the context menu for nodes "
      "Enables image options to be surfaced in the context menu for nodes "
      "covered by transparent overlays.";
      "covered by transparent overlays.";
  
  
@@ -44,7 +44,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -660,6 +660,9 @@ extern const char kEnablePortalsDescription[];
+@@ -676,6 +676,9 @@ extern const char kEnablePortalsDescription[];
  extern const char kEnablePortalsCrossOriginName[];
  extern const char kEnablePortalsCrossOriginName[];
  extern const char kEnablePortalsCrossOriginDescription[];
  extern const char kEnablePortalsCrossOriginDescription[];
  
  
@@ -57,7 +57,7 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
 diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
 diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
 --- a/media/base/media_switches.cc
 --- a/media/base/media_switches.cc
 +++ b/media/base/media_switches.cc
 +++ b/media/base/media_switches.cc
-@@ -289,11 +289,7 @@ const base::Feature kPreloadMetadataLazyLoad{"PreloadMetadataLazyLoad",
+@@ -282,11 +282,7 @@ const base::Feature kPreloadMetadataLazyLoad{"PreloadMetadataLazyLoad",
  // when in background.
  // when in background.
  const base::Feature kResumeBackgroundVideo {
  const base::Feature kResumeBackgroundVideo {
    "resume-background-video",
    "resume-background-video",
@@ -68,6 +68,6 @@ diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
 -#endif
 -#endif
  };
  };
  
  
- // Experimental: Try to avoid destroying the media player when transferring a
+ // When enabled, MediaCapabilities will check with GPU Video Accelerator
 --
 --
 2.25.1
 2.25.1

+ 4 - 4
build/patches/Add-flag-to-disable-IPv6-probes.patch

@@ -17,7 +17,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -5348,6 +5348,10 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -5536,6 +5536,10 @@ const FeatureEntry kFeatureEntries[] = {
      {"enable-reader-mode-in-cct", flag_descriptions::kReaderModeInCCTName,
      {"enable-reader-mode-in-cct", flag_descriptions::kReaderModeInCCTName,
       flag_descriptions::kReaderModeInCCTDescription, kOsAndroid,
       flag_descriptions::kReaderModeInCCTDescription, kOsAndroid,
       FEATURE_VALUE_TYPE(chrome::android::kReaderModeInCCT)},
       FEATURE_VALUE_TYPE(chrome::android::kReaderModeInCCT)},
@@ -31,7 +31,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -3071,6 +3071,10 @@ const char kCCTResizableForThirdPartiesName[] =
+@@ -3150,6 +3150,10 @@ const char kCCTResizableForThirdPartiesName[] =
  const char kCCTResizableForThirdPartiesDescription[] =
  const char kCCTResizableForThirdPartiesDescription[] =
      "Enable bottom sheet Custom Tabs for third party apps.";
      "Enable bottom sheet Custom Tabs for third party apps.";
  
  
@@ -45,7 +45,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -729,6 +729,9 @@ extern const char kEnableWasmLazyCompilationName[];
+@@ -742,6 +742,9 @@ extern const char kEnableWasmLazyCompilationName[];
  extern const char kEnableWasmLazyCompilationDescription[];
  extern const char kEnableWasmLazyCompilationDescription[];
  
  
  extern const char kEnableWasmTieringName[];
  extern const char kEnableWasmTieringName[];
@@ -109,7 +109,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/log/net_log_with_source.h"
  #include "net/socket/client_socket_factory.h"
  #include "net/socket/client_socket_factory.h"
  #include "net/socket/datagram_client_socket.h"
  #include "net/socket/datagram_client_socket.h"
-@@ -4102,8 +4103,14 @@ bool HostResolverManager::IsIPv6Reachable(const NetLogWithSource& net_log) {
+@@ -4092,8 +4093,14 @@ bool HostResolverManager::IsIPv6Reachable(const NetLogWithSource& net_log) {
    if (last_ipv6_probe_time_.is_null() ||
    if (last_ipv6_probe_time_.is_null() ||
        (tick_clock_->NowTicks() - last_ipv6_probe_time_).InMilliseconds() >
        (tick_clock_->NowTicks() - last_ipv6_probe_time_).InMilliseconds() >
            kIPv6ProbePeriodMs) {
            kIPv6ProbePeriodMs) {

+ 3 - 3
build/patches/Add-flag-to-disable-external-intent-requests.patch

@@ -12,7 +12,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -3171,6 +3171,9 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -3310,6 +3310,9 @@ const FeatureEntry kFeatureEntries[] = {
      {"ui-disable-partial-swap", flag_descriptions::kUiPartialSwapName,
      {"ui-disable-partial-swap", flag_descriptions::kUiPartialSwapName,
       flag_descriptions::kUiPartialSwapDescription, kOsAll,
       flag_descriptions::kUiPartialSwapDescription, kOsAll,
       SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)},
       SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)},
@@ -25,7 +25,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -3422,6 +3422,12 @@ const char kPhotoPickerVideoSupportName[] = "Photo Picker Video Support";
+@@ -3522,6 +3522,12 @@ const char kPhotoPickerVideoSupportName[] = "Photo Picker Video Support";
  const char kPhotoPickerVideoSupportDescription[] =
  const char kPhotoPickerVideoSupportDescription[] =
      "Enables video files to be shown in the Photo Picker dialog";
      "Enables video files to be shown in the Photo Picker dialog";
  
  
@@ -41,7 +41,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -1957,6 +1957,9 @@ extern const char kQueryTilesDescription[];
+@@ -2018,6 +2018,9 @@ extern const char kQueryTilesDescription[];
  extern const char kQueryTilesNTPName[];
  extern const char kQueryTilesNTPName[];
  extern const char kQueryTilesNTPDescription[];
  extern const char kQueryTilesNTPDescription[];
  extern const char kQueryTilesSingleTierName[];
  extern const char kQueryTilesSingleTierName[];

+ 6 - 6
build/patches/Add-flag-to-disable-vibration.patch

@@ -19,7 +19,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -6677,6 +6677,10 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -6874,6 +6874,10 @@ const FeatureEntry kFeatureEntries[] = {
       FEATURE_VALUE_TYPE(features::kNewMacNotificationAPI)},
       FEATURE_VALUE_TYPE(features::kNewMacNotificationAPI)},
  #endif
  #endif
  
  
@@ -33,7 +33,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -5626,6 +5626,9 @@ extern const char kLacrosScreenCoordinatesDescription[];
+@@ -5769,6 +5769,9 @@ extern const char kLacrosScreenCoordinatesDescription[];
  
  
  #endif  // #if BUILDFLAG(IS_CHROMEOS_LACROS)
  #endif  // #if BUILDFLAG(IS_CHROMEOS_LACROS)
  
  
@@ -46,7 +46,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -3427,6 +3427,8 @@ extern const char kWebUITabStripTabDragIntegrationName[];
+@@ -3515,6 +3515,8 @@ extern const char kWebUITabStripTabDragIntegrationName[];
  extern const char kWebUITabStripTabDragIntegrationDescription[];
  extern const char kWebUITabStripTabDragIntegrationDescription[];
  #endif  // BUILDFLAG(ENABLE_WEBUI_TAB_STRIP) && BUILDFLAG(IS_CHROMEOS_ASH)
  #endif  // BUILDFLAG(ENABLE_WEBUI_TAB_STRIP) && BUILDFLAG(IS_CHROMEOS_ASH)
  
  
@@ -83,7 +83,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
 diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h
 --- a/content/public/common/content_features.h
 --- a/content/public/common/content_features.h
 +++ b/content/public/common/content_features.h
 +++ b/content/public/common/content_features.h
-@@ -310,6 +310,8 @@ CONTENT_EXPORT extern const base::FeatureParam<base::TimeDelta>
+@@ -308,6 +308,8 @@ CONTENT_EXPORT extern const base::FeatureParam<base::TimeDelta>
      kCompositorLockTimeout;
      kCompositorLockTimeout;
  
  
  #endif  // BUILDFLAG(IS_ANDROID)
  #endif  // BUILDFLAG(IS_ANDROID)
@@ -114,7 +114,7 @@ diff --git a/third_party/blink/renderer/modules/vibration/vibration_controller.c
  
  
  // Maximum number of entries in a vibration pattern.
  // Maximum number of entries in a vibration pattern.
  const unsigned kVibrationPatternLengthMax = 99;
  const unsigned kVibrationPatternLengthMax = 99;
-@@ -152,6 +153,8 @@ bool VibrationController::vibrate(Navigator& navigator,
+@@ -153,6 +154,8 @@ bool VibrationController::vibrate(Navigator& navigator,
    // reference to |window| or |navigator| was retained in another window.
    // reference to |window| or |navigator| was retained in another window.
    if (!navigator.DomWindow())
    if (!navigator.DomWindow())
      return false;
      return false;
@@ -140,7 +140,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
 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
 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
-@@ -1630,6 +1630,10 @@
+@@ -1653,6 +1653,10 @@
        name: "OrientationEvent",
        name: "OrientationEvent",
        status: {"Android": "stable"},
        status: {"Android": "stable"},
      },
      },

+ 3 - 3
build/patches/Add-gn-flag-for-clangd-builds.patch

@@ -16,7 +16,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
 diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
 --- a/build/config/compiler/BUILD.gn
 --- a/build/config/compiler/BUILD.gn
 +++ b/build/config/compiler/BUILD.gn
 +++ b/build/config/compiler/BUILD.gn
-@@ -1531,7 +1531,7 @@ config("default_warnings") {
+@@ -1537,7 +1537,7 @@ config("default_warnings") {
          "-Wno-ignored-pragma-optimize",
          "-Wno-ignored-pragma-optimize",
        ]
        ]
  
  
@@ -25,8 +25,8 @@ diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
          # TODO(https://crbug.com/1300731) Clean up and enable.
          # TODO(https://crbug.com/1300731) Clean up and enable.
          cflags += [ "-Wno-unqualified-std-cast-call" ]
          cflags += [ "-Wno-unqualified-std-cast-call" ]
        }
        }
-@@ -1541,8 +1541,12 @@ config("default_warnings") {
-         # TODO(https://crbug.com/1316298): Re-enable once test failure is figured out
+@@ -1547,8 +1547,12 @@ config("default_warnings") {
+         # TODO(https://crbug.com/1322823): Remove flags once potential miscompile is investigated.
          cflags += [
          cflags += [
            "-Xclang",
            "-Xclang",
 -          "-no-opaque-pointers",
 -          "-no-opaque-pointers",

+ 37 - 37
build/patches/Add-lifetime-options-for-permissions.patch

@@ -186,8 +186,8 @@ diff --git a/chrome/browser/permissions/last_tab_standing_tracker_factory.cc b/c
 diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
 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
 --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
 +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
 +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
-@@ -378,10 +378,7 @@ void ChromeBrowserMainExtraPartsProfiles::
-   InstantServiceFactory::GetInstance();
+@@ -386,10 +386,7 @@ void ChromeBrowserMainExtraPartsProfiles::
+   LacrosFirstRunServiceFactory::GetInstance();
  #endif
  #endif
    LanguageModelManagerFactory::GetInstance();
    LanguageModelManagerFactory::GetInstance();
 -  if (base::FeatureList::IsEnabled(
 -  if (base::FeatureList::IsEnabled(
@@ -201,7 +201,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
 diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
 diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
 --- a/chrome/browser/ui/tab_helpers.cc
 --- a/chrome/browser/ui/tab_helpers.cc
 +++ b/chrome/browser/ui/tab_helpers.cc
 +++ b/chrome/browser/ui/tab_helpers.cc
-@@ -481,6 +481,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
+@@ -485,6 +485,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
          web_contents);
          web_contents);
    }
    }
    video_tutorials::VideoTutorialTabHelper::CreateForWebContents(web_contents);
    video_tutorials::VideoTutorialTabHelper::CreateForWebContents(web_contents);
@@ -338,7 +338,7 @@ diff --git a/components/browser_ui/site_settings/android/website_preference_brid
    }
    }
  
  
    // Add any origins which have a default content setting value (thus skipped
    // Add any origins which have a default content setting value (thus skipped
-@@ -176,7 +177,7 @@ void GetOrigins(JNIEnv* env,
+@@ -175,7 +176,7 @@ void GetOrigins(JNIEnv* env,
        seen_origins.push_back(origin);
        seen_origins.push_back(origin);
        insertionFunc(env, static_cast<int>(content_type), list,
        insertionFunc(env, static_cast<int>(content_type), list,
                      ConvertOriginToJavaString(env, origin), jembedder,
                      ConvertOriginToJavaString(env, origin), jembedder,
@@ -350,7 +350,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
 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
 --- a/components/browser_ui/strings/android/browser_ui_strings.grd
 +++ b/components/browser_ui/strings/android/browser_ui_strings.grd
 +++ b/components/browser_ui/strings/android/browser_ui_strings.grd
-@@ -590,6 +590,11 @@
+@@ -593,6 +593,11 @@
        <message name="IDS_PAGE_INFO_URL_TRUNCATED" desc="Accessibility announcement when the URL in PageInfo switches from full to truncated display">
        <message name="IDS_PAGE_INFO_URL_TRUNCATED" desc="Accessibility announcement when the URL in PageInfo switches from full to truncated display">
          URL truncated
          URL truncated
        </message>
        </message>
@@ -441,7 +441,7 @@ diff --git a/components/content_settings/core/browser/host_content_settings_map.
 diff --git a/components/content_settings/core/common/content_settings.cc b/components/content_settings/core/common/content_settings.cc
 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
 --- a/components/content_settings/core/common/content_settings.cc
 +++ b/components/content_settings/core/common/content_settings.cc
 +++ b/components/content_settings/core/common/content_settings.cc
-@@ -156,13 +156,15 @@ ContentSettingPatternSource::ContentSettingPatternSource(
+@@ -157,13 +157,15 @@ ContentSettingPatternSource::ContentSettingPatternSource(
      base::Value setting_value,
      base::Value setting_value,
      const std::string& source,
      const std::string& source,
      bool incognito,
      bool incognito,
@@ -459,7 +459,7 @@ diff --git a/components/content_settings/core/common/content_settings.cc b/compo
  
  
  ContentSettingPatternSource::ContentSettingPatternSource() : incognito(false) {}
  ContentSettingPatternSource::ContentSettingPatternSource() : incognito(false) {}
  
  
-@@ -179,6 +181,7 @@ ContentSettingPatternSource& ContentSettingPatternSource::operator=(
+@@ -180,6 +182,7 @@ ContentSettingPatternSource& ContentSettingPatternSource::operator=(
    expiration = other.expiration;
    expiration = other.expiration;
    source = other.source;
    source = other.source;
    incognito = other.incognito;
    incognito = other.incognito;
@@ -519,7 +519,7 @@ diff --git a/components/content_settings/core/common/content_settings_constraint
 diff --git a/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoController.java b/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoController.java
 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
 --- 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
 +++ b/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoController.java
-@@ -383,9 +383,9 @@ public class PageInfoController implements PageInfoMainController, ModalDialogPr
+@@ -360,9 +360,9 @@ public class PageInfoController implements PageInfoMainController, ModalDialogPr
       */
       */
      @CalledByNative
      @CalledByNative
      private void addPermissionSection(String name, String nameMidSentence, int type,
      private void addPermissionSection(String name, String nameMidSentence, int type,
@@ -618,7 +618,7 @@ diff --git a/components/page_info/android/page_info_controller_android.cc b/comp
 diff --git a/components/page_info/page_info.cc b/components/page_info/page_info.cc
 diff --git a/components/page_info/page_info.cc b/components/page_info/page_info.cc
 --- a/components/page_info/page_info.cc
 --- a/components/page_info/page_info.cc
 +++ b/components/page_info/page_info.cc
 +++ b/components/page_info/page_info.cc
-@@ -1057,6 +1057,8 @@ void PageInfo::PresentSitePermissions() {
+@@ -1055,6 +1055,8 @@ void PageInfo::PresentSitePermissions() {
      permission_info.source = info.source;
      permission_info.source = info.source;
      permission_info.is_one_time =
      permission_info.is_one_time =
          (info.session_model == content_settings::SessionModel::OneTime);
          (info.session_model == content_settings::SessionModel::OneTime);
@@ -894,7 +894,7 @@ diff --git a/components/permissions/android/permissions_android_strings.grd b/co
 diff --git a/components/permissions/contexts/geolocation_permission_context_android.cc b/components/permissions/contexts/geolocation_permission_context_android.cc
 diff --git a/components/permissions/contexts/geolocation_permission_context_android.cc b/components/permissions/contexts/geolocation_permission_context_android.cc
 --- a/components/permissions/contexts/geolocation_permission_context_android.cc
 --- a/components/permissions/contexts/geolocation_permission_context_android.cc
 +++ b/components/permissions/contexts/geolocation_permission_context_android.cc
 +++ b/components/permissions/contexts/geolocation_permission_context_android.cc
-@@ -157,6 +157,19 @@ void GeolocationPermissionContextAndroid::NotifyPermissionSet(
+@@ -158,6 +158,19 @@ void GeolocationPermissionContextAndroid::NotifyPermissionSet(
      ContentSetting content_setting,
      ContentSetting content_setting,
      bool is_one_time) {
      bool is_one_time) {
    DCHECK(!is_one_time);
    DCHECK(!is_one_time);
@@ -914,7 +914,7 @@ diff --git a/components/permissions/contexts/geolocation_permission_context_andr
    bool is_default_search = IsRequestingOriginDSE(requesting_origin);
    bool is_default_search = IsRequestingOriginDSE(requesting_origin);
    if (content_setting == CONTENT_SETTING_ALLOW &&
    if (content_setting == CONTENT_SETTING_ALLOW &&
        !location_settings_->IsSystemLocationSettingEnabled()) {
        !location_settings_->IsSystemLocationSettingEnabled()) {
-@@ -169,7 +182,8 @@ void GeolocationPermissionContextAndroid::NotifyPermissionSet(
+@@ -170,7 +183,8 @@ void GeolocationPermissionContextAndroid::NotifyPermissionSet(
      if (IsInLocationSettingsBackOff(is_default_search)) {
      if (IsInLocationSettingsBackOff(is_default_search)) {
        FinishNotifyPermissionSet(id, requesting_origin, embedding_origin,
        FinishNotifyPermissionSet(id, requesting_origin, embedding_origin,
                                  std::move(callback), false /* persist */,
                                  std::move(callback), false /* persist */,
@@ -924,7 +924,7 @@ diff --git a/components/permissions/contexts/geolocation_permission_context_andr
        LogLocationSettingsMetric(
        LogLocationSettingsMetric(
            kLocationSettingsSuppressMetricBase, is_default_search,
            kLocationSettingsSuppressMetricBase, is_default_search,
            LocationSettingsBackOffLevel(is_default_search));
            LocationSettingsBackOffLevel(is_default_search));
-@@ -194,7 +208,8 @@ void GeolocationPermissionContextAndroid::NotifyPermissionSet(
+@@ -195,7 +209,8 @@ void GeolocationPermissionContextAndroid::NotifyPermissionSet(
          !location_settings_dialog_callback_.is_null()) {
          !location_settings_dialog_callback_.is_null()) {
        FinishNotifyPermissionSet(id, requesting_origin, embedding_origin,
        FinishNotifyPermissionSet(id, requesting_origin, embedding_origin,
                                  std::move(callback), false /* persist */,
                                  std::move(callback), false /* persist */,
@@ -934,7 +934,7 @@ diff --git a/components/permissions/contexts/geolocation_permission_context_andr
        // This case should be very rare, so just pretend it was a denied prompt
        // This case should be very rare, so just pretend it was a denied prompt
        // for metrics purposes.
        // for metrics purposes.
        LogLocationSettingsMetric(
        LogLocationSettingsMetric(
-@@ -211,12 +226,13 @@ void GeolocationPermissionContextAndroid::NotifyPermissionSet(
+@@ -212,12 +227,13 @@ void GeolocationPermissionContextAndroid::NotifyPermissionSet(
          base::BindOnce(
          base::BindOnce(
              &GeolocationPermissionContextAndroid::OnLocationSettingsDialogShown,
              &GeolocationPermissionContextAndroid::OnLocationSettingsDialogShown,
              weak_factory_.GetWeakPtr(), requesting_origin, embedding_origin,
              weak_factory_.GetWeakPtr(), requesting_origin, embedding_origin,
@@ -950,7 +950,7 @@ diff --git a/components/permissions/contexts/geolocation_permission_context_andr
  }
  }
  
  
  PermissionResult
  PermissionResult
-@@ -383,6 +399,7 @@ void GeolocationPermissionContextAndroid::OnLocationSettingsDialogShown(
+@@ -384,6 +400,7 @@ void GeolocationPermissionContextAndroid::OnLocationSettingsDialogShown(
      const GURL& embedding_origin,
      const GURL& embedding_origin,
      bool persist,
      bool persist,
      ContentSetting content_setting,
      ContentSetting content_setting,
@@ -958,7 +958,7 @@ diff --git a/components/permissions/contexts/geolocation_permission_context_andr
      LocationSettingsDialogOutcome prompt_outcome) {
      LocationSettingsDialogOutcome prompt_outcome) {
    bool is_default_search = IsRequestingOriginDSE(requesting_origin);
    bool is_default_search = IsRequestingOriginDSE(requesting_origin);
    if (prompt_outcome == GRANTED) {
    if (prompt_outcome == GRANTED) {
-@@ -410,7 +427,8 @@ void GeolocationPermissionContextAndroid::OnLocationSettingsDialogShown(
+@@ -411,7 +428,8 @@ void GeolocationPermissionContextAndroid::OnLocationSettingsDialogShown(
  
  
    FinishNotifyPermissionSet(
    FinishNotifyPermissionSet(
        location_settings_dialog_request_id_, requesting_origin, embedding_origin,
        location_settings_dialog_request_id_, requesting_origin, embedding_origin,
@@ -968,7 +968,7 @@ diff --git a/components/permissions/contexts/geolocation_permission_context_andr
  
  
    location_settings_dialog_request_id_ =
    location_settings_dialog_request_id_ =
        PermissionRequestID(0, 0, PermissionRequestID::RequestLocalId());
        PermissionRequestID(0, 0, PermissionRequestID::RequestLocalId());
-@@ -422,10 +440,11 @@ void GeolocationPermissionContextAndroid::FinishNotifyPermissionSet(
+@@ -423,10 +441,11 @@ void GeolocationPermissionContextAndroid::FinishNotifyPermissionSet(
      const GURL& embedding_origin,
      const GURL& embedding_origin,
      BrowserPermissionCallback callback,
      BrowserPermissionCallback callback,
      bool persist,
      bool persist,
@@ -986,7 +986,7 @@ diff --git a/components/permissions/contexts/geolocation_permission_context_andr
 diff --git a/components/permissions/contexts/geolocation_permission_context_android.h b/components/permissions/contexts/geolocation_permission_context_android.h
 diff --git a/components/permissions/contexts/geolocation_permission_context_android.h b/components/permissions/contexts/geolocation_permission_context_android.h
 --- a/components/permissions/contexts/geolocation_permission_context_android.h
 --- a/components/permissions/contexts/geolocation_permission_context_android.h
 +++ b/components/permissions/contexts/geolocation_permission_context_android.h
 +++ b/components/permissions/contexts/geolocation_permission_context_android.h
-@@ -88,6 +88,14 @@ class GeolocationPermissionContextAndroid
+@@ -87,6 +87,14 @@ class GeolocationPermissionContextAndroid
                             bool persist,
                             bool persist,
                             ContentSetting content_setting,
                             ContentSetting content_setting,
                             bool is_one_time) override;
                             bool is_one_time) override;
@@ -1001,7 +1001,7 @@ diff --git a/components/permissions/contexts/geolocation_permission_context_andr
    PermissionResult UpdatePermissionStatusWithDeviceStatus(
    PermissionResult UpdatePermissionStatusWithDeviceStatus(
        PermissionResult result,
        PermissionResult result,
        const GURL& requesting_origin,
        const GURL& requesting_origin,
-@@ -130,6 +138,7 @@ class GeolocationPermissionContextAndroid
+@@ -129,6 +137,7 @@ class GeolocationPermissionContextAndroid
        const GURL& embedding_origin,
        const GURL& embedding_origin,
        bool persist,
        bool persist,
        ContentSetting content_setting,
        ContentSetting content_setting,
@@ -1009,7 +1009,7 @@ diff --git a/components/permissions/contexts/geolocation_permission_context_andr
        LocationSettingsDialogOutcome prompt_outcome);
        LocationSettingsDialogOutcome prompt_outcome);
  
  
    void FinishNotifyPermissionSet(const PermissionRequestID& id,
    void FinishNotifyPermissionSet(const PermissionRequestID& id,
-@@ -137,7 +146,9 @@ class GeolocationPermissionContextAndroid
+@@ -136,7 +145,9 @@ class GeolocationPermissionContextAndroid
                                   const GURL& embedding_origin,
                                   const GURL& embedding_origin,
                                   BrowserPermissionCallback callback,
                                   BrowserPermissionCallback callback,
                                   bool persist,
                                   bool persist,
@@ -1023,7 +1023,7 @@ diff --git a/components/permissions/contexts/geolocation_permission_context_andr
 diff --git a/components/permissions/permission_context_base.cc b/components/permissions/permission_context_base.cc
 diff --git a/components/permissions/permission_context_base.cc b/components/permissions/permission_context_base.cc
 --- a/components/permissions/permission_context_base.cc
 --- a/components/permissions/permission_context_base.cc
 +++ b/components/permissions/permission_context_base.cc
 +++ b/components/permissions/permission_context_base.cc
-@@ -244,6 +244,20 @@ PermissionContextBase::CreatePermissionRequest(
+@@ -250,6 +250,20 @@ PermissionContextBase::CreatePermissionRequest(
        std::move(delete_callback));
        std::move(delete_callback));
  }
  }
  
  
@@ -1044,7 +1044,7 @@ diff --git a/components/permissions/permission_context_base.cc b/components/perm
  PermissionResult PermissionContextBase::GetPermissionStatus(
  PermissionResult PermissionContextBase::GetPermissionStatus(
      content::RenderFrameHost* render_frame_host,
      content::RenderFrameHost* render_frame_host,
      const GURL& requesting_origin,
      const GURL& requesting_origin,
-@@ -436,7 +450,8 @@ void PermissionContextBase::PermissionDecided(
+@@ -441,7 +455,8 @@ void PermissionContextBase::PermissionDecided(
      const GURL& embedding_origin,
      const GURL& embedding_origin,
      BrowserPermissionCallback callback,
      BrowserPermissionCallback callback,
      ContentSetting content_setting,
      ContentSetting content_setting,
@@ -1054,7 +1054,7 @@ diff --git a/components/permissions/permission_context_base.cc b/components/perm
    DCHECK(content_setting == CONTENT_SETTING_ALLOW ||
    DCHECK(content_setting == CONTENT_SETTING_ALLOW ||
           content_setting == CONTENT_SETTING_BLOCK ||
           content_setting == CONTENT_SETTING_BLOCK ||
           content_setting == CONTENT_SETTING_DEFAULT);
           content_setting == CONTENT_SETTING_DEFAULT);
-@@ -444,9 +459,9 @@ void PermissionContextBase::PermissionDecided(
+@@ -449,9 +464,9 @@ void PermissionContextBase::PermissionDecided(
                               content_setting);
                               content_setting);
  
  
    bool persist = content_setting != CONTENT_SETTING_DEFAULT;
    bool persist = content_setting != CONTENT_SETTING_DEFAULT;
@@ -1066,7 +1066,7 @@ diff --git a/components/permissions/permission_context_base.cc b/components/perm
  }
  }
  
  
  content::BrowserContext* PermissionContextBase::browser_context() const {
  content::BrowserContext* PermissionContextBase::browser_context() const {
-@@ -496,11 +511,26 @@ void PermissionContextBase::NotifyPermissionSet(
+@@ -501,11 +516,26 @@ void PermissionContextBase::NotifyPermissionSet(
      bool persist,
      bool persist,
      ContentSetting content_setting,
      ContentSetting content_setting,
      bool is_one_time) {
      bool is_one_time) {
@@ -1094,7 +1094,7 @@ diff --git a/components/permissions/permission_context_base.cc b/components/perm
    }
    }
  
  
    UpdateTabContext(id, requesting_origin,
    UpdateTabContext(id, requesting_origin,
-@@ -521,6 +551,15 @@ void PermissionContextBase::UpdateContentSetting(const GURL& requesting_origin,
+@@ -526,6 +556,15 @@ void PermissionContextBase::UpdateContentSetting(const GURL& requesting_origin,
                                                   const GURL& embedding_origin,
                                                   const GURL& embedding_origin,
                                                   ContentSetting content_setting,
                                                   ContentSetting content_setting,
                                                   bool is_one_time) {
                                                   bool is_one_time) {
@@ -1110,7 +1110,7 @@ diff --git a/components/permissions/permission_context_base.cc b/components/perm
    DCHECK_EQ(requesting_origin, requesting_origin.DeprecatedGetOriginAsURL());
    DCHECK_EQ(requesting_origin, requesting_origin.DeprecatedGetOriginAsURL());
    DCHECK_EQ(embedding_origin, embedding_origin.DeprecatedGetOriginAsURL());
    DCHECK_EQ(embedding_origin, embedding_origin.DeprecatedGetOriginAsURL());
    DCHECK(content_setting == CONTENT_SETTING_ALLOW ||
    DCHECK(content_setting == CONTENT_SETTING_ALLOW ||
-@@ -532,8 +571,7 @@ void PermissionContextBase::UpdateContentSetting(const GURL& requesting_origin,
+@@ -537,8 +576,7 @@ void PermissionContextBase::UpdateContentSetting(const GURL& requesting_origin,
        ->SetContentSettingDefaultScope(
        ->SetContentSettingDefaultScope(
            requesting_origin, embedding_origin, content_settings_type_,
            requesting_origin, embedding_origin, content_settings_type_,
            content_setting,
            content_setting,
@@ -1123,7 +1123,7 @@ diff --git a/components/permissions/permission_context_base.cc b/components/perm
 diff --git a/components/permissions/permission_context_base.h b/components/permissions/permission_context_base.h
 diff --git a/components/permissions/permission_context_base.h b/components/permissions/permission_context_base.h
 --- a/components/permissions/permission_context_base.h
 --- a/components/permissions/permission_context_base.h
 +++ b/components/permissions/permission_context_base.h
 +++ b/components/permissions/permission_context_base.h
-@@ -143,6 +143,14 @@ class PermissionContextBase : public KeyedService,
+@@ -141,6 +141,14 @@ class PermissionContextBase : public KeyedService,
  
  
    // Updates stored content setting if persist is set, updates tab indicators
    // Updates stored content setting if persist is set, updates tab indicators
    // and runs the callback to finish the request.
    // and runs the callback to finish the request.
@@ -1138,7 +1138,7 @@ diff --git a/components/permissions/permission_context_base.h b/components/permi
    virtual void NotifyPermissionSet(const PermissionRequestID& id,
    virtual void NotifyPermissionSet(const PermissionRequestID& id,
                                     const GURL& requesting_origin,
                                     const GURL& requesting_origin,
                                     const GURL& embedding_origin,
                                     const GURL& embedding_origin,
-@@ -163,6 +171,11 @@ class PermissionContextBase : public KeyedService,
+@@ -161,6 +169,11 @@ class PermissionContextBase : public KeyedService,
    // Store the decided permission as a content setting.
    // Store the decided permission as a content setting.
    // virtual since the permission might be stored with different restrictions
    // virtual since the permission might be stored with different restrictions
    // (for example for desktop notifications).
    // (for example for desktop notifications).
@@ -1150,7 +1150,7 @@ diff --git a/components/permissions/permission_context_base.h b/components/permi
    virtual void UpdateContentSetting(const GURL& requesting_origin,
    virtual void UpdateContentSetting(const GURL& requesting_origin,
                                      const GURL& embedding_origin,
                                      const GURL& embedding_origin,
                                      ContentSetting content_setting,
                                      ContentSetting content_setting,
-@@ -195,6 +208,14 @@ class PermissionContextBase : public KeyedService,
+@@ -193,6 +206,14 @@ class PermissionContextBase : public KeyedService,
        PermissionRequest::PermissionDecidedCallback permission_decided_callback,
        PermissionRequest::PermissionDecidedCallback permission_decided_callback,
        base::OnceClosure delete_callback) const;
        base::OnceClosure delete_callback) const;
  
  
@@ -1165,7 +1165,7 @@ diff --git a/components/permissions/permission_context_base.h b/components/permi
    ContentSettingsType content_settings_type() const {
    ContentSettingsType content_settings_type() const {
      return content_settings_type_;
      return content_settings_type_;
    }
    }
-@@ -221,7 +242,8 @@ class PermissionContextBase : public KeyedService,
+@@ -219,7 +240,8 @@ class PermissionContextBase : public KeyedService,
                           const GURL& embedding_origin,
                           const GURL& embedding_origin,
                           BrowserPermissionCallback callback,
                           BrowserPermissionCallback callback,
                           ContentSetting content_setting,
                           ContentSetting content_setting,
@@ -1302,7 +1302,7 @@ 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
 diff --git a/components/permissions/permission_request_manager.cc b/components/permissions/permission_request_manager.cc
 --- a/components/permissions/permission_request_manager.cc
 --- a/components/permissions/permission_request_manager.cc
 +++ b/components/permissions/permission_request_manager.cc
 +++ b/components/permissions/permission_request_manager.cc
-@@ -162,7 +162,7 @@ void PermissionRequestManager::AddRequest(
+@@ -152,7 +152,7 @@ void PermissionRequestManager::AddRequest(
  
  
    if (base::CommandLine::ForCurrentProcess()->HasSwitch(
    if (base::CommandLine::ForCurrentProcess()->HasSwitch(
            switches::kDenyPermissionPrompts)) {
            switches::kDenyPermissionPrompts)) {
@@ -1311,7 +1311,7 @@ diff --git a/components/permissions/permission_request_manager.cc b/components/p
      request->RequestFinished();
      request->RequestFinished();
      return;
      return;
    }
    }
-@@ -238,7 +238,7 @@ void PermissionRequestManager::AddRequest(
+@@ -228,7 +228,7 @@ void PermissionRequestManager::AddRequest(
    if (auto_approval_origin) {
    if (auto_approval_origin) {
      if (url::Origin::Create(request->requesting_origin()) ==
      if (url::Origin::Create(request->requesting_origin()) ==
          auto_approval_origin.value()) {
          auto_approval_origin.value()) {
@@ -1320,7 +1320,7 @@ diff --git a/components/permissions/permission_request_manager.cc b/components/p
      }
      }
      request->RequestFinished();
      request->RequestFinished();
      return;
      return;
-@@ -498,12 +498,13 @@ void PermissionRequestManager::Accept() {
+@@ -488,12 +488,13 @@ void PermissionRequestManager::Accept() {
    for (requests_iter = requests_.begin(); requests_iter != requests_.end();
    for (requests_iter = requests_.begin(); requests_iter != requests_.end();
         requests_iter++) {
         requests_iter++) {
      PermissionGrantedIncludingDuplicates(*requests_iter,
      PermissionGrantedIncludingDuplicates(*requests_iter,
@@ -1336,7 +1336,7 @@ diff --git a/components/permissions/permission_request_manager.cc b/components/p
    if (ignore_callbacks_from_prompt_)
    if (ignore_callbacks_from_prompt_)
      return;
      return;
    DCHECK(view_);
    DCHECK(view_);
-@@ -511,12 +512,22 @@ void PermissionRequestManager::AcceptThisTime() {
+@@ -501,12 +502,22 @@ void PermissionRequestManager::AcceptThisTime() {
    for (requests_iter = requests_.begin(); requests_iter != requests_.end();
    for (requests_iter = requests_.begin(); requests_iter != requests_.end();
         requests_iter++) {
         requests_iter++) {
      PermissionGrantedIncludingDuplicates(*requests_iter,
      PermissionGrantedIncludingDuplicates(*requests_iter,
@@ -1360,7 +1360,7 @@ diff --git a/components/permissions/permission_request_manager.cc b/components/p
    if (ignore_callbacks_from_prompt_)
    if (ignore_callbacks_from_prompt_)
      return;
      return;
    DCHECK(view_);
    DCHECK(view_);
-@@ -538,7 +549,7 @@ void PermissionRequestManager::Deny() {
+@@ -528,7 +539,7 @@ void PermissionRequestManager::Deny() {
    std::vector<PermissionRequest*>::iterator requests_iter;
    std::vector<PermissionRequest*>::iterator requests_iter;
    for (requests_iter = requests_.begin(); requests_iter != requests_.end();
    for (requests_iter = requests_.begin(); requests_iter != requests_.end();
         requests_iter++) {
         requests_iter++) {
@@ -1369,7 +1369,7 @@ diff --git a/components/permissions/permission_request_manager.cc b/components/p
    }
    }
    FinalizeCurrentRequests(PermissionAction::DENIED);
    FinalizeCurrentRequests(PermissionAction::DENIED);
  }
  }
-@@ -890,25 +901,26 @@ PermissionRequest* PermissionRequestManager::GetExistingRequest(
+@@ -885,25 +896,26 @@ PermissionRequest* PermissionRequestManager::GetExistingRequest(
  
  
  void PermissionRequestManager::PermissionGrantedIncludingDuplicates(
  void PermissionRequestManager::PermissionGrantedIncludingDuplicates(
      PermissionRequest* request,
      PermissionRequest* request,
@@ -1402,7 +1402,7 @@ diff --git a/components/permissions/permission_request_manager.cc b/components/p
  }
  }
  
  
  void PermissionRequestManager::CancelledIncludingDuplicates(
  void PermissionRequestManager::CancelledIncludingDuplicates(
-@@ -1084,7 +1096,7 @@ void PermissionRequestManager::LogWarningToConsole(const char* message) {
+@@ -1079,7 +1091,7 @@ void PermissionRequestManager::LogWarningToConsole(const char* message) {
  void PermissionRequestManager::DoAutoResponseForTesting() {
  void PermissionRequestManager::DoAutoResponseForTesting() {
    switch (auto_response_for_test_) {
    switch (auto_response_for_test_) {
      case ACCEPT_ONCE:
      case ACCEPT_ONCE:
@@ -1426,7 +1426,7 @@ diff --git a/components/permissions/permission_request_manager.h b/components/pe
    void Dismiss() override;
    void Dismiss() override;
    void Ignore() override;
    void Ignore() override;
    bool WasCurrentRequestAlreadyDisplayed() override;
    bool WasCurrentRequestAlreadyDisplayed() override;
-@@ -272,9 +274,12 @@ class PermissionRequestManager
+@@ -273,9 +275,12 @@ class PermissionRequestManager
  
  
    // Calls PermissionGranted on a request and all its duplicates.
    // Calls PermissionGranted on a request and all its duplicates.
    void PermissionGrantedIncludingDuplicates(PermissionRequest* request,
    void PermissionGrantedIncludingDuplicates(PermissionRequest* request,

+ 17 - 17
build/patches/Add-menu-item-to-bookmark-all-tabs.patch

@@ -8,8 +8,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
  .../chrome/browser/ChromeTabbedActivity.java  | 26 ++++++++
  .../chrome/browser/ChromeTabbedActivity.java  | 26 ++++++++
  .../browser/bookmarks/BookmarkBridge.java     | 60 +++++++++++++++++++
  .../browser/bookmarks/BookmarkBridge.java     | 60 +++++++++++++++++++
  .../browser/bookmarks/BookmarkUtils.java      |  4 ++
  .../browser/bookmarks/BookmarkUtils.java      |  4 ++
- .../android/bookmarks/bookmark_bridge.cc      | 17 ++++++
- .../android/bookmarks/bookmark_bridge.h       |  4 ++
+ .../bookmarks/android/bookmark_bridge.cc      | 17 ++++++
+ .../bookmarks/android/bookmark_bridge.h       |  4 ++
  .../browser/bookmarks/bookmark_html_writer.cc |  8 ++-
  .../browser/bookmarks/bookmark_html_writer.cc |  8 ++-
  .../bookmarks/chrome_bookmark_client.cc       |  2 +
  .../bookmarks/chrome_bookmark_client.cc       |  2 +
  .../dialogs/DownloadLocationCustomView.java   |  4 +-
  .../dialogs/DownloadLocationCustomView.java   |  4 +-
@@ -41,7 +41,7 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re
          <item android:id="@+id/recent_tabs_menu_id"
          <item android:id="@+id/recent_tabs_menu_id"
              android:title="@string/menu_recent_tabs"
              android:title="@string/menu_recent_tabs"
              android:icon="@drawable/devices_black_24dp" />
              android:icon="@drawable/devices_black_24dp" />
-@@ -179,6 +183,9 @@
+@@ -182,6 +186,9 @@
          <item android:id="@+id/menu_group_tabs"
          <item android:id="@+id/menu_group_tabs"
              android:title="@string/menu_group_tabs"
              android:title="@string/menu_group_tabs"
              android:icon="@drawable/ic_widgets" />
              android:icon="@drawable/ic_widgets" />
@@ -54,7 +54,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
 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
 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
-@@ -70,6 +70,8 @@ import org.chromium.chrome.browser.back_press.BackPressManager;
+@@ -73,6 +73,8 @@ import org.chromium.chrome.browser.back_press.MinimizeAppAndCloseTabBackPressHan
  import org.chromium.chrome.browser.bookmarks.BookmarkUtils;
  import org.chromium.chrome.browser.bookmarks.BookmarkUtils;
  import org.chromium.chrome.browser.browserservices.intents.WebappConstants;
  import org.chromium.chrome.browser.browserservices.intents.WebappConstants;
  import org.chromium.chrome.browser.compositor.CompositorViewHolder;
  import org.chromium.chrome.browser.compositor.CompositorViewHolder;
@@ -63,7 +63,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct
  import org.chromium.chrome.browser.compositor.layouts.Layout;
  import org.chromium.chrome.browser.compositor.layouts.Layout;
  import org.chromium.chrome.browser.compositor.layouts.LayoutManagerChrome;
  import org.chromium.chrome.browser.compositor.layouts.LayoutManagerChrome;
  import org.chromium.chrome.browser.compositor.layouts.LayoutManagerChromePhone;
  import org.chromium.chrome.browser.compositor.layouts.LayoutManagerChromePhone;
-@@ -2111,6 +2113,8 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
+@@ -2140,6 +2142,8 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
              CloseAllTabsDialog.show(this, getModalDialogManagerSupplier(),
              CloseAllTabsDialog.show(this, getModalDialogManagerSupplier(),
                      () -> getTabModelSelector().closeAllTabs(), /*isIncognito=*/false);
                      () -> getTabModelSelector().closeAllTabs(), /*isIncognito=*/false);
              RecordUserAction.record("MobileMenuCloseAllTabs");
              RecordUserAction.record("MobileMenuCloseAllTabs");
@@ -72,7 +72,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct
          } else if (id == R.id.close_all_incognito_tabs_menu_id) {
          } else if (id == R.id.close_all_incognito_tabs_menu_id) {
              // Close only incognito tabs
              // Close only incognito tabs
              CloseAllTabsDialog.show(this, getModalDialogManagerSupplier(),
              CloseAllTabsDialog.show(this, getModalDialogManagerSupplier(),
-@@ -2163,6 +2167,28 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
+@@ -2192,6 +2196,28 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
          mTabModalHandler.onOmniboxFocusChanged(hasFocus);
          mTabModalHandler.onOmniboxFocusChanged(hasFocus);
      }
      }
  
  
@@ -227,10 +227,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
          if (bookmarkModel.isFolderVisible(desktopNodeId)) {
          if (bookmarkModel.isFolderVisible(desktopNodeId)) {
              topLevelFolders.add(desktopNodeId);
              topLevelFolders.add(desktopNodeId);
          }
          }
-diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browser/android/bookmarks/bookmark_bridge.cc
---- a/chrome/browser/android/bookmarks/bookmark_bridge.cc
-+++ b/chrome/browser/android/bookmarks/bookmark_bridge.cc
-@@ -434,6 +434,11 @@ void BookmarkBridge::GetTopLevelFolderIDs(
+diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browser/bookmarks/android/bookmark_bridge.cc
+--- a/chrome/browser/bookmarks/android/bookmark_bridge.cc
++++ b/chrome/browser/bookmarks/android/bookmark_bridge.cc
+@@ -432,6 +432,11 @@ void BookmarkBridge::GetTopLevelFolderIDs(
          top_level_folders.push_back(node.get());
          top_level_folders.push_back(node.get());
      }
      }
  
  
@@ -242,7 +242,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
      for (const auto& node : bookmark_model_->bookmark_bar_node()->children()) {
      for (const auto& node : bookmark_model_->bookmark_bar_node()->children()) {
        if (node->is_folder())
        if (node->is_folder())
          top_level_folders.push_back(node.get());
          top_level_folders.push_back(node.get());
-@@ -482,6 +487,7 @@ void BookmarkBridge::GetAllFoldersWithDepths(
+@@ -479,6 +484,7 @@ void BookmarkBridge::GetAllFoldersWithDepths(
    // Vector to temporarily contain all child bookmarks at same level for sorting
    // Vector to temporarily contain all child bookmarks at same level for sorting
    std::vector<const BookmarkNode*> bookmarks = {
    std::vector<const BookmarkNode*> bookmarks = {
        bookmark_model_->mobile_node(),
        bookmark_model_->mobile_node(),
@@ -250,7 +250,7 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
        bookmark_model_->bookmark_bar_node(),
        bookmark_model_->bookmark_bar_node(),
        bookmark_model_->other_node(),
        bookmark_model_->other_node(),
    };
    };
-@@ -536,6 +542,17 @@ ScopedJavaLocalRef<jobject> BookmarkBridge::GetMobileFolderId(
+@@ -531,6 +537,17 @@ ScopedJavaLocalRef<jobject> BookmarkBridge::GetMobileFolderId(
    return folder_id_obj;
    return folder_id_obj;
  }
  }
  
  
@@ -268,9 +268,9 @@ diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.cc b/chrome/browse
  ScopedJavaLocalRef<jobject> BookmarkBridge::GetOtherFolderId(
  ScopedJavaLocalRef<jobject> BookmarkBridge::GetOtherFolderId(
      JNIEnv* env,
      JNIEnv* env,
      const JavaParamRef<jobject>& obj) {
      const JavaParamRef<jobject>& obj) {
-diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.h b/chrome/browser/android/bookmarks/bookmark_bridge.h
---- a/chrome/browser/android/bookmarks/bookmark_bridge.h
-+++ b/chrome/browser/android/bookmarks/bookmark_bridge.h
+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
 @@ -121,6 +121,10 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
 @@ -121,6 +121,10 @@ class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
        JNIEnv* env,
        JNIEnv* env,
        const base::android::JavaParamRef<jobject>& obj);
        const base::android::JavaParamRef<jobject>& obj);
@@ -350,7 +350,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
 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
 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
-@@ -3480,6 +3480,9 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+@@ -3516,6 +3516,9 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
        <message name="IDS_MENU_TRACK_PRICES" desc="Menu item for tracking prices on tabs. [CHAR_LIMIT=27]">
        <message name="IDS_MENU_TRACK_PRICES" desc="Menu item for tracking prices on tabs. [CHAR_LIMIT=27]">
          Track prices
          Track prices
        </message>
        </message>
@@ -675,7 +675,7 @@ diff --git a/components/bookmarks/browser/bookmark_node.h b/components/bookmarks
 diff --git a/components/bookmarks/browser/model_loader.cc b/components/bookmarks/browser/model_loader.cc
 diff --git a/components/bookmarks/browser/model_loader.cc b/components/bookmarks/browser/model_loader.cc
 --- a/components/bookmarks/browser/model_loader.cc
 --- a/components/bookmarks/browser/model_loader.cc
 +++ b/components/bookmarks/browser/model_loader.cc
 +++ b/components/bookmarks/browser/model_loader.cc
-@@ -56,7 +56,8 @@ void LoadBookmarks(const base::FilePath& path,
+@@ -57,7 +57,8 @@ void LoadBookmarks(const base::FilePath& path,
        std::string sync_metadata_str;
        std::string sync_metadata_str;
        BookmarkCodec codec;
        BookmarkCodec codec;
        codec.Decode(*root, details->bb_node(), details->other_folder_node(),
        codec.Decode(*root, details->bb_node(), details->other_folder_node(),

+ 6 - 6
build/patches/Add-menu-item-to-view-source.patch

@@ -42,7 +42,7 @@ diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/re
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 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
 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
-@@ -2137,6 +2137,8 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
+@@ -2166,6 +2166,8 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
                  NewTabPageUma.recordAction(NewTabPageUma.ACTION_OPENED_DOWNLOADS_MANAGER);
                  NewTabPageUma.recordAction(NewTabPageUma.ACTION_OPENED_DOWNLOADS_MANAGER);
              }
              }
              RecordUserAction.record("MobileMenuDownloadManager");
              RecordUserAction.record("MobileMenuDownloadManager");
@@ -54,7 +54,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct
 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
 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
 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
-@@ -2510,6 +2510,11 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+@@ -2419,6 +2419,11 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
              return true;
              return true;
          }
          }
  
  
@@ -69,7 +69,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/app/appmenu/AppMenuPropertiesDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java
 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
 --- 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
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java
-@@ -506,6 +506,7 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
+@@ -527,6 +527,7 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
                          isChromeScheme, isFileScheme, isContentScheme, isIncognito, url));
                          isChromeScheme, isFileScheme, isContentScheme, isIncognito, url));
  
  
          updateRequestDesktopSiteMenuItem(menu, currentTab, true /* can show */, isChromeScheme);
          updateRequestDesktopSiteMenuItem(menu, currentTab, true /* can show */, isChromeScheme);
@@ -77,7 +77,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/App
  
  
          updateAutoDarkMenuItem(menu, currentTab, isChromeScheme);
          updateAutoDarkMenuItem(menu, currentTab, isChromeScheme);
  
  
-@@ -1129,6 +1130,19 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
+@@ -1152,6 +1153,19 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
              stopPriceTrackingMenuItem.setVisible(false);
              stopPriceTrackingMenuItem.setVisible(false);
      }
      }
  
  
@@ -111,8 +111,8 @@ 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
 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
 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
-@@ -309,6 +309,10 @@ CHAR_LIMIT guidelines:
-         Bluetooth
+@@ -312,6 +312,10 @@ CHAR_LIMIT guidelines:
+         USB
        </message>
        </message>
  
  
 +      <message name="IDS_VIEW_SOURCE" desc="Title for the menu command to view the source of the current page. [CHAR-LIMIT=40]">
 +      <message name="IDS_VIEW_SOURCE" desc="Title for the menu command to view the source of the current page. [CHAR-LIMIT=40]">

+ 15 - 15
build/patches/Add-option-to-force-tablet-UI.patch

@@ -21,7 +21,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/accessibility/settings/ChromeAccessibilitySettingsDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java
 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
 --- 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
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java
-@@ -67,6 +67,25 @@ public class ChromeAccessibilitySettingsDelegate implements AccessibilitySetting
+@@ -68,6 +68,25 @@ public class ChromeAccessibilitySettingsDelegate implements AccessibilitySetting
          return new ReaderForAccessibilityDelegate();
          return new ReaderForAccessibilityDelegate();
      }
      }
  
  
@@ -50,7 +50,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s
 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
 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
 --- 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
 +++ b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java
-@@ -438,6 +438,7 @@ public final class ChromePreferenceKeys {
+@@ -367,6 +367,7 @@ public final class ChromePreferenceKeys {
              AccessibilityConstants.FONT_USER_SET_FORCE_ENABLE_ZOOM;
              AccessibilityConstants.FONT_USER_SET_FORCE_ENABLE_ZOOM;
  
  
      public static final String HISTORY_SHOW_HISTORY_INFO = "history_home_show_info";
      public static final String HISTORY_SHOW_HISTORY_INFO = "history_home_show_info";
@@ -61,7 +61,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
 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
 --- 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
 +++ b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/LegacyChromePreferenceKeys.java
-@@ -82,6 +82,7 @@ public class LegacyChromePreferenceKeys {
+@@ -66,6 +66,7 @@ public class LegacyChromePreferenceKeys {
                  ChromePreferenceKeys.FLAGS_CACHED_SWAP_PIXEL_FORMAT_TO_FIX_CONVERT_FROM_TRANSLUCENT,
                  ChromePreferenceKeys.FLAGS_CACHED_SWAP_PIXEL_FORMAT_TO_FIX_CONVERT_FROM_TRANSLUCENT,
                  ChromePreferenceKeys.FLAGS_CACHED_TAB_GROUPS_ANDROID_ENABLED,
                  ChromePreferenceKeys.FLAGS_CACHED_TAB_GROUPS_ANDROID_ENABLED,
                  ChromePreferenceKeys.FONT_USER_FONT_SCALE_FACTOR,
                  ChromePreferenceKeys.FONT_USER_FONT_SCALE_FACTOR,
@@ -84,7 +84,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow
 diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 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
 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
-@@ -1389,6 +1389,12 @@ Your Google account may have other forms of browsing history like searches and a
+@@ -1392,6 +1392,12 @@ Your Google account may have other forms of browsing history like searches and a
        <message name="IDS_PRIVACY_REVIEW_SB_ENHANCED_ITEM_SEVEN" desc="Seventh bullet point that describes the details of the Safe Browsing control.">
        <message name="IDS_PRIVACY_REVIEW_SB_ENHANCED_ITEM_SEVEN" desc="Seventh bullet point that describes the details of the Safe Browsing control.">
          Temporarily links this data to your Google Account when you’re signed in, to protect you across Google apps
          Temporarily links this data to your Google Account when you’re signed in, to protect you across Google apps
        </message>
        </message>
@@ -100,7 +100,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/top/ToolbarControlContainer.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java
 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
 --- 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
 +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java
-@@ -106,22 +106,6 @@ public class ToolbarControlContainer extends OptimizedFrameLayout implements Con
+@@ -110,22 +110,6 @@ public class ToolbarControlContainer extends OptimizedFrameLayout implements Con
      public void setToolbar(Toolbar toolbar, boolean isIncognito) {
      public void setToolbar(Toolbar toolbar, boolean isIncognito) {
          mToolbar = toolbar;
          mToolbar = toolbar;
          mToolbarContainer.setToolbar(mToolbar);
          mToolbarContainer.setToolbar(mToolbar);
@@ -126,7 +126,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow
 diff --git a/components/BUILD.gn b/components/BUILD.gn
 diff --git a/components/BUILD.gn b/components/BUILD.gn
 --- a/components/BUILD.gn
 --- a/components/BUILD.gn
 +++ b/components/BUILD.gn
 +++ b/components/BUILD.gn
-@@ -44,7 +44,7 @@ if (is_ios) {
+@@ -45,7 +45,7 @@ if (is_ios) {
  
  
  # Omit Lacros because it allows //components to depend on //chrome, which in
  # Omit Lacros because it allows //components to depend on //chrome, which in
  # turn depends on //extensions.
  # turn depends on //extensions.
@@ -135,7 +135,7 @@ diff --git a/components/BUILD.gn b/components/BUILD.gn
    disallowed_extension_deps_ = [
    disallowed_extension_deps_ = [
      # Components should largely not depend on //extensions. Since // extensions
      # Components should largely not depend on //extensions. Since // extensions
      # is not a component target and is linked with //chrome, depending on most
      # is not a component target and is linked with //chrome, depending on most
-@@ -636,7 +636,7 @@ test("components_unittests") {
+@@ -655,7 +655,7 @@ test("components_unittests") {
    # On other platforms, no components should depend on Chrome.
    # On other platforms, no components should depend on Chrome.
    # Since //chrome depends on //extensions, we also only assert_no_deps on
    # Since //chrome depends on //extensions, we also only assert_no_deps on
    # extensions targets for non-lacros builds.
    # extensions targets for non-lacros builds.
@@ -144,7 +144,7 @@ diff --git a/components/BUILD.gn b/components/BUILD.gn
      assert_no_deps = [ "//chrome/*" ]
      assert_no_deps = [ "//chrome/*" ]
      assert_no_deps += disallowed_extension_deps_
      assert_no_deps += disallowed_extension_deps_
    }
    }
-@@ -918,7 +918,7 @@ if (!is_ios) {
+@@ -939,7 +939,7 @@ if (!is_ios) {
      # dependency. On other platforms, no components should depend on Chrome.
      # dependency. On other platforms, no components should depend on Chrome.
      # Since //chrome depends on //extensions, we also only assert_no_deps on
      # Since //chrome depends on //extensions, we also only assert_no_deps on
      # extensions targets for non-lacros builds.
      # extensions targets for non-lacros builds.
@@ -156,7 +156,7 @@ diff --git a/components/BUILD.gn b/components/BUILD.gn
 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
 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
 --- a/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml
 +++ b/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml
 +++ b/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml
-@@ -25,6 +25,11 @@
+@@ -34,6 +34,11 @@
          android:summary="@string/accessibility_tab_switcher_summary"
          android:summary="@string/accessibility_tab_switcher_summary"
          android:title="@string/accessibility_tab_switcher_title" />
          android:title="@string/accessibility_tab_switcher_title" />
  
  
@@ -171,16 +171,16 @@ diff --git a/components/browser_ui/accessibility/android/java/res/xml/accessibil
 diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java
 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
 --- 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
 +++ b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java
-@@ -27,6 +27,8 @@ public class AccessibilitySettings
+@@ -30,6 +30,8 @@ public class AccessibilitySettings
      public static final String PREF_READER_FOR_ACCESSIBILITY = "reader_for_accessibility";
      public static final String PREF_READER_FOR_ACCESSIBILITY = "reader_for_accessibility";
      public static final String PREF_CAPTIONS = "captions";
      public static final String PREF_CAPTIONS = "captions";
  
  
 +    private BooleanPreferenceDelegate mForceTabletUIDelegate;
 +    private BooleanPreferenceDelegate mForceTabletUIDelegate;
 +    static final String PREF_FORCE_TABLET_UI = "force_tablet_ui";
 +    static final String PREF_FORCE_TABLET_UI = "force_tablet_ui";
      private TextScalePreference mTextScalePref;
      private TextScalePreference mTextScalePref;
-     private ChromeBaseCheckBoxPreference mForceEnableZoomPref;
-     private boolean mRecordFontSizeChangeOnStop;
-@@ -85,6 +87,12 @@ public class AccessibilitySettings
+     private PageZoomPreference mPageZoomDefaultZoomPref;
+     private ChromeSwitchPreference mPageZoomAlwaysShowPref;
+@@ -105,6 +107,12 @@ public class AccessibilitySettings
              getPreferenceScreen().removePreference(readerForAccessibilityPref);
              getPreferenceScreen().removePreference(readerForAccessibilityPref);
          }
          }
  
  
@@ -193,7 +193,7 @@ diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/c
          ChromeBaseCheckBoxPreference accessibilityTabSwitcherPref =
          ChromeBaseCheckBoxPreference accessibilityTabSwitcherPref =
                  (ChromeBaseCheckBoxPreference) findPreference(
                  (ChromeBaseCheckBoxPreference) findPreference(
                          AccessibilityConstants.ACCESSIBILITY_TAB_SWITCHER);
                          AccessibilityConstants.ACCESSIBILITY_TAB_SWITCHER);
-@@ -133,6 +141,8 @@ public class AccessibilitySettings
+@@ -153,6 +161,8 @@ public class AccessibilitySettings
              mFontSizePrefs.setUserFontScaleFactor((Float) newValue);
              mFontSizePrefs.setUserFontScaleFactor((Float) newValue);
          } else if (PREF_FORCE_ENABLE_ZOOM.equals(preference.getKey())) {
          } else if (PREF_FORCE_ENABLE_ZOOM.equals(preference.getKey())) {
              mFontSizePrefs.setForceEnableZoomFromUser((Boolean) newValue);
              mFontSizePrefs.setForceEnableZoomFromUser((Boolean) newValue);
@@ -217,7 +217,7 @@ diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/c
 diff --git a/ui/android/BUILD.gn b/ui/android/BUILD.gn
 diff --git a/ui/android/BUILD.gn b/ui/android/BUILD.gn
 --- a/ui/android/BUILD.gn
 --- a/ui/android/BUILD.gn
 +++ b/ui/android/BUILD.gn
 +++ b/ui/android/BUILD.gn
-@@ -362,6 +362,8 @@ android_library("ui_no_recycler_view_java") {
+@@ -363,6 +363,8 @@ android_library("ui_no_recycler_view_java") {
    deps = [
    deps = [
      ":ui_java_resources",
      ":ui_java_resources",
      ":ui_utils_java",
      ":ui_utils_java",

+ 3 - 3
build/patches/Add-option-to-not-persist-tabs-across-sessions.patch

@@ -28,7 +28,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/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
-@@ -35,6 +35,7 @@ import androidx.lifecycle.LifecycleRegistry;
+@@ -36,6 +36,7 @@ import androidx.lifecycle.LifecycleRegistry;
  
  
  import org.chromium.base.CallbackController;
  import org.chromium.base.CallbackController;
  import org.chromium.base.CommandLine;
  import org.chromium.base.CommandLine;
@@ -36,7 +36,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct
  import org.chromium.base.IntentUtils;
  import org.chromium.base.IntentUtils;
  import org.chromium.base.Log;
  import org.chromium.base.Log;
  import org.chromium.base.MemoryPressureListener;
  import org.chromium.base.MemoryPressureListener;
-@@ -1235,8 +1236,10 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
+@@ -1264,8 +1265,10 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
              boolean hadCipherData =
              boolean hadCipherData =
                      CipherFactory.getInstance().restoreFromBundle(getSavedInstanceState());
                      CipherFactory.getInstance().restoreFromBundle(getSavedInstanceState());
  
  
@@ -105,7 +105,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
 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
 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
-@@ -4357,6 +4357,12 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+@@ -4390,6 +4390,12 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
        <message name="IDS_CONTEXTMENU_IMAGE_TITLE" desc="The title of a context menu tab when the item pressed contains more than one type. This indicates that all the actions are related to the image.">
        <message name="IDS_CONTEXTMENU_IMAGE_TITLE" desc="The title of a context menu tab when the item pressed contains more than one type. This indicates that all the actions are related to the image.">
          IMAGE
          IMAGE
        </message>
        </message>

+ 6 - 6
build/patches/Add-option-to-use-home-page-as-NTP.patch

@@ -115,10 +115,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/Chrome
  import org.chromium.chrome.browser.app.tab_activity_glue.ReparentingTask;
  import org.chromium.chrome.browser.app.tab_activity_glue.ReparentingTask;
  import org.chromium.chrome.browser.compositor.CompositorViewHolder;
  import org.chromium.chrome.browser.compositor.CompositorViewHolder;
 +import org.chromium.chrome.browser.homepage.HomepageManager;
 +import org.chromium.chrome.browser.homepage.HomepageManager;
- import org.chromium.chrome.browser.init.StartupTabPreloader;
  import org.chromium.chrome.browser.ntp.NewTabPageLaunchOrigin;
  import org.chromium.chrome.browser.ntp.NewTabPageLaunchOrigin;
  import org.chromium.chrome.browser.ntp.NewTabPageUtils;
  import org.chromium.chrome.browser.ntp.NewTabPageUtils;
-@@ -323,6 +324,12 @@ public class ChromeTabCreator extends TabCreator {
+ import org.chromium.chrome.browser.tab.RedirectHandlerTabHelper;
+@@ -312,6 +313,12 @@ public class ChromeTabCreator extends TabCreator {
       * @return the created tab.
       * @return the created tab.
       */
       */
      public Tab launchUrl(String url, @TabLaunchType int type, Intent intent, long intentTimestamp) {
      public Tab launchUrl(String url, @TabLaunchType int type, Intent intent, long intentTimestamp) {
@@ -134,7 +134,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/Chrome
 diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java
 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
 --- 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
 +++ b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java
-@@ -449,6 +449,7 @@ public final class ChromePreferenceKeys {
+@@ -378,6 +378,7 @@ public final class ChromePreferenceKeys {
      public static final String HOMEPAGE_PARTNER_CUSTOMIZED_DEFAULT_GURL =
      public static final String HOMEPAGE_PARTNER_CUSTOMIZED_DEFAULT_GURL =
              "Chrome.Homepage.PartnerCustomizedDefaultGurl";
              "Chrome.Homepage.PartnerCustomizedDefaultGurl";
  
  
@@ -145,7 +145,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
 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
 --- 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
 +++ b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/LegacyChromePreferenceKeys.java
-@@ -87,6 +87,7 @@ public class LegacyChromePreferenceKeys {
+@@ -71,6 +71,7 @@ public class LegacyChromePreferenceKeys {
                  ChromePreferenceKeys.HOMEPAGE_CUSTOM_URI,
                  ChromePreferenceKeys.HOMEPAGE_CUSTOM_URI,
                  ChromePreferenceKeys.HOMEPAGE_ENABLED,
                  ChromePreferenceKeys.HOMEPAGE_ENABLED,
                  ChromePreferenceKeys.HOMEPAGE_USE_DEFAULT_URI,
                  ChromePreferenceKeys.HOMEPAGE_USE_DEFAULT_URI,
@@ -156,7 +156,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
 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
 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
-@@ -1204,6 +1204,9 @@ Your Google account may have other forms of browsing history like searches and a
+@@ -1207,6 +1207,9 @@ Your Google account may have other forms of browsing history like searches and a
        <message name="IDS_CLEAR_BROWSING_DATA_TAB_PERIOD_HOUR" desc="The option to delete browsing data from the last hour.">
        <message name="IDS_CLEAR_BROWSING_DATA_TAB_PERIOD_HOUR" desc="The option to delete browsing data from the last hour.">
          Last hour
          Last hour
        </message>
        </message>
@@ -195,7 +195,7 @@ diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
 diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
 diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
 --- a/chrome/common/pref_names.h
 --- a/chrome/common/pref_names.h
 +++ b/chrome/common/pref_names.h
 +++ b/chrome/common/pref_names.h
-@@ -372,6 +372,7 @@ extern const char kSettingsShowOSBanner[];
+@@ -373,6 +373,7 @@ extern const char kSettingsShowOSBanner[];
  extern const char kUsedPolicyCertificates[];
  extern const char kUsedPolicyCertificates[];
  #endif  // BUILDFLAG(IS_CHROMEOS)
  #endif  // BUILDFLAG(IS_CHROMEOS)
  extern const char kShowHomeButton[];
  extern const char kShowHomeButton[];

+ 5 - 5
build/patches/Add-site-engagement-flag.patch

@@ -21,15 +21,15 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -132,6 +132,7 @@
- #include "components/security_state/core/security_state.h"
+@@ -133,6 +133,7 @@
+ #include "components/segmentation_platform/public/features.h"
  #include "components/send_tab_to_self/features.h"
  #include "components/send_tab_to_self/features.h"
  #include "components/services/heap_profiling/public/cpp/switches.h"
  #include "components/services/heap_profiling/public/cpp/switches.h"
 +#include "components/site_engagement/core/features.h"
 +#include "components/site_engagement/core/features.h"
  #include "components/shared_highlighting/core/common/shared_highlighting_features.h"
  #include "components/shared_highlighting/core/common/shared_highlighting_features.h"
  #include "components/signin/core/browser/dice_account_reconcilor_delegate.h"
  #include "components/signin/core/browser/dice_account_reconcilor_delegate.h"
  #include "components/signin/public/base/signin_buildflags.h"
  #include "components/signin/public/base/signin_buildflags.h"
-@@ -8496,6 +8497,11 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -8744,6 +8745,11 @@ const FeatureEntry kFeatureEntries[] = {
       flag_descriptions::kReduceUserAgentMinorVersionDescription, kOsAll,
       flag_descriptions::kReduceUserAgentMinorVersionDescription, kOsAll,
       FEATURE_VALUE_TYPE(blink::features::kReduceUserAgentMinorVersion)},
       FEATURE_VALUE_TYPE(blink::features::kReduceUserAgentMinorVersion)},
  
  
@@ -44,7 +44,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -3000,6 +3000,11 @@ const char kReduceUserAgentMinorVersionDescription[] =
+@@ -3082,6 +3082,11 @@ const char kReduceUserAgentMinorVersionDescription[] =
      "The Chrome version in the User-Agent string will be reported as "
      "The Chrome version in the User-Agent string will be reported as "
      "Chrome/<major_version>.0.0.0.";
      "Chrome/<major_version>.0.0.0.";
  
  
@@ -59,7 +59,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -1702,6 +1702,9 @@ extern const char kDurableClientHintsCacheDescription[];
+@@ -1752,6 +1752,9 @@ extern const char kDurableClientHintsCacheDescription[];
  extern const char kReduceUserAgentMinorVersionName[];
  extern const char kReduceUserAgentMinorVersionName[];
  extern const char kReduceUserAgentMinorVersionDescription[];
  extern const char kReduceUserAgentMinorVersionDescription[];
  
  

+ 1 - 1
build/patches/Add-support-for-ISupportHelpAndFeedback.patch

@@ -20,7 +20,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin
  import org.chromium.components.browser_ui.site_settings.SiteSettingsPreferenceFragment;
  import org.chromium.components.browser_ui.site_settings.SiteSettingsPreferenceFragment;
  import org.chromium.components.browser_ui.widget.displaystyle.UiConfig;
  import org.chromium.components.browser_ui.widget.displaystyle.UiConfig;
  import org.chromium.components.browser_ui.widget.displaystyle.ViewResizer;
  import org.chromium.components.browser_ui.widget.displaystyle.ViewResizer;
-@@ -337,9 +338,13 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity
+@@ -338,9 +339,13 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity
              finish();
              finish();
              return true;
              return true;
          } else if (item.getItemId() == R.id.menu_id_general_help) {
          } else if (item.getItemId() == R.id.menu_id_general_help) {

+ 3 - 3
build/patches/Add-webGL-site-setting.patch

@@ -258,7 +258,7 @@ diff --git a/components/content_settings/core/browser/content_settings_utils.cc
 diff --git a/components/content_settings/core/common/content_settings.cc b/components/content_settings/core/common/content_settings.cc
 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
 --- a/components/content_settings/core/common/content_settings.cc
 +++ b/components/content_settings/core/common/content_settings.cc
 +++ b/components/content_settings/core/common/content_settings.cc
-@@ -204,7 +204,8 @@ bool RendererContentSettingRules::IsRendererContentSetting(
+@@ -205,7 +205,8 @@ bool RendererContentSettingRules::IsRendererContentSetting(
           content_type == ContentSettingsType::AUTOPLAY ||
           content_type == ContentSettingsType::AUTOPLAY ||
           content_type == ContentSettingsType::MIXEDSCRIPT ||
           content_type == ContentSettingsType::MIXEDSCRIPT ||
           content_type == ContentSettingsType::AUTO_DARK_WEB_CONTENT ||
           content_type == ContentSettingsType::AUTO_DARK_WEB_CONTENT ||
@@ -268,7 +268,7 @@ diff --git a/components/content_settings/core/common/content_settings.cc b/compo
  }
  }
  
  
  void RendererContentSettingRules::FilterRulesByOutermostMainFrameURL(
  void RendererContentSettingRules::FilterRulesByOutermostMainFrameURL(
-@@ -216,6 +217,7 @@ void RendererContentSettingRules::FilterRulesByOutermostMainFrameURL(
+@@ -217,6 +218,7 @@ void RendererContentSettingRules::FilterRulesByOutermostMainFrameURL(
    FilterRulesForType(auto_dark_content_rules, outermost_main_frame_url);
    FilterRulesForType(auto_dark_content_rules, outermost_main_frame_url);
    FilterRulesForType(timezone_override_rules, outermost_main_frame_url);
    FilterRulesForType(timezone_override_rules, outermost_main_frame_url);
    FilterRulesForType(autoplay_rules, outermost_main_frame_url);
    FilterRulesForType(autoplay_rules, outermost_main_frame_url);
@@ -492,7 +492,7 @@ diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_ba
 diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h
 diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h
 --- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h
 --- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h
 +++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h
 +++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.h
-@@ -1777,6 +1777,8 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext,
+@@ -1772,6 +1772,8 @@ class MODULES_EXPORT WebGLRenderingContextBase : public CanvasRenderingContext,
                          DOMArrayBufferView* pixels,
                          DOMArrayBufferView* pixels,
                          int64_t offset);
                          int64_t offset);
  
  

+ 2 - 2
build/patches/Add-webRTC-site-settings.patch

@@ -254,7 +254,7 @@ diff --git a/components/content_settings/core/browser/content_settings_utils.cc
 diff --git a/components/content_settings/core/common/content_settings.cc b/components/content_settings/core/common/content_settings.cc
 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
 --- a/components/content_settings/core/common/content_settings.cc
 +++ b/components/content_settings/core/common/content_settings.cc
 +++ b/components/content_settings/core/common/content_settings.cc
-@@ -205,7 +205,8 @@ bool RendererContentSettingRules::IsRendererContentSetting(
+@@ -206,7 +206,8 @@ bool RendererContentSettingRules::IsRendererContentSetting(
           content_type == ContentSettingsType::MIXEDSCRIPT ||
           content_type == ContentSettingsType::MIXEDSCRIPT ||
           content_type == ContentSettingsType::AUTO_DARK_WEB_CONTENT ||
           content_type == ContentSettingsType::AUTO_DARK_WEB_CONTENT ||
           content_type == ContentSettingsType::TIMEZONE_OVERRIDE ||
           content_type == ContentSettingsType::TIMEZONE_OVERRIDE ||
@@ -264,7 +264,7 @@ diff --git a/components/content_settings/core/common/content_settings.cc b/compo
  }
  }
  
  
  void RendererContentSettingRules::FilterRulesByOutermostMainFrameURL(
  void RendererContentSettingRules::FilterRulesByOutermostMainFrameURL(
-@@ -218,6 +219,7 @@ void RendererContentSettingRules::FilterRulesByOutermostMainFrameURL(
+@@ -219,6 +220,7 @@ void RendererContentSettingRules::FilterRulesByOutermostMainFrameURL(
    FilterRulesForType(timezone_override_rules, outermost_main_frame_url);
    FilterRulesForType(timezone_override_rules, outermost_main_frame_url);
    FilterRulesForType(autoplay_rules, outermost_main_frame_url);
    FilterRulesForType(autoplay_rules, outermost_main_frame_url);
    FilterRulesForType(webgl_rules, outermost_main_frame_url);
    FilterRulesForType(webgl_rules, outermost_main_frame_url);

+ 27 - 28
build/patches/Allow-building-without-enable_reporting.patch

@@ -56,9 +56,9 @@ diff --git a/content/browser/net/cross_origin_embedder_policy_reporter.cc b/cont
    }
    }
    if (endpoint) {
    if (endpoint) {
 +#if BUILDFLAG(ENABLE_REPORTING)
 +#if BUILDFLAG(ENABLE_REPORTING)
-     base::DictionaryValue body_to_pass;
+     base::Value::Dict body_to_pass;
      for (const auto& pair : body) {
      for (const auto& pair : body) {
-       body_to_pass.SetString(pair.first, pair.second);
+       body_to_pass.Set(pair.first, pair.second);
 @@ -123,7 +125,7 @@ void CrossOriginEmbedderPolicyReporter::QueueAndNotify(
 @@ -123,7 +125,7 @@ void CrossOriginEmbedderPolicyReporter::QueueAndNotify(
            kType, *endpoint, context_url_, reporting_source_,
            kType, *endpoint, context_url_, reporting_source_,
            network_isolation_key_,
            network_isolation_key_,
@@ -106,15 +106,15 @@ diff --git a/content/browser/net/cross_origin_opener_policy_reporter.cc b/conten
  std::string ToString(network::mojom::CrossOriginOpenerPolicyValue coop_value) {
  std::string ToString(network::mojom::CrossOriginOpenerPolicyValue coop_value) {
    switch (coop_value) {
    switch (coop_value) {
      case network::mojom::CrossOriginOpenerPolicyValue::kUnsafeNone:
      case network::mojom::CrossOriginOpenerPolicyValue::kUnsafeNone:
-@@ -59,6 +52,7 @@ std::string ToString(network::mojom::CrossOriginOpenerPolicyValue coop_value) {
-       return "same-origin-allow-popups-plus-coep";
+@@ -61,6 +54,7 @@ std::string ToString(network::mojom::CrossOriginOpenerPolicyValue coop_value) {
+       return "restrict-properties-plus-coep";
    }
    }
  }
  }
 +#endif
 +#endif
  
  
  FrameTreeNode* TopLevelOpener(FrameTreeNode* frame) {
  FrameTreeNode* TopLevelOpener(FrameTreeNode* frame) {
    FrameTreeNode* opener =
    FrameTreeNode* opener =
-@@ -230,6 +224,7 @@ void CrossOriginOpenerPolicyReporter::QueueAccessReport(
+@@ -232,6 +226,7 @@ void CrossOriginOpenerPolicyReporter::QueueAccessReport(
      network::mojom::SourceLocationPtr source_location,
      network::mojom::SourceLocationPtr source_location,
      const std::string& reported_window_url,
      const std::string& reported_window_url,
      const std::string& initial_popup_url) const {
      const std::string& initial_popup_url) const {
@@ -122,7 +122,7 @@ diff --git a/content/browser/net/cross_origin_opener_policy_reporter.cc b/conten
    // Cross-Origin-Opener-Policy-Report-Only is not required to provide
    // Cross-Origin-Opener-Policy-Report-Only is not required to provide
    // endpoints.
    // endpoints.
    if (!coop_.report_only_reporting_endpoint)
    if (!coop_.report_only_reporting_endpoint)
-@@ -278,12 +273,14 @@ void CrossOriginOpenerPolicyReporter::QueueAccessReport(
+@@ -279,12 +274,14 @@ void CrossOriginOpenerPolicyReporter::QueueAccessReport(
    storage_partition_->GetNetworkContext()->QueueReport(
    storage_partition_->GetNetworkContext()->QueueReport(
        "coop", endpoint, context_url_, reporting_source_, network_isolation_key_,
        "coop", endpoint, context_url_, reporting_source_, network_isolation_key_,
        absl::nullopt, std::move(body));
        absl::nullopt, std::move(body));
@@ -130,13 +130,13 @@ diff --git a/content/browser/net/cross_origin_opener_policy_reporter.cc b/conten
  }
  }
  
  
  void CrossOriginOpenerPolicyReporter::QueueNavigationReport(
  void CrossOriginOpenerPolicyReporter::QueueNavigationReport(
-     base::DictionaryValue body,
+     base::Value::Dict body,
      const std::string& endpoint,
      const std::string& endpoint,
      bool is_report_only) {
      bool is_report_only) {
 +#if BUILDFLAG(ENABLE_REPORTING)
 +#if BUILDFLAG(ENABLE_REPORTING)
-   body.SetString(kDisposition,
-                  is_report_only ? kDispositionReporting : kDispositionEnforce);
-   body.SetString(
+   body.Set(kDisposition,
+            is_report_only ? kDispositionReporting : kDispositionEnforce);
+   body.Set(kEffectivePolicy,
 @@ -292,6 +289,7 @@ void CrossOriginOpenerPolicyReporter::QueueNavigationReport(
 @@ -292,6 +289,7 @@ void CrossOriginOpenerPolicyReporter::QueueNavigationReport(
    storage_partition_->GetNetworkContext()->QueueReport(
    storage_partition_->GetNetworkContext()->QueueReport(
        "coop", endpoint, context_url_, reporting_source_, network_isolation_key_,
        "coop", endpoint, context_url_, reporting_source_, network_isolation_key_,
@@ -156,18 +156,17 @@ diff --git a/content/browser/net/reporting_service_proxy.cc b/content/browser/ne
  #include "content/browser/service_worker/service_worker_host.h"
  #include "content/browser/service_worker/service_worker_host.h"
  #include "content/browser/worker_host/dedicated_worker_host.h"
  #include "content/browser/worker_host/dedicated_worker_host.h"
  #include "content/browser/worker_host/shared_worker_host.h"
  #include "content/browser/worker_host/shared_worker_host.h"
-@@ -173,6 +174,7 @@ class ReportingServiceProxyImpl : public blink::mojom::ReportingServiceProxy {
+@@ -174,12 +175,14 @@ class ReportingServiceProxyImpl : public blink::mojom::ReportingServiceProxy {
                     const std::string& group,
                     const std::string& group,
                     const std::string& type,
                     const std::string& type,
-                    std::unique_ptr<base::Value> body) {
+                    base::Value::Dict body) {
 +#if BUILDFLAG(ENABLE_REPORTING)
 +#if BUILDFLAG(ENABLE_REPORTING)
      auto* rph = RenderProcessHost::FromID(render_process_id_);
      auto* rph = RenderProcessHost::FromID(render_process_id_);
      if (!rph)
      if (!rph)
        return;
        return;
-@@ -180,6 +182,7 @@ class ReportingServiceProxyImpl : public blink::mojom::ReportingServiceProxy {
+     rph->GetStoragePartition()->GetNetworkContext()->QueueReport(
          type, group, url, reporting_source_, network_isolation_key_,
          type, group, url, reporting_source_, network_isolation_key_,
-         /*user_agent=*/absl::nullopt,
-         base::Value::FromUniquePtrValue(std::move(body)));
+         /*user_agent=*/absl::nullopt, std::move(body));
 +#endif
 +#endif
    }
    }
  
  
@@ -175,10 +174,10 @@ diff --git a/content/browser/net/reporting_service_proxy.cc b/content/browser/ne
 diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
 diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
 --- a/content/browser/renderer_host/render_frame_host_impl.cc
 --- a/content/browser/renderer_host/render_frame_host_impl.cc
 +++ b/content/browser/renderer_host/render_frame_host_impl.cc
 +++ b/content/browser/renderer_host/render_frame_host_impl.cc
-@@ -11549,12 +11549,6 @@ void RenderFrameHostImpl::MaybeGenerateCrashReport(
-   auto body = base::DictionaryValue();
+@@ -11648,12 +11648,6 @@ void RenderFrameHostImpl::MaybeGenerateCrashReport(
+   base::Value::Dict body;
    if (!reason.empty())
    if (!reason.empty())
-     body.SetString("reason", reason);
+     body.Set("reason", reason);
 -
 -
 -  // Send the crash report to the Reporting API.
 -  // Send the crash report to the Reporting API.
 -  GetProcess()->GetStoragePartition()->GetNetworkContext()->QueueReport(
 -  GetProcess()->GetStoragePartition()->GetNetworkContext()->QueueReport(
@@ -221,8 +220,8 @@ diff --git a/content/public/common/content_switch_dependent_feature_overrides.cc
 diff --git a/net/reporting/reporting_service.cc b/net/reporting/reporting_service.cc
 diff --git a/net/reporting/reporting_service.cc b/net/reporting/reporting_service.cc
 --- a/net/reporting/reporting_service.cc
 --- a/net/reporting/reporting_service.cc
 +++ b/net/reporting/reporting_service.cc
 +++ b/net/reporting/reporting_service.cc
-@@ -212,6 +212,12 @@ class ReportingServiceImpl : public ReportingService {
-       std::unique_ptr<const base::Value> body,
+@@ -208,6 +208,12 @@ class ReportingServiceImpl : public ReportingService {
+       base::Value::Dict body,
        int depth,
        int depth,
        base::TimeTicks queued_ticks) {
        base::TimeTicks queued_ticks) {
 +#if BUILDFLAG(ENABLE_REPORTING)
 +#if BUILDFLAG(ENABLE_REPORTING)
@@ -237,12 +236,12 @@ diff --git a/net/reporting/reporting_service.cc b/net/reporting/reporting_servic
 diff --git a/services/network/network_context.h b/services/network/network_context.h
 diff --git a/services/network/network_context.h b/services/network/network_context.h
 --- a/services/network/network_context.h
 --- a/services/network/network_context.h
 +++ b/services/network/network_context.h
 +++ b/services/network/network_context.h
-@@ -455,10 +455,10 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
+@@ -456,10 +456,10 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
        const absl::optional<base::UnguessableToken>& reporting_source,
        const absl::optional<base::UnguessableToken>& reporting_source,
        const net::NetworkIsolationKey& network_isolation_key,
        const net::NetworkIsolationKey& network_isolation_key,
        const absl::optional<std::string>& user_agent,
        const absl::optional<std::string>& user_agent,
--      base::Value body) override;
-+      base::Value body);
+-      base::Value::Dict body) override;
++      base::Value::Dict body);
    void QueueSignedExchangeReport(
    void QueueSignedExchangeReport(
        mojom::SignedExchangeReportPtr report,
        mojom::SignedExchangeReportPtr report,
 -      const net::NetworkIsolationKey& network_isolation_key) override;
 -      const net::NetworkIsolationKey& network_isolation_key) override;
@@ -253,7 +252,7 @@ diff --git a/services/network/network_context.h b/services/network/network_conte
 diff --git a/services/network/public/mojom/BUILD.gn b/services/network/public/mojom/BUILD.gn
 diff --git a/services/network/public/mojom/BUILD.gn b/services/network/public/mojom/BUILD.gn
 --- a/services/network/public/mojom/BUILD.gn
 --- a/services/network/public/mojom/BUILD.gn
 +++ b/services/network/public/mojom/BUILD.gn
 +++ b/services/network/public/mojom/BUILD.gn
-@@ -963,7 +963,6 @@ mojom("mojom") {
+@@ -965,7 +965,6 @@ mojom("mojom") {
      export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
      export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1"
      export_header_blink = "third_party/blink/public/platform/web_common.h"
      export_header_blink = "third_party/blink/public/platform/web_common.h"
      if (enable_reporting) {
      if (enable_reporting) {
@@ -264,7 +263,7 @@ diff --git a/services/network/public/mojom/BUILD.gn b/services/network/public/mo
 diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
 diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
 --- a/services/network/public/mojom/network_context.mojom
 --- a/services/network/public/mojom/network_context.mojom
 +++ b/services/network/public/mojom/network_context.mojom
 +++ b/services/network/public/mojom/network_context.mojom
-@@ -1046,6 +1046,7 @@ interface NetworkContext {
+@@ -1055,6 +1055,7 @@ interface NetworkContext {
    // provided |network_isolation_key|.
    // provided |network_isolation_key|.
    //
    //
    // Spec: https://w3c.github.io/reporting/#concept-reports
    // Spec: https://w3c.github.io/reporting/#concept-reports
@@ -272,7 +271,7 @@ diff --git a/services/network/public/mojom/network_context.mojom b/services/netw
    QueueReport(string type,
    QueueReport(string type,
                string group,
                string group,
                url.mojom.Url url,
                url.mojom.Url url,
-@@ -1059,6 +1060,7 @@ interface NetworkContext {
+@@ -1068,6 +1069,7 @@ interface NetworkContext {
    // Note that this queued report will never be delivered if no reporting
    // Note that this queued report will never be delivered if no reporting
    // endpoint matching is registered for with the provided
    // endpoint matching is registered for with the provided
    // |network_isolation_key|.
    // |network_isolation_key|.
@@ -291,7 +290,7 @@ diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/
  #include "services/data_decoder/public/mojom/resource_snapshot_for_web_bundle.mojom-blink.h"
  #include "services/data_decoder/public/mojom/resource_snapshot_for_web_bundle.mojom-blink.h"
  #include "services/network/public/cpp/features.h"
  #include "services/network/public/cpp/features.h"
  #include "services/network/public/mojom/content_security_policy.mojom-blink.h"
  #include "services/network/public/mojom/content_security_policy.mojom-blink.h"
-@@ -2340,9 +2341,11 @@ const base::UnguessableToken& LocalFrame::GetAgentClusterId() const {
+@@ -2356,9 +2357,11 @@ const base::UnguessableToken& LocalFrame::GetAgentClusterId() const {
    return base::UnguessableToken::Null();
    return base::UnguessableToken::Null();
  }
  }
  
  
@@ -317,7 +316,7 @@ diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/b
  #include "services/device/public/mojom/device_posture_provider.mojom-blink-forward.h"
  #include "services/device/public/mojom/device_posture_provider.mojom-blink-forward.h"
  #include "services/network/public/mojom/fetch_api.mojom-blink-forward.h"
  #include "services/network/public/mojom/fetch_api.mojom-blink-forward.h"
  #include "third_party/blink/public/common/frame/frame_ad_evidence.h"
  #include "third_party/blink/public/common/frame/frame_ad_evidence.h"
-@@ -561,9 +561,9 @@ class CORE_EXPORT LocalFrame final
+@@ -564,9 +564,9 @@ class CORE_EXPORT LocalFrame final
    }
    }
  
  
    SmoothScrollSequencer& GetSmoothScrollSequencer();
    SmoothScrollSequencer& GetSmoothScrollSequencer();

+ 3 - 3
build/patches/Allow-playing-audio-in-background.patch

@@ -11,7 +11,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/third_party/blink/renderer/platform/media/web_media_player_impl.cc b/third_party/blink/renderer/platform/media/web_media_player_impl.cc
 diff --git a/third_party/blink/renderer/platform/media/web_media_player_impl.cc b/third_party/blink/renderer/platform/media/web_media_player_impl.cc
 --- a/third_party/blink/renderer/platform/media/web_media_player_impl.cc
 --- a/third_party/blink/renderer/platform/media/web_media_player_impl.cc
 +++ b/third_party/blink/renderer/platform/media/web_media_player_impl.cc
 +++ b/third_party/blink/renderer/platform/media/web_media_player_impl.cc
-@@ -1218,6 +1218,12 @@ bool WebMediaPlayerImpl::HasAudio() const {
+@@ -1217,6 +1217,12 @@ bool WebMediaPlayerImpl::HasAudio() const {
    return pipeline_metadata_.has_audio;
    return pipeline_metadata_.has_audio;
  }
  }
  
  
@@ -24,7 +24,7 @@ diff --git a/third_party/blink/renderer/platform/media/web_media_player_impl.cc
  void WebMediaPlayerImpl::EnabledAudioTracksChanged(
  void WebMediaPlayerImpl::EnabledAudioTracksChanged(
      const WebVector<WebMediaPlayer::TrackId>& enabledTrackIds) {
      const WebVector<WebMediaPlayer::TrackId>& enabledTrackIds) {
    DCHECK(main_task_runner_->BelongsToCurrentThread());
    DCHECK(main_task_runner_->BelongsToCurrentThread());
-@@ -3585,7 +3591,11 @@ bool WebMediaPlayerImpl::ShouldPausePlaybackWhenHidden() const {
+@@ -3608,7 +3614,11 @@ bool WebMediaPlayerImpl::ShouldPausePlaybackWhenHidden() const {
    // Audio only stream is allowed to play when in background.
    // Audio only stream is allowed to play when in background.
    // TODO: We should check IsBackgroundOptimizationCandidate here. But we need
    // TODO: We should check IsBackgroundOptimizationCandidate here. But we need
    // to move the logic of checking video frames out of that function.
    // to move the logic of checking video frames out of that function.
@@ -40,7 +40,7 @@ diff --git a/third_party/blink/renderer/platform/media/web_media_player_impl.cc
 diff --git a/third_party/blink/renderer/platform/media/web_media_player_impl.h b/third_party/blink/renderer/platform/media/web_media_player_impl.h
 diff --git a/third_party/blink/renderer/platform/media/web_media_player_impl.h b/third_party/blink/renderer/platform/media/web_media_player_impl.h
 --- a/third_party/blink/renderer/platform/media/web_media_player_impl.h
 --- a/third_party/blink/renderer/platform/media/web_media_player_impl.h
 +++ b/third_party/blink/renderer/platform/media/web_media_player_impl.h
 +++ b/third_party/blink/renderer/platform/media/web_media_player_impl.h
-@@ -191,6 +191,9 @@ class PLATFORM_EXPORT WebMediaPlayerImpl
+@@ -192,6 +192,9 @@ class PLATFORM_EXPORT WebMediaPlayerImpl
    bool HasVideo() const override;
    bool HasVideo() const override;
    bool HasAudio() const override;
    bool HasAudio() const override;
  
  

+ 1 - 1
build/patches/Ask-user-before-closing-all-tabs.patch

@@ -10,7 +10,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
 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
 --- a/chrome/browser/flags/android/chrome_feature_list.cc
 +++ b/chrome/browser/flags/android/chrome_feature_list.cc
 +++ b/chrome/browser/flags/android/chrome_feature_list.cc
-@@ -460,8 +460,8 @@ const base::Feature kConditionalTabStripAndroid{
+@@ -480,8 +480,8 @@ const base::Feature kConditionalTabStripAndroid{
  const base::Feature kCastDeviceFilter{"CastDeviceFilter",
  const base::Feature kCastDeviceFilter{"CastDeviceFilter",
                                        base::FEATURE_DISABLED_BY_DEFAULT};
                                        base::FEATURE_DISABLED_BY_DEFAULT};
  
  

+ 1 - 1
build/patches/AudioBuffer-AnalyserNode-fp-mitigations.patch

@@ -48,7 +48,7 @@ diff --git a/third_party/blink/renderer/modules/webaudio/audio_buffer.idl b/thir
 diff --git a/third_party/blink/renderer/modules/webaudio/audio_context.cc b/third_party/blink/renderer/modules/webaudio/audio_context.cc
 diff --git a/third_party/blink/renderer/modules/webaudio/audio_context.cc b/third_party/blink/renderer/modules/webaudio/audio_context.cc
 --- a/third_party/blink/renderer/modules/webaudio/audio_context.cc
 --- a/third_party/blink/renderer/modules/webaudio/audio_context.cc
 +++ b/third_party/blink/renderer/modules/webaudio/audio_context.cc
 +++ b/third_party/blink/renderer/modules/webaudio/audio_context.cc
-@@ -486,7 +486,9 @@ double AudioContext::baseLatency() const {
+@@ -502,7 +502,9 @@ double AudioContext::baseLatency() const {
    DCHECK(IsMainThread());
    DCHECK(IsMainThread());
    DCHECK(destination());
    DCHECK(destination());
  
  

File diff suppressed because it is too large
+ 188 - 101
build/patches/Automated-domain-substitution.patch


+ 3 - 3
build/patches/Block-gateway-attacks-via-websockets.patch

@@ -47,7 +47,7 @@ diff --git a/third_party/blink/renderer/core/execution_context/execution_context
 diff --git a/third_party/blink/renderer/core/execution_context/execution_context.h b/third_party/blink/renderer/core/execution_context/execution_context.h
 diff --git a/third_party/blink/renderer/core/execution_context/execution_context.h b/third_party/blink/renderer/core/execution_context/execution_context.h
 --- a/third_party/blink/renderer/core/execution_context/execution_context.h
 --- a/third_party/blink/renderer/core/execution_context/execution_context.h
 +++ b/third_party/blink/renderer/core/execution_context/execution_context.h
 +++ b/third_party/blink/renderer/core/execution_context/execution_context.h
-@@ -378,6 +378,7 @@ class CORE_EXPORT ExecutionContext : public Supplementable<ExecutionContext>,
+@@ -381,6 +381,7 @@ class CORE_EXPORT ExecutionContext : public Supplementable<ExecutionContext>,
    void SetAddressSpace(network::mojom::blink::IPAddressSpace ip_address_space);
    void SetAddressSpace(network::mojom::blink::IPAddressSpace ip_address_space);
  
  
    HeapObserverSet<ContextLifecycleObserver>& ContextLifecycleObserverSet();
    HeapObserverSet<ContextLifecycleObserver>& ContextLifecycleObserverSet();
@@ -110,7 +110,7 @@ diff --git a/third_party/blink/renderer/core/loader/frame_fetch_context.h b/thir
 diff --git a/third_party/blink/renderer/core/loader/worker_fetch_context.cc b/third_party/blink/renderer/core/loader/worker_fetch_context.cc
 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
 --- a/third_party/blink/renderer/core/loader/worker_fetch_context.cc
 +++ b/third_party/blink/renderer/core/loader/worker_fetch_context.cc
 +++ b/third_party/blink/renderer/core/loader/worker_fetch_context.cc
-@@ -24,6 +24,7 @@
+@@ -25,6 +25,7 @@
  #include "third_party/blink/renderer/platform/loader/fetch/resource_timing_info.h"
  #include "third_party/blink/renderer/platform/loader/fetch/resource_timing_info.h"
  #include "third_party/blink/renderer/platform/loader/fetch/worker_resource_timing_notifier.h"
  #include "third_party/blink/renderer/platform/loader/fetch/worker_resource_timing_notifier.h"
  #include "third_party/blink/renderer/platform/network/network_state_notifier.h"
  #include "third_party/blink/renderer/platform/network/network_state_notifier.h"
@@ -118,7 +118,7 @@ diff --git a/third_party/blink/renderer/core/loader/worker_fetch_context.cc b/th
  #include "third_party/blink/renderer/platform/runtime_enabled_features.h"
  #include "third_party/blink/renderer/platform/runtime_enabled_features.h"
  #include "third_party/blink/renderer/platform/supplementable.h"
  #include "third_party/blink/renderer/platform/supplementable.h"
  #include "third_party/blink/renderer/platform/weborigin/security_policy.h"
  #include "third_party/blink/renderer/platform/weborigin/security_policy.h"
-@@ -90,6 +91,26 @@ bool WorkerFetchContext::ShouldBlockRequestByInspector(const KURL& url) const {
+@@ -91,6 +92,26 @@ bool WorkerFetchContext::ShouldBlockRequestByInspector(const KURL& url) const {
    return should_block_request;
    return should_block_request;
  }
  }
  
  

+ 13 - 13
build/patches/Block-qjz9zk-or-trk-requests.patch

@@ -31,10 +31,10 @@ diff --git a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.c
 @@ -58,6 +58,7 @@ ChromeAutocompleteSchemeClassifier::GetInputTypeForScheme(
 @@ -58,6 +58,7 @@ ChromeAutocompleteSchemeClassifier::GetInputTypeForScheme(
    if (base::IsStringASCII(scheme) &&
    if (base::IsStringASCII(scheme) &&
        (ProfileIOData::IsHandledProtocol(scheme) ||
        (ProfileIOData::IsHandledProtocol(scheme) ||
-        base::LowerCaseEqualsASCII(scheme, content::kViewSourceScheme) ||
-+       base::LowerCaseEqualsASCII(scheme, url::kTraceScheme) ||
-        base::LowerCaseEqualsASCII(scheme, url::kJavaScriptScheme) ||
-        base::LowerCaseEqualsASCII(scheme, url::kDataScheme))) {
+        base::EqualsCaseInsensitiveASCII(scheme, content::kViewSourceScheme) ||
++       base::EqualsCaseInsensitiveASCII(scheme, url::kTraceScheme) ||
+        base::EqualsCaseInsensitiveASCII(scheme, url::kJavaScriptScheme) ||
+        base::EqualsCaseInsensitiveASCII(scheme, url::kDataScheme))) {
      return metrics::OmniboxInputType::URL;
      return metrics::OmniboxInputType::URL;
 diff --git a/chrome/browser/history/history_utils.cc b/chrome/browser/history/history_utils.cc
 diff --git a/chrome/browser/history/history_utils.cc b/chrome/browser/history/history_utils.cc
 --- a/chrome/browser/history/history_utils.cc
 --- a/chrome/browser/history/history_utils.cc
@@ -50,7 +50,7 @@ diff --git a/chrome/browser/history/history_utils.cc b/chrome/browser/history/hi
 diff --git a/chrome/browser/ui/singleton_tabs.cc b/chrome/browser/ui/singleton_tabs.cc
 diff --git a/chrome/browser/ui/singleton_tabs.cc b/chrome/browser/ui/singleton_tabs.cc
 --- a/chrome/browser/ui/singleton_tabs.cc
 --- a/chrome/browser/ui/singleton_tabs.cc
 +++ b/chrome/browser/ui/singleton_tabs.cc
 +++ b/chrome/browser/ui/singleton_tabs.cc
-@@ -106,6 +106,11 @@ int GetIndexOfExistingTab(Browser* browser, const NavigateParams& params) {
+@@ -101,6 +101,11 @@ int GetIndexOfExistingTab(Browser* browser, const NavigateParams& params) {
        continue;
        continue;
      }
      }
  
  
@@ -81,13 +81,13 @@ diff --git a/components/omnibox/browser/autocomplete_input.cc b/components/omnib
    return url::FindAndCompareScheme(utf8_input, scheme, nullptr);
    return url::FindAndCompareScheme(utf8_input, scheme, nullptr);
  }
  }
  
  
-@@ -560,7 +565,8 @@ void AutocompleteInput::ParseForEmphasizeComponents(
+@@ -562,7 +567,8 @@ void AutocompleteInput::ParseForEmphasizeComponents(
    // For the view-source and blob schemes, we should emphasize the host of the
    // For the view-source and blob schemes, we should emphasize the host of the
    // URL qualified by the view-source or blob prefix.
    // URL qualified by the view-source or blob prefix.
-   if ((base::LowerCaseEqualsASCII(scheme_str, kViewSourceScheme) ||
--       base::LowerCaseEqualsASCII(scheme_str, url::kBlobScheme)) &&
-+       base::LowerCaseEqualsASCII(scheme_str, url::kBlobScheme) ||
-+       base::LowerCaseEqualsASCII(scheme_str, url::kTraceScheme)) &&
+   if ((base::EqualsCaseInsensitiveASCII(scheme_str, kViewSourceScheme) ||
+-       base::EqualsCaseInsensitiveASCII(scheme_str, url::kBlobScheme)) &&
++       base::EqualsCaseInsensitiveASCII(scheme_str, url::kBlobScheme) ||
++       base::EqualsCaseInsensitiveASCII(scheme_str, url::kTraceScheme)) &&
        (static_cast<int>(text.length()) > after_scheme_and_colon)) {
        (static_cast<int>(text.length()) > after_scheme_and_colon)) {
      // Obtain the URL prefixed by view-source or blob and parse it.
      // Obtain the URL prefixed by view-source or blob and parse it.
      std::u16string real_url(text.substr(after_scheme_and_colon));
      std::u16string real_url(text.substr(after_scheme_and_colon));
@@ -108,7 +108,7 @@ diff --git a/components/url_formatter/url_fixer.cc b/components/url_formatter/ur
 diff --git a/content/browser/child_process_security_policy_impl.cc b/content/browser/child_process_security_policy_impl.cc
 diff --git a/content/browser/child_process_security_policy_impl.cc b/content/browser/child_process_security_policy_impl.cc
 --- a/content/browser/child_process_security_policy_impl.cc
 --- a/content/browser/child_process_security_policy_impl.cc
 +++ b/content/browser/child_process_security_policy_impl.cc
 +++ b/content/browser/child_process_security_policy_impl.cc
-@@ -747,6 +747,7 @@ ChildProcessSecurityPolicyImpl::ChildProcessSecurityPolicyImpl()
+@@ -755,6 +755,7 @@ ChildProcessSecurityPolicyImpl::ChildProcessSecurityPolicyImpl()
    RegisterPseudoScheme(url::kJavaScriptScheme);
    RegisterPseudoScheme(url::kJavaScriptScheme);
    RegisterPseudoScheme(kViewSourceScheme);
    RegisterPseudoScheme(kViewSourceScheme);
    RegisterPseudoScheme(kGoogleChromeScheme);
    RegisterPseudoScheme(kGoogleChromeScheme);
@@ -212,7 +212,7 @@ diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
  
  
  using base::Time;
  using base::Time;
  using std::string;
  using std::string;
-@@ -609,6 +611,12 @@ URLRequest::URLRequest(const GURL& url,
+@@ -587,6 +589,12 @@ URLRequest::URLRequest(const GURL& url,
    // Sanity check out environment.
    // Sanity check out environment.
    DCHECK(base::ThreadTaskRunnerHandle::IsSet());
    DCHECK(base::ThreadTaskRunnerHandle::IsSet());
  
  
@@ -236,7 +236,7 @@ diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/ur
  #include "net/url_request/url_request_context.h"
  #include "net/url_request/url_request_context.h"
  #include "net/url_request/url_request_context_storage.h"
  #include "net/url_request/url_request_context_storage.h"
  #include "net/url_request/url_request_job_factory.h"
  #include "net/url_request/url_request_job_factory.h"
-@@ -629,6 +630,8 @@ std::unique_ptr<URLRequestContext> URLRequestContextBuilder::Build() {
+@@ -628,6 +629,8 @@ std::unique_ptr<URLRequestContext> URLRequestContextBuilder::Build() {
      job_factory->SetProtocolHandler(scheme_handler.first,
      job_factory->SetProtocolHandler(scheme_handler.first,
                                      std::move(scheme_handler.second));
                                      std::move(scheme_handler.second));
    }
    }

+ 33 - 31
build/patches/Bromite-AdBlockUpdaterService.patch

@@ -23,7 +23,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
  .../browser/settings/AdBlockPreferences.java  |  61 ++++
  .../browser/settings/AdBlockPreferences.java  |  61 ++++
  .../chrome/browser/tabmodel/TabModelImpl.java |   2 +-
  .../chrome/browser/tabmodel/TabModelImpl.java |   2 +-
  chrome/app/generated_resources.grd            |  10 +
  chrome/app/generated_resources.grd            |  10 +
- chrome/browser/after_startup_task_utils.cc    |   5 +
+ chrome/browser/after_startup_task_utils.cc    |   4 +
  chrome/browser/browser_process.h              |   6 +
  chrome/browser/browser_process.h              |   6 +
  chrome/browser/browser_process_impl.cc        |  20 ++
  chrome/browser/browser_process_impl.cc        |  20 ++
  chrome/browser/browser_process_impl.h         |   2 +
  chrome/browser/browser_process_impl.h         |   2 +
@@ -46,10 +46,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
  .../content/browser/ruleset_service.h         |   7 +-
  .../content/browser/ruleset_service.h         |   7 +-
  .../content/browser/ruleset_version.h         |   4 +
  .../content/browser/ruleset_version.h         |   4 +
  .../browser/verified_ruleset_dealer.cc        |   4 +
  .../browser/verified_ruleset_dealer.cc        |   4 +
- .../browser/subresource_filter_features.cc    | 113 +-------
+ .../browser/subresource_filter_features.cc    | 116 +-------
  .../core/common/indexed_ruleset.cc            |   5 +-
  .../core/common/indexed_ruleset.cc            |   5 +-
  .../navigation_throttle_runner.cc             |   5 -
  .../navigation_throttle_runner.cc             |   5 -
- 38 files changed, 1161 insertions(+), 126 deletions(-)
+ 38 files changed, 1160 insertions(+), 129 deletions(-)
  create mode 100644 chrome/android/java/res/layout/adblock_editor.xml
  create mode 100644 chrome/android/java/res/layout/adblock_editor.xml
  create mode 100644 chrome/android/java/res/xml/adblock_preferences.xml
  create mode 100644 chrome/android/java/res/xml/adblock_preferences.xml
  create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/settings/AdBlockEditor.java
  create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/settings/AdBlockEditor.java
@@ -62,7 +62,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
 diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
 --- a/chrome/android/BUILD.gn
 --- a/chrome/android/BUILD.gn
 +++ b/chrome/android/BUILD.gn
 +++ b/chrome/android/BUILD.gn
-@@ -357,6 +357,7 @@ android_library("chrome_java") {
+@@ -360,6 +360,7 @@ android_library("chrome_java") {
      "//chrome/browser/download/android:java",
      "//chrome/browser/download/android:java",
      "//chrome/browser/download/android:java_resources",
      "//chrome/browser/download/android:java_resources",
      "//chrome/browser/enterprise/util:java",
      "//chrome/browser/enterprise/util:java",
@@ -73,7 +73,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
 diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni
 diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni
 --- a/chrome/android/chrome_java_resources.gni
 --- a/chrome/android/chrome_java_resources.gni
 +++ b/chrome/android/chrome_java_resources.gni
 +++ b/chrome/android/chrome_java_resources.gni
-@@ -458,6 +458,7 @@ chrome_java_resources = [
+@@ -456,6 +456,7 @@ chrome_java_resources = [
    "java/res/layout/account_chooser_dialog_title.xml",
    "java/res/layout/account_chooser_dialog_title.xml",
    "java/res/layout/account_divider_preference.xml",
    "java/res/layout/account_divider_preference.xml",
    "java/res/layout/account_management_account_row.xml",
    "java/res/layout/account_management_account_row.xml",
@@ -81,7 +81,7 @@ diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_ja
    "java/res/layout/auto_sign_in_first_run_dialog.xml",
    "java/res/layout/auto_sign_in_first_run_dialog.xml",
    "java/res/layout/autofill_billing_address_dropdown.xml",
    "java/res/layout/autofill_billing_address_dropdown.xml",
    "java/res/layout/autofill_card_unmask_prompt.xml",
    "java/res/layout/autofill_card_unmask_prompt.xml",
-@@ -651,6 +652,7 @@ chrome_java_resources = [
+@@ -650,6 +651,7 @@ chrome_java_resources = [
    "java/res/values/values.xml",
    "java/res/values/values.xml",
    "java/res/xml/about_chrome_preferences.xml",
    "java/res/xml/about_chrome_preferences.xml",
    "java/res/xml/account_management_preferences.xml",
    "java/res/xml/account_management_preferences.xml",
@@ -92,7 +92,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
 diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
 --- a/chrome/android/chrome_java_sources.gni
 --- a/chrome/android/chrome_java_sources.gni
 +++ b/chrome/android/chrome_java_sources.gni
 +++ b/chrome/android/chrome_java_sources.gni
-@@ -896,6 +896,8 @@ chrome_java_sources = [
+@@ -898,6 +898,8 @@ chrome_java_sources = [
    "java/src/org/chromium/chrome/browser/permissions/PermissionSettingsBridge.java",
    "java/src/org/chromium/chrome/browser/permissions/PermissionSettingsBridge.java",
    "java/src/org/chromium/chrome/browser/permissions/PermissionUpdateRequester.java",
    "java/src/org/chromium/chrome/browser/permissions/PermissionUpdateRequester.java",
    "java/src/org/chromium/chrome/browser/photo_picker/DecoderServiceImpl.java",
    "java/src/org/chromium/chrome/browser/photo_picker/DecoderServiceImpl.java",
@@ -435,7 +435,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabMod
 diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
 diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
 --- a/chrome/app/generated_resources.grd
 --- a/chrome/app/generated_resources.grd
 +++ b/chrome/app/generated_resources.grd
 +++ b/chrome/app/generated_resources.grd
-@@ -11842,6 +11842,16 @@ Please help our engineers fix this problem. Tell us what happened right before y
+@@ -11916,6 +11916,16 @@ Please help our engineers fix this problem. Tell us what happened right before y
        Never show this again.
        Never show this again.
      </message>
      </message>
  
  
@@ -455,8 +455,8 @@ diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources
 diff --git a/chrome/browser/after_startup_task_utils.cc b/chrome/browser/after_startup_task_utils.cc
 diff --git a/chrome/browser/after_startup_task_utils.cc b/chrome/browser/after_startup_task_utils.cc
 --- a/chrome/browser/after_startup_task_utils.cc
 --- a/chrome/browser/after_startup_task_utils.cc
 +++ b/chrome/browser/after_startup_task_utils.cc
 +++ b/chrome/browser/after_startup_task_utils.cc
-@@ -33,6 +33,8 @@
- #include "chromeos/lacros/lacros_service.h"
+@@ -27,6 +27,8 @@
+ #include "chromeos/startup/browser_init_params.h"
  #endif  // BUILDFLAG(IS_CHROMEOS_LACROS)
  #endif  // BUILDFLAG(IS_CHROMEOS_LACROS)
  
  
 +#include "chrome/browser/browser_process.h"
 +#include "chrome/browser/browser_process.h"
@@ -464,16 +464,15 @@ diff --git a/chrome/browser/after_startup_task_utils.cc b/chrome/browser/after_s
  using content::BrowserThread;
  using content::BrowserThread;
  
  
  namespace {
  namespace {
-@@ -128,6 +130,9 @@ void SetBrowserStartupIsComplete() {
+@@ -121,6 +123,8 @@ void SetBrowserStartupIsComplete() {
+     ScheduleTask(base::WrapUnique(queued_task));
    g_after_startup_tasks.Get().clear();
    g_after_startup_tasks.Get().clear();
    g_after_startup_tasks.Get().shrink_to_fit();
    g_after_startup_tasks.Get().shrink_to_fit();
- 
 +  // initialize AdBlock engine scheduled updates
 +  // initialize AdBlock engine scheduled updates
 +  g_browser_process->adblock_updater()->Start();
 +  g_browser_process->adblock_updater()->Start();
-+
- // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
- // of lacros-chrome is complete.
- #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
+ }
+ 
+ // Observes the first visible page load and sets the startup complete
 diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h
 diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h
 --- a/chrome/browser/browser_process.h
 --- a/chrome/browser/browser_process.h
 +++ b/chrome/browser/browser_process.h
 +++ b/chrome/browser/browser_process.h
@@ -507,7 +506,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
 diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
 --- a/chrome/browser/browser_process_impl.cc
 --- a/chrome/browser/browser_process_impl.cc
 +++ b/chrome/browser/browser_process_impl.cc
 +++ b/chrome/browser/browser_process_impl.cc
-@@ -1064,6 +1064,26 @@ BrowserProcessImpl::component_updater() {
+@@ -1077,6 +1077,26 @@ BrowserProcessImpl::component_updater() {
    return component_updater_.get();
    return component_updater_.get();
  }
  }
  
  
@@ -556,7 +555,7 @@ diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_proc
 diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
 diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
 --- a/chrome/browser/chrome_browser_main.cc
 --- a/chrome/browser/chrome_browser_main.cc
 +++ b/chrome/browser/chrome_browser_main.cc
 +++ b/chrome/browser/chrome_browser_main.cc
-@@ -1730,6 +1730,9 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
+@@ -1735,6 +1735,9 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
    // will be initialized when the app enters foreground mode.
    // will be initialized when the app enters foreground mode.
    variations_service->set_policy_pref_service(profile->GetPrefs());
    variations_service->set_policy_pref_service(profile->GetPrefs());
  
  
@@ -594,7 +593,7 @@ diff --git a/chrome/browser/flags/android/cached_feature_flags.cc b/chrome/brows
 diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
 diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
 --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
 --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
 +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
 +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
-@@ -273,6 +273,14 @@ public class CachedFeatureFlags {
+@@ -266,6 +266,14 @@ public class CachedFeatureFlags {
                  ChromeFeatureList.isEnabled(ChromeFeatureList.BACKGROUND_THREAD_POOL));
                  ChromeFeatureList.isEnabled(ChromeFeatureList.BACKGROUND_THREAD_POOL));
      }
      }
  
  
@@ -609,7 +608,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f
      /**
      /**
       * Caches flags that must take effect on startup but are set via native code.
       * Caches flags that must take effect on startup but are set via native code.
       */
       */
-@@ -490,5 +498,7 @@ public class CachedFeatureFlags {
+@@ -507,5 +515,7 @@ public class CachedFeatureFlags {
      @NativeMethods
      @NativeMethods
      interface Natives {
      interface Natives {
          boolean isNetworkServiceWarmUpEnabled();
          boolean isNetworkServiceWarmUpEnabled();
@@ -620,7 +619,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f
 diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc
 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
 --- a/chrome/browser/net/system_network_context_manager.cc
 +++ b/chrome/browser/net/system_network_context_manager.cc
 +++ b/chrome/browser/net/system_network_context_manager.cc
-@@ -436,6 +436,8 @@ SystemNetworkContextManager::SystemNetworkContextManager(
+@@ -444,6 +444,8 @@ SystemNetworkContextManager::SystemNetworkContextManager(
        ssl_config_service_manager_(local_state_),
        ssl_config_service_manager_(local_state_),
        proxy_config_monitor_(local_state_),
        proxy_config_monitor_(local_state_),
        stub_resolver_config_reader_(local_state_) {
        stub_resolver_config_reader_(local_state_) {
@@ -629,7 +628,7 @@ diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/brows
  #if !BUILDFLAG(IS_ANDROID)
  #if !BUILDFLAG(IS_ANDROID)
    // QuicAllowed was not part of Android policy.
    // QuicAllowed was not part of Android policy.
    const base::Value* value =
    const base::Value* value =
-@@ -516,6 +518,8 @@ SystemNetworkContextManager::~SystemNetworkContextManager() {
+@@ -524,6 +526,8 @@ SystemNetworkContextManager::~SystemNetworkContextManager() {
  void SystemNetworkContextManager::RegisterPrefs(PrefRegistrySimple* registry) {
  void SystemNetworkContextManager::RegisterPrefs(PrefRegistrySimple* registry) {
    StubResolverConfigReader::RegisterPrefs(registry);
    StubResolverConfigReader::RegisterPrefs(registry);
  
  
@@ -679,7 +678,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
 diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
 diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
 --- a/chrome/common/pref_names.cc
 --- a/chrome/common/pref_names.cc
 +++ b/chrome/common/pref_names.cc
 +++ b/chrome/common/pref_names.cc
-@@ -2325,6 +2325,9 @@ const char kAudioCaptureAllowed[] = "hardware.audio_capture_enabled";
+@@ -2327,6 +2327,9 @@ const char kAudioCaptureAllowed[] = "hardware.audio_capture_enabled";
  // capture devices without prompt.
  // capture devices without prompt.
  const char kAudioCaptureAllowedUrls[] = "hardware.audio_capture_allowed_urls";
  const char kAudioCaptureAllowedUrls[] = "hardware.audio_capture_allowed_urls";
  
  
@@ -1681,7 +1680,7 @@ diff --git a/components/subresource_filter/content/browser/verified_ruleset_deal
 diff --git a/components/subresource_filter/core/browser/subresource_filter_features.cc b/components/subresource_filter/core/browser/subresource_filter_features.cc
 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
 --- a/components/subresource_filter/core/browser/subresource_filter_features.cc
 +++ b/components/subresource_filter/core/browser/subresource_filter_features.cc
 +++ b/components/subresource_filter/core/browser/subresource_filter_features.cc
-@@ -55,69 +55,7 @@ class CommaSeparatedStrings {
+@@ -55,72 +55,7 @@ class CommaSeparatedStrings {
    const std::vector<base::StringPiece> pieces_;
    const std::vector<base::StringPiece> pieces_;
  };
  };
  
  
@@ -1698,18 +1697,21 @@ diff --git a/components/subresource_filter/core/browser/subresource_filter_featu
 -
 -
 -mojom::ActivationLevel ParseActivationLevel(
 -mojom::ActivationLevel ParseActivationLevel(
 -    const base::StringPiece activation_level) {
 -    const base::StringPiece activation_level) {
--  if (base::LowerCaseEqualsASCII(activation_level, kActivationLevelEnabled))
+-  if (base::EqualsCaseInsensitiveASCII(activation_level,
+-                                       kActivationLevelEnabled))
 -    return mojom::ActivationLevel::kEnabled;
 -    return mojom::ActivationLevel::kEnabled;
--  else if (base::LowerCaseEqualsASCII(activation_level, kActivationLevelDryRun))
+-  else if (base::EqualsCaseInsensitiveASCII(activation_level,
+-                                            kActivationLevelDryRun))
 -    return mojom::ActivationLevel::kDryRun;
 -    return mojom::ActivationLevel::kDryRun;
 -  return mojom::ActivationLevel::kDisabled;
 -  return mojom::ActivationLevel::kDisabled;
 -}
 -}
 -
 -
 -ActivationScope ParseActivationScope(const base::StringPiece activation_scope) {
 -ActivationScope ParseActivationScope(const base::StringPiece activation_scope) {
--  if (base::LowerCaseEqualsASCII(activation_scope, kActivationScopeAllSites))
+-  if (base::EqualsCaseInsensitiveASCII(activation_scope,
+-                                       kActivationScopeAllSites))
 -    return ActivationScope::ALL_SITES;
 -    return ActivationScope::ALL_SITES;
--  else if (base::LowerCaseEqualsASCII(activation_scope,
--                                      kActivationScopeActivationList))
+-  else if (base::EqualsCaseInsensitiveASCII(activation_scope,
+-                                            kActivationScopeActivationList))
 -    return ActivationScope::ACTIVATION_LIST;
 -    return ActivationScope::ACTIVATION_LIST;
 -  return ActivationScope::NO_SITES;
 -  return ActivationScope::NO_SITES;
 -}
 -}
@@ -1752,7 +1754,7 @@ diff --git a/components/subresource_filter/core/browser/subresource_filter_featu
    // If ad tagging is enabled, turn on the dryrun automatically.
    // If ad tagging is enabled, turn on the dryrun automatically.
    bool ad_tagging_enabled = base::FeatureList::IsEnabled(kAdTagging);
    bool ad_tagging_enabled = base::FeatureList::IsEnabled(kAdTagging);
    const struct {
    const struct {
-@@ -125,23 +63,16 @@ std::vector<Configuration> FillEnabledPresetConfigurations(
+@@ -128,23 +63,16 @@ std::vector<Configuration> FillEnabledPresetConfigurations(
      bool enabled_by_default;
      bool enabled_by_default;
      Configuration (*factory_method)();
      Configuration (*factory_method)();
    } kAvailablePresetConfigurations[] = {
    } kAvailablePresetConfigurations[] = {
@@ -1778,7 +1780,7 @@ diff --git a/components/subresource_filter/core/browser/subresource_filter_featu
        enabled_configurations.push_back(available_preset.factory_method());
        enabled_configurations.push_back(available_preset.factory_method());
      }
      }
    }
    }
-@@ -149,46 +80,10 @@ std::vector<Configuration> FillEnabledPresetConfigurations(
+@@ -152,46 +80,10 @@ std::vector<Configuration> FillEnabledPresetConfigurations(
    return enabled_configurations;
    return enabled_configurations;
  }
  }
  
  

+ 284 - 278
build/patches/Bromite-auto-updater.patch

@@ -21,15 +21,16 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
  .../omaha/inline/InlineUpdateController.java  |  51 ++++
  .../omaha/inline/InlineUpdateController.java  |  51 ++++
  .../inline/InlineUpdateControllerFactory.java |  21 ++
  .../inline/InlineUpdateControllerFactory.java |  21 ++
  chrome/browser/endpoint_fetcher/BUILD.gn      |   2 +
  chrome/browser/endpoint_fetcher/BUILD.gn      |   2 +
- .../endpoint_fetcher/endpoint_fetcher.cc      | 158 +++++++++++-
- .../endpoint_fetcher/endpoint_fetcher.h       |  22 +-
+ .../endpoint_fetcher_android.cc               |  52 +++-
  .../endpoint_fetcher/EndpointFetcher.java     |  22 +-
  .../endpoint_fetcher/EndpointFetcher.java     |  22 +-
  .../EndpointHeaderResponse.java               |  31 +++
  .../EndpointHeaderResponse.java               |  31 +++
  .../flags/android/chrome_feature_list.cc      |   4 +
  .../flags/android/chrome_feature_list.cc      |   4 +
  .../flags/android/chrome_feature_list.h       |   1 +
  .../flags/android/chrome_feature_list.h       |   1 +
  .../browser/flags/ChromeFeatureList.java      |   1 +
  .../browser/flags/ChromeFeatureList.java      |   1 +
  .../strings/android_chrome_strings.grd        |  23 +-
  .../strings/android_chrome_strings.grd        |  23 +-
- 22 files changed, 898 insertions(+), 55 deletions(-)
+ .../endpoint_fetcher/endpoint_fetcher.cc      | 107 +++++++-
+ .../endpoint_fetcher/endpoint_fetcher.h       |  22 +-
+ 23 files changed, 899 insertions(+), 55 deletions(-)
  create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/omaha/inline/BromiteInlineUpdateController.java
  create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/omaha/inline/BromiteInlineUpdateController.java
  create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/omaha/inline/InlineUpdateController.java
  create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/omaha/inline/InlineUpdateController.java
  create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/omaha/inline/InlineUpdateControllerFactory.java
  create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/omaha/inline/InlineUpdateControllerFactory.java
@@ -48,7 +49,7 @@ diff --git a/build/android/java/templates/BuildConfig.template b/build/android/j
 diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
 diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
 --- a/build/config/android/rules.gni
 --- a/build/config/android/rules.gni
 +++ b/build/config/android/rules.gni
 +++ b/build/config/android/rules.gni
-@@ -2018,6 +2018,9 @@ if (enable_java_templates) {
+@@ -2049,6 +2049,9 @@ if (enable_java_templates) {
            ]
            ]
          }
          }
        }
        }
@@ -61,7 +62,7 @@ diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
 diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
 diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
 --- a/chrome/android/chrome_java_sources.gni
 --- a/chrome/android/chrome_java_sources.gni
 +++ b/chrome/android/chrome_java_sources.gni
 +++ b/chrome/android/chrome_java_sources.gni
-@@ -799,6 +799,9 @@ chrome_java_sources = [
+@@ -801,6 +801,9 @@ chrome_java_sources = [
    "java/src/org/chromium/chrome/browser/omaha/UpdateConfigs.java",
    "java/src/org/chromium/chrome/browser/omaha/UpdateConfigs.java",
    "java/src/org/chromium/chrome/browser/omaha/UpdateMenuItemHelper.java",
    "java/src/org/chromium/chrome/browser/omaha/UpdateMenuItemHelper.java",
    "java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java",
    "java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java",
@@ -1085,18 +1086,265 @@ diff --git a/chrome/browser/endpoint_fetcher/BUILD.gn b/chrome/browser/endpoint_
 +    "java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointHeaderResponse.java",
 +    "java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointHeaderResponse.java",
    ]
    ]
  }
  }
-diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc b/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc
---- a/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc
-+++ b/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc
-@@ -26,10 +26,15 @@
+diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher_android.cc b/chrome/browser/endpoint_fetcher/endpoint_fetcher_android.cc
+--- a/chrome/browser/endpoint_fetcher/endpoint_fetcher_android.cc
++++ b/chrome/browser/endpoint_fetcher/endpoint_fetcher_android.cc
+@@ -9,6 +9,7 @@
  #include "base/android/jni_string.h"
  #include "base/android/jni_string.h"
  #include "chrome/browser/endpoint_fetcher/jni_headers/EndpointFetcher_jni.h"
  #include "chrome/browser/endpoint_fetcher/jni_headers/EndpointFetcher_jni.h"
  #include "chrome/browser/endpoint_fetcher/jni_headers/EndpointResponse_jni.h"
  #include "chrome/browser/endpoint_fetcher/jni_headers/EndpointResponse_jni.h"
 +#include "chrome/browser/endpoint_fetcher/jni_headers/EndpointHeaderResponse_jni.h"
 +#include "chrome/browser/endpoint_fetcher/jni_headers/EndpointHeaderResponse_jni.h"
  #include "chrome/browser/profiles/profile_android.h"
  #include "chrome/browser/profiles/profile_android.h"
+ #include "chrome/browser/signin/identity_manager_factory.h"
+ #include "chrome/common/channel_info.h"
+@@ -30,6 +31,24 @@ static void OnEndpointFetcherComplete(
+                        base::android::AttachCurrentThread(),
+                        std::move(endpoint_response->response))));
+ }
++
++static void OnEndpointFetcherHeadComplete(
++    const base::android::JavaRef<jobject>& jcaller,
++    // Passing the endpoint_fetcher ensures the endpoint_fetcher's
++    // lifetime extends to the callback and is not destroyed
++    // prematurely (which would result in cancellation of the request).
++    std::unique_ptr<EndpointFetcher> endpoint_fetcher,
++    std::unique_ptr<EndpointResponse> endpoint_response) {
++  base::android::RunObjectCallbackAndroid(
++      jcaller, Java_EndpointHeaderResponse_createEndpointResponse(
++                   base::android::AttachCurrentThread(),
++                   base::android::ConvertUTF8ToJavaString(
++                       base::android::AttachCurrentThread(),
++                       std::move(endpoint_response->response)),
++                   base::android::ConvertUTF8ToJavaString(
++                       base::android::AttachCurrentThread(),
++                       std::move(endpoint_response->redirect_url))));
++}
+ }  // namespace
  
  
- #endif  // BUILDFLAG(IS_ANDROID)
+ // TODO(crbug.com/1077537) Create a KeyProvider so
+@@ -109,15 +128,17 @@ static void JNI_EndpointFetcher_NativeFetchWithNoAuth(
+     JNIEnv* env,
+     const base::android::JavaParamRef<jobject>& jprofile,
+     const base::android::JavaParamRef<jstring>& jurl,
+-    jint jannotation_hash_code,
++    jlong jtimeout, jboolean intercept_redirect,
+     const base::android::JavaParamRef<jobject>& jcallback) {
+   auto endpoint_fetcher = std::make_unique<EndpointFetcher>(
+       ProfileAndroid::FromProfileAndroid(jprofile)
+           ->GetDefaultStoragePartition()
+           ->GetURLLoaderFactoryForBrowserProcess(),
+       GURL(base::android::ConvertJavaStringToUTF8(env, jurl)),
+-      net::NetworkTrafficAnnotationTag::FromJavaAnnotation(
+-          jannotation_hash_code));
++      "GET",
++      jtimeout,
++      intercept_redirect,
++      NO_TRAFFIC_ANNOTATION_YET);
+   auto* const endpoint_fetcher_ptr = endpoint_fetcher.get();
+   endpoint_fetcher_ptr->PerformRequest(
+       base::BindOnce(&OnEndpointFetcherComplete,
+@@ -127,3 +148,28 @@ static void JNI_EndpointFetcher_NativeFetchWithNoAuth(
+                      std::move(endpoint_fetcher)),
+       nullptr);
+ }
++
++static void JNI_EndpointFetcher_NativeHeadWithNoAuth(
++    JNIEnv* env,
++    const base::android::JavaParamRef<jobject>& jprofile,
++    const base::android::JavaParamRef<jstring>& jurl,
++    jlong jtimeout, jboolean intercept_redirect,
++    const base::android::JavaParamRef<jobject>& jcallback) {
++  auto endpoint_fetcher = std::make_unique<EndpointFetcher>(
++      ProfileAndroid::FromProfileAndroid(jprofile)
++        ->GetDefaultStoragePartition()
++        ->GetURLLoaderFactoryForBrowserProcess(),
++      GURL(base::android::ConvertJavaStringToUTF8(env, jurl)),
++      "HEAD",
++      jtimeout,
++      intercept_redirect,
++      NO_TRAFFIC_ANNOTATION_YET);
++  auto* const endpoint_fetcher_ptr = endpoint_fetcher.get();
++  endpoint_fetcher_ptr->PerformRequest(
++      base::BindOnce(&OnEndpointFetcherHeadComplete,
++                     base::android::ScopedJavaGlobalRef<jobject>(jcallback),
++                     // unique_ptr endpoint_fetcher is passed until the callback
++                     // to ensure its lifetime across the request.
++                     std::move(endpoint_fetcher)),
++      nullptr);
++}
+diff --git a/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointFetcher.java b/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointFetcher.java
+--- a/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointFetcher.java
++++ b/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointFetcher.java
+@@ -70,6 +70,22 @@ public final class EndpointFetcher {
+                 postData, timeout, headers, annotation.getHashCode(), callback);
+     }
  
  
++    @MainThread
++    public static void nativeHeadWithNoAuth(
++            Callback<EndpointHeaderResponse> callback, Profile profile,
++            String url, long timeout, boolean allow_redirect) {
++        EndpointFetcherJni.get().nativeHeadWithNoAuth(
++                profile, url, timeout, allow_redirect, callback);
++    }
++
++    @MainThread
++    public static void nativeFetchWithNoAuth(
++            Callback<EndpointResponse> callback, Profile profile,
++            String url, long timeout, boolean allow_redirect) {
++        EndpointFetcherJni.get().nativeFetchWithNoAuth(
++                profile, url, timeout, allow_redirect, callback);
++    }
++
+     @NativeMethods
+     public interface Natives {
+         void nativeFetchOAuth(Profile profile, String oathConsumerName, String url,
+@@ -78,7 +94,11 @@ public final class EndpointFetcher {
+         void nativeFetchChromeAPIKey(Profile profile, String url, String httpsMethod,
+                 String contentType, String postData, long timeout, String[] headers,
+                 int annotationHashCode, Callback<EndpointResponse> callback);
+-        void nativeFetchWithNoAuth(Profile profile, String url, int annotationHashCode,
++        void nativeFetchWithNoAuth(
++                Profile profile, String url, long timeout, boolean allow_redirect,
+                 Callback<EndpointResponse> callback);
++        void nativeHeadWithNoAuth(
++                Profile profile, String url, long timeout, boolean allow_redirect,
++                Callback<EndpointHeaderResponse> callback);
+     }
+ }
+diff --git a/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointHeaderResponse.java b/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointHeaderResponse.java
+new file mode 100644
+--- /dev/null
++++ b/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointHeaderResponse.java
+@@ -0,0 +1,31 @@
++// 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.
++
++package org.chromium.chrome.browser.endpoint_fetcher;
++
++import org.chromium.base.annotations.CalledByNative;
++
++public class EndpointHeaderResponse {
++    private final String mResponseString;
++    private final String mRedirectUrl;
++
++    public EndpointHeaderResponse(String responseString, String redirectUrl) {
++        mResponseString = responseString;
++        mRedirectUrl = redirectUrl;
++    }
++
++    public String getResponseString() {
++        return mResponseString;
++    }
++
++    public String getRedirectUrl() {
++        return mRedirectUrl;
++    }
++
++    @CalledByNative
++    private static EndpointHeaderResponse createEndpointResponse(
++            String response, String redirectUrl) {
++        return new EndpointHeaderResponse(response, redirectUrl);
++    }
++}
+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
+@@ -255,6 +255,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
+     &kNewWindowAppMenu,
+     &kNotificationPermissionVariant,
+     &kPageAnnotationsService,
++    &kInlineUpdateFlow,
+     &kBookmarksImprovedSaveFlow,
+     &kBookmarksRefresh,
+     &kBackGestureRefactorAndroid,
+@@ -686,6 +687,9 @@ const base::Feature kIncognitoReauthenticationForAndroid{
+ const base::Feature kIncognitoScreenshot{"IncognitoScreenshot",
+                                          base::FEATURE_DISABLED_BY_DEFAULT};
+ 
++const base::Feature kInlineUpdateFlow{"InlineUpdateFlow",
++                                      base::FEATURE_ENABLED_BY_DEFAULT};
++
+ const base::Feature kInstantStart{"InstantStart",
+                                   base::FEATURE_DISABLED_BY_DEFAULT};
+ 
+diff --git a/chrome/browser/flags/android/chrome_feature_list.h b/chrome/browser/flags/android/chrome_feature_list.h
+--- a/chrome/browser/flags/android/chrome_feature_list.h
++++ b/chrome/browser/flags/android/chrome_feature_list.h
+@@ -100,6 +100,7 @@ extern const base::Feature kGridTabSwitcherForTablets;
+ extern const base::Feature kHandleMediaIntents;
+ extern const base::Feature kImmersiveUiMode;
+ extern const base::Feature kIncognitoReauthenticationForAndroid;
++extern const base::Feature kInlineUpdateFlow;
+ extern const base::Feature kIncognitoScreenshot;
+ extern const base::Feature kImprovedA2HS;
+ extern const base::Feature kInstanceSwitcher;
+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
+@@ -377,6 +377,7 @@ public abstract class ChromeFeatureList {
+     public static final String INCOGNITO_REAUTHENTICATION_FOR_ANDROID =
+             "IncognitoReauthenticationForAndroid";
+     public static final String INCOGNITO_SCREENSHOT = "IncognitoScreenshot";
++    public static final String INLINE_UPDATE_FLOW = "InlineUpdateFlow";
+     public static final String INSTALLABLE_AMBIENT_BADGE_INFOBAR = "InstallableAmbientBadgeInfoBar";
+     public static final String INSTALLABLE_AMBIENT_BADGE_MESSAGE = "InstallableAmbientBadgeMessage";
+     public static final String INSTANCE_SWITCHER = "InstanceSwitcher";
+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
+@@ -1873,6 +1873,12 @@ Your Google account may have other forms of browsing history like searches and a
+       <message name="IDS_DEPRECATION_WARNING" desc="Warning about Chrome updates no longer being supported">
+         Chrome updates are no longer supported for this version of Android
+       </message>
++      <message name="IDS_ALLOW_INLINE_UPDATE_TITLE" desc="Title for allow inline update preference">
++        Allow checking for updates
++      </message>
++      <message name="IDS_ALLOW_INLINE_UPDATE_SUMMARY" desc="Summary for allow inline update preference">
++        Notify about new releases by periodically checking for their availability
++      </message>
+ 
+       <!-- Account management UI strings. -->
+       <message name="IDS_ACCOUNT_MANAGEMENT_TITLE" desc="Header title for the account management screen. [CHAR_LIMIT=32]">
+@@ -3435,7 +3441,10 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+ 
+       <!-- Main menu items -->
+       <message name="IDS_MENU_UPDATE" desc="Menu item for updating chrome. [CHAR_LIMIT=24]">
+-        Update Chrome
++        Update Bromite
++      </message>
++      <message name="IDS_MENU_UPDATE_SUMMARY_VULNERABLE" desc="Content description for the menu button when it is covered by the update icon that is displayed when the current version of Bromite is vulnerable.">
++        Update not available. Read more
+       </message>
+       <message name="IDS_MENU_UPDATE_SUMMARY_DEFAULT" desc="Summary string for update menu item explaining that a newer version of Chrome is available. [CHAR_LIMIT=30]">
+         Newer version is available
+@@ -3446,6 +3455,18 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+       <message name="IDS_MENU_UPDATE_UNSUPPORTED_SUMMARY_DEFAULT" desc="Summary string for update menu item explaining that the Android version on the device is unsupported. [CHAR_LIMIT=30]">
+         Android version is unsupported
+       </message>
++      <message name="IDS_MENU_INLINE_UPDATE_DOWNLOADING" desc="Menu item for when Chrome is in the process of updating. [CHAR_LIMIT=24]">
++        Downloading…
++      </message>
++      <message name="IDS_MENU_INLINE_UPDATE_FAILED" desc="Menu item for when Chrome failed to download an update. [CHAR_LIMIT=24]">
++        Couldn’t download
++      </message>
++      <message name="IDS_MENU_INLINE_UPDATE_READY" desc="Menu item text that is shown when Chrome has downloaded an update for itself and is ready to be restarted, which will apply the update. [CHAR_LIMIT=24]">
++        Update ready
++      </message>
++      <message name="IDS_MENU_INLINE_UPDATE_READY_SUMMARY" desc="Summary text that is shown when Chrome has downloaded an update for itself and is ready to be restarted, which will apply the update.  This lets the user know the update will restart. [CHAR_LIMIT=24]">
++        Restart Bromite
++      </message>
+       <message name="IDS_MENU_NEW_WINDOW" desc="Menu item for opening a new window. [CHAR_LIMIT=27]">
+         New window
+       </message>
+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
+@@ -15,6 +15,11 @@
+ #include "services/network/public/cpp/shared_url_loader_factory.h"
+ #include "services/network/public/cpp/simple_url_loader.h"
+ 
++// used for the Bromite customization
 +#include "net/base/load_flags.h"
 +#include "net/base/load_flags.h"
 +#include "net/http/http_status_code.h"
 +#include "net/http/http_status_code.h"
 +#include "services/network/public/cpp/resource_request.h"
 +#include "services/network/public/cpp/resource_request.h"
@@ -1104,7 +1352,7 @@ diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc b/chrome/browse
  namespace {
  namespace {
  const char kContentTypeKey[] = "Content-Type";
  const char kContentTypeKey[] = "Content-Type";
  const char kDeveloperKey[] = "X-Developer-Key";
  const char kDeveloperKey[] = "X-Developer-Key";
-@@ -73,6 +78,7 @@ EndpointFetcher::EndpointFetcher(
+@@ -59,6 +64,7 @@ EndpointFetcher::EndpointFetcher(
        http_method_(http_method),
        http_method_(http_method),
        content_type_(content_type),
        content_type_(content_type),
        timeout_ms_(timeout_ms),
        timeout_ms_(timeout_ms),
@@ -1112,15 +1360,15 @@ diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc b/chrome/browse
        post_data_(post_data),
        post_data_(post_data),
        headers_(headers),
        headers_(headers),
        annotation_tag_(annotation_tag),
        annotation_tag_(annotation_tag),
-@@ -90,6 +96,7 @@ EndpointFetcher::EndpointFetcher(
+@@ -76,6 +82,7 @@ EndpointFetcher::EndpointFetcher(
        http_method_("GET"),
        http_method_("GET"),
        content_type_(std::string()),
        content_type_(std::string()),
        timeout_ms_(0),
        timeout_ms_(0),
 +      intercept_redirect_(false),
 +      intercept_redirect_(false),
        post_data_(std::string()),
        post_data_(std::string()),
        annotation_tag_(annotation_tag),
        annotation_tag_(annotation_tag),
-       url_loader_factory_(profile->GetDefaultStoragePartition()
-@@ -114,6 +121,7 @@ EndpointFetcher::EndpointFetcher(
+       url_loader_factory_(url_loader_factory),
+@@ -99,6 +106,7 @@ EndpointFetcher::EndpointFetcher(
        http_method_(http_method),
        http_method_(http_method),
        content_type_(content_type),
        content_type_(content_type),
        timeout_ms_(timeout_ms),
        timeout_ms_(timeout_ms),
@@ -1128,7 +1376,7 @@ diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc b/chrome/browse
        post_data_(post_data),
        post_data_(post_data),
        annotation_tag_(annotation_tag),
        annotation_tag_(annotation_tag),
        url_loader_factory_(url_loader_factory),
        url_loader_factory_(url_loader_factory),
-@@ -140,6 +148,7 @@ EndpointFetcher::EndpointFetcher(
+@@ -125,6 +133,7 @@ EndpointFetcher::EndpointFetcher(
        http_method_(http_method),
        http_method_(http_method),
        content_type_(content_type),
        content_type_(content_type),
        timeout_ms_(timeout_ms),
        timeout_ms_(timeout_ms),
@@ -1136,7 +1384,7 @@ diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc b/chrome/browse
        post_data_(post_data),
        post_data_(post_data),
        headers_(headers),
        headers_(headers),
        cors_exempt_headers_(cors_exempt_headers),
        cors_exempt_headers_(cors_exempt_headers),
-@@ -151,10 +160,29 @@ EndpointFetcher::EndpointFetcher(
+@@ -136,10 +145,28 @@ EndpointFetcher::EndpointFetcher(
  EndpointFetcher::EndpointFetcher(
  EndpointFetcher::EndpointFetcher(
      const net::NetworkTrafficAnnotationTag& annotation_tag)
      const net::NetworkTrafficAnnotationTag& annotation_tag)
      : timeout_ms_(kDefaultTimeOutMs),
      : timeout_ms_(kDefaultTimeOutMs),
@@ -1147,7 +1395,7 @@ diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc b/chrome/browse
  
  
 +// constructor used by Bromite
 +// constructor used by Bromite
 +EndpointFetcher::EndpointFetcher(
 +EndpointFetcher::EndpointFetcher(
-+    Profile* const profile,
++    const scoped_refptr<network::SharedURLLoaderFactory>& url_loader_factory,
 +    const GURL& url,
 +    const GURL& url,
 +    const std::string& http_method,
 +    const std::string& http_method,
 +    int64_t timeout_ms,
 +    int64_t timeout_ms,
@@ -1158,15 +1406,14 @@ diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc b/chrome/browse
 +      timeout_ms_(timeout_ms),
 +      timeout_ms_(timeout_ms),
 +      intercept_redirect_(intercept_redirect),
 +      intercept_redirect_(intercept_redirect),
 +      annotation_tag_(annotation_tag),
 +      annotation_tag_(annotation_tag),
-+      url_loader_factory_(profile->GetDefaultStoragePartition()
-+                              ->GetURLLoaderFactoryForBrowserProcess()),
++      url_loader_factory_(url_loader_factory),
 +      identity_manager_(nullptr),
 +      identity_manager_(nullptr),
 +      sanitize_response_(false) {}
 +      sanitize_response_(false) {}
 +
 +
  EndpointFetcher::~EndpointFetcher() = default;
  EndpointFetcher::~EndpointFetcher() = default;
  
  
  void EndpointFetcher::Fetch(EndpointFetcherCallback endpoint_fetcher_callback) {
  void EndpointFetcher::Fetch(EndpointFetcherCallback endpoint_fetcher_callback) {
-@@ -207,6 +235,8 @@ void EndpointFetcher::PerformRequest(
+@@ -192,6 +219,8 @@ void EndpointFetcher::PerformRequest(
    resource_request->method = http_method_;
    resource_request->method = http_method_;
    resource_request->url = url_;
    resource_request->url = url_;
    resource_request->credentials_mode = network::mojom::CredentialsMode::kOmit;
    resource_request->credentials_mode = network::mojom::CredentialsMode::kOmit;
@@ -1175,7 +1422,7 @@ diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc b/chrome/browse
    if (base::EqualsCaseInsensitiveASCII(http_method_, "POST")) {
    if (base::EqualsCaseInsensitiveASCII(http_method_, "POST")) {
      resource_request->headers.SetHeader(kContentTypeKey, content_type_);
      resource_request->headers.SetHeader(kContentTypeKey, content_type_);
    }
    }
-@@ -239,31 +269,59 @@ void EndpointFetcher::PerformRequest(
+@@ -222,31 +251,59 @@ void EndpointFetcher::PerformRequest(
      default:
      default:
        break;
        break;
    }
    }
@@ -1242,7 +1489,7 @@ diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc b/chrome/browse
      if (sanitize_response_) {
      if (sanitize_response_) {
        data_decoder::JsonSanitizer::Sanitize(
        data_decoder::JsonSanitizer::Sanitize(
            std::move(*response_body),
            std::move(*response_body),
-@@ -281,9 +339,9 @@ void EndpointFetcher::OnResponseFetched(
+@@ -264,9 +321,9 @@ void EndpointFetcher::OnResponseFetched(
      std::string net_error = net::ErrorToString(simple_url_loader_->NetError());
      std::string net_error = net::ErrorToString(simple_url_loader_->NetError());
      VLOG(1) << __func__ << " with response error: " << net_error;
      VLOG(1) << __func__ << " with response error: " << net_error;
      response->response = "There was a response error";
      response->response = "There was a response error";
@@ -1253,10 +1500,11 @@ diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc b/chrome/browse
  }
  }
  
  
  void EndpointFetcher::OnSanitizationResult(
  void EndpointFetcher::OnSanitizationResult(
-@@ -304,6 +362,40 @@ std::string EndpointFetcher::GetUrlForTesting() {
+@@ -286,3 +343,37 @@ void EndpointFetcher::OnSanitizationResult(
+ std::string EndpointFetcher::GetUrlForTesting() {
    return url_.spec();
    return url_.spec();
  }
  }
- 
++
 +void EndpointFetcher::OnSimpleLoaderRedirect(
 +void EndpointFetcher::OnSimpleLoaderRedirect(
 +    const net::RedirectInfo& redirect_info,
 +    const net::RedirectInfo& redirect_info,
 +    const network::mojom::URLResponseHead& response_head,
 +    const network::mojom::URLResponseHead& response_head,
@@ -1287,89 +1535,12 @@ diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc b/chrome/browse
 +  }
 +  }
 +
 +
 +  std::string net_error = net::ErrorToString(simple_url_loader_->NetError());
 +  std::string net_error = net::ErrorToString(simple_url_loader_->NetError());
-+  response_->response = net_error;
++ response_->response = net_error;
 +  std::move(endpoint_fetcher_callback_).Run(std::move(response_));
 +  std::move(endpoint_fetcher_callback_).Run(std::move(response_));
 +}
 +}
-+
- #if BUILDFLAG(IS_ANDROID)
- namespace {
- static void OnEndpointFetcherComplete(
-@@ -320,6 +412,25 @@ static void OnEndpointFetcherComplete(
-                        base::android::AttachCurrentThread(),
-                        std::move(endpoint_response->response))));
- }
-+
-+static void OnEndpointFetcherHeadComplete(
-+    const base::android::JavaRef<jobject>& jcaller,
-+    // Passing the endpoint_fetcher ensures the endpoint_fetcher's
-+    // lifetime extends to the callback and is not destroyed
-+    // prematurely (which would result in cancellation of the request).
-+    std::unique_ptr<EndpointFetcher> endpoint_fetcher,
-+    std::unique_ptr<EndpointResponse> endpoint_response) {
-+  base::android::RunObjectCallbackAndroid(
-+      jcaller, Java_EndpointHeaderResponse_createEndpointResponse(
-+                   base::android::AttachCurrentThread(),
-+                   base::android::ConvertUTF8ToJavaString(
-+                       base::android::AttachCurrentThread(),
-+                       std::move(endpoint_response->response)),
-+                   base::android::ConvertUTF8ToJavaString(
-+                       base::android::AttachCurrentThread(),
-+                       std::move(endpoint_response->redirect_url))));
-+}
-+
- }  // namespace
- 
- // TODO(crbug.com/1077537) Create a KeyProvider so
-@@ -392,13 +503,15 @@ static void JNI_EndpointFetcher_NativeFetchWithNoAuth(
-     JNIEnv* env,
-     const base::android::JavaParamRef<jobject>& jprofile,
-     const base::android::JavaParamRef<jstring>& jurl,
--    jint jannotation_hash_code,
-+    jlong jtimeout, jboolean intercept_redirect,
-     const base::android::JavaParamRef<jobject>& jcallback) {
-   auto endpoint_fetcher = std::make_unique<EndpointFetcher>(
-       ProfileAndroid::FromProfileAndroid(jprofile),
-       GURL(base::android::ConvertJavaStringToUTF8(env, jurl)),
--      net::NetworkTrafficAnnotationTag::FromJavaAnnotation(
--          jannotation_hash_code));
-+      "GET",
-+      jtimeout,
-+      intercept_redirect,
-+      NO_TRAFFIC_ANNOTATION_YET);
-   auto* const endpoint_fetcher_ptr = endpoint_fetcher.get();
-   endpoint_fetcher_ptr->PerformRequest(
-       base::BindOnce(&OnEndpointFetcherComplete,
-@@ -409,4 +522,27 @@ static void JNI_EndpointFetcher_NativeFetchWithNoAuth(
-       nullptr);
- }
- 
-+static void JNI_EndpointFetcher_NativeHeadWithNoAuth(
-+    JNIEnv* env,
-+    const base::android::JavaParamRef<jobject>& jprofile,
-+    const base::android::JavaParamRef<jstring>& jurl,
-+    jlong jtimeout, jboolean intercept_redirect,
-+    const base::android::JavaParamRef<jobject>& jcallback) {
-+  auto endpoint_fetcher = std::make_unique<EndpointFetcher>(
-+      ProfileAndroid::FromProfileAndroid(jprofile),
-+      GURL(base::android::ConvertJavaStringToUTF8(env, jurl)),
-+      "HEAD",
-+      jtimeout,
-+      intercept_redirect,
-+      NO_TRAFFIC_ANNOTATION_YET);
-+  auto* const endpoint_fetcher_ptr = endpoint_fetcher.get();
-+  endpoint_fetcher_ptr->PerformRequest(
-+      base::BindOnce(&OnEndpointFetcherHeadComplete,
-+                     base::android::ScopedJavaGlobalRef<jobject>(jcallback),
-+                     // unique_ptr endpoint_fetcher is passed until the callback
-+                     // to ensure its lifetime across the request.
-+                     std::move(endpoint_fetcher)),
-+      nullptr);
-+}
-+
- #endif  // BUILDFLAG(IS_ANDROID)
-diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher.h b/chrome/browser/endpoint_fetcher/endpoint_fetcher.h
---- a/chrome/browser/endpoint_fetcher/endpoint_fetcher.h
-+++ b/chrome/browser/endpoint_fetcher/endpoint_fetcher.h
+diff --git a/components/endpoint_fetcher/endpoint_fetcher.h b/components/endpoint_fetcher/endpoint_fetcher.h
+--- a/components/endpoint_fetcher/endpoint_fetcher.h
++++ b/components/endpoint_fetcher/endpoint_fetcher.h
 @@ -15,6 +15,8 @@
 @@ -15,6 +15,8 @@
  #include "components/signin/public/identity_manager/scope_set.h"
  #include "components/signin/public/identity_manager/scope_set.h"
  #include "net/traffic_annotation/network_traffic_annotation.h"
  #include "net/traffic_annotation/network_traffic_annotation.h"
@@ -1379,7 +1550,7 @@ diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher.h b/chrome/browser
  
  
  namespace network {
  namespace network {
  struct ResourceRequest;
  struct ResourceRequest;
-@@ -32,6 +34,8 @@ class Profile;
+@@ -31,6 +33,8 @@ class GURL;
  
  
  struct EndpointResponse {
  struct EndpointResponse {
    std::string response;
    std::string response;
@@ -1388,12 +1559,12 @@ diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher.h b/chrome/browser
    // TODO(crbug.com/993393) Add more detailed error messaging
    // TODO(crbug.com/993393) Add more detailed error messaging
  };
  };
  
  
-@@ -78,6 +82,14 @@ class EndpointFetcher {
-                   const GURL& url,
-                   const net::NetworkTrafficAnnotationTag& annotation_tag);
+@@ -82,6 +86,14 @@ class EndpointFetcher {
+       const GURL& url,
+       const net::NetworkTrafficAnnotationTag& annotation_tag);
  
  
 +  // Constructor if no authentication is needed, with timeout
 +  // Constructor if no authentication is needed, with timeout
-+  EndpointFetcher(Profile* const profile,
++  EndpointFetcher(const scoped_refptr<network::SharedURLLoaderFactory>& url_loader_factory,
 +                  const GURL& url,
 +                  const GURL& url,
 +                  const std::string& http_method,
 +                  const std::string& http_method,
 +                  int64_t timeout_ms,
 +                  int64_t timeout_ms,
@@ -1403,7 +1574,7 @@ diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher.h b/chrome/browser
    // Used for tests. Can be used if caller constructs their own
    // Used for tests. Can be used if caller constructs their own
    // url_loader_factory and identity_manager.
    // url_loader_factory and identity_manager.
    EndpointFetcher(
    EndpointFetcher(
-@@ -131,6 +143,10 @@ class EndpointFetcher {
+@@ -135,6 +147,10 @@ class EndpointFetcher {
                           std::unique_ptr<std::string> response_body);
                           std::unique_ptr<std::string> response_body);
    void OnSanitizationResult(EndpointFetcherCallback endpoint_fetcher_callback,
    void OnSanitizationResult(EndpointFetcherCallback endpoint_fetcher_callback,
                              data_decoder::JsonSanitizer::Result result);
                              data_decoder::JsonSanitizer::Result result);
@@ -1414,7 +1585,7 @@ diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher.h b/chrome/browser
  
  
    enum AuthType { CHROME_API_KEY, OAUTH, NO_AUTH };
    enum AuthType { CHROME_API_KEY, OAUTH, NO_AUTH };
    AuthType auth_type_;
    AuthType auth_type_;
-@@ -138,10 +154,11 @@ class EndpointFetcher {
+@@ -142,10 +158,11 @@ class EndpointFetcher {
    // Members set in constructor to be passed to network::ResourceRequest or
    // Members set in constructor to be passed to network::ResourceRequest or
    // network::SimpleURLLoader.
    // network::SimpleURLLoader.
    const std::string oauth_consumer_name_;
    const std::string oauth_consumer_name_;
@@ -1427,7 +1598,7 @@ diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher.h b/chrome/browser
    const std::string post_data_;
    const std::string post_data_;
    const std::vector<std::string> headers_;
    const std::vector<std::string> headers_;
    const std::vector<std::string> cors_exempt_headers_;
    const std::vector<std::string> cors_exempt_headers_;
-@@ -158,6 +175,9 @@ class EndpointFetcher {
+@@ -163,6 +180,9 @@ class EndpointFetcher {
        access_token_fetcher_;
        access_token_fetcher_;
    std::unique_ptr<network::SimpleURLLoader> simple_url_loader_;
    std::unique_ptr<network::SimpleURLLoader> simple_url_loader_;
  
  
@@ -1437,170 +1608,5 @@ diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher.h b/chrome/browser
    base::WeakPtrFactory<EndpointFetcher> weak_ptr_factory_{this};
    base::WeakPtrFactory<EndpointFetcher> weak_ptr_factory_{this};
  };
  };
  
  
-diff --git a/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointFetcher.java b/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointFetcher.java
---- a/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointFetcher.java
-+++ b/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointFetcher.java
-@@ -70,6 +70,22 @@ public final class EndpointFetcher {
-                 postData, timeout, headers, annotation.getHashCode(), callback);
-     }
- 
-+    @MainThread
-+    public static void nativeHeadWithNoAuth(
-+            Callback<EndpointHeaderResponse> callback, Profile profile,
-+            String url, long timeout, boolean allow_redirect) {
-+        EndpointFetcherJni.get().nativeHeadWithNoAuth(
-+                profile, url, timeout, allow_redirect, callback);
-+    }
-+
-+    @MainThread
-+    public static void nativeFetchWithNoAuth(
-+            Callback<EndpointResponse> callback, Profile profile,
-+            String url, long timeout, boolean allow_redirect) {
-+        EndpointFetcherJni.get().nativeFetchWithNoAuth(
-+                profile, url, timeout, allow_redirect, callback);
-+    }
-+
-     @NativeMethods
-     public interface Natives {
-         void nativeFetchOAuth(Profile profile, String oathConsumerName, String url,
-@@ -78,7 +94,11 @@ public final class EndpointFetcher {
-         void nativeFetchChromeAPIKey(Profile profile, String url, String httpsMethod,
-                 String contentType, String postData, long timeout, String[] headers,
-                 int annotationHashCode, Callback<EndpointResponse> callback);
--        void nativeFetchWithNoAuth(Profile profile, String url, int annotationHashCode,
-+        void nativeFetchWithNoAuth(
-+                Profile profile, String url, long timeout, boolean allow_redirect,
-                 Callback<EndpointResponse> callback);
-+        void nativeHeadWithNoAuth(
-+                Profile profile, String url, long timeout, boolean allow_redirect,
-+                Callback<EndpointHeaderResponse> callback);
-     }
- }
-diff --git a/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointHeaderResponse.java b/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointHeaderResponse.java
-new file mode 100644
---- /dev/null
-+++ b/chrome/browser/endpoint_fetcher/java/src/org/chromium/chrome/browser/endpoint_fetcher/EndpointHeaderResponse.java
-@@ -0,0 +1,31 @@
-+// 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.
-+
-+package org.chromium.chrome.browser.endpoint_fetcher;
-+
-+import org.chromium.base.annotations.CalledByNative;
-+
-+public class EndpointHeaderResponse {
-+    private final String mResponseString;
-+    private final String mRedirectUrl;
-+
-+    public EndpointHeaderResponse(String responseString, String redirectUrl) {
-+        mResponseString = responseString;
-+        mRedirectUrl = redirectUrl;
-+    }
-+
-+    public String getResponseString() {
-+        return mResponseString;
-+    }
-+
-+    public String getRedirectUrl() {
-+        return mRedirectUrl;
-+    }
-+
-+    @CalledByNative
-+    private static EndpointHeaderResponse createEndpointResponse(
-+            String response, String redirectUrl) {
-+        return new EndpointHeaderResponse(response, redirectUrl);
-+    }
-+}
-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
-@@ -251,6 +251,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
-     &kNewWindowAppMenu,
-     &kNotificationPermissionVariant,
-     &kPageAnnotationsService,
-+    &kInlineUpdateFlow,
-     &kBookmarksImprovedSaveFlow,
-     &kBookmarksRefresh,
-     &kBackGestureRefactorAndroid,
-@@ -666,6 +667,9 @@ const base::Feature kIncognitoReauthenticationForAndroid{
- const base::Feature kIncognitoScreenshot{"IncognitoScreenshot",
-                                          base::FEATURE_DISABLED_BY_DEFAULT};
- 
-+const base::Feature kInlineUpdateFlow{"InlineUpdateFlow",
-+                                      base::FEATURE_ENABLED_BY_DEFAULT};
-+
- const base::Feature kInstantStart{"InstantStart",
-                                   base::FEATURE_DISABLED_BY_DEFAULT};
- 
-diff --git a/chrome/browser/flags/android/chrome_feature_list.h b/chrome/browser/flags/android/chrome_feature_list.h
---- a/chrome/browser/flags/android/chrome_feature_list.h
-+++ b/chrome/browser/flags/android/chrome_feature_list.h
-@@ -100,6 +100,7 @@ extern const base::Feature kImmersiveUiMode;
- extern const base::Feature kIncognitoReauthenticationForAndroid;
- extern const base::Feature kIncognitoScreenshot;
- extern const base::Feature kImprovedA2HS;
-+extern const base::Feature kInlineUpdateFlow;
- extern const base::Feature kImproveReaderModePrompt;
- extern const base::Feature kInstanceSwitcher;
- extern const base::Feature kInstantStart;
-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
-@@ -368,6 +368,7 @@ public abstract class ChromeFeatureList {
-     public static final String INCOGNITO_REAUTHENTICATION_FOR_ANDROID =
-             "IncognitoReauthenticationForAndroid";
-     public static final String INCOGNITO_SCREENSHOT = "IncognitoScreenshot";
-+    public static final String INLINE_UPDATE_FLOW = "InlineUpdateFlow";
-     public static final String INSTALLABLE_AMBIENT_BADGE_INFOBAR = "InstallableAmbientBadgeInfoBar";
-     public static final String INSTALLABLE_AMBIENT_BADGE_MESSAGE = "InstallableAmbientBadgeMessage";
-     public static final String INSTANCE_SWITCHER = "InstanceSwitcher";
-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
-@@ -1870,6 +1870,12 @@ Your Google account may have other forms of browsing history like searches and a
-       <message name="IDS_DEPRECATION_WARNING" desc="Warning about Chrome updates no longer being supported">
-         Chrome updates are no longer supported for this version of Android
-       </message>
-+      <message name="IDS_ALLOW_INLINE_UPDATE_TITLE" desc="Title for allow inline update preference">
-+        Allow checking for updates
-+      </message>
-+      <message name="IDS_ALLOW_INLINE_UPDATE_SUMMARY" desc="Summary for allow inline update preference">
-+        Notify about new releases by periodically checking for their availability
-+      </message>
- 
-       <!-- Account management UI strings. -->
-       <message name="IDS_ACCOUNT_MANAGEMENT_TITLE" desc="Header title for the account management screen. [CHAR_LIMIT=32]">
-@@ -3399,7 +3405,10 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
- 
-       <!-- Main menu items -->
-       <message name="IDS_MENU_UPDATE" desc="Menu item for updating chrome. [CHAR_LIMIT=24]">
--        Update Chrome
-+        Update Bromite
-+      </message>
-+      <message name="IDS_MENU_UPDATE_SUMMARY_VULNERABLE" desc="Content description for the menu button when it is covered by the update icon that is displayed when the current version of Bromite is vulnerable.">
-+        Update not available. Read more
-       </message>
-       <message name="IDS_MENU_UPDATE_SUMMARY_DEFAULT" desc="Summary string for update menu item explaining that a newer version of Chrome is available. [CHAR_LIMIT=30]">
-         Newer version is available
-@@ -3410,6 +3419,18 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
-       <message name="IDS_MENU_UPDATE_UNSUPPORTED_SUMMARY_DEFAULT" desc="Summary string for update menu item explaining that the Android version on the device is unsupported. [CHAR_LIMIT=30]">
-         Android version is unsupported
-       </message>
-+      <message name="IDS_MENU_INLINE_UPDATE_DOWNLOADING" desc="Menu item for when Chrome is in the process of updating. [CHAR_LIMIT=24]">
-+        Downloading…
-+      </message>
-+      <message name="IDS_MENU_INLINE_UPDATE_FAILED" desc="Menu item for when Chrome failed to download an update. [CHAR_LIMIT=24]">
-+        Couldn’t download
-+      </message>
-+      <message name="IDS_MENU_INLINE_UPDATE_READY" desc="Menu item text that is shown when Chrome has downloaded an update for itself and is ready to be restarted, which will apply the update. [CHAR_LIMIT=24]">
-+        Update ready
-+      </message>
-+      <message name="IDS_MENU_INLINE_UPDATE_READY_SUMMARY" desc="Summary text that is shown when Chrome has downloaded an update for itself and is ready to be restarted, which will apply the update.  This lets the user know the update will restart. [CHAR_LIMIT=24]">
-+        Restart Bromite
-+      </message>
-       <message name="IDS_MENU_NEW_WINDOW" desc="Menu item for opening a new window. [CHAR_LIMIT=27]">
-         New window
-       </message>
 --
 --
 2.25.1
 2.25.1

+ 1 - 1
build/patches/Bromite-package-name.patch

@@ -10,7 +10,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
 diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
 --- a/chrome/android/BUILD.gn
 --- a/chrome/android/BUILD.gn
 +++ b/chrome/android/BUILD.gn
 +++ b/chrome/android/BUILD.gn
-@@ -45,7 +45,7 @@ if (android_64bit_target_cpu && skip_secondary_abi_for_cq) {
+@@ -46,7 +46,7 @@ if (android_64bit_target_cpu && skip_secondary_abi_for_cq) {
    assert(current_toolchain != android_secondary_abi_toolchain)
    assert(current_toolchain != android_secondary_abi_toolchain)
  }
  }
  
  

+ 1 - 1
build/patches/Chromium-package-name.patch

@@ -10,7 +10,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
 diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
 --- a/chrome/android/BUILD.gn
 --- a/chrome/android/BUILD.gn
 +++ b/chrome/android/BUILD.gn
 +++ b/chrome/android/BUILD.gn
-@@ -45,7 +45,7 @@ if (android_64bit_target_cpu && skip_secondary_abi_for_cq) {
+@@ -46,7 +46,7 @@ if (android_64bit_target_cpu && skip_secondary_abi_for_cq) {
    assert(current_toolchain != android_secondary_abi_toolchain)
    assert(current_toolchain != android_secondary_abi_toolchain)
  }
  }
  
  

+ 14 - 14
build/patches/Client-hints-overrides.patch

@@ -24,7 +24,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
 diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
 --- a/chrome/browser/prefs/browser_prefs.cc
 --- a/chrome/browser/prefs/browser_prefs.cc
 +++ b/chrome/browser/prefs/browser_prefs.cc
 +++ b/chrome/browser/prefs/browser_prefs.cc
-@@ -754,7 +754,7 @@ void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
+@@ -779,7 +779,7 @@ void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
    registry->RegisterListPref(prefs::kUsedPolicyCertificates);
    registry->RegisterListPref(prefs::kUsedPolicyCertificates);
  #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
  #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
  
  
@@ -63,7 +63,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
 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
 --- a/content/browser/loader/navigation_url_loader_impl.cc
 +++ b/content/browser/loader/navigation_url_loader_impl.cc
 +++ b/content/browser/loader/navigation_url_loader_impl.cc
-@@ -1003,6 +1003,11 @@ void NavigationURLLoaderImpl::OnAcceptCHFrameReceived(
+@@ -1007,6 +1007,11 @@ void NavigationURLLoaderImpl::OnAcceptCHFrameReceived(
      return;
      return;
    }
    }
  
  
@@ -97,7 +97,7 @@ diff --git a/content/common/user_agent.cc b/content/common/user_agent.cc
 diff --git a/content/public/common/content_features.cc b/content/public/common/content_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
 --- a/content/public/common/content_features.cc
 +++ b/content/public/common/content_features.cc
 +++ b/content/public/common/content_features.cc
-@@ -233,7 +233,7 @@ const base::Feature kCrashReporting{"CrashReporting",
+@@ -239,7 +239,7 @@ const base::Feature kCrashReporting{"CrashReporting",
  // Enables support for the `Critical-CH` response header.
  // Enables support for the `Critical-CH` response header.
  // https://github.com/WICG/client-hints-infrastructure/blob/master/reliability.md#critical-ch
  // https://github.com/WICG/client-hints-infrastructure/blob/master/reliability.md#critical-ch
  const base::Feature kCriticalClientHint{"CriticalClientHint",
  const base::Feature kCriticalClientHint{"CriticalClientHint",
@@ -120,7 +120,7 @@ diff --git a/services/network/public/cpp/client_hints.cc b/services/network/publ
 diff --git a/services/network/public/cpp/features.cc b/services/network/public/cpp/features.cc
 diff --git a/services/network/public/cpp/features.cc b/services/network/public/cpp/features.cc
 --- a/services/network/public/cpp/features.cc
 --- a/services/network/public/cpp/features.cc
 +++ b/services/network/public/cpp/features.cc
 +++ b/services/network/public/cpp/features.cc
-@@ -178,8 +178,8 @@ const base::Feature kWebSocketReassembleShortMessages{
+@@ -179,8 +179,8 @@ const base::Feature kWebSocketReassembleShortMessages{
  // Enable support for ACCEPT_CH H2/3 frame as part of Client Hint Reliability.
  // Enable support for ACCEPT_CH H2/3 frame as part of Client Hint Reliability.
  // See:
  // See:
  // https://tools.ietf.org/html/draft-davidben-http-client-hint-reliability-02#section-4.3
  // https://tools.ietf.org/html/draft-davidben-http-client-hint-reliability-02#section-4.3
@@ -153,7 +153,7 @@ diff --git a/third_party/blink/common/client_hints/enabled_client_hints.cc b/thi
    switch (type) {
    switch (type) {
      case WebClientHintsType::kUA:
      case WebClientHintsType::kUA:
      case WebClientHintsType::kUAArch:
      case WebClientHintsType::kUAArch:
-@@ -131,7 +132,7 @@ bool IsOriginTrialEnabled(const GURL& url,
+@@ -127,7 +128,7 @@ bool IsOriginTrialEnabled(const GURL& url,
  }  // namespace
  }  // namespace
  
  
  bool EnabledClientHints::IsEnabled(const WebClientHintsType type) const {
  bool EnabledClientHints::IsEnabled(const WebClientHintsType type) const {
@@ -162,7 +162,7 @@ diff --git a/third_party/blink/common/client_hints/enabled_client_hints.cc b/thi
  }
  }
  
  
  void EnabledClientHints::SetIsEnabled(const WebClientHintsType type,
  void EnabledClientHints::SetIsEnabled(const WebClientHintsType type,
-@@ -160,6 +161,7 @@ void EnabledClientHints::SetIsEnabled(
+@@ -156,6 +157,7 @@ void EnabledClientHints::SetIsEnabled(
  
  
  std::vector<WebClientHintsType> EnabledClientHints::GetEnabledHints() const {
  std::vector<WebClientHintsType> EnabledClientHints::GetEnabledHints() const {
    std::vector<WebClientHintsType> hints;
    std::vector<WebClientHintsType> hints;
@@ -173,18 +173,18 @@ diff --git a/third_party/blink/common/client_hints/enabled_client_hints.cc b/thi
 diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
 diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
 --- a/third_party/blink/common/features.cc
 --- a/third_party/blink/common/features.cc
 +++ b/third_party/blink/common/features.cc
 +++ b/third_party/blink/common/features.cc
-@@ -156,7 +156,7 @@ const base::Feature kMixedContentAutoupgrade{"AutoupgradeMixedContent",
- // An experimental replacement for the `User-Agent` header, defined in
- // https://tools.ietf.org/html/draft-west-ua-client-hints.
+@@ -160,7 +160,7 @@ const base::Feature kMixedContentAutoupgrade{"AutoupgradeMixedContent",
+ 
+ // Enables User-Agent Client Hints
  const base::Feature kUserAgentClientHint{"UserAgentClientHint",
  const base::Feature kUserAgentClientHint{"UserAgentClientHint",
 -                                         base::FEATURE_ENABLED_BY_DEFAULT};
 -                                         base::FEATURE_ENABLED_BY_DEFAULT};
 +                                         base::FEATURE_DISABLED_BY_DEFAULT};
 +                                         base::FEATURE_DISABLED_BY_DEFAULT};
  
  
- // Enable `sec-ch-ua-full-version-list` client hint.
- const base::Feature kUserAgentClientHintFullVersionList{
-@@ -776,7 +776,7 @@ const base::Feature kResamplingScrollEvents{"ResamplingScrollEvents",
- const base::Feature kAllowClientHintsToThirdParty {
-   "AllowClientHintsToThirdParty",
+ // Handle prefers-color-scheme user preference media feature via client hints.
+ const base::Feature kPrefersColorSchemeClientHintHeader{
+@@ -531,7 +531,7 @@ const base::Feature kAudioWorkletThreadRealtimePriority{
+ const base::Feature kLightweightNoStatePrefetch {
+   "LightweightNoStatePrefetch",
  #if BUILDFLAG(IS_ANDROID)
  #if BUILDFLAG(IS_ANDROID)
 -      base::FEATURE_ENABLED_BY_DEFAULT
 -      base::FEATURE_ENABLED_BY_DEFAULT
 +      base::FEATURE_DISABLED_BY_DEFAULT
 +      base::FEATURE_DISABLED_BY_DEFAULT

+ 3 - 3
build/patches/Content-settings-infrastructure.patch

@@ -1178,7 +1178,7 @@ diff --git a/components/page_info/page_info.cc b/components/page_info/page_info.
  #include "components/content_settings/core/browser/content_settings_registry.h"
  #include "components/content_settings/core/browser/content_settings_registry.h"
  #include "components/content_settings/core/browser/content_settings_utils.h"
  #include "components/content_settings/core/browser/content_settings_utils.h"
  #include "components/content_settings/core/browser/host_content_settings_map.h"
  #include "components/content_settings/core/browser/host_content_settings_map.h"
-@@ -164,6 +165,15 @@ bool ShouldShowPermission(const PageInfo::PermissionInfo& info,
+@@ -162,6 +163,15 @@ bool ShouldShowPermission(const PageInfo::PermissionInfo& info,
      return true;
      return true;
    }
    }
  
  
@@ -1194,7 +1194,7 @@ diff --git a/components/page_info/page_info.cc b/components/page_info/page_info.
    const bool is_incognito = web_contents->GetBrowserContext()->IsOffTheRecord();
    const bool is_incognito = web_contents->GetBrowserContext()->IsOffTheRecord();
  #if BUILDFLAG(IS_ANDROID)
  #if BUILDFLAG(IS_ANDROID)
    // Special geolocation DSE settings apply only on Android, so make sure it
    // Special geolocation DSE settings apply only on Android, so make sure it
-@@ -1039,7 +1049,18 @@ void PageInfo::PresentSitePermissions() {
+@@ -1037,7 +1047,18 @@ void PageInfo::PresentSitePermissions() {
    PermissionInfo permission_info;
    PermissionInfo permission_info;
    HostContentSettingsMap* content_settings = GetContentSettings();
    HostContentSettingsMap* content_settings = GetContentSettings();
    DCHECK(web_contents_);
    DCHECK(web_contents_);
@@ -1251,7 +1251,7 @@ diff --git a/components/page_info/page_info_ui.cc b/components/page_info/page_in
    NOTREACHED();
    NOTREACHED();
    return std::u16string();
    return std::u16string();
  }
  }
-@@ -955,6 +968,11 @@ bool PageInfoUI::ContentSettingsTypeInPageInfo(ContentSettingsType type) {
+@@ -958,6 +971,11 @@ bool PageInfoUI::ContentSettingsTypeInPageInfo(ContentSettingsType type) {
      if (info.type == type)
      if (info.type == type)
        return true;
        return true;
    }
    }

+ 17 - 25
build/patches/Disable-AGSA-by-default.patch

@@ -4,25 +4,25 @@ Subject: Disable AGSA by default
 
 
 License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 ---
 ---
- chrome/android/BUILD.gn                       |  3 --
+ chrome/android/BUILD.gn                       |  3 ---
  .../org/chromium/chrome/browser/AppHooks.java |  1 -
  .../org/chromium/chrome/browser/AppHooks.java |  1 -
  .../chrome/browser/IntentHandler.java         |  5 ----
  .../chrome/browser/IntentHandler.java         |  5 ----
- .../chrome/browser/app/ChromeActivity.java    | 28 -------------------
+ .../chrome/browser/app/ChromeActivity.java    | 27 -------------------
  .../ChromeContextMenuPopulator.java           |  7 -----
  .../ChromeContextMenuPopulator.java           |  7 -----
- ...stomTabActivityClientConnectionKeeper.java |  9 ------
+ ...stomTabActivityClientConnectionKeeper.java |  9 -------
  .../init/ProcessInitializationHandler.java    |  8 ------
  .../init/ProcessInitializationHandler.java    |  8 ------
  .../browser/ntp/search/SearchBoxMediator.java |  1 -
  .../browser/ntp/search/SearchBoxMediator.java |  1 -
- .../chrome/browser/share/LensUtils.java       | 12 +-------
+ .../chrome/browser/share/LensUtils.java       | 12 +--------
  .../flags/android/chrome_feature_list.cc      |  2 +-
  .../flags/android/chrome_feature_list.cc      |  2 +-
  .../browser/flags/CachedFeatureFlags.java     |  2 +-
  .../browser/flags/CachedFeatureFlags.java     |  2 +-
  chrome/browser/ui/android/omnibox/BUILD.gn    |  2 --
  chrome/browser/ui/android/omnibox/BUILD.gn    |  2 --
  .../browser/omnibox/LocationBarMediator.java  |  1 -
  .../browser/omnibox/LocationBarMediator.java  |  1 -
- 13 files changed, 3 insertions(+), 78 deletions(-)
+ 13 files changed, 3 insertions(+), 77 deletions(-)
 
 
 diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
 diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
 --- a/chrome/android/BUILD.gn
 --- a/chrome/android/BUILD.gn
 +++ b/chrome/android/BUILD.gn
 +++ b/chrome/android/BUILD.gn
-@@ -365,7 +365,6 @@ android_library("chrome_java") {
+@@ -368,7 +368,6 @@ android_library("chrome_java") {
      "//chrome/browser/first_run/android:java",
      "//chrome/browser/first_run/android:java",
      "//chrome/browser/flags:java",
      "//chrome/browser/flags:java",
      "//chrome/browser/fullscreen/android:java",
      "//chrome/browser/fullscreen/android:java",
@@ -30,7 +30,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
      "//chrome/browser/history_clusters:java",
      "//chrome/browser/history_clusters:java",
      "//chrome/browser/history_clusters:java_resources",
      "//chrome/browser/history_clusters:java_resources",
      "//chrome/browser/image_descriptions:java",
      "//chrome/browser/image_descriptions:java",
-@@ -975,7 +974,6 @@ junit_binary("chrome_junit_tests") {
+@@ -984,7 +983,6 @@ junit_binary("chrome_junit_tests") {
      "//chrome/browser/flags:flags_junit_tests",
      "//chrome/browser/flags:flags_junit_tests",
      "//chrome/browser/flags:java",
      "//chrome/browser/flags:java",
      "//chrome/browser/fullscreen/android:java",
      "//chrome/browser/fullscreen/android:java",
@@ -38,7 +38,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
      "//chrome/browser/history_clusters:java",
      "//chrome/browser/history_clusters:java",
      "//chrome/browser/image_descriptions:java",
      "//chrome/browser/image_descriptions:java",
      "//chrome/browser/image_editor/public:java",
      "//chrome/browser/image_editor/public:java",
-@@ -1368,7 +1366,6 @@ android_library("chrome_test_java") {
+@@ -1394,7 +1392,6 @@ android_library("chrome_test_java") {
      "//chrome/browser/first_run/android:java",
      "//chrome/browser/first_run/android:java",
      "//chrome/browser/flags:java",
      "//chrome/browser/flags:java",
      "//chrome/browser/fullscreen/android:java",
      "//chrome/browser/fullscreen/android:java",
@@ -89,7 +89,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/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
 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
 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
-@@ -112,10 +112,6 @@ import org.chromium.chrome.browser.fullscreen.BrowserControlsManager;
+@@ -111,10 +111,6 @@ import org.chromium.chrome.browser.fullscreen.BrowserControlsManager;
  import org.chromium.chrome.browser.fullscreen.BrowserControlsManagerSupplier;
  import org.chromium.chrome.browser.fullscreen.BrowserControlsManagerSupplier;
  import org.chromium.chrome.browser.fullscreen.FullscreenBackPressHandler;
  import org.chromium.chrome.browser.fullscreen.FullscreenBackPressHandler;
  import org.chromium.chrome.browser.fullscreen.FullscreenManager;
  import org.chromium.chrome.browser.fullscreen.FullscreenManager;
@@ -100,15 +100,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv
  import org.chromium.chrome.browser.history.HistoryManagerUtils;
  import org.chromium.chrome.browser.history.HistoryManagerUtils;
  import org.chromium.chrome.browser.init.AsyncInitializationActivity;
  import org.chromium.chrome.browser.init.AsyncInitializationActivity;
  import org.chromium.chrome.browser.init.ProcessInitializationHandler;
  import org.chromium.chrome.browser.init.ProcessInitializationHandler;
-@@ -293,7 +289,6 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
-     private TabContentManager mTabContentManager;
- 
-     private UmaSessionStats mUmaSessionStats;
--    private ContextReporter mContextReporter;
-     private MostVisitedSites mMostVisitedSites;
- 
-     private boolean mPartnerBrowserRefreshNeeded;
-@@ -378,8 +373,6 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+@@ -368,8 +364,6 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
  
  
      private LaunchCauseMetrics mLaunchCauseMetrics;
      private LaunchCauseMetrics mLaunchCauseMetrics;
  
  
@@ -117,7 +109,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv
      // TODO(972867): Pull MenuOrKeyboardActionController out of ChromeActivity.
      // TODO(972867): Pull MenuOrKeyboardActionController out of ChromeActivity.
      private List<MenuOrKeyboardActionController.MenuOrKeyboardActionHandler> mMenuActionHandlers =
      private List<MenuOrKeyboardActionController.MenuOrKeyboardActionHandler> mMenuActionHandlers =
              new ArrayList<>();
              new ArrayList<>();
-@@ -1168,10 +1161,6 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+@@ -1151,10 +1145,6 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
  
  
      @Override
      @Override
      public void onStopWithNative() {
      public void onStopWithNative() {
@@ -128,7 +120,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv
          super.onStopWithNative();
          super.onStopWithNative();
      }
      }
  
  
-@@ -1260,23 +1249,6 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+@@ -1243,23 +1233,6 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
              FontSizePrefs.getInstance(Profile.getLastUsedRegularProfile())
              FontSizePrefs.getInstance(Profile.getLastUsedRegularProfile())
                      .recordUserFontPrefOnStartup();
                      .recordUserFontPrefOnStartup();
          });
          });
@@ -204,7 +196,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/init/ProcessInitializationHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java
 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
 --- a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java
-@@ -369,14 +369,6 @@ public class ProcessInitializationHandler {
+@@ -362,14 +362,6 @@ public class ProcessInitializationHandler {
              }
              }
          });
          });
  
  
@@ -270,7 +262,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/share/LensUtils
 diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
 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
 --- a/chrome/browser/flags/android/chrome_feature_list.cc
 +++ b/chrome/browser/flags/android/chrome_feature_list.cc
 +++ b/chrome/browser/flags/android/chrome_feature_list.cc
-@@ -642,7 +642,7 @@ const base::Feature kDynamicColorButtonsAndroid{
+@@ -665,7 +665,7 @@ const base::Feature kDynamicColorButtonsAndroid{
      "DynamicColorButtonsAndroid", base::FEATURE_DISABLED_BY_DEFAULT};
      "DynamicColorButtonsAndroid", base::FEATURE_DISABLED_BY_DEFAULT};
  
  
  const base::Feature kExperimentsForAgsa{"ExperimentsForAgsa",
  const base::Feature kExperimentsForAgsa{"ExperimentsForAgsa",
@@ -282,7 +274,7 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse
 diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
 diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
 --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
 --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
 +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
 +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
-@@ -89,7 +89,7 @@ public class CachedFeatureFlags {
+@@ -83,7 +83,7 @@ public class CachedFeatureFlags {
                      .put(ChromeFeatureList.READ_LATER, false)
                      .put(ChromeFeatureList.READ_LATER, false)
                      .put(ChromeFeatureList.CCT_REMOVE_REMOTE_VIEW_IDS, true)
                      .put(ChromeFeatureList.CCT_REMOVE_REMOTE_VIEW_IDS, true)
                      .put(ChromeFeatureList.CCT_INCOGNITO, true)
                      .put(ChromeFeatureList.CCT_INCOGNITO, true)
@@ -302,7 +294,7 @@ diff --git a/chrome/browser/ui/android/omnibox/BUILD.gn b/chrome/browser/ui/andr
      "//chrome/browser/history_clusters:java",
      "//chrome/browser/history_clusters:java",
      "//chrome/browser/language/android:java",
      "//chrome/browser/language/android:java",
      "//chrome/browser/lens:java",
      "//chrome/browser/lens:java",
-@@ -382,7 +381,6 @@ android_library("junit") {
+@@ -381,7 +380,6 @@ android_library("junit") {
      "//chrome/android:base_module_java",
      "//chrome/android:base_module_java",
      "//chrome/browser/device:java",
      "//chrome/browser/device:java",
      "//chrome/browser/flags:java",
      "//chrome/browser/flags:java",
@@ -313,7 +305,7 @@ 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/LocationBarMediator.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediator.java
 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
 --- 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
 +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediator.java
-@@ -35,7 +35,6 @@ import org.chromium.base.task.PostTask;
+@@ -36,7 +36,6 @@ import org.chromium.base.task.PostTask;
  import org.chromium.chrome.browser.device.DeviceClassManager;
  import org.chromium.chrome.browser.device.DeviceClassManager;
  import org.chromium.chrome.browser.flags.ChromeFeatureList;
  import org.chromium.chrome.browser.flags.ChromeFeatureList;
  import org.chromium.chrome.browser.flags.ChromeSwitches;
  import org.chromium.chrome.browser.flags.ChromeSwitches;

+ 4 - 4
build/patches/Disable-Accessibility-service-by-default.patch

@@ -14,7 +14,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 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
 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
-@@ -1450,6 +1450,12 @@ Your Google account may have other forms of browsing history like searches and a
+@@ -1453,6 +1453,12 @@ Your Google account may have other forms of browsing history like searches and a
        <message name="IDS_SAFETY_CHECK_BUTTON" desc="Text for the button to start Safety check.">
        <message name="IDS_SAFETY_CHECK_BUTTON" desc="Text for the button to start Safety check.">
          Check now
          Check now
        </message>
        </message>
@@ -45,8 +45,8 @@ diff --git a/components/browser_ui/accessibility/android/java/res/xml/accessibil
 diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java
 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
 --- 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
 +++ b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java
-@@ -17,6 +17,9 @@ import org.chromium.components.browser_ui.accessibility.FontSizePrefs.FontSizePr
- import org.chromium.components.browser_ui.settings.ChromeBaseCheckBoxPreference;
+@@ -18,6 +18,9 @@ import org.chromium.components.browser_ui.settings.ChromeBaseCheckBoxPreference;
+ import org.chromium.components.browser_ui.settings.ChromeSwitchPreference;
  import org.chromium.components.browser_ui.settings.SettingsUtils;
  import org.chromium.components.browser_ui.settings.SettingsUtils;
  
  
 +import org.chromium.chrome.browser.preferences.ChromePreferenceKeys;
 +import org.chromium.chrome.browser.preferences.ChromePreferenceKeys;
@@ -58,7 +58,7 @@ diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/c
 diff --git a/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java b/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java
 diff --git a/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java b/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java
 --- a/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java
 --- a/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java
 +++ b/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java
 +++ b/content/public/android/java/src/org/chromium/content/browser/accessibility/WebContentsAccessibilityImpl.java
-@@ -940,6 +940,11 @@ public class WebContentsAccessibilityImpl extends AccessibilityNodeProviderCompa
+@@ -947,6 +947,11 @@ public class WebContentsAccessibilityImpl extends AccessibilityNodeProviderCompa
              structure.setChildCount(0);
              structure.setChildCount(0);
              return;
              return;
          }
          }

+ 1 - 1
build/patches/Disable-AsyncDNS-by-default.patch

@@ -13,7 +13,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
 diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
 --- a/chrome/common/chrome_features.cc
 --- a/chrome/common/chrome_features.cc
 +++ b/chrome/common/chrome_features.cc
 +++ b/chrome/common/chrome_features.cc
-@@ -95,12 +95,8 @@ const base::Feature kArcPiGhostWindow{"ArcPiGhostWindow",
+@@ -93,12 +93,8 @@ const base::Feature kArcPiGhostWindow{"ArcPiGhostWindow",
  
  
  // Enables the built-in DNS resolver.
  // Enables the built-in DNS resolver.
  const base::Feature kAsyncDns {
  const base::Feature kAsyncDns {

+ 1 - 1
build/patches/Disable-DRM-media-origin-IDs-preprovisioning.patch

@@ -10,7 +10,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
 diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
 --- a/media/base/media_switches.cc
 --- a/media/base/media_switches.cc
 +++ b/media/base/media_switches.cc
 +++ b/media/base/media_switches.cc
-@@ -722,7 +722,7 @@ const base::Feature kMediaDrmPersistentLicense{
+@@ -738,7 +738,7 @@ const base::Feature kMediaDrmPersistentLicense{
  // MediaDrmBridge. If disabled, MediaDrmBridge will get unprovisioned origin IDs
  // MediaDrmBridge. If disabled, MediaDrmBridge will get unprovisioned origin IDs
  // which will trigger provisioning process after MediaDrmBridge is created.
  // which will trigger provisioning process after MediaDrmBridge is created.
  const base::Feature kMediaDrmPreprovisioning{"MediaDrmPreprovisioning",
  const base::Feature kMediaDrmPreprovisioning{"MediaDrmPreprovisioning",

+ 3 - 3
build/patches/Disable-FLoC-and-privacy-sandbox.patch

@@ -84,7 +84,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
 diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
 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
 --- a/chrome/browser/chrome_content_browser_client.cc
 +++ b/chrome/browser/chrome_content_browser_client.cc
 +++ b/chrome/browser/chrome_content_browser_client.cc
-@@ -2866,6 +2866,9 @@ bool ChromeContentBrowserClient::IsConversionMeasurementOperationAllowed(
+@@ -2873,6 +2873,9 @@ bool ChromeContentBrowserClient::IsConversionMeasurementOperationAllowed(
      const url::Origin* impression_origin,
      const url::Origin* impression_origin,
      const url::Origin* conversion_origin,
      const url::Origin* conversion_origin,
      const url::Origin* reporting_origin) {
      const url::Origin* reporting_origin) {
@@ -109,7 +109,7 @@ diff --git a/chrome/browser/privacy_sandbox/generated_floc_pref.cc b/chrome/brow
 diff --git a/components/history/core/browser/history_backend.cc b/components/history/core/browser/history_backend.cc
 diff --git a/components/history/core/browser/history_backend.cc b/components/history/core/browser/history_backend.cc
 --- a/components/history/core/browser/history_backend.cc
 --- a/components/history/core/browser/history_backend.cc
 +++ b/components/history/core/browser/history_backend.cc
 +++ b/components/history/core/browser/history_backend.cc
-@@ -497,18 +497,7 @@ void HistoryBackend::SetBrowsingTopicsAllowed(ContextID context_id,
+@@ -490,18 +490,7 @@ void HistoryBackend::SetBrowsingTopicsAllowed(ContextID context_id,
    if (!visit_id)
    if (!visit_id)
      return;
      return;
  
  
@@ -132,7 +132,7 @@ diff --git a/components/history/core/browser/history_backend.cc b/components/his
 diff --git a/components/history/core/browser/history_service.cc b/components/history/core/browser/history_service.cc
 diff --git a/components/history/core/browser/history_service.cc b/components/history/core/browser/history_service.cc
 --- a/components/history/core/browser/history_service.cc
 --- a/components/history/core/browser/history_service.cc
 +++ b/components/history/core/browser/history_service.cc
 +++ b/components/history/core/browser/history_service.cc
-@@ -394,7 +394,7 @@ void HistoryService::AddPage(const GURL& url,
+@@ -393,7 +393,7 @@ void HistoryService::AddPage(const GURL& url,
    AddPage(HistoryAddPageArgs(
    AddPage(HistoryAddPageArgs(
        url, time, context_id, nav_entry_id, referrer, redirects, transition,
        url, time, context_id, nav_entry_id, referrer, redirects, transition,
        !ui::PageTransitionIsMainFrame(transition), visit_source,
        !ui::PageTransitionIsMainFrame(transition), visit_source,

+ 46 - 0
build/patches/Disable-PrivacyGuide.patch

@@ -0,0 +1,46 @@
+From: csagan5 <32685696+csagan5@users.noreply.github.com>
+Date: Sun, 31 Jul 2022 22:13:11 +0200
+Subject: Disable PrivacyGuide
+
+License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
+---
+ chrome/common/chrome_features.cc | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+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
+@@ -459,8 +459,8 @@ const base::Feature kHaTSDesktopDevToolsIssuesCSP{
+ 
+ // Enables or disables the Happiness Tracking System for Desktop Privacy Guide.
+ const base::Feature kHappinessTrackingSurveysForDesktopPrivacyGuide{
+-    "HappinessTrackingSurveysForDesktopPrivacyGuide",
+-    base::FEATURE_DISABLED_BY_DEFAULT};
++    "HappinessTrackingSurveysForDesktopPrivacyGuide",                      // must be disabled
++    base::FEATURE_DISABLED_BY_DEFAULT};                                    // in Bromite
+ const base::FeatureParam<base::TimeDelta>
+     kHappinessTrackingSurveysForDesktopPrivacyGuideTime{
+         &kHappinessTrackingSurveysForDesktopPrivacyGuide, "settings-time",
+@@ -783,14 +783,14 @@ const base::Feature kPrefixWebAppWindowsWithAppName{
+ const base::Feature kPrerenderFallbackToPreconnect{
+     "PrerenderFallbackToPreconnect", base::FEATURE_ENABLED_BY_DEFAULT};
+ 
+-const base::Feature kPrivacyGuide{"PrivacyGuide",
+-                                  base::FEATURE_ENABLED_BY_DEFAULT};
++const base::Feature kPrivacyGuide{"PrivacyGuide",                        // must be disabled
++                                  base::FEATURE_DISABLED_BY_DEFAULT};    // in Bromite
+ 
+-const base::Feature kPrivacyGuide2{"PrivacyGuide2",
+-                                   base::FEATURE_DISABLED_BY_DEFAULT};
++const base::Feature kPrivacyGuide2{"PrivacyGuide2",                      // must be disabled
++                                   base::FEATURE_DISABLED_BY_DEFAULT};   // in Bromite
+ 
+-const base::Feature kPrivacyGuideAndroid{"PrivacyGuideAndroid",
+-                                         base::FEATURE_DISABLED_BY_DEFAULT};
++const base::Feature kPrivacyGuideAndroid{"PrivacyGuideAndroid",               // must be disabled
++                                         base::FEATURE_DISABLED_BY_DEFAULT};  // in Bromite
+ 
+ // Enables or disables push subscriptions keeping Chrome running in the
+ // background when closed.
+--
+2.25.1

+ 9 - 9
build/patches/Disable-TLS-resumption.patch

@@ -39,7 +39,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -4501,6 +4501,12 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -4667,6 +4667,12 @@ const FeatureEntry kFeatureEntries[] = {
      {"enable-tls13-early-data", flag_descriptions::kEnableTLS13EarlyDataName,
      {"enable-tls13-early-data", flag_descriptions::kEnableTLS13EarlyDataName,
       flag_descriptions::kEnableTLS13EarlyDataDescription, kOsAll,
       flag_descriptions::kEnableTLS13EarlyDataDescription, kOsAll,
       FEATURE_VALUE_TYPE(net::features::kEnableTLS13EarlyData)},
       FEATURE_VALUE_TYPE(net::features::kEnableTLS13EarlyData)},
@@ -55,7 +55,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -956,6 +956,14 @@ const char kEnableTLS13EarlyDataDescription[] =
+@@ -965,6 +965,14 @@ const char kEnableTLS13EarlyDataDescription[] =
      "during the handshake when resuming a connection to a compatible TLS 1.3 "
      "during the handshake when resuming a connection to a compatible TLS 1.3 "
      "server.";
      "server.";
  
  
@@ -73,7 +73,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -546,6 +546,12 @@ extern const char kEnablePreinstalledWebAppDuplicationFixerDescription[];
+@@ -555,6 +555,12 @@ extern const char kEnablePreinstalledWebAppDuplicationFixerDescription[];
  extern const char kEnableTLS13EarlyDataName[];
  extern const char kEnableTLS13EarlyDataName[];
  extern const char kEnableTLS13EarlyDataDescription[];
  extern const char kEnableTLS13EarlyDataDescription[];
  
  
@@ -121,7 +121,7 @@ diff --git a/net/base/features.h b/net/base/features.h
 diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc
 diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc
 --- a/net/http/http_network_session.cc
 --- a/net/http/http_network_session.cc
 +++ b/net/http/http_network_session.cc
 +++ b/net/http/http_network_session.cc
-@@ -232,6 +232,7 @@ HttpNetworkSession::HttpNetworkSession(const HttpNetworkSessionParams& params,
+@@ -206,6 +206,7 @@ HttpNetworkSession::HttpNetworkSession(const HttpNetworkSessionParams& params,
  
  
    next_protos_.push_back(kProtoHTTP11);
    next_protos_.push_back(kProtoHTTP11);
  
  
@@ -179,7 +179,7 @@ diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
  // Refcounted class that owns quic::QuicCryptoClientConfig and tracks how many
  // Refcounted class that owns quic::QuicCryptoClientConfig and tracks how many
  // consumers are using it currently. When the last reference is freed, the
  // consumers are using it currently. When the last reference is freed, the
  // QuicCryptoClientConfigHandle informs the owning QuicStreamFactory, moves it
  // QuicCryptoClientConfigHandle informs the owning QuicStreamFactory, moves it
-@@ -2240,7 +2273,7 @@ QuicStreamFactory::CreateCryptoConfigHandle(
+@@ -2228,7 +2261,7 @@ QuicStreamFactory::CreateCryptoConfigHandle(
                sct_auditing_delegate_,
                sct_auditing_delegate_,
                HostsFromOrigins(params_.origins_to_force_quic_on),
                HostsFromOrigins(params_.origins_to_force_quic_on),
                actual_network_isolation_key),
                actual_network_isolation_key),
@@ -191,7 +191,7 @@ diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
 diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket_impl.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
 --- a/net/socket/ssl_client_socket_impl.cc
 +++ b/net/socket/ssl_client_socket_impl.cc
 +++ b/net/socket/ssl_client_socket_impl.cc
-@@ -405,7 +405,33 @@ SSLClientSocketImpl::SSLClientSocketImpl(
+@@ -392,7 +392,33 @@ SSLClientSocketImpl::SSLClientSocketImpl(
    CHECK(context_);
    CHECK(context_);
  }
  }
  
  
@@ -225,7 +225,7 @@ diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket
    Disconnect();
    Disconnect();
  }
  }
  
  
-@@ -800,6 +826,8 @@ int SSLClientSocketImpl::Init() {
+@@ -787,6 +813,8 @@ int SSLClientSocketImpl::Init() {
      }
      }
      if (session)
      if (session)
        SSL_set_session(ssl_.get(), session.get());
        SSL_set_session(ssl_.get(), session.get());
@@ -234,7 +234,7 @@ diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket
    }
    }
  
  
    transport_adapter_ = std::make_unique<SocketBIOAdapter>(
    transport_adapter_ = std::make_unique<SocketBIOAdapter>(
-@@ -1088,6 +1116,35 @@ int SSLClientSocketImpl::DoHandshakeComplete(int result) {
+@@ -1075,6 +1103,35 @@ int SSLClientSocketImpl::DoHandshakeComplete(int result) {
                      : SSLHandshakeDetails::kTLS13Full;
                      : SSLHandshakeDetails::kTLS13Full;
      }
      }
    }
    }
@@ -270,7 +270,7 @@ diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket
    UMA_HISTOGRAM_ENUMERATION("Net.SSLHandshakeDetails", details);
    UMA_HISTOGRAM_ENUMERATION("Net.SSLHandshakeDetails", details);
  
  
    // Measure TLS connections that implement the renegotiation_info extension.
    // Measure TLS connections that implement the renegotiation_info extension.
-@@ -1761,6 +1818,8 @@ bool SSLClientSocketImpl::IsRenegotiationAllowed() const {
+@@ -1748,6 +1805,8 @@ bool SSLClientSocketImpl::IsRenegotiationAllowed() const {
  }
  }
  
  
  bool SSLClientSocketImpl::IsCachingEnabled() const {
  bool SSLClientSocketImpl::IsCachingEnabled() const {

+ 21 - 19
build/patches/Disable-all-predictors-code.patch

@@ -7,7 +7,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 ---
 ---
  .../chrome_hints_manager.cc                   |  1 +
  .../chrome_hints_manager.cc                   |  1 +
  .../optimization_guide_keyed_service.cc       |  1 -
  .../optimization_guide_keyed_service.cc       |  1 -
- chrome/common/chrome_features.cc              |  4 ++--
+ chrome/common/chrome_features.cc              |  6 ++---
  .../optimization_guide/core/hints_fetcher.cc  |  1 +
  .../optimization_guide/core/hints_fetcher.cc  |  1 +
  .../optimization_guide/core/hints_manager.cc  |  4 ++++
  .../optimization_guide/core/hints_manager.cc  |  4 ++++
  .../core/optimization_guide_features.cc       | 24 +++++++++----------
  .../core/optimization_guide_features.cc       | 24 +++++++++----------
@@ -17,7 +17,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
  components/permissions/features.cc            |  2 +-
  components/permissions/features.cc            |  2 +-
  .../segmentation_platform/public/features.cc  |  2 +-
  .../segmentation_platform/public/features.cc  |  2 +-
  third_party/blink/common/features.cc          |  2 +-
  third_party/blink/common/features.cc          |  2 +-
- 12 files changed, 29 insertions(+), 23 deletions(-)
+ 12 files changed, 30 insertions(+), 24 deletions(-)
 
 
 diff --git a/chrome/browser/optimization_guide/chrome_hints_manager.cc b/chrome/browser/optimization_guide/chrome_hints_manager.cc
 diff --git a/chrome/browser/optimization_guide/chrome_hints_manager.cc b/chrome/browser/optimization_guide/chrome_hints_manager.cc
 --- a/chrome/browser/optimization_guide/chrome_hints_manager.cc
 --- a/chrome/browser/optimization_guide/chrome_hints_manager.cc
@@ -33,7 +33,7 @@ diff --git a/chrome/browser/optimization_guide/chrome_hints_manager.cc b/chrome/
 diff --git a/chrome/browser/optimization_guide/optimization_guide_keyed_service.cc b/chrome/browser/optimization_guide/optimization_guide_keyed_service.cc
 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
 --- a/chrome/browser/optimization_guide/optimization_guide_keyed_service.cc
 +++ b/chrome/browser/optimization_guide/optimization_guide_keyed_service.cc
 +++ b/chrome/browser/optimization_guide/optimization_guide_keyed_service.cc
-@@ -367,7 +367,6 @@ void OptimizationGuideKeyedService::RemoveObserverForOptimizationTargetModel(
+@@ -354,7 +354,6 @@ void OptimizationGuideKeyedService::RemoveObserverForOptimizationTargetModel(
  void OptimizationGuideKeyedService::RegisterOptimizationTypes(
  void OptimizationGuideKeyedService::RegisterOptimizationTypes(
      const std::vector<optimization_guide::proto::OptimizationType>&
      const std::vector<optimization_guide::proto::OptimizationType>&
          optimization_types) {
          optimization_types) {
@@ -44,21 +44,23 @@ diff --git a/chrome/browser/optimization_guide/optimization_guide_keyed_service.
 diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
 diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
 --- a/chrome/common/chrome_features.cc
 --- a/chrome/common/chrome_features.cc
 +++ b/chrome/common/chrome_features.cc
 +++ b/chrome/common/chrome_features.cc
-@@ -766,7 +766,7 @@ const base::Feature kPermissionAuditing{"PermissionAuditing",
+@@ -750,8 +750,8 @@ const base::Feature kPermissionAuditing{"PermissionAuditing",
+ 
  // Enables using the prediction service for permission prompts. We will keep
  // Enables using the prediction service for permission prompts. We will keep
  // this feature in order to allow us to update the holdback chance via finch.
  // this feature in order to allow us to update the holdback chance via finch.
- const base::Feature kPermissionPredictions{"PermissionPredictions",
+-const base::Feature kPermissionPredictions{"PermissionPredictions",
 -                                           base::FEATURE_ENABLED_BY_DEFAULT};
 -                                           base::FEATURE_ENABLED_BY_DEFAULT};
-+                                           base::FEATURE_DISABLED_BY_DEFAULT};
++const base::Feature kPermissionPredictions{"PermissionPredictions",               // always disabled
++                                           base::FEATURE_DISABLED_BY_DEFAULT};    // in Bromite
  
  
  // The holdback chance is 30% but it can also be configured/updated
  // The holdback chance is 30% but it can also be configured/updated
  // through finch if needed.
  // through finch if needed.
-@@ -777,7 +777,7 @@ const base::FeatureParam<double> kPermissionPredictionsHoldbackChance(
+@@ -762,7 +762,7 @@ const base::FeatureParam<double> kPermissionPredictionsHoldbackChance(
  
  
  // Enables using the prediction service for geolocation permission prompts.
  // Enables using the prediction service for geolocation permission prompts.
  const base::Feature kPermissionGeolocationPredictions{
  const base::Feature kPermissionGeolocationPredictions{
--    "PermissionGeolocationPredictions", base::FEATURE_DISABLED_BY_DEFAULT};
-+    "PermissionGeolocationPredictions", base::FEATURE_DISABLED_BY_DEFAULT}; // guard this
+-    "PermissionGeolocationPredictions", base::FEATURE_ENABLED_BY_DEFAULT};
++    "PermissionGeolocationPredictions", base::FEATURE_DISABLED_BY_DEFAULT}; // always disabled in Bromite
  
  
  const base::FeatureParam<double>
  const base::FeatureParam<double>
      kPermissionGeolocationPredictionsHoldbackChance(
      kPermissionGeolocationPredictionsHoldbackChance(
@@ -76,7 +78,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
 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
 --- a/components/optimization_guide/core/hints_manager.cc
 +++ b/components/optimization_guide/core/hints_manager.cc
 +++ b/components/optimization_guide/core/hints_manager.cc
-@@ -358,6 +358,7 @@ void HintsManager::Shutdown() {
+@@ -348,6 +348,7 @@ void HintsManager::Shutdown() {
  OptimizationGuideDecision
  OptimizationGuideDecision
  HintsManager::GetOptimizationGuideDecisionFromOptimizationTypeDecision(
  HintsManager::GetOptimizationGuideDecisionFromOptimizationTypeDecision(
      OptimizationTypeDecision optimization_type_decision) {
      OptimizationTypeDecision optimization_type_decision) {
@@ -84,7 +86,7 @@ diff --git a/components/optimization_guide/core/hints_manager.cc b/components/op
    switch (optimization_type_decision) {
    switch (optimization_type_decision) {
      case OptimizationTypeDecision::kAllowedByOptimizationFilter:
      case OptimizationTypeDecision::kAllowedByOptimizationFilter:
      case OptimizationTypeDecision::kAllowedByHint:
      case OptimizationTypeDecision::kAllowedByHint:
-@@ -1211,6 +1212,9 @@ OptimizationTypeDecision HintsManager::CanApplyOptimization(
+@@ -1239,6 +1240,9 @@ OptimizationTypeDecision HintsManager::CanApplyOptimization(
      proto::OptimizationType optimization_type,
      proto::OptimizationType optimization_type,
      OptimizationMetadata* optimization_metadata) {
      OptimizationMetadata* optimization_metadata) {
    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -142,7 +144,7 @@ diff --git a/components/optimization_guide/core/optimization_guide_features.cc b
  #endif  // !BUILD_WITH_TFLITE_LIB
  #endif  // !BUILD_WITH_TFLITE_LIB
  };
  };
  
  
-@@ -135,7 +135,7 @@ const base::Feature kPageEntitiesModelResetOnShutdown{
+@@ -139,7 +139,7 @@ const base::Feature kPageEntitiesModelResetOnShutdown{
  
  
  // Enables push notification of hints.
  // Enables push notification of hints.
  const base::Feature kPushNotifications{"OptimizationGuidePushNotifications",
  const base::Feature kPushNotifications{"OptimizationGuidePushNotifications",
@@ -151,7 +153,7 @@ diff --git a/components/optimization_guide/core/optimization_guide_features.cc b
  
  
  // This feature flag does not turn off any behavior, it is only used for
  // This feature flag does not turn off any behavior, it is only used for
  // experiment parameters.
  // experiment parameters.
-@@ -147,12 +147,12 @@ const base::Feature kOptimizationGuideMetadataValidation{
+@@ -151,12 +151,12 @@ const base::Feature kOptimizationGuideMetadataValidation{
      "OptimizationGuideMetadataValidation", base::FEATURE_DISABLED_BY_DEFAULT};
      "OptimizationGuideMetadataValidation", base::FEATURE_DISABLED_BY_DEFAULT};
  
  
  const base::Feature kPageTopicsBatchAnnotations{
  const base::Feature kPageTopicsBatchAnnotations{
@@ -166,7 +168,7 @@ diff --git a/components/optimization_guide/core/optimization_guide_features.cc b
  
  
  const base::Feature kPageContentAnnotationsValidation{
  const base::Feature kPageContentAnnotationsValidation{
      "PageContentAnnotationsValidation", base::FEATURE_DISABLED_BY_DEFAULT};
      "PageContentAnnotationsValidation", base::FEATURE_DISABLED_BY_DEFAULT};
-@@ -388,7 +388,7 @@ size_t MaxURLKeyedHintCacheSize() {
+@@ -395,7 +395,7 @@ size_t MaxURLKeyedHintCacheSize() {
  
  
  bool ShouldPersistHintsToDisk() {
  bool ShouldPersistHintsToDisk() {
    return GetFieldTrialParamByFeatureAsBool(kOptimizationHints,
    return GetFieldTrialParamByFeatureAsBool(kOptimizationHints,
@@ -240,7 +242,7 @@ diff --git a/components/optimization_guide/features.gni b/components/optimizatio
 diff --git a/components/permissions/features.cc b/components/permissions/features.cc
 diff --git a/components/permissions/features.cc b/components/permissions/features.cc
 --- a/components/permissions/features.cc
 --- a/components/permissions/features.cc
 +++ b/components/permissions/features.cc
 +++ b/components/permissions/features.cc
-@@ -69,7 +69,7 @@ const base::Feature kPermissionPredictionServiceUseUrlOverride{
+@@ -65,7 +65,7 @@ const base::Feature kPermissionPredictionServiceUseUrlOverride{
  
  
  const base::Feature kPermissionOnDeviceNotificationPredictions{
  const base::Feature kPermissionOnDeviceNotificationPredictions{
      "PermissionOnDeviceNotificationPredictions",
      "PermissionOnDeviceNotificationPredictions",
@@ -252,15 +254,15 @@ diff --git a/components/permissions/features.cc b/components/permissions/feature
 diff --git a/components/segmentation_platform/public/features.cc b/components/segmentation_platform/public/features.cc
 diff --git a/components/segmentation_platform/public/features.cc b/components/segmentation_platform/public/features.cc
 --- a/components/segmentation_platform/public/features.cc
 --- a/components/segmentation_platform/public/features.cc
 +++ b/components/segmentation_platform/public/features.cc
 +++ b/components/segmentation_platform/public/features.cc
-@@ -12,7 +12,7 @@ namespace features {
- const base::Feature kSegmentationPlatformFeature {
-   "SegmentationPlatform",
+@@ -27,7 +27,7 @@ const base::Feature kSegmentationPlatformLowEngagementFeature{
+ const base::Feature kSegmentationPlatformFeedSegmentFeature{
+   "SegmentationPlatformFeedSegmentFeature",
  #if BUILDFLAG(IS_ANDROID)
  #if BUILDFLAG(IS_ANDROID)
 -      base::FEATURE_ENABLED_BY_DEFAULT
 -      base::FEATURE_ENABLED_BY_DEFAULT
 +      base::FEATURE_DISABLED_BY_DEFAULT
 +      base::FEATURE_DISABLED_BY_DEFAULT
+ };
  #else
  #else
        base::FEATURE_DISABLED_BY_DEFAULT
        base::FEATURE_DISABLED_BY_DEFAULT
- #endif
 diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
 diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
 --- a/third_party/blink/common/features.cc
 --- a/third_party/blink/common/features.cc
 +++ b/third_party/blink/common/features.cc
 +++ b/third_party/blink/common/features.cc

+ 2 - 2
build/patches/Disable-all-promo-dialogs.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/tabbed_mode/TabbedRootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java
 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
 --- 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
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java
-@@ -864,7 +864,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator {
+@@ -871,7 +871,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator {
       * displayed.
       * displayed.
       */
       */
      private boolean triggerPromo(boolean intentWithEffect) {
      private boolean triggerPromo(boolean intentWithEffect) {
@@ -19,7 +19,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/Tab
              if (CommandLine.getInstance().hasSwitch(ChromeSwitches.DISABLE_STARTUP_PROMOS)) {
              if (CommandLine.getInstance().hasSwitch(ChromeSwitches.DISABLE_STARTUP_PROMOS)) {
                  return false;
                  return false;
              }
              }
-@@ -899,8 +899,8 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator {
+@@ -906,8 +906,8 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator {
                  preferenceManager.writeBoolean(
                  preferenceManager.writeBoolean(
                          ChromePreferenceKeys.PROMOS_SKIPPED_ON_FIRST_START, true);
                          ChromePreferenceKeys.PROMOS_SKIPPED_ON_FIRST_START, true);
              }
              }

+ 9 - 9
build/patches/Disable-conversion-measurement-api.patch

@@ -27,7 +27,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
 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
 --- a/chrome/browser/flags/android/chrome_feature_list.cc
 +++ b/chrome/browser/flags/android/chrome_feature_list.cc
 +++ b/chrome/browser/flags/android/chrome_feature_list.cc
-@@ -451,7 +451,7 @@ const base::Feature kAppMenuMobileSiteOption{"AppMenuMobileSiteOption",
+@@ -471,7 +471,7 @@ const base::Feature kAppMenuMobileSiteOption{"AppMenuMobileSiteOption",
                                               base::FEATURE_DISABLED_BY_DEFAULT};
                                               base::FEATURE_DISABLED_BY_DEFAULT};
  
  
  const base::Feature kAppToWebAttribution{"AppToWebAttribution",
  const base::Feature kAppToWebAttribution{"AppToWebAttribution",
@@ -96,18 +96,18 @@ diff --git a/content/browser/aggregation_service/aggregatable_report_sender.cc b
 diff --git a/content/browser/attribution_reporting/attribution_host.cc b/content/browser/attribution_reporting/attribution_host.cc
 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
 --- a/content/browser/attribution_reporting/attribution_host.cc
 +++ b/content/browser/attribution_reporting/attribution_host.cc
 +++ b/content/browser/attribution_reporting/attribution_host.cc
-@@ -121,6 +121,7 @@ void AttributionHost::DidFinishNavigation(NavigationHandle* navigation_handle) {
+@@ -124,6 +124,7 @@ void AttributionHost::DidRedirectNavigation(
      return;
      return;
    }
    }
  
  
 +  if ((true)) return;
 +  if ((true)) return;
    AttributionManager* attribution_manager =
    AttributionManager* attribution_manager =
-       attribution_manager_provider_->GetManager(web_contents());
-   if (!attribution_manager) {
+       AttributionManager::FromWebContents(web_contents());
+   if (!attribution_manager)
 diff --git a/content/browser/attribution_reporting/attribution_report_network_sender.cc b/content/browser/attribution_reporting/attribution_report_network_sender.cc
 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
 --- a/content/browser/attribution_reporting/attribution_report_network_sender.cc
 +++ b/content/browser/attribution_reporting/attribution_report_network_sender.cc
 +++ b/content/browser/attribution_reporting/attribution_report_network_sender.cc
-@@ -118,13 +118,8 @@ void AttributionReportNetworkSender::SendReport(
+@@ -117,13 +117,8 @@ void AttributionReportNetworkSender::SendReport(
                     network::SimpleURLLoader::RETRY_ON_NAME_NOT_RESOLVED;
                     network::SimpleURLLoader::RETRY_ON_NAME_NOT_RESOLVED;
    simple_url_loader_ptr->SetRetryOptions(/*max_retries=*/1, retry_mode);
    simple_url_loader_ptr->SetRetryOptions(/*max_retries=*/1, retry_mode);
  
  
@@ -123,7 +123,7 @@ diff --git a/content/browser/attribution_reporting/attribution_report_network_se
  }
  }
  
  
  void AttributionReportNetworkSender::SetURLLoaderFactoryForTesting(
  void AttributionReportNetworkSender::SetURLLoaderFactoryForTesting(
-@@ -138,6 +133,12 @@ void AttributionReportNetworkSender::OnReportSent(
+@@ -137,6 +132,12 @@ void AttributionReportNetworkSender::OnReportSent(
      bool is_debug_report,
      bool is_debug_report,
      ReportSentCallback sent_callback,
      ReportSentCallback sent_callback,
      scoped_refptr<net::HttpResponseHeaders> headers) {
      scoped_refptr<net::HttpResponseHeaders> headers) {
@@ -139,7 +139,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
 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
 --- a/content/browser/attribution_reporting/attribution_storage_sql.cc
 +++ b/content/browser/attribution_reporting/attribution_storage_sql.cc
 +++ b/content/browser/attribution_reporting/attribution_storage_sql.cc
-@@ -377,7 +377,7 @@ void AttributionStorageSql::RunInMemoryForTesting() {
+@@ -376,7 +376,7 @@ void AttributionStorageSql::RunInMemoryForTesting() {
  }
  }
  
  
  // static
  // static
@@ -151,7 +151,7 @@ diff --git a/content/browser/attribution_reporting/attribution_storage_sql.cc b/
 diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc
 diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc
 --- a/content/browser/storage_partition_impl.cc
 --- a/content/browser/storage_partition_impl.cc
 +++ b/content/browser/storage_partition_impl.cc
 +++ b/content/browser/storage_partition_impl.cc
-@@ -1305,12 +1305,7 @@ void StoragePartitionImpl::Initialize(
+@@ -1302,12 +1302,7 @@ void StoragePartitionImpl::Initialize(
  
  
    bucket_manager_ = std::make_unique<BucketManager>(quota_manager_proxy);
    bucket_manager_ = std::make_unique<BucketManager>(quota_manager_proxy);
  
  
@@ -164,7 +164,7 @@ diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage
 +  // The Conversion Measurement API is not available in Bromite.
 +  // The Conversion Measurement API is not available in Bromite.
  
  
    if (base::FeatureList::IsEnabled(blink::features::kInterestGroupStorage)) {
    if (base::FeatureList::IsEnabled(blink::features::kInterestGroupStorage)) {
-     interest_group_manager_ = std::make_unique<InterestGroupManagerImpl>(
+     // Auction worklets on non-Android use dedicated processes; on Android due
 diff --git a/content/public/browser/navigation_controller.cc b/content/public/browser/navigation_controller.cc
 diff --git a/content/public/browser/navigation_controller.cc b/content/public/browser/navigation_controller.cc
 --- a/content/public/browser/navigation_controller.cc
 --- a/content/public/browser/navigation_controller.cc
 +++ b/content/public/browser/navigation_controller.cc
 +++ b/content/public/browser/navigation_controller.cc

+ 1 - 1
build/patches/Disable-crash-reporting.patch

@@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/content/public/common/content_features.cc b/content/public/common/content_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
 --- a/content/public/common/content_features.cc
 +++ b/content/public/common/content_features.cc
 +++ b/content/public/common/content_features.cc
-@@ -227,8 +227,8 @@ const base::Feature kCooperativeScheduling{"CooperativeScheduling",
+@@ -233,8 +233,8 @@ const base::Feature kCooperativeScheduling{"CooperativeScheduling",
  
  
  // Enables crash reporting via Reporting API.
  // Enables crash reporting via Reporting API.
  // https://www.w3.org/TR/reporting/#crash-report
  // https://www.w3.org/TR/reporting/#crash-report

+ 1 - 1
build/patches/Disable-feeds-support-by-default.patch

@@ -30,7 +30,7 @@ diff --git a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/fe
 diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
 diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
 --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
 --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
 +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
 +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
-@@ -82,7 +82,7 @@ public class CachedFeatureFlags {
+@@ -76,7 +76,7 @@ public class CachedFeatureFlags {
                      .put(ChromeFeatureList.TAB_TO_GTS_ANIMATION, true)
                      .put(ChromeFeatureList.TAB_TO_GTS_ANIMATION, true)
                      .put(ChromeFeatureList.TEST_DEFAULT_DISABLED, false)
                      .put(ChromeFeatureList.TEST_DEFAULT_DISABLED, false)
                      .put(ChromeFeatureList.TEST_DEFAULT_ENABLED, true)
                      .put(ChromeFeatureList.TEST_DEFAULT_ENABLED, true)

+ 3 - 3
build/patches/Disable-fetching-of-all-field-trials.patch

@@ -21,7 +21,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/android_webview/nonembedded/BUILD.gn b/android_webview/nonembedded/BUILD.gn
 diff --git a/android_webview/nonembedded/BUILD.gn b/android_webview/nonembedded/BUILD.gn
 --- a/android_webview/nonembedded/BUILD.gn
 --- a/android_webview/nonembedded/BUILD.gn
 +++ b/android_webview/nonembedded/BUILD.gn
 +++ b/android_webview/nonembedded/BUILD.gn
-@@ -103,7 +103,6 @@ android_library("services_java") {
+@@ -105,7 +105,6 @@ android_library("services_java") {
    sources = [
    sources = [
      "java/src/org/chromium/android_webview/services/AwMinidumpUploadJobService.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/AwMinidumpUploaderDelegate.java",
@@ -29,7 +29,7 @@ diff --git a/android_webview/nonembedded/BUILD.gn b/android_webview/nonembedded/
      "java/src/org/chromium/android_webview/services/ComponentUpdaterSafeModeUtils.java",
      "java/src/org/chromium/android_webview/services/ComponentUpdaterSafeModeUtils.java",
      "java/src/org/chromium/android_webview/services/ComponentsProviderPathUtil.java",
      "java/src/org/chromium/android_webview/services/ComponentsProviderPathUtil.java",
      "java/src/org/chromium/android_webview/services/ComponentsProviderService.java",
      "java/src/org/chromium/android_webview/services/ComponentsProviderService.java",
-@@ -114,7 +113,6 @@ android_library("services_java") {
+@@ -116,7 +115,6 @@ android_library("services_java") {
      "java/src/org/chromium/android_webview/services/MetricsUploadService.java",
      "java/src/org/chromium/android_webview/services/MetricsUploadService.java",
      "java/src/org/chromium/android_webview/services/SafeModeContentProvider.java",
      "java/src/org/chromium/android_webview/services/SafeModeContentProvider.java",
      "java/src/org/chromium/android_webview/services/SafeModeService.java",
      "java/src/org/chromium/android_webview/services/SafeModeService.java",
@@ -52,7 +52,7 @@ diff --git a/android_webview/nonembedded/java/src/org/chromium/android_webview/s
 diff --git a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc
 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
 --- a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc
 +++ b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc
 +++ b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc
-@@ -227,6 +227,8 @@ ChromeMetricsServicesManagerClient::GetMetricsStateManagerForTesting() {
+@@ -229,6 +229,8 @@ ChromeMetricsServicesManagerClient::GetMetricsStateManagerForTesting() {
  void ChromeMetricsServicesManagerClient::CreateFallbackSamplingTrial(
  void ChromeMetricsServicesManagerClient::CreateFallbackSamplingTrial(
      version_info::Channel channel,
      version_info::Channel channel,
      base::FeatureList* feature_list) {
      base::FeatureList* feature_list) {

+ 1 - 1
build/patches/Disable-idle-detection.patch

@@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/content/public/common/content_features.cc b/content/public/common/content_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
 --- a/content/public/common/content_features.cc
 +++ b/content/public/common/content_features.cc
 +++ b/content/public/common/content_features.cc
-@@ -414,7 +414,7 @@ const base::Feature kGreaseUACH{"GreaseUACH", base::FEATURE_ENABLED_BY_DEFAULT};
+@@ -420,7 +420,7 @@ const base::Feature kGreaseUACH{"GreaseUACH", base::FEATURE_ENABLED_BY_DEFAULT};
  // this feature, the experimental web platform features flag should be set,
  // this feature, the experimental web platform features flag should be set,
  // or the site should obtain an Origin Trial token.
  // or the site should obtain an Origin Trial token.
  const base::Feature kIdleDetection{"IdleDetection",
  const base::Feature kIdleDetection{"IdleDetection",

+ 1 - 1
build/patches/Disable-lock-icon-in-address-bar-by-default.patch

@@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/components/omnibox/common/omnibox_features.cc b/components/omnibox/common/omnibox_features.cc
 diff --git a/components/omnibox/common/omnibox_features.cc b/components/omnibox/common/omnibox_features.cc
 --- a/components/omnibox/common/omnibox_features.cc
 --- a/components/omnibox/common/omnibox_features.cc
 +++ b/components/omnibox/common/omnibox_features.cc
 +++ b/components/omnibox/common/omnibox_features.cc
-@@ -301,7 +301,7 @@ const base::Feature kSiteSearchStarterPack{"OmniboxSiteSearchStarterPack",
+@@ -291,7 +291,7 @@ const base::Feature kSiteSearchStarterPack{"OmniboxSiteSearchStarterPack",
  // Experiment to introduce new security indicators for HTTPS.
  // Experiment to introduce new security indicators for HTTPS.
  const base::Feature kUpdatedConnectionSecurityIndicators{
  const base::Feature kUpdatedConnectionSecurityIndicators{
      "OmniboxUpdatedConnectionSecurityIndicators",
      "OmniboxUpdatedConnectionSecurityIndicators",

+ 5 - 5
build/patches/Disable-minidump-upload-scheduling.patch

@@ -4,14 +4,14 @@ Subject: Disable minidump upload scheduling
 
 
 License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 ---
 ---
- chrome/browser/endpoint_fetcher/endpoint_fetcher.cc          | 2 +-
+ components/endpoint_fetcher/endpoint_fetcher.cc              | 2 +-
  .../minidump_uploader/MinidumpUploadJobService.java          | 5 ++++-
  .../minidump_uploader/MinidumpUploadJobService.java          | 5 ++++-
  2 files changed, 5 insertions(+), 2 deletions(-)
  2 files changed, 5 insertions(+), 2 deletions(-)
 
 
-diff --git a/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc b/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc
---- a/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc
-+++ b/chrome/browser/endpoint_fetcher/endpoint_fetcher.cc
-@@ -337,7 +337,7 @@ void EndpointFetcher::OnResponseFetched(
+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
+@@ -319,7 +319,7 @@ void EndpointFetcher::OnResponseFetched(
      auto response = std::make_unique<EndpointResponse>();
      auto response = std::make_unique<EndpointResponse>();
      // TODO(crbug.com/993393) Add more detailed error messaging
      // TODO(crbug.com/993393) Add more detailed error messaging
      std::string net_error = net::ErrorToString(simple_url_loader_->NetError());
      std::string net_error = net::ErrorToString(simple_url_loader_->NetError());

+ 1 - 1
build/patches/Disable-plugins-enumeration.patch

@@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
 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
 --- a/third_party/blink/renderer/core/frame/local_frame.cc
 +++ b/third_party/blink/renderer/core/frame/local_frame.cc
 +++ b/third_party/blink/renderer/core/frame/local_frame.cc
-@@ -1914,9 +1914,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() {
+@@ -1932,9 +1932,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() {
  }
  }
  
  
  PluginData* LocalFrame::GetPluginData() const {
  PluginData* LocalFrame::GetPluginData() const {

+ 132 - 119
build/patches/Disable-safe-browsing.patch

@@ -22,7 +22,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
  chrome/browser/browser_process_impl.cc        | 29 -------
  chrome/browser/browser_process_impl.cc        | 29 -------
  chrome/browser/browser_process_impl.h         |  4 -
  chrome/browser/browser_process_impl.h         |  4 -
  .../chrome_browsing_data_remover_delegate.cc  |  2 +
  .../chrome_browsing_data_remover_delegate.cc  |  2 +
- .../browser/chrome_content_browser_client.cc  | 35 ++++----
+ .../browser/chrome_content_browser_client.cc  | 32 ++++----
  .../browser/chrome_content_browser_client.h   |  2 +
  .../browser/chrome_content_browser_client.h   |  2 +
  ...ontent_browser_client_receiver_bindings.cc |  2 +
  ...ontent_browser_client_receiver_bindings.cc |  2 +
  .../file_type_policies_component_installer.cc | 16 +---
  .../file_type_policies_component_installer.cc | 16 +---
@@ -47,7 +47,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
  .../lookalike_url_controller_client.cc        |  4 -
  .../lookalike_url_controller_client.cc        |  4 -
  .../metrics/chrome_metrics_service_client.cc  |  3 -
  .../metrics/chrome_metrics_service_client.cc  |  3 -
  ...ial_comparison_cert_verifier_controller.cc |  3 -
  ...ial_comparison_cert_verifier_controller.cc |  3 -
- .../chrome_password_manager_client.cc         | 25 +-----
+ .../chrome_password_manager_client.cc         | 29 ++-----
  ...ve_origin_permission_revocation_request.cc |  2 +
  ...ve_origin_permission_revocation_request.cc |  2 +
  .../permissions/chrome_permissions_client.cc  | 14 ----
  .../permissions/chrome_permissions_client.cc  | 14 ----
  .../permissions/chrome_permissions_client.h   |  3 -
  .../permissions/chrome_permissions_client.h   |  3 -
@@ -73,7 +73,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
  chrome/renderer/BUILD.gn                      |  5 --
  chrome/renderer/BUILD.gn                      |  5 --
  .../chrome_content_renderer_client.cc         |  6 +-
  .../chrome_content_renderer_client.cc         |  6 +-
  .../renderer/chrome_content_renderer_client.h |  3 -
  .../renderer/chrome_content_renderer_client.h |  3 -
- chrome/test/BUILD.gn                          |  2 -
+ chrome/test/BUILD.gn                          |  3 -
  components/BUILD.gn                           |  1 -
  components/BUILD.gn                           |  1 -
  .../save_password_leak_detection_delegate.cc  | 14 ----
  .../save_password_leak_detection_delegate.cc  | 14 ----
  .../installer_policies/BUILD.gn               |  2 -
  .../installer_policies/BUILD.gn               |  2 -
@@ -91,7 +91,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
  .../file_system_access_permission_context.h   |  6 --
  .../file_system_access_permission_context.h   |  6 --
  weblayer/BUILD.gn                             |  4 -
  weblayer/BUILD.gn                             |  4 -
  weblayer/test/BUILD.gn                        |  1 -
  weblayer/test/BUILD.gn                        |  1 -
- 82 files changed, 188 insertions(+), 705 deletions(-)
+ 82 files changed, 187 insertions(+), 708 deletions(-)
 
 
 diff --git a/chrome/android/java/res/xml/google_services_preferences.xml b/chrome/android/java/res/xml/google_services_preferences.xml
 diff --git a/chrome/android/java/res/xml/google_services_preferences.xml b/chrome/android/java/res/xml/google_services_preferences.xml
 --- a/chrome/android/java/res/xml/google_services_preferences.xml
 --- a/chrome/android/java/res/xml/google_services_preferences.xml
@@ -271,10 +271,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/usage_stats/Usa
 diff --git a/chrome/app/android/chrome_main_delegate_android.cc b/chrome/app/android/chrome_main_delegate_android.cc
 diff --git a/chrome/app/android/chrome_main_delegate_android.cc b/chrome/app/android/chrome_main_delegate_android.cc
 --- a/chrome/app/android/chrome_main_delegate_android.cc
 --- a/chrome/app/android/chrome_main_delegate_android.cc
 +++ b/chrome/app/android/chrome_main_delegate_android.cc
 +++ b/chrome/app/android/chrome_main_delegate_android.cc
-@@ -8,6 +8,7 @@
- 
+@@ -9,6 +9,7 @@
  #include "base/android/jni_android.h"
  #include "base/android/jni_android.h"
  #include "base/base_paths_android.h"
  #include "base/base_paths_android.h"
+ #include "base/feature_list.h"
 +#include "base/feature_list.h"
 +#include "base/feature_list.h"
  #include "base/files/file_path.h"
  #include "base/files/file_path.h"
  #include "base/files/file_util.h"
  #include "base/files/file_util.h"
@@ -282,7 +282,7 @@ diff --git a/chrome/app/android/chrome_main_delegate_android.cc b/chrome/app/and
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
 --- a/chrome/browser/BUILD.gn
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -317,8 +317,6 @@ static_library("browser") {
+@@ -321,8 +321,6 @@ static_library("browser") {
      "complex_tasks/task_tab_helper.h",
      "complex_tasks/task_tab_helper.h",
      "component_updater/autofill_regex_remover.cc",
      "component_updater/autofill_regex_remover.cc",
      "component_updater/autofill_regex_remover.h",
      "component_updater/autofill_regex_remover.h",
@@ -291,7 +291,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
      "component_updater/chrome_component_updater_configurator.cc",
      "component_updater/chrome_component_updater_configurator.cc",
      "component_updater/chrome_component_updater_configurator.h",
      "component_updater/chrome_component_updater_configurator.h",
      "component_updater/chrome_origin_trials_component_installer.cc",
      "component_updater/chrome_origin_trials_component_installer.cc",
-@@ -329,8 +327,6 @@ static_library("browser") {
+@@ -335,8 +333,6 @@ static_library("browser") {
      "component_updater/component_updater_utils.h",
      "component_updater/component_updater_utils.h",
      "component_updater/crl_set_component_installer.cc",
      "component_updater/crl_set_component_installer.cc",
      "component_updater/crl_set_component_installer.h",
      "component_updater/crl_set_component_installer.h",
@@ -300,7 +300,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
      "component_updater/first_party_sets_component_installer.cc",
      "component_updater/first_party_sets_component_installer.cc",
      "component_updater/first_party_sets_component_installer.h",
      "component_updater/first_party_sets_component_installer.h",
      "component_updater/mei_preload_component_installer.cc",
      "component_updater/mei_preload_component_installer.cc",
-@@ -1109,8 +1105,6 @@ static_library("browser") {
+@@ -1106,8 +1102,6 @@ static_library("browser") {
      "permissions/adaptive_quiet_notification_permission_ui_enabler.h",
      "permissions/adaptive_quiet_notification_permission_ui_enabler.h",
      "permissions/chrome_permissions_client.cc",
      "permissions/chrome_permissions_client.cc",
      "permissions/chrome_permissions_client.h",
      "permissions/chrome_permissions_client.h",
@@ -309,7 +309,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
      "permissions/crowd_deny_preload_data.cc",
      "permissions/crowd_deny_preload_data.cc",
      "permissions/crowd_deny_preload_data.h",
      "permissions/crowd_deny_preload_data.h",
      "permissions/crowd_deny_safe_browsing_request.cc",
      "permissions/crowd_deny_safe_browsing_request.cc",
-@@ -1474,15 +1468,6 @@ static_library("browser") {
+@@ -1473,15 +1467,6 @@ static_library("browser") {
      "renderer_host/chrome_navigation_ui_data.h",
      "renderer_host/chrome_navigation_ui_data.h",
      "renderer_preferences_util.cc",
      "renderer_preferences_util.cc",
      "renderer_preferences_util.h",
      "renderer_preferences_util.h",
@@ -325,7 +325,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
      "resource_coordinator/resource_coordinator_parts.cc",
      "resource_coordinator/resource_coordinator_parts.cc",
      "resource_coordinator/resource_coordinator_parts.h",
      "resource_coordinator/resource_coordinator_parts.h",
      "resource_coordinator/session_restore_policy.cc",
      "resource_coordinator/session_restore_policy.cc",
-@@ -2230,11 +2215,8 @@ static_library("browser") {
+@@ -2223,11 +2208,8 @@ static_library("browser") {
      "//components/reporting/util:status_macros",
      "//components/reporting/util:status_macros",
      "//components/reporting/util:status_proto",
      "//components/reporting/util:status_proto",
      "//components/reporting/util:task_runner_context",
      "//components/reporting/util:task_runner_context",
@@ -337,7 +337,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
      "//components/safe_browsing/content/browser:safe_browsing_service",
      "//components/safe_browsing/content/browser:safe_browsing_service",
      "//components/safe_browsing/content/browser/password_protection",
      "//components/safe_browsing/content/browser/password_protection",
      "//components/safe_browsing/content/browser/web_ui",
      "//components/safe_browsing/content/browser/web_ui",
-@@ -3317,12 +3299,6 @@ static_library("browser") {
+@@ -3176,12 +3158,6 @@ static_library("browser") {
        "profiles/profile_manager_android.cc",
        "profiles/profile_manager_android.cc",
        "profiles/profile_manager_android.h",
        "profiles/profile_manager_android.h",
        "query_tiles/android/tile_provider_factory.cc",
        "query_tiles/android/tile_provider_factory.cc",
@@ -345,12 +345,12 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
 -      "reputation/safety_tip_infobar.h",
 -      "reputation/safety_tip_infobar.h",
 -      "reputation/safety_tip_infobar_delegate.cc",
 -      "reputation/safety_tip_infobar_delegate.cc",
 -      "reputation/safety_tip_infobar_delegate.h",
 -      "reputation/safety_tip_infobar_delegate.h",
--      "reputation/safety_tip_message_delegate.cc",
--      "reputation/safety_tip_message_delegate.h",
+-      "reputation/safety_tip_message_delegate_android.cc",
+-      "reputation/safety_tip_message_delegate_android.h",
        "safe_browsing/android/password_reuse_controller_android.cc",
        "safe_browsing/android/password_reuse_controller_android.cc",
        "safe_browsing/android/password_reuse_controller_android.h",
        "safe_browsing/android/password_reuse_controller_android.h",
        "safe_browsing/android/safe_browsing_referring_app_bridge_android.cc",
        "safe_browsing/android/safe_browsing_referring_app_bridge_android.cc",
-@@ -3790,8 +3766,6 @@ static_library("browser") {
+@@ -3647,8 +3623,6 @@ static_library("browser") {
        "download/download_commands.h",
        "download/download_commands.h",
        "download/download_crx_util.cc",
        "download/download_crx_util.cc",
        "download/download_crx_util.h",
        "download/download_crx_util.h",
@@ -359,7 +359,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
        "download/download_dir_policy_handler.cc",
        "download/download_dir_policy_handler.cc",
        "download/download_dir_policy_handler.h",
        "download/download_dir_policy_handler.h",
        "download/download_dir_util.cc",
        "download/download_dir_util.cc",
-@@ -7865,8 +7839,6 @@ static_library("test_support") {
+@@ -7920,8 +7894,6 @@ static_library("test_support") {
      "//components/reporting/util:status_macros",
      "//components/reporting/util:status_macros",
      "//components/reporting/util:status_proto",
      "//components/reporting/util:status_proto",
      "//components/reporting/util:task_runner_context",
      "//components/reporting/util:task_runner_context",
@@ -459,7 +459,7 @@ diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_pro
  #include "components/sessions/core/session_id_generator.h"
  #include "components/sessions/core/session_id_generator.h"
  #include "components/subresource_filter/content/browser/ruleset_service.h"
  #include "components/subresource_filter/content/browser/ruleset_service.h"
  #include "components/translate/core/browser/translate_download_manager.h"
  #include "components/translate/core/browser/translate_download_manager.h"
-@@ -393,8 +391,6 @@ void BrowserProcessImpl::StartTearDown() {
+@@ -406,8 +404,6 @@ void BrowserProcessImpl::StartTearDown() {
  
  
    metrics_services_manager_.reset();
    metrics_services_manager_.reset();
    intranet_redirect_detector_.reset();
    intranet_redirect_detector_.reset();
@@ -468,7 +468,7 @@ diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_pro
    network_time_tracker_.reset();
    network_time_tracker_.reset();
  
  
  #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
  #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
-@@ -1025,14 +1021,6 @@ StatusTray* BrowserProcessImpl::status_tray() {
+@@ -1038,14 +1034,6 @@ StatusTray* BrowserProcessImpl::status_tray() {
    return status_tray_.get();
    return status_tray_.get();
  }
  }
  
  
@@ -483,7 +483,7 @@ diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_pro
  subresource_filter::RulesetService*
  subresource_filter::RulesetService*
  BrowserProcessImpl::subresource_filter_ruleset_service() {
  BrowserProcessImpl::subresource_filter_ruleset_service() {
    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-@@ -1274,23 +1262,6 @@ void BrowserProcessImpl::CreateBackgroundPrintingManager() {
+@@ -1287,23 +1275,6 @@ void BrowserProcessImpl::CreateBackgroundPrintingManager() {
  }
  }
  
  
  void BrowserProcessImpl::CreateSafeBrowsingService() {
  void BrowserProcessImpl::CreateSafeBrowsingService() {
@@ -531,7 +531,7 @@ diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_proc
 diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
 diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
 --- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
 --- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
 +++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
 +++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
-@@ -617,10 +617,12 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
+@@ -625,10 +625,12 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
      base::RecordAction(UserMetricsAction("ClearBrowsingData_Cookies"));
      base::RecordAction(UserMetricsAction("ClearBrowsingData_Cookies"));
  
  
      network::mojom::NetworkContext* safe_browsing_context = nullptr;
      network::mojom::NetworkContext* safe_browsing_context = nullptr;
@@ -547,7 +547,7 @@ diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.
 diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
 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
 --- a/chrome/browser/chrome_content_browser_client.cc
 +++ b/chrome/browser/chrome_content_browser_client.cc
 +++ b/chrome/browser/chrome_content_browser_client.cc
-@@ -104,6 +104,7 @@
+@@ -105,6 +105,7 @@
  #include "chrome/browser/profiling_host/chrome_browser_main_extra_parts_profiling.h"
  #include "chrome/browser/profiling_host/chrome_browser_main_extra_parts_profiling.h"
  #include "chrome/browser/renderer_host/chrome_navigation_ui_data.h"
  #include "chrome/browser/renderer_host/chrome_navigation_ui_data.h"
  #include "chrome/browser/renderer_preferences_util.h"
  #include "chrome/browser/renderer_preferences_util.h"
@@ -555,7 +555,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
  #include "chrome/browser/safe_browsing/certificate_reporting_service.h"
  #include "chrome/browser/safe_browsing/certificate_reporting_service.h"
  #include "chrome/browser/safe_browsing/certificate_reporting_service_factory.h"
  #include "chrome/browser/safe_browsing/certificate_reporting_service_factory.h"
  #include "chrome/browser/safe_browsing/cloud_content_scanning/deep_scanning_utils.h"
  #include "chrome/browser/safe_browsing/cloud_content_scanning/deep_scanning_utils.h"
-@@ -111,6 +112,7 @@
+@@ -112,6 +113,7 @@
  #include "chrome/browser/safe_browsing/safe_browsing_service.h"
  #include "chrome/browser/safe_browsing/safe_browsing_service.h"
  #include "chrome/browser/safe_browsing/url_checker_delegate_impl.h"
  #include "chrome/browser/safe_browsing/url_checker_delegate_impl.h"
  #include "chrome/browser/safe_browsing/url_lookup_service_factory.h"
  #include "chrome/browser/safe_browsing/url_lookup_service_factory.h"
@@ -563,7 +563,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
  #include "chrome/browser/search/search.h"
  #include "chrome/browser/search/search.h"
  #include "chrome/browser/segmentation_platform/chrome_browser_main_extra_parts_segmentation_platform.h"
  #include "chrome/browser/segmentation_platform/chrome_browser_main_extra_parts_segmentation_platform.h"
  #include "chrome/browser/sharing/sms/sms_remote_fetcher.h"
  #include "chrome/browser/sharing/sms/sms_remote_fetcher.h"
-@@ -969,9 +971,7 @@ void SetApplicationLocaleOnIOThread(const std::string& locale) {
+@@ -975,9 +977,7 @@ void SetApplicationLocaleOnIOThread(const std::string& locale) {
  class CertificateReportingServiceCertReporter : public SSLCertReporter {
  class CertificateReportingServiceCertReporter : public SSLCertReporter {
   public:
   public:
    explicit CertificateReportingServiceCertReporter(
    explicit CertificateReportingServiceCertReporter(
@@ -574,7 +574,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
  
  
    CertificateReportingServiceCertReporter(
    CertificateReportingServiceCertReporter(
        const CertificateReportingServiceCertReporter&) = delete;
        const CertificateReportingServiceCertReporter&) = delete;
-@@ -983,11 +983,9 @@ class CertificateReportingServiceCertReporter : public SSLCertReporter {
+@@ -989,11 +989,9 @@ class CertificateReportingServiceCertReporter : public SSLCertReporter {
    // SSLCertReporter implementation
    // SSLCertReporter implementation
    void ReportInvalidCertificateChain(
    void ReportInvalidCertificateChain(
        const std::string& serialized_report) override {
        const std::string& serialized_report) override {
@@ -586,7 +586,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
  };
  };
  
  
  #if BUILDFLAG(ENABLE_EXTENSIONS)
  #if BUILDFLAG(ENABLE_EXTENSIONS)
-@@ -1239,14 +1237,6 @@ void MaybeAddThrottle(
+@@ -1245,14 +1243,6 @@ void MaybeAddThrottle(
      throttles->push_back(std::move(maybe_throttle));
      throttles->push_back(std::move(maybe_throttle));
  }
  }
  
  
@@ -601,7 +601,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
  void MaybeAddThrottles(
  void MaybeAddThrottles(
      std::vector<std::unique_ptr<content::NavigationThrottle>> additional,
      std::vector<std::unique_ptr<content::NavigationThrottle>> additional,
      std::vector<std::unique_ptr<content::NavigationThrottle>>* combined) {
      std::vector<std::unique_ptr<content::NavigationThrottle>>* combined) {
-@@ -1499,7 +1489,9 @@ void ChromeContentBrowserClient::PostAfterStartupTask(
+@@ -1511,7 +1501,9 @@ void ChromeContentBrowserClient::PostAfterStartupTask(
    InitNetworkContextsParentDirectory();
    InitNetworkContextsParentDirectory();
  
  
    DCHECK_CURRENTLY_ON(BrowserThread::UI);
    DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -611,7 +611,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
  }
  }
  
  
  bool ChromeContentBrowserClient::IsBrowserStartupComplete() {
  bool ChromeContentBrowserClient::IsBrowserStartupComplete() {
-@@ -2229,7 +2221,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
+@@ -2241,7 +2233,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
    }
    }
  #elif BUILDFLAG(IS_POSIX)
  #elif BUILDFLAG(IS_POSIX)
  #if BUILDFLAG(IS_ANDROID)
  #if BUILDFLAG(IS_ANDROID)
@@ -620,17 +620,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
  #else
  #else
    bool enable_crash_reporter = false;
    bool enable_crash_reporter = false;
    if (crash_reporter::IsCrashpadEnabled()) {
    if (crash_reporter::IsCrashpadEnabled()) {
-@@ -2360,6 +2352,9 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
-         command_line->AppendSwitch(
-             switches::kSharedArrayBufferUnrestrictedAccessAllowed);
-       }
-+#else
-+      command_line->AppendSwitch(
-+          switches::kDisableClientSidePhishingDetection);
- #endif
-       if (!prefs->GetBoolean(prefs::kSandboxExternalProtocolBlocked))
-         command_line->AppendSwitch(kDisableSandboxExternalProtocolSwitch);
-@@ -4393,6 +4388,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
+@@ -4420,6 +4412,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
                     &throttles);
                     &throttles);
  #endif
  #endif
  
  
@@ -638,7 +628,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
    // g_browser_process->safe_browsing_service() may be null in unittests.
    // g_browser_process->safe_browsing_service() may be null in unittests.
    safe_browsing::SafeBrowsingUIManager* ui_manager =
    safe_browsing::SafeBrowsingUIManager* ui_manager =
        g_browser_process->safe_browsing_service()
        g_browser_process->safe_browsing_service()
-@@ -4408,6 +4404,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
+@@ -4435,6 +4428,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
          std::make_unique<safe_browsing::DelayedWarningNavigationThrottle>(
          std::make_unique<safe_browsing::DelayedWarningNavigationThrottle>(
              handle));
              handle));
    }
    }
@@ -646,7 +636,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
  
  
  // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
  // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
  // of lacros-chrome is complete.
  // of lacros-chrome is complete.
-@@ -5804,6 +5801,7 @@ ChromeContentBrowserClient::GetSafeBrowsingUrlCheckerDelegate(
+@@ -5827,6 +5821,7 @@ ChromeContentBrowserClient::GetSafeBrowsingUrlCheckerDelegate(
      const std::vector<std::string>& allowlist_domains) {
      const std::vector<std::string>& allowlist_domains) {
    DCHECK_CURRENTLY_ON(BrowserThread::IO);
    DCHECK_CURRENTLY_ON(BrowserThread::IO);
  
  
@@ -654,7 +644,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
    // Should not bypass safe browsing check if the check is for enterprise
    // Should not bypass safe browsing check if the check is for enterprise
    // lookup.
    // lookup.
    if (!safe_browsing_enabled_for_profile && !should_check_on_sb_disabled)
    if (!safe_browsing_enabled_for_profile && !should_check_on_sb_disabled)
-@@ -5824,6 +5822,9 @@ ChromeContentBrowserClient::GetSafeBrowsingUrlCheckerDelegate(
+@@ -5847,6 +5842,9 @@ ChromeContentBrowserClient::GetSafeBrowsingUrlCheckerDelegate(
    }
    }
  
  
    return safe_browsing_url_checker_delegate_;
    return safe_browsing_url_checker_delegate_;
@@ -664,7 +654,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
  }
  }
  
  
  safe_browsing::RealTimeUrlLookupServiceBase*
  safe_browsing::RealTimeUrlLookupServiceBase*
-@@ -5831,24 +5832,28 @@ ChromeContentBrowserClient::GetUrlLookupService(
+@@ -5854,24 +5852,28 @@ ChromeContentBrowserClient::GetUrlLookupService(
      content::BrowserContext* browser_context,
      content::BrowserContext* browser_context,
      bool is_enterprise_lookup_enabled,
      bool is_enterprise_lookup_enabled,
      bool is_consumer_lookup_enabled) {
      bool is_consumer_lookup_enabled) {
@@ -697,7 +687,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
 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
 --- a/chrome/browser/chrome_content_browser_client.h
 +++ b/chrome/browser/chrome_content_browser_client.h
 +++ b/chrome/browser/chrome_content_browser_client.h
-@@ -887,9 +887,11 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
+@@ -890,9 +890,11 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
    // Parts are deleted in the reverse order they are added.
    // Parts are deleted in the reverse order they are added.
    std::vector<ChromeContentBrowserClientParts*> extra_parts_;
    std::vector<ChromeContentBrowserClientParts*> extra_parts_;
  
  
@@ -771,16 +761,16 @@ diff --git a/chrome/browser/component_updater/registration.cc b/chrome/browser/c
  #include "chrome/browser/component_updater/autofill_regex_remover.h"
  #include "chrome/browser/component_updater/autofill_regex_remover.h"
 -#include "chrome/browser/component_updater/chrome_client_side_phishing_component_installer.h"
 -#include "chrome/browser/component_updater/chrome_client_side_phishing_component_installer.h"
  #include "chrome/browser/component_updater/chrome_origin_trials_component_installer.h"
  #include "chrome/browser/component_updater/chrome_origin_trials_component_installer.h"
+ #include "chrome/browser/component_updater/commerce_heuristics_component_installer.h"
  #include "chrome/browser/component_updater/crl_set_component_installer.h"
  #include "chrome/browser/component_updater/crl_set_component_installer.h"
- #include "chrome/browser/component_updater/crowd_deny_component_installer.h"
 @@ -36,7 +35,6 @@
 @@ -36,7 +35,6 @@
  #include "components/component_updater/installer_policies/autofill_states_component_installer.h"
  #include "components/component_updater/installer_policies/autofill_states_component_installer.h"
  #include "components/component_updater/installer_policies/on_device_head_suggest_component_installer.h"
  #include "components/component_updater/installer_policies/on_device_head_suggest_component_installer.h"
  #include "components/component_updater/installer_policies/optimization_hints_component_installer.h"
  #include "components/component_updater/installer_policies/optimization_hints_component_installer.h"
 -#include "components/component_updater/installer_policies/safety_tips_component_installer.h"
 -#include "components/component_updater/installer_policies/safety_tips_component_installer.h"
+ #include "components/component_updater/installer_policies/url_param_classification_component_installer.h"
  #include "components/nacl/common/buildflags.h"
  #include "components/nacl/common/buildflags.h"
  #include "components/services/screen_ai/buildflags/buildflags.h"
  #include "components/services/screen_ai/buildflags/buildflags.h"
- #include "device/vr/buildflags/buildflags.h"
 @@ -192,9 +190,6 @@ void RegisterComponentsForUpdate() {
 @@ -192,9 +190,6 @@ void RegisterComponentsForUpdate() {
  
  
    MaybeRegisterPKIMetadataComponent(cus);
    MaybeRegisterPKIMetadataComponent(cus);
@@ -791,7 +781,7 @@ diff --git a/chrome/browser/component_updater/registration.cc b/chrome/browser/c
  #if BUILDFLAG(IS_CHROMEOS_ASH)
  #if BUILDFLAG(IS_CHROMEOS_ASH)
    RegisterSmartDimComponent(cus);
    RegisterSmartDimComponent(cus);
    RegisterAppProvisioningComponent(cus);
    RegisterAppProvisioningComponent(cus);
-@@ -216,8 +211,6 @@ void RegisterComponentsForUpdate() {
+@@ -215,8 +210,6 @@ void RegisterComponentsForUpdate() {
  
  
    RegisterAutofillStatesComponent(cus, g_browser_process->local_state());
    RegisterAutofillStatesComponent(cus, g_browser_process->local_state());
  
  
@@ -1022,16 +1012,16 @@ diff --git a/chrome/browser/download/download_item_model.cc b/chrome/browser/dow
 --- a/chrome/browser/download/download_item_model.cc
 --- a/chrome/browser/download/download_item_model.cc
 +++ b/chrome/browser/download/download_item_model.cc
 +++ b/chrome/browser/download/download_item_model.cc
 @@ -33,7 +33,9 @@
 @@ -33,7 +33,9 @@
+ #include "chrome/browser/enterprise/connectors/connectors_manager.h"
  #include "chrome/browser/profiles/profile.h"
  #include "chrome/browser/profiles/profile.h"
- #include "chrome/browser/safe_browsing/chrome_user_population_helper.h"
  #include "chrome/browser/safe_browsing/download_protection/deep_scanning_request.h"
  #include "chrome/browser/safe_browsing/download_protection/deep_scanning_request.h"
 +#if BUILDFLAG(FULL_SAFE_BROWSING)
 +#if BUILDFLAG(FULL_SAFE_BROWSING)
  #include "chrome/browser/safe_browsing/download_protection/download_feedback_service.h"
  #include "chrome/browser/safe_browsing/download_protection/download_feedback_service.h"
 +#endif
 +#endif
+ #include "chrome/browser/safe_browsing/download_protection/download_protection_util.h"
  #include "chrome/browser/safe_browsing/safe_browsing_service.h"
  #include "chrome/browser/safe_browsing/safe_browsing_service.h"
  #include "chrome/grit/chromium_strings.h"
  #include "chrome/grit/chromium_strings.h"
- #include "chrome/grit/generated_resources.h"
-@@ -42,8 +44,10 @@
+@@ -43,8 +45,10 @@
  #include "components/download/public/common/download_item.h"
  #include "components/download/public/common/download_item.h"
  #include "components/safe_browsing/buildflags.h"
  #include "components/safe_browsing/buildflags.h"
  #include "components/safe_browsing/content/browser/web_ui/safe_browsing_ui.h"
  #include "components/safe_browsing/content/browser/web_ui/safe_browsing_ui.h"
@@ -1042,17 +1032,17 @@ diff --git a/chrome/browser/download/download_item_model.cc b/chrome/browser/dow
  #include "content/public/browser/browser_task_traits.h"
  #include "content/public/browser/browser_task_traits.h"
  #include "content/public/browser/browser_thread.h"
  #include "content/public/browser/browser_thread.h"
  #include "content/public/browser/download_item_utils.h"
  #include "content/public/browser/download_item_utils.h"
-@@ -57,7 +61,9 @@
+@@ -58,7 +62,9 @@
  
  
  using download::DownloadItem;
  using download::DownloadItem;
  using MixedContentStatus = download::DownloadItem::MixedContentStatus;
  using MixedContentStatus = download::DownloadItem::MixedContentStatus;
 +#if defined(FULL_SAFE_BROWSING)
 +#if defined(FULL_SAFE_BROWSING)
  using safe_browsing::DownloadFileType;
  using safe_browsing::DownloadFileType;
 +#endif
 +#endif
+ using ReportThreatDetailsResult =
+     safe_browsing::PingManager::ReportThreatDetailsResult;
  
  
- namespace {
- 
-@@ -87,9 +93,11 @@ class DownloadItemModelData : public base::SupportsUserData::Data {
+@@ -90,9 +96,11 @@ class DownloadItemModelData : public base::SupportsUserData::Data {
    // for the file type.
    // for the file type.
    bool should_prefer_opening_in_browser_;
    bool should_prefer_opening_in_browser_;
  
  
@@ -1064,7 +1054,7 @@ diff --git a/chrome/browser/download/download_item_model.cc b/chrome/browser/dow
  
  
    // Whether the download is currently being revived.
    // Whether the download is currently being revived.
    bool is_being_revived_;
    bool is_being_revived_;
-@@ -126,7 +134,9 @@ DownloadItemModelData::DownloadItemModelData()
+@@ -129,7 +137,9 @@ DownloadItemModelData::DownloadItemModelData()
      : should_show_in_shelf_(true),
      : should_show_in_shelf_(true),
        was_ui_notified_(false),
        was_ui_notified_(false),
        should_prefer_opening_in_browser_(false),
        should_prefer_opening_in_browser_(false),
@@ -1073,8 +1063,8 @@ diff --git a/chrome/browser/download/download_item_model.cc b/chrome/browser/dow
 +#endif
 +#endif
        is_being_revived_(false) {}
        is_being_revived_(false) {}
  
  
- }  // namespace
-@@ -410,6 +420,7 @@ void DownloadItemModel::SetShouldPreferOpeningInBrowser(bool preference) {
+ #if BUILDFLAG(FULL_SAFE_BROWSING)
+@@ -429,6 +439,7 @@ void DownloadItemModel::SetShouldPreferOpeningInBrowser(bool preference) {
    data->should_prefer_opening_in_browser_ = preference;
    data->should_prefer_opening_in_browser_ = preference;
  }
  }
  
  
@@ -1082,7 +1072,7 @@ diff --git a/chrome/browser/download/download_item_model.cc b/chrome/browser/dow
  DownloadFileType::DangerLevel DownloadItemModel::GetDangerLevel() const {
  DownloadFileType::DangerLevel DownloadItemModel::GetDangerLevel() const {
    const DownloadItemModelData* data = DownloadItemModelData::Get(download_);
    const DownloadItemModelData* data = DownloadItemModelData::Get(download_);
    return data ? data->danger_level_ : DownloadFileType::NOT_DANGEROUS;
    return data ? data->danger_level_ : DownloadFileType::NOT_DANGEROUS;
-@@ -420,6 +431,7 @@ void DownloadItemModel::SetDangerLevel(
+@@ -439,6 +450,7 @@ void DownloadItemModel::SetDangerLevel(
    DownloadItemModelData* data = DownloadItemModelData::GetOrCreate(download_);
    DownloadItemModelData* data = DownloadItemModelData::GetOrCreate(download_);
    data->danger_level_ = danger_level;
    data->danger_level_ = danger_level;
  }
  }
@@ -1090,7 +1080,7 @@ diff --git a/chrome/browser/download/download_item_model.cc b/chrome/browser/dow
  
  
  download::DownloadItem::MixedContentStatus
  download::DownloadItem::MixedContentStatus
  DownloadItemModel::GetMixedContentStatus() const {
  DownloadItemModel::GetMixedContentStatus() const {
-@@ -636,9 +648,6 @@ bool DownloadItemModel::IsCommandEnabled(
+@@ -655,9 +667,6 @@ bool DownloadItemModel::IsCommandEnabled(
        // filename. Don't base an "Always open" decision based on it. Also
        // filename. Don't base an "Always open" decision based on it. Also
        // exclude extensions.
        // exclude extensions.
        return download_->CanOpenDownload() &&
        return download_->CanOpenDownload() &&
@@ -1265,7 +1255,7 @@ diff --git a/chrome/browser/download/download_target_determiner.cc b/chrome/brow
  
  
    // If no mime type or explicitly specified a name, don't replace file
    // If no mime type or explicitly specified a name, don't replace file
    // extension.
    // extension.
-@@ -845,6 +855,7 @@ DownloadTargetDeterminer::Result
+@@ -846,6 +856,7 @@ DownloadTargetDeterminer::Result
      return CONTINUE;
      return CONTINUE;
    }
    }
  
  
@@ -1273,7 +1263,7 @@ diff --git a/chrome/browser/download/download_target_determiner.cc b/chrome/brow
    // First determine the danger level assuming that the user doesn't have any
    // First determine the danger level assuming that the user doesn't have any
    // prior visits to the referrer recoreded in history. The resulting danger
    // prior visits to the referrer recoreded in history. The resulting danger
    // level would be ALLOW_ON_USER_GESTURE if the level depends on the visit
    // level would be ALLOW_ON_USER_GESTURE if the level depends on the visit
-@@ -881,6 +892,7 @@ DownloadTargetDeterminer::Result
+@@ -882,6 +893,7 @@ DownloadTargetDeterminer::Result
    // invalid, then assume the referrer has not been visited before.
    // invalid, then assume the referrer has not been visited before.
    if (danger_type_ == download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS)
    if (danger_type_ == download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS)
      danger_type_ = download::DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE;
      danger_type_ = download::DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE;
@@ -1281,7 +1271,7 @@ diff --git a/chrome/browser/download/download_target_determiner.cc b/chrome/brow
    return CONTINUE;
    return CONTINUE;
  }
  }
  
  
-@@ -888,6 +900,7 @@ void DownloadTargetDeterminer::CheckVisitedReferrerBeforeDone(
+@@ -889,6 +901,7 @@ void DownloadTargetDeterminer::CheckVisitedReferrerBeforeDone(
      bool visited_referrer_before) {
      bool visited_referrer_before) {
    DCHECK_CURRENTLY_ON(BrowserThread::UI);
    DCHECK_CURRENTLY_ON(BrowserThread::UI);
    DCHECK_EQ(STATE_DETERMINE_INTERMEDIATE_PATH, next_state_);
    DCHECK_EQ(STATE_DETERMINE_INTERMEDIATE_PATH, next_state_);
@@ -1289,7 +1279,7 @@ diff --git a/chrome/browser/download/download_target_determiner.cc b/chrome/brow
    safe_browsing::RecordDownloadFileTypeAttributes(
    safe_browsing::RecordDownloadFileTypeAttributes(
        safe_browsing::FileTypePolicies::GetInstance()->GetFileDangerLevel(
        safe_browsing::FileTypePolicies::GetInstance()->GetFileDangerLevel(
            virtual_path_.BaseName(), download_->GetURL(),
            virtual_path_.BaseName(), download_->GetURL(),
-@@ -899,6 +912,7 @@ void DownloadTargetDeterminer::CheckVisitedReferrerBeforeDone(
+@@ -900,6 +913,7 @@ void DownloadTargetDeterminer::CheckVisitedReferrerBeforeDone(
    if (danger_level_ != DownloadFileType::NOT_DANGEROUS &&
    if (danger_level_ != DownloadFileType::NOT_DANGEROUS &&
        danger_type_ == download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS)
        danger_type_ == download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS)
      danger_type_ = download::DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE;
      danger_type_ = download::DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE;
@@ -1297,7 +1287,7 @@ diff --git a/chrome/browser/download/download_target_determiner.cc b/chrome/brow
    DoLoop();
    DoLoop();
  }
  }
  
  
-@@ -997,7 +1011,9 @@ void DownloadTargetDeterminer::ScheduleCallbackAndDeleteSelf(
+@@ -998,7 +1012,9 @@ void DownloadTargetDeterminer::ScheduleCallbackAndDeleteSelf(
              << " Intermediate:" << intermediate_path_.AsUTF8Unsafe()
              << " Intermediate:" << intermediate_path_.AsUTF8Unsafe()
              << " Confirmation reason:" << static_cast<int>(confirmation_reason_)
              << " Confirmation reason:" << static_cast<int>(confirmation_reason_)
              << " Danger type:" << danger_type_
              << " Danger type:" << danger_type_
@@ -1307,7 +1297,7 @@ diff --git a/chrome/browser/download/download_target_determiner.cc b/chrome/brow
              << " Result:" << static_cast<int>(result);
              << " Result:" << static_cast<int>(result);
    std::unique_ptr<DownloadTargetInfo> target_info(new DownloadTargetInfo);
    std::unique_ptr<DownloadTargetInfo> target_info(new DownloadTargetInfo);
  
  
-@@ -1009,7 +1025,9 @@ void DownloadTargetDeterminer::ScheduleCallbackAndDeleteSelf(
+@@ -1010,7 +1026,9 @@ void DownloadTargetDeterminer::ScheduleCallbackAndDeleteSelf(
             ? DownloadItem::TARGET_DISPOSITION_PROMPT
             ? DownloadItem::TARGET_DISPOSITION_PROMPT
             : DownloadItem::TARGET_DISPOSITION_OVERWRITE);
             : DownloadItem::TARGET_DISPOSITION_OVERWRITE);
    target_info->danger_type = danger_type_;
    target_info->danger_type = danger_type_;
@@ -1317,7 +1307,7 @@ diff --git a/chrome/browser/download/download_target_determiner.cc b/chrome/brow
    target_info->intermediate_path = intermediate_path_;
    target_info->intermediate_path = intermediate_path_;
    target_info->mime_type = mime_type_;
    target_info->mime_type = mime_type_;
    target_info->is_filetype_handled_safely = is_filetype_handled_safely_;
    target_info->is_filetype_handled_safely = is_filetype_handled_safely_;
-@@ -1104,54 +1122,11 @@ bool DownloadTargetDeterminer::HasPromptedForPath() const {
+@@ -1105,54 +1123,11 @@ bool DownloadTargetDeterminer::HasPromptedForPath() const {
                                  DownloadItem::TARGET_DISPOSITION_PROMPT);
                                  DownloadItem::TARGET_DISPOSITION_PROMPT);
  }
  }
  
  
@@ -1373,7 +1363,7 @@ diff --git a/chrome/browser/download/download_target_determiner.cc b/chrome/brow
  }
  }
  
  
  absl::optional<base::Time>
  absl::optional<base::Time>
-@@ -1165,6 +1140,7 @@ DownloadTargetDeterminer::GetLastDownloadBypassTimestamp() const {
+@@ -1166,6 +1141,7 @@ DownloadTargetDeterminer::GetLastDownloadBypassTimestamp() const {
                                       EventType::DANGEROUS_DOWNLOAD_BYPASS)
                                       EventType::DANGEROUS_DOWNLOAD_BYPASS)
                             : absl::nullopt;
                             : absl::nullopt;
  }
  }
@@ -1472,7 +1462,7 @@ diff --git a/chrome/browser/download/download_target_info.h b/chrome/browser/dow
 diff --git a/chrome/browser/download/download_ui_model.cc b/chrome/browser/download/download_ui_model.cc
 diff --git a/chrome/browser/download/download_ui_model.cc b/chrome/browser/download/download_ui_model.cc
 --- a/chrome/browser/download/download_ui_model.cc
 --- a/chrome/browser/download/download_ui_model.cc
 +++ b/chrome/browser/download/download_ui_model.cc
 +++ b/chrome/browser/download/download_ui_model.cc
-@@ -36,7 +36,9 @@
+@@ -39,7 +39,9 @@
  
  
  using download::DownloadItem;
  using download::DownloadItem;
  using offline_items_collection::FailState;
  using offline_items_collection::FailState;
@@ -1482,7 +1472,7 @@ diff --git a/chrome/browser/download/download_ui_model.cc b/chrome/browser/downl
  
  
  namespace {
  namespace {
  
  
-@@ -418,12 +420,14 @@ bool DownloadUIModel::ShouldPreferOpeningInBrowser() const {
+@@ -421,12 +423,14 @@ bool DownloadUIModel::ShouldPreferOpeningInBrowser() const {
  
  
  void DownloadUIModel::SetShouldPreferOpeningInBrowser(bool preference) {}
  void DownloadUIModel::SetShouldPreferOpeningInBrowser(bool preference) {}
  
  
@@ -1500,7 +1490,7 @@ diff --git a/chrome/browser/download/download_ui_model.cc b/chrome/browser/downl
 diff --git a/chrome/browser/download/download_ui_model.h b/chrome/browser/download/download_ui_model.h
 diff --git a/chrome/browser/download/download_ui_model.h b/chrome/browser/download/download_ui_model.h
 --- a/chrome/browser/download/download_ui_model.h
 --- a/chrome/browser/download/download_ui_model.h
 +++ b/chrome/browser/download/download_ui_model.h
 +++ b/chrome/browser/download/download_ui_model.h
-@@ -19,7 +19,9 @@
+@@ -20,7 +20,9 @@
  #include "components/download/public/common/download_item.h"
  #include "components/download/public/common/download_item.h"
  #include "components/offline_items_collection/core/offline_item.h"
  #include "components/offline_items_collection/core/offline_item.h"
  #include "components/safe_browsing/buildflags.h"
  #include "components/safe_browsing/buildflags.h"
@@ -1510,7 +1500,7 @@ diff --git a/chrome/browser/download/download_ui_model.h b/chrome/browser/downlo
  #include "ui/base/models/image_model.h"
  #include "ui/base/models/image_model.h"
  #include "ui/color/color_id.h"
  #include "ui/color/color_id.h"
  #include "ui/gfx/vector_icon_types.h"
  #include "ui/gfx/vector_icon_types.h"
-@@ -295,6 +297,7 @@ class DownloadUIModel {
+@@ -296,6 +298,7 @@ class DownloadUIModel {
    // Change what's returned by ShouldPreferOpeningInBrowser to |preference|.
    // Change what's returned by ShouldPreferOpeningInBrowser to |preference|.
    virtual void SetShouldPreferOpeningInBrowser(bool preference);
    virtual void SetShouldPreferOpeningInBrowser(bool preference);
  
  
@@ -1518,7 +1508,7 @@ diff --git a/chrome/browser/download/download_ui_model.h b/chrome/browser/downlo
    // Return the danger level determined during download target determination.
    // Return the danger level determined during download target determination.
    // The value returned here is independent of the danger level as determined by
    // The value returned here is independent of the danger level as determined by
    // the Safe Browsing.
    // the Safe Browsing.
-@@ -303,6 +306,7 @@ class DownloadUIModel {
+@@ -304,6 +307,7 @@ class DownloadUIModel {
    // Change what's returned by GetDangerLevel().
    // Change what's returned by GetDangerLevel().
    virtual void SetDangerLevel(
    virtual void SetDangerLevel(
        safe_browsing::DownloadFileType::DangerLevel danger_level);
        safe_browsing::DownloadFileType::DangerLevel danger_level);
@@ -1661,7 +1651,7 @@ diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api
 diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
 diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
 --- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
 --- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
 +++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
 +++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
-@@ -35,8 +35,10 @@
+@@ -36,8 +36,10 @@
  #include "chrome/browser/file_system_access/file_system_access_permission_request_manager.h"
  #include "chrome/browser/file_system_access/file_system_access_permission_request_manager.h"
  #include "chrome/browser/installable/installable_utils.h"
  #include "chrome/browser/installable/installable_utils.h"
  #include "chrome/browser/profiles/profile.h"
  #include "chrome/browser/profiles/profile.h"
@@ -1671,8 +1661,8 @@ diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permiss
 +#endif
 +#endif
  #include "chrome/browser/ui/file_system_access_dialogs.h"
  #include "chrome/browser/ui/file_system_access_dialogs.h"
  #include "chrome/common/chrome_paths.h"
  #include "chrome/common/chrome_paths.h"
- #include "components/content_settings/core/browser/host_content_settings_map.h"
-@@ -307,6 +309,7 @@ BindResultCallbackToCurrentSequence(
+ #include "chrome/grit/generated_resources.h"
+@@ -312,6 +314,7 @@ BindResultCallbackToCurrentSequence(
        base::SequencedTaskRunnerHandle::Get(), std::move(callback));
        base::SequencedTaskRunnerHandle::Get(), std::move(callback));
  }
  }
  
  
@@ -1680,7 +1670,7 @@ diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permiss
  void DoSafeBrowsingCheckOnUIThread(
  void DoSafeBrowsingCheckOnUIThread(
      content::GlobalRenderFrameHostId frame_id,
      content::GlobalRenderFrameHostId frame_id,
      std::unique_ptr<content::FileSystemAccessWriteItem> item,
      std::unique_ptr<content::FileSystemAccessWriteItem> item,
-@@ -383,6 +386,7 @@ InterpretSafeBrowsingResult(safe_browsing::DownloadCheckResult result) {
+@@ -388,6 +391,7 @@ InterpretSafeBrowsingResult(safe_browsing::DownloadCheckResult result) {
    NOTREACHED();
    NOTREACHED();
    return ChromeFileSystemAccessPermissionContext::AfterWriteCheckResult::kBlock;
    return ChromeFileSystemAccessPermissionContext::AfterWriteCheckResult::kBlock;
  }
  }
@@ -1688,7 +1678,7 @@ diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permiss
  
  
  std::string GenerateLastPickedDirectoryKey(const std::string& id) {
  std::string GenerateLastPickedDirectoryKey(const std::string& id) {
    return id.empty() ? kDefaultLastPickedDirectoryKey
    return id.empty() ? kDefaultLastPickedDirectoryKey
-@@ -1160,6 +1164,7 @@ void ChromeFileSystemAccessPermissionContext::ConfirmSensitiveDirectoryAccess(
+@@ -1165,6 +1169,7 @@ void ChromeFileSystemAccessPermissionContext::ConfirmSensitiveDirectoryAccess(
                       std::move(callback)));
                       std::move(callback)));
  }
  }
  
  
@@ -1696,7 +1686,7 @@ diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permiss
  void ChromeFileSystemAccessPermissionContext::PerformAfterWriteChecks(
  void ChromeFileSystemAccessPermissionContext::PerformAfterWriteChecks(
      std::unique_ptr<content::FileSystemAccessWriteItem> item,
      std::unique_ptr<content::FileSystemAccessWriteItem> item,
      content::GlobalRenderFrameHostId frame_id,
      content::GlobalRenderFrameHostId frame_id,
-@@ -1181,6 +1186,7 @@ void ChromeFileSystemAccessPermissionContext::PerformAfterWriteChecks(
+@@ -1186,6 +1191,7 @@ void ChromeFileSystemAccessPermissionContext::PerformAfterWriteChecks(
                },
                },
                base::SequencedTaskRunnerHandle::Get(), std::move(callback))));
                base::SequencedTaskRunnerHandle::Get(), std::move(callback))));
  }
  }
@@ -1713,9 +1703,9 @@ diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permiss
  #include "components/permissions/permission_util.h"
  #include "components/permissions/permission_util.h"
 +#include "components/safe_browsing/buildflags.h"
 +#include "components/safe_browsing/buildflags.h"
  #include "content/public/browser/file_system_access_permission_context.h"
  #include "content/public/browser/file_system_access_permission_context.h"
+ #include "third_party/blink/public/mojom/file_system_access/file_system_access_manager.mojom-forward.h"
  #include "third_party/blink/public/mojom/permissions/permission_status.mojom.h"
  #include "third_party/blink/public/mojom/permissions/permission_status.mojom.h"
- 
-@@ -86,10 +87,6 @@ class ChromeFileSystemAccessPermissionContext
+@@ -87,10 +88,6 @@ class ChromeFileSystemAccessPermissionContext
        HandleType handle_type,
        HandleType handle_type,
        content::GlobalRenderFrameHostId frame_id,
        content::GlobalRenderFrameHostId frame_id,
        base::OnceCallback<void(SensitiveDirectoryResult)> callback) override;
        base::OnceCallback<void(SensitiveDirectoryResult)> callback) override;
@@ -1749,7 +1739,7 @@ diff --git a/chrome/browser/lookalikes/lookalike_url_controller_client.cc b/chro
 diff --git a/chrome/browser/metrics/chrome_metrics_service_client.cc b/chrome/browser/metrics/chrome_metrics_service_client.cc
 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
 --- a/chrome/browser/metrics/chrome_metrics_service_client.cc
 +++ b/chrome/browser/metrics/chrome_metrics_service_client.cc
 +++ b/chrome/browser/metrics/chrome_metrics_service_client.cc
-@@ -863,9 +863,6 @@ void ChromeMetricsServiceClient::RegisterMetricsServiceProviders() {
+@@ -865,9 +865,6 @@ void ChromeMetricsServiceClient::RegisterMetricsServiceProviders() {
    metrics_service_->RegisterMetricsProvider(
    metrics_service_->RegisterMetricsProvider(
        std::make_unique<HttpsEngagementMetricsProvider>());
        std::make_unique<HttpsEngagementMetricsProvider>());
  
  
@@ -1775,7 +1765,21 @@ diff --git a/chrome/browser/net/trial_comparison_cert_verifier_controller.cc b/c
 diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b/chrome/browser/password_manager/chrome_password_manager_client.cc
 diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b/chrome/browser/password_manager/chrome_password_manager_client.cc
 --- a/chrome/browser/password_manager/chrome_password_manager_client.cc
 --- a/chrome/browser/password_manager/chrome_password_manager_client.cc
 +++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
 +++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
-@@ -877,21 +877,13 @@ autofill::LanguageCode ChromePasswordManagerClient::GetPageLanguage() const {
+@@ -115,11 +115,11 @@
+ #include "third_party/re2/src/re2/re2.h"
+ #include "url/url_constants.h"
+ 
++#include "third_party/blink/public/mojom/clipboard/clipboard.mojom.h"
++#include "ui/base/clipboard/clipboard.h"
+ #if BUILDFLAG(SAFE_BROWSING_AVAILABLE)
+ #include "chrome/browser/safe_browsing/advanced_protection_status_manager.h"
+ #include "chrome/browser/safe_browsing/advanced_protection_status_manager_factory.h"
+-#include "third_party/blink/public/mojom/clipboard/clipboard.mojom.h"
+-#include "ui/base/clipboard/clipboard.h"
+ #include "ui/base/data_transfer_policy/data_transfer_endpoint.h"
+ #include "ui/events/keycodes/keyboard_codes.h"
+ #endif
+@@ -884,21 +884,13 @@ autofill::LanguageCode ChromePasswordManagerClient::GetPageLanguage() const {
  
  
  safe_browsing::PasswordProtectionService*
  safe_browsing::PasswordProtectionService*
  ChromePasswordManagerClient::GetPasswordProtectionService() const {
  ChromePasswordManagerClient::GetPasswordProtectionService() const {
@@ -1798,7 +1802,7 @@ diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b
  }
  }
  #endif  // defined(ON_FOCUS_PING_ENABLED)
  #endif  // defined(ON_FOCUS_PING_ENABLED)
  
  
-@@ -901,22 +893,9 @@ void ChromePasswordManagerClient::CheckProtectedPasswordEntry(
+@@ -908,22 +900,9 @@ void ChromePasswordManagerClient::CheckProtectedPasswordEntry(
      const std::vector<password_manager::MatchingReusedCredential>&
      const std::vector<password_manager::MatchingReusedCredential>&
          matching_reused_credentials,
          matching_reused_credentials,
      bool password_field_exists) {
      bool password_field_exists) {
@@ -1821,7 +1825,7 @@ diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b
  }
  }
  
  
  #if !BUILDFLAG(IS_ANDROID)
  #if !BUILDFLAG(IS_ANDROID)
-@@ -1534,6 +1513,7 @@ bool ChromePasswordManagerClient::IsPasswordManagementEnabledForCurrentPage(
+@@ -1539,6 +1518,7 @@ bool ChromePasswordManagerClient::IsPasswordManagementEnabledForCurrentPage(
      is_enabled = false;
      is_enabled = false;
    }
    }
  
  
@@ -1829,7 +1833,7 @@ diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b
    // SafeBrowsing Delayed Warnings experiment can delay some SafeBrowsing
    // SafeBrowsing Delayed Warnings experiment can delay some SafeBrowsing
    // warnings until user interaction. If the current page has a delayed warning,
    // warnings until user interaction. If the current page has a delayed warning,
    // it'll have a user interaction observer attached. Disable password
    // it'll have a user interaction observer attached. Disable password
-@@ -1544,6 +1524,7 @@ bool ChromePasswordManagerClient::IsPasswordManagementEnabledForCurrentPage(
+@@ -1549,6 +1529,7 @@ bool ChromePasswordManagerClient::IsPasswordManagementEnabledForCurrentPage(
      observer->OnPasswordSaveOrAutofillDenied();
      observer->OnPasswordSaveOrAutofillDenied();
      is_enabled = false;
      is_enabled = false;
    }
    }
@@ -1925,7 +1929,7 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse
  #include "build/chromecast_buildflags.h"
  #include "build/chromecast_buildflags.h"
  #include "build/chromeos_buildflags.h"
  #include "build/chromeos_buildflags.h"
  #include "chrome/browser/about_flags.h"
  #include "chrome/browser/about_flags.h"
-@@ -1262,7 +1263,9 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
+@@ -1307,7 +1308,9 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
    PushMessagingAppIdentifier::RegisterProfilePrefs(registry);
    PushMessagingAppIdentifier::RegisterProfilePrefs(registry);
    QuietNotificationPermissionUiState::RegisterProfilePrefs(registry);
    QuietNotificationPermissionUiState::RegisterProfilePrefs(registry);
    RegisterBrowserUserPrefs(registry);
    RegisterBrowserUserPrefs(registry);
@@ -1938,7 +1942,7 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse
 diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
 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
 --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
 +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
 +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
-@@ -78,7 +78,6 @@
+@@ -79,7 +79,6 @@
  #include "chrome/browser/privacy_sandbox/privacy_sandbox_service_factory.h"
  #include "chrome/browser/privacy_sandbox/privacy_sandbox_service_factory.h"
  #include "chrome/browser/privacy_sandbox/privacy_sandbox_settings_factory.h"
  #include "chrome/browser/privacy_sandbox/privacy_sandbox_settings_factory.h"
  #include "chrome/browser/profiles/renderer_updater_factory.h"
  #include "chrome/browser/profiles/renderer_updater_factory.h"
@@ -1946,7 +1950,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
  #include "chrome/browser/safe_browsing/tailored_security/tailored_security_service_factory.h"
  #include "chrome/browser/safe_browsing/tailored_security/tailored_security_service_factory.h"
  #include "chrome/browser/search_engines/template_url_fetcher_factory.h"
  #include "chrome/browser/search_engines/template_url_fetcher_factory.h"
  #include "chrome/browser/search_engines/template_url_service_factory.h"
  #include "chrome/browser/search_engines/template_url_service_factory.h"
-@@ -330,7 +329,6 @@ void ChromeBrowserMainExtraPartsProfiles::
+@@ -335,7 +334,6 @@ void ChromeBrowserMainExtraPartsProfiles::
  #if BUILDFLAG(IS_CHROMEOS_LACROS)
  #if BUILDFLAG(IS_CHROMEOS_LACROS)
    CertDbInitializerFactory::GetInstance();
    CertDbInitializerFactory::GetInstance();
  #endif
  #endif
@@ -1954,8 +1958,8 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
  #if !BUILDFLAG(IS_ANDROID)
  #if !BUILDFLAG(IS_ANDROID)
    ChromeBrowsingDataLifetimeManagerFactory::GetInstance();
    ChromeBrowsingDataLifetimeManagerFactory::GetInstance();
  #endif
  #endif
-@@ -544,7 +542,9 @@ void ChromeBrowserMainExtraPartsProfiles::
-     SystemExtensionsProviderFactory::GetInstance();
+@@ -552,7 +550,9 @@ void ChromeBrowserMainExtraPartsProfiles::
+     ash::SystemExtensionsProviderFactory::GetInstance();
  #endif
  #endif
    TabRestoreServiceFactory::GetInstance();
    TabRestoreServiceFactory::GetInstance();
 +#if BUILDFLAG(FULL_SAFE_BROWSING)
 +#if BUILDFLAG(FULL_SAFE_BROWSING)
@@ -1975,7 +1979,7 @@ diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/p
  #include "chrome/browser/sessions/exit_type_service.h"
  #include "chrome/browser/sessions/exit_type_service.h"
  #include "chrome/browser/sharing/sharing_service_factory.h"
  #include "chrome/browser/sharing/sharing_service_factory.h"
  #include "chrome/browser/signin/identity_manager_factory.h"
  #include "chrome/browser/signin/identity_manager_factory.h"
-@@ -618,6 +617,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async_prefs) {
+@@ -620,6 +619,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async_prefs) {
  
  
    mojo::PendingRemote<prefs::mojom::TrackedPreferenceValidationDelegate>
    mojo::PendingRemote<prefs::mojom::TrackedPreferenceValidationDelegate>
        pref_validation_delegate;
        pref_validation_delegate;
@@ -1983,7 +1987,7 @@ diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/p
    scoped_refptr<safe_browsing::SafeBrowsingService> safe_browsing_service(
    scoped_refptr<safe_browsing::SafeBrowsingService> safe_browsing_service(
        g_browser_process->safe_browsing_service());
        g_browser_process->safe_browsing_service());
    if (safe_browsing_service.get()) {
    if (safe_browsing_service.get()) {
-@@ -629,7 +629,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async_prefs) {
+@@ -631,7 +631,7 @@ void ProfileImpl::LoadPrefsForNormalStartup(bool async_prefs) {
            pref_validation_delegate.InitWithNewPipeAndPassReceiver());
            pref_validation_delegate.InitWithNewPipeAndPassReceiver());
      }
      }
    }
    }
@@ -2019,7 +2023,7 @@ diff --git a/chrome/browser/safe_browsing/BUILD.gn b/chrome/browser/safe_browsin
  
  
    if (safe_browsing_mode != 0) {
    if (safe_browsing_mode != 0) {
      # "Safe Browsing Basic" files used for safe browsing in full mode
      # "Safe Browsing Basic" files used for safe browsing in full mode
-@@ -176,7 +177,6 @@ static_library("safe_browsing") {
+@@ -177,7 +178,6 @@ static_library("safe_browsing") {
        "//components/safe_browsing/content/browser/triggers:ad_sampler_trigger",
        "//components/safe_browsing/content/browser/triggers:ad_sampler_trigger",
        "//components/safe_browsing/content/browser/triggers:suspicious_site_trigger",
        "//components/safe_browsing/content/browser/triggers:suspicious_site_trigger",
        "//components/safe_browsing/content/browser/triggers:trigger_throttler",
        "//components/safe_browsing/content/browser/triggers:trigger_throttler",
@@ -2203,7 +2207,7 @@ diff --git a/chrome/browser/safe_browsing/android/safe_browsing_bridge.cc b/chro
 diff --git a/chrome/browser/safe_browsing/download_protection/download_protection_service.cc b/chrome/browser/safe_browsing/download_protection/download_protection_service.cc
 diff --git a/chrome/browser/safe_browsing/download_protection/download_protection_service.cc b/chrome/browser/safe_browsing/download_protection/download_protection_service.cc
 --- a/chrome/browser/safe_browsing/download_protection/download_protection_service.cc
 --- a/chrome/browser/safe_browsing/download_protection/download_protection_service.cc
 +++ b/chrome/browser/safe_browsing/download_protection/download_protection_service.cc
 +++ b/chrome/browser/safe_browsing/download_protection/download_protection_service.cc
-@@ -794,11 +794,6 @@ void DownloadProtectionService::RequestFinished(DeepScanningRequest* request) {
+@@ -781,11 +781,6 @@ void DownloadProtectionService::RequestFinished(DeepScanningRequest* request) {
    deep_scanning_requests_.erase(it);
    deep_scanning_requests_.erase(it);
  }
  }
  
  
@@ -2349,7 +2353,7 @@ diff --git a/chrome/browser/subresource_filter/chrome_content_subresource_filter
 diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
 diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
 --- a/chrome/browser/ui/BUILD.gn
 --- a/chrome/browser/ui/BUILD.gn
 +++ b/chrome/browser/ui/BUILD.gn
 +++ b/chrome/browser/ui/BUILD.gn
-@@ -551,7 +551,6 @@ static_library("ui") {
+@@ -559,7 +559,6 @@ static_library("ui") {
      "//components/renderer_context_menu",
      "//components/renderer_context_menu",
      "//components/resources",
      "//components/resources",
      "//components/safe_browsing/content/browser",
      "//components/safe_browsing/content/browser",
@@ -2357,7 +2361,7 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
      "//components/safe_browsing/content/browser/password_protection",
      "//components/safe_browsing/content/browser/password_protection",
      "//components/safe_browsing/content/browser/web_ui",
      "//components/safe_browsing/content/browser/web_ui",
      "//components/safe_browsing/core/browser/db:database_manager",
      "//components/safe_browsing/core/browser/db:database_manager",
-@@ -4241,7 +4240,6 @@ static_library("ui") {
+@@ -4270,7 +4269,6 @@ static_library("ui") {
        "views/download/bubble/download_dialog_view.h",
        "views/download/bubble/download_dialog_view.h",
        "views/download/bubble/download_toolbar_button_view.cc",
        "views/download/bubble/download_toolbar_button_view.cc",
        "views/download/bubble/download_toolbar_button_view.h",
        "views/download/bubble/download_toolbar_button_view.h",
@@ -2368,7 +2372,7 @@ diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
 diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 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
 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
-@@ -412,12 +412,6 @@ CHAR_LIMIT guidelines:
+@@ -415,12 +415,6 @@ CHAR_LIMIT guidelines:
        <message name="IDS_PRIVACY_SYNC_AND_SERVICES_LINK_SYNC_OFF" desc="The text for Privacy preferences that is shown after all preference rows. This version of the text is shown if Sync hasn't been turned on.">
        <message name="IDS_PRIVACY_SYNC_AND_SERVICES_LINK_SYNC_OFF" desc="The text for Privacy preferences that is shown after all preference rows. This version of the text is shown if Sync hasn't been turned on.">
          For more settings that relate to privacy, security, and data collection, see <ph name="BEGIN_LINK">&lt;link&gt;</ph>Google services<ph name="END_LINK">&lt;/link&gt;</ph>
          For more settings that relate to privacy, security, and data collection, see <ph name="BEGIN_LINK">&lt;link&gt;</ph>Google services<ph name="END_LINK">&lt;/link&gt;</ph>
        </message>
        </message>
@@ -2381,7 +2385,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
  
  
        <!-- Metrics settings -->
        <!-- Metrics settings -->
        <message name="IDS_PREFS_METRICS_SETTINGS" desc="Title for the page that allows the user to control how much usage data Chrome uploads. [CHAR_LIMIT=32]">
        <message name="IDS_PREFS_METRICS_SETTINGS" desc="Title for the page that allows the user to control how much usage data Chrome uploads. [CHAR_LIMIT=32]">
-@@ -4734,9 +4728,6 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+@@ -4764,9 +4758,6 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
          To use this setting <ph name="BEGIN_LINK">&lt;link&gt;</ph>Make searches and browsing better<ph name="END_LINK">&lt;/link&gt;</ph> must be turned on
          To use this setting <ph name="BEGIN_LINK">&lt;link&gt;</ph>Make searches and browsing better<ph name="END_LINK">&lt;/link&gt;</ph> must be turned on
        </message>
        </message>
        <!-- Usage Stats strings -->
        <!-- Usage Stats strings -->
@@ -2411,10 +2415,10 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
  #include "chrome/browser/safe_browsing/trigger_creator.h"
  #include "chrome/browser/safe_browsing/trigger_creator.h"
 +#endif
 +#endif
  #include "chrome/browser/search_engines/template_url_service_factory.h"
  #include "chrome/browser/search_engines/template_url_service_factory.h"
+ #include "chrome/browser/segmentation_platform/segmentation_platform_service_factory.h"
  #include "chrome/browser/sessions/session_tab_helper_factory.h"
  #include "chrome/browser/sessions/session_tab_helper_factory.h"
- #include "chrome/browser/ssl/chrome_security_blocking_page_factory.h"
-@@ -131,9 +135,11 @@
- #include "components/performance_manager/public/performance_manager.h"
+@@ -132,9 +136,11 @@
+ #include "components/performance_manager/embedder/performance_manager_registry.h"
  #include "components/permissions/features.h"
  #include "components/permissions/features.h"
  #include "components/permissions/permission_request_manager.h"
  #include "components/permissions/permission_request_manager.h"
 +#if defined(FULL_SAFE_BROWSING)
 +#if defined(FULL_SAFE_BROWSING)
@@ -2422,10 +2426,10 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
  #include "components/safe_browsing/content/browser/safe_browsing_tab_observer.h"
  #include "components/safe_browsing/content/browser/safe_browsing_tab_observer.h"
  #include "components/safe_browsing/core/common/features.h"
  #include "components/safe_browsing/core/common/features.h"
 +#endif
 +#endif
+ #include "components/segmentation_platform/content/segmentation_platform_tab_helper.h"
  #include "components/site_engagement/content/site_engagement_helper.h"
  #include "components/site_engagement/content/site_engagement_helper.h"
  #include "components/site_engagement/content/site_engagement_service.h"
  #include "components/site_engagement/content/site_engagement_service.h"
- #include "components/tracing/common/tracing_switches.h"
-@@ -392,6 +398,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
+@@ -400,6 +406,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
    //     See https://crbug.com/910288.
    //     See https://crbug.com/910288.
    resource_coordinator::ResourceCoordinatorTabHelper::CreateForWebContents(
    resource_coordinator::ResourceCoordinatorTabHelper::CreateForWebContents(
        web_contents);
        web_contents);
@@ -2433,14 +2437,14 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
    safe_browsing::SafeBrowsingNavigationObserver::MaybeCreateForWebContents(
    safe_browsing::SafeBrowsingNavigationObserver::MaybeCreateForWebContents(
        web_contents, HostContentSettingsMapFactory::GetForProfile(profile),
        web_contents, HostContentSettingsMapFactory::GetForProfile(profile),
        safe_browsing::SafeBrowsingNavigationObserverManagerFactory::
        safe_browsing::SafeBrowsingNavigationObserverManagerFactory::
-@@ -409,6 +416,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
+@@ -417,6 +424,7 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
    safe_browsing::TriggerCreator::MaybeCreateTriggersForWebContents(
    safe_browsing::TriggerCreator::MaybeCreateTriggersForWebContents(
        profile, web_contents);
        profile, web_contents);
    ReputationWebContentsObserver::CreateForWebContents(web_contents);
    ReputationWebContentsObserver::CreateForWebContents(web_contents);
 +#endif
 +#endif
    SearchEngineTabHelper::CreateForWebContents(web_contents);
    SearchEngineTabHelper::CreateForWebContents(web_contents);
    SecurityStateTabHelper::CreateForWebContents(web_contents);
    SecurityStateTabHelper::CreateForWebContents(web_contents);
-   if (base::FeatureList::IsEnabled(commerce::kShoppingList)) {
+   segmentation_platform::SegmentationPlatformTabHelper::CreateForWebContents(
 diff --git a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
 diff --git a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
 --- a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
 --- a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
 +++ b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
 +++ b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
@@ -2534,7 +2538,7 @@ diff --git a/chrome/common/safe_browsing/BUILD.gn b/chrome/common/safe_browsing/
 diff --git a/chrome/renderer/BUILD.gn b/chrome/renderer/BUILD.gn
 diff --git a/chrome/renderer/BUILD.gn b/chrome/renderer/BUILD.gn
 --- a/chrome/renderer/BUILD.gn
 --- a/chrome/renderer/BUILD.gn
 +++ b/chrome/renderer/BUILD.gn
 +++ b/chrome/renderer/BUILD.gn
-@@ -272,11 +272,6 @@ static_library("renderer") {
+@@ -280,11 +280,6 @@ static_library("renderer") {
      deps += [ "//third_party/widevine/cdm:headers" ]
      deps += [ "//third_party/widevine/cdm:headers" ]
    }
    }
  
  
@@ -2559,7 +2563,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer
  #include "components/spellcheck/spellcheck_buildflags.h"
  #include "components/spellcheck/spellcheck_buildflags.h"
  #include "components/subresource_filter/content/renderer/subresource_filter_agent.h"
  #include "components/subresource_filter/content/renderer/subresource_filter_agent.h"
  #include "components/subresource_filter/content/renderer/unverified_ruleset_dealer.h"
  #include "components/subresource_filter/content/renderer/unverified_ruleset_dealer.h"
-@@ -424,12 +426,8 @@ void ChromeContentRendererClient::RenderThreadStarted() {
+@@ -425,12 +427,8 @@ void ChromeContentRendererClient::RenderThreadStarted() {
    subresource_filter_ruleset_dealer_ =
    subresource_filter_ruleset_dealer_ =
        std::make_unique<subresource_filter::UnverifiedRulesetDealer>();
        std::make_unique<subresource_filter::UnverifiedRulesetDealer>();
  
  
@@ -2570,8 +2574,8 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer
    thread->AddObserver(subresource_filter_ruleset_dealer_.get());
    thread->AddObserver(subresource_filter_ruleset_dealer_.get());
 -  thread->AddObserver(phishing_model_setter_.get());
 -  thread->AddObserver(phishing_model_setter_.get());
  
  
-   thread->RegisterExtension(extensions_v8::LoadTimesExtension::Get());
- 
+   blink::WebScriptController::RegisterExtension(
+       extensions_v8::LoadTimesExtension::Get());
 diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/chrome_content_renderer_client.h
 diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/chrome_content_renderer_client.h
 --- a/chrome/renderer/chrome_content_renderer_client.h
 --- a/chrome/renderer/chrome_content_renderer_client.h
 +++ b/chrome/renderer/chrome_content_renderer_client.h
 +++ b/chrome/renderer/chrome_content_renderer_client.h
@@ -2595,7 +2599,15 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/
 diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
 diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
 --- a/chrome/test/BUILD.gn
 --- a/chrome/test/BUILD.gn
 +++ b/chrome/test/BUILD.gn
 +++ b/chrome/test/BUILD.gn
-@@ -1333,7 +1333,6 @@ if (!is_android) {
+@@ -890,7 +890,6 @@ if (is_android) {
+       "//components/password_manager/content/browser:browser",
+       "//components/policy:chrome_settings_proto_generated_compile",
+       "//components/policy/core/browser:test_support",
+-      "//components/safe_browsing/content/browser:client_side_detection",
+       "//components/safe_browsing/content/common:interfaces",
+       "//components/safe_browsing/content/renderer/phishing_classifier:phishing_classifier",
+       "//components/safe_browsing/core/common/fbs:client_model",
+@@ -1343,7 +1342,6 @@ if (!is_android) {
        "//components/resources",
        "//components/resources",
        "//components/safe_browsing:buildflags",
        "//components/safe_browsing:buildflags",
        "//components/safe_browsing/content/browser",
        "//components/safe_browsing/content/browser",
@@ -2603,7 +2615,7 @@ diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
        "//components/safe_browsing/content/browser:safe_browsing_service",
        "//components/safe_browsing/content/browser:safe_browsing_service",
        "//components/safe_browsing/content/browser/password_protection",
        "//components/safe_browsing/content/browser/password_protection",
        "//components/safe_browsing/content/browser/password_protection:test_support",
        "//components/safe_browsing/content/browser/password_protection:test_support",
-@@ -5676,7 +5675,6 @@ test("unit_tests") {
+@@ -5714,7 +5712,6 @@ test("unit_tests") {
      "//components/resources",
      "//components/resources",
      "//components/safe_browsing:buildflags",
      "//components/safe_browsing:buildflags",
      "//components/safe_browsing/content/browser",
      "//components/safe_browsing/content/browser",
@@ -2614,7 +2626,7 @@ diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
 diff --git a/components/BUILD.gn b/components/BUILD.gn
 diff --git a/components/BUILD.gn b/components/BUILD.gn
 --- a/components/BUILD.gn
 --- a/components/BUILD.gn
 +++ b/components/BUILD.gn
 +++ b/components/BUILD.gn
-@@ -609,7 +609,6 @@ test("components_unittests") {
+@@ -625,7 +625,6 @@ test("components_unittests") {
    if (safe_browsing_mode == 1) {
    if (safe_browsing_mode == 1) {
      deps += [
      deps += [
        "//components/safe_browsing/content/browser:unit_tests",
        "//components/safe_browsing/content/browser:unit_tests",
@@ -2660,11 +2672,11 @@ diff --git a/components/component_updater/installer_policies/BUILD.gn b/componen
 -    "safety_tips_component_installer.h",
 -    "safety_tips_component_installer.h",
      "trust_token_key_commitments_component_installer_policy.cc",
      "trust_token_key_commitments_component_installer_policy.cc",
      "trust_token_key_commitments_component_installer_policy.h",
      "trust_token_key_commitments_component_installer_policy.h",
-   ]
+     "url_param_classification_component_installer.cc",
 diff --git a/components/permissions/permission_request_manager.cc b/components/permissions/permission_request_manager.cc
 diff --git a/components/permissions/permission_request_manager.cc b/components/permissions/permission_request_manager.cc
 --- a/components/permissions/permission_request_manager.cc
 --- a/components/permissions/permission_request_manager.cc
 +++ b/components/permissions/permission_request_manager.cc
 +++ b/components/permissions/permission_request_manager.cc
-@@ -599,10 +599,7 @@ PermissionRequestManager::PermissionRequestManager(
+@@ -594,10 +594,7 @@ PermissionRequestManager::PermissionRequestManager(
        view_(nullptr),
        view_(nullptr),
        tab_is_hidden_(web_contents->GetVisibility() ==
        tab_is_hidden_(web_contents->GetVisibility() ==
                       content::Visibility::HIDDEN),
                       content::Visibility::HIDDEN),
@@ -2679,7 +2691,7 @@ diff --git a/components/permissions/permission_request_manager.cc b/components/p
 diff --git a/components/safe_browsing/content/browser/BUILD.gn b/components/safe_browsing/content/browser/BUILD.gn
 diff --git a/components/safe_browsing/content/browser/BUILD.gn b/components/safe_browsing/content/browser/BUILD.gn
 --- a/components/safe_browsing/content/browser/BUILD.gn
 --- a/components/safe_browsing/content/browser/BUILD.gn
 +++ b/components/safe_browsing/content/browser/BUILD.gn
 +++ b/components/safe_browsing/content/browser/BUILD.gn
-@@ -142,7 +142,6 @@ source_set("unit_tests") {
+@@ -141,7 +141,6 @@ source_set("unit_tests") {
    ]
    ]
  
  
    deps = [
    deps = [
@@ -2703,8 +2715,8 @@ diff --git a/components/safe_browsing/content/common/file_type_policies.cc b/com
 diff --git a/components/safe_browsing/core/common/features.cc b/components/safe_browsing/core/common/features.cc
 diff --git a/components/safe_browsing/core/common/features.cc b/components/safe_browsing/core/common/features.cc
 --- a/components/safe_browsing/core/common/features.cc
 --- a/components/safe_browsing/core/common/features.cc
 +++ b/components/safe_browsing/core/common/features.cc
 +++ b/components/safe_browsing/core/common/features.cc
-@@ -127,7 +127,7 @@ const base::Feature kSendSampledPingsForProtegoAllowlistDomains{
-     base::FEATURE_DISABLED_BY_DEFAULT};
+@@ -150,7 +150,7 @@ const base::Feature kSendSampledPingsForProtegoAllowlistDomains{
+     base::FEATURE_ENABLED_BY_DEFAULT};
  
  
  const base::Feature kSuspiciousSiteTriggerQuotaFeature{
  const base::Feature kSuspiciousSiteTriggerQuotaFeature{
 -    "SafeBrowsingSuspiciousSiteTriggerQuota", base::FEATURE_ENABLED_BY_DEFAULT};
 -    "SafeBrowsingSuspiciousSiteTriggerQuota", base::FEATURE_ENABLED_BY_DEFAULT};
@@ -2906,7 +2918,7 @@ diff --git a/content/browser/file_system_access/safe_move_helper.h b/content/bro
 diff --git a/content/public/browser/file_system_access_permission_context.h b/content/public/browser/file_system_access_permission_context.h
 diff --git a/content/public/browser/file_system_access_permission_context.h b/content/public/browser/file_system_access_permission_context.h
 --- a/content/public/browser/file_system_access_permission_context.h
 --- a/content/public/browser/file_system_access_permission_context.h
 +++ b/content/public/browser/file_system_access_permission_context.h
 +++ b/content/public/browser/file_system_access_permission_context.h
-@@ -107,12 +107,6 @@ class FileSystemAccessPermissionContext {
+@@ -110,12 +110,6 @@ class FileSystemAccessPermissionContext {
        base::OnceCallback<void(SensitiveDirectoryResult)> callback) = 0;
        base::OnceCallback<void(SensitiveDirectoryResult)> callback) = 0;
  
  
    enum class AfterWriteCheckResult { kAllow, kBlock };
    enum class AfterWriteCheckResult { kAllow, kBlock };
@@ -2922,11 +2934,12 @@ diff --git a/content/public/browser/file_system_access_permission_context.h b/co
 diff --git a/weblayer/BUILD.gn b/weblayer/BUILD.gn
 diff --git a/weblayer/BUILD.gn b/weblayer/BUILD.gn
 --- a/weblayer/BUILD.gn
 --- a/weblayer/BUILD.gn
 +++ b/weblayer/BUILD.gn
 +++ b/weblayer/BUILD.gn
-@@ -471,10 +471,8 @@ source_set("weblayer_lib_base") {
+@@ -471,11 +471,9 @@ source_set("weblayer_lib_base") {
      "//components/prefs",
      "//components/prefs",
      "//components/profile_metrics",
      "//components/profile_metrics",
      "//components/safe_browsing/content/browser",
      "//components/safe_browsing/content/browser",
 -    "//components/safe_browsing/content/browser:client_side_detection",
 -    "//components/safe_browsing/content/browser:client_side_detection",
+     "//components/safe_browsing/content/browser/web_ui",
      "//components/safe_browsing/content/common:interfaces",
      "//components/safe_browsing/content/common:interfaces",
      "//components/safe_browsing/content/renderer:throttles",
      "//components/safe_browsing/content/renderer:throttles",
 -    "//components/safe_browsing/content/renderer/phishing_classifier",
 -    "//components/safe_browsing/content/renderer/phishing_classifier",
@@ -2950,8 +2963,8 @@ diff --git a/weblayer/test/BUILD.gn b/weblayer/test/BUILD.gn
        "//components/safe_browsing/android:safe_browsing_api_handler",
        "//components/safe_browsing/android:safe_browsing_api_handler",
        "//components/safe_browsing/content/browser",
        "//components/safe_browsing/content/browser",
 -      "//components/safe_browsing/content/browser:client_side_detection",
 -      "//components/safe_browsing/content/browser:client_side_detection",
+       "//components/safe_browsing/content/browser/web_ui",
        "//components/safe_browsing/content/common:interfaces",
        "//components/safe_browsing/content/common:interfaces",
        "//components/safe_browsing/core/browser:token_fetcher",
        "//components/safe_browsing/core/browser:token_fetcher",
-       "//components/safe_browsing/core/common",
 --
 --
 2.25.1
 2.25.1

+ 6 - 6
build/patches/Disable-safety-check.patch

@@ -14,7 +14,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
 diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
 --- a/chrome/android/BUILD.gn
 --- a/chrome/android/BUILD.gn
 +++ b/chrome/android/BUILD.gn
 +++ b/chrome/android/BUILD.gn
-@@ -402,7 +402,6 @@ android_library("chrome_java") {
+@@ -405,7 +405,6 @@ android_library("chrome_java") {
      "//chrome/browser/privacy_sandbox/android:java",
      "//chrome/browser/privacy_sandbox/android:java",
      "//chrome/browser/profiles/android:java",
      "//chrome/browser/profiles/android:java",
      "//chrome/browser/safe_browsing/android:java",
      "//chrome/browser/safe_browsing/android:java",
@@ -22,16 +22,16 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
      "//chrome/browser/search_engines/android:java",
      "//chrome/browser/search_engines/android:java",
      "//chrome/browser/segmentation_platform:factory_java",
      "//chrome/browser/segmentation_platform:factory_java",
      "//chrome/browser/selection/android:java",
      "//chrome/browser/selection/android:java",
-@@ -1004,8 +1003,6 @@ junit_binary("chrome_junit_tests") {
+@@ -1014,8 +1013,6 @@ junit_binary("chrome_junit_tests") {
      "//chrome/browser/preferences:java",
      "//chrome/browser/preferences:java",
      "//chrome/browser/preferences:preferences_junit_tests",
      "//chrome/browser/preferences:preferences_junit_tests",
      "//chrome/browser/profiles/android:java",
      "//chrome/browser/profiles/android:java",
 -    "//chrome/browser/safety_check/android:java",
 -    "//chrome/browser/safety_check/android:java",
 -    "//chrome/browser/safety_check/android:junit",
 -    "//chrome/browser/safety_check/android:junit",
      "//chrome/browser/search_engines/android:java",
      "//chrome/browser/search_engines/android:java",
+     "//chrome/browser/segmentation_platform:factory_java",
      "//chrome/browser/share:java",
      "//chrome/browser/share:java",
-     "//chrome/browser/tab:java",
-@@ -1409,8 +1406,6 @@ android_library("chrome_test_java") {
+@@ -1435,8 +1432,6 @@ android_library("chrome_test_java") {
      "//chrome/browser/profiles/android:java",
      "//chrome/browser/profiles/android:java",
      "//chrome/browser/safe_browsing/android:java",
      "//chrome/browser/safe_browsing/android:java",
      "//chrome/browser/safe_browsing/android:javatests",
      "//chrome/browser/safe_browsing/android:javatests",
@@ -43,7 +43,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
 diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
 diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
 --- a/chrome/android/chrome_java_sources.gni
 --- a/chrome/android/chrome_java_sources.gni
 +++ b/chrome/android/chrome_java_sources.gni
 +++ b/chrome/android/chrome_java_sources.gni
-@@ -932,7 +932,6 @@ chrome_java_sources = [
+@@ -935,7 +935,6 @@ chrome_java_sources = [
    "java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingPasswordReuseDialogBridge.java",
    "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/SafeBrowsingReferringAppBridge.java",
    "java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingSettingsLauncher.java",
    "java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingSettingsLauncher.java",
@@ -98,7 +98,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/Settin
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
 --- a/chrome/browser/BUILD.gn
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -3400,7 +3400,6 @@ static_library("browser") {
+@@ -3267,7 +3267,6 @@ static_library("browser") {
        "//chrome/browser/privacy_sandbox/android:jni_headers",
        "//chrome/browser/privacy_sandbox/android:jni_headers",
        "//chrome/browser/reading_list/android",
        "//chrome/browser/reading_list/android",
        "//chrome/browser/safe_browsing/android:safe_browsing_enums",
        "//chrome/browser/safe_browsing/android:safe_browsing_enums",

+ 8 - 8
build/patches/Disable-smart-selection-by-default.patch

@@ -42,15 +42,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearc
 diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
 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
 --- a/chrome/browser/flags/android/chrome_feature_list.cc
 +++ b/chrome/browser/flags/android/chrome_feature_list.cc
 +++ b/chrome/browser/flags/android/chrome_feature_list.cc
-@@ -180,6 +180,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
+@@ -181,6 +181,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
+     &kCCTBackgroundTab,
      &kCCTClientDataHeader,
      &kCCTClientDataHeader,
-     &kCCTExternalLinkHandling,
      &kCCTIncognito,
      &kCCTIncognito,
 +    &kChromeSmartSelection,
 +    &kChromeSmartSelection,
      &kCCTIncognitoAvailableToThirdParty,
      &kCCTIncognitoAvailableToThirdParty,
      &kCCTNewDownloadTab,
      &kCCTNewDownloadTab,
-     &kCCTPostMessageAPI,
-@@ -530,6 +531,9 @@ const base::Feature kChromeSharingHubLaunchAdjacent{
+     &kCCTPackageNameRecording,
+@@ -553,6 +554,9 @@ const base::Feature kChromeSharingHubLaunchAdjacent{
  const base::Feature kChromeSurveyNextAndroid{"ChromeSurveyNextAndroid",
  const base::Feature kChromeSurveyNextAndroid{"ChromeSurveyNextAndroid",
                                               base::FEATURE_ENABLED_BY_DEFAULT};
                                               base::FEATURE_ENABLED_BY_DEFAULT};
  
  
@@ -63,7 +63,7 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse
 diff --git a/chrome/browser/flags/android/chrome_feature_list.h b/chrome/browser/flags/android/chrome_feature_list.h
 diff --git a/chrome/browser/flags/android/chrome_feature_list.h b/chrome/browser/flags/android/chrome_feature_list.h
 --- a/chrome/browser/flags/android/chrome_feature_list.h
 --- a/chrome/browser/flags/android/chrome_feature_list.h
 +++ b/chrome/browser/flags/android/chrome_feature_list.h
 +++ b/chrome/browser/flags/android/chrome_feature_list.h
-@@ -52,6 +52,7 @@ extern const base::Feature kDontAutoHideBrowserControls;
+@@ -54,6 +54,7 @@ extern const base::Feature kDontAutoHideBrowserControls;
  extern const base::Feature kChromeNewDownloadTab;
  extern const base::Feature kChromeNewDownloadTab;
  extern const base::Feature kChromeShareLongScreenshot;
  extern const base::Feature kChromeShareLongScreenshot;
  extern const base::Feature kChromeShareScreenshot;
  extern const base::Feature kChromeShareScreenshot;
@@ -74,8 +74,8 @@ 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
 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
 --- 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
 +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
-@@ -249,6 +249,7 @@ public abstract class ChromeFeatureList {
-     public static final String CCT_NEW_DOWNLOAD_TAB = "CCTNewDownloadTab";
+@@ -250,6 +250,7 @@ public abstract class ChromeFeatureList {
+     public static final String CCT_PACKAGE_NAME_RECORDING = "CCTPackageNameRecording";
      public static final String CCT_POST_MESSAGE_API = "CCTPostMessageAPI";
      public static final String CCT_POST_MESSAGE_API = "CCTPostMessageAPI";
      public static final String CCT_REDIRECT_PRECONNECT = "CCTRedirectPreconnect";
      public static final String CCT_REDIRECT_PRECONNECT = "CCTRedirectPreconnect";
 +    public static final String CHROME_SMART_SELECTION = "ChromeSmartSelection";
 +    public static final String CHROME_SMART_SELECTION = "ChromeSmartSelection";
@@ -97,7 +97,7 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/select
 diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json
 diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json
 --- a/testing/variations/fieldtrial_testing_config.json
 --- a/testing/variations/fieldtrial_testing_config.json
 +++ b/testing/variations/fieldtrial_testing_config.json
 +++ b/testing/variations/fieldtrial_testing_config.json
-@@ -2036,6 +2036,21 @@
+@@ -2305,6 +2305,21 @@
              ]
              ]
          }
          }
      ],
      ],

+ 2 - 2
build/patches/Disable-some-signed-exchange-features.patch

@@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/content/public/common/content_features.cc b/content/public/common/content_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
 --- a/content/public/common/content_features.cc
 +++ b/content/public/common/content_features.cc
 +++ b/content/public/common/content_features.cc
-@@ -820,7 +820,7 @@ const base::Feature kSharedArrayBufferOnDesktop{
+@@ -826,7 +826,7 @@ const base::Feature kSharedArrayBufferOnDesktop{
  // Signed Exchange Reporting for distributors
  // Signed Exchange Reporting for distributors
  // https://www.chromestatus.com/feature/5687904902840320
  // https://www.chromestatus.com/feature/5687904902840320
  const base::Feature kSignedExchangeReportingForDistributors{
  const base::Feature kSignedExchangeReportingForDistributors{
@@ -19,7 +19,7 @@ diff --git a/content/public/common/content_features.cc b/content/public/common/c
  
  
  // Subresource prefetching+loading via Signed HTTP Exchange
  // Subresource prefetching+loading via Signed HTTP Exchange
  // https://www.chromestatus.com/feature/5126805474246656
  // https://www.chromestatus.com/feature/5126805474246656
-@@ -830,7 +830,7 @@ const base::Feature kSignedExchangeSubresourcePrefetch{
+@@ -836,7 +836,7 @@ const base::Feature kSignedExchangeSubresourcePrefetch{
  // Origin-Signed HTTP Exchanges (for WebPackage Loading)
  // Origin-Signed HTTP Exchanges (for WebPackage Loading)
  // https://www.chromestatus.com/feature/5745285984681984
  // https://www.chromestatus.com/feature/5745285984681984
  const base::Feature kSignedHTTPExchange{"SignedHTTPExchange",
  const base::Feature kSignedHTTPExchange{"SignedHTTPExchange",

+ 10 - 10
build/patches/Disable-text-fragments-by-default.patch

@@ -21,7 +21,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -5585,6 +5585,11 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -5769,6 +5769,11 @@ const FeatureEntry kFeatureEntries[] = {
           "")},
           "")},
  #endif
  #endif
  
  
@@ -36,7 +36,7 @@ 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
 diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
 --- a/chrome/browser/flag-metadata.json
 --- a/chrome/browser/flag-metadata.json
 +++ b/chrome/browser/flag-metadata.json
 +++ b/chrome/browser/flag-metadata.json
-@@ -2501,6 +2501,11 @@
+@@ -2537,6 +2537,11 @@
      "owners": [ "alionadangla", "bwwilliams", "bling-flags@google.com"],
      "owners": [ "alionadangla", "bwwilliams", "bling-flags@google.com"],
      "expiry_milestone": 105
      "expiry_milestone": 105
    },
    },
@@ -51,7 +51,7 @@ diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.js
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -1269,6 +1269,10 @@ const char kEnableRestrictedWebApisDescription[] =
+@@ -1284,6 +1284,10 @@ const char kEnableRestrictedWebApisDescription[] =
      "Enable the restricted web APIs for dev trial. This will be replaced with "
      "Enable the restricted web APIs for dev trial. This will be replaced with "
      "permission policies to control the capabilities afterwards.";
      "permission policies to control the capabilities afterwards.";
  
  
@@ -65,7 +65,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -704,6 +704,9 @@ extern const char
+@@ -714,6 +714,9 @@ extern const char
  extern const char kEnableRestrictedWebApisName[];
  extern const char kEnableRestrictedWebApisName[];
  extern const char kEnableRestrictedWebApisDescription[];
  extern const char kEnableRestrictedWebApisDescription[];
  
  
@@ -90,9 +90,9 @@ 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
 diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc
 --- a/content/child/runtime_features.cc
 --- a/content/child/runtime_features.cc
 +++ b/content/child/runtime_features.cc
 +++ b/content/child/runtime_features.cc
-@@ -275,7 +275,7 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
-      features::kSignedExchangeSubresourcePrefetch},
-     {wf::EnableSkipTouchEventFilter, blink::features::kSkipTouchEventFilter},
+@@ -278,7 +278,7 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
+     {wf::EnableSpeculationRulesPrefetchProxy,
+      blink::features::kSpeculationRulesPrefetchProxy, kSetOnlyIfOverridden},
      {wf::EnableSubresourceWebBundles, features::kSubresourceWebBundles},
      {wf::EnableSubresourceWebBundles, features::kSubresourceWebBundles},
 -    {wf::EnableTextFragmentAnchor, blink::features::kTextFragmentAnchor},
 -    {wf::EnableTextFragmentAnchor, blink::features::kTextFragmentAnchor},
 +    {wf::EnableTextFragmentAnchor, blink::features::kTextFragmentAnchor}, // will set the TextFragmentIdentifiers runtime feature
 +    {wf::EnableTextFragmentAnchor, blink::features::kTextFragmentAnchor}, // will set the TextFragmentIdentifiers runtime feature
@@ -102,7 +102,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.
 diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
 diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
 --- a/third_party/blink/common/features.cc
 --- a/third_party/blink/common/features.cc
 +++ b/third_party/blink/common/features.cc
 +++ b/third_party/blink/common/features.cc
-@@ -449,7 +449,7 @@ const base::Feature kStorageAccessAPI{"StorageAccessAPI",
+@@ -450,7 +450,7 @@ const base::Feature kStorageAccessAPI{"StorageAccessAPI",
  
  
  // Enable text snippets in URL fragments. https://crbug.com/919204.
  // Enable text snippets in URL fragments. https://crbug.com/919204.
  const base::Feature kTextFragmentAnchor{"TextFragmentAnchor",
  const base::Feature kTextFragmentAnchor{"TextFragmentAnchor",
@@ -114,7 +114,7 @@ diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/fea
 diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc
 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
 --- a/third_party/blink/renderer/core/dom/document.cc
 +++ b/third_party/blink/renderer/core/dom/document.cc
 +++ b/third_party/blink/renderer/core/dom/document.cc
-@@ -4169,9 +4169,14 @@ void Document::SetURL(const KURL& url) {
+@@ -4225,9 +4225,14 @@ void Document::SetURL(const KURL& url) {
    TRACE_EVENT1("navigation", "Document::SetURL", "url",
    TRACE_EVENT1("navigation", "Document::SetURL", "url",
                 new_url.GetString().Utf8());
                 new_url.GetString().Utf8());
  
  
@@ -132,7 +132,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
 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
 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
-@@ -2273,8 +2273,7 @@
+@@ -2322,8 +2322,7 @@
      },
      },
      {
      {
        name: "TextFragmentIdentifiers",
        name: "TextFragmentIdentifiers",

+ 2 - 2
build/patches/Disable-third-party-origin-trials.patch

@@ -60,7 +60,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
 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
 --- a/content/browser/renderer_host/navigation_request.cc
 +++ b/content/browser/renderer_host/navigation_request.cc
 +++ b/content/browser/renderer_host/navigation_request.cc
-@@ -7028,7 +7028,6 @@ void NavigationRequest::RestartBackForwardCachedNavigationImpl() {
+@@ -7081,7 +7081,6 @@ void NavigationRequest::RestartBackForwardCachedNavigationImpl() {
  void NavigationRequest::ForceEnableOriginTrials(
  void NavigationRequest::ForceEnableOriginTrials(
      const std::vector<std::string>& trials) {
      const std::vector<std::string>& trials) {
    DCHECK(!HasCommitted());
    DCHECK(!HasCommitted());
@@ -191,7 +191,7 @@ diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_p
    return result;
    return result;
  }
  }
  
  
-@@ -2584,10 +2571,6 @@ void DocumentLoader::CreateParserPostCommit() {
+@@ -2586,10 +2573,6 @@ void DocumentLoader::CreateParserPostCommit() {
            OriginTrialFeature::kTouchEventFeatureDetection);
            OriginTrialFeature::kTouchEventFeatureDetection);
      }
      }
  
  

+ 5 - 26
build/patches/Disable-various-metrics.patch

@@ -10,7 +10,6 @@ Fix startup crash for debug builds (uazo)
 License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 ---
 ---
  .../browser/firstrun/FirstRunActivityBase.java  |  2 +-
  .../browser/firstrun/FirstRunActivityBase.java  |  2 +-
- .../browser/init/StartupTabPreloader.java       | 10 ----------
  .../android/ntp/most_visited_sites_bridge.cc    | 17 -----------------
  .../android/ntp/most_visited_sites_bridge.cc    | 17 -----------------
  chrome/browser/browser_process_impl.cc          |  2 +-
  chrome/browser/browser_process_impl.cc          |  2 +-
  chrome/browser/chrome_content_browser_client.cc | 15 ---------------
  chrome/browser/chrome_content_browser_client.cc | 15 ---------------
@@ -18,7 +17,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
  components/ntp_tiles/BUILD.gn                   |  3 ---
  components/ntp_tiles/BUILD.gn                   |  3 ---
  components/ntp_tiles/most_visited_sites.cc      |  2 --
  components/ntp_tiles/most_visited_sites.cc      |  2 --
  services/metrics/public/cpp/ukm_recorder.cc     |  2 +-
  services/metrics/public/cpp/ukm_recorder.cc     |  2 +-
- 9 files changed, 5 insertions(+), 52 deletions(-)
+ 8 files changed, 5 insertions(+), 42 deletions(-)
 
 
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java
@@ -32,26 +31,6 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstR
  
  
      private boolean mNativeInitialized;
      private boolean mNativeInitialized;
  
  
-diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/StartupTabPreloader.java b/chrome/android/java/src/org/chromium/chrome/browser/init/StartupTabPreloader.java
---- a/chrome/android/java/src/org/chromium/chrome/browser/init/StartupTabPreloader.java
-+++ b/chrome/android/java/src/org/chromium/chrome/browser/init/StartupTabPreloader.java
-@@ -170,16 +170,6 @@ public class StartupTabPreloader implements ProfileManager.Observer, DestroyObse
- 
-     @Override
-     public void onFirstNavigationCommit() {
--        recordDurationFromLoadDecisionIntoPostTabMatchHistogram(
--                "Android.StartupTabPreloader.LoadDecisionToFirstNavigationCommit");
--
--        // We record the metric for navigation start here as well, as we want that metric to be
--        // recorded only for navigations that result in the first navigation commit startup metric
--        // being recorded.
--        assert mFirstNavigationStartMs > 0;
--        recordDurationFromLoadDecisionToEventTimeIntoPreTabMatchHistogram(
--                "Android.StartupTabPreloader.LoadDecisionToFirstNavigationStart",
--                mFirstNavigationStartMs);
-     }
- 
-     @Override
 diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
 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
 --- a/chrome/browser/android/ntp/most_visited_sites_bridge.cc
 +++ b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
 +++ b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
@@ -110,7 +89,7 @@ diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/br
 diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
 diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
 --- a/chrome/browser/browser_process_impl.cc
 --- a/chrome/browser/browser_process_impl.cc
 +++ b/chrome/browser/browser_process_impl.cc
 +++ b/chrome/browser/browser_process_impl.cc
-@@ -984,7 +984,7 @@ void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) {
+@@ -997,7 +997,7 @@ void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) {
  #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
  #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
  
  
    registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled,
    registry->RegisterBooleanPref(metrics::prefs::kMetricsReportingEnabled,
@@ -122,7 +101,7 @@ diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_pro
 diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
 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
 --- a/chrome/browser/chrome_content_browser_client.cc
 +++ b/chrome/browser/chrome_content_browser_client.cc
 +++ b/chrome/browser/chrome_content_browser_client.cc
-@@ -62,7 +62,6 @@
+@@ -63,7 +63,6 @@
  #include "chrome/browser/hid/chrome_hid_delegate.h"
  #include "chrome/browser/hid/chrome_hid_delegate.h"
  #include "chrome/browser/interstitials/enterprise_util.h"
  #include "chrome/browser/interstitials/enterprise_util.h"
  #include "chrome/browser/lifetime/browser_shutdown.h"
  #include "chrome/browser/lifetime/browser_shutdown.h"
@@ -130,7 +109,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
  #include "chrome/browser/media/audio_service_util.h"
  #include "chrome/browser/media/audio_service_util.h"
  #include "chrome/browser/media/router/media_router_feature.h"
  #include "chrome/browser/media/router/media_router_feature.h"
  #include "chrome/browser/media/webrtc/audio_debug_recordings_handler.h"
  #include "chrome/browser/media/webrtc/audio_debug_recordings_handler.h"
-@@ -4222,16 +4221,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
+@@ -4246,16 +4245,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
      content::NavigationHandle* handle) {
      content::NavigationHandle* handle) {
    std::vector<std::unique_ptr<content::NavigationThrottle>> throttles;
    std::vector<std::unique_ptr<content::NavigationThrottle>> throttles;
  
  
@@ -147,7 +126,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
  #if BUILDFLAG(IS_CHROMEOS_ASH)
  #if BUILDFLAG(IS_CHROMEOS_ASH)
    MaybeAddThrottle(
    MaybeAddThrottle(
        ash::WebTimeLimitNavigationThrottle::MaybeCreateThrottleFor(handle),
        ash::WebTimeLimitNavigationThrottle::MaybeCreateThrottleFor(handle),
-@@ -4324,10 +4313,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
+@@ -4348,10 +4337,6 @@ ChromeContentBrowserClient::CreateThrottlesForNavigation(
      throttle_manager->MaybeAppendNavigationThrottles(handle, &throttles);
      throttle_manager->MaybeAppendNavigationThrottles(handle, &throttles);
    }
    }
  
  

+ 1 - 1
build/patches/Do-not-build-API-keys-infobar.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/BUILD.gn b/chrome/browser/ui/BUILD.gn
 diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
 --- a/chrome/browser/ui/BUILD.gn
 --- a/chrome/browser/ui/BUILD.gn
 +++ b/chrome/browser/ui/BUILD.gn
 +++ b/chrome/browser/ui/BUILD.gn
-@@ -1275,8 +1275,6 @@ static_library("ui") {
+@@ -1289,8 +1289,6 @@ static_library("ui") {
        "singleton_tabs.h",
        "singleton_tabs.h",
        "startup/automation_infobar_delegate.cc",
        "startup/automation_infobar_delegate.cc",
        "startup/automation_infobar_delegate.h",
        "startup/automation_infobar_delegate.h",

+ 12 - 12
build/patches/Do-not-compile-QR-code-sharing.patch

@@ -12,7 +12,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java
 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
 --- a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java
-@@ -89,7 +89,6 @@ import org.chromium.chrome.browser.share.ShareButtonController;
+@@ -95,7 +95,6 @@ import org.chromium.chrome.browser.share.ShareButtonController;
  import org.chromium.chrome.browser.share.ShareDelegate;
  import org.chromium.chrome.browser.share.ShareDelegate;
  import org.chromium.chrome.browser.share.ShareDelegate.ShareOrigin;
  import org.chromium.chrome.browser.share.ShareDelegate.ShareOrigin;
  import org.chromium.chrome.browser.share.ShareUtils;
  import org.chromium.chrome.browser.share.ShareUtils;
@@ -20,7 +20,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.share.scroll_capture.ScrollCaptureManager;
  import org.chromium.chrome.browser.tab.AccessibilityVisibilityHandler;
  import org.chromium.chrome.browser.tab.AccessibilityVisibilityHandler;
  import org.chromium.chrome.browser.tab.AutofillSessionLifetimeController;
  import org.chromium.chrome.browser.tab.AutofillSessionLifetimeController;
-@@ -453,10 +452,6 @@ public class RootUiCoordinator
+@@ -484,10 +483,6 @@ public class RootUiCoordinator
      }
      }
  
  
      public void onAttachFragment(Fragment fragment) {
      public void onAttachFragment(Fragment fragment) {
@@ -34,25 +34,25 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordi
 diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/share_sheet/ChromeProvidedSharingOptionsProvider.java b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/share_sheet/ChromeProvidedSharingOptionsProvider.java
 diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/share_sheet/ChromeProvidedSharingOptionsProvider.java b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/share_sheet/ChromeProvidedSharingOptionsProvider.java
 --- a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/share_sheet/ChromeProvidedSharingOptionsProvider.java
 --- a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/share_sheet/ChromeProvidedSharingOptionsProvider.java
 +++ b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/share_sheet/ChromeProvidedSharingOptionsProvider.java
 +++ b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/share_sheet/ChromeProvidedSharingOptionsProvider.java
-@@ -29,7 +29,6 @@ import org.chromium.chrome.browser.share.ChromeShareExtras.DetailedContentType;
+@@ -31,7 +31,6 @@ import org.chromium.chrome.browser.share.ChromeShareExtras.DetailedContentType;
  import org.chromium.chrome.browser.share.SaveBitmapDelegate;
  import org.chromium.chrome.browser.share.SaveBitmapDelegate;
  import org.chromium.chrome.browser.share.link_to_text.LinkToTextCoordinator.LinkGeneration;
  import org.chromium.chrome.browser.share.link_to_text.LinkToTextCoordinator.LinkGeneration;
  import org.chromium.chrome.browser.share.long_screenshots.LongScreenshotsCoordinator;
  import org.chromium.chrome.browser.share.long_screenshots.LongScreenshotsCoordinator;
 -import org.chromium.chrome.browser.share.qrcode.QrCodeCoordinator;
 -import org.chromium.chrome.browser.share.qrcode.QrCodeCoordinator;
  import org.chromium.chrome.browser.share.screenshot.ScreenshotCoordinator;
  import org.chromium.chrome.browser.share.screenshot.ScreenshotCoordinator;
+ 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.send_tab_to_self.SendTabToSelfCoordinator;
- import org.chromium.chrome.browser.share.share_sheet.ShareSheetLinkToggleMetricsHelper.LinkToggleMetricsDetails;
-@@ -300,9 +299,6 @@ public class ChromeProvidedSharingOptionsProvider {
-         mOrderedFirstPartyOptions.add(createCopyFirstPartyOption());
-         mOrderedFirstPartyOptions.add(createCopyTextFirstPartyOption());
-         mOrderedFirstPartyOptions.add(createSendTabToSelfFirstPartyOption());
+@@ -311,9 +310,6 @@ public class ChromeProvidedSharingOptionsProvider {
+                 || !ChromeFeatureList.isEnabled(ChromeFeatureList.SEND_TAB_TO_SELF_SIGNIN_PROMO)) {
+             mOrderedFirstPartyOptions.add(createSendTabToSelfFirstPartyOption());
+         }
 -        if (!mIsIncognito) {
 -        if (!mIsIncognito) {
 -            mOrderedFirstPartyOptions.add(createQrCodeFirstPartyOption());
 -            mOrderedFirstPartyOptions.add(createQrCodeFirstPartyOption());
 -        }
 -        }
-         if (mTabProvider.hasValue()
-                 && UserPrefs.get(Profile.getLastUsedRegularProfile())
-                            .getBoolean(Pref.PRINTING_ENABLED)) {
-@@ -447,21 +443,6 @@ public class ChromeProvidedSharingOptionsProvider {
+         if (mTabProvider.hasValue() && UserPrefs.get(mProfile).getBoolean(Pref.PRINTING_ENABLED)) {
+             mOrderedFirstPartyOptions.add(createPrintingFirstPartyOption());
+         }
+@@ -456,21 +452,6 @@ public class ChromeProvidedSharingOptionsProvider {
                  .build();
                  .build();
      }
      }
  
  

+ 1 - 1
build/patches/Do-not-hide-component-extensions.patch

@@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc
 diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc
 --- a/extensions/common/extension.cc
 --- a/extensions/common/extension.cc
 +++ b/extensions/common/extension.cc
 +++ b/extensions/common/extension.cc
-@@ -457,9 +457,8 @@ bool Extension::ShouldDisplayInNewTabPage() const {
+@@ -459,9 +459,8 @@ bool Extension::ShouldDisplayInNewTabPage() const {
  }
  }
  
  
  bool Extension::ShouldExposeViaManagementAPI() const {
  bool Extension::ShouldExposeViaManagementAPI() const {

+ 2 - 2
build/patches/Do-not-link-with-libatomic.patch

@@ -15,8 +15,8 @@ diff --git a/base/BUILD.gn b/base/BUILD.gn
 --- a/base/BUILD.gn
 --- a/base/BUILD.gn
 +++ b/base/BUILD.gn
 +++ b/base/BUILD.gn
 @@ -1498,7 +1498,7 @@ mixed_component("base") {
 @@ -1498,7 +1498,7 @@ mixed_component("base") {
-   if (!use_sysroot &&
-       (is_android || ((is_linux || is_chromeos) && !is_chromecast)) &&
+   # more robust check for this.
+   if (!use_sysroot && (is_android || is_chromeos || (is_linux && !is_castos)) &&
        host_toolchain != "//build/toolchain/cros:host") {
        host_toolchain != "//build/toolchain/cros:host") {
 -    libs += [ "atomic" ]
 -    libs += [ "atomic" ]
 +    #libs += [ "atomic" ]
 +    #libs += [ "atomic" ]

+ 1 - 1
build/patches/DoH-improvements.patch

@@ -82,7 +82,7 @@ diff --git a/net/dns/dns_client.cc b/net/dns/dns_client.cc
 diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc
 diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc
 --- a/net/dns/host_resolver_manager.cc
 --- a/net/dns/host_resolver_manager.cc
 +++ b/net/dns/host_resolver_manager.cc
 +++ b/net/dns/host_resolver_manager.cc
-@@ -3313,6 +3313,7 @@ void HostResolverManager::SetDnsConfigOverrides(DnsConfigOverrides overrides) {
+@@ -3302,6 +3302,7 @@ void HostResolverManager::SetDnsConfigOverrides(DnsConfigOverrides overrides) {
    bool changed = dns_client_->SetConfigOverrides(std::move(overrides));
    bool changed = dns_client_->SetConfigOverrides(std::move(overrides));
  
  
    if (changed) {
    if (changed) {

+ 10 - 10
build/patches/Enable-Certificate-Transparency.patch

@@ -22,7 +22,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -8189,6 +8189,11 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -8457,6 +8457,11 @@ const FeatureEntry kFeatureEntries[] = {
       flag_descriptions::kWebMidiDescription, kOsAll,
       flag_descriptions::kWebMidiDescription, kOsAll,
       FEATURE_VALUE_TYPE(features::kWebMidi)},
       FEATURE_VALUE_TYPE(features::kWebMidi)},
  #if BUILDFLAG(IS_ANDROID)
  #if BUILDFLAG(IS_ANDROID)
@@ -37,7 +37,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/browser_features.cc b/chrome/browser/browser_features.cc
 diff --git a/chrome/browser/browser_features.cc b/chrome/browser/browser_features.cc
 --- a/chrome/browser/browser_features.cc
 --- a/chrome/browser/browser_features.cc
 +++ b/chrome/browser/browser_features.cc
 +++ b/chrome/browser/browser_features.cc
-@@ -146,7 +146,7 @@ const base::Feature kWebUsbDeviceDetection{"WebUsbDeviceDetection",
+@@ -138,7 +138,7 @@ const base::Feature kWebUsbDeviceDetection{"WebUsbDeviceDetection",
  #if BUILDFLAG(IS_ANDROID)
  #if BUILDFLAG(IS_ANDROID)
  // Enables Certificate Transparency on Android.
  // Enables Certificate Transparency on Android.
  const base::Feature kCertificateTransparencyAndroid{
  const base::Feature kCertificateTransparencyAndroid{
@@ -49,7 +49,7 @@ diff --git a/chrome/browser/browser_features.cc b/chrome/browser/browser_feature
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -5983,6 +5983,10 @@ const char kAutofillCreditCardUploadDescription[] =
+@@ -6136,6 +6136,10 @@ const char kAutofillCreditCardUploadDescription[] =
  #endif  // defined(TOOLKIT_VIEWS) || BUILDFLAG(IS_ANDROID)
  #endif  // defined(TOOLKIT_VIEWS) || BUILDFLAG(IS_ANDROID)
  
  
  #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID)
  #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID)
@@ -63,7 +63,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -3467,6 +3467,9 @@ extern const char kAutofillCreditCardUploadDescription[];
+@@ -3555,6 +3555,9 @@ extern const char kAutofillCreditCardUploadDescription[];
  #endif  // defined(TOOLKIT_VIEWS) || BUILDFLAG(IS_ANDROID)
  #endif  // defined(TOOLKIT_VIEWS) || BUILDFLAG(IS_ANDROID)
  
  
  #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID)
  #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID)
@@ -76,7 +76,7 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
 diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc
 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
 --- a/chrome/browser/net/system_network_context_manager.cc
 +++ b/chrome/browser/net/system_network_context_manager.cc
 +++ b/chrome/browser/net/system_network_context_manager.cc
-@@ -885,7 +885,6 @@ void SystemNetworkContextManager::SetEnableCertificateTransparencyForTesting(
+@@ -893,7 +893,6 @@ void SystemNetworkContextManager::SetEnableCertificateTransparencyForTesting(
  bool SystemNetworkContextManager::IsCertificateTransparencyEnabled() {
  bool SystemNetworkContextManager::IsCertificateTransparencyEnabled() {
    if (certificate_transparency_enabled_for_testing_.has_value())
    if (certificate_transparency_enabled_for_testing_.has_value())
      return certificate_transparency_enabled_for_testing_.value();
      return certificate_transparency_enabled_for_testing_.value();
@@ -84,7 +84,7 @@ diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/brows
  // TODO(carlosil): Figure out if we can/should remove the OFFICIAL_BUILD and
  // TODO(carlosil): Figure out if we can/should remove the OFFICIAL_BUILD and
  // GOOGLE_CHROME_BRANDING checks now that enforcement does not rely on build
  // GOOGLE_CHROME_BRANDING checks now that enforcement does not rely on build
  // dates, and allow embedders to enforce.
  // dates, and allow embedders to enforce.
-@@ -899,9 +898,6 @@ bool SystemNetworkContextManager::IsCertificateTransparencyEnabled() {
+@@ -907,9 +906,6 @@ bool SystemNetworkContextManager::IsCertificateTransparencyEnabled() {
  #else
  #else
    return true;
    return true;
  #endif
  #endif
@@ -112,7 +112,7 @@ diff --git a/chrome/browser/ssl/sct_reporting_service.cc b/chrome/browser/ssl/sc
 diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
 diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
 --- a/chrome/common/chrome_features.cc
 --- a/chrome/common/chrome_features.cc
 +++ b/chrome/common/chrome_features.cc
 +++ b/chrome/common/chrome_features.cc
-@@ -859,9 +859,9 @@ const base::Feature kSchedulerConfiguration{"SchedulerConfiguration",
+@@ -853,9 +853,9 @@ const base::Feature kSchedulerConfiguration{"SchedulerConfiguration",
  
  
  // Controls whether SCT audit reports are queued and the rate at which they
  // Controls whether SCT audit reports are queued and the rate at which they
  // should be sampled. Default sampling rate is 1/10,000 certificates.
  // should be sampled. Default sampling rate is 1/10,000 certificates.
@@ -166,7 +166,7 @@ diff --git a/net/url_request/report_sender.cc b/net/url_request/report_sender.cc
 diff --git a/services/network/network_context.cc b/services/network/network_context.cc
 diff --git a/services/network/network_context.cc b/services/network/network_context.cc
 --- a/services/network/network_context.cc
 --- a/services/network/network_context.cc
 +++ b/services/network/network_context.cc
 +++ b/services/network/network_context.cc
-@@ -2631,7 +2631,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
+@@ -2635,7 +2635,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
    // TransportSecurityState.  Since no requests have been made yet, safe to do
    // TransportSecurityState.  Since no requests have been made yet, safe to do
    // this even after the call to Build().
    // this even after the call to Build().
  
  
@@ -178,7 +178,7 @@ diff --git a/services/network/network_context.cc b/services/network/network_cont
 diff --git a/services/network/sct_auditing/sct_auditing_handler.cc b/services/network/sct_auditing/sct_auditing_handler.cc
 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
 --- a/services/network/sct_auditing/sct_auditing_handler.cc
 +++ b/services/network/sct_auditing/sct_auditing_handler.cc
 +++ b/services/network/sct_auditing/sct_auditing_handler.cc
-@@ -108,6 +108,7 @@ void SCTAuditingHandler::MaybeEnqueueReport(
+@@ -113,6 +113,7 @@ void SCTAuditingHandler::MaybeEnqueueReport(
    if (mode_ == mojom::SCTAuditingMode::kDisabled) {
    if (mode_ == mojom::SCTAuditingMode::kDisabled) {
      return;
      return;
    }
    }
@@ -186,7 +186,7 @@ diff --git a/services/network/sct_auditing/sct_auditing_handler.cc b/services/ne
  
  
    // Only audit valid SCTs. This ensures that they come from a known log, have
    // Only audit valid SCTs. This ensures that they come from a known log, have
    // a valid signature, and thus are expected to be public certificates. If
    // a valid signature, and thus are expected to be public certificates. If
-@@ -297,6 +298,7 @@ void SCTAuditingHandler::AddReporter(
+@@ -317,6 +318,7 @@ void SCTAuditingHandler::AddReporter(
    if (mode_ == mojom::SCTAuditingMode::kDisabled) {
    if (mode_ == mojom::SCTAuditingMode::kDisabled) {
      return;
      return;
    }
    }

+ 1 - 1
build/patches/Enable-SPPI-for-devices-with-enough-memory.patch

@@ -11,7 +11,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
 diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
 --- a/chrome/common/chrome_features.cc
 --- a/chrome/common/chrome_features.cc
 +++ b/chrome/common/chrome_features.cc
 +++ b/chrome/common/chrome_features.cc
-@@ -915,11 +915,7 @@ const base::Feature kSharesheetCopyToClipboard{
+@@ -909,11 +909,7 @@ const base::Feature kSharesheetCopyToClipboard{
  // browser_features, as they are only used on the browser side.
  // browser_features, as they are only used on the browser side.
  const base::Feature kSitePerProcess {
  const base::Feature kSitePerProcess {
    "SitePerProcess",
    "SitePerProcess",

+ 6 - 6
build/patches/Enable-StrictOriginIsolation-and-SitePerProcess.patch

@@ -18,7 +18,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -4053,9 +4053,6 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -4212,9 +4212,6 @@ const FeatureEntry kFeatureEntries[] = {
       flag_descriptions::kSiteIsolationForPasswordSitesDescription, kOsAndroid,
       flag_descriptions::kSiteIsolationForPasswordSitesDescription, kOsAndroid,
       FEATURE_VALUE_TYPE(
       FEATURE_VALUE_TYPE(
           site_isolation::features::kSiteIsolationForPasswordSites)},
           site_isolation::features::kSiteIsolationForPasswordSites)},
@@ -26,12 +26,12 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 -     flag_descriptions::kStrictSiteIsolationDescription, kOsAndroid,
 -     flag_descriptions::kStrictSiteIsolationDescription, kOsAndroid,
 -     SINGLE_VALUE_TYPE(switches::kSitePerProcess)},
 -     SINGLE_VALUE_TYPE(switches::kSitePerProcess)},
  #endif
  #endif
-     {"isolate-origins", flag_descriptions::kIsolateOriginsName,
-      flag_descriptions::kIsolateOriginsDescription, kOsAll,
+     {"install-isolated-apps-at-startup",
+      flag_descriptions::kInstallIssolatedAppsAtStartup,
 diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
 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
 --- a/chrome/browser/chrome_content_browser_client.cc
 +++ b/chrome/browser/chrome_content_browser_client.cc
 +++ b/chrome/browser/chrome_content_browser_client.cc
-@@ -1304,7 +1304,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
+@@ -1310,7 +1310,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
    registry->RegisterFilePathPref(prefs::kDiskCacheDir, base::FilePath());
    registry->RegisterFilePathPref(prefs::kDiskCacheDir, base::FilePath());
    registry->RegisterIntegerPref(prefs::kDiskCacheSize, 0);
    registry->RegisterIntegerPref(prefs::kDiskCacheSize, 0);
    registry->RegisterStringPref(prefs::kIsolateOrigins, std::string());
    registry->RegisterStringPref(prefs::kIsolateOrigins, std::string());
@@ -40,7 +40,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
    registry->RegisterBooleanPref(prefs::kTabFreezingEnabled, true);
    registry->RegisterBooleanPref(prefs::kTabFreezingEnabled, true);
    registry->RegisterIntegerPref(prefs::kSCTAuditingHashdanceReportCount, 0);
    registry->RegisterIntegerPref(prefs::kSCTAuditingHashdanceReportCount, 0);
  }
  }
-@@ -1318,7 +1318,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs(
+@@ -1324,7 +1324,7 @@ void ChromeContentBrowserClient::RegisterProfilePrefs(
    // user policy in addition to the same named ones in Local State (which are
    // user policy in addition to the same named ones in Local State (which are
    // used for mapping the command-line flags).
    // used for mapping the command-line flags).
    registry->RegisterStringPref(prefs::kIsolateOrigins, std::string());
    registry->RegisterStringPref(prefs::kIsolateOrigins, std::string());
@@ -71,7 +71,7 @@ diff --git a/components/site_isolation/site_isolation_policy.cc b/components/sit
 diff --git a/content/public/common/content_features.cc b/content/public/common/content_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
 --- a/content/public/common/content_features.cc
 +++ b/content/public/common/content_features.cc
 +++ b/content/public/common/content_features.cc
-@@ -927,7 +927,7 @@ const base::Feature kStopVideoCaptureOnScreenLock{
+@@ -933,7 +933,7 @@ const base::Feature kStopVideoCaptureOnScreenLock{
  // Controls whether site isolation should use origins instead of scheme and
  // Controls whether site isolation should use origins instead of scheme and
  // eTLD+1.
  // eTLD+1.
  const base::Feature kStrictOriginIsolation{"StrictOriginIsolation",
  const base::Feature kStrictOriginIsolation{"StrictOriginIsolation",

+ 1 - 1
build/patches/Enable-darken-websites-checkbox-in-themes.patch

@@ -13,7 +13,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
 diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
 --- a/chrome/browser/flag-metadata.json
 --- a/chrome/browser/flag-metadata.json
 +++ b/chrome/browser/flag-metadata.json
 +++ b/chrome/browser/flag-metadata.json
-@@ -1099,9 +1099,9 @@
+@@ -1084,9 +1084,9 @@
      "expiry_milestone": 110
      "expiry_milestone": 110
    },
    },
    {
    {

+ 41 - 41
build/patches/Enable-native-Android-autofill.patch

@@ -20,7 +20,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
  .../settings/PasswordSettings.java            | 81 ++++++++++++++++++-
  .../settings/PasswordSettings.java            | 81 ++++++++++++++++++-
  .../chromium/chrome/browser/tab/TabImpl.java  | 50 ++++++++++++
  .../chromium/chrome/browser/tab/TabImpl.java  | 50 ++++++++++++
  .../browser/tab/TabViewAndroidDelegate.java   | 14 ++++
  .../browser/tab/TabViewAndroidDelegate.java   | 14 ++++
- chrome/browser/BUILD.gn                       |  8 ++
+ chrome/browser/BUILD.gn                       |  7 ++
  chrome/browser/android/tab_android.cc         | 23 ++++++
  chrome/browser/android/tab_android.cc         | 23 ++++++
  chrome/browser/android/tab_android.h          |  2 +
  chrome/browser/android/tab_android.h          |  2 +
  .../tab_web_contents_delegate_android.cc      |  3 +-
  .../tab_web_contents_delegate_android.cc      |  3 +-
@@ -28,7 +28,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
  chrome/browser/ui/tab_helpers.cc              |  6 +-
  chrome/browser/ui/tab_helpers.cc              |  6 +-
  .../browser/android_autofill_manager.cc       |  2 +-
  .../browser/android_autofill_manager.cc       |  2 +-
  .../browser/android_autofill_manager.h        | 10 +--
  .../browser/android_autofill_manager.h        | 10 +--
- .../browser/content_autofill_driver.cc        | 29 +++++++
+ .../browser/content_autofill_driver.cc        | 30 +++++++
  .../content/browser/content_autofill_driver.h |  9 ++-
  .../content/browser/content_autofill_driver.h |  9 ++-
  .../content_autofill_driver_factory.cc        |  7 +-
  .../content_autofill_driver_factory.cc        |  7 +-
  .../browser/content_autofill_driver_factory.h |  1 +
  .../browser/content_autofill_driver_factory.h |  1 +
@@ -55,7 +55,7 @@ diff --git a/android_webview/browser/aw_contents.cc b/android_webview/browser/aw
 diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
 diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
 --- a/chrome/android/BUILD.gn
 --- a/chrome/android/BUILD.gn
 +++ b/chrome/android/BUILD.gn
 +++ b/chrome/android/BUILD.gn
-@@ -459,6 +459,7 @@ android_library("chrome_java") {
+@@ -464,6 +464,7 @@ android_library("chrome_java") {
      "//components/autofill_assistant/android:public_dependencies_java",
      "//components/autofill_assistant/android:public_dependencies_java",
      "//components/autofill_assistant/android:public_java",
      "//components/autofill_assistant/android:public_java",
      "//components/autofill_assistant/browser:proto_java",
      "//components/autofill_assistant/browser:proto_java",
@@ -218,7 +218,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav
      /**
      /**
       * Creates an instance of a {@link TabImpl}.
       * Creates an instance of a {@link TabImpl}.
       *
       *
-@@ -747,6 +760,11 @@ public class TabImpl implements Tab, TabObscuringHandler.Observer {
+@@ -748,6 +761,11 @@ public class TabImpl implements Tab, TabObscuringHandler.Observer {
          for (TabObserver observer : mObservers) observer.onDestroyed(this);
          for (TabObserver observer : mObservers) observer.onDestroyed(this);
          mObservers.clear();
          mObservers.clear();
  
  
@@ -230,7 +230,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav
          mUserDataHost.destroy();
          mUserDataHost.destroy();
          mTabViewManager.destroy();
          mTabViewManager.destroy();
          hideNativePage(false, null);
          hideNativePage(false, null);
-@@ -1328,6 +1346,16 @@ public class TabImpl implements Tab, TabObscuringHandler.Observer {
+@@ -1329,6 +1347,16 @@ public class TabImpl implements Tab, TabObscuringHandler.Observer {
          return tabsPtrArray;
          return tabsPtrArray;
      }
      }
  
  
@@ -247,7 +247,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav
      /**
      /**
       * Initializes the {@link WebContents}. Completes the browser content components initialization
       * Initializes the {@link WebContents}. Completes the browser content components initialization
       * around a native WebContents pointer.
       * around a native WebContents pointer.
-@@ -1377,6 +1405,27 @@ public class TabImpl implements Tab, TabObscuringHandler.Observer {
+@@ -1378,6 +1406,27 @@ public class TabImpl implements Tab, TabObscuringHandler.Observer {
                              mDelegateFactory.createContextMenuPopulatorFactory(this), this));
                              mDelegateFactory.createContextMenuPopulatorFactory(this), this));
  
  
              mWebContents.notifyRendererPreferenceUpdate();
              mWebContents.notifyRendererPreferenceUpdate();
@@ -285,7 +285,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.jav
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndroidDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndroidDelegate.java
 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
 --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndroidDelegate.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndroidDelegate.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndroidDelegate.java
-@@ -19,6 +19,10 @@ import org.chromium.ui.base.WindowAndroid;
+@@ -31,6 +31,10 @@ import org.chromium.ui.dragdrop.DragAndDropBrowserDelegate;
  import org.chromium.ui.dragdrop.DragStateTracker;
  import org.chromium.ui.dragdrop.DragStateTracker;
  import org.chromium.ui.dragdrop.DropDataContentProvider;
  import org.chromium.ui.dragdrop.DropDataContentProvider;
  
  
@@ -296,8 +296,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndr
  /**
  /**
   * Implementation of the abstract class {@link ViewAndroidDelegate} for Chrome.
   * Implementation of the abstract class {@link ViewAndroidDelegate} for Chrome.
   */
   */
-@@ -149,4 +153,14 @@ public class TabViewAndroidDelegate extends ViewAndroidDelegate {
-             getContentView().removeOnDragListener(getDragStateTracker());
+@@ -212,4 +216,14 @@ public class TabViewAndroidDelegate extends ViewAndroidDelegate {
+             return intent;
          }
          }
      }
      }
 +
 +
@@ -314,11 +314,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndr
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
 --- a/chrome/browser/BUILD.gn
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -2432,6 +2432,14 @@ static_library("browser") {
-     "//ui/web_dialogs",
-     "//ui/webui",
-   ]
-+
+@@ -2448,6 +2448,13 @@ static_library("browser") {
+     deps += [ "//chrome/browser/error_reporting" ]
+   }
+ 
 +  if (is_android) {
 +  if (is_android) {
 +    deps += [
 +    deps += [
 +        "//components/android_autofill/browser",
 +        "//components/android_autofill/browser",
@@ -326,9 +325,9 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
 +    ]
 +    ]
 +  }
 +  }
 +
 +
-   if (is_chromeos_ash) {
-     sources += [
-       "apps/digital_goods/digital_goods_factory_impl.cc",
+   if (use_ozone) {
+     deps += [
+       "//ui/events/ozone",
 diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc
 diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc
 --- a/chrome/browser/android/tab_android.cc
 --- a/chrome/browser/android/tab_android.cc
 +++ b/chrome/browser/android/tab_android.cc
 +++ b/chrome/browser/android/tab_android.cc
@@ -346,7 +345,7 @@ diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_
  using base::android::AttachCurrentThread;
  using base::android::AttachCurrentThread;
  using base::android::ConvertUTF8ToJavaString;
  using base::android::ConvertUTF8ToJavaString;
  using base::android::JavaParamRef;
  using base::android::JavaParamRef;
-@@ -447,3 +454,19 @@ static void JNI_TabImpl_Init(JNIEnv* env, const JavaParamRef<jobject>& obj) {
+@@ -446,3 +453,19 @@ static void JNI_TabImpl_Init(JNIEnv* env, const JavaParamRef<jobject>& obj) {
    // This will automatically bind to the Java object and pass ownership there.
    // This will automatically bind to the Java object and pass ownership there.
    new TabAndroid(env, obj);
    new TabAndroid(env, obj);
  }
  }
@@ -369,7 +368,7 @@ diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_
 diff --git a/chrome/browser/android/tab_android.h b/chrome/browser/android/tab_android.h
 diff --git a/chrome/browser/android/tab_android.h b/chrome/browser/android/tab_android.h
 --- a/chrome/browser/android/tab_android.h
 --- a/chrome/browser/android/tab_android.h
 +++ b/chrome/browser/android/tab_android.h
 +++ b/chrome/browser/android/tab_android.h
-@@ -154,6 +154,8 @@ class TabAndroid : public base::SupportsUserData {
+@@ -153,6 +153,8 @@ class TabAndroid : public base::SupportsUserData {
  
  
    void SetDevToolsAgentHost(scoped_refptr<content::DevToolsAgentHost> host);
    void SetDevToolsAgentHost(scoped_refptr<content::DevToolsAgentHost> host);
  
  
@@ -394,7 +393,7 @@ diff --git a/chrome/browser/android/tab_web_contents_delegate_android.cc b/chrom
 diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 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
 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
-@@ -602,6 +602,12 @@ CHAR_LIMIT guidelines:
+@@ -605,6 +605,12 @@ CHAR_LIMIT guidelines:
        <message name="IDS_PASSWORD_SETTINGS_SAVE_PASSWORDS" desc="Title for the checkbox toggling whether passwords are saved or not. [CHAR_LIMIT=32]">
        <message name="IDS_PASSWORD_SETTINGS_SAVE_PASSWORDS" desc="Title for the checkbox toggling whether passwords are saved or not. [CHAR_LIMIT=32]">
          Save passwords
          Save passwords
        </message>
        </message>
@@ -410,7 +409,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
 diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
 diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
 --- a/chrome/browser/ui/tab_helpers.cc
 --- a/chrome/browser/ui/tab_helpers.cc
 +++ b/chrome/browser/ui/tab_helpers.cc
 +++ b/chrome/browser/ui/tab_helpers.cc
-@@ -163,6 +163,9 @@
+@@ -165,6 +165,9 @@
  #include "chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_android.h"
  #include "chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_android.h"
  #include "chrome/browser/video_tutorials/video_tutorial_tab_helper.h"
  #include "chrome/browser/video_tutorials/video_tutorial_tab_helper.h"
  #include "content/public/common/content_features.h"
  #include "content/public/common/content_features.h"
@@ -420,7 +419,7 @@ diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
  #else
  #else
  #include "chrome/browser/accuracy_tips/accuracy_service_factory.h"
  #include "chrome/browser/accuracy_tips/accuracy_service_factory.h"
  #include "chrome/browser/banners/app_banner_manager_desktop.h"
  #include "chrome/browser/banners/app_banner_manager_desktop.h"
-@@ -317,7 +320,8 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
+@@ -319,7 +322,8 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
        base::BindRepeating(
        base::BindRepeating(
            &autofill::BrowserDriverInitHook,
            &autofill::BrowserDriverInitHook,
            autofill::ChromeAutofillClient::FromWebContents(web_contents),
            autofill::ChromeAutofillClient::FromWebContents(web_contents),
@@ -471,7 +470,7 @@ diff --git a/components/android_autofill/browser/android_autofill_manager.h b/co
 diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/components/autofill/content/browser/content_autofill_driver.cc
 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
 --- a/components/autofill/content/browser/content_autofill_driver.cc
 +++ b/components/autofill/content/browser/content_autofill_driver.cc
 +++ b/components/autofill/content/browser/content_autofill_driver.cc
-@@ -289,6 +289,8 @@ void ContentAutofillDriver::FormsSeenImpl(
+@@ -284,6 +284,8 @@ void ContentAutofillDriver::FormsSeenImpl(
      const std::vector<FormData>& updated_forms,
      const std::vector<FormData>& updated_forms,
      const std::vector<FormGlobalId>& removed_forms) {
      const std::vector<FormGlobalId>& removed_forms) {
    autofill_manager_->OnFormsSeen(updated_forms, removed_forms);
    autofill_manager_->OnFormsSeen(updated_forms, removed_forms);
@@ -480,7 +479,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co
  }
  }
  
  
  void ContentAutofillDriver::SetFormToBeProbablySubmittedImpl(
  void ContentAutofillDriver::SetFormToBeProbablySubmittedImpl(
-@@ -311,6 +313,8 @@ void ContentAutofillDriver::FormSubmittedImpl(const FormData& form,
+@@ -306,6 +308,8 @@ void ContentAutofillDriver::FormSubmittedImpl(const FormData& form,
    }
    }
  
  
    autofill_manager_->OnFormSubmitted(form, known_success, source);
    autofill_manager_->OnFormSubmitted(form, known_success, source);
@@ -489,7 +488,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co
  }
  }
  
  
  void ContentAutofillDriver::TextFieldDidChangeImpl(
  void ContentAutofillDriver::TextFieldDidChangeImpl(
-@@ -319,6 +323,8 @@ void ContentAutofillDriver::TextFieldDidChangeImpl(
+@@ -314,6 +318,8 @@ void ContentAutofillDriver::TextFieldDidChangeImpl(
      const gfx::RectF& bounding_box,
      const gfx::RectF& bounding_box,
      base::TimeTicks timestamp) {
      base::TimeTicks timestamp) {
    autofill_manager_->OnTextFieldDidChange(form, field, bounding_box, timestamp);
    autofill_manager_->OnTextFieldDidChange(form, field, bounding_box, timestamp);
@@ -498,7 +497,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co
  }
  }
  
  
  void ContentAutofillDriver::TextFieldDidScrollImpl(
  void ContentAutofillDriver::TextFieldDidScrollImpl(
-@@ -326,6 +332,8 @@ void ContentAutofillDriver::TextFieldDidScrollImpl(
+@@ -321,6 +327,8 @@ void ContentAutofillDriver::TextFieldDidScrollImpl(
      const FormFieldData& field,
      const FormFieldData& field,
      const gfx::RectF& bounding_box) {
      const gfx::RectF& bounding_box) {
    autofill_manager_->OnTextFieldDidScroll(form, field, bounding_box);
    autofill_manager_->OnTextFieldDidScroll(form, field, bounding_box);
@@ -507,7 +506,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co
  }
  }
  
  
  void ContentAutofillDriver::SelectControlDidChangeImpl(
  void ContentAutofillDriver::SelectControlDidChangeImpl(
-@@ -333,6 +341,8 @@ void ContentAutofillDriver::SelectControlDidChangeImpl(
+@@ -328,6 +336,8 @@ void ContentAutofillDriver::SelectControlDidChangeImpl(
      const FormFieldData& field,
      const FormFieldData& field,
      const gfx::RectF& bounding_box) {
      const gfx::RectF& bounding_box) {
    autofill_manager_->OnSelectControlDidChange(form, field, bounding_box);
    autofill_manager_->OnSelectControlDidChange(form, field, bounding_box);
@@ -516,13 +515,14 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co
  }
  }
  
  
  void ContentAutofillDriver::AskForValuesToFillImpl(
  void ContentAutofillDriver::AskForValuesToFillImpl(
-@@ -343,15 +353,22 @@ void ContentAutofillDriver::AskForValuesToFillImpl(
-     bool autoselect_first_suggestion) {
-   autofill_manager_->OnAskForValuesToFill(id, form, field, bounding_box,
-                                           autoselect_first_suggestion);
+@@ -340,15 +350,23 @@ void ContentAutofillDriver::AskForValuesToFillImpl(
+   autofill_manager_->OnAskForValuesToFill(query_id, form, field, bounding_box,
+                                           autoselect_first_suggestion,
+                                           touch_to_fill_eligible);
 +  if (secondary_autofill_manager_)
 +  if (secondary_autofill_manager_)
-+    secondary_autofill_manager_->OnAskForValuesToFill(id, form, field, bounding_box,
-+                                          autoselect_first_suggestion);
++    secondary_autofill_manager_->OnAskForValuesToFill(query_id, form, field, bounding_box,
++                                          autoselect_first_suggestion,
++                                          touch_to_fill_eligible);
  }
  }
  
  
  void ContentAutofillDriver::HidePopupImpl() {
  void ContentAutofillDriver::HidePopupImpl() {
@@ -539,7 +539,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co
  }
  }
  
  
  void ContentAutofillDriver::FocusOnFormFieldImpl(
  void ContentAutofillDriver::FocusOnFormFieldImpl(
-@@ -359,25 +376,35 @@ void ContentAutofillDriver::FocusOnFormFieldImpl(
+@@ -356,25 +374,35 @@ void ContentAutofillDriver::FocusOnFormFieldImpl(
      const FormFieldData& field,
      const FormFieldData& field,
      const gfx::RectF& bounding_box) {
      const gfx::RectF& bounding_box) {
    autofill_manager_->OnFocusOnFormField(form, field, bounding_box);
    autofill_manager_->OnFocusOnFormField(form, field, bounding_box);
@@ -574,8 +574,8 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/co
 +    secondary_autofill_manager_->SelectFieldOptionsDidChange(form);
 +    secondary_autofill_manager_->SelectFieldOptionsDidChange(form);
  }
  }
  
  
- void ContentAutofillDriver::FillFormForAssistantImpl(
-@@ -597,6 +624,8 @@ void ContentAutofillDriver::DidNavigateFrame(
+ void ContentAutofillDriver::JavaScriptChangedAutofilledValueImpl(
+@@ -615,6 +643,8 @@ void ContentAutofillDriver::DidNavigateFrame(
    if (autofill_router_)  // Can be nullptr only in tests.
    if (autofill_router_)  // Can be nullptr only in tests.
      autofill_router_->UnregisterDriver(this);
      autofill_router_->UnregisterDriver(this);
    autofill_manager_->Reset();
    autofill_manager_->Reset();
@@ -603,7 +603,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver.h b/com
  
  
    void BindPendingReceiver(
    void BindPendingReceiver(
        mojo::PendingAssociatedReceiver<mojom::AutofillDriver> pending_receiver);
        mojo::PendingAssociatedReceiver<mojom::AutofillDriver> pending_receiver);
-@@ -377,6 +380,10 @@ class ContentAutofillDriver : public AutofillDriver,
+@@ -384,6 +387,10 @@ class ContentAutofillDriver : public AutofillDriver,
    // code.
    // code.
    std::unique_ptr<AutofillManager> autofill_manager_ = nullptr;
    std::unique_ptr<AutofillManager> autofill_manager_ = nullptr;
  
  
@@ -655,7 +655,7 @@ diff --git a/components/autofill/content/browser/content_autofill_driver_factory
 diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc
 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
 --- a/components/autofill/content/renderer/password_autofill_agent.cc
 +++ b/components/autofill/content/renderer/password_autofill_agent.cc
 +++ b/components/autofill/content/renderer/password_autofill_agent.cc
-@@ -797,7 +797,10 @@ void PasswordAutofillAgent::UpdateStateForTextChange(
+@@ -773,7 +773,10 @@ void PasswordAutofillAgent::UpdateStateForTextChange(
  
  
  void PasswordAutofillAgent::TrackAutofilledElement(
  void PasswordAutofillAgent::TrackAutofilledElement(
      const blink::WebFormControlElement& element) {
      const blink::WebFormControlElement& element) {
@@ -670,7 +670,7 @@ diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/c
 diff --git a/components/autofill/core/common/autofill_prefs.cc b/components/autofill/core/common/autofill_prefs.cc
 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
 --- a/components/autofill/core/common/autofill_prefs.cc
 +++ b/components/autofill/core/common/autofill_prefs.cc
 +++ b/components/autofill/core/common/autofill_prefs.cc
-@@ -128,6 +128,10 @@ const char kAutofillWalletImportStorageCheckboxState[] =
+@@ -117,6 +117,10 @@ const char kAutofillWalletImportStorageCheckboxState[] =
  const char kAutocompleteLastVersionRetentionPolicy[] =
  const char kAutocompleteLastVersionRetentionPolicy[] =
      "autocomplete.retention_policy_last_version";
      "autocomplete.retention_policy_last_version";
  
  
@@ -681,7 +681,7 @@ diff --git a/components/autofill/core/common/autofill_prefs.cc b/components/auto
  void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
  void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
    // Synced prefs. Used for cross-device choices, e.g., credit card Autofill.
    // Synced prefs. Used for cross-device choices, e.g., credit card Autofill.
    registry->RegisterBooleanPref(
    registry->RegisterBooleanPref(
-@@ -160,6 +164,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
+@@ -143,6 +147,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
    registry->RegisterBooleanPref(
    registry->RegisterBooleanPref(
        prefs::kAutofillCreditCardFidoAuthOfferCheckboxState, true);
        prefs::kAutofillCreditCardFidoAuthOfferCheckboxState, true);
  #endif
  #endif
@@ -695,7 +695,7 @@ diff --git a/components/autofill/core/common/autofill_prefs.cc b/components/auto
 diff --git a/components/autofill/core/common/autofill_prefs.h b/components/autofill/core/common/autofill_prefs.h
 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
 --- a/components/autofill/core/common/autofill_prefs.h
 +++ b/components/autofill/core/common/autofill_prefs.h
 +++ b/components/autofill/core/common/autofill_prefs.h
-@@ -47,6 +47,8 @@ extern const char kAutofillUploadEventsLastResetTimestamp[];
+@@ -45,6 +45,8 @@ extern const char kAutofillUploadEventsLastResetTimestamp[];
  extern const char kAutofillWalletImportEnabled[];
  extern const char kAutofillWalletImportEnabled[];
  extern const char kAutofillWalletImportStorageCheckboxState[];
  extern const char kAutofillWalletImportStorageCheckboxState[];
  extern const char kAutocompleteLastVersionRetentionPolicy[];
  extern const char kAutocompleteLastVersionRetentionPolicy[];

+ 1 - 1
build/patches/Enable-prefetch-privacy-changes-by-default.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/common/features.cc b/third_party/blink/common/features.cc
 diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
 --- a/third_party/blink/common/features.cc
 --- a/third_party/blink/common/features.cc
 +++ b/third_party/blink/common/features.cc
 +++ b/third_party/blink/common/features.cc
-@@ -490,7 +490,7 @@ const base::Feature kComputePressure{"ComputePressure",
+@@ -491,7 +491,7 @@ const base::Feature kComputePressure{"ComputePressure",
  // Prefetch request properties are updated to be privacy-preserving. See
  // Prefetch request properties are updated to be privacy-preserving. See
  // crbug.com/988956.
  // crbug.com/988956.
  const base::Feature kPrefetchPrivacyChanges{"PrefetchPrivacyChanges",
  const base::Feature kPrefetchPrivacyChanges{"PrefetchPrivacyChanges",

+ 25 - 25
build/patches/Enable-share-intent.patch

@@ -30,7 +30,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
 diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni
 --- a/chrome/android/chrome_java_resources.gni
 --- a/chrome/android/chrome_java_resources.gni
 +++ b/chrome/android/chrome_java_resources.gni
 +++ b/chrome/android/chrome_java_resources.gni
-@@ -595,6 +595,7 @@ chrome_java_resources = [
+@@ -594,6 +594,7 @@ chrome_java_resources = [
    "java/res/layout/share_sheet_content.xml",
    "java/res/layout/share_sheet_content.xml",
    "java/res/layout/share_sheet_item.xml",
    "java/res/layout/share_sheet_item.xml",
    "java/res/layout/sharing_device_picker.xml",
    "java/res/layout/sharing_device_picker.xml",
@@ -41,7 +41,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
 diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
 --- a/chrome/android/chrome_java_sources.gni
 --- a/chrome/android/chrome_java_sources.gni
 +++ b/chrome/android/chrome_java_sources.gni
 +++ b/chrome/android/chrome_java_sources.gni
-@@ -954,6 +954,7 @@ chrome_java_sources = [
+@@ -958,6 +958,7 @@ chrome_java_sources = [
    "java/src/org/chromium/chrome/browser/sharing/shared_clipboard/SharedClipboardMessageHandler.java",
    "java/src/org/chromium/chrome/browser/sharing/shared_clipboard/SharedClipboardMessageHandler.java",
    "java/src/org/chromium/chrome/browser/sharing/shared_clipboard/SharedClipboardMetrics.java",
    "java/src/org/chromium/chrome/browser/sharing/shared_clipboard/SharedClipboardMetrics.java",
    "java/src/org/chromium/chrome/browser/sharing/shared_clipboard/SharedClipboardShareActivity.java",
    "java/src/org/chromium/chrome/browser/sharing/shared_clipboard/SharedClipboardShareActivity.java",
@@ -168,15 +168,15 @@ new file mode 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
 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
 --- a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java
-@@ -80,6 +80,7 @@ import org.chromium.chrome.browser.quickactionsearchwidget.QuickActionSearchWidg
+@@ -81,6 +81,7 @@ import org.chromium.chrome.browser.quickactionsearchwidget.QuickActionSearchWidg
  import org.chromium.chrome.browser.rlz.RevenueStats;
  import org.chromium.chrome.browser.rlz.RevenueStats;
  import org.chromium.chrome.browser.searchwidget.SearchWidgetProvider;
  import org.chromium.chrome.browser.searchwidget.SearchWidgetProvider;
  import org.chromium.chrome.browser.sharing.shared_clipboard.SharedClipboardShareActivity;
  import org.chromium.chrome.browser.sharing.shared_clipboard.SharedClipboardShareActivity;
 +import org.chromium.chrome.browser.sharing.shared_intent.SharedIntentShareActivity;
 +import org.chromium.chrome.browser.sharing.shared_intent.SharedIntentShareActivity;
  import org.chromium.chrome.browser.tab.state.ShoppingPersistedTabData;
  import org.chromium.chrome.browser.tab.state.ShoppingPersistedTabData;
- import org.chromium.chrome.browser.tasks.tab_management.PriceTrackingUtilities;
  import org.chromium.chrome.browser.ui.searchactivityutils.SearchActivityPreferencesManager;
  import org.chromium.chrome.browser.ui.searchactivityutils.SearchActivityPreferencesManager;
-@@ -425,6 +426,8 @@ public class ProcessInitializationHandler {
+ import org.chromium.chrome.browser.usb.UsbNotificationManager;
+@@ -418,6 +419,8 @@ public class ProcessInitializationHandler {
          deferredStartupHandler.addDeferredTask(
          deferredStartupHandler.addDeferredTask(
                  () -> IncognitoTabLauncher.updateComponentEnabledState());
                  () -> IncognitoTabLauncher.updateComponentEnabledState());
  
  
@@ -311,7 +311,7 @@ new file mode 100644
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -6024,6 +6024,10 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -6230,6 +6230,10 @@ const FeatureEntry kFeatureEntries[] = {
  #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
  #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
  
  
  #if BUILDFLAG(IS_ANDROID)
  #if BUILDFLAG(IS_ANDROID)
@@ -325,7 +325,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -2413,6 +2413,11 @@ const char kIsolateOriginsDescription[] =
+@@ -2459,6 +2459,11 @@ const char kIsolateOriginsDescription[] =
      "Requires dedicated processes for an additional set of origins, "
      "Requires dedicated processes for an additional set of origins, "
      "specified as a comma-separated list.";
      "specified as a comma-separated list.";
  
  
@@ -340,7 +340,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -1369,6 +1369,9 @@ extern const char kIsolateOriginsDescription[];
+@@ -1398,6 +1398,9 @@ extern const char kIsolateOriginsDescription[];
  
  
  extern const char kIsolationByDefaultName[];
  extern const char kIsolationByDefaultName[];
  extern const char kIsolationByDefaultDescription[];
  extern const char kIsolationByDefaultDescription[];
@@ -348,12 +348,12 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
 +extern const char kSharedIntentUIDescription[];
 +extern const char kSharedIntentUIDescription[];
 +
 +
  
  
- extern const char kSiteIsolationOptOutName[];
- extern const char kSiteIsolationOptOutDescription[];
+ extern const char kWebViewTagSiteIsolationName[];
+ extern const char kWebViewTagSiteIsolationDescription[];
 diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
 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
 --- a/chrome/browser/flags/android/chrome_feature_list.cc
 +++ b/chrome/browser/flags/android/chrome_feature_list.cc
 +++ b/chrome/browser/flags/android/chrome_feature_list.cc
-@@ -265,6 +265,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
+@@ -268,6 +268,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
      &kRelatedSearchesAlternateUx,
      &kRelatedSearchesAlternateUx,
      &kRelatedSearchesInBar,
      &kRelatedSearchesInBar,
      &kRelatedSearchesSimplifiedUx,
      &kRelatedSearchesSimplifiedUx,
@@ -361,9 +361,9 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse
      &kRelatedSearchesUi,
      &kRelatedSearchesUi,
      &kSearchEnginePromoExistingDevice,
      &kSearchEnginePromoExistingDevice,
      &kSearchEnginePromoExistingDeviceV2,
      &kSearchEnginePromoExistingDeviceV2,
-@@ -692,6 +693,9 @@ const base::Feature kSearchEnginePromoNewDeviceV2{
- const base::Feature kMostRecentTabOnBackgroundCloseTab{
-     "MostRecentTabOnBackgroundCloseTab", base::FEATURE_DISABLED_BY_DEFAULT};
+@@ -715,6 +716,9 @@ const base::Feature kMostRecentTabOnBackgroundCloseTab{
+ const base::Feature kNewInstanceFromDraggedLink{
+     "NewInstanceFromDraggedLink", base::FEATURE_ENABLED_BY_DEFAULT};
  
  
 +const base::Feature kSharedIntentUI{
 +const base::Feature kSharedIntentUI{
 +    "SharedIntentUI", base::FEATURE_ENABLED_BY_DEFAULT};
 +    "SharedIntentUI", base::FEATURE_ENABLED_BY_DEFAULT};
@@ -374,29 +374,29 @@ diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browse
 diff --git a/chrome/browser/flags/android/chrome_feature_list.h b/chrome/browser/flags/android/chrome_feature_list.h
 diff --git a/chrome/browser/flags/android/chrome_feature_list.h b/chrome/browser/flags/android/chrome_feature_list.h
 --- a/chrome/browser/flags/android/chrome_feature_list.h
 --- a/chrome/browser/flags/android/chrome_feature_list.h
 +++ b/chrome/browser/flags/android/chrome_feature_list.h
 +++ b/chrome/browser/flags/android/chrome_feature_list.h
-@@ -132,6 +132,7 @@ extern const base::Feature kSearchEnginePromoExistingDeviceV2;
+@@ -132,6 +132,7 @@ extern const base::Feature kRelatedSearchesUi;
+ extern const base::Feature kSearchEnginePromoExistingDevice;
+ extern const base::Feature kSearchEnginePromoExistingDeviceV2;
  extern const base::Feature kSearchEnginePromoNewDevice;
  extern const base::Feature kSearchEnginePromoNewDevice;
- extern const base::Feature kSearchEnginePromoNewDeviceV2;
- extern const base::Feature kServiceManagerForBackgroundPrefetch;
 +extern const base::Feature kSharedIntentUI;
 +extern const base::Feature kSharedIntentUI;
  extern const base::Feature kSearchReadyOmniboxFeature;
  extern const base::Feature kSearchReadyOmniboxFeature;
- extern const base::Feature kServiceManagerForDownload;
+ extern const base::Feature kSearchEnginePromoNewDeviceV2;
  extern const base::Feature kShareButtonInTopToolbar;
  extern const base::Feature kShareButtonInTopToolbar;
 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
 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
 --- 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
 +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
 @@ -481,6 +481,7 @@ public abstract class ChromeFeatureList {
 @@ -481,6 +481,7 @@ public abstract class ChromeFeatureList {
-     public static final String RELATED_SEARCHES_UI = "RelatedSearchesUi";
-     public static final String REQUEST_DESKTOP_SITE_FOR_TABLETS = "RequestDesktopSiteForTablets";
-     public static final String SAFE_BROWSING_DELAYED_WARNINGS = "SafeBrowsingDelayedWarnings";
+     public static final String QUIET_NOTIFICATION_PROMPTS = "QuietNotificationPrompts";
+     public static final String REACHED_CODE_PROFILER = "ReachedCodeProfiler";
+     public static final String READ_LATER = "ReadLater";
 +    public static final String SHARED_INTENT_UI = "SharedIntentUI";
 +    public static final String SHARED_INTENT_UI = "SharedIntentUI";
-     public static final String SEARCH_ENGINE_PROMO_EXISTING_DEVICE =
-             "SearchEnginePromo.ExistingDevice";
-     public static final String SEARCH_ENGINE_PROMO_EXISTING_DEVICE_V2 =
+     public static final String READER_MODE_IN_CCT = "ReaderModeInCCT";
+     public static final String RECOVER_FROM_NEVER_SAVE_ANDROID = "RecoverFromNeverSaveAndroid";
+     public static final String REENGAGEMENT_NOTIFICATION = "ReengagementNotification";
 diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 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
 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
-@@ -4715,6 +4715,19 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+@@ -4748,6 +4748,19 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
          Send text to Your Devices
          Send text to Your Devices
        </message>
        </message>
  
  

+ 1 - 1
build/patches/Enable-user-agent-freeze-by-default.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/common/features.cc b/third_party/blink/common/features.cc
 diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
 --- a/third_party/blink/common/features.cc
 --- a/third_party/blink/common/features.cc
 +++ b/third_party/blink/common/features.cc
 +++ b/third_party/blink/common/features.cc
-@@ -103,7 +103,7 @@ const base::Feature kFreezePurgeMemoryAllPagesFrozen{
+@@ -108,7 +108,7 @@ const base::Feature kFreezePurgeMemoryAllPagesFrozen{
  
  
  // Freezes the user-agent as part of https://github.com/WICG/ua-client-hints.
  // Freezes the user-agent as part of https://github.com/WICG/ua-client-hints.
  const base::Feature kReduceUserAgent{"ReduceUserAgent",
  const base::Feature kReduceUserAgent{"ReduceUserAgent",

+ 37 - 37
build/patches/Experimental-user-scripts-support.patch

@@ -230,7 +230,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
 diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
 --- a/chrome/android/BUILD.gn
 --- a/chrome/android/BUILD.gn
 +++ b/chrome/android/BUILD.gn
 +++ b/chrome/android/BUILD.gn
-@@ -264,6 +264,10 @@ android_resources("chrome_app_java_resources") {
+@@ -265,6 +265,10 @@ android_resources("chrome_app_java_resources") {
      "//third_party/androidx:androidx_gridlayout_gridlayout_java",
      "//third_party/androidx:androidx_gridlayout_gridlayout_java",
      "//third_party/androidx:androidx_preference_preference_java",
      "//third_party/androidx:androidx_preference_preference_java",
    ]
    ]
@@ -241,14 +241,14 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
  }
  }
  
  
  if (enable_vr) {
  if (enable_vr) {
-@@ -556,6 +560,7 @@ android_library("chrome_java") {
+@@ -563,6 +567,7 @@ android_library("chrome_java") {
      "//components/ukm/android:java",
      "//components/ukm/android:java",
      "//components/url_formatter/android:url_formatter_java",
      "//components/url_formatter/android:url_formatter_java",
      "//components/user_prefs/android:java",
      "//components/user_prefs/android:java",
 +    "//components/user_scripts/android:java",
 +    "//components/user_scripts/android:java",
+     "//components/variations:variations_java",
      "//components/variations/android:variations_java",
      "//components/variations/android:variations_java",
      "//components/version_info/android:version_constants_java",
      "//components/version_info/android:version_constants_java",
-     "//components/viz/common:common_java",
 diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml
 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
 --- a/chrome/android/java/res/xml/main_preferences.xml
 +++ b/chrome/android/java/res/xml/main_preferences.xml
 +++ b/chrome/android/java/res/xml/main_preferences.xml
@@ -299,7 +299,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessIni
  /**
  /**
   * Handles the initialization dependences of the browser process.  This is meant to handle the
   * 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
   * initialization that is not tied to any particular Activity, and the logic that should only be
-@@ -318,6 +320,7 @@ public class ProcessInitializationHandler {
+@@ -311,6 +313,7 @@ public class ProcessInitializationHandler {
  
  
                  DefaultBrowserInfo.initBrowserFetcher();
                  DefaultBrowserInfo.initBrowserFetcher();
  
  
@@ -310,15 +310,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessIni
 diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
 diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
 --- a/chrome/android/java_sources.gni
 --- a/chrome/android/java_sources.gni
 +++ b/chrome/android/java_sources.gni
 +++ b/chrome/android/java_sources.gni
-@@ -21,6 +21,7 @@ import("//components/feed/features.gni")
+@@ -20,6 +20,7 @@ import("//chrome/common/features.gni")
+ import("//components/feed/features.gni")
  import("//components/offline_pages/buildflags/features.gni")
  import("//components/offline_pages/buildflags/features.gni")
- import("//components/omnibox/browser/test_java_sources.gni")
  import("//device/vr/buildflags/buildflags.gni")
  import("//device/vr/buildflags/buildflags.gni")
 +import("//components/user_scripts/android/java_sources.gni")
 +import("//components/user_scripts/android/java_sources.gni")
  
  
  chrome_java_sources += public_autofill_assistant_java_sources
  chrome_java_sources += public_autofill_assistant_java_sources
  
  
-@@ -58,3 +59,5 @@ if (enable_arcore) {
+@@ -56,3 +57,5 @@ if (enable_arcore) {
      "java/src/org/chromium/chrome/browser/vr/ArDelegateImpl.java",
      "java/src/org/chromium/chrome/browser/vr/ArDelegateImpl.java",
    ]
    ]
  }
  }
@@ -327,7 +327,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
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
 --- a/chrome/browser/BUILD.gn
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -3545,6 +3545,11 @@ static_library("browser") {
+@@ -3417,6 +3417,11 @@ static_library("browser") {
        ]
        ]
        deps += [ "//chrome/android/modules/dev_ui/provider:native" ]
        deps += [ "//chrome/android/modules/dev_ui/provider:native" ]
      }
      }
@@ -338,11 +338,11 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
 +    ]
 +    ]
    } else {
    } else {
      #!is_android
      #!is_android
-     if (!is_chromeos_lacros) {
+     sources += [
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -147,6 +147,7 @@
+@@ -148,6 +148,7 @@
  #include "components/translate/core/browser/translate_ranker_impl.h"
  #include "components/translate/core/browser/translate_ranker_impl.h"
  #include "components/translate/core/common/translate_util.h"
  #include "components/translate/core/common/translate_util.h"
  #include "components/ui_devtools/switches.h"
  #include "components/ui_devtools/switches.h"
@@ -350,7 +350,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
  #include "components/version_info/version_info.h"
  #include "components/version_info/version_info.h"
  #include "components/viz/common/features.h"
  #include "components/viz/common/features.h"
  #include "components/viz/common/switches.h"
  #include "components/viz/common/switches.h"
-@@ -6943,6 +6944,10 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -7149,6 +7150,10 @@ const FeatureEntry kFeatureEntries[] = {
           chromeos::features::kClipboardHistoryNudgeSessionReset)},
           chromeos::features::kClipboardHistoryNudgeSessionReset)},
  #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
  #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
  
  
@@ -364,7 +364,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
 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
 --- a/chrome/browser/chrome_content_browser_client.cc
 +++ b/chrome/browser/chrome_content_browser_client.cc
 +++ b/chrome/browser/chrome_content_browser_client.cc
-@@ -4769,7 +4769,8 @@ ChromeContentBrowserClient::CreateURLLoaderThrottles(
+@@ -4793,7 +4793,8 @@ ChromeContentBrowserClient::CreateURLLoaderThrottles(
    chrome::mojom::DynamicParams dynamic_params = {
    chrome::mojom::DynamicParams dynamic_params = {
        profile->GetPrefs()->GetBoolean(prefs::kForceGoogleSafeSearch),
        profile->GetPrefs()->GetBoolean(prefs::kForceGoogleSafeSearch),
        profile->GetPrefs()->GetInteger(prefs::kForceYouTubeRestrict),
        profile->GetPrefs()->GetInteger(prefs::kForceYouTubeRestrict),
@@ -377,7 +377,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -5804,6 +5804,11 @@ const char kQuickCommandsDescription[] =
+@@ -5957,6 +5957,11 @@ const char kQuickCommandsDescription[] =
  #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
  #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
          // BUILDFLAG(IS_FUCHSIA)
          // BUILDFLAG(IS_FUCHSIA)
  
  
@@ -392,7 +392,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -3342,6 +3342,9 @@ extern const char kQuickCommandsDescription[];
+@@ -3430,6 +3430,9 @@ extern const char kQuickCommandsDescription[];
  #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
  #endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) ||
          // defined (OS_FUCHSIA)
          // defined (OS_FUCHSIA)
  
  
@@ -405,7 +405,7 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
 diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
 diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
 --- a/chrome/browser/prefs/browser_prefs.cc
 --- a/chrome/browser/prefs/browser_prefs.cc
 +++ b/chrome/browser/prefs/browser_prefs.cc
 +++ b/chrome/browser/prefs/browser_prefs.cc
-@@ -244,6 +244,7 @@
+@@ -246,6 +246,7 @@
  #include "components/ntp_tiles/popular_sites_impl.h"
  #include "components/ntp_tiles/popular_sites_impl.h"
  #include "components/permissions/contexts/geolocation_permission_context_android.h"
  #include "components/permissions/contexts/geolocation_permission_context_android.h"
  #include "components/query_tiles/tile_service_prefs.h"
  #include "components/query_tiles/tile_service_prefs.h"
@@ -413,7 +413,7 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse
  #else  // BUILDFLAG(IS_ANDROID)
  #else  // BUILDFLAG(IS_ANDROID)
  #include "chrome/browser/autofill_assistant/password_change/apc_client.h"
  #include "chrome/browser/autofill_assistant/password_change/apc_client.h"
  #include "chrome/browser/cart/cart_service.h"
  #include "chrome/browser/cart/cart_service.h"
-@@ -1290,6 +1291,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
+@@ -1335,6 +1336,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
    translate::TranslatePrefs::RegisterProfilePrefs(registry);
    translate::TranslatePrefs::RegisterProfilePrefs(registry);
    omnibox::RegisterProfilePrefs(registry);
    omnibox::RegisterProfilePrefs(registry);
    ZeroSuggestProvider::RegisterProfilePrefs(registry);
    ZeroSuggestProvider::RegisterProfilePrefs(registry);
@@ -435,7 +435,7 @@ diff --git a/chrome/browser/profiles/BUILD.gn b/chrome/browser/profiles/BUILD.gn
 diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
 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
 --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
 +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
 +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
-@@ -241,6 +241,8 @@
+@@ -244,6 +244,8 @@
  #include "chrome/browser/ui/cocoa/screentime/screentime_features.h"
  #include "chrome/browser/ui/cocoa/screentime/screentime_features.h"
  #endif
  #endif
  
  
@@ -444,7 +444,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
  namespace chrome {
  namespace chrome {
  
  
  void AddProfilesExtraParts(ChromeBrowserMainParts* main_parts) {
  void AddProfilesExtraParts(ChromeBrowserMainParts* main_parts) {
-@@ -574,6 +576,7 @@ void ChromeBrowserMainExtraPartsProfiles::
+@@ -582,6 +584,7 @@ void ChromeBrowserMainExtraPartsProfiles::
  #endif
  #endif
    WebDataServiceFactory::GetInstance();
    WebDataServiceFactory::GetInstance();
    webrtc_event_logging::WebRtcEventLogManagerKeyedServiceFactory::GetInstance();
    webrtc_event_logging::WebRtcEventLogManagerKeyedServiceFactory::GetInstance();
@@ -464,7 +464,7 @@ diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profile
  #if BUILDFLAG(ENABLE_SESSION_SERVICE)
  #if BUILDFLAG(ENABLE_SESSION_SERVICE)
  #include "chrome/browser/sessions/app_session_service_factory.h"
  #include "chrome/browser/sessions/app_session_service_factory.h"
  #include "chrome/browser/sessions/session_service_factory.h"
  #include "chrome/browser/sessions/session_service_factory.h"
-@@ -1699,6 +1701,13 @@ void ProfileManager::DoFinalInitForServices(Profile* profile,
+@@ -1706,6 +1708,13 @@ void ProfileManager::DoFinalInitForServices(Profile* profile,
  #endif
  #endif
  
  
  #endif
  #endif
@@ -531,7 +531,7 @@ diff --git a/chrome/browser/profiles/renderer_updater.h b/chrome/browser/profile
 diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
 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
 --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
 +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
 +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
-@@ -93,6 +93,7 @@
+@@ -91,6 +91,7 @@
  #include "components/security_interstitials/content/urls.h"
  #include "components/security_interstitials/content/urls.h"
  #include "components/signin/public/base/signin_buildflags.h"
  #include "components/signin/public/base/signin_buildflags.h"
  #include "components/site_engagement/content/site_engagement_service.h"
  #include "components/site_engagement/content/site_engagement_service.h"
@@ -539,7 +539,7 @@ diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrom
  #include "content/public/browser/web_contents.h"
  #include "content/public/browser/web_contents.h"
  #include "content/public/browser/web_ui.h"
  #include "content/public/browser/web_ui.h"
  #include "content/public/common/content_client.h"
  #include "content/public/common/content_client.h"
-@@ -801,6 +802,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
+@@ -811,6 +812,8 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
      return &NewWebUI<UserActionsUI>;
      return &NewWebUI<UserActionsUI>;
    if (url.host_piece() == chrome::kChromeUIVersionHost)
    if (url.host_piece() == chrome::kChromeUIVersionHost)
      return &NewWebUI<VersionUI>;
      return &NewWebUI<VersionUI>;
@@ -551,7 +551,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
 diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni
 --- a/chrome/chrome_paks.gni
 --- a/chrome/chrome_paks.gni
 +++ b/chrome/chrome_paks.gni
 +++ b/chrome/chrome_paks.gni
-@@ -110,6 +110,7 @@ template("chrome_extra_paks") {
+@@ -108,6 +108,7 @@ template("chrome_extra_paks") {
        "$root_gen_dir/skia/skia_resources.pak",
        "$root_gen_dir/skia/skia_resources.pak",
        "$root_gen_dir/third_party/blink/public/resources/blink_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",
        "$root_gen_dir/third_party/blink/public/resources/inspector_overlay_resources.pak",
@@ -559,7 +559,7 @@ diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni
        "$root_gen_dir/ui/resources/webui_generated_resources.pak",
        "$root_gen_dir/ui/resources/webui_generated_resources.pak",
      ]
      ]
      deps = [
      deps = [
-@@ -130,6 +131,7 @@ template("chrome_extra_paks") {
+@@ -128,6 +129,7 @@ template("chrome_extra_paks") {
        "//third_party/blink/public:devtools_inspector_resources",
        "//third_party/blink/public:devtools_inspector_resources",
        "//third_party/blink/public:resources",
        "//third_party/blink/public:resources",
        "//ui/resources",
        "//ui/resources",
@@ -582,17 +582,17 @@ diff --git a/chrome/renderer/BUILD.gn b/chrome/renderer/BUILD.gn
 --- a/chrome/renderer/BUILD.gn
 --- a/chrome/renderer/BUILD.gn
 +++ b/chrome/renderer/BUILD.gn
 +++ b/chrome/renderer/BUILD.gn
 @@ -141,6 +141,7 @@ static_library("renderer") {
 @@ -141,6 +141,7 @@ static_library("renderer") {
-     "//components/feed:feature_list",
-     "//components/feed/content/renderer:feed_renderer",
-     "//components/history_clusters/core",
+     "//components/content_capture/common",
+     "//components/content_capture/renderer",
+     "//components/content_settings/common:mojom",
 +    "//components/user_scripts/renderer",
 +    "//components/user_scripts/renderer",
-     "//components/network_hints/renderer",
-     "//components/no_state_prefetch/common",
-     "//components/no_state_prefetch/renderer",
+     "//components/content_settings/renderer",
+     "//components/continuous_search/renderer",
+     "//components/dom_distiller/content/renderer",
 diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
 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
 --- a/chrome/renderer/chrome_content_renderer_client.cc
 +++ b/chrome/renderer/chrome_content_renderer_client.cc
 +++ b/chrome/renderer/chrome_content_renderer_client.cc
-@@ -246,6 +246,9 @@
+@@ -247,6 +247,9 @@
  #include "chrome/renderer/supervised_user/supervised_user_error_page_controller_delegate_impl.h"
  #include "chrome/renderer/supervised_user/supervised_user_error_page_controller_delegate_impl.h"
  #endif
  #endif
  
  
@@ -602,7 +602,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer
  using autofill::AutofillAgent;
  using autofill::AutofillAgent;
  using autofill::PasswordAutofillAgent;
  using autofill::PasswordAutofillAgent;
  using autofill::PasswordGenerationAgent;
  using autofill::PasswordGenerationAgent;
-@@ -418,6 +421,12 @@ void ChromeContentRendererClient::RenderThreadStarted() {
+@@ -419,6 +422,12 @@ void ChromeContentRendererClient::RenderThreadStarted() {
        WebString::FromASCII(extensions::kExtensionScheme));
        WebString::FromASCII(extensions::kExtensionScheme));
  #endif
  #endif
  
  
@@ -615,7 +615,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer
  #if BUILDFLAG(ENABLE_SPELLCHECK)
  #if BUILDFLAG(ENABLE_SPELLCHECK)
    if (!spellcheck_)
    if (!spellcheck_)
      InitSpellCheck();
      InitSpellCheck();
-@@ -547,6 +556,13 @@ void ChromeContentRendererClient::RenderFrameCreated(
+@@ -557,6 +566,13 @@ void ChromeContentRendererClient::RenderFrameCreated(
        render_frame, registry);
        render_frame, registry);
  #endif
  #endif
  
  
@@ -629,7 +629,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer
  #if BUILDFLAG(ENABLE_PLUGINS)
  #if BUILDFLAG(ENABLE_PLUGINS)
    new PepperHelper(render_frame);
    new PepperHelper(render_frame);
  #endif
  #endif
-@@ -1535,7 +1551,14 @@ void ChromeContentRendererClient::RunScriptsAtDocumentStart(
+@@ -1544,7 +1560,14 @@ void ChromeContentRendererClient::RunScriptsAtDocumentStart(
    ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentStart(
    ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentStart(
        render_frame);
        render_frame);
    // |render_frame| might be dead by now.
    // |render_frame| might be dead by now.
@@ -644,7 +644,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer
  }
  }
  
  
  void ChromeContentRendererClient::RunScriptsAtDocumentEnd(
  void ChromeContentRendererClient::RunScriptsAtDocumentEnd(
-@@ -1544,7 +1567,14 @@ void ChromeContentRendererClient::RunScriptsAtDocumentEnd(
+@@ -1553,7 +1576,14 @@ void ChromeContentRendererClient::RunScriptsAtDocumentEnd(
    ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentEnd(
    ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentEnd(
        render_frame);
        render_frame);
    // |render_frame| might be dead by now.
    // |render_frame| might be dead by now.
@@ -659,7 +659,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer
  }
  }
  
  
  void ChromeContentRendererClient::RunScriptsAtDocumentIdle(
  void ChromeContentRendererClient::RunScriptsAtDocumentIdle(
-@@ -1553,7 +1583,14 @@ void ChromeContentRendererClient::RunScriptsAtDocumentIdle(
+@@ -1562,7 +1592,14 @@ void ChromeContentRendererClient::RunScriptsAtDocumentIdle(
    ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentIdle(
    ChromeExtensionsRendererClient::GetInstance()->RunScriptsAtDocumentIdle(
        render_frame);
        render_frame);
    // |render_frame| might be dead by now.
    // |render_frame| might be dead by now.
@@ -2773,11 +2773,11 @@ new file mode 100644
 +  base::ListValue response;
 +  base::ListValue response;
 +  for (const std::unique_ptr<user_scripts::UserScript>& script : *loaded_scripts_) {
 +  for (const std::unique_ptr<user_scripts::UserScript>& script : *loaded_scripts_) {
 +    if (script->key() == script_key) {
 +    if (script->key() == script_key) {
-+      auto scriptData = std::make_unique<base::DictionaryValue>();
++      base::Value::Dict scriptData;
 +      for (const std::unique_ptr<user_scripts::UserScript::File>& js_file :
 +      for (const std::unique_ptr<user_scripts::UserScript::File>& js_file :
 +          script->js_scripts()) {
 +          script->js_scripts()) {
 +        base::StringPiece contents = js_file->GetContent();
 +        base::StringPiece contents = js_file->GetContent();
-+        scriptData->SetString("content", contents.data());
++        scriptData.Set("content", contents.data());
 +      }
 +      }
 +      response.Append(std::move(scriptData));
 +      response.Append(std::move(scriptData));
 +    }
 +    }

+ 6 - 6
build/patches/History-number-of-days-privacy-setting.patch

@@ -356,7 +356,7 @@ diff --git a/components/history/core/browser/expire_history_backend.h b/componen
 diff --git a/components/history/core/browser/history_backend.cc b/components/history/core/browser/history_backend.cc
 diff --git a/components/history/core/browser/history_backend.cc b/components/history/core/browser/history_backend.cc
 --- a/components/history/core/browser/history_backend.cc
 --- a/components/history/core/browser/history_backend.cc
 +++ b/components/history/core/browser/history_backend.cc
 +++ b/components/history/core/browser/history_backend.cc
-@@ -148,7 +148,7 @@ const int kMaxRedirectCount = 32;
+@@ -153,7 +153,7 @@ const int kMaxRedirectCount = 32;
  
  
  // The number of days old a history entry can be before it is considered "old"
  // The number of days old a history entry can be before it is considered "old"
  // and is deleted.
  // and is deleted.
@@ -365,7 +365,7 @@ diff --git a/components/history/core/browser/history_backend.cc b/components/his
  
  
  // The maximum number of days for which domain visit metrics are computed
  // The maximum number of days for which domain visit metrics are computed
  // each time HistoryBackend::GetDomainDiversity() is called.
  // each time HistoryBackend::GetDomainDiversity() is called.
-@@ -973,6 +973,19 @@ void HistoryBackend::InitImpl(
+@@ -1002,6 +1002,19 @@ void HistoryBackend::InitImpl(
    LOCAL_HISTOGRAM_TIMES("History.InitTime", TimeTicks::Now() - beginning_time);
    LOCAL_HISTOGRAM_TIMES("History.InitTime", TimeTicks::Now() - beginning_time);
  }
  }
  
  
@@ -388,7 +388,7 @@ diff --git a/components/history/core/browser/history_backend.cc b/components/his
 diff --git a/components/history/core/browser/history_backend.h b/components/history/core/browser/history_backend.h
 diff --git a/components/history/core/browser/history_backend.h b/components/history/core/browser/history_backend.h
 --- a/components/history/core/browser/history_backend.h
 --- a/components/history/core/browser/history_backend.h
 +++ b/components/history/core/browser/history_backend.h
 +++ b/components/history/core/browser/history_backend.h
-@@ -220,6 +220,8 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
+@@ -219,6 +219,8 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
    void Init(bool force_fail,
    void Init(bool force_fail,
              const HistoryDatabaseParams& history_database_params);
              const HistoryDatabaseParams& history_database_params);
  
  
@@ -410,7 +410,7 @@ diff --git a/components/history/core/browser/history_service.cc b/components/his
  #include "components/history/core/browser/download_row.h"
  #include "components/history/core/browser/download_row.h"
  #include "components/history/core/browser/history_backend.h"
  #include "components/history/core/browser/history_backend.h"
  #include "components/history/core/browser/history_backend_client.h"
  #include "components/history/core/browser/history_backend_client.h"
-@@ -1064,6 +1067,9 @@ void HistoryService::Cleanup() {
+@@ -1074,6 +1077,9 @@ void HistoryService::Cleanup() {
      return;
      return;
    }
    }
  
  
@@ -420,7 +420,7 @@ diff --git a/components/history/core/browser/history_service.cc b/components/his
    NotifyHistoryServiceBeingDeleted();
    NotifyHistoryServiceBeingDeleted();
  
  
    weak_ptr_factory_.InvalidateWeakPtrs();
    weak_ptr_factory_.InvalidateWeakPtrs();
-@@ -1128,6 +1134,33 @@ bool HistoryService::Init(
+@@ -1138,6 +1144,33 @@ bool HistoryService::Init(
    return true;
    return true;
  }
  }
  
  
@@ -475,7 +475,7 @@ diff --git a/components/history/core/browser/history_service.h b/components/hist
    // Triggers the backend to load if it hasn't already, and then returns whether
    // Triggers the backend to load if it hasn't already, and then returns whether
    // it's finished loading.
    // it's finished loading.
    // Note: Virtual needed for mocking.
    // Note: Virtual needed for mocking.
-@@ -994,6 +998,10 @@ class HistoryService : public KeyedService {
+@@ -999,6 +1003,10 @@ class HistoryService : public KeyedService {
  
  
    base::OnceClosure origin_queried_closure_for_testing_;
    base::OnceClosure origin_queried_closure_for_testing_;
  
  

+ 6 - 6
build/patches/Ignore-enterprise-policies-for-secure-DNS.patch

@@ -10,16 +10,16 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/browser/enterprise/util/android/java/src/org/chromium/chrome/browser/enterprise/util/EnterpriseInfo.java b/chrome/browser/enterprise/util/android/java/src/org/chromium/chrome/browser/enterprise/util/EnterpriseInfo.java
 diff --git a/chrome/browser/enterprise/util/android/java/src/org/chromium/chrome/browser/enterprise/util/EnterpriseInfo.java b/chrome/browser/enterprise/util/android/java/src/org/chromium/chrome/browser/enterprise/util/EnterpriseInfo.java
 --- a/chrome/browser/enterprise/util/android/java/src/org/chromium/chrome/browser/enterprise/util/EnterpriseInfo.java
 --- a/chrome/browser/enterprise/util/android/java/src/org/chromium/chrome/browser/enterprise/util/EnterpriseInfo.java
 +++ b/chrome/browser/enterprise/util/android/java/src/org/chromium/chrome/browser/enterprise/util/EnterpriseInfo.java
 +++ b/chrome/browser/enterprise/util/android/java/src/org/chromium/chrome/browser/enterprise/util/EnterpriseInfo.java
-@@ -91,6 +91,10 @@ public class EnterpriseInfo {
-         ThreadUtils.assertOnUiThread();
-         assert callback != null;
+@@ -91,6 +91,10 @@ public abstract class EnterpriseInfo {
+         };
  
  
+         EnterpriseInfo.getInstance().getDeviceEnterpriseInfo(callback);
 +        if (true) {
 +        if (true) {
 +           return;
 +           return;
 +        }
 +        }
 +
 +
-         // If there is already a cached result post a task to return it.
-         if (mOwnedState != null) {
-             mHandler.post(() -> callback.onResult(mOwnedState));
+     }
+ 
+     @NativeMethods
 --
 --
 2.25.1
 2.25.1

+ 1 - 1
build/patches/Increase-number-of-autocomplete-matches-to-10.patch

@@ -13,7 +13,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/components/omnibox/browser/autocomplete_result.cc b/components/omnibox/browser/autocomplete_result.cc
 diff --git a/components/omnibox/browser/autocomplete_result.cc b/components/omnibox/browser/autocomplete_result.cc
 --- a/components/omnibox/browser/autocomplete_result.cc
 --- a/components/omnibox/browser/autocomplete_result.cc
 +++ b/components/omnibox/browser/autocomplete_result.cc
 +++ b/components/omnibox/browser/autocomplete_result.cc
-@@ -82,7 +82,8 @@ struct MatchGURLHash {
+@@ -83,7 +83,8 @@ struct MatchGURLHash {
  // static
  // static
  size_t AutocompleteResult::GetMaxMatches(bool is_zero_suggest) {
  size_t AutocompleteResult::GetMaxMatches(bool is_zero_suggest) {
  #if BUILDFLAG(IS_ANDROID)
  #if BUILDFLAG(IS_ANDROID)

+ 5 - 5
build/patches/Inject-scripts-for-AMP-tracking-ads-and-video.patch

@@ -43,7 +43,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink
  #include "third_party/blink/renderer/core/page/scrolling/snap_coordinator.h"
  #include "third_party/blink/renderer/core/page/scrolling/snap_coordinator.h"
  #include "third_party/blink/renderer/core/page/scrolling/top_document_root_scroller_controller.h"
  #include "third_party/blink/renderer/core/page/scrolling/top_document_root_scroller_controller.h"
  #include "third_party/blink/renderer/core/page/spatial_navigation_controller.h"
  #include "third_party/blink/renderer/core/page/spatial_navigation_controller.h"
-@@ -353,6 +354,8 @@
+@@ -355,6 +356,8 @@
  #include "third_party/blink/renderer/platform/wtf/text/string_buffer.h"
  #include "third_party/blink/renderer/platform/wtf/text/string_buffer.h"
  #include "third_party/blink/renderer/platform/wtf/text/text_encoding_registry.h"
  #include "third_party/blink/renderer/platform/wtf/text/text_encoding_registry.h"
  
  
@@ -52,7 +52,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink
  #ifndef NDEBUG
  #ifndef NDEBUG
  using WeakDocumentSet = blink::HeapHashSet<blink::WeakMember<blink::Document>>;
  using WeakDocumentSet = blink::HeapHashSet<blink::WeakMember<blink::Document>>;
  static WeakDocumentSet& LiveDocumentSet();
  static WeakDocumentSet& LiveDocumentSet();
-@@ -6654,6 +6657,64 @@ void Document::setAllowDeclarativeShadowRoots(bool val) {
+@@ -6709,6 +6712,64 @@ void Document::setAllowDeclarativeShadowRoots(bool val) {
        val ? AllowState::kAllow : AllowState::kDeny;
        val ? AllowState::kAllow : AllowState::kDeny;
  }
  }
  
  
@@ -117,7 +117,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink
  void Document::FinishedParsing() {
  void Document::FinishedParsing() {
    DCHECK(!GetScriptableDocumentParser() || !parser_->IsParsing());
    DCHECK(!GetScriptableDocumentParser() || !parser_->IsParsing());
    DCHECK(!GetScriptableDocumentParser() || ready_state_ != kLoading);
    DCHECK(!GetScriptableDocumentParser() || ready_state_ != kLoading);
-@@ -6717,6 +6778,10 @@ void Document::FinishedParsing() {
+@@ -6772,6 +6833,10 @@ void Document::FinishedParsing() {
      if (ShouldMarkFontPerformance())
      if (ShouldMarkFontPerformance())
        FontPerformance::MarkDomContentLoaded();
        FontPerformance::MarkDomContentLoaded();
  
  
@@ -131,7 +131,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
 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
 --- a/third_party/blink/renderer/core/dom/document.h
 +++ b/third_party/blink/renderer/core/dom/document.h
 +++ b/third_party/blink/renderer/core/dom/document.h
-@@ -1924,6 +1924,9 @@ class CORE_EXPORT Document : public ContainerNode,
+@@ -1941,6 +1941,9 @@ class CORE_EXPORT Document : public ContainerNode,
    void AddAXContext(AXContext*);
    void AddAXContext(AXContext*);
    void RemoveAXContext(AXContext*);
    void RemoveAXContext(AXContext*);
  
  
@@ -166,7 +166,7 @@ new file mode 100644
 diff --git a/third_party/blink/renderer/core/html/html_script_element.cc b/third_party/blink/renderer/core/html/html_script_element.cc
 diff --git a/third_party/blink/renderer/core/html/html_script_element.cc b/third_party/blink/renderer/core/html/html_script_element.cc
 --- a/third_party/blink/renderer/core/html/html_script_element.cc
 --- a/third_party/blink/renderer/core/html/html_script_element.cc
 +++ b/third_party/blink/renderer/core/html/html_script_element.cc
 +++ b/third_party/blink/renderer/core/html/html_script_element.cc
-@@ -187,6 +187,11 @@ void HTMLScriptElement::setTextContent(const String& string) {
+@@ -195,6 +195,11 @@ void HTMLScriptElement::setTextContent(const String& string) {
    script_text_internal_slot_ = ParkableString(string.Impl());
    script_text_internal_slot_ = ParkableString(string.Impl());
  }
  }
  
  

+ 3 - 3
build/patches/JIT-site-settings.patch

@@ -353,7 +353,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
 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
 --- a/components/browser_ui/site_settings/android/website_preference_bridge.cc
 +++ b/components/browser_ui/site_settings/android/website_preference_bridge.cc
 +++ b/components/browser_ui/site_settings/android/website_preference_bridge.cc
-@@ -767,6 +767,7 @@ static void JNI_WebsitePreferenceBridge_SetContentSettingEnabled(
+@@ -765,6 +765,7 @@ static void JNI_WebsitePreferenceBridge_SetContentSettingEnabled(
        case ContentSettingsType::COOKIES:
        case ContentSettingsType::COOKIES:
        case ContentSettingsType::FEDERATED_IDENTITY_API:
        case ContentSettingsType::FEDERATED_IDENTITY_API:
        case ContentSettingsType::JAVASCRIPT:
        case ContentSettingsType::JAVASCRIPT:
@@ -430,7 +430,7 @@ diff --git a/components/page_info/android/page_info_controller_android.cc b/comp
 diff --git a/components/page_info/page_info.cc b/components/page_info/page_info.cc
 diff --git a/components/page_info/page_info.cc b/components/page_info/page_info.cc
 --- a/components/page_info/page_info.cc
 --- a/components/page_info/page_info.cc
 +++ b/components/page_info/page_info.cc
 +++ b/components/page_info/page_info.cc
-@@ -122,6 +122,7 @@ ContentSettingsType kPermissionType[] = {
+@@ -120,6 +120,7 @@ ContentSettingsType kPermissionType[] = {
      ContentSettingsType::AR,
      ContentSettingsType::AR,
      ContentSettingsType::IDLE_DETECTION,
      ContentSettingsType::IDLE_DETECTION,
      ContentSettingsType::FEDERATED_IDENTITY_API,
      ContentSettingsType::FEDERATED_IDENTITY_API,
@@ -438,7 +438,7 @@ diff --git a/components/page_info/page_info.cc b/components/page_info/page_info.
  };
  };
  
  
  // Determines whether to show permission |type| in the Page Info UI. Only
  // Determines whether to show permission |type| in the Page Info UI. Only
-@@ -155,6 +156,11 @@ bool ShouldShowPermission(const PageInfo::PermissionInfo& info,
+@@ -153,6 +154,11 @@ bool ShouldShowPermission(const PageInfo::PermissionInfo& info,
        return true;
        return true;
    }
    }
  
  

+ 1 - 1
build/patches/Keep-flag-to-allow-screenshots-in-Incognito-mode.patch

@@ -15,7 +15,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
 diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
 --- a/chrome/browser/flag-metadata.json
 --- a/chrome/browser/flag-metadata.json
 +++ b/chrome/browser/flag-metadata.json
 +++ b/chrome/browser/flag-metadata.json
-@@ -3641,9 +3641,9 @@
+@@ -3707,9 +3707,9 @@
      "expiry_milestone": 105
      "expiry_milestone": 105
    },
    },
    {
    {

+ 1 - 1
build/patches/Logcat-crash-reports-UI.patch

@@ -157,7 +157,7 @@ diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/
 diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
 diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
 --- a/chrome/browser/ui/BUILD.gn
 --- a/chrome/browser/ui/BUILD.gn
 +++ b/chrome/browser/ui/BUILD.gn
 +++ b/chrome/browser/ui/BUILD.gn
-@@ -637,6 +637,7 @@ static_library("ui") {
+@@ -645,6 +645,7 @@ static_library("ui") {
      "//third_party/re2",
      "//third_party/re2",
      "//third_party/webrtc_overrides:webrtc_component",
      "//third_party/webrtc_overrides:webrtc_component",
      "//third_party/zlib",
      "//third_party/zlib",

+ 9 - 9
build/patches/Modify-default-preferences.patch

@@ -37,8 +37,8 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 +#include "components/bookmarks/browser/features.h"
 +#include "components/bookmarks/browser/features.h"
  #include "components/browser_sync/browser_sync_switches.h"
  #include "components/browser_sync/browser_sync_switches.h"
  #include "components/browsing_data/core/features.h"
  #include "components/browsing_data/core/features.h"
- #include "components/certificate_transparency/ct_features.h"
-@@ -5312,6 +5313,11 @@ const FeatureEntry kFeatureEntries[] = {
+ #include "components/commerce/core/commerce_feature_list.h"
+@@ -5505,6 +5506,11 @@ const FeatureEntry kFeatureEntries[] = {
           reading_list::switches::kReadLaterReminderNotification)},
           reading_list::switches::kReadLaterReminderNotification)},
  #endif
  #endif
  
  
@@ -53,7 +53,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/browser/background/background_mode_manager.cc
 diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/browser/background/background_mode_manager.cc
 --- a/chrome/browser/background/background_mode_manager.cc
 --- a/chrome/browser/background/background_mode_manager.cc
 +++ b/chrome/browser/background/background_mode_manager.cc
 +++ b/chrome/browser/background/background_mode_manager.cc
-@@ -376,7 +376,7 @@ void BackgroundModeManager::RegisterPrefs(PrefRegistrySimple* registry) {
+@@ -377,7 +377,7 @@ void BackgroundModeManager::RegisterPrefs(PrefRegistrySimple* registry) {
    registry->RegisterBooleanPref(prefs::kChromeCreatedLoginItem, false);
    registry->RegisterBooleanPref(prefs::kChromeCreatedLoginItem, false);
    registry->RegisterBooleanPref(prefs::kMigratedLoginItemPref, false);
    registry->RegisterBooleanPref(prefs::kMigratedLoginItemPref, false);
  #endif
  #endif
@@ -65,7 +65,7 @@ diff --git a/chrome/browser/background/background_mode_manager.cc b/chrome/brows
 diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
 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
 --- a/chrome/browser/chrome_content_browser_client.cc
 +++ b/chrome/browser/chrome_content_browser_client.cc
 +++ b/chrome/browser/chrome_content_browser_client.cc
-@@ -1324,7 +1324,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
+@@ -1330,7 +1330,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
  void ChromeContentBrowserClient::RegisterProfilePrefs(
  void ChromeContentBrowserClient::RegisterProfilePrefs(
      user_prefs::PrefRegistrySyncable* registry) {
      user_prefs::PrefRegistrySyncable* registry) {
    registry->RegisterBooleanPref(prefs::kDisable3DAPIs, false);
    registry->RegisterBooleanPref(prefs::kDisable3DAPIs, false);
@@ -77,7 +77,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -2521,6 +2521,10 @@ const char kTabToGTSAnimationAndroidDescription[] =
+@@ -2582,6 +2582,10 @@ const char kTabToGTSAnimationAndroidDescription[] =
      "Allows users to see an animation when entering or leaving the "
      "Allows users to see an animation when entering or leaving the "
      "Grid Tab Switcher on phones.";
      "Grid Tab Switcher on phones.";
  
  
@@ -91,7 +91,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -1419,6 +1419,9 @@ extern const char kTabGroupsUiImprovementsAndroidDescription[];
+@@ -1457,6 +1457,9 @@ extern const char kTabGroupsUiImprovementsAndroidDescription[];
  extern const char kTabToGTSAnimationAndroidName[];
  extern const char kTabToGTSAnimationAndroidName[];
  extern const char kTabToGTSAnimationAndroidDescription[];
  extern const char kTabToGTSAnimationAndroidDescription[];
  
  
@@ -104,7 +104,7 @@ diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptio
 diff --git a/chrome/browser/prefetch/prefetch_prefs.h b/chrome/browser/prefetch/prefetch_prefs.h
 diff --git a/chrome/browser/prefetch/prefetch_prefs.h b/chrome/browser/prefetch/prefetch_prefs.h
 --- a/chrome/browser/prefetch/prefetch_prefs.h
 --- a/chrome/browser/prefetch/prefetch_prefs.h
 +++ b/chrome/browser/prefetch/prefetch_prefs.h
 +++ b/chrome/browser/prefetch/prefetch_prefs.h
-@@ -22,7 +22,7 @@ enum class NetworkPredictionOptions {
+@@ -25,7 +25,7 @@ enum class NetworkPredictionOptions {
    kWifiOnlyDeprecated = 1,
    kWifiOnlyDeprecated = 1,
    kDisabled = 2,
    kDisabled = 2,
    kExtended = 3,
    kExtended = 3,
@@ -294,7 +294,7 @@ diff --git a/components/payments/core/payment_prefs.cc b/components/payments/cor
 diff --git a/components/safe_browsing/core/common/safe_browsing_prefs.cc b/components/safe_browsing/core/common/safe_browsing_prefs.cc
 diff --git a/components/safe_browsing/core/common/safe_browsing_prefs.cc b/components/safe_browsing/core/common/safe_browsing_prefs.cc
 --- a/components/safe_browsing/core/common/safe_browsing_prefs.cc
 --- a/components/safe_browsing/core/common/safe_browsing_prefs.cc
 +++ b/components/safe_browsing/core/common/safe_browsing_prefs.cc
 +++ b/components/safe_browsing/core/common/safe_browsing_prefs.cc
-@@ -197,9 +197,9 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
+@@ -199,9 +199,9 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
    registry->RegisterBooleanPref(
    registry->RegisterBooleanPref(
        prefs::kSafeBrowsingSawInterstitialScoutReporting, false);
        prefs::kSafeBrowsingSawInterstitialScoutReporting, false);
    registry->RegisterBooleanPref(
    registry->RegisterBooleanPref(
@@ -324,7 +324,7 @@ diff --git a/components/signin/internal/identity_manager/primary_account_manager
 diff --git a/content/public/common/content_features.cc b/content/public/common/content_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
 --- a/content/public/common/content_features.cc
 +++ b/content/public/common/content_features.cc
 +++ b/content/public/common/content_features.cc
-@@ -451,7 +451,7 @@ const char kIsolateOriginsFieldTrialParamName[] = "OriginsList";
+@@ -457,7 +457,7 @@ const char kIsolateOriginsFieldTrialParamName[] = "OriginsList";
  // the attribute. Note: At present, only iframes with origin-restricted
  // the attribute. Note: At present, only iframes with origin-restricted
  // sandboxes are isolated.
  // sandboxes are isolated.
  const base::Feature kIsolateSandboxedIframes{"IsolateSandboxedIframes",
  const base::Feature kIsolateSandboxedIframes{"IsolateSandboxedIframes",

+ 85 - 83
build/patches/Move-navigation-bar-to-bottom.patch

@@ -133,7 +133,7 @@ diff --git a/cc/input/browser_controls_offset_manager.cc b/cc/input/browser_cont
 diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
 diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
 --- a/cc/trees/layer_tree_host_impl.cc
 --- a/cc/trees/layer_tree_host_impl.cc
 +++ b/cc/trees/layer_tree_host_impl.cc
 +++ b/cc/trees/layer_tree_host_impl.cc
-@@ -4212,6 +4212,9 @@ bool LayerTreeHostImpl::AnimateBrowserControls(base::TimeTicks time) {
+@@ -4201,6 +4201,9 @@ bool LayerTreeHostImpl::AnimateBrowserControls(base::TimeTicks time) {
    if (scroll_delta.IsZero())
    if (scroll_delta.IsZero())
      return false;
      return false;
  
  
@@ -177,7 +177,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
 diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java
 diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java
 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java
 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java
 +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java
 +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java
-@@ -59,6 +59,12 @@ import org.chromium.url.GURL;
+@@ -60,6 +60,12 @@ import org.chromium.url.GURL;
  import java.util.ArrayList;
  import java.util.ArrayList;
  import java.util.List;
  import java.util.List;
  
  
@@ -190,7 +190,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
  /**
  /**
   * A mediator for the TabGroupUi. Responsible for managing the internal state of the component.
   * A mediator for the TabGroupUi. Responsible for managing the internal state of the component.
   */
   */
-@@ -131,6 +137,11 @@ public class TabGroupUiMediator implements SnackbarManager.SnackbarController {
+@@ -132,6 +138,11 @@ public class TabGroupUiMediator implements SnackbarManager.SnackbarController, B
      private boolean mIsShowingOverViewMode;
      private boolean mIsShowingOverViewMode;
      private boolean mActivatedButNotShown;
      private boolean mActivatedButNotShown;
  
  
@@ -202,7 +202,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
      TabGroupUiMediator(Context context,
      TabGroupUiMediator(Context context,
              BottomControlsCoordinator.BottomControlsVisibilityController visibilityController,
              BottomControlsCoordinator.BottomControlsVisibilityController visibilityController,
              ResetHandler resetHandler, PropertyModel model, TabModelSelector tabModelSelector,
              ResetHandler resetHandler, PropertyModel model, TabModelSelector tabModelSelector,
-@@ -140,7 +151,9 @@ public class TabGroupUiMediator implements SnackbarManager.SnackbarController {
+@@ -141,7 +152,9 @@ public class TabGroupUiMediator implements SnackbarManager.SnackbarController, B
              @Nullable TabGridDialogMediator.DialogController dialogController,
              @Nullable TabGridDialogMediator.DialogController dialogController,
              ActivityLifecycleDispatcher activityLifecycleDispatcher,
              ActivityLifecycleDispatcher activityLifecycleDispatcher,
              SnackbarManager snackbarManager,
              SnackbarManager snackbarManager,
@@ -213,7 +213,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
          mContext = context;
          mContext = context;
          mResetHandler = resetHandler;
          mResetHandler = resetHandler;
          mModel = model;
          mModel = model;
-@@ -167,6 +180,24 @@ public class TabGroupUiMediator implements SnackbarManager.SnackbarController {
+@@ -168,6 +181,24 @@ public class TabGroupUiMediator implements SnackbarManager.SnackbarController, B
              mIsShowingOverViewMode = true;
              mIsShowingOverViewMode = true;
          }
          }
  
  
@@ -238,7 +238,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
          // register for tab model
          // register for tab model
          mTabModelObserver = new TabModelObserver() {
          mTabModelObserver = new TabModelObserver() {
              private int mAddedTabId = Tab.INVALID_TAB_ID;
              private int mAddedTabId = Tab.INVALID_TAB_ID;
-@@ -191,6 +222,7 @@ public class TabGroupUiMediator implements SnackbarManager.SnackbarController {
+@@ -192,6 +223,7 @@ public class TabGroupUiMediator implements SnackbarManager.SnackbarController, B
                          maybeActivateConditionalTabStrip(ReasonToShow.TAB_SWITCHED);
                          maybeActivateConditionalTabStrip(ReasonToShow.TAB_SWITCHED);
                      }
                      }
                  }
                  }
@@ -246,7 +246,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
                  if (type == TabSelectionType.FROM_CLOSE) return;
                  if (type == TabSelectionType.FROM_CLOSE) return;
                  if (TabUiFeatureUtilities.isTabGroupsAndroidEnabled(mContext)
                  if (TabUiFeatureUtilities.isTabGroupsAndroidEnabled(mContext)
                          && getTabsToShowForId(lastId).contains(tab)) {
                          && getTabsToShowForId(lastId).contains(tab)) {
-@@ -261,6 +293,7 @@ public class TabGroupUiMediator implements SnackbarManager.SnackbarController {
+@@ -262,6 +294,7 @@ public class TabGroupUiMediator implements SnackbarManager.SnackbarController, B
                  resetTabStripWithRelatedTabsForId(currentTab.getId());
                  resetTabStripWithRelatedTabsForId(currentTab.getId());
                  RecordUserAction.record("TabStrip.SessionVisibility."
                  RecordUserAction.record("TabStrip.SessionVisibility."
                          + (mIsTabGroupUiVisible ? "Visible" : "Hidden"));
                          + (mIsTabGroupUiVisible ? "Visible" : "Hidden"));
@@ -254,7 +254,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
              }
              }
  
  
              @Override
              @Override
-@@ -397,6 +430,20 @@ public class TabGroupUiMediator implements SnackbarManager.SnackbarController {
+@@ -398,6 +431,20 @@ public class TabGroupUiMediator implements SnackbarManager.SnackbarController, B
          if (tab != null) {
          if (tab != null) {
              resetTabStripWithRelatedTabsForId(tab.getId());
              resetTabStripWithRelatedTabsForId(tab.getId());
          }
          }
@@ -275,7 +275,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
      }
      }
  
  
      void setupLeftButtonDrawable(int drawableId) {
      void setupLeftButtonDrawable(int drawableId) {
-@@ -543,6 +590,7 @@ public class TabGroupUiMediator implements SnackbarManager.SnackbarController {
+@@ -557,6 +604,7 @@ public class TabGroupUiMediator implements SnackbarManager.SnackbarController, B
      }
      }
  
  
      public void destroy() {
      public void destroy() {
@@ -436,7 +436,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
 diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherMediator.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherMediator.java
 diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherMediator.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherMediator.java
 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherMediator.java
 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherMediator.java
 +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherMediator.java
 +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSwitcherMediator.java
-@@ -379,11 +379,22 @@ class TabSwitcherMediator implements TabSwitcher.Controller, TabListRecyclerView
+@@ -385,11 +385,22 @@ class TabSwitcherMediator implements TabSwitcher.Controller, TabListRecyclerView
              updateTopControlsProperties();
              updateTopControlsProperties();
              mContainerViewModel.set(
              mContainerViewModel.set(
                      BOTTOM_CONTROLS_HEIGHT, browserControlsStateProvider.getBottomControlsHeight());
                      BOTTOM_CONTROLS_HEIGHT, browserControlsStateProvider.getBottomControlsHeight());
@@ -459,7 +459,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
          }
          }
  
  
          mContainerView = containerView;
          mContainerView = containerView;
-@@ -492,6 +503,10 @@ class TabSwitcherMediator implements TabSwitcher.Controller, TabListRecyclerView
+@@ -502,6 +513,10 @@ class TabSwitcherMediator implements TabSwitcher.Controller, TabListRecyclerView
          final int contentOffset = mBrowserControlsStateProvider.getContentOffset();
          final int contentOffset = mBrowserControlsStateProvider.getContentOffset();
  
  
          mContainerViewModel.set(TOP_MARGIN, contentOffset);
          mContainerViewModel.set(TOP_MARGIN, contentOffset);
@@ -473,7 +473,7 @@ diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser
 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
 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
 --- 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
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/ChromeAccessibilitySettingsDelegate.java
-@@ -18,6 +18,14 @@ import org.chromium.components.browser_ui.accessibility.AccessibilitySettingsDel
+@@ -19,6 +19,14 @@ import org.chromium.components.browser_ui.accessibility.PageZoomUtils;
  import org.chromium.components.user_prefs.UserPrefs;
  import org.chromium.components.user_prefs.UserPrefs;
  import org.chromium.content_public.browser.BrowserContextHandle;
  import org.chromium.content_public.browser.BrowserContextHandle;
  
  
@@ -488,7 +488,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s
  /** The Chrome implementation of AccessibilitySettingsDelegate. */
  /** The Chrome implementation of AccessibilitySettingsDelegate. */
  public class ChromeAccessibilitySettingsDelegate implements AccessibilitySettingsDelegate {
  public class ChromeAccessibilitySettingsDelegate implements AccessibilitySettingsDelegate {
      private static final String READER_MODE_SELECTED_HISTOGRAM =
      private static final String READER_MODE_SELECTED_HISTOGRAM =
-@@ -34,6 +42,12 @@ public class ChromeAccessibilitySettingsDelegate implements AccessibilitySetting
+@@ -35,6 +43,12 @@ public class ChromeAccessibilitySettingsDelegate implements AccessibilitySetting
          public void setEnabled(boolean value) {}
          public void setEnabled(boolean value) {}
      }
      }
  
  
@@ -501,7 +501,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s
      private static class ReaderForAccessibilityDelegate implements BooleanPreferenceDelegate {
      private static class ReaderForAccessibilityDelegate implements BooleanPreferenceDelegate {
          @Override
          @Override
          public boolean isEnabled() {
          public boolean isEnabled() {
-@@ -86,6 +100,44 @@ public class ChromeAccessibilitySettingsDelegate implements AccessibilitySetting
+@@ -87,6 +101,44 @@ public class ChromeAccessibilitySettingsDelegate implements AccessibilitySetting
          return new ForceTabletUIDelegate();
          return new ForceTabletUIDelegate();
      }
      }
  
  
@@ -549,7 +549,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/s
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
 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
 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
-@@ -245,6 +245,9 @@ import java.util.ArrayList;
+@@ -238,6 +238,9 @@ import java.util.ArrayList;
  import java.util.List;
  import java.util.List;
  import java.util.function.Consumer;
  import java.util.function.Consumer;
  
  
@@ -559,7 +559,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv
  /**
  /**
   * A {@link AsyncInitializationActivity} that builds and manages a {@link CompositorViewHolder}
   * A {@link AsyncInitializationActivity} that builds and manages a {@link CompositorViewHolder}
   * and associated classes.
   * and associated classes.
-@@ -741,6 +744,15 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+@@ -737,6 +740,15 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
                  int toolbarLayoutId = getToolbarLayoutId();
                  int toolbarLayoutId = getToolbarLayoutId();
                  if (toolbarLayoutId != ActivityUtils.NO_RESOURCE_ID && controlContainer != null) {
                  if (toolbarLayoutId != ActivityUtils.NO_RESOURCE_ID && controlContainer != null) {
                      controlContainer.initWithToolbar(toolbarLayoutId);
                      controlContainer.initWithToolbar(toolbarLayoutId);
@@ -575,7 +575,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv
                  }
                  }
              }
              }
              onInitialLayoutInflationComplete();
              onInitialLayoutInflationComplete();
-@@ -764,6 +776,7 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+@@ -760,6 +772,7 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
          mCompositorViewHolderSupplier.get().setRootView(rootView);
          mCompositorViewHolderSupplier.get().setRootView(rootView);
  
  
          // Setting fitsSystemWindows to false ensures that the root view doesn't consume the
          // Setting fitsSystemWindows to false ensures that the root view doesn't consume the
@@ -586,7 +586,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/app/flags/ChromeCachedFlags.java b/chrome/android/java/src/org/chromium/chrome/browser/app/flags/ChromeCachedFlags.java
 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
 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/flags/ChromeCachedFlags.java
 --- 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
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/flags/ChromeCachedFlags.java
-@@ -100,6 +100,7 @@ public class ChromeCachedFlags {
+@@ -98,6 +98,7 @@ public class ChromeCachedFlags {
                  add(ChromeFeatureList.INSTANT_START);
                  add(ChromeFeatureList.INSTANT_START);
                  add(ChromeFeatureList.INSTANCE_SWITCHER);
                  add(ChromeFeatureList.INSTANCE_SWITCHER);
                  add(ChromeFeatureList.INTEREST_FEED_V2);
                  add(ChromeFeatureList.INTEREST_FEED_V2);
@@ -620,24 +620,24 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/Comp
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromeTablet.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromeTablet.java
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromeTablet.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromeTablet.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromeTablet.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromeTablet.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromeTablet.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromeTablet.java
-@@ -23,6 +23,7 @@ import org.chromium.chrome.browser.toolbar.ControlContainer;
+@@ -26,6 +26,7 @@ import org.chromium.chrome.browser.toolbar.ControlContainer;
  import org.chromium.chrome.features.start_surface.StartSurface;
  import org.chromium.chrome.features.start_surface.StartSurface;
  import org.chromium.components.browser_ui.widget.scrim.ScrimCoordinator;
  import org.chromium.components.browser_ui.widget.scrim.ScrimCoordinator;
  import org.chromium.ui.resources.dynamics.DynamicResourceLoader;
  import org.chromium.ui.resources.dynamics.DynamicResourceLoader;
 +import org.chromium.chrome.browser.fullscreen.BrowserControlsManager;
 +import org.chromium.chrome.browser.fullscreen.BrowserControlsManager;
  
  
- /**
-  * {@link LayoutManagerChromeTablet} is the specialization of {@link LayoutManagerChrome} for
-@@ -58,7 +59,8 @@ public class LayoutManagerChromeTablet extends LayoutManagerChrome {
-                 startSurfaceScrimAnchor, scrimCoordinator);
+ import java.util.concurrent.Callable;
  
  
+@@ -77,7 +78,8 @@ public class LayoutManagerChromeTablet extends LayoutManagerChrome {
+                 topUiThemeColorProvider, jankTracker, tabSwitcherViewHolder, scrimCoordinator);
+         mStartSurfaceSupplier = startSurfaceSupplier;
          mTabStripLayoutHelperManager = new StripLayoutHelperManager(host.getContext(), this,
          mTabStripLayoutHelperManager = new StripLayoutHelperManager(host.getContext(), this,
 -                mHost.getLayoutRenderHost(), () -> mLayerTitleCache, lifecycleDispatcher);
 -                mHost.getLayoutRenderHost(), () -> mLayerTitleCache, lifecycleDispatcher);
 +                mHost.getLayoutRenderHost(), () -> mLayerTitleCache, lifecycleDispatcher,
 +                mHost.getLayoutRenderHost(), () -> mLayerTitleCache, lifecycleDispatcher,
 +                /*browserControlsManagerSupplier*/ () -> getBrowserControlsManager());
 +                /*browserControlsManagerSupplier*/ () -> getBrowserControlsManager());
-         addSceneOverlay(mTabStripLayoutHelperManager);
- 
-         addObserver(mTabStripLayoutHelperManager.getTabSwitcherObserver());
+         mJankTracker = jankTracker;
+         mScrimCoordinator = scrimCoordinator;
+         mCreateStartSurfaceCallable = delayedStartSurfaceCallable;
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/ToolbarSwipeLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/ToolbarSwipeLayout.java
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/ToolbarSwipeLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/ToolbarSwipeLayout.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/ToolbarSwipeLayout.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/ToolbarSwipeLayout.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/ToolbarSwipeLayout.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/ToolbarSwipeLayout.java
@@ -680,7 +680,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layo
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java
 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
 --- 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
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java
-@@ -340,7 +340,7 @@ public class StripLayoutHelper implements StripLayoutTab.StripLayoutTabDelegate
+@@ -354,7 +354,7 @@ public class StripLayoutHelper implements StripLayoutTab.StripLayoutTabDelegate
          // position 0 is on the left. Account for that in the offset calculation.
          // position 0 is on the left. Account for that in the offset calculation.
          boolean isRtl = LocalizationUtils.isLayoutRtl();
          boolean isRtl = LocalizationUtils.isLayoutRtl();
          boolean useUnadjustedScrollOffset = isRtl != isLeft;
          boolean useUnadjustedScrollOffset = isRtl != isLeft;
@@ -688,7 +688,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over
 +        float offset = -Math.abs(useUnadjustedScrollOffset ? mScrollOffset
 +        float offset = -Math.abs(useUnadjustedScrollOffset ? mScrollOffset
                  : (mMinScrollOffset - mScrollOffset));
                  : (mMinScrollOffset - mScrollOffset));
  
  
-         if (offset == 0.f) {
+         if (offset <= 0.f) {
 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
 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
 --- 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
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperManager.java
@@ -758,7 +758,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over
          mUpdateHost = updateHost;
          mUpdateHost = updateHost;
          mLayerTitleCacheSupplier = layerTitleCacheSupplier;
          mLayerTitleCacheSupplier = layerTitleCacheSupplier;
          mTabStripTreeProvider = new TabStripSceneLayer(context);
          mTabStripTreeProvider = new TabStripSceneLayer(context);
-@@ -285,6 +295,8 @@ public class StripLayoutHelperManager implements SceneOverlay, PauseResumeWithNa
+@@ -286,6 +296,8 @@ public class StripLayoutHelperManager implements SceneOverlay, PauseResumeWithNa
                  new StripLayoutHelper(context, updateHost, renderHost, false, mModelSelectorButton);
                  new StripLayoutHelper(context, updateHost, renderHost, false, mModelSelectorButton);
          mIncognitoHelper =
          mIncognitoHelper =
                  new StripLayoutHelper(context, updateHost, renderHost, true, mModelSelectorButton);
                  new StripLayoutHelper(context, updateHost, renderHost, true, mModelSelectorButton);
@@ -767,7 +767,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over
  
  
          onContextChanged(context);
          onContextChanged(context);
      }
      }
-@@ -354,9 +366,13 @@ public class StripLayoutHelperManager implements SceneOverlay, PauseResumeWithNa
+@@ -355,9 +367,13 @@ public class StripLayoutHelperManager implements SceneOverlay, PauseResumeWithNa
          Tab selectedTab = mTabModelSelector.getCurrentModel().getTabAt(
          Tab selectedTab = mTabModelSelector.getCurrentModel().getTabAt(
                  mTabModelSelector.getCurrentModel().index());
                  mTabModelSelector.getCurrentModel().index());
          int selectedTabId = selectedTab == null ? TabModel.INVALID_TAB_INDEX : selectedTab.getId();
          int selectedTabId = selectedTab == null ? TabModel.INVALID_TAB_INDEX : selectedTab.getId();
@@ -782,7 +782,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/over
          return mTabStripTreeProvider;
          return mTabStripTreeProvider;
      }
      }
  
  
-@@ -394,7 +410,17 @@ public class StripLayoutHelperManager implements SceneOverlay, PauseResumeWithNa
+@@ -395,7 +411,17 @@ public class StripLayoutHelperManager implements SceneOverlay, PauseResumeWithNa
          mIncognitoHelper.onSizeChanged(
          mIncognitoHelper.onSizeChanged(
                  mWidth, mHeight, orientationChanged, LayoutManagerImpl.time());
                  mWidth, mHeight, orientationChanged, LayoutManagerImpl.time());
  
  
@@ -1019,7 +1019,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/modaldialog/Chr
 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
 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
 --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java
-@@ -93,6 +93,8 @@ import org.chromium.content_public.browser.NavigationEntry;
+@@ -97,6 +97,8 @@ import org.chromium.content_public.browser.NavigationEntry;
  import org.chromium.ui.base.DeviceFormFactor;
  import org.chromium.ui.base.DeviceFormFactor;
  import org.chromium.ui.base.WindowAndroid;
  import org.chromium.ui.base.WindowAndroid;
  import org.chromium.ui.mojom.WindowOpenDisposition;
  import org.chromium.ui.mojom.WindowOpenDisposition;
@@ -1028,7 +1028,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.
  
  
  import java.util.List;
  import java.util.List;
  
  
-@@ -533,10 +535,15 @@ public class NewTabPage implements NativePage, InvalidationAwareThumbnailProvide
+@@ -540,10 +542,15 @@ public class NewTabPage implements NativePage, InvalidationAwareThumbnailProvide
          // + topControlsDistanceToRest| will give the margin for the current animation frame.
          // + topControlsDistanceToRest| will give the margin for the current animation frame.
          final int topControlsDistanceToRest = mBrowserControlsStateProvider.getContentOffset()
          final int topControlsDistanceToRest = mBrowserControlsStateProvider.getContentOffset()
                  - mBrowserControlsStateProvider.getTopControlsHeight();
                  - mBrowserControlsStateProvider.getTopControlsHeight();
@@ -1046,7 +1046,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.
  
  
          if (topMargin != layoutParams.topMargin || bottomMargin != layoutParams.bottomMargin) {
          if (topMargin != layoutParams.topMargin || bottomMargin != layoutParams.bottomMargin) {
              layoutParams.topMargin = topMargin;
              layoutParams.topMargin = topMargin;
-@@ -559,7 +566,7 @@ public class NewTabPage implements NativePage, InvalidationAwareThumbnailProvide
+@@ -563,7 +570,7 @@ public class NewTabPage implements NativePage, InvalidationAwareThumbnailProvide
       *         strip.
       *         strip.
       */
       */
      private int getToolbarExtraYOffset() {
      private int getToolbarExtraYOffset() {
@@ -1162,7 +1162,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/Se
 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
 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
 --- a/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java
-@@ -260,6 +260,11 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity
+@@ -261,6 +261,11 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity
          if (fragment instanceof INeedSnackbarManager) {
          if (fragment instanceof INeedSnackbarManager) {
              ((INeedSnackbarManager)fragment).setSnackbarManager(mSnackbarManager);
              ((INeedSnackbarManager)fragment).setSnackbarManager(mSnackbarManager);
          }
          }
@@ -1228,7 +1228,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/status_indicato
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
 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
 --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
-@@ -170,6 +170,9 @@ import org.chromium.url.GURL;
+@@ -175,6 +175,9 @@ import org.chromium.url.GURL;
  
  
  import java.util.List;
  import java.util.List;
  
  
@@ -1238,7 +1238,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar
  /**
  /**
   * Contains logic for managing the toolbar visual component.  This class manages the interactions
   * Contains logic for managing the toolbar visual component.  This class manages the interactions
   * with the rest of the application to ensure the toolbar is always visually up to date.
   * with the rest of the application to ensure the toolbar is always visually up to date.
-@@ -607,7 +610,7 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve
+@@ -619,7 +622,7 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve
              };
              };
              // clang-format off
              // clang-format off
              LocationBarCoordinator locationBarCoordinator = new LocationBarCoordinator(
              LocationBarCoordinator locationBarCoordinator = new LocationBarCoordinator(
@@ -1247,7 +1247,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar
                      PrivacyPreferencesManagerImpl.getInstance(), mLocationBarModel,
                      PrivacyPreferencesManagerImpl.getInstance(), mLocationBarModel,
                      mActionModeController.getActionModeCallback(),
                      mActionModeController.getActionModeCallback(),
                      new WindowDelegate(mActivity.getWindow()), windowAndroid, mActivityTabProvider,
                      new WindowDelegate(mActivity.getWindow()), windowAndroid, mActivityTabProvider,
-@@ -853,11 +856,13 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve
+@@ -870,11 +873,13 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve
                  // the height won't be measured by the background image.
                  // the height won't be measured by the background image.
                  if (mControlContainer.getBackground() == null) {
                  if (mControlContainer.getBackground() == null) {
                      setControlContainerTopMargin(getToolbarExtraYOffset());
                      setControlContainerTopMargin(getToolbarExtraYOffset());
@@ -1261,7 +1261,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar
                              mControlContainer.removeOnLayoutChangeListener(mLayoutChangeListener);
                              mControlContainer.removeOnLayoutChangeListener(mLayoutChangeListener);
                              mLayoutChangeListener = null;
                              mLayoutChangeListener = null;
                          }
                          }
-@@ -1253,13 +1258,25 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve
+@@ -1274,13 +1279,25 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve
          return mLocationBar.getOmniboxStub().isUrlBarFocused();
          return mLocationBar.getOmniboxStub().isUrlBarFocused();
      }
      }
  
  
@@ -1289,7 +1289,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar
                  mScrimCoordinator, mOmniboxFocusStateSupplier, mBottomSheetController,
                  mScrimCoordinator, mOmniboxFocusStateSupplier, mBottomSheetController,
                  mActivityLifecycleDispatcher, mIsWarmOnResumeSupplier, mTabModelSelector,
                  mActivityLifecycleDispatcher, mIsWarmOnResumeSupplier, mTabModelSelector,
                  mTabContentManager, mCompositorViewHolder,
                  mTabContentManager, mCompositorViewHolder,
-@@ -1268,8 +1285,9 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve
+@@ -1289,8 +1306,9 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve
          mBottomControlsCoordinatorSupplier.set(
          mBottomControlsCoordinatorSupplier.set(
                  new BottomControlsCoordinator(mActivity, mWindowAndroid, mLayoutManager,
                  new BottomControlsCoordinator(mActivity, mWindowAndroid, mLayoutManager,
                          mCompositorViewHolder.getResourceManager(), mBrowserControlsSizer,
                          mCompositorViewHolder.getResourceManager(), mBrowserControlsSizer,
@@ -1301,7 +1301,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar
      }
      }
  
  
      /**
      /**
-@@ -1994,6 +2012,15 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve
+@@ -2029,6 +2047,15 @@ public class ToolbarManager implements UrlFocusChangeListener, ThemeColorObserve
      private void setControlContainerTopMargin(int margin) {
      private void setControlContainerTopMargin(int margin) {
          final ViewGroup.MarginLayoutParams layoutParams =
          final ViewGroup.MarginLayoutParams layoutParams =
                  ((ViewGroup.MarginLayoutParams) mControlContainer.getLayoutParams());
                  ((ViewGroup.MarginLayoutParams) mControlContainer.getLayoutParams());
@@ -1360,7 +1360,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/BottomContai
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -6632,6 +6632,11 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -6829,6 +6829,11 @@ const FeatureEntry kFeatureEntries[] = {
       flag_descriptions::kImpulseScrollAnimationsDescription, kOsAll,
       flag_descriptions::kImpulseScrollAnimationsDescription, kOsAll,
       FEATURE_VALUE_TYPE(features::kImpulseScrollAnimations)},
       FEATURE_VALUE_TYPE(features::kImpulseScrollAnimations)},
  
  
@@ -1461,7 +1461,7 @@ diff --git a/chrome/browser/browser_controls/android/java/src/org/chromium/chrom
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -1549,6 +1549,10 @@ const char kImpulseScrollAnimationsDescription[] =
+@@ -1572,6 +1572,10 @@ const char kImpulseScrollAnimationsDescription[] =
      "Replaces the default scroll animation with Impulse-style scroll "
      "Replaces the default scroll animation with Impulse-style scroll "
      "animations.";
      "animations.";
  
  
@@ -1475,7 +1475,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -875,6 +875,9 @@ extern const char kCompositorThreadedScrollbarScrollingDescription[];
+@@ -890,6 +890,9 @@ extern const char kCompositorThreadedScrollbarScrollingDescription[];
  extern const char kImpulseScrollAnimationsName[];
  extern const char kImpulseScrollAnimationsName[];
  extern const char kImpulseScrollAnimationsDescription[];
  extern const char kImpulseScrollAnimationsDescription[];
  
  
@@ -1520,34 +1520,34 @@ diff --git a/chrome/browser/flags/android/cached_feature_flags.cc b/chrome/brows
 diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
 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
 --- a/chrome/browser/flags/android/chrome_feature_list.cc
 +++ b/chrome/browser/flags/android/chrome_feature_list.cc
 +++ b/chrome/browser/flags/android/chrome_feature_list.cc
-@@ -11,6 +11,7 @@
- #include "base/android/jni_array.h"
+@@ -12,6 +12,7 @@
  #include "base/android/jni_string.h"
  #include "base/android/jni_string.h"
+ #include "base/containers/flat_map.h"
  #include "base/feature_list.h"
  #include "base/feature_list.h"
 +#include "cc/base/features.h"
 +#include "cc/base/features.h"
  #include "base/metrics/field_trial_params.h"
  #include "base/metrics/field_trial_params.h"
- #include "chrome/browser/browser_features.h"
- #include "chrome/browser/feature_guide/notifications/feature_notification_guide_service.h"
-@@ -246,6 +247,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
+ #include "base/no_destructor.h"
+ #include "base/strings/string_piece_forward.h"
+@@ -249,6 +250,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
      &kKitKatSupported,
      &kKitKatSupported,
      &kLensCameraAssistedSearch,
      &kLensCameraAssistedSearch,
      &kLensOnQuickActionSearchWidget,
      &kLensOnQuickActionSearchWidget,
 +    &features::kMoveTopToolbarToBottom,
 +    &features::kMoveTopToolbarToBottom,
      &kLocationBarModelOptimizations,
      &kLocationBarModelOptimizations,
      &kMostRecentTabOnBackgroundCloseTab,
      &kMostRecentTabOnBackgroundCloseTab,
-     &kNewWindowAppMenu,
+     &kNewInstanceFromDraggedLink,
 diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
 diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
 --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
 --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
 +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
 +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
-@@ -104,6 +104,7 @@ public class CachedFeatureFlags {
+@@ -98,6 +98,7 @@ public class CachedFeatureFlags {
                      .put(ChromeFeatureList.GRID_TAB_SWITCHER_FOR_TABLETS, false)
                      .put(ChromeFeatureList.GRID_TAB_SWITCHER_FOR_TABLETS, false)
                      .put(ChromeFeatureList.TAB_GROUPS_FOR_TABLETS, false)
                      .put(ChromeFeatureList.TAB_GROUPS_FOR_TABLETS, false)
                      .put(ChromeFeatureList.TAB_STRIP_IMPROVEMENTS, false)
                      .put(ChromeFeatureList.TAB_STRIP_IMPROVEMENTS, false)
 +                    .put(ChromeFeatureList.MOVE_TOP_TOOLBAR_TO_BOTTOM, false)
 +                    .put(ChromeFeatureList.MOVE_TOP_TOOLBAR_TO_BOTTOM, false)
                      .put(ChromeFeatureList.BACK_GESTURE_REFACTOR, false)
                      .put(ChromeFeatureList.BACK_GESTURE_REFACTOR, false)
                      .put(ChromeFeatureList.TRUSTED_WEB_ACTIVITY_NOTIFICATION_PERMISSION_DELEGATION,
                      .put(ChromeFeatureList.TRUSTED_WEB_ACTIVITY_NOTIFICATION_PERMISSION_DELEGATION,
-                             false)
-@@ -205,6 +206,23 @@ public class CachedFeatureFlags {
+                             true)
+@@ -198,6 +199,23 @@ public class CachedFeatureFlags {
          SharedPreferencesManager.getInstance().writeBoolean(preferenceName, isEnabledInNative);
          SharedPreferencesManager.getInstance().writeBoolean(preferenceName, isEnabledInNative);
      }
      }
  
  
@@ -1571,7 +1571,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f
      /**
      /**
       * Forces a feature to be enabled or disabled for testing.
       * Forces a feature to be enabled or disabled for testing.
       *
       *
-@@ -498,6 +516,7 @@ public class CachedFeatureFlags {
+@@ -515,6 +533,7 @@ public class CachedFeatureFlags {
  
  
      @NativeMethods
      @NativeMethods
      interface Natives {
      interface Natives {
@@ -1582,7 +1582,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f
 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
 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
 --- 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
 +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
-@@ -411,6 +411,8 @@ public abstract class ChromeFeatureList {
+@@ -420,6 +420,8 @@ public abstract class ChromeFeatureList {
      public static final String MESSAGES_FOR_ANDROID_SYNC_ERROR = "MessagesForAndroidSyncError";
      public static final String MESSAGES_FOR_ANDROID_SYNC_ERROR = "MessagesForAndroidSyncError";
      public static final String SEARCH_READY_OMNIBOX = "SearchReadyOmnibox";
      public static final String SEARCH_READY_OMNIBOX = "SearchReadyOmnibox";
      public static final String MODAL_PERMISSION_DIALOG_VIEW = "ModalPermissionDialogView";
      public static final String MODAL_PERMISSION_DIALOG_VIEW = "ModalPermissionDialogView";
@@ -1616,7 +1616,7 @@ diff --git a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/ch
  
  
          int footerHeight = inflateFooter(footerResourceId, contentView, menuWidth);
          int footerHeight = inflateFooter(footerResourceId, contentView, menuWidth);
          int headerHeight = inflateHeader(headerResourceId, contentView, menuWidth);
          int headerHeight = inflateHeader(headerResourceId, contentView, menuWidth);
-@@ -346,6 +354,14 @@ class AppMenu implements OnItemClickListener, OnKeyListener, AppMenuClickHandler
+@@ -349,6 +357,14 @@ class AppMenu implements OnItemClickListener, OnKeyListener, AppMenuClickHandler
          int anchorViewX = tempLocation[0];
          int anchorViewX = tempLocation[0];
          int anchorViewY = tempLocation[1];
          int anchorViewY = tempLocation[1];
  
  
@@ -1631,7 +1631,7 @@ diff --git a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/ch
          int[] offsets = new int[2];
          int[] offsets = new int[2];
          // If we have a hardware menu button, locate the app menu closer to the estimated
          // If we have a hardware menu button, locate the app menu closer to the estimated
          // hardware menu button location.
          // hardware menu button location.
-@@ -536,6 +552,15 @@ class AppMenu implements OnItemClickListener, OnKeyListener, AppMenuClickHandler
+@@ -539,6 +555,15 @@ class AppMenu implements OnItemClickListener, OnKeyListener, AppMenuClickHandler
          }
          }
          int availableScreenSpace = Math.max(
          int availableScreenSpace = Math.max(
                  anchorViewY, appDimensions.height() - anchorViewY - anchorViewImpactHeight);
                  anchorViewY, appDimensions.height() - anchorViewY - anchorViewImpactHeight);
@@ -1656,10 +1656,10 @@ diff --git a/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/ch
  import org.chromium.base.metrics.RecordUserAction;
  import org.chromium.base.metrics.RecordUserAction;
 +import org.chromium.chrome.browser.flags.ChromeFeatureList;
 +import org.chromium.chrome.browser.flags.ChromeFeatureList;
 +import org.chromium.chrome.browser.flags.CachedFeatureFlags;
 +import org.chromium.chrome.browser.flags.CachedFeatureFlags;
+ import org.chromium.base.supplier.Supplier;
  import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher;
  import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher;
  import org.chromium.chrome.browser.lifecycle.ConfigurationChangedObserver;
  import org.chromium.chrome.browser.lifecycle.ConfigurationChangedObserver;
- import org.chromium.chrome.browser.lifecycle.StartStopWithNativeObserver;
-@@ -178,6 +180,15 @@ class AppMenuHandlerImpl
+@@ -182,6 +184,15 @@ class AppMenuHandlerImpl
          }),
          }),
                  this);
                  this);
  
  
@@ -1810,7 +1810,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow
  import java.lang.annotation.Retention;
  import java.lang.annotation.Retention;
  import java.lang.annotation.RetentionPolicy;
  import java.lang.annotation.RetentionPolicy;
  import java.util.List;
  import java.util.List;
-@@ -929,7 +932,9 @@ class AutocompleteMediator implements OnSuggestionsReceivedListener,
+@@ -936,7 +939,9 @@ class AutocompleteMediator implements OnSuggestionsReceivedListener,
      public void onSuggestionDropdownScroll() {
      public void onSuggestionDropdownScroll() {
          if (mDropdownViewInfoListBuilder.hasFullyConcealedElements()) {
          if (mDropdownViewInfoListBuilder.hasFullyConcealedElements()) {
              mSuggestionsListScrolled = true;
              mSuggestionsListScrolled = true;
@@ -1899,7 +1899,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow
 diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 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
 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
-@@ -1430,6 +1430,12 @@ Your Google account may have other forms of browsing history like searches and a
+@@ -1433,6 +1433,12 @@ Your Google account may have other forms of browsing history like searches and a
        <message name="IDS_FORCE_TABLET_UI_TITLE" desc="Title of the preference that allows the user to update force tablet UI settings.">
        <message name="IDS_FORCE_TABLET_UI_TITLE" desc="Title of the preference that allows the user to update force tablet UI settings.">
          Force Tablet Mode
          Force Tablet Mode
        </message>
        </message>
@@ -1915,7 +1915,7 @@ 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
 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
 --- a/chrome/browser/ui/android/toolbar/BUILD.gn
 +++ b/chrome/browser/ui/android/toolbar/BUILD.gn
 +++ b/chrome/browser/ui/android/toolbar/BUILD.gn
-@@ -150,6 +150,7 @@ android_library("java") {
+@@ -154,6 +154,7 @@ android_library("java") {
      "//components/user_prefs/android:java",
      "//components/user_prefs/android:java",
      "//content/public/android:content_java",
      "//content/public/android:content_java",
      "//third_party/android_deps:material_design_java",
      "//third_party/android_deps:material_design_java",
@@ -1959,9 +1959,9 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow
 +import org.chromium.chrome.browser.tab.CurrentTabObserver;
 +import org.chromium.chrome.browser.tab.CurrentTabObserver;
 +import org.chromium.chrome.browser.tab.Tab;
 +import org.chromium.chrome.browser.tab.Tab;
  
  
- /**
-  * Interface for the bottom controls content UI. This UI delegates various operations to
-@@ -22,9 +26,12 @@ public interface BottomControlsContentDelegate {
+ import org.chromium.components.browser_ui.widget.gesture.BackPressHandler;
+ 
+@@ -24,9 +28,12 @@ public interface BottomControlsContentDelegate extends BackPressHandler {
       * Initialize the delegate on native initialization.
       * Initialize the delegate on native initialization.
       * @param activity Activity for the delegate.
       * @param activity Activity for the delegate.
       * @param visibilityController Bottom controls visibility controller.
       * @param visibilityController Bottom controls visibility controller.
@@ -1978,7 +1978,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/BottomControlsCoordinator.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsCoordinator.java
 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
 --- 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
 +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/bottom/BottomControlsCoordinator.java
-@@ -23,6 +23,8 @@ import org.chromium.ui.modelutil.PropertyModel;
+@@ -25,6 +25,8 @@ import org.chromium.ui.modelutil.PropertyModel;
  import org.chromium.ui.modelutil.PropertyModelChangeProcessor;
  import org.chromium.ui.modelutil.PropertyModelChangeProcessor;
  import org.chromium.ui.resources.ResourceManager;
  import org.chromium.ui.resources.ResourceManager;
  import org.chromium.ui.widget.Toast;
  import org.chromium.ui.widget.Toast;
@@ -1987,7 +1987,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow
  
  
  /**
  /**
   * The root coordinator for the bottom controls component. This component is intended for use with
   * The root coordinator for the bottom controls component. This component is intended for use with
-@@ -57,6 +59,8 @@ public class BottomControlsCoordinator {
+@@ -59,6 +61,8 @@ public class BottomControlsCoordinator implements BackPressHandler {
       * @param overlayPanelVisibilitySupplier Notifies overlay panel visibility event.
       * @param overlayPanelVisibilitySupplier Notifies overlay panel visibility event.
       * @param resourceManager A {@link ResourceManager} for loading textures into the compositor.
       * @param resourceManager A {@link ResourceManager} for loading textures into the compositor.
       * @param layoutManager A {@link LayoutManagerImpl} to attach overlays to.
       * @param layoutManager A {@link LayoutManagerImpl} to attach overlays to.
@@ -1996,7 +1996,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow
       */
       */
      @SuppressLint("CutPasteId") // Not actually cut and paste since it's View vs ViewGroup.
      @SuppressLint("CutPasteId") // Not actually cut and paste since it's View vs ViewGroup.
      public BottomControlsCoordinator(Activity activity, WindowAndroid windowAndroid,
      public BottomControlsCoordinator(Activity activity, WindowAndroid windowAndroid,
-@@ -64,7 +68,9 @@ public class BottomControlsCoordinator {
+@@ -66,7 +70,9 @@ public class BottomControlsCoordinator implements BackPressHandler {
              BrowserControlsSizer controlsSizer, FullscreenManager fullscreenManager,
              BrowserControlsSizer controlsSizer, FullscreenManager fullscreenManager,
              ScrollingBottomViewResourceFrameLayout root,
              ScrollingBottomViewResourceFrameLayout root,
              BottomControlsContentDelegate contentDelegate,
              BottomControlsContentDelegate contentDelegate,
@@ -2007,7 +2007,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow
          PropertyModel model = new PropertyModel(BottomControlsProperties.ALL_KEYS);
          PropertyModel model = new PropertyModel(BottomControlsProperties.ALL_KEYS);
  
  
          ScrollingBottomViewSceneLayer sceneLayer =
          ScrollingBottomViewSceneLayer sceneLayer =
-@@ -98,7 +104,8 @@ public class BottomControlsCoordinator {
+@@ -100,7 +106,8 @@ public class BottomControlsCoordinator implements BackPressHandler {
          layoutManager.addSceneOverlay(sceneLayer);
          layoutManager.addSceneOverlay(sceneLayer);
  
  
          if (mContentDelegate != null) {
          if (mContentDelegate != null) {
@@ -2138,7 +2138,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
 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
 --- 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
 +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java
-@@ -34,6 +34,11 @@ import org.chromium.ui.base.ViewUtils;
+@@ -38,6 +38,11 @@ import org.chromium.ui.base.ViewUtils;
  import org.chromium.ui.resources.dynamics.ViewResourceAdapter;
  import org.chromium.ui.resources.dynamics.ViewResourceAdapter;
  import org.chromium.ui.widget.OptimizedFrameLayout;
  import org.chromium.ui.widget.OptimizedFrameLayout;
  
  
@@ -2150,7 +2150,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow
  /**
  /**
   * Layout for the browser controls (omnibox, menu, tab strip, etc..).
   * Layout for the browser controls (omnibox, menu, tab strip, etc..).
   */
   */
-@@ -90,6 +95,12 @@ public class ToolbarControlContainer extends OptimizedFrameLayout implements Con
+@@ -94,6 +99,12 @@ public class ToolbarControlContainer extends OptimizedFrameLayout implements Con
      @Override
      @Override
      public void initWithToolbar(int toolbarLayoutId) {
      public void initWithToolbar(int toolbarLayoutId) {
          try (TraceEvent te = TraceEvent.scoped("ToolbarControlContainer.initWithToolbar")) {
          try (TraceEvent te = TraceEvent.scoped("ToolbarControlContainer.initWithToolbar")) {
@@ -2250,7 +2250,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow
 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
 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
 --- a/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml
 +++ b/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml
 +++ b/components/browser_ui/accessibility/android/java/res/xml/accessibility_preferences.xml
-@@ -39,4 +39,8 @@
+@@ -48,4 +48,8 @@
          android:key="captions"
          android:key="captions"
          android:title="@string/accessibility_captions_title"/>
          android:title="@string/accessibility_captions_title"/>
  
  
@@ -2262,15 +2262,15 @@ diff --git a/components/browser_ui/accessibility/android/java/res/xml/accessibil
 diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java
 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
 --- 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
 +++ b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettings.java
-@@ -32,12 +32,15 @@ public class AccessibilitySettings
+@@ -35,6 +35,7 @@ public class AccessibilitySettings
  
  
      private BooleanPreferenceDelegate mForceTabletUIDelegate;
      private BooleanPreferenceDelegate mForceTabletUIDelegate;
      static final String PREF_FORCE_TABLET_UI = "force_tablet_ui";
      static final String PREF_FORCE_TABLET_UI = "force_tablet_ui";
 +    static final String PREF_MOVE_TOOLBAR_TO_BOTTOM = "move_toolbar_bottom";
 +    static final String PREF_MOVE_TOOLBAR_TO_BOTTOM = "move_toolbar_bottom";
-+
      private TextScalePreference mTextScalePref;
      private TextScalePreference mTextScalePref;
-     private ChromeBaseCheckBoxPreference mForceEnableZoomPref;
-     private boolean mRecordFontSizeChangeOnStop;
+     private PageZoomPreference mPageZoomDefaultZoomPref;
+     private ChromeSwitchPreference mPageZoomAlwaysShowPref;
+@@ -43,6 +44,7 @@ public class AccessibilitySettings
      private AccessibilitySettingsDelegate mDelegate;
      private AccessibilitySettingsDelegate mDelegate;
      private BooleanPreferenceDelegate mReaderForAccessibilityDelegate;
      private BooleanPreferenceDelegate mReaderForAccessibilityDelegate;
      private BooleanPreferenceDelegate mAccessibilityTabSwitcherDelegate;
      private BooleanPreferenceDelegate mAccessibilityTabSwitcherDelegate;
@@ -2278,7 +2278,7 @@ diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/c
  
  
      private FontSizePrefs mFontSizePrefs;
      private FontSizePrefs mFontSizePrefs;
      private FontSizePrefsObserver mFontSizePrefsObserver = new FontSizePrefsObserver() {
      private FontSizePrefsObserver mFontSizePrefsObserver = new FontSizePrefsObserver() {
-@@ -57,6 +60,10 @@ public class AccessibilitySettings
+@@ -62,6 +64,10 @@ public class AccessibilitySettings
          mFontSizePrefs = FontSizePrefs.getInstance(delegate.getBrowserContextHandle());
          mFontSizePrefs = FontSizePrefs.getInstance(delegate.getBrowserContextHandle());
      }
      }
  
  
@@ -2289,7 +2289,7 @@ diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/c
      @Override
      @Override
      public void onActivityCreated(Bundle savedInstanceState) {
      public void onActivityCreated(Bundle savedInstanceState) {
          super.onActivityCreated(savedInstanceState);
          super.onActivityCreated(savedInstanceState);
-@@ -106,6 +113,12 @@ public class AccessibilitySettings
+@@ -126,6 +132,12 @@ public class AccessibilitySettings
              getPreferenceScreen().removePreference(accessibilityTabSwitcherPref);
              getPreferenceScreen().removePreference(accessibilityTabSwitcherPref);
          }
          }
  
  
@@ -2302,16 +2302,18 @@ diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/c
          Preference captions = findPreference(PREF_CAPTIONS);
          Preference captions = findPreference(PREF_CAPTIONS);
          captions.setOnPreferenceClickListener(preference -> {
          captions.setOnPreferenceClickListener(preference -> {
              Intent intent = new Intent(Settings.ACTION_CAPTIONING_SETTINGS);
              Intent intent = new Intent(Settings.ACTION_CAPTIONING_SETTINGS);
-@@ -150,6 +163,9 @@ public class AccessibilitySettings
-             if (mReaderForAccessibilityDelegate != null) {
-                 mReaderForAccessibilityDelegate.setEnabled((Boolean) newValue);
-             }
+@@ -175,7 +187,11 @@ public class AccessibilitySettings
+                     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())) {
 +        } else if (PREF_MOVE_TOOLBAR_TO_BOTTOM.equals(preference.getKey())) {
 +            mMoveTopToolbarToBottomDelegate.setEnabled((Boolean) newValue);
 +            mMoveTopToolbarToBottomDelegate.setEnabled((Boolean) newValue);
 +            mDelegate.requestRestart(getActivity());
 +            mDelegate.requestRestart(getActivity());
          }
          }
++
          return true;
          return true;
      }
      }
+ }
 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
 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
 --- 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
 +++ b/components/browser_ui/accessibility/android/java/src/org/chromium/components/browser_ui/accessibility/AccessibilitySettingsDelegate.java
@@ -2346,7 +2348,7 @@ diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/
  #include "cc/base/math_util.h"
  #include "cc/base/math_util.h"
  #include "cc/layers/layer.h"
  #include "cc/layers/layer.h"
  #include "cc/layers/surface_layer.h"
  #include "cc/layers/surface_layer.h"
-@@ -455,6 +456,8 @@ void RenderWidgetHostViewAndroid::OnRenderFrameMetadataChangedBeforeActivation(
+@@ -464,6 +465,8 @@ void RenderWidgetHostViewAndroid::OnRenderFrameMetadataChangedBeforeActivation(
    // factor. Thus, |top_content_offset| in CSS pixels is also in DIPs.
    // factor. Thus, |top_content_offset| in CSS pixels is also in DIPs.
    float top_content_offset =
    float top_content_offset =
        metadata.top_controls_height * metadata.top_controls_shown_ratio;
        metadata.top_controls_height * metadata.top_controls_shown_ratio;

+ 1 - 1
build/patches/Move-some-account-settings-back-to-privacy-settings.patch

@@ -106,7 +106,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
 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
 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
-@@ -445,6 +445,10 @@ CHAR_LIMIT guidelines:
+@@ -448,6 +448,10 @@ CHAR_LIMIT guidelines:
          No statistics or crash reports are sent to Google
          No statistics or crash reports are sent to Google
        </message>
        </message>
  
  

+ 18 - 18
build/patches/Multiple-fingerprinting-mitigations.patch

@@ -57,7 +57,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
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
 --- a/chrome/browser/BUILD.gn
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -2359,6 +2359,7 @@ static_library("browser") {
+@@ -2353,6 +2353,7 @@ static_library("browser") {
      "//services/device/public/cpp:device_features",
      "//services/device/public/cpp:device_features",
      "//services/device/public/cpp/serial:switches",
      "//services/device/public/cpp/serial:switches",
      "//services/device/public/cpp/usb",
      "//services/device/public/cpp/usb",
@@ -68,7 +68,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
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -183,6 +183,7 @@
+@@ -184,6 +184,7 @@
  #include "services/media_session/public/cpp/features.h"
  #include "services/media_session/public/cpp/features.h"
  #include "services/network/public/cpp/features.h"
  #include "services/network/public/cpp/features.h"
  #include "services/network/public/cpp/network_switches.h"
  #include "services/network/public/cpp/network_switches.h"
@@ -76,7 +76,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
  #include "storage/browser/quota/quota_features.h"
  #include "storage/browser/quota/quota_features.h"
  #include "third_party/blink/public/common/features.h"
  #include "third_party/blink/public/common/features.h"
  #include "third_party/blink/public/common/forcedark/forcedark_switches.h"
  #include "third_party/blink/public/common/forcedark/forcedark_switches.h"
-@@ -3213,6 +3214,20 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -3352,6 +3353,20 @@ const FeatureEntry kFeatureEntries[] = {
       flag_descriptions::kWebrtcUseMinMaxVEADimensionsName,
       flag_descriptions::kWebrtcUseMinMaxVEADimensionsName,
       flag_descriptions::kWebrtcUseMinMaxVEADimensionsDescription, kOsAll,
       flag_descriptions::kWebrtcUseMinMaxVEADimensionsDescription, kOsAll,
       FEATURE_VALUE_TYPE(blink::features::kWebRtcUseMinMaxVEADimensions)},
       FEATURE_VALUE_TYPE(blink::features::kWebRtcUseMinMaxVEADimensions)},
@@ -100,7 +100,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
 diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
 --- a/content/browser/BUILD.gn
 --- a/content/browser/BUILD.gn
 +++ b/content/browser/BUILD.gn
 +++ b/content/browser/BUILD.gn
-@@ -234,6 +234,7 @@ source_set("browser") {
+@@ -232,6 +232,7 @@ source_set("browser") {
      "//third_party/libyuv",
      "//third_party/libyuv",
      "//third_party/re2",
      "//third_party/re2",
      "//third_party/sqlite",
      "//third_party/sqlite",
@@ -119,7 +119,7 @@ diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content
  #if BUILDFLAG(IS_ANDROID)
  #if BUILDFLAG(IS_ANDROID)
  #include "content/browser/android/java_interfaces_impl.h"
  #include "content/browser/android/java_interfaces_impl.h"
  #include "content/browser/font_unique_name_lookup/font_unique_name_lookup_service.h"
  #include "content/browser/font_unique_name_lookup/font_unique_name_lookup_service.h"
-@@ -3193,6 +3194,9 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
+@@ -3192,6 +3193,9 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
      switches::kDisableBreakpad,
      switches::kDisableBreakpad,
      switches::kDisableDatabases,
      switches::kDisableDatabases,
      switches::kDisableFileSystem,
      switches::kDisableFileSystem,
@@ -132,7 +132,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
 diff --git a/content/child/BUILD.gn b/content/child/BUILD.gn
 --- a/content/child/BUILD.gn
 --- a/content/child/BUILD.gn
 +++ b/content/child/BUILD.gn
 +++ b/content/child/BUILD.gn
-@@ -102,6 +102,7 @@ target(link_target_type, "child") {
+@@ -101,6 +101,7 @@ target(link_target_type, "child") {
      "//third_party/blink/public/common",
      "//third_party/blink/public/common",
      "//third_party/blink/public/strings",
      "//third_party/blink/public/strings",
      "//third_party/ced",
      "//third_party/ced",
@@ -152,7 +152,7 @@ diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.
  #if BUILDFLAG(IS_ANDROID)
  #if BUILDFLAG(IS_ANDROID)
  #include "base/android/build_info.h"
  #include "base/android/build_info.h"
  #endif
  #endif
-@@ -514,6 +516,13 @@ void SetCustomizedRuntimeFeaturesFromCombinedArgs(
+@@ -519,6 +521,13 @@ void SetCustomizedRuntimeFeaturesFromCombinedArgs(
    if (!command_line.HasSwitch(switches::kDisableYUVImageDecoding) &&
    if (!command_line.HasSwitch(switches::kDisableYUVImageDecoding) &&
        base::FeatureList::IsEnabled(
        base::FeatureList::IsEnabled(
            blink::features::kDecodeLossyWebPImagesToYUV)) {
            blink::features::kDecodeLossyWebPImagesToYUV)) {
@@ -190,7 +190,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink
  #include "base/notreached.h"
  #include "base/notreached.h"
  #include "base/time/time.h"
  #include "base/time/time.h"
  #include "cc/animation/animation_timeline.h"
  #include "cc/animation/animation_timeline.h"
-@@ -2200,6 +2201,23 @@ void Document::UpdateStyleAndLayoutTreeForThisDocument() {
+@@ -2226,6 +2227,23 @@ void Document::UpdateStyleAndLayoutTreeForThisDocument() {
  #if DCHECK_IS_ON()
  #if DCHECK_IS_ON()
    AssertLayoutTreeUpdated(*this, true /* allow_dirty_container_subtrees */);
    AssertLayoutTreeUpdated(*this, true /* allow_dirty_container_subtrees */);
  #endif
  #endif
@@ -217,7 +217,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
 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
 --- a/third_party/blink/renderer/core/dom/document.h
 +++ b/third_party/blink/renderer/core/dom/document.h
 +++ b/third_party/blink/renderer/core/dom/document.h
-@@ -498,6 +498,10 @@ class CORE_EXPORT Document : public ContainerNode,
+@@ -501,6 +501,10 @@ class CORE_EXPORT Document : public ContainerNode,
      has_xml_declaration_ = has_xml_declaration ? 1 : 0;
      has_xml_declaration_ = has_xml_declaration ? 1 : 0;
    }
    }
  
  
@@ -228,7 +228,7 @@ diff --git a/third_party/blink/renderer/core/dom/document.h b/third_party/blink/
    AtomicString visibilityState() const;
    AtomicString visibilityState() const;
    bool IsPageVisible() const;
    bool IsPageVisible() const;
    bool hidden() const;
    bool hidden() const;
-@@ -2240,6 +2244,9 @@ class CORE_EXPORT Document : public ContainerNode,
+@@ -2257,6 +2261,9 @@ class CORE_EXPORT Document : public ContainerNode,
  
  
    base::ElapsedTimer start_time_;
    base::ElapsedTimer start_time_;
  
  
@@ -241,7 +241,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
 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
 --- a/third_party/blink/renderer/core/dom/element.cc
 +++ b/third_party/blink/renderer/core/dom/element.cc
 +++ b/third_party/blink/renderer/core/dom/element.cc
-@@ -2097,6 +2097,7 @@ void Element::ClientQuads(Vector<gfx::QuadF>& quads) const {
+@@ -2107,6 +2107,7 @@ void Element::ClientQuads(Vector<gfx::QuadF>& quads) const {
        quads.push_back(element_layout_object->LocalToAbsoluteQuad(
        quads.push_back(element_layout_object->LocalToAbsoluteQuad(
            gfx::QuadF(element_layout_object->ObjectBoundingBox())));
            gfx::QuadF(element_layout_object->ObjectBoundingBox())));
      }
      }
@@ -249,7 +249,7 @@ diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/
      return;
      return;
    }
    }
  
  
-@@ -2104,6 +2105,11 @@ void Element::ClientQuads(Vector<gfx::QuadF>& quads) const {
+@@ -2114,6 +2115,11 @@ void Element::ClientQuads(Vector<gfx::QuadF>& quads) const {
    if (element_layout_object->IsBoxModelObject() ||
    if (element_layout_object->IsBoxModelObject() ||
        element_layout_object->IsBR())
        element_layout_object->IsBR())
      element_layout_object->AbsoluteQuads(quads);
      element_layout_object->AbsoluteQuads(quads);
@@ -261,7 +261,7 @@ diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/
  }
  }
  
  
  DOMRectList* Element::getClientRects() {
  DOMRectList* Element::getClientRects() {
-@@ -2135,6 +2141,9 @@ gfx::RectF Element::GetBoundingClientRectNoLifecycleUpdate() const {
+@@ -2145,6 +2151,9 @@ gfx::RectF Element::GetBoundingClientRectNoLifecycleUpdate() const {
    DCHECK(element_layout_object);
    DCHECK(element_layout_object);
    GetDocument().AdjustRectForScrollAndAbsoluteZoom(result,
    GetDocument().AdjustRectForScrollAndAbsoluteZoom(result,
                                                     *element_layout_object);
                                                     *element_layout_object);
@@ -385,7 +385,7 @@ diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering
 diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
 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
 --- a/third_party/blink/renderer/platform/BUILD.gn
 +++ b/third_party/blink/renderer/platform/BUILD.gn
 +++ b/third_party/blink/renderer/platform/BUILD.gn
-@@ -1595,7 +1595,9 @@ component("platform") {
+@@ -1596,7 +1596,9 @@ component("platform") {
      "//third_party/blink/renderer:non_test_config",
      "//third_party/blink/renderer:non_test_config",
    ]
    ]
  
  
@@ -396,7 +396,7 @@ diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/re
  
  
    allow_circular_includes_from = [
    allow_circular_includes_from = [
      "//third_party/blink/renderer/platform/blob",
      "//third_party/blink/renderer/platform/blob",
-@@ -1664,6 +1666,7 @@ component("platform") {
+@@ -1665,6 +1667,7 @@ component("platform") {
      "//third_party/blink/public/strings",
      "//third_party/blink/public/strings",
      "//third_party/blink/renderer/platform/wtf",
      "//third_party/blink/renderer/platform/wtf",
      "//third_party/ced",
      "//third_party/ced",
@@ -407,8 +407,8 @@ diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/re
 diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.cc b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
 diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.cc b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
 --- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc
 --- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc
 +++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
 +++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
-@@ -659,4 +659,16 @@ void WebRuntimeFeatures::EnableWebAuthenticationRemoteDesktopSupport(
-       enable);
+@@ -659,4 +659,16 @@ void WebRuntimeFeatures::EnableSpeculationRulesPrefetchProxy(bool enable) {
+   RuntimeEnabledFeatures::SetSpeculationRulesPrefetchProxyEnabled(enable);
  }
  }
  
  
 +void WebRuntimeFeatures::EnableFingerprintingClientRectsNoise(bool enable) {
 +void WebRuntimeFeatures::EnableFingerprintingClientRectsNoise(bool enable) {
@@ -640,7 +640,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
 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
 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
-@@ -1052,6 +1052,15 @@
+@@ -1062,6 +1062,15 @@
        origin_trial_allows_third_party: true,
        origin_trial_allows_third_party: true,
        status: "experimental",
        status: "experimental",
      },
      },

+ 1 - 1
build/patches/Offer-builtin-autocomplete-for-chrome-flags.patch

@@ -10,7 +10,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
 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
 --- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
 +++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
 +++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
-@@ -271,6 +271,8 @@ std::vector<std::u16string> ChromeAutocompleteProviderClient::GetBuiltinURLs() {
+@@ -261,6 +261,8 @@ std::vector<std::u16string> ChromeAutocompleteProviderClient::GetBuiltinURLs() {
  std::vector<std::u16string>
  std::vector<std::u16string>
  ChromeAutocompleteProviderClient::GetBuiltinsToProvideAsUserTypes() {
  ChromeAutocompleteProviderClient::GetBuiltinsToProvideAsUserTypes() {
    std::vector<std::u16string> builtins_to_provide;
    std::vector<std::u16string> builtins_to_provide;

+ 1 - 1
build/patches/Open-YouTube-links-in-Bromite.patch

@@ -12,7 +12,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 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
 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
 --- 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
 +++ b/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java
-@@ -1337,6 +1337,12 @@ public class ExternalNavigationHandler {
+@@ -1345,6 +1345,12 @@ public class ExternalNavigationHandler {
                      OverrideUrlLoadingAsyncActionType.UI_GATING_BROWSER_NAVIGATION);
                      OverrideUrlLoadingAsyncActionType.UI_GATING_BROWSER_NAVIGATION);
          }
          }
  
  

+ 5 - 5
build/patches/OpenSearch-miscellaneous.patch

@@ -84,8 +84,8 @@ diff --git a/chrome/browser/ui/search_engines/search_engine_tab_helper.cc b/chro
  
  
    // Only accept messages from the main frame.
    // Only accept messages from the main frame.
    if (osdd_handler_receivers_.GetCurrentTargetFrame() !=
    if (osdd_handler_receivers_.GetCurrentTargetFrame() !=
--      web_contents()->GetMainFrame())
-+      web_contents()->GetMainFrame()) {
+-      web_contents()->GetPrimaryMainFrame())
++      web_contents()->GetPrimaryMainFrame()) {
 +    LOG(INFO) << "OpenSearch: frame mismatch on page " << page_url;
 +    LOG(INFO) << "OpenSearch: frame mismatch on page " << page_url;
      return;
      return;
 +  }
 +  }
@@ -134,7 +134,7 @@ diff --git a/chrome/browser/ui/search_engines/search_engine_tab_helper.cc b/chro
 +    return;
 +    return;
 +  }
 +  }
 +
 +
-   auto* frame = web_contents()->GetMainFrame();
+   auto* frame = web_contents()->GetPrimaryMainFrame();
    mojo::Remote<network::mojom::URLLoaderFactory> url_loader_factory;
    mojo::Remote<network::mojom::URLLoaderFactory> url_loader_factory;
    frame->CreateNetworkServiceDefaultFactory(
    frame->CreateNetworkServiceDefaultFactory(
 @@ -157,6 +175,7 @@ void SearchEngineTabHelper::PageHasOpenSearchDescriptionDocument(
 @@ -157,6 +175,7 @@ void SearchEngineTabHelper::PageHasOpenSearchDescriptionDocument(
@@ -185,7 +185,7 @@ diff --git a/chrome/renderer/chrome_render_frame_observer.cc b/chrome/renderer/c
  #include "base/metrics/histogram_macros.h"
  #include "base/metrics/histogram_macros.h"
  #include "base/no_destructor.h"
  #include "base/no_destructor.h"
  #include "base/strings/string_number_conversions.h"
  #include "base/strings/string_number_conversions.h"
-@@ -250,6 +251,7 @@ void ChromeRenderFrameObserver::DidFinishLoad() {
+@@ -248,6 +249,7 @@ void ChromeRenderFrameObserver::DidFinishLoad() {
  
  
    GURL osdd_url = frame->GetDocument().OpenSearchDescriptionURL();
    GURL osdd_url = frame->GetDocument().OpenSearchDescriptionURL();
    if (!osdd_url.is_empty()) {
    if (!osdd_url.is_empty()) {
@@ -246,7 +246,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
    // regardless of |url| if the default search provider is managed by policy or
    // controlled by an extension.
    // controlled by an extension.
    bool CanMakeDefault(const TemplateURL* url) const;
    bool CanMakeDefault(const TemplateURL* url) const;
-@@ -612,9 +615,6 @@ class TemplateURLService : public WebDataServiceConsumer,
+@@ -622,9 +625,6 @@ class TemplateURLService : public WebDataServiceConsumer,
    // SetKeywordSearchTermsForURL is invoked.
    // SetKeywordSearchTermsForURL is invoked.
    void UpdateKeywordSearchTermsForURL(const URLVisitedDetails& details);
    void UpdateKeywordSearchTermsForURL(const URLVisitedDetails& details);
  
  

+ 6 - 6
build/patches/Partition-Blink-memory-cache.patch

@@ -67,7 +67,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
 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
 --- a/third_party/blink/renderer/core/loader/image_loader.cc
 +++ b/third_party/blink/renderer/core/loader/image_loader.cc
 +++ b/third_party/blink/renderer/core/loader/image_loader.cc
-@@ -714,7 +714,8 @@ bool ImageLoader::ShouldLoadImmediately(const KURL& url) const {
+@@ -726,7 +726,8 @@ bool ImageLoader::ShouldLoadImmediately(const KURL& url) const {
    // content when style recalc is over and DOM mutation is allowed again.
    // content when style recalc is over and DOM mutation is allowed again.
    if (!url.IsNull()) {
    if (!url.IsNull()) {
      Resource* resource = GetMemoryCache()->ResourceForURL(
      Resource* resource = GetMemoryCache()->ResourceForURL(
@@ -128,7 +128,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
 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
 --- a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
 +++ b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
 +++ b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
-@@ -640,7 +640,8 @@ Resource* ResourceFetcher::CreateResourceForStaticData(
+@@ -650,7 +650,8 @@ Resource* ResourceFetcher::CreateResourceForStaticData(
    if (!archive_ && factory.GetType() == ResourceType::kRaw)
    if (!archive_ && factory.GetType() == ResourceType::kRaw)
      return nullptr;
      return nullptr;
  
  
@@ -138,7 +138,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
    // Most off-main-thread resource fetches use Resource::kRaw and don't reach
    // this point, but off-main-thread module fetches might.
    // this point, but off-main-thread module fetches might.
    if (IsMainThread()) {
    if (IsMainThread()) {
-@@ -1083,7 +1084,9 @@ Resource* ResourceFetcher::RequestResource(FetchParameters& params,
+@@ -1094,7 +1095,9 @@ Resource* ResourceFetcher::RequestResource(FetchParameters& params,
          resource = nullptr;
          resource = nullptr;
        } else {
        } else {
          resource = GetMemoryCache()->ResourceForURL(
          resource = GetMemoryCache()->ResourceForURL(
@@ -149,7 +149,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.c
        }
        }
        if (resource) {
        if (resource) {
          policy = DetermineRevalidationPolicy(resource_type, params, *resource,
          policy = DetermineRevalidationPolicy(resource_type, params, *resource,
-@@ -1291,7 +1294,8 @@ Resource* ResourceFetcher::CreateResourceForLoading(
+@@ -1302,7 +1305,8 @@ Resource* ResourceFetcher::CreateResourceForLoading(
      const FetchParameters& params,
      const FetchParameters& params,
      const ResourceFactory& factory) {
      const ResourceFactory& factory) {
    const String cache_identifier =
    const String cache_identifier =
@@ -159,7 +159,7 @@ diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.c
    if (!base::FeatureList::IsEnabled(
    if (!base::FeatureList::IsEnabled(
            blink::features::kScopeMemoryCachePerContext)) {
            blink::features::kScopeMemoryCachePerContext)) {
      DCHECK(!IsMainThread() || params.IsStaleRevalidation() ||
      DCHECK(!IsMainThread() || params.IsStaleRevalidation() ||
-@@ -2185,13 +2189,16 @@ void ResourceFetcher::UpdateAllImageResourcePriorities() {
+@@ -2194,13 +2198,16 @@ void ResourceFetcher::UpdateAllImageResourcePriorities() {
    to_be_removed.clear();
    to_be_removed.clear();
  }
  }
  
  
@@ -179,7 +179,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
    // Requests that can be satisfied via `archive_` (i.e. MHTML) or
    // `subresource_web_bundles_` should not participate in the global caching,
    // `subresource_web_bundles_` should not participate in the global caching,
-@@ -2206,7 +2213,7 @@ String ResourceFetcher::GetCacheIdentifier(const KURL& url) const {
+@@ -2215,7 +2222,7 @@ String ResourceFetcher::GetCacheIdentifier(const KURL& url) const {
        return bundle->GetCacheIdentifier();
        return bundle->GetCacheIdentifier();
    }
    }
  
  

+ 23 - 23
build/patches/Partition-DNS-requests-by-top-frame-NIK.patch

@@ -42,7 +42,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -7621,6 +7621,18 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -7877,6 +7877,18 @@ const FeatureEntry kFeatureEntries[] = {
          FEATURE_VALUE_TYPE(features::kUIDebugTools),
          FEATURE_VALUE_TYPE(features::kUIDebugTools),
      },
      },
  #endif
  #endif
@@ -64,7 +64,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -2454,6 +2454,15 @@ const char kSmoothScrollingName[] = "Smooth Scrolling";
+@@ -2505,6 +2505,15 @@ const char kSmoothScrollingName[] = "Smooth Scrolling";
  const char kSmoothScrollingDescription[] =
  const char kSmoothScrollingDescription[] =
      "Animate smoothly when scrolling page content.";
      "Animate smoothly when scrolling page content.";
  
  
@@ -83,7 +83,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -1390,6 +1390,12 @@ extern const char kSiteIsolationOptOutChoiceOptOut[];
+@@ -1422,6 +1422,12 @@ extern const char kSiteIsolationOptOutChoiceOptOut[];
  extern const char kSmoothScrollingName[];
  extern const char kSmoothScrollingName[];
  extern const char kSmoothScrollingDescription[];
  extern const char kSmoothScrollingDescription[];
  
  
@@ -310,7 +310,7 @@ diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
  #include "net/base/idempotency.h"
  #include "net/base/idempotency.h"
  #include "net/base/io_buffer.h"
  #include "net/base/io_buffer.h"
  #include "net/base/ip_address.h"
  #include "net/base/ip_address.h"
-@@ -449,6 +450,12 @@ class DnsHTTPAttempt : public DnsAttempt, public URLRequest::Delegate {
+@@ -448,6 +449,12 @@ class DnsHTTPAttempt : public DnsAttempt, public URLRequest::Delegate {
                             LOAD_MINIMAL_HEADERS | LOAD_BYPASS_PROXY);
                             LOAD_MINIMAL_HEADERS | LOAD_BYPASS_PROXY);
      request_->set_allow_credentials(false);
      request_->set_allow_credentials(false);
      request_->set_isolation_info(isolation_info);
      request_->set_isolation_info(isolation_info);
@@ -323,7 +323,7 @@ diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
    }
    }
  
  
    DnsHTTPAttempt(const DnsHTTPAttempt&) = delete;
    DnsHTTPAttempt(const DnsHTTPAttempt&) = delete;
-@@ -1017,6 +1024,8 @@ class DnsOverHttpsProbeRunner : public DnsProbeRunner {
+@@ -1014,6 +1021,8 @@ class DnsOverHttpsProbeRunner : public DnsProbeRunner {
          session_.get(), doh_server_index, formatted_probe_hostname_,
          session_.get(), doh_server_index, formatted_probe_hostname_,
          dns_protocol::kTypeA, nullptr /* opt_rdata */,
          dns_protocol::kTypeA, nullptr /* opt_rdata */,
          &probe_stats->probe_attempts, context_->url_request_context(),
          &probe_stats->probe_attempts, context_->url_request_context(),
@@ -332,7 +332,7 @@ diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
          context_->isolation_info(), RequestPriority::DEFAULT_PRIORITY);
          context_->isolation_info(), RequestPriority::DEFAULT_PRIORITY);
  
  
      DnsAttempt* probe_attempt = probe_stats->probe_attempts.back().get();
      DnsAttempt* probe_attempt = probe_stats->probe_attempts.back().get();
-@@ -1109,7 +1118,8 @@ class DnsTransactionImpl : public DnsTransaction,
+@@ -1106,7 +1115,8 @@ class DnsTransactionImpl : public DnsTransaction,
                       bool secure,
                       bool secure,
                       SecureDnsMode secure_dns_mode,
                       SecureDnsMode secure_dns_mode,
                       ResolveContext* resolve_context,
                       ResolveContext* resolve_context,
@@ -342,17 +342,17 @@ diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
        : session_(session),
        : session_(session),
          hostname_(std::move(hostname)),
          hostname_(std::move(hostname)),
          qtype_(qtype),
          qtype_(qtype),
-@@ -1122,7 +1132,8 @@ class DnsTransactionImpl : public DnsTransaction,
-         attempts_count_(0),
-         had_tcp_retry_(false),
-         resolve_context_(resolve_context->AsSafeRef()),
--        request_priority_(DEFAULT_PRIORITY) {
-+        request_priority_(DEFAULT_PRIORITY),
+@@ -1115,7 +1125,8 @@ class DnsTransactionImpl : public DnsTransaction,
+         secure_dns_mode_(secure_dns_mode),
+         fast_timeout_(fast_timeout),
+         net_log_(net_log),
+-        resolve_context_(resolve_context->AsSafeRef()) {
++        resolve_context_(resolve_context->AsSafeRef()),
 +        network_isolation_key_(network_isolation_key) {
 +        network_isolation_key_(network_isolation_key) {
      DCHECK(session_.get());
      DCHECK(session_.get());
      DCHECK(!hostname_.empty());
      DCHECK(!hostname_.empty());
      DCHECK(!IsIPLiteral(hostname_));
      DCHECK(!IsIPLiteral(hostname_));
-@@ -1369,6 +1380,8 @@ class DnsTransactionImpl : public DnsTransaction,
+@@ -1355,6 +1366,8 @@ class DnsTransactionImpl : public DnsTransaction,
      ConstructDnsHTTPAttempt(
      ConstructDnsHTTPAttempt(
          session_.get(), doh_server_index, qnames_.front(), qtype_, opt_rdata_,
          session_.get(), doh_server_index, qnames_.front(), qtype_, opt_rdata_,
          &attempts_, resolve_context_->url_request_context(),
          &attempts_, resolve_context_->url_request_context(),
@@ -361,16 +361,16 @@ diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
          resolve_context_->isolation_info(), request_priority_);
          resolve_context_->isolation_info(), request_priority_);
      ++attempts_count_;
      ++attempts_count_;
      int rv = attempts_.back()->Start(base::BindOnce(
      int rv = attempts_.back()->Start(base::BindOnce(
-@@ -1703,6 +1716,8 @@ class DnsTransactionImpl : public DnsTransaction,
+@@ -1689,6 +1702,8 @@ class DnsTransactionImpl : public DnsTransaction,
    base::SafeRef<ResolveContext> resolve_context_;
    base::SafeRef<ResolveContext> resolve_context_;
-   RequestPriority request_priority_;
+   RequestPriority request_priority_ = DEFAULT_PRIORITY;
  
  
 +  const NetworkIsolationKey& network_isolation_key_;
 +  const NetworkIsolationKey& network_isolation_key_;
 +
 +
    THREAD_CHECKER(thread_checker_);
    THREAD_CHECKER(thread_checker_);
  };
  };
  
  
-@@ -1723,10 +1738,10 @@ class DnsTransactionFactoryImpl : public DnsTransactionFactory {
+@@ -1709,10 +1724,10 @@ class DnsTransactionFactoryImpl : public DnsTransactionFactory {
        bool secure,
        bool secure,
        SecureDnsMode secure_dns_mode,
        SecureDnsMode secure_dns_mode,
        ResolveContext* resolve_context,
        ResolveContext* resolve_context,
@@ -394,7 +394,7 @@ diff --git a/net/dns/dns_transaction.h b/net/dns/dns_transaction.h
  #include "net/dns/public/secure_dns_mode.h"
  #include "net/dns/public/secure_dns_mode.h"
  #include "net/dns/record_rdata.h"
  #include "net/dns/record_rdata.h"
  #include "third_party/abseil-cpp/absl/types/optional.h"
  #include "third_party/abseil-cpp/absl/types/optional.h"
-@@ -121,7 +122,8 @@ class NET_EXPORT_PRIVATE DnsTransactionFactory {
+@@ -115,7 +116,8 @@ class NET_EXPORT_PRIVATE DnsTransactionFactory {
        bool secure,
        bool secure,
        SecureDnsMode secure_dns_mode,
        SecureDnsMode secure_dns_mode,
        ResolveContext* resolve_context,
        ResolveContext* resolve_context,
@@ -407,7 +407,7 @@ diff --git a/net/dns/dns_transaction.h b/net/dns/dns_transaction.h
 diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc
 diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc
 --- a/net/dns/host_resolver_manager.cc
 --- a/net/dns/host_resolver_manager.cc
 +++ b/net/dns/host_resolver_manager.cc
 +++ b/net/dns/host_resolver_manager.cc
-@@ -1262,7 +1262,8 @@ class HostResolverManager::DnsTask : public base::SupportsWeakPtr<DnsTask> {
+@@ -1259,7 +1259,8 @@ class HostResolverManager::DnsTask : public base::SupportsWeakPtr<DnsTask> {
            Delegate* delegate,
            Delegate* delegate,
            const NetLogWithSource& job_net_log,
            const NetLogWithSource& job_net_log,
            const base::TickClock* tick_clock,
            const base::TickClock* tick_clock,
@@ -417,7 +417,7 @@ diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc
        : client_(client),
        : client_(client),
          host_(std::move(host)),
          host_(std::move(host)),
          resolve_context_(resolve_context->AsSafeRef()),
          resolve_context_(resolve_context->AsSafeRef()),
-@@ -1272,7 +1273,8 @@ class HostResolverManager::DnsTask : public base::SupportsWeakPtr<DnsTask> {
+@@ -1269,7 +1270,8 @@ class HostResolverManager::DnsTask : public base::SupportsWeakPtr<DnsTask> {
          net_log_(job_net_log),
          net_log_(job_net_log),
          tick_clock_(tick_clock),
          tick_clock_(tick_clock),
          task_start_time_(tick_clock_->NowTicks()),
          task_start_time_(tick_clock_->NowTicks()),
@@ -437,7 +437,7 @@ diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc
      transaction_info.transaction->SetRequestPriority(delegate_->priority());
      transaction_info.transaction->SetRequestPriority(delegate_->priority());
  
  
      auto transaction_info_it =
      auto transaction_info_it =
-@@ -2110,6 +2113,8 @@ class HostResolverManager::DnsTask : public base::SupportsWeakPtr<DnsTask> {
+@@ -2104,6 +2107,8 @@ class HostResolverManager::DnsTask : public base::SupportsWeakPtr<DnsTask> {
    // task completes unsuccessfully. Used as a signal that underlying
    // task completes unsuccessfully. Used as a signal that underlying
    // transactions should timeout more quickly.
    // transactions should timeout more quickly.
    bool fallback_available_;
    bool fallback_available_;
@@ -446,7 +446,7 @@ diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc
  };
  };
  
  
  //-----------------------------------------------------------------------------
  //-----------------------------------------------------------------------------
-@@ -2678,7 +2683,8 @@ class HostResolverManager::Job : public PrioritizedDispatcher::Job,
+@@ -2672,7 +2677,8 @@ class HostResolverManager::Job : public PrioritizedDispatcher::Job,
      dns_task_ = std::make_unique<DnsTask>(
      dns_task_ = std::make_unique<DnsTask>(
          resolver_->dns_client_.get(), key_.host, key_.query_types,
          resolver_->dns_client_.get(), key_.host, key_.query_types,
          &*key_.resolve_context, secure, key_.secure_dns_mode, this, net_log_,
          &*key_.resolve_context, secure, key_.secure_dns_mode, this, net_log_,
@@ -456,7 +456,7 @@ diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc
      dns_task_->StartNextTransaction();
      dns_task_->StartNextTransaction();
      // Schedule a second transaction, if needed. DoH queries can bypass the
      // Schedule a second transaction, if needed. DoH queries can bypass the
      // dispatcher and start all of their transactions immediately.
      // dispatcher and start all of their transactions immediately.
-@@ -2970,6 +2976,13 @@ class HostResolverManager::Job : public PrioritizedDispatcher::Job,
+@@ -2964,6 +2970,13 @@ class HostResolverManager::Job : public PrioritizedDispatcher::Job,
      net_log_.EndEventWithNetErrorCode(
      net_log_.EndEventWithNetErrorCode(
          NetLogEventType::HOST_RESOLVER_MANAGER_JOB, results.error());
          NetLogEventType::HOST_RESOLVER_MANAGER_JOB, results.error());
  
  
@@ -473,7 +473,7 @@ diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc
 diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket_impl.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
 --- a/net/socket/ssl_client_socket_impl.cc
 +++ b/net/socket/ssl_client_socket_impl.cc
 +++ b/net/socket/ssl_client_socket_impl.cc
-@@ -406,6 +406,12 @@ SSLClientSocketImpl::SSLClientSocketImpl(
+@@ -393,6 +393,12 @@ SSLClientSocketImpl::SSLClientSocketImpl(
  }
  }
  
  
  void SSLClientSocketImpl::Log_ssl_session_data(const std::string& tag, SSL_SESSION* session) {
  void SSLClientSocketImpl::Log_ssl_session_data(const std::string& tag, SSL_SESSION* session) {

+ 6 - 6
build/patches/Reduce-HTTP-headers-in-DoH-requests-to-bare-minimum.patch

@@ -28,7 +28,7 @@ diff --git a/net/base/load_flags_list.h b/net/base/load_flags_list.h
 diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
 diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
 --- a/net/dns/dns_transaction.cc
 --- a/net/dns/dns_transaction.cc
 +++ b/net/dns/dns_transaction.cc
 +++ b/net/dns/dns_transaction.cc
-@@ -446,7 +446,7 @@ class DnsHTTPAttempt : public DnsAttempt, public URLRequest::Delegate {
+@@ -445,7 +445,7 @@ class DnsHTTPAttempt : public DnsAttempt, public URLRequest::Delegate {
      // avoid deadlock and enable the use of preconfigured IP addresses.
      // avoid deadlock and enable the use of preconfigured IP addresses.
      request_->SetSecureDnsPolicy(SecureDnsPolicy::kBootstrap);
      request_->SetSecureDnsPolicy(SecureDnsPolicy::kBootstrap);
      request_->SetLoadFlags(request_->load_flags() | LOAD_DISABLE_CACHE |
      request_->SetLoadFlags(request_->load_flags() | LOAD_DISABLE_CACHE |
@@ -40,7 +40,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
 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
 --- a/net/url_request/url_request_http_job.cc
 +++ b/net/url_request/url_request_http_job.cc
 +++ b/net/url_request/url_request_http_job.cc
-@@ -325,6 +325,7 @@ void URLRequestHttpJob::OnGotFirstPartySetMetadata(
+@@ -314,6 +314,7 @@ void URLRequestHttpJob::OnGotFirstPartySetMetadata(
    // fields in the referrer.
    // fields in the referrer.
    GURL referrer(request_->referrer());
    GURL referrer(request_->referrer());
  
  
@@ -48,7 +48,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
    // Our consumer should have made sure that this is a safe referrer (e.g. via
    // URLRequestJob::ComputeReferrerForPolicy).
    // URLRequestJob::ComputeReferrerForPolicy).
    if (referrer.is_valid()) {
    if (referrer.is_valid()) {
-@@ -332,11 +333,14 @@ void URLRequestHttpJob::OnGotFirstPartySetMetadata(
+@@ -321,11 +322,14 @@ void URLRequestHttpJob::OnGotFirstPartySetMetadata(
      request_info_.extra_headers.SetHeader(HttpRequestHeaders::kReferer,
      request_info_.extra_headers.SetHeader(HttpRequestHeaders::kReferer,
                                            referer_value);
                                            referer_value);
    }
    }
@@ -63,7 +63,7 @@ diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_reque
  
  
    AddExtraHeaders();
    AddExtraHeaders();
  
  
-@@ -606,6 +610,7 @@ void URLRequestHttpJob::AddExtraHeaders() {
+@@ -595,6 +599,7 @@ void URLRequestHttpJob::AddExtraHeaders() {
        if (request_->Supports(SourceStream::SourceType::TYPE_DEFLATE)) {
        if (request_->Supports(SourceStream::SourceType::TYPE_DEFLATE)) {
          advertised_encoding_names.push_back("deflate");
          advertised_encoding_names.push_back("deflate");
        }
        }
@@ -71,7 +71,7 @@ diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_reque
        // Advertise "br" encoding only if transferred data is opaque to proxy.
        // Advertise "br" encoding only if transferred data is opaque to proxy.
        if (request()->context()->enable_brotli() &&
        if (request()->context()->enable_brotli() &&
            request_->Supports(SourceStream::SourceType::TYPE_BROTLI)) {
            request_->Supports(SourceStream::SourceType::TYPE_BROTLI)) {
-@@ -614,6 +619,7 @@ void URLRequestHttpJob::AddExtraHeaders() {
+@@ -603,6 +608,7 @@ void URLRequestHttpJob::AddExtraHeaders() {
            advertised_encoding_names.push_back("br");
            advertised_encoding_names.push_back("br");
          }
          }
        }
        }
@@ -79,7 +79,7 @@ diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_reque
        if (!advertised_encoding_names.empty()) {
        if (!advertised_encoding_names.empty()) {
          // Tell the server what compression formats are supported.
          // Tell the server what compression formats are supported.
          request_info_.extra_headers.SetHeader(
          request_info_.extra_headers.SetHeader(
-@@ -623,7 +629,7 @@ void URLRequestHttpJob::AddExtraHeaders() {
+@@ -612,7 +618,7 @@ void URLRequestHttpJob::AddExtraHeaders() {
      }
      }
    }
    }
  
  

Some files were not shown because too many files changed in this diff