scripts: build-chromium: Update to 121.0.6167.71
* Patches from https://github.com/GrapheneOS/Vanadium/tree/d40275b1366e1693b06b7ea722bf65dfa4e82945/patches
Change-Id: If839da150386fde1217ae641a9d42141aef59354
diff --git a/build-chromium/build-chromium.sh b/build-chromium/build-chromium.sh
index 98961ed..b947f5d 100755
--- a/build-chromium/build-chromium.sh
+++ b/build-chromium/build-chromium.sh
@@ -2,8 +2,8 @@
set -e
-chromium_version="119.0.6045.66"
-chromium_code="604506600"
+chromium_version="121.0.6167.71"
+chromium_code="616710100"
clean=0
gsync=0
supported_archs=(arm64 x64)
@@ -89,7 +89,7 @@
if [ $gsync -eq 1 ]; then
find src -name index.lock -delete
- yes | gclient sync -R -r $chromium_version --no-history
+ yes | gclient sync -D -R -r $chromium_version --no-history
fi
cd src
diff --git a/build-chromium/fetch-patches.sh b/build-chromium/fetch-patches.sh
new file mode 100755
index 0000000..c471ada
--- /dev/null
+++ b/build-chromium/fetch-patches.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+PATCHES_UPSTREAM=$(curl --silent https://github.com/GrapheneOS/Vanadium/tree/main/patches | jq)
+
+for PATCH in patches/*.patch; do
+ PATCH=$(basename $PATCH)
+ NUM=$(echo $PATCH | cut -f1 -d '-')
+ PATCHNAME=$(echo $PATCH | sed -e "s/^$NUM-//g")
+ NEWNAME=$(echo "$PATCHES_UPSTREAM" | grep -e "\"[0-9]*-$PATCHNAME\"")
+ NEWNAME=$(echo "$NEWNAME" | cut -f4 -d '"')
+ if [ -z "$NEWNAME" ]; then
+ echo "Missing patch $PATCH"
+ exit 1
+ fi
+
+ 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/0015-disable-first-run-welcome-page.patch b/build-chromium/patches/0011-disable-first-run-welcome-page.patch
similarity index 68%
rename from build-chromium/patches/0015-disable-first-run-welcome-page.patch
rename to build-chromium/patches/0011-disable-first-run-welcome-page.patch
index 7122e51..69138ac 100644
--- a/build-chromium/patches/0015-disable-first-run-welcome-page.patch
+++ b/build-chromium/patches/0011-disable-first-run-welcome-page.patch
@@ -4,19 +4,18 @@
Subject: [PATCH] disable first run welcome page
---
- .../org/chromium/chrome/browser/firstrun/FirstRunUtils.java | 3 ---
- .../chromium/chrome/browser/firstrun/FirstRunStatus.java | 6 +++++-
- 2 files changed, 5 insertions(+), 4 deletions(-)
+ .../org/chromium/chrome/browser/firstrun/FirstRunUtils.java | 2 --
+ .../org/chromium/chrome/browser/firstrun/FirstRunStatus.java | 4 ++--
+ 2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java
-index 4b20c1479a6b2..a69c381c7a24b 100644
+index 5872eb1c431ec..a41c17edde919 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunUtils.java
-@@ -44,15 +44,12 @@ public class FirstRunUtils {
- boolean javaPrefValue =
+@@ -47,14 +47,12 @@ public class FirstRunUtils {
javaPrefs.readBoolean(ChromePreferenceKeys.FIRST_RUN_CACHED_TOS_ACCEPTED, false);
boolean nativePrefValue = isFirstRunEulaAccepted();
-- boolean isFirstRunComplete = FirstRunStatus.getFirstRunFlowComplete();
+ boolean isFirstRunComplete = FirstRunStatus.getFirstRunFlowComplete();
- if (javaPrefValue || nativePrefValue || isFirstRunComplete) {
if (!javaPrefValue) {
javaPrefs.writeBoolean(ChromePreferenceKeys.FIRST_RUN_CACHED_TOS_ACCEPTED, true);
@@ -29,19 +28,16 @@
/**
diff --git a/chrome/browser/first_run/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunStatus.java b/chrome/browser/first_run/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunStatus.java
-index 12c311490bd72..cea4d48c0b68c 100644
+index 4aedb8a0f1d95..cff008ce39b67 100644
--- a/chrome/browser/first_run/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunStatus.java
+++ b/chrome/browser/first_run/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunStatus.java
-@@ -52,8 +52,12 @@ public class FirstRunStatus {
+@@ -50,8 +50,8 @@ public class FirstRunStatus {
* includes ToS and Sign In pages if necessary.
*/
public static boolean getFirstRunFlowComplete() {
-- return SharedPreferencesManager.getInstance().readBoolean(
-+ boolean complete = SharedPreferencesManager.getInstance().readBoolean(
- ChromePreferenceKeys.FIRST_RUN_FLOW_COMPLETE, false);
-+ if (!complete) {
-+ setFirstRunFlowComplete(true);
-+ }
+- return ChromeSharedPreferences.getInstance()
+- .readBoolean(ChromePreferenceKeys.FIRST_RUN_FLOW_COMPLETE, false);
++ setFirstRunFlowComplete(true);
+ return true;
}
diff --git a/build-chromium/patches/0022-disable-metrics-by-default.patch b/build-chromium/patches/0018-disable-metrics-by-default.patch
similarity index 88%
rename from build-chromium/patches/0022-disable-metrics-by-default.patch
rename to build-chromium/patches/0018-disable-metrics-by-default.patch
index 154b925..b6421fd 100644
--- a/build-chromium/patches/0022-disable-metrics-by-default.patch
+++ b/build-chromium/patches/0018-disable-metrics-by-default.patch
@@ -8,10 +8,10 @@
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 acff31fc619da..5998d035d5303 100644
+index ef301742b77fa..03b150acf1c18 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
-@@ -57,7 +57,7 @@ public abstract class FirstRunActivityBase
+@@ -63,7 +63,7 @@ public abstract class FirstRunActivityBase extends AsyncInitializationActivity
static final String SHOW_SEARCH_ENGINE_PAGE = "ShowSearchEnginePage";
static final String SHOW_SYNC_CONSENT_PAGE = "ShowSyncConsent";
diff --git a/build-chromium/patches/0024-disable-showing-popular-sites-by-default.patch b/build-chromium/patches/0020-disable-showing-popular-sites-by-default.patch
similarity index 100%
rename from build-chromium/patches/0024-disable-showing-popular-sites-by-default.patch
rename to build-chromium/patches/0020-disable-showing-popular-sites-by-default.patch
diff --git a/build-chromium/patches/0025-disable-article-suggestions-feature-by-default.patch b/build-chromium/patches/0021-disable-article-suggestions-feature-by-default.patch
similarity index 100%
rename from build-chromium/patches/0025-disable-article-suggestions-feature-by-default.patch
rename to build-chromium/patches/0021-disable-article-suggestions-feature-by-default.patch
diff --git a/build-chromium/patches/0026-disable-content-feed-suggestions-by-default.patch b/build-chromium/patches/0022-disable-content-feed-suggestions-by-default.patch
similarity index 91%
rename from build-chromium/patches/0026-disable-content-feed-suggestions-by-default.patch
rename to build-chromium/patches/0022-disable-content-feed-suggestions-by-default.patch
index c9dff80..f762170 100644
--- a/build-chromium/patches/0026-disable-content-feed-suggestions-by-default.patch
+++ b/build-chromium/patches/0022-disable-content-feed-suggestions-by-default.patch
@@ -8,10 +8,10 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/feed/feed_feature_list.cc b/components/feed/feed_feature_list.cc
-index acda50bc47a18..646098ffeb184 100644
+index c1c92dba8b006..6e7a7949c3788 100644
--- a/components/feed/feed_feature_list.cc
+++ b/components/feed/feed_feature_list.cc
-@@ -21,7 +21,7 @@ namespace feed {
+@@ -23,7 +23,7 @@ namespace feed {
// changed, please update the cached one's default value in CachedFeatureFlags.
BASE_FEATURE(kInterestFeedV2,
"InterestFeedV2",
diff --git a/build-chromium/patches/0031-disable-payment-support-by-default.patch b/build-chromium/patches/0027-disable-payment-support-by-default.patch
similarity index 100%
rename from build-chromium/patches/0031-disable-payment-support-by-default.patch
rename to build-chromium/patches/0027-disable-payment-support-by-default.patch
diff --git a/build-chromium/patches/0032-disable-media-router-media-remoting-by-default.patch b/build-chromium/patches/0028-disable-media-router-media-remoting-by-default.patch
similarity index 90%
rename from build-chromium/patches/0032-disable-media-router-media-remoting-by-default.patch
rename to build-chromium/patches/0028-disable-media-router-media-remoting-by-default.patch
index 9d0e5e7..161066e 100644
--- a/build-chromium/patches/0032-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 b7327c8577bf1..74d96b65e856d 100644
+index 764d9243637f6..b0329e4476ac8 100644
--- a/chrome/browser/media/router/media_router_feature.cc
+++ b/chrome/browser/media/router/media_router_feature.cc
-@@ -147,7 +147,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
+@@ -146,7 +146,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
registry->RegisterStringPref(prefs::kMediaRouterReceiverIdHashToken, "",
PrefRegistry::PUBLIC);
registry->RegisterBooleanPref(
diff --git a/build-chromium/patches/0033-disable-media-router-by-default.patch b/build-chromium/patches/0029-disable-media-router-by-default.patch
similarity index 86%
rename from build-chromium/patches/0033-disable-media-router-by-default.patch
rename to build-chromium/patches/0029-disable-media-router-by-default.patch
index 1905730..63e1d1b 100644
--- a/build-chromium/patches/0033-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 74d96b65e856d..2d94eac346998 100644
+index b0329e4476ac8..4c5cc00da7040 100644
--- a/chrome/browser/media/router/media_router_feature.cc
+++ b/chrome/browser/media/router/media_router_feature.cc
-@@ -134,7 +134,7 @@ bool MediaRouterEnabled(content::BrowserContext* context) {
+@@ -133,7 +133,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 90859a99248a4..a48e967d93ae7 100644
+index 52a5f08810e85..1933b09a29c74 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
-@@ -412,7 +412,7 @@ void ProfileImpl::RegisterProfilePrefs(
+@@ -417,7 +417,7 @@ void ProfileImpl::RegisterProfilePrefs(
#endif
registry->RegisterBooleanPref(prefs::kForceEphemeralProfiles, false);
diff --git a/build-chromium/patches/0034-disable-offering-translations-by-default.patch b/build-chromium/patches/0030-disable-offering-translations-by-default.patch
similarity index 96%
rename from build-chromium/patches/0034-disable-offering-translations-by-default.patch
rename to build-chromium/patches/0030-disable-offering-translations-by-default.patch
index 9e32ebe..2ae7a62 100644
--- a/build-chromium/patches/0034-disable-offering-translations-by-default.patch
+++ b/build-chromium/patches/0030-disable-offering-translations-by-default.patch
@@ -8,7 +8,7 @@
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 83d3c4331fcda..f97970e4852bc 100644
+index 95d3988d536f9..5218968346864 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) {
diff --git a/build-chromium/patches/0035-disable-browser-sign-in-feature-by-default.patch b/build-chromium/patches/0031-disable-browser-sign-in-feature-by-default.patch
similarity index 85%
rename from build-chromium/patches/0035-disable-browser-sign-in-feature-by-default.patch
rename to build-chromium/patches/0031-disable-browser-sign-in-feature-by-default.patch
index 3b20402..b6a58f4 100644
--- a/build-chromium/patches/0035-disable-browser-sign-in-feature-by-default.patch
+++ b/build-chromium/patches/0031-disable-browser-sign-in-feature-by-default.patch
@@ -9,10 +9,10 @@
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 c495783de021a..430eac0cf5da8 100644
+index 222ba8a3084aa..496a2ed2c65b6 100644
--- a/chrome/browser/signin/account_consistency_mode_manager.cc
+++ b/chrome/browser/signin/account_consistency_mode_manager.cc
-@@ -119,7 +119,7 @@ AccountConsistencyModeManager::~AccountConsistencyModeManager() {}
+@@ -123,7 +123,7 @@ AccountConsistencyModeManager::~AccountConsistencyModeManager() {}
// static
void AccountConsistencyModeManager::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
@@ -22,11 +22,11 @@
// static
diff --git a/components/signin/internal/identity_manager/primary_account_manager.cc b/components/signin/internal/identity_manager/primary_account_manager.cc
-index ce2bb875b1e10..9a327a2df7d0b 100644
+index f7b3ed7459d55..e36b73d6f9003 100644
--- a/components/signin/internal/identity_manager/primary_account_manager.cc
+++ b/components/signin/internal/identity_manager/primary_account_manager.cc
-@@ -149,7 +149,7 @@ void PrimaryAccountManager::RegisterProfilePrefs(PrefRegistrySimple* registry) {
- registry->RegisterBooleanPref(prefs::kGoogleServicesConsentedToSync, false);
+@@ -193,7 +193,7 @@ void PrimaryAccountManager::RegisterProfilePrefs(PrefRegistrySimple* registry) {
+ prefs::kGoogleServicesSyncingUsernameMigratedToSignedIn, std::string());
registry->RegisterBooleanPref(prefs::kAutologinEnabled, true);
registry->RegisterListPref(prefs::kReverseAutologinRejectedEmailList);
- registry->RegisterBooleanPref(prefs::kSigninAllowed, true);
diff --git a/build-chromium/patches/0044-disable-autofill-server-communication-by-default.patch b/build-chromium/patches/0036-disable-autofill-server-communication-by-default.patch
similarity index 90%
rename from build-chromium/patches/0044-disable-autofill-server-communication-by-default.patch
rename to build-chromium/patches/0036-disable-autofill-server-communication-by-default.patch
index b4924b7..13fc4f9 100644
--- a/build-chromium/patches/0044-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 fd8dcf0f7be0c..92736ec81d9d1 100644
+index b2c551ea3108a..8f72eef6c64e0 100644
--- a/components/autofill/core/common/autofill_features.cc
+++ b/components/autofill/core/common/autofill_features.cc
-@@ -798,7 +798,7 @@ BASE_FEATURE(kAutofillLogToTerminal,
+@@ -848,7 +848,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/0045-disable-component-updater-pings-by-default.patch b/build-chromium/patches/0037-disable-component-updater-pings-by-default.patch
similarity index 100%
rename from build-chromium/patches/0045-disable-component-updater-pings-by-default.patch
rename to build-chromium/patches/0037-disable-component-updater-pings-by-default.patch
diff --git a/build-chromium/patches/0064-disable-Omaha-update-check-support.patch b/build-chromium/patches/0041-disable-Omaha-update-check-support.patch
similarity index 86%
rename from build-chromium/patches/0064-disable-Omaha-update-check-support.patch
rename to build-chromium/patches/0041-disable-Omaha-update-check-support.patch
index b5e995c..4af4655 100644
--- a/build-chromium/patches/0064-disable-Omaha-update-check-support.patch
+++ b/build-chromium/patches/0041-disable-Omaha-update-check-support.patch
@@ -9,10 +9,10 @@
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 33e232ec8bdda..bad1a721683f6 100644
+index 4f7a64abb07f5..ae7ee72d8fb19 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
-@@ -157,7 +157,7 @@ public class OmahaBase {
+@@ -161,7 +161,7 @@ public class OmahaBase {
}
static boolean isDisabled() {
@@ -22,15 +22,15 @@
/**
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 90cfcd7661c43..97f59b58fef13 100644
+index 97a6757ee1914..3334cfc34d567 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
-@@ -50,7 +50,7 @@ public class VersionNumberGetter {
+@@ -51,7 +51,7 @@ public class VersionNumberGetter {
private static VersionNumberGetter sInstanceForTests;
/** If false, OmahaClient will never report that a newer version is available. */
- private static boolean sEnableUpdateDetection = true;
+ private static boolean sEnableUpdateDetection = false;
- protected VersionNumberGetter() { }
+ protected VersionNumberGetter() {}
diff --git a/build-chromium/patches/0054-Consolidate-java-sources-added-at-android-specific-c.patch b/build-chromium/patches/0054-Consolidate-java-sources-added-at-android-specific-c.patch
deleted file mode 100644
index 9d7f184..0000000
--- a/build-chromium/patches/0054-Consolidate-java-sources-added-at-android-specific-c.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: fgei <fgei@gmail.com>
-Date: Mon, 13 Mar 2023 08:41:43 +0000
-Subject: [PATCH] Consolidate java sources added at android-specific chrome
- layer
-
----
- chrome/android/chrome_ext_java_sources.gni | 6 ++++++
- chrome/android/java_sources.gni | 2 ++
- 2 files changed, 8 insertions(+)
- create mode 100644 chrome/android/chrome_ext_java_sources.gni
-
-diff --git a/chrome/android/chrome_ext_java_sources.gni b/chrome/android/chrome_ext_java_sources.gni
-new file mode 100644
-index 0000000000000..fe72e9b1d3abb
---- /dev/null
-+++ b/chrome/android/chrome_ext_java_sources.gni
-@@ -0,0 +1,6 @@
-+# Copyright 2023 GrapheneOS
-+# Use of this source code is governed by a GPLv2 only-style license that can be
-+# found in the LICENSE file.
-+
-+chrome_ext_java_sources = [
-+]
-diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
-index a5f30237c3bfa..727142fc4e8f5 100644
---- a/chrome/android/java_sources.gni
-+++ b/chrome/android/java_sources.gni
-@@ -3,6 +3,7 @@
- # found in the LICENSE file.
-
- import("//build/config/android/config.gni")
-+import("//chrome/android/chrome_ext_java_sources.gni")
- import("//chrome/android/chrome_java_sources.gni")
- import("//chrome/android/chrome_junit_test_java_sources.gni")
- import("//chrome/android/chrome_test_java_sources.gni")
-@@ -24,6 +25,7 @@ import("//components/feed/features.gni")
- import("//components/offline_pages/buildflags/features.gni")
- import("//device/vr/buildflags/buildflags.gni")
-
-+chrome_java_sources += chrome_ext_java_sources
- # Only used for testing, should not be shipped to end users.
- if (enable_offline_pages_harness) {
- chrome_java_sources += [ "java/src/org/chromium/chrome/browser/offlinepages/evaluation/OfflinePageEvaluationBridge.java" ]
diff --git a/build-chromium/patches/0075-disable-using-Play-services-fonts.patch b/build-chromium/patches/0054-disable-using-Play-services-fonts.patch
similarity index 91%
rename from build-chromium/patches/0075-disable-using-Play-services-fonts.patch
rename to build-chromium/patches/0054-disable-using-Play-services-fonts.patch
index 275db14..3692024 100644
--- a/build-chromium/patches/0075-disable-using-Play-services-fonts.patch
+++ b/build-chromium/patches/0054-disable-using-Play-services-fonts.patch
@@ -8,10 +8,10 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/content/public/android/java/src/org/chromium/content/browser/font/AndroidFontLookupImpl.java b/content/public/android/java/src/org/chromium/content/browser/font/AndroidFontLookupImpl.java
-index 7626757404a0f..34e777ca31bc1 100644
+index 48edb1d5509f3..ee9e6e58f0d4e 100644
--- a/content/public/android/java/src/org/chromium/content/browser/font/AndroidFontLookupImpl.java
+++ b/content/public/android/java/src/org/chromium/content/browser/font/AndroidFontLookupImpl.java
-@@ -177,7 +177,7 @@ public class AndroidFontLookupImpl implements AndroidFontLookup {
+@@ -185,7 +185,7 @@ public class AndroidFontLookupImpl implements AndroidFontLookup {
* @param fontUniqueName The ICU case folded unique full font name to fetch.
*/
private ReadOnlyFile fetchFontInBackground(String fontUniqueName, Core core) {
diff --git a/build-chromium/patches/0055-Consolidate-resources-added-at-android-specific-chro.patch b/build-chromium/patches/0055-Consolidate-resources-added-at-android-specific-chro.patch
deleted file mode 100644
index 4c6b43b..0000000
--- a/build-chromium/patches/0055-Consolidate-resources-added-at-android-specific-chro.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: fgei <fgei@gmail.com>
-Date: Mon, 13 Mar 2023 08:46:00 +0000
-Subject: [PATCH] Consolidate resources added at android-specific chrome layer
-
----
- chrome/android/chrome_ext_java_resources.gni | 6 ++++++
- chrome/android/chrome_java_resources.gni | 5 ++++-
- 2 files changed, 10 insertions(+), 1 deletion(-)
- create mode 100644 chrome/android/chrome_ext_java_resources.gni
-
-diff --git a/chrome/android/chrome_ext_java_resources.gni b/chrome/android/chrome_ext_java_resources.gni
-new file mode 100644
-index 0000000000000..9980a7c5f6d84
---- /dev/null
-+++ b/chrome/android/chrome_ext_java_resources.gni
-@@ -0,0 +1,6 @@
-+# Copyright 2023 GrapheneOS
-+# Use of this source code is governed by a GPLv2 only-style license that can be
-+# found in the LICENSE file.
-+
-+chrome_ext_java_resources = [
-+]
-diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni
-index 20d507d2b4818..081a351d42951 100644
---- a/chrome/android/chrome_java_resources.gni
-+++ b/chrome/android/chrome_java_resources.gni
-@@ -7,7 +7,10 @@
- # (for f in $(find java/res/*/ -type f); do echo ' "'$f'",'; done; echo ']') >> chrome_java_resources.gni
- # git cl format
-
--chrome_java_resources = [
-+import ("//chrome/android/chrome_ext_java_resources.gni")
-+
-+chrome_java_resources = chrome_ext_java_resources
-+chrome_java_resources += [
- "java/res/anim/accelerate_quart.xml",
- "java/res/anim/activity_close_exit.xml",
- "java/res/anim/activity_open_enter.xml",
diff --git a/build-chromium/patches/0060-remove-translate-offer-preference.patch b/build-chromium/patches/0060-remove-translate-offer-preference.patch
deleted file mode 100644
index 04ff06c..0000000
--- a/build-chromium/patches/0060-remove-translate-offer-preference.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Daniel Micay <danielmicay@gmail.com>
-Date: Fri, 2 Aug 2019 21:11:17 -0400
-Subject: [PATCH] remove translate offer preference
-
----
- .../language/settings/LanguageSettings.java | 26 +------------------
- 1 file changed, 1 insertion(+), 25 deletions(-)
-
-diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageSettings.java b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageSettings.java
-index b2080530c62ca..9afebfe5060d8 100644
---- a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageSettings.java
-+++ b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageSettings.java
-@@ -99,31 +99,7 @@ public class LanguageSettings extends ChromeBaseSettingsFragment
- (ContentLanguagesPreference) findPreference(PREFERRED_LANGUAGES_KEY);
- mLanguageListPref.initialize(this, getPrefService());
-
-- ChromeSwitchPreference translateSwitch =
-- (ChromeSwitchPreference) findPreference(TRANSLATE_SWITCH_KEY);
-- boolean isTranslateEnabled = getPrefService().getBoolean(Pref.OFFER_TRANSLATE_ENABLED);
-- translateSwitch.setChecked(isTranslateEnabled);
--
-- translateSwitch.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
-- @Override
-- public boolean onPreferenceChange(Preference preference, Object newValue) {
-- boolean enabled = (boolean) newValue;
-- getPrefService().setBoolean(Pref.OFFER_TRANSLATE_ENABLED, enabled);
-- mLanguageListPref.notifyPrefChanged();
-- LanguagesManager.recordAction(enabled ? LanguagesManager.LanguageSettingsActionType
-- .ENABLE_TRANSLATE_GLOBALLY
-- : LanguagesManager.LanguageSettingsActionType
-- .DISABLE_TRANSLATE_GLOBALLY);
-- return true;
-- }
-- });
-- translateSwitch.setManagedPreferenceDelegate(new ChromeManagedPreferenceDelegate(
-- getProfile()) {
-- @Override
-- public boolean isPreferenceControlledByPolicy(Preference preference) {
-- return getPrefService().isManagedPreference(Pref.OFFER_TRANSLATE_ENABLED);
-- }
-- });
-+ getPreferenceScreen().removePreference(findPreference(TRANSLATE_SWITCH_KEY));
- }
-
- /**
diff --git a/build-chromium/patches/0068-add-trichrome-browser-apk-targets.patch b/build-chromium/patches/0076-add-trichrome-browser-apk-targets.patch
similarity index 90%
rename from build-chromium/patches/0068-add-trichrome-browser-apk-targets.patch
rename to build-chromium/patches/0076-add-trichrome-browser-apk-targets.patch
index ace3aa2..f552ac2 100644
--- a/build-chromium/patches/0068-add-trichrome-browser-apk-targets.patch
+++ b/build-chromium/patches/0076-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 b0721898be7d7..8c61a5bbfed8b 100644
+index 9ef4d7045a0db..40bce15d64f89 100644
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
-@@ -2391,6 +2391,10 @@ if (current_toolchain == default_toolchain) {
+@@ -2430,6 +2430,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
-@@ -2738,6 +2742,37 @@ if (current_toolchain == default_toolchain) {
+@@ -2796,6 +2800,37 @@ if (current_toolchain == default_toolchain) {
}
}
}
@@ -62,10 +62,10 @@
# 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 13ab7ec536d42..3b5ebd19fbb27 100644
+index 54c50b54bb7ca..1fc91f09297a5 100644
--- a/chrome/android/chrome_public_apk_tmpl.gni
+++ b/chrome/android/chrome_public_apk_tmpl.gni
-@@ -450,6 +450,8 @@ template("chrome_common_apk_or_module_tmpl") {
+@@ -454,6 +454,8 @@ template("chrome_common_apk_or_module_tmpl") {
deps += [ "//chrome/android:chrome_bundle_module_pak_assets" ]
} else if (_is_monochrome) {
deps += [ "//chrome/android:monochrome_apk_pak_assets" ]
diff --git a/build-chromium/patches/0013-remove-Help-feedback-menu-entry.patch b/build-chromium/patches/0080-remove-Help-feedback-menu-entry.patch
similarity index 91%
rename from build-chromium/patches/0013-remove-Help-feedback-menu-entry.patch
rename to build-chromium/patches/0080-remove-Help-feedback-menu-entry.patch
index 3d6990f..3bebf77 100644
--- a/build-chromium/patches/0013-remove-Help-feedback-menu-entry.patch
+++ b/build-chromium/patches/0080-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 952917ff00d68..8df511293642e 100644
+index 0dd8acdca4dbc..780e90bddf053 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
-@@ -552,6 +552,8 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
+@@ -580,6 +580,8 @@ public class AppMenuPropertiesDelegateImpl implements AppMenuPropertiesDelegate
menu.findItem(R.id.reader_mode_prefs_id)
.setVisible(isCurrentTabNotNull && shouldShowReaderModePrefs(currentTab));
diff --git a/build-chromium/patches/0014-hide-passwords.google.com-link-when-not-supported.patch b/build-chromium/patches/0081-hide-passwords.google.com-link-when-not-supported.patch
similarity index 94%
rename from build-chromium/patches/0014-hide-passwords.google.com-link-when-not-supported.patch
rename to build-chromium/patches/0081-hide-passwords.google.com-link-when-not-supported.patch
index 19f79ba..55fb4a0 100644
--- a/build-chromium/patches/0014-hide-passwords.google.com-link-when-not-supported.patch
+++ b/build-chromium/patches/0081-hide-passwords.google.com-link-when-not-supported.patch
@@ -8,7 +8,7 @@
1 file changed, 4 insertions(+)
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java b/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java
-index 118c5ec8d81e2..ef010a06ef2e6 100644
+index e41b52eb4e49e..05fef9bb3c875 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java
@@ -40,6 +40,7 @@ import org.chromium.chrome.browser.preferences.Pref;
@@ -19,7 +19,7 @@
import org.chromium.chrome.browser.sync.SyncServiceFactory;
import org.chromium.chrome.browser.sync.settings.SyncSettingsUtils;
import org.chromium.components.browser_ui.bottomsheet.BottomSheetController;
-@@ -633,6 +634,9 @@ public class PasswordSettings extends ChromeBaseSettingsFragment
+@@ -652,6 +653,9 @@ public class PasswordSettings extends ChromeBaseSettingsFragment
if (mSearchQuery != null && !mNoPasswords) {
return; // Don't add the Manage Account link if there is a search going on.
}
diff --git a/build-chromium/patches/0083-Consolidate-downstream-changes-in-dependencies-sourc.patch b/build-chromium/patches/0083-Consolidate-downstream-changes-in-dependencies-sourc.patch
new file mode 100644
index 0000000..c601601
--- /dev/null
+++ b/build-chromium/patches/0083-Consolidate-downstream-changes-in-dependencies-sourc.patch
@@ -0,0 +1,117 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: fgei <fgei@gmail.com>
+Date: Mon, 13 Mar 2023 08:41:43 +0000
+Subject: [PATCH] Consolidate downstream changes in dependencies, sources for
+ chrome layer
+
+---
+ chrome/android/BUILD.gn | 10 ++++++++++
+ chrome/android/chrome_ext_deps.gni | 9 +++++++++
+ chrome/android/chrome_ext_java_resources.gni | 6 ++++++
+ chrome/android/chrome_ext_java_sources.gni | 6 ++++++
+ chrome/android/chrome_java_resources.gni | 2 ++
+ chrome/android/java_sources.gni | 1 +
+ 6 files changed, 34 insertions(+)
+ create mode 100644 chrome/android/chrome_ext_deps.gni
+ create mode 100644 chrome/android/chrome_ext_java_resources.gni
+ 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
+--- a/chrome/android/BUILD.gn
++++ b/chrome/android/BUILD.gn
+@@ -10,6 +10,9 @@ import("//build/config/cronet/config.gni")
+ import("//build/config/python.gni")
+ import("//build/util/process_version.gni")
+ import("//chrome/android/chrome_common_shared_library.gni")
++import("//chrome/android/chrome_ext_deps.gni")
++import("//chrome/android/chrome_ext_java_sources.gni")
++import("//chrome/android/chrome_ext_java_resources.gni")
+ 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) {
+
+ android_resources("chrome_app_java_resources") {
+ sources = chrome_java_resources
++ # Extension of sources at chrome_app_java_resources
++ sources += chrome_ext_java_resources
+ sources += [ "//chrome/android/java/res_app/layout/main.xml" ]
+
+ deps = [
+@@ -693,6 +698,11 @@ if (current_toolchain == default_toolchain) {
+ # From java_sources.gni.
+ sources = chrome_java_sources + [ app_hooks_impl ]
+
++ # Extension of sources, deps, and srcjar_deps for chrome_java target
++ sources += chrome_ext_java_sources
++ deps += chrome_ext_deps
++ srcjar_deps += chrome_ext_srcjar_deps
++
+ # Include sources from feed_java_sources.gni.
+ sources += feed_java_sources
+ srcjar_deps += feed_srcjar_deps
+diff --git a/chrome/android/chrome_ext_deps.gni b/chrome/android/chrome_ext_deps.gni
+new file mode 100644
+index 0000000000000..0829b5df7e80d
+--- /dev/null
++++ b/chrome/android/chrome_ext_deps.gni
+@@ -0,0 +1,9 @@
++# Copyright 2023 GrapheneOS
++# Use of this source code is governed by a GPL-2.0-only-style license that can be
++# found in the LICENSE file.
++
++chrome_ext_deps = [
++]
++
++chrome_ext_srcjar_deps = [
++]
+diff --git a/chrome/android/chrome_ext_java_resources.gni b/chrome/android/chrome_ext_java_resources.gni
+new file mode 100644
+index 0000000000000..4ce3232392871
+--- /dev/null
++++ b/chrome/android/chrome_ext_java_resources.gni
+@@ -0,0 +1,6 @@
++# Copyright 2023 GrapheneOS
++# Use of this source code is governed by a GPL-2.0-only-style license that can be
++# found in the LICENSE file.
++
++chrome_ext_java_resources = [
++]
+diff --git a/chrome/android/chrome_ext_java_sources.gni b/chrome/android/chrome_ext_java_sources.gni
+new file mode 100644
+index 0000000000000..3342c74236ea9
+--- /dev/null
++++ b/chrome/android/chrome_ext_java_sources.gni
+@@ -0,0 +1,6 @@
++# Copyright 2023 GrapheneOS
++# Use of this source code is governed by a GPL-2.0-only-style license that can be
++# found in the LICENSE file.
++
++chrome_ext_java_sources = [
++]
+diff --git a/chrome/android/chrome_java_resources.gni b/chrome/android/chrome_java_resources.gni
+index 5a0b795f9febb..408fc10bd1afa 100644
+--- a/chrome/android/chrome_java_resources.gni
++++ b/chrome/android/chrome_java_resources.gni
+@@ -7,6 +7,8 @@
+ # (for f in $(find java/res/*/ -type f); do echo ' "'$f'",'; done; echo ']') >> chrome_java_resources.gni
+ # git cl format
+
++import ("//chrome/android/chrome_ext_java_resources.gni")
++
+ chrome_java_resources = [
+ "java/res/anim/accelerate_quart.xml",
+ "java/res/anim/activity_close_exit.xml",
+diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
+index a5f30237c3bfa..c363cb05f3619 100644
+--- a/chrome/android/java_sources.gni
++++ b/chrome/android/java_sources.gni
+@@ -3,6 +3,7 @@
+ # found in the LICENSE file.
+
+ import("//build/config/android/config.gni")
++import("//chrome/android/chrome_ext_java_sources.gni")
+ import("//chrome/android/chrome_java_sources.gni")
+ import("//chrome/android/chrome_junit_test_java_sources.gni")
+ import("//chrome/android/chrome_test_java_sources.gni")
diff --git a/build-chromium/patches/0084-Consolidate-downstream-strings-in-a-separate-file-fo.patch b/build-chromium/patches/0084-Consolidate-downstream-strings-in-a-separate-file-fo.patch
new file mode 100644
index 0000000..c426f1c
--- /dev/null
+++ b/build-chromium/patches/0084-Consolidate-downstream-strings-in-a-separate-file-fo.patch
@@ -0,0 +1,36 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: fgei <fgei@gmail.com>
+Date: Mon, 13 Mar 2023 08:58:10 +0000
+Subject: [PATCH] Consolidate downstream strings in a separate file for chrome
+ layer
+
+---
+ .../ui/android/strings/android_chrome_ext_strings.grdp | 6 ++++++
+ .../browser/ui/android/strings/android_chrome_strings.grd | 1 +
+ 2 files changed, 7 insertions(+)
+ create mode 100644 chrome/browser/ui/android/strings/android_chrome_ext_strings.grdp
+
+diff --git a/chrome/browser/ui/android/strings/android_chrome_ext_strings.grdp b/chrome/browser/ui/android/strings/android_chrome_ext_strings.grdp
+new file mode 100644
+index 0000000000000..ba31bf0fad150
+--- /dev/null
++++ b/chrome/browser/ui/android/strings/android_chrome_ext_strings.grdp
+@@ -0,0 +1,6 @@
++<?xml version="1.0" encoding="utf-8"?>
++<!-- Copyright 2023 GrapheneOS
++ Use of this source code is governed by a GPLv2 only-style license that can be
++ found in the LICENSE file. -->
++<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
+--- 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:
+ </translations>
+ <release seq="1">
+ <messages fallback_to_english="true">
++ <part file="android_chrome_ext_strings.grdp" />
+ <!-- NOTE: Generic strings used across multiple features belong in //components/browser_ui/strings/android. -->
+
+ <!-- Cookie Controls -->
diff --git a/build-chromium/patches/0057-Utility-class-for-adding-shared-preference-keys.patch b/build-chromium/patches/0085-Utility-class-for-adding-shared-preference-keys.patch
similarity index 96%
rename from build-chromium/patches/0057-Utility-class-for-adding-shared-preference-keys.patch
rename to build-chromium/patches/0085-Utility-class-for-adding-shared-preference-keys.patch
index f8636c1..059a60a 100644
--- a/build-chromium/patches/0057-Utility-class-for-adding-shared-preference-keys.patch
+++ b/build-chromium/patches/0085-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 55479f4187323..7caa859940f59 100644
+index 3d538b3370caa..110eff5889447 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
-@@ -4500,6 +4500,9 @@ if (is_android) {
+@@ -4507,6 +4507,9 @@ if (is_android) {
"android/java/src/org/chromium/base/shared_preferences/SharedPreferencesManager.java",
"android/java/src/org/chromium/base/shared_preferences/StrictPreferenceKeyChecker.java",
]
@@ -167,10 +167,10 @@
+ }
+}
diff --git a/base/android/java/src/org/chromium/base/shared_preferences/StrictPreferenceKeyChecker.java b/base/android/java/src/org/chromium/base/shared_preferences/StrictPreferenceKeyChecker.java
-index 3b84739c58cf0..adc0048c97f0f 100644
+index 91721d9dbafd0..19c0683085353 100644
--- a/base/android/java/src/org/chromium/base/shared_preferences/StrictPreferenceKeyChecker.java
+++ b/base/android/java/src/org/chromium/base/shared_preferences/StrictPreferenceKeyChecker.java
-@@ -50,6 +50,10 @@ class StrictPreferenceKeyChecker implements PreferenceKeyChecker {
+@@ -52,6 +52,10 @@ class StrictPreferenceKeyChecker implements PreferenceKeyChecker {
* @return Whether |key| is in use.
*/
private boolean isKeyInUse(String key) {
diff --git a/build-chromium/patches/0058-Helper-class-for-modifying-preferences-at-chrome-lay.patch b/build-chromium/patches/0086-Helper-class-for-modifying-preferences-at-chrome-lay.patch
similarity index 98%
rename from build-chromium/patches/0058-Helper-class-for-modifying-preferences-at-chrome-lay.patch
rename to build-chromium/patches/0086-Helper-class-for-modifying-preferences-at-chrome-lay.patch
index 29c5699..9945460 100644
--- a/build-chromium/patches/0058-Helper-class-for-modifying-preferences-at-chrome-lay.patch
+++ b/build-chromium/patches/0086-Helper-class-for-modifying-preferences-at-chrome-lay.patch
@@ -10,7 +10,7 @@
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsExtUtils.java
diff --git a/chrome/android/chrome_ext_java_sources.gni b/chrome/android/chrome_ext_java_sources.gni
-index fe72e9b1d3abb..b3a489f124aa8 100644
+index 3342c74236ea9..b3fe144daf2d6 100644
--- a/chrome/android/chrome_ext_java_sources.gni
+++ b/chrome/android/chrome_ext_java_sources.gni
@@ -3,4 +3,5 @@
diff --git a/build-chromium/patches/0059-Utility-class-for-modifying-preferences-at-Privacy-s.patch b/build-chromium/patches/0087-Utility-class-for-modifying-preferences-at-Privacy-s.patch
similarity index 90%
rename from build-chromium/patches/0059-Utility-class-for-modifying-preferences-at-Privacy-s.patch
rename to build-chromium/patches/0087-Utility-class-for-modifying-preferences-at-Privacy-s.patch
index 2ae6ee6..739e267 100644
--- a/build-chromium/patches/0059-Utility-class-for-modifying-preferences-at-Privacy-s.patch
+++ b/build-chromium/patches/0087-Utility-class-for-modifying-preferences-at-Privacy-s.patch
@@ -14,7 +14,7 @@
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettingsExt.java
diff --git a/chrome/android/chrome_ext_java_resources.gni b/chrome/android/chrome_ext_java_resources.gni
-index 9980a7c5f6d84..164ef483d5a44 100644
+index 4ce3232392871..99618ae9ac2f1 100644
--- a/chrome/android/chrome_ext_java_resources.gni
+++ b/chrome/android/chrome_ext_java_resources.gni
@@ -3,4 +3,5 @@
@@ -24,7 +24,7 @@
+ "java/res/xml/privacy_preferences_ext.xml",
]
diff --git a/chrome/android/chrome_ext_java_sources.gni b/chrome/android/chrome_ext_java_sources.gni
-index b3a489f124aa8..d580fb6e83875 100644
+index b3fe144daf2d6..598bfaf9cb860 100644
--- a/chrome/android/chrome_ext_java_sources.gni
+++ b/chrome/android/chrome_ext_java_sources.gni
@@ -4,4 +4,5 @@
@@ -49,20 +49,20 @@
+</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 8ffb0e6dac424..17dc4ad79a508 100644
+index 85177ad55395a..621f86ce4473a 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
-@@ -84,6 +84,8 @@ public class PrivacySettings
- SettingsUtils.addPreferencesFromResource(this, R.xml.privacy_preferences);
- }
+@@ -78,6 +78,8 @@ public class PrivacySettings extends ChromeBaseSettingsFragment
+
+ SettingsUtils.addPreferencesFromResource(this, R.xml.privacy_preferences);
+ PrivacySettingsExt.initializePreferences(this, getProfile());
+
Preference sandboxPreference = findPreference(PREF_PRIVACY_SANDBOX);
// Overwrite the click listener to pass a correct referrer to the fragment.
- sandboxPreference.setOnPreferenceClickListener(preference -> {
-@@ -187,6 +189,8 @@ public class PrivacySettings
- SingleCategorySettings.EXTRA_TITLE, thirdPartyCookies.getTitle().toString());
+ sandboxPreference.setOnPreferenceClickListener(
+@@ -205,6 +207,8 @@ public class PrivacySettings extends ChromeBaseSettingsFragment
+ thirdPartyCookies.getTitle().toString());
}
+ PrivacySettingsExt.removeUnwantedPreferences(this);
@@ -70,8 +70,8 @@
updatePreferences();
}
-@@ -304,6 +308,8 @@ public class PrivacySettings
- UserPrefs.get(getProfile()).getInteger(COOKIE_CONTROLS_MODE)));
+@@ -326,6 +330,8 @@ public class PrivacySettings extends ChromeBaseSettingsFragment
+ UserPrefs.get(getProfile()).getInteger(COOKIE_CONTROLS_MODE)));
}
+ PrivacySettingsExt.updatePreferences(this, getProfile());
diff --git a/build-chromium/patches/0103-Remove-not-applicable-additional-terms-of-services.patch b/build-chromium/patches/0088-Remove-not-applicable-additional-terms-of-services.patch
similarity index 100%
rename from build-chromium/patches/0103-Remove-not-applicable-additional-terms-of-services.patch
rename to build-chromium/patches/0088-Remove-not-applicable-additional-terms-of-services.patch
diff --git a/build-chromium/patches/0072-remove-unwanted-sync-and-services-link.patch b/build-chromium/patches/0091-remove-unwanted-sync-and-services-link.patch
similarity index 85%
rename from build-chromium/patches/0072-remove-unwanted-sync-and-services-link.patch
rename to build-chromium/patches/0091-remove-unwanted-sync-and-services-link.patch
index ac58569..72861f2 100644
--- a/build-chromium/patches/0072-remove-unwanted-sync-and-services-link.patch
+++ b/build-chromium/patches/0091-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 17dc4ad79a508..b78f38e60e789 100644
+index 621f86ce4473a..0c5cb984efa6f 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
-@@ -173,8 +173,7 @@ public class PrivacySettings
+@@ -185,8 +185,7 @@ public class PrivacySettings extends ChromeBaseSettingsFragment
Preference secureDnsPref = findPreference(PREF_SECURE_DNS);
secureDnsPref.setVisible(SecureDnsSettings.isUiEnabled());
@@ -20,4 +20,4 @@
+ getPreferenceScreen().removePreference(findPreference(PREF_SYNC_AND_SERVICES_LINK));
Preference thirdPartyCookies = findPreference(PREF_THIRD_PARTY_COOKIES);
-
+ Preference doNotTrackPref = findPreference(PREF_DO_NOT_TRACK);
diff --git a/build-chromium/patches/0066-remove-safety-check-menu.patch b/build-chromium/patches/0092-remove-safety-check-menu.patch
similarity index 71%
rename from build-chromium/patches/0066-remove-safety-check-menu.patch
rename to build-chromium/patches/0092-remove-safety-check-menu.patch
index 538b003..2cc2d68 100644
--- a/build-chromium/patches/0066-remove-safety-check-menu.patch
+++ b/build-chromium/patches/0092-remove-safety-check-menu.patch
@@ -8,15 +8,15 @@
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 16b5cd3caf63b..69fdd58bebbbf 100644
+index 5bfc494a117a0..5fbd9902c2dab 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
-@@ -223,6 +223,8 @@ public class MainSettings extends ChromeBaseSettingsFragment
+@@ -236,6 +236,8 @@ public class MainSettings extends ChromeBaseSettingsFragment
templateUrlService.load();
}
+ getPreferenceScreen().removePreference(findPreference(PREF_SAFETY_CHECK));
+
- new AdaptiveToolbarStatePredictor(null).recomputeUiState(uiState -> {
- // We don't show the toolbar shortcut settings page if disabled from finch.
- if (uiState.canShowUi) return;
+ new AdaptiveToolbarStatePredictor(null)
+ .recomputeUiState(
+ uiState -> {
diff --git a/build-chromium/patches/0073-remove-unwanted-account-and-services-section.patch b/build-chromium/patches/0093-remove-unwanted-account-and-services-section.patch
similarity index 78%
rename from build-chromium/patches/0073-remove-unwanted-account-and-services-section.patch
rename to build-chromium/patches/0093-remove-unwanted-account-and-services-section.patch
index 21e8e82..6d482a3 100644
--- a/build-chromium/patches/0073-remove-unwanted-account-and-services-section.patch
+++ b/build-chromium/patches/0093-remove-unwanted-account-and-services-section.patch
@@ -8,15 +8,15 @@
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 69fdd58bebbbf..33fce11a4818c 100644
+index 5fbd9902c2dab..0816b785cc72e 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
-@@ -224,6 +224,8 @@ public class MainSettings extends ChromeBaseSettingsFragment
+@@ -237,6 +237,8 @@ public class MainSettings extends ChromeBaseSettingsFragment
}
getPreferenceScreen().removePreference(findPreference(PREF_SAFETY_CHECK));
+ getPreferenceScreen().removePreference(findPreference(PREF_ACCOUNT_AND_GOOGLE_SERVICES_SECTION));
+ getPreferenceScreen().removePreference(findPreference(PREF_GOOGLE_SERVICES));
- new AdaptiveToolbarStatePredictor(null).recomputeUiState(uiState -> {
- // We don't show the toolbar shortcut settings page if disabled from finch.
+ new AdaptiveToolbarStatePredictor(null)
+ .recomputeUiState(
diff --git a/build-chromium/patches/0094-remove-translate-offer-preference.patch b/build-chromium/patches/0094-remove-translate-offer-preference.patch
new file mode 100644
index 0000000..39abf4b
--- /dev/null
+++ b/build-chromium/patches/0094-remove-translate-offer-preference.patch
@@ -0,0 +1,49 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Daniel Micay <danielmicay@gmail.com>
+Date: Fri, 2 Aug 2019 21:11:17 -0400
+Subject: [PATCH] remove translate offer preference
+
+---
+ .../language/settings/LanguageSettings.java | 29 +------------------
+ 1 file changed, 1 insertion(+), 28 deletions(-)
+
+diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageSettings.java b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageSettings.java
+index 0b4da85180efb..2e0540d8cccd4 100644
+--- a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageSettings.java
++++ b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageSettings.java
+@@ -97,34 +97,7 @@ public class LanguageSettings extends ChromeBaseSettingsFragment
+ (ContentLanguagesPreference) findPreference(PREFERRED_LANGUAGES_KEY);
+ mLanguageListPref.initialize(this, getPrefService());
+
+- ChromeSwitchPreference translateSwitch =
+- (ChromeSwitchPreference) findPreference(TRANSLATE_SWITCH_KEY);
+- boolean isTranslateEnabled = getPrefService().getBoolean(Pref.OFFER_TRANSLATE_ENABLED);
+- translateSwitch.setChecked(isTranslateEnabled);
+-
+- translateSwitch.setOnPreferenceChangeListener(
+- new Preference.OnPreferenceChangeListener() {
+- @Override
+- public boolean onPreferenceChange(Preference preference, Object newValue) {
+- boolean enabled = (boolean) newValue;
+- getPrefService().setBoolean(Pref.OFFER_TRANSLATE_ENABLED, enabled);
+- mLanguageListPref.notifyPrefChanged();
+- LanguagesManager.recordAction(
+- enabled
+- ? LanguagesManager.LanguageSettingsActionType
+- .ENABLE_TRANSLATE_GLOBALLY
+- : LanguagesManager.LanguageSettingsActionType
+- .DISABLE_TRANSLATE_GLOBALLY);
+- return true;
+- }
+- });
+- translateSwitch.setManagedPreferenceDelegate(
+- new ChromeManagedPreferenceDelegate(getProfile()) {
+- @Override
+- public boolean isPreferenceControlledByPolicy(Preference preference) {
+- return getPrefService().isManagedPreference(Pref.OFFER_TRANSLATE_ENABLED);
+- }
+- });
++ getPreferenceScreen().removePreference(findPreference(TRANSLATE_SWITCH_KEY));
+ }
+
+ /**
diff --git a/build-chromium/patches/0074-Hide-Sign-In-preference-when-disallowed.patch b/build-chromium/patches/0095-Hide-Sign-In-preference-when-disallowed.patch
similarity index 88%
rename from build-chromium/patches/0074-Hide-Sign-In-preference-when-disallowed.patch
rename to build-chromium/patches/0095-Hide-Sign-In-preference-when-disallowed.patch
index 9e78a2f..8bbd5c1 100644
--- a/build-chromium/patches/0074-Hide-Sign-In-preference-when-disallowed.patch
+++ b/build-chromium/patches/0095-Hide-Sign-In-preference-when-disallowed.patch
@@ -8,10 +8,10 @@
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 348890d0af8bb..24c487d4a1143 100644
+index 043ab492edd75..6db3510b53b0a 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
-@@ -153,6 +153,7 @@ public class SignInPreference
+@@ -158,6 +158,7 @@ public class SignInPreference extends Preference
}
private void setupSigninDisallowed() {
diff --git a/build-chromium/patches/0069-Move-search-suggestions-back-to-privacy-section.patch b/build-chromium/patches/0098-Move-search-suggestions-back-to-privacy-section.patch
similarity index 100%
rename from build-chromium/patches/0069-Move-search-suggestions-back-to-privacy-section.patch
rename to build-chromium/patches/0098-Move-search-suggestions-back-to-privacy-section.patch
diff --git a/build-chromium/patches/0099-Disable-Play-services-dependent-password-manager-fea.patch b/build-chromium/patches/0099-Disable-Play-services-dependent-password-manager-fea.patch
deleted file mode 100644
index 85b1bde..0000000
--- a/build-chromium/patches/0099-Disable-Play-services-dependent-password-manager-fea.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: fgei <fgei@gmail.com>
-Date: Tue, 21 Feb 2023 02:02:40 +0000
-Subject: [PATCH] Disable Play services dependent password manager feature by
- default
-
----
- .../password_manager/core/common/password_manager_features.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/components/password_manager/core/common/password_manager_features.cc b/components/password_manager/core/common/password_manager_features.cc
-index 0d34f5a2cfb54..2b511913bcc70 100644
---- a/components/password_manager/core/common/password_manager_features.cc
-+++ b/components/password_manager/core/common/password_manager_features.cc
-@@ -128,7 +128,7 @@ BASE_FEATURE(kPasswordSuggestionBottomSheetV2,
- // database will be unused but kept in sync for local passwords.
- BASE_FEATURE(kUnifiedPasswordManagerAndroid,
- "UnifiedPasswordManagerAndroid_LAUNCHED",
-- base::FEATURE_ENABLED_BY_DEFAULT);
-+ base::FEATURE_DISABLED_BY_DEFAULT);
-
- // Enables use of Google Mobile services for non-synced password storage.
- BASE_FEATURE(kUnifiedPasswordManagerLocalPasswordsAndroidWithMigration,
diff --git a/build-chromium/patches/0093-Add-missing-null-check-for-password-manager-autofill.patch b/build-chromium/patches/0106-Add-missing-null-check-for-password-manager-autofill.patch
similarity index 88%
rename from build-chromium/patches/0093-Add-missing-null-check-for-password-manager-autofill.patch
rename to build-chromium/patches/0106-Add-missing-null-check-for-password-manager-autofill.patch
index 8da6a87..7f23a3b 100644
--- a/build-chromium/patches/0093-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 94d20221b0059..52b7c28a2a925 100644
+index d37448c396471..dd2d3471406cd 100644
--- a/components/autofill/content/renderer/password_autofill_agent.cc
+++ b/components/autofill/content/renderer/password_autofill_agent.cc
-@@ -838,7 +838,9 @@ void PasswordAutofillAgent::UpdateStateForTextChange(
+@@ -827,7 +827,9 @@ void PasswordAutofillAgent::UpdatePasswordStateForTextChange(
void PasswordAutofillAgent::TrackAutofilledElement(
const blink::WebFormControlElement& element) {
diff --git a/build-chromium/patches/0094-Drop-workaround-with-android-autofill-in-compatibili.patch b/build-chromium/patches/0112-Drop-workaround-with-android-autofill-in-compatibili.patch
similarity index 93%
rename from build-chromium/patches/0094-Drop-workaround-with-android-autofill-in-compatibili.patch
rename to build-chromium/patches/0112-Drop-workaround-with-android-autofill-in-compatibili.patch
index 11affc3..a165412 100644
--- a/build-chromium/patches/0094-Drop-workaround-with-android-autofill-in-compatibili.patch
+++ b/build-chromium/patches/0112-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 7078b97461529..21742470dc9d9 100644
+index 3a366ebbee8bf..bdf7e5d05d4c5 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
-@@ -392,7 +392,7 @@ public abstract class UrlBar extends AutocompleteEditText {
+@@ -384,7 +384,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/0095-Enable-android-autofill-on-http-authentication-dialo.patch b/build-chromium/patches/0113-Enable-android-autofill-on-http-authentication-dialo.patch
similarity index 79%
rename from build-chromium/patches/0095-Enable-android-autofill-on-http-authentication-dialo.patch
rename to build-chromium/patches/0113-Enable-android-autofill-on-http-authentication-dialo.patch
index 10c543c..d312fe8 100644
--- a/build-chromium/patches/0095-Enable-android-autofill-on-http-authentication-dialo.patch
+++ b/build-chromium/patches/0113-Enable-android-autofill-on-http-authentication-dialo.patch
@@ -8,13 +8,13 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/login/ChromeHttpAuthHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/login/ChromeHttpAuthHandler.java
-index 3b87576c9ed6b..a97f7cff21c49 100644
+index 6f11d483fb695..2aa08a1baeaab 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/login/ChromeHttpAuthHandler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/login/ChromeHttpAuthHandler.java
-@@ -102,7 +102,7 @@ public class ChromeHttpAuthHandler extends EmptyTabObserver implements LoginProm
- mTab.addObserver(this);
- String messageBody = ChromeHttpAuthHandlerJni.get().getMessageBody(
- mNativeChromeHttpAuthHandler, ChromeHttpAuthHandler.this);
+@@ -108,7 +108,7 @@ public class ChromeHttpAuthHandler extends EmptyTabObserver implements LoginProm
+ String messageBody =
+ ChromeHttpAuthHandlerJni.get()
+ .getMessageBody(mNativeChromeHttpAuthHandler, ChromeHttpAuthHandler.this);
- mLoginPrompt = new LoginPrompt(activity, messageBody, null, this);
+ mLoginPrompt = new LoginPrompt(activity, messageBody, tab.getOriginalUrl(), this);
// In case the autofill data arrives before the prompt is created.
diff --git a/build-chromium/patches/0096-Support-both-password-manager-and-android-autofill-f.patch b/build-chromium/patches/0114-Support-both-password-manager-and-android-autofill-f.patch
similarity index 72%
rename from build-chromium/patches/0096-Support-both-password-manager-and-android-autofill-f.patch
rename to build-chromium/patches/0114-Support-both-password-manager-and-android-autofill-f.patch
index 1609207..58572d7 100644
--- a/build-chromium/patches/0096-Support-both-password-manager-and-android-autofill-f.patch
+++ b/build-chromium/patches/0114-Support-both-password-manager-and-android-autofill-f.patch
@@ -5,28 +5,35 @@
functionality
---
- .../autofill/content/renderer/autofill_agent.cc | 1 -
+ .../autofill/content/renderer/autofill_agent.cc | 2 --
.../content/renderer/password_autofill_agent.cc | 11 -----------
.../core/browser/browser_autofill_manager.cc | 13 +++++++++++++
- 3 files changed, 13 insertions(+), 12 deletions(-)
+ 3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc
-index 193cdecccd425..2654381cae623 100644
+index 382710524cd30..0e80f8c6eb647 100644
--- a/components/autofill/content/renderer/autofill_agent.cc
+++ b/components/autofill/content/renderer/autofill_agent.cc
-@@ -537,7 +537,6 @@ void AutofillAgent::OnTextFieldDidChange(const WebInputElement& element) {
- if (password_autofill_agent_->TextDidChangeInTextField(element)) {
+@@ -556,14 +556,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;
- last_queried_element_ = element;
- return;
}
- ShowSuggestions(element,
+ if (!input_element.IsNull() &&
+ password_autofill_agent_->TextDidChangeInTextField(input_element)) {
+ is_popup_possibly_visible_ = true;
+ last_queried_element_ = FieldRef(element);
+- return;
+ }
+
+ 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 52b7c28a2a925..b039f5ee6441a 100644
+index dd2d3471406cd..f467d2993f5b3 100644
--- a/components/autofill/content/renderer/password_autofill_agent.cc
+++ b/components/autofill/content/renderer/password_autofill_agent.cc
-@@ -1155,17 +1155,6 @@ bool PasswordAutofillAgent::ShowSuggestions(const WebInputElement& element,
+@@ -1146,17 +1146,6 @@ bool PasswordAutofillAgent::ShowSuggestions(const WebInputElement& element,
if (element.Value().length() > kMaximumTextSizeForAutocomplete)
return false;
@@ -45,10 +52,10 @@
return false;
diff --git a/components/autofill/core/browser/browser_autofill_manager.cc b/components/autofill/core/browser/browser_autofill_manager.cc
-index a1bc6da4223f5..48d1c3133df48 100644
+index c87e797550ce2..1e741c34c8ce9 100644
--- a/components/autofill/core/browser/browser_autofill_manager.cc
+++ b/components/autofill/core/browser/browser_autofill_manager.cc
-@@ -1155,6 +1155,19 @@ void BrowserAutofillManager::OnAskForValuesToFillImpl(
+@@ -1114,6 +1114,19 @@ void BrowserAutofillManager::OnAskForValuesToFillImpl(
if (base::FeatureList::IsEnabled(features::kAutofillDisableFilling)) {
return;
}
@@ -66,5 +73,5 @@
+ }
+ }
- SetDataList(field.datalist_values, field.datalist_labels);
+ external_delegate_->SetCurrentDataListValues(field.datalist_options);
external_delegate_->OnQuery(form, field, transformed_box);
diff --git a/build-chromium/patches/0097-Support-for-both-browser-and-android-autofill-functi.patch b/build-chromium/patches/0115-Support-for-both-browser-and-android-autofill-functi.patch
similarity index 88%
rename from build-chromium/patches/0097-Support-for-both-browser-and-android-autofill-functi.patch
rename to build-chromium/patches/0115-Support-for-both-browser-and-android-autofill-functi.patch
index 2ea0d6f..5b19e1f 100644
--- a/build-chromium/patches/0097-Support-for-both-browser-and-android-autofill-functi.patch
+++ b/build-chromium/patches/0115-Support-for-both-browser-and-android-autofill-functi.patch
@@ -12,10 +12,10 @@
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 ed7f0f073b734..df84f20ca4ffa 100644
+index 0d51b11b639b6..de3e78c4eaec8 100644
--- a/components/android_autofill/browser/android_autofill_manager.cc
+++ b/components/android_autofill/browser/android_autofill_manager.cc
-@@ -14,6 +14,7 @@
+@@ -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"
@@ -23,7 +23,7 @@
#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"
-@@ -32,6 +33,20 @@ void AndroidDriverInitHook(AutofillClient* client,
+@@ -33,6 +34,20 @@ void AndroidDriverInitHook(AutofillClient* client,
driver->GetAutofillAgent()->SetQueryPasswordSuggestion(true);
}
@@ -45,10 +45,10 @@
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 3fd9a9c2cd46e..e610c101c52e0 100644
+index 9ef74e9a284a6..2972c6b08a156 100644
--- a/components/android_autofill/browser/android_autofill_manager.h
+++ b/components/android_autofill/browser/android_autofill_manager.h
-@@ -21,6 +21,16 @@ class AutofillProvider;
+@@ -23,6 +23,16 @@ class AutofillProvider;
class ContentAutofillDriver;
class FormEventLoggerWeblayerAndroid;
@@ -65,8 +65,8 @@
// Creates an AndroidAutofillManager and attaches it to the `driver`.
//
// This hook is to be passed to CreateForWebContentsAndDelegate().
-@@ -96,6 +106,11 @@ class AndroidAutofillManager : public AutofillManager,
- const url::Origin& triggered_origin);
+@@ -92,6 +102,11 @@ class AndroidAutofillManager : public AutofillManager,
+ PopupItemId popup_item_id) override;
protected:
+ friend void AndroidAndBrowserDriverInitHook(
@@ -78,10 +78,10 @@
ContentAutofillDriver* driver);
diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/components/autofill/content/browser/content_autofill_driver.cc
-index 83625554d4fd7..b66f3f3cb1f7f 100644
+index 98437f9b05252..83d44f5932068 100644
--- a/components/autofill/content/browser/content_autofill_driver.cc
+++ b/components/autofill/content/browser/content_autofill_driver.cc
-@@ -145,6 +145,18 @@ AutofillManager& ContentAutofillDriver::GetAutofillManager() {
+@@ -157,6 +157,18 @@ AutofillManager& ContentAutofillDriver::GetAutofillManager() {
return *autofill_manager_;
}
@@ -100,7 +100,7 @@
absl::optional<LocalFrameToken> ContentAutofillDriver::Resolve(
FrameToken query) {
if (absl::holds_alternative<LocalFrameToken>(query)) {
-@@ -412,6 +424,10 @@ void ContentAutofillDriver::FormsSeen(
+@@ -455,6 +467,10 @@ void ContentAutofillDriver::FormsSeen(
const std::vector<FormGlobalId>& removed_forms) {
target->GetAutofillManager().OnFormsSeen(
WithNewVersion(updated_forms), removed_forms);
@@ -111,7 +111,7 @@
});
}
-@@ -439,6 +455,10 @@ void ContentAutofillDriver::FormSubmitted(
+@@ -482,6 +498,10 @@ void ContentAutofillDriver::FormSubmitted(
}
target->GetAutofillManager().OnFormSubmitted(
WithNewVersion(form), known_success, submission_source);
@@ -122,7 +122,7 @@
});
}
-@@ -460,6 +480,10 @@ void ContentAutofillDriver::TextFieldDidChange(const FormData& raw_form,
+@@ -503,6 +523,10 @@ void ContentAutofillDriver::TextFieldDidChange(const FormData& raw_form,
base::TimeTicks timestamp) {
target->GetAutofillManager().OnTextFieldDidChange(
WithNewVersion(form), field, bounding_box, timestamp);
@@ -133,7 +133,7 @@
});
}
-@@ -479,6 +503,10 @@ void ContentAutofillDriver::TextFieldDidScroll(const FormData& raw_form,
+@@ -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);
@@ -144,7 +144,7 @@
});
}
-@@ -499,6 +527,10 @@ void ContentAutofillDriver::SelectControlDidChange(
+@@ -542,6 +570,10 @@ void ContentAutofillDriver::SelectControlDidChange(
const FormFieldData& field, const gfx::RectF& bounding_box) {
target->GetAutofillManager().OnSelectControlDidChange(
WithNewVersion(form), field, bounding_box);
@@ -155,7 +155,7 @@
});
}
-@@ -521,6 +553,10 @@ void ContentAutofillDriver::AskForValuesToFill(
+@@ -564,6 +596,10 @@ void ContentAutofillDriver::AskForValuesToFill(
AutofillSuggestionTriggerSource trigger_source) {
target->GetAutofillManager().OnAskForValuesToFill(
WithNewVersion(form), field, bounding_box, trigger_source);
@@ -166,7 +166,7 @@
});
}
-@@ -532,6 +568,9 @@ void ContentAutofillDriver::HidePopup() {
+@@ -575,6 +611,9 @@ void ContentAutofillDriver::HidePopup() {
DCHECK(!target->IsPrerendering())
<< "We should never affect UI while prerendering";
target->GetAutofillManager().OnHidePopup();
@@ -176,7 +176,7 @@
});
}
-@@ -543,6 +582,9 @@ void ContentAutofillDriver::FocusNoLongerOnForm(bool had_interacted_form) {
+@@ -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);
@@ -186,7 +186,7 @@
});
}
-@@ -565,6 +607,9 @@ void ContentAutofillDriver::FocusOnFormField(const FormData& raw_form,
+@@ -608,6 +650,9 @@ void ContentAutofillDriver::FocusOnFormField(const FormData& raw_form,
},
[](autofill::AutofillDriver* target) {
target->GetAutofillManager().OnFocusNoLongerOnForm(true);
@@ -196,7 +196,7 @@
});
}
-@@ -579,6 +624,10 @@ void ContentAutofillDriver::DidFillAutofillFormData(const FormData& raw_form,
+@@ -622,6 +667,10 @@ void ContentAutofillDriver::DidFillAutofillFormData(const FormData& raw_form,
base::TimeTicks timestamp) {
target->GetAutofillManager().OnDidFillAutofillFormData(
WithNewVersion(form), timestamp);
@@ -207,7 +207,7 @@
});
}
-@@ -643,6 +692,9 @@ void ContentAutofillDriver::Reset() {
+@@ -686,6 +735,9 @@ void ContentAutofillDriver::Reset() {
owner_->router().UnregisterDriver(this,
/*driver_is_dying=*/false);
autofill_manager_->Reset();
@@ -218,10 +218,10 @@
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 39c13f8e77500..ac7d4dba61a09 100644
+index 2bf1c751de4eb..1851045fdf3ea 100644
--- a/components/autofill/content/browser/content_autofill_driver.h
+++ b/components/autofill/content/browser/content_autofill_driver.h
-@@ -131,6 +131,10 @@ class ContentAutofillDriver : public AutofillDriver,
+@@ -132,6 +132,10 @@ class ContentAutofillDriver : public AutofillDriver,
autofill_manager_ = std::move(autofill_manager);
}
@@ -232,7 +232,7 @@
content::RenderFrameHost* render_frame_host() { return &*render_frame_host_; }
const content::RenderFrameHost* render_frame_host() const {
return &*render_frame_host_;
-@@ -159,6 +163,8 @@ class ContentAutofillDriver : public AutofillDriver,
+@@ -160,6 +164,8 @@ class ContentAutofillDriver : public AutofillDriver,
absl::optional<LocalFrameToken> Resolve(FrameToken query) override;
ContentAutofillDriver* GetParent() override;
AutofillManager& GetAutofillManager() override;
@@ -241,7 +241,7 @@
bool IsInActiveFrame() const override;
bool IsInAnyMainFrame() const override;
bool IsPrerendering() const override;
-@@ -319,6 +325,8 @@ class ContentAutofillDriver : public AutofillDriver,
+@@ -351,6 +357,8 @@ class ContentAutofillDriver : public AutofillDriver,
std::unique_ptr<AutofillManager> autofill_manager_ = nullptr;
@@ -251,7 +251,7 @@
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 9426b8cd4106f..d80e4a55b022a 100644
+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 {
diff --git a/build-chromium/patches/0098-Support-native-Android-autofill-at-browser.patch b/build-chromium/patches/0116-Support-native-Android-autofill-at-browser.patch
similarity index 78%
rename from build-chromium/patches/0098-Support-native-Android-autofill-at-browser.patch
rename to build-chromium/patches/0116-Support-native-Android-autofill-at-browser.patch
index 614fbb0..d687b0e 100644
--- a/build-chromium/patches/0098-Support-native-Android-autofill-at-browser.patch
+++ b/build-chromium/patches/0116-Support-native-Android-autofill-at-browser.patch
@@ -9,30 +9,30 @@
---
android_webview/browser/aw_autofill_client.cc | 4 ++
chrome/android/BUILD.gn | 1 +
- .../chromium/chrome/browser/tab/TabImpl.java | 45 +++++++++++++++++
+ .../chromium/chrome/browser/tab/TabImpl.java | 44 +++++++++++++++++
.../browser/tab/TabViewAndroidDelegate.java | 13 +++++
chrome/browser/BUILD.gn | 7 +++
.../ui/autofill/chrome_autofill_client.cc | 14 +++++-
.../embedder_support/view/ContentView.java | 48 +++++++++++++++++++
.../chromium/ui/base/ViewAndroidDelegate.java | 8 ++++
- 8 files changed, 139 insertions(+), 1 deletion(-)
+ 8 files changed, 138 insertions(+), 1 deletion(-)
diff --git a/android_webview/browser/aw_autofill_client.cc b/android_webview/browser/aw_autofill_client.cc
-index 449fe65d0bdda..6f0cf1553b07e 100644
+index e78b00768655b..4a76d9c0502c8 100644
--- a/android_webview/browser/aw_autofill_client.cc
+++ b/android_webview/browser/aw_autofill_client.cc
-@@ -86,6 +86,7 @@ AwAutofillClient::GetURLLoaderFactory() {
- }
+@@ -73,6 +73,7 @@ AwAutofillClient::GetURLLoaderFactory() {
- autofill::AutofillDownloadManager* AwAutofillClient::GetDownloadManager() {
+ autofill::AutofillCrowdsourcingManager*
+ AwAutofillClient::GetCrowdsourcingManager() {
+#if defined(USE_BROWSER_AUTOFILL_ONLY)
- if (autofill::AutofillProvider::is_download_manager_disabled_for_testing()) {
+ if (autofill::AutofillProvider::
+ is_crowdsourcing_manager_disabled_for_testing()) {
return nullptr;
+@@ -84,6 +85,9 @@ AwAutofillClient::GetCrowdsourcingManager() {
+ this, GetChannel(), GetLogManager());
}
-@@ -95,6 +96,9 @@ autofill::AutofillDownloadManager* AwAutofillClient::GetDownloadManager() {
- this, GetChannel(), GetLogManager());
- }
- return download_manager_.get();
+ return crowdsourcing_manager_.get();
+#else
+ return nullptr;
+#endif // defined(USE_BROWSER_AUTOFILL_ONLY)
@@ -40,10 +40,10 @@
autofill::PersonalDataManager* AwAutofillClient::GetPersonalDataManager() {
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
-index 8728878809d86..e6b1e938d9a5a 100644
+index dac7963df6224..b85c663c9a714 100644
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
-@@ -453,6 +453,7 @@ if (current_toolchain == default_toolchain) {
+@@ -467,6 +467,7 @@ if (current_toolchain == default_toolchain) {
"//chrome/browser/xsurface:java",
"//chrome/browser/xsurface_provider:dependency_provider_impl_java",
"//chrome/browser/xsurface_provider:java",
@@ -52,7 +52,7 @@
"//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 d9f1d1008e623..18f23b198448e 100644
+index f5f10dd2f13a1..97c29c85df08b 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;
@@ -70,16 +70,15 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
-@@ -52,6 +56,8 @@ import org.chromium.chrome.browser.tab.TabUtils.LoadIfNeededCaller;
+@@ -51,6 +55,7 @@ import org.chromium.chrome.browser.rlz.RevenueStats;
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.AutofillSelectionMenuItemProvider;
import org.chromium.components.dom_distiller.core.DomDistillerUrlUtils;
import org.chromium.components.embedder_support.util.UrlConstants;
import org.chromium.components.embedder_support.view.ContentView;
-@@ -65,9 +71,11 @@ import org.chromium.content_public.browser.ChildProcessImportance;
+@@ -64,9 +69,11 @@ import org.chromium.content_public.browser.ChildProcessImportance;
import org.chromium.content_public.browser.ContentFeatureList;
import org.chromium.content_public.browser.ContentFeatureMap;
import org.chromium.content_public.browser.LoadUrlParams;
@@ -91,34 +90,34 @@
import org.chromium.ui.base.PageTransition;
import org.chromium.ui.base.ViewAndroidDelegate;
import org.chromium.ui.base.WindowAndroid;
-@@ -209,6 +217,7 @@ public class TabImpl implements Tab {
+@@ -200,6 +207,7 @@ class TabImpl implements Tab {
private int mParentId = INVALID_TAB_ID;
private int mRootId;
private @TabUserAgent int mUserAgent = TabUserAgent.DEFAULT;
+ AutofillProvider mAutofillProvider;
+
/**
* Navigation state of the WebContents as returned by nativeGetContentsStateAsByteBuffer(),
- * stored to be inflated on demand using unfreezeContents(). If this is not null, there is no
-@@ -271,12 +280,18 @@ public class TabImpl implements Tab {
- public void onViewAttachedToWindow(View view) {
- mIsViewAttachedToWindow = true;
- updateInteractableState();
-+ if (mAutofillProvider != null) {
-+ mAutofillProvider.onContainerViewChanged(mContentView);
-+ }
- }
+@@ -259,12 +267,18 @@ class TabImpl implements Tab {
+ public void onViewAttachedToWindow(View view) {
+ mIsViewAttachedToWindow = true;
+ updateInteractableState();
++ if (mAutofillProvider != null) {
++ mAutofillProvider.onContainerViewChanged(mContentView);
++ }
+ }
- @Override
- public void onViewDetachedFromWindow(View view) {
- mIsViewAttachedToWindow = false;
- updateInteractableState();
-+ if (mAutofillProvider != null) {
-+ mAutofillProvider.onContainerViewChanged(mContentView);
-+ }
- }
- };
+ @Override
+ public void onViewDetachedFromWindow(View view) {
+ mIsViewAttachedToWindow = false;
+ updateInteractableState();
++ if (mAutofillProvider != null) {
++ mAutofillProvider.onContainerViewChanged(mContentView);
++ }
+ }
+ };
mTabViewManager = new TabViewManagerImpl(this);
-@@ -817,6 +832,11 @@ public class TabImpl implements Tab {
+@@ -844,6 +858,11 @@ class TabImpl implements Tab {
for (TabObserver observer : mObservers) observer.onDestroyed(this);
mObservers.clear();
@@ -130,7 +129,7 @@
mUserDataHost.destroy();
mTabViewManager.destroy();
hideNativePage(false, null);
-@@ -1395,6 +1415,18 @@ public class TabImpl implements Tab {
+@@ -1424,6 +1443,18 @@ class TabImpl implements Tab {
return mWebContentsState == null ? -1 : mWebContentsState.version();
}
@@ -149,8 +148,8 @@
/**
* Initializes the {@link WebContents}. Completes the browser content components initialization
* around a native WebContents pointer.
-@@ -1438,10 +1470,23 @@ public class TabImpl implements Tab {
- mWebContentsDelegate = createWebContentsDelegate();
+@@ -1479,6 +1510,12 @@ class TabImpl implements Tab {
+ boolean isBackgroundTab = isDetached();
assert mNativeTabAndroid != 0;
+ SelectionPopupController selectionController = null;
@@ -159,22 +158,25 @@
+ mAutofillProvider = new AutofillProvider(
+ getContext(), cv, webContents, "NativeAutofillRenderer");
+ }
- TabImplJni.get().initWebContents(mNativeTabAndroid, mIncognito,
- TabUtils.isDetached(this), webContents, mWebContentsDelegate,
- new TabContextMenuPopulatorFactory(
- mDelegateFactory.createContextMenuPopulatorFactory(this), this));
+ TabImplJni.get()
+ .initWebContents(
+ mNativeTabAndroid,
+@@ -1489,6 +1526,13 @@ class TabImpl implements Tab {
+ new TabContextMenuPopulatorFactory(
+ mDelegateFactory.createContextMenuPopulatorFactory(this),
+ this));
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && selectionController != null) {
+ mAutofillProvider.setWebContents(webContents);
+ cv.setWebContents(webContents);
-+ selectionController.setNonSelectionAdditionalMenuItemProvider(
-+ new AutofillSelectionMenuItemProvider(
-+ mThemedApplicationContext, mAutofillProvider));
++ // selectionController.setNonSelectionAdditionalMenuItemHelper(
++ // new AutofillSelectionMenuItemHelper(
++ // mThemedApplicationContext, mAutofillProvider));
+ }
mWebContents.notifyRendererPreferenceUpdate();
TabHelpers.initWebContentsHelpers(this);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndroidDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndroidDelegate.java
-index 16c12477bbcb2..a5c9b7fffe05e 100644
+index d5e0e3e9237ed..9af9e3dedbaf7 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndroidDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabViewAndroidDelegate.java
@@ -4,7 +4,10 @@
@@ -188,7 +190,7 @@
import androidx.annotation.Nullable;
-@@ -86,6 +89,16 @@ public class TabViewAndroidDelegate extends ViewAndroidDelegate {
+@@ -83,6 +86,16 @@ public class TabViewAndroidDelegate extends ViewAndroidDelegate {
mTab.onBackgroundColorChanged(color);
}
@@ -206,10 +208,10 @@
public void onTopControlsChanged(
int topControlsOffsetY, int contentOffsetY, int topControlsMinHeightOffsetY) {
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
-index 7cb8d3fc03da2..3a15d9e907b60 100644
+index afdf577837a49..d18e8c3ec8661 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
-@@ -2651,6 +2651,13 @@ static_library("browser") {
+@@ -2662,6 +2662,13 @@ static_library("browser") {
deps += [ "//chrome/browser/error_reporting" ]
}
@@ -224,7 +226,7 @@
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 9e4c108ec5bc5..afa1ade208467 100644
+index 4707fc2d949d2..e762cddf40665 100644
--- a/chrome/browser/ui/autofill/chrome_autofill_client.cc
+++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc
@@ -58,6 +58,9 @@
@@ -237,24 +239,24 @@
#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"
-@@ -215,12 +218,16 @@ ChromeAutofillClient::GetURLLoaderFactory() {
+@@ -218,12 +221,16 @@ ChromeAutofillClient::GetURLLoaderFactory() {
}
- AutofillDownloadManager* ChromeAutofillClient::GetDownloadManager() {
+ AutofillCrowdsourcingManager* ChromeAutofillClient::GetCrowdsourcingManager() {
+#if defined(USE_BROWSER_AUTOFILL_ONLY)
- if (!download_manager_) {
+ if (!crowdsourcing_manager_) {
// Lazy initialization to avoid virtual function calls in the constructor.
- download_manager_ = std::make_unique<AutofillDownloadManager>(
+ crowdsourcing_manager_ = std::make_unique<AutofillCrowdsourcingManager>(
this, GetChannel(), GetLogManager());
}
- return download_manager_.get();
+ return crowdsourcing_manager_.get();
+#else
+ return nullptr;
+#endif // defined(USE_BROWSER_AUTOFILL_ONLY)
}
AutofillOptimizationGuide* ChromeAutofillClient::GetAutofillOptimizationGuide()
-@@ -1323,7 +1330,12 @@ void ChromeAutofillClient::OnZoomChanged(
+@@ -1362,7 +1369,12 @@ void ChromeAutofillClient::OnZoomChanged(
ChromeAutofillClient::ChromeAutofillClient(content::WebContents* web_contents)
: ContentAutofillClient(
web_contents,
@@ -269,7 +271,7 @@
g_browser_process->GetApplicationLocale())),
content::WebContentsObserver(web_contents),
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 aefde08a5b224..e08ce993314e2 100644
+index abe1ac2b7907d..9cf691982660d 100644
--- 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
@@ -9,6 +9,7 @@ import android.content.res.Configuration;
@@ -288,7 +290,7 @@
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.widget.FrameLayout;
-@@ -38,6 +40,7 @@ import org.chromium.ui.accessibility.AccessibilityState;
+@@ -39,6 +41,7 @@ import org.chromium.ui.accessibility.AccessibilityState;
import org.chromium.ui.base.EventForwarder;
import org.chromium.ui.base.EventOffsetHandler;
import org.chromium.ui.dragdrop.DragEventDispatchHelper.DragEventDispatchDestination;
@@ -296,17 +298,17 @@
import java.util.function.Supplier;
-@@ -92,6 +95,9 @@ public class ContentView extends FrameLayout
- */
- public static ContentView createContentView(Context context,
- @Nullable EventOffsetHandler eventOffsetHandler, @Nullable WebContents webContents) {
+@@ -96,6 +99,9 @@ public class ContentView extends FrameLayout
+ Context context,
+ @Nullable EventOffsetHandler eventOffsetHandler,
+ @Nullable WebContents webContents) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ return new ContentViewWithAutofill(context, eventOffsetHandler, webContents);
+ }
return new ContentView(context, eventOffsetHandler, webContents);
}
-@@ -638,4 +644,46 @@ public class ContentView extends FrameLayout
+@@ -642,4 +648,46 @@ public class ContentView extends FrameLayout
mDragDropEventOffsetHandler.onPostDispatchDragEvent(event.getAction());
return ret;
}
@@ -354,10 +356,10 @@
+ }
}
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 1e1d4ea42cf90..595e6a703fff4 100644
+index 0bd9924087048..b2b110c91c1c3 100644
--- a/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java
+++ b/ui/android/java/src/org/chromium/ui/base/ViewAndroidDelegate.java
-@@ -31,6 +31,10 @@ import org.chromium.ui.dragdrop.DragStateTracker;
+@@ -32,6 +32,10 @@ import org.chromium.ui.dragdrop.DragStateTracker;
import org.chromium.ui.dragdrop.DropDataAndroid;
import org.chromium.ui.mojom.CursorType;
@@ -365,10 +367,10 @@
+import android.view.autofill.AutofillValue;
+import android.view.ViewStructure;
+
- /**
- * Class to acquire, position, and remove anchor views from the implementing View.
- */
-@@ -578,4 +582,8 @@ public class ViewAndroidDelegate {
+ /** Class to acquire, position, and remove anchor views from the implementing View. */
+ @JNINamespace("ui")
+ public class ViewAndroidDelegate {
+@@ -586,4 +590,8 @@ public class ViewAndroidDelegate {
sDragAndDropDelegateForTesting = testDelegate;
ResettersForTesting.register(() -> sDragAndDropDelegateForTesting = null);
}
diff --git a/build-chromium/patches/0100-Disable-Play-services-dependent-password-manager-pre.patch b/build-chromium/patches/0117-Disable-Play-services-dependent-password-manager-pre.patch
similarity index 97%
rename from build-chromium/patches/0100-Disable-Play-services-dependent-password-manager-pre.patch
rename to build-chromium/patches/0117-Disable-Play-services-dependent-password-manager-pre.patch
index 342f026..c487ed5 100644
--- a/build-chromium/patches/0100-Disable-Play-services-dependent-password-manager-pre.patch
+++ b/build-chromium/patches/0117-Disable-Play-services-dependent-password-manager-pre.patch
@@ -9,7 +9,7 @@
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 b2e6dc0c7ec86..72da942d0b20f 100644
+index 85006f2848dde..76521f56db4a7 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(