From 2ffe6024673c98ac6f306e513a137f49f92e2687 Mon Sep 17 00:00:00 2001 From: quh4gko8 <88831734+quh4gko8@users.noreply.github.com> Date: Wed, 22 May 2024 16:16:31 +0000 Subject: [PATCH] Update/port patches for 125.0.6422.72.1 --- ...Support-opening-external-web-search-in-incognito.patch | 4 ++-- ...nd-opening-links-from-external-apps-in-incognito.patch | 8 ++++---- ...nd-opening-links-from-external-apps-in-incognito.patch | 6 +++--- ...nd-opening-links-from-external-apps-in-incognito.patch | 4 ++-- ...ot-select-search-query-text-when-opening-web-and.patch | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/patches/0106-Support-opening-external-web-search-in-incognito.patch b/patches/0106-Support-opening-external-web-search-in-incognito.patch index cc6d2023..8e365e6c 100644 --- a/patches/0106-Support-opening-external-web-search-in-incognito.patch +++ b/patches/0106-Support-opening-external-web-search-in-incognito.patch @@ -25,7 +25,7 @@ index 1dcd333c8c552..2ca117c8a08f6 100644 intent.putExtra(SearchWidgetProvider.EXTRA_FROM_SEARCH_WIDGET, true); } diff --git a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityHooks.java b/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityHooks.java -index 9576d3131006e..3c20453a7022a 100644 +index 9576d3131006e..e7ab84a7b4d7c 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityHooks.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityHooks.java @@ -1,5 +1,9 @@ @@ -46,7 +46,7 @@ index 9576d3131006e..3c20453a7022a 100644 + static Intent modifyIntentForStartActivity(Activity activity, Intent intent) { + Intent newIntent = intent; + if (TabPreferencesUtils.shouldOpenLinksInIncognito()) { -+ intent = TabPreferencesUtils.appendNeededIncognitoExtras(activity, intent); ++ newIntent = TabPreferencesUtils.appendNeededIncognitoExtras(activity, intent); + } + + return newIntent; diff --git a/patches/0107-Extend-opening-links-from-external-apps-in-incognito.patch b/patches/0107-Extend-opening-links-from-external-apps-in-incognito.patch index 8b7286bb..47a7f1e3 100644 --- a/patches/0107-Extend-opening-links-from-external-apps-in-incognito.patch +++ b/patches/0107-Extend-opening-links-from-external-apps-in-incognito.patch @@ -10,19 +10,19 @@ Subject: [PATCH] Extend opening links from external apps in incognito for 2 files changed, 18 insertions(+) diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java -index fe9bbd148b60c..ea5f494157b50 100644 +index fe9bbd148b60c..97fb584f0ec86 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java @@ -261,6 +261,7 @@ public class LaunchIntentDispatcher { newIntent.setAction(Intent.ACTION_VIEW); newIntent.setData(uri); newIntent.setClassName(context, CustomTabActivity.class.getName()); -+ newIntent = LaunchIntentDispatcherHooks.maybeModifyCustomTabIntents(context, intent); ++ newIntent = LaunchIntentDispatcherHooks.maybeModifyCustomTabIntents(context, newIntent); // Since configureIntentForResizableCustomTab() might change the componenet/class // associated with the passed intent, it needs to be called after #setClassName(context, diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcherHooks.java b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcherHooks.java -index aaec00177de6e..a3a5d21f71d9f 100644 +index aaec00177de6e..6394a993ecd80 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcherHooks.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcherHooks.java @@ -1,9 +1,20 @@ @@ -37,7 +37,7 @@ index aaec00177de6e..a3a5d21f71d9f 100644 + private static Intent maybeCreateIncognitoTabIntentFor(Context context, Intent intent) { + Intent newIntent = intent; + if (TabPreferencesUtils.shouldOpenLinksInIncognito()) { -+ newIntent = TabPreferencesUtils.createIncognitoIntent(context, intent); ++ newIntent = TabPreferencesUtils.appendNeededIncognitoExtras(context, intent); + } + + return newIntent; diff --git a/patches/0108-Extend-opening-links-from-external-apps-in-incognito.patch b/patches/0108-Extend-opening-links-from-external-apps-in-incognito.patch index 03c7a6ff..8b1f8f54 100644 --- a/patches/0108-Extend-opening-links-from-external-apps-in-incognito.patch +++ b/patches/0108-Extend-opening-links-from-external-apps-in-incognito.patch @@ -12,7 +12,7 @@ Subject: [PATCH] Extend opening links from external apps in incognito for 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java -index ea5f494157b50..3b16e0450ef9a 100644 +index 97fb584f0ec86..5f059ef6ff070 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java @@ -221,6 +221,8 @@ public class LaunchIntentDispatcher { @@ -25,7 +25,7 @@ index ea5f494157b50..3b16e0450ef9a 100644 } return true; diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcherHooks.java b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcherHooks.java -index a3a5d21f71d9f..710fa25ee2826 100644 +index 6394a993ecd80..c621109d7fdbe 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcherHooks.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcherHooks.java @@ -29,4 +29,10 @@ final class LaunchIntentDispatcherHooks { @@ -63,7 +63,7 @@ index 2ca117c8a08f6..0540dc9341529 100644 return profileProvider; } diff --git a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityHooks.java b/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityHooks.java -index 3c20453a7022a..8ad2b300587d3 100644 +index e7ab84a7b4d7c..10cde3e0fb01b 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityHooks.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityHooks.java @@ -3,6 +3,8 @@ package org.chromium.chrome.browser.searchwidget; diff --git a/patches/0109-Extend-opening-links-from-external-apps-in-incognito.patch b/patches/0109-Extend-opening-links-from-external-apps-in-incognito.patch index 37963fad..7f6e5ab2 100644 --- a/patches/0109-Extend-opening-links-from-external-apps-in-incognito.patch +++ b/patches/0109-Extend-opening-links-from-external-apps-in-incognito.patch @@ -10,7 +10,7 @@ Subject: [PATCH] Extend opening links from external apps in incognito for 2 files changed, 7 insertions(+) diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java -index 3b16e0450ef9a..8e6bf5ae19cf8 100644 +index 5f059ef6ff070..edb1c9b177b57 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java @@ -149,6 +149,7 @@ public class LaunchIntentDispatcher { @@ -22,7 +22,7 @@ index 3b16e0450ef9a..8e6bf5ae19cf8 100644 url = IntentHandler.getUrlFromIntent(mIntent); } diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcherHooks.java b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcherHooks.java -index 710fa25ee2826..390eb03db1101 100644 +index c621109d7fdbe..2aa023c3f15c1 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcherHooks.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcherHooks.java @@ -35,4 +35,10 @@ final class LaunchIntentDispatcherHooks { diff --git a/patches/0110-Do-not-select-search-query-text-when-opening-web-and.patch b/patches/0110-Do-not-select-search-query-text-when-opening-web-and.patch index bdf32bf4..4afa3626 100644 --- a/patches/0110-Do-not-select-search-query-text-when-opening-web-and.patch +++ b/patches/0110-Do-not-select-search-query-text-when-opening-web-and.patch @@ -13,7 +13,7 @@ Subject: [PATCH] Do not select search query text when opening web and global 5 files changed, 43 insertions(+), 4 deletions(-) diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java -index 8e6bf5ae19cf8..6b876d889a48b 100644 +index edb1c9b177b57..e54b3eb20ff61 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java @@ -223,7 +223,7 @@ public class LaunchIntentDispatcher { @@ -26,7 +26,7 @@ index 8e6bf5ae19cf8..6b876d889a48b 100644 } return true; diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcherHooks.java b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcherHooks.java -index 390eb03db1101..b14f5d0d4a3c2 100644 +index 2aa023c3f15c1..1fdc7b7c0d4dc 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcherHooks.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcherHooks.java @@ -1,9 +1,12 @@ @@ -74,7 +74,7 @@ index 0540dc9341529..7aded2b0dcc13 100644 @Override diff --git a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityHooks.java b/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityHooks.java -index 8ad2b300587d3..cde1108568d28 100644 +index 10cde3e0fb01b..728d447a28812 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityHooks.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivityHooks.java @@ -27,4 +27,18 @@ public class SearchActivityHooks {