Browse Source

Update to 93.0.4577.63

master
wchen342 1 week ago
parent
commit
84ce63c433
Signed by: wchen342 GPG Key ID: 9C19365D69B04CEC
56 changed files with 753 additions and 704 deletions
  1. +2
    -2
      .build_config
  2. +7
    -0
      CHANGELOG.md
  3. +1
    -0
      build.sh
  4. +7
    -7
      patches/Bromite/AImageReader-CFI-crash-mitigations.patch
  5. +26
    -26
      patches/Bromite/Add-a-proxy-configuration-page.patch
  6. +39
    -41
      patches/Bromite/Add-an-always-incognito-mode.patch
  7. +59
    -67
      patches/Bromite/Add-bookmark-import-export-actions.patch
  8. +5
    -5
      patches/Bromite/Add-exit-menu-item.patch
  9. +6
    -6
      patches/Bromite/Add-flag-to-disable-WebGL.patch
  10. +2
    -2
      patches/Bromite/Add-option-to-not-persist-tabs-across-sessions.patch
  11. +1
    -1
      patches/Bromite/Change-default-webRTC-policy-to-not-use-any-address.patch
  12. +1
    -1
      patches/Bromite/Disable-DRM-media-origin-IDs-preprovisioning.patch
  13. +6
    -6
      patches/Bromite/DoH-secure-mode-by-default.patch
  14. +9
    -9
      patches/Bromite/Inject-scripts-for-AMP-tracking-ads-and-video.patch
  15. +1
    -1
      patches/Bromite/Remove-account-permissions-from-manifest.patch
  16. +5
    -5
      patches/Bromite/Revert-flags-remove-disable-pull-to-refresh-effect.patch
  17. +2
    -2
      patches/Bromite/updater-disable-updater-pings.patch
  18. +13
    -13
      patches/Other/debug-fix.patch
  19. +1
    -15
      patches/Other/gs-download-use-normal-python.patch
  20. +12
    -0
      patches/Other/python3-dict-changed-size-during-iteration.patch
  21. +4
    -4
      patches/Unobtainium/kill-Auth.patch
  22. +4
    -4
      patches/Unobtainium/kill-GCM.patch
  23. +4
    -4
      patches/Unobtainium/kill-Translate.patch
  24. +1
    -1
      patches/Vanadium/0003-switch-to-fstack-protector-strong.patch
  25. +1
    -1
      patches/Vanadium/0016-disable-seed-based-field-trials.patch
  26. +2
    -3
      patches/Vanadium/0023-disable-showing-popular-sites-by-default.patch
  27. +1
    -1
      patches/Vanadium/0031-disable-media-router-media-remoting-by-default.patch
  28. +0
    -59
      patches/Vanadium/0032-disable-media-router-by-default.patch
  29. +32
    -0
      patches/Vanadium/0034-disable-media-router-by-default.patch
  30. +26
    -0
      patches/Vanadium/0077-disable-using-Play-services-fonts.patch
  31. +2
    -1
      patches/series
  32. +1
    -1
      patches/src-fix/android-rlz-fix-missing-variable.patch
  33. +4
    -4
      patches/src-fix/fix-prefs.patch
  34. +83
    -58
      patches/src-fix/fix-safe-browsing.patch
  35. +3
    -3
      patches/src-fix/fix-unkown-warning-clang.patch
  36. +28
    -23
      patches/ungoogled-chromium-android/Add-always-desktop-option.patch
  37. +1
    -1
      patches/ungoogled-chromium-android/Add-folder-button-bookmark.patch
  38. +20
    -20
      patches/ungoogled-chromium-android/Add-force-tablet-ui-option.patch
  39. +11
    -11
      patches/ungoogled-chromium-android/Add-save-data-flag.patch
  40. +4
    -4
      patches/ungoogled-chromium-android/Add_trichrome_apk.patch
  41. +1
    -1
      patches/ungoogled-chromium-android/Change-package-name-chromium.patch
  42. +1
    -1
      patches/ungoogled-chromium-android/Disable-contextual-search.patch
  43. +2
    -2
      patches/ungoogled-chromium-android/Enable-ProactivelySwapBrowsingInstance.patch
  44. +6
    -6
      patches/ungoogled-chromium-android/Enable-update-notification.patch
  45. +132
    -118
      patches/ungoogled-chromium-android/Remove-UI-elements.patch
  46. +9
    -9
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.auth.patch
  47. +9
    -9
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.cast.patch
  48. +30
    -29
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.common-auth-signin-dynamic-com.google.android.gms.tasks.patch
  49. +96
    -86
      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
  50. +1
    -1
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.flags-com.google.android.gms.location.places-com.google.android.gms.stats.patch
  51. +13
    -14
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.gcm.patch
  52. +8
    -8
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.vision-com.google.android.gms.clearcut-com.google.android.gms.phenotype.patch
  53. +3
    -3
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.core.splitcompat-com.google.android.play.core.splitinstall.patch
  54. +1
    -1
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.patch
  55. +3
    -3
      patches/ungoogled-chromium-android/Remove-dependency-on-firebase.patch
  56. +1
    -1
      patches/ungoogled-chromium-android/Tricrhome-webview-64.patch

+ 2
- 2
.build_config View File

@ -10,7 +10,7 @@ trichrome_webview_target=trichrome_webview_apk
trichrome_webview_64_target=trichrome_webview_64_apk
all=all
chromium_version=92.0.4515.159
ungoogled_chromium_version=92.0.4515.159
chromium_version=93.0.4577.63
ungoogled_chromium_version=93.0.4577.63
ungoogled_chromium_revision=1
ungoogled_chromium_android_revision=1

+ 7
- 0
CHANGELOG.md View File

@ -1,3 +1,10 @@
# 93.0.4577.63-1
* Build script can now run with python3
* disable play service fonts
# 92.0.4515.159-1
* Upstream update
# 92.0.4515.107-1
* Remove DeviceOrientation API related flags. See [bromite/bromite/issues/1204](https://github.com/bromite/bromite/issues/1204).
* Remove FireBase dependencies and move to a separate patch


+ 1
- 0
build.sh View File

@ -162,6 +162,7 @@ function prepare_repos {
popd
# update node
pushd src && patch -p1 --ignore-whitespace -i ../patches/Other/python3-dict-changed-size-during-iteration.patch --no-backup-if-mismatch && popd
mkdir -p src/third_party/node/linux/node-linux-x64/bin
ln -s /usr/bin/node src/third_party/node/linux/node-linux-x64/bin/
( src/third_party/node/update_npm_deps ) || return $?


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

@ -44,7 +44,7 @@ See discussions at:
// C++11 static local variable initialization is
// thread-safe.
@@ -30,8 +32,12 @@ AndroidImageReader& AndroidImageReader::
return *instance;
return instance;
}
+void AndroidImageReader::DisableSupport() {
@ -79,7 +79,7 @@ See discussions at:
AndroidImageReader();
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -1922,7 +1922,7 @@
@@ -2039,7 +2039,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
@@ -3189,6 +3189,22 @@
@@ -3192,6 +3192,22 @@
]
},
{
@ -115,7 +115,7 @@ See discussions at:
"description": "DXVA video decoder crashes on some AMD GPUs.",
--- a/gpu/config/gpu_finch_features.cc
+++ b/gpu/config/gpu_finch_features.cc
@@ -50,6 +50,11 @@ bool IsDeviceBlocked(const char* field,
@@ -51,6 +51,11 @@ bool IsDeviceBlocked(const char* field,
} // namespace
#if defined(OS_ANDROID)
@ -195,7 +195,7 @@ See discussions at:
#include "base/android/scoped_hardware_buffer_fence_sync.h"
#include "base/bind.h"
#include "base/feature_list.h"
@@ -49,7 +50,15 @@ std::unique_ptr<ui::ScopedMakeCurrent> M
@@ -50,7 +51,15 @@ std::unique_ptr<ui::ScopedMakeCurrent> M
}
TextureOwner::Mode GetTextureOwnerMode() {
@ -214,7 +214,7 @@ See discussions at:
}
--- a/media/base/media_switches.cc
+++ b/media/base/media_switches.cc
@@ -632,6 +632,10 @@ const base::Feature kMediaDrmPreprovisio
@@ -640,6 +640,10 @@ const base::Feature kMediaDrmPreprovisio
const base::Feature kMediaDrmPreprovisioningAtStartup{
"MediaDrmPreprovisioningAtStartup", base::FEATURE_ENABLED_BY_DEFAULT};
@ -227,7 +227,7 @@ See discussions at:
base::FEATURE_DISABLED_BY_DEFAULT};
--- a/media/base/media_switches.h
+++ b/media/base/media_switches.h
@@ -207,6 +207,7 @@ MEDIA_EXPORT extern const base::Feature
@@ -210,6 +210,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;


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

@ -19,8 +19,8 @@ for SimpleURLLoaders as well.
chrome/browser/prefs/browser_prefs.cc | 4
chrome/browser/prefs/chrome_command_line_pref_store.cc | 2
chrome/browser/resources/proxy_config.css | 61 +
chrome/browser/resources/proxy_config.html | 80 +
chrome/browser/resources/proxy_config.js | 263 ++++++
chrome/browser/resources/proxy_config.html | 79 +
chrome/browser/resources/proxy_config.js | 266 ++++++
chrome/browser/ui/BUILD.gn | 2
chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc | 3
chrome/browser/ui/webui/proxy_config_ui.cc | 417 ++++++++++
@ -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, 994 insertions(+), 14 deletions(-)
24 files changed, 996 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,9 +42,9 @@ for SimpleURLLoaders as well.
--- a/chrome/android/java/res/values/values.xml
+++ b/chrome/android/java/res/values/values.xml
@@ -29,6 +29,9 @@
<integer name="reload_button_level_reload">0</integer>
<integer name="reload_button_level_stop">1</integer>
@@ -25,6 +25,9 @@
<!-- Compositor Tab Title Text -->
<bool name="compositor_tab_title_fake_bold_text">true</bool>
+ <string name="proxy_title">Proxy configuration</string>
+ <string name="proxy_url">chrome://proxy</string>
@ -77,7 +77,7 @@ for SimpleURLLoaders as well.
private ManagedPreferenceDelegate mManagedPreferenceDelegate;
--- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
+++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
@@ -363,6 +363,8 @@ ChromeAutocompleteProviderClient::GetBui
@@ -362,6 +362,8 @@ ChromeAutocompleteProviderClient::GetBui
base::ASCIIToUTF16(chrome::kChromeUISettingsURL));
#endif
builtins_to_provide.push_back(
@ -88,7 +88,7 @@ for SimpleURLLoaders as well.
}
--- a/chrome/browser/browser_resources.grd
+++ b/chrome/browser/browser_resources.grd
@@ -101,6 +101,12 @@
@@ -92,6 +92,12 @@
<include name="IDR_HANGOUT_SERVICES_MANIFEST" file="resources\hangout_services\manifest.json" type="BINDATA" />
</if>
@ -165,7 +165,7 @@ for SimpleURLLoaders as well.
};
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -157,6 +157,8 @@
@@ -159,6 +159,8 @@
#include "printing/buildflags/buildflags.h"
#include "rlz/buildflags/buildflags.h"
@ -174,7 +174,7 @@ for SimpleURLLoaders as well.
#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
#include "chrome/browser/background/background_mode_manager.h"
#endif
@@ -784,6 +786,8 @@ void RegisterLocalState(PrefRegistrySimp
@@ -899,6 +901,8 @@ void RegisterLocalState(PrefRegistrySimp
PluginsResourceService::RegisterPrefs(registry);
#endif
@ -185,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
@@ -156,7 +156,7 @@ void ChromeCommandLinePrefStore::ApplyPr
@@ -154,7 +154,7 @@ void ChromeCommandLinePrefStore::ApplyPr
SetValue(
proxy_config::prefs::kProxy,
std::make_unique<base::Value>(ProxyConfigDictionary::CreateFixedServers(
@ -611,7 +611,7 @@ for SimpleURLLoaders as well.
+})();
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -258,6 +258,8 @@ static_library("ui") {
@@ -265,6 +265,8 @@ static_library("ui") {
"webui/metrics_handler.h",
"webui/net_export_ui.cc",
"webui/net_export_ui.h",
@ -630,7 +630,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"
@@ -601,6 +602,8 @@ WebUIFactoryFunction GetWebUIFactoryFunc
@@ -617,6 +618,8 @@ WebUIFactoryFunction GetWebUIFactoryFunc
return &NewWebUI<MemoryInternalsUI>;
if (url.host_piece() == chrome::kChromeUINetExportHost)
return &NewWebUI<NetExportUI>;
@ -1106,25 +1106,25 @@ for SimpleURLLoaders as well.
const char kChromeUIChromeURLsHost[] = "chrome-urls";
const char kChromeUIChromeURLsURL[] = "chrome://chrome-urls/";
const char kChromeUIComponentsHost[] = "components";
@@ -336,6 +338,7 @@ bool IsSystemWebUIHost(base::StringPiece
kChromeUIMobileSetupHost,
kChromeUIMultiDeviceSetupHost,
kChromeUINetworkHost,
+ kChromeUIProxyConfigHost,
kChromeUIOobeHost,
kChromeUIOSCreditsHost,
kChromeUIOSSettingsHost,
@@ -553,6 +556,7 @@ const char* const kChromeHostURLs[] = {
#if !defined(OS_ANDROID)
@@ -344,6 +346,7 @@ bool IsSystemWebUIHost(base::StringPiece
kChromeUIMobileSetupHost,
kChromeUIMultiDeviceSetupHost,
kChromeUINetworkHost,
+ kChromeUIProxyConfigHost,
kChromeUIOobeHost,
kChromeUIOSCreditsHost,
kChromeUIOSSettingsHost,
@@ -568,6 +571,7 @@ const char* const kChromeHostURLs[] = {
#if !BUILDFLAG(IS_CHROMEOS_ASH)
kChromeUIAppLauncherPageHost,
+ kChromeUIProxyConfigHost,
#endif
+ kChromeUIProxyConfigHost,
kChromeUIBookmarksHost,
kChromeUIDownloadsHost,
kChromeUIHelpHost,
--- a/chrome/common/webui_url_constants.h
+++ b/chrome/common/webui_url_constants.h
@@ -120,6 +120,8 @@ extern const char kChromeUIMemoryInterna
@@ -122,6 +122,8 @@ extern const char kChromeUIMemoryInterna
extern const char kChromeUINTPTilesInternalsHost[];
extern const char kChromeUINaClHost[];
extern const char kChromeUINetExportHost[];
@ -1135,7 +1135,7 @@ for SimpleURLLoaders as well.
extern const char kChromeUINewTabHost[];
--- a/components/policy/core/browser/proxy_policy_handler.cc
+++ b/components/policy/core/browser/proxy_policy_handler.cc
@@ -197,7 +197,7 @@ void ProxyPolicyHandler::ApplyPolicySett
@@ -210,7 +210,7 @@ void ProxyPolicyHandler::ApplyPolicySett
bypass_list->GetAsString(&bypass_list_string);
prefs->SetValue(proxy_config::prefs::kProxy,
ProxyConfigDictionary::CreateFixedServers(


+ 39
- 41
patches/Bromite/Add-an-always-incognito-mode.patch View File

@ -9,10 +9,10 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
---
chrome/android/chrome_java_sources.gni | 1
chrome/android/java/src/org/chromium/chrome/browser/AlwaysIncognitoLinkInterceptor.java | 80 ++++++++++
chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java | 6
chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java | 7
chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java | 4
chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java | 6
chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java | 9 +
chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java | 8 -
chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java | 25 ---
chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java | 5
chrome/android/java/src/org/chromium/chrome/browser/init/StartupTabPreloader.java | 14 +
@ -120,7 +120,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
+}
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -58,6 +58,7 @@ import org.chromium.base.supplier.Unowne
@@ -56,6 +56,7 @@ import org.chromium.base.supplier.Unowne
import org.chromium.base.task.PostTask;
import org.chromium.cc.input.BrowserControlsState;
import org.chromium.chrome.R;
@ -128,21 +128,22 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
import org.chromium.chrome.browser.IntentHandler.IntentHandlerDelegate;
import org.chromium.chrome.browser.IntentHandler.TabOpenType;
import org.chromium.chrome.browser.accessibility_tab_switcher.OverviewListLayout;
@@ -1743,8 +1744,9 @@ public class ChromeTabbedActivity extend
@@ -1745,8 +1746,10 @@ public class ChromeTabbedActivity extend
Bundle savedInstanceState = getSavedInstanceState();
// We determine the model as soon as possible so every systems get initialized coherently.
- boolean startIncognito = savedInstanceState != null
- && savedInstanceState.getBoolean("is_incognito_selected", false);
+ boolean startIncognito = ContextUtils.getAppSharedPreferences().getBoolean(AlwaysIncognitoLinkInterceptor.PREF_ALWAYS_INCOGNITO, false)
- && savedInstanceState.getBoolean(IS_INCOGNITO_SELECTED, false);
+ boolean startIncognito = ContextUtils.getAppSharedPreferences().getBoolean(
+ AlwaysIncognitoLinkInterceptor.PREF_ALWAYS_INCOGNITO, false)
+ || (savedInstanceState != null
+ && savedInstanceState.getBoolean("is_incognito_selected", false));
+ && savedInstanceState.getBoolean(IS_INCOGNITO_SELECTED, false));
int index = savedInstanceState != null ? savedInstanceState.getInt(WINDOW_INDEX, 0) : 0;
mNextTabPolicySupplier = new ChromeNextTabPolicySupplier(mOverviewModeBehaviorSupplier);
--- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
@@ -94,6 +94,7 @@ import org.chromium.chrome.browser.conte
@@ -101,6 +101,7 @@ import org.chromium.chrome.browser.conte
import org.chromium.chrome.browser.contextualsearch.ContextualSearchManager;
import org.chromium.chrome.browser.contextualsearch.ContextualSearchManager.ContextualSearchTabPromotionDelegate;
import org.chromium.chrome.browser.dependency_injection.ChromeActivityCommonsModule;
@ -150,7 +151,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
import org.chromium.chrome.browser.dependency_injection.ChromeActivityComponent;
import org.chromium.chrome.browser.dependency_injection.ModuleFactoryOverrides;
import org.chromium.chrome.browser.device.DeviceClassManager;
@@ -1837,6 +1838,9 @@ public abstract class ChromeActivity<C e
@@ -1951,6 +1952,9 @@ public abstract class ChromeActivity<C e
throw new IllegalStateException(
"Attempting to access TabCreator before initialization");
}
@ -177,17 +178,15 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
boolean isMenuGroupTabsVisible = TabUiFeatureUtilities.isTabGroupsAndroidEnabled(mContext)
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java
@@ -30,7 +30,9 @@ import org.chromium.base.Callback;
import org.chromium.base.ContextUtils;
@@ -31,6 +31,7 @@ import org.chromium.base.ContextUtils;
import org.chromium.base.metrics.RecordHistogram;
import org.chromium.base.supplier.Supplier;
+import org.chromium.base.ContextUtils;
import org.chromium.chrome.R;
+import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor;
import org.chromium.chrome.browser.AppHooks;
import org.chromium.chrome.browser.compositor.bottombar.ephemeraltab.EphemeralTabCoordinator;
import org.chromium.chrome.browser.contextmenu.ChromeContextMenuItem.Item;
@@ -408,6 +410,10 @@ public class ChromeContextMenuPopulator
import org.chromium.chrome.browser.contextmenu.ContextMenuCoordinator.ListItemType;
@@ -409,6 +410,10 @@ public class ChromeContextMenuPopulator
boolean hasSaveImage = false;
mShowEphemeralTabNewLabel = null;
@ -198,7 +197,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
List<Pair<Integer, ModelList>> groupedItems = new ArrayList<>();
if (mParams.isAnchor()) {
@@ -426,6 +432,7 @@ public class ChromeContextMenuPopulator
@@ -427,6 +432,7 @@ public class ChromeContextMenuPopulator
linkGroup.add(createListItem(Item.OPEN_IN_NEW_TAB_IN_GROUP));
}
}
@ -206,7 +205,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
if (!mItemDelegate.isIncognito() && mItemDelegate.isIncognitoSupported()) {
linkGroup.add(createListItem(Item.OPEN_IN_INCOGNITO_TAB));
}
@@ -450,7 +457,7 @@ public class ChromeContextMenuPopulator
@@ -451,7 +457,7 @@ public class ChromeContextMenuPopulator
}
}
if (FirstRunStatus.getFirstRunFlowComplete()) {
@ -251,7 +250,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
private void recordUserAction() {
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabIntentDataProvider.java
@@ -48,6 +48,9 @@ import org.chromium.components.browser_u
@@ -50,6 +50,9 @@ import org.chromium.components.browser_u
import org.chromium.components.embedder_support.util.UrlConstants;
import org.chromium.device.mojom.ScreenOrientationLockType;
@ -261,7 +260,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
@@ -772,7 +775,7 @@ public class CustomTabIntentDataProvider
@@ -727,7 +730,7 @@ public class CustomTabIntentDataProvider
@Override
public boolean isIncognito() {
@ -272,7 +271,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
@Nullable
--- a/chrome/android/java/src/org/chromium/chrome/browser/init/StartupTabPreloader.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/init/StartupTabPreloader.java
@@ -38,6 +38,9 @@ import org.chromium.ui.base.PageTransiti
@@ -34,6 +34,9 @@ import org.chromium.content_public.brows
import org.chromium.ui.base.WindowAndroid;
import org.chromium.url.GURL;
@ -282,7 +281,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
/**
* This class attempts to preload the tab if the url is known from the intent when the profile
* is created. This is done to improve startup latency.
@@ -195,10 +198,15 @@ public class StartupTabPreloader impleme
@@ -185,17 +188,22 @@ public class StartupTabPreloader impleme
Intent intent = mIntentSupplier.get();
GURL url = UrlFormatter.fixupUrl(getUrlFromIntent(intent));
@ -298,9 +297,8 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
+ isIncognito ? profile.getPrimaryOTRProfile(true /* createIfNeeded */) : profile,
+ false);
mLoadUrlParams = new LoadUrlParams(url.getValidSpecOrEmpty());
String referrer = IntentHandler.getReferrerUrlIncludingExtraHeaders(intent);
@@ -212,7 +220,7 @@ public class StartupTabPreloader impleme
mLoadUrlParams = mIntentHandler.createLoadUrlParamsForIntent(url.getSpec(), intent);
// Create a detached tab, but don't add it to the tab model yet. We'll do that
// later if the loadUrlParams etc... match.
mTab = TabBuilder.createLiveTab(false)
@ -321,7 +319,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
private static final String PREF_SECURE_DNS = "secure_dns";
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java
@@ -47,6 +47,10 @@ import org.chromium.url.GURL;
@@ -44,6 +44,10 @@ import org.chromium.url.GURL;
import java.nio.ByteBuffer;
@ -332,7 +330,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
/**
* This class creates various kinds of new tabs and adds them to the right {@link TabModel}.
*/
@@ -77,6 +81,7 @@ public class ChromeTabCreator extends Ta
@@ -74,6 +78,7 @@ public class ChromeTabCreator extends Ta
private final Activity mActivity;
private final StartupTabPreloader mStartupTabPreloader;
private final boolean mIncognito;
@ -340,7 +338,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
private WindowAndroid mNativeWindow;
private TabModel mTabModel;
@@ -99,6 +104,10 @@ public class ChromeTabCreator extends Ta
@@ -96,6 +101,10 @@ public class ChromeTabCreator extends Ta
mNativeWindow = nativeWindow;
mTabDelegateFactorySupplier = tabDelegateFactory;
mIncognito = incognito;
@ -351,7 +349,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
mOverviewNTPCreator = overviewNTPCreator;
mAsyncTabParamsManager = asyncTabParamsManager;
mTabModelSelectorSupplier = tabModelSelectorSupplier;
@@ -262,6 +271,8 @@ public class ChromeTabCreator extends Ta
@@ -259,6 +268,8 @@ public class ChromeTabCreator extends Ta
if (creationState == TabCreationState.LIVE_IN_FOREGROUND && !openInForeground) {
creationState = TabCreationState.LIVE_IN_BACKGROUND;
}
@ -360,7 +358,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
mTabModel.addTab(tab, position, type, creationState);
return tab;
} finally {
@@ -296,6 +307,8 @@ public class ChromeTabCreator extends Ta
@@ -293,6 +304,8 @@ public class ChromeTabCreator extends Ta
@TabCreationState
int creationState = openInForeground ? TabCreationState.LIVE_IN_FOREGROUND
: TabCreationState.LIVE_IN_BACKGROUND;
@ -369,15 +367,15 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
mTabModel.addTab(tab, position, type, creationState);
return true;
}
@@ -339,7 +352,6 @@ public class ChromeTabCreator extends Ta
@@ -333,7 +346,6 @@ public class ChromeTabCreator extends Ta
// TODO(crbug.com/1081924): Clean up the launches from SearchActivity/Chrome.
public Tab launchUrlFromExternalApp(String url, String referer, String headers, String appId,
boolean forceNewTab, Intent intent, long intentTimestamp) {
public Tab launchUrlFromExternalApp(
LoadUrlParams loadUrlParams, String appId, boolean forceNewTab, Intent intent) {
- assert !mIncognito;
// Don't re-use tabs for intents from Chrome. Note that this can be spoofed so shouldn't be
// relied on for anything security sensitive.
boolean isLaunchedFromChrome = TextUtils.equals(appId, mActivity.getPackageName());
if (forceNewTab && !isLaunchedFromChrome) {
@@ -453,6 +465,8 @@ public class ChromeTabCreator extends Ta
@@ -428,6 +440,8 @@ public class ChromeTabCreator extends Ta
.setSerializedCriticalPersistedTabData(serializedCriticalPersistedTabData)
.build();
}
@ -421,7 +419,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
if (model.isIncognito() != isIncognito) {
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappIntentDataProvider.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappIntentDataProvider.java
@@ -27,6 +27,9 @@ import org.chromium.chrome.browser.brows
@@ -28,6 +28,9 @@ import org.chromium.chrome.browser.brows
import org.chromium.chrome.browser.flags.ActivityType;
import org.chromium.components.browser_ui.widget.TintedDrawable;
@ -432,15 +430,15 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
* Stores info about a web app.
*/
@@ -41,6 +44,8 @@ public class WebappIntentDataProvider ex
private final @ActivityType int mActivityType;
private final Intent mIntent;
private final ColorProviderImpl mColorProvider;
+ private boolean mIsIncognito = false;
+
/**
* Returns the toolbar color to use if a custom color is not specified by the webapp.
*/
@@ -63,6 +68,10 @@ public class WebappIntentDataProvider ex
@@ -62,6 +67,10 @@ public class WebappIntentDataProvider ex
mWebappExtras = webappExtras;
mWebApkExtras = webApkExtras;
mActivityType = (webApkExtras != null) ? ActivityType.WEB_APK : ActivityType.WEBAPP;
@ -451,7 +449,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
}
@Override
@@ -156,6 +165,11 @@ public class WebappIntentDataProvider ex
@@ -151,6 +160,11 @@ public class WebappIntentDataProvider ex
}
@Override
@ -465,7 +463,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
}
--- a/chrome/browser/flags/android/chrome_feature_list.cc
+++ b/chrome/browser/flags/android/chrome_feature_list.cc
@@ -421,7 +421,7 @@ const base::Feature kCCTIncognito{"CCTIn
@@ -433,7 +433,7 @@ const base::Feature kCCTIncognito{"CCTIn
base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kCCTIncognitoAvailableToThirdParty{
@ -476,7 +474,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
base::FEATURE_ENABLED_BY_DEFAULT};
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -941,6 +941,13 @@ Your Google account may have other forms
@@ -931,6 +931,13 @@ Your Google account may have other forms
<message name="IDS_CLEAR_BROWSING_HISTORY_SUMMARY_SYNCED_NO_LINK" desc="A text for the basic tab explaining browsing history for users with history sync. This version is shown when the link to MyActivity is displayed separately.">
Clears history from all synced devices.
</message>


+ 59
- 67
patches/Bromite/Add-bookmark-import-export-actions.patch View File

@ -18,13 +18,13 @@ Completely remove contacts picker permission from the file dialog
chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManager.java | 22
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/BUILD.gn | 11
chrome/browser/about_flags.cc | 6
chrome/browser/android/bookmarks/bookmark_bridge.cc | 285 ++++++++++
chrome/browser/android/bookmarks/bookmark_bridge.cc | 284 ++++++++++
chrome/browser/android/bookmarks/bookmark_bridge.h | 28
chrome/browser/bookmarks/bookmark_html_writer.cc | 8
chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java | 8
chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java | 10
chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java | 8
chrome/browser/flag_descriptions.cc | 5
chrome/browser/flag_descriptions.h | 3
chrome/browser/flags/android/chrome_feature_list.cc | 5
@ -43,7 +43,7 @@ Completely remove contacts picker permission from the file dialog
ui/shell_dialogs/select_file_dialog.h | 2
ui/shell_dialogs/select_file_dialog_android.cc | 6
ui/shell_dialogs/select_file_dialog_android.h | 2
37 files changed, 877 insertions(+), 24 deletions(-)
37 files changed, 880 insertions(+), 23 deletions(-)
--- a/base/android/content_uri_utils.cc
+++ b/base/android/content_uri_utils.cc
@ -267,11 +267,10 @@ Completely remove contacts picker permission from the file dialog
*/
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java
@@ -4,7 +4,20 @@
@@ -4,7 +4,19 @@
package org.chromium.chrome.browser.bookmarks;
+import android.app.Activity;
+import android.content.Intent;
+import android.content.Context;
+import android.content.pm.PackageManager;
@ -288,7 +287,7 @@ Completely remove contacts picker permission from the file dialog
import android.text.TextUtils;
import android.util.Pair;
@@ -27,8 +40,33 @@ import org.chromium.components.url_forma
@@ -27,8 +39,33 @@ import org.chromium.components.url_forma
import org.chromium.content_public.browser.WebContents;
import org.chromium.url.GURL;
@ -322,7 +321,7 @@ Completely remove contacts picker permission from the file dialog
/**
* Provides the communication channel for Android to fetch and manipulate the
@@ -587,6 +625,209 @@ public class BookmarkBridge {
@@ -587,6 +624,210 @@ public class BookmarkBridge {
}
/**
@ -476,7 +475,8 @@ Completely remove contacts picker permission from the file dialog
+ mCustomView = (DownloadLocationCustomView) LayoutInflater.from(mContext).inflate(
+ R.layout.download_location_dialog, null);
+ mCustomView.initialize(
+ DownloadLocationDialogType.DEFAULT, /*totalBytes*/ 0);
+ DownloadLocationDialogType.DEFAULT, new File(standardBoorkmarkName),
+ /*totalBytes*/ 0, context.getString(R.string.export_bookmarks_alert_title));
+ mCustomView.mDontShowAgain.setVisibility(View.GONE);
+
+ Resources resources = mContext.getResources();
@ -684,27 +684,32 @@ 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
@@ -101,7 +101,7 @@ public class NativePageFactory {
@@ -176,7 +176,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);
return new BookmarkPage(mActivity.getComponentName(), mSnackbarManagerSupplier.get(),
mTabModelSelector.isIncognitoSelected(),
- new TabShim(tab, mBrowserControlsManager, mTabModelSelector));
+ new TabShim(tab, mBrowserControlsManager, mTabModelSelector), mActivity);
}
protected NativePage buildDownloadsPage(Tab tab) {
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -1856,6 +1856,8 @@ static_library("browser") {
"webid/federated_identity_sharing_permission_context_factory.h",
"window_placement/window_placement_permission_context.cc",
@@ -1833,6 +1833,13 @@ static_library("browser") {
"window_placement/window_placement_permission_context.h",
+ "importer/profile_writer.cc",
+ "importer/profile_writer.h",
]
+ if (is_android) {
+ sources += [
+ "importer/profile_writer.cc",
+ "importer/profile_writer.h",
+ ]
+ }
+
configs += [
@@ -2962,6 +2964,8 @@ static_library("browser") {
"//build/config/compiler:wexit_time_destructors",
"//build/config:precompiled_headers",
@@ -2944,6 +2951,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",
@ -713,7 +718,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",
@@ -3485,8 +3489,6 @@ static_library("browser") {
@@ -3478,8 +3487,6 @@ static_library("browser") {
"badging/badge_manager_factory.h",
"banners/app_banner_manager_desktop.cc",
"banners/app_banner_manager_desktop.h",
@ -724,9 +729,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
@@ -7379,6 +7379,12 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kPlaybackSpeedButtonDescription, kOsAll,
FEATURE_VALUE_TYPE(media::kPlaybackSpeedButton)},
@@ -7623,6 +7623,12 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(features::kShareUsageRanking)},
#endif
+ {"export-bookmarks-use-saf",
+ flag_descriptions::kBookmarksExportUseSafName,
@ -739,15 +744,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
@@ -21,6 +21,7 @@
#include "base/containers/stack.h"
#include "base/guid.h"
#include "base/i18n/string_compare.h"
+#include "base/strings/string_piece.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/android/chrome_jni_headers/BookmarkBridge_jni.h"
#include "chrome/browser/android/bookmarks/partner_bookmarks_reader.h"
@@ -39,6 +40,7 @@
@@ -39,6 +39,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"
@ -755,7 +752,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 +50,24 @@
@@ -48,6 +49,24 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
@ -780,7 +777,7 @@ Completely remove contacts picker permission from the file dialog
using base::android::AttachCurrentThread;
using base::android::ConvertUTF8ToJavaString;
using base::android::ConvertUTF16ToJavaString;
@@ -64,8 +84,93 @@ using bookmarks::BookmarkNode;
@@ -64,8 +83,93 @@ using bookmarks::BookmarkNode;
using bookmarks::BookmarkType;
using content::BrowserThread;
@ -874,7 +871,7 @@ Completely remove contacts picker permission from the file dialog
const int kInvalidId = -1;
class BookmarkTitleComparer {
@@ -152,6 +257,10 @@ BookmarkBridge::~BookmarkBridge() {
@@ -152,6 +256,10 @@ BookmarkBridge::~BookmarkBridge() {
if (partner_bookmarks_shim_)
partner_bookmarks_shim_->RemoveObserver(this);
reading_list_manager_->RemoveObserver(this);
@ -885,7 +882,7 @@ Completely remove contacts picker permission from the file dialog
}
void BookmarkBridge::Destroy(JNIEnv*, const JavaParamRef<jobject>&) {
@@ -542,6 +651,182 @@ jint BookmarkBridge::GetTotalBookmarkCou
@@ -543,6 +651,182 @@ jint BookmarkBridge::GetTotalBookmarkCou
return count;
}
@ -905,7 +902,7 @@ 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<std::u16string> v_accept_types = { base::UTF8ToUTF16(base::StringPiece("text/html")) };
+ const std::vector<std::u16string> v_accept_types = { u"text/html" };
+
+ // Android needs the original MIME types and an additional capture value.
+ std::pair<std::vector<std::u16string>, bool> accept_types =
@ -1039,7 +1036,7 @@ Completely remove contacts picker permission from the file dialog
+
+ if (!bookmarks.empty()) {
+ // adding bookmarks will begin extensive changes to the model
+ writer->AddBookmarksWithModel(bookmark_model_, bookmarks, base::ASCIIToUTF16(base::StringPiece("Imported")));
+ writer->AddBookmarksWithModel(bookmark_model_, bookmarks, u"Imported");
+ }
+ if (!search_engines.empty()) {
+ TemplateURLService::OwnedTemplateURLVector owned_template_urls;
@ -1163,7 +1160,7 @@ 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"
@@ -240,7 +241,12 @@ class Writer : public base::RefCountedTh
@@ -230,7 +231,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;
@ -1217,7 +1214,7 @@ Completely remove contacts picker permission from the file dialog
return selected;
--- a/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java
+++ b/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java
@@ -36,16 +36,16 @@ import java.util.ArrayList;
@@ -36,12 +36,12 @@ import java.util.ArrayList;
public class DownloadLocationDialogCoordinator implements ModalDialogProperties.Controller {
@NonNull
private DownloadLocationDialogController mController;
@ -1233,11 +1230,6 @@ Completely remove contacts picker permission from the file dialog
private long mTotalBytes;
private @DownloadLocationDialogType int mDialogType;
private String mSuggestedPath;
- private Context mContext;
+ protected Context mContext;
private boolean mLocationDialogManaged;
/**
@@ -127,7 +127,7 @@ public class DownloadLocationDialogCoord
* Called after retrieved the download directory options.
* @param dirs An list of available download directories.
@ -1249,7 +1241,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
@@ -5221,6 +5221,11 @@ const char kWebrtcPipeWireCapturerDescri
@@ -5495,6 +5495,11 @@ const char kWebrtcPipeWireCapturerDescri
"capturing the desktop content on the Wayland display server.";
#endif // #if defined(WEBRTC_USE_PIPEWIRE)
@ -1263,7 +1255,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
@@ -3073,6 +3073,9 @@ extern const char kWebrtcPipeWireCapture
@@ -3207,6 +3207,9 @@ extern const char kWebrtcPipeWireCapture
extern const char kWebrtcPipeWireCapturerDescription[];
#endif // #if defined(WEBRTC_USE_PIPEWIRE)
@ -1275,7 +1267,7 @@ 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
@@ -151,6 +151,7 @@ const base::Feature* const kFeaturesExpo
@@ -156,6 +156,7 @@ const base::Feature* const kFeaturesExpo
&kBackgroundThreadPool,
&kBentoOffline,
&kBookmarkBottomSheet,
@ -1283,9 +1275,9 @@ Completely remove contacts picker permission from the file dialog
&kCastDeviceFilter,
&kCloseTabSuggestions,
&kCriticalPersistedTabData,
@@ -759,6 +760,10 @@ const base::Feature kVrBrowsingFeedback{
const base::Feature kWebNotesStylize{"WebNotesStylize",
base::FEATURE_DISABLED_BY_DEFAULT};
@@ -774,6 +775,10 @@ const base::Feature kWebOtpCrossDeviceSi
const base::Feature kWebApkInstallCompleteNotification{
"WebApkInstallCompleteNotification", base::FEATURE_DISABLED_BY_DEFAULT};
+// disabled by default because of an issue on Android 6.0
+const base::Feature kBookmarksExportUseSaf{"BookmarksExportUseSaf",
@ -1296,20 +1288,20 @@ 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
@@ -157,6 +157,7 @@ extern const base::Feature kVoiceSearchA
extern const base::Feature kVoiceButtonInTopToolbar;
extern const base::Feature kVrBrowsingFeedback;
extern const base::Feature kPrefetchNotificationSchedulingIntegration;
@@ -140,6 +140,7 @@ extern const base::Feature kToolbarMicIp
extern const base::Feature kToolbarUseHardwareBitmapDraw;
extern const base::Feature kTrustedWebActivityLocationDelegation;
extern const base::Feature kTrustedWebActivityNewDisclosure;
+extern const base::Feature kBookmarksExportUseSaf;
extern const base::Feature kWebNotesStylize;
} // namespace android
extern const base::Feature kTrustedWebActivityPostMessage;
extern const base::Feature kTrustedWebActivityQualityEnforcement;
extern const base::Feature kTrustedWebActivityQualityEnforcementForced;
--- 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
@@ -501,6 +501,7 @@ public abstract class ChromeFeatureList
public static final String WEBNOTES_STYLIZE = "WebNotesStylize";
public static final String WIPE_DATA_ON_CHILD_ACCOUNT_SIGNIN = "WipeDataOnChildAccountSignin";
@@ -522,6 +522,7 @@ public abstract class ChromeFeatureList
"WebApkInstallCompleteNotification";
public static final String XSURFACE_METRICS_REPORTING = "XsurfaceMetricsReporting";
public static final String WEB_OTP_CROSS_DEVICE_SIMPLE_STRING = "WebOtpCrossDeviceSimpleString";
+ public static final String BOOKMARKS_EXPORT_USESAF = "BookmarksExportUseSaf";
@NativeMethods
@ -1372,7 +1364,7 @@ Completely remove contacts picker permission from the file dialog
// 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
@@ -117,6 +117,8 @@ public final class ChromePreferenceKeys
@@ -121,6 +121,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";
@ -1381,7 +1373,7 @@ Completely remove contacts picker permission from the file dialog
/**
* Whether Chrome is set as the default browser.
@@ -1015,6 +1017,7 @@ public final class ChromePreferenceKeys
@@ -1030,6 +1032,7 @@ public final class ChromePreferenceKeys
AUTOFILL_ASSISTANT_PROACTIVE_HELP,
APP_LAUNCH_LAST_KNOWN_ACTIVE_TAB_STATE,
APP_LAUNCH_SEARCH_ENGINE_HAD_LOGO,
@ -1418,7 +1410,7 @@ Completely remove contacts picker permission from the file dialog
</message>
--- a/chrome/common/BUILD.gn
+++ b/chrome/common/BUILD.gn
@@ -409,6 +409,9 @@ static_library("common") {
@@ -413,6 +413,9 @@ static_library("common") {
sources += [
"media/chrome_media_drm_bridge_client.cc",
"media/chrome_media_drm_bridge_client.h",
@ -1426,8 +1418,8 @@ Completely remove contacts picker permission from the file dialog
+ "importer/imported_bookmark_entry.cc",
+ "importer/imported_bookmark_entry.h",
]
deps += [ "//components/embedder_support/android/common:url_constants" ]
} else {
# Non-Android.
--- a/chrome/utility/BUILD.gn
+++ b/chrome/utility/BUILD.gn
@@ -78,8 +78,6 @@ static_library("utility") {
@ -1439,7 +1431,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",
@@ -186,6 +184,11 @@ static_library("utility") {
@@ -181,6 +179,11 @@ static_library("utility") {
}
}


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

@ -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
@@ -201,6 +201,8 @@ import java.lang.annotation.RetentionPol
@@ -202,6 +202,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.
@@ -1953,6 +1955,8 @@ public class ChromeTabbedActivity extend
@@ -1959,6 +1961,8 @@ public class ChromeTabbedActivity extend
} else if (id == R.id.close_tab) {
getCurrentTabModel().closeTab(currentTab, true, false, true);
RecordUserAction.record("MobileTabClosed");
@ -55,7 +55,7 @@ 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
@@ -59,6 +59,7 @@ import org.chromium.chrome.R;
@@ -66,6 +66,7 @@ import org.chromium.chrome.R;
import org.chromium.chrome.browser.ActivityTabProvider;
import org.chromium.chrome.browser.ActivityUtils;
import org.chromium.chrome.browser.AppHooks;
@ -63,7 +63,7 @@ Corrected Exit functionality
import org.chromium.chrome.browser.ChromeActivitySessionTracker;
import org.chromium.chrome.browser.ChromeApplicationImpl;
import org.chromium.chrome.browser.ChromeKeyboardVisibilityDelegate;
@@ -2268,6 +2269,11 @@ public abstract class ChromeActivity<C e
@@ -2382,6 +2383,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
@@ -3139,6 +3139,9 @@ To change this setting, <ph name="BEGIN_
@@ -3101,6 +3101,9 @@ To change this setting, <ph name="BEGIN_
<message name="IDS_MENU_SETTINGS" desc="Menu item for opening browser settings. [CHAR_LIMIT=27]">
Settings
</message>


+ 6
- 6
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
@@ -2668,6 +2668,9 @@ const FeatureEntry kFeatureEntries[] = {
@@ -2745,6 +2745,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
MULTI_VALUE_TYPE(kOverlayStrategiesChoices)},
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -583,6 +583,10 @@ const char kEnableAudioFocusEnforcementN
@@ -642,6 +642,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,13 +35,13 @@ 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
@@ -356,6 +356,9 @@ extern const char kDocumentTransitionDes
@@ -388,6 +388,9 @@ extern const char kDisallowDocWrittenScr
extern const char kDocumentTransitionName[];
extern const char kDocumentTransitionDescription[];
extern const char kEnableAccessibilityObjectModelName[];
extern const char kEnableAccessibilityObjectModelDescription[];
+extern const char kDisableWebGLName[];
+extern const char kDisableWebGLDescription[];
+
extern const char kEnableAudioFocusEnforcementName[];
extern const char kEnableAudioFocusEnforcementDescription[];

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

@ -25,7 +25,7 @@ Subject: Add option to not persist tabs across sessions
android:key="do_not_track"
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -1179,8 +1179,10 @@ public class ChromeTabbedActivity extend
@@ -1195,8 +1195,10 @@ public class ChromeTabbedActivity extend
boolean hadCipherData =
CipherFactory.getInstance().restoreFromBundle(getSavedInstanceState());
@ -91,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
@@ -4002,6 +4002,12 @@ To change this setting, <ph name="BEGIN_
@@ -3962,6 +3962,12 @@ To change this setting, <ph name="BEGIN_
<message name="IDS_CONTEXTMENU_IMAGE_TITLE" desc="The title of a context menu tab when the item pressed contains more than one type. This indicates that all the actions are related to the image.">
IMAGE
</message>


+ 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
@@ -594,12 +594,13 @@ PeerConnectionDependencyFactory::CreateP
@@ -663,12 +663,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
@@ -623,7 +623,7 @@ const base::Feature kMediaDrmPersistentL
@@ -631,7 +631,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",


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

@ -3,8 +3,8 @@ Date: Sat, 26 Sep 2020 14:23:19 +0100
Subject: DoH secure mode by default
---
chrome/android/java/src/org/chromium/chrome/browser/policy/EnterpriseInfo.java | 2 -
chrome/browser/net/stub_resolver_config_reader.cc | 17 ----------
chrome/browser/enterprise/util/android/java/src/org/chromium/chrome/browser/enterprise/util/EnterpriseInfo.java | 2 -
chrome/browser/net/stub_resolver_config_reader.cc | 17 ----------
2 files changed, 2 insertions(+), 17 deletions(-)
--- a/chrome/browser/net/stub_resolver_config_reader.cc
@ -18,7 +18,7 @@ Subject: DoH secure mode by default
} else if (entries.count("[email protected]")) {
// The user has "Disabled" selected.
local_state_->SetString(prefs::kDnsOverHttpsMode,
@@ -331,22 +331,7 @@ SecureDnsConfig StubResolverConfigReader
@@ -334,22 +334,7 @@ SecureDnsConfig StubResolverConfigReader
check_parental_controls = false;
}
@ -41,9 +41,9 @@ Subject: DoH secure mode by default
parental_controls_checked_ = true;
}
--- 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 {
--- a/chrome/browser/enterprise/util/android/java/src/org/chromium/chrome/browser/enterprise/util/EnterpriseInfo.java
+++ b/chrome/browser/enterprise/util/android/java/src/org/chromium/chrome/browser/enterprise/util/EnterpriseInfo.java
@@ -44,7 +44,7 @@ public class EnterpriseInfo {
private OwnedState mOwnedState;
private Queue<Callback<OwnedState>> mCallbackList;


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

@ -31,7 +31,7 @@ Send a random key press to circumvent idle status detection
"id_target_observer_registry.cc",
--- a/third_party/blink/renderer/core/dom/document.cc
+++ b/third_party/blink/renderer/core/dom/document.cc
@@ -276,6 +276,7 @@
@@ -275,6 +275,7 @@
#include "third_party/blink/renderer/core/page/scrolling/root_scroller_controller.h"
#include "third_party/blink/renderer/core/page/scrolling/scroll_state_callback.h"
#include "third_party/blink/renderer/core/page/scrolling/scrolling_coordinator.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();
@@ -6627,6 +6630,61 @@ void Document::setAllowDeclarativeShadow
@@ -6622,6 +6625,61 @@ void Document::setAllowDeclarativeShadow
val ? AllowState::kAllow : AllowState::kDeny;
}
@ -111,8 +111,8 @@ Send a random key press to circumvent idle status detection
DCHECK(!GetScriptableDocumentParser() || !parser_->IsParsing());
DCHECK(!GetScriptableDocumentParser() || ready_state_ != kLoading);
@@ -6679,6 +6737,10 @@ void Document::FinishedParsing() {
frame->Loader().FinishedParsing();
if (frame->GetFrameScheduler())
frame->GetFrameScheduler()->OnDomContentLoaded();
+ if (!IsPrefetchOnly()) {
+ injectScripts();
@ -123,7 +123,7 @@ Send a random key press to circumvent idle status detection
probe::DomContentLoadedEventFired(frame);
--- a/third_party/blink/renderer/core/dom/document.h
+++ b/third_party/blink/renderer/core/dom/document.h
@@ -1741,6 +1741,9 @@ class CORE_EXPORT Document : public Cont
@@ -1752,6 +1752,9 @@ class CORE_EXPORT Document : public Cont
void AddAXContext(AXContext*);
void RemoveAXContext(AXContext*);
@ -153,7 +153,7 @@ Send a random key press to circumvent idle status detection
+#endif // video_bg_play_h
--- a/third_party/blink/renderer/core/html/html_script_element.cc
+++ b/third_party/blink/renderer/core/html/html_script_element.cc
@@ -206,6 +206,11 @@ void HTMLScriptElement::setTextContent(c
@@ -168,6 +168,11 @@ void HTMLScriptElement::setTextContent(c
script_text_internal_slot_ = ParkableString(string.Impl());
}
@ -167,9 +167,9 @@ Send a random key press to circumvent idle status detection
SetBooleanAttribute(html_names::kAsyncAttr, async);
--- a/third_party/blink/renderer/core/html/html_script_element.h
+++ b/third_party/blink/renderer/core/html/html_script_element.h
@@ -66,6 +66,7 @@ class CORE_EXPORT HTMLScriptElement fina
ExceptionState&) override;
#endif // defined(USE_BLINK_V8_BINDING_NEW_IDL_UNION)
@@ -56,6 +56,7 @@ class CORE_EXPORT HTMLScriptElement fina
void setTextContentForBinding(const V8UnionStringOrTrustedScript* value,
ExceptionState& exception_state) override;
void setTextContent(const String&) override;
+ void setTextDirect(const char*);


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

@ -52,5 +52,5 @@ Subject: Remove all sync and account permissions/features from manifest
- mMasterSyncEnabled = mSyncContentResolverDelegate.getMasterSyncAutomatically();
+ mMasterSyncEnabled = false;
if (mAccount != null && ProfileSyncService.get() != null
if (mAccount != null && SyncService.get() != null
&& ChromeFeatureList.isEnabled(

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

@ -12,8 +12,8 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -3316,6 +3316,10 @@ const FeatureEntry kFeatureEntries[] = {
SINGLE_VALUE_TYPE(switches::kHostedAppQuitNotification)},
@@ -3413,6 +3413,10 @@ const FeatureEntry kFeatureEntries[] = {
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableHostedAppShimCreation)},
#endif // OS_MAC
#if defined(OS_ANDROID)
+ {"disable-pull-to-refresh-effect",
@ -25,7 +25,7 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
flag_descriptions::kTranslateForceTriggerOnEnglishDescription, kOsAndroid,
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -1069,6 +1069,11 @@
@@ -1135,6 +1135,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
@@ -3311,6 +3311,10 @@ const char kReadLaterDescription[] =
@@ -3427,6 +3427,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
@@ -1908,6 +1908,9 @@ extern const char kQueryTilesMoreTrendin
@@ -1956,6 +1956,9 @@ extern const char kQueryTilesRankTilesDe
extern const char kQueryTilesSwapTrendingName[];
extern const char kQueryTilesSwapTrendingDescription[];


+ 2
- 2
patches/Bromite/updater-disable-updater-pings.patch View File

@ -27,7 +27,7 @@ Chromium would still send background requests. Kill it.
} // namespace component_updater
--- a/components/component_updater/configurator_impl.cc
+++ b/components/component_updater/configurator_impl.cc
@@ -42,8 +42,7 @@ ConfiguratorImpl::ConfiguratorImpl(
@@ -41,8 +41,7 @@ ConfiguratorImpl::ConfiguratorImpl(
: background_downloads_enabled_(config_policy.BackgroundDownloadsEnabled()),
deltas_enabled_(config_policy.DeltaUpdatesEnabled()),
fast_update_(config_policy.FastUpdate()),
@ -37,7 +37,7 @@ Chromium would still send background requests. Kill it.
url_source_override_(config_policy.UrlSourceOverride()),
initial_delay_(config_policy.InitialDelay()) {
if (config_policy.TestRequest()) {
@@ -78,8 +77,6 @@ std::vector<GURL> ConfiguratorImpl::Upda
@@ -77,8 +76,6 @@ std::vector<GURL> ConfiguratorImpl::Upda
std::vector<GURL> urls{GURL(kUpdaterJSONDefaultUrl),
GURL(kUpdaterJSONFallbackUrl)};


+ 13
- 13
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
@@ -135,18 +135,6 @@ void PrimaryAccountManager::SetSyncPrima
@@ -130,18 +130,6 @@ void PrimaryAccountManager::SetSyncPrima
DCHECK(!account_info.account_id.empty());
DCHECK(!HasPrimaryAccount(signin::ConsentLevel::kSync));
@ -41,7 +41,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -254,7 +254,7 @@ config("compiler") {
@@ -261,7 +261,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 = []
@@ -1824,7 +1824,7 @@ config("no_rtti") {
@@ -1828,7 +1828,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,16 +59,16 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
ldflags = [ "-rdynamic" ]
}
}
@@ -2041,8 +2041,6 @@ if (is_win) {
@@ -2047,8 +2047,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",
- "-ffunction-sections",
]
common_optimize_on_ldflags += [
@@ -2050,7 +2048,6 @@ if (is_win) {
if (!is_nacl && is_clang) {
# We don't care about unique section names, this makes object files a bit
@@ -2061,7 +2059,6 @@ if (is_win) {
# See http://lwn.net/Articles/192624/ .
# -O2 enables string tail merge optimization in gold and lld.
"-Wl,-O2",
@ -84,7 +84,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
+ ldflags += []
}
}
}
--- a/components/policy/core/browser/configuration_policy_handler.cc
+++ b/components/policy/core/browser/configuration_policy_handler.cc
@@ -360,7 +360,6 @@ SchemaValidatingPolicyHandler::SchemaVal
@ -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
@@ -218,7 +218,6 @@ std::unique_ptr<ProfileOAuth2TokenServic
@@ -197,7 +197,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);
@ -126,7 +126,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
const std::u16string& text,
--- a/components/omnibox/browser/autocomplete_result.cc
+++ b/components/omnibox/browser/autocomplete_result.cc
@@ -687,13 +687,6 @@ void AutocompleteResult::CopyFrom(const
@@ -688,13 +688,6 @@ void AutocompleteResult::CopyFrom(const
#endif
}
@ -151,10 +151,10 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
-#endif // DCHECK_IS_ON()
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
@@ -731,9 +731,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
@@ -976,7 +976,6 @@ void NetworkContext::QueueReport(
@@ -1032,7 +1032,6 @@ void NetworkContext::QueueReport(
const net::NetworkIsolationKey& network_isolation_key,
const absl::optional<std::string>& user_agent,
base::Value body) {


+ 1
- 15
patches/Other/gs-download-use-normal-python.patch View File

@ -3,8 +3,7 @@ author: Wengling Chen <[email protected]>
---
download_from_google_storage.py | 2 +-
gsutil.py | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
1 files changed, 1 insertions(+), 1 deletions(-)
--- a/depot_tools/download_from_google_storage.py
+++ b/depot_tools/download_from_google_storage.py
@ -18,16 +17,3 @@ author: Wengling Chen <[email protected]>
def __init__(self, path, boto_path=None, version='4.28'):
if not os.path.exists(path):
--- a/depot_tools/gsutil.py
+++ b/depot_tools/gsutil.py
@@ -151,9 +151,7 @@
# expectations are made about Python having access to "google-compute-engine"
# and "boto" packages that are not met with non-system Python (e.g., bundles).
cmd = [
- 'vpython',
- '-vpython-spec', os.path.join(THIS_DIR, 'gsutil.vpython'),
- '--',
+ 'python',
gsutil_bin
] + disable_update + args
return subprocess.call(cmd, shell=IS_WINDOWS)

+ 12
- 0
patches/Other/python3-dict-changed-size-during-iteration.patch View File

@ -0,0 +1,12 @@
diff --git a/third_party/node/clean_json_attrs.py b/third_party/node/clean_json_attrs.py
--- a/third_party/node/clean_json_attrs.py
+++ b/third_party/node/clean_json_attrs.py
@@ -13,7 +13,7 @@ def Clean(start_dir, attr_pattern, file_pattern):
removed = False
- for key, val in json_dict.items():
+ for key, val in dict(json_dict).items():
if isinstance(val, dict):
if _remove_attrs(val, attr_pattern):
removed = True

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

@ -27,7 +27,7 @@ Subject: kill Auth
- long startTime = SystemClock.elapsedRealtime();
- Account[] accounts =
- mAccountManager.getAccountsByType(GoogleAuthUtil.GOOGLE_ACCOUNT_TYPE);
- recordElapsedTimeHistogram("Signin.AndroidGetAccountsTime_AccountManager",
- RecordHistogram.recordTimesHistogram("Signin.AndroidGetAccountsTime_AccountManager",
- SystemClock.elapsedRealtime() - startTime);
- return accounts;
- }
@ -65,7 +65,7 @@ Subject: kill Auth
}
@Override
@@ -163,17 +136,6 @@ public class SystemAccountManagerDelegat
@@ -159,17 +132,6 @@ public class SystemAccountManagerDelegat
@SuppressLint("MissingPermission")
@Override
public void createAddAccountIntent(Callback<Intent> callback) {
@ -83,7 +83,7 @@ Subject: kill Auth
}
// No permission is needed on 23+ and Chrome always has MANAGE_ACCOUNTS permission on lower APIs
@@ -213,12 +175,7 @@ public class SystemAccountManagerDelegat
@@ -209,12 +171,7 @@ public class SystemAccountManagerDelegat
@Nullable
@Override
public String getAccountGaiaId(String accountEmail) {
@ -96,7 +96,7 @@ Subject: kill Auth
+ return null;
}
@Override
protected boolean isGooglePlayServicesAvailable() {
--- a/components/signin/public/android/java/src/org/chromium/components/signin/AccountRenameChecker.java
+++ b/components/signin/public/android/java/src/org/chromium/components/signin/AccountRenameChecker.java
@@ -11,10 +11,6 @@ import androidx.annotation.Nullable;


+ 4
- 4
patches/Unobtainium/kill-GCM.patch View File

@ -23,7 +23,7 @@ Subject: kill GCM
"java/src/org/chromium/chrome/browser/ChromeBackupAgentImpl.java",
"java/src/org/chromium/chrome/browser/ChromeBackupWatcher.java",
"java/src/org/chromium/chrome/browser/ChromeBaseAppCompatActivity.java",
@@ -1152,10 +1151,6 @@ chrome_java_sources = [
@@ -1029,10 +1028,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/searchwidget/SearchBoxDataProvider.java",
"java/src/org/chromium/chrome/browser/searchwidget/SearchWidgetProvider.java",
"java/src/org/chromium/chrome/browser/send_tab_to_self/SendTabToSelfShareActivity.java",
@ -58,7 +58,7 @@ Subject: kill GCM
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
<uses-permission android:name="com.google.android.apps.now.CURRENT_ACCOUNT_ACCESS" />
@@ -983,25 +978,6 @@ by a child template that "extends" this
@@ -1005,25 +1000,6 @@ by a child template that "extends" this
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|mcc|mnc|screenLayout|smallestScreenSize"
android:hardwareAccelerated="false" />
@ -84,7 +84,7 @@ Subject: kill GCM
<!-- Android Notification service listener -->
<service android:name="org.chromium.chrome.browser.notifications.NotificationService"
@@ -1026,28 +1002,10 @@ by a child template that "extends" this
@@ -1048,28 +1024,10 @@ by a child template that "extends" this
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE"/>
@ -116,7 +116,7 @@ Subject: kill GCM
--- a/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java
@@ -17,7 +17,6 @@ import org.chromium.chrome.browser.offli
import org.chromium.chrome.browser.offlinepages.OfflineBackgroundTask;
import org.chromium.chrome.browser.offlinepages.measurements.OfflineMeasurementsBackgroundTask;
import org.chromium.chrome.browser.offlinepages.prefetch.PrefetchBackgroundTask;
import org.chromium.chrome.browser.omaha.OmahaService;
-import org.chromium.chrome.browser.services.gcm.GCMBackgroundTask;


+ 4
- 4
patches/Unobtainium/kill-Translate.patch View File

@ -17,10 +17,10 @@ Subject: kill Translate
import org.chromium.chrome.browser.searchwidget.SearchWidgetProvider;
+import org.chromium.components.prefs.PrefService;
+import org.chromium.components.user_prefs.UserPrefs;
import org.chromium.components.browser_ui.modaldialog.AppModalPresenter;
import org.chromium.ui.base.LocalizationUtils;
import java.util.ArrayList;
@@ -179,6 +183,8 @@ public class FirstRunActivity extends Fi
import org.chromium.ui.modaldialog.ModalDialogManager;
@@ -182,6 +186,8 @@ public class FirstRunActivity extends Fi
assert areNativeAndPoliciesInitialized();
mFirstRunFlowSequencer.onNativeAndPoliciesInitialized(mFreProperties);
@ -29,7 +29,7 @@ Subject: kill Translate
boolean notifyAdapter = false;
// An optional Data Saver page.
if (mFreProperties.getBoolean(SHOW_DATA_REDUCTION_PAGE)) {
@@ -644,4 +650,9 @@ public class FirstRunActivity extends Fi
@@ -652,4 +658,9 @@ public class FirstRunActivity extends Fi
assert sObserver == null;
sObserver = observer;
}


+ 1
- 1
patches/Vanadium/0003-switch-to-fstack-protector-strong.patch View File

@ -9,7 +9,7 @@ Subject: [PATCH 03/73] switch to -fstack-protector-strong
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -326,16 +326,12 @@ config("compiler") {
@@ -333,16 +333,12 @@ config("compiler") {
cflags += [ "-fstack-protector" ]
}
} else if ((is_posix && !is_chromeos_ash && !is_nacl) || is_fuchsia) {


+ 1
- 1
patches/Vanadium/0016-disable-seed-based-field-trials.patch View File

@ -9,7 +9,7 @@ Subject: [PATCH 16/73] disable seed-based field trials
--- a/components/variations/service/variations_field_trial_creator.cc
+++ b/components/variations/service/variations_field_trial_creator.cc
@@ -276,8 +276,6 @@ bool VariationsFieldTrialCreator::SetupF
@@ -277,8 +277,6 @@ bool VariationsFieldTrialCreator::SetupF
#endif // BUILDFLAG(FIELDTRIAL_TESTING_ENABLED)
bool used_seed = false;
if (!used_testing_config) {


+ 2
- 3
patches/Vanadium/0023-disable-showing-popular-sites-by-default.patch View File

@ -9,7 +9,7 @@ Subject: [PATCH 23/73] disable showing popular sites by default
--- a/components/ntp_tiles/features.cc
+++ b/components/ntp_tiles/features.cc
@@ -13,13 +13,13 @@ namespace ntp_tiles {
@@ -13,12 +13,12 @@ namespace ntp_tiles {
const char kPopularSitesFieldTrialName[] = "NTPPopularSites";
const base::Feature kPopularSitesBakedInContentFeature{
@ -23,5 +23,4 @@ Subject: [PATCH 23/73] disable showing popular sites by default
- "UsePopularSitesSuggestions", base::FEATURE_ENABLED_BY_DEFAULT};
+ "UsePopularSitesSuggestions", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kDisplaySuggestionsServiceTiles{
"DisplaySuggestionsServiceTiles", base::FEATURE_DISABLED_BY_DEFAULT};
} // namespace ntp_tiles

+ 1
- 1
patches/Vanadium/0031-disable-media-router-media-remoting-by-default.patch View File

@ -9,7 +9,7 @@ Subject: [PATCH 31/73] disable media router media remoting by default
--- a/chrome/browser/profiles/profile.cc
+++ b/chrome/browser/profiles/profile.cc
@@ -355,7 +355,7 @@ void Profile::RegisterProfilePrefs(user_
@@ -356,7 +356,7 @@ void Profile::RegisterProfilePrefs(user_
media_router::prefs::kMediaRouterEnableCloudServices, false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterBooleanPref(


+ 0
- 59
patches/Vanadium/0032-disable-media-router-by-default.patch View File

@ -1,59 +0,0 @@
From 7604c7016a6cc351895c17844082a74aa887ae25 Mon Sep 17 00:00:00 2001