Browse Source

Update to 81.0.4044.113-1

tags/81.0.4044.113-1^0 81.0.4044.113-1
wchen342 11 months ago
parent
commit
c0b185845b
Signed by untrusted user: wchen342 GPG Key ID: 720B70365E800508
43 changed files with 16802 additions and 1038 deletions
  1. +0
    -1
      .gclient
  2. +4
    -0
      CHANGELOG.md
  3. +2
    -0
      android_flags.gn
  4. +3
    -5
      build.sh
  5. +188
    -364
      domain_sub_2.list
  6. +2
    -1
      misc/android_studio_setup.sh
  7. +4
    -4
      patches/Bromite/Add-exit-menu-item.patch
  8. +7
    -7
      patches/Bromite/Add-flag-to-disable-WebGL.patch
  9. +11
    -11
      patches/Bromite/Add-flags-to-disable-device-motion-and-orientation-APIs.patch
  10. +20
    -25
      patches/Bromite/Add-option-to-not-persist-tabs-across-sessions.patch
  11. +0
    -194
      patches/Bromite/Add-option-to-use-home-page-as-NTP.patch
  12. +54
    -56
      patches/Bromite/Add-user-setting-for-DNS-over-HTTPS-DoH-custom-URL.patch
  13. +4
    -4
      patches/Bromite/Disable-AImageReader-for-ARM64-P-and-ARM64-Q.patch
  14. +2
    -6
      patches/Bromite/Download-on-Android-Q-Remove-a-DCHECK-in-CreateReservation.patch
  15. +7
    -7
      patches/Bromite/Revert-flags-remove-disable-pull-to-refresh-effect.patch
  16. +4
    -4
      patches/Bromite/Use-a-minimum-DoH-timeout-of-400ms.patch
  17. +15005
    -0
      patches/Kiwi/0001-Kiwi-Introduce-extensions-support-R80.patch
  18. +5
    -5
      patches/Unobtainium/kill-Auth.patch
  19. +43
    -34
      patches/Unobtainium/kill-GCM.patch
  20. +6
    -12
      patches/Unobtainium/kill-TOS-and-metrics-opt-out.patch
  21. +11
    -17
      patches/Unobtainium/kill-Vision.patch
  22. +2
    -5
      patches/Vanadium/0020-disable-media-router-media-remoting-by-default.patch
  23. +3
    -3
      patches/Vanadium/0021-disable-media-router-by-default.patch
  24. +4
    -4
      patches/ignore-aidl-assertion-error.patch
  25. +12
    -2
      patches/remove-jdk.patch
  26. +4
    -2
      patches/series
  27. +20
    -0
      patches/src-fix/fix-manifest-merger-path.patch
  28. +10
    -10
      patches/src-fix/fix-prefs.patch
  29. +97
    -96
      patches/src-fix/fix-safe-browsing-prefs.patch
  30. +3
    -3
      patches/src-fix/fix-unkown-warning-clang-9.patch
  31. +908
    -0
      patches/ungoogled-chromium-android/Add-Starpage-search-engine.patch
  32. +153
    -0
      patches/ungoogled-chromium-android/Add-folder-button-bookmark.patch
  33. +4
    -4
      patches/ungoogled-chromium-android/Disable-prefetch.patch
  34. +8
    -15
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gcm.patch
  35. +6
    -6
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.auth.patch
  36. +26
    -21
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.cast.patch
  37. +26
    -40
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.common-auth-signin-dynamic-com.google.android.gms.tasks.patch
  38. +12
    -12
      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
  39. +8
    -12
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.flags-com.google.android.gms.location.places-com.google.android.gms.stats.patch
  40. +17
    -26
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.gcm.patch
  41. +74
    -15
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.vision-com.google.android.gms.clearcut-com.google.android.gms.phenotype.patch
  42. +16
    -4
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.patch
  43. +7
    -1
      pruning_2.list

+ 0
- 1
.gclient View File

@ -50,7 +50,6 @@ solutions = [
"src/chrome/test/data/xr/webvr_info": None,
"src/chrome/test/data/xr/webxr_samples": None,
"src/third_party/spirv-cross/spirv-cross": None,
"src/third_party/spirv-headers/src": None,
"src/third_party/shaderc/src": None,
"src/third_party/dav1d/libdav1d": None,
"src/third_party/glfw/src": None,


+ 4
- 0
CHANGELOG.md View File

@ -1,3 +1,7 @@
# 81.0.4044.113-1
* Solve #9, #16.
* Initial try to add extensions (not working yet)
# 80.0.3987.122-1
* This is an important security release that fix three vulnerabilities. All previous versions should update as soon as possible.
* [1044570] High: Integer overflow in ICU. Reported by André Bargull (with thanks to Jeff Walden from Mozilla) on 2020-01-22


+ 2
- 0
android_flags.gn View File

@ -12,6 +12,8 @@ enable_resource_whitelist_generation=false
ffmpeg_branding="Chrome"
is_clang=true
is_component_build=false
manifest_merger_sdk_root = "//third_party/android_sdk/public"
manifest_merger_sdk_version = "-26.2.0-dev"
rtc_build_examples=false
target_os="android"
use_sysroot=false

+ 3
- 5
build.sh View File

@ -8,7 +8,7 @@ chrome_target=chrome_public_apk
mono_target=monochrome_public_apk
webview_target=system_webview_apk
chromium_version=80.0.3987.122
chromium_version=81.0.4044.113
ungoogled_chromium_revision=1
# Argument parser from https://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash/29754866#29754866
@ -138,6 +138,7 @@ rm -rf src/third_party/jdk
mkdir -p src/third_party/jdk/current/bin
ln -s /usr/bin/java src/third_party/jdk/current/bin/
ln -s /usr/bin/javac src/third_party/jdk/current/bin/
ln -s /usr/bin/javap src/third_party/jdk/current/bin/
# jre
mkdir -p src/third_party/jdk/extras/java_8
ln -s /usr/lib/jvm/java-8-openjdk/jre src/third_party/jdk/extras/java_8
@ -161,7 +162,7 @@ python3 ungoogled-chromium/utils/domain_substitution.py apply -r ungoogled-chrom
# Workaround for a building failure caused by safe browsing. The file is pre-generated with safe_browsing_mode=2. See https://github.com/nikolowry/bromite-builder/issues/1
cp safe_browsing_proto_files/download_file_types.pb.h src/chrome/common/safe_browsing/download_file_types.pb.h
cp safe_browsing_proto_files/webprotect.pb.h src/components/safe_browsing/proto/webprotect.pb.h
cp safe_browsing_proto_files/webprotect.pb.h src/components/safe_browsing/core/proto/webprotect.pb.h
## Prepare Android SDK/NDK
@ -264,9 +265,6 @@ export NM=${NM:=llvm-nm}
export CC=${CC:=clang}
export CXX=${CXX:=clang++}
# Patch build/android/gyp/javac.py
patch -p1 --ignore-whitespace -i patches/ignore-aidl-assertion-error.patch --no-backup-if-mismatch
## Build
pushd src
ninja -C out/Default $TARGET


+ 188
- 364
domain_sub_2.list
File diff suppressed because it is too large
View File


+ 2
- 1
misc/android_studio_setup.sh View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -eux -o pipefail
chromium_version=80.0.3987.122
chromium_version=81.0.4044.113
chrome_target=chrome_public_apk
monochrome_target=monochrome_public_apk
webview_target=system_webview_apk
@ -51,5 +51,6 @@ gn gen ${output_folder} --fail-on-unused-args
pushd ..
patch -p1 --ignore-whitespace -i patches/generate_gradle.patch --no-backup-if-mismatch
popd
# patch -p1 --ignore-whitespace -i ../patches/src-fix/fix-unkown-warning-clang-9.patch --no-backup-if-mismatch
python build/android/gradle/generate_gradle.py --target //chrome/android:${monochrome_target} --output-directory ${output_folder}
popd

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

@ -12,7 +12,7 @@ Corrected Exit functionality
--- a/chrome/android/java/res/menu/main_menu.xml
+++ b/chrome/android/java/res/menu/main_menu.xml
@@ -85,6 +85,8 @@
@@ -87,6 +87,8 @@
android:title="@string/menu_help" />
<item android:id="@+id/enter_vr_id"
android:title="@string/enter_vr" />
@ -23,7 +23,7 @@ Corrected Exit functionality
<!-- Items shown only in the tab switcher -->
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
@@ -2211,6 +2211,8 @@ public abstract class ChromeActivity<C e
@@ -2078,6 +2078,8 @@ public abstract class ChromeActivity<C e
AddToHomescreenCoordinator.showForAppMenu(
this, getWindowAndroid(), getModalDialogManager(), currentTab.getWebContents());
RecordUserAction.record("MobileMenuAddToHomescreen");
@ -49,8 +49,8 @@ Corrected Exit functionality
@Override
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -2939,6 +2939,9 @@ To change this setting, <ph name="BEGIN_
<message name="IDS_MENU_PREFERENCES" desc="Menu item for opening browser preferences. [CHAR-LIMIT=27]">
@@ -2854,6 +2854,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>
+ <message name="IDS_MENU_EXIT" desc="Menu item for exit browser. [CHAR-LIMIT=27]">


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

@ -10,7 +10,7 @@ Subject: Add flag to disable WebGL
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1537,6 +1537,9 @@ const FeatureEntry kFeatureEntries[] = {
@@ -1605,6 +1605,9 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kAccelerated2dCanvasName,
flag_descriptions::kAccelerated2dCanvasDescription, kOsAll,
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)},
@ -22,9 +22,9 @@ Subject: Add flag to disable WebGL
SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)},
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -446,6 +446,10 @@ const char kDisableAudioForDesktopShareD
"With this flag on, desktop share picker window will not let the user "
"choose whether to share audio.";
@@ -414,6 +414,10 @@ const char kDevtoolsExperimentsDescripti
"Enables Developer Tools experiments. Use Settings panel in Developer "
"Tools to toggle individual experiments.";
+const char kDisableWebGLName[] = "Disable all versions of WebGL";
+
@ -35,9 +35,9 @@ 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
@@ -287,6 +287,9 @@ extern const char kDevtoolsExperimentsDe
extern const char kDisableAudioForDesktopShareName[];
extern const char kDisableAudioForDesktopShareDescription[];
@@ -264,6 +264,9 @@ extern const char kDeviceDiscoveryNotifi
extern const char kDevtoolsExperimentsName[];
extern const char kDevtoolsExperimentsDescription[];
+extern const char kDisableWebGLName[];
+extern const char kDisableWebGLDescription[];


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

@ -19,7 +19,7 @@ legacy acceleration events.
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1767,6 +1767,12 @@ const FeatureEntry kFeatureEntries[] = {
@@ -1824,6 +1824,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
@@ -671,6 +671,14 @@ const char kWinrtSensorsImplementationDe
@@ -598,6 +598,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
@@ -412,6 +412,12 @@ extern const char kWinrtGeolocationImple
@@ -365,6 +365,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
@@ -690,6 +690,16 @@ const base::Feature kExperimentalProduct
@@ -756,6 +756,16 @@ const base::Feature kExperimentalProduct
// TODO(rouslan): Remove this.
const base::Feature kWebPayments{"WebPayments",
base::FEATURE_ENABLED_BY_DEFAULT};
@ -97,9 +97,9 @@ legacy acceleration events.
// specified in JS).
--- a/content/public/common/content_features.h
+++ b/content/public/common/content_features.h
@@ -157,6 +157,8 @@ CONTENT_EXPORT extern const base::Featur
CONTENT_EXPORT extern const base::Feature kFeaturePolicyForClientHints;
CONTENT_EXPORT extern const base::Feature kVideoPlaybackQuality;
@@ -165,6 +165,8 @@ CONTENT_EXPORT extern const base::Featur
CONTENT_EXPORT extern const base::Feature kWebXrIncubations;
CONTENT_EXPORT extern const base::Feature kWebXrPermissionsApi;
+CONTENT_EXPORT extern const base::Feature kDeviceMotion, kDeviceOrientation;
+
@ -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 {
@@ -100,6 +100,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
@@ -235,9 +235,12 @@ void ModulesInitializer::InitInspectorAg
@@ -245,9 +245,12 @@ void ModulesInitializer::InitInspectorAg
void ModulesInitializer::OnClearWindowObjectInMainWorld(
Document& document,
const Settings& settings) const {
@ -137,7 +137,7 @@ legacy acceleration events.
DOMWindowStorageController::From(document);
--- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc
+++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
@@ -173,6 +173,14 @@ void WebRuntimeFeatures::EnableScrollTop
@@ -183,6 +183,14 @@ void WebRuntimeFeatures::EnableScrollTop
RuntimeEnabledFeatures::SetScrollTopLeftInteropEnabled(enable);
}
@ -154,7 +154,7 @@ legacy acceleration events.
}
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -1163,6 +1163,14 @@
@@ -1172,6 +1172,14 @@
status: "experimental",
},
{


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

@ -3,14 +3,13 @@ Date: Sat, 7 Sep 2019 15:07:42 +0200
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/settings/privacy/PrivacyPreferences.java | 12 ++++++++++
chrome/browser/ui/android/strings/android_chrome_strings.grd | 6 +++++
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/settings/privacy/PrivacySettings.java | 12 ++++++++++
chrome/browser/ui/android/strings/android_chrome_strings.grd | 6 +++++
5 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/chrome/android/java/res/values/values.xml b/chrome/android/java/res/values/values.xml
--- a/chrome/android/java/res/values/values.xml
+++ b/chrome/android/java/res/values/values.xml
@@ -57,6 +57,9 @@
@ -23,25 +22,23 @@ diff --git a/chrome/android/java/res/values/values.xml b/chrome/android/java/res
<!-- Our manage space activity. Default pre-KitKat to be nothing. -->
<string name="manage_space_activity"></string>
diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
--- a/chrome/android/java/res/xml/privacy_preferences.xml
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
@@ -15,6 +15,11 @@
android:title="@string/preload_pages_title"
android:summary="@string/preload_pages_summary"
android:persistent="false" />
@@ -23,6 +23,11 @@
android:fragment="org.chromium.chrome.browser.settings.privacy.DoNotTrackSettings"
android:key="do_not_track"
android:title="@string/do_not_track_title" />
+ <org.chromium.chrome.browser.settings.ChromeBaseCheckBoxPreference
+ 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" />
<org.chromium.chrome.browser.settings.ChromeBasePreference
android:key="usage_stats_reporting"
android:title="@string/usage_stats_setting_title"
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
<Preference
android:key="clear_browsing_data"
android:title="@string/clear_browsing_data_title"
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -1143,8 +1143,10 @@ public class ChromeTabbedActivity extend
@@ -1103,8 +1103,10 @@ public class ChromeTabbedActivity extend
boolean hadCipherData =
CipherFactory.getInstance().restoreFromBundle(getSavedInstanceState());
@ -53,9 +50,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct
if (noRestoreState) {
// Clear the state files because they are inconsistent and useless from now on.
mTabModelSelectorImpl.clearState();
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/privacy/PrivacyPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/settings/privacy/PrivacyPreferences.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/settings/privacy/PrivacyPreferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/privacy/PrivacyPreferences.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/settings/privacy/PrivacySettings.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/privacy/PrivacySettings.java
@@ -4,6 +4,7 @@
package org.chromium.chrome.browser.settings.privacy;
@ -72,7 +68,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/privac
import org.chromium.base.BuildInfo;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.help.HelpAndFeedback;
@@ -35,6 +37,7 @@ public class PrivacyPreferences
@@ -35,6 +37,7 @@ public class PrivacySettings
extends PreferenceFragmentCompat implements Preference.OnPreferenceChangeListener {
private static final String PREF_CAN_MAKE_PAYMENT = "can_make_payment";
private static final String PREF_NETWORK_PREDICTIONS = "preload_pages";
@ -80,7 +76,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/privac
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";
@@ -82,6 +85,10 @@ public class PrivacyPreferences
@@ -82,6 +85,10 @@ public class PrivacySettings
Pref.CAN_MAKE_PAYMENT_ENABLED, (boolean) newValue);
} else if (PREF_NETWORK_PREDICTIONS.equals(key)) {
PrivacyPreferencesManager.getInstance().setNetworkPredictionEnabled((boolean) newValue);
@ -91,7 +87,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/privac
}
return true;
@@ -130,6 +137,11 @@ public class PrivacyPreferences
@@ -130,6 +137,11 @@ public class PrivacySettings
} else {
getPreferenceScreen().removePreference(usageStatsPref);
}
@ -102,11 +98,10 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/settings/privac
+ closeTabsOnExitPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
}
}
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -3746,6 +3746,12 @@ The site does NOT gain access to the cam
@@ -3638,6 +3638,12 @@ Only you can see what your camera is loo
<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>


+ 0
- 194
patches/Bromite/Add-option-to-use-home-page-as-NTP.patch View File

@ -1,194 +0,0 @@
cFrom: csagan5 <[email protected]>
Date: Mon, 18 Mar 2019 21:47:12 +0100
Subject: Add option to use home page as NTP
Use about:blank as default homepage
---
chrome/android/java/res/xml/homepage_preferences.xml | 5 ++
chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java | 24 +++++++++-
chrome/android/java/src/org/chromium/chrome/browser/settings/HomepagePreferences.java | 10 ++++
chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabCreatorManager.java | 11 +++-
chrome/browser/ui/android/strings/android_chrome_strings.grd | 3 +
chrome/browser/ui/browser_ui_prefs.cc | 2
chrome/common/pref_names.cc | 4 +
chrome/common/pref_names.h | 1
8 files changed, 56 insertions(+), 4 deletions(-)
--- a/chrome/android/java/res/xml/homepage_preferences.xml
+++ b/chrome/android/java/res/xml/homepage_preferences.xml
@@ -7,6 +7,11 @@
xmlns:android="http://schemas.android.com/apk/res/android">
<org.chromium.chrome.browser.settings.ChromeSwitchPreference
+ android:key="ntp_is_homepage_switch"
+ android:summaryOn="@string/options_ntp_is_homepage_label"
+ android:summaryOff="@string/options_ntp_is_homepage_label" />
+
+ <org.chromium.chrome.browser.settings.ChromeSwitchPreference
android:key="homepage_switch"
android:summaryOn="@string/text_on"
android:summaryOff="@string/text_off" />
--- a/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/partnercustomizations/HomepageManager.java
@@ -31,6 +31,7 @@ public class HomepageManager {
}
private static final String PREF_HOMEPAGE_ENABLED = "homepage";
+ public static final String PREF_NTP_IS_HOMEPAGE = "newtabpage_is_homepage";
private static final String PREF_HOMEPAGE_CUSTOM_URI = "homepage_custom_uri";
private static final String PREF_HOMEPAGE_USE_DEFAULT_URI = "homepage_partner_enabled";
@@ -90,7 +91,8 @@ public class HomepageManager {
*/
public static boolean shouldCloseAppWithZeroTabs() {
return HomepageManager.isHomepageEnabled()
- && !NewTabPage.isNTPUrl(HomepageManager.getHomepageUri());
+ && !NewTabPage.isNTPUrl(HomepageManager.getHomepageUri())
+ && (HomepageManager.getHomepageUri() != "about:blank");
}
/**
@@ -113,7 +115,7 @@ public class HomepageManager {
public static String getDefaultHomepageUri() {
return PartnerBrowserCustomizations.isHomepageProviderAvailableAndEnabled()
? PartnerBrowserCustomizations.getHomePageUrl()
- : UrlConstants.NTP_NON_NATIVE_URL;
+ : "about:blank";
}
/**
@@ -127,6 +129,14 @@ public class HomepageManager {
}
/**
+ * Returns the user preference for whether the New Tab Page is the homepage or not.
+ *
+ */
+ public boolean getPrefNTPIsHomepageEnabled() {
+ return mSharedPreferences.getBoolean(PREF_NTP_IS_HOMEPAGE, false);
+ }
+
+ /**
* Sets the user preference for whether the homepage is enabled.
*/
public void setPrefHomepageEnabled(boolean enabled) {
@@ -139,6 +149,16 @@ public class HomepageManager {
notifyHomepageUpdated();
}
+ /**
+ * Sets the user preference for whether the new tab page is the homepage or not.
+ */
+ public void setPrefNTPIsHomepageEnabled(boolean enabled) {
+ SharedPreferences.Editor sharedPreferencesEditor = mSharedPreferences.edit();
+ sharedPreferencesEditor.putBoolean(PREF_NTP_IS_HOMEPAGE, enabled);
+ sharedPreferencesEditor.apply();
+ notifyHomepageUpdated();
+ }
+
/**
* @return User specified homepage custom URI string.
*/
--- a/chrome/android/java/src/org/chromium/chrome/browser/settings/HomepagePreferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/HomepagePreferences.java
@@ -21,6 +21,7 @@ public class HomepagePreferences extends
@VisibleForTesting
public static final String PREF_HOMEPAGE_SWITCH = "homepage_switch";
private static final String PREF_HOMEPAGE_EDIT = "homepage_edit";
+ private static final String PREF_NTP_HOMEPAGE_SWITCH = "ntp_is_homepage_switch";
private HomepageManager mHomepageManager;
private Preference mHomepageEdit;
@@ -46,6 +47,15 @@ public class HomepagePreferences extends
});
}
+ ChromeSwitchPreference mNTPIsHomepageSwitch =
+ (ChromeSwitchPreference) findPreference(PREF_NTP_HOMEPAGE_SWITCH);
+ boolean isHomepageNTPEnabled = mHomepageManager.getPrefNTPIsHomepageEnabled();
+ mNTPIsHomepageSwitch.setChecked(isHomepageNTPEnabled);
+ mNTPIsHomepageSwitch.setOnPreferenceChangeListener((preference, newValue) -> {
+ mHomepageManager.setPrefNTPIsHomepageEnabled((boolean) newValue);
+ return true;
+ });
+
mHomepageEdit = findPreference(PREF_HOMEPAGE_EDIT);
updateCurrentHomepageUrl();
}
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabCreatorManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabCreatorManager.java
@@ -12,6 +12,7 @@ import org.chromium.chrome.browser.tab.T
import org.chromium.chrome.browser.util.UrlConstants;
import org.chromium.content_public.browser.LoadUrlParams;
import org.chromium.content_public.browser.WebContents;
+import org.chromium.chrome.browser.partnercustomizations.HomepageManager;
/**
* An interface to return a {@link TabCreator} either for regular or incognito tabs.
@@ -85,12 +86,18 @@ public interface TabCreatorManager {
}
/**
- * Creates a new tab and loads the NTP.
+ * Creates a new tab and loads the NTP or the homepage, depending on user preferences.
*/
public final void launchNTP() {
try {
+ String newTabURL;
+ if (HomepageManager.getInstance().getPrefNTPIsHomepageEnabled()) {
+ newTabURL = HomepageManager.getHomepageUri();
+ } else {
+ newTabURL = UrlConstants.NTP_URL;
+ }
TraceEvent.begin("TabCreator.launchNTP");
- launchUrl(UrlConstants.NTP_URL, TabLaunchType.FROM_CHROME_UI);
+ launchUrl(newTabURL, TabLaunchType.FROM_CHROME_UI);
} finally {
TraceEvent.end("TabCreator.launchNTP");
}
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -702,6 +702,9 @@ CHAR-LIMIT guidelines:
<message name="IDS_OPTIONS_HOMEPAGE_EDIT_LABEL" desc="The label for the edit text field that allows the user to change the URL that is opened when they tap on the home page button in the omnibox.">
Open this page
</message>
+ <message name="IDS_OPTIONS_NTP_IS_HOMEPAGE_LABEL" desc="The label for switch that allows the user to toggle whether opening a new tab leads to the new tab page or the home page.">
+ Use for new tabs
+ </message>
<!-- Notifications preferences -->
<message name="IDS_PREFS_NOTIFICATIONS" desc="Title for Notification preferences.">
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -55,6 +55,8 @@ void RegisterBrowserUserPrefs(user_prefs
GetHomeButtonAndHomePageIsNewTabPageFlags());
registry->RegisterBooleanPref(prefs::kShowHomeButton, false,
GetHomeButtonAndHomePageIsNewTabPageFlags());
+ registry->RegisterBooleanPref(prefs::kNewTabPageIsHomePage, false,
+ GetHomeButtonAndHomePageIsNewTabPageFlags());
registry->RegisterInt64Pref(prefs::kDefaultBrowserLastDeclined, 0);
bool reset_check_default = false;
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -59,6 +59,10 @@ const char kForceEphemeralProfiles[] = "
// A boolean specifying whether the New Tab page is the home page or not.
const char kHomePageIsNewTabPage[] = "homepage_is_newtabpage";
+// A boolean specifying whether opening a new tab should open the Home page
+// instead of the New Tab page.
+const char kNewTabPageIsHomePage[] = "newtabpage_is_homepage";
+
// This is the URL of the page to load when opening new tabs.
const char kHomePage[] = "homepage";
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -323,6 +323,7 @@ extern const char kSettingsShowOSBanner[
extern const char kDeviceLoginScreenWebUsbAllowDevicesForUrls[];
#endif // defined(OS_CHROMEOS)
extern const char kShowHomeButton[];
+extern const char kNewTabPageIsHomePage[];
extern const char kSpeechRecognitionFilterProfanities[];
extern const char kAllowDeletingBrowserHistory[];
#if !defined(OS_ANDROID)

+ 54
- 56
patches/Bromite/Add-user-setting-for-DNS-over-HTTPS-DoH-custom-URL.patch View File

@ -13,10 +13,10 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
chrome/android/java/src/org/chromium/chrome/browser/settings/DoHPreferences.java | 54 +++++
chrome/app/generated_resources.grd | 6
chrome/browser/android/feature_utilities.cc | 23 ++
chrome/browser/net/system_network_context_manager.cc | 46 +----
chrome/browser/net/system_network_context_manager.cc | 41 ----
chrome/browser/ui/android/strings/android_chrome_strings.grd | 11 +
chrome/common/chrome_features.cc | 4
13 files changed, 322 insertions(+), 37 deletions(-)
13 files changed, 320 insertions(+), 34 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,14 +25,14 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
--- a/chrome/android/chrome_java_sources.gni
+++ b/chrome/android/chrome_java_sources.gni
@@ -1345,6 +1345,8 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/settings/ChromeSwitchPreference.java",
"java/src/org/chromium/chrome/browser/settings/ClearBrowsingDataCheckBoxPreference.java",
"java/src/org/chromium/chrome/browser/settings/ExpandablePreferenceGroup.java",
"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",
+ "java/src/org/chromium/chrome/browser/settings/DoHEditor.java",
+ "java/src/org/chromium/chrome/browser/settings/DoHPreferences.java",
"java/src/org/chromium/chrome/browser/settings/HomepageEditor.java",
"java/src/org/chromium/chrome/browser/settings/HomepagePreferences.java",
"java/src/org/chromium/chrome/browser/settings/HyperlinkPreference.java",
"java/src/org/chromium/chrome/browser/send_tab_to_self/NotificationManager.java",
"java/src/org/chromium/chrome/browser/send_tab_to_self/NotificationSharedPrefManager.java",
"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 @@
@ -60,7 +60,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+ android:orientation="vertical"
+ android:focusableInTouchMode="true" >
+
+ <org.chromium.chrome.browser.widget.ChromeTextInputLayout
+ <org.chromium.components.browser_ui.widget.text.ChromeTextInputLayout
+ android:id="@+id/doh_url"
+ style="@style/PreferenceScreenLayout"
+ android:layout_width="match_parent"
@ -74,7 +74,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+ android:inputType="textUri"
+ android:singleLine="true"
+ android:hint="@string/options_doh_edit_label" />
+ </org.chromium.chrome.browser.widget.ChromeTextInputLayout>
+ </org.chromium.components.browser_ui.widget.text.ChromeTextInputLayout>
+
+ <Space style="@style/ButtonBarTopSpacer" />
+ <View style="@style/ButtonBarTopDivider" />
@ -98,12 +98,12 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+ </LinearLayout>
+ </ScrollView>
+
+ <include layout="@layout/preferences_action_bar_shadow"/>
+ <include layout="@layout/settings_action_bar_shadow"/>
+
+</FrameLayout>
--- a/chrome/android/java/res/values/values.xml
+++ b/chrome/android/java/res/values/values.xml
@@ -80,6 +80,8 @@
@@ -75,6 +75,8 @@
<integer name="download_infobar_bar_fill_in_delay">400</integer>
<integer name="download_infobar_bar_fill_out_delay">200</integer>
@ -156,9 +156,9 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
android:title="@string/preload_pages_title"
--- a/chrome/android/java/src/org/chromium/chrome/browser/flags/FeatureUtilities.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/flags/FeatureUtilities.java
@@ -95,6 +95,26 @@ public class FeatureUtilities {
FeatureUtilitiesJni.get().setCustomTabVisible(visible);
}
@@ -120,6 +120,26 @@ public class FeatureUtilities {
private static Boolean sEnabledTabThumbnailApsectRatioForTesting;
private static final String ALLOW_TO_REFETCH = "allow_to_refetch";
+ /**
+ * Records whether custom URL for DoH is enabled with native-side feature utilities.
@ -181,12 +181,12 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+ }
+
/**
* Records whether the activity is in multi-window mode with native-side feature utilities.
* @param isInMultiWindowMode Whether the activity is in Android N multi-window mode.
@@ -728,6 +748,10 @@ public class FeatureUtilities {
void setCustomTabVisible(boolean visible);
void setActivityType(@ActivityType int type);
void setIsInMultiWindowMode(boolean isInMultiWindowMode);
* Checks if a cached feature flag is enabled.
*
@@ -784,6 +804,10 @@ public class FeatureUtilities {
@NativeMethods
interface Natives {
+ void setDoHEnabled(boolean enabled);
+ boolean getDoHEnabled();
+ void setDoHTemplates(String templates);
@ -348,7 +348,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+}
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -6699,6 +6699,12 @@ the Bookmarks menu.">
@@ -6848,6 +6848,12 @@ the Bookmarks menu.">
<message name="IDS_OPTIONS_HOMEPAGE_TITLE" desc="The title of the home page overlay on Android" formatter_data="android_java">
Home page
</message>
@ -370,10 +370,10 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+#include "chrome/browser/browser_process.h"
+#include "components/prefs/pref_service.h"
+#include "chrome/common/pref_names.h"
#include "chrome/browser/ntp_snippets/content_suggestions_service_factory.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "components/ntp_snippets/content_suggestions_service.h"
@@ -79,3 +82,23 @@ static jboolean JNI_FeatureUtilities_IsN
#include "content/public/common/content_features.h"
#include "content/public/common/network_service_util.h"
@@ -37,3 +40,23 @@ static jboolean JNI_FeatureUtilities_IsN
return content::IsOutOfProcessNetworkService() &&
base::FeatureList::IsEnabled(features::kWarmUpNetworkProcess);
}
@ -399,29 +399,10 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+}
--- a/chrome/browser/net/system_network_context_manager.cc
+++ b/chrome/browser/net/system_network_context_manager.cc
@@ -139,9 +139,14 @@ void GetStubResolverConfig(
std::string doh_templates =
local_state->GetString(prefs::kDnsOverHttpsTemplates);
- std::string server_method;
- if (!doh_templates.empty() &&
- *secure_dns_mode != net::DnsConfig::SecureDnsMode::OFF) {
+ if (doh_templates.empty()) {
+ *secure_dns_mode = net::DnsConfig::SecureDnsMode::OFF;
+ doh_mode = chrome_browser_net::kDnsOverHttpsModeOff;
+ }
+
+ LOG(INFO) << "DoH templates: '" << doh_templates << "' with mode " << doh_mode;
+ if (*secure_dns_mode != net::DnsConfig::SecureDnsMode::OFF) {
+ std::string server_method;
for (const std::string& server_template :
SplitString(doh_templates, " ", base::TRIM_WHITESPACE,
base::SPLIT_WANT_NONEMPTY)) {
@@ -427,40 +432,11 @@ SystemNetworkContextManager::SystemNetwo
// features before registering change callbacks for these preferences.
@@ -377,40 +377,12 @@ SystemNetworkContextManager::SystemNetwo
local_state_->SetDefaultPrefValue(prefs::kBuiltInDnsClientEnabled,
base::Value(ShouldEnableAsyncDns()));
- std::string default_doh_mode = chrome_browser_net::kDnsOverHttpsModeOff;
std::string default_doh_mode = chrome_browser_net::kDnsOverHttpsModeOff;
- std::string default_doh_templates = "";
- if (base::FeatureList::IsEnabled(features::kDnsOverHttps)) {
- if (features::kDnsOverHttpsFallbackParam.Get()) {
@ -431,13 +412,12 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
- }
- default_doh_templates = features::kDnsOverHttpsTemplatesParam.Get();
- }
+ //NOTE: DoH fallback feature to insecure mode is not evaluated
+ std::string default_doh_templates = features::kDnsOverHttpsTemplatesParam.Get();
local_state_->SetDefaultPrefValue(prefs::kDnsOverHttpsMode,
- base::Value(default_doh_mode));
+ base::Value(chrome_browser_net::kDnsOverHttpsModeOff));
base::Value(default_doh_mode));
local_state_->SetDefaultPrefValue(prefs::kDnsOverHttpsTemplates,
- base::Value(default_doh_templates));
-
base::Value(default_doh_templates));
- // If the user has explicitly enabled or disabled the DoH experiment in
- // chrome://flags, store that choice in the user prefs so that it can be
- // persisted after the experiment ends. Also make sure to remove the stored
@ -457,13 +437,31 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
- // The user has "Default" selected.
- local_state_->ClearPref(prefs::kDnsOverHttpsMode);
- }
+ base::Value(features::kDnsOverHttpsTemplatesParam.Get()));
-
PrefChangeRegistrar::NamedChangeCallback dns_pref_callback =
base::BindRepeating(&OnStubResolverConfigChanged,
base::Unretained(local_state_));
@@ -545,9 +517,14 @@ void SystemNetworkContextManager::GetStu
std::string doh_templates =
local_state->GetString(prefs::kDnsOverHttpsTemplates);
- std::string server_method;
- if (!doh_templates.empty() &&
- *secure_dns_mode != net::DnsConfig::SecureDnsMode::OFF) {
+ if (doh_templates.empty()) {
+ *secure_dns_mode = net::DnsConfig::SecureDnsMode::OFF;
+ doh_mode = chrome_browser_net::kDnsOverHttpsModeOff;
+ }
+
+ LOG(INFO) << "DoH templates: '" << doh_templates << "' with mode " << doh_mode;
+ if (*secure_dns_mode != net::DnsConfig::SecureDnsMode::OFF) {
+ std::string server_method;
for (const std::string& server_template :
SplitString(doh_templates, " ", base::TRIM_WHITESPACE,
base::SPLIT_WANT_NONEMPTY)) {
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -695,6 +695,17 @@ CHAR-LIMIT guidelines:
@@ -599,6 +599,17 @@ CHAR-LIMIT guidelines:
Chrome Passwords
</message>
@ -483,7 +481,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
Edit home page
--- a/chrome/common/chrome_features.cc
+++ b/chrome/common/chrome_features.cc
@@ -303,12 +303,12 @@ const char kDisallowUnsafeHttpDownloadsP
@@ -293,12 +293,12 @@ const char kDisallowUnsafeHttpDownloadsP
// Enable DNS over HTTPS (DoH).
const base::Feature kDnsOverHttps{"DnsOverHttps",


+ 4
- 4
patches/Bromite/Disable-AImageReader-for-ARM64-P-and-ARM64-Q.patch View File

@ -42,7 +42,7 @@ Subject: Disable AImageReader for ARM64/P and ARM64/Q
}
--- a/gpu/config/gpu_finch_features.cc
+++ b/gpu/config/gpu_finch_features.cc
@@ -31,7 +31,11 @@ bool FieldIsInBlacklist(const char* curr
@@ -15,7 +15,11 @@ namespace features {
#if defined(OS_ANDROID)
// Use android AImageReader when playing videos with MediaPlayer.
const base::Feature kAImageReaderMediaPlayer{"AImageReaderMediaPlayer",
@ -52,11 +52,11 @@ Subject: Disable AImageReader for ARM64/P and ARM64/Q
base::FEATURE_ENABLED_BY_DEFAULT};
+#endif
// Use android SurfaceControl API for managing display compositor's buffer queue
// and using overlays on Android.
// Used only by webview to disable SurfaceControl.
const base::Feature kDisableSurfaceControlForWebview{
--- a/media/base/media_switches.cc
+++ b/media/base/media_switches.cc
@@ -491,7 +491,11 @@ const base::Feature kMediaDrmPreprovisio
@@ -504,7 +504,11 @@ const base::Feature kMediaDrmPreprovisio
// Enables the Android Image Reader path for Video decoding(for AVDA and MCVD)
const base::Feature kAImageReaderVideoOutput{"AImageReaderVideoOutput",


+ 2
- 6
patches/Bromite/Download-on-Android-Q-Remove-a-DCHECK-in-CreateReservation.patch View File

@ -12,13 +12,12 @@ Reviewed-by: Min Qin <[email protected]>
Commit-Queue: Xing Liu <[email protected]>
Cr-Commit-Position: refs/heads/[email protected]{#742270}
---
.../internal/common/download_path_reservation_tracker.cc | 2 --
components/download/internal/common/download_path_reservation_tracker.cc | 2 --
1 file changed, 2 deletions(-)
diff --git a/components/download/internal/common/download_path_reservation_tracker.cc b/components/download/internal/common/download_path_reservation_tracker.cc
--- a/components/download/internal/common/download_path_reservation_tracker.cc
+++ b/components/download/internal/common/download_path_reservation_tracker.cc
@@ -326,8 +326,6 @@ PathValidationResult ValidatePathAndResolveConflicts(
@@ -325,8 +325,6 @@ PathValidationResult ValidatePathAndReso
// - Returns the result of creating the path reservation.
PathValidationResult CreateReservation(const CreateReservationInfo& info,
base::FilePath* reserved_path) {
@ -27,6 +26,3 @@ diff --git a/components/download/internal/common/download_path_reservation_track
// Create a reservation map if one doesn't exist. It will be automatically
// deleted when all the reservations are revoked.
if (g_reservation_map == NULL)
--
2.17.1

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

@ -12,7 +12,7 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2094,6 +2094,10 @@ const FeatureEntry kFeatureEntries[] = {
@@ -2145,6 +2145,10 @@ const FeatureEntry kFeatureEntries[] = {
SINGLE_VALUE_TYPE(switches::kHostedAppQuitNotification)},
#endif // OS_MACOSX
#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
@@ -777,6 +777,11 @@
@@ -70,6 +70,11 @@
"expiry_milestone": 88
},
{
@ -34,12 +34,12 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
+ "expiry_milestone": -1
+ },
+ {
// See https://crbug.com/882238.
"name": "disable-pushstate-throttle",
"owners": [ "[email protected]", "[email protected]" ],
"name": "allow-previews",
"owners": [ "//components/data_reduction_proxy/OWNERS" ],
// This flag is used for frequent manual testing and should not be removed.
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -2746,6 +2746,10 @@ extern const char kProcessSharingWithStr
@@ -2600,6 +2600,10 @@ const char kProcessSharingWithStrictSite
"separated like strict site isolation, but process selection puts multiple "
"site instances in a single process.";
@ -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
@@ -1613,6 +1613,9 @@ extern const char kProcessSharingWithDef
@@ -1504,6 +1504,9 @@ extern const char kProcessSharingWithDef
extern const char kProcessSharingWithStrictSiteInstancesName[];
extern const char kProcessSharingWithStrictSiteInstancesDescription[];


+ 4
- 4
patches/Bromite/Use-a-minimum-DoH-timeout-of-400ms.patch View File

@ -18,7 +18,7 @@ Subject: Use a minimum DoH timeout of 400ms
UpdateTimeouts(NetworkChangeNotifier::GetConnectionType());
InitializeServerStats();
}
@@ -325,9 +327,12 @@ base::TimeDelta DnsSession::NextTimeout(
@@ -334,9 +336,12 @@ base::TimeDelta DnsSession::NextTimeout(
}
base::TimeDelta DnsSession::NextDohTimeout(unsigned doh_server_index) {
@ -34,11 +34,11 @@ Subject: Use a minimum DoH timeout of 400ms
base::TimeDelta DnsSession::NextTimeoutHelper(ServerStats* server_stats,
--- a/net/dns/dns_session.h
+++ b/net/dns/dns_session.h
@@ -167,6 +167,7 @@ class NET_EXPORT_PRIVATE DnsSession : pu
@@ -176,6 +176,7 @@ class NET_EXPORT_PRIVATE DnsSession : pu
base::TimeDelta initial_timeout_;
base::TimeDelta max_timeout_;
+ base::TimeDelta min_doh_timeout_;
// Track runtime statistics of each insecure DNS server.
std::vector<std::unique_ptr<ServerStats>> server_stats_;
// TODO(crbug.com/1022059): Move all handling of ServerStats (both for DoH and
// non-DoH) to ResolveContext.

+ 15005
- 0
patches/Kiwi/0001-Kiwi-Introduce-extensions-support-R80.patch
File diff suppressed because it is too large
View File


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

@ -3,14 +3,14 @@ Date: Fri, 22 Jun 2018 17:06:15 +0200
Subject: kill Auth
---
.../chrome/browser/signin/SigninHelper.java | 22 +---------
.../components/signin/AccountIdProvider.java | 9 +---
.../signin/SystemAccountManagerDelegate.java | 50 ++--------------------
chrome/android/java/src/org/chromium/chrome/browser/signin/SigninHelper.java | 22 ----
components/signin/core/browser/android/java/src/org/chromium/components/signin/AccountIdProvider.java | 9 -
components/signin/core/browser/android/java/src/org/chromium/components/signin/SystemAccountManagerDelegate.java | 50 ----------
3 files changed, 5 insertions(+), 76 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
@@ -12,10 +12,6 @@ import android.content.SharedPreferences
@@ -11,10 +11,6 @@ import android.content.Context;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
@ -21,7 +21,7 @@ Subject: kill Auth
import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
import org.chromium.base.task.AsyncTask;
@@ -73,23 +69,7 @@ public class SigninHelper {
@@ -60,23 +56,7 @@ public class SigninHelper {
@Override
public List<String> getAccountChangeEvents(
Context context, int index, String accountName) {


+ 43
- 34
patches/Unobtainium/kill-GCM.patch View File

@ -7,8 +7,8 @@ Subject: kill GCM
chrome/android/chrome_java_sources.gni | 6
chrome/android/java/AndroidManifest.xml | 64 ---
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 | 45 --
chrome/android/java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundTask.java | 2
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/BUILD.gn | 1
components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerGcmNetworkManager.java | 206 ----------
@ -19,11 +19,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, 10 insertions(+), 494 deletions(-)
16 files changed, 15 insertions(+), 499 deletions(-)
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -337,7 +337,6 @@ android_library("chrome_java") {
@@ -358,7 +358,6 @@ android_library("chrome_java") {
"//third_party/android_deps:com_google_protobuf_protobuf_lite_java",
"//third_party/android_deps:javax_inject_javax_inject_java",
"//third_party/android_media:android_media_java",
@ -41,7 +41,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",
@@ -1338,11 +1337,6 @@ chrome_java_sources = [
@@ -1360,11 +1359,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/services/AndroidEduAndChildAccountHelper.java",
"java/src/org/chromium/chrome/browser/services/AndroidEduOwnerCheckCallback.java",
"java/src/org/chromium/chrome/browser/services/GoogleServicesManager.java",
@ -50,9 +50,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/sessions/SessionTabHelper.java",
"java/src/org/chromium/chrome/browser/settings/ButtonPreference.java",
"java/src/org/chromium/chrome/browser/settings/ChromeBaseCheckBoxPreference.java",
"java/src/org/chromium/chrome/browser/settings/HyperlinkPreference.java",
"java/src/org/chromium/chrome/browser/settings/LearnMorePreference.java",
"java/src/org/chromium/chrome/browser/settings/MainSettings.java",
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -81,22 +81,17 @@ by a child template that "extends" this
@ -78,7 +78,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" />
@@ -1056,50 +1051,9 @@ by a child template that "extends" this
@@ -1039,50 +1034,9 @@ by a child template that "extends" this
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|mcc|mnc|screenLayout|smallestScreenSize"
android:hardwareAccelerated="false" />
@ -129,7 +129,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"
@@ -1126,24 +1080,6 @@ by a child template that "extends" this
@@ -1109,28 +1063,10 @@ by a child template that "extends" this
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE"/>
@ -142,6 +142,10 @@ Subject: kill GCM
- </intent-filter>
- </service>
-
<!-- Background Task Scheduler alarm receiver -->
<receiver android:name="org.chromium.components.background_task_scheduler.BackgroundTaskBroadcastReceiver"
android:exported="false" />
- <!-- GcmTaskService implementation to wake Chrome on scheduled events -->
- <service android:name="org.chromium.chrome.browser.ChromeBackgroundService"
- android:permission="com.google.android.gms.permission.BIND_NETWORK_TASK_SERVICE"
@ -188,9 +192,9 @@ Subject: kill GCM
import org.chromium.base.annotations.CalledByNative;
-import org.chromium.chrome.browser.ChromeBackgroundService;
import org.chromium.chrome.browser.externalauth.ExternalAuthUtils;
/**
@@ -41,8 +36,6 @@ public class SnippetsLauncher {
import org.chromium.chrome.browser.preferences.ChromePreferenceKeys;
import org.chromium.chrome.browser.preferences.SharedPreferencesManager;
@@ -40,8 +35,6 @@ public class SnippetsLauncher {
// If it is non-null then the browser is running.
private static SnippetsLauncher sInstance;
@ -199,7 +203,7 @@ Subject: kill GCM
private boolean mGCMEnabled = true;
/**
@@ -79,7 +72,7 @@ public class SnippetsLauncher {
@@ -78,7 +71,7 @@ public class SnippetsLauncher {
protected SnippetsLauncher() {
checkGCM();
@ -208,7 +212,7 @@ Subject: kill GCM
}
private void checkGCM() {
@@ -90,32 +83,7 @@ public class SnippetsLauncher {
@@ -89,32 +82,7 @@ public class SnippetsLauncher {
}
}
@ -241,11 +245,10 @@ Subject: kill GCM
}
@CalledByNative
@@ -128,23 +96,12 @@ public class SnippetsLauncher {
.edit()
.putBoolean(PREF_IS_SCHEDULED, isScheduled)
.apply();
-
@@ -126,23 +94,13 @@ public class SnippetsLauncher {
SharedPreferencesManager.getInstance().writeBoolean(
ChromePreferenceKeys.NTP_SNIPPETS_IS_SCHEDULED, isScheduled);
- // Google Play Services may not be up to date, if the application was not installed through
- // the Play Store. In this case, scheduling the task will fail silently.
- try {
@ -254,25 +257,31 @@ Subject: kill GCM
- scheduleOrCancelFetchTask(
- TASK_TAG_FALLBACK, periodFallbackSeconds, Task.NETWORK_STATE_CONNECTED);
- } catch (IllegalArgumentException e) {
// Disable GCM for the remainder of this session.
mGCMEnabled = false;
- // Disable GCM for the remainder of this session.
- mGCMEnabled = false;
+ // Disable GCM for the remainder of this session.
+ mGCMEnabled = false;
ContextUtils.getAppSharedPreferences().edit().remove(PREF_IS_SCHEDULED).apply();
// Return false so that the failure will be logged.
return false;
- SharedPreferencesManager.getInstance().removeKey(
- ChromePreferenceKeys.NTP_SNIPPETS_IS_SCHEDULED);
- // Return false so that the failure will be logged.
- return false;
- }
- return true;
+ SharedPreferencesManager.getInstance().removeKey(
+ ChromePreferenceKeys.NTP_SNIPPETS_IS_SCHEDULED);
+ // Return false so that the failure will be logged.
+ return false;
}
@CalledByNative
--- a/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundTask.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundTask.java
@@ -42,7 +42,7 @@ public class GCMBackgroundTask implement
@@ -42,7 +42,6 @@ public class GCMBackgroundTask implement
return false;
}
- ChromeGcmListenerService.dispatchMessageToDriver(context, message);
+ //ChromeGcmListenerService.dispatchMessageToDriver(context, message);
- ChromeGcmListenerService.dispatchMessageToDriver(message);
return false;
}
@ -560,7 +569,7 @@ Subject: kill GCM
private static String taskIdToTaskTag(int taskId) {
--- a/components/gcm_driver/android/BUILD.gn
+++ b/components/gcm_driver/android/BUILD.gn
@@ -15,7 +15,6 @@ android_library("gcm_driver_java") {
@@ -13,7 +13,6 @@ android_library("gcm_driver_java") {
"//base:base_java",
"//base:jni_java",
"//content/public/android:content_java",
@ -570,9 +579,9 @@ Subject: kill GCM
annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ]
--- a/components/gcm_driver/instance_id/android/BUILD.gn
+++ b/components/gcm_driver/instance_id/android/BUILD.gn
@@ -31,7 +31,6 @@ android_library("instance_id_driver_java
@@ -27,7 +27,6 @@ android_library("instance_id_driver_java
java_files = [
sources = [
"java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java",
- "java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDWithSubtype.java",
]
@ -693,15 +702,15 @@ Subject: kill GCM
"//third_party/jsr-305:jsr_305_javalib",
--- a/third_party/cacheinvalidation/BUILD.gn
+++ b/third_party/cacheinvalidation/BUILD.gn
@@ -142,7 +142,6 @@ if (is_android) {
@@ -138,7 +138,6 @@ if (is_android) {
"$google_play_services_package:google_play_services_tasks_java",
"//base:base_java",
"//third_party/android_protobuf:protobuf_nano_javalib",
- "//third_party/android_sdk:android_gcm_java",
]
java_files = [
@@ -208,13 +207,8 @@ if (is_android) {
sources = [
@@ -204,13 +203,8 @@ if (is_android) {
"src/java/com/google/ipc/invalidation/ticl/android2/WakeLockManager.java",
"src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidChannelConstants.java",
"src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidChannelPreferences.java",


+ 6
- 12
patches/Unobtainium/kill-TOS-and-metrics-opt-out.patch View File

@ -3,27 +3,24 @@ 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/res/values/dimens.xml | 1 -
.../src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
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(-)
diff --git a/chrome/android/java/res/layout/fre_tosanduma.xml b/chrome/android/java/res/layout/fre_tosanduma.xml
--- a/chrome/android/java/res/layout/fre_tosanduma.xml
+++ b/chrome/android/java/res/layout/fre_tosanduma.xml
@@ -62,7 +62,7 @@
android:layout_marginBottom="@dimen/fre_vertical_spacing"
android:gravity="center"
android:lineSpacingMultiplier="1.4"
- android:textAppearance="@style/TextAppearance.BlackBodyDefault" />
+ android:textAppearance="@style/TextAppearance.BlackBodyDefault" android:visibility="gone" />
- android:textAppearance="@style/TextAppearance.TextMedium.Primary" />
+ android:textAppearance="@style/TextAppearance.TextMedium.Primary" android:visibility="gone" />
<CheckBox
android:id="@+id/send_report_checkbox"
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivityBase.java
--- 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 @@ public abstract class FirstRunActivityBase extends AsyncInitializationActivity {
@@ -38,7 +38,7 @@ public abstract class FirstRunActivityBa
static final String SHOW_SEARCH_ENGINE_PAGE = "ShowSearchEnginePage";
static final String SHOW_SIGNIN_PAGE = "ShowSignIn";
@ -32,6 +29,3 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstR
private boolean mNativeInitialized;
--
2.11.0

+ 11
- 17
patches/Unobtainium/kill-Vision.patch View File

@ -4,31 +4,29 @@ Subject: kill Vision
Barcode, face and text detection APIs
---
services/shape_detection/BUILD.gn | 6 ------
.../java/src/org/chromium/shape_detection/BitmapUtils.java | 12 ------------
.../chromium/shape_detection/FaceDetectionProviderImpl.java | 13 +------------
.../org/chromium/shape_detection/InterfaceRegistrar.java | 13 -------------
4 files changed, 1 insertion(+), 43 deletions(-)
services/shape_detection/BUILD.gn | 6 ----
services/shape_detection/android/java/src/org/chromium/shape_detection/BitmapUtils.java | 12 --------
services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionProviderImpl.java | 15 +---------
services/shape_detection/android/java/src/org/chromium/shape_detection/InterfaceRegistrar.java | 13 --------
4 files changed, 2 insertions(+), 44 deletions(-)
diff --git a/services/shape_detection/BUILD.gn b/services/shape_detection/BUILD.gn
--- a/services/shape_detection/BUILD.gn
+++ b/services/shape_detection/BUILD.gn
@@ -84,14 +84,8 @@ if (is_android) {
android_library("shape_detection_java") {
java_files = [
sources = [
- "android/java/src/org/chromium/shape_detection/BarcodeDetectionImpl.java",
- "android/java/src/org/chromium/shape_detection/BarcodeDetectionProviderImpl.java",
"android/java/src/org/chromium/shape_detection/BitmapUtils.java",
- "android/java/src/org/chromium/shape_detection/FaceDetectionImpl.java",
- "android/java/src/org/chromium/shape_detection/FaceDetectionImplGmsCore.java",
- "android/java/src/org/chromium/shape_detection/FaceDetectionProviderImpl.java",
"android/java/src/org/chromium/shape_detection/InterfaceRegistrar.java",
"android/java/src/org/chromium/shape_detection/BitmapUtils.java",
- "android/java/src/org/chromium/shape_detection/TextDetectionImpl.java",
]
deps = [
diff --git a/services/shape_detection/android/java/src/org/chromium/shape_detection/BitmapUtils.java b/services/shape_detection/android/java/src/org/chromium/shape_detection/BitmapUtils.java
--- a/services/shape_detection/android/java/src/org/chromium/shape_detection/BitmapUtils.java
+++ b/services/shape_detection/android/java/src/org/chromium/shape_detection/BitmapUtils.java
@@ -6,8 +6,6 @@ package org.chromium.shape_detection;
@ -55,7 +53,6 @@ diff --git a/services/shape_detection/android/java/src/org/chromium/shape_detect
- return new Frame.Builder().setBitmap(bitmap).build();
- }
}
diff --git a/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionProviderImpl.java b/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionProviderImpl.java
--- a/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionProviderImpl.java
+++ b/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionProviderImpl.java
@@ -4,9 +4,6 @@
@ -68,7 +65,7 @@ diff --git a/services/shape_detection/android/java/src/org/chromium/shape_detect
import org.chromium.base.ContextUtils;
import org.chromium.mojo.bindings.InterfaceRequest;
import org.chromium.mojo.system.MojoException;
@@ -23,16 +20,8 @@ public class FaceDetectionProviderImpl implements FaceDetectionProvider {
@@ -23,16 +20,8 @@ public class FaceDetectionProviderImpl i
@Override
public void createFaceDetection(
InterfaceRequest<FaceDetection> request, FaceDetectorOptions options) {
@ -76,20 +73,20 @@ diff --git a/services/shape_detection/android/java/src/org/chromium/shape_detect
- GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(
- ContextUtils.getApplicationContext())
- == ConnectionResult.SUCCESS;
-
- if (isGmsCoreSupported) {
- FaceDetection.MANAGER.bind(new FaceDetectionImplGmsCore(options), request);
- } else {
- FaceDetection.MANAGER.bind(new FaceDetectionImpl(options), request);
- }
+
+ FaceDetection.MANAGER.bind(new FaceDetectionImpl(options), request);
}
@Override
diff --git a/services/shape_detection/android/java/src/org/chromium/shape_detection/InterfaceRegistrar.java b/services/shape_detection/android/java/src/org/chromium/shape_detection/InterfaceRegistrar.java
--- a/services/shape_detection/android/java/src/org/chromium/shape_detection/InterfaceRegistrar.java
+++ b/services/shape_detection/android/java/src/org/chromium/shape_detection/InterfaceRegistrar.java
@@ -8,9 +8,6 @@ import org.chromium.base.annotations.CalledByNative;
@@ -8,9 +8,6 @@ import org.chromium.base.annotations.Cal
import org.chromium.base.annotations.JNINamespace;
import org.chromium.mojo.system.MessagePipeHandle;
import org.chromium.mojo.system.impl.CoreImpl;
@ -123,6 +120,3 @@ diff --git a/services/shape_detection/android/java/src/org/chromium/shape_detect
- }
}
}
--
2.11.0

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

@ -4,13 +4,12 @@ Date: Thu, 4 Jul 2019 18:11:27 -0400
Subject: [PATCH 20/30] disable media router media remoting by default
---
chrome/browser/profiles/profile.cc | 2 +-
chrome/browser/profiles/profile.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/chrome/browser/profiles/profile.cc b/src/chrome/browser/profiles/profile.cc
--- a/chrome/browser/profiles/profile.cc
+++ b/chrome/browser/profiles/profile.cc
@@ -231,7 +231,7 @@ void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
@@ -233,7 +233,7 @@ void Profile::RegisterProfilePrefs(user_
prefs::kMediaRouterFirstRunFlowAcknowledged,
false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
@ -19,5 +18,3 @@ diff --git a/src/chrome/browser/profiles/profile.cc b/src/chrome/browser/profile
registry->RegisterListPref(prefs::kMediaRouterTabMirroringSources);
registry->RegisterDictionaryPref(prefs::kWebShareVisitedTargets);
--
2.22.0

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

@ -4,8 +4,8 @@ Date: Thu, 4 Jul 2019 19:08:52 -0400
Subject: [PATCH 21/30] disable media router by default
---
.../media/router/media_router_feature.cc | 17 ++++++++---------
chrome/browser/profiles/profile_impl.cc | 2 +-
chrome/browser/media/router/media_router_feature.cc | 17 ++++++++---------
chrome/browser/profiles/profile_impl.cc | 2 +-
2 files changed, 9 insertions(+), 10 deletions(-)
--- a/chrome/browser/media/router/media_router_feature.cc
@ -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
@@ -400,7 +400,7 @@ void ProfileImpl::RegisterProfilePrefs(
@@ -402,7 +402,7 @@ void ProfileImpl::RegisterProfilePrefs(
registry->RegisterStringPref(
prefs::kPrintPreviewDefaultDestinationSelectionRules, std::string());
registry->RegisterBooleanPref(prefs::kForceEphemeralProfiles, false);


+ 4
- 4
patches/ignore-aidl-assertion-error.patch View File

@ -3,12 +3,12 @@ Date: Fri, 10 Jan 2020 22:24:48 -0500
Subject: Ignore assertion error on aidl.srcjar
---
src/build/android/gyp/javac.py | 2 +-
src/build/android/gyp/javac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/build/android/gyp/javac.py b/src/build/android/gyp/javac.py
--- a/src/build/android/gyp/javac.py
+++ b/src/build/android/gyp/javac.py
diff --git a/src/build/android/gyp/javac b/src/build/android/gyp/javac
--- a/src/build/android/gyp/javac
+++ b/src/build/android/gyp/javac
@@ -236,7 +236,7 @@ def _ProcessInfo(java_file, package_name, class_names, source, chromium_code):
for class_name in class_names:
yield '{}.{}'.format(package_name, class_name)


+ 12
- 2
patches/remove-jdk.patch View File

@ -4,9 +4,9 @@ Subject: Remove dependency on bundled jdk
---
testing/BUILD.gn | 5 -----
1 file changed, 5 deletions(-)
build/config/android/rules.gni | 1 -
2 file changed, 6 deletions(-)
diff --git a/testing/BUILD.gn b/testing/BUILD.gn
--- a/testing/BUILD.gn
+++ b/testing/BUILD.gn
@@ -28,9 +28,4 @@ group("run_perf_test") {
@ -19,3 +19,13 @@ Subject: Remove dependency on bundled jdk
- data_deps += [ "//third_party/jdk:java_data" ]
- }
}
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -1273,7 +1273,6 @@ if (enable_java_templates) {
if (!defined(data_deps)) {
data_deps = []
}
- data_deps += [ "//third_party/jdk:java_data" ]
}
}

+ 4
- 2
patches/series View File

@ -1,3 +1,4 @@
src-fix/fix-manifest-merger-path.patch
src-fix/android-rlz-fix-missing-variable.patch
src-fix/fix-null-mInstanceID.patch
src-fix/fix-unkown-warning-clang-9.patch
@ -25,11 +26,12 @@ ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.core.spl
ungoogled-chromium-android/Disable-contextual-search.patch
ungoogled-chromium-android/Disable-lite-mode-prompt.patch
ungoogled-chromium-android/Disable-prefetch.patch
ungoogled-chromium-android/Add-Starpage-search-engine.patch
ungoogled-chromium-android/Add-folder-button-bookmark.patch
Bromite/Add-exit-menu-item.patch
Bromite/Add-flag-to-disable-WebGL.patch
Bromite/Add-flags-to-disable-device-motion-and-orientation-APIs.patch
Bromite/Add-option-to-not-persist-tabs-across-sessions.patch
Bromite/Add-exit-menu-item.patch
Bromite/Add-option-to-use-home-page-as-NTP.patch
Bromite/Add-user-setting-for-DNS-over-HTTPS-DoH-custom-URL.patch
Bromite/Revert-flags-remove-disable-pull-to-refresh-effect.patch
Bromite/updater-disable-updater-pings.patch


+ 20
- 0
patches/src-fix/fix-manifest-merger-path.patch View File

@ -0,0 +1,20 @@
From: Wengling Chen <[email protected]>
Date: Tue, 21 Apr 2020 23:43:11 -0400
Subject: fix gn ignoring manifest merger sdk
---
build/config/android/config.gni | 3 +++
1 file changed, 3 insertions(+)
--- a/build/config/android/config.gni
+++ b/build/config/android/config.gni
@@ -142,6 +142,9 @@ if (is_android || is_chromeos) {
lint_android_sdk_root = default_lint_android_sdk_root
lint_android_sdk_version = default_lint_android_sdk_version
+ manifest_merger_sdk_root = manifest_merger_sdk_root
+ manifest_merger_sdk_version = manifest_merger_sdk_version
+
# Libc++ library directory. Override to use a custom libc++ binary.
android_libcpp_lib_dir = ""

+ 10
- 10
patches/src-fix/fix-prefs.patch View File

@ -10,7 +10,7 @@ Subject: fix build error with prefs.h
--- a/chrome/browser/android/preferences/prefs.h
+++ b/chrome/browser/android/preferences/prefs.h
@@ -20,7 +20,6 @@
@@ -21,7 +21,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"
@ -18,7 +18,7 @@ Subject: fix build error with prefs.h
#include "components/translate/core/browser/translate_pref_names.h"
// A preference exposed to Java.
@@ -59,7 +58,6 @@ enum Pref {
@@ -61,7 +60,6 @@ enum Pref {
OFFER_TRANSLATE_ENABLED,
NOTIFICATIONS_VIBRATE_ENABLED,
ALTERNATE_ERROR_PAGES_ENABLED,
@ -26,30 +26,30 @@ Subject: fix build error with prefs.h
WEBKIT_PASSWORD_ECHO_ENABLED,
WEBKIT_FORCE_DARK_MODE_ENABLED,
HOME_PAGE,
@@ -109,7 +107,6 @@ const char* const kPrefsExposedToJava[]
@@ -112,7 +110,6 @@ const char* const kPrefsExposedToJava[]
prefs::kOfferTranslateEnabled,
prefs::kNotificationsVibrateEnabled,
prefs::kAlternateErrorPagesEnabled,
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
@@ -437,7 +437,7 @@ public abstract class SigninFragmentBase
@@ -438,7 +438,7 @@ public abstract class SigninFragmentBase
private void runStateMachineAndSignin(boolean settingsClicked) {
mConfirmSyncDataStateMachine = new ConfirmSyncDataStateMachine(getContext(),
getChildFragmentManager(),
mConfirmSyncDataStateMachine = new ConfirmSyncDataStateMachine(
new ConfirmSyncDataStateMachineDelegate(getChildFragmentManager()),
- PrefServiceBridge.getInstance().getString(Pref.SYNC_LAST_ACCOUNT_NAME),
+ "",
mSelectedAccountName, new ConfirmImportSyncDataDialog.Listener() {
mSelectedAccountName, new ConfirmSyncDataStateMachine.Listener() {
@Override
public void onConfirm(boolean wipeData) {
--- a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninPromoUtil.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninPromoUtil.java
@@ -42,8 +42,7 @@ public class SigninPromoUtil {
@@ -39,8 +39,7 @@ public class SigninPromoUtil {
public static boolean launchSigninPromoIfNeeded(final Activity activity) {
ChromePreferenceManager preferenceManager = ChromePreferenceManager.getInstance();
SigninPreferencesManager preferencesManager = SigninPreferencesManager.getInstance();
int currentMajorVersion = ChromeVersionInfo.getProductMajorVersion();
- boolean wasSignedIn = TextUtils.isEmpty(
- PrefServiceBridge.getInstance().getString(Pref.SYNC_LAST_ACCOUNT_NAME));


+ 97
- 96
patches/src-fix/fix-safe-browsing-prefs.patch View File

@ -3,98 +3,36 @@ Date: Fri, 10 Jan 2020 18:01:56 -0500
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 | 8 ++--
chrome/android/BUILD.gn | 1
chrome/android/chrome_java_sources.gni | 1
chrome/android/java/src/org/chromium/chrome/browser/settings/sync/SyncAndServicesPreferences.java | 19 ++--------
chrome/android/java/src/org/chromium/chrome/browser/webshare/ShareServiceImpl.java | 3 -
chrome/browser/android/preferences/prefs.h | 2 -
weblayer/browser/profile_impl.cc | 2 -
8 files changed, 10 insertions(+), 28 deletions(-)
android_webview/browser/aw_browser_context.cc | 2 -
android_webview/browser/safe_browsing/aw_safe_browsing_blocking_page.cc | 8 ++--
chrome/android/BUILD.gn | 1
chrome/android/chrome_java_sources.gni | 1
chrome/android/java/src/org/chromium/chrome/browser/settings/sync/SyncAndServicesSettings.java | 19 ++--------
chrome/android/java/src/org/chromium/chrome/browser/webshare/ShareServiceImpl.java | 3 -
chrome/browser/android/preferences/prefs.h | 2 -
weblayer/browser/browser_context_impl.cc | 3 -
8 files changed, 10 insertions(+), 29 deletions(-)
--- a/chrome/android/BUILD.gn
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -2780,7 +2780,6 @@ generate_jni("chrome_jni_headers") {
@@ -2762,7 +2762,6 @@ generate_jni("chrome_jni_headers") {
"java/src/org/chromium/chrome/browser/rappor/RapporServiceBridge.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/search_engines/TemplateUrlServiceFactory.java",
"java/src/org/chromium/chrome/browser/send_tab_to_self/NotificationManager.java",
"java/src/org/chromium/chrome/browser/send_tab_to_self/SendTabToSelfAndroidBridge.java",
--- a/chrome/android/chrome_java_sources.gni
+++ b/chrome/android/chrome_java_sources.gni
@@ -1315,7 +1315,6 @@ chrome_java_sources = [
@@ -1336,7 +1336,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/rappor/RapporServiceBridge.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/search_engines/SearchEngineChoiceMetrics.java",
"java/src/org/chromium/chrome/browser/search_engines/SearchEngineChoiceNotification.java",
"java/src/org/chromium/chrome/browser/search_engines/TemplateUrlServiceFactory.java",
--- a/chrome/android/java/src/org/chromium/chrome/browser/settings/sync/SyncAndServicesPreferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/sync/SyncAndServicesPreferences.java
@@ -45,7 +45,6 @@ import org.chromium.chrome.browser.metri
import org.chromium.chrome.browser.preferences.Pref;
import org.chromium.chrome.browser.preferences.PrefServiceBridge;
import org.chromium.chrome.browser.profiles.Profile;
-import org.chromium.chrome.browser.safe_browsing.SafeBrowsingBridge;
import org.chromium.chrome.browser.settings.ChromeBasePreference;
import org.chromium.chrome.browser.settings.ChromeSwitchPreference;
import org.chromium.chrome.browser.settings.ManagedPreferenceDelegate;
@@ -365,17 +364,9 @@ public class SyncAndServicesPreferences
PostTask.postTask(UiThreadTaskTraits.DEFAULT, this::updatePreferences);
} else if (PREF_SEARCH_SUGGESTIONS.equals(key)) {
mPrefServiceBridge.setBoolean(Pref.SEARCH_SUGGEST_ENABLED, (boolean) newValue);
- } else if (PREF_SAFE_BROWSING.equals(key)) {
- mPrefServiceBridge.setBoolean(Pref.SAFE_BROWSING_ENABLED, (boolean) newValue);
- // Toggling the safe browsing preference impacts the leak detection and the
- // safe browsing reporting preferences as well.
- PostTask.postTask(UiThreadTaskTraits.DEFAULT,
- this::updateLeakDetectionAndSafeBrowsingReportingPreferences);
} else if (PREF_PASSWORD_LEAK_DETECTION.equals(key)) {
mPrefServiceBridge.setBoolean(
Pref.PASSWORD_MANAGER_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)) {
@@ -601,7 +592,6 @@ public class SyncAndServicesPreferences
mSearchSuggestions.setChecked(mPrefServiceBridge.getBoolean(Pref.SEARCH_SUGGEST_ENABLED));
mNavigationError.setChecked(
mPrefServiceBridge.getBoolean(Pref.ALTERNATE_ERROR_PAGES_ENABLED));
- mSafeBrowsing.setChecked(mPrefServiceBridge.getBoolean(Pref.SAFE_BROWSING_ENABLED));
updateLeakDetectionAndSafeBrowsingReportingPreferences();
@@ -667,10 +657,9 @@ public class SyncAndServicesPreferences
* its appearance needs to be updated. The same goes for safe browsing reporting.
*/
private void updateLeakDetectionAndSafeBrowsingReportingPreferences() {
- boolean safe_browsing_enabled = mPrefServiceBridge.getBoolean(Pref.SAFE_BROWSING_ENABLED);
+ boolean safe_browsing_enabled = false;
mSafeBrowsingReporting.setEnabled(safe_browsing_enabled);
- mSafeBrowsingReporting.setChecked(safe_browsing_enabled
- && SafeBrowsingBridge.isSafeBrowsingExtendedReportingEnabled());
+ mSafeBrowsingReporting.setChecked(false);
if (mPasswordLeakDetection == null) return; // Early exit without leak detection to update.
@@ -700,10 +689,10 @@ public class SyncAndServicesPreferences
return mPrefServiceBridge.isManagedPreference(Pref.SEARCH_SUGGEST_ENABLED);
}
if (PREF_SAFE_BROWSING_SCOUT_REPORTING.equals(key)) {
- return SafeBrowsingBridge.isSafeBrowsingExtendedReportingManaged();
+ return false;
}
if (PREF_SAFE_BROWSING.equals(key)) {
- return mPrefServiceBridge.isManagedPreference(Pref.SAFE_BROWSING_ENABLED);
+ return false;
}
if (PREF_PASSWORD_LEAK_DETECTION.equals(key)) {
return mPrefServiceBridge.isManagedPreference(
--- a/chrome/android/java/src/org/chromium/chrome/browser/webshare/ShareServiceImpl.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webshare/ShareServiceImpl.java
@@ -20,7 +20,6 @@ import org.chromium.base.task.PostTask;
@ -127,7 +65,7 @@ Subject: Fix build error caused by the removal of safe_browsing_prefs.h
// The default value '0' represents the latest Chrome major version on which
--- a/android_webview/browser/safe_browsing/aw_safe_browsing_blocking_page.cc
+++ b/android_webview/browser/safe_browsing/aw_safe_browsing_blocking_page.cc
@@ -114,11 +114,11 @@ AwSafeBrowsingBlockingPage* AwSafeBrowsi
@@ -123,11 +123,11 @@ AwSafeBrowsingBlockingPage* AwSafeBrowsi
BaseSafeBrowsingErrorUI::SBErrorDisplayOptions display_options =