Browse Source

Change package name for extension version

tags/83.0.4103.61-1
wchen342 1 year ago
parent
commit
ff3bc4ac93
Signed by: wchen342 GPG Key ID: 720B70365E800508
13 changed files with 180 additions and 35 deletions
  1. +1
    -1
      .github/ISSUE_TEMPLATE/feature_request.md
  2. +8
    -0
      CHANGELOG.md
  3. +0
    -1
      android_flags.gn
  4. +3
    -1
      build.sh
  5. +1
    -1
      misc/android_studio_setup.sh
  6. +33
    -0
      patches/Extensions/change-package-name-chromium-extensions.patch
  7. +4
    -0
      patches/Extensions/gn.patch
  8. +4
    -0
      patches/Extensions/res.patch
  9. +14
    -0
      patches/Extensions/src.patch
  10. +15
    -28
      patches/debug-fix.patch
  11. +0
    -3
      patches/series
  12. +43
    -0
      patches/series_extensions
  13. +54
    -0
      patches/src-fix/fix-disabled-supervised-user.patch

+ 1
- 1
.github/ISSUE_TEMPLATE/feature_request.md View File

@ -8,7 +8,7 @@ assignees: ''
---
**Is your feature request fall into the scope of ungoogled-chromium?**
Please explain why the feature request aligns with the goal of ungoogled-chromium. [...]
Please explain why the feature request aligns with the goal of ungoogled-chromium. See [ungoogled-chromium#objectives](https://github.com/Eloston/ungoogled-chromium#objectives) for a detailed list of objectives of this project. [...]
**Please describe the feature you would like to have**
A clear and concise description of what the problem is. [...]


+ 8
- 0
CHANGELOG.md View File

@ -1,3 +1,11 @@
# 83.0.4103.61-1
* Add extension-support version
* This version is highly experimental and is not intended for daily usage yet! See [README#Extensions](https://github.com/wchen342/ungoogled-chromium-android#extensions)
* Extension removal is not implemented yet
* The package will have a name `org.ungoogled.chromium.extensions`
* Resolve [#20](https://github.com/wchen342/ungoogled-chromium-android/issues/20), [#23](https://github.com/wchen342/ungoogled-chromium-android/issues/23)
* Partially resolve [#19](https://github.com/wchen342/ungoogled-chromium-android/issues/19), [#21](https://github.com/wchen342/ungoogled-chromium-android/issues/21)
# 81.0.4044.138-1
* Fix a crash with incognito tab
* Minor fix for extension patches. From next release, `chrome`/`arm` target will include a beta version with extension support.


+ 0
- 1
android_flags.gn View File

@ -8,7 +8,6 @@ clang_base_path="/usr"
disable_android_lint=true
enable_gvr_services=false
enable_resource_whitelist_generation=false
enable_supervised_users=false
ffmpeg_branding="Chrome"
is_clang=true
rtc_build_examples=false


+ 3
- 1
build.sh View File

@ -266,7 +266,9 @@ else
cat ../android_flags.gn ../android_flags.debug.gn > out/Default/args.gn
fi
printf '\ntarget_cpu="'"$ARCH"'"\n' >> out/Default/args.gn
printf '\nenable_extensions=true\n' >> out/Default/args.gn
# Only used for extensions
#printf '\nenable_extensions=true\n' >> out/Default/args.gn
#printf '\nenable_supervised_users=false\n' >> out/Default/args.gn
gn gen out/Default --fail-on-unused-args
popd


+ 1
- 1
misc/android_studio_setup.sh View File

@ -56,7 +56,7 @@ pushd src
output_folder=out/Debug_apk
mkdir -p ${output_folder}
cat ../android_flags.debug.gn ../android_flags.gn > ${output_folder}/args.gn
printf '\ntarget_cpu="arm64"\n' >> ${output_folder}/args.gn
printf '\ntarget_cpu="arm"\n' >> ${output_folder}/args.gn
popd
# Run gn first


+ 33
- 0
patches/Extensions/change-package-name-chromium-extensions.patch View File

@ -0,0 +1,33 @@
description: change package name to allow co-existence with original Chromium
author: Wengling Chen <[email protected]>
---
chrome/android/BUILD.gn | 4 ++--
chrome/android/java/res_chromium/values/channel_constants.xml | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -43,9 +43,9 @@ declare_args() {
# WebView providers which declare one of a handful of package names. See
# https://chromium.9oo91esource.qjz9zk/chromium/src/+/HEAD/android_webview/docs/build-instructions.md#Changing-package-name
# for details.
- chrome_public_manifest_package = "org.chromium.chrome"
+ chrome_public_manifest_package = "org.ungoogled.chromium.extensions"
}
-chrome_public_test_manifest_package = "org.chromium.chrome.tests"
+chrome_public_test_manifest_package = "org.ungoogled.chromium.extensions.tests"
chrome_public_jinja_variables =
default_chrome_public_jinja_variables +
--- a/chrome/android/java/res_chromium/values/channel_constants.xml
+++ b/chrome/android/java/res_chromium/values/channel_constants.xml
@@ -5,7 +5,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The application name displayed to the user. -->
- <string name="app_name" translatable="false">Chromium</string>
+ <string name="app_name" translatable="false">Ungoogled Chromium Extensions</string>
<string name="bookmark_widget_title" translatable="false">Chromium bookmarks</string>
<string name="search_widget_title" translatable="false">Chromium search</string>
</resources>

patches/Kiwi/gn.patch → patches/Extensions/gn.patch View File

@ -1,3 +1,7 @@
From: Wengling Chen <[email protected]>
Date: Sat, 30 May 2020 18:25:38 -0400
Subject: gn fixes for enable_extensions=true
---
apps/BUILD.gn | 2
build/config/locales.gni | 2

patches/Kiwi/res.patch → patches/Extensions/res.patch View File

@ -1,3 +1,7 @@
From: Wengling Chen <[email protected]>
Date: Sat, 30 May 2020 18:25:38 -0400
Subject: resource fixes for enable_extensions=true
---
chrome/app/bookmarks_strings.grdp | 6 +-
chrome/app/chromium_strings.grd | 20 +++----

patches/Kiwi/src.patch → patches/Extensions/src.patch View File

@ -1,3 +1,7 @@
From: Wengling Chen <[email protected]>
Date: Sat, 30 May 2020 18:25:38 -0400
Subject: source code fixes for enable_extensions=true
---
android_webview/browser/aw_browser_context.cc | 6
android_webview/browser/aw_browser_context.h | 2
@ -8058,3 +8062,13 @@
break;
case TOGGLE_VISIBILITY: {
bool currently_visible = button_visibility_ == VISIBLE;
--- a/chrome/browser/ui/webui/settings/people_handler.cc
+++ b/chrome/browser/ui/webui/settings/people_handler.cc
@@ -711,7 +711,6 @@ void PeopleHandler::HandleSignout(const
}
void PeopleHandler::HandlePauseSync(const base::ListValue* args) {
- DCHECK(AccountConsistencyModeManager::IsDiceEnabledForProfile(profile_));
auto* identity_manager = IdentityManagerFactory::GetForProfile(profile_);
DCHECK(identity_manager->HasPrimaryAccount());

+ 15
- 28
patches/debug-fix.patch View File

@ -3,24 +3,21 @@ Date: Tue, 26 May 2020 22:31:34 -0400
Subject: Remove DCHECK and other lines causing Debug builds to fail
---
build/android/gyp/compile_java.py | 2
build/config/compiler/BUILD.gn | 7 --
cc/trees/layer_tree_host_impl.cc | 3
chrome/browser/extensions/api/developer_private/developer_private_api.cc | 4 -
chrome/browser/extensions/extension_context_menu_model.cc | 2
chrome/browser/extensions/extension_tab_util.cc | 35 ++++------
chrome/browser/extensions/extension_tab_util.h | 2
chrome/browser/ui/webui/settings/people_handler.cc | 1
components/omnibox/browser/autocomplete_controller.cc | 3
components/omnibox/browser/autocomplete_match.cc | 10 --
components/omnibox/browser/autocomplete_result.cc | 7 --
components/omnibox/browser/shortcuts_backend.cc | 3
components/policy/core/browser/configuration_policy_handler.cc | 1
components/signin/internal/identity_manager/primary_account_manager.cc | 12 ---
components/signin/internal/identity_manager/profile_oauth2_token_service_builder.cc | 1
content/common/input/input_event_stream_validator.cc | 3
services/network/network_context.cc | 1
17 files changed, 23 insertions(+), 74 deletions(-)
build/android/gyp/compile_java.py | 2 -
build/config/compiler/BUILD.gn | 7 +----
cc/trees/layer_tree_host_impl.cc | 3 --
chrome/android/BUILD.gn | 1
chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java | 14 ----------
components/omnibox/browser/autocomplete_controller.cc | 3 --
components/omnibox/browser/autocomplete_match.cc | 10 -------
components/omnibox/browser/autocomplete_result.cc | 7 -----
components/omnibox/browser/shortcuts_backend.cc | 3 --
components/policy/core/browser/configuration_policy_handler.cc | 1
components/signin/internal/identity_manager/primary_account_manager.cc | 12 --------
components/signin/internal/identity_manager/profile_oauth2_token_service_builder.cc | 1
content/common/input/input_event_stream_validator.cc | 3 --
services/network/network_context.cc | 1
14 files changed, 3 insertions(+), 65 deletions(-)
--- a/components/signin/internal/identity_manager/primary_account_manager.cc
+++ b/components/signin/internal/identity_manager/primary_account_manager.cc
@ -111,16 +108,6 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
#endif
return std::make_unique<ProfileOAuth2TokenService>(
--- a/chrome/browser/ui/webui/settings/people_handler.cc
+++ b/chrome/browser/ui/webui/settings/people_handler.cc
@@ -711,7 +711,6 @@ void PeopleHandler::HandleSignout(const
}
void PeopleHandler::HandlePauseSync(const base::ListValue* args) {
- DCHECK(AccountConsistencyModeManager::IsDiceEnabledForProfile(profile_));
auto* identity_manager = IdentityManagerFactory::GetForProfile(profile_);
DCHECK(identity_manager->HasPrimaryAccount());
--- a/components/omnibox/browser/autocomplete_match.cc
+++ b/components/omnibox/browser/autocomplete_match.cc
@@ -1213,16 +1213,6 @@ void AutocompleteMatch::TryAutocompleteW


+ 0
- 3
patches/series View File

@ -3,9 +3,6 @@ src-fix/fix-null-mInstanceID.patch
src-fix/fix-unkown-warning-clang-9.patch
src-fix/fix-safe-browsing-prefs.patch
src-fix/fix-prefs.patch
Kiwi/gn.patch
Kiwi/src.patch
Kiwi/res.patch
Vanadium/0020-disable-media-router-media-remoting-by-default.patch
Vanadium/0021-disable-media-router-by-default.patch
Unobtainium/kill-Auth.patch


+ 43
- 0
patches/series_extensions View File

@ -0,0 +1,43 @@
src-fix/android-rlz-fix-missing-variable.patch
src-fix/fix-null-mInstanceID.patch
src-fix/fix-unkown-warning-clang-9.patch
src-fix/fix-safe-browsing-prefs.patch
src-fix/fix-prefs.patch
src-fix/fix-disabled-supervised-user.patch
Extensions/gn.patch
Extensions/src.patch
Extensions/res.patch
Extensions/change-package-name-chromium-extensions.patch
Vanadium/0020-disable-media-router-media-remoting-by-default.patch
Vanadium/0021-disable-media-router-by-default.patch
Unobtainium/kill-Auth.patch
Unobtainium/kill-GCM.patch
Unobtainium/kill-Location-fall-back-to-system.patch
Unobtainium/kill-Vision.patch
Unobtainium/kill-Translate.patch
Unobtainium/kill-TOS-and-metrics-opt-out.patch
ungoogled-chromium-android/Remove-dependency-on-com.google.android.gcm.patch
ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.gcm.patch
ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.auth.patch
ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.cast.patch
ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.fido-com.google.android.gms.iid-com.google.android.gms.instantapps-com.google.android.gms.location.patch
ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.vision-com.google.android.gms.clearcut-com.google.android.gms.phenotype.patch
ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.flags-com.google.android.gms.location.places-com.google.android.gms.stats.patch
ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.common-auth-signin-dynamic-com.google.android.gms.tasks.patch
ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.patch
ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.core.splitcompat-com.google.android.play.core.splitinstall.patch
ungoogled-chromium-android/Disable-contextual-search.patch
ungoogled-chromium-android/Disable-lite-mode-prompt.patch
ungoogled-chromium-android/Disable-prefetch.patch
ungoogled-chromium-android/Add-more-search-engines.patch
ungoogled-chromium-android/Add-folder-button-bookmark.patch
ungoogled-chromium-android/Mark-http-as-dangerous-mixed-content-warning.patch
Bromite/Add-exit-menu-item.patch
Bromite/Add-flag-to-disable-WebGL.patch
Bromite/Add-flags-to-disable-device-motion-and-orientation-APIs.patch
Bromite/Add-option-to-not-persist-tabs-across-sessions.patch
Bromite/Add-user-setting-for-DNS-over-HTTPS-DoH-custom-URL.patch
Bromite/Change-default-webRTC-policy-to-not-use-any-address.patch
Bromite/Remove-account-permissions-from-manifest.patch
Bromite/Revert-flags-remove-disable-pull-to-refresh-effect.patch
Bromite/updater-disable-updater-pings.patch

+ 54
- 0
patches/src-fix/fix-disabled-supervised-user.patch View File

@ -0,0 +1,54 @@
From: Wengling Chen <[email protected]>
Date: Sat, 30 May 2020 18:25:38 -0400
Subject: fix for enable_supervised_users=false
---
chrome/android/BUILD.gn | 1
chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java | 14 ----------
2 files changed, 15 deletions(-)
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -2718,7 +2718,6 @@ generate_jni("chrome_jni_headers") {
"java/src/org/chromium/chrome/browser/browsing_data/BrowsingDataCounterBridge.java",
"java/src/org/chromium/chrome/browser/browsing_data/UrlFilterBridge.java",
"java/src/org/chromium/chrome/browser/childaccounts/ChildAccountFeedbackReporter.java",
- "java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java",
"java/src/org/chromium/chrome/browser/complex_tasks/TaskTabHelper.java",
"java/src/org/chromium/chrome/browser/complex_tasks/endpoint_fetcher/EndpointFetcher.java",
"java/src/org/chromium/chrome/browser/complex_tasks/endpoint_fetcher/EndpointResponse.java",
--- a/chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java
@@ -60,32 +60,18 @@ public class ChildAccountService {
* @param callback the callback to be called when the status changes.
*/
public static void listenForStatusChange(Callback<Boolean> callback) {
- ChildAccountServiceJni.get().listenForChildStatusReceived(callback);
}
- @CalledByNative
private static void reauthenticateChildAccount(
WindowAndroid windowAndroid, String accountName, final long nativeCallback) {
ThreadUtils.assertOnUiThread();
Activity activity = windowAndroid.getActivity().get();
if (activity == null) {
- PostTask.postTask(UiThreadTaskTraits.DEFAULT,
- ()
- -> ChildAccountServiceJni.get().onReauthenticationResult(
- nativeCallback, false));
return;
}
Account account = AccountUtils.createAccountFromName(accountName);
- AccountManagerFacadeProvider.getInstance().updateCredentials(account, activity,
- result
- -> ChildAccountServiceJni.get().onReauthenticationResult(nativeCallback, result));
}
- @NativeMethods
- interface Natives {
- void listenForChildStatusReceived(Callback<Boolean> callback);
- void onReauthenticationResult(long callbackPtr, boolean reauthSuccessful);
- }
}

Loading…
Cancel
Save