Browse Source

Update to 91.0.4472.77

tags/91.0.4472.77-1
wchen342 3 weeks ago
parent
commit
d18ff966c0
Signed by: wchen342 GPG Key ID: 9C19365D69B04CEC
51 changed files with 2279 additions and 2469 deletions
  1. +2
    -2
      .build_config
  2. +4
    -0
      CHANGELOG.md
  3. +2
    -2
      android_flags.debug.gn
  4. +0
    -2
      android_flags.gn
  5. +0
    -8
      bundle_generate_apk.sh
  6. +2
    -2
      misc/android_studio_setup.sh
  7. +6
    -6
      patches/Bromite/AImageReader-CFI-crash-mitigations.patch
  8. +22
    -46
      patches/Bromite/Add-a-proxy-configuration-page.patch
  9. +84
    -71
      patches/Bromite/Add-bookmark-import-export-actions.patch
  10. +10
    -10
      patches/Bromite/Add-exit-menu-item.patch
  11. +3
    -3
      patches/Bromite/Add-flag-to-disable-WebGL.patch
  12. +13
    -13
      patches/Bromite/Add-flags-to-disable-device-motion-orientation-APIs.patch
  13. +14
    -50
      patches/Bromite/Add-option-to-not-persist-tabs-across-sessions.patch
  14. +1
    -1
      patches/Bromite/Change-default-webRTC-policy-to-not-use-any-address.patch
  15. +1
    -1
      patches/Bromite/Disable-DRM-media-origin-IDs-preprovisioning.patch
  16. +16
    -8
      patches/Bromite/DoH-secure-mode-by-default.patch
  17. +8
    -8
      patches/Bromite/Inject-scripts-for-AMP-tracking-ads-and-video.patch
  18. +3
    -3
      patches/Bromite/Remove-account-permissions-from-manifest.patch
  19. +4
    -4
      patches/Bromite/Revert-flags-remove-disable-pull-to-refresh-effect.patch
  20. +16
    -16
      patches/Other/debug-fix.patch
  21. +64
    -45
      patches/Unobtainium/kill-Auth.patch
  22. +6
    -8
      patches/Unobtainium/kill-GCM.patch
  23. +3
    -3
      patches/Unobtainium/kill-Translate.patch
  24. +1
    -1
      patches/Vanadium/0003-switch-to-fstack-protector-strong.patch
  25. +1
    -1
      patches/Vanadium/0031-disable-media-router-media-remoting-by-default.patch
  26. +3
    -3
      patches/Vanadium/0032-disable-media-router-by-default.patch
  27. +0
    -1
      patches/series
  28. +22
    -22
      patches/src-fix/fix-prefs.patch
  29. +118
    -227
      patches/src-fix/fix-safe-browsing-prefs.patch
  30. +1
    -1
      patches/src-fix/fix-unkown-warning-clang.patch
  31. +18
    -21
      patches/ungoogled-chromium-android/Add-always-desktop-option.patch
  32. +1
    -1
      patches/ungoogled-chromium-android/Add-folder-button-bookmark.patch
  33. +25
    -28
      patches/ungoogled-chromium-android/Add-force-tablet-ui-option.patch
  34. +8
    -8
      patches/ungoogled-chromium-android/Add-more-search-engines.patch
  35. +7
    -7
      patches/ungoogled-chromium-android/Add-save-data-flag.patch
  36. +1
    -1
      patches/ungoogled-chromium-android/Disable-contextual-search.patch
  37. +1
    -1
      patches/ungoogled-chromium-android/Disable-homepage-by-default.patch
  38. +1
    -1
      patches/ungoogled-chromium-android/Enable-ProactivelySwapBrowsingInstance.patch
  39. +4
    -4
      patches/ungoogled-chromium-android/Enable-update-notification.patch
  40. +0
    -19
      patches/ungoogled-chromium-android/Mark-http-as-dangerous-mixed-content-warning.patch
  41. +62
    -56
      patches/ungoogled-chromium-android/Remove-UI-elements.patch
  42. +62
    -100
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.auth.patch
  43. +48
    -48
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.cast.patch
  44. +116
    -90
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.common-auth-signin-dynamic-com.google.android.gms.tasks.patch
  45. +963
    -1043
      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
  46. +48
    -48
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.flags-com.google.android.gms.location.places-com.google.android.gms.stats.patch
  47. +300
    -301
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.gcm.patch
  48. +86
    -86
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.vision-com.google.android.gms.clearcut-com.google.android.gms.phenotype.patch
  49. +96
    -36
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.core.splitcompat-com.google.android.play.core.splitinstall.patch
  50. +1
    -1
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.patch
  51. +1
    -1
      patches/ungoogled-chromium-android/tricrhome-webview-64.patch

+ 2
- 2
.build_config View File

@ -9,7 +9,7 @@ trichrome_webview_target=trichrome_webview_apk
trichrome_webview_64_target=trichrome_webview_64_apk
all=all
chromium_version=90.0.4430.212
ungoogled_chromium_version=90.0.4430.212
chromium_version=91.0.4472.77
ungoogled_chromium_version=91.0.4472.77
ungoogled_chromium_revision=1
ungoogled_chromium_android_revision=1

+ 4
- 0
CHANGELOG.md View File

@ -1,3 +1,7 @@
# 91.0.4472.77-1
* Trichrome `apk` support can end any time due to Google decided to remove the ability of not using split modules, as well as stripe the ability of building `apk`s directly for some time now. After that, you will have to manually install an `aab` file using `bundletool` and a specific `aapt2` file. I will try to keep fixing it as long as I can but it can stop working any time from now on.
* Adding to their recent move of limiting APIs, I reflect [the call from the Fedora chromium package maintainer](https://src.fedoraproject.org/rpms/chromium/blob/c4e9feabf040cc2f0c4bac40e8d06fbaf8923c33/f/chromium.spec#_178) that at this point, if you really value _free software as in freedom_, you would be better off use something else instead, like `Fennec F-Droid`.
# 90.0.4430.212-1
* Upstream security fixes


+ 2
- 2
android_flags.debug.gn View File

@ -1,4 +1,4 @@
blink_symbol_level=2
blink_symbol_level=1
clang_use_chrome_plugins=false
enable_js_type_check=false
enable_hangout_services_extension=false
@ -23,7 +23,7 @@ is_debug=true
is_official_build=false
optimize_webui=false
safe_browsing_mode=0
symbol_level=2
symbol_level=1
treat_warnings_as_errors=false
use_official_google_api_keys=false
use_unofficial_version_number=false

+ 0
- 2
android_flags.gn View File

@ -10,8 +10,6 @@ dfmify_dev_ui=false
disable_android_lint=true
disable_autofill_assistant_dfm=true
disable_tab_ui_dfm=true
enable_chrome_child_modules=false
enable_chrome_module=false
enable_gvr_services=false
enable_swiftshader=false
exclude_unwind_tables=false


+ 0
- 8
bundle_generate_apk.sh View File

@ -94,14 +94,6 @@ case "$TARGET" in
FILENAME="TrichromeChrome64"
FILENAME_OUT="TrichromeChrome"
;;
"$trichrome_webview_target")
FILENAME="TrichromeWebView"
FILENAME_OUT="TrichromeWebView"
;;
"$trichrome_webview_64_target")
FILENAME="TrichromeWebView64"
FILENAME_OUT="TrichromeWebView"
;;
*)
echo "Filename parsing error"
exit 3


+ 2
- 2
misc/android_studio_setup.sh View File

@ -52,8 +52,8 @@ popd
# Need different GN flags than a release build
pushd src
output_folder=out/Debug_apk
#output_folder=out/Debug_apk_x86
# output_folder=out/Debug_apk
output_folder=out/Debug_apk_x86
mkdir -p ${output_folder}
cat ../android_flags.debug.gn ../android_flags.gn > ${output_folder}/args.gn
printf '\ntarget_cpu="x86"\n' >> ${output_folder}/args.gn


+ 6
- 6
patches/Bromite/AImageReader-CFI-crash-mitigations.patch View File

@ -79,7 +79,7 @@ See discussions at:
AndroidImageReader();
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -1904,7 +1904,7 @@
@@ -1940,7 +1940,7 @@
{
"name": "enable-image-reader",
"owners": [ "vikassoni", "liberato" ],
@ -90,7 +90,7 @@ See discussions at:
"name": "enable-immersive-fullscreen-toolbar",
--- a/gpu/config/gpu_driver_bug_list.json
+++ b/gpu/config/gpu_driver_bug_list.json
@@ -3237,6 +3237,22 @@
@@ -3207,6 +3207,22 @@
]
},
{
@ -163,7 +163,7 @@ See discussions at:
// Estimates roughly user total disk space by counting in the drives where
--- a/gpu/config/gpu_workaround_list.txt
+++ b/gpu/config/gpu_workaround_list.txt
@@ -13,6 +13,7 @@ decode_encode_srgb_for_generatemipmap
@@ -14,6 +14,7 @@ decode_encode_srgb_for_generatemipmap
depth_stencil_renderbuffer_resize_emulation
disable_2d_canvas_auto_flush
disable_accelerated_av1_decode
@ -173,7 +173,7 @@ See discussions at:
disable_accelerated_vp8_decode
--- a/gpu/ipc/service/gpu_init.cc
+++ b/gpu/ipc/service/gpu_init.cc
@@ -488,6 +488,11 @@ bool GpuInit::InitializeAndStartSandbox(
@@ -502,6 +502,11 @@ bool GpuInit::InitializeAndStartSandbox(
}
}
@ -214,7 +214,7 @@ See discussions at:
}
--- a/media/base/media_switches.cc
+++ b/media/base/media_switches.cc
@@ -624,6 +624,10 @@ const base::Feature kMediaDrmPreprovisio
@@ -631,6 +631,10 @@ const base::Feature kMediaDrmPreprovisio
const base::Feature kMediaDrmPreprovisioningAtStartup{
"MediaDrmPreprovisioningAtStartup", base::FEATURE_ENABLED_BY_DEFAULT};
@ -227,7 +227,7 @@ See discussions at:
const base::Feature kDisableSurfaceLayerForVideo{
--- a/media/base/media_switches.h
+++ b/media/base/media_switches.h
@@ -210,6 +210,7 @@ MEDIA_EXPORT extern const base::Feature
@@ -205,6 +205,7 @@ MEDIA_EXPORT extern const base::Feature
MEDIA_EXPORT extern const base::Feature kMediaDrmPersistentLicense;
MEDIA_EXPORT extern const base::Feature kMediaDrmPreprovisioning;
MEDIA_EXPORT extern const base::Feature kMediaDrmPreprovisioningAtStartup;


+ 22
- 46
patches/Bromite/Add-a-proxy-configuration-page.patch View File

@ -10,8 +10,8 @@ Store proxy settings in LocalState instead of Profile, so that proxy is used
for SimpleURLLoaders as well.
---
chrome/android/java/res/values/values.xml | 3
chrome/android/java/res/xml/privacy_preferences.xml | 11
chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java | 3
chrome/android/java/res/xml/privacy_preferences.xml | 4
chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java | 1
chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc | 2
chrome/browser/browser_resources.grd | 6
chrome/browser/net/proxy_service_factory.cc | 23
@ -33,7 +33,7 @@ for SimpleURLLoaders as well.
components/proxy_config/proxy_config_dictionary.h | 7
net/proxy_resolution/proxy_config.cc | 52 +
net/proxy_resolution/proxy_config.h | 3
24 files changed, 999 insertions(+), 18 deletions(-)
24 files changed, 994 insertions(+), 14 deletions(-)
create mode 100644 chrome/browser/resources/proxy_config.css
create mode 100644 chrome/browser/resources/proxy_config.html
create mode 100644 chrome/browser/resources/proxy_config.js
@ -42,7 +42,7 @@ for SimpleURLLoaders as well.
--- a/chrome/android/java/res/values/values.xml
+++ b/chrome/android/java/res/values/values.xml
@@ -32,6 +32,9 @@
@@ -29,6 +29,9 @@
<integer name="reload_button_level_reload">0</integer>
<integer name="reload_button_level_stop">1</integer>
@ -54,56 +54,32 @@ for SimpleURLLoaders as well.
<integer name="download_infobar_sweep_down_delay">800</integer>
--- a/chrome/android/java/res/xml/privacy_preferences.xml
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
@@ -39,21 +39,26 @@
@@ -38,6 +38,10 @@
android:key="secure_dns"
android:title="@string/settings_secure_dns_title"
android:fragment="org.chromium.chrome.browser.privacy.secure_dns.SecureDnsSettings"
android:order="5"/>
android:fragment="org.chromium.chrome.browser.privacy.secure_dns.SecureDnsSettings"/>
+ <org.chromium.chrome.browser.about_settings.HyperlinkPreference
+ android:key="proxy"
+ android:title="@string/proxy_title"
+ app:url="@string/proxy_url"
+ android:order="6"/>
+ app:url="@string/proxy_url"/>
<Preference
android:key="clear_browsing_data"
android:title="@string/clear_browsing_data_title"
android:summary="@string/clear_browsing_data_summary"
android:fragment="org.chromium.chrome.browser.browsing_data.ClearBrowsingDataTabsFragment"
- android:order="6"/>
+ android:order="7"/>
<Preference
android:key="safe_browsing"
android:title="@string/prefs_safe_browsing_title"
android:summary="@string/prefs_safe_browsing_summary"
android:fragment="org.chromium.chrome.browser.safe_browsing.settings.SafeBrowsingSettingsFragment"
- android:order="7"/>
+ android:order="8"/>
<Preference
android:key="privacy_sandbox"
android:title="@string/prefs_privacy_sandbox"
android:fragment="org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxSettingsFragment"
- android:order="8"/>
+ android:order="9"/>
</PreferenceScreen>
android:fragment="org.chromium.chrome.browser.privacy.settings.DoNotTrackSettings"
android:key="do_not_track"
--- 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
@@ -57,10 +57,11 @@ public class PrivacySettings
@@ -57,6 +57,7 @@ public class PrivacySettings
private static final String PREF_SAFE_BROWSING = "safe_browsing";
private static final String PREF_CLEAR_BROWSING_DATA = "clear_browsing_data";
private static final String PREF_CLOSE_TABS_ON_EXIT = "close_tabs_on_exit";
+ private static final String PREF_PROXY_OPTIONS = "proxy";
private static final String PREF_PRIVACY_SANDBOX = "privacy_sandbox";
private static final String[] NEW_PRIVACY_PREFERENCE_ORDER = {PREF_CLEAR_BROWSING_DATA,
PREF_SAFE_BROWSING, PREF_CAN_MAKE_PAYMENT, PREF_NETWORK_PREDICTIONS, PREF_USAGE_STATS,
- PREF_SECURE_DNS, PREF_CLOSE_TABS_ON_EXIT, PREF_DO_NOT_TRACK, PREF_PRIVACY_SANDBOX};
+ PREF_SECURE_DNS, PREF_CLOSE_TABS_ON_EXIT, PREF_PROXY_OPTIONS, PREF_DO_NOT_TRACK, PREF_PRIVACY_SANDBOX};
private ManagedPreferenceDelegate mManagedPreferenceDelegate;
--- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
+++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
@@ -331,6 +331,8 @@ std::vector<base::string16>
@@ -343,6 +343,8 @@ std::vector<std::u16string>
ChromeAutocompleteProviderClient::GetBuiltinsToProvideAsUserTypes() {
std::vector<base::string16> builtins_to_provide;
std::vector<std::u16string> builtins_to_provide;
builtins_to_provide.push_back(
+ base::ASCIIToUTF16(chrome::kChromeUIProxyConfigURL));
+ builtins_to_provide.push_back(
@ -112,7 +88,7 @@ for SimpleURLLoaders as well.
builtins_to_provide.push_back(
--- a/chrome/browser/browser_resources.grd
+++ b/chrome/browser/browser_resources.grd
@@ -162,6 +162,12 @@
@@ -88,6 +88,12 @@
<include name="IDR_VIDEO_PLAYER_JS" file="resources\video_tutorials\video_player.js" type="BINDATA" />
</if>
@ -189,7 +165,7 @@ for SimpleURLLoaders as well.
};
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -155,6 +155,8 @@
@@ -154,6 +154,8 @@
#include "printing/buildflags/buildflags.h"
#include "rlz/buildflags/buildflags.h"
@ -198,7 +174,7 @@ for SimpleURLLoaders as well.
#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
#include "chrome/browser/background/background_mode_manager.h"
#endif
@@ -744,6 +746,8 @@ void RegisterLocalState(PrefRegistrySimp
@@ -742,6 +744,8 @@ void RegisterLocalState(PrefRegistrySimp
PluginsResourceService::RegisterPrefs(registry);
#endif
@ -209,7 +185,7 @@ for SimpleURLLoaders as well.
--- a/chrome/browser/prefs/chrome_command_line_pref_store.cc
+++ b/chrome/browser/prefs/chrome_command_line_pref_store.cc
@@ -153,7 +153,7 @@ void ChromeCommandLinePrefStore::ApplyPr
@@ -156,7 +156,7 @@ void ChromeCommandLinePrefStore::ApplyPr
SetValue(
proxy_config::prefs::kProxy,
std::make_unique<base::Value>(ProxyConfigDictionary::CreateFixedServers(
@ -633,7 +609,7 @@ for SimpleURLLoaders as well.
+})();
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -256,6 +256,8 @@ static_library("ui") {
@@ -257,6 +257,8 @@ static_library("ui") {
"webui/metrics_handler.h",
"webui/net_export_ui.cc",
"webui/net_export_ui.h",
@ -644,7 +620,7 @@ for SimpleURLLoaders as well.
"webui/ntp_tiles_internals_ui.cc",
--- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -53,6 +53,7 @@
@@ -52,6 +52,7 @@
#include "chrome/browser/ui/webui/omnibox/omnibox_ui.h"
#include "chrome/browser/ui/webui/policy/policy_ui.h"
#include "chrome/browser/ui/webui/predictors/predictors_ui.h"
@ -652,7 +628,7 @@ for SimpleURLLoaders as well.
#include "chrome/browser/ui/webui/quota_internals/quota_internals_ui.h"
#include "chrome/browser/ui/webui/signin_internals_ui.h"
#include "chrome/browser/ui/webui/sync_internals/sync_internals_ui.h"
@@ -556,6 +557,8 @@ WebUIFactoryFunction GetWebUIFactoryFunc
@@ -574,6 +575,8 @@ WebUIFactoryFunction GetWebUIFactoryFunc
return &NewWebUI<MemoryInternalsUI>;
if (url.host_piece() == chrome::kChromeUINetExportHost)
return &NewWebUI<NetExportUI>;
@ -1128,7 +1104,7 @@ for SimpleURLLoaders as well.
const char kChromeUIChromeURLsHost[] = "chrome-urls";
const char kChromeUIChromeURLsURL[] = "chrome://chrome-urls/";
const char kChromeUIComponentsHost[] = "components";
@@ -327,6 +329,7 @@ bool IsSystemWebUIHost(base::StringPiece
@@ -335,6 +337,7 @@ bool IsSystemWebUIHost(base::StringPiece
kChromeUIMobileSetupHost,
kChromeUIMultiDeviceSetupHost,
kChromeUINetworkHost,
@ -1136,7 +1112,7 @@ for SimpleURLLoaders as well.
kChromeUIOobeHost,
kChromeUIOSCreditsHost,
kChromeUIOSSettingsHost,
@@ -539,6 +542,7 @@ const char* const kChromeHostURLs[] = {
@@ -551,6 +554,7 @@ const char* const kChromeHostURLs[] = {
#if !defined(OS_ANDROID)
#if !BUILDFLAG(IS_CHROMEOS_ASH)
kChromeUIAppLauncherPageHost,


+ 84
- 71
patches/Bromite/Add-bookmark-import-export-actions.patch View File

@ -16,13 +16,13 @@ Completely remove contacts picker permission from the file dialog
chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java | 278 +++++++++
chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkDelegate.java | 10
chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManager.java | 22
chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkPage.java | 9
chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkPage.java | 8
chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java | 2
chrome/browser/BUILD.gn | 6
chrome/browser/about_flags.cc | 6
chrome/browser/android/bookmarks/bookmark_bridge.cc | 284 ++++++++++
chrome/browser/android/bookmarks/bookmark_bridge.h | 28
chrome/browser/bookmarks/bookmark_html_writer.cc | 6
chrome/browser/bookmarks/bookmark_html_writer.cc | 8
chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java | 7
chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java | 10
chrome/browser/flag_descriptions.cc | 5
@ -38,12 +38,13 @@ Completely remove contacts picker permission from the file dialog
chrome/utility/BUILD.gn | 7
chrome/utility/importer/bookmark_html_reader.cc | 27
chrome/utility/importer/bookmark_html_reader.h | 8
content/browser/BUILD.gn | 1
ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java | 18
ui/android/java/strings/android_ui_strings.grd | 3
ui/shell_dialogs/select_file_dialog.h | 2
ui/shell_dialogs/select_file_dialog_android.cc | 6
ui/shell_dialogs/select_file_dialog_android.h | 2
37 files changed, 877 insertions(+), 22 deletions(-)
38 files changed, 878 insertions(+), 23 deletions(-)
--- a/base/android/content_uri_utils.cc
+++ b/base/android/content_uri_utils.cc
@ -127,7 +128,7 @@ Completely remove contacts picker permission from the file dialog
*
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -39,7 +39,6 @@ by a child template that "extends" this
@@ -38,7 +38,6 @@ by a child template that "extends" this
{% endif %}
<uses-permission-sdk-23 android:name="android.permission.BLUETOOTH"/>
<uses-permission-sdk-23 android:name="android.permission.BLUETOOTH_ADMIN"/>
@ -221,7 +222,7 @@ Completely remove contacts picker permission from the file dialog
static final int EDIT_BOOKMARK_REQUEST_CODE = 14;
public static final String INTENT_VISIT_BOOKMARK_ID = "BookmarkEditActivity.VisitBookmarkId";
@@ -38,6 +43,20 @@ public class BookmarkActivity extends Sn
@@ -40,6 +45,20 @@ public class BookmarkActivity extends Sn
if (TextUtils.isEmpty(url)) url = UrlConstants.BOOKMARKS_URL;
mBookmarkManager.updateForUrl(url);
setContentView(mBookmarkManager.getView());
@ -242,7 +243,7 @@ Completely remove contacts picker permission from the file dialog
}
@Override
@@ -54,6 +73,7 @@ public class BookmarkActivity extends Sn
@@ -56,6 +75,7 @@ public class BookmarkActivity extends Sn
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
@ -250,7 +251,7 @@ Completely remove contacts picker permission from the file dialog
if (requestCode == EDIT_BOOKMARK_REQUEST_CODE && resultCode == RESULT_OK) {
BookmarkId bookmarkId = BookmarkId.getBookmarkIdFromString(data.getStringExtra(
INTENT_VISIT_BOOKMARK_ID));
@@ -61,6 +81,14 @@ public class BookmarkActivity extends Sn
@@ -63,6 +83,14 @@ public class BookmarkActivity extends Sn
}
}
@ -622,7 +623,7 @@ Completely remove contacts picker permission from the file dialog
private BookmarkUndoController mUndoController;
private final ObserverList<BookmarkUIObserver> mUIObservers = new ObserverList<>();
private BasicNativePage mNativePage;
@@ -329,6 +333,14 @@ public class BookmarkManager
@@ -332,6 +336,14 @@ public class BookmarkManager
}
/**
@ -637,7 +638,7 @@ Completely remove contacts picker permission from the file dialog
* @return Current URL representing the UI state of bookmark manager. If no state has been shown
* yet in this session, on phone return last used state stored in preference; on tablet
* return the url previously set by {@link #updateForUrl(String)}.
@@ -507,6 +519,16 @@ public class BookmarkManager
@@ -510,6 +522,16 @@ public class BookmarkManager
}
@Override
@ -666,16 +667,16 @@ Completely remove contacts picker permission from the file dialog
/**
* A native page holding a {@link BookmarkManager} on _tablet_.
@@ -29,11 +32,15 @@ public class BookmarkPage extends BasicN
@@ -29,12 +32,15 @@ public class BookmarkPage extends BasicN
* @param host A NativePageHost to load urls.
*/
public BookmarkPage(
- ComponentName componentName, SnackbarManager snackbarManager, NativePageHost host) {
+ ComponentName componentName, SnackbarManager snackbarManager, NativePageHost host,
+ ChromeActivity activity) {
public BookmarkPage(ComponentName componentName, SnackbarManager snackbarManager,
- boolean isIncognito, NativePageHost host) {
+ boolean isIncognito, NativePageHost host, ChromeActivity activity) {
super(host);
mManager = new BookmarkManager(host.getContext(), componentName, false, snackbarManager);
mManager = new BookmarkManager(
host.getContext(), componentName, false, isIncognito, snackbarManager);
mManager.setBasicNativePage(this);
+ mManager.setWindow(activity.getWindowAndroid(),
+ new ModalDialogManager(
@ -685,10 +686,10 @@ Completely remove contacts picker permission from the file dialog
initWithView(mManager.getView());
--- a/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java
@@ -96,7 +96,7 @@ public class NativePageFactory {
@@ -100,7 +100,7 @@ public class NativePageFactory {
protected NativePage buildBookmarksPage(Tab tab) {
return new BookmarkPage(mActivity.getComponentName(), mActivity.getSnackbarManager(),
mActivity.getTabModelSelector().isIncognitoSelected(),
- new TabShim(tab, mActivity));
+ new TabShim(tab, mActivity), mActivity);
}
@ -696,7 +697,7 @@ Completely remove contacts picker permission from the file dialog
protected NativePage buildDownloadsPage(Tab tab) {
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -1891,6 +1891,8 @@ static_library("browser") {
@@ -1838,6 +1838,8 @@ static_library("browser") {
"webapps/chrome_webapps_client.h",
"window_placement/window_placement_permission_context.cc",
"window_placement/window_placement_permission_context.h",
@ -705,7 +706,7 @@ Completely remove contacts picker permission from the file dialog
]
configs += [
@@ -2978,6 +2980,8 @@ static_library("browser") {
@@ -2934,6 +2936,8 @@ static_library("browser") {
"autofill/manual_filling_view_interface.h",
"banners/android/chrome_app_banner_manager_android.cc",
"banners/android/chrome_app_banner_manager_android.h",
@ -714,7 +715,7 @@ Completely remove contacts picker permission from the file dialog
"browser_process_platform_part_android.cc",
"browser_process_platform_part_android.h",
"chrome_browser_field_trials_mobile.cc",
@@ -3472,8 +3476,6 @@ static_library("browser") {
@@ -3443,8 +3447,6 @@ static_library("browser") {
"badging/badge_manager_factory.h",
"banners/app_banner_manager_desktop.cc",
"banners/app_banner_manager_desktop.h",
@ -725,9 +726,9 @@ Completely remove contacts picker permission from the file dialog
"browsing_data/chrome_browsing_data_lifetime_manager_factory.cc",
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -7297,6 +7297,12 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(
optimization_guide::features::kOptimizationGuideModelDownloading)},
@@ -7299,6 +7299,12 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(features::kDesktopPWAsAppIconShortcutsMenuUI)},
#endif
+ {"export-bookmarks-use-saf",
+ flag_descriptions::kBookmarksExportUseSafName,
@ -740,7 +741,7 @@ Completely remove contacts picker permission from the file dialog
// Histograms" in tools/metrics/histograms/README.md (run the
--- a/chrome/browser/android/bookmarks/bookmark_bridge.cc
+++ b/chrome/browser/android/bookmarks/bookmark_bridge.cc
@@ -39,6 +39,7 @@
@@ -38,6 +38,7 @@
#include "components/bookmarks/common/android/bookmark_type.h"
#include "components/bookmarks/common/bookmark_pref_names.h"
#include "components/bookmarks/managed/managed_bookmark_service.h"
@ -748,7 +749,7 @@ Completely remove contacts picker permission from the file dialog
#include "components/dom_distiller/core/url_utils.h"
#include "components/prefs/pref_service.h"
#include "components/query_parser/query_parser.h"
@@ -48,6 +49,24 @@
@@ -47,6 +48,24 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
@ -773,7 +774,7 @@ Completely remove contacts picker permission from the file dialog
using base::android::AttachCurrentThread;
using base::android::ConvertUTF8ToJavaString;
using base::android::ConvertUTF16ToJavaString;
@@ -64,8 +83,93 @@ using bookmarks::BookmarkNode;
@@ -63,8 +82,93 @@ using bookmarks::BookmarkNode;
using bookmarks::BookmarkType;
using content::BrowserThread;
@ -867,7 +868,7 @@ Completely remove contacts picker permission from the file dialog
const int kInvalidId = -1;
class BookmarkTitleComparer {
@@ -150,6 +254,10 @@ BookmarkBridge::~BookmarkBridge() {
@@ -149,6 +253,10 @@ BookmarkBridge::~BookmarkBridge() {
if (partner_bookmarks_shim_)
partner_bookmarks_shim_->RemoveObserver(this);
reading_list_manager_->RemoveObserver(this);
@ -878,7 +879,7 @@ Completely remove contacts picker permission from the file dialog
}
void BookmarkBridge::Destroy(JNIEnv*, const JavaParamRef<jobject>&) {
@@ -540,6 +648,182 @@ jint BookmarkBridge::GetTotalBookmarkCou
@@ -539,6 +647,182 @@ jint BookmarkBridge::GetTotalBookmarkCou
return count;
}
@ -898,15 +899,15 @@ Completely remove contacts picker permission from the file dialog
+ //NOTE: extension and description are not used on Android, thus not set
+ ui::SelectFileDialog::FileTypeInfo file_type_info;
+
+ const std::vector<base::string16> v_accept_types = { base::UTF8ToUTF16("text/html") };
+ const std::vector<std::u16string> v_accept_types = { base::UTF8ToUTF16("text/html") };
+
+ // Android needs the original MIME types and an additional capture value.
+ std::pair<std::vector<base::string16>, bool> accept_types =
+ std::pair<std::vector<std::u16string>, bool> accept_types =
+ std::make_pair(v_accept_types, /* use_media_capture */ false);
+
+ select_file_dialog_->SelectFile(
+ ui::SelectFileDialog::SELECT_OPEN_FILE,
+ base::string16(),
+ std::u16string(),
+ export_path_,
+ &file_type_info,
+ 0,
@ -927,7 +928,7 @@ Completely remove contacts picker permission from the file dialog
+ ui::WindowAndroid::FromJavaWindowAndroid(java_window);
+ CHECK(window);
+
+ base::string16 export_path =
+ std::u16string export_path =
+ base::android::ConvertJavaStringToUTF16(env, j_export_path);
+
+ export_path_ = base::FilePath::FromUTF16Unsafe(export_path);
@ -946,9 +947,9 @@ Completely remove contacts picker permission from the file dialog
+
+// Attempts to create a TemplateURL from the provided data. |title| is optional.
+// If TemplateURL creation fails, returns null.
+std::unique_ptr<TemplateURL> CreateTemplateURL(const base::string16& url,
+ const base::string16& keyword,
+ const base::string16& title) {
+std::unique_ptr<TemplateURL> CreateTemplateURL(const std::u16string& url,
+ const std::u16string& keyword,
+ const std::u16string& title) {
+ if (url.empty() || keyword.empty())
+ return nullptr;
+ TemplateURLData data;
@ -1064,7 +1065,7 @@ Completely remove contacts picker permission from the file dialog
--- a/chrome/browser/android/bookmarks/bookmark_bridge.h
+++ b/chrome/browser/android/bookmarks/bookmark_bridge.h
@@ -17,6 +17,7 @@
#include "base/strings/string16.h"
#include "base/scoped_observer.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/android/bookmarks/partner_bookmarks_shim.h"
+#include "chrome/browser/bookmarks/bookmark_html_writer.h"
@ -1156,15 +1157,17 @@ Completely remove contacts picker permission from the file dialog
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/favicon/favicon_service_factory.h"
#include "chrome/browser/profiles/profile.h"
@@ -241,6 +242,11 @@ class Writer : public base::RefCountedTh
@@ -240,7 +241,12 @@ class Writer : public base::RefCountedTh
// Opens the file, returning true on success.
bool OpenFile() {
int flags = base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE;
file_.reset(new base::File(path_, flags));
- file_ = std::make_unique<base::File>(path_, flags);
+ if (path_.IsContentUri()) {
+ file_ = std::make_unique<base::File>(base::OpenContentUriForWrite(path_));
+ } else {
+ file_.reset(new base::File(path_, flags));
+ file_ = std::make_unique<base::File>(path_, flags);
+ }
+
if (!file_->IsValid()) {
PLOG(ERROR) << "Could not create " << path_;
return false;
@ -1236,7 +1239,7 @@ Completely remove contacts picker permission from the file dialog
// name conflict or disk error.
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -5182,6 +5182,11 @@ const char kWebrtcPipeWireCapturerDescri
@@ -5229,6 +5229,11 @@ const char kWebrtcPipeWireCapturerDescri
"capturing the desktop content on the Wayland display server.";
#endif // #if defined(WEBRTC_USE_PIPEWIRE)
@ -1250,7 +1253,7 @@ Completely remove contacts picker permission from the file dialog
// alphabetical order just like the header file.
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -3054,6 +3054,9 @@ extern const char kWebrtcPipeWireCapture
@@ -3069,6 +3069,9 @@ extern const char kWebrtcPipeWireCapture
extern const char kWebrtcPipeWireCapturerDescription[];
#endif // #if defined(WEBRTC_USE_PIPEWIRE)
@ -1262,8 +1265,8 @@ Completely remove contacts picker permission from the file dialog
// alphabetical order. See top instructions for more.
--- a/chrome/browser/flags/android/chrome_feature_list.cc
+++ b/chrome/browser/flags/android/chrome_feature_list.cc
@@ -141,6 +141,7 @@ const base::Feature* kFeaturesExposedToJ
&kAppLaunchpad,
@@ -142,6 +142,7 @@ const base::Feature* kFeaturesExposedToJ
&kBackgroundThreadPool,
&kBentoOffline,
&kBookmarkBottomSheet,
+ &kBookmarksExportUseSaf,
@ -1283,7 +1286,7 @@ Completely remove contacts picker permission from the file dialog
const JavaParamRef<jstring>& jfeature_name) {
--- a/chrome/browser/flags/android/chrome_feature_list.h
+++ b/chrome/browser/flags/android/chrome_feature_list.h
@@ -155,6 +155,7 @@ extern const base::Feature kVoiceSearchA
@@ -157,6 +157,7 @@ extern const base::Feature kVoiceSearchA
extern const base::Feature kVoiceButtonInTopToolbar;
extern const base::Feature kVrBrowsingFeedback;
extern const base::Feature kPrefetchNotificationSchedulingIntegration;
@ -1293,7 +1296,7 @@ Completely remove contacts picker permission from the file dialog
} // namespace chrome
--- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
+++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
@@ -493,6 +493,7 @@ public abstract class ChromeFeatureList
@@ -489,6 +489,7 @@ public abstract class ChromeFeatureList
public static final String WEB_AUTH_PHONE_SUPPORT = "WebAuthenticationPhoneSupport";
public static final String WEB_FEED = "WebFeed";
public static final String XSURFACE_METRICS_REPORTING = "XsurfaceMetricsReporting";
@ -1328,7 +1331,7 @@ Completely remove contacts picker permission from the file dialog
+void ProfileWriter::AddBookmarksWithModel(
+ BookmarkModel* model,
+ const std::vector<ImportedBookmarkEntry>& bookmarks,
+ const base::string16& top_level_folder_name) {
+ const std::u16string& top_level_folder_name) {
+ if (bookmarks.empty())
+ return;
+
@ -1338,28 +1341,28 @@ Completely remove contacts picker permission from the file dialog
--- a/chrome/browser/importer/profile_writer.h
+++ b/chrome/browser/importer/profile_writer.h
@@ -12,6 +12,7 @@
#include "base/strings/string16.h"
#include "base/memory/ref_counted.h"
#include "base/time/time.h"
#include "build/build_config.h"
+#include "components/bookmarks/browser/bookmark_model.h"
#include "components/favicon_base/favicon_usage_data.h"
#include "components/history/core/browser/history_types.h"
#include "components/search_engines/template_url_service.h"
@@ -70,6 +71,11 @@ class ProfileWriter : public base::RefCo
const std::vector<ImportedBookmarkEntry>& bookmarks,
const base::string16& top_level_folder_name);
@@ -69,6 +70,11 @@ class ProfileWriter : public base::RefCo
virtual void AddBookmarks(const std::vector<ImportedBookmarkEntry>& bookmarks,
const std::u16string& top_level_folder_name);
+ virtual void AddBookmarksWithModel(
+ bookmarks::BookmarkModel* model,
+ const std::vector<ImportedBookmarkEntry>& bookmarks,
+ const base::string16& top_level_folder_name);
+ const std::u16string& top_level_folder_name);
+
virtual void AddFavicons(const favicon_base::FaviconUsageDataList& favicons);
// Adds the TemplateURLs in |template_urls| to the local store.
--- a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java
+++ b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java
@@ -91,6 +91,8 @@ public final class ChromePreferenceKeys
@@ -109,6 +109,8 @@ public final class ChromePreferenceKeys
public static final String BOOKMARKS_LAST_USED_URL = "enhanced_bookmark_last_used_url";
public static final String BOOKMARKS_LAST_USED_PARENT =
"enhanced_bookmark_last_used_parent_folder";
@ -1368,14 +1371,14 @@ Completely remove contacts picker permission from the file dialog
/**
* Whether Chrome is set as the default browser.
@@ -899,6 +901,7 @@ public final class ChromePreferenceKeys
AUTOFILL_ASSISTANT_NUMBER_OF_LITE_SCRIPTS_CANCELED,
@@ -976,6 +978,7 @@ public final class ChromePreferenceKeys
AUTOFILL_ASSISTANT_PROACTIVE_HELP,
APPLICATION_OVERRIDE_LANGUAGE,
APP_LAUNCH_LAST_KNOWN_ACTIVE_TAB_STATE,
APP_LAUNCH_SEARCH_ENGINE_HAD_LOGO,
+ BOOKMARKS_LAST_EXPORT_URI,
APPLICATION_OVERRIDE_LANGUAGE,
CHROME_SURVEY_PROMPT_DISPLAYED_TIMESTAMP.pattern(),
CLIPBOARD_SHARED_URI,
CONDITIONAL_TAB_STRIP_CONTINUOUS_DISMISS_COUNTER,
CONDITIONAL_TAB_STRIP_FEATURE_STATUS,
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -242,6 +242,24 @@ CHAR-LIMIT guidelines:
@ -1405,7 +1408,7 @@ Completely remove contacts picker permission from the file dialog
</message>
--- a/chrome/common/BUILD.gn
+++ b/chrome/common/BUILD.gn
@@ -403,6 +403,9 @@ static_library("common") {
@@ -405,6 +405,9 @@ static_library("common") {
sources += [
"media/chrome_media_drm_bridge_client.cc",
"media/chrome_media_drm_bridge_client.h",
@ -1417,7 +1420,7 @@ Completely remove contacts picker permission from the file dialog
} else {
--- a/chrome/utility/BUILD.gn
+++ b/chrome/utility/BUILD.gn
@@ -79,8 +79,6 @@ static_library("utility") {
@@ -78,8 +78,6 @@ static_library("utility") {
if (!is_android) {
sources += [
@ -1426,7 +1429,7 @@ Completely remove contacts picker permission from the file dialog
"importer/bookmarks_file_importer.cc",
"importer/bookmarks_file_importer.h",
"importer/external_process_importer_bridge.cc",
@@ -180,6 +178,11 @@ static_library("utility") {
@@ -179,6 +177,11 @@ static_library("utility") {
}
}
@ -1499,7 +1502,7 @@ Completely remove contacts picker permission from the file dialog
content, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
@@ -126,6 +144,7 @@ void ImportBookmarksFile(
std::vector<base::string16> path;
std::vector<std::u16string> path;
size_t toolbar_folder_index = 0;
std::string charset = "UTF-8"; // If no charset is specified, assume utf-8.
+
@ -1521,7 +1524,7 @@ Completely remove contacts picker permission from the file dialog
}
--- a/chrome/utility/importer/bookmark_html_reader.h
+++ b/chrome/utility/importer/bookmark_html_reader.h
@@ -51,6 +51,14 @@ void ImportBookmarksFile(
@@ -50,6 +50,14 @@ void ImportBookmarksFile(
std::vector<importer::SearchEngineInfo>* search_engines,
favicon_base::FaviconUsageDataList* favicons);
@ -1538,7 +1541,7 @@ Completely remove contacts picker permission from the file dialog
// than true bookmarks.
--- a/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java
+++ b/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java
@@ -35,6 +35,7 @@ import org.chromium.base.task.AsyncTask;
@@ -38,6 +38,7 @@ import org.chromium.base.task.AsyncTask;
import org.chromium.base.task.PostTask;
import org.chromium.base.task.TaskTraits;
import org.chromium.ui.R;
@ -1546,7 +1549,7 @@ Completely remove contacts picker permission from the file dialog
import org.chromium.ui.UiUtils;
import java.io.File;
@@ -53,6 +54,7 @@ public class SelectFileDialog implements
@@ -56,6 +57,7 @@ public class SelectFileDialog implements
private static final String TAG = "SelectFileDialog";
private static final String IMAGE_TYPE = "image";
private static final String VIDEO_TYPE = "video";
@ -1554,7 +1557,7 @@ Completely remove contacts picker permission from the file dialog
private static final String AUDIO_TYPE = "audio";
private static final String ALL_TYPES = "*/*";
@@ -143,6 +145,11 @@ public class SelectFileDialog implements
@@ -239,6 +241,11 @@ public class SelectFileDialog implements
mFileTypes = fileTypes;
}
@ -1566,7 +1569,7 @@ Completely remove contacts picker permission from the file dialog
/**
* Creates and starts an intent based on the passed fileTypes and capture value.
* @param fileTypes MIME types requested (i.e. "image/*")
@@ -170,7 +177,7 @@ public class SelectFileDialog implements
@@ -266,7 +273,7 @@ public class SelectFileDialog implements
List<String> missingPermissions = new ArrayList<>();
String storagePermission = Manifest.permission.READ_EXTERNAL_STORAGE;
boolean shouldUsePhotoPicker = shouldUsePhotoPicker();
@ -1575,7 +1578,7 @@ Completely remove contacts picker permission from the file dialog
if (!window.hasPermission(storagePermission)) missingPermissions.add(storagePermission);
} else {
if (((mSupportsImageCapture && shouldShowImageTypes())
@@ -198,7 +205,7 @@ public class SelectFileDialog implements
@@ -294,7 +301,7 @@ public class SelectFileDialog implements
}
// TODO(finnur): Remove once we figure out the cause of crbug.com/950024.
@ -1584,7 +1587,7 @@ Completely remove contacts picker permission from the file dialog
if (permissions.length != requestPermissions.length) {
throw new RuntimeException(
String.format("Permissions arrays misaligned: %d != %d",
@@ -212,7 +219,7 @@ public class SelectFileDialog implements
@@ -308,7 +315,7 @@ public class SelectFileDialog implements
}
}
@ -1593,7 +1596,7 @@ Completely remove contacts picker permission from the file dialog
onFileNotSelected();
return;
}
@@ -358,6 +365,7 @@ public class SelectFileDialog implements
@@ -504,6 +511,7 @@ public class SelectFileDialog implements
}
if (!mimeTypes.contains(mimeType)) mimeTypes.add(mimeType);
}
@ -1601,7 +1604,7 @@ Completely remove contacts picker permission from the file dialog
return mimeTypes;
}
@@ -659,6 +667,10 @@ public class SelectFileDialog implements
@@ -792,6 +800,10 @@ public class SelectFileDialog implements
return countAcceptTypesFor(superType) == mFileTypes.size();
}
@ -1626,7 +1629,7 @@ Completely remove contacts picker permission from the file dialog
<message name="IDS_COPY_TO_CLIPBOARD_FAILURE_MESSAGE" desc="Notification for when copying to the clipboard fails. [CHAR-LIMIT=64]">
--- a/ui/shell_dialogs/select_file_dialog.h
+++ b/ui/shell_dialogs/select_file_dialog.h
@@ -204,6 +204,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDia
@@ -203,6 +203,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDia
void* params);
bool HasMultipleFileTypeChoices();
@ -1661,3 +1664,13 @@ Completely remove contacts picker permission from the file dialog
protected:
~SelectFileDialogImpl() override;
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -78,6 +78,7 @@ source_set("browser") {
"//components/payments/mojom",
"//components/power_scheduler",
"//components/services/filesystem:lib",
+ "//components/services/quarantine:quarantine",
"//components/services/storage",
"//components/services/storage:filesystem_proxy_factory",
"//components/services/storage/dom_storage:local_storage_proto",

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

@ -13,8 +13,8 @@ Corrected Exit functionality
--- a/chrome/android/java/res/menu/main_menu.xml
+++ b/chrome/android/java/res/menu/main_menu.xml
@@ -119,6 +119,9 @@
android:icon="@drawable/vr_headset" />
@@ -115,6 +115,9 @@
android:icon="@drawable/gm_filled_cardboard_24" />
<item android:id="@+id/managed_by_menu_id"
android:title="@string/managed" />
+ <item android:id="@+id/exit_id"
@ -23,7 +23,7 @@ Corrected Exit functionality
</group>
<!-- Items shown only in the tab switcher -->
@@ -145,6 +148,9 @@
@@ -141,6 +144,9 @@
<item android:id="@id/preferences_id"
android:title="@string/menu_settings"
android:icon="@drawable/settings_cog" />
@ -35,7 +35,7 @@ Corrected Exit functionality
<!-- Items shown only in the tab switcher when start surface is enabled -->
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -191,6 +191,8 @@ import java.lang.annotation.RetentionPol
@@ -198,6 +198,8 @@ import java.lang.annotation.RetentionPol
import java.util.List;
import java.util.Locale;
@ -44,7 +44,7 @@ Corrected Exit functionality
/**
* This is the main activity for ChromeMobile when not running in document mode. All the tabs
* are accessible via a chrome specific tab switching UI.
@@ -1858,6 +1860,8 @@ public class ChromeTabbedActivity extend
@@ -1907,6 +1909,8 @@ public class ChromeTabbedActivity extend
} else if (id == R.id.close_tab) {
getCurrentTabModel().closeTab(currentTab, true, false, true);
RecordUserAction.record("MobileTabClosed");
@ -55,15 +55,15 @@ Corrected Exit functionality
getTabModelSelector().closeAllTabs();
--- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
@@ -57,6 +57,7 @@ import org.chromium.base.supplier.Unowne
@@ -58,6 +58,7 @@ import org.chromium.base.supplier.Unowne
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ActivityTabProvider;
import org.chromium.chrome.browser.AppHooks;
+import org.chromium.chrome.browser.ApplicationLifetime;
import org.chromium.chrome.browser.ChromeActivitySessionTracker;
import org.chromium.chrome.browser.ChromeApplication;
import org.chromium.chrome.browser.ChromeWindow;
@@ -2200,6 +2201,11 @@ public abstract class ChromeActivity<C e
import org.chromium.chrome.browser.ChromeApplicationImpl;
import org.chromium.chrome.browser.ChromeKeyboardVisibilityDelegate;
@@ -2234,6 +2235,11 @@ public abstract class ChromeActivity<C e
return true;
}
@ -92,7 +92,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
@@ -3008,6 +3008,9 @@ Data from your Incognito session will on
@@ -3070,6 +3070,9 @@ Data from your Incognito session will on
<message name="IDS_MENU_SETTINGS" desc="Menu item for opening browser settings. [CHAR-LIMIT=27]">
Settings
</message>


+ 3
- 3
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
@@ -2625,6 +2625,9 @@ const FeatureEntry kFeatureEntries[] = {
@@ -2606,6 +2606,9 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kAccelerated2dCanvasName,
flag_descriptions::kAccelerated2dCanvasDescription, kOsAll,
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)},
@ -22,7 +22,7 @@ Subject: Add flag to disable WebGL
SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)},
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -562,6 +562,10 @@ const char kEnableAudioFocusEnforcementN
@@ -584,6 +584,10 @@ const char kEnableAudioFocusEnforcementN
const char kEnableAudioFocusEnforcementDescription[] =
"Enables enforcement of a single media session having audio focus at "
"any one time. Requires #enable-media-session-service to be enabled too.";
@ -35,7 +35,7 @@ Subject: Add flag to disable WebGL
"Enable the account data storage for autofill";
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -347,6 +347,9 @@ extern const char kDisallowDocWrittenScr
@@ -357,6 +357,9 @@ extern const char kDocumentTransitionDes
extern const char kEnableAccessibilityObjectModelName[];
extern const char kEnableAccessibilityObjectModelDescription[];


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

@ -19,7 +19,7 @@ legacy acceleration events.
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2851,6 +2851,12 @@ const FeatureEntry kFeatureEntries[] = {
@@ -2838,6 +2838,12 @@ const FeatureEntry kFeatureEntries[] = {
{"enable-gpu-rasterization", flag_descriptions::kGpuRasterizationName,
flag_descriptions::kGpuRasterizationDescription, kOsAll,
MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices)},
@ -34,9 +34,9 @@ legacy acceleration events.
MULTI_VALUE_TYPE(kEnableOopRasterizationChoices)},
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -821,6 +821,14 @@ const char kWinrtSensorsImplementationDe
"Enables usage of the Windows.Devices.Sensors WinRT APIs on Windows for "
"sensors";
@@ -844,6 +844,14 @@ const char kWinrtGeolocationImplementati
"Enables usage of the Windows.Devices.Geolocation WinRT APIs on Windows "
"for geolocation";
+const char kEnableDeviceMotionName[] = "Enable device motion";
+const char kEnableDeviceMotionDescription[] =
@ -51,9 +51,9 @@ legacy acceleration events.
const char kEnableGenericSensorExtraClassesDescription[] =
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -494,6 +494,12 @@ extern const char kWinrtGeolocationImple
extern const char kWinrtSensorsImplementationName[];
extern const char kWinrtSensorsImplementationDescription[];
@@ -505,6 +505,12 @@ extern const char kNotificationsViaHelpe
extern const char kWinrtGeolocationImplementationName[];
extern const char kWinrtGeolocationImplementationDescription[];
+extern const char kEnableDeviceMotionName[];
+extern const char kEnableDeviceMotionDescription[];
@ -78,7 +78,7 @@ legacy acceleration events.
#else
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -886,6 +886,16 @@ const base::Feature kWebOtpBackendAuto{"
@@ -890,6 +890,16 @@ const base::Feature kWebOtpBackendAuto{"
// The JavaScript API for payments on the web.
const base::Feature kWebPayments{"WebPayments",
base::FEATURE_ENABLED_BY_DEFAULT};
@ -97,7 +97,7 @@ legacy acceleration events.
const base::Feature kWebPaymentsMinimalUI{"WebPaymentsMinimalUI",
--- a/content/public/common/content_features.h
+++ b/content/public/common/content_features.h
@@ -209,6 +209,8 @@ CONTENT_EXPORT extern const base::Featur
@@ -212,6 +212,8 @@ CONTENT_EXPORT extern const base::Featur
CONTENT_EXPORT extern const base::Feature kWebXrHitTest;
CONTENT_EXPORT extern const base::Feature kWebXrIncubations;
@ -108,7 +108,7 @@ legacy acceleration events.
CONTENT_EXPORT extern const base::Feature
--- a/third_party/blink/public/platform/web_runtime_features.h
+++ b/third_party/blink/public/platform/web_runtime_features.h
@@ -100,6 +100,8 @@ class WebRuntimeFeatures {
@@ -97,6 +97,8 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableCookiesWithoutSameSiteMustBeSecure(
bool);
BLINK_PLATFORM_EXPORT static void EnableCanvas2dImageChromium(bool);
@ -119,7 +119,7 @@ legacy acceleration events.
BLINK_PLATFORM_EXPORT static void EnableSameSiteByDefaultCookies(bool);
--- a/third_party/blink/renderer/modules/modules_initializer.cc
+++ b/third_party/blink/renderer/modules/modules_initializer.cc
@@ -222,9 +222,13 @@ void ModulesInitializer::OnClearWindowOb
@@ -231,9 +231,13 @@ void ModulesInitializer::OnClearWindowOb
Document& document,
const Settings& settings) const {
LocalDOMWindow& window = *document.domWindow();
@ -138,7 +138,7 @@ legacy acceleration events.
// TODO(nhiroki): Figure out why ServiceWorkerContainer needs to be eagerly
--- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc
+++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
@@ -195,6 +195,14 @@ void WebRuntimeFeatures::EnableKeyboardA
@@ -187,6 +187,14 @@ void WebRuntimeFeatures::EnableKeyboardA
RuntimeEnabledFeatures::SetKeyboardAccessibleTooltipEnabled(enable);
}
@ -155,7 +155,7 @@ legacy acceleration events.
}
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -1438,6 +1438,14 @@
@@ -1424,6 +1424,14 @@
status: "experimental",
},
{


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

@ -3,60 +3,29 @@ Date: Sat, 7 Sep 2019 15:07:42 +0200
Subject: Add option to not persist tabs across sessions
---
chrome/android/java/res/xml/privacy_preferences.xml | 16 ++++++---
chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java | 4 +-
chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java | 17 ++++++++--
chrome/browser/ui/android/strings/android_chrome_strings.grd | 6 +++
4 files changed, 35 insertions(+), 8 deletions(-)
chrome/android/java/res/xml/privacy_preferences.xml | 5 +++
chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java | 4 ++
chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java | 15 +++++++++-
chrome/browser/ui/android/strings/android_chrome_strings.grd | 6 ++++
4 files changed, 28 insertions(+), 2 deletions(-)
--- a/chrome/android/java/res/xml/privacy_preferences.xml
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
@@ -23,31 +23,37 @@
@@ -29,6 +29,11 @@
android:key="usage_stats_reporting"
android:title="@string/usage_stats_setting_title"
android:persistent="false"
android:order="2"/>
android:persistent="false"/>
+ <org.chromium.components.browser_ui.settings.ChromeSwitchPreference
+ android:key="close_tabs_on_exit"
+ android:title="@string/close_tabs_on_exit_title"
+ android:summary="@string/close_tabs_on_exit_summary"
+ android:defaultValue="false"
+ android:order="3"/>
<Preference
android:fragment="org.chromium.chrome.browser.privacy.settings.DoNotTrackSettings"
android:key="do_not_track"
android:title="@string/do_not_track_title"
- android:order="3"/>
+ android:order="4"/>
+ android:defaultValue="false"/>
<org.chromium.components.browser_ui.settings.ChromeBasePreference
android:key="secure_dns"
android:title="@string/settings_secure_dns_title"
android:fragment="org.chromium.chrome.browser.privacy.secure_dns.SecureDnsSettings"
- android:order="4"/>
+ android:order="5"/>
<Preference
android:key="clear_browsing_data"
android:title="@string/clear_browsing_data_title"
android:summary="@string/clear_browsing_data_summary"
android:fragment="org.chromium.chrome.browser.browsing_data.ClearBrowsingDataTabsFragment"
- android:order="5"/>
+ android:order="6"/>
<Preference
android:key="safe_browsing"
android:title="@string/prefs_safe_browsing_title"
android:summary="@string/prefs_safe_browsing_summary"
android:fragment="org.chromium.chrome.browser.safe_browsing.settings.SafeBrowsingSettingsFragment"
- android:order="6"/>
+ android:order="7"/>
<Preference
android:key="privacy_sandbox"
android:title="@string/prefs_privacy_sandbox"
android:fragment="org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxSettingsFragment"
- android:order="7"/>
+ android:order="8"/>
</PreferenceScreen>
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -1129,8 +1129,10 @@ public class ChromeTabbedActivity extend
@@ -1150,8 +1150,10 @@ public class ChromeTabbedActivity extend
boolean hadCipherData =
CipherFactory.getInstance().restoreFromBundle(getSavedInstanceState());
@ -87,20 +56,15 @@ Subject: Add option to not persist tabs across sessions
import org.chromium.chrome.R;
import org.chromium.chrome.browser.feedback.HelpAndFeedbackLauncherImpl;
import org.chromium.chrome.browser.flags.ChromeFeatureList;
@@ -53,10 +56,11 @@ public class PrivacySettings
@@ -53,6 +56,7 @@ public class PrivacySettings
private static final String PREF_DO_NOT_TRACK = "do_not_track";
private static final String PREF_SAFE_BROWSING = "safe_browsing";
private static final String PREF_CLEAR_BROWSING_DATA = "clear_browsing_data";
+ private static final String PREF_CLOSE_TABS_ON_EXIT = "close_tabs_on_exit";
private static final String PREF_PRIVACY_SANDBOX = "privacy_sandbox";
private static final String[] NEW_PRIVACY_PREFERENCE_ORDER = {PREF_CLEAR_BROWSING_DATA,
PREF_SAFE_BROWSING, PREF_CAN_MAKE_PAYMENT, PREF_NETWORK_PREDICTIONS, PREF_USAGE_STATS,
- PREF_SECURE_DNS, PREF_DO_NOT_TRACK, PREF_PRIVACY_SANDBOX};
+ PREF_SECURE_DNS, PREF_CLOSE_TABS_ON_EXIT, PREF_DO_NOT_TRACK, PREF_PRIVACY_SANDBOX};
private ManagedPreferenceDelegate mManagedPreferenceDelegate;
@@ -166,7 +170,11 @@ public class PrivacySettings
@@ -145,7 +149,11 @@ public class PrivacySettings
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
String key = preference.getKey();
@ -113,7 +77,7 @@ Subject: Add option to not persist tabs across sessions
UserPrefs.get(Profile.getLastUsedRegularProfile())
.setBoolean(Pref.CAN_MAKE_PAYMENT_ENABLED, (boolean) newValue);
} else if (PREF_NETWORK_PREDICTIONS.equals(key)) {
@@ -236,6 +244,11 @@ public class PrivacySettings
@@ -215,6 +223,11 @@ public class PrivacySettings
privacySandboxPreference.setSummary(
PrivacySandboxSettingsFragment.getStatusString(getContext()));
}
@ -127,7 +91,7 @@ Subject: Add option to not persist tabs across sessions
private ChromeManagedPreferenceDelegate createManagedPreferenceDelegate() {
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -3815,6 +3815,12 @@ Data from your Incognito session will on
@@ -3923,6 +3923,12 @@ Data from your Incognito session will on
<message name="IDS_CONTEXTMENU_IMAGE_TITLE" desc="The title of a context menu tab when the item pressed contains more than one type. This indicates that all the actions are related to the image.">
IMAGE
</message>


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

@ -11,7 +11,7 @@ See also: https://github.com/bromite/bromite/issues/553
--- a/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
+++ b/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
@@ -462,12 +462,13 @@ PeerConnectionDependencyFactory::CreateP
@@ -466,12 +466,13 @@ PeerConnectionDependencyFactory::CreateP
port_config.enable_nonproxied_udp = false;
break;
case DEFAULT:


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

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


+ 16
- 8
patches/Bromite/DoH-secure-mode-by-default.patch View File

@ -3,13 +3,13 @@ Date: Sat, 26 Sep 2020 14:23:19 +0100
Subject: DoH secure mode by default
---
.../browser/net/stub_resolver_config_reader.cc | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
chrome/android/java/src/org/chromium/chrome/browser/policy/EnterpriseInfo.java | 2 -
chrome/browser/net/stub_resolver_config_reader.cc | 17 ----------
2 files changed, 2 insertions(+), 17 deletions(-)
diff --git a/chrome/browser/net/stub_resolver_config_reader.cc b/chrome/browser/net/stub_resolver_config_reader.cc
--- a/chrome/browser/net/stub_resolver_config_reader.cc
+++ b/chrome/browser/net/stub_resolver_config_reader.cc
@@ -154,7 +154,7 @@ StubResolverConfigReader::StubResolverConfigReader(PrefService* local_state,
@@ -154,7 +154,7 @@ StubResolverConfigReader::StubResolverCo
if (entries.count("[email protected]")) {
// The user has "Enabled" selected.
local_state_->SetString(prefs::kDnsOverHttpsMode,
@ -18,7 +18,7 @@ diff --git a/chrome/browser/net/stub_resolver_config_reader.cc b/chrome/browser/
} else if (entries.count("[email protected]")) {
// The user has "Disabled" selected.
local_state_->SetString(prefs::kDnsOverHttpsMode,
@@ -328,22 +328,7 @@ SecureDnsConfig StubResolverConfigReader::GetAndUpdateConfiguration(
@@ -328,22 +328,7 @@ SecureDnsConfig StubResolverConfigReader
check_parental_controls = false;
}
@ -41,6 +41,14 @@ diff --git a/chrome/browser/net/stub_resolver_config_reader.cc b/chrome/browser/
parental_controls_checked_ = true;
}
--
2.17.1
--- a/chrome/android/java/src/org/chromium/chrome/browser/policy/EnterpriseInfo.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/policy/EnterpriseInfo.java
@@ -43,7 +43,7 @@ public class EnterpriseInfo {
private OwnedState mOwnedState;
private Queue<Callback<OwnedState>> mCallbackList;
- private boolean mSkipAsyncCheckForTesting;
+ private boolean mSkipAsyncCheckForTesting = true;
/** A simple tuple to hold onto named fields about the state of ownership. */
public static class OwnedState {

+ 8
- 8
patches/Bromite/Inject-scripts-for-AMP-tracking-ads-and-video.patch View File

@ -38,8 +38,8 @@ Send a random key press to circumvent idle status detection
+#include "extensions/video_bg_play.h"
#include "third_party/blink/renderer/core/page/scrolling/snap_coordinator.h"
#include "third_party/blink/renderer/core/page/scrolling/text_fragment_anchor.h"
#include "third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.h"
@@ -341,6 +342,8 @@
#include "third_party/blink/renderer/core/page/scrolling/text_fragment_handler.h"
@@ -344,6 +345,8 @@
#include "third_party/blink/renderer/platform/wtf/text/string_buffer.h"
#include "third_party/blink/renderer/platform/wtf/text/text_encoding_registry.h"
@ -48,7 +48,7 @@ Send a random key press to circumvent idle status detection
#ifndef NDEBUG
using WeakDocumentSet = blink::HeapHashSet<blink::WeakMember<blink::Document>>;
static WeakDocumentSet& liveDocumentSet();
@@ -6868,6 +6871,61 @@ void Document::setAllowDeclarativeShadow
@@ -6879,6 +6882,61 @@ void Document::setAllowDeclarativeShadow
val ? AllowState::kAllow : AllowState::kDeny;
}
@ -110,19 +110,19 @@ Send a random key press to circumvent idle status detection
void Document::FinishedParsing() {
DCHECK(!GetScriptableDocumentParser() || !parser_->IsParsing());
DCHECK(!GetScriptableDocumentParser() || ready_state_ != kLoading);
@@ -6920,6 +6978,9 @@ void Document::FinishedParsing() {
@@ -6931,6 +6989,9 @@ void Document::FinishedParsing() {
frame->Loader().FinishedParsing();
+ if (!IsPrefetchOnly()) {
+ injectScripts();
+ }
TRACE_EVENT_INSTANT1("devtools.timeline", "MarkDOMContent",
TRACE_EVENT_SCOPE_THREAD, "data",
inspector_mark_load_event::Data(frame));
DEVTOOLS_TIMELINE_TRACE_EVENT_INSTANT(
"MarkDOMContent", inspector_mark_load_event::Data, frame);
probe::DomContentLoadedEventFired(frame);
--- a/third_party/blink/renderer/core/dom/document.h
+++ b/third_party/blink/renderer/core/dom/document.h
@@ -1725,6 +1725,9 @@ class CORE_EXPORT Document : public Cont
@@ -1730,6 +1730,9 @@ class CORE_EXPORT Document : public Cont
void AddAXContext(AXContext*);
void RemoveAXContext(AXContext*);


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

@ -9,7 +9,7 @@ Subject: Remove all sync and account permissions/features from manifest
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -47,24 +47,18 @@ by a child template that "extends" this
@@ -46,24 +46,18 @@ by a child template that "extends" this
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
@ -34,8 +34,8 @@ Subject: Remove all sync and account permissions/features from manifest
{% set enable_vr = enable_vr|default(0) %}
{% if enable_vr == "true" %}
<!-- Indicates use of Android's VR-mode, available only on Android N+. -->
@@ -101,8 +95,6 @@ by a child template that "extends" this
<uses-permission android:name="com.android.browser.permission.WRITE_HISTORY_BOOKMARKS"/>
@@ -98,8 +92,6 @@ by a child template that "extends" this
<uses-permission android:name="com.chrome.permission.DEVICE_EXTRAS" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
- <uses-permission android:name="com.google.android.apps.now.CURRENT_ACCOUNT_ACCESS" />


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

@ -12,7 +12,7 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -3267,6 +3267,10 @@ const FeatureEntry kFeatureEntries[] = {
@@ -3257,6 +3257,10 @@ const FeatureEntry kFeatureEntries[] = {
SINGLE_VALUE_TYPE(switches::kHostedAppQuitNotification)},
#endif // OS_MAC
#if defined(OS_ANDROID)
@ -25,7 +25,7 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
flag_descriptions::kTranslateForceTriggerOnEnglishDescription, kOsAndroid,
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -1097,6 +1097,11 @@
@@ -1108,6 +1108,11 @@
"expiry_milestone": -1
},
{
@ -39,7 +39,7 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
"expiry_milestone": 83
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -3240,6 +3240,10 @@ const char kReadLaterDescription[] =
@@ -3305,6 +3305,10 @@ const char kReadLaterDescription[] =
"Allow users to save tabs for later. Enables a new button and menu for "
"accessing tabs saved for later.";
@ -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
@@ -1876,6 +1876,9 @@ extern const char kQueryTilesMoreTrendin
@@ -1911,6 +1911,9 @@ extern const char kQueryTilesMoreTrendin
extern const char kQueryTilesSwapTrendingName[];
extern const char kQueryTilesSwapTrendingDescription[];


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

@ -20,7 +20,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
--- a/components/signin/internal/identity_manager/primary_account_manager.cc
+++ b/components/signin/internal/identity_manager/primary_account_manager.cc
@@ -130,18 +130,6 @@ void PrimaryAccountManager::SetSyncPrima
@@ -135,18 +135,6 @@ void PrimaryAccountManager::SetSyncPrima
DCHECK(!account_info.account_id.empty());
DCHECK(!HasPrimaryAccount(signin::ConsentLevel::kSync));
@ -41,7 +41,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -237,7 +237,7 @@ config("compiler") {
@@ -243,7 +243,7 @@ config("compiler") {
cflags_cc = []
cflags_objc = []
cflags_objcc = []
@ -50,7 +50,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
defines = []
configs = []
@@ -1806,7 +1806,7 @@ config("no_rtti") {
@@ -1809,7 +1809,7 @@ config("no_rtti") {
# to heap-allocated memory are passed over shared library boundaries.
config("export_dynamic") {
# TODO(crbug.com/1052397): Revisit after target_os flip is completed.
@ -59,8 +59,8 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
ldflags = [ "-rdynamic" ]
}
}
@@ -2027,8 +2027,6 @@ if (is_win) {
@@ -2026,8 +2026,6 @@ if (is_win) {
common_optimize_on_cflags += [
# Put data and code in their own sections, so that unused symbols
# can be removed at link time with --gc-sections.
- "-fdata-sections",
@ -68,7 +68,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
]
common_optimize_on_ldflags += [
@@ -2036,7 +2034,6 @@ if (is_win) {
@@ -2035,7 +2033,6 @@ if (is_win) {
# See http://lwn.net/Articles/192624/ .
# -O2 enables string tail merge optimization in gold and lld.
"-Wl,-O2",
@ -76,7 +76,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
]
}
}
@@ -2414,7 +2411,7 @@ config("symbols") {
@@ -2413,7 +2410,7 @@ config("symbols") {
# sections (llvm.org/PR34820).
cflags += [ "-ggnu-pubnames" ]
}
@ -97,7 +97,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
SchemaValidatingPolicyHandler::~SchemaValidatingPolicyHandler() {}
--- a/components/signin/internal/identity_manager/profile_oauth2_token_service_builder.cc
+++ b/components/signin/internal/identity_manager/profile_oauth2_token_service_builder.cc
@@ -178,7 +178,6 @@ std::unique_ptr<ProfileOAuth2TokenServic
@@ -182,7 +182,6 @@ std::unique_ptr<ProfileOAuth2TokenServic
// device ID is needed on the network thread, but can only be generated on the
// main thread.
std::string device_id = signin::GetSigninScopedDeviceId(pref_service);
@ -107,7 +107,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
return std::make_unique<ProfileOAuth2TokenService>(
--- a/components/omnibox/browser/autocomplete_match.cc
+++ b/components/omnibox/browser/autocomplete_match.cc
@@ -1398,16 +1398,6 @@ bool AutocompleteMatch::IsEmptyAutocompl
@@ -1477,16 +1477,6 @@ bool AutocompleteMatch::IsEmptyAutocompl
split_autocompletion.Empty();
}
@ -123,10 +123,10 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
-
// static
void AutocompleteMatch::ValidateClassifications(
const base::string16& text,
const std::u16string& text,
--- a/components/omnibox/browser/autocomplete_result.cc
+++ b/components/omnibox/browser/autocomplete_result.cc
@@ -716,13 +716,6 @@ void AutocompleteResult::CopyFrom(const
@@ -712,13 +712,6 @@ void AutocompleteResult::CopyFrom(const
#endif
}
@ -142,19 +142,19 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
const AutocompleteInput& input,
--- a/components/omnibox/browser/shortcuts_backend.cc
+++ b/components/omnibox/browser/shortcuts_backend.cc
@@ -119,9 +119,6 @@ void ShortcutsBackend::RemoveObserver(Sh
@@ -120,9 +120,6 @@ void ShortcutsBackend::RemoveObserver(Sh
void ShortcutsBackend::AddOrUpdateShortcut(const base::string16& text,
void ShortcutsBackend::AddOrUpdateShortcut(const std::u16string& text,
const AutocompleteMatch& match) {
-#if DCHECK_IS_ON()
- match.Validate();
-#endif // DCHECK_IS_ON()
const base::string16 text_lowercase(base::i18n::ToLower(text));
const std::u16string text_lowercase(base::i18n::ToLower(text));
const base::Time now(base::Time::Now());
for (ShortcutMap::const_iterator it(
--- a/components/omnibox/browser/autocomplete_controller.cc
+++ b/components/omnibox/browser/autocomplete_controller.cc
@@ -744,9 +744,6 @@ void AutocompleteController::UpdateResul
@@ -732,9 +732,6 @@ void AutocompleteController::UpdateResul
// Need to validate before invoking CopyOldMatches as the old matches are not
// valid against the current input.
@ -178,7 +178,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
bool InputEventStreamValidator::ValidateImpl(
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -964,7 +964,6 @@ void NetworkContext::QueueReport(
@@ -976,7 +976,6 @@ void NetworkContext::QueueReport(
const net::NetworkIsolationKey& network_isolation_key,
const base::Optional<std::string>& user_agent,
base::Value body) {


+ 64
- 45
patches/Unobtainium/kill-Auth.patch View File

@ -3,45 +3,10 @@ Date: Fri, 22 Jun 2018 17:06:15 +0200
Subject: kill Auth
---
chrome/browser/signin/services/android/java/src/org/chromium/chrome/browser/signin/services/SigninHelper.java | 19 ----
components/signin/public/android/java/src/org/chromium/components/signin/SystemAccountManagerDelegate.java | 42 ----------
2 files changed, 3 insertions(+), 58 deletions(-)
components/signin/public/android/java/src/org/chromium/components/signin/AccountRenameChecker.java | 15 --
components/signin/public/android/java/src/org/chromium/components/signin/SystemAccountManagerDelegate.java | 54 ----------
2 files changed, 4 insertions(+), 65 deletions(-)
--- a/chrome/browser/signin/services/android/java/src/org/chromium/chrome/browser/signin/services/SigninHelper.java
+++ b/chrome/browser/signin/services/android/java/src/org/chromium/chrome/browser/signin/services/SigninHelper.java
@@ -10,10 +10,6 @@ import android.util.Pair;
import androidx.annotation.VisibleForTesting;
-import com.google.android.gms.auth.AccountChangeEvent;
-import com.google.android.gms.auth.GoogleAuthException;
-import com.google.android.gms.auth.GoogleAuthUtil;
-
import org.chromium.base.ApplicationState;
import org.chromium.base.ApplicationStatus;
import org.chromium.base.ContextUtils;
@@ -55,21 +51,6 @@ public class SigninHelper implements App
implements SigninHelper.AccountChangeEventChecker {
@Override
public List<String> getAccountChangeEvents(Context context, int index, String accountName) {
- try {
- List<AccountChangeEvent> accountChangeEvents =
- GoogleAuthUtil.getAccountChangeEvents(context, index, accountName);
- List<String> changedNames = new ArrayList<>(accountChangeEvents.size());
- for (AccountChangeEvent event : accountChangeEvents) {
- if (event.getChangeType() == GoogleAuthUtil.CHANGE_TYPE_ACCOUNT_RENAMED_TO) {
- changedNames.add(event.getChangeData());
- } else {
- changedNames.add(null);
- }
- }
- return changedNames;
- } catch (IOException | GoogleAuthException e) {
- Log.w(TAG, "Failed to get change events", e);
- }
return new ArrayList<>(0);
}
}
--- a/components/signin/public/android/java/src/org/chromium/components/signin/SystemAccountManagerDelegate.java
+++ b/components/signin/public/android/java/src/org/chromium/components/signin/SystemAccountManagerDelegate.java
@@ -26,11 +26,6 @@ import android.os.SystemClock;
@ -56,7 +21,7 @@ Subject: kill Auth
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.Callback;
@@ -120,18 +115,7 @@ public class SystemAccountManagerDelegat
@@ -120,14 +115,7 @@ public class SystemAccountManagerDelegat
// so don't report any accounts if Google Play Services are out of date.
checkCanUseGooglePlayServices();