Browse Source

Update to 89.0.4389.72-1

master
wchen342 2 years ago
parent
commit
d701fe676f
Signed by: wchen342 GPG Key ID: 9C19365D69B04CEC
  1. 4
      CHANGELOG.md
  2. 9
      build.sh
  3. 609
      domain_sub_2.list
  4. 22
      patches/Bromite/AImageReader-CFI-crash-mitigations.patch
  5. 1366
      patches/Bromite/Add-a-proxy-configuration-page.patch
  6. 81
      patches/Bromite/Add-bookmark-import-export-actions.patch
  7. 39
      patches/Bromite/Add-exit-menu-item.patch
  8. 33
      patches/Bromite/Add-flag-to-disable-WebGL.patch
  9. 18
      patches/Bromite/Add-flags-to-disable-device-motion-orientation-APIs.patch
  10. 85
      patches/Bromite/Add-option-to-not-persist-tabs-across-sessions.patch
  11. 8
      patches/Bromite/Change-default-webRTC-policy-to-not-use-any-address.patch
  12. 2
      patches/Bromite/Disable-DRM-media-origin-IDs-preprovisioning.patch
  13. 4
      patches/Bromite/DoH-secure-mode-by-default.patch
  14. 177
      patches/Bromite/Inject-scripts-for-AMP-tracking-ads-and-video.patch
  15. 35
      patches/Bromite/Remove-account-permissions-from-manifest.patch
  16. 16
      patches/Bromite/Revert-flags-remove-disable-pull-to-refresh-effect.patch
  17. 14
      patches/Bromite/updater-disable-updater-pings.patch
  18. 28
      patches/Other/debug-fix.patch
  19. 37
      patches/Unobtainium/kill-Auth.patch
  20. 32
      patches/Unobtainium/kill-GCM.patch
  21. 2
      patches/Unobtainium/kill-Location-fall-back-to-system.patch
  22. 18
      patches/Unobtainium/kill-TOS-and-metrics-opt-out.patch
  23. 12
      patches/Unobtainium/kill-Translate.patch
  24. 15
      patches/Unobtainium/kill-Vision.patch
  25. 29
      patches/Vanadium/0003-switch-to-fstack-protector-strong.patch
  26. 20
      patches/Vanadium/0016-disable-seed-based-field-trials.patch
  27. 20
      patches/Vanadium/0017-disable-fetching-variations.patch
  28. 20
      patches/Vanadium/0021-disable-metrics-by-default.patch
  29. 27
      patches/Vanadium/0023-disable-showing-popular-sites-by-default.patch
  30. 6
      patches/Vanadium/0031-disable-media-router-media-remoting-by-default.patch
  31. 36
      patches/Vanadium/0032-disable-media-router-by-default.patch
  32. 23
      patches/series
  33. 11
      patches/src-fix/fix-null-mInstanceID.patch
  34. 4
      patches/src-fix/fix-prefs.patch
  35. 95
      patches/src-fix/fix-safe-browsing-prefs.patch
  36. 2
      patches/src-fix/fix-unkown-warning-clang.patch
  37. 8
      patches/ungoogled-chromium-android/Add-always-desktop-option.patch
  38. 6
      patches/ungoogled-chromium-android/Add-folder-button-bookmark.patch
  39. 20
      patches/ungoogled-chromium-android/Add-force-tablet-ui-option.patch
  40. 317
      patches/ungoogled-chromium-android/Add-more-search-engines.patch
  41. 33
      patches/ungoogled-chromium-android/Add-save-data-flag.patch
  42. 2
      patches/ungoogled-chromium-android/Disable-contextual-search.patch
  43. 2
      patches/ungoogled-chromium-android/Disable-homepage-by-default.patch
  44. 2
      patches/ungoogled-chromium-android/Enable-ProactivelySwapBrowsingInstance.patch
  45. 12
      patches/ungoogled-chromium-android/Enable-update-notification.patch
  46. 22
      patches/ungoogled-chromium-android/Mark-http-as-dangerous-mixed-content-warning.patch
  47. 74
      patches/ungoogled-chromium-android/Remove-UI-elements.patch
  48. 63
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.auth.patch
  49. 53
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.cast.patch
  50. 235
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.common-auth-signin-dynamic-com.google.android.gms.tasks.patch
  51. 77
      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
  52. 2
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.flags-com.google.android.gms.location.places-com.google.android.gms.stats.patch
  53. 26
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.gcm.patch
  54. 56
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.vision-com.google.android.gms.clearcut-com.google.android.gms.phenotype.patch
  55. 29
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.core.splitcompat-com.google.android.play.core.splitinstall.patch
  56. 26
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.patch

4
CHANGELOG.md

@ -1,3 +1,7 @@
# 89.0.4389.72-1
* Include several enhancements from Vanadium
* Add proxy settings, disable AMP on sites
# 88.0.4324.182-2
* Add fix for DoH
* Change description for WebGL flag

9
build.sh

@ -160,6 +160,15 @@ function prepare_repos {
git reset --hard FETCH_HEAD
popd
libdav1d_commit=$(grep 'dav1d\.git' src/DEPS | cut -d\' -f8)
mkdir src/third_party/dav1d/libdav1d
pushd src/third_party/dav1d/libdav1d
git init
git remote add origin https://chromium.googlesource.com/external/github.com/videolan/dav1d.git
git fetch --depth 1 --no-tags origin "${libdav1d_commit}" || return $?
git reset --hard FETCH_HEAD
popd
# update node
mkdir -p src/third_party/node/linux/node-linux-x64/bin
ln -s /usr/bin/node src/third_party/node/linux/node-linux-x64/bin/

609
domain_sub_2.list

File diff suppressed because it is too large

22
patches/Bromite/AImageReader-CFI-crash-mitigations.patch

@ -80,15 +80,15 @@ See discussions at:
AndroidImageReader();
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -1712,7 +1712,7 @@
@@ -1724,7 +1724,7 @@
{
"name": "enable-image-reader",
"owners": [ "vikassoni", "khushalsagar" ],
"name": "enable-heavy-ad-intervention",
"owners": [ "johnidel", "jkarlin" ],
- "expiry_milestone": 90
+ "expiry_milestone": -1
},
{
"name": "enable-immersive-fullscreen-toolbar",
"name": "enable-heuristic-stylus-palm-rejection",
--- a/gpu/config/gpu_driver_bug_list.json
+++ b/gpu/config/gpu_driver_bug_list.json
@@ -3255,6 +3255,22 @@
@ -127,7 +127,7 @@ See discussions at:
+
// Used to limit GL version to 2.0 for skia raster on Android.
const base::Feature kUseGles2ForOopR{"UseGles2ForOopR",
base::FEATURE_ENABLED_BY_DEFAULT};
base::FEATURE_DISABLED_BY_DEFAULT};
@@ -55,7 +60,11 @@ const base::FeatureParam<std::string> kA
// Use AImageReader for MediaCodec and MediaPlyer on android.
@ -163,7 +163,7 @@ See discussions at:
if (!gpu_preferences.enable_android_surface_control)
return kGpuFeatureStatusDisabled;
@@ -327,6 +330,11 @@ void AdjustGpuFeatureStatusToWorkarounds
@@ -316,6 +319,11 @@ void AdjustGpuFeatureStatusToWorkarounds
gpu_feature_info->status_values[GPU_FEATURE_TYPE_ACCELERATED_WEBGL2] =
kGpuFeatureStatusBlocklisted;
}
@ -182,12 +182,12 @@ See discussions at:
disable_2d_canvas_auto_flush
disable_accelerated_av1_decode
+disable_aimagereader
disable_accelerated_av1_decode_d3d11
disable_accelerated_vp8_decode
disable_accelerated_vp8_encode
disable_accelerated_vp9_decode
--- a/gpu/ipc/service/gpu_init.cc
+++ b/gpu/ipc/service/gpu_init.cc
@@ -464,6 +464,11 @@ bool GpuInit::InitializeAndStartSandbox(
@@ -477,6 +477,11 @@ bool GpuInit::InitializeAndStartSandbox(
}
}
@ -209,7 +209,7 @@ See discussions at:
#include "base/android/scoped_hardware_buffer_fence_sync.h"
#include "base/bind.h"
#include "base/feature_list.h"
@@ -47,7 +48,15 @@ std::unique_ptr<ui::ScopedMakeCurrent> M
@@ -48,7 +49,15 @@ std::unique_ptr<ui::ScopedMakeCurrent> M
}
TextureOwner::Mode GetTextureOwnerMode() {
@ -228,7 +228,7 @@ See discussions at:
}
--- a/media/base/media_switches.cc
+++ b/media/base/media_switches.cc
@@ -575,6 +575,10 @@ const base::Feature kMediaDrmPreprovisio
@@ -608,6 +608,10 @@ const base::Feature kMediaDrmPreprovisio
const base::Feature kMediaDrmPreprovisioningAtStartup{
"MediaDrmPreprovisioningAtStartup", base::FEATURE_ENABLED_BY_DEFAULT};
@ -241,7 +241,7 @@ See discussions at:
const base::Feature kDisableSurfaceLayerForVideo{
--- a/media/base/media_switches.h
+++ b/media/base/media_switches.h
@@ -194,6 +194,7 @@ MEDIA_EXPORT extern const base::Feature
@@ -206,6 +206,7 @@ MEDIA_EXPORT extern const base::Feature
MEDIA_EXPORT extern const base::Feature kMediaDrmPersistentLicense;
MEDIA_EXPORT extern const base::Feature kMediaDrmPreprovisioning;
MEDIA_EXPORT extern const base::Feature kMediaDrmPreprovisioningAtStartup;

1366
patches/Bromite/Add-a-proxy-configuration-page.patch

File diff suppressed because it is too large

81
patches/Bromite/Add-bookmark-import-export-actions.patch

@ -17,7 +17,7 @@ Completely remove contacts picker permission from the file dialog
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/android/bookmarks/bookmark_bridge.h | 24
chrome/browser/importer/profile_writer.cc | 12
chrome/browser/importer/profile_writer.h | 6
chrome/browser/ui/android/strings/android_chrome_strings.grd | 6
@ -29,11 +29,11 @@ Completely remove contacts picker permission from the file dialog
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(-)
23 files changed, 505 insertions(+), 14 deletions(-)
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -38,7 +38,6 @@ by a child template that "extends" this
@@ -39,7 +39,6 @@ by a child template that "extends" this
{% endif %}
<uses-permission-sdk-23 android:name="android.permission.BLUETOOTH"/>
<uses-permission-sdk-23 android:name="android.permission.BLUETOOTH_ADMIN"/>
@ -182,9 +182,9 @@ Completely remove contacts picker permission from the file dialog
import android.text.TextUtils;
import android.util.Pair;
@@ -26,6 +32,11 @@ import org.chromium.components.url_forma
import org.chromium.components.url_formatter.UrlFormatter;
@@ -27,6 +33,11 @@ import org.chromium.components.url_forma
import org.chromium.content_public.browser.WebContents;
import org.chromium.url.GURL;
+import org.chromium.chrome.browser.document.ChromeLauncherActivity;
+import org.chromium.chrome.browser.IntentHandler;
@ -194,7 +194,7 @@ Completely remove contacts picker permission from the file dialog
import java.util.ArrayList;
import java.util.List;
@@ -586,6 +597,38 @@ public class BookmarkBridge {
@@ -587,6 +598,38 @@ public class BookmarkBridge {
}
/**
@ -233,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.
@@ -1007,6 +1050,24 @@ public class BookmarkBridge {
@@ -1017,6 +1060,24 @@ public class BookmarkBridge {
depthList.add(depth);
}
@ -258,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++) {
@@ -1074,6 +1135,8 @@ public class BookmarkBridge {
@@ -1084,6 +1145,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);
@ -288,7 +288,7 @@ Completely remove contacts picker permission from the file dialog
void closeSearchUI();
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManager.java
@@ -32,6 +32,7 @@ import org.chromium.components.browser_u
@@ -33,6 +33,7 @@ import org.chromium.components.browser_u
import org.chromium.components.browser_ui.widget.dragreorder.DragStateDelegate;
import org.chromium.components.browser_ui.widget.selectable_list.SelectableListLayout;
import org.chromium.components.browser_ui.widget.selectable_list.SelectableListToolbar.SearchDelegate;
@ -296,7 +296,7 @@ Completely remove contacts picker permission from the file dialog
import org.chromium.components.browser_ui.widget.selectable_list.SelectionDelegate;
import org.chromium.components.favicon.LargeIconBridge;
import org.chromium.url.GURL;
@@ -54,6 +55,7 @@ public class BookmarkManager
@@ -55,6 +56,7 @@ public class BookmarkManager
private ComponentName mOpenBookmarkComponentName;
private ViewGroup mMainView;
private BookmarkModel mBookmarkModel;
@ -304,7 +304,7 @@ Completely remove contacts picker permission from the file dialog
private BookmarkUndoController mUndoController;
private final ObserverList<BookmarkUIObserver> mUIObservers = new ObserverList<>();
private BasicNativePage mNativePage;
@@ -328,6 +330,13 @@ public class BookmarkManager
@@ -329,6 +331,13 @@ public class BookmarkManager
}
/**
@ -318,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)}.
@@ -501,6 +510,16 @@ public class BookmarkManager
@@ -507,6 +516,16 @@ public class BookmarkManager
}
@Override
@ -374,7 +374,7 @@ Completely remove contacts picker permission from the file dialog
protected NativePage buildDownloadsPage(Tab tab) {
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -192,6 +192,8 @@ static_library("browser") {
@@ -203,6 +203,8 @@ static_library("browser") {
"bitmap_fetcher/bitmap_fetcher_service.h",
"bitmap_fetcher/bitmap_fetcher_service_factory.cc",
"bitmap_fetcher/bitmap_fetcher_service_factory.h",
@ -383,8 +383,8 @@ 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",
@@ -1865,6 +1867,8 @@ static_library("browser") {
"web_data_service_factory.h",
@@ -1910,6 +1912,8 @@ static_library("browser") {
"webapps/chrome_webapps_client.h",
"window_placement/window_placement_permission_context.cc",
"window_placement/window_placement_permission_context.h",
+ "importer/profile_writer.cc",
@ -392,7 +392,7 @@ Completely remove contacts picker permission from the file dialog
]
configs += [
@@ -3396,8 +3400,6 @@ static_library("browser") {
@@ -3468,8 +3472,6 @@ static_library("browser") {
"badging/badge_manager_factory.h",
"banners/app_banner_manager_desktop.cc",
"banners/app_banner_manager_desktop.h",
@ -504,7 +504,7 @@ Completely remove contacts picker permission from the file dialog
}
void BookmarkBridge::Destroy(JNIEnv*, const JavaParamRef<jobject>&) {
@@ -541,6 +614,175 @@ jint BookmarkBridge::GetTotalBookmarkCou
@@ -540,6 +613,175 @@ jint BookmarkBridge::GetTotalBookmarkCou
return count;
}
@ -682,16 +682,17 @@ 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
@@ -23,6 +23,8 @@
#include "components/bookmarks/browser/base_bookmark_model_observer.h"
#include "components/bookmarks/common/android/bookmark_id.h"
@@ -25,6 +25,9 @@
#include "components/prefs/pref_change_registrar.h"
#include "url/android/gurl_android.h"
+#include "components/search_engines/template_url.h"
+#include "ui/shell_dialogs/select_file_dialog.h"
+
namespace bookmarks {
class BookmarkModel;
@@ -38,7 +40,8 @@ class Profile;
class ManagedBookmarkService;
@@ -39,7 +42,8 @@ class Profile;
class BookmarkBridge : public bookmarks::BaseBookmarkModelObserver,
public PartnerBookmarksShim::Observer,
public ReadingListManager::Observer,
@ -701,7 +702,7 @@ Completely remove contacts picker permission from the file dialog
public:
BookmarkBridge(JNIEnv* env,
const base::android::JavaRef<jobject>& obj,
@@ -54,6 +57,12 @@ class BookmarkBridge : public bookmarks:
@@ -55,6 +59,12 @@ class BookmarkBridge : public bookmarks:
bool IsDoingExtensiveChanges(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj);
@ -714,7 +715,7 @@ Completely remove contacts picker permission from the file dialog
jboolean IsEditBookmarksEnabled(JNIEnv* env);
void LoadEmptyPartnerBookmarkShimForTesting(
@@ -141,6 +150,13 @@ class BookmarkBridge : public bookmarks:
@@ -142,6 +152,13 @@ class BookmarkBridge : public bookmarks:
jlong id,
jint type);
@ -728,7 +729,7 @@ Completely remove contacts picker permission from the file dialog
void SetBookmarkTitle(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj,
jlong id,
@@ -311,12 +327,14 @@ class BookmarkBridge : public bookmarks:
@@ -315,12 +332,14 @@ class BookmarkBridge : public bookmarks:
void DestroyJavaObject();
Profile* profile_;
@ -743,7 +744,7 @@ 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:
@@ -332,6 +351,9 @@ class BookmarkBridge : public bookmarks:
// Observes the profile destruction and creation.
ScopedObserver<Profile, ProfileObserver> profile_observer_{this};
@ -826,7 +827,7 @@ Completely remove contacts picker permission from the file dialog
</message>
--- a/chrome/common/BUILD.gn
+++ b/chrome/common/BUILD.gn
@@ -401,6 +401,9 @@ static_library("common") {
@@ -403,6 +403,9 @@ static_library("common") {
sources += [
"media/chrome_media_drm_bridge_client.cc",
"media/chrome_media_drm_bridge_client.h",
@ -834,11 +835,11 @@ Completely remove contacts picker permission from the file dialog
+ "importer/imported_bookmark_entry.cc",
+ "importer/imported_bookmark_entry.h",
]
} else {
# Non-Android.
public_deps += [ "//chrome/common/importer" ]
--- a/chrome/utility/BUILD.gn
+++ b/chrome/utility/BUILD.gn
@@ -71,8 +71,6 @@ static_library("utility") {
@@ -73,8 +73,6 @@ static_library("utility") {
if (!is_android) {
sources += [
@ -847,7 +848,7 @@ Completely remove contacts picker permission from the file dialog
"importer/bookmarks_file_importer.cc",
"importer/bookmarks_file_importer.h",
"importer/external_process_importer_bridge.cc",
@@ -187,6 +185,11 @@ static_library("utility") {
@@ -191,6 +189,11 @@ static_library("utility") {
}
}
@ -959,7 +960,7 @@ Completely remove contacts picker permission from the file dialog
// than true bookmarks.
--- a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java
+++ b/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java
@@ -38,6 +38,7 @@ import org.chromium.base.task.AsyncTask;
@@ -35,6 +35,7 @@ import org.chromium.base.task.AsyncTask;
import org.chromium.base.task.PostTask;
import org.chromium.base.task.TaskTraits;
import org.chromium.ui.R;
@ -967,15 +968,15 @@ Completely remove contacts picker permission from the file dialog
import org.chromium.ui.UiUtils;
import java.io.File;
@@ -58,6 +59,7 @@ public class SelectFileDialog implements
@@ -53,6 +54,7 @@ public class SelectFileDialog implements
private static final String TAG = "SelectFileDialog";
private static final String IMAGE_TYPE = "image";
private static final String VIDEO_TYPE = "video";
+ private static final String HTML_TYPE = "text";
+ private static final String HTML_TYPE = "html";
private static final String AUDIO_TYPE = "audio";
private static final String ALL_TYPES = "*/*";
@@ -149,6 +151,11 @@ public class SelectFileDialog implements
@@ -143,6 +145,11 @@ public class SelectFileDialog implements
mFileTypes = fileTypes;
}
@ -987,7 +988,7 @@ Completely remove contacts picker permission from the file dialog
/**
* Creates and starts an intent based on the passed fileTypes and capture value.
* @param fileTypes MIME types requested (i.e. "image/*")
@@ -177,7 +184,7 @@ public class SelectFileDialog implements
@@ -170,7 +177,7 @@ public class SelectFileDialog implements
List<String> missingPermissions = new ArrayList<>();
String storagePermission = Manifest.permission.READ_EXTERNAL_STORAGE;
boolean shouldUsePhotoPicker = shouldUsePhotoPicker();
@ -996,7 +997,7 @@ Completely remove contacts picker permission from the file dialog
if (!window.hasPermission(storagePermission)) missingPermissions.add(storagePermission);
} else {
if (((mSupportsImageCapture && shouldShowImageTypes())
@@ -205,7 +212,7 @@ public class SelectFileDialog implements
@@ -198,7 +205,7 @@ public class SelectFileDialog implements
}
// TODO(finnur): Remove once we figure out the cause of crbug.com/950024.
@ -1005,7 +1006,7 @@ Completely remove contacts picker permission from the file dialog
if (permissions.length != requestPermissions.length) {
throw new RuntimeException(
String.format("Permissions arrays misaligned: %d != %d",
@@ -219,7 +226,7 @@ public class SelectFileDialog implements
@@ -212,7 +219,7 @@ public class SelectFileDialog implements
}
}
@ -1014,7 +1015,7 @@ Completely remove contacts picker permission from the file dialog
onFileNotSelected();
return;
}
@@ -385,6 +392,7 @@ public class SelectFileDialog implements
@@ -358,6 +365,7 @@ public class SelectFileDialog implements
}
if (!mimeTypes.contains(mimeType)) mimeTypes.add(mimeType);
}
@ -1022,7 +1023,7 @@ Completely remove contacts picker permission from the file dialog
return mimeTypes;
}
@@ -686,6 +694,10 @@ public class SelectFileDialog implements
@@ -659,6 +667,10 @@ public class SelectFileDialog implements
return countAcceptTypesFor(superType) == mFileTypes.size();
}
@ -1046,7 +1047,7 @@ Completely remove contacts picker permission from the file dialog
--- a/ui/shell_dialogs/select_file_dialog_android.cc
+++ b/ui/shell_dialogs/select_file_dialog_android.cc
@@ -144,6 +144,12 @@ void SelectFileDialogImpl::SelectFileImp
@@ -140,6 +140,12 @@ void SelectFileDialogImpl::SelectFileImp
owning_window->GetJavaObject());
}

39
patches/Bromite/Add-exit-menu-item.patch

@ -4,25 +4,27 @@ Subject: Add exit menu item
Corrected Exit functionality
---
chrome/android/java/res/menu/main_menu.xml | 4 ++++
chrome/android/java/res/menu/main_menu.xml | 5 +++++
chrome/android/java/res/menu/main_menu_regroup.xml | 3 +++
chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java | 3 +++
chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java | 6 ++++++
chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLifetimeController.java | 6 +++++-
chrome/browser/ui/android/strings/android_chrome_strings.grd | 3 +++
5 files changed, 21 insertions(+), 1 deletion(-)
6 files changed, 25 insertions(+), 1 deletion(-)
--- a/chrome/android/java/res/menu/main_menu.xml
+++ b/chrome/android/java/res/menu/main_menu.xml
@@ -116,6 +116,8 @@
@@ -116,6 +116,9 @@
android:icon="@drawable/vr_headset" />
<item android:id="@+id/managed_by_menu_id"
android:title="@string/managed" />
+ <item android:id="@+id/exit_id"
+ android:title="@string/menu_exit" />
+ android:title="@string/menu_exit"
+ android:icon="@drawable/ic_exit_to_app_white_24dp" />
</group>
<!-- Items shown only in the tab switcher -->
@@ -150,6 +152,8 @@
@@ -142,6 +145,8 @@
<item android:id="@id/preferences_id"
android:title="@string/menu_settings"
android:icon="@drawable/settings_cog" />
@ -39,13 +41,32 @@ Corrected Exit functionality
android:title="@string/managed" />
+ <item android:id="@+id/exit_id"
+ android:title="@string/menu_exit"
+ android:icon="@drawable/ic_exit_to_app_white_24dp"/>
+ android:icon="@drawable/ic_exit_to_app_white_24dp" />
</group>
<!-- Items shown only in the tab switcher -->
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -58,6 +58,7 @@ import org.chromium.chrome.browser.Inten
import org.chromium.chrome.browser.IntentHandler.TabOpenType;
import org.chromium.chrome.browser.accessibility_tab_switcher.OverviewListLayout;
import org.chromium.chrome.browser.app.ChromeActivity;
+import org.chromium.chrome.browser.ApplicationLifetime;
import org.chromium.chrome.browser.app.tabmodel.AsyncTabParamsManagerSingleton;
import org.chromium.chrome.browser.app.tabmodel.ChromeNextTabPolicySupplier;
import org.chromium.chrome.browser.app.tabmodel.TabWindowManagerSingleton;
@@ -1827,6 +1828,8 @@ public class ChromeTabbedActivity extend
} else if (id == R.id.close_tab) {
getCurrentTabModel().closeTab(currentTab, true, false, true);
RecordUserAction.record("MobileTabClosed");
+ } else if (id == R.id.exit_id) {
+ ApplicationLifetime.terminate(false);
} else if (id == R.id.close_all_tabs_menu_id) {
// Close both incognito and normal tabs
getTabModelSelector().closeAllTabs();
--- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
@@ -54,6 +54,7 @@ import org.chromium.base.supplier.Onesho
@@ -56,6 +56,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 +74,7 @@ Corrected Exit functionality
import org.chromium.chrome.browser.ChromeActivitySessionTracker;
import org.chromium.chrome.browser.ChromeApplication;
import org.chromium.chrome.browser.ChromeWindow;
@@ -1984,6 +1985,11 @@ public abstract class ChromeActivity<C e
@@ -2018,6 +2019,11 @@ public abstract class ChromeActivity<C e
RecordUserAction.record("MobileMenuSettings");
}
@ -82,7 +103,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
@@ -2952,6 +2952,9 @@ Data from your Incognito session will on
@@ -2967,6 +2967,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>

33
patches/Bromite/Add-flag-to-disable-WebGL.patch

@ -4,13 +4,13 @@ Subject: Add flag to disable WebGL
---
chrome/browser/about_flags.cc | 3 +++
chrome/browser/flag_descriptions.cc | 3 +++
chrome/browser/flag_descriptions.cc | 4 ++++
chrome/browser/flag_descriptions.h | 3 +++
3 files changed, 9 insertions(+)
3 files changed, 10 insertions(+)
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2466,6 +2466,9 @@ const FeatureEntry kFeatureEntries[] = {
@@ -2589,6 +2589,9 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kAccelerated2dCanvasName,
flag_descriptions::kAccelerated2dCanvasDescription, kOsAll,
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)},
@ -22,25 +22,26 @@ Subject: Add flag to disable WebGL
SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)},
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -3251,6 +3251,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. Note that selecting 'enable' for this flag will enable, and selecting 'disable' will disable WebGL.";
@@ -511,6 +511,10 @@ const char kEnableAudioFocusEnforcementN
const char kEnableAudioFocusEnforcementDescription[] =
"Enables enforcement of a single media session having audio focus at "
"any one time. Requires #enable-media-session-service to be enabled too.";
+const char kDisableWebGLName[] = "WebGL";
+
+const char kDisableWebGLDescription[] = "Enable or disable all versions of WebGL";
+
// Non-Android -----------------------------------------------------------------
const char kEnableAutofillAccountWalletStorageName[] =
"Enable the account data storage for autofill";
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -1877,6 +1877,9 @@ extern const char kTabbedAppOverflowMenu
extern const char kWalletRequiresFirstSyncSetupCompleteName[];
extern const char kWalletRequiresFirstSyncSetupCompleteDescription[];
@@ -317,6 +317,9 @@ extern const char kDisallowDocWrittenScr
extern const char kEnableAccessibilityObjectModelName[];
extern const char kEnableAccessibilityObjectModelDescription[];
+extern const char kDisableWebGLName[];
+extern const char kDisableWebGLDescription[];
+
// Non-Android ----------------------------------------------------------------
extern const char kEnableAudioFocusEnforcementName[];
extern const char kEnableAudioFocusEnforcementDescription[];

18
patches/Bromite/Add-flags-to-disable-device-motion-orientation-APIs.patch

@ -19,7 +19,7 @@ legacy acceleration events.
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2681,6 +2681,12 @@ const FeatureEntry kFeatureEntries[] = {
@@ -2789,6 +2789,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
@@ -735,6 +735,14 @@ const char kWinrtSensorsImplementationDe
@@ -755,6 +755,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
@@ -444,6 +444,12 @@ extern const char kWinrtGeolocationImple
@@ -455,6 +455,12 @@ extern const char kWinrtGeolocationImple
extern const char kWinrtSensorsImplementationName[];
extern const char kWinrtSensorsImplementationDescription[];
@ -78,7 +78,7 @@ legacy acceleration events.
#else
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -835,6 +835,16 @@ const base::Feature kWebOtpBackend{"kWeb
@@ -837,6 +837,16 @@ const base::Feature kWebOtpBackendAuto{"
// The JavaScript API for payments on the web.
const base::Feature kWebPayments{"WebPayments",
base::FEATURE_ENABLED_BY_DEFAULT};
@ -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
@@ -182,6 +182,8 @@ CONTENT_EXPORT extern const base::Featur
@@ -197,6 +197,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
@@ -96,6 +96,8 @@ class WebRuntimeFeatures {
@@ -97,6 +97,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
@@ -220,9 +220,13 @@ void ModulesInitializer::OnClearWindowOb
@@ -222,9 +222,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
@@ -171,6 +171,14 @@ void WebRuntimeFeatures::EnableScrollTop
@@ -175,6 +175,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
@@ -1361,6 +1361,14 @@
@@ -1386,6 +1386,14 @@
status: "experimental",
},
{

85
patches/Bromite/Add-option-to-not-persist-tabs-across-sessions.patch

@ -3,28 +3,60 @@ 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/res/xml/privacy_preferences.xml | 16 ++++++---
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/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(-)
4 files changed, 36 insertions(+), 7 deletions(-)
--- a/chrome/android/java/res/xml/privacy_preferences.xml
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
@@ -50,4 +50,10 @@
android:summary="@string/prefs_safe_browsing_summary"
android:fragment="org.chromium.chrome.browser.safe_browsing.settings.SafeBrowsingSettingsFragment"
android:order="7"/>
@@ -23,31 +23,37 @@
android:title="@string/usage_stats_setting_title"
android:persistent="false"
android:order="2"/>
+ <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"
+ android:defaultValue="false"
+ android:order="3" />
<Preference
android:fragment="org.chromium.chrome.browser.privacy.settings.DoNotTrackSettings"
android:key="do_not_track"
android:title="@string/do_not_track_title"
- android:order="3"/>
+ android:order="4"/>
<org.chromium.components.browser_ui.settings.ChromeBasePreference
android:key="secure_dns"
android:title="@string/settings_secure_dns_title"
android:fragment="org.chromium.chrome.browser.privacy.secure_dns.SecureDnsSettings"
- android:order="4"/>
+ android:order="5"/>
<Preference
android:key="clear_browsing_data"
android:title="@string/clear_browsing_data_title"
android:summary="@string/clear_browsing_data_summary"
android:fragment="org.chromium.chrome.browser.browsing_data.ClearBrowsingDataTabsFragment"
- android:order="5"/>
+ android:order="6"/>
<Preference
android:key="safe_browsing"
android:title="@string/prefs_safe_browsing_title"
android:summary="@string/prefs_safe_browsing_summary"
android:fragment="org.chromium.chrome.browser.safe_browsing.settings.SafeBrowsingSettingsFragment"
- android:order="6"/>
+ android:order="7"/>
<Preference
android:key="privacy_sandbox"
android:title="@string/prefs_privacy_sandbox"
android:fragment="org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxSettingsFragment"
- android:order="7"/>
+ android:order="8"/>
</PreferenceScreen>
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -1076,8 +1076,10 @@ public class ChromeTabbedActivity extend
@@ -1117,8 +1117,10 @@ public class ChromeTabbedActivity extend
boolean hadCipherData =
CipherFactory.getInstance().restoreFromBundle(getSavedInstanceState());
@ -38,41 +70,38 @@ Subject: Add option to not persist tabs across sessions
mTabModelSelectorImpl.clearState();
--- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
@@ -4,6 +4,7 @@
@@ -5,6 +5,7 @@
package org.chromium.chrome.browser.privacy.settings;
import android.os.Build;
+import android.content.SharedPreferences;
import android.os.Bundle;
import android.text.SpannableString;
import android.view.Menu;
@@ -14,6 +15,7 @@ import androidx.preference.Preference;
@@ -15,6 +16,8 @@ import androidx.preference.Preference;
import androidx.preference.PreferenceFragmentCompat;
import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat;
+import org.chromium.base.ContextUtils;
import org.chromium.base.BuildInfo;
+import org.chromium.base.BuildInfo;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.feedback.HelpAndFeedbackLauncherImpl;
@@ -43,6 +45,7 @@ import org.chromium.ui.text.SpanApplier;
*/
public class PrivacySettings
extends PreferenceFragmentCompat implements Preference.OnPreferenceChangeListener {
+ private static final String PREF_CLOSE_TABS_ON_EXIT = "close_tabs_on_exit";
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";
@@ -53,7 +56,8 @@ public class PrivacySettings
private static final String PREF_CLEAR_BROWSING_DATA = "clear_browsing_data";
import org.chromium.chrome.browser.flags.ChromeFeatureList;
@@ -53,10 +56,13 @@ public class PrivacySettings
private static final String PREF_PRIVACY_SANDBOX = "privacy_sandbox";
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_GLOBAL_PRIVACY_CONTROL};
+ PREF_SECURE_DNS, PREF_DO_NOT_TRACK, PREF_GLOBAL_PRIVACY_CONTROL,
+ PREF_CLOSE_TABS_ON_EXIT};
+ PREF_CLOSE_TABS_ON_EXIT,
PREF_SECURE_DNS, PREF_DO_NOT_TRACK, PREF_PRIVACY_SANDBOX};
private ManagedPreferenceDelegate mManagedPreferenceDelegate;
@@ -146,7 +150,11 @@ public class PrivacySettings
+ private static final String PREF_CLOSE_TABS_ON_EXIT = "close_tabs_on_exit";
+
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
PrivacyPreferencesManagerImpl privacyPrefManager =
@@ -151,7 +157,11 @@ public class PrivacySettings
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
String key = preference.getKey();
@ -85,7 +114,7 @@ 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)) {
@@ -215,6 +223,11 @@ public class PrivacySettings
@@ -215,6 +225,11 @@ public class PrivacySettings
getPreferenceScreen().removePreference(usageStatsPref);
}
}
@ -99,7 +128,7 @@ Subject: Add option to not persist tabs across sessions
private ChromeManagedPreferenceDelegate createManagedPreferenceDelegate() {
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -3753,6 +3753,12 @@ Data from your Incognito session will on
@@ -3771,6 +3771,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>

8
patches/Bromite/Change-default-webRTC-policy-to-not-use-any-address.patch

@ -6,12 +6,13 @@ This prevents leakage of the local IP address.
See also: https://github.com/bromite/bromite/issues/553
---
third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc | 7 ++++---
.../peerconnection/peer_connection_dependency_factory.cc | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc b/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
--- a/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
+++ b/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
@@ -423,12 +423,13 @@ PeerConnectionDependencyFactory::CreateP
@@ -461,12 +461,13 @@ PeerConnectionDependencyFactory::CreatePortAllocator(
port_config.enable_nonproxied_udp = false;
break;
case DEFAULT:
@ -28,3 +29,6 @@ See also: https://github.com/bromite/bromite/issues/553
<< "policy: " << policy
<< ", multiple_routes: " << port_config.enable_multiple_routes
<< ", nonproxied_udp: " << port_config.enable_nonproxied_udp
--
2.17.1

2
patches/Bromite/Disable-DRM-media-origin-IDs-preprovisioning.patch

@ -8,7 +8,7 @@ Subject: Disable DRM media origin IDs preprovisioning
--- a/media/base/media_switches.cc
+++ b/media/base/media_switches.cc
@@ -566,7 +566,7 @@ const base::Feature kMediaDrmPersistentL
@@ -599,7 +599,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",

4
patches/Bromite/DoH-secure-mode-by-default.patch

@ -9,7 +9,7 @@ Subject: DoH secure mode by default
--- a/chrome/browser/net/stub_resolver_config_reader.cc
+++ b/chrome/browser/net/stub_resolver_config_reader.cc
@@ -153,7 +153,7 @@ StubResolverConfigReader::StubResolverCo
@@ -154,7 +154,7 @@ StubResolverConfigReader::StubResolverCo
if (entries.count("[email protected]")) {
// The user has "Enabled" selected.
local_state_->SetString(prefs::kDnsOverHttpsMode,
@ -18,7 +18,7 @@ Subject: DoH secure mode by default
} else if (entries.count("[email protected]")) {
// The user has "Disabled" selected.
local_state_->SetString(prefs::kDnsOverHttpsMode,
@@ -327,22 +327,7 @@ SecureDnsConfig StubResolverConfigReader
@@ -328,22 +328,7 @@ SecureDnsConfig StubResolverConfigReader
check_parental_controls = false;
}

177
patches/Bromite/Inject-scripts-for-AMP-tracking-ads-and-video.patch

File diff suppressed because one or more lines are too long

35
patches/Bromite/Remove-account-permissions-from-manifest.patch

@ -3,16 +3,16 @@ Date: Sun, 14 Apr 2019 12:08:27 +0200
Subject: Remove all sync and account permissions/features from manifest
---
chrome/android/java/AndroidManifest.xml | 18 ----------
chrome/android/java/src/org/chromium/chrome/browser/sync/AndroidSyncSettings.java | 2 -
2 files changed, 1 insertion(+), 19 deletions(-)
chrome/android/java/AndroidManifest.xml | 8 --------
chrome/android/java/src/org/chromium/chrome/browser/sync/AndroidSyncSettings.java | 2 +-
2 files changed, 1 insertion(+), 9 deletions(-)
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -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 %}
@@ -47,24 +47,18 @@ by a child template that "extends" this
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
- <uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.INTERNET"/>
- <uses-permission android:name="android.permission.MANAGE_ACCOUNTS"/>
@ -34,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+. -->
@@ -102,8 +96,6 @@ by a child template that "extends" this
@@ -101,8 +95,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"/>
@ -43,26 +43,9 @@ Subject: Remove all sync and account permissions/features from manifest
{% block extra_uses_permissions %}
{% endblock %}
@@ -874,16 +866,6 @@ by a child template that "extends" this
android:resource="@xml/file_paths" />
</provider>
- <!-- Sync adapter for browser invalidation. -->
- <service android:name="org.chromium.chrome.browser.invalidation.ChromeBrowserSyncAdapterService"
- android:exported="false">
- <intent-filter>
- <action android:name="android.content.SyncAdapter" />
- </intent-filter>
- <meta-data android:name="android.content.SyncAdapter"
- android:resource="@xml/syncadapter" />
- </service>
-
<!-- Broadcast receiver that will be notified of account changes -->
<receiver android:name="org.chromium.chrome.browser.services.AccountsChangedReceiver"
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
@@ -284,7 +284,7 @@ public class AndroidSyncSettings {
@@ -260,7 +260,7 @@ public class AndroidSyncSettings {
mIsSyncable = false;
mChromeSyncEnabled = false;
}

16
patches/Bromite/Revert-flags-remove-disable-pull-to-refresh-effect.patch

@ -12,7 +12,7 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -3035,6 +3035,10 @@ const FeatureEntry kFeatureEntries[] = {
@@ -3189,6 +3189,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
@@ -945,6 +945,11 @@
@@ -969,6 +969,11 @@
"expiry_milestone": -1
},
{
@ -39,9 +39,9 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
"expiry_milestone": 83
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -3029,6 +3029,10 @@ const char kQueryTilesInstantFetchName[]
const char kQueryTilesInstantFetchDescription[] =
"Immediately schedule background task to fetch query tiles";
@@ -3107,6 +3107,10 @@ const char kReadLaterDescription[] =
"Allow users to save tabs for later. Enables a new button and menu for "
"accessing tabs saved for later.";
+const char kPullToRefreshEffectName[] = "The pull-to-refresh effect";
+const char kPullToRefreshEffectDescription[] =
@ -52,9 +52,9 @@ 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
@@ -1760,6 +1760,9 @@ extern const char kQueryTilesLocalOrderi
extern const char kQueryTilesInstantFetchName[];
extern const char kQueryTilesInstantFetchDescription[];
@@ -1796,6 +1796,9 @@ extern const char kQueryTilesMoreTrendin
extern const char kQueryTilesSwapTrendingName[];
extern const char kQueryTilesSwapTrendingDescription[];
+extern const char kPullToRefreshEffectName[];
+extern const char kPullToRefreshEffectDescription[];

14
patches/Bromite/updater-disable-updater-pings.patch

@ -6,14 +6,14 @@ Despite auto-updater being arguably disabled (see previous commit),
Chromium would still send background requests. Kill it.
(trk:170, trk:171)
---
.../component_updater/component_updater_url_constants.cc | 4 ++--
components/component_updater/configurator_impl.cc | 5 +----
components/component_updater/configurator_impl.h | 1 -
components/component_updater/component_updater_url_constants.cc | 4 ++--
components/component_updater/configurator_impl.cc | 5 +----
components/component_updater/configurator_impl.h | 1 -
3 files changed, 3 insertions(+), 7 deletions(-)
--- a/components/component_updater/component_updater_url_constants.cc
+++ b/components/component_updater/component_updater_url_constants.cc
@@ -15,9 +15,9 @@
@@ -15,9 +15,9 @@ namespace component_updater {
// The value of |kDefaultUrlSource| can be overridden with
// --component-updater=url-source=someurl.
const char kUpdaterJSONDefaultUrl[] =
@ -27,7 +27,7 @@ Chromium would still send background requests. Kill it.
} // namespace component_updater
--- a/components/component_updater/configurator_impl.cc
+++ b/components/component_updater/configurator_impl.cc
@@ -42,8 +42,7 @@
@@ -42,8 +42,7 @@ ConfiguratorImpl::ConfiguratorImpl(
: background_downloads_enabled_(config_policy.BackgroundDownloadsEnabled()),
deltas_enabled_(config_policy.DeltaUpdatesEnabled()),
fast_update_(config_policy.FastUpdate()),
@ -37,7 +37,7 @@ Chromium would still send background requests. Kill it.
url_source_override_(config_policy.UrlSourceOverride()),
initial_delay_(config_policy.InitialDelay()) {
if (config_policy.TestRequest()) {
@@ -78,8 +77,6 @@
@@ -78,8 +77,6 @@ std::vector<GURL> ConfiguratorImpl::Upda
std::vector<GURL> urls{GURL(kUpdaterJSONDefaultUrl),
GURL(kUpdaterJSONFallbackUrl)};
@ -48,7 +48,7 @@ Chromium would still send background requests. Kill it.
}
--- a/components/component_updater/configurator_impl.h
+++ b/components/component_updater/configurator_impl.h
@@ -98,7 +98,6 @@
@@ -98,7 +98,6 @@ class ConfiguratorImpl {
const bool deltas_enabled_;
const bool fast_update_;
const bool pings_enabled_;

28
patches/Other/debug-fix.patch

@ -20,7 +20,7 @@ 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
@@ -134,18 +134,6 @@ void PrimaryAccountManager::SetAuthentic
@@ -130,18 +130,6 @@ void PrimaryAccountManager::SetSyncPrima
DCHECK(!account_info.account_id.empty());
DCHECK(!HasPrimaryAccount(signin::ConsentLevel::kSync));
@ -41,7 +41,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -224,7 +224,7 @@ config("compiler") {
@@ -229,7 +229,7 @@ config("compiler") {
cflags_cc = []
cflags_objc = []
cflags_objcc = []
@ -50,16 +50,16 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
defines = []
configs = []
@@ -1737,7 +1737,7 @@ config("no_rtti") {
# (de)allocate memory on a different heap, which would spell trouble if pointers
@@ -1751,7 +1751,7 @@ config("no_rtti") {
# to heap-allocated memory are passed over shared library boundaries.
config("export_dynamic") {
- if (is_linux || export_libcxxabi_from_executables) {
+ if (is_linux || export_libcxxabi_from_executables || is_android) {
# TODO(crbug.com/1052397): Revisit after target_os flip is completed.
- if (is_linux || is_chromeos_lacros || export_libcxxabi_from_executables) {
+ if (is_linux || is_chromeos_lacros || export_libcxxabi_from_executables || is_android) {
ldflags = [ "-rdynamic" ]
}
}
@@ -1962,8 +1962,6 @@ if (is_win) {
@@ -1972,8 +1972,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 += [
@@ -1971,7 +1969,6 @@ if (is_win) {
@@ -1981,7 +1979,6 @@ if (is_win) {
# See http://lwn.net/Articles/192624/ .
# -O2 enables string tail merge optimization in gold and lld.
"-Wl,-O2",
@ -97,7 +97,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
SchemaValidatingPolicyHandler::~SchemaValidatingPolicyHandler() {}
--- a/components/signin/internal/identity_manager/profile_oauth2_token_service_builder.cc
+++ b/components/signin/internal/identity_manager/profile_oauth2_token_service_builder.cc
@@ -177,7 +177,6 @@ std::unique_ptr<ProfileOAuth2TokenServic
@@ -178,7 +178,6 @@ std::unique_ptr<ProfileOAuth2TokenServic
// device ID is needed on the network thread, but can only be generated on the
// main thread.
std::string device_id = signin::GetSigninScopedDeviceId(pref_service);
@ -107,7 +107,7 @@ 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
@@ -1323,16 +1323,6 @@ bool AutocompleteMatch::IsEmptyAutocompl
@@ -1355,16 +1355,6 @@ bool AutocompleteMatch::IsEmptyAutocompl
split_autocompletion.Empty();
}
@ -126,8 +126,8 @@ 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
@@ -715,13 +715,6 @@ void AutocompleteResult::CopyFrom(const
matches_ = other.matches_;
@@ -720,13 +720,6 @@ void AutocompleteResult::CopyFrom(const
#endif
}
-#if DCHECK_IS_ON()
@ -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
@@ -748,9 +748,6 @@ void AutocompleteController::UpdateResul
// Need to validate before invoking CopyOldMatches as the old matches are not
// valid against the current input.
@ -178,7 +178,7 @@ 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
@@ -940,7 +940,6 @@ void NetworkContext::QueueReport(
@@ -965,7 +965,6 @@ void NetworkContext::QueueReport(
const net::NetworkIsolationKey& network_isolation_key,
const base::Optional<std::string>& user_agent,
base::Value body) {

37
patches/Unobtainium/kill-Auth.patch

@ -3,13 +3,13 @@ Date: Fri, 22 Jun 2018 17:06:15 +0200
Subject: kill Auth
---
chrome/android/java/src/org/chromium/chrome/browser/signin/SigninHelper.java | 22 -----
chrome/browser/signin/services/android/java/src/org/chromium/chrome/browser/signin/services/SigninHelper.java | 19 ----
components/signin/core/browser/android/java/src/org/chromium/components/signin/SystemAccountManagerDelegate.java | 42 ----------
2 files changed, 4 insertions(+), 60 deletions(-)
2 files changed, 3 insertions(+), 58 deletions(-)
--- 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 @@ import android.content.Context;
--- a/chrome/browser/signin/services/android/java/src/org/chromium/chrome/browser/signin/services/SigninHelper.java
+++ b/chrome/browser/signin/services/android/java/src/org/chromium/chrome/browser/signin/services/SigninHelper.java
@@ -10,10 +10,6 @@ import android.util.Pair;
import androidx.annotation.VisibleForTesting;
@ -20,28 +20,25 @@ Subject: kill Auth
import org.chromium.base.ApplicationState;
import org.chromium.base.ApplicationStatus;
import org.chromium.base.ContextUtils;
@@ -64,23 +60,7 @@ public class SigninHelper implements App
@@ -55,21 +51,6 @@ public class SigninHelper implements App
implements SigninHelper.AccountChangeEventChecker {
@Override
public List<String> getAccountChangeEvents(
Context context, int index, String accountName) {
public List<String> getAccountChangeEvents(Context context, int index, String accountName) {
- try {
- List<AccountChangeEvent> list = GoogleAuthUtil.getAccountChangeEvents(
- context, index, accountName);
- List<String> result = new ArrayList<>(list.size());
- for (AccountChangeEvent e : list) {
- if (e.getChangeType() == GoogleAuthUtil.CHANGE_TYPE_ACCOUNT_RENAMED_TO) {
- result.add(e.getChangeData());
- List<AccountChangeEvent> accountChangeEvents =
- GoogleAuthUtil.getAccountChangeEvents(context, index, accountName);
- List<String> changedNames = new ArrayList<>(accountChangeEvents.size());
- for (AccountChangeEvent event : accountChangeEvents) {
- if (event.getChangeType() == GoogleAuthUtil.CHANGE_TYPE_ACCOUNT_RENAMED_TO) {
- changedNames.add(event.getChangeData());
- } else {
- result.add(null);
- changedNames.add(null);
- }
- }
- return result;
- } catch (IOException e) {
- Log.w(TAG, "Failed to get change events", e);
- } catch (GoogleAuthException e) {
- return changedNames;
- } catch (IOException | GoogleAuthException e) {
- Log.w(TAG, "Failed to get change events", e);
- }
+
return new ArrayList<>(0);
}
}

32
patches/Unobtainium/kill-GCM.patch

@ -18,7 +18,7 @@ Subject: kill GCM
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -512,7 +512,6 @@ android_library("chrome_java") {
@@ -523,7 +523,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",
@ -36,10 +36,10 @@ Subject: kill GCM
"java/src/org/chromium/chrome/browser/ChromeBackupAgentImpl.java",
"java/src/org/chromium/chrome/browser/ChromeBackupWatcher.java",
"java/src/org/chromium/chrome/browser/ChromeBaseAppCompatActivity.java",
@@ -1344,10 +1343,6 @@ chrome_java_sources = [
@@ -1217,10 +1216,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/searchwidget/SearchWidgetProvider.java",
"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/ChromeGcmListenerServiceImpl.java",
- "java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundServiceImpl.java",
- "java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundTask.java",
@ -49,7 +49,7 @@ Subject: kill GCM
"java/src/org/chromium/chrome/browser/settings/SettingsLauncherImpl.java",
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -88,23 +88,18 @@ by a child template that "extends" this
@@ -87,23 +87,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" />
@ -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" />
@@ -979,36 +974,6 @@ by a child template that "extends" this
@@ -935,36 +930,6 @@ by a child template that "extends" this
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|mcc|mnc|screenLayout|smallestScreenSize"
android:hardwareAccelerated="false" />
@ -110,7 +110,7 @@ Subject: kill GCM
<!-- Android Notification service listener -->
<service android:name="org.chromium.chrome.browser.notifications.NotificationService"
android:exported="false"/>
@@ -1032,28 +997,10 @@ by a child template that "extends" this
@@ -988,28 +953,10 @@ by a child template that "extends" this
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE"/>
@ -141,7 +141,7 @@ Subject: kill GCM
tools:ignore="ExportedService" />
--- a/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java
@@ -19,7 +19,6 @@ import org.chromium.chrome.browser.offli
@@ -20,7 +20,6 @@ import org.chromium.chrome.browser.offli
import org.chromium.chrome.browser.offlinepages.prefetch.OfflineNotificationBackgroundTask;
import org.chromium.chrome.browser.offlinepages.prefetch.PrefetchBackgroundTask;
import org.chromium.chrome.browser.omaha.OmahaService;
@ -149,7 +149,7 @@ Subject: kill GCM
import org.chromium.chrome.browser.webapps.WebApkUpdateTask;
import org.chromium.components.background_task_scheduler.BackgroundTask;
import org.chromium.components.background_task_scheduler.BackgroundTaskFactory;
@@ -59,8 +58,6 @@ public class ChromeBackgroundTaskFactory
@@ -60,8 +59,6 @@ public class ChromeBackgroundTaskFactory
switch (taskId) {
case TaskIds.OMAHA_JOB_ID:
return new OmahaService();
@ -190,7 +190,7 @@ Subject: kill GCM
--- a/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java
+++ b/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java
@@ -29,7 +29,6 @@ public class InstanceIDBridge {
@@ -27,7 +27,6 @@ public class InstanceIDBridge {
* Underlying InstanceIDWithSubtype. May be shared by multiple InstanceIDBridges. Must be
* initialized on a background thread.
*/
@ -198,7 +198,7 @@ Subject: kill GCM
private static boolean sBlockOnAsyncTasksForTesting;
@@ -74,7 +73,7 @@ public class InstanceIDBridge {
@@ -72,7 +71,7 @@ public class InstanceIDBridge {
new BridgeAsyncTask<String>() {
@Override
protected String doBackgroundWork() {
@ -207,7 +207,7 @@ Subject: kill GCM
}
@Override
protected void sendResultToNative(String id) {
@@ -90,7 +89,7 @@ public class InstanceIDBridge {
@@ -88,7 +87,7 @@ public class InstanceIDBridge {
new BridgeAsyncTask<Long>() {
@Override
protected Long doBackgroundWork() {
@ -216,7 +216,7 @@ Subject: kill GCM
}
@Override
protected void sendResultToNative(Long creationTime) {
@@ -116,24 +115,7 @@ public class InstanceIDBridge {
@@ -110,24 +109,7 @@ public class InstanceIDBridge {
new BridgeAsyncTask<String>() {
@Override
protected String doBackgroundWork() {
@ -232,7 +232,7 @@ Subject: kill GCM
- mSubtype, authorizedEntity),
- flags);
- if (mInstanceID != null)
- return mInstanceID.getToken(authorizedEntity, scope, extras);
- return mInstanceID.getToken(authorizedEntity, scope);
- else
- return "";
- } catch (IOException ex) {
@ -242,7 +242,7 @@ Subject: kill GCM
}
@Override
protected void sendResultToNative(String token) {
@@ -150,21 +132,7 @@ public class InstanceIDBridge {
@@ -144,21 +126,7 @@ public class InstanceIDBridge {
new BridgeAsyncTask<Boolean>() {
@Override
protected Boolean doBackgroundWork() {
@ -265,7 +265,7 @@ Subject: kill GCM
}
@Override
protected void sendResultToNative(Boolean success) {
@@ -180,12 +148,7 @@ public class InstanceIDBridge {
@@ -174,12 +142,7 @@ public class InstanceIDBridge {
new BridgeAsyncTask<Boolean>() {
@Override
protected Boolean doBackgroundWork() {
@ -279,7 +279,7 @@ Subject: kill GCM
}
@Override
protected void sendResultToNative(Boolean success) {
@@ -215,11 +178,6 @@ public class InstanceIDBridge {
@@ -209,11 +172,6 @@ public class InstanceIDBridge {
@Override
@SuppressWarnings("NoSynchronizedThisCheck") // Only used/accessible by native.
protected Result doInBackground() {

2
patches/Unobtainium/kill-Location-fall-back-to-system.patch

@ -9,7 +9,7 @@ Subject: kill Location, fall back to system
--- a/services/device/geolocation/BUILD.gn
+++ b/services/device/geolocation/BUILD.gn
@@ -151,7 +151,6 @@ if (is_android) {
@@ -152,7 +152,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",

18
patches/Unobtainium/kill-TOS-and-metrics-opt-out.patch

@ -3,14 +3,13 @@ Date: Fri, 22 Jun 2018 17:16:07 +0200
Subject: kill TOS and metrics opt-out
---
chrome/android/java/res/layout/fre_tosanduma.xml | 2 +-
chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
chrome/android/java/res/layout/fre_tosanduma.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/chrome/android/java/res/layout/fre_tosanduma.xml
+++ b/chrome/android/java/res/layout/fre_tosanduma.xml
@@ -83,7 +83,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/fre_vertical_spacing"
android:layout_marginBottom="@dimen/fre_tos_bottom_margin"
android:lineSpacingMultiplier="1.4"
- android:textAppearance="@style/TextAppearance.TextMedium.Primary" />
@ -18,14 +17,3 @@ Subject: kill TOS and metrics opt-out
<CheckBox
android:id="@+id/send_report_checkbox"
--- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java
@@ -38,7 +38,7 @@
static final String SHOW_SEARCH_ENGINE_PAGE = "ShowSearchEnginePage";
static final String SHOW_SIGNIN_PAGE = "ShowSignIn";
- public static final boolean DEFAULT_METRICS_AND_CRASH_REPORTING = true;
+ public static final boolean DEFAULT_METRICS_AND_CRASH_REPORTING = false;
private boolean mNativeInitialized;

12
patches/Unobtainium/kill-Translate.patch

@ -8,9 +8,9 @@ Subject: kill Translate
--- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
@@ -27,7 +27,11 @@ import org.chromium.chrome.browser.metri
@@ -27,7 +27,11 @@ import org.chromium.chrome.browser.datar
import org.chromium.chrome.browser.metrics.UmaUtils;
import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings;
import org.chromium.chrome.browser.privacy.settings.PrivacyPreferencesManager;
import org.chromium.chrome.browser.search_engines.TemplateUrlServiceFactory;
+import org.chromium.chrome.browser.preferences.Pref;
+import org.chromium.chrome.browser.profiles.Profile;
@ -20,16 +20,16 @@ Subject: kill Translate
import org.chromium.ui.base.LocalizationUtils;
import java.util.ArrayList;
@@ -158,6 +162,8 @@ public class FirstRunActivity extends Fi
if (mPostNativePageSequenceCreated) return;
mFirstRunFlowSequencer.onNativeInitialized(mFreProperties);
@@ -160,6 +164,8 @@ public class FirstRunActivity extends Fi
assert areNativeAndPoliciesInitialized();
mFirstRunFlowSequencer.onNativeAndPoliciesInitialized(mFreProperties);
+ getPrefService().setBoolean(Pref.OFFER_TRANSLATE_ENABLED, false);
+
boolean notifyAdapter = false;
// An optional Data Saver page.
if (mFreProperties.getBoolean(SHOW_DATA_REDUCTION_PAGE)) {
@@ -622,4 +628,9 @@ public class FirstRunActivity extends Fi
@@ -610,4 +616,9 @@ public class FirstRunActivity extends Fi
assert sObserver == null;
sObserver = observer;
}

15
patches/Unobtainium/kill-Vision.patch

@ -5,10 +5,10 @@ Subject: kill Vision
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/BitmapUtils.java | 11 ----
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, 53 deletions(-)
4 files changed, 52 deletions(-)
--- a/services/shape_detection/BUILD.gn
+++ b/services/shape_detection/BUILD.gn
@ -36,14 +36,13 @@ Barcode, face and text detection APIs
-import com.google.android.gms.vision.Frame;
-
import org.chromium.mojo_base.BigBufferUtil;
import org.chromium.skia.mojom.ColorType;
@@ -44,14 +42,4 @@ public class BitmapUtils {
return bitmap;
import java.nio.ByteBuffer;
@@ -44,13 +42,4 @@ public class BitmapUtils {
}
}
-
- public static Frame convertToFrame(org.chromium.skia.mojom.Bitmap bitmapData) {
- public static Frame convertToFrame(org.chromium.skia.mojom.BitmapN32 bitmapData) {
- Bitmap bitmap = convertToBitmap(bitmapData);
- if (bitmap == null) {
- return null;

29
patches/Vanadium/0003-switch-to-fstack-protector-strong.patch

@ -0,0 +1,29 @@
From 6208bab7bbed9826044cf417b101bcf8d9abe3ce Mon Sep 17 00:00:00 2001
From: Daniel Micay <[email protected]>
Date: Wed, 26 Dec 2018 10:20:24 -0500
Subject: [PATCH 03/73] switch to -fstack-protector-strong
---
build/config/compiler/BUILD.gn | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -294,16 +294,12 @@ config("compiler") {
cflags += [ "-fstack-protector" ]
}
} else if ((is_posix && !is_chromeos_ash && !is_nacl) || is_fuchsia) {
- # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it.
- # See also https://crbug.com/533294
- cflags += [ "--param=ssp-buffer-size=4" ]
-
# The x86 toolchain currently has problems with stack-protector.
if (is_android && current_cpu == "x86") {
cflags += [ "-fno-stack-protector" ]
} else if (current_os != "aix") {
# Not available on aix.
- cflags += [ "-fstack-protector" ]
+ cflags += [ "-fstack-protector-strong" ]
}
}

20
patches/Vanadium/0016-disable-seed-based-field-trials.patch

@ -0,0 +1,20 @@
From 74ef07561bc7ea73e5311297cc31a970646cd81f Mon Sep 17 00:00:00 2001
From: Daniel Micay <[email protected]>
Date: Tue, 25 Dec 2018 16:19:51 -0500
Subject: [PATCH 16/73] disable seed-based field trials
---
components/variations/service/variations_field_trial_creator.cc | 2 --
1 file changed, 2 deletions(-)
--- a/components/variations/service/variations_field_trial_creator.cc
+++ b/components/variations/service/variations_field_trial_creator.cc
@@ -524,8 +524,6 @@ bool VariationsFieldTrialCreator::SetupF
#endif // BUILDFLAG(FIELDTRIAL_TESTING_ENABLED)
bool used_seed = false;
if (!used_testing_config) {
- used_seed = CreateTrialsFromSeed(*low_entropy_provider, feature_list.get(),
- safe_seed_manager);
}
platform_field_trials->SetupFeatureControllingFieldTrials(

20
patches/Vanadium/0017-disable-fetching-variations.patch

@ -0,0 +1,20 @@
From 52f2b2390d73e4a1790b9ee85b46a46f14ef0eef Mon Sep 17 00:00:00 2001
From: Daniel Micay <[email protected]>
Date: Wed, 18 Nov 2020 19:08:58 -0500
Subject: [PATCH 17/73] disable fetching variations
---
chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitTaskRunner.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitTaskRunner.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitTaskRunner.java
@@ -40,7 +40,7 @@ public abstract class AsyncInitTaskRunne
@VisibleForTesting
boolean shouldFetchVariationsSeedDuringFirstRun() {
- return ChromeVersionInfo.isOfficialBuild();
+ return false;
}
@VisibleForTesting

20
patches/Vanadium/0021-disable-metrics-by-default.patch

@ -0,0 +1,20 @@
From 76edf9475f4fd717376ac1eb707966d8feec61d8 Mon Sep 17 00:00:00 2001
From: Daniel Micay <[email protected]>
Date: Thu, 24 Nov 2016 11:41:00 -0500
Subject: [PATCH 21/73] disable metrics by default
---
chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java
@@ -44,7 +44,7 @@ public abstract class FirstRunActivityBa
static final String SHOW_SEARCH_ENGINE_PAGE = "ShowSearchEnginePage";
static final String SHOW_SIGNIN_PAGE = "ShowSignIn";
- public static final boolean DEFAULT_METRICS_AND_CRASH_REPORTING = true;
+ public static final boolean DEFAULT_METRICS_AND_CRASH_REPORTING = false;
private boolean mNativeInitialized;

27
patches/Vanadium/0023-disable-showing-popular-sites-by-default.patch

@ -0,0 +1,27 @@
From 5a49c7560afff2540106a06de891479a2e2d180d Mon Sep 17 00:00:00 2001
From: Daniel Micay <[email protected]>
Date: Tue, 6 Mar 2018 00:27:41 -0500
Subject: [PATCH 23/73] disable showing popular sites by default
---
components/ntp_tiles/features.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/components/ntp_tiles/features.cc
+++ b/components/ntp_tiles/features.cc
@@ -13,13 +13,13 @@ namespace ntp_tiles {
const char kPopularSitesFieldTrialName[] = "NTPPopularSites";
const base::Feature kPopularSitesBakedInContentFeature{
- "NTPPopularSitesBakedInContent", base::FEATURE_ENABLED_BY_DEFAULT};
+ "NTPPopularSitesBakedInContent", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kNtpMostLikelyFaviconsFromServerFeature{
"NTPMostLikelyFaviconsFromServer", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kUsePopularSitesSuggestions{
- "UsePopularSitesSuggestions", base::FEATURE_ENABLED_BY_DEFAULT};
+ "UsePopularSitesSuggestions", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kDisplaySuggestionsServiceTiles{
"DisplaySuggestionsServiceTiles", base::FEATURE_DISABLED_BY_DEFAULT};

6
patches/Vanadium/0020-disable-media-router-media-remoting-by-default.patch → patches/Vanadium/0031-disable-media-router-media-remoting-by-default.patch

@ -1,7 +1,7 @@
From 99cfe5951292db607db5399f7e7526266bb273ab Mon Sep 17 00:00:00 2001
From 6b4748e10c07910f303fa468b8fc1038f487ffbe Mon Sep 17 00:00:00 2001
From: Daniel Micay <[email protected]>
Date: Thu, 4 Jul 2019 18:11:27 -0400
Subject: [PATCH 20/30] disable media router media remoting by default
Subject: [PATCH 31/73] disable media router media remoting by default
---
chrome/browser/profiles/profile.cc | 2 +-
@ -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
@@ -355,7 +355,7 @@ void Profile::RegisterProfilePrefs(user_
@@ -327,7 +327,7 @@ void Profile::RegisterProfilePrefs(user_
media_router::prefs::kMediaRouterEnableCloudServices, false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterBooleanPref(

36
patches/Vanadium/0021-disable-media-router-by-default.patch → patches/Vanadium/0032-disable-media-router-by-default.patch

@ -1,24 +1,34 @@
From 75c087d108655330beabb7729432b083e625e925 Mon Sep 17 00:00:00 2001
From 7604c7016a6cc351895c17844082a74aa887ae25 Mon Sep 17 00:00:00 2001
From: Daniel Micay <[email protected]>
Date: Thu, 4 Jul 2019 19:08:52 -0400
Subject: [PATCH 21/30] disable media router by default
Subject: [PATCH 32/73] disable media router by default
---
chrome/browser/media/router/media_router_feature.cc | 17 ++++++++---------
chrome/browser/media/router/media_router_feature.cc | 20 +++++++++-----------
chrome/browser/profiles/profile_impl.cc | 2 +-
2 files changed, 9 insertions(+), 10 deletions(-)
2 files changed, 10 insertions(+), 12 deletions(-)
--- a/chrome/browser/media/router/media_router_feature.cc
+++ b/chrome/browser/media/router/media_router_feature.cc
@@ -66,17 +66,16 @@ bool MediaRouterEnabled(content::Browser
#endif // !defined(OFFICIAL_BUILD) && !defined(OS_ANDROID)
@@ -59,7 +59,7 @@ const PrefService::Preference* GetMediaR
content::BrowserContext* context) {
return user_prefs::UserPrefs::Get(context)->FindPreference(
::prefs::kEnableMediaRouter);
-}
+ }
} // namespace
#endif // defined(OS_ANDROID) || BUILDFLAG(ENABLE_EXTENSIONS)
@@ -80,18 +80,16 @@ bool MediaRouterEnabled(content::Browser
if (it != stored_pref_values->end())
return it->second;
#if defined(OS_ANDROID) || BUILDFLAG(ENABLE_EXTENSIONS)
- // Check the enterprise policy.
- const PrefService::Preference* pref = GetMediaRouterPref(context);
- // Only use the pref value if it set from a mandatory policy.
- if (pref->IsManaged() && !pref->IsDefaultValue()) {
- bool allowed = false;
- bool allowed;
- CHECK(pref->GetValue()->GetAsBoolean(&allowed));
- stored_pref_values->insert(std::make_pair(context, allowed));
- return allowed;
- }
-
@ -38,12 +48,12 @@ Subject: [PATCH 21/30] disable media router by default
#endif // defined(OS_ANDROID) || BUILDFLAG(ENABLE_EXTENSIONS)
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -408,7 +408,7 @@ void ProfileImpl::RegisterProfilePrefs(
@@ -454,7 +454,7 @@ void ProfileImpl::RegisterProfilePrefs(
#endif
registry->RegisterBooleanPref(prefs::kForceEphemeralProfiles, false);
- registry->RegisterBooleanPref(prefs::kEnableMediaRouter, true);
+ registry->RegisterBooleanPref(prefs::kEnableMediaRouter, false);
#if defined(OS_CHROMEOS)
registry->RegisterBooleanPref(
prefs::kOobeMarketingOptInScreenFinished, false,
#if !defined(OS_ANDROID)
registry->RegisterBooleanPref(prefs::kShowCastIconInToolbar, false);
#endif // !defined(OS_ANDROID)

23
patches/series

@ -4,8 +4,13 @@ src-fix/fix-unkown-warning-clang.patch
src-fix/fix-safe-browsing-prefs.patch
src-fix/fix-prefs.patch
src-fix/fix-base-feature.patch
Vanadium/0020-disable-media-router-media-remoting-by-default.patch
Vanadium/0021-disable-media-router-by-default.patch
Vanadium/0003-switch-to-fstack-protector-strong.patch
Vanadium/0016-disable-seed-based-field-trials.patch
Vanadium/0017-disable-fetching-variations.patch
Vanadium/0021-disable-metrics-by-default.patch
Vanadium/0023-disable-showing-popular-sites-by-default.patch
Vanadium/0031-disable-media-router-media-remoting-by-default.patch
Vanadium/0032-disable-media-router-by-default.patch
Unobtainium/kill-Auth.patch
Unobtainium/kill-GCM.patch
Unobtainium/kill-Location-fall-back-to-system.patch
@ -37,15 +42,19 @@ ungoogled-chromium-android/Remove-ntp-sites.patch
ungoogled-chromium-android/Add-save-data-flag.patch
ungoogled-chromium-android/Add-always-desktop-option.patch
ungoogled-chromium-android/Add-force-tablet-ui-option.patch
Bromite/Remove-account-permissions-from-manifest.patch
Bromite/updater-disable-updater-pings.patch