Browse Source

Update to 85.0.4183.83-1

master
wchen342 2 years ago
parent
commit
00c9a7d103
Signed by untrusted user: wchen342 GPG Key ID: 720B70365E800508
  1. 2
      android_flags.debug.gn
  2. 55
      binary_dependencies
  3. 8
      build.sh
  4. 8
      misc/android_studio_setup.sh
  5. 18
      patches/Bromite/Add-bookmark-import-export-actions.patch
  6. 36
      patches/Bromite/Add-exit-menu-item.patch
  7. 6
      patches/Bromite/Add-flag-to-disable-WebGL.patch
  8. 20
      patches/Bromite/Add-flags-to-disable-device-motion-orientation-APIs.patch
  9. 36
      patches/Bromite/Add-option-to-not-persist-tabs-across-sessions.patch
  10. 38
      patches/Bromite/Add-user-setting-for-DNS-over-HTTPS-DoH-custom-URL.patch
  11. 13
      patches/Bromite/Change-default-webRTC-policy-to-not-use-any-address.patch
  12. 14
      patches/Bromite/Remove-account-permissions-from-manifest.patch
  13. 16
      patches/Bromite/Revert-flags-remove-disable-pull-to-refresh-effect.patch
  14. 20
      patches/Unobtainium/kill-Auth.patch
  15. 56
      patches/Unobtainium/kill-GCM.patch
  16. 2
      patches/Vanadium/0020-disable-media-router-media-remoting-by-default.patch
  17. 4
      patches/Vanadium/0021-disable-media-router-by-default.patch
  18. 44
      patches/src-fix/fix-prefs.patch
  19. 103
      patches/src-fix/fix-safe-browsing-prefs.patch
  20. 2
      patches/src-fix/fix-unkown-warning-clang.patch
  21. 2
      patches/ungoogled-chromium-android/Add-folder-button-bookmark.patch
  22. 2
      patches/ungoogled-chromium-android/Disable-contextual-search.patch
  23. 6
      patches/ungoogled-chromium-android/Enable-ProactivelySwapBrowsingInstance.patch
  24. 2
      patches/ungoogled-chromium-android/Mark-http-as-dangerous-mixed-content-warning.patch
  25. 13
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gcm.patch
  26. 29
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.auth.patch
  27. 32
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.cast.patch
  28. 48
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.common-auth-signin-dynamic-com.google.android.gms.tasks.patch
  29. 94
      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
  30. 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
  31. 10
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.gcm.patch
  32. 25
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.vision-com.google.android.gms.clearcut-com.google.android.gms.phenotype.patch
  33. 23
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.core.splitcompat-com.google.android.play.core.splitinstall.patch
  34. 12
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.patch
  35. 12
      patches/ungoogled-chromium-android/enable-update-notification.patch
  36. 4
      patches/ungoogled-chromium-android/flag-enable-process-sharing.patch

2
android_flags.debug.gn

@ -1,6 +1,6 @@
blink_symbol_level=2
clang_use_chrome_plugins=false
closure_compile=false
enable_js_type_check=false
dfmify_dev_ui=false
disable_autofill_assistant_dfm=true
disable_tab_ui_dfm=true

55
binary_dependencies

@ -1,55 +0,0 @@
jar/aar:
"src/third_party/android_deps/libs/androidx_test_core": None,
"src/third_party/android_deps/libs/androidx_test_ext_junit": None,
"src/third_party/android_deps/libs/androidx_test_monitor": None,
"src/third_party/android_deps/libs/com_android_support_leanback_v17": None,
"src/third_party/android_deps/libs/com_android_support_preference_leanback_v17": None,
"src/third_party/android_deps/libs/com_android_support_preference_v14": None,
"src/third_party/android_deps/libs/com_android_support_preference_v7": None,
"src/third_party/android_deps/libs/com_google_ar_core": None,
"src/third_party/android_deps/libs/com_google_code_findbugs_jsr305": None,
"src/third_party/android_deps/libs/com_google_dagger_dagger_spi": None,
"src/third_party/android_deps/libs/com_google_errorprone_error_prone_annotations": None,
"src/third_party/android_deps/libs/com_google_errorprone_javac_shaded": None,
"src/third_party/android_deps/libs/com_google_googlejavaformat_google_java_format": None,
"src/third_party/android_deps/libs/com_google_guava_guava": None,
"src/third_party/android_deps/libs/com_google_j2objc_j2objc_annotations": None,
"src/third_party/android_deps/libs/javax_annotation_jsr250_api": None,
"src/third_party/android_deps/libs/org_checkerframework_checker_compat_qual": None,
"src/third_party/android_deps/libs/org_codehaus_mojo_animal_sniffer_annotations": None,
"src/third_party/android_deps/libs/android_arch_lifecycle_runtime": None,7
"src/third_party/android_deps/libs/com_android_support_support_compat": None,27
"src/third_party/android_deps/libs/com_android_support_support_core_ui": None,28
"src/third_party/android_deps/libs/com_android_support_support_core_utils": None,29
"src/third_party/android_deps/libs/com_android_support_support_fragment": None,30
"src/third_party/android_deps/libs/com_android_support_support_media_compat": None,31
"src/third_party/android_deps/libs/com_android_support_support_v4": None,33
"src/third_party/android_deps/libs/com_android_support_animated_vector_drawable": None,13
"src/third_party/android_deps/libs/com_android_support_support_vector_drawable": None,34
"src/third_party/android_deps/libs/com_android_support_appcompat_v7": None,14
"src/third_party/android_deps/libs/com_android_support_recyclerview_v7": None,25
"src/third_party/android_deps/libs/com_android_support_design": None,16
"src/third_party/android_deps/libs/com_android_support_transition": None,35
"src/third_party/android_deps/libs/com_android_support_gridlayout_v7": None,17
"src/third_party/android_deps/libs/com_android_support_support_v13": None,32
"src/third_party/android_deps/libs/com_android_support_mediarouter_v7": None,19
"src/third_party/android_deps/libs/com_android_support_palette_v7": None,21
"src/third_party/android_deps/libs/com_android_support_cardview_v7": None,15
"src/third_party/bazel": None,83
"src/third_party/r8": None,98
"src/third_party/guava": None,90
"src/third_party/android_deps/libs/com_squareup_javapoet": None,68
"src/third_party/android_deps/libs/com_android_support_support_annotations": None,26
"src/third_party/android_deps/libs/com_android_support_multidex": None,20
"src/third_party/ow2_asm": None,95
"src/third_party/android_deps/libs/android_arch_core_common": None,5
"src/third_party/android_deps/libs/android_arch_lifecycle_common": None,6
"src/third_party/android_deps/libs/com_google_protobuf_protobuf_lite": None,67
"src/third_party/android_system_sdk": None,80
"src/third_party/android_deps/libs/com_google_dagger_dagger": None,58
"src/third_party/android_deps/libs/javax_inject_javax_inject": None,70
"src/third_party/android_deps/libs/com_google_dagger_dagger_compiler": None,59
"src/third_party/android_deps/libs/com_google_dagger_dagger_producers": None,60
"src/third_party/android_deps/libs/androidx_annotation_annotation": None,8
"src/third_party/android_deps/libs/androidx_lifecycle_lifecycle_common": None,9
"src/third_party/custom_tabs_client/src": None,gradle-wrapper.jar

8
build.sh

@ -4,11 +4,13 @@ set -eux -o pipefail
# Required tools: protobuf python python2 gperf wget rsync tar unzip curl gnupg maven yasm npm ninja gn nodejs git clang lld gn llvm jdk8-openjdk jre8-openjdk-headless jdk10-openjdk lib32-glibc multilib-devel
# Assuming default python to be python2.
chrome_target=chrome_public_apk
mono_target=monochrome_public_apk
modern_chrome_apk_target=chrome_modern_public_apk
modern_chrome_bundle_target=chrome_modern_public_bundle
trichrome_chrome_bundle_target=trichrome_chrome_bundle
trichrome_library_apk_target=trichrome_library_apk
webview_target=system_webview_apk
chromium_version=84.0.4147.125
chromium_version=85.0.4183.83
ungoogled_chromium_revision=1
# Argument parser from https://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash/29754866#29754866

8
misc/android_studio_setup.sh

@ -1,9 +1,11 @@
#!/usr/bin/env bash
set -eux -o pipefail
chromium_version=84.0.4147.125
chrome_target=chrome_public_apk
mono_target=monochrome_public_apk
chromium_version=85.0.4183.83
modern_chrome_apk_target=chrome_modern_public_apk
modern_chrome_bundle_target=chrome_modern_public_bundle
trichrome_chrome_bundle_target=trichrome_chrome_bundle
trichrome_library_apk_target=trichrome_library_apk
webview_target=system_webview_apk
# Create symbol links to gn, depot-tools

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

@ -318,7 +318,7 @@ Completely remove contacts picker permission from the file dialog
initWithView(mManager.getView());
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -176,6 +176,10 @@ static_library("browser") {
@@ -182,6 +182,10 @@ static_library("browser") {
"bitmap_fetcher/bitmap_fetcher_service.h",
"bitmap_fetcher/bitmap_fetcher_service_factory.cc",
"bitmap_fetcher/bitmap_fetcher_service_factory.h",
@ -329,16 +329,16 @@ 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",
@@ -3149,8 +3153,6 @@ static_library("browser") {
@@ -3053,8 +3057,6 @@ static_library("browser") {
"badging/badge_manager_factory.h",
"banners/app_banner_manager_desktop.cc",
"banners/app_banner_manager_desktop.h",
- "bookmarks/bookmark_html_writer.cc",
- "bookmarks/bookmark_html_writer.h",
"certificate_viewer.h",
"chrome_browser_field_trials_desktop.cc",
"chrome_browser_field_trials_desktop.h",
@@ -3287,8 +3289,6 @@ static_library("browser") {
"browsing_data/access_context_audit_database.cc",
"browsing_data/access_context_audit_database.h",
"browsing_data/access_context_audit_service.cc",
@@ -3194,8 +3196,6 @@ static_library("browser") {
"importer/importer_uma.h",
"importer/in_process_importer_bridge.cc",
"importer/in_process_importer_bridge.h",
@ -447,7 +447,7 @@ Completely remove contacts picker permission from the file dialog
}
void BookmarkBridge::Destroy(JNIEnv*, const JavaParamRef<jobject>&) {
@@ -513,6 +583,153 @@ jint BookmarkBridge::GetTotalBookmarkCou
@@ -520,6 +590,153 @@ jint BookmarkBridge::GetTotalBookmarkCou
return count;
}
@ -737,7 +737,7 @@ Completely remove contacts picker permission from the file dialog
</message>
--- a/chrome/common/BUILD.gn
+++ b/chrome/common/BUILD.gn
@@ -418,6 +418,9 @@ static_library("common") {
@@ -416,6 +416,9 @@ static_library("common") {
sources += [
"media/chrome_media_drm_bridge_client.cc",
"media/chrome_media_drm_bridge_client.h",
@ -758,7 +758,7 @@ Completely remove contacts picker permission from the file dialog
"importer/bookmarks_file_importer.cc",
"importer/bookmarks_file_importer.h",
"importer/edge_database_reader_win.cc",
@@ -170,6 +168,11 @@ static_library("utility") {
@@ -172,6 +170,11 @@ static_library("utility") {
}
}

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

@ -4,11 +4,11 @@ Subject: Add exit menu item
Corrected Exit functionality
---
chrome/android/java/res/menu/main_menu.xml | 2 ++
chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java | 2 ++
chrome/android/java/res/menu/main_menu.xml | 4 ++++
chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java | 5 +++++
chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLifetimeController.java | 6 +++++-
chrome/browser/ui/android/strings/android_chrome_strings.grd | 3 +++
4 files changed, 12 insertions(+), 1 deletion(-)
4 files changed, 17 insertions(+), 1 deletion(-)
--- a/chrome/android/java/res/menu/main_menu.xml
+++ b/chrome/android/java/res/menu/main_menu.xml
@ -21,17 +21,29 @@ Corrected Exit functionality
</group>
<!-- Items shown only in the tab switcher -->
@@ -104,6 +106,8 @@
android:title="@string/menu_group_tabs" />
<item android:id="@id/preferences_id"
android:title="@string/menu_settings" />
+ <item android:id="@+id/exit_id"
+ android:title="@string/menu_exit" />
</group>
<!-- Items shown only in the tab switcher when start surface is enabled -->
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
@@ -2030,6 +2030,8 @@ public abstract class ChromeActivity<C e
AddToHomescreenCoordinator.showForAppMenu(
this, getWindowAndroid(), getModalDialogManager(), currentTab.getWebContents());
RecordUserAction.record("MobileMenuAddToHomescreen");
+ } else if (id == R.id.exit_id) {
@@ -1930,6 +1930,11 @@ public abstract class ChromeActivity<C e
RecordUserAction.record("MobileMenuSettings");
}
+ if (id == R.id.exit_id) {
+ ApplicationLifetime.terminate(false);
} else if (id == R.id.open_webapk_id) {
Context context = ContextUtils.getApplicationContext();
String packageName =
+ return true;
+ }
+
if (id == R.id.update_menu_id) {
UpdateMenuItemHelper.getInstance().onMenuItemClicked(this);
return true;
--- a/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLifetimeController.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/init/ChromeLifetimeController.java
@@ -82,7 +82,11 @@ class ChromeLifetimeController implement
@ -49,7 +61,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
@@ -2446,6 +2446,9 @@ To change this setting, <ph name="BEGIN_
@@ -2584,6 +2584,9 @@ To change this setting, <ph name="BEGIN_
<message name="IDS_MENU_SETTINGS" desc="Menu item for opening browser settings. [CHAR-LIMIT=27]">
Settings
</message>

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

@ -10,7 +10,7 @@ Subject: Add flag to disable WebGL
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2050,6 +2050,9 @@ const FeatureEntry kFeatureEntries[] = {
@@ -2067,6 +2067,9 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kAccelerated2dCanvasName,
flag_descriptions::kAccelerated2dCanvasDescription, kOsAll,
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)},
@ -22,7 +22,7 @@ Subject: Add flag to disable WebGL
SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)},
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -452,6 +452,10 @@ const char kDeviceDiscoveryNotifications
@@ -484,6 +484,10 @@ const char kDeviceDiscoveryNotifications
const char kDeviceDiscoveryNotificationsDescription[] =
"Device discovery notifications on local network.";
@ -35,7 +35,7 @@ Subject: Add flag to disable WebGL
"With this flag on, tasks of the lowest priority will not be executed "
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -286,6 +286,9 @@ extern const char kDebugShortcutsDescrip
@@ -301,6 +301,9 @@ extern const char kDebugShortcutsDescrip
extern const char kDeviceDiscoveryNotificationsName[];
extern const char kDeviceDiscoveryNotificationsDescription[];

20
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
@@ -2266,6 +2266,12 @@ const FeatureEntry kFeatureEntries[] = {
@@ -2283,6 +2283,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
@@ -678,6 +678,14 @@ const char kWinrtSensorsImplementationDe
@@ -709,6 +709,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
@@ -410,6 +410,12 @@ extern const char kWinrtGeolocationImple
@@ -425,6 +425,12 @@ extern const char kWinrtGeolocationImple
extern const char kWinrtSensorsImplementationName[];
extern const char kWinrtSensorsImplementationDescription[];
@ -66,9 +66,9 @@ legacy acceleration events.
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@@ -88,6 +88,9 @@ void SetRuntimeFeatureDefaultsForPlatfor
@@ -92,6 +92,9 @@ void SetRuntimeFeatureDefaultsForPlatfor
command_line.HasSwitch(
switches::kEnableGpuMemoryBufferCompositorResources) &&
blink::switches::kEnableGpuMemoryBufferCompositorResources) &&
!command_line.HasSwitch(switches::kDisableWebGLImageChromium) &&
+ WebRuntimeFeatures::EnableDeviceMotion(base::FeatureList::IsEnabled(features::kDeviceMotion));
+ WebRuntimeFeatures::EnableDeviceOrientation(base::FeatureList::IsEnabled(features::kDeviceOrientation));
@ -78,7 +78,7 @@ legacy acceleration events.
#else
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -804,6 +804,16 @@ const base::Feature kWebOtpBackend{"kWeb
@@ -801,6 +801,16 @@ const base::Feature kWebOtpBackend{"kWeb
// TODO(rouslan): Remove this.
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
@@ -176,6 +176,8 @@ CONTENT_EXPORT extern const base::Featur
@@ -175,6 +175,8 @@ CONTENT_EXPORT extern const base::Featur
CONTENT_EXPORT extern const base::Feature kWebXrIncubations;
CONTENT_EXPORT extern const base::Feature kWebXrPermissionsApi;
@ -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
@@ -98,6 +98,8 @@ class WebRuntimeFeatures {
@@ -99,6 +99,8 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableCSSHexAlphaColor(bool);
BLINK_PLATFORM_EXPORT static void EnableSameSiteByDefaultCookies(bool);
BLINK_PLATFORM_EXPORT static void EnableScrollTopLeftInterop(bool);
@ -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
@@ -179,6 +179,14 @@ void WebRuntimeFeatures::EnableScrollTop
@@ -189,6 +189,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
@@ -1245,6 +1245,14 @@
@@ -1257,6 +1257,14 @@
status: "experimental",
},
{

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

@ -4,11 +4,11 @@ Subject: Add option to not persist tabs across sessions
---
chrome/android/java/res/values/values.xml | 3 ++
chrome/android/java/res/xml/privacy_preferences.xml | 5 +++
chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java | 4 ++
chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java | 14 +++++++++-
chrome/browser/ui/android/strings/android_chrome_strings.grd | 6 ++++
5 files changed, 30 insertions(+), 2 deletions(-)
chrome/android/java/res/xml/privacy_preferences.xml | 5 ++++
chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java | 4 ++-
chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java | 12 ++++++++++
chrome/browser/ui/android/strings/android_chrome_strings.grd | 6 +++++
5 files changed, 29 insertions(+), 1 deletion(-)
--- a/chrome/android/java/res/values/values.xml
+++ b/chrome/android/java/res/values/values.xml
@ -38,7 +38,7 @@ Subject: Add option to not persist tabs across sessions
android:key="do_not_track"
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -1172,8 +1172,10 @@ public class ChromeTabbedActivity
@@ -1181,8 +1181,10 @@ public class ChromeTabbedActivity extend
boolean hadCipherData =
CipherFactory.getInstance().restoreFromBundle(getSavedInstanceState());
@ -68,42 +68,40 @@ Subject: Add option to not persist tabs across sessions
import org.chromium.base.BuildInfo;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.help.HelpAndFeedback;
@@ -38,6 +40,7 @@ public class PrivacySettings
@@ -40,6 +42,7 @@ import java.util.List;
*/
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_CLOSE_TABS_ON_EXIT = "close_tabs_on_exit";
private static final String PREF_USAGE_STATS = "usage_stats_reporting";
private static final String PREF_DO_NOT_TRACK = "do_not_track";
private static final String PREF_SYNC_AND_SERVICES_LINK = "sync_and_services_link";
@@ -86,7 +89,11 @@ public class PrivacySettings
private static final String PREF_SECURE_DNS = "secure_dns";
@@ -94,6 +97,10 @@ public class PrivacySettings
Pref.CAN_MAKE_PAYMENT_ENABLED, (boolean) newValue);
} else if (PREF_NETWORK_PREDICTIONS.equals(key)) {
PrivacyPreferencesManager.getInstance().setNetworkPredictionEnabled((boolean) newValue);
- }
+ } else if (PREF_CLOSE_TABS_ON_EXIT.equals(key)) {
+ SharedPreferences.Editor sharedPreferencesEditor = ContextUtils.getAppSharedPreferences().edit();
+ sharedPreferencesEditor.putBoolean(PREF_CLOSE_TABS_ON_EXIT, (boolean)newValue);
+ sharedPreferencesEditor.apply();
+ }
}
return true;
}
@@ -134,6 +141,11 @@ public class PrivacySettings
} else {
@@ -168,6 +175,11 @@ public class PrivacySettings
getPreferenceScreen().removePreference(usageStatsPref);
}
}
+
+ ChromeBaseCheckBoxPreference closeTabsOnExitPref =
+ (ChromeBaseCheckBoxPreference) 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
@@ -3219,6 +3219,12 @@ Only you can see what your camera is loo
@@ -3357,6 +3357,12 @@ To change this setting, <ph name="BEGIN_
<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>

38
patches/Bromite/Add-user-setting-for-DNS-over-HTTPS-DoH-custom-URL.patch

@ -5,7 +5,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
---
chrome/android/chrome_java_resources.gni | 2
chrome/android/chrome_java_sources.gni | 2
chrome/android/java/res/layout/doh_editor.xml | 65 +++++++
chrome/android/java/res/layout/doh_editor.xml | 67 +++++++
chrome/android/java/res/values/values.xml | 2
chrome/android/java/res/xml/doh_preferences.xml | 25 ++
chrome/android/java/res/xml/privacy_preferences.xml | 5
@ -17,7 +17,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
chrome/browser/net/stub_resolver_config_reader.cc | 36 ---
chrome/browser/ui/android/strings/android_chrome_strings.grd | 11 +
chrome/common/chrome_features.cc | 4
14 files changed, 322 insertions(+), 31 deletions(-)
14 files changed, 324 insertions(+), 31 deletions(-)
create mode 100644 chrome/android/java/res/layout/doh_editor.xml
create mode 100644 chrome/android/java/res/xml/doh_preferences.xml
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/settings/DoHEditor.java
@ -25,15 +25,15 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
--- a/chrome/android/chrome_java_resources.gni
+++ b/chrome/android/chrome_java_resources.gni
@@ -953,6 +953,7 @@ chrome_java_resources = [
@@ -880,6 +880,7 @@ chrome_java_resources = [
"java/res/layout/date_view.xml",
"java/res/layout/default_search_engine_first_run_fragment.xml",
"java/res/layout/device_item_list.xml",
+ "java/res/layout/doh_editor.xml",
"java/res/layout/distilled_page_font_family_spinner.xml",
"java/res/layout/distilled_page_prefs_view.xml",
+ "java/res/layout/doh_editor.xml",
"java/res/layout/edit_url_suggestion_layout.xml",
"java/res/layout/editable_option_editor_footer.xml",
"java/res/layout/editable_option_editor_icons.xml",
@@ -1184,6 +1185,7 @@ chrome_java_resources = [
@@ -1111,6 +1112,7 @@ chrome_java_resources = [
"java/res/xml/data_reduction_preferences.xml",
"java/res/xml/data_reduction_preferences_off_lite_mode.xml",
"java/res/xml/developer_preferences.xml",
@ -43,7 +43,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
"java/res/xml/homepage_preferences.xml",
--- a/chrome/android/chrome_java_sources.gni
+++ b/chrome/android/chrome_java_sources.gni
@@ -1373,6 +1373,8 @@ chrome_java_sources = [
@@ -1372,6 +1372,8 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/searchwidget/SearchWidgetProvider.java",
"java/src/org/chromium/chrome/browser/send_tab_to_self/DevicePickerBottomSheetAdapter.java",
"java/src/org/chromium/chrome/browser/send_tab_to_self/DevicePickerBottomSheetContent.java",
@ -54,7 +54,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
"java/src/org/chromium/chrome/browser/send_tab_to_self/SendTabToSelfAndroidBridge.java",
--- /dev/null
+++ b/chrome/android/java/res/layout/doh_editor.xml
@@ -0,0 +1,65 @@
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2015 The Chromium Authors. All rights reserved.
+ Use of this source code is governed by a BSD-style license that can be
@ -81,7 +81,9 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+
+ <com.google.android.material.textfield.TextInputLayout
+ android:id="@+id/doh_url"
+ style="@style/PreferenceScreenLayout"
+ android:paddingTop="16dp"
+ android:paddingStart="@dimen/pref_autofill_content_spacing"
+ android:paddingEnd="@dimen/pref_autofill_content_spacing"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" >
+ <!-- TODO(crbug.com/900912): Fix and remove lint ignore -->
@ -148,7 +150,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+ android:summaryOn="@string/text_on"
+ android:summaryOff="@string/text_off" />
+
+ <org.chromium.chrome.browser.settings.HyperlinkPreference
+ <org.chromium.chrome.browser.about_settings.HyperlinkPreference
+ android:key="doh_help"
+ android:title="@string/doh_help"
+ app:url="@string/doh_help_url" />
@ -327,7 +329,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+}
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -6912,6 +6912,12 @@ the Bookmarks menu.">
@@ -6977,6 +6977,12 @@ the Bookmarks menu.">
</if>
<if expr="is_android">
@ -380,7 +382,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+}
--- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
+++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
@@ -127,6 +127,26 @@ public class CachedFeatureFlags {
@@ -128,6 +128,26 @@ public class CachedFeatureFlags {
private static Map<String, String> sOverridesTestFeatures;
private static String sReachedCodeProfilerTrialGroup;
@ -407,7 +409,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
/**
* Checks if a cached feature flag is enabled.
*
@@ -401,6 +421,10 @@ public class CachedFeatureFlags {
@@ -404,6 +424,10 @@ public class CachedFeatureFlags {
@NativeMethods
interface Natives {
@ -420,7 +422,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
}
--- a/chrome/browser/net/stub_resolver_config_reader.cc
+++ b/chrome/browser/net/stub_resolver_config_reader.cc
@@ -140,28 +140,6 @@ StubResolverConfigReader::StubResolverCo
@@ -141,28 +141,6 @@ StubResolverConfigReader::StubResolverCo
base::Value(SecureDnsConfig::ModeToString(default_secure_dns_mode)));
local_state_->SetDefaultPrefValue(prefs::kDnsOverHttpsTemplates,
base::Value(default_doh_templates));
@ -449,7 +451,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
}
pref_change_registrar_.Add(prefs::kBuiltInDnsClientEnabled, pref_callback);
@@ -323,21 +301,21 @@ SecureDnsConfig StubResolverConfigReader
@@ -346,21 +324,21 @@ SecureDnsConfig StubResolverConfigReader
parental_controls_checked_ = true;
}
@ -480,7 +482,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -598,6 +598,17 @@ CHAR-LIMIT guidelines:
@@ -608,6 +608,17 @@ CHAR-LIMIT guidelines:
Chrome Passwords
</message>
@ -500,7 +502,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
Enter custom web address
--- a/chrome/common/chrome_features.cc
+++ b/chrome/common/chrome_features.cc
@@ -281,12 +281,12 @@ const base::Feature kDefaultWebAppInstal
@@ -281,12 +281,12 @@ const base::Feature kDesktopPWAsRunOnOsL
// Enable DNS over HTTPS (DoH).
const base::Feature kDnsOverHttps{"DnsOverHttps",

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

@ -6,13 +6,14 @@ 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 ++++---
chrome/browser/ui/browser_ui_prefs.cc | 4 ++--
.../peerconnection/peer_connection_dependency_factory.cc | 7 ++++---
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -83,8 +83,8 @@ void RegisterBrowserUserPrefs(user_prefs
@@ -87,8 +87,8 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
false);
#endif
// TODO(guoweis): Remove next 2 options at M50.
@ -23,9 +24,10 @@ See also: https://github.com/bromite/bromite/issues/553
registry->RegisterStringPref(prefs::kWebRTCIPHandlingPolicy,
blink::kWebRTCIPHandlingDefault);
registry->RegisterStringPref(prefs::kWebRTCUDPPortRange, std::string());
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
@@ -434,12 +434,13 @@ PeerConnectionDependencyFactory::CreateP
@@ -421,12 +421,13 @@ PeerConnectionDependencyFactory::CreatePortAllocator(
port_config.enable_nonproxied_udp = false;
break;
case DEFAULT:
@ -42,3 +44,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

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

@ -3,8 +3,8 @@ Date: Sun, 14 Apr 2019 12:08:27 +0200
Subject: Remove all sync and account permissions/features from manifest
---
chrome/android/java/AndroidManifest.xml | 26 ----------
components/sync/android/java/src/org/chromium/components/sync/AndroidSyncSettings.java | 2
chrome/android/java/AndroidManifest.xml | 26 ----------
chrome/android/java/src/org/chromium/chrome/browser/sync/AndroidSyncSettings.java | 2
2 files changed, 1 insertion(+), 27 deletions(-)
--- a/chrome/android/java/AndroidManifest.xml
@ -42,7 +42,7 @@ Subject: Remove all sync and account permissions/features from manifest
{% block extra_uses_permissions %}
{% endblock %}
@@ -866,16 +858,6 @@ by a child template that "extends" this
@@ -840,16 +832,6 @@ by a child template that "extends" this
android:resource="@xml/file_paths" />
</provider>
@ -59,7 +59,7 @@ Subject: Remove all sync and account permissions/features from manifest
<!-- Broadcast receiver that will be notified of account changes -->
<receiver android:name="org.chromium.chrome.browser.services.AccountsChangedReceiver">
<intent-filter>
@@ -944,14 +926,6 @@ by a child template that "extends" this
@@ -918,14 +900,6 @@ by a child template that "extends" this
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|mcc|mnc|screenLayout|smallestScreenSize"
android:hardwareAccelerated="false" />
@ -74,9 +74,9 @@ Subject: Remove all sync and account permissions/features from manifest
<!-- Android Notification service listener -->
<service android:name="org.chromium.chrome.browser.notifications.NotificationService"
android:exported="false"/>
--- a/components/sync/android/java/src/org/chromium/components/sync/AndroidSyncSettings.java
+++ b/components/sync/android/java/src/org/chromium/components/sync/AndroidSyncSettings.java
@@ -311,7 +311,7 @@ public class AndroidSyncSettings {
--- a/chrome/android/java/src/org/chromium/chrome/browser/sync/AndroidSyncSettings.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/AndroidSyncSettings.java
@@ -313,7 +313,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
@@ -2619,6 +2619,10 @@ const FeatureEntry kFeatureEntries[] = {
@@ -2643,6 +2643,10 @@ const FeatureEntry kFeatureEntries[] = {
SINGLE_VALUE_TYPE(switches::kHostedAppQuitNotification)},
#endif // OS_MACOSX
#if defined(OS_ANDROID)
@ -25,8 +25,8 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
flag_descriptions::kTranslateForceTriggerOnEnglishDescription, kOsAndroid,
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -70,6 +70,11 @@
"expiry_milestone": 88
@@ -946,6 +946,11 @@
"expiry_milestone": -1
},
{
+ "name": "disable-pull-to-refresh-effect",
@ -34,12 +34,12 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
+ "expiry_milestone": -1
+ },
+ {
"name": "allow-previews",
"owners": [ "//components/data_reduction_proxy/OWNERS" ],
// This flag is used for frequent manual testing and should not be removed.
"name": "disable-keepalive-fetch",
"owners": [ "yhirano" ],
"expiry_milestone": 83
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -2707,6 +2707,10 @@ const char kQueryTilesInstantFetchName[]
@@ -2839,6 +2839,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
@@ -1578,6 +1578,9 @@ extern const char kQueryTilesCountryCode
@@ -1644,6 +1644,9 @@ extern const char kQueryTilesCountryCode
extern const char kQueryTilesInstantFetchName[];
extern const char kQueryTilesInstantFetchDescription[];

20
patches/Unobtainium/kill-Auth.patch

@ -4,8 +4,8 @@ Subject: kill Auth
---
chrome/android/java/src/org/chromium/chrome/browser/signin/SigninHelper.java | 22 -----
components/signin/core/browser/android/java/src/org/chromium/components/signin/SystemAccountManagerDelegate.java | 42 ----------
2 files changed, 4 insertions(+), 60 deletions(-)
components/signin/core/browser/android/java/src/org/chromium/components/signin/SystemAccountManagerDelegate.java | 40 ----------
2 files changed, 3 insertions(+), 59 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
@ -59,7 +59,7 @@ Subject: kill Auth
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.Callback;
@@ -119,35 +114,15 @@ public class SystemAccountManagerDelegat
@@ -119,18 +114,7 @@ public class SystemAccountManagerDelegat
// so don't report any accounts if Google Play Services are out of date.
checkCanUseGooglePlayServices();
@ -79,26 +79,26 @@ Subject: kill Auth
}
@Override
public String getAuthToken(Account account, String authTokenScope) throws AuthException {
@@ -138,17 +122,8 @@ public class SystemAccountManagerDelegat
throws AuthException {
assert !ThreadUtils.runningOnUiThread();
assert AccountUtils.GOOGLE_ACCOUNT_TYPE.equals(account.type);
- try {
- return GoogleAuthUtil.getTokenWithNotification(
- ContextUtils.getApplicationContext(), account, authTokenScope, null);
- return new AccessTokenData(GoogleAuthUtil.getTokenWithNotification(
- ContextUtils.getApplicationContext(), account, authTokenScope, null));
- } catch (GoogleAuthException ex) {
- // This case includes a UserRecoverableNotifiedException, but most clients will have
- // their own retry mechanism anyway.
- throw new AuthException(AuthException.NONTRANSIENT,
- "Error while getting token for scope '" + authTokenScope + "'", ex);
+ throw new AuthException(AuthException.NONTRANSIENT,
"Error while getting token for scope '" + authTokenScope + "'", ex);
- } catch (IOException ex) {
- throw new AuthException(AuthException.TRANSIENT, ex);
- }
+ throw new AuthException(AuthException.NONTRANSIENT,
+ "Error while getting token for scope '" + authTokenScope);
}
@Override
@@ -200,17 +175,6 @@ public class SystemAccountManagerDelegat
@@ -201,17 +176,6 @@ public class SystemAccountManagerDelegat
@SuppressLint("MissingPermission")
@Override
public void createAddAccountIntent(Callback<Intent> callback) {

56
patches/Unobtainium/kill-GCM.patch

@ -9,7 +9,6 @@ Subject: kill GCM
chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java | 3
chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsLauncher.java | 56 ---
chrome/android/java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundTask.java | 1
chrome/android/java/src/org/chromium/chrome/browser/services/gcm/InvalidationGcmUpstreamSender.java | 18
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/gcm_driver/android/BUILD.gn | 1
@ -19,11 +18,11 @@ Subject: kill GCM
third_party/cacheinvalidation/BUILD.gn | 6
third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/contrib/MultiplexingGcmListener.java | 91 ----
third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidNetworkChannel.java | 6
16 files changed, 20 insertions(+), 535 deletions(-)
15 files changed, 20 insertions(+), 517 deletions(-)
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -450,7 +450,6 @@ android_library("chrome_java") {
@@ -466,7 +466,6 @@ android_library("chrome_java") {
"//third_party/android_deps:com_google_protobuf_protobuf_javalite_java",
"//third_party/android_deps:javax_inject_javax_inject_java",
"//third_party/android_media:android_media_java",
@ -33,7 +32,7 @@ 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 = [
@@ -17,7 +17,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/ChromeActivity.java",
"java/src/org/chromium/chrome/browser/ChromeActivitySessionTracker.java",
"java/src/org/chromium/chrome/browser/ChromeApplication.java",
@ -41,7 +40,7 @@ Subject: kill GCM
"java/src/org/chromium/chrome/browser/ChromeBackupAgent.java",
"java/src/org/chromium/chrome/browser/ChromeBackupWatcher.java",
"java/src/org/chromium/chrome/browser/ChromeBaseAppCompatActivity.java",
@@ -1386,11 +1385,6 @@ chrome_java_sources = [
@@ -1385,11 +1384,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/services/AndroidChildAccountHelper.java",
"java/src/org/chromium/chrome/browser/services/AndroidEduOwnerCheckCallback.java",
"java/src/org/chromium/chrome/browser/services/GoogleServicesManager.java",
@ -50,9 +49,9 @@ Subject: kill GCM
- "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/HyperlinkPreference.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
@@ -82,22 +82,17 @@ by a child template that "extends" this
@ -78,7 +77,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" />
@@ -974,50 +969,9 @@ by a child template that "extends" this
@@ -948,50 +943,9 @@ by a child template that "extends" this
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|mcc|mnc|screenLayout|smallestScreenSize"
android:hardwareAccelerated="false" />
@ -129,7 +128,7 @@ Subject: kill GCM
<receiver android:name="com.google.ipc.invalidation.ticl.android2.AndroidInternalScheduler$AlarmReceiver"
android:exported="false"/>
<receiver android:name="com.google.ipc.invalidation.external.client.contrib.AndroidListener$AlarmReceiver"
@@ -1044,28 +998,10 @@ by a child template that "extends" this
@@ -1018,28 +972,10 @@ by a child template that "extends" this
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE"/>
@ -285,47 +284,6 @@ Subject: kill GCM
return false;
}
--- a/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/InvalidationGcmUpstreamSender.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/InvalidationGcmUpstreamSender.java
@@ -14,7 +14,6 @@ import android.util.Log;
import androidx.annotation.MainThread;
import androidx.annotation.Nullable;
-import com.google.android.gms.gcm.GoogleCloudMessaging;
import com.google.ipc.invalidation.ticl.android2.channel.GcmUpstreamSenderService;
import org.chromium.base.ContextUtils;
@@ -28,9 +27,6 @@ import org.chromium.components.signin.id
import org.chromium.components.sync.SyncConstants;
import org.chromium.content_public.browser.UiThreadTaskTraits;
-import java.io.IOException;
-import java.util.UUID;
-
/**
* Sends Upstream messages for Invalidations using GCM.
*/
@@ -92,20 +88,6 @@ public class InvalidationGcmUpstreamSend
* This function runs on a thread pool executor thread.
*/
private void sendUpstreamMessage(String to, Bundle data, String token, Context context) {
- // Add the OAuth2 token to the bundle. The token should have the prefix Bearer added to it.
- data.putString("Authorization", "Bearer " + token);
- if (!isMessageWithinLimit(data)) {
- GcmUma.recordGcmUpstreamHistogram(context, GcmUma.UMA_UPSTREAM_SIZE_LIMIT_EXCEEDED);
- return;
- }
- String msgId = UUID.randomUUID().toString();
- try {
- GoogleCloudMessaging.getInstance(ContextUtils.getApplicationContext())
- .send(to, msgId, 1, data);
- } catch (IOException | IllegalArgumentException exception) {
- Log.w(TAG, "Send message failed");
- GcmUma.recordGcmUpstreamHistogram(context, GcmUma.UMA_UPSTREAM_SEND_FAILED);
- }
}
private boolean isMessageWithinLimit(Bundle data) {
--- a/components/gcm_driver/android/BUILD.gn
+++ b/components/gcm_driver/android/BUILD.gn
@@ -14,7 +14,6 @@ android_library("gcm_driver_java") {

2
patches/Vanadium/0020-disable-media-router-media-remoting-by-default.patch

@ -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
@@ -329,7 +329,7 @@ void Profile::RegisterProfilePrefs(user_
@@ -344,7 +344,7 @@ void Profile::RegisterProfilePrefs(user_
prefs::kMediaRouterFirstRunFlowAcknowledged,
false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);

4
patches/Vanadium/0021-disable-media-router-by-default.patch

@ -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
@@ -46,17 +46,16 @@ const PrefService::Preference* GetMediaR
@@ -50,17 +50,16 @@ const PrefService::Preference* GetMediaR
bool MediaRouterEnabled(content::BrowserContext* context) {
#if defined(OS_ANDROID) || BUILDFLAG(ENABLE_EXTENSIONS)
@ -38,7 +38,7 @@ 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(
@@ -411,7 +411,7 @@ void ProfileImpl::RegisterProfilePrefs(
#endif
registry->RegisterBooleanPref(prefs::kForceEphemeralProfiles, false);

44
patches/src-fix/fix-prefs.patch

@ -5,42 +5,16 @@ Subject: fix build error with prefs.h
---
chrome/android/java/src/org/chromium/chrome/browser/signin/SigninFragmentBase.java | 2 +-
chrome/android/java/src/org/chromium/chrome/browser/signin/SigninPromoUtil.java | 3 +--
chrome/browser/android/preferences/prefs.h | 3 ---
3 files changed, 2 insertions(+), 6 deletions(-)
chrome/browser/preferences/BUILD.gn | 1 -
3 files changed, 2 insertions(+), 4 deletions(-)
--- a/chrome/browser/android/preferences/prefs.h
+++ b/chrome/browser/android/preferences/prefs.h
@@ -18,7 +18,6 @@
#include "components/offline_pages/core/prefetch/prefetch_prefs.h"
#include "components/password_manager/core/common/password_manager_pref_names.h"
#include "components/payments/core/payment_prefs.h"
-#include "components/signin/public/base/signin_pref_names.h"
#include "components/translate/core/browser/translate_pref_names.h"
// A preference exposed to Java.
@@ -58,7 +57,6 @@ enum Pref {
OFFER_TRANSLATE_ENABLED,
NOTIFICATIONS_VIBRATE_ENABLED,
ALTERNATE_ERROR_PAGES_ENABLED,
- SYNC_LAST_ACCOUNT_NAME,
WEBKIT_PASSWORD_ECHO_ENABLED,
WEBKIT_FORCE_DARK_MODE_ENABLED,
HOME_PAGE,
@@ -104,7 +102,6 @@ const char* const kPrefsExposedToJava[]
prefs::kOfferTranslateEnabled,
prefs::kNotificationsVibrateEnabled,
embedder_support::kAlternateErrorPagesEnabled,
- prefs::kGoogleServicesLastUsername,
prefs::kWebKitPasswordEchoEnabled,
prefs::kWebKitForceDarkModeEnabled,
prefs::kHomePage,
--- a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninFragmentBase.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninFragmentBase.java
@@ -428,7 +428,7 @@ public abstract class SigninFragmentBase
private void runStateMachineAndSignin(boolean settingsClicked) {
mConfirmSyncDataStateMachine = new ConfirmSyncDataStateMachine(
new ConfirmSyncDataStateMachineDelegate(getChildFragmentManager()),
- PrefServiceBridge.getInstance().getString(Pref.SYNC_LAST_ACCOUNT_NAME),
- PrefServiceBridge.getInstance().getString(Pref.GOOGLE_SERVICES_LAST_USERNAME),
+ "",
mSelectedAccountName, new ConfirmSyncDataStateMachine.Listener() {
@Override
@ -52,8 +26,18 @@ Subject: fix build error with prefs.h
SigninPreferencesManager preferencesManager = SigninPreferencesManager.getInstance();
int currentMajorVersion = ChromeVersionInfo.getProductMajorVersion();
- boolean wasSignedIn = TextUtils.isEmpty(
- PrefServiceBridge.getInstance().getString(Pref.SYNC_LAST_ACCOUNT_NAME));
- PrefServiceBridge.getInstance().getString(Pref.GOOGLE_SERVICES_LAST_USERNAME));
+ boolean wasSignedIn = true;
List<String> accountNames = AccountUtils.toAccountNames(
AccountManagerFacadeProvider.getInstance().tryGetGoogleAccounts());
Supplier<Set<String>> accountNamesSupplier = () -> new ArraySet<>(accountNames);
--- a/chrome/browser/preferences/BUILD.gn
+++ b/chrome/browser/preferences/BUILD.gn
@@ -35,7 +35,6 @@ java_cpp_strings("java_pref_names_srcjar
"//components/offline_pages/core/prefetch/prefetch_prefs.cc",
"//components/password_manager/core/common/password_manager_pref_names.cc",
"//components/payments/core/payment_prefs.cc",
- "//components/signin/public/base/signin_pref_names.cc",
"//components/translate/core/browser/translate_pref_names.cc",
]

103
patches/src-fix/fix-safe-browsing-prefs.patch

@ -6,36 +6,26 @@ Subject: Fix build error caused by the removal of safe_browsing_prefs.h
android_webview/browser/aw_browser_context.cc | 2
android_webview/browser/safe_browsing/aw_safe_browsing_blocking_page.cc | 10 ++--
chrome/android/BUILD.gn | 1
chrome/android/chrome_java_sources.gni | 1
chrome/android/java/src/org/chromium/chrome/browser/sync/settings/GoogleServicesSettings.java | 21 ----------
chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SyncAndServicesSettings.java | 19 +--------
chrome/browser/android/preferences/prefs.h | 2
chrome/browser/preferences/BUILD.gn | 1
chrome/browser/safe_browsing/BUILD.gn | 1
weblayer/browser/browser_context_impl.cc | 2
8 files changed, 12 insertions(+), 46 deletions(-)
8 files changed, 12 insertions(+), 45 deletions(-)
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -2914,7 +2914,6 @@ generate_jni("chrome_jni_headers") {
"java/src/org/chromium/chrome/browser/resources/ResourceMapper.java",
"java/src/org/chromium/chrome/browser/rlz/RevenueStats.java",
"java/src/org/chromium/chrome/browser/rlz/RlzPingHandler.java",
- "java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingBridge.java",
"java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingPasswordReuseDialogBridge.java",
"java/src/org/chromium/chrome/browser/screenshot/EditorScreenshotTask.java",
"java/src/org/chromium/chrome/browser/search_engines/TemplateUrlServiceFactory.java",
--- a/chrome/android/chrome_java_sources.gni
+++ b/chrome/android/chrome_java_sources.gni
@@ -1358,7 +1358,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/resources/ResourceMapper.java",
"java/src/org/chromium/chrome/browser/rlz/RevenueStats.java",
"java/src/org/chromium/chrome/browser/rlz/RlzPingHandler.java",
- "java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingBridge.java",
"java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingPasswordReuseDialogBridge.java",
"java/src/org/chromium/chrome/browser/screenshot/EditorScreenshotSource.java",
"java/src/org/chromium/chrome/browser/screenshot/EditorScreenshotTask.java",
@@ -316,7 +316,6 @@ android_library("chrome_java") {
"//chrome/browser/performance_hints/android:java",
"//chrome/browser/preferences:java",
"//chrome/browser/profiles/android:java",
- "//chrome/browser/safe_browsing/android:java",
"//chrome/browser/safety_check/android:java",
"//chrome/browser/settings:java",
"//chrome/browser/share/android:java_resources",
--- a/android_webview/browser/aw_browser_context.cc
+++ b/android_webview/browser/aw_browser_context.cc
@@ -235,7 +235,7 @@ base::FilePath AwBrowserContext::GetCont
@@ -233,7 +233,7 @@ base::FilePath AwBrowserContext::GetCont
// static
void AwBrowserContext::RegisterPrefs(PrefRegistrySimple* registry) {
@ -64,17 +54,6 @@ Subject: Fix build error caused by the removal of safe_browsing_prefs.h
false, // should_open_links_in_new_tab
false, // always_show_back_to_safety
"cpn_safe_browsing_wv"); // help_center_article_link
--- a/chrome/browser/android/preferences/prefs.h
+++ b/chrome/browser/android/preferences/prefs.h
@@ -38,8 +38,6 @@ enum Pref {
AUTOFILL_CREDIT_CARD_ENABLED,
USAGE_STATS_ENABLED,
OFFLINE_PREFETCH_USER_SETTING_ENABLED,
- SAFE_BROWSING_EXTENDED_REPORTING_OPT_IN_ALLOWED,
- SAFE_BROWSING_ENABLED,
PASSWORD_MANAGER_ONBOARDING_STATE,
SEARCH_SUGGEST_ENABLED,
REMEMBER_PASSWORDS_ENABLED,
--- a/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SyncAndServicesSettings.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SyncAndServicesSettings.java
@@ -48,7 +48,6 @@ import org.chromium.chrome.browser.prefe
@ -85,7 +64,7 @@ Subject: Fix build error caused by the removal of safe_browsing_prefs.h
import org.chromium.chrome.browser.settings.ChromeManagedPreferenceDelegate;
import org.chromium.chrome.browser.settings.SettingsActivity;
import org.chromium.chrome.browser.signin.IdentityServicesProvider;
@@ -358,17 +357,9 @@ public class SyncAndServicesSettings ext
@@ -360,16 +359,8 @@ public class SyncAndServicesSettings ext
PostTask.postTask(UiThreadTaskTraits.DEFAULT, this::updatePreferences);
} else if (PREF_SEARCH_SUGGESTIONS.equals(key)) {
mPrefServiceBridge.setBoolean(Pref.SEARCH_SUGGEST_ENABLED, (boolean) newValue);
@ -96,14 +75,13 @@ Subject: Fix build error caused by the removal of safe_browsing_prefs.h
- PostTask.postTask(UiThreadTaskTraits.DEFAULT,
- this::updateLeakDetectionAndSafeBrowsingReportingPreferences);
} else if (PREF_PASSWORD_LEAK_DETECTION.equals(key)) {
mPrefServiceBridge.setBoolean(
Pref.PASSWORD_MANAGER_LEAK_DETECTION_ENABLED, (boolean) newValue);
mPrefServiceBridge.setBoolean(Pref.PASSWORD_LEAK_DETECTION_ENABLED, (boolean) newValue);
- } else if (PREF_SAFE_BROWSING_SCOUT_REPORTING.equals(key)) {
- SafeBrowsingBridge.setSafeBrowsingExtendedReportingEnabled((boolean) newValue);
} else if (PREF_NAVIGATION_ERROR.equals(key)) {
mPrefServiceBridge.setBoolean(Pref.ALTERNATE_ERROR_PAGES_ENABLED, (boolean) newValue);
} else if (PREF_USAGE_AND_CRASH_REPORTING.equals(key)) {
@@ -544,7 +535,6 @@ public class SyncAndServicesSettings ext
@@ -551,7 +542,6 @@ public class SyncAndServicesSettings ext
mSearchSuggestions.setChecked(mPrefServiceBridge.getBoolean(Pref.SEARCH_SUGGEST_ENABLED));
mNavigationError.setChecked(
mPrefServiceBridge.getBoolean(Pref.ALTERNATE_ERROR_PAGES_ENABLED));
@ -111,7 +89,7 @@ Subject: Fix build error caused by the removal of safe_browsing_prefs.h
updateLeakDetectionAndSafeBrowsingReportingPreferences();
@@ -614,10 +604,9 @@ public class SyncAndServicesSettings ext
@@ -623,10 +613,9 @@ public class SyncAndServicesSettings ext
* its appearance needs to be updated. The same goes for safe browsing reporting.
*/
private void updateLeakDetectionAndSafeBrowsingReportingPreferences() {
@ -124,7 +102,7 @@ Subject: Fix build error caused by the removal of safe_browsing_prefs.h
boolean has_token_for_leak_check = PasswordUIView.hasAccountForLeakCheckRequest();
boolean leak_detection_enabled =
@@ -645,10 +634,10 @@ public class SyncAndServicesSettings ext
@@ -654,10 +643,10 @@ public class SyncAndServicesSettings ext
return mPrefServiceBridge.isManagedPreference(Pref.SEARCH_SUGGEST_ENABLED);
}
if (PREF_SAFE_BROWSING_SCOUT_REPORTING.equals(key)) {
@ -136,25 +114,25 @@ Subject: Fix build error caused by the removal of safe_browsing_prefs.h
+ return false;
}
if (PREF_PASSWORD_LEAK_DETECTION.equals(key)) {
return mPrefServiceBridge.isManagedPreference(
return mPrefServiceBridge.isManagedPreference(Pref.PASSWORD_LEAK_DETECTION_ENABLED);
--- a/weblayer/browser/browser_context_impl.cc
+++ b/weblayer/browser/browser_context_impl.cc
@@ -17,7 +17,6 @@
@@ -18,7 +18,6 @@
#include "components/prefs/json_pref_store.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/pref_service_factory.h"
-#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
#include "components/security_interstitials/content/stateful_ssl_host_state_delegate.h"
#include "components/security_state/core/security_state.h"
#include "components/translate/core/browser/translate_pref_names.h"
@@ -236,7 +235,6 @@ void BrowserContextImpl::RegisterPrefs(
#include "components/site_isolation/pref_names.h"
#include "components/site_isolation/site_isolation_policy.h"
@@ -252,7 +251,6 @@ void BrowserContextImpl::RegisterPrefs(
StatefulSSLHostStateDelegate::RegisterProfilePrefs(pref_registry);
HostContentSettingsMap::RegisterProfilePrefs(pref_registry);
- safe_browsing::RegisterProfilePrefs(pref_registry);
security_state::RegisterProfilePrefs(pref_registry);
language::LanguagePrefs::RegisterProfilePrefs(pref_registry);
translate::TranslatePrefs::RegisterProfilePrefs(pref_registry);
blocked_content::SafeBrowsingTriggeredPopupBlocker::RegisterProfilePrefs(
--- a/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/GoogleServicesSettings.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/GoogleServicesSettings.java
@@ -28,7 +28,6 @@ import org.chromium.chrome.browser.prefe
@ -165,7 +143,7 @@ Subject: Fix build error caused by the removal of safe_browsing_prefs.h
import org.chromium.chrome.browser.settings.ChromeManagedPreferenceDelegate;
import org.chromium.chrome.browser.signin.UnifiedConsentServiceBridge;
import org.chromium.components.browser_ui.settings.ChromeSwitchPreference;
@@ -158,17 +157,9 @@ public class GoogleServicesSettings
@@ -158,16 +157,8 @@ public class GoogleServicesSettings
String key = preference.getKey();
if (PREF_SEARCH_SUGGESTIONS.equals(key)) {
mPrefServiceBridge.setBoolean(Pref.SEARCH_SUGGEST_ENABLED, (boolean) newValue);
@ -176,14 +154,13 @@ Subject: Fix build error caused by the removal of safe_browsing_prefs.h
- PostTask.postTask(UiThreadTaskTraits.DEFAULT,
- this::updateLeakDetectionAndSafeBrowsingReportingPreferences);
} else if (PREF_PASSWORD_LEAK_DETECTION.equals(key)) {
mPrefServiceBridge.setBoolean(
Pref.PASSWORD_MANAGER_LEAK_DETECTION_ENABLED, (boolean) newValue);
mPrefServiceBridge.setBoolean(Pref.PASSWORD_LEAK_DETECTION_ENABLED, (boolean) newValue);
- } else if (PREF_SAFE_BROWSING_SCOUT_REPORTING.equals(key)) {
- SafeBrowsingBridge.setSafeBrowsingExtendedReportingEnabled((boolean) newValue);
} else if (PREF_NAVIGATION_ERROR.equals(key)) {
mPrefServiceBridge.setBoolean(Pref.ALTERNATE_ERROR_PAGES_ENABLED, (boolean) newValue);
} else if (PREF_USAGE_AND_CRASH_REPORTING.equals(key)) {
@@ -191,7 +182,6 @@ public class GoogleServicesSettings
@@ -190,7 +181,6 @@ public class GoogleServicesSettings
mSearchSuggestions.setChecked(mPrefServiceBridge.getBoolean(Pref.SEARCH_SUGGEST_ENABLED));
mNavigationError.setChecked(
mPrefServiceBridge.getBoolean(Pref.ALTERNATE_ERROR_PAGES_ENABLED));
@ -191,7 +168,7 @@ Subject: Fix build error caused by the removal of safe_browsing_prefs.h
updateLeakDetectionAndSafeBrowsingReportingPreferences();
@@ -217,10 +207,9 @@ public class GoogleServicesSettings
@@ -216,10 +206,9 @@ public class GoogleServicesSettings
* its appearance needs to be updated. The same goes for safe browsing reporting.
*/
private void updateLeakDetectionAndSafeBrowsingReportingPreferences() {
@ -204,7 +181,7 @@ Subject: Fix build error caused by the removal of safe_browsing_prefs.h
boolean has_token_for_leak_check = PasswordUIView.hasAccountForLeakCheckRequest();
boolean leak_detection_enabled =
@@ -247,12 +236,6 @@ public class GoogleServicesSettings
@@ -246,12 +235,6 @@ public class GoogleServicesSettings
if (PREF_SEARCH_SUGGESTIONS.equals(key)) {
return mPrefServiceBridge.isManagedPreference(Pref.SEARCH_SUGGEST_ENABLED);
}
@ -215,5 +192,25 @@ Subject: Fix build error caused by the removal of safe_browsing_prefs.h
- return mPrefServiceBridge.isManagedPreference(Pref.SAFE_BROWSING_ENABLED);
- }
if (PREF_PASSWORD_LEAK_DETECTION.equals(key)) {
return mPrefServiceBridge.isManagedPreference(
Pref.PASSWORD_MANAGER_LEAK_DETECTION_ENABLED);
return mPrefServiceBridge.isManagedPreference(Pref.PASSWORD_LEAK_DETECTION_ENABLED);
}
--- a/chrome/browser/safe_browsing/BUILD.gn
+++ b/chrome/browser/safe_browsing/BUILD.gn
@@ -274,7 +274,6 @@ static_library("safe_browsing") {
"telemetry/android/android_telemetry_service.h",
]
deps += [
- "//chrome/browser/safe_browsing/android",
"//components/safe_browsing:buildflags",
"//components/safe_browsing/android:safe_browsing_mobile",
]
--- a/chrome/browser/preferences/BUILD.gn
+++ b/chrome/browser/preferences/BUILD.gn
@@ -35,7 +35,6 @@ java_cpp_strings("java_pref_names_srcjar
"//components/offline_pages/core/prefetch/prefetch_prefs.cc",
"//components/password_manager/core/common/password_manager_pref_names.cc",
"//components/payments/core/payment_prefs.cc",
- "//components/safe_browsing/core/common/safe_browsing_prefs.cc",
"//components/signin/public/base/signin_pref_names.cc",
"//components/translate/core/browser/translate_pref_names.cc",
]

2
patches/src-fix/fix-unkown-warning-clang.patch

@ -7,7 +7,7 @@ author: Wengling Chen <[email protected]>
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1480,6 +1480,9 @@ config("default_warnings") {
@@ -1497,6 +1497,9 @@ config("default_warnings") {
# Flags NaCl (Clang 3.7) and Xcode 9.2 (Clang clang-900.0.39.2) do not
# recognize.
cflags += [

2
patches/ungoogled-chromium-android/Add-folder-button-bookmark.patch

@ -178,7 +178,7 @@ Subject: Add new folder button to bookmark activity
if (!mIsCreatingFolder) {
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -2510,6 +2510,9 @@ To change this setting, <ph name="BEGIN_
@@ -2648,6 +2648,9 @@ To change this setting, <ph name="BEGIN_
<message name="IDS_BOOKMARK_ACTION_BAR_EDIT_FOLDER" desc="Button text for editing current folder action on the bookmark action bar [CHAR-LIMIT=32]">
Edit folder
</message>

2
patches/ungoogled-chromium-android/Disable-contextual-search.patch

@ -8,7 +8,7 @@ Subject: Disable contextual search by default
--- a/chrome/browser/profiles/profile.cc
+++ b/chrome/browser/profiles/profile.cc
@@ -251,7 +251,7 @@ void Profile::RegisterProfilePrefs(user_
@@ -266,7 +266,7 @@ void Profile::RegisterProfilePrefs(user_
#if defined(OS_ANDROID)
registry->RegisterStringPref(
prefs::kContextualSearchEnabled,

6
patches/ungoogled-chromium-android/Enable-ProactivelySwapBrowsingInstance.patch

@ -9,7 +9,7 @@ Subject: Enable experimental ProactivelySwapBrowsingInstance feature
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -459,7 +459,7 @@ const base::Feature kPrioritizeBootstrap
@@ -451,7 +451,7 @@ const base::Feature kPrioritizeBootstrap
// HTTP(S) navigations when the BrowsingInstance doesn't contain any other
// windows.
const base::Feature kProactivelySwapBrowsingInstance{
@ -20,7 +20,7 @@ Subject: Enable experimental ProactivelySwapBrowsingInstance feature
// cross-origin requests.
--- a/content/common/content_navigation_policy.cc
+++ b/content/common/content_navigation_policy.cc
@@ -52,7 +52,7 @@ const base::FeatureParam<ProactivelySwap
@@ -53,7 +53,7 @@ const base::FeatureParam<ProactivelySwap
proactively_swap_browsing_instance_level{
&features::kProactivelySwapBrowsingInstance,
kProactivelySwapBrowsingInstanceLevelParameterName,
@ -28,4 +28,4 @@ Subject: Enable experimental ProactivelySwapBrowsingInstance feature
+ ProactivelySwapBrowsingInstanceLevel::kCrossSiteReuseProcess,
&proactively_swap_browsing_instance_levels};
ProactivelySwapBrowsingInstanceLevel GetProactivelySwapBrowsingInstanceLevel() {
std::string GetProactivelySwapBrowsingInstanceLevelName(

2
patches/ungoogled-chromium-android/Mark-http-as-dangerous-mixed-content-warning.patch

@ -20,7 +20,7 @@ Subject: Enable legacy TLS warnings and mark-http-as-dangerous by default
base::FEATURE_DISABLED_BY_DEFAULT};
--- a/components/security_state/core/security_state.cc
+++ b/components/security_state/core/security_state.cc
@@ -43,7 +43,7 @@ SecurityLevel GetSecurityLevelForNonSecu
@@ -41,7 +41,7 @@ SecurityLevel GetSecurityLevelForNonSecu
// Default to dangerous on editing form fields and otherwise
// warning.

13
patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gcm.patch

@ -3,20 +3,25 @@ Date: Sat, 2 Nov 2019 09:29:52 +0100
Subject: Remove dependency on com.google.android.gcm
---
third_party/android_sdk/BUILD.gn | 4 -
third_party/android_sdk/BUILD.gn | 5 -
third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android2/AndroidManifest.xml | 35 ----------
third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidMessageReceiverService.java | 17 ----
third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidMessageSenderService.java | 3
4 files changed, 1 insertion(+), 58 deletions(-)
4 files changed, 2 insertions(+), 58 deletions(-)
--- a/third_party/android_sdk/BUILD.gn
+++ b/third_party/android_sdk/BUILD.gn
@@ -64,8 +64,4 @@ if (enable_java_templates) {
@@ -1,4 +1,4 @@
-# Copyright 2019 The Chromium Authors. All rights reserved.
+ # Copyright 2019 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.
@@ -63,7 +63,4 @@ if (enable_java_templates) {
testonly = true
sources = [ "//third_party/android_sdk/public/extras/chromium/support/src/org/chromium/android/support/PackageManagerWrapper.java" ]
}
- android_java_prebuilt("android_gcm_java") {
- skip_jetify = true
- jar_path = "//third_party/android_sdk/public/extras/google/gcm/gcm-client/dist/gcm.jar"
- }
}

29
patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.auth.patch

@ -13,12 +13,11 @@ Subject: Remove dependency on com.google.android.gms.auth
content/public/android/java/src/org/chromium/content/browser/sms/Wrappers.java | 14 --
content/test/BUILD.gn | 1
third_party/android_deps/BUILD.gn | 47 ----------
third_party/robolectric/BUILD.gn | 1
11 files changed, 6 insertions(+), 174 deletions(-)
10 files changed, 6 insertions(+), 173 deletions(-)
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -275,7 +275,6 @@ android_library("chrome_java") {
@@ -272,7 +272,6 @@ android_library("chrome_java") {
":partner_location_descriptor_proto_java",
":update_proto_java",
":usage_stats_proto_java",
@ -57,7 +56,7 @@ Subject: Remove dependency on com.google.android.gms.auth
}
@Override
@@ -127,15 +117,6 @@ public class SystemAccountManagerDelegat
@@ -128,15 +118,6 @@ public class SystemAccountManagerDelegat
@Override
public void invalidateAuthToken(String authToken) throws AuthException {
@ -73,7 +72,7 @@ Subject: Remove dependency on com.google.android.gms.auth
}
@Override
@@ -214,22 +195,13 @@ public class SystemAccountManagerDelegat
@@ -215,22 +196,13 @@ public class SystemAccountManagerDelegat
@Nullable
@Override
public String getAccountGaiaId(String accountEmail) {
@ -100,7 +99,7 @@ Subject: Remove dependency on com.google.android.gms.auth
protected boolean hasGetAccountsPermission() {
--- a/content/public/android/BUILD.gn
+++ b/content/public/android/BUILD.gn
@@ -75,7 +75,6 @@ action("generate_sandboxed_service_srcja
@@ -72,7 +72,6 @@ action_with_pydeps("generate_sandboxed_s
android_library("content_java") {
deps = [
":content_java_resources",
@ -110,7 +109,7 @@ Subject: Remove dependency on com.google.android.gms.auth
"$google_play_services_package:google_play_services_tasks_java",
--- a/third_party/android_deps/BUILD.gn
+++ b/third_party/android_deps/BUILD.gn
@@ -972,53 +972,6 @@ java_prebuilt("com_android_tools_build_j
@@ -997,53 +997,6 @@ java_prebuilt("com_android_tools_build_j
}
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
@ -164,16 +163,6 @@ Subject: Remove dependency on com.google.android.gms.auth
android_aar_prebuilt("google_play_services_base_java") {
aar_path = "libs/com_google_android_gms_play_services_base/play-services-base-17.0.0.aar"
info_path = "libs/com_google_android_gms_play_services_base/com_google_android_gms_play_services_base.info"
--- a/third_party/robolectric/BUILD.gn
+++ b/third_party/robolectric/BUILD.gn
@@ -1162,7 +1162,6 @@ java_library("shadows_play_services_java
":robolectric_shadowapi_java",
":robolectric_utils_java",
":shadows_core_java",
- "$google_play_services_package:google_play_services_auth_base_java",
"$google_play_services_package:google_play_services_base_java",
"$google_play_services_package:google_play_services_basement_java",
"//third_party/android_deps:android_support_v4_java",
--- a/content/public/android/java/src/org/chromium/content/browser/sms/Wrappers.java
+++ b/content/public/android/java/src/org/chromium/content/browser/sms/Wrappers.java
@@ -10,8 +10,6 @@ import android.content.ContextWrapper;
@ -215,10 +204,10 @@ Subject: Remove dependency on com.google.android.gms.auth
/**
--- a/components/background_task_scheduler/BUILD.gn
+++ b/components/background_task_scheduler/BUILD.gn
@@ -119,7 +119,6 @@ if (is_android) {
]
@@ -120,7 +120,6 @@ if (is_android) {
deps = [
":background_task_scheduler_task_ids_java",
- "$google_play_services_package:google_play_services_auth_base_java",
"$google_play_services_package:google_play_services_base_java",
"$google_play_services_package:google_play_services_basement_java",
@ -383,7 +372,7 @@ Subject: Remove dependency on com.google.android.gms.auth
@VisibleForTesting
--- a/content/test/BUILD.gn
+++ b/content/test/BUILD.gn
@@ -2424,7 +2424,6 @@ if (is_android) {
@@ -2511,7 +2511,6 @@ if (is_android) {
testonly = true
sources = content_java_sources_needing_jni
deps = [

32
patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.cast.patch

@ -4,7 +4,7 @@ Subject: Remove dependency on com.google.android.gms.cast
---
chrome/android/BUILD.gn | 6
chrome/android/features/media_router/BUILD.gn | 2
chrome/android/features/media_router/BUILD.gn | 5
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/CastSessionUtil.java | 35 ---
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/MediaSink.java | 44 ----
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/MediaStatusBridge.java | 40 +--
@ -24,11 +24,11 @@ Subject: Remove dependency on com.google.android.gms.cast
chrome/android/java/AndroidManifest.xml | 28 --
chrome/test/android/cast_emulator/BUILD.gn | 1
third_party/android_deps/BUILD.gn | 39 ---
21 files changed, 27 insertions(+), 749 deletions(-)
21 files changed, 27 insertions(+), 752 deletions(-)
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -277,8 +277,6 @@ android_library("chrome_java") {
@@ -274,8 +274,6 @@ android_library("chrome_java") {
":usage_stats_proto_java",
"$google_play_services_package:google_play_services_base_java",
"$google_play_services_package:google_play_services_basement_java",
@ -37,7 +37,7 @@ Subject: Remove dependency on com.google.android.gms.cast
"$google_play_services_package:google_play_services_fido_java",
"$google_play_services_package:google_play_services_iid_java",
"$google_play_services_package:google_play_services_tasks_java",
@@ -714,8 +712,6 @@ junit_binary("chrome_junit_tests") {
@@ -726,8 +724,6 @@ junit_binary("chrome_junit_tests") {
":partner_location_descriptor_proto_java",
"$google_play_services_package:google_play_services_base_java",
"$google_play_services_package:google_play_services_basement_java",
@ -46,7 +46,7 @@ Subject: Remove dependency on com.google.android.gms.cast
"$google_play_services_package:google_play_services_fido_java",
"//base:base_java",
"//base:base_java_test_support",
@@ -831,8 +827,6 @@ android_library("chrome_test_java") {
@@ -907,8 +903,6 @@ android_library("chrome_test_java") {
":partner_location_descriptor_proto_java",
"$google_play_services_package:google_play_services_base_java",
"$google_play_services_package:google_play_services_basement_java",
@ -66,6 +66,16 @@ Subject: Remove dependency on com.google.android.gms.cast
"//base:base_java",
"//base:jni_java",
"//chrome/android:chrome_java",
@@ -123,9 +121,6 @@ junit_binary("media_router_junit_tests")
deps = [
":java",
- "$google_play_services_package:google_play_services_basement_java",
- "$google_play_services_package:google_play_services_cast_framework_java",
- "$google_play_services_package:google_play_services_cast_java",
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
--- a/chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/CastSessionUtil.java
+++ b/chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/CastSessionUtil.java
@@ -4,9 +4,6 @@
@ -75,7 +85,7 @@ Subject: Remove dependency on com.google.android.gms.cast
-import com.google.android.gms.cast.CastDevice;
-import com.google.android.gms.cast.RemoteMediaPlayer;
-
import org.chromium.chrome.browser.media.ui.MediaNotificationInfo;
import org.chromium.components.browser_ui.media.MediaNotificationInfo;
import org.chromium.services.media_session.MediaMetadata;
@@ -18,36 +15,4 @@ public class CastSessionUtil {
@ -357,9 +367,9 @@ Subject: Remove dependency on com.google.android.gms.cast
-import com.google.android.gms.cast.MediaStatus;
-import com.google.android.gms.cast.framework.media.RemoteMediaClient;
-
import org.chromium.chrome.browser.media.ui.MediaNotificationInfo;
import org.chromium.chrome.browser.media.ui.MediaNotificationListener;
import org.chromium.chrome.browser.media.ui.MediaNotificationManager;
import org.chromium.chrome.media.router.R;
import org.chromium.components.browser_ui.media.MediaNotificationInfo;
@@ -59,20 +55,6 @@ public abstract class BaseNotificationCo
public void onStatusUpdated() {
if (mNotificationBuilder == null) return;
@ -1377,7 +1387,7 @@ Subject: Remove dependency on com.google.android.gms.cast
<!-- Note: All activities directly or indirectly derived from ChromeActivity
must specify android:hardwareAccelerated="false".
@@ -707,16 +701,6 @@ by a child template that "extends" this
@@ -681,16 +675,6 @@ by a child template that "extends" this
</intent-filter>
</activity>
@ -1394,7 +1404,7 @@ Subject: Remove dependency on com.google.android.gms.cast
<!-- This activity is used to restart the main Chrome process. Should never be exported. -->
<activity android:name="org.chromium.chrome.browser.BrowserRestartActivity"
android:launchMode="singleInstance"
@@ -1163,18 +1147,6 @@ by a child template that "extends" this
@@ -1121,18 +1105,6 @@ by a child template that "extends" this
{% endif %}
{% block extra_application_definitions %}
@ -1425,7 +1435,7 @@ Subject: Remove dependency on com.google.android.gms.cast
"//third_party/android_deps:androidx_mediarouter_mediarouter_java",
--- a/third_party/android_deps/BUILD.gn
+++ b/third_party/android_deps/BUILD.gn
@@ -1003,45 +1003,6 @@ android_aar_prebuilt("google_play_servic
@@ -1028,45 +1028,6 @@ android_aar_prebuilt("google_play_servic
}
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.

48
patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.common-auth-signin-dynamic-com.google.android.gms.tasks.patch

@ -32,12 +32,11 @@ Subject: Remove dependency on
services/device/geolocation/BUILD.gn | 2
services/shape_detection/BUILD.gn | 2
third_party/cacheinvalidation/BUILD.gn | 1
third_party/robolectric/BUILD.gn | 2
28 files changed, 17 insertions(+), 226 deletions(-)
27 files changed, 17 insertions(+), 224 deletions(-)
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -275,9 +275,6 @@ android_library("chrome_java") {
@@ -272,9 +272,6 @@ android_library("chrome_java") {
":partner_location_descriptor_proto_java",
":update_proto_java",
":usage_stats_proto_java",
@ -47,7 +46,7 @@ Subject: Remove dependency on
"//base:base_java",
"//base:jni_java",
"//chrome/android/features/keyboard_accessory:public_java",
@@ -706,8 +703,6 @@ junit_binary("chrome_junit_tests") {
@@ -718,8 +715,6 @@ junit_binary("chrome_junit_tests") {
":chrome_app_java_resources",
":chrome_java",
":partner_location_descriptor_proto_java",
@ -56,7 +55,7 @@ Subject: Remove dependency on
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
@@ -820,9 +815,6 @@ android_library("chrome_test_java") {
@@ -896,9 +891,6 @@ android_library("chrome_test_java") {
":chrome_test_util_java",
":native_java_unittests_java",
":partner_location_descriptor_proto_java",
@ -102,7 +101,7 @@ Subject: Remove dependency on
MediaRouteProvider cafProvider = CafMediaRouteProvider.create(manager);
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -781,15 +781,6 @@ by a child template that "extends" this
@@ -755,15 +755,6 @@ by a child template that "extends" this
</intent-filter>
</activity>
@ -130,7 +129,7 @@ Subject: Remove dependency on
import org.chromium.base.Callback;
import org.chromium.base.ContextUtils;
import org.chromium.base.annotations.CalledByNative;
@@ -333,16 +330,7 @@ public abstract class AppHooks {
@@ -304,16 +301,7 @@ public abstract class AppHooks {
* same as {@link GoogleApiAvailability#isGooglePlayServicesAvailable()}.
*/
public int isGoogleApiAvailableWithMinApkVersion(int minApkVersion) {
@ -218,7 +217,7 @@ Subject: Remove dependency on
import org.chromium.base.CommandLine;
import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
@@ -158,9 +155,7 @@ public class ExternalAuthUtils {
@@ -168,9 +165,7 @@ public class ExternalAuthUtils {
* when it is updating.
*/
public boolean isGooglePlayServicesMissing(final Context context) {
@ -229,7 +228,7 @@ Subject: Remove dependency on
}
/**
@@ -182,7 +177,6 @@ public class ExternalAuthUtils {
@@ -192,7 +187,6 @@ public class ExternalAuthUtils {
Context context = ContextUtils.getApplicationContext();
final int resultCode = checkGooglePlayServicesAvailable(context);
@ -237,7 +236,7 @@ Subject: Remove dependency on
// resultCode is some kind of error.
Log.v(TAG, "Unable to use Google Play Services: %s", describeError(resultCode));
if (isUserRecoverableError(resultCode)) {
@@ -252,7 +246,7 @@ public class ExternalAuthUtils {
@@ -262,7 +256,7 @@ public class ExternalAuthUtils {
protected int checkGooglePlayServicesAvailable(final Context context) {
// TODO(crbug.com/577190): Temporarily allowing disk access until more permanent fix is in.
try (StrictModeContext ignored = StrictModeContext.allowDiskWrites()) {
@ -246,7 +245,7 @@ Subject: Remove dependency on
}
}
@@ -264,7 +258,7 @@ public class ExternalAuthUtils {
@@ -274,7 +268,7 @@ public class ExternalAuthUtils {
* @return true If the code represents a user-recoverable error
*/
protected boolean isUserRecoverableError(final int errorCode) {
@ -255,7 +254,7 @@ Subject: Remove dependency on
}
/**
@@ -274,6 +268,6 @@ public class ExternalAuthUtils {
@@ -284,6 +278,6 @@ public class ExternalAuthUtils {
* @return a textual description of the error code
*/
protected String describeError(final int errorCode) {
@ -529,7 +528,7 @@ Subject: Remove dependency on
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
--- a/chrome/test/android/BUILD.gn
+++ b/chrome/test/android/BUILD.gn
@@ -197,8 +197,6 @@ android_library("chrome_java_test_suppor
@@ -239,8 +239,6 @@ android_library("chrome_java_test_suppor
"javatests/src/org/chromium/chrome/test/util/browser/webapps/WebappTestPage.java",
]
deps = [
@ -540,10 +539,10 @@ Subject: Remove dependency on
"//chrome/android:chrome_java",
--- a/components/background_task_scheduler/BUILD.gn
+++ b/components/background_task_scheduler/BUILD.gn
@@ -119,9 +119,6 @@ if (is_android) {
]
@@ -120,9 +120,6 @@ if (is_android) {
deps = [
":background_task_scheduler_task_ids_java",
- "$google_play_services_package:google_play_services_base_java",
- "$google_play_services_package:google_play_services_basement_java",
- "$google_play_services_package:google_play_services_tasks_java",
@ -582,7 +581,7 @@ Subject: Remove dependency on
}
--- a/content/public/android/BUILD.gn
+++ b/content/public/android/BUILD.gn
@@ -75,9 +75,6 @@ action("generate_sandboxed_service_srcja
@@ -72,9 +72,6 @@ action_with_pydeps("generate_sandboxed_s
android_library("content_java") {
deps = [
":content_java_resources",
@ -594,7 +593,7 @@ Subject: Remove dependency on
"//components/download/public/common:public_java",
--- a/content/test/BUILD.gn
+++ b/content/test/BUILD.gn