Browse Source

Update to 97.0.4692.71-1

master 97.0.4692.71-1-webview
wchen342 11 months ago
parent
commit
75ae421d40
Signed by: wchen342 GPG Key ID: 9C19365D69B04CEC
  1. 4
      .build_config
  2. 3
      CHANGELOG.md
  3. 2
      android_flags.gn
  4. 8
      build.sh
  5. 844
      domain_sub_2.list
  6. 10
      patches/Bromite/AImageReader-CFI-crash-mitigations.patch
  7. 14
      patches/Bromite/Add-a-proxy-configuration-page.patch
  8. 24
      patches/Bromite/Add-an-always-incognito-mode.patch
  9. 63
      patches/Bromite/Add-bookmark-import-export-actions.patch
  10. 10
      patches/Bromite/Add-exit-menu-item.patch
  11. 17
      patches/Bromite/Add-flag-to-disable-WebGL.patch
  12. 14
      patches/Bromite/Add-option-to-not-persist-tabs-across-sessions.patch
  13. 2
      patches/Bromite/Change-default-webRTC-policy-to-not-use-any-address.patch
  14. 2
      patches/Bromite/Disable-DRM-media-origin-IDs-preprovisioning.patch
  15. 12
      patches/Bromite/Inject-scripts-for-AMP-tracking-ads-and-video.patch
  16. 12
      patches/Bromite/Revert-flags-remove-disable-pull-to-refresh-effect.patch
  17. 39
      patches/Other/debug-fix.patch
  18. 10
      patches/Unobtainium/kill-Auth.patch
  19. 2
      patches/Unobtainium/kill-GCM.patch
  20. 10
      patches/Unobtainium/kill-Translate.patch
  21. 19
      patches/Vanadium/0003-switch-to-fstack-protector-strong.patch
  22. 13
      patches/Vanadium/0004-enable-fwrapv-in-Clang-for-non-UBSan-builds.patch
  23. 11
      patches/Vanadium/0016-disable-seed-based-field-trials.patch
  24. 13
      patches/Vanadium/0018-disable-WebView-variations-support.patch
  25. 9
      patches/Vanadium/0042-enable-user-agent-freeze-by-default.patch
  26. 9
      patches/Vanadium/0043-enable-split-cache-by-default.patch
  27. 9
      patches/Vanadium/0044-enable-partitioning-connections-by-default.patch
  28. 4
      patches/Vanadium/0050-enable-strict-site-isolation-by-default-on-Android.patch
  29. 3
      patches/series
  30. 16
      patches/src-fix/clang-unknown-warnings.patch
  31. 6
      patches/src-fix/fix-prefs.patch
  32. 113
      patches/src-fix/fix-safe-browsing.patch
  33. 6
      patches/ungoogled-chromium-android/Add-always-desktop-option.patch
  34. 22
      patches/ungoogled-chromium-android/Add-folder-button-bookmark.patch
  35. 12
      patches/ungoogled-chromium-android/Add-force-tablet-ui-option.patch
  36. 10
      patches/ungoogled-chromium-android/Add-save-data-flag.patch
  37. 8
      patches/ungoogled-chromium-android/Add_trichrome_apk.patch
  38. 4
      patches/ungoogled-chromium-android/Change-package-name-chromium.patch
  39. 2
      patches/ungoogled-chromium-android/Disable-offline-indicator.patch
  40. 2
      patches/ungoogled-chromium-android/Enable-ProactivelySwapBrowsingInstance.patch
  41. 22
      patches/ungoogled-chromium-android/Remove-UI-elements.patch
  42. 4
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.auth.patch
  43. 8
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.cast.patch
  44. 53
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.common-auth-signin-dynamic-com.google.android.gms.tasks.patch
  45. 18
      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. 2
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.flags-com.google.android.gms.location.places-com.google.android.gms.stats.patch
  47. 10
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.gcm.patch
  48. 16
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.vision-com.google.android.gms.clearcut-com.google.android.gms.phenotype.patch
  49. 24
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.core.splitcompat-com.google.android.play.core.splitinstall.patch
  50. 475
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.patch
  51. 6
      patches/ungoogled-chromium-android/Remove-dependency-on-firebase.patch

4
.build_config

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

3
CHANGELOG.md

@ -1,3 +1,6 @@
# 97.0.4692.71-1
* Upstream update
*
# 96.0.4664.110-1
* Upstream update

2
android_flags.gn

@ -5,7 +5,6 @@ android_ndk_major_version = 23
android_sdk_build_tools_version="31.0.0"
android_sdk_version="31"
cc_wrapper="ccache"
clang_base_path="/usr"
dfmify_dev_ui=false
disable_android_lint=true
disable_autofill_assistant_dfm=true
@ -21,4 +20,3 @@ proprietary_codecs=true
rtc_build_examples=false
target_os="android"
use_gnome_keyring=false
use_sysroot=false

8
build.sh

@ -186,16 +186,16 @@ function prepare_repos {
pushd src/buildtools/linux64
ln -s /usr/bin/clang-format
popd
mkdir -p src/third_party/llvm-build/Release+Asserts/bin
pushd src/third_party/llvm-build/Release+Asserts/bin
ln -s /usr/bin/llvm-symbolizer
popd
## Hooks
python src/build/util/lastchange.py -o src/build/util/LASTCHANGE
python src/tools/download_optimization_profile.py --newest_state=src/chrome/android/profiles/newest.txt --local_state=src/chrome/android/profiles/local.txt --output_name=src/chrome/android/profiles/afdo.prof --gs_url_base=chromeos-prebuilt/afdo-job/llvm || return $?
python src/build/util/lastchange.py -m GPU_LISTS_VERSION --revision-id-only --header src/gpu/config/gpu_lists_version.h
python src/build/util/lastchange.py -m SKIA_COMMIT_HASH -s src/third_party/skia --header src/skia/ext/skia_commit_hash.h
# Prebuilt toolchains. There are certain Android-specific files not included in common linux distributions.
python src/tools/clang/scripts/update.py
python src/build/linux/sysroot_scripts/install-sysroot.py --arch=i386
python src/build/linux/sysroot_scripts/install-sysroot.py --arch=amd64
patch_applied=true
# Needed for an ad-block list ised in webview
# gsutils still needs python2. Avoid it.

844
domain_sub_2.list

File diff suppressed because it is too large

10
patches/Bromite/AImageReader-CFI-crash-mitigations.patch

@ -79,7 +79,7 @@ See discussions at:
AndroidImageReader();
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -2064,7 +2064,7 @@
@@ -2097,7 +2097,7 @@
{
"name": "enable-image-reader",
"owners": [ "vikassoni", "liberato" ],
@ -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
@@ -51,6 +51,11 @@ bool IsDeviceBlocked(const char* field,
@@ -52,6 +52,11 @@ bool IsDeviceBlocked(const char* field,
} // namespace
#if defined(OS_ANDROID)
@ -149,7 +149,7 @@ See discussions at:
if (!gpu_preferences.enable_android_surface_control)
return kGpuFeatureStatusDisabled;
@@ -344,6 +347,11 @@ void AdjustGpuFeatureStatusToWorkarounds
@@ -356,6 +359,11 @@ void AdjustGpuFeatureStatusToWorkarounds
gpu_feature_info->status_values[GPU_FEATURE_TYPE_CANVAS_OOP_RASTERIZATION] =
kGpuFeatureStatusBlocklisted;
}
@ -214,7 +214,7 @@ See discussions at:
}
--- a/media/base/media_switches.cc
+++ b/media/base/media_switches.cc
@@ -667,6 +667,10 @@ const base::Feature kMediaDrmPreprovisio
@@ -682,6 +682,10 @@ const base::Feature kMediaDrmPreprovisio
// Note: Has no effect if kMediaDrmPreprovisioning feature is disabled.
const base::Feature kMediaDrmPreprovisioningAtStartup{
"MediaDrmPreprovisioningAtStartup", base::FEATURE_ENABLED_BY_DEFAULT};
@ -227,7 +227,7 @@ See discussions at:
const base::Feature kPictureInPictureAPI{"PictureInPictureAPI",
--- a/media/base/media_switches.h
+++ b/media/base/media_switches.h
@@ -219,6 +219,7 @@ MEDIA_EXPORT extern const base::Feature
@@ -216,6 +216,7 @@ MEDIA_EXPORT extern const base::Feature
MEDIA_EXPORT extern const base::Feature kAllowNonSecureOverlays;
MEDIA_EXPORT extern const base::Feature kMediaControlsExpandGesture;
MEDIA_EXPORT extern const base::Feature kMediaDrmPersistentLicense;

14
patches/Bromite/Add-a-proxy-configuration-page.patch

@ -67,7 +67,7 @@ for SimpleURLLoaders as well.
android:title="@string/clear_browsing_data_title"
--- 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
@@ -60,6 +60,7 @@ public class PrivacySettings
@@ -59,6 +59,7 @@ public class PrivacySettings
private static final String PREF_PRIVACY_SANDBOX = "privacy_sandbox";
private static final String PREF_PRIVACY_REVIEW = "privacy_review";
private static final String PREF_INCOGNITO_LOCK = "incognito_lock";
@ -77,7 +77,7 @@ for SimpleURLLoaders as well.
--- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
+++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
@@ -373,6 +373,8 @@ ChromeAutocompleteProviderClient::GetBui
@@ -279,6 +279,8 @@ ChromeAutocompleteProviderClient::GetBui
base::ASCIIToUTF16(chrome::kChromeUISettingsURL));
#endif
builtins_to_provide.push_back(
@ -165,7 +165,7 @@ for SimpleURLLoaders as well.
#endif // CHROME_BROWSER_NET_PROXY_SERVICE_FACTORY_H_
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -163,6 +163,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
@@ -957,6 +959,8 @@ void RegisterLocalState(PrefRegistrySimp
@@ -978,6 +980,8 @@ void RegisterLocalState(PrefRegistrySimp
PluginsResourceService::RegisterPrefs(registry);
#endif
@ -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/support_tool_ui.h"
@@ -647,6 +648,8 @@ WebUIFactoryFunction GetWebUIFactoryFunc
@@ -650,6 +651,8 @@ WebUIFactoryFunction GetWebUIFactoryFunc
return &NewWebUI<MemoryInternalsUI>;
if (url.host_piece() == chrome::kChromeUINetExportHost)
return &NewWebUI<NetExportUI>;
@ -1116,7 +1116,7 @@ for SimpleURLLoaders as well.
kChromeUIOobeHost,
kChromeUIOSCreditsHost,
kChromeUIOSSettingsHost,
@@ -584,6 +587,7 @@ const char* const kChromeHostURLs[] = {
@@ -582,6 +585,7 @@ const char* const kChromeHostURLs[] = {
#if !defined(OS_ANDROID)
#if !BUILDFLAG(IS_CHROMEOS_ASH)
kChromeUIAppLauncherPageHost,
@ -1126,7 +1126,7 @@ for SimpleURLLoaders as well.
kChromeUIDownloadsHost,
--- a/chrome/common/webui_url_constants.h
+++ b/chrome/common/webui_url_constants.h
@@ -127,6 +127,8 @@ extern const char kChromeUIMemoryInterna
@@ -125,6 +125,8 @@ extern const char kChromeUIMemoryInterna
extern const char kChromeUINTPTilesInternalsHost[];
extern const char kChromeUINaClHost[];
extern const char kChromeUINetExportHost[];

24
patches/Bromite/Add-an-always-incognito-mode.patch

@ -147,7 +147,7 @@ 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;
@@ -1779,8 +1780,9 @@ public class ChromeTabbedActivity extend
@@ -1769,8 +1770,9 @@ public class ChromeTabbedActivity extend
Bundle savedInstanceState = getSavedInstanceState();
// We determine the model as soon as possible so every systems get initialized coherently.
@ -169,7 +169,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;
@@ -1966,6 +1967,9 @@ public abstract class ChromeActivity<C e
@@ -1985,6 +1986,9 @@ public abstract class ChromeActivity<C e
throw new IllegalStateException(
"Attempting to access TabCreator before initialization");
}
@ -181,7 +181,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
--- a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java
@@ -538,6 +538,12 @@ public class AppMenuPropertiesDelegateIm
@@ -515,6 +515,12 @@ public class AppMenuPropertiesDelegateIm
}
private void prepareCommonMenuItems(Menu menu, @MenuGroup int menuGroup, boolean isIncognito) {
@ -289,7 +289,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
@@ -34,6 +34,9 @@ import org.chromium.content_public.brows
@@ -38,6 +38,9 @@ import org.chromium.network.mojom.Referr
import org.chromium.ui.base.WindowAndroid;
import org.chromium.url.GURL;
@ -299,7 +299,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.
@@ -185,17 +188,22 @@ public class StartupTabPreloader impleme
@@ -349,17 +352,22 @@ public class StartupTabPreloader impleme
Intent intent = mIntentSupplier.get();
GURL url = UrlFormatter.fixupUrl(getUrlFromIntent(intent));
@ -327,7 +327,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
.setWebContents(webContents)
--- 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
@@ -32,6 +32,10 @@ import org.chromium.chrome.browser.profi
@@ -31,6 +31,10 @@ import org.chromium.chrome.browser.profi
import org.chromium.chrome.browser.settings.ChromeManagedPreferenceDelegate;
import org.chromium.chrome.browser.settings.SettingsLauncherImpl;
import org.chromium.chrome.browser.signin.services.IdentityServicesProvider;
@ -338,7 +338,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
import org.chromium.chrome.browser.sync.settings.GoogleServicesSettings;
import org.chromium.chrome.browser.sync.settings.ManageSyncSettings;
import org.chromium.chrome.browser.usage_stats.UsageStatsConsentDialog;
@@ -49,7 +53,12 @@ import org.chromium.ui.text.SpanApplier;
@@ -48,7 +52,12 @@ import org.chromium.ui.text.SpanApplier;
* Fragment to keep track of the all the privacy related preferences.
*/
public class PrivacySettings
@ -352,7 +352,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
private static final String PREF_CAN_MAKE_PAYMENT = "can_make_payment";
private static final String PREF_NETWORK_PREDICTIONS = "preload_pages";
private static final String PREF_HTTPS_FIRST_MODE = "https_first_mode";
@@ -94,6 +103,25 @@ public class PrivacySettings
@@ -97,6 +106,25 @@ public class PrivacySettings
(ChromeSwitchPreference) findPreference(PREF_CAN_MAKE_PAYMENT);
canMakePaymentPref.setOnPreferenceChangeListener(this);
@ -378,7 +378,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
ChromeSwitchPreference networkPredictionPref =
(ChromeSwitchPreference) findPreference(PREF_NETWORK_PREDICTIONS);
networkPredictionPref.setChecked(
@@ -182,6 +210,9 @@ public class PrivacySettings
@@ -156,6 +184,9 @@ public class PrivacySettings
} else if (PREF_NETWORK_PREDICTIONS.equals(key)) {
PrivacyPreferencesManagerImpl.getInstance().setNetworkPredictionEnabled(
(boolean) newValue);
@ -388,7 +388,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
} else if (PREF_HTTPS_FIRST_MODE.equals(key)) {
UserPrefs.get(Profile.getLastUsedRegularProfile())
.setBoolean(Pref.HTTPS_ONLY_MODE_ENABLED, (boolean) newValue);
@@ -285,4 +316,8 @@ public class PrivacySettings
@@ -255,4 +286,8 @@ public class PrivacySettings
}
return false;
}
@ -563,7 +563,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
@@ -455,7 +455,7 @@ const base::Feature kCCTIncognito{"CCTIn
@@ -460,7 +460,7 @@ const base::Feature kCCTIncognito{"CCTIn
base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kCCTIncognitoAvailableToThirdParty{
@ -574,7 +574,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
@@ -948,6 +948,19 @@ Your Google account may have other forms
@@ -954,6 +954,19 @@ 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>

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

@ -21,7 +21,7 @@ Completely remove contacts picker permission from the file dialog
chrome/android/java/src/org/chromium/chrome/browser/native_page/NativePageFactory.java | 11
chrome/browser/BUILD.gn | 9
chrome/browser/about_flags.cc | 6
chrome/browser/android/bookmarks/bookmark_bridge.cc | 284 ++++++++++
chrome/browser/android/bookmarks/bookmark_bridge.cc | 283 ++++++++++
chrome/browser/android/bookmarks/bookmark_bridge.h | 29 -
chrome/browser/bookmarks/bookmark_html_writer.cc | 8
chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationCustomView.java | 12
@ -44,7 +44,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
38 files changed, 895 insertions(+), 29 deletions(-)
38 files changed, 894 insertions(+), 29 deletions(-)
--- a/base/android/content_uri_utils.cc
+++ b/base/android/content_uri_utils.cc
@ -189,7 +189,7 @@ Completely remove contacts picker permission from the file dialog
Supplier<EphemeralTabCoordinator> ephemeralTabCoordinatorSupplier,
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkActionBar.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkActionBar.java
@@ -88,6 +88,12 @@ public class BookmarkActionBar extends S
@@ -89,6 +89,12 @@ public class BookmarkActionBar extends S
} else if (menuItem.getItemId() == R.id.search_menu_id) {
mDelegate.openSearchUI();
return true;
@ -202,7 +202,7 @@ Completely remove contacts picker permission from the file dialog
}
SelectionDelegate<BookmarkId> selectionDelegate = mDelegate.getSelectionDelegate();
@@ -139,6 +145,8 @@ public class BookmarkActionBar extends S
@@ -140,6 +146,8 @@ public class BookmarkActionBar extends S
void showLoadingUi() {
setTitle(null);
setNavigationButton(NAVIGATION_BUTTON_NONE);
@ -211,7 +211,7 @@ Completely remove contacts picker permission from the file dialog
getMenu().findItem(R.id.search_menu_id).setVisible(false);
getMenu().findItem(R.id.edit_menu_id).setVisible(false);
getMenu().findItem(R.id.add_folder_menu_id).setVisible(false);
@@ -149,6 +157,8 @@ public class BookmarkActionBar extends S
@@ -150,6 +158,8 @@ public class BookmarkActionBar extends S
super.showNormalView();
if (mDelegate == null) {
@ -220,7 +220,7 @@ Completely remove contacts picker permission from the file dialog
getMenu().findItem(R.id.search_menu_id).setVisible(false);
getMenu().findItem(R.id.edit_menu_id).setVisible(false);
getMenu().findItem(R.id.add_folder_menu_id).setVisible(false);
@@ -180,6 +190,8 @@ public class BookmarkActionBar extends S
@@ -181,6 +191,8 @@ public class BookmarkActionBar extends S
public void onFolderStateSet(BookmarkId folder) {
mCurrentFolder = mDelegate.getModel().getBookmarkById(folder);
@ -322,7 +322,7 @@ Completely remove contacts picker permission from the file dialog
import android.text.TextUtils;
import android.util.Pair;
@@ -30,8 +43,33 @@ import org.chromium.components.url_forma
@@ -32,8 +45,33 @@ import org.chromium.components.url_forma
import org.chromium.content_public.browser.WebContents;
import org.chromium.url.GURL;
@ -356,7 +356,7 @@ Completely remove contacts picker permission from the file dialog
/**
* Provides the communication channel for Android to fetch and manipulate the
@@ -590,6 +628,211 @@ public class BookmarkBridge {
@@ -616,6 +654,211 @@ public class BookmarkBridge {
}
/**
@ -568,7 +568,7 @@ Completely remove contacts picker permission from the file dialog
* Synchronously gets a list of bookmarks that match the specified search query.
* @param query Keyword used for searching bookmarks.
* @param maxNumberOfResult Maximum number of result to fetch.
@@ -1101,6 +1344,39 @@ public class BookmarkBridge {
@@ -1133,6 +1376,39 @@ public class BookmarkBridge {
depthList.add(depth);
}
@ -608,7 +608,7 @@ Completely remove contacts picker permission from the file dialog
private static List<Pair<Integer, Integer>> createPairsList(int[] left, int[] right) {
List<Pair<Integer, Integer>> pairList = new ArrayList<Pair<Integer, Integer>>();
for (int i = 0; i < left.length; i++) {
@@ -1168,6 +1444,9 @@ public class BookmarkBridge {
@@ -1203,6 +1479,9 @@ public class BookmarkBridge {
int getChildCount(long nativeBookmarkBridge, BookmarkBridge caller, long id, int type);
void getChildIDs(long nativeBookmarkBridge, BookmarkBridge caller, long id, int type,
List<BookmarkId> bookmarksList);
@ -775,7 +775,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
@@ -1860,6 +1860,13 @@ static_library("browser") {
@@ -1872,6 +1872,13 @@ static_library("browser") {
"window_placement/window_placement_permission_context.h",
]
@ -789,7 +789,7 @@ Completely remove contacts picker permission from the file dialog
configs += [
"//build/config/compiler:wexit_time_destructors",
"//build/config:precompiled_headers",
@@ -2995,6 +3002,8 @@ static_library("browser") {
@@ -3010,6 +3017,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",
@ -800,9 +800,9 @@ Completely remove contacts picker permission from the file dialog
"chrome_browser_field_trials_mobile.cc",
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -7706,6 +7706,12 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(ui::kLibinputHandleTouchpad)},
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
@@ -7743,6 +7743,12 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(ash::features::kDesksTemplates)},
#endif
+ {"export-bookmarks-use-saf",
+ flag_descriptions::kBookmarksExportUseSafName,
@ -848,7 +848,7 @@ Completely remove contacts picker permission from the file dialog
using base::android::AttachCurrentThread;
using base::android::ConvertUTF8ToJavaString;
using base::android::ConvertUTF16ToJavaString;
@@ -68,8 +87,93 @@ using bookmarks::BookmarkNode;
@@ -68,8 +87,92 @@ using bookmarks::BookmarkNode;
using bookmarks::BookmarkType;
using content::BrowserThread;
@ -938,11 +938,10 @@ Completely remove contacts picker permission from the file dialog
+ const std::string export_path_;
+};
+
+
const int kInvalidId = -1;
class BookmarkTitleComparer {
@@ -156,6 +260,10 @@ BookmarkBridge::~BookmarkBridge() {
public:
explicit BookmarkTitleComparer(BookmarkBridge* bookmark_bridge,
@@ -154,6 +257,10 @@ BookmarkBridge::~BookmarkBridge() {
if (partner_bookmarks_shim_)
partner_bookmarks_shim_->RemoveObserver(this);
reading_list_manager_->RemoveObserver(this);
@ -953,7 +952,7 @@ Completely remove contacts picker permission from the file dialog
}
void BookmarkBridge::Destroy(JNIEnv*, const JavaParamRef<jobject>&) {
@@ -547,6 +655,182 @@ jint BookmarkBridge::GetTotalBookmarkCou
@@ -571,6 +678,182 @@ jint BookmarkBridge::GetTotalBookmarkCou
return count;
}
@ -1179,7 +1178,7 @@ Completely remove contacts picker permission from the file dialog
jboolean IsEditBookmarksEnabled(JNIEnv* env);
void LoadEmptyPartnerBookmarkShimForTesting(
@@ -146,6 +157,15 @@ class BookmarkBridge : public bookmarks:
@@ -156,6 +167,15 @@ class BookmarkBridge : public bookmarks:
jlong id,
jint type);
@ -1195,7 +1194,7 @@ Completely remove contacts picker permission from the file dialog
void SetBookmarkTitle(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj,
jlong id,
@@ -347,12 +367,15 @@ class BookmarkBridge : public bookmarks:
@@ -359,12 +379,15 @@ class BookmarkBridge : public bookmarks:
void DestroyJavaObject();
Profile* profile_;
@ -1211,7 +1210,7 @@ Completely remove contacts picker permission from the file dialog
// Information about the Partner bookmarks (must check for IsLoaded()).
// This is owned by profile.
@@ -363,6 +386,10 @@ class BookmarkBridge : public bookmarks:
@@ -375,6 +398,10 @@ class BookmarkBridge : public bookmarks:
// Observes the profile destruction and creation.
base::ScopedObservation<Profile, ProfileObserver> profile_observation_{this};
@ -1330,7 +1329,7 @@ Completely remove contacts picker permission from the file dialog
// name conflict or disk error or if Incognito download warning is needed.
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -5472,6 +5472,11 @@ const char kWebKioskEnableLacrosDescript
@@ -5467,6 +5467,11 @@ const char kWebKioskEnableLacrosDescript
"Chrome OS. When disabled, the Ash-chrome will be used";
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
@ -1344,7 +1343,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
@@ -3185,6 +3185,9 @@ extern const char kWebKioskEnableLacrosN
@@ -3193,6 +3193,9 @@ extern const char kWebKioskEnableLacrosN
extern const char kWebKioskEnableLacrosDescription[];
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
@ -1356,7 +1355,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
@@ -174,6 +174,7 @@ const base::Feature* const kFeaturesExpo
@@ -177,6 +177,7 @@ const base::Feature* const kFeaturesExpo
&kBackgroundThreadPool,
&kBentoOffline,
&kBookmarkBottomSheet,
@ -1364,7 +1363,7 @@ Completely remove contacts picker permission from the file dialog
&kCastDeviceFilter,
&kCloseTabSuggestions,
&kCriticalPersistedTabData,
@@ -824,6 +825,10 @@ const base::Feature kWebApkInstallComple
@@ -829,6 +830,10 @@ const base::Feature kWebApkInstallComple
const base::Feature kWebApkTrampolineOnInitialIntent{
"WebApkTrampolineOnInitialIntent", base::FEATURE_ENABLED_BY_DEFAULT};
@ -1387,7 +1386,7 @@ Completely remove contacts picker permission from the file dialog
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
@@ -533,6 +533,7 @@ public abstract class ChromeFeatureList
@@ -541,6 +541,7 @@ public abstract class ChromeFeatureList
"WebApkTrampolineOnInitialIntent";
public static final String XSURFACE_METRICS_REPORTING = "XsurfaceMetricsReporting";
public static final String WEB_OTP_CROSS_DEVICE_SIMPLE_STRING = "WebOtpCrossDeviceSimpleString";
@ -1453,7 +1452,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
@@ -121,6 +121,8 @@ public final class ChromePreferenceKeys
@@ -122,6 +122,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";
@ -1462,7 +1461,7 @@ Completely remove contacts picker permission from the file dialog
/**
* Whether Chrome is set as the default browser.
@@ -1045,6 +1047,7 @@ public final class ChromePreferenceKeys
@@ -1052,6 +1054,7 @@ public final class ChromePreferenceKeys
AUTOFILL_ASSISTANT_PROACTIVE_HELP,
APP_LAUNCH_LAST_KNOWN_ACTIVE_TAB_STATE,
APP_LAUNCH_SEARCH_ENGINE_HAD_LOGO,
@ -1499,7 +1498,7 @@ Completely remove contacts picker permission from the file dialog
</message>
--- a/chrome/common/BUILD.gn
+++ b/chrome/common/BUILD.gn
@@ -415,6 +415,9 @@ static_library("common") {
@@ -416,6 +416,9 @@ static_library("common") {
sources += [
"media/chrome_media_drm_bridge_client.cc",
"media/chrome_media_drm_bridge_client.h",

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

@ -13,7 +13,7 @@ Corrected Exit functionality
--- a/chrome/android/java/res/menu/main_menu.xml
+++ b/chrome/android/java/res/menu/main_menu.xml
@@ -147,6 +147,9 @@
@@ -144,6 +144,9 @@
android:icon="@drawable/gm_filled_cardboard_24" />
<item android:id="@+id/managed_by_menu_id"
android:title="@string/managed" />
@ -23,7 +23,7 @@ Corrected Exit functionality
</group>
<!-- Items shown only in the tab switcher -->
@@ -173,6 +176,9 @@
@@ -170,6 +173,9 @@
<item android:id="@id/preferences_id"
android:title="@string/menu_settings"
android:icon="@drawable/settings_cog" />
@ -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.
@@ -2048,6 +2050,8 @@ public class ChromeTabbedActivity extend
@@ -2038,6 +2040,8 @@ public class ChromeTabbedActivity extend
} else if (id == R.id.close_tab) {
getCurrentTabModel().closeTab(currentTab, true, false, true);
RecordUserAction.record("MobileTabClosed");
@ -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;
@@ -2391,6 +2392,11 @@ public abstract class ChromeActivity<C e
@@ -2421,6 +2422,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
@@ -3262,6 +3262,9 @@ To change this setting, <ph name="BEGIN_
@@ -3261,6 +3261,9 @@ To change this setting, <ph name="BEGIN_
<message name="IDS_MENU_AUTO_DARK_WEB_CONTENTS" desc="Menu item in Chrome's overflow/options menu. When Chrome's browser UI is set to dark theme and this option is checked, sites will have a dark theme automatically applied as well. [CHAR_LIMIT=24]">
Dark theme
</message>

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

@ -4,13 +4,13 @@ Subject: Add flag to disable WebGL
---
chrome/browser/about_flags.cc | 3 +++
chrome/browser/flag_descriptions.cc | 4 ++++
chrome/browser/flag_descriptions.cc | 3 +++
chrome/browser/flag_descriptions.h | 3 +++
3 files changed, 10 insertions(+)
3 files changed, 9 insertions(+)
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2737,6 +2737,9 @@ const FeatureEntry kFeatureEntries[] = {
@@ -2772,6 +2772,9 @@ const FeatureEntry kFeatureEntries[] = {
#include "chrome/browser/bromite_flag_entries.h"
#include "chrome/browser/ungoogled_platform_flag_entries.h"
// Include generated flags for flag unexpiry; see //docs/flag_expiry.md and
@ -22,20 +22,19 @@ Subject: Add flag to disable WebGL
#include "chrome/browser/unexpire_flags_gen.inc"
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -690,6 +690,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.";
@@ -678,6 +678,9 @@ const char kDocumentTransitionSlowdownFa
const char kDocumentTransitionSlowdownFactorDescription[] =
"Slows down animations triggered by documentTransition JavaScript API for "
"debugging.";
+const char kDisableWebGLName[] = "WebGL";
+
+const char kDisableWebGLDescription[] = "Enable or disable all versions of WebGL";
+
const char kEnableAutofillAccountWalletStorageName[] =
"Enable the account data storage for autofill";
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -380,6 +380,9 @@ extern const char kForceColorProfileSRGB
@@ -377,6 +377,9 @@ extern const char kForceColorProfileSRGB
extern const char kForceColorProfileP3[];
extern const char kForceColorProfileColorSpin[];
extern const char kForceColorProfileSCRGBLinear[];

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

@ -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
@@ -1191,8 +1191,10 @@ public class ChromeTabbedActivity extend
@@ -1181,8 +1181,10 @@ public class ChromeTabbedActivity extend
boolean hadCipherData =
CipherFactory.getInstance().restoreFromBundle(getSavedInstanceState());
@ -56,16 +56,16 @@ 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;
@@ -58,6 +61,8 @@ public class PrivacySettings
@@ -57,6 +60,8 @@ public class PrivacySettings
private static final String PREF_PRIVACY_REVIEW = "privacy_review";
private static final String PREF_INCOGNITO_LOCK = "incognito_lock";
+ private static final String PREF_CLOSE_TABS_ON_EXIT = "close_tabs_on_exit";
+
private ManagedPreferenceDelegate mManagedPreferenceDelegate;
private IncognitoLockSettings mIncognitoLockSettings;
@Override
@@ -166,7 +171,11 @@ public class PrivacySettings
@@ -140,7 +145,11 @@ public class PrivacySettings
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
String key = preference.getKey();
@ -78,7 +78,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)) {
@@ -239,6 +248,11 @@ public class PrivacySettings
@@ -209,6 +218,11 @@ public class PrivacySettings
PrivacySandboxSettingsFragment.getStatusString(getContext()));
}
@ -87,12 +87,12 @@ Subject: Add option to not persist tabs across sessions
+ closeTabsOnExitPref.setOnPreferenceChangeListener(this);
+ closeTabsOnExitPref.setManagedPreferenceDelegate(mManagedPreferenceDelegate);
+
updateIncognitoReauthPreference();
mIncognitoLockSettings.updateIncognitoReauthPreferenceIfNeeded(getActivity());
}
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -4155,6 +4155,12 @@ To change this setting, <ph name="BEGIN_
@@ -4168,6 +4168,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>

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

@ -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
@@ -657,12 +657,13 @@ PeerConnectionDependencyFactory::CreateP
@@ -796,12 +796,13 @@ PeerConnectionDependencyFactory::CreateP
port_config.enable_nonproxied_udp = false;
break;
case DEFAULT:

2
patches/Bromite/Disable-DRM-media-origin-IDs-preprovisioning.patch

@ -8,7 +8,7 @@ Subject: Disable DRM media origin IDs preprovisioning
--- a/media/base/media_switches.cc
+++ b/media/base/media_switches.cc
@@ -659,7 +659,7 @@ const base::Feature kMediaDrmPersistentL
@@ -674,7 +674,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",

12
patches/Bromite/Inject-scripts-for-AMP-tracking-ads-and-video.patch

@ -37,9 +37,9 @@ Send a random key press to circumvent idle status detection
#include "third_party/blink/renderer/core/page/scrolling/scrolling_coordinator.h"
+#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_handler.h"
@@ -343,6 +344,8 @@
#include "third_party/blink/renderer/core/page/scrolling/top_document_root_scroller_controller.h"
@@ -342,6 +343,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();
@@ -6539,6 +6542,61 @@ void Document::setAllowDeclarativeShadow
@@ -6509,6 +6512,61 @@ void Document::setAllowDeclarativeShadow
val ? AllowState::kAllow : AllowState::kDeny;
}
@ -110,7 +110,7 @@ Send a random key press to circumvent idle status detection
void Document::FinishedParsing() {
DCHECK(!GetScriptableDocumentParser() || !parser_->IsParsing());
DCHECK(!GetScriptableDocumentParser() || ready_state_ != kLoading);
@@ -6597,6 +6655,10 @@ void Document::FinishedParsing() {
@@ -6567,6 +6625,10 @@ void Document::FinishedParsing() {
if (frame->IsMainFrame() && ShouldMarkFontPerformance())
FontPerformance::MarkDomContentLoaded();
@ -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
@@ -1780,6 +1780,9 @@ class CORE_EXPORT Document : public Cont
@@ -1771,6 +1771,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
@@ -169,6 +169,11 @@ void HTMLScriptElement::setTextContent(c
@@ -174,6 +174,11 @@ void HTMLScriptElement::setTextContent(c
script_text_internal_slot_ = ParkableString(string.Impl());
}

12
patches/Bromite/Revert-flags-remove-disable-pull-to-refresh-effect.patch

@ -12,9 +12,9 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -3415,6 +3415,10 @@ const FeatureEntry kFeatureEntries[] = {
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableHostedAppShimCreation)},
#endif // OS_MAC
@@ -3464,6 +3464,10 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kEnableVulkanDescription,
kOsWin | kOsLinux | kOsAndroid, FEATURE_VALUE_TYPE(features::kVulkan)},
#if defined(OS_ANDROID)
+ {switches::kDisablePullToRefreshEffect,
+ flag_descriptions::kDisablePullToRefreshEffectName,
@ -25,7 +25,7 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
flag_descriptions::kTranslateForceTriggerOnEnglishDescription, kOsAndroid,
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -1161,6 +1161,11 @@
@@ -1179,6 +1179,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
@@ -3404,6 +3404,10 @@ const char kReadLaterDescription[] =
@@ -3374,6 +3374,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
@@ -1951,6 +1951,9 @@ extern const char kQueryTilesSegmentatio
@@ -1942,6 +1942,9 @@ extern const char kQueryTilesSegmentatio
extern const char kQueryTilesSwapTrendingName[];
extern const char kQueryTilesSwapTrendingDescription[];

39
patches/Other/debug-fix.patch

@ -4,7 +4,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
---
base/logging.cc | 2 -
base/supports_user_data.cc | 7 +++--
base/supports_user_data.cc | 4 +-
build/config/compiler/BUILD.gn | 9 ++----
components/omnibox/browser/autocomplete_controller.cc | 3 --
components/omnibox/browser/autocomplete_match.cc | 10 -------
@ -16,7 +16,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
content/common/input/input_event_stream_validator.cc | 3 --
services/network/network_context.cc | 1
url/gurl.cc | 2 -
13 files changed, 10 insertions(+), 53 deletions(-)
13 files changed, 7 insertions(+), 53 deletions(-)
--- a/components/signin/internal/identity_manager/primary_account_manager.cc
+++ b/components/signin/internal/identity_manager/primary_account_manager.cc
@ -49,7 +49,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
}
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -263,7 +263,7 @@ config("compiler") {
@@ -264,7 +264,7 @@ config("compiler") {
cflags_cc = []
cflags_objc = []
cflags_objcc = []
@ -58,7 +58,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
defines = []
configs = []
@@ -1739,7 +1739,7 @@ config("no_rtti") {
@@ -1741,7 +1741,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.
@ -67,7 +67,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
ldflags = [ "-rdynamic" ]
}
}
@@ -1914,8 +1914,6 @@ if (is_win) {
@@ -1916,8 +1916,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.
@ -76,7 +76,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
]
if (!is_nacl && is_clang) {
# We don't care about unique section names, this makes object files a bit
@@ -1928,7 +1926,6 @@ if (is_win) {
@@ -1930,7 +1928,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
]
}
}
@@ -2306,7 +2303,7 @@ config("symbols") {
@@ -2319,7 +2316,7 @@ config("symbols") {
# sections (llvm.org/PR34820).
cflags += [ "-ggnu-pubnames" ]
}
@ -115,7 +115,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
@@ -1424,16 +1424,6 @@ void AutocompleteMatch::WriteIntoTrace(p
@@ -1425,16 +1425,6 @@ void AutocompleteMatch::WriteIntoTrace(p
dict.Add("keyword", keyword);
}
@ -134,7 +134,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
@@ -699,13 +699,6 @@ void AutocompleteResult::CopyFrom(const
@@ -722,13 +722,6 @@ void AutocompleteResult::CopyFrom(const
#endif
}
@ -162,7 +162,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
--- a/components/omnibox/browser/autocomplete_controller.cc
+++ b/components/omnibox/browser/autocomplete_controller.cc
@@ -731,9 +731,6 @@ void AutocompleteController::UpdateResul
@@ -739,9 +739,6 @@ void AutocompleteController::UpdateResul
// Need to validate before invoking CopyOldMatches as the old matches are not
// valid against the current input.
@ -186,7 +186,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
@@ -1132,7 +1132,6 @@ void NetworkContext::QueueReport(
@@ -1137,7 +1137,6 @@ void NetworkContext::QueueReport(
const net::NetworkIsolationKey& network_isolation_key,
const absl::optional<std::string>& user_agent,
base::Value body) {
@ -207,7 +207,7 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
--- a/base/logging.cc
+++ b/base/logging.cc
@@ -878,7 +878,7 @@ LogMessage::~LogMessage() {
@@ -882,7 +882,7 @@ LogMessage::~LogMessage() {
#if defined(OFFICIAL_BUILD) && defined(NDEBUG)
IMMEDIATE_CRASH();
#else
@ -218,24 +218,21 @@ Subject: Remove DCHECK and other lines causing Debug builds to fail
}
--- a/base/supports_user_data.cc
+++ b/base/supports_user_data.cc
@@ -20,7 +20,9 @@ SupportsUserData::SupportsUserData(Suppo
@@ -22,7 +22,7 @@ SupportsUserData::SupportsUserData(Suppo
SupportsUserData& SupportsUserData::operator=(SupportsUserData&&) = default;
SupportsUserData::Data* SupportsUserData::GetUserData(const void* key) const {
- DCHECK(sequence_checker_.CalledOnValidSequence());
+ // DCHECK(sequence_checker_.CalledOnValidSequence());
+ // TODO: For some reason CalledOnValidSequence() will cause a trylock on a null lock
+ // when called from Extension Tabs API. May not be thread safe.
- DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+// DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
// Avoid null keys; they are too vulnerable to collision.
DCHECK(key);
auto found = user_data_.find(key);
@@ -31,7 +33,8 @@ SupportsUserData::Data* SupportsUserData
@@ -33,7 +33,7 @@ SupportsUserData::Data* SupportsUserData
void SupportsUserData::SetUserData(const void* key,
std::unique_ptr<Data> data) {
- DCHECK(sequence_checker_.CalledOnValidSequence());
+ // DCHECK(sequence_checker_.CalledOnValidSequence());
+ // See GetUserData().
- DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+// DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
// Avoid null keys; they are too vulnerable to collision.
DCHECK(key);
if (data.get())

10
patches/Unobtainium/kill-Auth.patch

@ -9,7 +9,7 @@ Subject: kill Auth
--- 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,9 +26,6 @@ import android.os.SystemClock;
@@ -25,9 +25,6 @@ import android.os.SystemClock;
import androidx.annotation.Nullable;
@ -19,7 +19,7 @@ Subject: kill Auth
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.Callback;
import org.chromium.base.ContextUtils;
@@ -83,14 +80,6 @@ public class SystemAccountManagerDelegat
@@ -82,14 +79,6 @@ public class SystemAccountManagerDelegat
@Override
public Account[] getAccounts() {
@ -34,7 +34,7 @@ Subject: kill Auth
// Account seeding relies on GoogleAuthUtil.getAccountId to get GAIA ids,
// so don't report any accounts if Google Play Services are out of date.
return new Account[] {};
@@ -101,28 +90,12 @@ public class SystemAccountManagerDelegat
@@ -100,28 +89,12 @@ public class SystemAccountManagerDelegat
throws AuthException {
ThreadUtils.assertOnBackgroundThread();
assert AccountUtils.GOOGLE_ACCOUNT_TYPE.equals(account.type);
@ -65,7 +65,7 @@ Subject: kill Auth
}
@Override
@@ -159,17 +132,6 @@ public class SystemAccountManagerDelegat
@@ -158,17 +131,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
@@ -209,12 +171,7 @@ public class SystemAccountManagerDelegat
@@ -201,12 +163,7 @@ public class SystemAccountManagerDelegat
@Nullable
@Override
public String getAccountGaiaId(String accountEmail) {

2
patches/Unobtainium/kill-GCM.patch

@ -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",
@@ -1031,10 +1030,6 @@ chrome_java_sources = [
@@ -1020,10 +1019,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/searchwidget/SearchType.java",
"java/src/org/chromium/chrome/browser/searchwidget/SearchWidgetProvider.java",
"java/src/org/chromium/chrome/browser/send_tab_to_self/SendTabToSelfShareActivity.java",

10
patches/Unobtainium/kill-Translate.patch

@ -8,7 +8,7 @@ Subject: kill Translate
--- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
@@ -36,7 +36,11 @@ import org.chromium.chrome.browser.lifec
@@ -35,7 +35,11 @@ import org.chromium.chrome.browser.fonts
import org.chromium.chrome.browser.metrics.UmaUtils;
import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings;
import org.chromium.chrome.browser.search_engines.TemplateUrlServiceFactory;
@ -20,16 +20,16 @@ Subject: kill Translate
import org.chromium.chrome.browser.signin.services.FREMobileIdentityConsistencyFieldTrial;
import org.chromium.components.browser_ui.modaldialog.AppModalPresenter;
import org.chromium.ui.base.LocalizationUtils;
@@ -209,6 +213,8 @@ public class FirstRunActivity extends Fi
@@ -185,6 +189,8 @@ public class FirstRunActivity extends Fi
() -> mFreProperties.getBoolean(SHOW_SEARCH_ENGINE_PAGE);
BooleanSupplier showSyncConsent = () -> mFreProperties.getBoolean(SHOW_SYNC_CONSENT_PAGE);
+ getPrefService().setBoolean(Pref.OFFER_TRANSLATE_ENABLED, false);
+
boolean notifyAdapter = false;
// An optional sign-in page.
if (FREMobileIdentityConsistencyFieldTrial.isEnabled() && showSyncConsent.getAsBoolean()) {
@@ -674,4 +680,9 @@ public class FirstRunActivity extends Fi
// An optional sign-in page, the visibility of this page will be decided on the fly
// according to the situation.
@@ -663,4 +669,9 @@ public class FirstRunActivity extends Fi
assert sObserver == null;
sObserver = observer;
}

19
patches/Vanadium/0003-switch-to-fstack-protector-strong.patch

@ -1,21 +1,25 @@
From 6208bab7bbed9826044cf417b101bcf8d9abe3ce Mon Sep 17 00:00:00 2001
From 2ca1e28a5ce64c8d50276b6d8166eae1910635dc Mon Sep 17 00:00:00 2001
From: Daniel Micay <[email protected]>
Date: Wed, 26 Dec 2018 10:20:24 -0500
Subject: [PATCH 03/73] switch to -fstack-protector-strong
Subject: [PATCH 03/78] switch to -fstack-protector-strong
---
build/config/compiler/BUILD.gn | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
build/config/compiler/BUILD.gn | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index bd1fefeff6f60..2fb6e71f2d475 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -335,16 +335,12 @@ config("compiler") {
@@ -338,18 +338,12 @@ config("compiler") {
cflags += [ "-fstack-protector" ]
}
} else if ((is_posix && !is_chromeos_ash && !is_nacl) || is_fuchsia) {
- # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it.
- # See also https://crbug.com/533294
- cflags += [ "--param=ssp-buffer-size=4" ]
- if (current_os != "zos") {
- cflags += [ "--param=ssp-buffer-size=4" ]
- }
-
# The x86 toolchain currently has problems with stack-protector.
if (is_android && current_cpu == "x86") {
@ -27,3 +31,6 @@ Subject: [PATCH 03/73] switch to -fstack-protector-strong
}
}
--
2.34.1

13
patches/Vanadium/0004-enable-fwrapv-in-Clang-for-non-UBSan-builds.patch

@ -4,14 +4,12 @@ Date: Thu, 22 Dec 2016 07:15:34 -0500
Subject: [PATCH 04/78] enable -fwrapv in Clang for non-UBSan builds
---
build/config/compiler/BUILD.gn | 4 ++++
build/config/compiler/BUILD.gn | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 93f71eed6e7f2..076adf274b560 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -351,6 +351,10 @@ config("compiler") {
@@ -354,6 +354,10 @@ config("compiler") {
}
}
@ -20,8 +18,5 @@ index 93f71eed6e7f2..076adf274b560 100644
+ }
+
# Linker warnings.
if (fatal_linker_warnings && !is_apple && current_os != "aix") {
ldflags += [ "-Wl,--fatal-warnings" ]
--
2.33.1
if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
current_os != "zos") {

11
patches/Vanadium/0016-disable-seed-based-field-trials.patch

@ -4,14 +4,12 @@ Date: Tue, 25 Dec 2018 16:19:51 -0500
Subject: [PATCH 16/78] disable seed-based field trials
---
components/variations/service/variations_field_trial_creator.cc | 2 ++
components/variations/service/variations_field_trial_creator.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/components/variations/service/variations_field_trial_creator.cc b/components/variations/service/variations_field_trial_creator.cc
index 30d8b8a0d9b74..fa5b348880d2c 100644
--- a/components/variations/service/variations_field_trial_creator.cc
+++ b/components/variations/service/variations_field_trial_creator.cc
@@ -287,8 +287,10 @@ bool VariationsFieldTrialCreator::SetupFieldTrials(
@@ -266,8 +266,10 @@ bool VariationsFieldTrialCreator::SetUpF
#endif // BUILDFLAG(FIELDTRIAL_TESTING_ENABLED)
bool used_seed = false;
if (!used_testing_config) {
@ -21,7 +19,4 @@ index 30d8b8a0d9b74..fa5b348880d2c 100644
+#endif
}
platform_field_trials->SetupFeatureControllingFieldTrials(
--
2.33.1
platform_field_trials->SetUpFeatureControllingFieldTrials(

13
patches/Vanadium/0018-disable-WebView-variations-support.patch

@ -4,12 +4,10 @@ Date: Thu, 10 Dec 2020 10:09:18 -0500
Subject: [PATCH 18/78] disable WebView variations support
---
.../com/android/webview/chromium/WebViewChromiumAwInit.java | 4 ----
.../webview/chromium/WebViewChromiumFactoryProvider.java | 2 --
android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumAwInit.java | 4 ----
android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java | 2 --
2 files changed, 6 deletions(-)
diff --git a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumAwInit.java b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumAwInit.java
index 87a96f4197cfe..f791ddbe999d5 100644
--- a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumAwInit.java
+++ b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumAwInit.java
@@ -196,10 +196,6 @@ public class WebViewChromiumAwInit {
@ -23,11 +21,9 @@ index 87a96f4197cfe..f791ddbe999d5 100644
AwBrowserProcess.start();
AwBrowserProcess.handleMinidumpsAndSetMetricsConsent(true /* updateMetricsConsent */);
diff --git a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
index bed9ebc8f535c..9b786db8f9ed7 100644
--- a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
+++ b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
@@ -435,8 +435,6 @@ public class WebViewChromiumFactoryProvider implements WebViewFactoryProvider {
@@ -431,8 +431,6 @@ public class WebViewChromiumFactoryProvi
}
}
@ -36,6 +32,3 @@ index bed9ebc8f535c..9b786db8f9ed7 100644
mShouldDisableThreadChecking = shouldDisableThreadChecking(ctx);
setSingleton(this);
--
2.33.1

9
patches/Vanadium/0042-enable-user-agent-freeze-by-default.patch

@ -4,14 +4,12 @@ Date: Wed, 3 Mar 2021 13:42:41 -0500
Subject: [PATCH 42/78] enable user agent freeze by default
---
third_party/blink/common/features.cc | 2 +-
third_party/blink/common/features.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc
index 20ee68874d475..b517e35fbfc3c 100644
--- a/third_party/blink/common/features.cc
+++ b/third_party/blink/common/features.cc
@@ -86,7 +86,7 @@ const base::Feature kFreezePurgeMemoryAllPagesFrozen{
@@ -99,7 +99,7 @@ const base::Feature kFreezePurgeMemoryAl
// Freezes the user-agent as part of https://github.com/WICG/ua-client-hints.
const base::Feature kReduceUserAgent{"ReduceUserAgent",
@ -20,6 +18,3 @@ index 20ee68874d475..b517e35fbfc3c 100644
// Enables the frequency capping for detecting overlay popups. Overlay-popups
// are the interstitials that pop up and block the main content of the page.
--
2.33.1

9
patches/Vanadium/0043-enable-split-cache-by-default.patch

@ -4,14 +4,12 @@ Date: Wed, 23 Dec 2020 06:00:50 -0500
Subject: [PATCH 43/78] enable split cache by default
---
net/base/features.cc | 2 +-
net/base/features.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/base/features.cc b/net/base/features.cc
index 549f376be5224..39240192c87ea 100644
--- a/net/base/features.cc
+++ b/net/base/features.cc
@@ -96,7 +96,7 @@ const base::Feature kSplitCacheByIncludeCredentials{
@@ -99,7 +99,7 @@ const base::Feature kSplitCacheByInclude
"SplitCacheByIncludeCredentials", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kSplitCacheByNetworkIsolationKey{
@ -20,6 +18,3 @@ index 549f376be5224..39240192c87ea 100644
const base::Feature kSplitHostCacheByNetworkIsolationKey{
"SplitHostCacheByNetworkIsolationKey", base::FEATURE_DISABLED_BY_DEFAULT};
--
2.33.1

9
patches/Vanadium/0044-enable-partitioning-connections-by-default.patch

@ -4,14 +4,12 @@ Date: Mon, 8 Mar 2021 16:53:47 -0500
Subject: [PATCH 44/78] enable partitioning connections by default
---
net/base/features.cc | 12 ++++++------
net/base/features.cc | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/base/features.cc b/net/base/features.cc
index 39240192c87ea..fb45fb3c7a040 100644
--- a/net/base/features.cc
+++ b/net/base/features.cc
@@ -99,27 +99,27 @@ const base::Feature kSplitCacheByNetworkIsolationKey{
@@ -102,27 +102,27 @@ const base::Feature kSplitCacheByNetwork
"SplitCacheByNetworkIsolationKey", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kSplitHostCacheByNetworkIsolationKey{
@ -45,6 +43,3 @@ index 39240192c87ea..fb45fb3c7a040 100644
const base::Feature kExpectCTPruning{"ExpectCTPruning",
base::FEATURE_ENABLED_BY_DEFAULT};
--
2.33.1

4
patches/Vanadium/0050-enable-strict-site-isolation-by-default-on-Android.patch

@ -10,7 +10,7 @@ Subject: [PATCH 50/78] enable strict site isolation by default on Android
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -3597,16 +3597,6 @@ const FeatureEntry kFeatureEntries[] = {
@@ -3660,16 +3660,6 @@ const FeatureEntry kFeatureEntries[] = {
kOsCrOS | kOsLinux | kOsAndroid,
FEATURE_VALUE_TYPE(mojo::core::kMojoLinuxChannelSharedMem)},
#endif
@ -29,7 +29,7 @@ Subject: [PATCH 50/78] enable strict site isolation by default on Android
ORIGIN_LIST_VALUE_TYPE(switches::kIsolateOrigins, "")},
--- a/chrome/common/chrome_features.cc
+++ b/chrome/common/chrome_features.cc
@@ -916,13 +916,7 @@ const base::Feature kShow10_10ObsoleteIn
@@ -952,13 +952,7 @@ const base::Feature kShow10_10ObsoleteIn
// TODO(alexmos): Move this and the other site isolation features below to
// browser_features, as they are only used on the browser side.
const base::Feature kSitePerProcess {

3
patches/series

@ -1,5 +1,4 @@
src-fix/android-rlz-fix-missing-variable.patch
src-fix/clang-unknown-warnings.patch
src-fix/fix-null-mInstanceID.patch
src-fix/fix-safe-browsing.patch
src-fix/fix-prefs.patch
@ -45,7 +44,7 @@ ungoogled-chromium-android/Disable-lite-mode-prompt.patch
ungoogled-chromium-android/Disable-prefetch.patch
ungoogled-chromium-android/Add-more-search-engines.patch
ungoogled-chromium-android/Add-folder-button-bookmark.patch
ungoogled-chromium-android/Enable-update-notification.patch
#ungoogled-chromium-android/Enable-update-notification.patch
ungoogled-chromium-android/Enable-ProactivelySwapBrowsingInstance.patch
ungoogled-chromium-android/Disable-homepage-by-default.patch
ungoogled-chromium-android/Remove-UI-elements.patch

16
patches/src-fix/clang-unknown-warnings.patch

@ -1,16 +0,0 @@
description: disable clang unknown warnings
author: Wengling Chen <[email protected]>
---
build/config/compiler/BUILD.gn | 1 -
1 file changed, 1 deletion(-)
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1531,7 +1531,6 @@ config("default_warnings") {
"-Wno-unused-but-set-variable",
# TODO(https://crbug.com/1255745): Clean up, enable.
- "-Wno-bitwise-instead-of-logical",
]
}

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

@ -5,7 +5,7 @@ Subject: fix build error with prefs.h
---
chrome/android/java/src/org/chromium/chrome/browser/signin/SyncConsentFragmentBase.java | 3 +--
chrome/browser/preferences/BUILD.gn | 1 -
chrome/browser/signin/ui/android/java/src/org/chromium/chrome/browser/signin/ui/SigninPromoUtil.java | 3 +--
chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/SigninPromoUtil.java | 3 +--
3 files changed, 2 insertions(+), 5 deletions(-)
--- a/chrome/browser/preferences/BUILD.gn
@ -18,8 +18,8 @@ Subject: fix build error with prefs.h
"//components/translate/core/browser/translate_pref_names.cc",
]
--- a/chrome/browser/signin/ui/android/java/src/org/chromium/chrome/browser/signin/ui/SigninPromoUtil.java
+++ b/chrome/browser/signin/ui/android/java/src/org/chromium/chrome/browser/signin/ui/SigninPromoUtil.java
--- a/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/SigninPromoUtil.java
+++ b/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/SigninPromoUtil.java
@@ -78,8 +78,7 @@ public final class SigninPromoUtil {
return false;
}

113
patches/src-fix/fix-safe-browsing.patch

@ -27,7 +27,7 @@ Subject: Fix build error caused by the removal of safe_browsing
components/safe_browsing/content/browser/client_side_detection_service.cc | 31 -
components/safe_browsing/content/browser/safe_browsing_tab_observer.cc | 9
components/safe_browsing/content/browser/triggers/trigger_throttler.cc | 1
components/safe_browsing/content/browser/user_population.cc | 8
components/safe_browsing/core/browser/user_population.cc | 9
weblayer/browser/browser_context_impl.cc | 2
weblayer/browser/browser_process.cc | 11
weblayer/browser/browser_process.h | 4
@ -36,17 +36,17 @@ Subject: Fix build error caused by the removal of safe_browsing
weblayer/browser/profile_impl.cc | 11
weblayer/browser/safe_browsing/client_side_detection_service_factory.cc | 4
weblayer/browser/safe_browsing/safe_browsing_navigation_observer_manager_factory.cc | 3
weblayer/browser/safe_browsing/safe_browsing_service.cc | 226 ----------
weblayer/browser/safe_browsing/safe_browsing_service.cc | 230 ----------
weblayer/browser/safe_browsing/weblayer_client_side_detection_host_delegate.cc | 4
weblayer/browser/safe_browsing/weblayer_client_side_detection_service_delegate.cc | 4
weblayer/browser/safe_browsing/weblayer_safe_browsing_blocking_page_factory.cc | 6
weblayer/browser/safe_browsing/weblayer_safe_browsing_tab_observer_delegate.cc | 12
weblayer/browser/tab_impl.cc | 16
39 files changed, 60 insertions(+), 658 deletions(-)
39 files changed, 60 insertions(+), 663 deletions(-)
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -384,7 +384,6 @@ android_library("chrome_java") {
@@ -391,7 +391,6 @@ android_library("chrome_java") {
"//chrome/browser/privacy_review/android:java",
"//chrome/browser/privacy_sandbox/android:java",
"//chrome/browser/profiles/android:java",
@ -75,7 +75,7 @@ Subject: Fix build error caused by the removal of safe_browsing
#include "components/safe_browsing/core/common/utils.h"
#include "components/security_interstitials/content/security_interstitial_controller_client.h"
#include "components/security_interstitials/content/settings_page_helper.h"
@@ -104,16 +103,16 @@ AwSafeBrowsingBlockingPage* AwSafeBrowsi
@@ -105,16 +104,16 @@ AwSafeBrowsingBlockingPage* AwSafeBrowsi
BaseSafeBrowsingErrorUI::SBErrorDisplayOptions display_options =
BaseSafeBrowsingErrorUI::SBErrorDisplayOptions(
IsMainPageLoadBlocked(unsafe_resources),
@ -108,7 +108,7 @@ Subject: Fix build error caused by the removal of safe_browsing
#include "components/security_interstitials/content/stateful_ssl_host_state_delegate.h"
#include "components/site_isolation/pref_names.h"
#include "components/site_isolation/site_isolation_policy.h"
@@ -287,7 +286,6 @@ void BrowserContextImpl::RegisterPrefs(
@@ -280,7 +279,6 @@ void BrowserContextImpl::RegisterPrefs(
StatefulSSLHostStateDelegate::RegisterProfilePrefs(pref_registry);
HostContentSettingsMap::RegisterProfilePrefs(pref_registry);
@ -162,7 +162,7 @@ Subject: Fix build error caused by the removal of safe_browsing
}
--- a/chrome/browser/safe_browsing/BUILD.gn
+++ b/chrome/browser/safe_browsing/BUILD.gn
@@ -364,7 +364,6 @@ static_library("safe_browsing") {
@@ -367,7 +367,6 @@ static_library("safe_browsing") {
]
}
deps += [
@ -182,7 +182,7 @@ Subject: Fix build error caused by the removal of safe_browsing
]
--- a/chrome/browser/android/tab_web_contents_delegate_android.cc
+++ b/chrome/browser/android/tab_web_contents_delegate_android.cc
@@ -178,11 +178,6 @@ void TabWebContentsDelegateAndroid::Port
@@ -177,11 +177,6 @@ void TabWebContentsDelegateAndroid::Port
infobars::ContentInfoBarManager::CreateForWebContents(portal_contents);
PrefsTabHelper::CreateForWebContents(portal_contents);
DataReductionProxyTabHelper::CreateForWebContents(portal_contents);
@ -212,7 +212,7 @@ Subject: Fix build error caused by the removal of safe_browsing
#else
// Call MetricsService::RegisterPrefs() as VariationsService::RegisterPrefs()
// CHECKs that kVariationsCrashStreak has already been registered.
@@ -521,33 +519,6 @@ ContentBrowserClientImpl::CreateURLLoade
@@ -511,33 +509,6 @@ ContentBrowserClientImpl::CreateURLLoade
int frame_tree_node_id) {
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> result;
@ -246,21 +246,21 @@ Subject: Fix build error caused by the removal of safe_browsing
auto signin_throttle =
SigninURLLoaderThrottle::Create(browser_context, wc_getter);
if (signin_throttle)
@@ -853,13 +824,6 @@ ContentBrowserClientImpl::CreateThrottle
@@ -843,13 +814,6 @@ ContentBrowserClientImpl::CreateThrottle
}
#if defined(OS_ANDROID)
if (handle->IsInMainFrame()) {
- if (base::FeatureList::IsEnabled(features::kWebLayerSafeBrowsing) &&
- IsSafebrowsingSupported()) {
- throttles.push_back(
- GetSafeBrowsingService()->CreateSafeBrowsingNavigationThrottle(
- handle));
- }
-
- if (IsSafebrowsingSupported()) {
- std::unique_ptr<content::NavigationThrottle> safe_browsing_throttle =
- GetSafeBrowsingService()->MaybeCreateSafeBrowsingNavigationThrottleFor(
- handle);
- if (safe_browsing_throttle)
- throttles.push_back(std::move(safe_browsing_throttle));
- }
if (!navigation_impl || !navigation_impl->disable_intent_processing()) {
std::unique_ptr<content::NavigationThrottle> intercept_navigation_throttle =
navigation_interception::InterceptNavigationDelegate::
MaybeCreateThrottleFor(
@@ -952,11 +916,6 @@ void ContentBrowserClientImpl::ExposeInt
@@ -944,11 +908,6 @@ void ContentBrowserClientImpl::ExposeInt
};
registry->AddInterface(base::BindRepeating(create_spellcheck_host),
content::GetUIThreadTaskRunner({}));
@ -307,7 +307,7 @@ Subject: Fix build error caused by the removal of safe_browsing
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
@@ -70,10 +67,7 @@ void MaybeCreateSafeBrowsing(
@@ -71,10 +68,7 @@ void MaybeCreateSafeBrowsing(
if (!render_process_host)
return;
@ -319,7 +319,7 @@ Subject: Fix build error caused by the removal of safe_browsing
if (!is_safe_browsing_enabled)
return;
@@ -87,222 +81,4 @@ void MaybeCreateSafeBrowsing(
@@ -88,226 +82,4 @@ void MaybeCreateSafeBrowsing(
} // namespace
@ -376,9 +376,13 @@ Subject: Fix build error caused by the removal of safe_browsing
-}
-
-std::unique_ptr<content::NavigationThrottle>
-SafeBrowsingService::CreateSafeBrowsingNavigationThrottle(
-SafeBrowsingService::MaybeCreateSafeBrowsingNavigationThrottleFor(
- content::NavigationHandle* handle) {
- return std::make_unique<safe_browsing::SafeBrowsingNavigationThrottle>(
- if (!base::FeatureList::IsEnabled(features::kWebLayerSafeBrowsing)) {
- return nullptr;
- }
-
- return safe_browsing::SafeBrowsingNavigationThrottle::MaybeCreateThrottleFor(
- handle, GetSafeBrowsingUIManager().get());
-}
-
@ -552,7 +556,7 @@ Subject: Fix build error caused by the removal of safe_browsing
#include "components/unified_consent/pref_names.h"
#include "ui/gfx/android/java_bitmap.h"
#include "weblayer/browser/android/metrics/weblayer_metrics_service_client.h"
@@ -640,7 +639,7 @@ void ProfileImpl::SetBooleanSetting(Sett
@@ -632,7 +631,7 @@ void ProfileImpl::SetBooleanSetting(Sett
auto* pref_service = GetBrowserContext()->pref_service();
switch (type) {
case SettingType::BASIC_SAFE_BROWSING_ENABLED:
@ -561,7 +565,7 @@ Subject: Fix build error caused by the removal of safe_browsing
safe_browsing::SetSafeBrowsingState(
pref_service,
value ? safe_browsing::SafeBrowsingState::STANDARD_PROTECTION
@@ -660,10 +659,6 @@ void ProfileImpl::SetBooleanSetting(Sett
@@ -652,10 +651,6 @@ void ProfileImpl::SetBooleanSetting(Sett
break;
}
case SettingType::EXTENDED_REPORTING_SAFE_BROWSING_ENABLED:
@ -572,7 +576,7 @@ Subject: Fix build error caused by the removal of safe_browsing
break;
case SettingType::REAL_TIME_SAFE_BROWSING_ENABLED:
#if defined(OS_ANDROID)
@@ -681,7 +676,7 @@ bool ProfileImpl::GetBooleanSetting(Sett
@@ -673,7 +668,7 @@ bool ProfileImpl::GetBooleanSetting(Sett
auto* pref_service = GetBrowserContext()->pref_service();
switch (type) {
case SettingType::BASIC_SAFE_BROWSING_ENABLED:
@ -581,7 +585,7 @@ Subject: Fix build error caused by the removal of safe_browsing
return safe_browsing::IsSafeBrowsingEnabled(*pref_service);
#else
return false;
@@ -689,7 +684,7 @@ bool ProfileImpl::GetBooleanSetting(Sett
@@ -681,7 +676,7 @@ bool ProfileImpl::GetBooleanSetting(Sett
case SettingType::UKM_ENABLED:
return pref_service->GetBoolean(prefs::kUkmEnabled);
case SettingType::EXTENDED_REPORTING_SAFE_BROWSING_ENABLED:
@ -878,7 +882,7 @@ Subject: Fix build error caused by the removal of safe_browsing
private void onPromoSeen() {
--- 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
@@ -26,8 +26,6 @@ import org.chromium.chrome.browser.priva
@@ -25,8 +25,6 @@ import org.chromium.chrome.browser.priva
import org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxReferrer;
import org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxSettingsFragment;
import org.chromium.chrome.browser.profiles.Profile;
@ -887,8 +891,8 @@ Subject: Fix build error caused by the removal of safe_browsing
import org.chromium.chrome.browser.settings.ChromeManagedPreferenceDelegate;
import org.chromium.chrome.browser.settings.SettingsLauncherImpl;
import org.chromium.chrome.browser.signin.services.IdentityServicesProvider;
@@ -97,11 +95,7 @@ public class PrivacySettings
setUpIncognitoReauthPreference();
@@ -100,11 +98,7 @@ public class PrivacySettings
mIncognitoLockSettings.setUpIncognitoReauthPreference(getActivity());
Preference safeBrowsingPreference = findPreference(PREF_SAFE_BROWSING);
- safeBrowsingPreference.setSummary(
@ -899,7 +903,7 @@ Subject: Fix build error caused by the removal of safe_browsing
return false;
});
@@ -243,8 +237,6 @@ public class PrivacySettings
@@ -213,8 +207,6 @@ public class PrivacySettings
Preference safeBrowsingPreference = findPreference(PREF_SAFE_BROWSING);
if (safeBrowsingPreference != null && safeBrowsingPreference.isVisible()) {
@ -1188,7 +1192,7 @@ Subject: Fix build error caused by the removal of safe_browsing
--- a/weblayer/browser/browsing_data_remover_delegate.cc
+++ b/weblayer/browser/browsing_data_remover_delegate.cc
@@ -96,7 +96,7 @@ void BrowsingDataRemoverDelegate::Remove
@@ -95,7 +95,7 @@ void BrowsingDataRemoverDelegate::Remove
// between UNPROTECTED_WEB and PROTECTED_WEB.
if (remove_mask & content::BrowsingDataRemover::DATA_TYPE_COOKIES) {
network::mojom::NetworkContext* safe_browsing_context = nullptr;
@ -1314,12 +1318,12 @@ Subject: Fix build error caused by the removal of safe_browsing
base::UmaHistogramBoolean("SBClientPhishing.LocalModelDetectsPhishing",
verdict->is_phishing());
@@ -656,7 +643,7 @@ bool ClientSideDetectionHost::CanGetAcce
// Return true if the finch feature is enabled for an ESB user, and if the
// primary user account is signed in.
return base::FeatureList::IsEnabled(kClientSideDetectionWithToken) &&
- IsEnhancedProtectionEnabled(*pref_service_) &&
+ false &&
@@ -654,7 +641,7 @@ bool ClientSideDetectionHost::CanGetAcce
return false;
// Return true if the primary user account of an ESB user is signed in.
- return IsEnhancedProtectionEnabled(*pref_service_) &&
+ return false &&