Browse Source

Update to 88.0.4324.104-1; fix androidx overlay; fix gradle

tags/88.0.4324.104-1
wchen342 7 months ago
parent
commit
fd093237e6
Signed by: wchen342 GPG Key ID: 9C19365D69B04CEC
48 changed files with 1644 additions and 1279 deletions
  1. +4
    -0
      CHANGELOG.md
  2. +2
    -2
      README.md
  3. +1
    -1
      android_flags.gn
  4. +13
    -6
      build.sh
  5. +2
    -3
      misc/android_studio_setup.sh
  6. +171
    -77
      patches/Bromite/Add-bookmark-import-export-actions.patch
  7. +5
    -5
      patches/Bromite/Add-exit-menu-item.patch
  8. +14
    -15
      patches/Bromite/Add-flag-to-disable-WebGL.patch
  9. +11
    -11
      patches/Bromite/Add-flags-to-disable-device-motion-orientation-APIs.patch
  10. +25
    -12
      patches/Bromite/Add-option-to-not-persist-tabs-across-sessions.patch
  11. +2
    -16
      patches/Bromite/Change-default-webRTC-policy-to-not-use-any-address.patch
  12. +1
    -1
      patches/Bromite/Disable-DRM-media-origin-IDs-preprovisioning.patch
  13. +10
    -9
      patches/Bromite/Remove-account-permissions-from-manifest.patch
  14. +4
    -4
      patches/Bromite/Revert-flags-remove-disable-pull-to-refresh-effect.patch
  15. +17
    -17
      patches/Other/debug-fix.patch
  16. +20
    -3
      patches/Other/generate_gradle.patch
  17. +6
    -6
      patches/Unobtainium/kill-Auth.patch
  18. +19
    -22
      patches/Unobtainium/kill-GCM.patch
  19. +1
    -1
      patches/Unobtainium/kill-Location-fall-back-to-system.patch
  20. +1
    -1
      patches/Unobtainium/kill-Translate.patch
  21. +9
    -14
      patches/Unobtainium/kill-Vision.patch
  22. +1
    -1
      patches/Vanadium/0020-disable-media-router-media-remoting-by-default.patch
  23. +1
    -1
      patches/Vanadium/0021-disable-media-router-by-default.patch
  24. +0
    -2
      patches/series
  25. +0
    -39
      patches/src-fix/fix-local-modifications.patch
  26. +348
    -192
      patches/src-fix/fix-safe-browsing-prefs.patch
  27. +1
    -1
      patches/src-fix/fix-unkown-warning-clang.patch
  28. +7
    -7
      patches/ungoogled-chromium-android/Add-folder-button-bookmark.patch
  29. +113
    -126
      patches/ungoogled-chromium-android/Add-more-search-engines.patch
  30. +1
    -1
      patches/ungoogled-chromium-android/Change-package-name-chromium.patch
  31. +0
    -115
      patches/ungoogled-chromium-android/Disable-Android-R.patch
  32. +1
    -1
      patches/ungoogled-chromium-android/Disable-contextual-search.patch
  33. +1
    -1
      patches/ungoogled-chromium-android/Disable-homepage-by-default.patch
  34. +1
    -1
      patches/ungoogled-chromium-android/Enable-ProactivelySwapBrowsingInstance.patch
  35. +1
    -1
      patches/ungoogled-chromium-android/Enable-flag-process-sharing.patch
  36. +10
    -10
      patches/ungoogled-chromium-android/Enable-update-notification.patch
  37. +56
    -45
      patches/ungoogled-chromium-android/Remove-UI-elements.patch
  38. +184
    -87
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.auth.patch
  39. +73
    -61
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.cast.patch
  40. +111
    -62
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.common-auth-signin-dynamic-com.google.android.gms.tasks.patch
  41. +16
    -19
      patches/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
  42. +1
    -1
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.flags-com.google.android.gms.location.places-com.google.android.gms.stats.patch
  43. +282
    -155
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.gcm.patch
  44. +47
    -112
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.vision-com.google.android.gms.clearcut-com.google.android.gms.phenotype.patch
  45. +24
    -9
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.core.splitcompat-com.google.android.play.core.splitinstall.patch
  46. +26
    -3
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.patch
  47. BIN
      prebuilt_jar/androidx_fragment_fragment/androidx_fragment_fragment_java.jar
  48. BIN
      prebuilt_jar/androidx_preference_preference/androidx_preference_preference_java.jar

+ 4
- 0
CHANGELOG.md View File

@ -1,3 +1,7 @@
# 88.0.4324.104-1
* Now using SDK 30 (Android 11)
* Fix gradle generation
# 87.0.4280.141-2
* Extension version only:
* HTTPS Everywhere can now open options page correctly


+ 2
- 2
README.md View File

@ -88,9 +88,9 @@ There are three methods to install extensions:
3. Paste the link into omnibox and go to that link.
4. The browser should prompt for installation after finishing downloading
5. Check `chrome://extensions/` and you should see the extension there.
- Method 3 (Developer Mode Folder Loading. This method only supports `Android 5.1+`):
- Method 3 (Developer Mode Folder Loading. This method only supports Android 5.1 to 10):
1. Download extension following the instructions [here](https://ungoogled-software.github.io/ungoogled-chromium-wiki/faq#downloading-the-crx-file).
1. 1. Optionally, you can use a third-party website to download the `crx` file. However, do so at your own risk, as I will take *absolutely no* responsibility for problems caused by using a third party website or service.
1. Optionally, you can use a third-party website to download the `crx` file. However, do so at your own risk, as I will take *absolutely no* responsibility for problems caused by using a third party website or service.
2. Extract the `crx` file into a folder with`unzip`/`7z` and copy the folder to your device.
3. Notice for Android 10: as a workaround for a [permission issue](https://github.com/wchen342/ungoogled-chromium-android/issues/27), you need to enable "Allow from unknown source" for `Ungoogled Chromium Extensions".
4. Make sure you also give storage access.


+ 1
- 1
android_flags.gn View File

@ -3,7 +3,7 @@ android_ndk_root = "//third_party/android_ndk"
android_ndk_version = "r20b"
android_ndk_major_version = 20
android_sdk_build_tools_version="30.0.1"
android_sdk_version=30
android_sdk_version="30"
cc_wrapper="ccache"
clang_base_path="/usr"
disable_android_lint=true


+ 13
- 6
build.sh View File

@ -10,7 +10,7 @@ trichrome_chrome_bundle_target=trichrome_chrome_bundle
trichrome_chrome_apk_target=trichrome_library_apk
webview_target=system_webview_apk
chromium_version=87.0.4280.141
chromium_version=88.0.4324.104
ungoogled_chromium_revision=1
# Show env
@ -203,7 +203,7 @@ cp safe_browsing_proto_files/webprotect.pb.h src/components/safe_browsing/core/p
## Prepare Android SDK/NDK
SDK_DIR="android-sdk_eng.10.0.0_r14_linux-x86"
SDK_DIR="android-sdk_eng.11.0.0_r27_linux-x86"
# Create symbol links to sdk folders
# The rebuild sdk has a different folder structure from the checked out version, so it is easier to create symbol links
@ -212,9 +212,9 @@ if [[ -d "$DIRECTORY" ]]; then
find $DIRECTORY -mindepth 1 -maxdepth 1 -not -name cmdline-tools -exec rm -rf '{}' \;
fi
pushd ${DIRECTORY}
mkdir build-tools && ln -s ../../../../../android-sdk/${SDK_DIR}/build-tools/android-10 build-tools/30.0.1
mkdir build-tools && ln -s ../../../../../android-sdk/${SDK_DIR}/build-tools/android-11 build-tools/30.0.1
mkdir platforms
ln -s ../../../../../android-sdk/${SDK_DIR}/platforms/android-10 platforms/android-30
ln -s ../../../../../android-sdk/${SDK_DIR}/platforms/android-11 platforms/android-30
ln -s ../../../../android-sdk/${SDK_DIR}/platform-tools platform-tools
ln -s ../../../../android-sdk/${SDK_DIR}/tools tools
popd
@ -232,7 +232,7 @@ ln -s ../../android-ndk/android-ndk-r20b android_ndk
popd
# This is Sylvain Beucler's libre Android rebuild
sdk_link="https://android-rebuilds.beuc.net/dl/bundles/android-sdk_eng.10.0.0_r14_linux-x86.zip"
sdk_link="https://android-rebuilds.beuc.net/dl/bundles/android-sdk_eng.11.0.0_r27_linux-x86.zip"
sdk_tools_link="https://android-rebuilds.beuc.net/dl/repository/sdk-repo-linux-tools-26.1.1.zip"
ndk_link="https://android-rebuilds.beuc.net/dl/repository/android-ndk-r20b-linux-x86_64.tar.bz2"
@ -240,7 +240,7 @@ mkdir android-rebuilds
mkdir android-sdk
mkdir android-ndk
pushd android-rebuilds
for i in $(seq 1 5); do curl -O ${sdk_link} && unzip -qqo android-sdk_eng.10.0.0_r14_linux-x86.zip -d ../android-sdk && rm -f android-sdk_eng.10.0.0_r14_linux-x86.zip && s=0 && break || s=$? && sleep 60; done; (exit $s)
for i in $(seq 1 5); do curl -O ${sdk_link} && unzip -qqo android-sdk_eng.11.0.0_r27_linux-x86.zip -d ../android-sdk && rm -f android-sdk_eng.11.0.0_r27_linux-x86.zip && s=0 && break || s=$? && sleep 60; done; (exit $s)
for i in $(seq 1 5); do curl -O ${sdk_tools_link} && unzip -qqo sdk-repo-linux-tools-26.1.1.zip -d ../android-sdk/android-sdk_eng.10.0.0_r14_linux-x86 && rm -f sdk-repo-linux-tools-26.1.1.zip && s=0 && break || s=$? && sleep 60; done; (exit $s)
for i in $(seq 1 5); do curl -O ${ndk_link} && tar xjf android-ndk-r20b-linux-x86_64.tar.bz2 -C ../android-ndk && rm -f android-ndk-r20b-linux-x86_64.tar.bz2 && s=0 && break || s=$? && sleep 60; done; (exit $s)
popd
@ -307,6 +307,13 @@ export CCACHE_SLOPPINESS=time_macros
apk_out_folder="apk_out"
mkdir "${apk_out_folder}"
pushd src
# Copy overlay jars built from
# //third_party/android_deps/local_modifications/androidx_fragment_fragment:androidx_fragment_fragment_partial_java
# and
# //third_party/android_deps/local_modifications/androidx_preference_preference:androidx_preference_preference_partial_java
cp ../prebuilt_jar/androidx_fragment_fragment/androidx_fragment_fragment_java.jar third_party/android_deps/local_modifications/androidx_fragment_fragment
cp ../prebuilt_jar/androidx_preference_preference/androidx_preference_preference_java.jar third_party/android_deps/local_modifications/androidx_preference_preference
if [[ "$TARGET" != "all" ]]; then
ninja -C "${output_folder}" "$TARGET"
if [[ "$TARGET" == "$trichrome_chrome_bundle_target" ]] || [[ "$TARGET" == "$chrome_modern_target" ]]; then


+ 2
- 3
misc/android_studio_setup.sh View File

@ -84,7 +84,6 @@ gn gen ${output_folder} --fail-on-unused-args
pushd ..
patch -p1 --ignore-whitespace -i patches/Other/generate_gradle.patch --no-backup-if-mismatch
popd
# patch -p1 --ignore-whitespace -i ../patches/src-fix/fix-unkown-warning-clang-9.patch --no-backup-if-mismatch
# The following doesn't work since v86. Most likely GN problem.
#python build/android/gradle/generate_gradle.py --target //chrome/android:${chrome_modern_target} --output-directory ${output_folder}
# Also needs third_party/android_sdk/public/extras
python build/android/gradle/generate_gradle.py --output-directory ${output_folder}
popd

+ 171
- 77
patches/Bromite/Add-bookmark-import-export-actions.patch View File

@ -6,29 +6,30 @@ Add bookmark import/export actions in bookmarks activity and page
Reduce permissions needed for bookmarks import/export
Completely remove contacts picker permission from the file dialog
---
chrome/android/java/AndroidManifest.xml | 1
chrome/android/java/res/menu/bookmark_action_bar_menu.xml | 14
chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkActionBar.java | 12
chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkActivity.java | 15
chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java | 47 ++
chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkDelegate.java | 10
chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManager.java | 19
chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkPage.java | 1
chrome/browser/BUILD.gn | 6
chrome/browser/android/bookmarks/bookmark_bridge.cc | 217 ++++++++++
chrome/browser/android/bookmarks/bookmark_bridge.h | 20
chrome/browser/importer/profile_writer.cc | 12
chrome/browser/importer/profile_writer.h | 6
chrome/browser/ui/android/strings/android_chrome_strings.grd | 6
chrome/common/BUILD.gn | 3
chrome/utility/BUILD.gn | 7
chrome/utility/importer/bookmark_html_reader.cc | 27 +
chrome/utility/importer/bookmark_html_reader.h | 8
ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java | 18
ui/shell_dialogs/select_file_dialog.h | 2
ui/shell_dialogs/select_file_dialog_android.cc | 6
ui/shell_dialogs/select_file_dialog_android.h | 2
22 files changed, 447 insertions(+), 12 deletions(-)
chrome/android/java/AndroidManifest.xml | 1
chrome/android/java/res/menu/bookmark_action_bar_menu.xml | 14
chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkActionBar.java | 12
chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkActivity.java | 23
chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java | 63 ++
chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkDelegate.java | 10
chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManager.java | 19
chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkPage.java | 5
chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java | 3
chrome/browser/BUILD.gn | 6
chrome/browser/android/bookmarks/bookmark_bridge.cc | 242 ++++++++++
chrome/browser/android/bookmarks/bookmark_bridge.h | 23
chrome/browser/importer/profile_writer.cc | 12
chrome/browser/importer/profile_writer.h | 6
chrome/browser/ui/android/strings/android_chrome_strings.grd | 6
chrome/common/BUILD.gn | 3
chrome/utility/BUILD.gn | 7
chrome/utility/importer/bookmark_html_reader.cc | 27 -
chrome/utility/importer/bookmark_html_reader.h | 8
ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java | 18
ui/shell_dialogs/select_file_dialog.h | 2
ui/shell_dialogs/select_file_dialog_android.cc | 6
ui/shell_dialogs/select_file_dialog_android.h | 2
23 files changed, 504 insertions(+), 14 deletions(-)
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@ -107,7 +108,7 @@ Completely remove contacts picker permission from the file dialog
getMenu().findItem(R.id.edit_menu_id).setVisible(mCurrentFolder.isEditable());
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkActivity.java
@@ -13,6 +13,7 @@ import androidx.annotation.VisibleForTes
@@ -15,6 +15,7 @@ import org.chromium.chrome.browser.Inten
import org.chromium.chrome.browser.SnackbarActivity;
import org.chromium.components.bookmarks.BookmarkId;
import org.chromium.components.embedder_support.util.UrlConstants;
@ -115,7 +116,7 @@ Completely remove contacts picker permission from the file dialog
/**
* The activity that displays the bookmark UI on the phone. It keeps a {@link BookmarkManager}
@@ -22,6 +23,7 @@ import org.chromium.components.embedder_
@@ -24,6 +25,7 @@ import org.chromium.components.embedder_
public class BookmarkActivity extends SnackbarActivity {
private BookmarkManager mBookmarkManager;
@ -123,7 +124,7 @@ Completely remove contacts picker permission from the file dialog
static final int EDIT_BOOKMARK_REQUEST_CODE = 14;
public static final String INTENT_VISIT_BOOKMARK_ID = "BookmarkEditActivity.VisitBookmarkId";
@@ -33,6 +35,18 @@ public class BookmarkActivity extends Sn
@@ -38,6 +40,18 @@ public class BookmarkActivity extends Sn
if (TextUtils.isEmpty(url)) url = UrlConstants.BOOKMARKS_URL;
mBookmarkManager.updateForUrl(url);
setContentView(mBookmarkManager.getView());
@ -142,7 +143,7 @@ Completely remove contacts picker permission from the file dialog
}
@Override
@@ -49,6 +63,7 @@ public class BookmarkActivity extends Sn
@@ -54,6 +68,7 @@ public class BookmarkActivity extends Sn
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
@ -150,21 +151,38 @@ Completely remove contacts picker permission from the file dialog
if (requestCode == EDIT_BOOKMARK_REQUEST_CODE && resultCode == RESULT_OK) {
BookmarkId bookmarkId = BookmarkId.getBookmarkIdFromString(data.getStringExtra(
INTENT_VISIT_BOOKMARK_ID));
@@ -61,6 +76,14 @@ public class BookmarkActivity extends Sn
}
}
+ @Override
+ public void onRequestPermissionsResult(
+ int requestCode, String[] permissions, int[] grantResults) {
+ if (mWindowAndroid.handlePermissionResult(requestCode, permissions, grantResults))
+ return;
+ super.onRequestPermissionsResult(requestCode, permissions, grantResults);
+ }
+
/**
* @return The {@link BookmarkManager} for testing purposes.
*/
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java
@@ -4,7 +4,11 @@
@@ -4,7 +4,13 @@
package org.chromium.chrome.browser.bookmarks;
+import android.content.Intent;
+import android.content.Context;
+import android.content.pm.PackageManager;
+import android.net.Uri;
import android.os.SystemClock;
+import android.provider.Browser;
+import android.Manifest.permission;
import android.text.TextUtils;
import android.util.Pair;
@@ -26,6 +30,11 @@ import org.chromium.components.url_forma
@@ -26,6 +32,11 @@ import org.chromium.components.url_forma
import org.chromium.components.url_formatter.UrlFormatter;
import org.chromium.content_public.browser.WebContents;
@ -176,7 +194,7 @@ Completely remove contacts picker permission from the file dialog
import java.util.ArrayList;
import java.util.List;
@@ -563,6 +572,24 @@ public class BookmarkBridge {
@@ -586,6 +597,38 @@ public class BookmarkBridge {
}
/**
@ -192,8 +210,22 @@ Completely remove contacts picker permission from the file dialog
+ * Export bookmarks to a path selected by the user.
+ * @param window The current window of the bookmarks activity or page.
+ */
+ public void exportBookmarks() {
+ public void exportBookmarks(WindowAndroid window) {
+ assert mIsNativeBookmarkModelLoaded;
+ // check if we have the correct write permission
+ if (window.hasPermission(permission.WRITE_EXTERNAL_STORAGE)) {
+ exportBookmarksImpl();
+ } else {
+ String[] requestPermissions = new String[] {permission.WRITE_EXTERNAL_STORAGE};
+ window.requestPermissions(requestPermissions, (permissions, grantResults) -> {
+ if (grantResults.length >= 1 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
+ exportBookmarksImpl();
+ }
+ });
+ };
+ }
+
+ private void exportBookmarksImpl() {
+ BookmarkBridgeJni.get().exportBookmarks(mNativeBookmarkBridge, BookmarkBridge.this);
+ }
+
@ -201,7 +233,7 @@ Completely remove contacts picker permission from the file dialog
* Synchronously gets a list of bookmarks that match the specified search query.
* @param query Keyword used for searching bookmarks.
* @param maxNumberOfResult Maximum number of result to fetch.
@@ -942,6 +969,24 @@ public class BookmarkBridge {
@@ -1006,6 +1049,24 @@ public class BookmarkBridge {
depthList.add(depth);
}
@ -226,7 +258,7 @@ Completely remove contacts picker permission from the file dialog
private static List<Pair<Integer, Integer>> createPairsList(int[] left, int[] right) {
List<Pair<Integer, Integer>> pairList = new ArrayList<Pair<Integer, Integer>>();
for (int i = 0; i < left.length; i++) {
@@ -1009,6 +1054,8 @@ public class BookmarkBridge {
@@ -1073,6 +1134,8 @@ public class BookmarkBridge {
int getChildCount(long nativeBookmarkBridge, BookmarkBridge caller, long id, int type);
void getChildIDs(long nativeBookmarkBridge, BookmarkBridge caller, long id, int type,
List<BookmarkId> bookmarksList);
@ -262,17 +294,17 @@ Completely remove contacts picker permission from the file dialog
import org.chromium.components.browser_ui.widget.selectable_list.SelectableListToolbar.SearchDelegate;
+import org.chromium.ui.base.ActivityWindowAndroid;
import org.chromium.components.browser_ui.widget.selectable_list.SelectionDelegate;
import org.chromium.components.favicon.LargeIconBridge;
import org.chromium.url.GURL;
@@ -52,6 +53,7 @@ public class BookmarkManager
private Activity mActivity;
@@ -54,6 +55,7 @@ public class BookmarkManager
private ComponentName mOpenBookmarkComponentName;
private ViewGroup mMainView;
private BookmarkModel mBookmarkModel;
+ private ActivityWindowAndroid mWindowAndroid;
private BookmarkUndoController mUndoController;
private final ObserverList<BookmarkUIObserver> mUIObservers = new ObserverList<>();
private BasicNativePage mNativePage;
@@ -323,6 +325,13 @@ public class BookmarkManager
@@ -328,6 +330,13 @@ public class BookmarkManager
}
/**
@ -286,7 +318,7 @@ Completely remove contacts picker permission from the file dialog
* @return Current URL representing the UI state of bookmark manager. If no state has been shown
* yet in this session, on phone return last used state stored in preference; on tablet
* return the url previously set by {@link #updateForUrl(String)}.
@@ -495,6 +504,16 @@ public class BookmarkManager
@@ -501,6 +510,16 @@ public class BookmarkManager
}
@Override
@ -296,7 +328,7 @@ Completely remove contacts picker permission from the file dialog
+
+ @Override
+ public void exportBookmarks() {
+ mBookmarkModel.exportBookmarks();
+ mBookmarkModel.exportBookmarks(mWindowAndroid);
+ }
+
+ @Override
@ -305,17 +337,44 @@ Completely remove contacts picker permission from the file dialog
mSelectableListLayout.onStartSearch();
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkPage.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkPage.java
@@ -29,6 +29,7 @@ public class BookmarkPage extends BasicN
@@ -13,6 +13,7 @@ import org.chromium.chrome.browser.ui.me
import org.chromium.chrome.browser.ui.native_page.BasicNativePage;
import org.chromium.chrome.browser.ui.native_page.NativePageHost;
import org.chromium.components.embedder_support.util.UrlConstants;
+import org.chromium.chrome.browser.app.ChromeActivity;
mManager = new BookmarkManager(activity, false, activity.getSnackbarManager());
/**
* A native page holding a {@link BookmarkManager} on _tablet_.
@@ -29,11 +30,13 @@ public class BookmarkPage extends BasicN
* @param host A NativePageHost to load urls.
*/
public BookmarkPage(
- ComponentName componentName, SnackbarManager snackbarManager, NativePageHost host) {
+ ComponentName componentName, SnackbarManager snackbarManager, NativePageHost host,
+ ChromeActivity activity) {
super(host);
mManager = new BookmarkManager(host.getContext(), componentName, false, snackbarManager);
mManager.setBasicNativePage(this);
+ mManager.setWindow(activity.getWindowAndroid());
mTitle = host.getContext().getResources().getString(R.string.bookmarks);
initWithView(mManager.getView());
--- a/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java
@@ -95,7 +95,8 @@ public class NativePageFactory {
protected NativePage buildBookmarksPage(Tab tab) {
return new BookmarkPage(mActivity.getComponentName(), mActivity.getSnackbarManager(),
- new TabShim(tab, mActivity));
+ new TabShim(tab, mActivity),
+ mActivity);
}
protected NativePage buildDownloadsPage(Tab tab) {
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -184,6 +184,8 @@ static_library("browser") {
@@ -190,6 +190,8 @@ static_library("browser") {
"bitmap_fetcher/bitmap_fetcher_service.h",
"bitmap_fetcher/bitmap_fetcher_service_factory.cc",
"bitmap_fetcher/bitmap_fetcher_service_factory.h",
@ -324,7 +383,7 @@ Completely remove contacts picker permission from the file dialog
"bluetooth/bluetooth_chooser_context.cc",
"bluetooth/bluetooth_chooser_context.h",
"bluetooth/bluetooth_chooser_context_factory.cc",
@@ -1825,6 +1827,8 @@ static_library("browser") {
@@ -1862,6 +1864,8 @@ static_library("browser") {
"web_data_service_factory.h",
"window_placement/window_placement_permission_context.cc",
"window_placement/window_placement_permission_context.h",
@ -333,7 +392,7 @@ Completely remove contacts picker permission from the file dialog
]
configs += [
@@ -3303,8 +3307,6 @@ static_library("browser") {
@@ -3395,8 +3399,6 @@ static_library("browser") {
"badging/badge_manager_factory.h",
"banners/app_banner_manager_desktop.cc",
"banners/app_banner_manager_desktop.h",
@ -344,7 +403,7 @@ Completely remove contacts picker permission from the file dialog
"browsing_data/access_context_audit_service.cc",
--- a/chrome/browser/android/bookmarks/bookmark_bridge.cc
+++ b/chrome/browser/android/bookmarks/bookmark_bridge.cc
@@ -38,6 +38,7 @@
@@ -39,6 +39,7 @@
#include "components/bookmarks/common/android/bookmark_type.h"
#include "components/bookmarks/common/bookmark_pref_names.h"
#include "components/bookmarks/managed/managed_bookmark_service.h"
@ -352,7 +411,7 @@ Completely remove contacts picker permission from the file dialog
#include "components/dom_distiller/core/url_utils.h"
#include "components/prefs/pref_service.h"
#include "components/query_parser/query_parser.h"
@@ -47,6 +48,21 @@
@@ -48,6 +49,24 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
@ -370,11 +429,14 @@ Completely remove contacts picker permission from the file dialog
+#include "components/search_engines/template_url.h"
+#include "components/url_formatter/url_fixer.h"
+#include "ui/android/window_android.h"
+#include "base/task/task_traits.h"
+#include "base/task/thread_pool.h"
+#include "content/public/browser/browser_task_traits.h"
+
using base::android::AttachCurrentThread;
using base::android::ConvertUTF8ToJavaString;
using base::android::ConvertUTF16ToJavaString;
@@ -63,6 +79,56 @@ using bookmarks::BookmarkNode;
@@ -64,6 +83,56 @@ using bookmarks::BookmarkNode;
using bookmarks::BookmarkType;
using content::BrowserThread;
@ -431,10 +493,10 @@ Completely remove contacts picker permission from the file dialog
namespace {
const int kInvalidId = -1;
@@ -141,6 +207,10 @@ BookmarkBridge::~BookmarkBridge() {
bookmark_model_->RemoveObserver(this);
@@ -150,6 +219,10 @@ BookmarkBridge::~BookmarkBridge() {
if (partner_bookmarks_shim_)
partner_bookmarks_shim_->RemoveObserver(this);
reading_list_manager_->RemoveObserver(this);
+ // There may be pending file dialogs, we need to tell them that we've gone
+ // away so they don't try and call back to us.
+ if (select_file_dialog_)
@ -442,7 +504,7 @@ Completely remove contacts picker permission from the file dialog
}
void BookmarkBridge::Destroy(JNIEnv*, const JavaParamRef<jobject>&) {
@@ -520,6 +590,153 @@ jint BookmarkBridge::GetTotalBookmarkCou
@@ -541,6 +614,175 @@ jint BookmarkBridge::GetTotalBookmarkCou
return count;
}
@ -519,6 +581,17 @@ Completely remove contacts picker permission from the file dialog
+
+void BookmarkBridge::FileSelected(const base::FilePath& path, int index,
+ void* params) {
+ base::ThreadPool::PostTaskAndReplyWithResult(
+ FROM_HERE, {base::TaskPriority::BEST_EFFORT, base::MayBlock()},
+ base::BindOnce(&BookmarkBridge::FileSelectedImpl,
+ base::Unretained(this),
+ path),
+ base::BindOnce(&BookmarkBridge::FileSelectedImplOnUIThread,
+ base::Unretained(this),
+ path));
+}
+
+const std::string BookmarkBridge::FileSelectedImpl(const base::FilePath& path) {
+ base::File file;
+ if (path.IsContentUri()) {
+ file = base::OpenContentUriForRead(path);
@ -527,32 +600,39 @@ Completely remove contacts picker permission from the file dialog
+ }
+ if (!file.IsValid()) {
+ select_file_dialog_->ShowToast("Cannot open bookmarks file for import");
+ return;
+ return "";
+ }
+
+ auto fileLength = file.GetLength();
+ if (-1 == fileLength) {
+ select_file_dialog_->ShowToast("Cannot read bookmarks file length");
+ return;
+ return "";
+ }
+
+ if (fileLength > 10 * 1024 * 1024) {
+ select_file_dialog_->ShowToast("Bookmark file is bigger than 10MB");
+ return;
+ return "";
+ }
+
+ std::vector<char> buffer(fileLength);
+ if (-1 == file.ReadAtCurrentPos(buffer.data(), fileLength)) {
+ select_file_dialog_->ShowToast("Could not read bookmarks file");
+ return;
+ return "";
+ }
+
+ if (buffer.empty()) {
+ select_file_dialog_->ShowToast("Empty bookmarks file");
+ return;
+ return "";
+ }
+
+ std::string contents(buffer.begin(), buffer.end());
+ return contents;
+}
+
+void BookmarkBridge::FileSelectedImplOnUIThread(const base::FilePath& path,
+ const std::string& contents) {
+ if (contents.empty())
+ return;
+
+ // the following import logic comes from BookmarksFileImporter class
+ std::vector<ImportedBookmarkEntry> bookmarks;
@ -584,10 +664,14 @@ Completely remove contacts picker permission from the file dialog
+ writer->AddKeywords(std::move(owned_template_urls), false);
+ }
+
+ select_file_dialog_->ShowToast("Bookmarks import complete");
+
+ LOG(INFO) << "Imported " << bookmarks.size() << " bookmarks and " <<
+ std::stringstream message;
+ message << "Imported " << bookmarks.size() << " bookmarks and " <<
+ search_engines.size() << " search engines from " << path.MaybeAsASCII();
+ auto result = message.str();
+
+ select_file_dialog_->ShowToast(result);
+
+ LOG(INFO) << result;
+}
+
+void BookmarkBridge::FileSelectionCanceled(void* params) {
@ -598,7 +682,7 @@ Completely remove contacts picker permission from the file dialog
jlong id,
--- a/chrome/browser/android/bookmarks/bookmark_bridge.h
+++ b/chrome/browser/android/bookmarks/bookmark_bridge.h
@@ -19,6 +19,8 @@
@@ -23,6 +23,8 @@
#include "components/bookmarks/browser/base_bookmark_model_observer.h"
#include "components/bookmarks/common/android/bookmark_id.h"
#include "components/prefs/pref_change_registrar.h"
@ -607,17 +691,17 @@ Completely remove contacts picker permission from the file dialog
namespace bookmarks {
class BookmarkModel;
@@ -32,7 +34,8 @@ class Profile;
// bookmark page. This fetches the bookmarks, title, urls, folder
// hierarchy.
@@ -38,7 +40,8 @@ class Profile;
class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
- public PartnerBookmarksShim::Observer {
+ public PartnerBookmarksShim::Observer,
+ public ui::SelectFileDialog::Listener {
public PartnerBookmarksShim::Observer,
public ReadingListManager::Observer,
- public ProfileObserver {
+ public ProfileObserver,
+ public ui::SelectFileDialog::Listener {
public:
BookmarkBridge(JNIEnv* env,
const base::android::JavaRef<jobject>& obj,
@@ -48,6 +51,12 @@ class BookmarkBridge : public bookmarks:
@@ -54,6 +57,12 @@ class BookmarkBridge : public bookmarks:
bool IsDoingExtensiveChanges(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj);
@ -630,7 +714,7 @@ Completely remove contacts picker permission from the file dialog
jboolean IsEditBookmarksEnabled(JNIEnv* env);
void LoadEmptyPartnerBookmarkShimForTesting(
@@ -135,6 +144,13 @@ class BookmarkBridge : public bookmarks:
@@ -141,6 +150,13 @@ class BookmarkBridge : public bookmarks:
jlong id,
jint type);
@ -644,8 +728,8 @@ Completely remove contacts picker permission from the file dialog
void SetBookmarkTitle(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj,
jlong id,
@@ -280,12 +296,14 @@ class BookmarkBridge : public bookmarks:
void ShimBeingDeleted(PartnerBookmarksShim* shim) override;
@@ -311,12 +327,14 @@ class BookmarkBridge : public bookmarks:
void DestroyJavaObject();
Profile* profile_;
+ base::FilePath export_path_;
@ -659,9 +743,19 @@ Completely remove contacts picker permission from the file dialog
// Information about the Partner bookmarks (must check for IsLoaded()).
// This is owned by profile.
@@ -328,6 +346,9 @@ class BookmarkBridge : public bookmarks:
// Observes the profile destruction and creation.
ScopedObserver<Profile, ProfileObserver> profile_observer_{this};
+ const std::string FileSelectedImpl(const base::FilePath& path);
+ void FileSelectedImplOnUIThread(const base::FilePath& path,
+ const std::string& contents);
DISALLOW_COPY_AND_ASSIGN(BookmarkBridge);
};
--- a/chrome/browser/importer/profile_writer.cc
+++ b/chrome/browser/importer/profile_writer.cc
@@ -103,12 +103,14 @@ void ProfileWriter::AddHistoryPage(const
@@ -105,12 +105,14 @@ void ProfileWriter::AddHistoryPage(const
HistoryServiceFactory::GetForProfile(profile_,
ServiceAccessType::EXPLICIT_ACCESS)
->AddPagesWithDetails(page, visit_source);
@ -676,7 +770,7 @@ Completely remove contacts picker permission from the file dialog
}
void ProfileWriter::AddHomepage(const GURL& home_page) {
@@ -129,6 +131,16 @@ void ProfileWriter::AddBookmarks(
@@ -131,6 +133,16 @@ void ProfileWriter::AddBookmarks(
return;
BookmarkModel* model = BookmarkModelFactory::GetForBrowserContext(profile_);
@ -703,7 +797,7 @@ Completely remove contacts picker permission from the file dialog
#include "components/favicon_base/favicon_usage_data.h"
#include "components/history/core/browser/history_types.h"
#include "components/search_engines/template_url_service.h"
@@ -67,6 +68,11 @@ class ProfileWriter : public base::RefCo
@@ -70,6 +71,11 @@ class ProfileWriter : public base::RefCo
const std::vector<ImportedBookmarkEntry>& bookmarks,
const base::string16& top_level_folder_name);
@ -732,7 +826,7 @@ Completely remove contacts picker permission from the file dialog
</message>
--- a/chrome/common/BUILD.gn
+++ b/chrome/common/BUILD.gn
@@ -406,6 +406,9 @@ static_library("common") {
@@ -401,6 +401,9 @@ static_library("common") {
sources += [
"media/chrome_media_drm_bridge_client.cc",
"media/chrome_media_drm_bridge_client.h",
@ -744,7 +838,7 @@ Completely remove contacts picker permission from the file dialog
# Non-Android.
--- a/chrome/utility/BUILD.gn
+++ b/chrome/utility/BUILD.gn
@@ -78,8 +78,6 @@ static_library("utility") {
@@ -71,8 +71,6 @@ static_library("utility") {
if (!is_android) {
sources += [
@ -752,8 +846,8 @@ Completely remove contacts picker permission from the file dialog
- "importer/bookmark_html_reader.h",
"importer/bookmarks_file_importer.cc",
"importer/bookmarks_file_importer.h",
"importer/edge_database_reader_win.cc",
@@ -180,6 +178,11 @@ static_library("utility") {
"importer/external_process_importer_bridge.cc",
@@ -187,6 +185,11 @@ static_library("utility") {
}
}
@ -941,7 +1035,7 @@ Completely remove contacts picker permission from the file dialog
* type, which might be wildcard. For example:
--- a/ui/shell_dialogs/select_file_dialog.h
+++ b/ui/shell_dialogs/select_file_dialog.h
@@ -198,6 +198,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDia
@@ -204,6 +204,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDia
void* params);
bool HasMultipleFileTypeChoices();


+ 5
- 5
patches/Bromite/Add-exit-menu-item.patch View File

@ -22,7 +22,7 @@ Corrected Exit functionality
</group>
<!-- Items shown only in the tab switcher -->
@@ -139,6 +141,8 @@
@@ -150,6 +152,8 @@
<item android:id="@id/preferences_id"
android:title="@string/menu_settings"
android:icon="@drawable/settings_cog" />
@ -33,7 +33,7 @@ Corrected Exit functionality
<!-- Items shown only in the tab switcher when start surface is enabled -->
--- a/chrome/android/java/res/menu/main_menu_regroup.xml
+++ b/chrome/android/java/res/menu/main_menu_regroup.xml
@@ -152,6 +152,9 @@
@@ -181,6 +181,9 @@
android:icon="@drawable/vr_headset" />
<item android:id="@+id/managed_by_menu_id"
android:title="@string/managed" />
@ -45,7 +45,7 @@ Corrected Exit functionality
<!-- Items shown only in the tab switcher -->
--- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
@@ -55,6 +55,7 @@ import org.chromium.base.supplier.Onesho
@@ -54,6 +54,7 @@ import org.chromium.base.supplier.Onesho
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ActivityTabProvider;
import org.chromium.chrome.browser.AppHooks;
@ -53,7 +53,7 @@ Corrected Exit functionality
import org.chromium.chrome.browser.ChromeActivitySessionTracker;
import org.chromium.chrome.browser.ChromeApplication;
import org.chromium.chrome.browser.ChromeWindow;
@@ -1957,6 +1958,11 @@ public abstract class ChromeActivity<C e
@@ -1984,6 +1985,11 @@ public abstract class ChromeActivity<C e
RecordUserAction.record("MobileMenuSettings");
}
@ -82,7 +82,7 @@ Corrected Exit functionality
@Override
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -2874,6 +2874,9 @@ Data from your Incognito session will on
@@ -2940,6 +2940,9 @@ Data from your Incognito session will on
<message name="IDS_MENU_SETTINGS" desc="Menu item for opening browser settings. [CHAR-LIMIT=27]">
Settings
</message>


+ 14
- 15
patches/Bromite/Add-flag-to-disable-WebGL.patch View File

@ -4,13 +4,13 @@ Subject: Add flag to disable WebGL
---
chrome/browser/about_flags.cc | 3 +++
chrome/browser/flag_descriptions.cc | 4 ++++
chrome/browser/flag_descriptions.cc | 3 +++
chrome/browser/flag_descriptions.h | 3 +++
3 files changed, 10 insertions(+)
3 files changed, 9 insertions(+)
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2483,6 +2483,9 @@ const FeatureEntry kFeatureEntries[] = {
@@ -2466,6 +2466,9 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kAccelerated2dCanvasName,
flag_descriptions::kAccelerated2dCanvasDescription, kOsAll,
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)},
@ -22,26 +22,25 @@ Subject: Add flag to disable WebGL
SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)},
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -494,6 +494,10 @@ const char kForceEnableDevicesPageDescri
"content, instead of a warning message. Note: chrome://devices is "
"no longer supported, and this flag will be permanently removed in M88.";
@@ -3247,6 +3247,9 @@ const char kWalletRequiresFirstSyncSetup
"first-sync-setup to be complete. Only has an effect if "
"enable-autofill-account-wallet-storage is also enabled.";
+const char kDisableWebGLName[] = "Disable all versions of WebGL";
+
+const char kDisableWebGLDescription[] = "Disable all versions of WebGL";
+
const char kDisableBestEffortTasksName[] = "Skip best effort tasks";
const char kDisableBestEffortTasksDescription[] =
"With this flag on, tasks of the lowest priority will not be executed "
// Non-Android -----------------------------------------------------------------
#else // !defined(OS_ANDROID)
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -306,6 +306,9 @@ extern const char kDeviceDiscoveryNotifi
extern const char kForceEnableDevicesPageName[];
extern const char kForceEnableDevicesPageDescription[];
@@ -1874,6 +1874,9 @@ extern const char kTabbedAppOverflowMenu
extern const char kWalletRequiresFirstSyncSetupCompleteName[];
extern const char kWalletRequiresFirstSyncSetupCompleteDescription[];
+extern const char kDisableWebGLName[];
+extern const char kDisableWebGLDescription[];
+
extern const char kDisableBestEffortTasksName[];
extern const char kDisableBestEffortTasksDescription[];
// Non-Android ----------------------------------------------------------------
#else // !defined(OS_ANDROID)

+ 11
- 11
patches/Bromite/Add-flags-to-disable-device-motion-orientation-APIs.patch View File

@ -19,7 +19,7 @@ legacy acceleration events.
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2694,6 +2694,12 @@ const FeatureEntry kFeatureEntries[] = {
@@ -2681,6 +2681,12 @@ const FeatureEntry kFeatureEntries[] = {
{"enable-gpu-rasterization", flag_descriptions::kGpuRasterizationName,
flag_descriptions::kGpuRasterizationDescription, kOsAll,
MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices)},
@ -34,7 +34,7 @@ legacy acceleration events.
MULTI_VALUE_TYPE(kEnableOopRasterizationChoices)},
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -739,6 +739,14 @@ const char kWinrtSensorsImplementationDe
@@ -735,6 +735,14 @@ const char kWinrtSensorsImplementationDe
"Enables usage of the Windows.Devices.Sensors WinRT APIs on Windows for "
"sensors";
@ -51,7 +51,7 @@ legacy acceleration events.
const char kEnableGenericSensorExtraClassesDescription[] =
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -439,6 +439,12 @@ extern const char kWinrtGeolocationImple
@@ -444,6 +444,12 @@ extern const char kWinrtGeolocationImple
extern const char kWinrtSensorsImplementationName[];
extern const char kWinrtSensorsImplementationDescription[];
@ -66,7 +66,7 @@ legacy acceleration events.
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@@ -93,6 +93,9 @@ void SetRuntimeFeatureDefaultsForPlatfor
@@ -88,6 +88,9 @@ void SetRuntimeFeatureDefaultsForPlatfor
command_line.HasSwitch(
blink::switches::kEnableGpuMemoryBufferCompositorResources) &&
!command_line.HasSwitch(switches::kDisableWebGLImageChromium) &&
@ -78,8 +78,8 @@ legacy acceleration events.
#else
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -856,6 +856,16 @@ const base::Feature kWebOtpBackend{"kWeb
// TODO(rouslan): Remove this.
@@ -835,6 +835,16 @@ const base::Feature kWebOtpBackend{"kWeb
// The JavaScript API for payments on the web.
const base::Feature kWebPayments{"WebPayments",
base::FEATURE_ENABLED_BY_DEFAULT};
+// Enables the device motion API used to track device acceleration;
@ -97,7 +97,7 @@ legacy acceleration events.
const base::Feature kWebPaymentsMinimalUI{"WebPaymentsMinimalUI",
--- a/content/public/common/content_features.h
+++ b/content/public/common/content_features.h
@@ -183,6 +183,8 @@ CONTENT_EXPORT extern const base::Featur
@@ -182,6 +182,8 @@ CONTENT_EXPORT extern const base::Featur
CONTENT_EXPORT extern const base::Feature kWebXrHitTest;
CONTENT_EXPORT extern const base::Feature kWebXrIncubations;
@ -108,7 +108,7 @@ legacy acceleration events.
CONTENT_EXPORT extern const base::Feature
--- a/third_party/blink/public/platform/web_runtime_features.h
+++ b/third_party/blink/public/platform/web_runtime_features.h
@@ -99,6 +99,8 @@ class WebRuntimeFeatures {
@@ -96,6 +96,8 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableCSSHexAlphaColor(bool);
BLINK_PLATFORM_EXPORT static void EnableSameSiteByDefaultCookies(bool);
BLINK_PLATFORM_EXPORT static void EnableScrollTopLeftInterop(bool);
@ -119,7 +119,7 @@ legacy acceleration events.
BLINK_PLATFORM_EXPORT static void EnableDecodeJpeg420ImagesToYUV(bool);
--- a/third_party/blink/renderer/modules/modules_initializer.cc
+++ b/third_party/blink/renderer/modules/modules_initializer.cc
@@ -228,9 +228,13 @@ void ModulesInitializer::OnClearWindowOb
@@ -220,9 +220,13 @@ void ModulesInitializer::OnClearWindowOb
Document& document,
const Settings& settings) const {
LocalDOMWindow& window = *document.domWindow();
@ -138,7 +138,7 @@ legacy acceleration events.
// TODO(nhiroki): Figure out why ServiceWorkerContainer needs to be eagerly
--- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc
+++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
@@ -187,6 +187,14 @@ void WebRuntimeFeatures::EnableScrollTop
@@ -171,6 +171,14 @@ void WebRuntimeFeatures::EnableScrollTop
RuntimeEnabledFeatures::SetScrollTopLeftInteropEnabled(enable);
}
@ -155,7 +155,7 @@ legacy acceleration events.
}
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -1314,6 +1314,14 @@
@@ -1361,6 +1361,14 @@
status: "experimental",
},
{


+ 25
- 12
patches/Bromite/Add-option-to-not-persist-tabs-across-sessions.patch View File

@ -3,19 +3,19 @@ Date: Sat, 7 Sep 2019 15:07:42 +0200
Subject: Add option to not persist tabs across sessions
---
chrome/android/java/res/xml/privacy_preferences.xml | 6 +++++
chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java | 4 ++-
chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java | 11 ++++++++--
chrome/browser/ui/android/strings/android_chrome_strings.grd | 6 +++++
4 files changed, 24 insertions(+), 3 deletions(-)
chrome/android/java/res/xml/privacy_preferences.xml | 6 +++
chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java | 4 +-
chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java | 17 ++++++++--
chrome/browser/ui/android/strings/android_chrome_strings.grd | 6 +++
4 files changed, 30 insertions(+), 3 deletions(-)
--- a/chrome/android/java/res/xml/privacy_preferences.xml
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
@@ -45,4 +45,10 @@
android:summary="@string/prefs_safe_browsing_summary"
android:fragment="org.chromium.chrome.browser.safe_browsing.settings.SecuritySettingsFragment"
android:fragment="org.chromium.chrome.browser.safe_browsing.settings.SafeBrowsingSettingsFragment"
android:order="6"/>
+ <org.chromium.components.browser_ui.settings.ChromeBaseCheckBoxPreference
+ <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
+ android:key="close_tabs_on_exit"
+ android:title="@string/close_tabs_on_exit_title"
+ android:summary="@string/close_tabs_on_exit_summary"
@ -24,7 +24,7 @@ Subject: Add option to not persist tabs across sessions
</PreferenceScreen>
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -1046,8 +1046,10 @@ public class ChromeTabbedActivity extend
@@ -1076,8 +1076,10 @@ public class ChromeTabbedActivity extend
boolean hadCipherData =
CipherFactory.getInstance().restoreFromBundle(getSavedInstanceState());
@ -62,16 +62,17 @@ Subject: Add option to not persist tabs across sessions
private static final String PREF_CAN_MAKE_PAYMENT = "can_make_payment";
private static final String PREF_NETWORK_PREDICTIONS = "preload_pages";
private static final String PREF_SECURE_DNS = "secure_dns";
@@ -52,7 +55,7 @@ public class PrivacySettings
@@ -52,7 +55,8 @@ public class PrivacySettings
private static final String PREF_CLEAR_BROWSING_DATA = "clear_browsing_data";
private static final String[] NEW_PRIVACY_PREFERENCE_ORDER = {PREF_CLEAR_BROWSING_DATA,
PREF_SAFE_BROWSING, PREF_CAN_MAKE_PAYMENT, PREF_NETWORK_PREDICTIONS, PREF_USAGE_STATS,
- PREF_SECURE_DNS, PREF_DO_NOT_TRACK};
+ PREF_SECURE_DNS, PREF_DO_NOT_TRACK, PREF_CLOSE_TABS_ON_EXIT};
+ PREF_SECURE_DNS, PREF_DO_NOT_TRACK,
+ PREF_CLOSE_TABS_ON_EXIT};
private ManagedPreferenceDelegate mManagedPreferenceDelegate;
@@ -145,7 +148,11 @@ public class PrivacySettings
@@ -145,7 +149,11 @@ public class PrivacySettings
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
String key = preference.getKey();
@ -84,9 +85,21 @@ Subject: Add option to not persist tabs across sessions
UserPrefs.get(Profile.getLastUsedRegularProfile())
.setBoolean(Pref.CAN_MAKE_PAYMENT_ENABLED, (boolean) newValue);
} else if (PREF_NETWORK_PREDICTIONS.equals(key)) {
@@ -207,6 +215,11 @@ public class PrivacySettings
getPreferenceScreen().removePreference(usageStatsPref);
}
}
+
+ ChromeSwitchPreference closeTabsOnExitPref =
+ (ChromeSwitchPreference) findPreference(PREF_CLOSE_TABS_ON_EXIT);
+ closeTabsOnExitPref.setOnPreferenceChangeListener(this);
+ closeTabsOnExitPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
}
private ChromeManagedPreferenceDelegate createManagedPreferenceDelegate() {
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -3630,6 +3630,12 @@ Data from your Incognito session will on
@@ -3735,6 +3735,12 @@ Data from your Incognito session will on
<message name="IDS_CONTEXTMENU_IMAGE_TITLE" desc="The title of a context menu tab when the item pressed contains more than one type. This indicates that all the actions are related to the image.">
IMAGE
</message>


+ 2
- 16
patches/Bromite/Change-default-webRTC-policy-to-not-use-any-address.patch View File

@ -6,26 +6,12 @@ This prevents leakage of the local IP address.
See also: https://github.com/bromite/bromite/issues/553
---
chrome/browser/ui/browser_ui_prefs.cc | 4 ++--
third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc | 7 ++++---
2 files changed, 6 insertions(+), 5 deletions(-)
1 file changed, 4 insertions(+), 3 deletions(-)
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -87,8 +87,8 @@ void RegisterBrowserUserPrefs(user_prefs
false);
#endif
// TODO(guoweis): Remove next 2 options at M50.
- registry->RegisterBooleanPref(prefs::kWebRTCMultipleRoutesEnabled, true);
- registry->RegisterBooleanPref(prefs::kWebRTCNonProxiedUdpEnabled, true);
+ registry->RegisterBooleanPref(prefs::kWebRTCMultipleRoutesEnabled, false);
+ registry->RegisterBooleanPref(prefs::kWebRTCNonProxiedUdpEnabled, false);
registry->RegisterStringPref(prefs::kWebRTCIPHandlingPolicy,
blink::kWebRTCIPHandlingDefault);
registry->RegisterStringPref(prefs::kWebRTCUDPPortRange, std::string());
--- a/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
+++ b/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
@@ -422,12 +422,13 @@ PeerConnectionDependencyFactory::CreateP
@@ -423,12 +423,13 @@ PeerConnectionDependencyFactory::CreateP
port_config.enable_nonproxied_udp = false;
break;
case DEFAULT:


+ 1
- 1
patches/Bromite/Disable-DRM-media-origin-IDs-preprovisioning.patch View File

@ -8,7 +8,7 @@ Subject: Disable DRM media origin IDs preprovisioning
--- a/media/base/media_switches.cc
+++ b/media/base/media_switches.cc
@@ -561,7 +561,7 @@ const base::Feature kMediaDrmPersistentL
@@ -566,7 +566,7 @@ const base::Feature kMediaDrmPersistentL
// MediaDrmBridge. If disabled, MediaDrmBridge will get unprovisioned origin IDs
// which will trigger provisioning process after MediaDrmBridge is created.
const base::Feature kMediaDrmPreprovisioning{"MediaDrmPreprovisioning",


+ 10
- 9
patches/Bromite/Remove-account-permissions-from-manifest.patch View File

@ -9,7 +9,7 @@ Subject: Remove all sync and account permissions/features from manifest
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -48,23 +48,17 @@ by a child template that "extends" this
@@ -48,24 +48,18 @@ by a child template that "extends" this
{% if target_sdk_version|int > 27 or target_sdk_version == "Q" %}
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
{% endif %}
@ -18,6 +18,7 @@ Subject: Remove all sync and account permissions/features from manifest
- <uses-permission android:name="android.permission.MANAGE_ACCOUNTS"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.NFC"/>
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
- <uses-permission android:name="android.permission.READ_SYNC_SETTINGS"/>
- <uses-permission android:name="android.permission.READ_SYNC_STATS"/>
@ -33,7 +34,7 @@ Subject: Remove all sync and account permissions/features from manifest
{% set enable_vr = enable_vr|default(0) %}
{% if enable_vr == "true" %}
<!-- Indicates use of Android's VR-mode, available only on Android N+. -->
@@ -100,8 +94,6 @@ by a child template that "extends" this
@@ -102,8 +96,6 @@ by a child template that "extends" this
<uses-permission android:name="com.android.browser.permission.WRITE_HISTORY_BOOKMARKS"/>
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
@ -42,7 +43,7 @@ Subject: Remove all sync and account permissions/features from manifest
{% block extra_uses_permissions %}
{% endblock %}
@@ -880,16 +872,6 @@ by a child template that "extends" this
@@ -884,16 +876,6 @@ by a child template that "extends" this
android:resource="@xml/file_paths" />
</provider>
@ -61,12 +62,12 @@ Subject: Remove all sync and account permissions/features from manifest
android:exported="true">
--- a/chrome/android/java/src/org/chromium/chrome/browser/sync/AndroidSyncSettings.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/AndroidSyncSettings.java
@@ -294,7 +294,7 @@ public class AndroidSyncSettings {
mIsSyncable = false;
mChromeSyncEnabled = false;
}
- mMasterSyncEnabled = mSyncContentResolverDelegate.getMasterSyncAutomatically();
+ mMasterSyncEnabled = false;
@@ -284,7 +284,7 @@ public class AndroidSyncSettings {
mIsSyncable = false;
mChromeSyncEnabled = false;
}
- mMasterSyncEnabled = mSyncContentResolverDelegate.getMasterSyncAutomatically();
+ mMasterSyncEnabled = false;
if (mAccount != null && ProfileSyncService.get() != null
&& ChromeFeatureList.isEnabled(

+ 4
- 4
patches/Bromite/Revert-flags-remove-disable-pull-to-refresh-effect.patch View File

@ -12,7 +12,7 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -3052,6 +3052,10 @@ const FeatureEntry kFeatureEntries[] = {
@@ -3035,6 +3035,10 @@ const FeatureEntry kFeatureEntries[] = {
SINGLE_VALUE_TYPE(switches::kHostedAppQuitNotification)},
#endif // OS_MAC
#if defined(OS_ANDROID)
@ -25,7 +25,7 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
flag_descriptions::kTranslateForceTriggerOnEnglishDescription, kOsAndroid,
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -906,6 +906,11 @@
@@ -945,6 +945,11 @@
"expiry_milestone": -1
},
{
@ -39,7 +39,7 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
"expiry_milestone": 83
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -3077,6 +3077,10 @@ const char kQueryTilesInstantFetchName[]
@@ -3025,6 +3025,10 @@ const char kQueryTilesInstantFetchName[]
const char kQueryTilesInstantFetchDescription[] =
"Immediately schedule background task to fetch query tiles";
@ -52,7 +52,7 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
"Determines what pages the Reader Mode infobar is shown on.";
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -1771,6 +1771,9 @@ extern const char kQueryTilesLocalOrderi
@@ -1757,6 +1757,9 @@ extern const char kQueryTilesLocalOrderi
extern const char kQueryTilesInstantFetchName[];
extern const char kQueryTilesInstantFetchDescription[];


+ 17
- 17
patches/Other/debug-fix.patch View File

@ -20,9 +20,9 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
--- a/components/signin/internal/identity_manager/primary_account_manager.cc
+++ b/components/signin/internal/identity_manager/primary_account_manager.cc
@@ -138,18 +138,6 @@ void PrimaryAccountManager::SetAuthentic
@@ -134,18 +134,6 @@ void PrimaryAccountManager::SetAuthentic
DCHECK(!account_info.account_id.empty());
DCHECK(!IsAuthenticated());
DCHECK(!HasPrimaryAccount(signin::ConsentLevel::kSync));
-#if DCHECK_IS_ON()
- {
@ -50,16 +50,16 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
defines = []
configs = []
@@ -1725,7 +1725,7 @@ config("no_rtti") {
@@ -1737,7 +1737,7 @@ config("no_rtti") {
# (de)allocate memory on a different heap, which would spell trouble if pointers
# to heap-allocated memory are passed over shared library boundaries.
config("export_dynamic") {
- if (is_desktop_linux || export_libcxxabi_from_executables) {
+ if (is_desktop_linux || export_libcxxabi_from_executables || is_android) {
- if (is_linux || export_libcxxabi_from_executables) {
+ if (is_linux || export_libcxxabi_from_executables || is_android) {
ldflags = [ "-rdynamic" ]
}
}
@@ -1941,8 +1941,6 @@ if (is_win) {
@@ -1962,8 +1962,6 @@ if (is_win) {
# Put data and code in their own sections, so that unused symbols
# can be removed at link time with --gc-sections.
@ -68,7 +68,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
]
common_optimize_on_ldflags += [
@@ -1950,7 +1948,6 @@ if (is_win) {
@@ -1971,7 +1969,6 @@ if (is_win) {
# See http://lwn.net/Articles/192624/ .
# -O2 enables string tail merge optimization in gold and lld.
"-Wl,-O2",
@ -76,7 +76,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
]
}
}
@@ -2331,7 +2328,7 @@ config("symbols") {
@@ -2354,7 +2351,7 @@ config("symbols") {
# sections (llvm.org/PR34820).
cflags += [ "-ggnu-pubnames" ]
}
@ -107,8 +107,8 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
return std::make_unique<ProfileOAuth2TokenService>(
--- a/components/omnibox/browser/autocomplete_match.cc
+++ b/components/omnibox/browser/autocomplete_match.cc
@@ -1268,16 +1268,6 @@ bool AutocompleteMatch::IsEmptyAutocompl
return inline_autocompletion.empty() && prefix_autocompletion.empty();
@@ -1323,16 +1323,6 @@ bool AutocompleteMatch::IsEmptyAutocompl
split_autocompletion.Empty();
}
-#if DCHECK_IS_ON()
@ -126,7 +126,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
const base::string16& text,
--- a/components/omnibox/browser/autocomplete_result.cc
+++ b/components/omnibox/browser/autocomplete_result.cc
@@ -704,13 +704,6 @@ void AutocompleteResult::CopyFrom(const
@@ -715,13 +715,6 @@ void AutocompleteResult::CopyFrom(const
matches_ = other.matches_;
}
@ -154,7 +154,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
for (ShortcutMap::const_iterator it(
--- a/components/omnibox/browser/autocomplete_controller.cc
+++ b/components/omnibox/browser/autocomplete_controller.cc
@@ -716,9 +716,6 @@ void AutocompleteController::UpdateResul
@@ -727,9 +727,6 @@ void AutocompleteController::UpdateResul
// Need to validate before invoking CopyOldMatches as the old matches are not
// valid against the current input.
@ -178,10 +178,10 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
bool InputEventStreamValidator::ValidateImpl(
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -919,7 +919,6 @@ void NetworkContext::QueueReport(const s
const GURL& url,
const base::Optional<std::string>& user_agent,
base::Value body) {
@@ -940,7 +940,6 @@ void NetworkContext::QueueReport(
const net::NetworkIsolationKey& network_isolation_key,
const base::Optional<std::string>& user_agent,
base::Value body) {
- NOTREACHED();
}
@ -199,7 +199,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
--- a/base/logging.cc
+++ b/base/logging.cc
@@ -872,7 +872,7 @@ LogMessage::~LogMessage() {
@@ -879,7 +879,7 @@ LogMessage::~LogMessage() {
#if defined(OFFICIAL_BUILD) && defined(NDEBUG)
IMMEDIATE_CRASH();
#else


+ 20
- 3
patches/Other/generate_gradle.patch View File

@ -1,12 +1,12 @@
From: Wengling Chen <[email protected]>
Date: Thu, 09 Jan 2020 23:27:56 -0500
Subject: Use system ninja
Subject: Use system ninja and python
---
src/build/android/gradle/generate_gradle.py | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
src/build/android/list_java_targets.py | 4 ++--
2 files changed, 3 insertion(+), 3 deletion(-)
diff --git a/src/build/android/gradle/generate_gradle.py b/src/build/android/gradle/generate_gradle.py
--- a/src/build/android/gradle/generate_gradle.py
+++ b/src/build/android/gradle/generate_gradle.py
@@ -120,7 +120,7 @@
@ -18,3 +18,20 @@ diff --git a/src/build/android/gradle/generate_gradle.py b/src/build/android/gra
cmd.extend(args)
logging.info('Running: %r', cmd)
subprocess.check_call(cmd)
--- a/src/build/android/list_java_targets.py
+++ b/src/build/android/list_java_targets.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env vpython3
+#!/usr/bin/env python3
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -55,7 +55,7 @@
def _run_ninja(output_dir, args):
cmd = [
- 'autoninja',
+ 'ninja',
'-C',
output_dir,
]

+ 6
- 6
patches/Unobtainium/kill-Auth.patch View File

@ -9,7 +9,7 @@ Subject: kill Auth
--- a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninHelper.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninHelper.java
@@ -10,10 +10,6 @@
@@ -10,10 +10,6 @@ import android.content.Context;
import androidx.annotation.VisibleForTesting;
@ -20,7 +20,7 @@ Subject: kill Auth
import org.chromium.base.ApplicationState;
import org.chromium.base.ApplicationStatus;
import org.chromium.base.ContextUtils;
@@ -64,23 +60,7 @@
@@ -64,23 +60,7 @@ public class SigninHelper implements App
@Override
public List<String> getAccountChangeEvents(
Context context, int index, String accountName) {
@ -47,7 +47,7 @@ Subject: kill Auth
}
--- a/components/signin/core/browser/android/java/src/org/chromium/components/signin/SystemAccountManagerDelegate.java
+++ b/components/signin/core/browser/android/java/src/org/chromium/components/signin/SystemAccountManagerDelegate.java
@@ -26,11 +26,6 @@
@@ -26,11 +26,6 @@ import android.os.SystemClock;
import androidx.annotation.Nullable;
@ -59,7 +59,7 @@ Subject: kill Auth
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.Callback;
@@ -119,18 +114,7 @@
@@ -120,18 +115,7 @@ public class SystemAccountManagerDelegat
// so don't report any accounts if Google Play Services are out of date.
checkCanUseGooglePlayServices();
@ -79,7 +79,7 @@ Subject: kill Auth
}
@Override
@@ -138,17 +122,8 @@
@@ -139,17 +123,8 @@ public class SystemAccountManagerDelegat
throws AuthException {
assert !ThreadUtils.runningOnUiThread();
assert AccountUtils.GOOGLE_ACCOUNT_TYPE.equals(account.type);
@ -99,7 +99,7 @@ Subject: kill Auth
}
@Override
@@ -201,17 +176,6 @@
@@ -202,17 +177,6 @@ public class SystemAccountManagerDelegat
@SuppressLint("MissingPermission")
@Override
public void createAddAccountIntent(Callback<Intent> callback) {


+ 19
- 22
patches/Unobtainium/kill-GCM.patch View File

@ -4,21 +4,21 @@ Subject: kill GCM
---
chrome/android/BUILD.gn | 1
chrome/android/chrome_java_sources.gni | 6
chrome/android/chrome_java_sources.gni | 5
chrome/android/java/AndroidManifest.xml | 53 --
chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java | 3
chrome/android/java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundTask.java | 1
components/background_task_scheduler/internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BackgroundTaskGcmTaskService.java | 65 ---
components/background_task_scheduler/internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BackgroundTaskSchedulerGcmNetworkManager.java | 183 ----------
components/background_task_scheduler/internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BackgroundTaskSchedulerGcmNetworkManager.java | 180 ----------
components/gcm_driver/android/BUILD.gn | 1
components/gcm_driver/instance_id/android/BUILD.gn | 1
components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java | 52 --
components/sync/android/BUILD.gn | 1
11 files changed, 11 insertions(+), 356 deletions(-)
11 files changed, 11 insertions(+), 352 deletions(-)
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -508,7 +508,6 @@ android_library("chrome_java") {
@@ -512,7 +512,6 @@ android_library("chrome_java") {
"//third_party/android_deps:material_design_java",
"//third_party/android_deps:protobuf_lite_runtime_java",
"//third_party/android_media:android_media_java",
@ -28,29 +28,28 @@ Subject: kill GCM
"//third_party/blink/public:blink_headers_java",
--- a/chrome/android/chrome_java_sources.gni
+++ b/chrome/android/chrome_java_sources.gni
@@ -16,7 +16,6 @@ chrome_java_sources = [
@@ -15,7 +15,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/ChromeActionModeHandler.java",
"java/src/org/chromium/chrome/browser/ChromeActivitySessionTracker.java",
"java/src/org/chromium/chrome/browser/ChromeApplication.java",
- "java/src/org/chromium/chrome/browser/ChromeBackgroundService.java",
"java/src/org/chromium/chrome/browser/ChromeBackupAgent.java",
- "java/src/org/chromium/chrome/browser/ChromeBackgroundServiceImpl.java",
"java/src/org/chromium/chrome/browser/ChromeBackupAgentImpl.java",
"java/src/org/chromium/chrome/browser/ChromeBackupWatcher.java",
"java/src/org/chromium/chrome/browser/ChromeBaseAppCompatActivity.java",
@@ -1351,11 +1350,6 @@ chrome_java_sources = [
@@ -1343,10 +1342,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/send_tab_to_self/SendTabToSelfShareActivity.java",
"java/src/org/chromium/chrome/browser/services/AccountsChangedReceiver.java",
"java/src/org/chromium/chrome/browser/services/AndroidChildAccountHelper.java",
- "java/src/org/chromium/chrome/browser/services/gcm/ChromeGcmListenerService.java",
- "java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundService.java",
- "java/src/org/chromium/chrome/browser/services/gcm/ChromeGcmListenerServiceImpl.java",
- "java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundServiceImpl.java",
- "java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundTask.java",
- "java/src/org/chromium/chrome/browser/services/gcm/GcmUma.java",
- "java/src/org/chromium/chrome/browser/services/gcm/InvalidationGcmUpstreamSender.java",
"java/src/org/chromium/chrome/browser/settings/MainSettings.java",
"java/src/org/chromium/chrome/browser/settings/SettingsActivity.java",
"java/src/org/chromium/chrome/browser/settings/SettingsLauncherImpl.java",
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -87,22 +87,17 @@ by a child template that "extends" this
@@ -88,23 +88,18 @@ by a child template that "extends" this
<permission android:name="{{ manifest_package }}.permission.CHILD_SERVICE" android:protectionLevel="signature" />
<permission android:name="{{ manifest_package }}.permission.READ_WRITE_BOOKMARK_FOLDERS" android:protectionLevel="signatureOrSystem" />
<permission android:name="{{ manifest_package }}.TOS_ACKED" android:protectionLevel="signatureOrSystem" />
@ -59,8 +58,9 @@ Subject: kill GCM
- android:protectionLevel="signature" />
<permission android:name="{{ manifest_package }}.permission.DEBUG"
android:label="Debug web pages"
android:permissionGroup="android.permission-group.DEVELOPMENT_TOOLS"
android:protectionLevel="signature" />
<permission android:name="{{ manifest_package }}.permission.TRANSLATE"
android:protectionLevel="signature" />
- <uses-permission android:name="{{ manifest_package }}.permission.C2D_MESSAGE" />
<uses-permission android:name="{{ manifest_package }}.permission.READ_WRITE_BOOKMARK_FOLDERS" />
@ -73,7 +73,7 @@ Subject: kill GCM
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
<uses-permission android:name="com.google.android.apps.now.CURRENT_ACCOUNT_ACCESS" />
@@ -991,36 +986,6 @@ by a child template that "extends" this
@@ -989,36 +984,6 @@ by a child template that "extends" this
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|mcc|mnc|screenLayout|smallestScreenSize"
android:hardwareAccelerated="false" />
@ -164,7 +164,7 @@ Subject: kill GCM
return false;
}
- ChromeGcmListenerService.dispatchMessageToDriver(message);
- ChromeGcmListenerServiceImpl.dispatchMessageToDriver(message);
return false;
}
@ -391,12 +391,10 @@ Subject: kill GCM
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) return;
--- a/components/background_task_scheduler/internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BackgroundTaskSchedulerGcmNetworkManager.java
+++ b/components/background_task_scheduler/internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BackgroundTaskSchedulerGcmNetworkManager.java
@@ -10,14 +10,6 @@ import android.os.Bundle;
@@ -10,12 +10,6 @@ import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
-import com.google.android.gms.common.ConnectionResult;
-import com.google.android.gms.common.GoogleApiAvailability;
-import com.google.android.gms.gcm.GcmNetworkManager;
-import com.google.android.gms.gcm.OneoffTask;
-import com.google.android.gms.gcm.PeriodicTask;
@ -406,7 +404,7 @@ Subject: kill GCM
import org.chromium.base.Log;
import org.chromium.base.ThreadUtils;
import org.chromium.components.background_task_scheduler.TaskInfo;
@@ -45,140 +37,19 @@ class BackgroundTaskSchedulerGcmNetworkM
@@ -44,140 +38,19 @@ class BackgroundTaskSchedulerGcmNetworkM
sClock = clock;
}
@ -547,7 +545,7 @@ Subject: kill GCM
}
@Override
@@ -190,67 +61,23 @@ class BackgroundTaskSchedulerGcmNetworkM
@@ -189,66 +62,23 @@ class BackgroundTaskSchedulerGcmNetworkM
private static int getGcmNetworkManagerNetworkTypeFromTypeFromTaskNetworkType(
@TaskInfo.NetworkType int networkType) {
@ -610,8 +608,7 @@ Subject: kill GCM
- }
-
- private GcmNetworkManager getGcmNetworkManager(Context context) {
- if (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context)
- == ConnectionResult.SUCCESS) {
- if (ChromiumPlayServicesAvailability.isGooglePlayServicesAvailable(context)) {
- return GcmNetworkManager.getInstance(context);
- }
- return null;


+ 1
- 1
patches/Unobtainium/kill-Location-fall-back-to-system.patch View File

@ -9,7 +9,7 @@ Subject: kill Location, fall back to system
--- a/services/device/geolocation/BUILD.gn
+++ b/services/device/geolocation/BUILD.gn
@@ -160,7 +160,6 @@ if (is_android) {
@@ -151,7 +151,6 @@ if (is_android) {
"android/java/src/org/chromium/device/geolocation/LocationProviderAdapter.java",
"android/java/src/org/chromium/device/geolocation/LocationProviderAndroid.java",
"android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java",


+ 1
- 1
patches/Unobtainium/kill-Translate.patch View File

@ -29,7 +29,7 @@ Subject: kill Translate
boolean notifyAdapter = false;
// An optional Data Saver page.
if (mFreProperties.getBoolean(SHOW_DATA_REDUCTION_PAGE)) {
@@ -600,4 +606,9 @@ public class FirstRunActivity extends Fi
@@ -622,4 +628,9 @@ public class FirstRunActivity extends Fi
assert sObserver == null;
sObserver = observer;
}


+ 9
- 14
patches/Unobtainium/kill-Vision.patch View File

@ -6,13 +6,13 @@ Barcode, face and text detection APIs
---
services/shape_detection/BUILD.gn | 6 --
services/shape_detection/android/java/src/org/chromium/shape_detection/BitmapUtils.java | 12 ----
services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionProviderImpl.java | 15 ------
services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionProviderImpl.java | 10 ----
services/shape_detection/android/java/src/org/chromium/shape_detection/InterfaceRegistrar.java | 25 ----------
4 files changed, 2 insertions(+), 56 deletions(-)
4 files changed, 53 deletions(-)
--- a/services/shape_detection/BUILD.gn
+++ b/services/shape_detection/BUILD.gn
@@ -92,14 +92,8 @@ if (is_android) {
@@ -102,14 +102,8 @@ if (is_android) {
android_library("shape_detection_java") {
sources = [
@ -55,32 +55,27 @@ Barcode, face and text detection APIs
}
--- a/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionProviderImpl.java
+++ b/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionProviderImpl.java
@@ -4,9 +4,6 @@
@@ -5,7 +5,6 @@
package org.chromium.shape_detection;
-import com.google.android.gms.common.ConnectionResult;
-import com.google.android.gms.common.GoogleApiAvailability;
-
import org.chromium.base.ContextUtils;
-import org.chromium.gms.ChromiumPlayServicesAvailability;
import org.chromium.mojo.bindings.InterfaceRequest;
import org.chromium.mojo.system.MojoException;
@@ -23,16 +20,8 @@ public class FaceDetectionProviderImpl i
import org.chromium.shape_detection.mojom.FaceDetection;
@@ -21,15 +20,6 @@ public class FaceDetectionProviderImpl i
@Override
public void createFaceDetection(
InterfaceRequest<FaceDetection> request, FaceDetectorOptions options) {
- final boolean isGmsCoreSupported =
- GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(
- ContextUtils.getApplicationContext())
- == ConnectionResult.SUCCESS;
- ChromiumPlayServicesAvailability.isGooglePlayServicesAvailable(
- ContextUtils.getApplicationContext());
-
- if (isGmsCoreSupported) {
- FaceDetection.MANAGER.bind(new FaceDetectionImplGmsCore(options), request);
- } else {
- FaceDetection.MANAGER.bind(new FaceDetectionImpl(options), request);
- }
+
+ FaceDetection.MANAGER.bind(new FaceDetectionImpl(options), request);
}
@Override


+ 1
- 1
patches/Vanadium/0020-disable-media-router-media-remoting-by-default.patch View File

@ -9,7 +9,7 @@ Subject: [PATCH 20/30] disable media router media remoting by default
--- a/chrome/browser/profiles/profile.cc
+++ b/chrome/browser/profiles/profile.cc
@@ -344,7 +344,7 @@ void Profile::RegisterProfilePrefs(user_
@@ -355,7 +355,7 @@ void Profile::RegisterProfilePrefs(user_
media_router::prefs::kMediaRouterEnableCloudServices, false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterBooleanPref(


+ 1
- 1
patches/Vanadium/0021-disable-media-router-by-default.patch View File

@ -10,7 +10,7 @@ Subject: [PATCH 21/30] disable media router by default
--- a/chrome/browser/media/router/media_router_feature.cc
+++ b/chrome/browser/media/router/media_router_feature.cc
@@ -67,17 +67,16 @@ bool MediaRouterEnabled(content::Browser
@@ -66,17 +66,16 @@ bool MediaRouterEnabled(content::Browser
#endif // !defined(OFFICIAL_BUILD) && !defined(OS_ANDROID)
#if defined(OS_ANDROID) || BUILDFLAG(ENABLE_EXTENSIONS)