Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Android patches #85

Merged
merged 3 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build_android/chromium-gost-build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ cd $(dirname $0)
. ./chromium-gost-env.sh

cd $CHROMIUM_PATH
gn gen out/RELEASE --args="target_os=\"android\" target_cpu=\"arm64\" is_debug=false symbol_level=0 is_official_build=true treat_warnings_as_errors=false $CHROMIUM_FLAGS $CHROMIUM_PRIVATE_ARGS"
gn gen out/RELEASE --args="target_os=\"android\" target_cpu=\"arm64\" is_debug=false symbol_level=0 is_official_build=true treat_warnings_as_errors=false chrome_pgo_phase=0 $CHROMIUM_FLAGS $CHROMIUM_PRIVATE_ARGS"
ninja -C out/RELEASE chrome_public_apk
2 changes: 1 addition & 1 deletion build_android/chromium-gost-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ git reset HEAD~ --hard

cd $CHROMIUM_PATH
git reset HEAD~ --hard
git fetch --tags
git fetch origin tag $CHROMIUM_TAG --no-tags
git checkout -b temp tags/$CHROMIUM_TAG
git show-ref --quiet refs/heads/$GOST_BRANCH && git branch -D $GOST_BRANCH
git checkout -b $GOST_BRANCH tags/$CHROMIUM_TAG
Expand Down
41 changes: 29 additions & 12 deletions patch/android.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
From 3535a7786594750d2fbac5ee0190286e780e4cc4 Mon Sep 17 00:00:00 2001
From: crypto-das <[email protected]>
Date: Wed, 6 Mar 2024 10:44:28 +0000
Subject: [PATCH] Android CSP integration

---
chrome/android/BUILD.gn | 12 ++++++++++++
chrome/android/chrome_public_apk_tmpl.gni | 9 +++++++++
.../res_chromium_base/values/channel_constants.xml | 8 ++++----
.../chrome/browser/ChromeTabbedActivity.java | 14 ++++++++++++++
.../ui_thread_search_terms_data_android.cc | 2 +-
5 files changed, 40 insertions(+), 5 deletions(-)

diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
index 271d8ffbb5b7b..18073719f9e95 100644
index d3e324f0f6fbb..4addd65570a37 100644
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -284,8 +284,20 @@ if (current_toolchain == default_toolchain) {
@@ -282,8 +282,20 @@ if (current_toolchain == default_toolchain) {
srcjar_deps = [ ":chrome_android_java_google_api_keys_srcjar" ]
}

Expand All @@ -24,10 +37,10 @@ index 271d8ffbb5b7b..18073719f9e95 100644
":chrome_app_java_resources",
":chrome_public_apk_template_resources",
diff --git a/chrome/android/chrome_public_apk_tmpl.gni b/chrome/android/chrome_public_apk_tmpl.gni
index 54c50b54bb7ca..0f00e512bc425 100644
index df3d58c8bade4..67d713b55ea2a 100644
--- a/chrome/android/chrome_public_apk_tmpl.gni
+++ b/chrome/android/chrome_public_apk_tmpl.gni
@@ -729,6 +729,15 @@ template("chrome_common_apk_or_module_tmpl") {
@@ -711,6 +711,15 @@ template("chrome_common_apk_or_module_tmpl") {
}
}

Expand Down Expand Up @@ -61,20 +74,21 @@ index cc1f2a30cb3c5..3953c9ad3800f 100644
+ <string name="quick_action_search_widget_title" translatable="false">Chromium-Gost quick action search</string>
</resources>
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
index 74e852c79190b..2f5afed5e07f2 100644
index d61269f9a8fea..9a218fcb02137 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -252,11 +252,22 @@ import java.util.Map;
import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -267,12 +267,23 @@ import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.BooleanSupplier;
import java.util.function.DoubleConsumer;

+import ru.CryptoPro.JCSP.NCSPConfig;
+
/**
* This is the main activity for ChromeMobile when not running in document mode. All the tabs
* are accessible via a chrome specific tab switching UI.
* This is the main activity for ChromeMobile when not running in document mode. All the tabs are
* accessible via a chrome specific tab switching UI.
*/
public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent> {
public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent>
implements MismatchedIndicesHandler {
+ private static final String APP_LOGGER_TAG = "CSP";
+
+ private boolean initCSPProviders() {
Expand All @@ -87,7 +101,7 @@ index 74e852c79190b..2f5afed5e07f2 100644
private static final String TAG = "ChromeTabbedActivity";

protected static final String WINDOW_INDEX = "window_index";
@@ -525,6 +536,9 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
@@ -568,6 +579,9 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
}
minimizeAppAndCloseTabOnBackPress(getActivityTab());
});
Expand All @@ -110,3 +124,6 @@ index 1278f9e64ed1f..caf77c47e85b9 100644
}

std::string UIThreadSearchTermsData::GetMailRUReferralID() const {
--
2.34.1