scripts: build-chromium: Update to 123.0.6312.40

* Patches from https://github.com/GrapheneOS/Vanadium/tree/a017a652ac3909b4f1c4e77884a0ea2f76c91394/patches

Change-Id: I0275a59737be912d6a0ba8ac3e6c5cfc6e0da7f3
diff --git a/build-chromium/build-chromium.sh b/build-chromium/build-chromium.sh
index 4356c6e..911366d 100755
--- a/build-chromium/build-chromium.sh
+++ b/build-chromium/build-chromium.sh
@@ -2,8 +2,8 @@
 
 set -e
 
-chromium_version="121.0.6167.71"
-chromium_code="616710100"
+chromium_version="123.0.6312.40"
+chromium_code="631204000"
 clean=0
 gsync=0
 supported_archs=(arm64 x64)
diff --git a/build-chromium/fetch-patches.sh b/build-chromium/fetch-patches.sh
index c471ada..cc3bc2b 100755
--- a/build-chromium/fetch-patches.sh
+++ b/build-chromium/fetch-patches.sh
@@ -13,7 +13,7 @@
         exit 1
     fi
 
-     echo $NEWNAME
+    echo $NEWNAME
     mv patches/$PATCH patches/$NEWNAME
     wget -O patches/$NEWNAME https://raw.githubusercontent.com/GrapheneOS/Vanadium/main/patches/$NEWNAME
 done
diff --git a/build-chromium/patches/0018-disable-metrics-by-default.patch b/build-chromium/patches/0018-disable-metrics-by-default.patch
index b6421fd..d61cdff 100644
--- a/build-chromium/patches/0018-disable-metrics-by-default.patch
+++ b/build-chromium/patches/0018-disable-metrics-by-default.patch
@@ -8,12 +8,12 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java
-index ef301742b77fa..03b150acf1c18 100644
+index ee84be84d7988..2aeb57ba26e7a 100644
 --- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java
 @@ -63,7 +63,7 @@ public abstract class FirstRunActivityBase extends AsyncInitializationActivity
-     static final String SHOW_SEARCH_ENGINE_PAGE = "ShowSearchEnginePage";
      static final String SHOW_SYNC_CONSENT_PAGE = "ShowSyncConsent";
+     static final String SHOW_HISTORY_SYNC_PAGE = "ShowHistorySync";
  
 -    public static final boolean DEFAULT_METRICS_AND_CRASH_REPORTING = true;
 +    public static final boolean DEFAULT_METRICS_AND_CRASH_REPORTING = false;
diff --git a/build-chromium/patches/0022-disable-content-feed-suggestions-by-default.patch b/build-chromium/patches/0022-disable-content-feed-suggestions-by-default.patch
index f762170..ad2ed2f 100644
--- a/build-chromium/patches/0022-disable-content-feed-suggestions-by-default.patch
+++ b/build-chromium/patches/0022-disable-content-feed-suggestions-by-default.patch
@@ -8,7 +8,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/components/feed/feed_feature_list.cc b/components/feed/feed_feature_list.cc
-index c1c92dba8b006..6e7a7949c3788 100644
+index c489728fd6814..2f9e6df24176c 100644
 --- a/components/feed/feed_feature_list.cc
 +++ b/components/feed/feed_feature_list.cc
 @@ -23,7 +23,7 @@ namespace feed {
@@ -18,5 +18,5 @@
 -             base::FEATURE_ENABLED_BY_DEFAULT);
 +             base::FEATURE_DISABLED_BY_DEFAULT);
  
- BASE_FEATURE(kInterestFeedV2Autoplay,
-              "InterestFeedV2Autoplay",
+ BASE_FEATURE(kInterestFeedV2Hearts,
+              "InterestFeedV2Hearts",
diff --git a/build-chromium/patches/0027-disable-payment-support-by-default.patch b/build-chromium/patches/0027-disable-payment-support-by-default.patch
index d379f50..57ccdce 100644
--- a/build-chromium/patches/0027-disable-payment-support-by-default.patch
+++ b/build-chromium/patches/0027-disable-payment-support-by-default.patch
@@ -8,10 +8,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/components/payments/core/payment_prefs.cc b/components/payments/core/payment_prefs.cc
-index 3196befc8c400..2caca44e2d4e7 100644
+index d42858bde4cf7..a632291402897 100644
 --- a/components/payments/core/payment_prefs.cc
 +++ b/components/payments/core/payment_prefs.cc
-@@ -16,7 +16,7 @@ const char kCanMakePaymentEnabled[] = "payments.can_make_payment_enabled";
+@@ -11,7 +11,7 @@ namespace payments {
  void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
    registry->RegisterBooleanPref(kPaymentsFirstTransactionCompleted, false);
    registry->RegisterBooleanPref(
diff --git a/build-chromium/patches/0028-disable-media-router-media-remoting-by-default.patch b/build-chromium/patches/0028-disable-media-router-media-remoting-by-default.patch
index 161066e..fc5066d 100644
--- a/build-chromium/patches/0028-disable-media-router-media-remoting-by-default.patch
+++ b/build-chromium/patches/0028-disable-media-router-media-remoting-by-default.patch
@@ -8,10 +8,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/chrome/browser/media/router/media_router_feature.cc b/chrome/browser/media/router/media_router_feature.cc
-index 764d9243637f6..b0329e4476ac8 100644
+index b8ea36d95c7eb..176877e027c23 100644
 --- a/chrome/browser/media/router/media_router_feature.cc
 +++ b/chrome/browser/media/router/media_router_feature.cc
-@@ -146,7 +146,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
+@@ -147,7 +147,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
    registry->RegisterStringPref(prefs::kMediaRouterReceiverIdHashToken, "",
                                 PrefRegistry::PUBLIC);
    registry->RegisterBooleanPref(
diff --git a/build-chromium/patches/0029-disable-media-router-by-default.patch b/build-chromium/patches/0029-disable-media-router-by-default.patch
index 63e1d1b..cb2d7d1 100644
--- a/build-chromium/patches/0029-disable-media-router-by-default.patch
+++ b/build-chromium/patches/0029-disable-media-router-by-default.patch
@@ -9,10 +9,10 @@
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/chrome/browser/media/router/media_router_feature.cc b/chrome/browser/media/router/media_router_feature.cc
-index b0329e4476ac8..4c5cc00da7040 100644
+index 176877e027c23..3594cf35e0b0b 100644
 --- a/chrome/browser/media/router/media_router_feature.cc
 +++ b/chrome/browser/media/router/media_router_feature.cc
-@@ -133,7 +133,7 @@ bool MediaRouterEnabled(content::BrowserContext* context) {
+@@ -134,7 +134,7 @@ bool MediaRouterEnabled(content::BrowserContext* context) {
      pref_values.insert(std::make_pair(context, allowed));
      return allowed;
    }
@@ -22,10 +22,10 @@
  
  #if !BUILDFLAG(IS_ANDROID)
 diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
-index 52a5f08810e85..1933b09a29c74 100644
+index 669c8ab31a549..cc4fb7d05b83e 100644
 --- a/chrome/browser/profiles/profile_impl.cc
 +++ b/chrome/browser/profiles/profile_impl.cc
-@@ -417,7 +417,7 @@ void ProfileImpl::RegisterProfilePrefs(
+@@ -424,7 +424,7 @@ void ProfileImpl::RegisterProfilePrefs(
  #endif
  
    registry->RegisterBooleanPref(prefs::kForceEphemeralProfiles, false);
diff --git a/build-chromium/patches/0030-disable-offering-translations-by-default.patch b/build-chromium/patches/0030-disable-offering-translations-by-default.patch
index 2ae7a62..066c30f 100644
--- a/build-chromium/patches/0030-disable-offering-translations-by-default.patch
+++ b/build-chromium/patches/0030-disable-offering-translations-by-default.patch
@@ -8,10 +8,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc
-index 95d3988d536f9..5218968346864 100644
+index c5ae80c271b6a..4910b1a4511cc 100644
 --- a/chrome/browser/ui/browser_ui_prefs.cc
 +++ b/chrome/browser/ui/browser_ui_prefs.cc
-@@ -82,7 +82,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
+@@ -85,7 +85,7 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
    registry->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true);
    registry->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true);
    registry->RegisterBooleanPref(
diff --git a/build-chromium/patches/0031-disable-browser-sign-in-feature-by-default.patch b/build-chromium/patches/0031-disable-browser-sign-in-feature-by-default.patch
index b6a58f4..c8178d1 100644
--- a/build-chromium/patches/0031-disable-browser-sign-in-feature-by-default.patch
+++ b/build-chromium/patches/0031-disable-browser-sign-in-feature-by-default.patch
@@ -9,7 +9,7 @@
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/chrome/browser/signin/account_consistency_mode_manager.cc b/chrome/browser/signin/account_consistency_mode_manager.cc
-index 222ba8a3084aa..496a2ed2c65b6 100644
+index 79f00f9b96b74..1fd6ef457d351 100644
 --- a/chrome/browser/signin/account_consistency_mode_manager.cc
 +++ b/chrome/browser/signin/account_consistency_mode_manager.cc
 @@ -123,7 +123,7 @@ AccountConsistencyModeManager::~AccountConsistencyModeManager() {}
@@ -22,15 +22,15 @@
  
  // static
 diff --git a/components/signin/internal/identity_manager/primary_account_manager.cc b/components/signin/internal/identity_manager/primary_account_manager.cc
-index f7b3ed7459d55..e36b73d6f9003 100644
+index 6fe0f2612b0f6..815171103eb73 100644
 --- a/components/signin/internal/identity_manager/primary_account_manager.cc
 +++ b/components/signin/internal/identity_manager/primary_account_manager.cc
-@@ -193,7 +193,7 @@ void PrimaryAccountManager::RegisterProfilePrefs(PrefRegistrySimple* registry) {
+@@ -228,7 +228,7 @@ void PrimaryAccountManager::RegisterProfilePrefs(PrefRegistrySimple* registry) {
        prefs::kGoogleServicesSyncingUsernameMigratedToSignedIn, std::string());
    registry->RegisterBooleanPref(prefs::kAutologinEnabled, true);
    registry->RegisterListPref(prefs::kReverseAutologinRejectedEmailList);
 -  registry->RegisterBooleanPref(prefs::kSigninAllowed, true);
 +  registry->RegisterBooleanPref(prefs::kSigninAllowed, false);
    registry->RegisterBooleanPref(prefs::kSignedInWithCredentialProvider, false);
+   registry->RegisterBooleanPref(prefs::kExplicitBrowserSignin, false);
  }
- 
diff --git a/build-chromium/patches/0036-disable-autofill-server-communication-by-default.patch b/build-chromium/patches/0036-disable-autofill-server-communication-by-default.patch
index 13fc4f9..44997cd 100644
--- a/build-chromium/patches/0036-disable-autofill-server-communication-by-default.patch
+++ b/build-chromium/patches/0036-disable-autofill-server-communication-by-default.patch
@@ -8,10 +8,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/components/autofill/core/common/autofill_features.cc b/components/autofill/core/common/autofill_features.cc
-index b2c551ea3108a..8f72eef6c64e0 100644
+index 106b4b91f173b..e41ea53948eab 100644
 --- a/components/autofill/core/common/autofill_features.cc
 +++ b/components/autofill/core/common/autofill_features.cc
-@@ -848,7 +848,7 @@ const base::FeatureParam<std::string>
+@@ -762,7 +762,7 @@ const base::FeatureParam<std::string>
  // i.e., https://other.autofill.server:port/tbproxy/af/
  BASE_FEATURE(kAutofillServerCommunication,
               "AutofillServerCommunication",
diff --git a/build-chromium/patches/0041-disable-Omaha-update-check-support.patch b/build-chromium/patches/0041-disable-Omaha-update-check-support.patch
index 4af4655..aa6305d 100644
--- a/build-chromium/patches/0041-disable-Omaha-update-check-support.patch
+++ b/build-chromium/patches/0041-disable-Omaha-update-check-support.patch
@@ -9,7 +9,7 @@
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java
-index 4f7a64abb07f5..ae7ee72d8fb19 100644
+index 6a5bc7fbdc96b..b7859536ac995 100644
 --- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java
 @@ -161,7 +161,7 @@ public class OmahaBase {
@@ -22,7 +22,7 @@
  
      /**
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNumberGetter.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNumberGetter.java
-index 97a6757ee1914..3334cfc34d567 100644
+index aafca709ec9db..ab30313aaed6d 100644
 --- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNumberGetter.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/omaha/VersionNumberGetter.java
 @@ -51,7 +51,7 @@ public class VersionNumberGetter {
diff --git a/build-chromium/patches/0054-disable-using-Play-services-fonts.patch b/build-chromium/patches/0053-disable-using-Play-services-fonts.patch
similarity index 100%
rename from build-chromium/patches/0054-disable-using-Play-services-fonts.patch
rename to build-chromium/patches/0053-disable-using-Play-services-fonts.patch
diff --git a/build-chromium/patches/0076-add-trichrome-browser-apk-targets.patch b/build-chromium/patches/0075-add-trichrome-browser-apk-targets.patch
similarity index 92%
rename from build-chromium/patches/0076-add-trichrome-browser-apk-targets.patch
rename to build-chromium/patches/0075-add-trichrome-browser-apk-targets.patch
index f552ac2..415727d 100644
--- a/build-chromium/patches/0076-add-trichrome-browser-apk-targets.patch
+++ b/build-chromium/patches/0075-add-trichrome-browser-apk-targets.patch
@@ -9,10 +9,10 @@
  2 files changed, 37 insertions(+)
 
 diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
-index 9ef4d7045a0db..40bce15d64f89 100644
+index 167b6a6f6b44c..14774020c38bc 100644
 --- a/chrome/android/BUILD.gn
 +++ b/chrome/android/BUILD.gn
-@@ -2430,6 +2430,10 @@ if (current_toolchain == default_toolchain) {
+@@ -2390,6 +2390,10 @@ if (current_toolchain == default_toolchain) {
      is_trichrome = true
      is_bundle_module = true
    }
@@ -23,7 +23,7 @@
  
    # Exists separately from chrome_public_base_module_java_for_test to allow
    # downstream to depend on test support packages without needing to depend on
-@@ -2796,6 +2800,37 @@ if (current_toolchain == default_toolchain) {
+@@ -2769,6 +2773,37 @@ if (current_toolchain == default_toolchain) {
        }
      }
    }
@@ -62,7 +62,7 @@
    # As compared to chrome_public_test_apk, this target contains only unit tests
    # that require on device capabilities. These tests are smaller, more tightly
 diff --git a/chrome/android/chrome_public_apk_tmpl.gni b/chrome/android/chrome_public_apk_tmpl.gni
-index 54c50b54bb7ca..1fc91f09297a5 100644
+index df3d58c8bade4..b4a17cf298dd5 100644
 --- a/chrome/android/chrome_public_apk_tmpl.gni
 +++ b/chrome/android/chrome_public_apk_tmpl.gni
 @@ -454,6 +454,8 @@ template("chrome_common_apk_or_module_tmpl") {
diff --git a/build-chromium/patches/0080-remove-Help-feedback-menu-entry.patch b/build-chromium/patches/0079-remove-Help-feedback-menu-entry.patch
similarity index 91%
rename from build-chromium/patches/0080-remove-Help-feedback-menu-entry.patch
rename to build-chromium/patches/0079-remove-Help-feedback-menu-entry.patch
index 3bebf77..41ad4f8 100644
--- a/build-chromium/patches/0080-remove-Help-feedback-menu-entry.patch
+++ b/build-chromium/patches/0079-remove-Help-feedback-menu-entry.patch
@@ -8,10 +8,10 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java
-index 0dd8acdca4dbc..780e90bddf053 100644
+index 4601831676edd..a997aec3b2948 100644
 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java
-@@ -580,6 +580,8 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
+@@ -587,6 +587,8 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
          menu.findItem(R.id.reader_mode_prefs_id)
                  .setVisible(isCurrentTabNotNull && shouldShowReaderModePrefs(currentTab));
  
diff --git a/build-chromium/patches/0081-hide-passwords.google.com-link-when-not-supported.patch b/build-chromium/patches/0080-hide-passwords.google.com-link-when-not-supported.patch
similarity index 100%
rename from build-chromium/patches/0081-hide-passwords.google.com-link-when-not-supported.patch
rename to build-chromium/patches/0080-hide-passwords.google.com-link-when-not-supported.patch
diff --git a/build-chromium/patches/0083-Consolidate-downstream-changes-in-dependencies-sourc.patch b/build-chromium/patches/0082-Consolidate-downstream-changes-in-dependencies-sourc.patch
similarity index 95%
rename from build-chromium/patches/0083-Consolidate-downstream-changes-in-dependencies-sourc.patch
rename to build-chromium/patches/0082-Consolidate-downstream-changes-in-dependencies-sourc.patch
index c601601..4a97ef3 100644
--- a/build-chromium/patches/0083-Consolidate-downstream-changes-in-dependencies-sourc.patch
+++ b/build-chromium/patches/0082-Consolidate-downstream-changes-in-dependencies-sourc.patch
@@ -17,7 +17,7 @@
  create mode 100644 chrome/android/chrome_ext_java_sources.gni
 
 diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
-index 40bce15d64f89..dac7963df6224 100644
+index 14774020c38bc..fec47e97f8fe6 100644
 --- a/chrome/android/BUILD.gn
 +++ b/chrome/android/BUILD.gn
 @@ -10,6 +10,9 @@ import("//build/config/cronet/config.gni")
@@ -30,7 +30,7 @@
  import("//chrome/android/chrome_java_resources.gni")
  import("//chrome/android/chrome_public_apk_tmpl.gni")
  import("//chrome/android/expectations/expectations.gni")
-@@ -175,6 +178,8 @@ if (current_toolchain == default_toolchain) {
+@@ -168,6 +171,8 @@ if (current_toolchain == default_toolchain) {
  
    android_resources("chrome_app_java_resources") {
      sources = chrome_java_resources
@@ -39,7 +39,7 @@
      sources += [ "//chrome/android/java/res_app/layout/main.xml" ]
  
      deps = [
-@@ -693,6 +698,11 @@ if (current_toolchain == default_toolchain) {
+@@ -697,6 +702,11 @@ if (current_toolchain == default_toolchain) {
      # From java_sources.gni.
      sources = chrome_java_sources + [ app_hooks_impl ]
  
@@ -91,7 +91,7 @@
 +chrome_ext_java_sources = [
 +]
 diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni
-index 5a0b795f9febb..408fc10bd1afa 100644
+index d0b9774e87b16..1ebd8fd8b3871 100644
 --- a/chrome/android/chrome_java_resources.gni
 +++ b/chrome/android/chrome_java_resources.gni
 @@ -7,6 +7,8 @@
diff --git a/build-chromium/patches/0084-Consolidate-downstream-strings-in-a-separate-file-fo.patch b/build-chromium/patches/0083-Consolidate-downstream-strings-in-a-separate-file-fo.patch
similarity index 97%
rename from build-chromium/patches/0084-Consolidate-downstream-strings-in-a-separate-file-fo.patch
rename to build-chromium/patches/0083-Consolidate-downstream-strings-in-a-separate-file-fo.patch
index c426f1c..5f50329 100644
--- a/build-chromium/patches/0084-Consolidate-downstream-strings-in-a-separate-file-fo.patch
+++ b/build-chromium/patches/0083-Consolidate-downstream-strings-in-a-separate-file-fo.patch
@@ -23,7 +23,7 @@
 +<grit-part>
 +</grit-part>
 diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
-index 5c4d8ee89a605..1d66587781a2a 100644
+index ac15c0e1fc904..09774057f0f07 100644
 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
 +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
 @@ -202,6 +202,7 @@ CHAR_LIMIT guidelines:
diff --git a/build-chromium/patches/0085-Utility-class-for-adding-shared-preference-keys.patch b/build-chromium/patches/0084-Utility-class-for-adding-shared-preference-keys.patch
similarity index 97%
rename from build-chromium/patches/0085-Utility-class-for-adding-shared-preference-keys.patch
rename to build-chromium/patches/0084-Utility-class-for-adding-shared-preference-keys.patch
index 059a60a..870a578 100644
--- a/build-chromium/patches/0085-Utility-class-for-adding-shared-preference-keys.patch
+++ b/build-chromium/patches/0084-Utility-class-for-adding-shared-preference-keys.patch
@@ -11,10 +11,10 @@
  create mode 100644 base/android/java/src/org/chromium/base/shared_preferences/SharedPrefsUtils.java
 
 diff --git a/base/BUILD.gn b/base/BUILD.gn
-index 3d538b3370caa..110eff5889447 100644
+index a989a351a8765..51084c21d7911 100644
 --- a/base/BUILD.gn
 +++ b/base/BUILD.gn
-@@ -4507,6 +4507,9 @@ if (is_android) {
+@@ -4588,6 +4588,9 @@ if (is_android) {
        "android/java/src/org/chromium/base/shared_preferences/SharedPreferencesManager.java",
        "android/java/src/org/chromium/base/shared_preferences/StrictPreferenceKeyChecker.java",
      ]
@@ -23,7 +23,7 @@
 +    ]
    }
  
-   android_aidl("process_launcher_aidl") {
+   android_library("base_cached_flags_java") {
 diff --git a/base/android/java/src/org/chromium/base/shared_preferences/SharedPrefsUtils.java b/base/android/java/src/org/chromium/base/shared_preferences/SharedPrefsUtils.java
 new file mode 100644
 index 0000000000000..d482be2d6cc06
diff --git a/build-chromium/patches/0086-Helper-class-for-modifying-preferences-at-chrome-lay.patch b/build-chromium/patches/0085-Helper-class-for-modifying-preferences-at-chrome-lay.patch
similarity index 100%
rename from build-chromium/patches/0086-Helper-class-for-modifying-preferences-at-chrome-lay.patch
rename to build-chromium/patches/0085-Helper-class-for-modifying-preferences-at-chrome-lay.patch
diff --git a/build-chromium/patches/0087-Utility-class-for-modifying-preferences-at-Privacy-s.patch b/build-chromium/patches/0086-Utility-class-for-modifying-preferences-at-Privacy-s.patch
similarity index 97%
rename from build-chromium/patches/0087-Utility-class-for-modifying-preferences-at-Privacy-s.patch
rename to build-chromium/patches/0086-Utility-class-for-modifying-preferences-at-Privacy-s.patch
index 739e267..d03f077 100644
--- a/build-chromium/patches/0087-Utility-class-for-modifying-preferences-at-Privacy-s.patch
+++ b/build-chromium/patches/0086-Utility-class-for-modifying-preferences-at-Privacy-s.patch
@@ -49,7 +49,7 @@
 +</PreferenceScreen>
 +
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
-index 85177ad55395a..621f86ce4473a 100644
+index 6d36f86cc96e8..021a074b4b8d0 100644
 --- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
 @@ -78,6 +78,8 @@ public class PrivacySettings extends ChromeBaseSettingsFragment
@@ -61,7 +61,7 @@
          Preference sandboxPreference = findPreference(PREF_PRIVACY_SANDBOX);
          // Overwrite the click listener to pass a correct referrer to the fragment.
          sandboxPreference.setOnPreferenceClickListener(
-@@ -205,6 +207,8 @@ public class PrivacySettings extends ChromeBaseSettingsFragment
+@@ -203,6 +205,8 @@ public class PrivacySettings extends ChromeBaseSettingsFragment
                              thirdPartyCookies.getTitle().toString());
          }
  
@@ -70,7 +70,7 @@
          updatePreferences();
      }
  
-@@ -326,6 +330,8 @@ public class PrivacySettings extends ChromeBaseSettingsFragment
+@@ -324,6 +328,8 @@ public class PrivacySettings extends ChromeBaseSettingsFragment
                              UserPrefs.get(getProfile()).getInteger(COOKIE_CONTROLS_MODE)));
          }
  
diff --git a/build-chromium/patches/0088-Remove-not-applicable-additional-terms-of-services.patch b/build-chromium/patches/0087-Remove-not-applicable-additional-terms-of-services.patch
similarity index 100%
rename from build-chromium/patches/0088-Remove-not-applicable-additional-terms-of-services.patch
rename to build-chromium/patches/0087-Remove-not-applicable-additional-terms-of-services.patch
diff --git a/build-chromium/patches/0091-remove-unwanted-sync-and-services-link.patch b/build-chromium/patches/0090-remove-unwanted-sync-and-services-link.patch
similarity index 92%
rename from build-chromium/patches/0091-remove-unwanted-sync-and-services-link.patch
rename to build-chromium/patches/0090-remove-unwanted-sync-and-services-link.patch
index 72861f2..348a0aa 100644
--- a/build-chromium/patches/0091-remove-unwanted-sync-and-services-link.patch
+++ b/build-chromium/patches/0090-remove-unwanted-sync-and-services-link.patch
@@ -8,10 +8,10 @@
  1 file changed, 1 insertion(+), 2 deletions(-)
 
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
-index 621f86ce4473a..0c5cb984efa6f 100644
+index 021a074b4b8d0..3c7f9d25b2e0f 100644
 --- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
-@@ -185,8 +185,7 @@ public class PrivacySettings extends ChromeBaseSettingsFragment
+@@ -183,8 +183,7 @@ public class PrivacySettings extends ChromeBaseSettingsFragment
          Preference secureDnsPref = findPreference(PREF_SECURE_DNS);
          secureDnsPref.setVisible(SecureDnsSettings.isUiEnabled());
  
diff --git a/build-chromium/patches/0092-remove-safety-check-menu.patch b/build-chromium/patches/0091-remove-safety-check-menu.patch
similarity index 89%
rename from build-chromium/patches/0092-remove-safety-check-menu.patch
rename to build-chromium/patches/0091-remove-safety-check-menu.patch
index 2cc2d68..25d2e99 100644
--- a/build-chromium/patches/0092-remove-safety-check-menu.patch
+++ b/build-chromium/patches/0091-remove-safety-check-menu.patch
@@ -8,10 +8,10 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java
-index 5bfc494a117a0..5fbd9902c2dab 100644
+index 043684391072a..604a1e44dd8f5 100644
 --- a/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java
-@@ -236,6 +236,8 @@ public class MainSettings extends ChromeBaseSettingsFragment
+@@ -242,6 +242,8 @@ public class MainSettings extends ChromeBaseSettingsFragment
              templateUrlService.load();
          }
  
diff --git a/build-chromium/patches/0093-remove-unwanted-account-and-services-section.patch b/build-chromium/patches/0092-remove-unwanted-account-and-services-section.patch
similarity index 90%
rename from build-chromium/patches/0093-remove-unwanted-account-and-services-section.patch
rename to build-chromium/patches/0092-remove-unwanted-account-and-services-section.patch
index 6d482a3..03eeeb4 100644
--- a/build-chromium/patches/0093-remove-unwanted-account-and-services-section.patch
+++ b/build-chromium/patches/0092-remove-unwanted-account-and-services-section.patch
@@ -8,10 +8,10 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java
-index 5fbd9902c2dab..0816b785cc72e 100644
+index 604a1e44dd8f5..3a519a943dac0 100644
 --- a/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java
-@@ -237,6 +237,8 @@ public class MainSettings extends ChromeBaseSettingsFragment
+@@ -243,6 +243,8 @@ public class MainSettings extends ChromeBaseSettingsFragment
          }
  
          getPreferenceScreen().removePreference(findPreference(PREF_SAFETY_CHECK));
diff --git a/build-chromium/patches/0094-remove-translate-offer-preference.patch b/build-chromium/patches/0093-remove-translate-offer-preference.patch
similarity index 100%
rename from build-chromium/patches/0094-remove-translate-offer-preference.patch
rename to build-chromium/patches/0093-remove-translate-offer-preference.patch
diff --git a/build-chromium/patches/0095-Hide-Sign-In-preference-when-disallowed.patch b/build-chromium/patches/0094-Hide-Sign-In-preference-when-disallowed.patch
similarity index 80%
rename from build-chromium/patches/0095-Hide-Sign-In-preference-when-disallowed.patch
rename to build-chromium/patches/0094-Hide-Sign-In-preference-when-disallowed.patch
index 8bbd5c1..17eeb73 100644
--- a/build-chromium/patches/0095-Hide-Sign-In-preference-when-disallowed.patch
+++ b/build-chromium/patches/0094-Hide-Sign-In-preference-when-disallowed.patch
@@ -8,14 +8,14 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SignInPreference.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SignInPreference.java
-index 043ab492edd75..6db3510b53b0a 100644
+index a24437dfebf3e..e64daa47ae9ea 100644
 --- a/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SignInPreference.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SignInPreference.java
-@@ -158,6 +158,7 @@ public class SignInPreference extends Preference
+@@ -163,6 +163,7 @@ public class SignInPreference extends Preference
      }
  
      private void setupSigninDisallowed() {
-+        setViewEnabled(false);
++        setViewEnabledAndShowAlertIcon(/* enabled= */ false, /* alertIconVisible= */ false);
          mWasGenericSigninPromoDisplayed = false;
      }
  
diff --git a/build-chromium/patches/0106-Add-missing-null-check-for-password-manager-autofill.patch b/build-chromium/patches/0106-Add-missing-null-check-for-password-manager-autofill.patch
index 7f23a3b..32092f2 100644
--- a/build-chromium/patches/0106-Add-missing-null-check-for-password-manager-autofill.patch
+++ b/build-chromium/patches/0106-Add-missing-null-check-for-password-manager-autofill.patch
@@ -8,10 +8,10 @@
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc
-index d37448c396471..dd2d3471406cd 100644
+index 8bc8fe59b4e26..1372f3c440ff0 100644
 --- a/components/autofill/content/renderer/password_autofill_agent.cc
 +++ b/components/autofill/content/renderer/password_autofill_agent.cc
-@@ -827,7 +827,9 @@ void PasswordAutofillAgent::UpdatePasswordStateForTextChange(
+@@ -832,7 +832,9 @@ void PasswordAutofillAgent::UpdatePasswordStateForTextChange(
  
  void PasswordAutofillAgent::TrackAutofilledElement(
      const blink::WebFormControlElement& element) {
diff --git a/build-chromium/patches/0112-Drop-workaround-with-android-autofill-in-compatibili.patch b/build-chromium/patches/0111-Drop-workaround-with-android-autofill-in-compatibili.patch
similarity index 93%
rename from build-chromium/patches/0112-Drop-workaround-with-android-autofill-in-compatibili.patch
rename to build-chromium/patches/0111-Drop-workaround-with-android-autofill-in-compatibili.patch
index a165412..fc935e3 100644
--- a/build-chromium/patches/0112-Drop-workaround-with-android-autofill-in-compatibili.patch
+++ b/build-chromium/patches/0111-Drop-workaround-with-android-autofill-in-compatibili.patch
@@ -11,10 +11,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
-index 3a366ebbee8bf..bdf7e5d05d4c5 100644
+index cbd3107d111eb..3e1238e52f5cf 100644
 --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
 +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
-@@ -384,7 +384,7 @@ public abstract class UrlBar extends AutocompleteEditText {
+@@ -379,7 +379,7 @@ public abstract class UrlBar extends AutocompleteEditText {
              // the domain changes. We restore this behavior by mimicking the relevant part of
              // TextView.notifyListeningManagersAfterTextChanged().
              // https://cs.android.com/android/platform/superproject/+/5d123b67756dffcfdebdb936ab2de2b29c799321:frameworks/base/core/java/android/widget/TextView.java;l=10618;drc=master;bpv=0
diff --git a/build-chromium/patches/0113-Enable-android-autofill-on-http-authentication-dialo.patch b/build-chromium/patches/0112-Enable-android-autofill-on-http-authentication-dialo.patch
similarity index 100%
rename from build-chromium/patches/0113-Enable-android-autofill-on-http-authentication-dialo.patch
rename to build-chromium/patches/0112-Enable-android-autofill-on-http-authentication-dialo.patch
diff --git a/build-chromium/patches/0114-Support-both-password-manager-and-android-autofill-f.patch b/build-chromium/patches/0113-Support-both-password-manager-and-android-autofill-f.patch
similarity index 72%
rename from build-chromium/patches/0114-Support-both-password-manager-and-android-autofill-f.patch
rename to build-chromium/patches/0113-Support-both-password-manager-and-android-autofill-f.patch
index 58572d7..39aaea3 100644
--- a/build-chromium/patches/0114-Support-both-password-manager-and-android-autofill-f.patch
+++ b/build-chromium/patches/0113-Support-both-password-manager-and-android-autofill-f.patch
@@ -6,15 +6,15 @@
 
 ---
  .../autofill/content/renderer/autofill_agent.cc     |  2 --
- .../content/renderer/password_autofill_agent.cc     | 11 -----------
+ .../content/renderer/password_autofill_agent.cc     | 10 ----------
  .../core/browser/browser_autofill_manager.cc        | 13 +++++++++++++
- 3 files changed, 13 insertions(+), 13 deletions(-)
+ 3 files changed, 13 insertions(+), 12 deletions(-)
 
 diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc
-index 382710524cd30..0e80f8c6eb647 100644
+index 21e0318be88f1..114990e514cbd 100644
 --- a/components/autofill/content/renderer/autofill_agent.cc
 +++ b/components/autofill/content/renderer/autofill_agent.cc
-@@ -556,14 +556,12 @@ void AutofillAgent::OnTextFieldDidChange(const WebFormControlElement& element) {
+@@ -514,14 +514,12 @@ void AutofillAgent::OnTextFieldDidChange(const WebFormControlElement& element) {
    if (password_generation_agent_ && !input_element.IsNull() &&
        password_generation_agent_->TextDidChangeInTextField(input_element)) {
      is_popup_possibly_visible_ = true;
@@ -30,32 +30,31 @@
  
    if (!input_element.IsNull()) {
 diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc
-index dd2d3471406cd..f467d2993f5b3 100644
+index 1372f3c440ff0..b6b2fa4780a65 100644
 --- a/components/autofill/content/renderer/password_autofill_agent.cc
 +++ b/components/autofill/content/renderer/password_autofill_agent.cc
-@@ -1146,17 +1146,6 @@ bool PasswordAutofillAgent::ShowSuggestions(const WebInputElement& element,
-   if (element.Value().length() > kMaximumTextSizeForAutocomplete)
+@@ -1612,16 +1612,6 @@ bool PasswordAutofillAgent::ShowSuggestionsForDomain(
      return false;
+   }
  
 -#if BUILDFLAG(IS_ANDROID)
--  // Don't call ShowSuggestionPopup if a keyboard replacing surface is currently
--  // showing. Since a keyboard replacing surface in spirit is very similar to a
--  // suggestion pop-up, return true so that the AutofillAgent does not try to
--  // show other autofill suggestions instead.
+-  // Don't call `ShowSuggestionPopup` if a keyboard replacing surface is
+-  // currently showing. Since a keyboard replacing surface in spirit is very
+-  // similar to a suggestion pop-up, return true so that the AutofillAgent does
+-  // not try to show other autofill suggestions instead.
 -  if (keyboard_replacing_surface_state_ ==
 -      KeyboardReplacingSurfaceState::kIsShowing) {
 -    return true;
 -  }
 -#endif
--
-   if (!HasDocumentWithValidFrame(element))
-     return false;
  
+   if (!HasDocumentWithValidFrame(element)) {
+     return false;
 diff --git a/components/autofill/core/browser/browser_autofill_manager.cc b/components/autofill/core/browser/browser_autofill_manager.cc
-index c87e797550ce2..1e741c34c8ce9 100644
+index 103dc76137de5..2e212d852f3b7 100644
 --- a/components/autofill/core/browser/browser_autofill_manager.cc
 +++ b/components/autofill/core/browser/browser_autofill_manager.cc
-@@ -1114,6 +1114,19 @@ void BrowserAutofillManager::OnAskForValuesToFillImpl(
+@@ -965,6 +965,19 @@ void BrowserAutofillManager::OnAskForValuesToFillImpl(
    if (base::FeatureList::IsEnabled(features::kAutofillDisableFilling)) {
      return;
    }
@@ -74,4 +73,4 @@
 +  }
  
    external_delegate_->SetCurrentDataListValues(field.datalist_options);
-   external_delegate_->OnQuery(form, field, transformed_box);
+   external_delegate_->OnQuery(form, field, transformed_box, trigger_source);
diff --git a/build-chromium/patches/0114-Support-for-both-browser-and-android-autofill-functi.patch b/build-chromium/patches/0114-Support-for-both-browser-and-android-autofill-functi.patch
new file mode 100644
index 0000000..5ffbf94
--- /dev/null
+++ b/build-chromium/patches/0114-Support-for-both-browser-and-android-autofill-functi.patch
@@ -0,0 +1,364 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: fgei <fgei@gmail.com>
+Date: Tue, 21 Feb 2023 01:48:15 +0000
+Subject: [PATCH] Support for both browser and android autofill functionality
+
+---
+ .../ui/autofill/chrome_autofill_client.cc     | 14 +++++
+ .../ui/autofill/chrome_autofill_client.h      |  6 +++
+ .../browser/android_autofill_client.cc        | 12 +++++
+ .../browser/android_autofill_client.h         |  6 +++
+ .../content/browser/content_autofill_client.h | 12 +++++
+ .../browser/content_autofill_driver.cc        | 53 +++++++++++++++++++
+ .../content/browser/content_autofill_driver.h |  4 ++
+ .../content_autofill_driver_factory.cc        |  1 +
+ .../autofill/core/browser/autofill_driver.h   |  6 +++
+ .../core/browser/test_autofill_driver.cc      |  8 +++
+ .../core/browser/test_autofill_driver.h       |  3 ++
+ 11 files changed, 125 insertions(+)
+
+diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.cc b/chrome/browser/ui/autofill/chrome_autofill_client.cc
+index 31c18bd793885..c270bf816f25d 100644
+--- a/chrome/browser/ui/autofill/chrome_autofill_client.cc
++++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc
+@@ -61,6 +61,9 @@
+ #include "chrome/browser/web_data_service_factory.h"
+ #include "chrome/common/channel_info.h"
+ #include "chrome/common/url_constants.h"
++#if BUILDFLAG(IS_ANDROID)
++#include "components/android_autofill/browser/android_autofill_manager.h"
++#endif // BUILDFLAG(IS_ANDROID)
+ #include "components/autofill/content/browser/autofill_log_router_factory.h"
+ #include "components/autofill/content/browser/content_autofill_driver.h"
+ #include "components/autofill/content/browser/content_autofill_driver_factory.h"
+@@ -1453,4 +1456,15 @@ void ChromeAutofillClient::InitAgent(
+   }
+ }
+ 
++std::unique_ptr<AutofillManager> ChromeAutofillClient::CreateSecondaryManager(
++    base::PassKey<ContentAutofillDriver> pass_key,
++    ContentAutofillDriver& driver) {
++  return std::make_unique<AndroidAutofillManager>(&driver, this);
++}
++
++void ChromeAutofillClient::InitSecondaryAgent(
++    base::PassKey<ContentAutofillDriverFactory> pass_key,
++    const mojo::AssociatedRemote<mojom::AutofillAgent>& agent) {
++}
++
+ }  // namespace autofill
+diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.h b/chrome/browser/ui/autofill/chrome_autofill_client.h
+index 598c40b4eb6dc..c33813b569997 100644
+--- a/chrome/browser/ui/autofill/chrome_autofill_client.h
++++ b/chrome/browser/ui/autofill/chrome_autofill_client.h
+@@ -296,6 +296,12 @@ class ChromeAutofillClient : public ContentAutofillClient,
+   void InitAgent(
+       base::PassKey<ContentAutofillDriverFactory> pass_key,
+       const mojo::AssociatedRemote<mojom::AutofillAgent>& agent) override;
++  std::unique_ptr<AutofillManager> CreateSecondaryManager(
++      base::PassKey<ContentAutofillDriver> pass_key,
++      ContentAutofillDriver& driver) override;
++  void InitSecondaryAgent(
++      base::PassKey<ContentAutofillDriverFactory> pass_key,
++      const mojo::AssociatedRemote<mojom::AutofillAgent>& agent) override;
+ 
+  protected:
+   explicit ChromeAutofillClient(content::WebContents* web_contents);
+diff --git a/components/android_autofill/browser/android_autofill_client.cc b/components/android_autofill/browser/android_autofill_client.cc
+index 557ed85cd56d9..55ccc058fd391 100644
+--- a/components/android_autofill/browser/android_autofill_client.cc
++++ b/components/android_autofill/browser/android_autofill_client.cc
+@@ -410,4 +410,16 @@ void AndroidAutofillClient::InitAgent(
+     const mojo::AssociatedRemote<autofill::mojom::AutofillAgent>& agent) {
+ }
+ 
++std::unique_ptr<autofill::AutofillManager> AndroidAutofillClient::CreateSecondaryManager(
++    base::PassKey<autofill::ContentAutofillDriver> pass_key,
++    autofill::ContentAutofillDriver& driver) {
++  return 0;
++}
++
++void AndroidAutofillClient::InitSecondaryAgent(
++    base::PassKey<autofill::ContentAutofillDriverFactory> pass_key,
++    const mojo::AssociatedRemote<autofill::mojom::AutofillAgent>& agent) {
++  // empty block, cannot use `NOTREACHED();`, this is also called in webview
++}
++
+ }  // namespace android_autofill
+diff --git a/components/android_autofill/browser/android_autofill_client.h b/components/android_autofill/browser/android_autofill_client.h
+index 89e84922e6adc..5b2e8150c5d7d 100644
+--- a/components/android_autofill/browser/android_autofill_client.h
++++ b/components/android_autofill/browser/android_autofill_client.h
+@@ -161,6 +161,12 @@ class AndroidAutofillClient : public autofill::ContentAutofillClient {
+   void InitAgent(base::PassKey<autofill::ContentAutofillDriverFactory> pass_key,
+                  const mojo::AssociatedRemote<autofill::mojom::AutofillAgent>&
+                      agent) override;
++  std::unique_ptr<autofill::AutofillManager> CreateSecondaryManager(
++      base::PassKey<autofill::ContentAutofillDriver> pass_key,
++      autofill::ContentAutofillDriver& driver) override;
++  void InitSecondaryAgent(
++      base::PassKey<autofill::ContentAutofillDriverFactory> pass_key,
++      const mojo::AssociatedRemote<autofill::mojom::AutofillAgent>& agent) override;
+ 
+  private:
+   friend class content::WebContentsUserData<AndroidAutofillClient>;
+diff --git a/components/autofill/content/browser/content_autofill_client.h b/components/autofill/content/browser/content_autofill_client.h
+index 19e42727f1969..166ddd51f6c99 100644
+--- a/components/autofill/content/browser/content_autofill_client.h
++++ b/components/autofill/content/browser/content_autofill_client.h
+@@ -41,6 +41,18 @@ class ContentAutofillClient
+       base::PassKey<ContentAutofillDriverFactory> pass_key,
+       const mojo::AssociatedRemote<mojom::AutofillAgent>& agent) = 0;
+ 
++  // Called by ContentAutofillDriver's constructor to inject embedder-specific
++  // behaviour. Implementations should not call into `driver`.
++  virtual std::unique_ptr<AutofillManager> CreateSecondaryManager(
++      base::PassKey<ContentAutofillDriver> pass_key,
++      ContentAutofillDriver& driver) = 0;
++
++  // Called by ContentAutofillDriverFactory to tweak the AutofillAgent in to the
++  // embedder's needs.
++  virtual void InitSecondaryAgent(
++      base::PassKey<ContentAutofillDriverFactory> pass_key,
++      const mojo::AssociatedRemote<mojom::AutofillAgent>& agent) = 0;
++
+  private:
+   friend class content::WebContentsUserData<ContentAutofillClient>;
+ 
+diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/components/autofill/content/browser/content_autofill_driver.cc
+index 71c12c2949d2f..c38a184961428 100644
+--- a/components/autofill/content/browser/content_autofill_driver.cc
++++ b/components/autofill/content/browser/content_autofill_driver.cc
+@@ -85,6 +85,7 @@ ContentAutofillDriver::ContentAutofillDriver(
+     ContentAutofillDriverFactory* owner)
+     : render_frame_host_(*render_frame_host), owner_(*owner) {
+   autofill_manager_ = owner_->client().CreateManager(/*pass_key=*/{}, *this);
++  secondary_autofill_manager_ = owner_->client().CreateSecondaryManager(/*pass_key=*/{}, *this);
+ }
+ 
+ ContentAutofillDriver::~ContentAutofillDriver() {
+@@ -160,6 +161,18 @@ AutofillManager& ContentAutofillDriver::GetAutofillManager() {
+   return *autofill_manager_;
+ }
+ 
++AutofillManager& ContentAutofillDriver::GetSecondaryAutofillManager() {
++  return *secondary_autofill_manager_;
++}
++
++bool ContentAutofillDriver::HasSecondaryAutofillManager() {
++  if (secondary_autofill_manager_) {
++    return true;
++  }
++
++  return false;
++}
++
+ std::optional<LocalFrameToken> ContentAutofillDriver::Resolve(
+     FrameToken query) {
+   if (absl::holds_alternative<LocalFrameToken>(query)) {
+@@ -423,6 +436,10 @@ void ContentAutofillDriver::FormsSeen(
+                         const std::vector<FormGlobalId>& removed_forms) {
+                        target->GetAutofillManager().OnFormsSeen(
+                            WithNewVersion(updated_forms), removed_forms);
++                       if (target->HasSecondaryAutofillManager()) {
++                         target->GetSecondaryAutofillManager().OnFormsSeen(
++                             WithNewVersion(updated_forms), removed_forms);
++                       }
+                      });
+ }
+ 
+@@ -440,6 +457,10 @@ void ContentAutofillDriver::FormSubmitted(
+          bool known_success, mojom::SubmissionSource submission_source) {
+         target->GetAutofillManager().OnFormSubmitted(
+             WithNewVersion(form), known_success, submission_source);
++        if (target->HasSecondaryAutofillManager()) {
++          target->GetSecondaryAutofillManager().OnFormSubmitted(
++              WithNewVersion(form), known_success, submission_source);
++        }
+       });
+ }
+ 
+@@ -461,6 +482,10 @@ void ContentAutofillDriver::TextFieldDidChange(const FormData& raw_form,
+          base::TimeTicks timestamp) {
+         target->GetAutofillManager().OnTextFieldDidChange(
+             WithNewVersion(form), field, bounding_box, timestamp);
++        if (target->HasSecondaryAutofillManager()) {
++          target->GetSecondaryAutofillManager().OnTextFieldDidChange(
++            WithNewVersion(form), field, bounding_box, timestamp);
++        }
+       });
+ }
+ 
+@@ -480,6 +505,10 @@ void ContentAutofillDriver::TextFieldDidScroll(const FormData& raw_form,
+          const FormFieldData& field, const gfx::RectF& bounding_box) {
+         target->GetAutofillManager().OnTextFieldDidScroll(WithNewVersion(form),
+                                                           field, bounding_box);
++        if (target->HasSecondaryAutofillManager()) {
++          target->GetSecondaryAutofillManager().OnTextFieldDidScroll(WithNewVersion(form),
++                                                            field, bounding_box);
++        }
+       });
+ }
+ 
+@@ -500,6 +529,10 @@ void ContentAutofillDriver::SelectControlDidChange(
+          const FormFieldData& field, const gfx::RectF& bounding_box) {
+         target->GetAutofillManager().OnSelectControlDidChange(
+             WithNewVersion(form), field, bounding_box);
++        if (target->HasSecondaryAutofillManager()) {
++          target->GetSecondaryAutofillManager().OnSelectControlDidChange(
++            WithNewVersion(form), field, bounding_box);
++        }
+       });
+ }
+ 
+@@ -522,6 +555,10 @@ void ContentAutofillDriver::AskForValuesToFill(
+          AutofillSuggestionTriggerSource trigger_source) {
+         target->GetAutofillManager().OnAskForValuesToFill(
+             WithNewVersion(form), field, bounding_box, trigger_source);
++        if (target->HasSecondaryAutofillManager()) {
++          target->GetSecondaryAutofillManager().OnAskForValuesToFill(
++            WithNewVersion(form), field, bounding_box, trigger_source);
++        }
+       });
+ }
+ 
+@@ -533,6 +570,9 @@ void ContentAutofillDriver::HidePopup() {
+     DCHECK(!target->IsPrerendering())
+         << "We should never affect UI while prerendering";
+     target->GetAutofillManager().OnHidePopup();
++    if (target->HasSecondaryAutofillManager()) {
++      target->GetSecondaryAutofillManager().OnHidePopup();
++    }
+   });
+ }
+ 
+@@ -544,6 +584,9 @@ void ContentAutofillDriver::FocusNoLongerOnForm(bool had_interacted_form) {
+       this, had_interacted_form,
+       [](autofill::AutofillDriver* target, bool had_interacted_form) {
+         target->GetAutofillManager().OnFocusNoLongerOnForm(had_interacted_form);
++        if (target->HasSecondaryAutofillManager()) {
++          target->GetSecondaryAutofillManager().OnFocusNoLongerOnForm(had_interacted_form);
++        }
+       });
+ }
+ 
+@@ -566,6 +609,9 @@ void ContentAutofillDriver::FocusOnFormField(const FormData& raw_form,
+       },
+       [](autofill::AutofillDriver* target) {
+         target->GetAutofillManager().OnFocusNoLongerOnForm(true);
++        if (target->HasSecondaryAutofillManager()) {
++          target->GetSecondaryAutofillManager().OnFocusNoLongerOnForm(true);
++        }
+       });
+ }
+ 
+@@ -580,6 +626,10 @@ void ContentAutofillDriver::DidFillAutofillFormData(const FormData& raw_form,
+          base::TimeTicks timestamp) {
+         target->GetAutofillManager().OnDidFillAutofillFormData(
+             WithNewVersion(form), timestamp);
++        if (target->HasSecondaryAutofillManager()) {
++          target->GetSecondaryAutofillManager().OnDidFillAutofillFormData(
++            WithNewVersion(form), timestamp);
++        }
+       });
+ }
+ 
+@@ -641,6 +691,9 @@ void ContentAutofillDriver::Reset() {
+   owner_->router().UnregisterDriver(this,
+                                     /*driver_is_dying=*/false);
+   autofill_manager_->Reset();
++  if (secondary_autofill_manager_) {
++    secondary_autofill_manager_->Reset();
++  }
+ }
+ 
+ const mojo::AssociatedRemote<mojom::AutofillAgent>&
+diff --git a/components/autofill/content/browser/content_autofill_driver.h b/components/autofill/content/browser/content_autofill_driver.h
+index 736c27911e20b..c37096948c0fb 100644
+--- a/components/autofill/content/browser/content_autofill_driver.h
++++ b/components/autofill/content/browser/content_autofill_driver.h
+@@ -156,6 +156,8 @@ class ContentAutofillDriver : public AutofillDriver,
+   std::optional<LocalFrameToken> Resolve(FrameToken query) override;
+   ContentAutofillDriver* GetParent() override;
+   AutofillManager& GetAutofillManager() override;
++  AutofillManager& GetSecondaryAutofillManager() override;
++  bool HasSecondaryAutofillManager() override;
+   bool IsInActiveFrame() const override;
+   bool IsInAnyMainFrame() const override;
+   bool IsPrerendering() const override;
+@@ -331,6 +333,8 @@ class ContentAutofillDriver : public AutofillDriver,
+   mojo::AssociatedRemote<mojom::AutofillAgent> autofill_agent_;
+ 
+   std::unique_ptr<AutofillManager> autofill_manager_ = nullptr;
++
++  std::unique_ptr<AutofillManager> secondary_autofill_manager_ = nullptr;
+ };
+ 
+ }  // namespace autofill
+diff --git a/components/autofill/content/browser/content_autofill_driver_factory.cc b/components/autofill/content/browser/content_autofill_driver_factory.cc
+index 0dd163004b217..d3e7cf69c283a 100644
+--- a/components/autofill/content/browser/content_autofill_driver_factory.cc
++++ b/components/autofill/content/browser/content_autofill_driver_factory.cc
+@@ -101,6 +101,7 @@ ContentAutofillDriver* ContentAutofillDriverFactory::DriverForFrame(
+       DCHECK_EQ(driver_map_.find(render_frame_host)->second.get(),
+                 driver.get());
+       client().InitAgent(/*pass_key=*/{}, driver->GetAutofillAgent());
++      client().InitSecondaryAgent(/*pass_key=*/{}, driver->GetAutofillAgent());
+     } else {
+       driver_map_.erase(iter);
+       DCHECK_EQ(driver_map_.count(render_frame_host), 0u);
+diff --git a/components/autofill/core/browser/autofill_driver.h b/components/autofill/core/browser/autofill_driver.h
+index f32d4340b5dfe..03efebeaa21dd 100644
+--- a/components/autofill/core/browser/autofill_driver.h
++++ b/components/autofill/core/browser/autofill_driver.h
+@@ -70,6 +70,12 @@ class AutofillDriver {
+   // Returns the AutofillManager owned by the AutofillDriver.
+   virtual AutofillManager& GetAutofillManager() = 0;
+ 
++  // Returns the secondary AutofillManager owned by the AutofillDriver.
++  virtual AutofillManager& GetSecondaryAutofillManager() = 0;
++
++  // Returns if there is a secondary AutofillManager owned by the AutofillDriver.
++  virtual bool HasSecondaryAutofillManager() = 0;
++
+   // Returns whether the AutofillDriver instance is associated with an active
+   // frame in the MPArch sense.
+   virtual bool IsInActiveFrame() const = 0;
+diff --git a/components/autofill/core/browser/test_autofill_driver.cc b/components/autofill/core/browser/test_autofill_driver.cc
+index 0d07793657acc..10d9e024b4c4b 100644
+--- a/components/autofill/core/browser/test_autofill_driver.cc
++++ b/components/autofill/core/browser/test_autofill_driver.cc
+@@ -13,4 +13,12 @@ AutofillManager& TestAutofillDriver::GetAutofillManager() {
+   return *autofill_manager_;
+ }
+ 
++AutofillManager& TestAutofillDriver::GetSecondaryAutofillManager() {
++  return *secondary_autofill_manager_;
++}
++
++bool TestAutofillDriver::HasSecondaryAutofillManager() {
++  return false;
++}
++
+ }  // namespace autofill
+diff --git a/components/autofill/core/browser/test_autofill_driver.h b/components/autofill/core/browser/test_autofill_driver.h
+index 4980ef107698b..15af50ef750a5 100644
+--- a/components/autofill/core/browser/test_autofill_driver.h
++++ b/components/autofill/core/browser/test_autofill_driver.h
+@@ -191,6 +191,8 @@ class TestAutofillDriver : public TestAutofillDriverTemplate<AutofillDriver> {
+ 
+   // AutofillDriver
+   AutofillManager& GetAutofillManager() override;
++  AutofillManager& GetSecondaryAutofillManager() override;
++  bool HasSecondaryAutofillManager() override;
+ 
+   void set_autofill_manager(std::unique_ptr<AutofillManager> autofill_manager) {
+     autofill_manager_ = std::move(autofill_manager);
+@@ -198,6 +200,7 @@ class TestAutofillDriver : public TestAutofillDriverTemplate<AutofillDriver> {
+ 
+  private:
+   std::unique_ptr<AutofillManager> autofill_manager_ = nullptr;
++  std::unique_ptr<AutofillManager> secondary_autofill_manager_ = nullptr;
+ };
+ 
+ }  // namespace autofill
diff --git a/build-chromium/patches/0115-Support-for-both-browser-and-android-autofill-functi.patch b/build-chromium/patches/0115-Support-for-both-browser-and-android-autofill-functi.patch
deleted file mode 100644
index 5b19e1f..0000000
--- a/build-chromium/patches/0115-Support-for-both-browser-and-android-autofill-functi.patch
+++ /dev/null
@@ -1,269 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: fgei <fgei@gmail.com>
-Date: Tue, 21 Feb 2023 01:48:15 +0000
-Subject: [PATCH] Support for both browser and android autofill functionality
-
----
- .../browser/android_autofill_manager.cc       | 15 ++++++
- .../browser/android_autofill_manager.h        | 15 ++++++
- .../browser/content_autofill_driver.cc        | 52 +++++++++++++++++++
- .../content/browser/content_autofill_driver.h |  8 +++
- .../autofill/core/browser/autofill_driver.h   |  6 +++
- 5 files changed, 96 insertions(+)
-
-diff --git a/components/android_autofill/browser/android_autofill_manager.cc b/components/android_autofill/browser/android_autofill_manager.cc
-index 0d51b11b639b6..de3e78c4eaec8 100644
---- a/components/android_autofill/browser/android_autofill_manager.cc
-+++ b/components/android_autofill/browser/android_autofill_manager.cc
-@@ -15,6 +15,7 @@
- #include "components/android_autofill/browser/autofill_provider.h"
- #include "components/android_autofill/browser/form_event_logger_weblayer_android.h"
- #include "components/autofill/content/browser/content_autofill_driver.h"
-+#include "components/autofill/core/browser/browser_autofill_manager.h"
- #include "components/autofill/core/common/mojom/autofill_types.mojom-shared.h"
- #include "content/public/browser/render_frame_host.h"
- #include "content/public/browser/web_contents.h"
-@@ -33,6 +34,20 @@ void AndroidDriverInitHook(AutofillClient* client,
-   driver->GetAutofillAgent()->SetQueryPasswordSuggestion(true);
- }
- 
-+void AndroidAndBrowserDriverInitHook(
-+    AutofillClient* client,
-+    const std::string& app_locale,
-+    ContentAutofillDriver* driver) {
-+  driver->set_autofill_manager(std::make_unique<BrowserAutofillManager>(
-+      driver, client, app_locale));
-+  driver->set_secondary_autofill_manager(base::WrapUnique(
-+      new AndroidAutofillManager(driver, client)));
-+  driver->GetAutofillAgent()->SetUserGestureRequired(false);
-+  driver->GetAutofillAgent()->SetSecureContextRequired(true);
-+  driver->GetAutofillAgent()->SetFocusRequiresScroll(false);
-+  driver->GetAutofillAgent()->SetQueryPasswordSuggestion(true);
-+}
-+
- AndroidAutofillManager::AndroidAutofillManager(AutofillDriver* driver,
-                                                AutofillClient* client)
-     : AutofillManager(driver, client) {
-diff --git a/components/android_autofill/browser/android_autofill_manager.h b/components/android_autofill/browser/android_autofill_manager.h
-index 9ef74e9a284a6..2972c6b08a156 100644
---- a/components/android_autofill/browser/android_autofill_manager.h
-+++ b/components/android_autofill/browser/android_autofill_manager.h
-@@ -23,6 +23,16 @@ class AutofillProvider;
- class ContentAutofillDriver;
- class FormEventLoggerWeblayerAndroid;
- 
-+// Creates an AndroidAutofillManager and attaches it to the `driver`.
-+//
-+// This hook is to be passed to CreateForWebContentsAndDelegate().
-+// It is the glue between ContentAutofillDriver[Factory] and
-+// AndroidAutofillManager, BrowserAutofillManager.
-+void AndroidAndBrowserDriverInitHook(
-+    AutofillClient* client,
-+    const std::string& app_locale,
-+    ContentAutofillDriver* driver);
-+
- // Creates an AndroidAutofillManager and attaches it to the `driver`.
- //
- // This hook is to be passed to CreateForWebContentsAndDelegate().
-@@ -92,6 +102,11 @@ class AndroidAutofillManager : public AutofillManager,
-                           PopupItemId popup_item_id) override;
- 
-  protected:
-+  friend void AndroidAndBrowserDriverInitHook(
-+      AutofillClient* client,
-+      const std::string& app_locale,
-+      ContentAutofillDriver* driver);
-+
-   friend void AndroidDriverInitHook(AutofillClient* client,
-                                     ContentAutofillDriver* driver);
- 
-diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/components/autofill/content/browser/content_autofill_driver.cc
-index 98437f9b05252..83d44f5932068 100644
---- a/components/autofill/content/browser/content_autofill_driver.cc
-+++ b/components/autofill/content/browser/content_autofill_driver.cc
-@@ -157,6 +157,18 @@ AutofillManager& ContentAutofillDriver::GetAutofillManager() {
-   return *autofill_manager_;
- }
- 
-+AutofillManager& ContentAutofillDriver::GetSecondaryAutofillManager() {
-+  return *secondary_autofill_manager_;
-+}
-+
-+bool ContentAutofillDriver::HasSecondaryAutofillManager() {
-+  if (secondary_autofill_manager_) {
-+    return true;
-+  }
-+
-+  return false;
-+}
-+
- absl::optional<LocalFrameToken> ContentAutofillDriver::Resolve(
-     FrameToken query) {
-   if (absl::holds_alternative<LocalFrameToken>(query)) {
-@@ -455,6 +467,10 @@ void ContentAutofillDriver::FormsSeen(
-                         const std::vector<FormGlobalId>& removed_forms) {
-                        target->GetAutofillManager().OnFormsSeen(
-                            WithNewVersion(updated_forms), removed_forms);
-+                       if (target->HasSecondaryAutofillManager()) {
-+                         target->GetSecondaryAutofillManager().OnFormsSeen(
-+                             WithNewVersion(updated_forms), removed_forms);
-+                       }
-                      });
- }
- 
-@@ -482,6 +498,10 @@ void ContentAutofillDriver::FormSubmitted(
-         }
-         target->GetAutofillManager().OnFormSubmitted(
-             WithNewVersion(form), known_success, submission_source);
-+        if (target->HasSecondaryAutofillManager()) {
-+          target->GetSecondaryAutofillManager().OnFormSubmitted(
-+              WithNewVersion(form), known_success, submission_source);
-+        }
-       });
- }
- 
-@@ -503,6 +523,10 @@ void ContentAutofillDriver::TextFieldDidChange(const FormData& raw_form,
-          base::TimeTicks timestamp) {
-         target->GetAutofillManager().OnTextFieldDidChange(
-             WithNewVersion(form), field, bounding_box, timestamp);
-+        if (target->HasSecondaryAutofillManager()) {
-+          target->GetSecondaryAutofillManager().OnTextFieldDidChange(
-+            WithNewVersion(form), field, bounding_box, timestamp);
-+        }
-       });
- }
- 
-@@ -522,6 +546,10 @@ void ContentAutofillDriver::TextFieldDidScroll(const FormData& raw_form,
-          const FormFieldData& field, const gfx::RectF& bounding_box) {
-         target->GetAutofillManager().OnTextFieldDidScroll(WithNewVersion(form),
-                                                           field, bounding_box);
-+        if (target->HasSecondaryAutofillManager()) {
-+          target->GetSecondaryAutofillManager().OnTextFieldDidScroll(WithNewVersion(form),
-+                                                            field, bounding_box);
-+        }
-       });
- }
- 
-@@ -542,6 +570,10 @@ void ContentAutofillDriver::SelectControlDidChange(
-          const FormFieldData& field, const gfx::RectF& bounding_box) {
-         target->GetAutofillManager().OnSelectControlDidChange(
-             WithNewVersion(form), field, bounding_box);
-+        if (target->HasSecondaryAutofillManager()) {
-+          target->GetSecondaryAutofillManager().OnSelectControlDidChange(
-+            WithNewVersion(form), field, bounding_box);
-+        }
-       });
- }
- 
-@@ -564,6 +596,10 @@ void ContentAutofillDriver::AskForValuesToFill(
-          AutofillSuggestionTriggerSource trigger_source) {
-         target->GetAutofillManager().OnAskForValuesToFill(
-             WithNewVersion(form), field, bounding_box, trigger_source);
-+        if (target->HasSecondaryAutofillManager()) {
-+          target->GetSecondaryAutofillManager().OnAskForValuesToFill(
-+            WithNewVersion(form), field, bounding_box, trigger_source);
-+        }
-       });
- }
- 
-@@ -575,6 +611,9 @@ void ContentAutofillDriver::HidePopup() {
-     DCHECK(!target->IsPrerendering())
-         << "We should never affect UI while prerendering";
-     target->GetAutofillManager().OnHidePopup();
-+    if (target->HasSecondaryAutofillManager()) {
-+      target->GetSecondaryAutofillManager().OnHidePopup();
-+    }
-   });
- }
- 
-@@ -586,6 +625,9 @@ void ContentAutofillDriver::FocusNoLongerOnForm(bool had_interacted_form) {
-       this, had_interacted_form,
-       [](autofill::AutofillDriver* target, bool had_interacted_form) {
-         target->GetAutofillManager().OnFocusNoLongerOnForm(had_interacted_form);
-+        if (target->HasSecondaryAutofillManager()) {
-+          target->GetSecondaryAutofillManager().OnFocusNoLongerOnForm(had_interacted_form);
-+        }
-       });
- }
- 
-@@ -608,6 +650,9 @@ void ContentAutofillDriver::FocusOnFormField(const FormData& raw_form,
-       },
-       [](autofill::AutofillDriver* target) {
-         target->GetAutofillManager().OnFocusNoLongerOnForm(true);
-+        if (target->HasSecondaryAutofillManager()) {
-+          target->GetSecondaryAutofillManager().OnFocusNoLongerOnForm(true);
-+        }
-       });
- }
- 
-@@ -622,6 +667,10 @@ void ContentAutofillDriver::DidFillAutofillFormData(const FormData& raw_form,
-          base::TimeTicks timestamp) {
-         target->GetAutofillManager().OnDidFillAutofillFormData(
-             WithNewVersion(form), timestamp);
-+        if (target->HasSecondaryAutofillManager()) {
-+          target->GetSecondaryAutofillManager().OnDidFillAutofillFormData(
-+            WithNewVersion(form), timestamp);
-+        }
-       });
- }
- 
-@@ -686,6 +735,9 @@ void ContentAutofillDriver::Reset() {
-   owner_->router().UnregisterDriver(this,
-                                     /*driver_is_dying=*/false);
-   autofill_manager_->Reset();
-+  if (secondary_autofill_manager_) {
-+    secondary_autofill_manager_->Reset();
-+  }
- }
- 
- const mojo::AssociatedRemote<mojom::AutofillAgent>&
-diff --git a/components/autofill/content/browser/content_autofill_driver.h b/components/autofill/content/browser/content_autofill_driver.h
-index 2bf1c751de4eb..1851045fdf3ea 100644
---- a/components/autofill/content/browser/content_autofill_driver.h
-+++ b/components/autofill/content/browser/content_autofill_driver.h
-@@ -132,6 +132,10 @@ class ContentAutofillDriver : public AutofillDriver,
-     autofill_manager_ = std::move(autofill_manager);
-   }
- 
-+  void set_secondary_autofill_manager(std::unique_ptr<AutofillManager> secondary_autofill_manager) {
-+    secondary_autofill_manager_ = std::move(secondary_autofill_manager);
-+  }
-+
-   content::RenderFrameHost* render_frame_host() { return &*render_frame_host_; }
-   const content::RenderFrameHost* render_frame_host() const {
-     return &*render_frame_host_;
-@@ -160,6 +164,8 @@ class ContentAutofillDriver : public AutofillDriver,
-   absl::optional<LocalFrameToken> Resolve(FrameToken query) override;
-   ContentAutofillDriver* GetParent() override;
-   AutofillManager& GetAutofillManager() override;
-+  AutofillManager& GetSecondaryAutofillManager() override;
-+  bool HasSecondaryAutofillManager() override;
-   bool IsInActiveFrame() const override;
-   bool IsInAnyMainFrame() const override;
-   bool IsPrerendering() const override;
-@@ -351,6 +357,8 @@ class ContentAutofillDriver : public AutofillDriver,
- 
-   std::unique_ptr<AutofillManager> autofill_manager_ = nullptr;
- 
-+  std::unique_ptr<AutofillManager> secondary_autofill_manager_ = nullptr;
-+
-   mojo::AssociatedReceiver<mojom::AutofillDriver> receiver_{this};
- 
-   mojo::AssociatedRemote<mojom::AutofillAgent> autofill_agent_;
-diff --git a/components/autofill/core/browser/autofill_driver.h b/components/autofill/core/browser/autofill_driver.h
-index ed61f8b928a1e..c5a2e80443223 100644
---- a/components/autofill/core/browser/autofill_driver.h
-+++ b/components/autofill/core/browser/autofill_driver.h
-@@ -69,6 +69,12 @@ class AutofillDriver {
-   // Returns the AutofillManager owned by the AutofillDriver.
-   virtual AutofillManager& GetAutofillManager() = 0;
- 
-+  // Returns the secondary AutofillManager owned by the AutofillDriver.
-+  virtual AutofillManager& GetSecondaryAutofillManager() = 0;
-+
-+  // Returns if there is a secondary AutofillManager owned by the AutofillDriver.
-+  virtual bool HasSecondaryAutofillManager() = 0;
-+
-   // Returns whether the AutofillDriver instance is associated with an active
-   // frame in the MPArch sense.
-   virtual bool IsInActiveFrame() const = 0;
diff --git a/build-chromium/patches/0116-Support-native-Android-autofill-at-browser.patch b/build-chromium/patches/0115-Support-native-Android-autofill-at-browser.patch
similarity index 82%
rename from build-chromium/patches/0116-Support-native-Android-autofill-at-browser.patch
rename to build-chromium/patches/0115-Support-native-Android-autofill-at-browser.patch
index d687b0e..1c7d802 100644
--- a/build-chromium/patches/0116-Support-native-Android-autofill-at-browser.patch
+++ b/build-chromium/patches/0115-Support-native-Android-autofill-at-browser.patch
@@ -7,43 +7,21 @@
 entries, reusing the codebase used for webview's android autofill
 support.
 ---
- android_webview/browser/aw_autofill_client.cc |  4 ++
  chrome/android/BUILD.gn                       |  1 +
- .../chromium/chrome/browser/tab/TabImpl.java  | 44 +++++++++++++++++
+ .../chromium/chrome/browser/tab/TabImpl.java  | 45 +++++++++++++++++
  .../browser/tab/TabViewAndroidDelegate.java   | 13 +++++
  chrome/browser/BUILD.gn                       |  7 +++
- .../ui/autofill/chrome_autofill_client.cc     | 14 +++++-
+ .../ui/autofill/chrome_autofill_client.cc     |  4 ++
+ .../browser/android_autofill_client.cc        |  4 ++
  .../embedder_support/view/ContentView.java    | 48 +++++++++++++++++++
  .../chromium/ui/base/ViewAndroidDelegate.java |  8 ++++
- 8 files changed, 138 insertions(+), 1 deletion(-)
+ 8 files changed, 130 insertions(+)
 
-diff --git a/android_webview/browser/aw_autofill_client.cc b/android_webview/browser/aw_autofill_client.cc
-index e78b00768655b..4a76d9c0502c8 100644
---- a/android_webview/browser/aw_autofill_client.cc
-+++ b/android_webview/browser/aw_autofill_client.cc
-@@ -73,6 +73,7 @@ AwAutofillClient::GetURLLoaderFactory() {
- 
- autofill::AutofillCrowdsourcingManager*
- AwAutofillClient::GetCrowdsourcingManager() {
-+#if defined(USE_BROWSER_AUTOFILL_ONLY)
-   if (autofill::AutofillProvider::
-           is_crowdsourcing_manager_disabled_for_testing()) {
-     return nullptr;
-@@ -84,6 +85,9 @@ AwAutofillClient::GetCrowdsourcingManager() {
-             this, GetChannel(), GetLogManager());
-   }
-   return crowdsourcing_manager_.get();
-+#else
-+  return nullptr;
-+#endif // defined(USE_BROWSER_AUTOFILL_ONLY)
- }
- 
- autofill::PersonalDataManager* AwAutofillClient::GetPersonalDataManager() {
 diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
-index dac7963df6224..b85c663c9a714 100644
+index fec47e97f8fe6..bd79fac82ab09 100644
 --- a/chrome/android/BUILD.gn
 +++ b/chrome/android/BUILD.gn
-@@ -467,6 +467,7 @@ if (current_toolchain == default_toolchain) {
+@@ -472,6 +472,7 @@ if (current_toolchain == default_toolchain) {
        "//chrome/browser/xsurface:java",
        "//chrome/browser/xsurface_provider:dependency_provider_impl_java",
        "//chrome/browser/xsurface_provider:java",
@@ -52,13 +30,13 @@
        "//components/background_task_scheduler:background_task_scheduler_java",
        "//components/background_task_scheduler:background_task_scheduler_task_ids_java",
 diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java
-index f5f10dd2f13a1..97c29c85df08b 100644
+index 4fca840ad3a78..88cfd11aa8045 100644
 --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java
 +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java
-@@ -10,10 +10,14 @@ import android.annotation.SuppressLint;
- import android.app.Activity;
+@@ -9,10 +9,14 @@ import android.app.Activity;
  import android.content.Context;
  import android.graphics.Rect;
+ import android.net.Uri;
 +import android.os.Build;
  import android.text.TextUtils;
 +import android.util.SparseArray;
@@ -70,18 +48,19 @@
  
  import androidx.annotation.NonNull;
  import androidx.annotation.Nullable;
-@@ -51,6 +55,7 @@ import org.chromium.chrome.browser.rlz.RevenueStats;
+@@ -54,6 +58,8 @@ import org.chromium.chrome.browser.tab.Tab.LoadUrlResult;
  import org.chromium.chrome.browser.tab.TabUtils.UseDesktopUserAgentCaller;
  import org.chromium.chrome.browser.ui.native_page.FrozenNativePage;
  import org.chromium.chrome.browser.ui.native_page.NativePage;
 +import org.chromium.components.autofill.AutofillProvider;
++// import org.chromium.components.autofill.AutofillSelectionMenuItemHelper;
  import org.chromium.components.dom_distiller.core.DomDistillerUrlUtils;
  import org.chromium.components.embedder_support.util.UrlConstants;
  import org.chromium.components.embedder_support.view.ContentView;
-@@ -64,9 +69,11 @@ import org.chromium.content_public.browser.ChildProcessImportance;
- import org.chromium.content_public.browser.ContentFeatureList;
+@@ -65,9 +71,11 @@ import org.chromium.content_public.browser.ContentFeatureList;
  import org.chromium.content_public.browser.ContentFeatureMap;
  import org.chromium.content_public.browser.LoadUrlParams;
+ import org.chromium.content_public.browser.NavigationHandle;
 +import org.chromium.content_public.browser.SelectionPopupController;
  import org.chromium.content_public.browser.WebContents;
  import org.chromium.content_public.browser.WebContentsAccessibility;
@@ -90,15 +69,15 @@
  import org.chromium.ui.base.PageTransition;
  import org.chromium.ui.base.ViewAndroidDelegate;
  import org.chromium.ui.base.WindowAndroid;
-@@ -200,6 +207,7 @@ class TabImpl implements Tab {
-     private int mParentId = INVALID_TAB_ID;
+@@ -203,6 +211,7 @@ class TabImpl implements Tab {
      private int mRootId;
+     private @Nullable Token mTabGroupId;
      private @TabUserAgent int mUserAgent = TabUserAgent.DEFAULT;
 +    AutofillProvider mAutofillProvider;
  
      /**
       * Navigation state of the WebContents as returned by nativeGetContentsStateAsByteBuffer(),
-@@ -259,12 +267,18 @@ class TabImpl implements Tab {
+@@ -271,12 +280,18 @@ class TabImpl implements Tab {
                      public void onViewAttachedToWindow(View view) {
                          mIsViewAttachedToWindow = true;
                          updateInteractableState();
@@ -117,7 +96,7 @@
                      }
                  };
          mTabViewManager = new TabViewManagerImpl(this);
-@@ -844,6 +858,11 @@ class TabImpl implements Tab {
+@@ -857,6 +872,11 @@ class TabImpl implements Tab {
          for (TabObserver observer : mObservers) observer.onDestroyed(this);
          mObservers.clear();
  
@@ -129,7 +108,7 @@
          mUserDataHost.destroy();
          mTabViewManager.destroy();
          hideNativePage(false, null);
-@@ -1424,6 +1443,18 @@ class TabImpl implements Tab {
+@@ -1454,6 +1474,18 @@ class TabImpl implements Tab {
          return mWebContentsState == null ? -1 : mWebContentsState.version();
      }
  
@@ -148,7 +127,7 @@
      /**
       * Initializes the {@link WebContents}. Completes the browser content components initialization
       * around a native WebContents pointer.
-@@ -1479,6 +1510,12 @@ class TabImpl implements Tab {
+@@ -1509,6 +1541,12 @@ class TabImpl implements Tab {
              boolean isBackgroundTab = isDetached();
  
              assert mNativeTabAndroid != 0;
@@ -161,7 +140,7 @@
              TabImplJni.get()
                      .initWebContents(
                              mNativeTabAndroid,
-@@ -1489,6 +1526,13 @@ class TabImpl implements Tab {
+@@ -1519,6 +1557,13 @@ class TabImpl implements Tab {
                              new TabContextMenuPopulatorFactory(
                                      mDelegateFactory.createContextMenuPopulatorFactory(this),
                                      this));
@@ -208,10 +187,10 @@
      public void onTopControlsChanged(
              int topControlsOffsetY, int contentOffsetY, int topControlsMinHeightOffsetY) {
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
-index afdf577837a49..d18e8c3ec8661 100644
+index e9c28ab05bd01..d8685ce0ef18c 100644
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -2662,6 +2662,13 @@ static_library("browser") {
+@@ -2660,6 +2660,13 @@ static_library("browser") {
      deps += [ "//chrome/browser/error_reporting" ]
    }
  
@@ -226,20 +205,10 @@
      deps += [
        "//ui/events/ozone",
 diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.cc b/chrome/browser/ui/autofill/chrome_autofill_client.cc
-index 4707fc2d949d2..e762cddf40665 100644
+index c270bf816f25d..4e592b70f7ba7 100644
 --- a/chrome/browser/ui/autofill/chrome_autofill_client.cc
 +++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc
-@@ -58,6 +58,9 @@
- #include "chrome/browser/web_data_service_factory.h"
- #include "chrome/common/channel_info.h"
- #include "chrome/common/url_constants.h"
-+#if BUILDFLAG(IS_ANDROID)
-+#include "components/android_autofill/browser/android_autofill_manager.h"
-+#endif // BUILDFLAG(IS_ANDROID)
- #include "components/autofill/content/browser/autofill_log_router_factory.h"
- #include "components/autofill/content/browser/content_autofill_driver.h"
- #include "components/autofill/content/browser/content_autofill_driver_factory.h"
-@@ -218,12 +221,16 @@ ChromeAutofillClient::GetURLLoaderFactory() {
+@@ -245,12 +245,16 @@ ChromeAutofillClient::GetURLLoaderFactory() {
  }
  
  AutofillCrowdsourcingManager* ChromeAutofillClient::GetCrowdsourcingManager() {
@@ -256,20 +225,28 @@
  }
  
  AutofillOptimizationGuide* ChromeAutofillClient::GetAutofillOptimizationGuide()
-@@ -1362,7 +1369,12 @@ void ChromeAutofillClient::OnZoomChanged(
- ChromeAutofillClient::ChromeAutofillClient(content::WebContents* web_contents)
-     : ContentAutofillClient(
-           web_contents,
--          base::BindRepeating(&BrowserDriverInitHook,
-+          base::BindRepeating(
-+#if BUILDFLAG(IS_ANDROID)
-+                              &AndroidAndBrowserDriverInitHook,
+diff --git a/components/android_autofill/browser/android_autofill_client.cc b/components/android_autofill/browser/android_autofill_client.cc
+index 55ccc058fd391..8247c5b9faf3c 100644
+--- a/components/android_autofill/browser/android_autofill_client.cc
++++ b/components/android_autofill/browser/android_autofill_client.cc
+@@ -73,6 +73,7 @@ AndroidAutofillClient::GetURLLoaderFactory() {
+ 
+ autofill::AutofillCrowdsourcingManager*
+ AndroidAutofillClient::GetCrowdsourcingManager() {
++#if defined(USE_BROWSER_AUTOFILL_ONLY)
+   if (autofill::AutofillProvider::
+           is_crowdsourcing_manager_disabled_for_testing()) {
+     return nullptr;
+@@ -84,6 +85,9 @@ AndroidAutofillClient::GetCrowdsourcingManager() {
+             this, GetChannel(), GetLogManager());
+   }
+   return crowdsourcing_manager_.get();
 +#else
-+                              &BrowserDriverInitHook,
-+#endif // BUILDFLAG(IS_ANDROID)
-                               this,
-                               g_browser_process->GetApplicationLocale())),
-       content::WebContentsObserver(web_contents),
++  return nullptr;
++#endif // defined(USE_BROWSER_AUTOFILL_ONLY)
+ }
+ 
+ autofill::PersonalDataManager* AndroidAutofillClient::GetPersonalDataManager() {
 diff --git a/components/embedder_support/android/java/src/org/chromium/components/embedder_support/view/ContentView.java b/components/embedder_support/android/java/src/org/chromium/components/embedder_support/view/ContentView.java
 index abe1ac2b7907d..9cf691982660d 100644
 --- a/components/embedder_support/android/java/src/org/chromium/components/embedder_support/view/ContentView.java
@@ -356,7 +333,7 @@
 +    }
  }
 diff --git a/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java b/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java
-index 0bd9924087048..b2b110c91c1c3 100644
+index 99b29f07becf9..25c744ce5d74e 100644
 --- a/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java
 +++ b/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java
 @@ -32,6 +32,10 @@ import org.chromium.ui.dragdrop.DragStateTracker;
@@ -370,7 +347,7 @@
  /** Class to acquire, position, and remove anchor views from the implementing View. */
  @JNINamespace("ui")
  public class ViewAndroidDelegate {
-@@ -586,4 +590,8 @@ public class ViewAndroidDelegate {
+@@ -573,4 +577,8 @@ public class ViewAndroidDelegate {
          sDragAndDropDelegateForTesting = testDelegate;
          ResettersForTesting.register(() -> sDragAndDropDelegateForTesting = null);
      }
diff --git a/build-chromium/patches/0117-Disable-Play-services-dependent-password-manager-pre.patch b/build-chromium/patches/0116-Disable-Play-services-dependent-password-manager-pre.patch
similarity index 87%
rename from build-chromium/patches/0117-Disable-Play-services-dependent-password-manager-pre.patch
rename to build-chromium/patches/0116-Disable-Play-services-dependent-password-manager-pre.patch
index c487ed5..439c41b 100644
--- a/build-chromium/patches/0117-Disable-Play-services-dependent-password-manager-pre.patch
+++ b/build-chromium/patches/0116-Disable-Play-services-dependent-password-manager-pre.patch
@@ -9,17 +9,16 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/components/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc
-index 85006f2848dde..76521f56db4a7 100644
+index 2483866d026a6..83a596f04f0ca 100644
 --- a/components/password_manager/core/browser/password_manager.cc
 +++ b/components/password_manager/core/browser/password_manager.cc
-@@ -303,9 +303,9 @@ void PasswordManager::RegisterProfilePrefs(
+@@ -301,8 +301,8 @@ void PasswordManager::RegisterProfilePrefs(
        user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
    registry->RegisterBooleanPref(prefs::kPasswordsPrefWithNewLabelUsed, false);
  #if BUILDFLAG(IS_ANDROID)
 -  registry->RegisterBooleanPref(prefs::kOfferToSavePasswordsEnabledGMS, true);
-+  registry->RegisterBooleanPref(prefs::kOfferToSavePasswordsEnabledGMS, false);
-   registry->RegisterBooleanPref(prefs::kSavePasswordsSuspendedByError, false);
 -  registry->RegisterBooleanPref(prefs::kAutoSignInEnabledGMS, true);
++  registry->RegisterBooleanPref(prefs::kOfferToSavePasswordsEnabledGMS, false);
 +  registry->RegisterBooleanPref(prefs::kAutoSignInEnabledGMS, false);
    registry->RegisterBooleanPref(prefs::kSettingsMigratedToUPMLocal, false);
    registry->RegisterIntegerPref(