Browse Source

Update to 83.0.4103.61; add extension option page

tags/83.0.4103.61-1
wchen342 10 months ago
parent
commit
fdc1088d9d
Signed by untrusted user: wchen342 GPG Key ID: 720B70365E800508
49 changed files with 3717 additions and 2642 deletions
  1. +2
    -4
      android_flags.gn
  2. +1
    -0
      android_flags.release.gn
  3. +7
    -1
      build.sh
  4. +285
    -285
      domain_sub_2.list
  5. +12
    -11
      misc/android_studio_setup.sh
  6. +2
    -2
      patches/Bromite/Add-exit-menu-item.patch
  7. +7
    -7
      patches/Bromite/Add-flag-to-disable-WebGL.patch
  8. +8
    -8
      patches/Bromite/Add-flags-to-disable-device-motion-and-orientation-APIs.patch
  9. +27
    -25
      patches/Bromite/Add-option-to-not-persist-tabs-across-sessions.patch
  10. +166
    -147
      patches/Bromite/Add-user-setting-for-DNS-over-HTTPS-DoH-custom-URL.patch
  11. +49
    -0
      patches/Bromite/Change-default-webRTC-policy-to-not-use-any-address.patch
  12. +0
    -95
      patches/Bromite/Disable-AImageReader-for-ARM64-P-and-ARM64-Q.patch
  13. +0
    -28
      patches/Bromite/Download-on-Android-Q-Remove-a-DCHECK-in-CreateReservation.patch
  14. +87
    -0
      patches/Bromite/Remove-account-permissions-from-manifest.patch
  15. +8
    -8
      patches/Bromite/Revert-flags-remove-disable-pull-to-refresh-effect.patch
  16. +0
    -44
      patches/Bromite/Use-a-minimum-DoH-timeout-of-400ms.patch
  17. +185
    -177
      patches/Kiwi/gn.patch
  18. +90
    -74
      patches/Kiwi/res.patch
  19. +769
    -621
      patches/Kiwi/src.patch
  20. +16
    -53
      patches/Unobtainium/kill-Auth.patch
  21. +346
    -268
      patches/Unobtainium/kill-GCM.patch
  22. +1
    -1
      patches/Unobtainium/kill-TOS-and-metrics-opt-out.patch
  23. +3
    -4
      patches/Unobtainium/kill-Translate.patch
  24. +22
    -10
      patches/Unobtainium/kill-Vision.patch
  25. +1
    -1
      patches/Vanadium/0020-disable-media-router-media-remoting-by-default.patch
  26. +2
    -2
      patches/Vanadium/0021-disable-media-router-by-default.patch
  27. +42
    -51
      patches/debug-fix.patch
  28. +4
    -5
      patches/series
  29. +1
    -1
      patches/src-fix/fix-manifest-merger-path.patch
  30. +7
    -7
      patches/src-fix/fix-prefs.patch
  31. +38
    -57
      patches/src-fix/fix-safe-browsing-prefs.patch
  32. +1
    -1
      patches/src-fix/fix-unkown-warning-clang-9.patch
  33. +70
    -15
      patches/ungoogled-chromium-android/Add-folder-button-bookmark.patch
  34. +230
    -112
      patches/ungoogled-chromium-android/Add-more-search-engines.patch
  35. +1
    -1
      patches/ungoogled-chromium-android/Disable-contextual-search.patch
  36. +31
    -0
      patches/ungoogled-chromium-android/Mark-http-as-dangerous-mixed-content-warning.patch
  37. +4
    -3
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gcm.patch
  38. +243
    -104
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.auth.patch
  39. +41
    -35
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.cast.patch
  40. +74
    -120
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.common-auth-signin-dynamic-com.google.android.gms.tasks.patch
  41. +632
    -38
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.fido-com.google.android.gms.iid-com.google.android.gms.instantapps-com.google.android.gms.location.patch
  42. +10
    -7
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.flags-com.google.android.gms.location.places-com.google.android.gms.stats.patch
  43. +44
    -125
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.gcm.patch
  44. +116
    -51
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.vision-com.google.android.gms.clearcut-com.google.android.gms.phenotype.patch
  45. +6
    -6
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.core.splitcompat-com.google.android.play.core.splitinstall.patch
  46. +4
    -16
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.patch
  47. +7
    -6
      patches/ungoogled-chromium-android/change-package-name-chromium.patch
  48. +12
    -4
      patches/ungoogled-main-repo-fix.patch
  49. +3
    -1
      pruning_2.list

+ 2
- 4
android_flags.gn View File

@ -3,17 +3,15 @@ android_ndk_root = "//third_party/android_ndk"
android_ndk_version = "r20b"
android_ndk_major_version = 20
android_sdk_build_tools_version="29.0.2"
android_sdk_tools_version_suffix="-26.2.0-dev"
android_sdk_version=29
clang_base_path="/usr"
disable_android_lint=true
enable_gvr_services=false
enable_resource_whitelist_generation=false
exclude_unwind_tables=true
enable_supervised_users=false
ffmpeg_branding="Chrome"
is_clang=true
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_gnome_keyring=false
use_sysroot=false

+ 1
- 0
android_flags.release.gn View File

@ -4,6 +4,7 @@ disable_autofill_assistant_dfm=true
disable_tab_ui_dfm=true
enable_iterator_debugging=false
enable_swiftshader=false
exclude_unwind_tables=true
fatal_linker_warnings=false
is_component_build=false
is_debug=false


+ 7
- 1
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=81.0.4044.138
chromium_version=83.0.4103.61
ungoogled_chromium_revision=1
# Argument parser from https://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash/29754866#29754866
@ -195,6 +195,7 @@ mkdir platforms
ln -s ../../../../../android-sdk/${SDK_DIR}/platforms/android-10 platforms/android-29
ln -s ../../../../android-sdk/${SDK_DIR}/platform-tools platform-tools
ln -s ../../../../android-sdk/${SDK_DIR}/tools tools
#TODO: Regression: third_party/android_sdk/public/cmdline-tools doesn't yet have a rebuilt counterpart, so the folder needs to be copied manually from the synced source
popd
# remove ndk folders
@ -276,6 +277,11 @@ export NM=${NM:=llvm-nm}
export CC=${CC:=clang}
export CXX=${CXX:=clang++}
# Link to system clang tools
pushd src/buildtools/linux64
ln -s /usr/bin/clang-format
popd
## Build
pushd src
ninja -C out/Default $TARGET


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


+ 12
- 11
misc/android_studio_setup.sh View File

@ -1,9 +1,9 @@
#!/usr/bin/env bash
set -eux -o pipefail
chromium_version=81.0.4044.138
chromium_version=83.0.4103.61
chrome_target=chrome_public_apk
monochrome_target=monochrome_public_apk
mono_target=monochrome_public_apk
webview_target=system_webview_apk
# Create symbol links to gn, depot-tools
@ -23,13 +23,6 @@ export NM=${NM:=llvm-nm}
export CC=${CC:=clang}
export CXX=${CXX:=clang++}
# Need different GN flags than a release build
pushd src
output_folder=out/Debug_apk
mkdir -p ${output_folder}
cat ../android_flags.debug.gn ../android_flags.gn > ${output_folder}/args.gn
popd
# Fix repos
ui_automator_commit=$(grep 'ub-uiautomator\.git' src/DEPS | cut -d\' -f10)
mkdir src/third_party/ub-uiautomator/lib
@ -58,6 +51,13 @@ git fetch --depth 1 --no-tags origin "${netty4_commit}"
git reset --hard FETCH_HEAD
popd
# Need different GN flags than a release build
pushd src
output_folder=out/Debug_apk
mkdir -p ${output_folder}
cat ../android_flags.debug.gn ../android_flags.gn > ${output_folder}/args.gn
printf '\ntarget_cpu="arm64"\n' >> ${output_folder}/args.gn
popd
# Run gn first
pushd src
@ -66,7 +66,7 @@ popd
# Compile apk
pushd src
ninja -C ${output_folder} ${monochrome_target}
ninja -C ${output_folder} ${mono_target}
popd
###
@ -75,6 +75,7 @@ pushd src
output_folder=out/Debug
mkdir -p ${output_folder}
cat ../android_flags.debug.gn ../android_flags.gn > ${output_folder}/args.gn
printf '\ntarget_cpu="arm64"\n' >> ${output_folder}/args.gn
# Run gn first
gn gen ${output_folder} --fail-on-unused-args
@ -85,5 +86,5 @@ 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}
python build/android/gradle/generate_gradle.py --target //chrome/android:${mono_target} --output-directory ${output_folder}
popd

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

@ -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
@@ -2078,6 +2078,8 @@ public abstract class ChromeActivity<C e
@@ -1994,6 +1994,8 @@ public abstract class ChromeActivity<C e
AddToHomescreenCoordinator.showForAppMenu(
this, getWindowAndroid(), getModalDialogManager(), currentTab.getWebContents());
RecordUserAction.record("MobileMenuAddToHomescreen");
@ -49,7 +49,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
@@ -2854,6 +2854,9 @@ To change this setting, <ph name="BEGIN_
@@ -2876,6 +2876,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>


+ 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
@@ -1605,6 +1605,9 @@ const FeatureEntry kFeatureEntries[] = {
@@ -1826,6 +1826,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
@@ -414,6 +414,10 @@ const char kDevtoolsExperimentsDescripti
"Enables Developer Tools experiments. Use Settings panel in Developer "
"Tools to toggle individual experiments.";
@@ -401,6 +401,10 @@ const char kDeviceDiscoveryNotifications
const char kDeviceDiscoveryNotificationsDescription[] =
"Device discovery notifications on local network.";
+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
@@ -264,6 +264,9 @@ extern const char kDeviceDiscoveryNotifi
extern const char kDevtoolsExperimentsName[];
extern const char kDevtoolsExperimentsDescription[];
@@ -255,6 +255,9 @@ extern const char kDebugShortcutsDescrip
extern const char kDeviceDiscoveryNotificationsName[];
extern const char kDeviceDiscoveryNotificationsDescription[];
+extern const char kDisableWebGLName[];
+extern const char kDisableWebGLDescription[];


+ 8
- 8
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
@@ -1824,6 +1824,12 @@ const FeatureEntry kFeatureEntries[] = {
@@ -2045,6 +2045,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
@@ -598,6 +598,14 @@ const char kWinrtSensorsImplementationDe
@@ -600,6 +600,14 @@ const char kWinrtSensorsImplementationDe
"Enables usage of the Windows.Devices.Sensors WinRT APIs on Windows for "
"sensors";
@ -78,7 +78,7 @@ legacy acceleration events.
#else
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -756,6 +756,16 @@ const base::Feature kExperimentalProduct
@@ -781,6 +781,16 @@ const base::Feature kWebOtpBackend{"kWeb
// TODO(rouslan): Remove this.
const base::Feature kWebPayments{"WebPayments",
base::FEATURE_ENABLED_BY_DEFAULT};
@ -93,11 +93,11 @@ legacy acceleration events.
+ base::FEATURE_DISABLED_BY_DEFAULT};
+
// Makes WebRTC use ECDSA certs by default (i.e., when no cert type was
// specified in JS).
// Minimal user interface experience for payments on the web.
const base::Feature kWebPaymentsMinimalUI{"WebPaymentsMinimalUI",
--- a/content/public/common/content_features.h
+++ b/content/public/common/content_features.h
@@ -165,6 +165,8 @@ CONTENT_EXPORT extern const base::Featur
@@ -171,6 +171,8 @@ CONTENT_EXPORT extern const base::Featur
CONTENT_EXPORT extern const base::Feature kWebXrIncubations;
CONTENT_EXPORT extern const base::Feature kWebXrPermissionsApi;
@ -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
@@ -245,9 +245,12 @@ void ModulesInitializer::InitInspectorAg
@@ -244,9 +244,12 @@ void ModulesInitializer::InitInspectorAg
void ModulesInitializer::OnClearWindowObjectInMainWorld(
Document& document,
const Settings& settings) const {
@ -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
@@ -1172,6 +1172,14 @@
@@ -1203,6 +1203,14 @@
status: "experimental",
},
{


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

@ -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/settings/privacy/PrivacySettings.java | 12 ++++++++++
chrome/browser/ui/android/strings/android_chrome_strings.grd | 6 +++++
5 files changed, 29 insertions(+), 1 deletion(-)
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(-)
--- a/chrome/android/java/res/values/values.xml
+++ b/chrome/android/java/res/values/values.xml
@ -24,21 +24,21 @@ Subject: Add option to not persist tabs across sessions
--- a/chrome/android/java/res/xml/privacy_preferences.xml
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
@@ -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
@@ -19,6 +19,11 @@
android:key="usage_stats_reporting"
android:title="@string/usage_stats_setting_title"
android:persistent="false" />
+ <org.chromium.components.browser_ui.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" />
<Preference
android:key="clear_browsing_data"
android:title="@string/clear_browsing_data_title"
android:fragment="org.chromium.chrome.browser.privacy.settings.DoNotTrackSettings"
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
@@ -1103,8 +1103,10 @@ public class ChromeTabbedActivity extend
@@ -1092,8 +1092,10 @@ public class ChromeTabbedActivity
boolean hadCipherData =
CipherFactory.getInstance().restoreFromBundle(getSavedInstanceState());
@ -50,25 +50,25 @@ Subject: Add option to not persist tabs across sessions
if (noRestoreState) {
// Clear the state files because they are inconsistent and useless from now on.
mTabModelSelectorImpl.clearState();
--- 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
--- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
@@ -4,6 +4,7 @@
package org.chromium.chrome.browser.settings.privacy;
package org.chromium.chrome.browser.privacy.settings;
+import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.graphics.drawable.VectorDrawableCompat;
import android.support.v7.preference.CheckBoxPreference;
@@ -13,6 +14,7 @@ import android.view.Menu;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
@@ -14,6 +15,7 @@ import androidx.preference.Preference;
import androidx.preference.PreferenceFragmentCompat;
import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat;
+import org.chromium.base.ContextUtils;
import org.chromium.base.BuildInfo;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.help.HelpAndFeedback;
@@ -35,6 +37,7 @@ public class PrivacySettings
@@ -37,6 +39,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";
@ -76,18 +76,20 @@ Subject: Add option to not persist tabs across sessions
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 PrivacySettings
@@ -84,7 +87,11 @@ 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;
@@ -130,6 +137,11 @@ public class PrivacySettings
}
@@ -132,6 +139,11 @@ public class PrivacySettings
} else {
getPreferenceScreen().removePreference(usageStatsPref);
}
@ -101,7 +103,7 @@ Subject: Add option to not persist tabs across sessions
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -3638,6 +3638,12 @@ Only you can see what your camera is loo
@@ -3674,6 +3674,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>


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

@ -3,28 +3,47 @@ Date: Sat, 23 Nov 2019 10:55:16 +0100
Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
---
chrome/android/chrome_java_sources.gni | 2
chrome/android/java/res/layout/doh_editor.xml | 65 +++++++
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
chrome/android/java/src/org/chromium/chrome/browser/flags/FeatureUtilities.java | 24 ++
chrome/android/java/src/org/chromium/chrome/browser/settings/DoHEditor.java | 92 ++++++++++
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 | 41 ----
chrome/browser/ui/android/strings/android_chrome_strings.grd | 11 +
chrome/common/chrome_features.cc | 4
13 files changed, 320 insertions(+), 34 deletions(-)
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/values/values.xml | 2
chrome/android/java/res/xml/doh_preferences.xml | 25 ++
chrome/android/java/res/xml/privacy_preferences.xml | 5
chrome/android/java/src/org/chromium/chrome/browser/settings/DoHEditor.java | 92 ++++++++++
chrome/android/java/src/org/chromium/chrome/browser/settings/DoHPreferences.java | 54 +++++
chrome/app/generated_resources.grd | 6
chrome/browser/flags/android/cached_feature_flags.cc | 24 ++
chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java | 24 ++
chrome/browser/net/stub_resolver_config_reader.cc | 40 ----
chrome/browser/ui/android/strings/android_chrome_strings.grd | 11 +
chrome/common/chrome_features.cc | 4
14 files changed, 322 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
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/settings/DoHPreferences.java
--- a/chrome/android/chrome_java_resources.gni
+++ b/chrome/android/chrome_java_resources.gni
@@ -1107,6 +1107,7 @@ chrome_java_resources = [
"java/res/layout/device_item_list.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",
@@ -1346,6 +1347,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",
+ "java/res/xml/doh_preferences.xml",
"java/res/xml/do_not_track_preferences.xml",
"java/res/xml/download_preferences.xml",
"java/res/xml/homepage_preferences.xml",
--- a/chrome/android/chrome_java_sources.gni
+++ b/chrome/android/chrome_java_sources.gni
@@ -1345,6 +1345,8 @@ chrome_java_sources = [
@@ -1399,6 +1399,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",
@ -124,7 +143,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
+
+ <org.chromium.chrome.browser.settings.ChromeSwitchPreference
+ <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
+ android:key="doh_switch"
+ android:summaryOn="@string/text_on"
+ android:summaryOff="@string/text_off" />
@ -151,49 +170,9 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+ android:key="doh"
+ android:title="@string/options_doh_title"
+ android:summary="@string/options_doh_summary" />
<org.chromium.chrome.browser.settings.ChromeBaseCheckBoxPreference
<org.chromium.components.browser_ui.settings.ChromeBaseCheckBoxPreference
android:key="preload_pages"
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
@@ -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.
+ * @param url Whether custom URL is enabled or not.
+ */
+ public static void setDoHEnabled(boolean enabled) {
+ FeatureUtilitiesJni.get().setDoHEnabled(enabled);
+ }
+
+ public static boolean getDoHEnabled() {
+ return FeatureUtilitiesJni.get().getDoHEnabled();
+ }
+
+ public static void setDoHTemplates(String t) {
+ FeatureUtilitiesJni.get().setDoHTemplates(t);
+ }
+
+ public static String getDoHTemplates() {
+ return FeatureUtilitiesJni.get().getDoHTemplates();
+ }
+
/**
* 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);
+ String getDoHTemplates();
boolean isNetworkServiceWarmUpEnabled();
}
}
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/settings/DoHEditor.java
@@ -0,0 +1,92 @@
@ -213,8 +192,8 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+import android.widget.Button;
+import android.widget.EditText;
+
+import org.chromium.chrome.browser.settings.SettingsUtils;
+import org.chromium.chrome.browser.flags.FeatureUtilities;
+import org.chromium.components.browser_ui.settings.SettingsUtils;
+import org.chromium.chrome.browser.flags.CachedFeatureFlags;
+import org.chromium.chrome.R;
+import org.chromium.components.url_formatter.UrlFormatter;
+
@ -237,7 +216,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+ scrollView.getViewTreeObserver().addOnScrollChangedListener(
+ SettingsUtils.getShowShadowOnScrollListener(v, v.findViewById(R.id.shadow)));
+ mDoHUrlEdit = (EditText) v.findViewById(R.id.doh_url_edit);
+ mDoHUrlEdit.setText(FeatureUtilities.getDoHTemplates());
+ mDoHUrlEdit.setText(CachedFeatureFlags.getDoHTemplates());
+ mDoHUrlEdit.addTextChangedListener(this);
+ mDoHUrlEdit.requestFocus();
+
@ -264,7 +243,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+ mResetButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ mDoHUrlEdit.setText(FeatureUtilities.getDoHTemplates());
+ mDoHUrlEdit.setText(CachedFeatureFlags.getDoHTemplates());
+ getActivity().finish();
+ }
+ });
@ -274,7 +253,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+ mSaveButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ FeatureUtilities.setDoHTemplates(
+ CachedFeatureFlags.setDoHTemplates(
+ mDoHUrlEdit.getText().toString());
+ getActivity().finish();
+ }
@ -299,12 +278,12 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+package org.chromium.chrome.browser.settings;
+
+import android.os.Bundle;
+import android.support.v7.preference.Preference;
+import android.support.v7.preference.PreferenceFragmentCompat;
+import org.chromium.chrome.browser.settings.ChromeSwitchPreference;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceFragmentCompat;
+import org.chromium.components.browser_ui.settings.ChromeSwitchPreference;
+
+import org.chromium.chrome.browser.settings.SettingsUtils;
+import org.chromium.chrome.browser.flags.FeatureUtilities;
+import org.chromium.components.browser_ui.settings.SettingsUtils;
+import org.chromium.chrome.browser.flags.CachedFeatureFlags;
+import androidx.annotation.VisibleForTesting;
+import org.chromium.chrome.R;
+
@ -325,10 +304,10 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+
+ ChromeSwitchPreference mDoHSwitch =
+ (ChromeSwitchPreference) findPreference(PREF_DOH_SWITCH);
+ boolean isDoHEnabled = FeatureUtilities.getDoHEnabled();
+ boolean isDoHEnabled = CachedFeatureFlags.getDoHEnabled();
+ mDoHSwitch.setChecked(isDoHEnabled);
+ mDoHSwitch.setOnPreferenceChangeListener((preference, newValue) -> {
+ FeatureUtilities.setDoHEnabled((boolean) newValue);
+ CachedFeatureFlags.setDoHEnabled((boolean) newValue);
+ return true;
+ });
+
@ -337,7 +316,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+ }
+
+ private void updateCurrentDoHUrl() {
+ mDoHEdit.setSummary(FeatureUtilities.getDoHTemplates());
+ mDoHEdit.setSummary(CachedFeatureFlags.getDoHTemplates());
+ }
+
+ @Override
@ -348,120 +327,160 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+}
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -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>
@@ -6864,6 +6864,12 @@ the Bookmarks menu.">
</if>
<if expr="is_android">
+ <message name="IDS_OPTIONS_DOH_TITLE" desc="The title of the DNS-over-HTTPS option on Android" formatter_data="android_java">
+ Secure DNS
+ </message>
+ <message name="IDS_OPTIONS_DOH_SUMMARY" desc="The title of the DNS-over-HTTPS summary on Android" formatter_data="android_java">
+ Configure DNS-over-HTTPS (DoH) secure DNS
+ </message>
</if>
<!-- Autofill dialog: field labels. -->
--- a/chrome/browser/android/feature_utilities.cc
+++ b/chrome/browser/android/feature_utilities.cc
@@ -7,6 +7,9 @@
#include "chrome/android/chrome_jni_headers/FeatureUtilities_jni.h"
<message name="IDS_OPTIONS_HOMEPAGE_TITLE" desc="The title of Chrome's homepage setting screen on Android. " formatter_data="android_java">
Homepage
</message>
--- a/chrome/browser/flags/android/cached_feature_flags.cc
+++ b/chrome/browser/flags/android/cached_feature_flags.cc
@@ -11,6 +11,10 @@
#include "content/public/common/content_features.h"
#include "content/public/common/network_service_util.h"
#include "base/android/jni_string.h"
+#include "chrome/browser/browser_process.h"
+#include "components/prefs/pref_service.h"
+#include "chrome/common/pref_names.h"
#include "content/public/common/content_features.h"
#include "content/public/common/network_service_util.h"
@@ -37,3 +40,23 @@ static jboolean JNI_FeatureUtilities_IsN
+
using base::android::ConvertJavaStringToUTF8;
using base::android::ConvertUTF8ToJavaString;
using base::android::JavaParamRef;
@@ -41,3 +45,23 @@ static jboolean JNI_CachedFeatureFlags_I
return content::IsOutOfProcessNetworkService() &&
base::FeatureList::IsEnabled(features::kWarmUpNetworkProcess);
}
+
+static jboolean JNI_FeatureUtilities_GetDoHEnabled(JNIEnv* env) {
+static jboolean JNI_CachedFeatureFlags_GetDoHEnabled(JNIEnv* env) {
+ std::string doh_mode = g_browser_process->local_state()->GetString(prefs::kDnsOverHttpsMode);
+ return ((doh_mode == "secure") || (doh_mode == "auto"));
+}
+
+static void JNI_FeatureUtilities_SetDoHEnabled(JNIEnv* env, jboolean enabled) {
+static void JNI_CachedFeatureFlags_SetDoHEnabled(JNIEnv* env, jboolean enabled) {
+ if (enabled)
+ g_browser_process->local_state()->SetString(prefs::kDnsOverHttpsMode, "secure");
+ else
+ g_browser_process->local_state()->SetString(prefs::kDnsOverHttpsMode, "off");
+}
+
+static ScopedJavaLocalRef<jstring> JNI_FeatureUtilities_GetDoHTemplates(JNIEnv* env) {
+static ScopedJavaLocalRef<jstring> JNI_CachedFeatureFlags_GetDoHTemplates(JNIEnv* env) {
+ return base::android::ConvertUTF8ToJavaString(env, g_browser_process->local_state()->GetString(prefs::kDnsOverHttpsTemplates));
+}
+
+static void JNI_FeatureUtilities_SetDoHTemplates(JNIEnv* env, const JavaParamRef<jstring>& templates) {
+static void JNI_CachedFeatureFlags_SetDoHTemplates(JNIEnv* env, const JavaParamRef<jstring>& templates) {
+ g_browser_process->local_state()->SetString(prefs::kDnsOverHttpsTemplates, base::android::ConvertJavaStringToUTF8(env, templates));
+}
--- a/chrome/browser/net/system_network_context_manager.cc
+++ b/chrome/browser/net/system_network_context_manager.cc
@@ -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_templates = "";
- if (base::FeatureList::IsEnabled(features::kDnsOverHttps)) {
- if (features::kDnsOverHttpsFallbackParam.Get()) {
- default_doh_mode = chrome_browser_net::kDnsOverHttpsModeAutomatic;
- } else {
- default_doh_mode = chrome_browser_net::kDnsOverHttpsModeSecure;
--- 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
@@ -124,6 +124,26 @@ public class CachedFeatureFlags {
private static Map<String, String> sOverridesTestFeatures;
private static String sReachedCodeProfilerTrialGroup;
+ /**
+ * Records whether custom URL for DoH is enabled with native-side feature utilities.
+ * @param url Whether custom URL is enabled or not.
+ */
+ public static void setDoHEnabled(boolean enabled) {
+ CachedFeatureFlagsJni.get().setDoHEnabled(enabled);
+ }
+
+ public static boolean getDoHEnabled() {
+ return CachedFeatureFlagsJni.get().getDoHEnabled();
+ }
+
+ public static void setDoHTemplates(String t) {
+ CachedFeatureFlagsJni.get().setDoHTemplates(t);
+ }
+
+ public static String getDoHTemplates() {
+ return CachedFeatureFlagsJni.get().getDoHTemplates();
+ }
+
/**
* Checks if a cached feature flag is enabled.
*
@@ -393,6 +413,10 @@ public class CachedFeatureFlags {
@NativeMethods
interface Natives {
+ void setDoHEnabled(boolean enabled);
+ boolean getDoHEnabled();
+ void setDoHTemplates(String templates);
+ String getDoHTemplates();
boolean isNetworkServiceWarmUpEnabled();
}
}
--- a/chrome/browser/net/stub_resolver_config_reader.cc
+++ b/chrome/browser/net/stub_resolver_config_reader.cc
@@ -122,41 +122,12 @@ StubResolverConfigReader::StubResolverCo
local_state_->SetDefaultPrefValue(prefs::kBuiltInDnsClientEnabled,
base::Value(ShouldEnableAsyncDns()));
std::string default_doh_mode = chrome_browser_net::kDnsOverHttpsModeOff;
- std::string default_doh_templates;
- if (base::FeatureList::IsEnabled(features::kDnsOverHttps)) {
- if (features::kDnsOverHttpsFallbackParam.Get()) {
- default_doh_mode = chrome_browser_net::kDnsOverHttpsModeAutomatic;
- } else {
- default_doh_mode = chrome_browser_net::kDnsOverHttpsModeSecure;
- }
- default_doh_templates = features::kDnsOverHttpsTemplatesParam.Get();
- }
- default_doh_templates = features::kDnsOverHttpsTemplatesParam.Get();
- }
+ std::string default_doh_templates = features::kDnsOverHttpsTemplatesParam.Get();
local_state_->SetDefaultPrefValue(prefs::kDnsOverHttpsMode,
base::Value(default_doh_mode));
local_state_->SetDefaultPrefValue(prefs::kDnsOverHttpsTemplates,
base::Value(default_doh_templates));
+ std::string default_doh_templates = features::kDnsOverHttpsTemplatesParam.Get();
local_state_->SetDefaultPrefValue(prefs::kDnsOverHttpsMode,
base::Value(default_doh_mode));
local_state_->SetDefaultPrefValue(prefs::kDnsOverHttpsTemplates,
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
- // prefs value if the user has changed their chrome://flags selection to the
- // default.
- flags_ui::PrefServiceFlagsStorage flags_storage(local_state_);
- std::set<std::string> entries = flags_storage.GetFlags();
- if (entries.count("[email protected]")) {
- // The user has "Enabled" selected.
- local_state_->SetString(prefs::kDnsOverHttpsMode,
- chrome_browser_net::kDnsOverHttpsModeAutomatic);
- } else if (entries.count("[email protected]")) {
- // The user has "Disabled" selected.
- local_state_->SetString(prefs::kDnsOverHttpsMode,
- chrome_browser_net::kDnsOverHttpsModeOff);
- } else {
- // The user has "Default" selected.
- local_state_->ClearPref(prefs::kDnsOverHttpsMode);
- }
-
PrefChangeRegistrar::NamedChangeCallback dns_pref_callback =
base::BindRepeating(&OnStubResolverConfigChanged,
base::Unretained(local_state_));
@@ -545,9 +517,14 @@ void SystemNetworkContextManager::GetStu
- // If the user has explicitly enabled or disabled the DoH experiment in
- // chrome://flags and the DoH UI setting is not visible, store that choice
- // in the user prefs so that it can be persisted after the experiment ends.
- // Also make sure to remove the stored prefs value if the user has changed
- // their chrome://flags selection to the default.
- if (!features::kDnsOverHttpsShowUiParam.Get()) {
- flags_ui::PrefServiceFlagsStorage flags_storage(local_state_);
- std::set<std::string> entries = flags_storage.GetFlags();
- if (entries.count("[email protected]")) {
- // The user has "Enabled" selected.
- local_state_->SetString(prefs::kDnsOverHttpsMode,
- chrome_browser_net::kDnsOverHttpsModeAutomatic);
- } else if (entries.count("[email protected]")) {
- // The user has "Disabled" selected.
- local_state_->SetString(prefs::kDnsOverHttpsMode,
- chrome_browser_net::kDnsOverHttpsModeOff);
- } else {
- // The user has "Default" selected.
- local_state_->ClearPref(prefs::kDnsOverHttpsMode);
- }
- }
}
std::string doh_templates =
local_state->GetString(prefs::kDnsOverHttpsTemplates);
- std::string server_method;
pref_change_registrar_.Add(prefs::kBuiltInDnsClientEnabled, pref_callback);
@@ -346,8 +317,13 @@ void StubResolverConfigReader::GetAndUpd
std::vector<net::DnsOverHttpsServerConfig> dns_over_https_servers;
base::Optional<std::vector<network::mojom::DnsOverHttpsServerPtr>>
servers_mojo;
- if (!doh_templates.empty() &&
- *secure_dns_mode != net::DnsConfig::SecureDnsMode::OFF) {
- secure_dns_mode != net::DnsConfig::SecureDnsMode::OFF) {
+ if (doh_templates.empty()) {
+ *secure_dns_mode = net::DnsConfig::SecureDnsMode::OFF;
+ 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) {
+ 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)) {
for (base::StringPiece server_template :
chrome_browser_net::SplitDohTemplateGroup(doh_templates)) {
if (!net::dns_util::IsValidDohTemplate(server_template, &server_method)) {
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -599,6 +599,17 @@ CHAR-LIMIT guidelines:
@@ -594,6 +594,17 @@ CHAR-LIMIT guidelines:
Chrome Passwords
</message>
@ -477,11 +496,11 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+ </message>
+
<!-- Homepage preferences -->
<message name="IDS_OPTIONS_HOMEPAGE_EDIT_TITLE" desc="The title of the screen that allows users to change the URL that opens when they tap on the home page button in the omnibox.">
Edit home page
<message name="IDS_OPTIONS_HOMEPAGE_EDIT_HINT" desc="Hint for the text edit on Homepage Preference setting, guiding user to enter their customized homepage setting">
Enter custom web address
--- a/chrome/common/chrome_features.cc
+++ b/chrome/common/chrome_features.cc
@@ -293,12 +293,12 @@ const char kDisallowUnsafeHttpDownloadsP
@@ -265,12 +265,12 @@ const base::Feature kDnsHttpssvc{"DnsHtt
// Enable DNS over HTTPS (DoH).
const base::Feature kDnsOverHttps{"DnsOverHttps",


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

@ -0,0 +1,49 @@
From: csagan5 <[email protected]>
Date: Sat, 9 May 2020 14:42:37 +0200
Subject: Change default webRTC policy to not use any address
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 ++--
.../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::PrefRegistrySyncable* registry) {
false);
#endif
// TODO(guoweis): Remove next 2 options at M50.
- registry->RegisterBooleanPref(prefs::kWebRTCMultipleRoutesEnabled, true);
- registry->RegisterBooleanPref(prefs::kWebRTCNonProxiedUdpEnabled, true);
+ registry->RegisterBooleanPref(prefs::kWebRTCMultipleRoutesEnabled, false);
+ registry->RegisterBooleanPref(prefs::kWebRTCNonProxiedUdpEnabled, false);
registry->RegisterStringPref(prefs::kWebRTCIPHandlingPolicy,
blink::kWebRTCIPHandlingDefault);
registry->RegisterStringPref(prefs::kWebRTCUDPPortRange, std::string());
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
@@ -435,12 +435,13 @@ PeerConnectionDependencyFactory::CreatePortAllocator(
port_config.enable_nonproxied_udp = false;
break;
case DEFAULT:
- port_config.enable_multiple_routes = true;
- port_config.enable_nonproxied_udp = true;
+ port_config.enable_multiple_routes = false;
+ port_config.enable_nonproxied_udp = false;
+ port_config.enable_default_local_candidate = false;
break;
}
- VLOG(3) << "WebRTC routing preferences: "
+ LOG(INFO) << "WebRTC routing preferences: "
<< "policy: " << policy
<< ", multiple_routes: " << port_config.enable_multiple_routes
<< ", nonproxied_udp: " << port_config.enable_nonproxied_udp
--
2.17.1

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

@ -1,95 +0,0 @@
From: csagan5 <[email protected]>
Date: Thu, 20 Feb 2020 22:44:06 +0100
Subject: Disable AImageReader for ARM64/P and ARM64/Q
---
chrome/browser/android/chrome_startup_flags.cc | 9 +++++++++
gpu/config/gpu_finch_features.cc | 4 ++++
gpu/config/gpu_util.cc | 8 ++++++++
media/base/media_switches.cc | 4 ++++
4 files changed, 25 insertions(+)
--- a/chrome/browser/android/chrome_startup_flags.cc
+++ b/chrome/browser/android/chrome_startup_flags.cc
@@ -6,6 +6,7 @@
#include "chrome/browser/android/chrome_startup_flags.h"
+#include "base/android/build_info.h"
#include "base/android/jni_android.h"
#include "base/android/jni_string.h"
#include "base/android/scoped_java_ref.h"
@@ -16,6 +17,7 @@
#include "chrome/common/chrome_switches.h"
#include "components/browser_sync/browser_sync_switches.h"
#include "components/dom_distiller/core/dom_distiller_switches.h"
+#include "content/public/common/content_switches.h"
#include "media/base/media_switches.h"
namespace {
@@ -40,6 +42,13 @@ void SetChromeSpecificCommandLineFlags()
if (base::SysInfo::IsLowEndDevice())
SetCommandLineSwitchASCII(switches::kDisableSyncTypes, "Favicon Images");
+#ifdef ARCH_CPU_ARM64
+ // workaround for Android 9/10 crashes on ARM64 CPUs
+ if (base::android::BuildInfo::GetInstance()->sdk_int() >= base::android::SDK_VERSION_P) {
+ SetCommandLineSwitchASCII("disable_aimagereader", "1");
+ }
+#endif
+
// Enable DOM Distiller backend.
SetCommandLineSwitch(switches::kEnableDomDistiller);
}
--- a/gpu/config/gpu_finch_features.cc
+++ b/gpu/config/gpu_finch_features.cc
@@ -15,7 +15,11 @@ namespace features {
#if defined(OS_ANDROID)
// Use android AImageReader when playing videos with MediaPlayer.
const base::Feature kAImageReaderMediaPlayer{"AImageReaderMediaPlayer",
+#ifdef ARCH_CPU_ARM64
+ base::FEATURE_DISABLED_BY_DEFAULT};
+#else
base::FEATURE_ENABLED_BY_DEFAULT};
+#endif
// Used only by webview to disable SurfaceControl.
const base::Feature kDisableSurfaceControlForWebview{
--- a/gpu/config/gpu_util.cc
+++ b/gpu/config/gpu_util.cc
@@ -47,6 +47,9 @@ GpuFeatureStatus GetAndroidSurfaceContro
#if !defined(OS_ANDROID)
return kGpuFeatureStatusDisabled;
#else
+ if (blacklisted_features.count(GPU_FEATURE_TYPE_ANDROID_SURFACE_CONTROL))
+ return kGpuFeatureStatusBlacklisted;
+
if (!gpu_preferences.enable_android_surface_control)
return kGpuFeatureStatusDisabled;
@@ -288,6 +291,11 @@ void AdjustGpuFeatureStatusToWorkarounds
gpu_feature_info->status_values[GPU_FEATURE_TYPE_ACCELERATED_WEBGL2] =
kGpuFeatureStatusBlacklisted;
}
+
+ if (gpu_feature_info->IsWorkaroundEnabled(DISABLE_AIMAGEREADER)) {
+ gpu_feature_info->status_values[GPU_FEATURE_TYPE_ANDROID_SURFACE_CONTROL] =
+ kGpuFeatureStatusBlacklisted;
+ }
}
GPUInfo* g_gpu_info_cache = nullptr;
--- a/media/base/media_switches.cc
+++ b/media/base/media_switches.cc
@@ -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",
+#ifdef ARCH_CPU_ARM64
+ base::FEATURE_DISABLED_BY_DEFAULT};
+#else
base::FEATURE_ENABLED_BY_DEFAULT};
+#endif
// Prevents using SurfaceLayer for videos. This is meant to be used by embedders
// that cannot support SurfaceLayer at the moment.

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

@ -1,28 +0,0 @@
From: Xing Liu <[email protected]>
Date: Tue, 18 Feb 2020 21:10:54 +0000
Subject: Download on Android Q: Remove a DCHECK in CreateReservation.
When resuming a download, the suggested path can be content URI. This
will hit a DCHECK in CreateReservation.
Bug: 1045642
Change-Id: I61c452afafbbc9606f747c84ff18e6b9dc9a0fb6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2062759
Reviewed-by: Min Qin <[email protected]>
Commit-Queue: Xing Liu <[email protected]>
Cr-Commit-Position: refs/heads/[email protected]{#742270}
---
components/download/internal/common/download_path_reservation_tracker.cc | 2 --
1 file changed, 2 deletions(-)
--- a/components/download/internal/common/download_path_reservation_tracker.cc
+++ b/components/download/internal/common/download_path_reservation_tracker.cc
@@ -325,8 +325,6 @@ PathValidationResult ValidatePathAndReso
// - Returns the result of creating the path reservation.
PathValidationResult CreateReservation(const CreateReservationInfo& info,
base::FilePath* reserved_path) {
- DCHECK(info.suggested_path.IsAbsolute());
-
// 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)

+ 87
- 0
patches/Bromite/Remove-account-permissions-from-manifest.patch View File

@ -0,0 +1,87 @@
From: csagan5 <[email protected]>
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
2 files changed, 1 insertion(+), 27 deletions(-)
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -43,23 +43,17 @@ by a child template that "extends" this
{% if target_sdk_version|int > 27 or target_sdk_version == "Q" %}
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
{% endif %}
- <uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.INTERNET"/>
- <uses-permission android:name="android.permission.MANAGE_ACCOUNTS"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.NFC"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
- <uses-permission android:name="android.permission.READ_SYNC_SETTINGS"/>
- <uses-permission android:name="android.permission.READ_SYNC_STATS"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
- <uses-permission android:name="android.permission.USE_CREDENTIALS"/>
<uses-permission-sdk-23 android:name="android.permission.USE_BIOMETRIC"/>
<uses-permission-sdk-23 android:name="android.permission.USE_FINGERPRINT"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
- <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS"/>
{% set enable_vr = enable_vr|default(0) %}
{% if enable_vr == "true" %}
<!-- Indicates use of Android's VR-mode, available only on Android N+. -->
@@ -95,8 +89,6 @@ by a child template that "extends" this
<uses-permission android:name="com.android.browser.permission.WRITE_HISTORY_BOOKMARKS"/>
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
- <uses-permission android:name="com.google.android.apps.now.CURRENT_ACCOUNT_ACCESS" />
-
{% block extra_uses_permissions %}
{% endblock %}
@@ -932,16 +924,6 @@ by a child template that "extends" this
android:resource="@xml/file_paths" />
</provider>
- <!-- Sync adapter for browser invalidation. -->
- <service android:name="org.chromium.chrome.browser.invalidation.ChromeBrowserSyncAdapterService"
- android:exported="false">
- <intent-filter>
- <action android:name="android.content.SyncAdapter" />
- </intent-filter>
- <meta-data android:name="android.content.SyncAdapter"
- android:resource="@xml/syncadapter" />
- </service>
-
<!-- Broadcast receiver that will be notified of account changes -->
<receiver android:name="org.chromium.chrome.browser.services.AccountsChangedReceiver">
<intent-filter>
@@ -1010,14 +992,6 @@ by a child template that "extends" this
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|mcc|mnc|screenLayout|smallestScreenSize"
android:hardwareAccelerated="false" />
- <!-- Notification service for sync. -->
- <service android:name="com.google.ipc.invalidation.ticl.android2.TiclService"
- android:exported="false"/>
- <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"
- android:exported="false"/>
-
<!-- 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 {
mIsSyncable = false;
mChromeSyncEnabled = false;
}
- mMasterSyncEnabled = mSyncContentResolverDelegate.getMasterSyncAutomatically();
+ mMasterSyncEnabled = false;
StrictMode.setThreadPolicy(oldPolicy);
return oldChromeSyncEnabled != mChromeSyncEnabled

+ 8
- 8
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
@@ -2145,6 +2145,10 @@ const FeatureEntry kFeatureEntries[] = {
@@ -2375,6 +2375,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
@@ -70,6 +70,11 @@
@@ -65,6 +65,11 @@
"expiry_milestone": 88
},
{
@ -39,9 +39,9 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
// 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
@@ -2600,6 +2600,10 @@ const char kProcessSharingWithStrictSite
"separated like strict site isolation, but process selection puts multiple "
"site instances in a single process.";
@@ -2575,6 +2575,10 @@ const char kProcessSharingWithStrictSite
const char kQueryTilesName[] = "Show query tiles";
const char kQueryTilesDescription[] = "Shows query tiles in Chrome";
+const char kPullToRefreshEffectName[] = "The pull-to-refresh effect";
+const char kPullToRefreshEffectDescription[] =
@ -52,9 +52,9 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
"Determines what pages the Reader Mode infobar is shown on.";
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -1504,6 +1504,9 @@ extern const char kProcessSharingWithDef
extern const char kProcessSharingWithStrictSiteInstancesName[];
extern const char kProcessSharingWithStrictSiteInstancesDescription[];
@@ -1484,6 +1484,9 @@ extern const char kProcessSharingWithStr
extern const char kQueryTilesName[];
extern const char kQueryTilesDescription[];
+extern const char kPullToRefreshEffectName[];
+extern const char kPullToRefreshEffectDescription[];


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

@ -1,44 +0,0 @@
From: csagan5 <[email protected]>
Date: Thu, 9 Jan 2020 19:59:08 +0100
Subject: Use a minimum DoH timeout of 400ms
---
net/dns/dns_session.cc | 7 ++++++-
net/dns/dns_session.h | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)
--- a/net/dns/dns_session.cc
+++ b/net/dns/dns_session.cc
@@ -118,6 +118,8 @@ DnsSession::DnsSession(const DnsConfig&
socket_pool_->Initialize(&config_.nameservers, net_log);
UMA_HISTOGRAM_CUSTOM_COUNTS("AsyncDNS.ServerCount",
config_.nameservers.size(), 1, 10, 11);
+ // minimum timeout for all DoH requests
+ min_doh_timeout_ = base::TimeDelta::FromMilliseconds(400);
UpdateTimeouts(NetworkChangeNotifier::GetConnectionType());
InitializeServerStats();
}
@@ -334,9 +336,12 @@ base::TimeDelta DnsSession::NextTimeout(
}
base::TimeDelta DnsSession::NextDohTimeout(unsigned doh_server_index) {
- return NextTimeoutHelper(
+ base::TimeDelta timeout = NextTimeoutHelper(
GetServerStats(doh_server_index, true /* is _doh_server */),
0 /* num_backoffs */);
+ if (timeout < min_doh_timeout_)
+ return min_doh_timeout_;
+ return timeout;
}
base::TimeDelta DnsSession::NextTimeoutHelper(ServerStats* server_stats,
--- a/net/dns/dns_session.h
+++ b/net/dns/dns_session.h
@@ -176,6 +176,7 @@ class NET_EXPORT_PRIVATE DnsSession : pu
base::TimeDelta initial_timeout_;
base::TimeDelta max_timeout_;
+ base::TimeDelta min_doh_timeout_;
// TODO(crbug.com/1022059): Move all handling of ServerStats (both for DoH and
// non-DoH) to ResolveContext.

+ 185
- 177
patches/Kiwi/gn.patch View File

@ -3,19 +3,18 @@
build/config/locales.gni | 2
chrome/BUILD.gn | 4
chrome/android/BUILD.gn | 1
chrome/browser/BUILD.gn | 44 -----
chrome/browser/apps/BUILD.gn | 5
chrome/browser/BUILD.gn | 43 +---
chrome/browser/apps/platform_apps/api/music_manager_private/BUILD.gn | 1
chrome/browser/devtools/BUILD.gn | 14 -
chrome/browser/extensions/BUILD.gn | 7
chrome/browser/media/router/discovery/BUILD.gn | 4
chrome/browser/resources/BUILD.gn | 4
chrome/browser/ui/BUILD.gn | 85 +---------
chrome/browser/ui/BUILD.gn | 88 +---------
chrome/browser/ui/views/BUILD.gn | 2
chrome/browser/ui/webui/discards/BUILD.gn | 2
chrome/browser/web_applications/BUILD.gn | 5
chrome/browser/web_applications/BUILD.gn | 3
chrome/browser/web_applications/components/BUILD.gn | 11 -
chrome/browser/web_applications/extensions/BUILD.gn | 3
chrome/browser/web_applications/extensions/BUILD.gn | 1
chrome/chrome_paks.gni | 2
chrome/common/BUILD.gn | 1
chrome/common/extensions/api/api_sources.gni | 2
@ -40,7 +39,7 @@
ui/gfx/animation/BUILD.gn | 2
ui/message_center/BUILD.gn | 4
ui/views/BUILD.gn | 20 ++
41 files changed, 97 insertions(+), 179 deletions(-)
40 files changed, 95 insertions(+), 174 deletions(-)
--- a/apps/BUILD.gn
+++ b/apps/BUILD.gn
@ -75,7 +74,7 @@
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -453,6 +453,11 @@ jumbo_component("base") {
@@ -452,6 +452,11 @@ jumbo_component("base") {
deps += [ "//third_party/re2" ]
}
@ -87,7 +86,7 @@
if (!is_ios) {
# iOS does not use Chromium-specific code for event handling.
public_deps += [
@@ -616,14 +621,6 @@ jumbo_component("base") {
@@ -613,14 +618,6 @@ jumbo_component("base") {
if (!toolkit_views && !use_aura) {
sources -= [
"dragdrop/drag_drop_types.h",
@ -102,10 +101,10 @@
]
}
@@ -633,12 +630,6 @@ jumbo_component("base") {
@@ -629,12 +626,6 @@ jumbo_component("base") {
libs += [ "jnigraphics" ]
sources -= [
"cursor/cursor_android.cc",
- "default_theme_provider.cc",
- "l10n/l10n_font_util.cc",
- "models/button_menu_item_model.cc",
@ -117,7 +116,7 @@
--- a/chrome/browser/web_applications/BUILD.gn
+++ b/chrome/browser/web_applications/BUILD.gn
@@ -186,7 +186,6 @@ source_set("web_applications_unit_tests"
@@ -198,7 +198,6 @@ source_set("web_applications_unit_tests"
"//chrome/browser",
"//chrome/browser/web_applications/components",
"//chrome/common",
@ -125,27 +124,18 @@
"//content/public/browser",
"//content/test:test_support",
"//skia",
@@ -217,8 +216,6 @@ source_set("web_applications_browser_tes
":web_applications",
":web_applications_test_support",
"//chrome/browser/web_applications/components",
- "//chrome/test:test_support",
- "//chrome/test:test_support_ui",
]
}
@@ -234,8 +231,6 @@ source_set("common_browser_tests") {
":web_applications_test_support",
@@ -244,8 +243,6 @@ source_set("web_applications_browser_tes
"//chrome/app:command_ids",
"//chrome/browser/web_applications/components",
"//chrome/services/app_service/public/cpp:app_update",
- "//chrome/test:test_support",
- "//chrome/test:test_support_ui",
"//components/permissions:permissions",
]
}
--- a/chrome/browser/web_applications/components/BUILD.gn
+++ b/chrome/browser/web_applications/components/BUILD.gn
@@ -94,6 +94,14 @@ source_set("components") {
@@ -97,6 +97,14 @@ source_set("components") {
]
}
@ -160,7 +150,7 @@
if (is_win) {
sources += [
"web_app_file_handler_registration_win.cc",
@@ -168,7 +176,6 @@ source_set("unit_tests") {
@@ -181,7 +189,6 @@ source_set("unit_tests") {
"//chrome/app/theme:theme_resources",
"//chrome/browser/web_applications:web_app_test_group",
"//chrome/browser/web_applications:web_applications_test_support",
@ -168,7 +158,7 @@
"//content/public/browser",
"//skia",
"//testing/gmock",
@@ -190,8 +197,6 @@ source_set("browser_tests") {
@@ -211,8 +218,6 @@ source_set("browser_tests") {
deps = [
":components",
"//chrome/browser/web_applications:web_applications_test_support",
@ -179,7 +169,7 @@
}
--- a/chrome/browser/web_applications/extensions/BUILD.gn
+++ b/chrome/browser/web_applications/extensions/BUILD.gn
@@ -66,7 +66,6 @@ source_set("unit_tests") {
@@ -67,7 +67,6 @@ source_set("unit_tests") {
"//chrome/browser/web_applications:web_applications_test_support",
"//chrome/browser/web_applications/components",
"//chrome/common",
@ -187,15 +177,6 @@
"//components/crx_file:crx_file",
"//content/public/browser",
"//content/test:test_support",
@@ -100,8 +99,6 @@ source_set("browser_tests") {
"//chrome/browser/web_applications:web_applications_on_extensions_test_support",
"//chrome/browser/web_applications:web_applications_test_support",
"//chrome/browser/web_applications/components",
- "//chrome/test:test_support",
- "//chrome/test:test_support_ui",
"//extensions:test_support",
"//extensions/browser",
"//extensions/common",
--- a/chrome/browser/ui/views/BUILD.gn
+++ b/chrome/browser/ui/views/BUILD.gn
@@ -5,8 +5,6 @@
@ -294,7 +275,7 @@
# Reset sources_assignment_filter for the BUILD.gn file to prevent
# regression during the migration of Chromium away from the feature.
@@ -157,6 +157,7 @@ jumbo_component("views") {
@@ -153,6 +153,7 @@ jumbo_component("views") {
"controls/menu/menu_types.h",
"controls/menu/submenu_view.h",
"controls/message_box_view.h",
@ -302,7 +283,7 @@
"controls/native/native_view_host.h",
"controls/native/native_view_host_mac.h",
"controls/native/native_view_host_wrapper.h",
@@ -193,6 +194,7 @@ jumbo_component("views") {
@@ -189,6 +190,7 @@ jumbo_component("views") {
"debug_utils.h",
"drag_controller.h",
"drag_utils.h",
@ -310,7 +291,7 @@
"event_monitor.h",
"focus/external_focus_tracker.h",
"focus/focus_manager.h",
@@ -257,6 +259,7 @@ jumbo_component("views") {
@@ -255,6 +257,7 @@ jumbo_component("views") {
"widget/native_widget_private.h",
"widget/root_view.h",
"widget/root_view_targeter.h",
@ -318,7 +299,7 @@
"widget/tooltip_manager.h",
"widget/widget.h",
"widget/widget_delegate.h",
@@ -347,6 +350,7 @@ jumbo_component("views") {
@@ -343,6 +346,7 @@ jumbo_component("views") {
"controls/label.cc",
"controls/link.cc",
"controls/menu/menu_config.cc",
@ -326,7 +307,7 @@
"controls/menu/menu_controller.cc",
"controls/menu/menu_delegate.cc",
"controls/menu/menu_host.cc",
@@ -354,6 +358,8 @@ jumbo_component("views") {
@@ -350,6 +354,8 @@ jumbo_component("views") {
"controls/menu/menu_image_util.cc",
"controls/menu/menu_item_view.cc",
"controls/menu/menu_model_adapter.cc",
@ -335,7 +316,7 @@
"controls/menu/menu_runner.cc",
"controls/menu/menu_runner_impl.cc",
"controls/menu/menu_runner_impl_adapter.cc",
@@ -361,6 +367,7 @@ jumbo_component("views") {
@@ -357,6 +363,7 @@ jumbo_component("views") {
"controls/menu/menu_separator.cc",
"controls/menu/submenu_view.cc",
"controls/message_box_view.cc",
@ -343,7 +324,7 @@
"controls/native/native_view_host.cc",
"controls/prefix_selector.cc",
"controls/progress_bar.cc",
@@ -389,7 +396,9 @@ jumbo_component("views") {
@@ -385,7 +392,9 @@ jumbo_component("views") {
"controls/views_text_services_context_menu_base.cc",
"controls/views_text_services_context_menu_base.h",
"debug_utils.cc",
@ -353,7 +334,7 @@
"focus/external_focus_tracker.cc",
"focus/focus_manager.cc",
"focus/focus_manager_factory.cc",
@@ -412,9 +421,12 @@ jumbo_component("views") {
@@ -408,9 +417,12 @@ jumbo_component("views") {
"metadata/metadata_cache.cc",
"metadata/metadata_types.cc",
"metadata/type_conversion.cc",
@ -366,7 +347,7 @@
"paint_info.cc",
"painter.cc",
"rect_based_targeting_utils.cc",
@@ -424,6 +436,7 @@ jumbo_component("views") {
@@ -420,6 +432,7 @@ jumbo_component("views") {
"style/platform_style.cc",
"style/typography.cc",
"style/typography_provider.cc",
@ -374,11 +355,13 @@
"view.cc",
"view_class_properties.cc",
"view_constants.cc",
@@ -435,10 +448,14 @@ jumbo_component("views") {
@@ -431,12 +444,16 @@ jumbo_component("views") {
"views_delegate.cc",
"views_features.cc",
"views_switches.cc",
+ "views_touch_selection_controller_factory_android.cc",
"widget/any_widget_observer.cc",
"widget/any_widget_observer_singleton.cc",
"widget/drop_helper.cc",
+ "widget/native_widget_android.cc",
+ "widget/native_widget_android.h",
@ -389,7 +372,7 @@
"widget/tooltip_manager.cc",
"widget/widget.cc",
"widget/widget_aura_utils.cc",
@@ -487,6 +504,7 @@ jumbo_component("views") {
@@ -484,6 +501,7 @@ jumbo_component("views") {
"//skia",
"//third_party/icu",
"//ui/accessibility",
@ -399,7 +382,7 @@
"//ui/latency",
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -4782,7 +4782,6 @@ test("unit_tests") {
@@ -4837,7 +4837,6 @@ test("unit_tests") {
"//chrome/common/extensions/api",
"//components/safe_browsing:buildflags",
"//components/services/unzip:in_process",
@ -409,7 +392,7 @@
"//extensions/renderer:unit_test_support",
--- a/extensions/BUILD.gn
+++ b/extensions/BUILD.gn
@@ -221,7 +221,6 @@ test("extensions_unittests") {
@@ -220,7 +220,6 @@ test("extensions_unittests") {
]
deps = [
@ -419,7 +402,7 @@
"//base/test:test_support",
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -1410,7 +1410,7 @@ group("extra_resources") {
@@ -1393,7 +1393,7 @@ group("extra_resources") {
"//components/autofill/core/browser:autofill_address_rewriter_resources",
]
@ -428,7 +411,7 @@
public_deps += [
"//chrome/browser/resources:bookmarks_resources",
"//chrome/browser/resources:component_extension_resources",
@@ -1436,7 +1436,7 @@ group("extra_resources") {
@@ -1417,7 +1417,7 @@ group("extra_resources") {
]
}
@ -439,16 +422,16 @@
--- a/chrome/browser/resources/BUILD.gn
+++ b/chrome/browser/resources/BUILD.gn
@@ -82,7 +82,7 @@ if (closure_compile) {
@@ -85,7 +85,7 @@ if (closure_compile) {
}
}
-if (!is_android) {
+if (enable_extensions || !is_android) {
grit("bookmarks_resources") {
# The .grd contains references to generated files.
source_is_generated = true
@@ -292,7 +292,7 @@ if (is_chromeos) {
grit_flags = [
"-E",
@@ -303,7 +303,7 @@ if (is_chromeos) {
}
}
@ -459,7 +442,7 @@
--- a/third_party/blink/public/mojom/BUILD.gn
+++ b/third_party/blink/public/mojom/BUILD.gn
@@ -162,7 +162,7 @@ mojom("mojom_platform") {
@@ -180,7 +180,7 @@ mojom("mojom_platform") {
"worker/worker_options.mojom",
]
@ -468,23 +451,9 @@
sources += [ "serial/serial.mojom" ]
}
--- a/chrome/browser/apps/BUILD.gn
+++ b/chrome/browser/apps/BUILD.gn
@@ -13,7 +13,10 @@ source_set("apps") {
"apps_launch.h",
]
- deps = [ "//chrome/browser/apps/platform_apps" ]
+ deps = [
+ "//chrome/browser/apps/platform_apps",
+ "//chrome/services/app_service/public/mojom",
+ ]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
}
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -415,7 +415,6 @@ jumbo_static_library("browser") {
@@ -414,7 +414,6 @@ jumbo_static_library("browser") {
"download/download_core_service_factory.h",
"download/download_core_service_impl.cc",
"download/download_core_service_impl.h",
@ -492,7 +461,7 @@
"download/download_file_picker.cc",
"download/download_file_picker.h",
"download/download_history.cc",
@@ -459,6 +458,7 @@ jumbo_static_library("browser") {
@@ -458,6 +457,7 @@ jumbo_static_library("browser") {
"download/download_ui_controller.h",
"download/download_ui_model.cc",
"download/download_ui_model.h",
@ -500,7 +469,7 @@
"download/drag_download_item.h",
"download/mixed_content_download_blocking.cc",
"download/mixed_content_download_blocking.h",
@@ -1206,6 +1206,8 @@ jumbo_static_library("browser") {
@@ -1224,6 +1224,8 @@ jumbo_static_library("browser") {
"plugins/pdf_plugin_placeholder_observer.h",
"policy/browser_dm_token_storage.cc",
"policy/browser_dm_token_storage.h",
@ -509,15 +478,15 @@
"policy/browser_dm_token_storage_linux.cc",
"policy/browser_dm_token_storage_linux.h",
"policy/browser_dm_token_storage_mac.h",
@@ -3026,7 +3028,6 @@ jumbo_static_library("browser") {
]
deps += [ "//chrome/android/modules/dev_ui/provider:native" ]
@@ -3090,7 +3092,6 @@ jumbo_static_library("browser") {
defines += [ "ENABLE_PASSWORD_CHANGE" ]
}
- } else { # !is_android
sources += [
"accessibility/invert_bubble_prefs.cc",
"accessibility/invert_bubble_prefs.h",
@@ -3074,8 +3075,6 @@ jumbo_static_library("browser") {
@@ -3142,8 +3143,6 @@ jumbo_static_library("browser") {
"badging/badge_manager_delegate.h",
"badging/badge_manager_factory.cc",
"badging/badge_manager_factory.h",
@ -526,16 +495,7 @@
"bookmarks/bookmark_html_writer.cc",
"bookmarks/bookmark_html_writer.h",
"certificate_viewer.h",
@@ -3140,8 +3139,6 @@ jumbo_static_library("browser") {
"enterprise_reporting/report_request_definition.h",
"enterprise_reporting/report_request_queue_generator.cc",
"enterprise_reporting/report_request_queue_generator.h",
- "enterprise_reporting/report_scheduler.cc",
- "enterprise_reporting/report_scheduler.h",
"enterprise_reporting/report_uploader.cc",
"enterprise_reporting/report_uploader.h",
"feedback/feedback_dialog_utils.cc",
@@ -3301,7 +3298,6 @@ jumbo_static_library("browser") {
@@ -3356,7 +3355,6 @@ jumbo_static_library("browser") {
"metrics/desktop_session_duration/desktop_session_duration_tracker.h",
"metrics/first_web_contents_profiler.cc",
"metrics/first_web_contents_profiler.h",
@ -543,7 +503,7 @@
"metrics/tab_stats_data_store.cc",
"metrics/tab_stats_data_store.h",
"metrics/tab_stats_tracker.cc",
@@ -3314,6 +3310,7 @@ jumbo_static_library("browser") {
@@ -3369,6 +3367,7 @@ jumbo_static_library("browser") {
"notifications/profile_notification.cc",
"notifications/profile_notification.h",
"obsolete_system/obsolete_system.h",
@ -551,7 +511,7 @@
"obsolete_system/obsolete_system_linux.cc",
"obsolete_system/obsolete_system_mac.cc",
"obsolete_system/obsolete_system_win.cc",
@@ -3383,14 +3380,6 @@ jumbo_static_library("browser") {
@@ -3446,14 +3445,6 @@ jumbo_static_library("browser") {
"profiles/profile_window.h",
"renderer_context_menu/accessibility_labels_bubble_model.cc",
"renderer_context_menu/accessibility_labels_bubble_model.h",
@ -566,7 +526,7 @@
"repost_form_warning_controller.cc",
"repost_form_warning_controller.h",
"resource_coordinator/background_tab_navigation_throttle.cc",
@@ -3530,16 +3519,6 @@ jumbo_static_library("browser") {
@@ -3593,16 +3584,6 @@ jumbo_static_library("browser") {
"serial/serial_chooser_context.h",
"serial/serial_chooser_context_factory.cc",
"serial/serial_chooser_context_factory.h",
@ -583,7 +543,15 @@
"sharing/shared_clipboard/remote_copy_message_handler.cc",
"sharing/shared_clipboard/remote_copy_message_handler.h",
"sharing/shared_clipboard/shared_clipboard_context_menu_observer.cc",
@@ -3718,7 +3697,6 @@ jumbo_static_library("browser") {
@@ -3756,6 +3737,7 @@ jumbo_static_library("browser") {
"upgrade_detector/build_state.cc",
"upgrade_detector/build_state.h",
"upgrade_detector/build_state_observer.h",
+ "upgrade_detector/get_installed_version_android.cc",
"upgrade_detector/upgrade_detector.cc",
"upgrade_detector/upgrade_detector.h",
"upgrade_detector/upgrade_observer.h",
@@ -3786,7 +3768,6 @@ jumbo_static_library("browser") {
"//chrome/browser/profile_resetter:profile_reset_report_proto",
"//chrome/browser/resource_coordinator:intervention_policy_database_proto",
"//chrome/browser/resource_coordinator:tab_metrics_event_proto",
@ -591,7 +559,7 @@
"//chrome/browser/resources:component_extension_resources",
"//chrome/browser/search:generated",
"//chrome/common/importer:interfaces",
@@ -3748,7 +3726,6 @@ jumbo_static_library("browser") {
@@ -3816,7 +3797,6 @@ jumbo_static_library("browser") {
"chrome_browser_main_posix.h",
"first_run/first_run_internal_posix.cc",
"importer/firefox_profile_lock_posix.cc",
@ -599,7 +567,7 @@
"task_manager/sampling/shared_sampler_posix.cc",
]
}
@@ -3837,8 +3814,6 @@ jumbo_static_library("browser") {
@@ -3923,8 +3903,6 @@ jumbo_static_library("browser") {
"notifications/web_page_notifier_controller.h",
"policy/default_geolocation_policy_handler.cc",
"policy/default_geolocation_policy_handler.h",
@ -608,16 +576,16 @@