ソースを参照

Release 99.0.4844.58

csagan5 3 年 前
コミット
c91167ff8d
35 ファイル変更2044 行追加267 行削除
  1. 11 2
      CHANGELOG.md
  2. 1 1
      build/RELEASE
  3. 1 0
      build/bromite.gn_args
  4. 5 1
      build/bromite_patches_list.txt
  5. 2 0
      build/chromium.gn_args
  6. 20 18
      build/patches/Add-AllowUserCertificates-flag.patch
  7. 1 1
      build/patches/Add-IsCleartextPermitted-flag.patch
  8. 9 9
      build/patches/Add-custom-tab-intents-privacy-option.patch
  9. 12 10
      build/patches/Add-flag-for-omnibox-autocomplete-filtering.patch
  10. 100 0
      build/patches/Add-flag-for-save-data-header.patch
  11. 1 1
      build/patches/Add-flag-to-disable-external-intent-requests.patch
  12. 1 1
      build/patches/Add-flag-to-disable-vibration.patch
  13. 1 1
      build/patches/Add-menu-item-to-bookmark-all-tabs.patch
  14. 3 3
      build/patches/Add-option-to-force-tablet-UI.patch
  15. 1 1
      build/patches/Add-option-to-use-home-page-as-NTP.patch
  16. 21 21
      build/patches/Automated-domain-substitution.patch
  17. 4 4
      build/patches/Bromite-auto-updater.patch
  18. 1 1
      build/patches/Disable-Accessibility-service-by-default.patch
  19. 7 7
      build/patches/Disable-FLoC-and-privacy-sandbox.patch
  20. 2 2
      build/patches/Disable-UA-full-version.patch
  21. 2 2
      build/patches/Disable-safety-check.patch
  22. 1 1
      build/patches/Disable-text-fragments-by-default.patch
  23. 1 1
      build/patches/Enable-Certificate-Transparency.patch
  24. 1 1
      build/patches/Enable-native-Android-autofill.patch
  25. 4 4
      build/patches/Enable-share-intent.patch
  26. 4 4
      build/patches/Experimental-user-scripts-support.patch
  27. 24 25
      build/patches/History-number-of-days-privacy-setting.patch
  28. 8 109
      build/patches/JIT-site-settings.patch
  29. 4 5
      build/patches/Multiple-fingerprinting-mitigations.patch
  30. 1781 0
      build/patches/Remove-contextual-search-manager.patch
  31. 1 24
      build/patches/Remove-signin-and-data-saver-integrations.patch
  32. 3 3
      build/patches/Restore-Simplified-NTP-launch.patch
  33. 2 2
      build/patches/Revert-flags-remove-num-raster-threads.patch
  34. 2 2
      build/patches/User-agent-customization.patch
  35. 2 0
      build/ruleset_converter.gn_args

+ 11 - 2
CHANGELOG.md

@@ -1,3 +1,12 @@
+# 99.0.4844.58
+* remove contextual search (fixes https://github.com/bromite/bromite/issues/1750)
+* remove global JIT settings
+* add privacy setting for how many number of days of history to keep (thanks to @uazo)
+* disable UA full version (thanks to @uazo)
+* reintroduce patch for Save-Data header
+* updated zh_CN translations (thanks to @zhmars)
+* reintroduce Save-Data header flag
+
 # 99.0.4844.55
 * flag to enable Certificate Transparency (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1554)
 * allow adding search engines from incognito mode
@@ -5,7 +14,7 @@
 * revert allow block of view-source URLs
 * JIT toggle site setting (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1720 and https://github.com/bromite/bromite/issues/1819)
 * move always incognito preference to native (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1496 and https://github.com/bromite/bromite/issues/1568)
-* remove patch to add data saver header
+* remove Save-Data header flag
 * close a potential security issue with user scripts on native pages (thanks to @uazo)
 * disable safety checks and possible Omaha interactions
 * disable SegmentationPlatformFeature and Optimization Hints (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/1632)
@@ -195,7 +204,7 @@
 * use 64-bit ABI for webview processes (fixes https://github.com/bromite/bromite/issues/997)
 * use dedicated folder for bookmark all tabs
 * fix Javascript and cookies permissions missing (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/990)
-* fix missing enable save data header flag (fixes https://github.com/bromite/bromite/issues/989)
+* fix missing enable Save-Data header flag (fixes https://github.com/bromite/bromite/issues/989)
 * fix menu items not properly displayed with tab overflow menu regroup (thanks to @uazo, fixes https://github.com/bromite/bromite/issues/963)
 
 # 89.0.4389.78

+ 1 - 1
build/RELEASE

@@ -1 +1 @@
-99.0.4844.55
+99.0.4844.58

+ 1 - 0
build/bromite.gn_args

@@ -1,5 +1,6 @@
 android_channel="stable"
 blink_symbol_level=1
+build_contextual_search=false
 build_with_tflite_lib=false
 chrome_pgo_phase=0
 dcheck_always_on=false

+ 5 - 1
build/bromite_patches_list.txt

@@ -121,6 +121,7 @@ Hardening-against-incognito-mode-detection.patch
 Remove-weblayer-dependency-on-Play-Services.patch
 Timezone-customization.patch
 Move-some-account-settings-back-to-privacy-settings.patch
+Remove-contextual-search-manager.patch
 Restore-Simplified-NTP-launch.patch
 Add-option-to-use-home-page-as-NTP.patch
 Revert-the-removal-of-an-option-to-block-autoplay.patch
@@ -148,7 +149,7 @@ Enable-IntentBlockExternalFormRedirectsNoGesture-by-default.patch
 Add-flag-to-disable-external-intent-requests.patch
 Logcat-crash-reports-UI.patch
 Add-support-for-ISupportHelpAndFeedback.patch
-JIT-toggle-and-site-settings.patch
+JIT-site-settings.patch
 API-level-21-prevent-crash-on-download.patch
 Add-flag-to-disable-vibration.patch
 mime_util-force-text-x-suse-ymp-to-be-downloaded.patch
@@ -183,4 +184,7 @@ Disable-all-predictors-code.patch
 Allow-adding-search-engines-from-incognito-mode.patch
 Enable-Certificate-Transparency.patch
 Update-i18n-zh_CN-support.patch
+History-number-of-days-privacy-setting.patch
+Add-flag-for-save-data-header.patch
+Disable-UA-full-version.patch
 Automated-domain-substitution.patch

+ 2 - 0
build/chromium.gn_args

@@ -1,5 +1,7 @@
 android_channel="stable"
 blink_symbol_level=1
+build_contextual_search=false
+build_with_tflite_lib=false
 chrome_pgo_phase=0
 dcheck_always_on=false
 debuggable_apks=false

+ 20 - 18
build/patches/Add-AllowUserCertificates-flag.patch

@@ -3,22 +3,22 @@ Date: Mon, 26 Apr 2021 13:28:24 +0000
 Subject: Add AllowUserCertificates flag
 
 ---
- .../src/org/chromium/chrome/browser/app/ChromeActivity.java  | 3 +++
- .../chromium/chrome/browser/app/flags/ChromeCachedFlags.java | 1 +
- chrome/browser/about_flags.cc                                | 4 ++++
- chrome/browser/flag_descriptions.cc                          | 5 +++++
- chrome/browser/flag_descriptions.h                           | 3 +++
- chrome/browser/flags/android/chrome_feature_list.cc          | 4 ++++
- chrome/browser/flags/android/chrome_feature_list.h           | 1 +
- .../chromium/chrome/browser/flags/CachedFeatureFlags.java    | 1 +
- .../org/chromium/chrome/browser/flags/ChromeFeatureList.java | 1 +
- net/android/java/src/org/chromium/net/X509Util.java          | 5 +++++
- 10 files changed, 28 insertions(+)
+ .../src/org/chromium/chrome/browser/app/ChromeActivity.java | 3 +++
+ .../chrome/browser/app/flags/ChromeCachedFlags.java         | 1 +
+ chrome/browser/about_flags.cc                               | 6 +++++-
+ chrome/browser/flag_descriptions.cc                         | 5 +++++
+ chrome/browser/flag_descriptions.h                          | 3 +++
+ chrome/browser/flags/android/chrome_feature_list.cc         | 4 ++++
+ chrome/browser/flags/android/chrome_feature_list.h          | 1 +
+ .../chromium/chrome/browser/flags/CachedFeatureFlags.java   | 1 +
+ .../chromium/chrome/browser/flags/ChromeFeatureList.java    | 1 +
+ net/android/java/src/org/chromium/net/X509Util.java         | 5 +++++
+ 10 files changed, 29 insertions(+), 1 deletion(-)
 
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
-@@ -230,6 +230,7 @@ import org.chromium.content_public.browser.ScreenOrientationProvider;
+@@ -227,6 +227,7 @@ import org.chromium.content_public.browser.ScreenOrientationProvider;
  import org.chromium.content_public.browser.SelectionPopupController;
  import org.chromium.content_public.browser.WebContents;
  import org.chromium.content_public.common.ContentSwitches;
@@ -26,7 +26,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActiv
  import org.chromium.printing.PrintManagerDelegateImpl;
  import org.chromium.printing.PrintingController;
  import org.chromium.printing.PrintingControllerImpl;
-@@ -992,6 +993,8 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+@@ -980,6 +981,8 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
          UpdateMenuItemHelper.getInstance().onStart();
          ChromeActivitySessionTracker.getInstance().onStartWithNative();
          ChromeCachedFlags.getInstance().cacheNativeFlags();
@@ -49,17 +49,19 @@ 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
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -2811,6 +2811,10 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -2792,7 +2792,11 @@ const FeatureEntry kFeatureEntries[] = {
+     {"enable-container-queries", flag_descriptions::kCSSContainerQueriesName,
       flag_descriptions::kCSSContainerQueriesDescription, kOsAll,
       FEATURE_VALUE_TYPE(blink::features::kCSSContainerQueries)},
- #if BUILDFLAG(IS_ANDROID)
+-#if BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_ANDROID) // Bromite allow user certificates
 +    {"allow-user-certificates",
 +     flag_descriptions::kAllowUserCertificatesName,
 +     flag_descriptions::kAllowUserCertificatesDescription, kOsAndroid,
 +     FEATURE_VALUE_TYPE(chrome::android::kAllowUserCertificates)},
-     {"contextual-search-debug", flag_descriptions::kContextualSearchDebugName,
-      flag_descriptions::kContextualSearchDebugDescription, kOsAndroid,
-      FEATURE_VALUE_TYPE(chrome::android::kContextualSearchDebug)},
+     {"explore-sites", flag_descriptions::kExploreSitesName,
+      flag_descriptions::kExploreSitesDescription, kOsAndroid,
+      FEATURE_WITH_PARAMS_VALUE_TYPE(chrome::android::kExploreSites,
 diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc

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

@@ -14,7 +14,7 @@ Subject: Add IsCleartextPermitted flag
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -7724,6 +7724,10 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -7638,6 +7638,10 @@ const FeatureEntry kFeatureEntries[] = {
       flag_descriptions::kRequestDesktopSiteExceptionsName,
       flag_descriptions::kRequestDesktopSiteExceptionsDescription, kOsAndroid,
       FEATURE_VALUE_TYPE(features::kRequestDesktopSiteExceptions)},

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

@@ -20,7 +20,7 @@ See also: https://github.com/bromite/bromite/issues/1474
 diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
 --- a/chrome/android/java/res/xml/privacy_preferences.xml
 +++ b/chrome/android/java/res/xml/privacy_preferences.xml
-@@ -65,6 +65,16 @@
+@@ -60,6 +60,16 @@
          android:fragment="org.chromium.chrome.browser.privacy.settings.DoNotTrackSettings"
          android:key="do_not_track"
          android:title="@string/do_not_track_title"/>
@@ -123,7 +123,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Inco
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
-@@ -101,6 +101,9 @@ public class PrivacySettings
+@@ -96,6 +96,9 @@ public class PrivacySettings
      private ViewGroup mDialogContainer;
      private BottomSheetController mBottomSheetController;
  
@@ -133,7 +133,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
      @Override
      public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
          PrivacyPreferencesManagerImpl privacyPrefManager =
-@@ -215,6 +218,9 @@ public class PrivacySettings
+@@ -204,6 +207,9 @@ public class PrivacySettings
          updatePreferences();
      }
  
@@ -143,10 +143,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
      @Override
      public boolean onPreferenceChange(Preference preference, Object newValue) {
          String key = preference.getKey();
-@@ -232,6 +238,14 @@ public class PrivacySettings
-             SharedPreferences.Editor sharedPreferenceEditor = ContextUtils.getAppSharedPreferences().edit();
-             sharedPreferenceEditor.putBoolean(PREF_FORCE_NO_JIT, (boolean) newValue);
-             sharedPreferenceEditor.apply();
+@@ -217,6 +223,14 @@ public class PrivacySettings
+         } else if (PREF_SEARCH_SUGGESTIONS.equals(key)) {
+             UserPrefs.get(Profile.getLastUsedRegularProfile())
+                     .setBoolean(Pref.SEARCH_SUGGEST_ENABLED, (boolean) newValue);
 +        } else if (PREF_ALLOW_CUSTOM_TAB_INTENTS.equals(key)) {
 +            SharedPreferences.Editor sharedPreferencesEditor = ContextUtils.getAppSharedPreferences().edit();
 +            sharedPreferencesEditor.putBoolean(PREF_ALLOW_CUSTOM_TAB_INTENTS, (boolean)newValue);
@@ -158,7 +158,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
          } else if (PREF_AUTOFILL_ASSISTANT.equals(key)) {
              AutofillAssistantPreferencesUtil.setAssistantEnabledPreference( (boolean) newValue);
          } else if (PREF_ALWAYS_INCOGNITO.equals(key)) {
-@@ -268,6 +282,16 @@ public class PrivacySettings
+@@ -253,6 +267,16 @@ public class PrivacySettings
              canMakePaymentPref.setChecked(prefService.getBoolean(Pref.CAN_MAKE_PAYMENT_ENABLED));
          }
  
@@ -194,7 +194,7 @@ diff --git a/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/TabAsso
 diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
-@@ -4798,6 +4798,21 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+@@ -4741,6 +4741,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.">
           Show original
        </message>

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

@@ -5,17 +5,17 @@ Subject: Add flag for omnibox autocomplete filtering
 Adds a flag that restricts whether search history, clipboard, bookmarks
 and internal chrome:// pages will be used for the autocomplete results.
 ---
- chrome/browser/about_flags.cc                 | 20 +++++++++++++++++++
+ chrome/browser/about_flags.cc                 | 22 ++++++++++++++++++-
  .../browser/autocomplete_controller.cc        | 11 ++++++++++
  .../omnibox/browser/history_url_provider.cc   |  3 +++
  components/omnibox/browser/search_provider.cc |  4 ++++
  components/url_formatter/url_fixer.cc         |  4 ++++
- 5 files changed, 42 insertions(+)
+ 5 files changed, 43 insertions(+), 1 deletion(-)
 
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -450,6 +450,22 @@ const FeatureEntry::FeatureVariation kReaderModeDiscoverabilityVariations[] = {
+@@ -449,6 +449,22 @@ const FeatureEntry::FeatureVariation kReaderModeDiscoverabilityVariations[] = {
  #endif  // BUILDFLAG(IS_ANDROID)
  
  #if BUILDFLAG(IS_ANDROID)
@@ -38,17 +38,19 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
  const FeatureEntry::FeatureParam kAdaptiveButton_AlwaysNone[] = {
      {"mode", "always-none"}};
  const FeatureEntry::FeatureParam kAdaptiveButton_AlwaysNewTab[] = {
-@@ -2810,6 +2826,10 @@ const FeatureEntry kFeatureEntries[] = {
-     {"enable-container-queries", flag_descriptions::kCSSContainerQueriesName,
-      flag_descriptions::kCSSContainerQueriesDescription, kOsAll,
-      FEATURE_VALUE_TYPE(blink::features::kCSSContainerQueries)},
+@@ -3427,7 +3443,11 @@ const FeatureEntry kFeatureEntries[] = {
+      kOsMac | kOsLinux | kOsWin,
+      FEATURE_VALUE_TYPE(features::kSystemNotifications)},
+ #endif  // BUILDFLAG(ENABLE_SYSTEM_NOTIFICATIONS) && !BUILDFLAG(IS_CHROMEOS_ASH)
+-#if BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_ANDROID) // Bromite autocomplete filtering
 +    {"omnibox-autocomplete-filtering",
 +     "Omnibox Autocomplete Filtering",
 +     "Restrict omnibox autocomplete results to a combination of search suggestions (if enabled), bookmarks, and internal chrome pages.",
 +     kOsAll, MULTI_VALUE_TYPE(kOmniboxAutocompleteFiltering)},
- #if BUILDFLAG(IS_ANDROID)
-     {"allow-user-certificates",
-      flag_descriptions::kAllowUserCertificatesName,
+     {"adaptive-button-in-top-toolbar",
+      flag_descriptions::kAdaptiveButtonInTopToolbarName,
+      flag_descriptions::kAdaptiveButtonInTopToolbarDescription, kOsAndroid,
 diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/omnibox/browser/autocomplete_controller.cc
 --- a/components/omnibox/browser/autocomplete_controller.cc
 +++ b/components/omnibox/browser/autocomplete_controller.cc

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

@@ -0,0 +1,100 @@
+From: Wengling Chen <feiyu2817@gmail.com>
+Date: Mon, 1 Feb 2021 19:18:55 +0200
+Subject: Add flag for save-data-header
+
+---
+ chrome/browser/about_flags.cc                                | 5 ++++-
+ chrome/browser/flag_descriptions.cc                          | 4 ++++
+ chrome/browser/flag_descriptions.h                           | 3 +++
+ content/browser/loader/browser_initiated_resource_request.cc | 5 +++--
+ services/network/public/cpp/features.cc                      | 5 +++++
+ services/network/public/cpp/features.h                       | 2 ++
+ 6 files changed, 21 insertions(+), 3 deletions(-)
+
+diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
+--- a/chrome/browser/about_flags.cc
++++ b/chrome/browser/about_flags.cc
+@@ -3975,7 +3975,10 @@ const FeatureEntry kFeatureEntries[] = {
+     {"force-text-direction", flag_descriptions::kForceTextDirectionName,
+      flag_descriptions::kForceTextDirectionDescription, kOsAll,
+      MULTI_VALUE_TYPE(kForceTextDirectionChoices)},
+-#if BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(IS_ANDROID) // Bromite save data header
++    {"enable-save-data-header", flag_descriptions::kEnableSaveDataHeaderName,
++     flag_descriptions::kEnableSaveDataHeaderDescription, kOsAndroid,
++     FEATURE_VALUE_TYPE(network::features::kEnableSaveDataHeader)},
+     {"force-update-menu-type", flag_descriptions::kUpdateMenuTypeName,
+      flag_descriptions::kUpdateMenuTypeDescription, kOsAndroid,
+      MULTI_VALUE_TYPE(kForceUpdateMenuTypeChoices)},
+diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
+--- a/chrome/browser/flag_descriptions.cc
++++ b/chrome/browser/flag_descriptions.cc
+@@ -1083,6 +1083,10 @@ const char kDisableKeepaliveFetchDescription[] =
+     "Disable fetch with keepalive set "
+     "(https://fetch.spec.whatwg.org/#request-keepalive-flag).";
+ 
++const char kEnableSaveDataHeaderName[] = "Enable save-data header";
++const char kEnableSaveDataHeaderDescription[] =
++    "Enable save-data header without enabling Data Saver.";
++
+ const char kExperimentalAccessibilityLanguageDetectionName[] =
+     "Experimental accessibility language detection";
+ const char kExperimentalAccessibilityLanguageDetectionDescription[] =
+diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
+--- a/chrome/browser/flag_descriptions.h
++++ b/chrome/browser/flag_descriptions.h
+@@ -584,6 +584,9 @@ extern const char kDiagnosticsAppNavigationDescription[];
+ extern const char kDisableKeepaliveFetchName[];
+ extern const char kDisableKeepaliveFetchDescription[];
+ 
++extern const char kEnableSaveDataHeaderName[];
++extern const char kEnableSaveDataHeaderDescription[];
++
+ extern const char kMemlogName[];
+ extern const char kMemlogDescription[];
+ extern const char kMemlogModeMinimal[];
+diff --git a/content/browser/loader/browser_initiated_resource_request.cc b/content/browser/loader/browser_initiated_resource_request.cc
+--- a/content/browser/loader/browser_initiated_resource_request.cc
++++ b/content/browser/loader/browser_initiated_resource_request.cc
+@@ -40,9 +40,10 @@ void UpdateAdditionalHeadersForBrowserInitiatedRequest(
+ 
+   // Set the Save-Data header if appropriate.
+   // https://tools.ietf.org/html/draft-grigorik-http-client-hints-03#section-7
+-  if (GetContentClient()->browser()->IsDataSaverEnabled(browser_context) &&
++  if ((GetContentClient()->browser()->IsDataSaverEnabled(browser_context) &&
+       !base::GetFieldTrialParamByFeatureAsBool(features::kDataSaverHoldback,
+-                                               "holdback_web", false)) {
++                                               "holdback_web", false)) ||
++      base::FeatureList::IsEnabled(network::features::kEnableSaveDataHeader)) {
+     if (should_update_existing_headers) {
+       headers->RemoveHeader("Save-Data");
+     }
+diff --git a/services/network/public/cpp/features.cc b/services/network/public/cpp/features.cc
+--- a/services/network/public/cpp/features.cc
++++ b/services/network/public/cpp/features.cc
+@@ -20,6 +20,11 @@ const base::Feature kExpectCTReporting{"ExpectCTReporting",
+ 
+ const base::Feature kNetworkErrorLogging{"NetworkErrorLogging",
+                                          base::FEATURE_ENABLED_BY_DEFAULT};
++
++// Enable save-data header separately (without enabled data reduction service).
++const base::Feature kEnableSaveDataHeader{"EnableSaveDataHeader",
++                                           base::FEATURE_DISABLED_BY_DEFAULT};
++
+ // Enables the network service.
+ const base::Feature kNetworkService {
+ #if BUILDFLAG(IS_ANDROID)
+diff --git a/services/network/public/cpp/features.h b/services/network/public/cpp/features.h
+--- a/services/network/public/cpp/features.h
++++ b/services/network/public/cpp/features.h
+@@ -52,6 +52,8 @@ extern const base::FeatureParam<std::string>
+ COMPONENT_EXPORT(NETWORK_CPP)
+ extern const base::Feature kDisableKeepaliveFetch;
+ 
++extern const base::Feature kEnableSaveDataHeader;
++COMPONENT_EXPORT(NETWORK_CPP)
+ COMPONENT_EXPORT(NETWORK_CPP)
+ extern const base::Feature kTrustTokens;
+ 
+--
+2.25.1

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

@@ -11,7 +11,7 @@ Subject: Add flag to disable external intent requests
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -2740,6 +2740,9 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -2722,6 +2722,9 @@ const FeatureEntry kFeatureEntries[] = {
       flag_descriptions::kWebrtcCaptureMultiChannelApmName,
       flag_descriptions::kWebrtcCaptureMultiChannelApmDescription, kOsAll,
       FEATURE_VALUE_TYPE(features::kWebRtcEnableCaptureMultiChannelApm)},

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

@@ -18,7 +18,7 @@ Subject: Add flag to disable vibration
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -6231,6 +6231,10 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -6145,6 +6145,10 @@ const FeatureEntry kFeatureEntries[] = {
       FEATURE_VALUE_TYPE(features::kNewMacNotificationAPI)},
  #endif
  

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

@@ -349,7 +349,7 @@ diff --git a/chrome/browser/download/android/java/src/org/chromium/chrome/browse
 diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
-@@ -3448,6 +3448,9 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+@@ -3399,6 +3399,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]">
          Track prices
        </message>

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

@@ -101,7 +101,7 @@ diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/brow
 diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
-@@ -1395,6 +1395,12 @@ Your Google account may have other forms of browsing history like searches and a
+@@ -1346,6 +1346,12 @@ Your Google account may have other forms of browsing history like searches and a
        <message name="IDS_SAFE_BROWSING_NO_PROTECTION_CONFIRMATION_DIALOG_CONFIRM" desc="Message for Safe Browsing no protection confirmation button.">
          Turn off
        </message>
@@ -143,7 +143,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow
 diff --git a/components/BUILD.gn b/components/BUILD.gn
 --- a/components/BUILD.gn
 +++ b/components/BUILD.gn
-@@ -571,7 +571,7 @@ test("components_unittests") {
+@@ -570,7 +570,7 @@ test("components_unittests") {
  
    # On LaCrOS, tests use ash - chrome as a window manager, thus the dependency.
    # On other platforms, no components should depend on Chrome.
@@ -152,7 +152,7 @@ diff --git a/components/BUILD.gn b/components/BUILD.gn
      assert_no_deps = [ "//chrome/*" ]
    }
  
-@@ -834,7 +834,7 @@ if (!is_ios) {
+@@ -833,7 +833,7 @@ if (!is_ios) {
  
      # On LaCrOS, tests use ash - chrome as a window manager, thus the dependency.
      # On other platforms, no components should depend on Chrome.

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

@@ -154,7 +154,7 @@ diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/bro
 diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
-@@ -1039,6 +1039,9 @@ Your Google account may have other forms of browsing history like searches and a
+@@ -990,6 +990,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.">
          Last hour
        </message>

+ 21 - 21
build/patches/Automated-domain-substitution.patch

@@ -4649,7 +4649,7 @@ diff --git a/chrome/app/theme/PRESUBMIT.py b/chrome/app/theme/PRESUBMIT.py
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -3845,7 +3845,7 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -3759,7 +3759,7 @@ const FeatureEntry kFeatureEntries[] = {
       flag_descriptions::kSyncSandboxDescription, kOsAll,
       SINGLE_VALUE_TYPE_AND_VALUE(
           switches::kSyncServiceURL,
@@ -4658,7 +4658,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
  #if !BUILDFLAG(IS_ANDROID)
      {"media-router-cast-allow-all-ips",
       flag_descriptions::kMediaRouterCastAllowAllIPsName,
-@@ -4081,7 +4081,7 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -3998,7 +3998,7 @@ const FeatureEntry kFeatureEntries[] = {
       flag_descriptions::kSetMarketUrlForTestingName,
       flag_descriptions::kSetMarketUrlForTestingDescription, kOsAndroid,
       SINGLE_VALUE_TYPE_AND_VALUE(switches::kMarketUrlForTesting,
@@ -5963,7 +5963,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
  
  const char kDisableProcessReuse[] = "Disable subframe process reuse";
  const char kDisableProcessReuseDescription[] =
-@@ -2129,7 +2129,7 @@ const char kReduceUserAgentName[] = "Reduce User-Agent request header";
+@@ -2133,7 +2133,7 @@ const char kReduceUserAgentName[] = "Reduce User-Agent request header";
  const char kReduceUserAgentDescription[] =
      "Reduce (formerly, \"freeze\") the amount of information available in "
      "the User-Agent request header. "
@@ -5972,7 +5972,7 @@ diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descripti
  
  const char kRestrictGamepadAccessName[] = "Restrict gamepad access";
  const char kRestrictGamepadAccessDescription[] =
-@@ -2146,7 +2146,7 @@ const char kIntensiveWakeUpThrottlingName[] =
+@@ -2150,7 +2150,7 @@ const char kIntensiveWakeUpThrottlingName[] =
  const char kIntensiveWakeUpThrottlingDescription[] =
      "When enabled, wake ups from DOM Timers are limited to 1 per minute in a "
      "page that has been hidden for 5 minutes. For additional details, see "
@@ -8741,7 +8741,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
  
  CHAR_LIMIT guidelines:
    Certain strings need character limits to prevent a long translation from breaking the UI.
-@@ -969,7 +969,7 @@ Privacy Sandbox trials are still in active development and are available in sele
+@@ -920,7 +920,7 @@ Privacy Sandbox trials are still in active development and are available in sele
          Choose another provider
        </message>
        <message name="IDS_SETTINGS_SECURE_DROPDOWN_MODE_PRIVACY_POLICY" desc="Text that displays a link to the privacy policy of the resolver selected from a dropdown menu">
@@ -8750,7 +8750,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
        </message>
        <message name="IDS_SETTINGS_SECURE_DNS_DISABLED_FOR_MANAGED_ENVIRONMENT" desc="Substring of the secure DNS setting when secure DNS is disabled due to detection of a managed environment">
          This setting is disabled on managed browsers
-@@ -1006,7 +1006,7 @@ Privacy Sandbox trials are still in active development and are available in sele
+@@ -949,7 +949,7 @@ Privacy Sandbox trials are still in active development and are available in sele
        <message name="IDS_CLEAR_BROWSING_DATA_HISTORY_DIALOG_DATA_TEXT" desc="Text of the dialog that is shown after the deletion of browsing history items finished, indicating that the selected data has been removed, but there may be other forms of browsing history still present in user's Google account.">
          The selected data has been removed from Chrome and your synced devices.
  
@@ -8759,7 +8759,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
        </message>
        <message name="IDS_CLEAR_CACHE_TITLE" desc="Title for Clear Cache in Clear Browsing Data dialog">
          Cached images and files
-@@ -1049,10 +1049,10 @@ Your Google account may have other forms of browsing history like searches and a
+@@ -1001,10 +1001,10 @@ Your Google account may have other forms of browsing history like searches and a
  				Record history even in incognito mode
  			</message>
        <message name="IDS_CLEAR_BROWSING_HISTORY_SUMMARY_SIGNED_IN" desc="A text explaining other forms of activity for signed in users.">
@@ -8772,7 +8772,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
        </message>
        <message name="IDS_CLEAR_SEARCH_HISTORY_LINK" desc="Text informing the user that they can clear search history and other data using MyActivity.">
          <ph name="BEGIN_LINK1">&lt;link1&gt;</ph>Search history<ph name="END_LINK1">&lt;/link1&gt;</ph> and <ph name="BEGIN_LINK2">&lt;link2&gt;</ph>other forms of activity<ph name="END_LINK2">&lt;/link2&gt;</ph> may be saved in your Google Account when you’re signed in. You can delete them anytime.
-@@ -1124,7 +1124,7 @@ Your Google account may have other forms of browsing history like searches and a
+@@ -1076,7 +1076,7 @@ Your Google account may have other forms of browsing history like searches and a
          Basic
        </message>
        <message name="IDS_ANDROID_HISTORY_OTHER_FORMS_OF_HISTORY" desc="The notification at the top of the history page indicating that deleting Chrome browsing history will not delete other forms of history stored at Google My Activity.">
@@ -8781,7 +8781,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
        </message>
        <message name="IDS_ANDROID_HISTORY_BLOCKED_SITE" desc="The text displayed in the history page indicating that a visit to a web site was blocked due to an administrator policy.">
          Blocked site
-@@ -1859,10 +1859,10 @@ Your Google account may have other forms of browsing history like searches and a
+@@ -1811,10 +1811,10 @@ Your Google account may have other forms of browsing history like searches and a
          Waiting for details of parents.
        </message>
        <message name="IDS_ACCOUNT_MANAGEMENT_ONE_PARENT_NAME" desc="String for name of single parent for child account.">
@@ -8794,7 +8794,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
        </message>
        <message name="IDS_ACCOUNT_MANAGEMENT_CHILD_CONTENT_TITLE" desc="Title of the Content setting, which controls which websites a child is allowed to visit.">
          Content
-@@ -1921,22 +1921,22 @@ Your Google account may have other forms of browsing history like searches and a
+@@ -1873,22 +1873,22 @@ Your Google account may have other forms of browsing history like searches and a
          Google Terms of Service
        </message>
        <message name="IDS_GOOGLE_TERMS_OF_SERVICE_URL" desc="URL for Google terms of service" translateable="false">
@@ -8821,7 +8821,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
        </message>
  
        <!-- Sign-in strings -->
-@@ -1953,7 +1953,7 @@ Your Google account may have other forms of browsing history like searches and a
+@@ -1905,7 +1905,7 @@ Your Google account may have other forms of browsing history like searches and a
          Also clear your Chrome data from this device
        </message>
        <message name="IDS_SIGNOUT_MANAGED_ACCOUNT_MESSAGE" desc="Message to display for sign out of Chrome dialog when the account has enterprise management, and all user data will be erased">
@@ -8830,7 +8830,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
        </message>
        <message name="IDS_SIGN_IN_GETTING_ACCOUNT_MANAGEMENT_POLICY" desc="Title of progress bar dialog for getting management policy">
          Contacting Google. This may take a minute…
-@@ -2058,7 +2058,7 @@ Your Google account may have other forms of browsing history like searches and a
+@@ -2010,7 +2010,7 @@ Your Google account may have other forms of browsing history like searches and a
          Your data was encrypted with your <ph name="BEGIN_LINK">&lt;learnmore&gt;</ph>sync passphrase<ph name="END_LINK">&lt;/learnmore&gt;</ph> on <ph name="TIME">%1$s<ex>Sept 1, 2012</ex></ph>. Enter it to start sync.
        </message>
        <message name="IDS_SYNC_ACCOUNT_INFO"  desc="The message that appears in the options dialog indicating that the user is signed in with the given email address.">
@@ -8839,7 +8839,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
        </message>
        <message name="IDS_SYNC_PASSPHRASE_CANNOT_BE_BLANK" desc="Inform user that they cannot use a blank password [CHAR_LIMIT=40]">
          This field cannot be blank
-@@ -2879,10 +2879,10 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+@@ -2831,10 +2831,10 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
        <message name="IDS_SIGNIN_FRE_DISMISS_BUTTON" desc="Button on the very first screen of Chrome to continue without signing into Chrome. Ensure consistency with OneGoogle strings while still omitting “Chrome” (see e.g. TC ID 5336438894576002929).">
          Use without an account
        </message>
@@ -8852,7 +8852,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
          By continuing, you agree to the <ph name="BEGIN_TOS_LINK">&lt;TOS_LINK&gt;</ph>Terms of Service<ph name="END_TOS_LINK">&lt;/TOS_LINK&gt;</ph> and <ph name="BEGIN_PRIVACY_LINK">&lt;PRIVACY_LINK&gt;</ph>Privacy\u00A0Policy<ph name="END_PRIVACY_LINK">&lt;/PRIVACY_LINK&gt;</ph>.\nTo help improve the app, Chrome sends usage and crash data to Google. <ph name="BEGIN_UMA_LINK">&lt;UMA_LINK&gt;</ph>Manage<ph name="END_UMA_LINK">&lt;/UMA_LINK&gt;</ph>
        </message>
        <message name="IDS_SIGNIN_FRE_FOOTER_TOS" desc="The text is displayed in a footer on the very first screen of Chrome. The link ‘Terms of Service’ opens the Google Terms of Service.">
-@@ -2891,7 +2891,7 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+@@ -2843,7 +2843,7 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
        <message name="IDS_SIGNIN_FRE_FOOTER_TOS_WITH_SUPERVISED_USER" desc="The text is displayed in a footer on the very first screen of Chrome. The link 'Terms of Service' opens the Google Terms of Service. The link 'Privacy Policy' opens the Google Privacy Policy.">
          By continuing, you agree to the <ph name="BEGIN_TOS_LINK">&lt;TOS_LINK&gt;</ph>Terms of Service<ph name="END_TOS_LINK">&lt;/TOS_LINK&gt;</ph> and <ph name="BEGIN_PRIVACY_LINK">&lt;PRIVACY_LINK&gt;</ph>Privacy\u00A0Policy<ph name="END_PRIVACY_LINK">&lt;/PRIVACY_LINK&gt;</ph>.
        </message>
@@ -8861,7 +8861,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
          To help improve the app, Chrome sends usage and crash data to Google. <ph name="BEGIN_UMA_LINK">&lt;UMA_LINK&gt;</ph>Manage<ph name="END_UMA_LINK">&lt;/UMA_LINK&gt;</ph>
        </message>
        <message name="IDS_SIGNIN_FRE_UMA_DIALOG_TITLE" desc="Title of the dialog where users can change their Chrome metric sharing settings, like usage data. This appears when they open the Chrome app for the first time on their phone.">
-@@ -4249,7 +4249,7 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+@@ -4201,7 +4201,7 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
  
        <!-- WebUsb Picker UI strings -->
        <message name="IDS_USB_CHOOSER_DIALOG_PROMPT" desc="The text that is used to introduce the USB chooser dialog to the user.">
@@ -8870,7 +8870,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
        </message>
        <message name="IDS_USB_CHOOSER_DIALOG_NO_DEVICES_FOUND_PROMPT" desc="The label shown to the user to inform them that no USB devices were found matching the requirements that the application provided.">
          No compatible devices found
-@@ -4283,7 +4283,7 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+@@ -4235,7 +4235,7 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
          Running in Chrome
        </message>
        <message name="IDS_TWA_RUNNING_IN_CHROME_V2" desc="Updated message on a snackbar indicating that the current Activity may use Chrome data (the rest of the app may not be).">
@@ -8879,7 +8879,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
        </message>
        <message name="IDS_TWA_CLEAR_DATA_DIALOG_TITLE" desc="Title of the clear data dialog showing after user uninstalls or clears data of an app hosting a Trusted Web Activity">
          <ph name="APP_NAME">%1$s<ex>YouTube</ex></ph> also has data in Chrome
-@@ -4637,7 +4637,7 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+@@ -4589,7 +4589,7 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
          Sending to <ph name="device_name">%1$s<ex>Tanya's Pixel 2</ex></ph>...
        </message>
        <message name="IDS_SEND_TAB_TO_SELF_NOTIFICATION_CONTEXT_TEXT" desc="Text displayed as the second line of a notification indicating the domain and the device the tab is shared from.">
@@ -8888,7 +8888,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
        </message>
        <message name="IDS_SEND_TAB_TO_SELF_CONTENT_DESCRIPTION" desc="Accessibility string read when the bottom sheet is opened. It describes the bottom sheet where a user can pick a device to share the tab with.">
          List of devices to share a tab with.
-@@ -4676,7 +4676,7 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+@@ -4628,7 +4628,7 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
            Page sent. To see it, open Chrome on your <ph name="device_type">%1$s<ex>phone</ex></ph>
        </message>
        <message name="IDS_SEND_TAB_TO_SELF_MANAGE_DEVICES_LINK" desc="Text with a link to a page where the user can manage the devices they can share a tab to.">
@@ -8897,7 +8897,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
        </message>
        <message name="IDS_SEND_TAB_TO_SELF_WHEN_SIGNED_IN_UNAVAILABLE" desc="Instructions for the user to enable the feature when it's currently unavailable.">
          You can send tabs between devices that are signed in with the same Google Account
-@@ -5658,7 +5658,7 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+@@ -5610,7 +5610,7 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
          Your browser is managed by your administrator
        </message>
        <message name="IDS_MANAGEMENT_SUBTITLE_MANAGED_BY" desc="The title of the chrome://management page when the browser runs in an environment managed by a known organization. (e.g. Employer owned device enrolled to CBCM)">
@@ -13455,7 +13455,7 @@ diff --git a/components/history/core/browser/browsing_history_service.cc b/compo
 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
 +++ b/components/history/core/browser/history_service.cc
-@@ -1242,7 +1242,7 @@ void HistoryService::DeleteLocalAndRemoteHistoryBetween(
+@@ -1273,7 +1273,7 @@ void HistoryService::DeleteLocalAndRemoteHistoryBetween(
            semantics {
              description:
                "If a user who syncs their browsing history deletes history "
@@ -13464,7 +13464,7 @@ diff --git a/components/history/core/browser/history_service.cc b/components/his
                "host to execute the corresponding deletion serverside."
              trigger:
                "Deleting browsing history for a given time range, e.g. from the "
-@@ -1284,7 +1284,7 @@ void HistoryService::DeleteLocalAndRemoteUrl(WebHistoryService* web_history,
+@@ -1315,7 +1315,7 @@ void HistoryService::DeleteLocalAndRemoteUrl(WebHistoryService* web_history,
            semantics {
              description:
                "If a user who syncs their browsing history deletes urls from  "

+ 4 - 4
build/patches/Bromite-auto-updater.patch

@@ -58,7 +58,7 @@ diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
 diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
 --- a/chrome/android/chrome_java_sources.gni
 +++ b/chrome/android/chrome_java_sources.gni
-@@ -865,6 +865,9 @@ chrome_java_sources = [
+@@ -802,6 +802,9 @@ chrome_java_sources = [
    "java/src/org/chromium/chrome/browser/omaha/UpdateConfigs.java",
    "java/src/org/chromium/chrome/browser/omaha/UpdateMenuItemHelper.java",
    "java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java",
@@ -1554,7 +1554,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f
 diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
-@@ -1824,6 +1824,12 @@ Your Google account may have other forms of browsing history like searches and a
+@@ -1767,6 +1767,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>
@@ -1567,7 +1567,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
  
        <!-- Account management UI strings. -->
        <message name="IDS_ACCOUNT_MANAGEMENT_TITLE" desc="Header title for the account management screen. [CHAR_LIMIT=32]">
-@@ -3371,7 +3377,10 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+@@ -3314,7 +3320,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]">
@@ -1579,7 +1579,7 @@ diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chro
        </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
-@@ -3382,6 +3391,18 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+@@ -3325,6 +3334,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>

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

@@ -26,7 +26,7 @@ diff --git a/chrome/android/java/res/xml/accessibility_preferences.xml b/chrome/
 diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
-@@ -1454,6 +1454,12 @@ Your Google account may have other forms of browsing history like searches and a
+@@ -1397,6 +1397,12 @@ Your Google account may have other forms of browsing history like searches and a
        <message name="IDS_PREFS_ACCESSIBILITY" desc="Title of Accessibility settings, which allows the user to change webpage font sizes. [CHAR_LIMIT=32]">
          Accessibility
        </message>

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

@@ -34,7 +34,7 @@ Also added the disabling of blink features through the DisabledForBromite tag
 diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
 --- a/chrome/android/java/res/xml/privacy_preferences.xml
 +++ b/chrome/android/java/res/xml/privacy_preferences.xml
-@@ -75,10 +75,6 @@
+@@ -70,10 +70,6 @@
          android:title="@string/open_external_links_incognito_title"
          android:summary="@string/open_external_links_incognito_summary"
          android:defaultValue="false" />
@@ -48,7 +48,7 @@ diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/androi
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
-@@ -29,8 +29,6 @@ import org.chromium.chrome.browser.preferences.Pref;
+@@ -28,8 +28,6 @@ import org.chromium.chrome.browser.preferences.Pref;
  import org.chromium.chrome.browser.prefetch.settings.PreloadPagesSettingsFragment;
  import org.chromium.chrome.browser.privacy.secure_dns.SecureDnsSettings;
  import org.chromium.chrome.browser.privacy_review.PrivacyReviewDialog;
@@ -57,7 +57,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
  import org.chromium.chrome.browser.profiles.Profile;
  import org.chromium.chrome.browser.settings.ChromeManagedPreferenceDelegate;
  import org.chromium.chrome.browser.settings.SettingsLauncherImpl;
-@@ -76,7 +74,6 @@ public class PrivacySettings
+@@ -74,7 +72,6 @@ public class PrivacySettings
      private static final String PREF_SECURE_DNS = "secure_dns";
      private static final String PREF_DO_NOT_TRACK = "do_not_track";
      private static final String PREF_CLEAR_BROWSING_DATA = "clear_browsing_data";
@@ -65,7 +65,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
      private static final String PREF_PRIVACY_REVIEW = "privacy_review";
      private static final String PREF_INCOGNITO_LOCK = "incognito_lock";
      private static final String PREF_PHONE_AS_A_SECURITY_KEY = "phone_as_a_security_key";
-@@ -111,18 +108,6 @@ public class PrivacySettings
+@@ -106,18 +103,6 @@ public class PrivacySettings
          SettingsUtils.addPreferencesFromResource(this, R.xml.privacy_preferences);
          getActivity().setTitle(R.string.prefs_privacy_security);
  
@@ -84,9 +84,9 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
          Preference privacyReviewPreference = findPreference(PREF_PRIVACY_REVIEW);
          if (!ChromeFeatureList.isEnabled(ChromeFeatureList.PRIVACY_REVIEW)) {
              getPreferenceScreen().removePreference(privacyReviewPreference);
-@@ -321,12 +306,6 @@ public class PrivacySettings
-         forceNoJit.setOnPreferenceChangeListener(this);
-         forceNoJit.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
+@@ -301,12 +286,6 @@ public class PrivacySettings
+             secureDnsPref.setSummary(SecureDnsSettings.getSummary(getContext()));
+         }
  
 -        Preference privacySandboxPreference = findPreference(PREF_PRIVACY_SANDBOX);
 -        if (privacySandboxPreference != null) {

+ 2 - 2
build/patches/Disable-ua-full-version.patch → build/patches/Disable-UA-full-version.patch

@@ -1,8 +1,8 @@
 From: uazo <uazo@users.noreply.github.com>
 Date: Wed, 16 Feb 2022 14:28:58 +0000
-Subject: Disable ua full version in getHighEntropyValues()
+Subject: Disable UA full version
 
-getHighEntropyValues returns only the major version
+getHighEntropyValues will return only the major version
 ---
  .../renderer/core/frame/navigator_ua_data.cc     | 16 ++++++++++++++--
  1 file changed, 14 insertions(+), 2 deletions(-)

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

@@ -23,7 +23,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
 diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
 --- a/chrome/android/chrome_java_sources.gni
 +++ b/chrome/android/chrome_java_sources.gni
-@@ -998,7 +998,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/SafeBrowsingReferringAppBridge.java",
    "java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingSettingsLauncher.java",
@@ -57,7 +57,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
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -3397,7 +3397,6 @@ static_library("browser") {
+@@ -3366,7 +3366,6 @@ static_library("browser") {
        "//chrome/browser/privacy_sandbox/android:jni_headers",
        "//chrome/browser/reading_list/android",
        "//chrome/browser/safe_browsing/android:safe_browsing_enums",

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

@@ -19,7 +19,7 @@ Revert "[Text Fragment] Unflag fragment directive removal."
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -5391,6 +5391,11 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -5305,6 +5305,11 @@ const FeatureEntry kFeatureEntries[] = {
       FEATURE_VALUE_TYPE(chrome::android::kCCTResizableForThirdParties)},
  #endif
  

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

@@ -22,7 +22,7 @@ Disable CT reporting
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -7680,6 +7680,11 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -7594,6 +7594,11 @@ const FeatureEntry kFeatureEntries[] = {
       flag_descriptions::kWebBluetoothBondOnDemandDescription, kOsWin | kOsLinux,
       FEATURE_VALUE_TYPE(features::kWebBluetoothBondOnDemand)},
  

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

@@ -308,7 +308,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndr
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -2398,6 +2398,14 @@ static_library("browser") {
+@@ -2395,6 +2395,14 @@ static_library("browser") {
      "//ui/webui/resources/cr_components/most_visited:mojom",
      "//ui/webui/resources/js/browser_command:mojo_bindings",
    ]

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

@@ -27,7 +27,7 @@ See also: https://github.com/bromite/bromite/issues/1062
 diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni
 --- a/chrome/android/chrome_java_resources.gni
 +++ b/chrome/android/chrome_java_resources.gni
-@@ -698,6 +698,7 @@ chrome_java_resources = [
+@@ -681,6 +681,7 @@ chrome_java_resources = [
    "java/res/layout/share_sheet_content.xml",
    "java/res/layout/share_sheet_item.xml",
    "java/res/layout/sharing_device_picker.xml",
@@ -38,7 +38,7 @@ diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_ja
 diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
 --- a/chrome/android/chrome_java_sources.gni
 +++ b/chrome/android/chrome_java_sources.gni
-@@ -1022,6 +1022,7 @@ chrome_java_sources = [
+@@ -959,6 +959,7 @@ chrome_java_sources = [
    "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/SharedClipboardShareActivity.java",
@@ -308,7 +308,7 @@ new file mode 100644
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -5588,6 +5588,10 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -5502,6 +5502,10 @@ const FeatureEntry kFeatureEntries[] = {
       FEATURE_VALUE_TYPE(share::kSharingDesktopScreenshotsEdit)},
  #endif
  
@@ -393,7 +393,7 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f
 diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
-@@ -4761,6 +4761,19 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
+@@ -4704,6 +4704,19 @@ To change this setting, <ph name="BEGIN_LINK">&lt;resetlink&gt;</ph>reset sync<p
          Send text to Your Devices
        </message>
  

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

@@ -236,7 +236,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
  }
  
  if (enable_vr) {
-@@ -536,6 +540,7 @@ android_library("chrome_java") {
+@@ -535,6 +539,7 @@ android_library("chrome_java") {
      "//components/ukm/android:java",
      "//components/url_formatter/android:url_formatter_java",
      "//components/user_prefs/android:java",
@@ -322,7 +322,7 @@ diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -3533,6 +3533,11 @@ static_library("browser") {
+@@ -3502,6 +3502,11 @@ static_library("browser") {
        ]
        deps += [ "//chrome/android/modules/dev_ui/provider:native" ]
      }
@@ -337,7 +337,7 @@ diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -149,6 +149,7 @@
+@@ -148,6 +148,7 @@
  #include "components/translate/core/browser/translate_ranker_impl.h"
  #include "components/translate/core/common/translate_util.h"
  #include "components/ui_devtools/switches.h"
@@ -345,7 +345,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
  #include "components/version_info/version_info.h"
  #include "components/viz/common/features.h"
  #include "components/viz/common/switches.h"
-@@ -6470,6 +6471,10 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -6384,6 +6385,10 @@ const FeatureEntry kFeatureEntries[] = {
       FEATURE_VALUE_TYPE(chromeos::features::kClipboardHistoryScreenshotNudge)},
  #endif  // BUILDFLAG(IS_CHROMEOS_ASH)
  

+ 24 - 25
build/patches/Allow-change-keep-navigation-history.patch → build/patches/History-number-of-days-privacy-setting.patch

@@ -1,11 +1,10 @@
 From: uazo <uazo@users.noreply.github.com>
 Date: Mon, 31 Jan 2022 12:49:39 +0000
-Subject: Add an option that allows changing the number of days to keep
- navigation history
+Subject: History number of days privacy setting
 
-Adds a new option in the privacy settings that allows the selection of 
+Adds a new option in the privacy settings that allows the selection of
 the days to keep in the browsing history.
-Selecting the "Never" item activates the kSavingBrowserHistoryDisabled 
+Selecting the "Never" item activates the kSavingBrowserHistoryDisabled
 flag and immediately deletes all the history.
 ---
  .../preference_spinner_single_line.xml        | 26 ++++++--
@@ -74,23 +73,23 @@ diff --git a/chrome/android/java/res/layout-sw360dp/preference_spinner_single_li
 diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
 --- a/chrome/android/java/res/xml/privacy_preferences.xml
 +++ b/chrome/android/java/res/xml/privacy_preferences.xml
-@@ -61,6 +61,12 @@
-         android:title="@string/incognito_history_enabled_title"
-         android:summary="@string/incognito_history_enabled_summary"
-         android:defaultValue="false" />
+@@ -28,6 +28,12 @@
+         android:title="@string/settings_incognito_tab_lock_title"
+         android:summary="@string/settings_incognito_tab_lock_summary_android_setting_off"
+         android:persistent="false"/>
 +    <org.chromium.components.browser_ui.settings.SpinnerPreference
 +        android:key="history_expire_days_threshold"
 +        android:persistent="false"
 +        android:title="@string/history_expire_days_threshold_title"
 +        android:summary="@string/history_expire_days_threshold_summary"
 +        app:singleLine="true" />
-     <Preference
-         android:fragment="org.chromium.chrome.browser.privacy.settings.DoNotTrackSettings"
-         android:key="do_not_track"
+     <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
+         android:key="can_make_payment"
+         android:title="@string/can_make_payment_title"
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
-@@ -42,6 +42,7 @@ import org.chromium.chrome.browser.autofill_assistant.AssistantFeatures;
+@@ -41,6 +41,7 @@ import org.chromium.chrome.browser.autofill_assistant.AssistantFeatures;
  import org.chromium.chrome.browser.autofill_assistant.AutofillAssistantPreferencesUtil;
  import org.chromium.components.browser_ui.bottomsheet.BottomSheetController;
  import org.chromium.components.browser_ui.settings.ChromeSwitchPreference;
@@ -98,7 +97,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
  import org.chromium.components.browser_ui.settings.ManagedPreferenceDelegate;
  import org.chromium.components.browser_ui.settings.SettingsLauncher;
  import org.chromium.components.browser_ui.settings.SettingsUtils;
-@@ -57,6 +58,9 @@ import org.chromium.chrome.browser.contextualsearch.ContextualSearchManager;
+@@ -55,6 +56,9 @@ import androidx.preference.PreferenceCategory;
  import org.chromium.chrome.browser.preferences.SharedPreferencesManager;
  import org.chromium.components.browser_ui.settings.ChromeSwitchPreference;
  
@@ -108,7 +107,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
  /**
   * Fragment to keep track of the all the privacy related preferences.
   */
-@@ -101,6 +105,8 @@ public class PrivacySettings
+@@ -96,6 +100,8 @@ public class PrivacySettings
      private ChromeSwitchPreference allowCustomTabIntentsPref;
      private ChromeSwitchPreference openExternalLinksPref;
  
@@ -117,7 +116,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
      @Override
      public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
          PrivacyPreferencesManagerImpl privacyPrefManager =
-@@ -191,6 +197,38 @@ public class PrivacySettings
+@@ -180,6 +186,38 @@ public class PrivacySettings
          Preference secureDnsPref = findPreference(PREF_SECURE_DNS);
          secureDnsPref.setVisible(SecureDnsSettings.isUiEnabled());
  
@@ -156,7 +155,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
          Preference phoneAsASecurityKey = findPreference(PREF_PHONE_AS_A_SECURITY_KEY);
          phoneAsASecurityKey.setVisible(
                  ChromeFeatureList.isEnabled(ChromeFeatureList.WEB_AUTH_PHONE_SUPPORT));
-@@ -320,6 +358,29 @@ public class PrivacySettings
+@@ -300,6 +338,29 @@ public class PrivacySettings
          };
      }
  
@@ -223,19 +222,19 @@ diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/p
 diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
-@@ -1014,6 +1014,15 @@ Your Google account may have other forms of browsing history like searches and a
+@@ -957,6 +957,15 @@ Your Google account may have other forms of browsing history like searches and a
        <message name="IDS_CLEAR_HISTORY_TITLE" desc="Title for Clear History in Clear Browsing Data dialog">
          Browsing history
        </message>
-+			<message name="IDS_HISTORY_EXPIRE_DAYS_THRESHOLD_TITLE" desc="Title for history expire days threshold">
-+				Expire history days threshold
-+			</message>
-+			<message name="IDS_HISTORY_EXPIRE_DAYS_NEVER_RECORD" desc="Title for history expire days option to never save navigation history">
-+				Never
-+			</message>
++      <message name="IDS_HISTORY_EXPIRE_DAYS_THRESHOLD_TITLE" desc="Title for history expire days threshold">
++        Expire history days threshold
++      </message>
++      <message name="IDS_HISTORY_EXPIRE_DAYS_NEVER_RECORD" desc="Title for history expire days option to never save navigation history">
++        Never
++      </message>
 +      <message name="IDS_HISTORY_EXPIRE_DAYS_THRESHOLD_SUMMARY" desc="Summary for history expire days threshold">
-+				Number of days to keep navigation history
-+			</message>
++        Number of days to keep navigation history
++      </message>
        <message name="IDS_CLEAR_COOKIES_AND_SITE_DATA_TITLE" desc="Title for Clear Cookies and site data in Clear Browsing Data dialog">
          Cookies and site data
        </message>

+ 8 - 109
build/patches/JIT-toggle-and-site-settings.patch → build/patches/JIT-site-settings.patch

@@ -1,6 +1,6 @@
-From: hardenedfuchsiaoswhen <hardenedfuchsiaoswhen@protonmail.com>
-Date: Fri, 18 Jun 2021 03:34:20 +0000
-Subject: JIT toggle and site settings
+From: fgei <fgei@gmail.com>
+Date: Sat, 29 Jan 2022 15:22:45 +0000
+Subject: JIT site settings
 
 Adds a content setting to manage Javascript JIT, disabled by default.
 Since the interface of the content settings foresees an eTLD origin
@@ -10,9 +10,7 @@ Without those features, the RenderProcess would be shared between all eTLD+1.
 
 note: needs SitePerProcess and StrictOriginIsolation flags enabled
 ---
- .../java/res/xml/privacy_preferences.xml      |   5 +++++
- .../privacy/settings/PrivacySettings.java     |  11 +++++++++
- .../strings/android_chrome_strings.grd        |   7 ++++++
+ .../strings/android_chrome_strings.grd        |   1 -
  .../browser_ui/site_settings/android/BUILD.gn |   5 +++++
  .../permission_javascript_jit.png             | Bin 0 -> 433 bytes
  .../permission_javascript_jit.png             | Bin 0 -> 377 bytes
@@ -33,86 +31,21 @@ note: needs SitePerProcess and StrictOriginIsolation flags enabled
  components/page_info/page_info.cc             |   6 +++++
  components/page_info/page_info_ui.cc          |   2 ++
  components/site_settings_strings.grdp         |   6 +++++
- .../browser/BrowserStartupControllerImpl.java |   1 +
- .../content/browser/DeviceUtilsImpl.java      |   8 +++++++
- 25 files changed, 126 insertions(+), 3 deletions(-)
+ 21 files changed, 94 insertions(+), 4 deletions(-)
  create mode 100644 components/browser_ui/site_settings/android/java/res/drawable-hdpi/permission_javascript_jit.png
  create mode 100644 components/browser_ui/site_settings/android/java/res/drawable-mdpi/permission_javascript_jit.png
  create mode 100644 components/browser_ui/site_settings/android/java/res/drawable-xhdpi/permission_javascript_jit.png
  create mode 100644 components/browser_ui/site_settings/android/java/res/drawable-xxhdpi/permission_javascript_jit.png
  create mode 100644 components/browser_ui/site_settings/android/java/res/drawable-xxxhdpi/permission_javascript_jit.png
 
-diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
---- a/chrome/android/java/res/xml/privacy_preferences.xml
-+++ b/chrome/android/java/res/xml/privacy_preferences.xml
-@@ -37,6 +37,11 @@
-         android:title="@string/preload_pages_title"
-         android:summary="@string/preload_pages_summary"
-         android:fragment="org.chromium.chrome.browser.prefetch.settings.PreloadPagesSettingsFragment"/>
-+    <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
-+        android:key="force_no_jit"
-+        android:title="@string/force_no_jit_title"
-+        android:summary="@string/force_no_jit_summary"
-+        android:defaultValue="false" />
-     <org.chromium.components.browser_ui.settings.ChromeBasePreference
-         android:key="secure_dns"
-         android:title="@string/settings_secure_dns_title"
-diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
---- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
-+++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
-@@ -4,6 +4,7 @@
- 
- package org.chromium.chrome.browser.privacy.settings;
- 
-+import android.content.SharedPreferences;
- import android.os.Build;
- import android.content.SharedPreferences;
- import android.os.Bundle;
-@@ -87,6 +88,7 @@ public class PrivacySettings
-     private static final String PREF_SEARCH_SUGGESTIONS = "search_suggestions";
-     private static final String PREF_CONTEXTUAL_SEARCH = "contextual_search";
-     public static final String PREF_AUTOFILL_ASSISTANT = "autofill_assistant";
-+    private static final String PREF_FORCE_NO_JIT = "force_no_jit";
-     private ChromeSwitchPreference mSearchSuggestions;
-     private @Nullable ChromeSwitchPreference mAutofillAssistant;
-     private @Nullable Preference mContextualSearch;
-@@ -226,6 +228,10 @@ public class PrivacySettings
-         } else if (PREF_SEARCH_SUGGESTIONS.equals(key)) {
-             UserPrefs.get(Profile.getLastUsedRegularProfile())
-                     .setBoolean(Pref.SEARCH_SUGGEST_ENABLED, (boolean) newValue);
-+        } else if (PREF_FORCE_NO_JIT.equals(key)) {
-+            SharedPreferences.Editor sharedPreferenceEditor = ContextUtils.getAppSharedPreferences().edit();
-+            sharedPreferenceEditor.putBoolean(PREF_FORCE_NO_JIT, (boolean) newValue);
-+            sharedPreferenceEditor.apply();
-         } else if (PREF_AUTOFILL_ASSISTANT.equals(key)) {
-             AutofillAssistantPreferencesUtil.setAssistantEnabledPreference( (boolean) newValue);
-         } else if (PREF_ALWAYS_INCOGNITO.equals(key)) {
-@@ -286,6 +292,11 @@ public class PrivacySettings
-             secureDnsPref.setSummary(SecureDnsSettings.getSummary(getContext()));
-         }
- 
-+        ChromeSwitchPreference forceNoJit =
-+                (ChromeSwitchPreference) findPreference(PREF_FORCE_NO_JIT);
-+        forceNoJit.setOnPreferenceChangeListener(this);
-+        forceNoJit.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
-+
-         Preference privacySandboxPreference = findPreference(PREF_PRIVACY_SANDBOX);
-         if (privacySandboxPreference != null) {
-             privacySandboxPreference.setSummary(
 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
-@@ -981,6 +981,13 @@ Privacy Sandbox trials are still in active development and are available in sele
+@@ -931,7 +931,6 @@ Privacy Sandbox trials are still in active development and are available in sele
+       <message name="IDS_SETTINGS_SECURE_DNS_CUSTOM_CONNECTION_ERROR" desc="Error text for a custom secure DNS provider entry to which a probe connection fails">
          Please verify that this is a valid provider or try again later
        </message>
- 
-+      <message name="IDS_FORCE_NO_JIT_TITLE" desc="Title for disable JIT settings. [CHAR-LIMIT=32]">
-+        Disable JIT
-+      </message>
-+      <message name="IDS_FORCE_NO_JIT_SUMMARY" desc="Summary for Disable JIT settings">
-+        Improve security at the expense of performance by not compiling JavaScript to native code (requires browser restart)
-+      </message>
-+
+-
        <message name="IDS_CLEAR_BROWSING_DATA_TITLE" desc="Title of the Clear Browsing Data screen. [CHAR_LIMIT=32]">
          Clear browsing data
        </message>
@@ -555,39 +488,5 @@ diff --git a/components/site_settings_strings.grdp b/components/site_settings_st
    <message name="IDS_SITE_SETTINGS_TYPE_LOCATION" desc="The label used for geolocation site settings controls." meaning="Geolocation">
      Location
    </message>
-diff --git a/content/public/android/java/src/org/chromium/content/browser/BrowserStartupControllerImpl.java b/content/public/android/java/src/org/chromium/content/browser/BrowserStartupControllerImpl.java
---- a/content/public/android/java/src/org/chromium/content/browser/BrowserStartupControllerImpl.java
-+++ b/content/public/android/java/src/org/chromium/content/browser/BrowserStartupControllerImpl.java
-@@ -453,6 +453,7 @@ public class BrowserStartupControllerImpl implements BrowserStartupController {
-             }
- 
-             // TODO(yfriedman): Remove dependency on a command line flag for this.
-+            DeviceUtilsImpl.addJitlessSwitch();
-             DeviceUtilsImpl.addDeviceSpecificUserAgentSwitch();
-             BrowserStartupControllerImplJni.get().setCommandLineFlags(singleProcess);
-         }
-diff --git a/content/public/android/java/src/org/chromium/content/browser/DeviceUtilsImpl.java b/content/public/android/java/src/org/chromium/content/browser/DeviceUtilsImpl.java
---- a/content/public/android/java/src/org/chromium/content/browser/DeviceUtilsImpl.java
-+++ b/content/public/android/java/src/org/chromium/content/browser/DeviceUtilsImpl.java
-@@ -5,6 +5,7 @@
- package org.chromium.content.browser;
- 
- import org.chromium.base.CommandLine;
-+import org.chromium.base.ContextUtils;
- import org.chromium.base.StrictModeContext;
- import org.chromium.content_public.common.ContentSwitches;
- import org.chromium.ui.base.DeviceFormFactor;
-@@ -22,4 +23,11 @@ public class DeviceUtilsImpl {
-             }
-         }
-     }
-+    public static void addJitlessSwitch() {
-+	try (StrictModeContext ignored = StrictModeContext.allowDiskReads()) {
-+	    if (ContextUtils.getAppSharedPreferences().getBoolean("force_no_jit", false)) {
-+		CommandLine.getInstance().appendSwitchWithValue("js-flags", "--jitless");
-+	    }
-+	}
-+    }
- }
 --
 2.25.1

+ 4 - 5
build/patches/Multiple-fingerprinting-mitigations.patch

@@ -12,12 +12,11 @@ It contains improvements from ungoogled-chromium which add two flags:
 1. --fingerprinting-client-rects-noise to enable fingerprinting deception for Range::getClientRects and Element::getBoundingClientRect
 2. --fingerprinting-canvas-measuretext-noise to enable fingerprinting deception for Canvas::measureText
 
-2. Canvas: fingerprinting mitigations for image data and webGL
+2. Canvas: fingerprinting mitigations for image data
 
-Disable webGL renderer info and modify the color data returned by ToBlob,
-ToDataURL and getImageData so that it will contain randomly manipulated
-pixels (maximum 20) that slightly change the color of the R,G,B components
-without a visible effect.
+Modify the color data returned by ToBlob, ToDataURL and getImageData so that
+it will contain randomly manipulated pixels (maximum 20) that slightly change
+the color of the R,G,B components without a visible effect.
 
 Credits to Slaviro (https://github.com/Slaviro) for coming up with a better
 approach to change color components.

+ 1781 - 0
build/patches/Remove-contextual-search-manager.patch

@@ -0,0 +1,1781 @@
+From: csagan5 <32685696+csagan5@users.noreply.github.com>
+Date: Wed, 9 Mar 2022 19:22:02 +0100
+Subject: Remove contextual search manager
+
+---
+ chrome/BUILD.gn                               |  10 --
+ chrome/android/BUILD.gn                       |   9 --
+ chrome/android/chrome_java_resources.gni      |  19 ----
+ chrome/android/chrome_java_sources.gni        |  63 -------------
+ .../ManualFillingMediator.java                |   5 -
+ .../contextual_search_promo_ripple.9.png      | Bin 411 -> 0 bytes
+ .../contextual_search_promo_ripple.9.png      | Bin 304 -> 0 bytes
+ .../contextual_search_promo_ripple.9.png      | Bin 522 -> 0 bytes
+ .../contextual_search_promo_ripple.9.png      | Bin 665 -> 0 bytes
+ .../contextual_search_promo_ripple.9.png      | Bin 983 -> 0 bytes
+ ...ontextual_search_panel_help_background.xml |  17 ----
+ ...contextual_search_bar_banner_text_view.xml |  24 -----
+ .../layout/contextual_search_caption_view.xml |  14 ---
+ .../contextual_search_card_icon_view.xml      |  12 ---
+ .../layout/contextual_search_context_view.xml |  25 -----
+ .../contextual_search_panel_help_view.xml     |  58 ------------
+ .../layout/contextual_search_promo_view.xml   |  66 --------------
+ .../contextual_search_promo_view_revised.xml  |  86 ------------------
+ ...ntextual_search_quick_action_icon_view.xml |  12 ---
+ ...earch_related_searches_in_content_view.xml |  16 ----
+ ...ontextual_search_related_searches_view.xml |  15 ---
+ .../layout/contextual_search_term_view.xml    |  19 ----
+ .../res/xml/contextual_search_preferences.xml |  25 -----
+ .../xml/contextual_search_tap_preferences.xml |  26 ------
+ .../res/xml/google_services_preferences.xml   |   4 -
+ .../java/res/xml/privacy_preferences.xml      |   4 -
+ .../chrome/browser/ChromeTabbedActivity.java  |   4 +-
+ .../chrome/browser/app/ChromeActivity.java    |  49 +---------
+ .../bottombar/OverlayPanelContent.java        |   1 -
+ .../compositor/layouts/LayoutManagerImpl.java |   4 +-
+ .../customtabs/BaseCustomTabActivity.java     |   2 +-
+ .../BaseCustomTabRootUiCoordinator.java       |   5 +-
+ .../browser/customtabs/CustomTabActivity.java |   6 --
+ .../modaldialog/ChromeTabModalPresenter.java  |  12 +--
+ .../modaldialog/TabModalLifetimeHandler.java  |   7 +-
+ .../privacy/settings/PrivacySettings.java     |   9 --
+ .../chrome/browser/tab/TabHelpers.java        |   2 -
+ .../tabbed_mode/TabbedRootUiCoordinator.java  |   5 +-
+ .../chrome/browser/ui/RootUiCoordinator.java  |  60 +-----------
+ chrome/browser/BUILD.gn                       |  31 -------
+ chrome/browser/about_flags.cc                 |  86 ------------------
+ ...nfiguration_policy_handler_list_factory.cc |   6 +-
+ .../strings/android_chrome_strings.grd        |  49 ----------
+ components/BUILD.gn                           |   1 -
+ third_party/blink/public/mojom/BUILD.gn       |   2 +-
+ third_party/blink/public/public_features.gni  |   2 +-
+ 46 files changed, 17 insertions(+), 855 deletions(-)
+ delete mode 100644 chrome/android/java/res/drawable-hdpi/contextual_search_promo_ripple.9.png
+ delete mode 100644 chrome/android/java/res/drawable-mdpi/contextual_search_promo_ripple.9.png
+ delete mode 100644 chrome/android/java/res/drawable-xhdpi/contextual_search_promo_ripple.9.png
+ delete mode 100644 chrome/android/java/res/drawable-xxhdpi/contextual_search_promo_ripple.9.png
+ delete mode 100644 chrome/android/java/res/drawable-xxxhdpi/contextual_search_promo_ripple.9.png
+ delete mode 100644 chrome/android/java/res/drawable/contextual_search_panel_help_background.xml
+ delete mode 100644 chrome/android/java/res/layout/contextual_search_bar_banner_text_view.xml
+ delete mode 100644 chrome/android/java/res/layout/contextual_search_caption_view.xml
+ delete mode 100644 chrome/android/java/res/layout/contextual_search_card_icon_view.xml
+ delete mode 100644 chrome/android/java/res/layout/contextual_search_context_view.xml
+ delete mode 100644 chrome/android/java/res/layout/contextual_search_panel_help_view.xml
+ delete mode 100644 chrome/android/java/res/layout/contextual_search_promo_view.xml
+ delete mode 100644 chrome/android/java/res/layout/contextual_search_promo_view_revised.xml
+ delete mode 100644 chrome/android/java/res/layout/contextual_search_quick_action_icon_view.xml
+ delete mode 100644 chrome/android/java/res/layout/contextual_search_related_searches_in_content_view.xml
+ delete mode 100644 chrome/android/java/res/layout/contextual_search_related_searches_view.xml
+ delete mode 100644 chrome/android/java/res/layout/contextual_search_term_view.xml
+ delete mode 100644 chrome/android/java/res/xml/contextual_search_preferences.xml
+ delete mode 100644 chrome/android/java/res/xml/contextual_search_tap_preferences.xml
+
+diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
+--- a/chrome/BUILD.gn
++++ b/chrome/BUILD.gn
+@@ -1629,20 +1629,10 @@ group("strings") {
+ }
+ 
+ if (is_android) {
+-  java_cpp_enum("assist_ranker_prediction_enum_javagen") {
+-    sources = [
+-      "browser/android/contextualsearch/contextual_search_ranker_logger_impl.h",
+-    ]
+-  }
+-
+   java_cpp_enum("partner_bookmarks_javagen") {
+     sources = [ "browser/android/bookmarks/partner_bookmarks_reader.h" ]
+   }
+ 
+-  java_cpp_enum("quick_action_category_enum_javagen") {
+-    sources = [ "browser/android/contextualsearch/resolved_search_term.h" ]
+-  }
+-
+   java_cpp_enum("offline_pages_enum_javagen") {
+     sources = [ "browser/offline_pages/offline_page_utils.h" ]
+   }
+diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
+--- a/chrome/android/BUILD.gn
++++ b/chrome/android/BUILD.gn
+@@ -454,7 +454,6 @@ android_library("chrome_java") {
+     "//components/content_capture/android:java",
+     "//components/content_settings/android:content_settings_enums_java",
+     "//components/content_settings/android:java",
+-    "//components/contextual_search/content/common/mojom:mojom_java",
+     "//components/crash/android:java",
+     "//components/dom_distiller/content/browser/android:dom_distiller_content_java",
+     "//components/dom_distiller/core/android:dom_distiller_core_java",
+@@ -623,11 +622,9 @@ android_library("chrome_java") {
+     ":resource_id_javagen",
+     ":sync_user_settings_enums_java",
+     ":vr_build_config",
+-    "//chrome:assist_ranker_prediction_enum_javagen",
+     "//chrome:instant_apps_reasons_enum_javagen",
+     "//chrome:offline_pages_enum_javagen",
+     "//chrome:partner_bookmarks_javagen",
+-    "//chrome:quick_action_category_enum_javagen",
+     "//chrome:supervised_user_url_filter_enum_javagen",
+     "//chrome/browser:screenshot_mode_enum",
+     "//chrome/browser:sharing_dialog_type_generated_enum",
+@@ -3813,18 +3810,12 @@ generate_jni("chrome_jni_headers") {
+     "java/src/org/chromium/chrome/browser/compositor/LayerTitleCache.java",
+     "java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java",
+     "java/src/org/chromium/chrome/browser/compositor/layouts/content/TabContentManager.java",
+-    "java/src/org/chromium/chrome/browser/compositor/scene_layer/ContextualSearchSceneLayer.java",
+     "java/src/org/chromium/chrome/browser/compositor/scene_layer/StaticTabSceneLayer.java",
+     "java/src/org/chromium/chrome/browser/compositor/scene_layer/TabListSceneLayer.java",
+     "java/src/org/chromium/chrome/browser/compositor/scene_layer/TabStripSceneLayer.java",
+     "java/src/org/chromium/chrome/browser/compositor/scene_layer/ToolbarSwipeSceneLayer.java",
+     "java/src/org/chromium/chrome/browser/content/ContentUtils.java",
+     "java/src/org/chromium/chrome/browser/contextmenu/ContextMenuHelper.java",
+-    "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchContext.java",
+-    "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java",
+-    "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchRankerLoggerImpl.java",
+-    "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTabHelper.java",
+-    "java/src/org/chromium/chrome/browser/contextualsearch/CtrSuppression.java",
+     "java/src/org/chromium/chrome/browser/crash/MinidumpUploadServiceImpl.java",
+     "java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java",
+     "java/src/org/chromium/chrome/browser/device_dialog/ChromeBluetoothChooserAndroidDelegate.java",
+diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni
+--- a/chrome/android/chrome_java_resources.gni
++++ b/chrome/android/chrome_java_resources.gni
+@@ -34,7 +34,6 @@ chrome_java_resources = [
+   "java/res/drawable-hdpi/btn_tabstrip_new_tab_normal.png",
+   "java/res/drawable-hdpi/btn_tabstrip_new_tab_pressed.png",
+   "java/res/drawable-hdpi/btn_tabstrip_switch_normal.png",
+-  "java/res/drawable-hdpi/contextual_search_promo_ripple.9.png",
+   "java/res/drawable-hdpi/cvc_icon.png",
+   "java/res/drawable-hdpi/cvc_icon_amex.png",
+   "java/res/drawable-hdpi/data_reduction_breakdown_sort_arrow.png",
+@@ -128,7 +127,6 @@ chrome_java_resources = [
+   "java/res/drawable-mdpi/btn_tabstrip_new_tab_normal.png",
+   "java/res/drawable-mdpi/btn_tabstrip_new_tab_pressed.png",
+   "java/res/drawable-mdpi/btn_tabstrip_switch_normal.png",
+-  "java/res/drawable-mdpi/contextual_search_promo_ripple.9.png",
+   "java/res/drawable-mdpi/cvc_icon.png",
+   "java/res/drawable-mdpi/cvc_icon_amex.png",
+   "java/res/drawable-mdpi/data_reduction_breakdown_sort_arrow.png",
+@@ -218,7 +216,6 @@ chrome_java_resources = [
+   "java/res/drawable-xhdpi/btn_tabstrip_new_tab_normal.png",
+   "java/res/drawable-xhdpi/btn_tabstrip_new_tab_pressed.png",
+   "java/res/drawable-xhdpi/btn_tabstrip_switch_normal.png",
+-  "java/res/drawable-xhdpi/contextual_search_promo_ripple.9.png",
+   "java/res/drawable-xhdpi/cvc_icon.png",
+   "java/res/drawable-xhdpi/cvc_icon_amex.png",
+   "java/res/drawable-xhdpi/data_reduction_breakdown_sort_arrow.png",
+@@ -296,7 +293,6 @@ chrome_java_resources = [
+   "java/res/drawable-xxhdpi/btn_tabstrip_new_tab_normal.png",
+   "java/res/drawable-xxhdpi/btn_tabstrip_new_tab_pressed.png",
+   "java/res/drawable-xxhdpi/btn_tabstrip_switch_normal.png",
+-  "java/res/drawable-xxhdpi/contextual_search_promo_ripple.9.png",
+   "java/res/drawable-xxhdpi/cvc_icon.png",
+   "java/res/drawable-xxhdpi/cvc_icon_amex.png",
+   "java/res/drawable-xxhdpi/data_reduction_breakdown_sort_arrow.png",
+@@ -374,7 +370,6 @@ chrome_java_resources = [
+   "java/res/drawable-xxxhdpi/btn_tabstrip_new_tab_normal.png",
+   "java/res/drawable-xxxhdpi/btn_tabstrip_new_tab_pressed.png",
+   "java/res/drawable-xxxhdpi/btn_tabstrip_switch_normal.png",
+-  "java/res/drawable-xxxhdpi/contextual_search_promo_ripple.9.png",
+   "java/res/drawable-xxxhdpi/cvc_icon.png",
+   "java/res/drawable-xxxhdpi/cvc_icon_amex.png",
+   "java/res/drawable-xxxhdpi/data_reduction_breakdown_sort_arrow.png",
+@@ -453,7 +448,6 @@ chrome_java_resources = [
+   "java/res/drawable/capture_overlay_border.xml",
+   "java/res/drawable/checkerboard_background.xml",
+   "java/res/drawable/computer_black_24dp.xml",
+-  "java/res/drawable/contextual_search_panel_help_background.xml",
+   "java/res/drawable/custom_tabs_handle_view_shape.xml",
+   "java/res/drawable/data_reduction_big.xml",
+   "java/res/drawable/devices_black_24dp.xml",
+@@ -586,17 +580,6 @@ chrome_java_resources = [
+   "java/res/layout/context_menu_header.xml",
+   "java/res/layout/context_menu_row.xml",
+   "java/res/layout/context_menu_share_row.xml",
+-  "java/res/layout/contextual_search_bar_banner_text_view.xml",
+-  "java/res/layout/contextual_search_caption_view.xml",
+-  "java/res/layout/contextual_search_card_icon_view.xml",
+-  "java/res/layout/contextual_search_context_view.xml",
+-  "java/res/layout/contextual_search_panel_help_view.xml",
+-  "java/res/layout/contextual_search_promo_view.xml",
+-  "java/res/layout/contextual_search_promo_view_revised.xml",
+-  "java/res/layout/contextual_search_quick_action_icon_view.xml",
+-  "java/res/layout/contextual_search_related_searches_in_content_view.xml",
+-  "java/res/layout/contextual_search_related_searches_view.xml",
+-  "java/res/layout/contextual_search_term_view.xml",
+   "java/res/layout/custom_preference.xml",
+   "java/res/layout/custom_tabs_bottombar.xml",
+   "java/res/layout/custom_tabs_bottombar_item.xml",
+@@ -762,8 +745,6 @@ chrome_java_resources = [
+   "java/res/xml/autofill_assistant_preferences.xml",
+   "java/res/xml/bookmark_widget_info.xml",
+   "java/res/xml/clear_browsing_data_preferences_tab.xml",
+-  "java/res/xml/contextual_search_preferences.xml",
+-  "java/res/xml/contextual_search_tap_preferences.xml",
+   "java/res/xml/data_reduction_preferences.xml",
+   "java/res/xml/data_reduction_preferences_off_lite_mode.xml",
+   "java/res/xml/developer_preferences.xml",
+diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
+--- a/chrome/android/chrome_java_sources.gni
++++ b/chrome/android/chrome_java_sources.gni
+@@ -291,22 +291,6 @@ chrome_java_sources = [
+   "java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelManager.java",
+   "java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelRepaddingTextView.java",
+   "java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelTextViewInflater.java",
+-  "java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchBarBannerControl.java",
+-  "java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchBarControl.java",
+-  "java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchCaptionControl.java",
+-  "java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchCardIconControl.java",
+-  "java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchContextControl.java",
+-  "java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchImageControl.java",
+-  "java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java",
+-  "java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelCoordinator.java",
+-  "java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelHelp.java",
+-  "java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelInterface.java",
+-  "java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanelMetrics.java",
+-  "java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPromoControl.java",
+-  "java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchQuickActionControl.java",
+-  "java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchSheetContent.java",
+-  "java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchTermControl.java",
+-  "java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/RelatedSearchesControl.java",
+   "java/src/org/chromium/chrome/browser/compositor/bottombar/ephemeraltab/EphemeralTabCoordinator.java",
+   "java/src/org/chromium/chrome/browser/compositor/bottombar/ephemeraltab/EphemeralTabMediator.java",
+   "java/src/org/chromium/chrome/browser/compositor/bottombar/ephemeraltab/EphemeralTabSheetContent.java",
+@@ -348,7 +332,6 @@ chrome_java_sources = [
+   "java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripStacker.java",
+   "java/src/org/chromium/chrome/browser/compositor/overlays/strip/TabLoadTracker.java",
+   "java/src/org/chromium/chrome/browser/compositor/resources/StaticResourcePreloads.java",
+-  "java/src/org/chromium/chrome/browser/compositor/scene_layer/ContextualSearchSceneLayer.java",
+   "java/src/org/chromium/chrome/browser/compositor/scene_layer/StaticTabSceneLayer.java",
+   "java/src/org/chromium/chrome/browser/compositor/scene_layer/TabListSceneLayer.java",
+   "java/src/org/chromium/chrome/browser/compositor/scene_layer/TabStripSceneLayer.java",
+@@ -374,52 +357,6 @@ chrome_java_sources = [
+   "java/src/org/chromium/chrome/browser/contextmenu/ContextMenuUi.java",
+   "java/src/org/chromium/chrome/browser/contextmenu/ContextMenuUtils.java",
+   "java/src/org/chromium/chrome/browser/contextmenu/LensChipDelegate.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/BarOverlapTapSuppression.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchContext.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchEntityHeuristic.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFieldTrial.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchHeuristic.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchHeuristics.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchIPH.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchInteractionPersister.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchInteractionPersisterImpl.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchInteractionRecorder.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchInternalStateController.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchInternalStateHandler.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagementDelegate.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchNetworkCommunicator.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchObserver.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPreferenceFragment.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchRankerLoggerImpl.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchRequest.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionController.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchSelectionHandler.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTabHelper.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTapState.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTranslation.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTranslationImpl.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/CtrSuppression.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/DisableablePromoTapCounter.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/EngagementSuppression.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/NearTopTapSuppression.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/QuickAnswersHeuristic.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/RecentScrollTapSuppression.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/RelatedSearchesList.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/RelatedSearchesStamp.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/RelatedSearchesUma.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ResolvedSearchTerm.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/SecondTapMlOverride.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/SelectionClientManager.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/ShortTextRunSuppression.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/SmallTextSuppression.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/TapDurationSuppression.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/TapFarFromPreviousSuppression.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/TapSuppressionHeuristics.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/TapWordEdgeSuppression.java",
+-  "java/src/org/chromium/chrome/browser/contextualsearch/TapWordLengthSuppression.java",
+   "java/src/org/chromium/chrome/browser/crash/ChromeMinidumpUploadJobServiceImpl.java",
+   "java/src/org/chromium/chrome/browser/crash/ChromeMinidumpUploaderDelegate.java",
+   "java/src/org/chromium/chrome/browser/crash/ChromePureJavaExceptionReporter.java",
+diff --git a/chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/ManualFillingMediator.java b/chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/ManualFillingMediator.java
+--- a/chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/ManualFillingMediator.java
++++ b/chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/ManualFillingMediator.java
+@@ -32,7 +32,6 @@ import org.chromium.base.supplier.ObservableSupplierImpl;
+ import org.chromium.base.supplier.Supplier;
+ import org.chromium.chrome.browser.app.ChromeActivity;
+ import org.chromium.chrome.browser.compositor.CompositorViewHolder;
+-import org.chromium.chrome.browser.contextualsearch.ContextualSearchManager;
+ import org.chromium.chrome.browser.flags.ChromeFeatureList;
+ import org.chromium.chrome.browser.fullscreen.FullscreenManager;
+ import org.chromium.chrome.browser.fullscreen.FullscreenOptions;
+@@ -484,10 +483,6 @@ class ManualFillingMediator extends EmptyTabObserver
+         // When in VR mode, don't extend the keyboard
+         if (VrModuleProvider.getDelegate().isInVr()) return false;
+ 
+-        // Don't open the accessory inside the contextual search panel.
+-        ContextualSearchManager contextualSearch = mActivity.getContextualSearchManager();
+-        if (contextualSearch != null && contextualSearch.isSearchPanelOpened()) return false;
+-
+         // If an accessory sheet was opened, the accessory bar must be visible.
+         if (mAccessorySheet.isShown()) return true;
+ 
+diff --git a/chrome/android/java/res/drawable-hdpi/contextual_search_promo_ripple.9.png b/chrome/android/java/res/drawable-hdpi/contextual_search_promo_ripple.9.png
+deleted file mode 100644
+index 1ee4b452fc45a98175001972d234a2b7d34cb9f2..0000000000000000000000000000000000000000
+GIT binary patch
+literal 0
+HcmV?d00001
+
+literal 411
+zcmV;M0c8G(P)<h;3K|Lk000e1NJLTq000O8002q|1^@s6hMyJe0004ENkl<Zcmajd
+zy=v4^6h-m1@64!$HW9@}1I9u~A+fO$9P$u8&mY96@d>PEw6M}NVj*ZFf|6JS72-#{
+z+a}ZH?sMuNYd43pGlOe@_n-b`|H<*r2msJ&%LrN{1G_znK;q`Z>G<{#04x@5838VU
+z<OfATcb3!P<uMRV?b5w503_Xyz|vj>Kmo+=?)2`$5C|4qY~M{2w0Yl&U`ERTTmZ2F
+z9u&w0Tep_eY7Q_z4@k^4+uI%#HkEcG192^aMh103C<9j$pbD@Rf$+r$5E<CY04RW*
+zfyxO{03ZYNI|KYH0;8fJ3SeiTs$g_dOz<rN!BGTu0VED1==5Sj&IQ@I@aJ^)X$Xve
+zyqd0r3G3r#>0BWBL;R?2Wq^AIstWEW?}xzV%X+&0H5Cp30`Qv(<bqHCjtj;|>*?y}
+zA&~VNAQbvKg5JFv1N-}nx6cnkK`(js_}>s1R)jNy`wu}Rfpyx<7RCSo002ovPDHLk
+FV1gC|uc`n5
+
+diff --git a/chrome/android/java/res/drawable-mdpi/contextual_search_promo_ripple.9.png b/chrome/android/java/res/drawable-mdpi/contextual_search_promo_ripple.9.png
+deleted file mode 100644
+index 719e093c28bc22c3956cb936635ae535b4e98087..0000000000000000000000000000000000000000
+GIT binary patch
+literal 0
+HcmV?d00001
+
+literal 304
+zcmV-00nh%4P)<h;3K|Lk000e1NJLTq000I6001%w1^@s6e<!N*0002@Nkl<ZcwTkX
+zKQF^!0L1a{{i-yvh>$RdL=%&RO-R(6@M;Vlyc_SpLJVvMi-klaNZQH2LAB0e>T}Pn
+zpWKbde@uuEPd;CmN&_IVy5E1_EC8V0Rxbi@kipuEAhEvNe_Kpbbky38z|8MX1}irN
+zTM>{pGQfPVKUhhCnobvR0kqtW4b!YeXka;lYoHp~%79qNVCEtSXE4l0K*|l7Rs@Uh
+z2-q1^ZJ_GZR|LZ_0yR(#41*fHW|-(9Lo>by)J)C%T;85N6%E;soE}XIu($&#0d6wb
+z8Agl(*n{iirRNgF6+i(t=MlzZU4&cu7y=^1Oyv*gkyV!1(<zhy0000<MNUMnLSTZ%
+CeSN6_
+
+diff --git a/chrome/android/java/res/drawable-xhdpi/contextual_search_promo_ripple.9.png b/chrome/android/java/res/drawable-xhdpi/contextual_search_promo_ripple.9.png
+deleted file mode 100644
+index 43e830e8e3b8a2d30601474de77d05b8039583c6..0000000000000000000000000000000000000000
+GIT binary patch
+literal 0
+HcmV?d00001
+
+literal 522
+zcmV+l0`>igP)<h;3K|Lk000e1NJLTq000UA003eL1^@s6X_Z2X00001b5ch_0Itp)
+z=>Px$#7RU!RCr#k*Rg7oaTta1=Y07vOC3rKE-FZLX%)0ODb=)_7vN=xn~M%Xba8d_
+z62yBDgenp2u0{tHF|965wGC-<T)zE(hQ9NU^UN>JnZi|oH=pja@nrI<1e@bFpdyrX
+zsy~>lCW}zhkDv%4;ufG_QQeKlla(R_u;@onVm*S0YZ*knn-6wRmeZhmseL6_1gTmJ
+zAy-4_4BA?`aPM<FN!MpicQ2P<gIjA61TJOJ>SYjTQ0P2^K~;o^6Pxw@vq2hg-OC_u
+zATGcvT&x^ID}?g7ba9!xFI&MP)s59VoiYU472OD0A*@npjyo+v2>If21Z~<8L<(WL
+zD4eEA)5@TaJ*_ki)M<K_L3<iOiwuHN=)(*;Oe;>y8FZf3L6~0r$<nZ!rOi$R7fu(`
+zwB;;a+1cXX`8<Nt;h?jZz%f7(+Ws0r(3c2`#VCRctAVHhkFxZ9|0qb?J6q4XlQI-d
+zwg7F7GAMt{AdBq?9@2{7&*8(RaT%IstpJTPNDAl7%Fy=jH;+2sgGFtJkB{F*urjZU
+z&~Wf={A*Z**zZQqFHVb4G}&T$;Q*R{dp|zCFGG3j!;9-P3g;5|4-Go2?Ilftga7~l
+M07*qoM6N<$g7Y)yrvLx|
+
+diff --git a/chrome/android/java/res/drawable-xxhdpi/contextual_search_promo_ripple.9.png b/chrome/android/java/res/drawable-xxhdpi/contextual_search_promo_ripple.9.png
+deleted file mode 100644
+index 83dcfafb0da753bf1369fbd1ff34640462d6b2c9..0000000000000000000000000000000000000000
+GIT binary patch
+literal 0
+HcmV?d00001
+
+literal 665
+zcmV;K0%rY*P)<h;3K|Lk000e1NJLTq000gE005E*1^@s6b?p1;00001b5ch_0Itp)
+z=>Px%Q%OWYRCr#!+P`m4VHC&lOJWcPR#pQE76}@(_qkyZCVv1SG$An%5}T{fa~f=f
+zNhgD!@nbQO2nHGwlNxH$LA8~-_Z*$d6$zgCzK8Qop7E7)+O+qc=X}1!-%nS7PgjZk
+zKSAu*&U4>a_ktNW`xuNi%3#tL42msm8Gg5{56pO^*@j>h^(2EyZ$N0{42oG%*GmcP
+z%DP#HV2FAE!76IaDvCa!aFVr}?C0h)(<^$we0HT~D}tr8M-dF7R~bzD9KkB-HwMMJ
+zfi$-k!J!Mb2f-jZ%wV)p1S`?otYXsFwBj^`)(xDRT8`jg)C~v@NwXKhkn{wD(Jmuc
+ziQb2;+FM$24nph7dS>N6(+duc*d_$a*zQL#NPC3BvkWG?MBx~O`k2C342piFa0bCj
+zY_TYcB?NYVX4#%Fk1!0TW_wSVr)OBPJ;W*|I}M=<h1VgpF$!-oD0&ycO7szJ^$BhD
+z8Ey3?gUQC}&-flz)CpKoKQSmaMO*z!Tb-w^F0fX`7M)?TA6~zlJiEe*_L)J^N!scM
+z-+!wh_Qv<o5t2UjeLPl4AJSIuc)fJ;o`?R)UBj<(=ixz`gI)tt-q$$~f%W_<r$INr
+za0&t^ysi&<IP$$BRnac`UIVMx9`?QJmbGpK5MJj)(pl$~MbdlDYniCWeOFIq-LCgr
+zuZ3h^@CuQ_Th43J*d9Z$jJ6xW9rf%QwC=_Wb_%cH5CO*)I4D8UjBglJik`=T7mnCG
+zLcM%Va0o6zR0_gb5C`)Bnn&I|WaqIy{vyF|YtxJRN!DAm00000NkvXXu0mjfr{^yO
+
+diff --git a/chrome/android/java/res/drawable-xxxhdpi/contextual_search_promo_ripple.9.png b/chrome/android/java/res/drawable-xxxhdpi/contextual_search_promo_ripple.9.png
+deleted file mode 100644
+index dd0a7352279a4e0fc332f375e3db6b3bd7784f43..0000000000000000000000000000000000000000
+GIT binary patch
+literal 0
+HcmV?d00001
+
+literal 983
+zcmV;|11S87P)<h;3K|Lk000e1NJLTq000sI006=W1^@s6MDUV$000A?Nkl<ZcwXJw
+z&2Cjy9ES1dU7J&iJy?p0)evC7M+^ZI3KF3M6!Z@C5}Y}3;>Q4UCf<aXpf_LyO#_Aj
+zhzeMvDG4Z=DnwcVTamN(>+mGRiL7_fxQ1)+%k%%A>^;~y005@)2=L1v+yelh>v(1E
+zWdHPkh04ENoB*hXERIJY!GYO#m#3;BMCna5FV#Z;g%c4-a6AHmb{`$wdNu&TSQ(#<
+zKs00^Ss4hi|LEJdHr7MXj7^RmNkG_THUbGU5Ypk9H@@s8iZ(pHb=QGv2!K)!M<B_E
+zB9N^NgtU9+o!gVukU*3D-b^(F&=ntwK(a!RLJ+X+$l&gl1jPELI~ai|dOibL`!W#h
+z4?)_q^Ua0z)sV!xt<z6F7bpTz_D3MQ*%vAzQ$z}qn112CJ5MBv=ufaG0^t-y2|@Di
+z5ER>ycJkUsO`>RQcJHg(>mi`&X-@=_n-GL|MIcaSN8lX~Upyj2rbtqM^cJXq046qc
+zJ0cKjwuc~vig2okP?5DQ1Hp6z5^Nd0m+E#@j_p16RAMx`(t9QXsVUPDsGv*{CR3zX
+zkwQhl(-FvKbErruh^Yu9G5+FPH#Q`SD3jw;5va%b<_P5COi?L>ibSRemra?`a6bas
+zdMpAVPedR=rpS;fB2~m1EK;UOI8$V)m)g;~3}l+rj+!+#nn)EXQ)Kgh-I0t_qYWdF
+zMH?z|rU=untsN=0BP&zHTKv`SM<Am=Q=_d!Af<|&D#D>6iZhT>qd7Jj&Ok<YLPacP
+zidx-{Kt;n0)QV71>&TAUxxv&Q0m#dM>mhSH^(A5{1aUJ0881d4%&!qhkSXd?qsbxY
+zLDy!WB^DFQ_V4q9y?<9jhQ-u}@t-4*@bw7PDFmt2wFopUU8blVmU_srdTy}sW;G=H
+z`omX`1c63S)o5}CqSHbKqWvKP2}hv&pI`p8en+;i^6~3!HG~+ARRwhlL8bjZ1GS;i
+z+;#Pk&5gOi)N(Z>xCBsNgfB-Rx>QjYC^D?h&402`4PoX-&sYrvmjMEhFGV21H}#O|
+zy5Z_q)sW@y<_25t1&VYYpuWh?Ky7I+R6{m@t^9cPN;M?;>x&;Ae2^IJJU}(nSr<ak
+z@LWA)emQe;)3tg?J{$U1JsGI&R1X<1oq50iZ8aq83&8b7>dpexLv{c%D|dfdxL6Gt
+z&Ws+^y3tMnR71ldrvs3GJ3HuKsfG-n0S-VuMa40d=O4`eO{wixoDBc~002ovPDHLk
+FV1jgEwAlav
+
+diff --git a/chrome/android/java/res/drawable/contextual_search_panel_help_background.xml b/chrome/android/java/res/drawable/contextual_search_panel_help_background.xml
+deleted file mode 100644
+--- a/chrome/android/java/res/drawable/contextual_search_panel_help_background.xml
++++ /dev/null
+@@ -1,17 +0,0 @@
+-<?xml version="1.0" encoding="utf-8"?>
+-<!-- Copyright 2021 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. -->
+-
+-<!-- This background insets another background by a fixed amount.
+-     The inset amount comes from the UX design and is crafted to match
+-     the inset of the rounded frame of individual search results displayed
+-     in the search results page. No bottom inset is needed because the
+-     next thing shown (usually the content) has its own inset. -->
+-
+-<inset xmlns:android="http://schemas.android.com/apk/res/android"
+-    android:drawable="@drawable/hairline_border_card_background"
+-    android:insetTop="6dp"
+-    android:insetLeft="6dp"
+-    android:insetRight="6dp"/>
+-
+diff --git a/chrome/android/java/res/layout/contextual_search_bar_banner_text_view.xml b/chrome/android/java/res/layout/contextual_search_bar_banner_text_view.xml
+deleted file mode 100644
+--- a/chrome/android/java/res/layout/contextual_search_bar_banner_text_view.xml
++++ /dev/null
+@@ -1,24 +0,0 @@
+-<?xml version="1.0" encoding="utf-8"?>
+-<!--
+-   Copyright 2017 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.
+--->
+-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+-              android:id="@+id/contextual_search_bar_banner_text_view"
+-              android:layout_width="match_parent"
+-              android:layout_height="wrap_content"
+-              android:orientation="horizontal"
+-              android:paddingStart="@dimen/contextual_search_bar_banner_padding"
+-              android:paddingEnd="@dimen/contextual_search_bar_banner_padding"
+-              android:visibility="invisible">
+-
+-    <TextView
+-        android:id="@+id/contextual_search_iph_tap_text"
+-        android:layout_width="wrap_content"
+-        android:layout_height="wrap_content"
+-        android:textAppearance="@style/TextAppearance.TextMedium.Primary.Baseline.Light"
+-        android:text="@string/contextual_search_iph_tap"
+-        />
+-</LinearLayout>
+diff --git a/chrome/android/java/res/layout/contextual_search_caption_view.xml b/chrome/android/java/res/layout/contextual_search_caption_view.xml
+deleted file mode 100644
+--- a/chrome/android/java/res/layout/contextual_search_caption_view.xml
++++ /dev/null
+@@ -1,14 +0,0 @@
+-<?xml version="1.0" encoding="utf-8"?>
+-<!-- Copyright 2016 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. -->
+-
+-<!-- Contextual Search caption view. -->
+-<FrameLayout
+-    xmlns:android="http://schemas.android.com/apk/res/android"
+-    android:id="@+id/contextual_search_caption_view"
+-    style="@style/ContextualSearchTextViewLayout" >
+-    <TextView
+-        android:id="@+id/contextual_search_caption"
+-        style="@style/ContextualSearchCaptionTextView" />
+-</FrameLayout>
+\ No newline at end of file
+diff --git a/chrome/android/java/res/layout/contextual_search_card_icon_view.xml b/chrome/android/java/res/layout/contextual_search_card_icon_view.xml
+deleted file mode 100644
+--- a/chrome/android/java/res/layout/contextual_search_card_icon_view.xml
++++ /dev/null
+@@ -1,12 +0,0 @@
+-<?xml version="1.0" encoding="utf-8"?>
+-<!-- 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. -->
+-
+-<!-- Contextual Search image view to display a Contextual Card icon. -->
+-<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
+-    android:id="@+id/contextual_search_card_icon_view"
+-    android:layout_width="@dimen/contextual_search_bar_image_size"
+-    android:layout_height="@dimen/contextual_search_bar_image_size"
+-    android:importantForAccessibility="no"
+-    android:scaleType="center"/>
+diff --git a/chrome/android/java/res/layout/contextual_search_context_view.xml b/chrome/android/java/res/layout/contextual_search_context_view.xml
+deleted file mode 100644
+--- a/chrome/android/java/res/layout/contextual_search_context_view.xml
++++ /dev/null
+@@ -1,25 +0,0 @@
+-<?xml version="1.0" encoding="utf-8"?>
+-<!-- Copyright 2015 The Chromium Authors. All rights reserved.
+-     Use of this source code is governed by a BSD-style license that can be
+-     found in the LICENSE file. -->
+-
+-<!-- Contextual Search search context view. -->
+-<LinearLayout
+-    xmlns:android="http://schemas.android.com/apk/res/android"
+-    android:id="@+id/contextual_search_context_view"
+-    style="@style/ContextualSearchTextViewLayout"
+-    android:gravity="center" >
+-    <!-- Search Bar Text -->
+-    <TextView
+-        android:id="@+id/selected_text"
+-        style="@style/ContextualSearchTextView"
+-        android:layout_width="wrap_content"
+-        android:layout_marginStart="7dp"
+-        android:layout_marginEnd="5dp"
+-        android:gravity="center_horizontal" />
+-    <TextView
+-        android:id="@+id/surrounding_text_end"
+-        style="@style/ContextualSearchContextTextView"
+-        android:layout_marginEnd="7dp"
+-        android:gravity="start" />
+-</LinearLayout>
+diff --git a/chrome/android/java/res/layout/contextual_search_panel_help_view.xml b/chrome/android/java/res/layout/contextual_search_panel_help_view.xml
+deleted file mode 100644
+--- a/chrome/android/java/res/layout/contextual_search_panel_help_view.xml
++++ /dev/null
+@@ -1,58 +0,0 @@
+-<?xml version="1.0" encoding="utf-8"?>
+-<!-- Copyright 2021 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. -->
+-
+-<LinearLayout
+-    xmlns:android="http://schemas.android.com/apk/res/android"
+-    xmlns:app="http://schemas.android.com/apk/res-auto"
+-    android:id="@+id/contextual_search_panel_help"
+-    android:layout_width="match_parent"
+-    android:layout_height="wrap_content"
+-    android:orientation="horizontal"
+-    android:visibility="invisible"
+-    android:background="@drawable/contextual_search_panel_help_background">
+-
+-    <ImageView
+-        android:layout_width="24dp"
+-        android:layout_height="24dp"
+-        android:layout_marginTop="12dp"
+-        android:layout_marginStart="12dp"
+-        android:layout_marginEnd="12dp"
+-        app:srcCompat="@drawable/ic_touch_app_blue"
+-        android:importantForAccessibility="no" />
+-
+-    <LinearLayout
+-        android:layout_width="match_parent"
+-        android:layout_height="wrap_content"
+-        android:orientation="vertical">
+-
+-        <org.chromium.ui.widget.TextViewWithLeading
+-            android:id="@+id/contextual_search_help_header_view"
+-            android:text="@string/contextual_search_help_header"
+-            android:layout_width="match_parent"
+-            android:layout_height="wrap_content"
+-            android:layout_marginTop="12dp"
+-            style="@style/TextAppearance.TextLarge.Primary"
+-            app:leading="@dimen/headline_size_leading" />
+-        <org.chromium.ui.widget.TextViewWithLeading
+-            android:id="@+id/contextual_search_help_body_view"
+-            android:text="@string/contextual_search_help_body"
+-            android:layout_width="match_parent"
+-            android:layout_height="wrap_content"
+-            android:layout_marginTop="12dp"
+-            android:layout_marginBottom="12dp"
+-            android:layout_marginEnd="12dp"
+-            android:textAppearance="@style/TextAppearance.TextSmall.Secondary"
+-            app:leading="@dimen/text_size_small_leading" />
+-        <org.chromium.ui.widget.ButtonCompat
+-            android:id="@+id/contextual_search_ok_button"
+-            android:layout_width="wrap_content"
+-            android:layout_height="wrap_content"
+-            android:layout_gravity="end"
+-            android:layout_marginEnd="18dp"
+-            android:layout_marginBottom="12dp"
+-            android:text="@string/ok"
+-            style="@style/FilledButton.Flat" />
+-    </LinearLayout>
+-</LinearLayout>
+diff --git a/chrome/android/java/res/layout/contextual_search_promo_view.xml b/chrome/android/java/res/layout/contextual_search_promo_view.xml
+deleted file mode 100644
+--- a/chrome/android/java/res/layout/contextual_search_promo_view.xml
++++ /dev/null
+@@ -1,66 +0,0 @@
+-<?xml version="1.0" encoding="utf-8"?>
+-<!-- Copyright 2016 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. -->
+-<FrameLayout
+-    xmlns:android="http://schemas.android.com/apk/res/android"
+-    android:id="@+id/contextual_search_promo"
+-    android:layout_width="match_parent"
+-    android:layout_height="wrap_content"
+-    android:paddingTop="8dp"
+-    android:paddingBottom="16dp"
+-    android:paddingStart="16dp"
+-    android:paddingEnd="16dp"
+-    android:visibility="invisible">
+-
+-    <org.chromium.components.browser_ui.widget.MaterialCardViewNoShadow
+-        android:layout_width="match_parent"
+-        android:layout_height="wrap_content"
+-        style="@style/MaterialCardStyle">
+-
+-        <RelativeLayout
+-            android:layout_width="match_parent"
+-            android:layout_height="wrap_content"
+-            android:orientation="vertical">
+-
+-            <org.chromium.ui.widget.TextViewWithClickableSpans
+-                android:id="@+id/contextual_search_promo_text"
+-                android:layout_alignParentTop="true"
+-                android:layout_alignParentStart="true"
+-                android:layout_alignParentEnd="true"
+-                android:layout_width="match_parent"
+-                android:layout_height="wrap_content"
+-                android:layout_marginTop="16dp"
+-                android:layout_marginStart="16dp"
+-                android:layout_marginEnd="16dp"
+-                android:bufferType="spannable"
+-                android:textAppearance="@style/TextAppearance.TextLarge.Primary" />
+-
+-            <org.chromium.ui.widget.ButtonCompat
+-                android:id="@+id/contextual_search_allow_button"
+-                android:layout_below="@id/contextual_search_promo_text"
+-                android:layout_alignParentEnd="true"
+-                android:layout_width="wrap_content"
+-                android:layout_height="wrap_content"
+-                android:layout_gravity="end"
+-                android:layout_marginTop="16dp"
+-                android:layout_marginBottom="16dp"
+-                android:layout_marginEnd="16dp"
+-                android:text="@string/contextual_search_allow_button"
+-                style="@style/FilledButton.Flat" />
+-
+-            <org.chromium.ui.widget.ButtonCompat
+-                android:id="@+id/contextual_search_no_thanks_button"
+-                android:layout_below="@id/contextual_search_promo_text"
+-                android:layout_toStartOf="@id/contextual_search_allow_button"
+-                android:layout_width="wrap_content"
+-                android:layout_height="wrap_content"
+-                android:layout_gravity="end"
+-                android:layout_marginTop="16dp"
+-                android:layout_marginBottom="16dp"
+-                android:layout_marginEnd="16dp"
+-                android:text="@string/contextual_search_no_thanks_button"
+-                style="@style/TextButton" />
+-        </RelativeLayout>
+-    </org.chromium.components.browser_ui.widget.MaterialCardViewNoShadow>
+-</FrameLayout>
+\ No newline at end of file
+diff --git a/chrome/android/java/res/layout/contextual_search_promo_view_revised.xml b/chrome/android/java/res/layout/contextual_search_promo_view_revised.xml
+deleted file mode 100644
+--- a/chrome/android/java/res/layout/contextual_search_promo_view_revised.xml
++++ /dev/null
+@@ -1,86 +0,0 @@
+-<?xml version="1.0" encoding="utf-8"?>
+-<!-- Copyright 2021 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. -->
+-<FrameLayout
+-    xmlns:android="http://schemas.android.com/apk/res/android"
+-    xmlns:app="http://schemas.android.com/apk/res-auto"
+-    android:id="@+id/contextual_search_promo"
+-    android:layout_width="match_parent"
+-    android:layout_height="wrap_content"
+-    android:paddingTop="8dp"
+-    android:paddingBottom="16dp"
+-    android:paddingStart="16dp"
+-    android:paddingEnd="16dp"
+-    android:visibility="invisible">
+-
+-    <org.chromium.components.browser_ui.widget.MaterialCardViewNoShadow
+-        android:layout_width="match_parent"
+-        android:layout_height="wrap_content"
+-        style="@style/MaterialCardStyle">
+-
+-        <RelativeLayout
+-            android:layout_width="match_parent"
+-            android:layout_height="wrap_content">
+-
+-            <org.chromium.components.browser_ui.widget.text.TextViewWithCompoundDrawables
+-                android:id="@+id/contextual_search_promo_title"
+-                android:layout_alignParentTop="true"
+-                android:layout_alignParentStart="true"
+-                android:layout_alignParentEnd="true"
+-                android:layout_width="match_parent"
+-                android:layout_height="wrap_content"
+-                android:layout_marginTop="16dp"
+-                android:layout_marginStart="16dp"
+-                android:layout_marginEnd="16dp"
+-                android:bufferType="spannable"
+-                android:drawableStart="@drawable/btn_info"
+-                app:drawableWidth="24dp"
+-                app:drawableHeight="24dp"
+-                app:chromeDrawableTint="@macro/default_icon_color_accent1"
+-                android:tintMode="src_in"
+-                android:drawablePadding="8dp"
+-                android:text="@string/contextual_search_promo_title"
+-                android:textAppearance="@style/TextAppearance.TextLarge.Primary" />
+-
+-            <org.chromium.ui.widget.TextViewWithClickableSpans
+-                android:id="@+id/contextual_search_promo_text"
+-                android:layout_below="@id/contextual_search_promo_title"
+-                android:layout_alignParentStart="true"
+-                android:layout_alignParentEnd="true"
+-                android:layout_width="match_parent"
+-                android:layout_height="wrap_content"
+-                android:layout_marginTop="8dp"
+-                android:layout_marginStart="48dp"
+-                android:layout_marginEnd="16dp"
+-                android:bufferType="spannable"
+-                android:textAppearance="@style/TextAppearance.TextSmall.Secondary" />
+-
+-            <org.chromium.ui.widget.ButtonCompat
+-                android:id="@+id/contextual_search_allow_button"
+-                android:layout_below="@id/contextual_search_promo_text"
+-                android:layout_alignParentEnd="true"
+-                android:layout_width="wrap_content"
+-                android:layout_height="wrap_content"
+-                android:layout_gravity="end"
+-                android:layout_marginTop="16dp"
+-                android:layout_marginBottom="16dp"
+-                android:layout_marginEnd="16dp"
+-                android:text="@string/contextual_search_include_button"
+-                style="@style/FilledButton.Flat" />
+-
+-            <org.chromium.ui.widget.ButtonCompat
+-                android:id="@+id/contextual_search_no_thanks_button"
+-                android:layout_below="@id/contextual_search_promo_text"
+-                android:layout_toStartOf="@id/contextual_search_allow_button"
+-                android:layout_width="wrap_content"
+-                android:layout_height="wrap_content"
+-                android:layout_gravity="end"
+-                android:layout_marginTop="16dp"
+-                android:layout_marginBottom="16dp"
+-                android:layout_marginEnd="16dp"
+-                android:text="@string/contextual_search_no_thanks_button"
+-                style="@style/TextButton" />
+-        </RelativeLayout>
+-    </org.chromium.components.browser_ui.widget.MaterialCardViewNoShadow>
+-</FrameLayout>
+\ No newline at end of file
+diff --git a/chrome/android/java/res/layout/contextual_search_quick_action_icon_view.xml b/chrome/android/java/res/layout/contextual_search_quick_action_icon_view.xml
+deleted file mode 100644
+--- a/chrome/android/java/res/layout/contextual_search_quick_action_icon_view.xml
++++ /dev/null
+@@ -1,12 +0,0 @@
+-<?xml version="1.0" encoding="utf-8"?>
+-<!-- Copyright 2016 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. -->
+-
+-<!-- Contextual Search image view. -->
+-<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
+-    android:id="@+id/contextual_search_quick_action_icon_view"
+-    android:layout_width="@dimen/contextual_search_bar_image_size"
+-    android:layout_height="@dimen/contextual_search_bar_image_size"
+-    android:importantForAccessibility="no"
+-    android:scaleType="center"/>
+\ No newline at end of file
+diff --git a/chrome/android/java/res/layout/contextual_search_related_searches_in_content_view.xml b/chrome/android/java/res/layout/contextual_search_related_searches_in_content_view.xml
+deleted file mode 100644
+--- a/chrome/android/java/res/layout/contextual_search_related_searches_in_content_view.xml
++++ /dev/null
+@@ -1,16 +0,0 @@
+-<?xml version="1.0" encoding="utf-8"?>
+-<!-- Copyright 2021 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. -->
+-
+-<!-- Displays Related Searches suggestions in a section of the Contextual
+-     Search bottom sheet. -->
+-<FrameLayout
+-    xmlns:android="http://schemas.android.com/apk/res/android"
+-    android:id="@+id/contextual_search_related_searches_in_content_view_id"
+-    android:layout_width="match_parent"
+-    android:layout_height="wrap_content"
+-    android:background="@macro/overlay_panel_bar_background_color"
+-    android:visibility="invisible">
+-    <!-- ChipView elements and their container are dynamically added here. -->
+-</FrameLayout>
+diff --git a/chrome/android/java/res/layout/contextual_search_related_searches_view.xml b/chrome/android/java/res/layout/contextual_search_related_searches_view.xml
+deleted file mode 100644
+--- a/chrome/android/java/res/layout/contextual_search_related_searches_view.xml
++++ /dev/null
+@@ -1,15 +0,0 @@
+-<?xml version="1.0" encoding="utf-8"?>
+-<!-- Copyright 2021 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. -->
+-
+-<!-- Displays Related Searches suggestions in the Bar of the Overlay Panel. -->
+-<FrameLayout
+-    xmlns:android="http://schemas.android.com/apk/res/android"
+-    android:id="@+id/contextual_search_related_searches_view_id"
+-    android:layout_width="wrap_content"
+-    android:layout_height="wrap_content"
+-    android:background="@macro/overlay_panel_bar_background_color"
+-    android:visibility="invisible">
+-    <!-- ChipView elements and their container are dynamically added here. -->
+-</FrameLayout>
+diff --git a/chrome/android/java/res/layout/contextual_search_term_view.xml b/chrome/android/java/res/layout/contextual_search_term_view.xml
+deleted file mode 100644
+--- a/chrome/android/java/res/layout/contextual_search_term_view.xml
++++ /dev/null
+@@ -1,19 +0,0 @@
+-<?xml version="1.0" encoding="utf-8"?>
+-<!-- Copyright 2015 The Chromium Authors. All rights reserved.
+-     Use of this source code is governed by a BSD-style license that can be
+-     found in the LICENSE file. -->
+-
+-<!-- Contextual Search search term view. -->
+-<FrameLayout
+-    xmlns:android="http://schemas.android.com/apk/res/android"
+-    android:id="@+id/contextual_search_term_view"
+-    style="@style/ContextualSearchTextViewLayout" >
+-    <TextView
+-        android:id="@+id/contextual_search_term"
+-        style="@style/ContextualSearchTextView"
+-        android:layout_width="match_parent"
+-        android:layout_gravity="bottom"
+-        android:background="@macro/overlay_panel_bar_background_color"
+-        android:layout_marginStart="7dp"
+-        android:layout_marginEnd="7dp" />
+-</FrameLayout>
+diff --git a/chrome/android/java/res/xml/contextual_search_preferences.xml b/chrome/android/java/res/xml/contextual_search_preferences.xml
+deleted file mode 100644
+--- a/chrome/android/java/res/xml/contextual_search_preferences.xml
++++ /dev/null
+@@ -1,25 +0,0 @@
+-<?xml version="1.0" encoding="utf-8"?>
+-<!-- Copyright 2015 The Chromium Authors. All rights reserved.
+-     Use of this source code is governed by a BSD-style license that can be
+-     found in the LICENSE file. -->
+-
+-<PreferenceScreen
+-    xmlns:android="http://schemas.android.com/apk/res/android"
+-    xmlns:app="http://schemas.android.com/apk/res-auto">
+-
+-    <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
+-        android:key="contextual_search_switch"
+-        android:summaryOn="@string/text_on"
+-        android:summaryOff="@string/text_off" />
+-
+-    <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
+-        android:key="see_better_results_switch"
+-        android:title="@string/contextual_search_see_better_results_title"
+-        android:summary="@string/contextual_search_see_better_results_summary" />
+-
+-    <org.chromium.components.browser_ui.settings.TextMessagePreference
+-        android:key="contextual_search_description"
+-        android:title="@string/contextual_search_description"
+-        app:allowDividerBelow="false" />
+-
+-</PreferenceScreen>
+diff --git a/chrome/android/java/res/xml/contextual_search_tap_preferences.xml b/chrome/android/java/res/xml/contextual_search_tap_preferences.xml
+deleted file mode 100644
+--- a/chrome/android/java/res/xml/contextual_search_tap_preferences.xml
++++ /dev/null
+@@ -1,26 +0,0 @@
+-<?xml version="1.0" encoding="utf-8"?>
+-<!-- Copyright 2020 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. -->
+-
+-<PreferenceScreen
+-    xmlns:android="http://schemas.android.com/apk/res/android"
+-    xmlns:app="http://schemas.android.com/apk/res-auto">
+-
+-    <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
+-        android:key="contextual_search_switch"
+-        android:summaryOn="@string/text_on"
+-        android:summaryOff="@string/text_off" />
+-
+-    <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
+-        android:key="see_better_results_switch"
+-        android:title="@string/contextual_search_see_better_results_title"
+-        android:summary="@string/contextual_search_see_better_results_summary" />
+-
+-    <org.chromium.components.browser_ui.settings.TextMessagePreference
+-        android:key="contextual_search_description"
+-        android:title="@string/contextual_search_tap_description"
+-        app:allowDividerBelow="false" />
+-
+-</PreferenceScreen>
+-
+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
++++ b/chrome/android/java/res/xml/google_services_preferences.xml
+@@ -35,8 +35,4 @@
+         android:summary="@string/prefs_autofill_assistant_summary"
+         android:fragment="org.chromium.chrome.browser.autofill_assistant.AutofillAssistantPreferenceFragment"
+         app:isPreferenceVisible="false"/>
+-    <org.chromium.components.browser_ui.settings.ChromeBasePreference
+-        android:key="contextual_search"
+-        android:title="@string/contextual_search_title"
+-        android:fragment="org.chromium.chrome.browser.contextualsearch.ContextualSearchPreferenceFragment"/>
+ </PreferenceScreen>
+diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
+--- a/chrome/android/java/res/xml/privacy_preferences.xml
++++ b/chrome/android/java/res/xml/privacy_preferences.xml
+@@ -77,10 +77,6 @@
+           android:title="@string/prefs_autofill_assistant_title"
+           android:summary="@string/prefs_autofill_assistant_summary"
+           android:persistent="false"/>
+-      <org.chromium.components.browser_ui.settings.ChromeBasePreference
+-          android:key="contextual_search"
+-          android:title="@string/contextual_search_title"
+-          android:fragment="org.chromium.chrome.browser.contextualsearch.ContextualSearchPreferenceFragment"/>
+     </PreferenceCategory>
+     <Preference
+         android:key="phone_as_a_security_key"
+diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
++++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+@@ -1614,7 +1614,7 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
+     protected RootUiCoordinator createRootUiCoordinator() {
+         return new TabbedRootUiCoordinator(this, this::onOmniboxFocusChanged,
+                 getShareDelegateSupplier(), getActivityTabProvider(), mTabModelProfileSupplier,
+-                mBookmarkBridgeSupplier, this::getContextualSearchManager,
++                mBookmarkBridgeSupplier, null,
+                 getTabModelSelectorSupplier(), mStartSurfaceSupplier,
+                 mIntentMetadataOneshotSupplier, mLayoutStateProviderOneshotSupplier,
+                 mStartSurfaceParentTabSupplier, getBrowserControlsManager(), getWindowAndroid(),
+@@ -2634,7 +2634,7 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
+         // TODO(crbug.com/1157310): Transition this::method refs to dedicated suppliers.
+         mTabModalHandler = new TabModalLifetimeHandler(this, getLifecycleDispatcher(), manager,
+                 this::getAppBrowserControlsVisibilityDelegate, this::getTabObscuringHandler,
+-                this::getToolbarManager, this::getContextualSearchManager,
++                this::getToolbarManager, null,
+                 getTabModelSelectorSupplier(), this::getBrowserControlsManager,
+                 this::getFullscreenManager);
+         return manager;
+diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
+--- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
++++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
+@@ -98,9 +98,6 @@ import org.chromium.chrome.browser.compositor.layouts.SceneChangeObserver;
+ import org.chromium.chrome.browser.compositor.layouts.content.ContentOffsetProvider;
+ import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager;
+ import org.chromium.chrome.browser.compositor.layouts.content.TabContentManagerHandler;
+-import org.chromium.chrome.browser.contextualsearch.ContextualSearchFieldTrial;
+-import org.chromium.chrome.browser.contextualsearch.ContextualSearchManager;
+-import org.chromium.chrome.browser.contextualsearch.ContextualSearchManager.ContextualSearchTabPromotionDelegate;
+ import org.chromium.chrome.browser.dependency_injection.ChromeActivityCommonsModule;
+ import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor;
+ import org.chromium.chrome.browser.dependency_injection.ChromeActivityComponent;
+@@ -260,7 +257,7 @@ import java.util.function.Consumer;
+  */
+ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+         extends AsyncInitializationActivity
+-        implements TabCreatorManager, PolicyChangeListener, ContextualSearchTabPromotionDelegate,
++        implements TabCreatorManager, PolicyChangeListener,
+                    SnackbarManageable, SceneChangeObserver,
+                    StatusBarColorController.StatusBarColorProvider, AppMenuDelegate, AppMenuBlocker,
+                    MenuOrKeyboardActionController, CompositorViewHolder.Initializer,
+@@ -322,7 +319,6 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+     private ObservableSupplierImpl<LayoutManagerImpl> mLayoutManagerSupplier =
+             new ObservableSupplierImpl<>();
+     private InsetObserverView mInsetObserverView;
+-    private ContextualSearchManager mContextualSearchManager;
+     private SnackbarManager mSnackbarManager;
+ 
+     // Timestamp in ms when initial layout inflation begins
+@@ -506,7 +502,7 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+         // clang-format off
+         return new RootUiCoordinator(this, null, getShareDelegateSupplier(),
+                 getActivityTabProvider(), mTabModelProfileSupplier, mBookmarkBridgeSupplier,
+-                this::getContextualSearchManager, getTabModelSelectorSupplier(),
++                null, getTabModelSelectorSupplier(),
+                 new OneshotSupplierImpl<>(), new OneshotSupplierImpl<>(),
+                 new OneshotSupplierImpl<>(),
+                 () -> null, mBrowserControlsManagerSupplier.get(), getWindowAndroid(),
+@@ -974,14 +970,6 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+         mCompositorViewHolderSupplier.get().onNativeLibraryReady(
+                 getWindowAndroid(), getTabContentManager());
+ 
+-        // TODO(1107916): Move contextual search initialization to the RootUiCoordinator.
+-        if (ContextualSearchFieldTrial.isEnabled()) {
+-            mContextualSearchManager = new ContextualSearchManager(this, this,
+-                    mRootUiCoordinator.getScrimCoordinator(), getActivityTabProvider(),
+-                    getFullscreenManager(), getBrowserControlsManager(), getWindowAndroid(),
+-                    getTabModelSelectorSupplier().get(), () -> getLastUserInteractionTime());
+-        }
+-
+         TraceEvent.end("ChromeActivity:CompositorInitialization");
+     }
+ 
+@@ -1458,11 +1446,6 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+     @SuppressLint("NewApi")
+     @Override
+     protected final void onDestroy() {
+-        if (mContextualSearchManager != null) {
+-            mContextualSearchManager.destroy();
+-            mContextualSearchManager = null;
+-        }
+-
+         if (mSnackbarManager != null) {
+             SnackbarManagerProvider.detach(mSnackbarManager);
+         }
+@@ -2099,13 +2082,6 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+         return mCompositorViewHolderSupplier.get();
+     }
+ 
+-    /**
+-     * @return The {@code ContextualSearchManager} or {@code null} if none;
+-     */
+-    public ContextualSearchManager getContextualSearchManager() {
+-        return mContextualSearchManager;
+-    }
+-
+     /**
+      * Exits the fullscreen mode, if any. Does nothing if no fullscreen is present.
+      * @return Whether the fullscreen mode is currently showing.
+@@ -2148,15 +2124,6 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+         }
+ 
+         mActivityTabProvider.setLayoutStateProvider(layoutManager);
+-
+-        if (mContextualSearchManager != null) {
+-            mContextualSearchManager.initialize(contentContainer, layoutManager,
+-                    mRootUiCoordinator.getBottomSheetController(), compositorViewHolder,
+-                    getControlContainerHeightResource() == ActivityUtils.NO_RESOURCE_ID
+-                            ? 0f
+-                            : getResources().getDimension(getControlContainerHeightResource()),
+-                    getToolbarManager(), getActivityType(), getIntentRequestTracker());
+-        }
+     }
+ 
+     /**
+@@ -2341,18 +2308,6 @@ public abstract class ChromeActivity<C extends ChromeActivityComponent>
+         return webContents != null ? SelectionPopupController.fromWebContents(webContents) : null;
+     }
+ 
+-    @Override
+-    public void createContextualSearchTab(String searchUrl) {
+-        Tab currentTab = getActivityTab();
+-        if (currentTab == null) return;
+-
+-        TabCreator tabCreator = getTabCreator(currentTab.isIncognito());
+-        if (tabCreator == null) return;
+-
+-        tabCreator.createNewTab(new LoadUrlParams(searchUrl, PageTransition.LINK),
+-                TabLaunchType.FROM_LINK, getActivityTab());
+-    }
+-
+     /** Opens the chrome://management page on a new tab. */
+     private void openChromeManagementPage() {
+         Tab currentTab = getActivityTab();
+diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java
+--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java
++++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java
+@@ -19,7 +19,6 @@ import org.chromium.base.annotations.NativeMethods;
+ import org.chromium.base.supplier.Supplier;
+ import org.chromium.chrome.browser.WebContentsFactory;
+ import org.chromium.chrome.browser.content.ContentUtils;
+-import org.chromium.chrome.browser.contextualsearch.ContextualSearchManager;
+ import org.chromium.chrome.browser.externalnav.ExternalNavigationDelegateImpl;
+ import org.chromium.chrome.browser.incognito.IncognitoUtils;
+ import org.chromium.chrome.browser.profiles.Profile;
+diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerImpl.java
+--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerImpl.java
++++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerImpl.java
+@@ -25,7 +25,6 @@ import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider
+ import org.chromium.chrome.browser.browser_controls.BrowserControlsUtils;
+ import org.chromium.chrome.browser.browser_controls.BrowserControlsVisibilityManager;
+ import org.chromium.chrome.browser.compositor.bottombar.OverlayPanelManager;
+-import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.ContextualSearchPanel;
+ import org.chromium.chrome.browser.compositor.layouts.Layout.Orientation;
+ import org.chromium.chrome.browser.compositor.layouts.components.LayoutTab;
+ import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager;
+@@ -270,8 +269,7 @@ public class LayoutManagerImpl implements ManagedLayoutManager, LayoutUpdateHost
+                 // it causes relocation tab strip scene layer.
+                 StripLayoutHelperManager.class,
+                 ScrollingBottomViewSceneLayer.class,
+-                StatusIndicatorCoordinator.getSceneOverlayClass(),
+-                ContextualSearchPanel.class};
++                StatusIndicatorCoordinator.getSceneOverlayClass()};
+         // clang-format on
+ 
+         for (int i = 0; i < overlayOrder.length; i++) mOverlayOrderMap.put(overlayOrder[i], i);
+diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java
+--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java
++++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java
+@@ -154,7 +154,7 @@ public abstract class BaseCustomTabActivity extends ChromeActivity<BaseCustomTab
+         mBaseCustomTabRootUiCoordinator = new BaseCustomTabRootUiCoordinator(this,
+                 getShareDelegateSupplier(),
+                 getActivityTabProvider(), mTabModelProfileSupplier, mBookmarkBridgeSupplier,
+-                this::getContextualSearchManager, getTabModelSelectorSupplier(),
++                null, getTabModelSelectorSupplier(),
+                 getBrowserControlsManager(), getWindowAndroid(), getLifecycleDispatcher(),
+                 getLayoutManagerSupplier(),
+                 /* menuOrKeyboardActionController= */ this, this::getActivityThemeColor,
+diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabRootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabRootUiCoordinator.java
+--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabRootUiCoordinator.java
++++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabRootUiCoordinator.java
+@@ -25,7 +25,6 @@ import org.chromium.chrome.browser.compositor.CompositorViewHolder;
+ import org.chromium.chrome.browser.compositor.layouts.LayoutManagerImpl;
+ import org.chromium.chrome.browser.compositor.layouts.OverviewModeBehavior;
+ import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager;
+-import org.chromium.chrome.browser.contextualsearch.ContextualSearchManager;
+ import org.chromium.chrome.browser.customtabs.content.CustomTabActivityNavigationController;
+ import org.chromium.chrome.browser.customtabs.features.toolbar.CustomTabToolbar;
+ import org.chromium.chrome.browser.customtabs.features.toolbar.CustomTabToolbarCoordinator;
+@@ -103,7 +102,7 @@ public class BaseCustomTabRootUiCoordinator extends RootUiCoordinator {
+             @NonNull ActivityTabProvider tabProvider,
+             @NonNull ObservableSupplier<Profile> profileSupplier,
+             @NonNull ObservableSupplier<BookmarkBridge> bookmarkBridgeSupplier,
+-            @NonNull Supplier<ContextualSearchManager> contextualSearchManagerSupplier,
++            Object ignored,
+             @NonNull ObservableSupplier<TabModelSelector> tabModelSelectorSupplier,
+             @NonNull BrowserControlsManager browserControlsManager,
+             @NonNull ActivityWindowAndroid windowAndroid,
+@@ -132,7 +131,7 @@ public class BaseCustomTabRootUiCoordinator extends RootUiCoordinator {
+             @NonNull MultiWindowModeStateDispatcher multiWindowModeStateDispatcher) {
+         // clang-format off
+         super(activity, null, shareDelegateSupplier, tabProvider, profileSupplier,
+-                bookmarkBridgeSupplier, contextualSearchManagerSupplier, tabModelSelectorSupplier,
++                bookmarkBridgeSupplier, null, tabModelSelectorSupplier,
+                 new OneshotSupplierImpl<>(), new OneshotSupplierImpl<>(),
+                 new OneshotSupplierImpl<>(), () -> null,
+                 browserControlsManager, windowAndroid, new DummyJankTracker(),
+diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
+--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
++++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
+@@ -162,12 +162,6 @@ public class CustomTabActivity extends BaseCustomTabActivity {
+                 mIntentDataProvider.getSession(), webContents);
+     }
+ 
+-    @Override
+-    public void createContextualSearchTab(String searchUrl) {
+-        if (getActivityTab() == null) return;
+-        getActivityTab().loadUrl(new LoadUrlParams(searchUrl));
+-    }
+-
+     @Override
+     public String getPackageName() {
+         if (mShouldOverridePackage && mIntentDataProvider instanceof CustomTabIntentDataProvider) {
+diff --git a/chrome/android/java/src/org/chromium/chrome/browser/modaldialog/ChromeTabModalPresenter.java b/chrome/android/java/src/org/chromium/chrome/browser/modaldialog/ChromeTabModalPresenter.java
+--- a/chrome/android/java/src/org/chromium/chrome/browser/modaldialog/ChromeTabModalPresenter.java
++++ b/chrome/android/java/src/org/chromium/chrome/browser/modaldialog/ChromeTabModalPresenter.java
+@@ -20,7 +20,6 @@ import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider
+ import org.chromium.chrome.browser.browser_controls.BrowserControlsUtils;
+ import org.chromium.chrome.browser.browser_controls.BrowserControlsVisibilityManager;
+ import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel;
+-import org.chromium.chrome.browser.contextualsearch.ContextualSearchManager;
+ import org.chromium.chrome.browser.fullscreen.FullscreenManager;
+ import org.chromium.chrome.browser.omnibox.OmniboxFocusReason;
+ import org.chromium.chrome.browser.tab.Tab;
+@@ -49,7 +48,6 @@ public class ChromeTabModalPresenter
+     private final Activity mActivity;
+     private final Supplier<TabObscuringHandler> mTabObscuringHandlerSupplier;
+     private final Supplier<ToolbarManager> mToolbarManagerSupplier;
+-    private final Supplier<ContextualSearchManager> mContextualSearchManagerSupplier;
+     private final FullscreenManager mFullscreenManager;
+     private final BrowserControlsVisibilityManager mBrowserControlsVisibilityManager;
+     private final TabModalBrowserControlsVisibilityDelegate mVisibilityDelegate;
+@@ -96,7 +94,7 @@ public class ChromeTabModalPresenter
+     public ChromeTabModalPresenter(Activity activity,
+             Supplier<TabObscuringHandler> tabObscuringHandlerSupplier,
+             Supplier<ToolbarManager> toolbarManagerSupplier,
+-            Supplier<ContextualSearchManager> contextualSearchManagerSupplier,
++            Object ignored,
+             FullscreenManager fullscreenManager,
+             BrowserControlsVisibilityManager browserControlsVisibilityManager,
+             TabModelSelector tabModelSelector) {
+@@ -109,7 +107,6 @@ public class ChromeTabModalPresenter
+         mBrowserControlsVisibilityManager.addObserver(this);
+         mVisibilityDelegate = new TabModalBrowserControlsVisibilityDelegate();
+         mTabObscuringToken = TokenHolder.INVALID_TOKEN;
+-        mContextualSearchManagerSupplier = contextualSearchManagerSupplier;
+         mTabModelSelector = tabModelSelector;
+     }
+ 
+@@ -196,13 +193,6 @@ public class ChromeTabModalPresenter
+             assert mActiveTab
+                     != null : "Tab modal dialogs should be shown on top of an active tab.";
+ 
+-            // Hide contextual search panel so that bottom toolbar will not be
+-            // obscured and back press is not overridden.
+-            if (mContextualSearchManagerSupplier.hasValue()) {
+-                mContextualSearchManagerSupplier.get().hideContextualSearch(
+-                        OverlayPanel.StateChangeReason.UNKNOWN);
+-            }
+-
+             // Dismiss the action bar that obscures the dialogs but preserve the text selection.
+             WebContents webContents = mActiveTab.getWebContents();
+             if (webContents != null) {
+diff --git a/chrome/android/java/src/org/chromium/chrome/browser/modaldialog/TabModalLifetimeHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/modaldialog/TabModalLifetimeHandler.java
+--- a/chrome/android/java/src/org/chromium/chrome/browser/modaldialog/TabModalLifetimeHandler.java
++++ b/chrome/android/java/src/org/chromium/chrome/browser/modaldialog/TabModalLifetimeHandler.java
+@@ -8,7 +8,6 @@ import android.app.Activity;
+ 
+ import org.chromium.base.supplier.Supplier;
+ import org.chromium.chrome.browser.browser_controls.BrowserControlsVisibilityManager;
+-import org.chromium.chrome.browser.contextualsearch.ContextualSearchManager;
+ import org.chromium.chrome.browser.fullscreen.FullscreenManager;
+ import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher;
+ import org.chromium.chrome.browser.lifecycle.DestroyObserver;
+@@ -65,7 +64,6 @@ public class TabModalLifetimeHandler implements NativeInitObserver, DestroyObser
+             mAppVisibilityDelegateSupplier;
+     private final Supplier<TabObscuringHandler> mTabObscuringHandlerSupplier;
+     private final Supplier<ToolbarManager> mToolbarManagerSupplier;
+-    private final Supplier<ContextualSearchManager> mContextualSearchManagerSupplier;
+     private final Supplier<TabModelSelector> mTabModelSelectorSupplier;
+     private final Supplier<BrowserControlsVisibilityManager>
+             mBrowserControlsVisibilityManagerSupplier;
+@@ -95,7 +93,7 @@ public class TabModalLifetimeHandler implements NativeInitObserver, DestroyObser
+             Supplier<ComposedBrowserControlsVisibilityDelegate> appVisibilityDelegateSupplier,
+             Supplier<TabObscuringHandler> tabObscuringHandlerSupplier,
+             Supplier<ToolbarManager> toolbarManagerSupplier,
+-            Supplier<ContextualSearchManager> contextualSearchManagerSupplier,
++            Object ignored,
+             Supplier<TabModelSelector> tabModelSelectorSupplier,
+             Supplier<BrowserControlsVisibilityManager> browserControlsVisibilityManagerSupplier,
+             Supplier<FullscreenManager> fullscreenManagerSupplier) {
+@@ -110,7 +108,6 @@ public class TabModalLifetimeHandler implements NativeInitObserver, DestroyObser
+         mFullscreenManagerSupplier = fullscreenManagerSupplier;
+         mBrowserControlsVisibilityManagerSupplier = browserControlsVisibilityManagerSupplier;
+         mVisibilityDelegate = new TabModalBrowserControlsVisibilityDelegate();
+-        mContextualSearchManagerSupplier = contextualSearchManagerSupplier;
+         mTabModelSelectorSupplier = tabModelSelectorSupplier;
+     }
+ 
+@@ -140,7 +137,7 @@ public class TabModalLifetimeHandler implements NativeInitObserver, DestroyObser
+         assert mBrowserControlsVisibilityManagerSupplier.hasValue();
+         assert mFullscreenManagerSupplier.hasValue();
+         mPresenter = new ChromeTabModalPresenter(mActivity, mTabObscuringHandlerSupplier,
+-                mToolbarManagerSupplier, mContextualSearchManagerSupplier,
++                mToolbarManagerSupplier, null,
+                 mFullscreenManagerSupplier.get(), mBrowserControlsVisibilityManagerSupplier.get(),
+                 tabModelSelector);
+         assert mAppVisibilityDelegateSupplier.hasValue();
+diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
+--- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
++++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
+@@ -54,7 +54,6 @@ import org.chromium.ui.text.SpanApplier;
+ 
+ import androidx.annotation.Nullable;
+ import androidx.preference.PreferenceCategory;
+-import org.chromium.chrome.browser.contextualsearch.ContextualSearchManager;
+ import org.chromium.chrome.browser.preferences.SharedPreferencesManager;
+ import org.chromium.components.browser_ui.settings.ChromeSwitchPreference;
+ 
+@@ -85,11 +84,9 @@ public class PrivacySettings
+     // moved from SyncAndServicesSettings.java
+     private static final String PREF_SERVICES_CATEGORY = "services_category";
+     private static final String PREF_SEARCH_SUGGESTIONS = "search_suggestions";
+-    private static final String PREF_CONTEXTUAL_SEARCH = "contextual_search";
+     public static final String PREF_AUTOFILL_ASSISTANT = "autofill_assistant";
+     private ChromeSwitchPreference mSearchSuggestions;
+     private @Nullable ChromeSwitchPreference mAutofillAssistant;
+-    private @Nullable Preference mContextualSearch;
+     private final SharedPreferencesManager mSharedPreferencesManager =
+             SharedPreferencesManager.getInstance();
+     private final PrefService prefService = UserPrefs.get(Profile.getLastUsedRegularProfile());
+@@ -156,12 +153,6 @@ public class PrivacySettings
+             mAutofillAssistant = null;
+         }
+ 
+-        mContextualSearch = findPreference(PREF_CONTEXTUAL_SEARCH);
+-        boolean isContextualSearchEnabled =
+-                !ContextualSearchManager.isContextualSearchDisabled();
+-        mContextualSearch.setSummary(
+-                isContextualSearchEnabled ? R.string.text_on : R.string.text_off);
+-
+         ChromeSwitchPreference canMakePaymentPref =
+                 (ChromeSwitchPreference) findPreference(PREF_CAN_MAKE_PAYMENT);
+         canMakePaymentPref.setOnPreferenceChangeListener(this);
+diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabHelpers.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabHelpers.java
+--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabHelpers.java
++++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabHelpers.java
+@@ -7,7 +7,6 @@ package org.chromium.chrome.browser.tab;
+ import org.chromium.chrome.browser.SwipeRefreshHandler;
+ import org.chromium.chrome.browser.autofill_assistant.AutofillAssistantTabHelper;
+ import org.chromium.chrome.browser.complex_tasks.TaskTabHelper;
+-import org.chromium.chrome.browser.contextualsearch.ContextualSearchTabHelper;
+ import org.chromium.chrome.browser.continuous_search.ContinuousSearchTabHelper;
+ import org.chromium.chrome.browser.crypto.CipherFactory;
+ import org.chromium.chrome.browser.dom_distiller.ReaderModeManager;
+@@ -32,7 +31,6 @@ public final class TabHelpers {
+         TabUma.createForTab(tab);
+         TabDistillabilityProvider.createForTab(tab);
+         InterceptNavigationDelegateTabHelper.createForTab(tab);
+-        ContextualSearchTabHelper.createForTab(tab);
+         MediaSessionTabHelper.createForTab(tab);
+         TaskTabHelper.createForTab(tab, parentTab);
+         TabBrowserControlsConstraintsHelper.createForTab(tab);
+diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java
+--- a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java
++++ b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java
+@@ -38,7 +38,6 @@ import org.chromium.chrome.browser.compositor.bottombar.ephemeraltab.EphemeralTa
+ import org.chromium.chrome.browser.compositor.layouts.LayoutManagerImpl;
+ import org.chromium.chrome.browser.compositor.layouts.OverviewModeBehavior;
+ import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager;
+-import org.chromium.chrome.browser.contextualsearch.ContextualSearchManager;
+ import org.chromium.chrome.browser.continuous_search.ContinuousSearchContainerCoordinator;
+ import org.chromium.chrome.browser.continuous_search.ContinuousSearchContainerCoordinator.HeightObserver;
+ import org.chromium.chrome.browser.feed.webfeed.WebFeedFollowIntroController;
+@@ -251,7 +250,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator {
+             @NonNull ActivityTabProvider tabProvider,
+             @NonNull ObservableSupplier<Profile> profileSupplier,
+             @NonNull ObservableSupplier<BookmarkBridge> bookmarkBridgeSupplier,
+-            @NonNull Supplier<ContextualSearchManager> contextualSearchManagerSupplier,
++            Object ignored,
+             @NonNull ObservableSupplier<TabModelSelector> tabModelSelectorSupplier,
+             @NonNull OneshotSupplier<StartSurface> startSurfaceSupplier,
+             @NonNull OneshotSupplier<ToolbarIntentMetadata> intentMetadataOneshotSupplier,
+@@ -285,7 +284,7 @@ public class TabbedRootUiCoordinator extends RootUiCoordinator {
+             OneshotSupplier<TabReparentingController> tabReparentingControllerSupplier,
+             boolean initializeUiWithIncognitoColors) {
+         super(activity, onOmniboxFocusChangedListener, shareDelegateSupplier, tabProvider,
+-                profileSupplier, bookmarkBridgeSupplier, contextualSearchManagerSupplier,
++                profileSupplier, bookmarkBridgeSupplier, null,
+                 tabModelSelectorSupplier, startSurfaceSupplier, intentMetadataOneshotSupplier,
+                 layoutStateProviderOneshotSupplier, startSurfaceParentTabSupplier,
+                 browserControlsManager, windowAndroid, jankTracker, activityLifecycleDispatcher,
+diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java
+--- a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java
++++ b/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java
+@@ -46,7 +46,6 @@ import org.chromium.chrome.browser.compositor.bottombar.OverlayPanelManager;
+ import org.chromium.chrome.browser.compositor.layouts.LayoutManagerImpl;
+ import org.chromium.chrome.browser.compositor.layouts.OverviewModeBehavior;
+ import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager;
+-import org.chromium.chrome.browser.contextualsearch.ContextualSearchManager;
+ import org.chromium.chrome.browser.crash.PureJavaExceptionReporter;
+ import org.chromium.chrome.browser.directactions.DirectActionInitializer;
+ import org.chromium.chrome.browser.download.DownloadManagerService;
+@@ -209,8 +208,6 @@ public class RootUiCoordinator
+     protected final ObservableSupplier<Profile> mProfileSupplier;
+     private final ObservableSupplier<BookmarkBridge> mBookmarkBridgeSupplier;
+     private final OneshotSupplierImpl<AppMenuCoordinator> mAppMenuSupplier;
+-    private BottomSheetObserver mContextualSearchSuppressor;
+-    private final Supplier<ContextualSearchManager> mContextualSearchManagerSupplier;
+     protected final CallbackController mCallbackController;
+     protected final BrowserControlsManager mBrowserControlsManager;
+     protected ObservableSupplier<TabModelSelector> mTabModelSelectorSupplier;
+@@ -299,7 +296,7 @@ public class RootUiCoordinator
+             @NonNull ActivityTabProvider tabProvider,
+             @NonNull ObservableSupplier<Profile> profileSupplier,
+             @NonNull ObservableSupplier<BookmarkBridge> bookmarkBridgeSupplier,
+-            @NonNull Supplier<ContextualSearchManager> contextualSearchManagerSupplier,
++            Object ignored,
+             @NonNull ObservableSupplier<TabModelSelector> tabModelSelectorSupplier,
+             @NonNull OneshotSupplier<StartSurface> startSurfaceSupplier,
+             @NonNull OneshotSupplier<ToolbarIntentMetadata> intentMetadataOneshotSupplier,
+@@ -380,7 +377,6 @@ public class RootUiCoordinator
+         mProfileSupplier = profileSupplier;
+         mBookmarkBridgeSupplier = bookmarkBridgeSupplier;
+         mAppMenuSupplier = new OneshotSupplierImpl<>();
+-        mContextualSearchManagerSupplier = contextualSearchManagerSupplier;
+         mActionModeControllerCallback = new ToolbarActionModeCallback();
+ 
+         mTabModelSelectorSupplier = tabModelSelectorSupplier;
+@@ -497,9 +493,6 @@ public class RootUiCoordinator
+ 
+         if (mBottomSheetManager != null) mBottomSheetManager.onDestroy();
+         if (mBottomSheetController != null) {
+-            if (mContextualSearchSuppressor != null) {
+-                mBottomSheetController.removeObserver(mContextualSearchSuppressor);
+-            }
+             BottomSheetControllerFactory.detach(mBottomSheetController);
+             mBottomSheetController.destroy();
+         }
+@@ -570,7 +563,6 @@ public class RootUiCoordinator
+     public void onPostInflationStartup() {
+         initAppMenu();
+         initDirectActionInitializer();
+-        initContextualSearchSuppressor();
+         if (mAppMenuCoordinator != null && mModalDialogManagerSupplier.hasValue()) {
+             mModalDialogManagerObserver = new ModalDialogManagerObserver() {
+                 @Override
+@@ -785,15 +777,6 @@ public class RootUiCoordinator
+ 
+     @Override
+     public boolean canShowAppMenu() {
+-        // TODO(https:crbug.com/931496): Eventually the ContextualSearchManager,
+-        // EphemeralTabCoordinator, and FindToolbarManager will all be owned by this class.
+-
+-        // Do not show the menu if Contextual Search panel is opened.
+-        if (mContextualSearchManagerSupplier.get() != null
+-                && mContextualSearchManagerSupplier.get().isSearchPanelOpened()) {
+-            return false;
+-        }
+-
+         // Do not show the menu if we are in find in page view.
+         if (mFindToolbarManager != null && mFindToolbarManager.isShowing()
+                 && !DeviceFormFactor.isNonMultiDisplayContextOnTablet(mActivity)) {
+@@ -993,10 +976,6 @@ public class RootUiCoordinator
+             public void onStartedShowing(int layoutType, boolean showToolbar) {
+                 if (layoutType != LayoutType.BROWSING
+                         && layoutType != LayoutType.SIMPLE_ANIMATION) {
+-                    // Hide contextual search.
+-                    if (mContextualSearchManagerSupplier.get() != null) {
+-                        mContextualSearchManagerSupplier.get().dismissContextualSearchBar();
+-                    }
+                 }
+ 
+                 if (layoutType == LayoutType.TAB_SWITCHER) {
+@@ -1090,10 +1069,6 @@ public class RootUiCoordinator
+      * cross-feature interaction, e.g. hide other features when this feature is shown.
+      */
+     protected void onFindToolbarShown() {
+-        if (mContextualSearchManagerSupplier.get() != null) {
+-            mContextualSearchManagerSupplier.get().hideContextualSearch(
+-                    OverlayPanel.StateChangeReason.UNKNOWN);
+-        }
+     }
+ 
+     /**
+@@ -1198,39 +1173,6 @@ public class RootUiCoordinator
+         mActivityLifecycleDispatcher.register(mDirectActionInitializer);
+     }
+ 
+-    /**
+-     * Initializes a glue logic that suppresses Contextual Search while a Bottom Sheet feature is
+-     * in action.
+-     */
+-    private void initContextualSearchSuppressor() {
+-        if (mBottomSheetController == null) return;
+-        mContextualSearchSuppressor = new EmptyBottomSheetObserver() {
+-            private boolean mOpened;
+-
+-            @Override
+-            public void onSheetStateChanged(int newState, int reason) {
+-                switch (newState) {
+-                    case SheetState.PEEK:
+-                    case SheetState.HALF:
+-                    case SheetState.FULL:
+-                        if (!mOpened) {
+-                            mOpened = true;
+-                            ContextualSearchManager manager =
+-                                    mContextualSearchManagerSupplier.get();
+-                            if (manager != null) manager.onBottomSheetVisible(true);
+-                        }
+-                        break;
+-                    case SheetState.HIDDEN:
+-                        mOpened = false;
+-                        ContextualSearchManager manager = mContextualSearchManagerSupplier.get();
+-                        if (manager != null) manager.onBottomSheetVisible(false);
+-                        break;
+-                }
+-            }
+-        };
+-        mBottomSheetController.addObserver(mContextualSearchSuppressor);
+-    }
+-
+     // Testing methods
+ 
+     @VisibleForTesting
+diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
+--- a/chrome/browser/BUILD.gn
++++ b/chrome/browser/BUILD.gn
+@@ -2035,9 +2035,6 @@ static_library("browser") {
+     "//components/content_settings/core/browser",
+     "//components/content_settings/core/common",
+     "//components/contextual_search:buildflags",
+-    "//components/contextual_search/content:browser",
+-    "//components/contextual_search/content/common/mojom",
+-    "//components/contextual_search/core:browser",
+     "//components/continuous_search/browser",
+     "//components/continuous_search/common/public/mojom",
+     "//components/cookie_config",
+@@ -2642,8 +2639,6 @@ static_library("browser") {
+       "android/compositor/decoration_title.h",
+       "android/compositor/layer/content_layer.cc",
+       "android/compositor/layer/content_layer.h",
+-      "android/compositor/layer/contextual_search_layer.cc",
+-      "android/compositor/layer/contextual_search_layer.h",
+       "android/compositor/layer/layer.h",
+       "android/compositor/layer/overlay_panel_layer.cc",
+       "android/compositor/layer/overlay_panel_layer.h",
+@@ -2664,8 +2659,6 @@ static_library("browser") {
+       "android/compositor/resources/resource_factory.cc",
+       "android/compositor/resources/toolbar_resource.cc",
+       "android/compositor/resources/toolbar_resource.h",
+-      "android/compositor/scene_layer/contextual_search_scene_layer.cc",
+-      "android/compositor/scene_layer/contextual_search_scene_layer.h",
+       "android/compositor/scene_layer/continuous_search_scene_layer.cc",
+       "android/compositor/scene_layer/continuous_search_scene_layer.h",
+       "android/compositor/scene_layer/overscroll_scene_layer.cc",
+@@ -2690,28 +2683,6 @@ static_library("browser") {
+       "android/content/content_utils.cc",
+       "android/context_menu/context_menu_native_delegate_impl.cc",
+       "android/context_menu/context_menu_native_delegate_impl.h",
+-      "android/contextualsearch/contextual_search_context.cc",
+-      "android/contextualsearch/contextual_search_context.h",
+-      "android/contextualsearch/contextual_search_delegate.cc",
+-      "android/contextualsearch/contextual_search_delegate.h",
+-      "android/contextualsearch/contextual_search_field_trial.cc",
+-      "android/contextualsearch/contextual_search_field_trial.h",
+-      "android/contextualsearch/contextual_search_manager.cc",
+-      "android/contextualsearch/contextual_search_manager.h",
+-      "android/contextualsearch/contextual_search_observer.cc",
+-      "android/contextualsearch/contextual_search_observer.h",
+-      "android/contextualsearch/contextual_search_ranker_logger_impl.cc",
+-      "android/contextualsearch/contextual_search_ranker_logger_impl.h",
+-      "android/contextualsearch/contextual_search_tab_helper.cc",
+-      "android/contextualsearch/contextual_search_tab_helper.h",
+-      "android/contextualsearch/ctr_suppression.cc",
+-      "android/contextualsearch/ctr_suppression.h",
+-      "android/contextualsearch/resolved_search_term.cc",
+-      "android/contextualsearch/resolved_search_term.h",
+-      "android/contextualsearch/unhandled_tap_notifier_impl.cc",
+-      "android/contextualsearch/unhandled_tap_notifier_impl.h",
+-      "android/contextualsearch/unhandled_tap_web_contents_observer.cc",
+-      "android/contextualsearch/unhandled_tap_web_contents_observer.h",
+       "android/cookies/cookies_fetcher_util.cc",
+       "android/customtabs/client_data_header_web_contents_observer.cc",
+       "android/customtabs/client_data_header_web_contents_observer.h",
+@@ -3288,8 +3259,6 @@ static_library("browser") {
+       "safe_browsing/android/safe_browsing_referring_app_bridge_android.h",
+       "safe_browsing/android/safe_browsing_settings_launcher_android.cc",
+       "safe_browsing/android/safe_browsing_settings_launcher_android.h",
+-      "search/contextual_search_policy_handler_android.cc",
+-      "search/contextual_search_policy_handler_android.h",
+       "search_engines/template_url_service_factory_android.cc",
+       "search_engines/ui_thread_search_terms_data_android.cc",
+       "search_engines/ui_thread_search_terms_data_android.h",
+diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
+--- a/chrome/browser/about_flags.cc
++++ b/chrome/browser/about_flags.cc
+@@ -85,7 +85,6 @@
+ #include "components/component_updater/component_updater_command_line_config_policy.h"
+ #include "components/component_updater/component_updater_switches.h"
+ #include "components/content_settings/core/common/features.h"
+-#include "components/contextual_search/core/browser/public.h"
+ #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h"
+ #include "components/dom_distiller/core/dom_distiller_features.h"
+ #include "components/dom_distiller/core/dom_distiller_switches.h"
+@@ -1578,23 +1577,6 @@ const FeatureEntry::FeatureVariation kExploreSitesVariations[] = {
+      base::size(kExploreSitesDenseTitleBottom), nullptr},
+     {"Dense Title Right", kExploreSitesDenseTitleRight,
+      base::size(kExploreSitesDenseTitleRight), nullptr}};
+-const FeatureEntry::FeatureParam kLongpressResolvePreserveTap = {
+-    contextual_search::kLongpressResolveParamName,
+-    contextual_search::kLongpressResolvePreserveTap};
+-const FeatureEntry::FeatureVariation kLongpressResolveVariations[] = {
+-    {"and preserve Tap behavior", &kLongpressResolvePreserveTap, 1, nullptr},
+-};
+-
+-const FeatureEntry::FeatureParam kContextualSearchPromoCardShow3Times = {
+-    "promo_card_max_shown", "3"};
+-const FeatureEntry::FeatureParam kContextualSearchPromoCardShow100Times = {
+-    "promo_card_max_shown", "100"};
+-const FeatureEntry::FeatureVariation ContextualSearchNewSettingsVariations[] = {
+-    {"with promo show 3 times", &kContextualSearchPromoCardShow3Times, 1,
+-     nullptr},
+-    {"with promo show 100 times", &kContextualSearchPromoCardShow100Times, 1,
+-     nullptr},
+-};
+ 
+ const FeatureEntry::FeatureParam kRelatedSearchesUrl = {"stamp", "1Ru"};
+ const FeatureEntry::FeatureParam kRelatedSearchesContent = {"stamp", "1Rc"};
+@@ -2802,74 +2784,6 @@ const FeatureEntry kFeatureEntries[] = {
+      flag_descriptions::kCSSContainerQueriesDescription, kOsAll,
+      FEATURE_VALUE_TYPE(blink::features::kCSSContainerQueries)},
+ #if BUILDFLAG(IS_ANDROID)
+-    {"contextual-search-debug", flag_descriptions::kContextualSearchDebugName,
+-     flag_descriptions::kContextualSearchDebugDescription, kOsAndroid,
+-     FEATURE_VALUE_TYPE(chrome::android::kContextualSearchDebug)},
+-    {"contextual-search-delayed-intelligence",
+-     flag_descriptions::kContextualSearchDelayedIntelligenceName,
+-     flag_descriptions::kContextualSearchDelayedIntelligenceDescription,
+-     kOsAndroid,
+-     FEATURE_VALUE_TYPE(chrome::android::kContextualSearchDelayedIntelligence)},
+-    {"contextual-search-force-caption",
+-     flag_descriptions::kContextualSearchForceCaptionName,
+-     flag_descriptions::kContextualSearchForceCaptionDescription, kOsAndroid,
+-     FEATURE_VALUE_TYPE(chrome::android::kContextualSearchForceCaption)},
+-    {"contextual-search-literal-search-tap",
+-     flag_descriptions::kContextualSearchLiteralSearchTapName,
+-     flag_descriptions::kContextualSearchLiteralSearchTapDescription,
+-     kOsAndroid,
+-     FEATURE_VALUE_TYPE(chrome::android::kContextualSearchLiteralSearchTap)},
+-    {"contextual-search-longpress-resolve",
+-     flag_descriptions::kContextualSearchLongpressResolveName,
+-     flag_descriptions::kContextualSearchLongpressResolveDescription,
+-     kOsAndroid,
+-     FEATURE_WITH_PARAMS_VALUE_TYPE(
+-         chrome::android::kContextualSearchLongpressResolve,
+-         kLongpressResolveVariations,
+-         "ContextualSearchLongpressResolve")},
+-    {"contextual-search-ml-tap-suppression",
+-     flag_descriptions::kContextualSearchMlTapSuppressionName,
+-     flag_descriptions::kContextualSearchMlTapSuppressionDescription,
+-     kOsAndroid,
+-     FEATURE_VALUE_TYPE(chrome::android::kContextualSearchMlTapSuppression)},
+-    {"contextual-search-new-settings",
+-     flag_descriptions::KContextualSearchNewSettingsName,
+-     flag_descriptions::KContextualSearchNewSettingsDescription, kOsAndroid,
+-     FEATURE_WITH_PARAMS_VALUE_TYPE(
+-         chrome::android::KContextualSearchNewSettings,
+-         ContextualSearchNewSettingsVariations,
+-         "ContextualSearchNewSettings")},
+-    {"contextual-search-ranker-query",
+-     flag_descriptions::kContextualSearchRankerQueryName,
+-     flag_descriptions::kContextualSearchRankerQueryDescription, kOsAndroid,
+-     FEATURE_VALUE_TYPE(assist_ranker::kContextualSearchRankerQuery)},
+-    {"contextual-search-second-tap",
+-     flag_descriptions::kContextualSearchSecondTapName,
+-     flag_descriptions::kContextualSearchSecondTapDescription, kOsAndroid,
+-     FEATURE_VALUE_TYPE(chrome::android::kContextualSearchSecondTap)},
+-    {"contextual-search-twv-impl",
+-     flag_descriptions::kContextualSearchThinWebViewImplementationName,
+-     flag_descriptions::kContextualSearchThinWebViewImplementationDescription,
+-     kOsAndroid,
+-     FEATURE_VALUE_TYPE(
+-         chrome::android::kContextualSearchThinWebViewImplementation)},
+-    {"contextual-search-translations",
+-     flag_descriptions::kContextualSearchTranslationsName,
+-     flag_descriptions::kContextualSearchTranslationsDescription, kOsAndroid,
+-     FEATURE_VALUE_TYPE(chrome::android::kContextualSearchTranslations)},
+-    {"contextual-triggers-selection-handles",
+-     flag_descriptions::kContextualTriggersSelectionHandlesName,
+-     flag_descriptions::kContextualTriggersSelectionHandlesDescription,
+-     kOsAndroid,
+-     FEATURE_VALUE_TYPE(chrome::android::kContextualTriggersSelectionHandles)},
+-    {"contextual-triggers-selection-menu",
+-     flag_descriptions::kContextualTriggersSelectionMenuName,
+-     flag_descriptions::kContextualTriggersSelectionMenuDescription, kOsAndroid,
+-     FEATURE_VALUE_TYPE(chrome::android::kContextualTriggersSelectionMenu)},
+-    {"contextual-triggers-selection-size",
+-     flag_descriptions::kContextualTriggersSelectionSizeName,
+-     flag_descriptions::kContextualTriggersSelectionSizeDescription, kOsAndroid,
+-     FEATURE_VALUE_TYPE(chrome::android::kContextualTriggersSelectionSize)},
+     {"explore-sites", flag_descriptions::kExploreSitesName,
+      flag_descriptions::kExploreSitesDescription, kOsAndroid,
+      FEATURE_WITH_PARAMS_VALUE_TYPE(chrome::android::kExploreSites,
+diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
+--- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc
++++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
+@@ -112,7 +112,6 @@
+ #if BUILDFLAG(IS_ANDROID)
+ #include "chrome/browser/first_run/android/first_run_prefs.h"
+ #include "chrome/browser/lens/android/lens_prefs.h"
+-#include "chrome/browser/search/contextual_search_policy_handler_android.h"
+ #else  // BUILDFLAG(IS_ANDROID)
+ #include "chrome/browser/download/default_download_dir_policy_handler.h"
+ #include "chrome/browser/download/download_auto_open_policy_handler.h"
+@@ -1746,10 +1745,7 @@ std::unique_ptr<ConfigurationPolicyHandlerList> BuildHandlerList(
+       key::kBrowsingDataLifetime, browsing_data::prefs::kBrowsingDataLifetime,
+       chrome_schema));
+ 
+-#if BUILDFLAG(IS_ANDROID)
+-  handlers->AddHandler(
+-      std::make_unique<ContextualSearchPolicyHandlerAndroid>());
+-#else   // BUILDFLAG(IS_ANDROID)
++#if !BUILDFLAG(IS_ANDROID)
+   handlers->AddHandler(
+       std::make_unique<NtpCustomBackgroundEnabledPolicyHandler>());
+   handlers->AddHandler(std::make_unique<DefaultDownloadDirPolicyHandler>());
+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
+@@ -794,55 +794,6 @@ CHAR_LIMIT guidelines:
+       <message name="IDS_PREFS_PRIVACY_SECURITY" desc="Title for the Privacy and Security preferences. [CHAR_LIMIT=32]">
+         Privacy and security
+       </message>
+-      <message name="IDS_CONTEXTUAL_SEARCH_TITLE" desc="Name for the Contextual Search feature, which allows users to search for a term in a web page by tapping on it.">
+-        Touch to Search
+-      </message>
+-      <message name="IDS_CONTEXTUAL_SEARCH_TAP_DESCRIPTION" desc="Description for Contextual Search preference">
+-        Learn about topics on websites without leaving the page. Touch to Search sends a word and its surrounding context to Google Search, returning definitions, pictures, search results, and other details.
+-
+-Tap any word to search. To refine your search, touch &amp; hold to select more or fewer words. To edit your search, open the panel, tap the icon to open in a new tab, and make your changes in the search box.
+-      </message>
+-      <message name="IDS_CONTEXTUAL_SEARCH_DESCRIPTION" desc="Description for Contextual Search preference">
+-        Learn about topics on websites without leaving the page. Touch to Search sends a word and its surrounding context to Google Search, returning definitions, pictures, search results, and other details.
+-
+-Touch &amp; hold any word to search. To refine your search, select more or fewer words. To edit your search, open the panel, tap the icon to open in a new tab, and make your changes in the search box.
+-      </message>
+-      <message name="IDS_CONTEXTUAL_SEARCH_DESCRIPTION_REVISED" desc="Description for Contextual Search preference">
+-        Learn about topics on websites without leaving the page. Select one or more words on the page to search for them.
+-      </message>
+-      <message name="IDS_CONTEXTUAL_SEARCH_SHORT_DESCRIPTION" desc="A promo message shown to users with Touch to Search to explain the new behavior and provide an option to opt in or out">
+-        Touch to Search sends the selected word and the current page as context to Google Search. You can turn it off in <ph name="BEGIN_LINK">&lt;link&gt;</ph>Settings<ph name="END_LINK">&lt;/link&gt;</ph>.
+-      </message>
+-      <message name="IDS_CONTEXTUAL_SEARCH_PROMO_TITLE" desc="The title of the promo message for the contextual search.">
+-        Include surrounding text in Google searches?
+-      </message>
+-      <message name="IDS_CONTEXTUAL_SEARCH_PROMO_DESCRIPTION" desc="A promo message shown to users with Touch to Search to explain the new behavior and provide an option to opt in or out">
+-        By including more of a page’s text, you might see better results when using Touch to Search. You can always visit <ph name="BEGIN_LINK">&lt;link&gt;</ph>settings<ph name="END_LINK">&lt;/link&gt;</ph> to change this.
+-      </message>
+-      <message name="IDS_CONTEXTUAL_SEARCH_INCLUDE_BUTTON" desc="A button to confirm and dismiss opt in promo">
+-        Include
+-      </message>
+-      <message name="IDS_CONTEXTUAL_SEARCH_ALLOW_BUTTON" desc="A button to confirm and dismiss opt out promo">
+-        Allow
+-      </message>
+-      <message name="IDS_CONTEXTUAL_SEARCH_NO_THANKS_BUTTON" desc="A button to confirm and dismiss opt out promo">
+-        No thanks
+-      </message>
+-      <message name="IDS_CONTEXTUAL_SEARCH_HELP_BODY" desc="Some help text that is shown in the body of a paragraph. The text tells the user what gesture to use instead of a previous gesture in order to search.">
+-        To search from this page, touch &amp; hold words instead of tapping them
+-      </message>
+-      <message name="IDS_CONTEXTUAL_SEARCH_HELP_HEADER" desc="Summary help text that is shown at the top of a paragraph. The text tells the user what gesture to use in order to search.">
+-        Touch &amp; hold for more relevant info
+-      </message>
+-      <message name="IDS_CONTEXTUAL_SEARCH_DEFAULT_CAPTION" desc="Summary help text that is shown as a second line in the Contextual Search peeking bottom sheet telling the user that they can tap the text in order to open the sheet and see search results there.">
+-        Tap to see search results
+-      </message>
+-      <message name="IDS_CONTEXTUAL_SEARCH_SEE_BETTER_RESULTS_TITLE" desc="Title for the see better results switch in Contextual Search preference.">
+-        Include surrounding text in Google searches
+-      </message>
+-      <message name="IDS_CONTEXTUAL_SEARCH_SEE_BETTER_RESULTS_SUMMARY" desc="Summary for the see better results switch in Contextual Search preference.">
+-        By including more of a page’s text, you might see better results
+-      </message>
+       <message name="IDS_DO_NOT_TRACK_TITLE" desc="Title for 'Do Not Track' preference">
+         “Do Not Track”
+       </message>
+diff --git a/components/BUILD.gn b/components/BUILD.gn
+--- a/components/BUILD.gn
++++ b/components/BUILD.gn
+@@ -266,7 +266,6 @@ test("components_unittests") {
+       "//components/certificate_transparency:unit_tests",
+       "//components/content_capture/browser:unit_tests",
+       "//components/content_settings/browser:unit_tests",
+-      "//components/contextual_search/core:unit_tests",
+       "//components/continuous_search/browser:unit_tests",
+       "//components/continuous_search/common:unit_tests",
+       "//components/data_use_measurement/core:unit_tests",
+diff --git a/third_party/blink/public/mojom/BUILD.gn b/third_party/blink/public/mojom/BUILD.gn
+--- a/third_party/blink/public/mojom/BUILD.gn
++++ b/third_party/blink/public/mojom/BUILD.gn
+@@ -821,8 +821,8 @@ mojom("android_mojo_bindings") {
+   # This Android unhandled-tap feature uses another mojo source, add it in.
+   if (enable_unhandled_tap) {
+     sources += [ "unhandled_tap_notifier/unhandled_tap_notifier.mojom" ]
+-    public_deps += [ "//ui/gfx/geometry/mojom" ]
+   }
++  public_deps += [ "//ui/gfx/geometry/mojom" ]
+ 
+   cpp_typemaps = [
+     {
+diff --git a/third_party/blink/public/public_features.gni b/third_party/blink/public/public_features.gni
+--- a/third_party/blink/public/public_features.gni
++++ b/third_party/blink/public/public_features.gni
+@@ -29,7 +29,7 @@ declare_args() {
+ # Unhandled Tap enable means Contextual Search aka Touch to Search.
+ # TODO(donnd): remove all unhandled-tap handling after the Long-press experiment
+ #              is fully launched.
+-enable_unhandled_tap = is_android
++enable_unhandled_tap = false
+ 
+ # Use Minikin hyphenation engine.
+ use_minikin_hyphenation = !is_mac
+--
+2.25.1

+ 1 - 24
build/patches/Remove-signin-and-data-saver-integrations.patch

@@ -36,7 +36,6 @@ ld.lld: error: undefined symbol: notifier::NotifierOptions::NotifierOptions()
  .../bookmarks/BookmarkItemsAdapter.java       |  47 +----
  .../bookmarks/BookmarkPromoHeader.java        | 181 +-----------------
  .../ClearBrowsingDataFragmentBasic.java       |   5 +-
- .../contextualsearch/ContextualSearchUma.java |   5 -
  .../browser/customtabs/CustomTabActivity.java |   3 -
  .../DataReductionPreferenceFragment.java      |  24 +--
  .../browser/firstrun/FirstRunActivity.java    |  13 --
@@ -75,7 +74,7 @@ ld.lld: error: undefined symbol: notifier::NotifierOptions::NotifierOptions()
  .../signin/SystemAccountManagerDelegate.java  |  25 +--
  .../net/HttpNegotiateAuthenticator.java       |  88 +--------
  .../chromoting/base/OAuthTokenFetcher.java    |   2 -
- 56 files changed, 50 insertions(+), 1255 deletions(-)
+ 55 files changed, 50 insertions(+), 1250 deletions(-)
 
 diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
 --- a/chrome/android/BUILD.gn
@@ -1202,28 +1201,6 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/C
      }
  
      @Override
-diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java
---- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java
-+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java
-@@ -16,7 +16,6 @@ import org.chromium.base.metrics.RecordUserAction;
- import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel.PanelState;
- import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel.StateChangeReason;
- import org.chromium.chrome.browser.contextualsearch.ResolvedSearchTerm.CardTag;
--import org.chromium.chrome.browser.sync.SyncService;
- 
- import java.lang.annotation.Retention;
- import java.lang.annotation.RetentionPolicy;
-@@ -882,10 +881,6 @@ public class ContextualSearchUma {
-     public static void logTapResultsSeen(boolean wasPanelSeen) {
-         RecordHistogram.recordBooleanHistogram(
-                 "Search.ContextualSearch.Tap.ResultsSeen", wasPanelSeen);
--        if (SyncService.get() != null && SyncService.get().isSyncRequested()) {
--            RecordHistogram.recordBooleanHistogram(
--                    "Search.ContextualSearch.Tap.SyncEnabled.ResultsSeen", wasPanelSeen);
--        }
-     }
- 
-     /**
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java

+ 3 - 3
build/patches/Restore-Simplified-NTP-launch.patch

@@ -28,7 +28,7 @@ This reverts commit 4d0e4483c5f77c66a8b6193e8a3bec5d0624d6ad.
 diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni
 --- a/chrome/android/chrome_java_resources.gni
 +++ b/chrome/android/chrome_java_resources.gni
-@@ -662,6 +662,7 @@ chrome_java_resources = [
+@@ -645,6 +645,7 @@ chrome_java_resources = [
    "java/res/layout/new_tab_page_incognito.xml",
    "java/res/layout/new_tab_page_layout.xml",
    "java/res/layout/new_tab_page_tile_grid_placeholder.xml",
@@ -39,7 +39,7 @@ diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_ja
 diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
 --- a/chrome/android/chrome_java_sources.gni
 +++ b/chrome/android/chrome_java_sources.gni
-@@ -597,6 +597,7 @@ chrome_java_sources = [
+@@ -534,6 +534,7 @@ chrome_java_sources = [
    "java/src/org/chromium/chrome/browser/feedback/FeedFeedbackCollector.java",
    "java/src/org/chromium/chrome/browser/feedback/HelpAndFeedbackLauncherImpl.java",
    "java/src/org/chromium/chrome/browser/feedback/ScreenshotTask.java",
@@ -310,7 +310,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/Sug
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -4031,6 +4031,9 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -3945,6 +3945,9 @@ const FeatureEntry kFeatureEntries[] = {
       SINGLE_VALUE_TYPE_AND_VALUE(
           switches::kForceShowUpdateMenuItemCustomSummary,
           "Custom Summary")},

+ 2 - 2
build/patches/Revert-flags-remove-num-raster-threads.patch

@@ -13,7 +13,7 @@ This reverts commit 2a51528a1737e9038f7f96f29403032a6a845a25.
 diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -334,6 +334,15 @@ const FeatureEntry::Choice kOverlayStrategiesChoices[] = {
+@@ -333,6 +333,15 @@ const FeatureEntry::Choice kOverlayStrategiesChoices[] = {
       "single-fullscreen,single-on-top,underlay"},
  };
  
@@ -29,7 +29,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
  const FeatureEntry::Choice kTouchTextSelectionStrategyChoices[] = {
      {flags_ui::kGenericExperimentChoiceDefault, "", ""},
      {flag_descriptions::kTouchSelectionStrategyCharacter,
-@@ -3666,6 +3675,9 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -3580,6 +3589,9 @@ const FeatureEntry kFeatureEntries[] = {
      {"restricted-api-origins", flag_descriptions::kRestrictedApiOriginsName,
       flag_descriptions::kRestrictedApiOriginsDescription, kOsAll,
       ORIGIN_LIST_VALUE_TYPE(switches::kRestrictedApiOrigins, "")},

+ 2 - 2
build/patches/User-agent-customization.patch

@@ -70,7 +70,7 @@ diff --git a/base/base_switches.h b/base/base_switches.h
 diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni
 --- a/chrome/android/chrome_java_resources.gni
 +++ b/chrome/android/chrome_java_resources.gni
-@@ -778,4 +778,6 @@ chrome_java_resources = [
+@@ -759,4 +759,6 @@ chrome_java_resources = [
    "java/res/xml/privacy_preferences.xml",
    "java/res/xml/search_widget_info.xml",
    "java/res/xml/tracing_preferences.xml",
@@ -80,7 +80,7 @@ diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_ja
 diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
 --- a/chrome/android/chrome_java_sources.gni
 +++ b/chrome/android/chrome_java_sources.gni
-@@ -950,6 +950,7 @@ chrome_java_sources = [
+@@ -887,6 +887,7 @@ chrome_java_sources = [
    "java/src/org/chromium/chrome/browser/payments/ui/DimmingDialog.java",
    "java/src/org/chromium/chrome/browser/payments/ui/LineItem.java",
    "java/src/org/chromium/chrome/browser/payments/ui/PaymentAppComparator.java",

+ 2 - 0
build/ruleset_converter.gn_args

@@ -1,5 +1,7 @@
 android_channel="stable"
 blink_symbol_level=1
+build_contextual_search=false
+build_with_tflite_lib=false
 chrome_pgo_phase=0
 dcheck_always_on=false
 dfmify_dev_ui=false