Browse Source

Update to 95.0.4638.54-1

master 95.0.4638.54-1-webview
wchen342 2 months ago
parent
commit
d304c85dd1
Signed by: wchen342 GPG Key ID: 9C19365D69B04CEC
  1. 4
      .build_config
  2. 3
      CHANGELOG.md
  3. 388
      domain_sub_2.list
  4. BIN
      misc/aidl
  5. 10
      patches/Bromite/AImageReader-CFI-crash-mitigations.patch
  6. 30
      patches/Bromite/Add-a-proxy-configuration-page.patch
  7. 22
      patches/Bromite/Add-an-always-incognito-mode.patch
  8. 8
      patches/Bromite/Add-exit-menu-item.patch
  9. 10
      patches/Bromite/Add-flag-to-disable-WebGL.patch
  10. 14
      patches/Bromite/Add-option-to-not-persist-tabs-across-sessions.patch
  11. 2
      patches/Bromite/Disable-DRM-media-origin-IDs-preprovisioning.patch
  12. 12
      patches/Bromite/Inject-scripts-for-AMP-tracking-ads-and-video.patch
  13. 8
      patches/Bromite/Revert-flags-remove-disable-pull-to-refresh-effect.patch
  14. 16
      patches/Other/debug-fix.patch
  15. 8
      patches/Unobtainium/kill-GCM.patch
  16. 2
      patches/Unobtainium/kill-Location-fall-back-to-system.patch
  17. 12
      patches/Unobtainium/kill-Translate.patch
  18. 2
      patches/Vanadium/0003-switch-to-fstack-protector-strong.patch
  19. 2
      patches/Vanadium/0016-disable-seed-based-field-trials.patch
  20. 2
      patches/Vanadium/0031-disable-media-router-media-remoting-by-default.patch
  21. 2
      patches/Vanadium/0034-disable-media-router-by-default.patch
  22. 3
      patches/series
  23. 43
      patches/src-fix/fix-clang-options.patch
  24. 19
      patches/src-fix/fix-gtest-visibility.patch
  25. 2
      patches/src-fix/fix-prefs.patch
  26. 19
      patches/src-fix/fix-py3.10-collections.patch
  27. 306
      patches/src-fix/fix-safe-browsing.patch
  28. 6
      patches/ungoogled-chromium-android/Add-always-desktop-option.patch
  29. 12
      patches/ungoogled-chromium-android/Add-folder-button-bookmark.patch
  30. 12
      patches/ungoogled-chromium-android/Add-force-tablet-ui-option.patch
  31. 12
      patches/ungoogled-chromium-android/Add-more-search-engines.patch
  32. 10
      patches/ungoogled-chromium-android/Add-save-data-flag.patch
  33. 12
      patches/ungoogled-chromium-android/Add_trichrome_apk.patch
  34. 4
      patches/ungoogled-chromium-android/Disable-contextual-search.patch
  35. 2
      patches/ungoogled-chromium-android/Enable-ProactivelySwapBrowsingInstance.patch
  36. 10
      patches/ungoogled-chromium-android/Enable-update-notification.patch
  37. 64
      patches/ungoogled-chromium-android/Remove-UI-elements.patch
  38. 57
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.auth.patch
  39. 10
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.cast.patch
  40. 26
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.common-auth-signin-dynamic-com.google.android.gms.tasks.patch
  41. 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
  42. 6
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.gcm.patch
  43. 6
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.vision-com.google.android.gms.clearcut-com.google.android.gms.phenotype.patch
  44. 2
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.core.splitcompat-com.google.android.play.core.splitinstall.patch
  45. 16
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.patch
  46. 2
      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=94.0.4606.81
ungoogled_chromium_version=94.0.4606.81
chromium_version=95.0.4638.54
ungoogled_chromium_version=95.0.4638.54
ungoogled_chromium_revision=1
ungoogled_chromium_android_revision=1

3
CHANGELOG.md

@ -1,3 +1,6 @@
# 95.0.4638.54-1
* Remove FloC setting
# 94.0.4606.81-1
* Now using Android SDK 12 r02

388
domain_sub_2.list

File diff suppressed because it is too large

BIN
misc/aidl

Binary file not shown.

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
@@ -2017,7 +2017,7 @@
@@ -2101,7 +2101,7 @@
{
"name": "enable-image-reader",
"owners": [ "vikassoni", "liberato" ],
@ -149,8 +149,8 @@ See discussions at:
if (!gpu_preferences.enable_android_surface_control)
return kGpuFeatureStatusDisabled;
@@ -319,6 +322,11 @@ void AdjustGpuFeatureStatusToWorkarounds
gpu_feature_info->status_values[GPU_FEATURE_TYPE_ACCELERATED_WEBGL2] =
@@ -344,6 +347,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
@@ -672,6 +672,10 @@ const base::Feature kMediaDrmPreprovisio
@@ -657,6 +657,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;

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

@ -27,10 +27,10 @@ for SimpleURLLoaders as well.
chrome/browser/ui/webui/proxy_config_ui.h | 33
chrome/common/webui_url_constants.cc | 4
chrome/common/webui_url_constants.h | 2
components/policy/core/browser/proxy_policy_handler.cc | 2
components/proxy_config/pref_proxy_config_tracker_impl.cc | 1
components/proxy_config/proxy_config_dictionary.cc | 30
components/proxy_config/proxy_config_dictionary.h | 7
components/proxy_config/proxy_policy_handler.cc | 2
net/proxy_resolution/proxy_config.cc | 52 +
net/proxy_resolution/proxy_config.h | 3
24 files changed, 995 insertions(+), 14 deletions(-)
@ -67,17 +67,17 @@ 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
@@ -56,6 +56,7 @@ public class PrivacySettings
@@ -55,6 +55,7 @@ public class PrivacySettings
private static final String PREF_DO_NOT_TRACK = "do_not_track";
private static final String PREF_CLEAR_BROWSING_DATA = "clear_browsing_data";
private static final String PREF_CLOSE_TABS_ON_EXIT = "close_tabs_on_exit";
+ private static final String PREF_PROXY_OPTIONS = "proxy";
private static final String PREF_PRIVACY_SANDBOX = "privacy_sandbox";
private static final String PREF_PRIVACY_REVIEW = "privacy_review";
private ManagedPreferenceDelegate mManagedPreferenceDelegate;
--- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
+++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
@@ -364,6 +364,8 @@ ChromeAutocompleteProviderClient::GetBui
@@ -366,6 +366,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
@@ -88,6 +88,12 @@
@@ -89,6 +89,12 @@
<include name="IDR_HANGOUT_SERVICES_MANIFEST" file="resources\hangout_services\manifest.json" type="BINDATA" />
</if>
@ -174,7 +174,7 @@ for SimpleURLLoaders as well.
#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
#include "chrome/browser/background/background_mode_manager.h"
#endif
@@ -912,6 +914,8 @@ void RegisterLocalState(PrefRegistrySimp
@@ -939,6 +941,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/sync_internals/sync_internals_ui.h"
@@ -622,6 +623,8 @@ WebUIFactoryFunction GetWebUIFactoryFunc
@@ -641,6 +642,8 @@ WebUIFactoryFunction GetWebUIFactoryFunc
return &NewWebUI<MemoryInternalsUI>;
if (url.host_piece() == chrome::kChromeUINetExportHost)
return &NewWebUI<NetExportUI>;
@ -874,15 +874,15 @@ for SimpleURLLoaders as well.
+void ProxyConfigMessageHandler::RegisterMessages() {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+
+ web_ui()->RegisterMessageCallback(
+ web_ui()->RegisterDeprecatedMessageCallback(
+ "enableNotifyUIWithState",
+ base::BindRepeating(&ProxyConfigMessageHandler::OnEnableNotifyUIWithState,
+ base::Unretained(this)));
+ web_ui()->RegisterMessageCallback(
+ web_ui()->RegisterDeprecatedMessageCallback(
+ "apply",
+ base::BindRepeating(&ProxyConfigMessageHandler::OnApply,
+ base::Unretained(this)));
+ web_ui()->RegisterMessageCallback(
+ web_ui()->RegisterDeprecatedMessageCallback(
+ "clear",
+ base::BindRepeating(&ProxyConfigMessageHandler::OnClear,
+ base::Unretained(this)));
@ -1096,7 +1096,7 @@ for SimpleURLLoaders as well.
+#endif // CHROME_BROWSER_UI_WEBUI_PROXY_CONFIG_UI_H_
--- a/chrome/common/webui_url_constants.cc
+++ b/chrome/common/webui_url_constants.cc
@@ -34,6 +34,8 @@ const char kChromeUICertificateViewerHos
@@ -35,6 +35,8 @@ const char kChromeUICertificateViewerHos
const char kChromeUICertificateViewerURL[] = "chrome://view-cert/";
const char kChromeUIChromeSigninHost[] = "chrome-signin";
const char kChromeUIChromeSigninURL[] = "chrome://chrome-signin/";
@ -1123,7 +1123,7 @@ for SimpleURLLoaders as well.
kChromeUIDownloadsHost,
--- a/chrome/common/webui_url_constants.h
+++ b/chrome/common/webui_url_constants.h
@@ -125,6 +125,8 @@ extern const char kChromeUIMemoryInterna
@@ -126,6 +126,8 @@ extern const char kChromeUIMemoryInterna
extern const char kChromeUINTPTilesInternalsHost[];
extern const char kChromeUINaClHost[];
extern const char kChromeUINetExportHost[];
@ -1132,9 +1132,9 @@ for SimpleURLLoaders as well.
extern const char kChromeUINetInternalsHost[];
extern const char kChromeUINetInternalsURL[];
extern const char kChromeUINewTabHost[];
--- a/components/policy/core/browser/proxy_policy_handler.cc
+++ b/components/policy/core/browser/proxy_policy_handler.cc
@@ -207,7 +207,7 @@ void ProxyPolicyHandler::ApplyPolicySett
--- a/components/proxy_config/proxy_policy_handler.cc
+++ b/components/proxy_config/proxy_policy_handler.cc
@@ -259,7 +259,7 @@ void ProxyPolicyHandler::ApplyPolicySett
ProxyConfigDictionary::CreateFixedServers(
server->GetString(), bypass_list && bypass_list->is_string()
? bypass_list->GetString()

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

@ -128,7 +128,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;
@@ -1763,8 +1764,9 @@ public class ChromeTabbedActivity extend
@@ -1773,8 +1774,9 @@ public class ChromeTabbedActivity extend
Bundle savedInstanceState = getSavedInstanceState();
// We determine the model as soon as possible so every systems get initialized coherently.
@ -150,7 +150,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;
@@ -1947,6 +1948,9 @@ public abstract class ChromeActivity<C e
@@ -1959,6 +1960,9 @@ public abstract class ChromeActivity<C e
throw new IllegalStateException(
"Attempting to access TabCreator before initialization");
}
@ -185,7 +185,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
import org.chromium.chrome.browser.compositor.bottombar.ephemeraltab.EphemeralTabCoordinator;
import org.chromium.chrome.browser.contextmenu.ChromeContextMenuItem.Item;
import org.chromium.chrome.browser.contextmenu.ContextMenuCoordinator.ListItemType;
@@ -409,6 +410,10 @@ public class ChromeContextMenuPopulator
@@ -408,6 +409,10 @@ public class ChromeContextMenuPopulator
boolean hasSaveImage = false;
mShowEphemeralTabNewLabel = null;
@ -196,7 +196,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
List<Pair<Integer, ModelList>> groupedItems = new ArrayList<>();
if (mParams.isAnchor()) {
@@ -427,6 +432,7 @@ public class ChromeContextMenuPopulator
@@ -426,6 +431,7 @@ public class ChromeContextMenuPopulator
linkGroup.add(createListItem(Item.OPEN_IN_NEW_TAB_IN_GROUP));
}
}
@ -204,7 +204,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));
}
@@ -451,7 +457,7 @@ public class ChromeContextMenuPopulator
@@ -450,7 +456,7 @@ public class ChromeContextMenuPopulator
}
}
if (FirstRunStatus.getFirstRunFlowComplete()) {
@ -249,7 +249,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
@@ -50,6 +50,9 @@ import org.chromium.components.browser_u
@@ -49,6 +49,9 @@ import org.chromium.components.browser_u
import org.chromium.components.embedder_support.util.UrlConstants;
import org.chromium.device.mojom.ScreenOrientationLockType;
@ -259,7 +259,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;
@@ -727,7 +730,7 @@ public class CustomTabIntentDataProvider
@@ -726,7 +729,7 @@ public class CustomTabIntentDataProvider
@Override
public boolean isIncognito() {
@ -308,7 +308,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
@@ -48,6 +48,7 @@ import org.chromium.ui.text.SpanApplier;
@@ -47,6 +47,7 @@ import org.chromium.ui.text.SpanApplier;
*/
public class PrivacySettings
extends PreferenceFragmentCompat implements Preference.OnPreferenceChangeListener {
@ -402,7 +402,7 @@ Enable incognito custom tabs and fix crashes for incognito/custom tab intents (c
import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@@ -687,6 +690,13 @@ public class TabPersistentStore {
@@ -654,6 +657,13 @@ public class TabPersistentStore {
}
}
}
@ -462,7 +462,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
@@ -446,7 +446,7 @@ const base::Feature kCCTIncognito{"CCTIn
@@ -444,7 +444,7 @@ const base::Feature kCCTIncognito{"CCTIn
base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kCCTIncognitoAvailableToThirdParty{
@ -473,7 +473,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
@@ -913,6 +913,13 @@ Your Google account may have other forms
@@ -928,6 +928,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>

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

@ -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
@@ -208,6 +208,8 @@ import java.util.HashSet;
@@ -210,6 +210,8 @@ import java.util.HashSet;
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.
@@ -2014,6 +2016,8 @@ public class ChromeTabbedActivity extend
@@ -2034,6 +2036,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;
@@ -2378,6 +2379,11 @@ public abstract class ChromeActivity<C e
@@ -2384,6 +2385,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
@@ -3183,6 +3183,9 @@ To change this setting, <ph name="BEGIN_
@@ -3232,6 +3232,9 @@ To change this setting, <ph name="BEGIN_
<message name="IDS_MENU_REQUEST_DESKTOP_SITE_OFF" desc="Accessibility description for when Request Desktop Site is disabled.">
Turn on Request desktop site
</message>

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

@ -10,7 +10,7 @@ Subject: Add flag to disable WebGL
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2654,6 +2654,9 @@ const FeatureEntry kFeatureEntries[] = {
@@ -2783,6 +2783,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
@@ -613,6 +613,10 @@ const char kEnableAudioFocusEnforcementN
@@ -636,6 +636,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,9 +35,9 @@ 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
@@ -367,6 +367,9 @@ extern const char kDisallowDocWrittenScr
extern const char kDocumentTransitionName[];
extern const char kDocumentTransitionDescription[];
@@ -383,6 +383,9 @@ extern const char kDocumentTransitionDes
extern const char kDocumentTransitionSlowdownFactorName[];
extern const char kDocumentTransitionSlowdownFactorDescription[];
+extern const char kDisableWebGLName[];
+extern const char kDisableWebGLDescription[];

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

@ -11,7 +11,7 @@ Subject: Add option to not persist tabs across sessions
--- a/chrome/android/java/res/xml/privacy_preferences.xml
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
@@ -32,6 +32,11 @@
@@ -36,6 +36,11 @@
android:key="secure_dns"
android:title="@string/settings_secure_dns_title"
android:fragment="org.chromium.chrome.browser.privacy.secure_dns.SecureDnsSettings"/>
@ -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
@@ -1192,8 +1192,10 @@ public class ChromeTabbedActivity extend
@@ -1189,8 +1189,10 @@ public class ChromeTabbedActivity extend
boolean hadCipherData =
CipherFactory.getInstance().restoreFromBundle(getSavedInstanceState());
@ -56,15 +56,15 @@ Subject: Add option to not persist tabs across sessions
import org.chromium.chrome.R;
import org.chromium.chrome.browser.feedback.HelpAndFeedbackLauncherImpl;
import org.chromium.chrome.browser.flags.ChromeFeatureList;
@@ -52,6 +55,7 @@ public class PrivacySettings
@@ -51,6 +54,7 @@ public class PrivacySettings
private static final String PREF_USAGE_STATS = "usage_stats_reporting";
private static final String PREF_DO_NOT_TRACK = "do_not_track";
private static final String PREF_CLEAR_BROWSING_DATA = "clear_browsing_data";
+ private static final String PREF_CLOSE_TABS_ON_EXIT = "close_tabs_on_exit";
private static final String PREF_PRIVACY_SANDBOX = "privacy_sandbox";
private static final String PREF_PRIVACY_REVIEW = "privacy_review";
private ManagedPreferenceDelegate mManagedPreferenceDelegate;
@@ -137,7 +141,11 @@ public class PrivacySettings
@@ -124,7 +128,11 @@ public class PrivacySettings
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
String key = preference.getKey();
@ -77,7 +77,7 @@ Subject: Add option to not persist tabs across sessions
UserPrefs.get(Profile.getLastUsedRegularProfile())
.setBoolean(Pref.CAN_MAKE_PAYMENT_ENABLED, (boolean) newValue);
} else if (PREF_NETWORK_PREDICTIONS.equals(key)) {
@@ -206,6 +214,11 @@ public class PrivacySettings
@@ -193,6 +201,11 @@ public class PrivacySettings
privacySandboxPreference.setSummary(
PrivacySandboxSettingsFragment.getStatusString(getContext()));
}
@ -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
@@ -4043,6 +4043,12 @@ To change this setting, <ph name="BEGIN_
@@ -4092,6 +4092,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/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
@@ -664,7 +664,7 @@ const base::Feature kMediaDrmPersistentL
@@ -649,7 +649,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

@ -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
@@ -275,6 +275,7 @@
@@ -276,6 +276,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();
@@ -6554,6 +6557,61 @@ void Document::setAllowDeclarativeShadow
@@ -6550,6 +6553,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);
@@ -6609,6 +6667,10 @@ void Document::FinishedParsing() {
@@ -6605,6 +6663,10 @@ void Document::FinishedParsing() {
if (frame->GetFrameScheduler())
frame->GetFrameScheduler()->OnDomContentLoaded();
@ -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
@@ -1750,6 +1750,9 @@ class CORE_EXPORT Document : public Cont
@@ -1776,6 +1776,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
@@ -168,6 +168,11 @@ void HTMLScriptElement::setTextContent(c
@@ -169,6 +169,11 @@ void HTMLScriptElement::setTextContent(c
script_text_internal_slot_ = ParkableString(string.Impl());
}
@ -167,7 +167,7 @@ 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
@@ -56,6 +56,7 @@ class CORE_EXPORT HTMLScriptElement fina
@@ -59,6 +59,7 @@ class CORE_EXPORT HTMLScriptElement fina
void setTextContentForBinding(const V8UnionStringOrTrustedScript* value,
ExceptionState& exception_state) override;
void setTextContent(const String&) override;

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

@ -12,7 +12,7 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -3300,6 +3300,10 @@ const FeatureEntry kFeatureEntries[] = {
@@ -3453,6 +3453,10 @@ const FeatureEntry kFeatureEntries[] = {
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableHostedAppShimCreation)},
#endif // OS_MAC
#if defined(OS_ANDROID)
@ -25,7 +25,7 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
flag_descriptions::kTranslateForceTriggerOnEnglishDescription, kOsAndroid,
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -1104,6 +1104,11 @@
@@ -1142,6 +1142,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
@@ -3294,6 +3294,10 @@ const char kReadLaterDescription[] =
@@ -3370,6 +3370,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
@@ -1884,6 +1884,9 @@ extern const char kQueryTilesRankTilesDe
@@ -1933,6 +1933,9 @@ extern const char kQueryTilesSegmentatio
extern const char kQueryTilesSwapTrendingName[];
extern const char kQueryTilesSwapTrendingDescription[];

16
patches/Other/debug-fix.patch

@ -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
@@ -261,7 +261,7 @@ config("compiler") {
@@ -262,7 +262,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 = []
@@ -1836,7 +1836,7 @@ config("no_rtti") {
@@ -1876,7 +1876,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" ]
}
}
@@ -2011,8 +2011,6 @@ if (is_win) {
@@ -2051,8 +2051,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
@@ -2025,7 +2023,6 @@ if (is_win) {
@@ -2065,7 +2063,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
]
}
}
@@ -2385,7 +2382,7 @@ config("symbols") {
@@ -2443,7 +2440,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
@@ -1413,16 +1413,6 @@ bool AutocompleteMatch::IsEmptyAutocompl
@@ -1415,16 +1415,6 @@ bool AutocompleteMatch::IsEmptyAutocompl
split_autocompletion.Empty();
}
@ -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
@@ -1032,7 +1032,6 @@ void NetworkContext::QueueReport(
@@ -1129,7 +1129,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
@@ -888,7 +888,7 @@ LogMessage::~LogMessage() {
@@ -892,7 +892,7 @@ LogMessage::~LogMessage() {
#if defined(OFFICIAL_BUILD) && defined(NDEBUG)
IMMEDIATE_CRASH();
#else

8
patches/Unobtainium/kill-GCM.patch

@ -23,8 +23,8 @@ 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",
@@ -1036,10 +1035,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/searchwidget/SearchBoxDataProvider.java",
@@ -1035,10 +1034,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",
- "java/src/org/chromium/chrome/browser/services/gcm/ChromeGcmListenerServiceImpl.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" />
@@ -1027,25 +1022,6 @@ by a child template that "extends" this
@@ -1011,25 +1006,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"
@@ -1070,28 +1046,10 @@ by a child template that "extends" this
@@ -1054,28 +1030,10 @@ by a child template that "extends" this
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE"/>

2
patches/Unobtainium/kill-Location-fall-back-to-system.patch

@ -9,7 +9,7 @@ Subject: kill Location, fall back to system
--- a/services/device/geolocation/BUILD.gn
+++ b/services/device/geolocation/BUILD.gn
@@ -150,7 +150,6 @@ if (is_android) {
@@ -159,7 +159,6 @@ if (is_android) {
"android/java/src/org/chromium/device/geolocation/LocationProviderAdapter.java",
"android/java/src/org/chromium/device/geolocation/LocationProviderAndroid.java",
"android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java",

12
patches/Unobtainium/kill-Translate.patch

@ -14,22 +14,22 @@ Subject: kill Translate
import org.chromium.chrome.browser.search_engines.TemplateUrlServiceFactory;
+import org.chromium.chrome.browser.preferences.Pref;
+import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.searchwidget.SearchWidgetProvider;
import org.chromium.chrome.browser.signin.SigninFirstRunFragment;
+import org.chromium.components.prefs.PrefService;
+import org.chromium.components.user_prefs.UserPrefs;
import org.chromium.chrome.browser.signin.services.FREMobileIdentityConsistencyFieldTrial;
import org.chromium.components.browser_ui.modaldialog.AppModalPresenter;
import org.chromium.ui.base.LocalizationUtils;
import org.chromium.ui.modaldialog.ModalDialogManager;
@@ -182,6 +186,8 @@ public class FirstRunActivity extends Fi
@@ -188,6 +192,8 @@ public class FirstRunActivity extends Fi
assert areNativeAndPoliciesInitialized();
mFirstRunFlowSequencer.onNativeAndPoliciesInitialized(mFreProperties);
+ getPrefService().setBoolean(Pref.OFFER_TRANSLATE_ENABLED, false);
+
boolean notifyAdapter = false;
// An optional Data Saver page.
if (mFreProperties.getBoolean(SHOW_DATA_REDUCTION_PAGE)) {
@@ -652,4 +658,9 @@ public class FirstRunActivity extends Fi
// An optional sign-in page.
if (FREMobileIdentityConsistencyFieldTrial.isEnabled()
@@ -665,4 +671,9 @@ public class FirstRunActivity extends Fi
assert sObserver == null;
sObserver = observer;
}

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

@ -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
@@ -333,16 +333,12 @@ config("compiler") {
@@ -334,16 +334,12 @@ config("compiler") {
cflags += [ "-fstack-protector" ]
}
} else if ((is_posix && !is_chromeos_ash && !is_nacl) || is_fuchsia) {

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

@ -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
@@ -274,8 +274,6 @@ bool VariationsFieldTrialCreator::SetupF
@@ -279,8 +279,6 @@ bool VariationsFieldTrialCreator::SetupF
#endif // BUILDFLAG(FIELDTRIAL_TESTING_ENABLED)
bool used_seed = false;
if (!used_testing_config) {

2
patches/Vanadium/0031-disable-media-router-media-remoting-by-default.patch

@ -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
@@ -356,7 +356,7 @@ void Profile::RegisterProfilePrefs(user_
@@ -365,7 +365,7 @@ void Profile::RegisterProfilePrefs(user_
media_router::prefs::kMediaRouterEnableCloudServices, false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterBooleanPref(

2
patches/Vanadium/0034-disable-media-router-by-default.patch

@ -21,7 +21,7 @@ Subject: [PATCH 34/77] disable media router by default
#if !defined(OS_ANDROID)
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -433,7 +433,7 @@ void ProfileImpl::RegisterProfilePrefs(
@@ -444,7 +444,7 @@ void ProfileImpl::RegisterProfilePrefs(
#endif
registry->RegisterBooleanPref(prefs::kForceEphemeralProfiles, false);

3
patches/series

@ -1,6 +1,7 @@
src-fix/android-rlz-fix-missing-variable.patch
src-fix/fix-null-mInstanceID.patch
src-fix/fix-clang-options.patch
src-fix/fix-py3.10-collections.patch
src-fix/fix-gtest-visibility.patch
src-fix/fix-safe-browsing.patch
src-fix/fix-prefs.patch
src-fix/fix-base-feature.patch

43
patches/src-fix/fix-clang-options.patch

@ -1,43 +0,0 @@
description: prevent clang from printing unknown-warning warning. Also remove --rtlib=libgcc and -ffile-compilation-dir=. which won't be available until we have clang 13.
author: Wengling Chen <[email protected]>
---
build/config/android/BUILD.gn | 2 --
build/config/compiler/BUILD.gn | 5 ++++-
2 files changed, 4 insertions(+), 3 deletions(-)
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1234,7 +1234,7 @@ config("compiler_deterministic") {
} else {
# -ffile-compilation-dir is an alias for both -fdebug-compilation-dir=
# and -fcoverage-compilation-dir=.
- cflags += [ "-ffile-compilation-dir=." ]
+ cflags += [ "-fdebug-compilation-dir=." ]
}
if (!is_win) {
# We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
@@ -1616,6 +1616,9 @@ config("default_warnings") {
cflags += [
"-Wenum-compare-conditional",
+ # Ignore unknown warning warnings from clang
+ "-Wno-unknown-warning-option",
+
# An ABI compat warning we don't care about, https://crbug.com/1102157
# TODO(thakis): Push this to the (few) targets that need it,
# instead of having a global flag.
--- a/build/config/android/BUILD.gn
+++ b/build/config/android/BUILD.gn
@@ -52,11 +52,9 @@ config("compiler") {
]
# TODO(crbug.com/1184398): Move to compiler-rt when we are ready.
- ldflags += [ "--rtlib=libgcc" ]
if (current_cpu == "arm64") {
# For outline atomics on AArch64 (can't pass this unconditionally
# due to unused flag warning on other targets).
- cflags += [ "--rtlib=libgcc" ]
if (arm_control_flow_integrity == "standard") {
cflags += [ "-mbranch-protection=standard" ]
}

19
patches/src-fix/fix-gtest-visibility.patch

@ -0,0 +1,19 @@
description: change visibility of third_party/googletest
author: Wengling Chen <[email protected]>
---
---
third_party/googletest/BUILD.gn | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/third_party/googletest/BUILD.gn
+++ b/third_party/googletest/BUILD.gn
@@ -5,7 +5,7 @@
import("//build_overrides/build.gni")
config("gtest_config") {
- visibility = [ ":*" ] # gmock also shares this config.
+ visibility = [ "*" ] # gmock also shares this config.
defines = [
# Chromium always links googletest statically, so no API qualifier is

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

@ -32,7 +32,7 @@ Subject: fix build error with prefs.h
}
--- a/chrome/android/java/src/org/chromium/chrome/browser/signin/SyncConsentFragmentBase.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/SyncConsentFragmentBase.java
@@ -457,8 +457,7 @@ public abstract class SyncConsentFragmen
@@ -467,8 +467,7 @@ public abstract class SyncConsentFragmen
mConfirmSyncDataStateMachine = new ConfirmSyncDataStateMachine(
new ConfirmSyncDataStateMachineDelegate(
requireContext(), getChildFragmentManager(), mModalDialogManager),

19
patches/src-fix/fix-py3.10-collections.patch

@ -0,0 +1,19 @@
description: Mappings is moved to collections.abc in python 3.10. Only needed on Fedora 35.
author: Wengling Chen <[email protected]>
---
---
third_party/jinja2/tests.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/third_party/jinja2/tests.py
+++ b/third_party/jinja2/tests.py
@@ -10,7 +10,7 @@
"""
import operator
import re
-from collections import Mapping
+from collections.abc import Mapping
from jinja2.runtime import Undefined
from jinja2._compat import text_type, string_types, integer_types
import decimal

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

@ -11,7 +11,7 @@ Subject: Fix build error caused by the removal of safe_browsing
chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java | 8
chrome/android/java/src/org/chromium/chrome/browser/safe_browsing/SafeBrowsingSettingsLauncher.java | 7
chrome/android/java/src/org/chromium/chrome/browser/sync/settings/GoogleServicesSettings.java | 7
chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SignInPreference.java | 6
chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SignInPreference.java | 4
chrome/browser/android/tab_web_contents_delegate_android.cc | 5
chrome/browser/password_manager/chrome_password_manager_client.cc | 2
chrome/browser/preferences/BUILD.gn | 1
@ -21,28 +21,32 @@ Subject: Fix build error caused by the removal of safe_browsing
chrome/browser/safe_browsing/android/java/src/org/chromium/chrome/browser/safe_browsing/settings/RadioButtonGroupSafeBrowsingPreference.java | 28 -
chrome/browser/safe_browsing/android/java/src/org/chromium/chrome/browser/safe_browsing/settings/SafeBrowsingSettingsFragment.java | 168 -------
chrome/browser/safe_browsing/android/java/src/org/chromium/chrome/browser/safe_browsing/settings/StandardProtectionSettingsFragment.java | 8
chrome/browser/safe_browsing/download_protection/ppapi_download_request.cc | 6
components/safe_browsing/content/browser/client_side_detection_host.cc | 17
components/safe_browsing/content/browser/client_side_detection_host.h | 3
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
weblayer/browser/browser_context_impl.cc | 2
weblayer/browser/browser_process.cc | 11
weblayer/browser/browser_process.h | 4
weblayer/browser/browsing_data_remover_delegate.cc | 2
weblayer/browser/content_browser_client_impl.cc | 39 -
weblayer/browser/profile_impl.cc | 16
weblayer/browser/safe_browsing/client_side_detection_service_delegate.cc | 12
weblayer/browser/profile_impl.cc | 11
weblayer/browser/safe_browsing/client_side_detection_service_factory.cc | 4
weblayer/browser/safe_browsing/real_time_url_lookup_service_factory.cc | 7
weblayer/browser/safe_browsing/safe_browsing_navigation_observer_manager_factory.cc | 3
weblayer/browser/safe_browsing/safe_browsing_service.cc | 213 ----------
weblayer/browser/safe_browsing/safe_browsing_tab_observer.cc | 11
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/tab_impl.cc | 2
35 files changed, 57 insertions(+), 623 deletions(-)
weblayer/browser/safe_browsing/weblayer_safe_browsing_tab_observer_delegate.cc | 12
weblayer/browser/tab_impl.cc | 16
39 files changed, 60 insertions(+), 643 deletions(-)
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -377,7 +377,6 @@ android_library("chrome_java") {
@@ -381,7 +381,6 @@ android_library("chrome_java") {
"//chrome/browser/privacy:java",
"//chrome/browser/privacy_sandbox/android:java",
"//chrome/browser/profiles/android:java",
@ -104,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"
@@ -283,7 +282,6 @@ void BrowserContextImpl::RegisterPrefs(
@@ -288,7 +287,6 @@ void BrowserContextImpl::RegisterPrefs(
StatefulSSLHostStateDelegate::RegisterProfilePrefs(pref_registry);
HostContentSettingsMap::RegisterProfilePrefs(pref_registry);
@ -158,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
@@ -351,7 +351,6 @@ static_library("safe_browsing") {
@@ -363,7 +363,6 @@ static_library("safe_browsing") {
]
}
deps += [
@ -192,7 +196,7 @@ Subject: Fix build error caused by the removal of safe_browsing
void TabWebContentsDelegateAndroid::RunFileChooser(
--- a/weblayer/browser/content_browser_client_impl.cc
+++ b/weblayer/browser/content_browser_client_impl.cc
@@ -514,33 +514,6 @@ ContentBrowserClientImpl::CreateURLLoade
@@ -518,33 +518,6 @@ ContentBrowserClientImpl::CreateURLLoade
int frame_tree_node_id) {
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> result;
@ -226,7 +230,7 @@ Subject: Fix build error caused by the removal of safe_browsing
auto signin_throttle =
SigninURLLoaderThrottle::Create(browser_context, wc_getter);
if (signin_throttle)
@@ -852,13 +825,6 @@ ContentBrowserClientImpl::CreateThrottle
@@ -849,13 +822,6 @@ ContentBrowserClientImpl::CreateThrottle
#if defined(OS_ANDROID)
if (handle->IsInMainFrame()) {
@ -240,7 +244,7 @@ Subject: Fix build error caused by the removal of safe_browsing
std::unique_ptr<content::NavigationThrottle> intercept_navigation_throttle =
navigation_interception::InterceptNavigationDelegate::
MaybeCreateThrottleFor(
@@ -951,11 +917,6 @@ void ContentBrowserClientImpl::ExposeInt
@@ -948,11 +914,6 @@ void ContentBrowserClientImpl::ExposeInt
};
registry->AddInterface(base::BindRepeating(create_spellcheck_host),
content::GetUIThreadTaskRunner({}));
@ -519,19 +523,16 @@ 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,11 +639,6 @@ void ProfileImpl::SetBooleanSetting(Sett
@@ -640,7 +639,7 @@ void ProfileImpl::SetBooleanSetting(Sett
auto* pref_service = GetBrowserContext()->pref_service();
switch (type) {
case SettingType::BASIC_SAFE_BROWSING_ENABLED:
-#if defined(OS_ANDROID)
- safe_browsing::SetSafeBrowsingState(
- pref_service, value ? safe_browsing::STANDARD_PROTECTION
- : safe_browsing::NO_SAFE_BROWSING);
-#endif
break;
case SettingType::UKM_ENABLED: {
#if defined(OS_ANDROID)
@@ -659,10 +653,6 @@ void ProfileImpl::SetBooleanSetting(Sett
+#if 0
safe_browsing::SetSafeBrowsingState(
pref_service,
value ? safe_browsing::SafeBrowsingState::STANDARD_PROTECTION
@@ -660,10 +659,6 @@ void ProfileImpl::SetBooleanSetting(Sett
break;
}
case SettingType::EXTENDED_REPORTING_SAFE_BROWSING_ENABLED:
@ -542,24 +543,24 @@ Subject: Fix build error caused by the removal of safe_browsing
break;
case SettingType::REAL_TIME_SAFE_BROWSING_ENABLED:
#if defined(OS_ANDROID)
@@ -681,16 +671,12 @@ bool ProfileImpl::GetBooleanSetting(Sett
@@ -681,7 +676,7 @@ bool ProfileImpl::GetBooleanSetting(Sett
auto* pref_service = GetBrowserContext()->pref_service();
switch (type) {
case SettingType::BASIC_SAFE_BROWSING_ENABLED:
#if defined(OS_ANDROID)
- return safe_browsing::IsSafeBrowsingEnabled(*pref_service);
+ return false;
#endif
-#if defined(OS_ANDROID)
+#if 0
return safe_browsing::IsSafeBrowsingEnabled(*pref_service);
#else
return false;
@@ -689,7 +684,7 @@ bool ProfileImpl::GetBooleanSetting(Sett
case SettingType::UKM_ENABLED:
return pref_service->GetBoolean(prefs::kUkmEnabled);
case SettingType::EXTENDED_REPORTING_SAFE_BROWSING_ENABLED:
-#if defined(OS_ANDROID)
- return pref_service->GetBoolean(
- ::prefs::kSafeBrowsingScoutReportingEnabled);
-#endif
return false;
case SettingType::REAL_TIME_SAFE_BROWSING_ENABLED:
#if defined(OS_ANDROID)
+#if 0
return pref_service->GetBoolean(
::prefs::kSafeBrowsingScoutReportingEnabled);
#else
--- a/weblayer/browser/browser_process.cc
+++ b/weblayer/browser/browser_process.cc
@@ -122,20 +122,9 @@ void BrowserProcess::CreateSubresourceFi
@ -809,16 +810,18 @@ Subject: Fix build error caused by the removal of safe_browsing
static boolean isPromoDismissedInSharedPreference() {
--- a/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SignInPreference.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SignInPreference.java
@@ -123,11 +123,7 @@ public class SignInPreference
@@ -111,14 +111,10 @@ public class SignInPreference
.getSigninManager(Profile.getLastUsedRegularProfile())
.isSigninDisabledByPolicy()) {
// TODO(https://crbug.com/1133739): Clean up after revising isSigninDisabledByPolicy.
- if (mPrefService.isManagedPreference(Pref.SIGNIN_ALLOWED)) {
- setupSigninDisabledByPolicy();
- } else {
- setupSigninDisallowed();
setupSigninDisallowed();
assert !mIsShowingSigninPromo
: "Signin Promo should not be shown when signin is not allowed";
setVisible(false);
- }
+ setupSigninDisallowed();
return;
}
@ -846,7 +849,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
@@ -24,8 +24,6 @@ import org.chromium.chrome.browser.priva
@@ -23,8 +23,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;
@ -855,7 +858,7 @@ 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;
@@ -85,11 +83,7 @@ public class PrivacySettings
@@ -84,11 +82,7 @@ public class PrivacySettings
}
Preference safeBrowsingPreference = findPreference(PREF_SAFE_BROWSING);
@ -867,7 +870,7 @@ Subject: Fix build error caused by the removal of safe_browsing
return false;
});
@@ -199,8 +193,6 @@ public class PrivacySettings
@@ -198,8 +192,6 @@ public class PrivacySettings
Preference safeBrowsingPreference = findPreference(PREF_SAFE_BROWSING);
if (safeBrowsingPreference != null && safeBrowsingPreference.isVisible()) {
@ -1144,7 +1147,7 @@ Subject: Fix build error caused by the removal of safe_browsing
}
--- a/chrome/browser/password_manager/chrome_password_manager_client.cc
+++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
@@ -460,7 +460,9 @@ void ChromePasswordManagerClient::ShowTo
@@ -463,7 +463,9 @@ void ChromePasswordManagerClient::ShowTo
#if defined(OS_ANDROID)
void ChromePasswordManagerClient::OnPasswordSelected(
const std::u16string& text) {
@ -1161,10 +1164,10 @@ Subject: Fix build error caused by the removal of safe_browsing
if (remove_mask & content::BrowsingDataRemover::DATA_TYPE_COOKIES) {
network::mojom::NetworkContext* safe_browsing_context = nullptr;
-#if defined(OS_ANDROID)
+#if !defined(OS_ANDROID)
auto* sb_service = BrowserProcess::GetInstance()->GetSafeBrowsingService();
if (sb_service)
safe_browsing_context = sb_service->GetNetworkContext();
+#if 0
safe_browsing_context = BrowserProcess::GetInstance()
->GetSafeBrowsingService()
->GetNetworkContext();
--- a/components/safe_browsing/content/browser/client_side_detection_service.cc
+++ b/components/safe_browsing/content/browser/client_side_detection_service.cc
@@ -83,18 +83,7 @@ ClientSideDetectionService::ClientSideDe
@ -1214,8 +1217,8 @@ Subject: Fix build error caused by the removal of safe_browsing
@@ -409,7 +394,6 @@ void ClientSideDetectionService::AddPhis
base::ListValue time_list;
for (const base::Time& timestamp : phishing_report_times_)
time_list.Append(base::Value(timestamp.ToDoubleT()));
for (const base::Time& report_time : phishing_report_times_)
time_list.Append(base::Value(report_time.ToDoubleT()));
- delegate_->GetPrefs()->Set(prefs::kSafeBrowsingCsdPingTimestamps, time_list);
}
@ -1236,7 +1239,7 @@ Subject: Fix build error caused by the removal of safe_browsing
// static
--- a/components/safe_browsing/content/browser/client_side_detection_host.h
+++ b/components/safe_browsing/content/browser/client_side_detection_host.h
@@ -19,13 +19,14 @@
@@ -20,12 +20,13 @@
#include "components/safe_browsing/content/common/safe_browsing.mojom.h"
#include "components/safe_browsing/core/browser/db/database_manager.h"
#include "components/safe_browsing/core/browser/safe_browsing_token_fetcher.h"
@ -1244,7 +1247,6 @@ Subject: Fix build error caused by the removal of safe_browsing
#include "content/public/browser/web_contents_observer.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "services/service_manager/public/cpp/binder_registry.h"
#include "url/gurl.h"
+class PrefService;
@ -1292,71 +1294,54 @@ Subject: Fix build error caused by the removal of safe_browsing
!account_signed_in_callback_.is_null() &&
account_signed_in_callback_.Run();
}
--- a/weblayer/browser/safe_browsing/safe_browsing_tab_observer.cc
+++ b/weblayer/browser/safe_browsing/safe_browsing_tab_observer.cc
@@ -45,16 +45,11 @@ SafeBrowsingTabObserver::SafeBrowsingTab
PrefService* prefs = browser_context->pref_service();
--- a/components/safe_browsing/content/browser/safe_browsing_tab_observer.cc
+++ b/components/safe_browsing/content/browser/safe_browsing_tab_observer.cc
@@ -34,15 +34,10 @@ SafeBrowsingTabObserver::SafeBrowsingTab
PrefService* prefs = delegate_->GetPrefs(browser_context);
if (prefs) {
pref_change_registrar_.Init(prefs);
- pref_change_registrar_.Add(
- ::prefs::kSafeBrowsingEnabled,
- prefs::kSafeBrowsingEnabled,
- base::BindRepeating(
- &SafeBrowsingTabObserver::UpdateSafebrowsingDetectionHost,
- base::Unretained(this)));
safe_browsing::ClientSideDetectionService* csd_service =
ClientSideDetectionServiceFactory::GetForBrowserContext(
browser_context);
- if (safe_browsing::IsSafeBrowsingEnabled(*prefs) &&
ClientSideDetectionService* csd_service =
delegate_->GetClientSideDetectionServiceIfExists(browser_context);
- if (IsSafeBrowsingEnabled(*prefs) &&
+ if (false &&
BrowserProcess::GetInstance()->GetSafeBrowsingService() &&
csd_service) {
delegate_->DoesSafeBrowsingServiceExist() && csd_service) {
safebrowsing_detection_host_ =
@@ -72,7 +67,7 @@ void SafeBrowsingTabObserver::UpdateSafe
static_cast<BrowserContextImpl*>(web_contents_->GetBrowserContext());
PrefService* prefs = browser_context->pref_service();
- bool safe_browsing = safe_browsing::IsSafeBrowsingEnabled(*prefs);
delegate_->CreateClientSideDetectionHost(web_contents);
@@ -62,7 +57,7 @@ void SafeBrowsingTabObserver::UpdateSafe
#if BUILDFLAG(SAFE_BROWSING_AVAILABLE)
auto* browser_context = web_contents_->GetBrowserContext();
PrefService* prefs = delegate_->GetPrefs(browser_context);
- bool safe_browsing = IsSafeBrowsingEnabled(*prefs);
+ bool safe_browsing = false;
safe_browsing::ClientSideDetectionService* csd_service =
ClientSideDetectionServiceFactory::GetForBrowserContext(browser_context);
ClientSideDetectionService* csd_service =
delegate_->GetClientSideDetectionServiceIfExists(browser_context);
if (safe_browsing && csd_service) {
@@ -89,4 +84,4 @@ void SafeBrowsingTabObserver::UpdateSafe
WEB_CONTENTS_USER_DATA_KEY_IMPL(SafeBrowsingTabObserver)
-} // namespace weblayer
\ No newline at end of file
+} // namespace weblayer
--- a/weblayer/browser/safe_browsing/client_side_detection_service_delegate.cc
+++ b/weblayer/browser/safe_browsing/client_side_detection_service_delegate.cc
@@ -37,22 +37,12 @@ scoped_refptr<network::SharedURLLoaderFa
ClientSideDetectionServiceDelegate::GetSafeBrowsingURLLoaderFactory() {
SafeBrowsingService* sb_service =
BrowserProcess::GetInstance()->GetSafeBrowsingService();
- return sb_service ? sb_service->GetURLLoaderFactory() : nullptr;
+ return nullptr;
}
--- a/components/safe_browsing/content/browser/user_population.cc
+++ b/components/safe_browsing/content/browser/user_population.cc
@@ -26,14 +26,6 @@ ChromeUserPopulation GetUserPopulation(
ChromeUserPopulation population;
safe_browsing::ChromeUserPopulation
ClientSideDetectionServiceDelegate::GetUserPopulation() {
safe_browsing::ChromeUserPopulation population;
- if (safe_browsing::IsEnhancedProtectionEnabled(*GetPrefs())) {
- population.set_user_population(
- safe_browsing::ChromeUserPopulation::ENHANCED_PROTECTION);
- } else if (safe_browsing::IsExtendedReportingEnabled(*GetPrefs())) {
- population.set_user_population(
- safe_browsing::ChromeUserPopulation::EXTENDED_REPORTING);
- } else if (safe_browsing::IsSafeBrowsingEnabled(*GetPrefs())) {
- population.set_user_population(
- safe_browsing::ChromeUserPopulation::SAFE_BROWSING);
- }
population.set_profile_management_status(
safe_browsing::ChromeUserPopulation::UNAVAILABLE);
if (prefs) {
- if (IsEnhancedProtectionEnabled(*prefs)) {
- population.set_user_population(ChromeUserPopulation::ENHANCED_PROTECTION);
- } else if (IsExtendedReportingEnabled(*prefs)) {
- population.set_user_population(ChromeUserPopulation::EXTENDED_REPORTING);
- } else if (IsSafeBrowsingEnabled(*prefs)) {
- population.set_user_population(ChromeUserPopulation::SAFE_BROWSING);
- }
-
population.set_is_mbb_enabled(prefs->GetBoolean(
unified_consent::prefs::kUrlKeyedAnonymizedDataCollectionEnabled));
}
--- a/weblayer/browser/tab_impl.cc
+++ b/weblayer/browser/tab_impl.cc
@@ -264,7 +264,7 @@ class WebContentsTracker : public conten
@@ -267,7 +267,7 @@ class WebContentsTracker : public conten
// available. Otherwise returns nullptr.
const scoped_refptr<safe_browsing::SafeBrowsingDatabaseManager>
GetDatabaseManagerFromSafeBrowsingService() {
@ -1364,23 +1349,30 @@ Subject: Fix build error caused by the removal of safe_browsing
+#if 0
SafeBrowsingService* safe_browsing_service =
BrowserProcess::GetInstance()->GetSafeBrowsingService();
return safe_browsing_service
--- a/weblayer/browser/safe_browsing/real_time_url_lookup_service_factory.cc
+++ b/weblayer/browser/safe_browsing/real_time_url_lookup_service_factory.cc
@@ -59,12 +59,7 @@ KeyedService* RealTimeUrlLookupServiceFa
PrefService* pref_service =
static_cast<BrowserContextImpl*>(context)->pref_service();
user_population.set_user_population(
- safe_browsing::IsEnhancedProtectionEnabled(*pref_service)
- ? safe_browsing::ChromeUserPopulation::ENHANCED_PROTECTION
- : safe_browsing::IsExtendedReportingEnabled(*pref_service)
- ? safe_browsing::ChromeUserPopulation::
- EXTENDED_REPORTING
- : safe_browsing::ChromeUserPopulation::SAFE_BROWSING);
+ safe_browsing::ChromeUserPopulation::SAFE_BROWSING);
user_population.set_profile_management_status(
safe_browsing::GetProfileManagementStatus(nullptr));
return scoped_refptr<safe_browsing::SafeBrowsingDatabaseManager>(
@@ -402,22 +402,8 @@ TabImpl::TabImpl(ProfileImpl* profile,
TrustedCDNObserver::CreateForWebContents(web_contents_.get());
- if (base::FeatureList::IsEnabled(
- features::kWebLayerClientSidePhishingDetection)) {
- safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(
- web_contents_.get(),
- std::make_unique<WebLayerSafeBrowsingTabObserverDelegate>());
- }
-
auto* browser_context =
static_cast<BrowserContextImpl*>(web_contents_->GetBrowserContext());
- safe_browsing::SafeBrowsingNavigationObserver::MaybeCreateForWebContents(
- web_contents_.get(),
- HostContentSettingsMapFactory::GetForBrowserContext(browser_context),
- SafeBrowsingNavigationObserverManagerFactory::GetForBrowserContext(
- browser_context),
- browser_context->pref_service(),
- BrowserProcess::GetInstance()->GetSafeBrowsingService());
#endif
#if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION)
--- a/weblayer/browser/safe_browsing/client_side_detection_service_factory.cc
+++ b/weblayer/browser/safe_browsing/client_side_detection_service_factory.cc
@@ -45,9 +45,7 @@ ClientSideDetectionServiceFactory::~Clie
@ -1388,7 +1380,7 @@ Subject: Fix build error caused by the removal of safe_browsing
KeyedService* ClientSideDetectionServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
- return new safe_browsing::ClientSideDetectionService(
- std::make_unique<ClientSideDetectionServiceDelegate>(
- std::make_unique<WebLayerClientSideDetectionServiceDelegate>(
- static_cast<BrowserContextImpl*>(context)));
+ return nullptr;
}
@ -1404,3 +1396,83 @@ Subject: Fix build error caused by the removal of safe_browsing
namespace safe_browsing {
const size_t kAdSamplerTriggerDefaultQuota = 10;
--- a/chrome/browser/safe_browsing/download_protection/ppapi_download_request.cc
+++ b/chrome/browser/safe_browsing/download_protection/ppapi_download_request.cc
@@ -179,12 +179,6 @@ void PPAPIDownloadRequest::SendRequest()
DCHECK_CURRENTLY_ON(BrowserThread::UI);
ClientDownloadRequest request;
- auto population = is_enhanced_protection_
- ? ChromeUserPopulation::ENHANCED_PROTECTION
- : is_extended_reporting_
- ? ChromeUserPopulation::EXTENDED_REPORTING
- : ChromeUserPopulation::SAFE_BROWSING;
- request.mutable_population()->set_user_population(population);
request.mutable_population()->set_profile_management_status(
GetProfileManagementStatus(
g_browser_process->browser_policy_connector()));
--- a/weblayer/browser/safe_browsing/weblayer_client_side_detection_service_delegate.cc
+++ b/weblayer/browser/safe_browsing/weblayer_client_side_detection_service_delegate.cc
@@ -37,9 +37,7 @@ WebLayerClientSideDetectionServiceDelega
scoped_refptr<network::SharedURLLoaderFactory>
WebLayerClientSideDetectionServiceDelegate::GetSafeBrowsingURLLoaderFactory() {
- SafeBrowsingService* sb_service =
- BrowserProcess::GetInstance()->GetSafeBrowsingService();
- return sb_service->GetURLLoaderFactory();
+ return nullptr;
}
safe_browsing::ChromeUserPopulation
--- a/weblayer/browser/safe_browsing/safe_browsing_navigation_observer_manager_factory.cc
+++ b/weblayer/browser/safe_browsing/safe_browsing_navigation_observer_manager_factory.cc
@@ -37,8 +37,7 @@ KeyedService*
SafeBrowsingNavigationObserverManagerFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
BrowserContextImpl* context_impl = static_cast<BrowserContextImpl*>(context);
- return new safe_browsing::SafeBrowsingNavigationObserverManager(
- context_impl->pref_service());
+ return nullptr;
}
content::BrowserContext*
--- a/weblayer/browser/safe_browsing/weblayer_client_side_detection_host_delegate.cc
+++ b/weblayer/browser/safe_browsing/weblayer_client_side_detection_host_delegate.cc
@@ -37,14 +37,14 @@ scoped_refptr<safe_browsing::SafeBrowsin
WebLayerClientSideDetectionHostDelegate::GetSafeBrowsingDBManager() {
SafeBrowsingService* sb_service =
BrowserProcess::GetInstance()->GetSafeBrowsingService();
- return sb_service->GetSafeBrowsingDBManager();
+ return nullptr;
}
scoped_refptr<safe_browsing::BaseUIManager>
WebLayerClientSideDetectionHostDelegate::GetSafeBrowsingUIManager() {
SafeBrowsingService* sb_service =
BrowserProcess::GetInstance()->GetSafeBrowsingService();
- return sb_service->GetSafeBrowsingUIManager();
+ return nullptr;
}
safe_browsing::ClientSideDetectionService*
--- a/weblayer/browser/safe_browsing/weblayer_safe_browsing_tab_observer_delegate.cc
+++ b/weblayer/browser/safe_browsing/weblayer_safe_browsing_tab_observer_delegate.cc
@@ -24,17 +24,7 @@ std::unique_ptr<safe_browsing::ClientSid
CreateClientSideDetectionHost(content::WebContents* web_contents,
PrefService* prefs,
BrowserContextImpl* browser_context) {
- return safe_browsing::ClientSideDetectionHost::Create(
- web_contents,
- std::make_unique<WebLayerClientSideDetectionHostDelegate>(web_contents),
- prefs,
- std::make_unique<SafeBrowsingTokenFetcherImpl>(base::BindRepeating(
- &ProfileImpl::access_token_fetch_delegate,
- base::Unretained(ProfileImpl::FromBrowserContext(browser_context)))),
- static_cast<BrowserContextImpl*>(browser_context)->IsOffTheRecord(),
- /* account_signed_in_callback= */ base::BindRepeating([]() {
- return true;
- }));
+ return nullptr;
}
} // namespace

6
patches/ungoogled-chromium-android/Add-always-desktop-option.patch

@ -24,7 +24,7 @@ author: Wengling Chen <[email protected]>
android:title="@string/accessibility_captions_title"/>
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -1212,6 +1212,12 @@ Your Google account may have other forms
@@ -1235,6 +1235,12 @@ Your Google account may have other forms
<message name="IDS_ACCESSIBILITY_PAGE_ZOOM_FACTOR" desc="Text description of the current page zoom factor set by the user" translateable="false">
<ph name="ZOOM_FACTOR">%1$d<ex>100</ex></ph> %%
</message>
@ -39,7 +39,7 @@ author: Wengling Chen <[email protected]>
<message name="IDS_LANGUAGE_SETTINGS" desc="Title for the Languages settings screen that allows users to manage their languages preferences. [CHAR_LIMIT=32]">
--- 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
@@ -533,6 +533,8 @@ public final class ChromePreferenceKeys
@@ -540,6 +540,8 @@ public final class ChromePreferenceKeys
public static final String FONT_USER_FONT_SCALE_FACTOR = "user_font_scale_factor";
public static final String FONT_USER_SET_FORCE_ENABLE_ZOOM = "user_set_force_enable_zoom";
@ -48,7 +48,7 @@ author: Wengling Chen <[email protected]>
public static final String HISTORY_SHOW_HISTORY_INFO = "history_home_show_info";
/** Keys used to save settings related to homepage. */
@@ -1077,6 +1079,7 @@ public final class ChromePreferenceKeys
@@ -1095,6 +1097,7 @@ public final class ChromePreferenceKeys
FLAGS_CACHED_SAFE_VALUES_VERSION,
FLAGS_CRASH_STREAK_BEFORE_CACHE,
FLAGS_FIELD_TRIAL_PARAM_CACHED.pattern(),

12
patches/ungoogled-chromium-android/Add-folder-button-bookmark.patch

@ -14,7 +14,7 @@ Subject: Add new folder button to bookmark activity
+++ b/chrome/android/java/res/menu/bookmark_action_bar_menu.xml
@@ -15,6 +15,13 @@
app:showAsAction="ifRoom"
app:iconTint="@color/default_icon_color_tint_list" />
app:iconTint="@color/default_icon_color_secondary_tint_list" />
<item
+ android:id="@+id/add_folder_menu_id"
+ android:icon="@drawable/ic_add_outline_white_24dp"
@ -28,7 +28,7 @@ Subject: Add new folder button to bookmark activity
android:title="@string/search"
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkActionBar.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkActionBar.java
@@ -80,6 +80,9 @@ public class BookmarkActionBar extends S
@@ -81,6 +81,9 @@ public class BookmarkActionBar extends S
} else if (menuItem.getItemId() == R.id.close_menu_id) {
BookmarkUtils.finishActivityOnPhone(getContext());
return true;
@ -38,7 +38,7 @@ Subject: Add new folder button to bookmark activity
} else if (menuItem.getItemId() == R.id.search_menu_id) {
mDelegate.openSearchUI();
return true;
@@ -136,6 +139,7 @@ public class BookmarkActionBar extends S
@@ -137,6 +140,7 @@ public class BookmarkActionBar extends S
setNavigationButton(NAVIGATION_BUTTON_NONE);
getMenu().findItem(R.id.search_menu_id).setVisible(false);
getMenu().findItem(R.id.edit_menu_id).setVisible(false);
@ -46,7 +46,7 @@ Subject: Add new folder button to bookmark activity
}
@Override
@@ -145,6 +149,7 @@ public class BookmarkActionBar extends S
@@ -146,6 +150,7 @@ public class BookmarkActionBar extends S
if (mDelegate == null) {
getMenu().findItem(R.id.search_menu_id).setVisible(false);
getMenu().findItem(R.id.edit_menu_id).setVisible(false);
@ -54,7 +54,7 @@ Subject: Add new folder button to bookmark activity
}
}
@@ -174,6 +179,7 @@ public class BookmarkActionBar extends S
@@ -175,6 +180,7 @@ public class BookmarkActionBar extends S
mCurrentFolder = mDelegate.getModel().getBookmarkById(folder);
getMenu().findItem(R.id.search_menu_id).setVisible(true);
@ -178,7 +178,7 @@ Subject: Add new folder button to bookmark activity
if (!mIsCreatingFolder) {
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -3250,6 +3250,9 @@ To change this setting, <ph name="BEGIN_
@@ -3299,6 +3299,9 @@ To change this setting, <ph name="BEGIN_
<message name="IDS_BOOKMARK_ACTION_BAR_EDIT_FOLDER" desc="Button text for editing current folder action on the bookmark action bar [CHAR_LIMIT=32]">
Edit folder
</message>

12
patches/ungoogled-chromium-android/Add-force-tablet-ui-option.patch

@ -27,7 +27,7 @@ author: Wengling Chen <[email protected]>
android:title="@string/accessibility_captions_title"/>
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -1218,6 +1218,12 @@ Your Google account may have other forms
@@ -1241,6 +1241,12 @@ Your Google account may have other forms
<message name="IDS_FORCE_DESKTOP_MODE_TITLE" desc="Title of the preference that allows the user to update force desktop mode settings.">
Force Desktop Mode
</message>
@ -75,7 +75,7 @@ author: Wengling Chen <[email protected]>
}
--- 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
@@ -534,6 +534,7 @@ public final class ChromePreferenceKeys
@@ -541,6 +541,7 @@ public final class ChromePreferenceKeys
public static final String FONT_USER_SET_FORCE_ENABLE_ZOOM = "user_set_force_enable_zoom";
public static final String FLAGS_FORCE_DESKTOP_MODE_ENABLED = "Chrome.UngoogledChromium.ForceDesktopMode";
@ -83,7 +83,7 @@ author: Wengling Chen <[email protected]>
public static final String HISTORY_SHOW_HISTORY_INFO = "history_home_show_info";
@@ -1080,6 +1081,7 @@ public final class ChromePreferenceKeys
@@ -1098,6 +1099,7 @@ public final class ChromePreferenceKeys
FLAGS_CRASH_STREAK_BEFORE_CACHE,
FLAGS_FIELD_TRIAL_PARAM_CACHED.pattern(),
FLAGS_FORCE_DESKTOP_MODE_ENABLED,
@ -114,7 +114,7 @@ author: Wengling Chen <[email protected]>
--- a/ui/android/BUILD.gn
+++ b/ui/android/BUILD.gn
@@ -370,6 +370,7 @@ android_library("ui_no_recycler_view_jav
@@ -369,6 +369,7 @@ android_library("ui_no_recycler_view_jav
":ui_java_resources",
":ui_utils_java",
"//base:base_java",
@ -124,7 +124,7 @@ author: Wengling Chen <[email protected]>
"//third_party/androidx:androidx_appcompat_appcompat_java