Skip to content

Commit

Permalink
Update/port patches for 127.0.6533.103.0
Browse files Browse the repository at this point in the history
  • Loading branch information
quh4gko8 authored and thestinger committed Aug 6, 2024
1 parent f0577a9 commit 133dbc8
Show file tree
Hide file tree
Showing 183 changed files with 261 additions and 180 deletions.
60 changes: 30 additions & 30 deletions patches/0001-Vanadium-string-rebranding.patch

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions patches/0007-enable-stack-clash-protection-for-arm64-targets.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: fgei <fgei@gmail.com>
Date: Wed, 31 Jul 2024 12:35:24 +0000
Subject: [PATCH] enable stack clash protection for arm64 targets

---
build/config/compiler/BUILD.gn | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index f598fd188a4ce..d8e9203096789 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -371,6 +371,10 @@ config("compiler") {
}
}

+ if (target_cpu == "arm64") {
+ cflags += [ "-fstack-clash-protection" ]
+ }
+
if (use_lld) {
ldflags += [ "-fuse-ld=lld" ]
if (lld_path != "") {
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Subject: [PATCH] switch to -fstack-protector-strong
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index f598fd188a4ce..fb5140a0f50f4 100644
index d8e9203096789..e751d7b359e32 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -366,7 +366,7 @@ config("compiler") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Subject: [PATCH] enable -fwrapv in Clang for non-UBSan builds
1 file changed, 4 insertions(+)

diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index fb5140a0f50f4..8fa79720b3a16 100644
index e751d7b359e32..c2b0ffc5b14e9 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -378,6 +378,10 @@ config("compiler") {
@@ -382,6 +382,10 @@ config("compiler") {
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Subject: [PATCH] enable -ftrivial-auto-var-init=zero
1 file changed, 4 insertions(+)

diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 8fa79720b3a16..857311ac56448 100644
index c2b0ffc5b14e9..624297fb2d0a0 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -382,6 +382,10 @@ config("compiler") {
@@ -386,6 +386,10 @@ config("compiler") {
cflags += [ "-fwrapv" ]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Subject: [PATCH] disable broken warning for auto var init
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 857311ac56448..3c0d6cbbe6b71 100644
index 624297fb2d0a0..77b26305a0d8a 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -383,7 +383,7 @@ config("compiler") {
@@ -387,7 +387,7 @@ config("compiler") {
}

if (is_clang) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Subject: [PATCH] Checkout PGO profiles
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/DEPS b/DEPS
index 171b6c6f00edc..bd9566e41b9b6 100644
index 2ef294f2050ad..aeb7785f9eaa7 100644
--- a/DEPS
+++ b/DEPS
@@ -149,7 +149,7 @@ vars = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Subject: [PATCH] disable checkout_nacl
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/DEPS b/DEPS
index bd9566e41b9b6..394b6719780e1 100644
index aeb7785f9eaa7..5481322f86a44 100644
--- a/DEPS
+++ b/DEPS
@@ -118,7 +118,7 @@ vars = {
Expand Down
File renamed without changes.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,87 +1,59 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: fgei <fgei@gmail.com>
Date: Thu, 1 Feb 2024 17:58:40 +0000
Date: Thu, 1 Feb 2024 17:58:19 +0000
Subject: [PATCH] Extend opening links from external apps in incognito for
search tabs
custom tabs

---
.../chromium/chrome/browser/LaunchIntentDispatcher.java | 2 ++
.../chrome/browser/LaunchIntentDispatcherHooks.java | 6 ++++++
.../chrome/browser/searchwidget/SearchActivity.java | 6 +++++-
.../chrome/browser/searchwidget/SearchActivityHooks.java | 7 +++++++
4 files changed, 20 insertions(+), 1 deletion(-)
.../chrome/browser/LaunchIntentDispatcher.java | 1 +
.../browser/LaunchIntentDispatcherHooks.java | 17 +++++++++++++++++
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 97fb584f0ec86..5f059ef6ff070 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
@@ -221,6 +221,8 @@ public class LaunchIntentDispatcher {
searchActivityIntent.setClass(
ContextUtils.getApplicationContext(), SearchActivity.class);
searchActivityIntent.putExtra(SearchManager.QUERY, query);
+ searchActivityIntent = LaunchIntentDispatcherHooks.maybeModifySearchIntents(
+ mActivity, searchActivityIntent);
mActivity.startActivity(searchActivityIntent);
}
return true;
@@ -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, 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 c282d5311d57f..6cdfa50279aa0 100644
index aaec00177de6e..c282d5311d57f 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 {
@@ -1,9 +1,20 @@
package org.chromium.chrome.browser;

return newIntent;
}
import android.app.Activity;
+import android.content.Context;
import android.content.Intent;

final class LaunchIntentDispatcherHooks {
+
+ static Intent maybeModifySearchIntents(Activity activity, Intent intent) {
+ Intent newIntent = maybeCreateIncognitoTabIntentFor(activity, intent);
+ private static Intent maybeCreateIncognitoTabIntentFor(Context context, Intent intent) {
+ Intent newIntent = intent;
+ if (TabPreferencesUtils.shouldOpenLinksInIncognito()) {
+ newIntent = TabPreferencesUtils.appendNeededIncognitoExtras(context, newIntent);
+ }
+
+ return newIntent;
+ }
}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java
index a2a066322d4b2..86831f34543a4 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java
@@ -469,13 +469,17 @@ public class SearchActivity extends AsyncInitializationActivity
@Nullable
@Override
protected OTRProfileID createOffTheRecordProfileID() {
+ if (SearchActivityHooks.shouldOpenInIncognito(getIntent())) {
+ return super.createOffTheRecordProfileID();
+ }
throw new IllegalStateException(
"Attempting to access incognito from the search activity");
}
};
profileProvider.onAvailable(
(provider) -> {
- mProfileSupplier.set(profileProvider.get().getOriginalProfile());
+ mProfileSupplier.set(ProfileProvider.getOrCreateProfile(profileProvider.get(),
+ SearchActivityHooks.shouldOpenInIncognito(getIntent())));
});
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 791a9ed59a2f3..bbc7996c25aaf 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;
import android.app.Activity;
import android.content.Intent;

+import org.chromium.base.IntentUtils;
+import org.chromium.chrome.browser.IntentHandler;
import org.chromium.chrome.browser.TabPreferencesUtils;
import org.chromium.chrome.browser.omnibox.LocationBarCoordinator;

@@ -20,4 +22,9 @@ public class SearchActivityHooks {
+
static Intent maybeModifyActionViewIntents(Activity activity, Intent intent) {
Intent newIntent = intent;
if (TabPreferencesUtils.shouldOpenLinksInIncognito()) {
@@ -12,4 +23,10 @@ final class LaunchIntentDispatcherHooks {

return newIntent;
}
+
+ static boolean shouldOpenInIncognito(Intent intent) {
+ return IntentUtils.safeGetBooleanExtra(intent,
+ IntentHandler.EXTRA_OPEN_NEW_INCOGNITO_TAB, false);
+ static Intent maybeModifyCustomTabIntents(Context context, Intent intent) {
+ Intent newIntent = maybeCreateIncognitoTabIntentFor(context, intent);
+
+ return newIntent;
+ }
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,86 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: fgei <fgei@gmail.com>
Date: Thu, 1 Feb 2024 17:58:40 +0000
Subject: [PATCH] Extend opening links from external apps in incognito for
share intents
search tabs

---
.../org/chromium/chrome/browser/LaunchIntentDispatcher.java | 1 +
.../chrome/browser/LaunchIntentDispatcherHooks.java | 6 ++++++
2 files changed, 7 insertions(+)
.../chromium/chrome/browser/LaunchIntentDispatcher.java | 2 ++
.../chrome/browser/LaunchIntentDispatcherHooks.java | 6 ++++++
.../chrome/browser/searchwidget/SearchActivity.java | 6 +++++-
.../chrome/browser/searchwidget/SearchActivityHooks.java | 7 +++++++
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 5f059ef6ff070..edb1c9b177b57 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
@@ -149,6 +149,7 @@ public class LaunchIntentDispatcher {
url = IntentHandler.getUrlFromShareIntent(mIntent);
if (url == null) return Action.FINISH_ACTIVITY;
mIntent.setData(Uri.parse(url));
+ mIntent = LaunchIntentDispatcherHooks.maybeModifyActionSendIntents(mActivity, mIntent);
} else {
url = IntentHandler.getUrlFromIntent(mIntent);
@@ -221,6 +221,8 @@ public class LaunchIntentDispatcher {
searchActivityIntent.setClass(
ContextUtils.getApplicationContext(), SearchActivity.class);
searchActivityIntent.putExtra(SearchManager.QUERY, query);
+ searchActivityIntent = LaunchIntentDispatcherHooks.maybeModifySearchIntents(
+ mActivity, searchActivityIntent);
mActivity.startActivity(searchActivityIntent);
}
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 6cdfa50279aa0..547e85324cac5 100644
index c282d5311d57f..6cdfa50279aa0 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 {
@@ -29,4 +29,10 @@ final class LaunchIntentDispatcherHooks {

return newIntent;
}
+
+ static Intent maybeModifyActionSendIntents(Activity activity, Intent intent) {
+ static Intent maybeModifySearchIntents(Activity activity, Intent intent) {
+ Intent newIntent = maybeCreateIncognitoTabIntentFor(activity, intent);
+
+ return newIntent;
+ }
}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java
index a2a066322d4b2..86831f34543a4 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java
@@ -469,13 +469,17 @@ public class SearchActivity extends AsyncInitializationActivity
@Nullable
@Override
protected OTRProfileID createOffTheRecordProfileID() {
+ if (SearchActivityHooks.shouldOpenInIncognito(getIntent())) {
+ return super.createOffTheRecordProfileID();
+ }
throw new IllegalStateException(
"Attempting to access incognito from the search activity");
}
};
profileProvider.onAvailable(
(provider) -> {
- mProfileSupplier.set(profileProvider.get().getOriginalProfile());
+ mProfileSupplier.set(ProfileProvider.getOrCreateProfile(profileProvider.get(),
+ SearchActivityHooks.shouldOpenInIncognito(getIntent())));
});
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 791a9ed59a2f3..bbc7996c25aaf 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;
import android.app.Activity;
import android.content.Intent;

+import org.chromium.base.IntentUtils;
+import org.chromium.chrome.browser.IntentHandler;
import org.chromium.chrome.browser.TabPreferencesUtils;
import org.chromium.chrome.browser.omnibox.LocationBarCoordinator;

@@ -20,4 +22,9 @@ public class SearchActivityHooks {

return newIntent;
}
+
+ static boolean shouldOpenInIncognito(Intent intent) {
+ return IntentUtils.safeGetBooleanExtra(intent,
+ IntentHandler.EXTRA_OPEN_NEW_INCOGNITO_TAB, false);
+ }
}
Loading

0 comments on commit 133dbc8

Please sign in to comment.