Browse Source

Update to Chromium 95.0.4638.49

Blaise 2 years ago
parent
commit
f0c38d1f29
55 changed files with 1216 additions and 708 deletions
  1. 1 1
      chromium_version.txt
  2. 120 240
      domain_substitution.list
  3. 4 4
      patches/core/bromite/disable-fetching-field-trials.patch
  4. 0 22
      patches/core/chromium-upstream/missing-header-without-tflite.patch
  5. 5 5
      patches/core/debian/disable/unrar.patch
  6. 33 31
      patches/core/inox-patchset/0001-fix-building-without-safebrowsing.patch
  7. 4 4
      patches/core/inox-patchset/0005-disable-default-extensions.patch
  8. 1 1
      patches/core/inox-patchset/0009-disable-google-ipv6-probes.patch
  9. 1 1
      patches/core/inox-patchset/0015-disable-update-pings.patch
  10. 1 1
      patches/core/inox-patchset/0021-disable-rlz.patch
  11. 24 14
      patches/core/iridium-browser/all-add-trk-prefixes-to-possibly-evil-connections.patch
  12. 1 1
      patches/core/iridium-browser/safe_browsing-disable-incident-reporting.patch
  13. 1 1
      patches/core/ungoogled-chromium/block-requests.patch
  14. 8 8
      patches/core/ungoogled-chromium/block-trk-and-subdomains.patch
  15. 1 1
      patches/core/ungoogled-chromium/disable-crash-reporter.patch
  16. 22 7
      patches/core/ungoogled-chromium/disable-floc.patch
  17. 2 2
      patches/core/ungoogled-chromium/disable-mei-preload.patch
  18. 44 13
      patches/core/ungoogled-chromium/disable-privacy-sandbox.patch
  19. 2 2
      patches/core/ungoogled-chromium/disable-webstore-urls.patch
  20. 1 1
      patches/core/ungoogled-chromium/fix-building-with-prunned-binaries.patch
  21. 52 15
      patches/core/ungoogled-chromium/fix-building-without-enabling-reporting.patch
  22. 128 86
      patches/core/ungoogled-chromium/fix-building-without-safebrowsing.patch
  23. 171 129
      patches/core/ungoogled-chromium/remove-unused-preferences-fields.patch
  24. 3 3
      patches/core/ungoogled-chromium/toggle-translation-via-switch.patch
  25. 22 22
      patches/extra/bromite/fingerprinting-flags-client-rects-and-measuretext.patch
  26. 7 7
      patches/extra/bromite/flag-fingerprinting-canvas-image-data-noise.patch
  27. 6 6
      patches/extra/bromite/flag-max-connections-per-host.patch
  28. 1 1
      patches/extra/debian/disable/google-api-warning.patch
  29. 1 1
      patches/extra/debian/disable/welcome-page.patch
  30. 16 11
      patches/extra/inox-patchset/0006-modify-default-prefs.patch
  31. 1 1
      patches/extra/inox-patchset/0018-disable-first-run-behaviour.patch
  32. 1 1
      patches/extra/iridium-browser/browser-disable-profile-auto-import-on-first-run.patch
  33. 1 1
      patches/extra/iridium-browser/updater-disable-auto-update.patch
  34. 8 8
      patches/extra/ungoogled-chromium/add-flag-for-close-confirmation.patch
  35. 1 1
      patches/extra/ungoogled-chromium/add-flag-for-omnibox-autocomplete-filtering.patch
  36. 6 6
      patches/extra/ungoogled-chromium/add-flag-for-pdf-plugin-name.patch
  37. 2 2
      patches/extra/ungoogled-chromium/add-flag-for-qr-generator.patch
  38. 3 3
      patches/extra/ungoogled-chromium/add-flag-for-search-engine-collection.patch
  39. 1 1
      patches/extra/ungoogled-chromium/add-flag-for-tabsearch-button.patch
  40. 1 1
      patches/extra/ungoogled-chromium/add-flag-to-close-window-with-last-tab.patch
  41. 2 2
      patches/extra/ungoogled-chromium/add-flag-to-configure-extension-downloading.patch
  42. 1 1
      patches/extra/ungoogled-chromium/add-flag-to-disable-beforeunload.patch
  43. 1 1
      patches/extra/ungoogled-chromium/add-flag-to-disable-local-history-expiration.patch
  44. 1 1
      patches/extra/ungoogled-chromium/add-flag-to-hide-crashed-bubble.patch
  45. 1 1
      patches/extra/ungoogled-chromium/add-flag-to-scroll-tabs.patch
  46. 1 1
      patches/extra/ungoogled-chromium/add-flag-to-stack-tabs.patch
  47. 8 8
      patches/extra/ungoogled-chromium/add-ipv6-probing-option.patch
  48. 12 11
      patches/extra/ungoogled-chromium/add-suggestions-url-field.patch
  49. 1 1
      patches/extra/ungoogled-chromium/add-ungoogled-flag-headers.patch
  50. 5 5
      patches/extra/ungoogled-chromium/disable-download-quarantine.patch
  51. 2 2
      patches/extra/ungoogled-chromium/disable-webgl-renderer-info.patch
  52. 1 1
      patches/extra/ungoogled-chromium/enable-default-prefetch-privacy-changes.patch
  53. 2 2
      patches/extra/ungoogled-chromium/enable-page-saving-on-more-pages.patch
  54. 0 1
      patches/series
  55. 470 4
      pruning.list

+ 1 - 1
chromium_version.txt

@@ -1 +1 @@
-94.0.4606.81
+95.0.4638.49

File diff suppressed because it is too large
+ 120 - 240
domain_substitution.list


+ 4 - 4
patches/core/bromite/disable-fetching-field-trials.patch

@@ -10,7 +10,7 @@ Subject: Disable fetching of all field trials
 
 --- 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
-@@ -123,11 +123,7 @@ public abstract class ChromeFeatureList
+@@ -105,11 +105,7 @@ public abstract class ChromeFeatureList
       *   the specified parameter does not exist.
       */
      public static String getFieldTrialParamByFeature(String featureName, String paramName) {
@@ -23,7 +23,7 @@ Subject: Disable fetching of all field trials
      }
  
      /**
-@@ -144,12 +140,7 @@ public abstract class ChromeFeatureList
+@@ -126,12 +122,7 @@ public abstract class ChromeFeatureList
       */
      public static int getFieldTrialParamByFeatureAsInt(
              String featureName, String paramName, int defaultValue) {
@@ -37,7 +37,7 @@ Subject: Disable fetching of all field trials
      }
  
      /**
-@@ -166,12 +157,7 @@ public abstract class ChromeFeatureList
+@@ -148,12 +139,7 @@ public abstract class ChromeFeatureList
       */
      public static double getFieldTrialParamByFeatureAsDouble(
              String featureName, String paramName, double defaultValue) {
@@ -51,7 +51,7 @@ Subject: Disable fetching of all field trials
      }
  
      /**
-@@ -202,12 +188,7 @@ public abstract class ChromeFeatureList
+@@ -184,12 +170,7 @@ public abstract class ChromeFeatureList
       */
      public static boolean getFieldTrialParamByFeatureAsBoolean(
              String featureName, String paramName, boolean defaultValue) {

+ 0 - 22
patches/core/chromium-upstream/missing-header-without-tflite.patch

@@ -1,22 +0,0 @@
-From d7b0aa0df41d24fc1875a8d87c9298eb9098cf09 Mon Sep 17 00:00:00 2001
-From: Robert Ogden <robertogden@chromium.org>
-Date: Mon, 13 Sep 2021 19:23:58 +0000
-Subject: [PATCH] Missing header when TFLite isn't built in
-
-Change-Id: I4e89f7b8f2d67343e219a1935dbdcb64682a5df9
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3158501
-Auto-Submit: Robert Ogden <robertogden@chromium.org>
-Commit-Queue: Michael Crouse <mcrouse@chromium.org>
-Reviewed-by: Michael Crouse <mcrouse@chromium.org>
-Cr-Commit-Position: refs/heads/main@{#920867}
-
---- a/components/optimization_guide/content/browser/page_content_annotations_service.cc
-+++ b/components/optimization_guide/content/browser/page_content_annotations_service.cc
-@@ -6,6 +6,7 @@
- 
- #include "base/metrics/histogram_functions.h"
- #include "base/strings/string_util.h"
-+#include "base/strings/utf_string_conversions.h"
- #include "components/history/core/browser/history_service.h"
- #include "components/optimization_guide/core/optimization_guide_enums.h"
- #include "components/optimization_guide/core/optimization_guide_features.h"

+ 5 - 5
patches/core/debian/disable/unrar.patch

@@ -4,7 +4,7 @@ bug: http://bugs.debian.org/914487
 
 --- a/chrome/browser/safe_browsing/download_protection/file_analyzer.cc
 +++ b/chrome/browser/safe_browsing/download_protection/file_analyzer.cc
-@@ -90,7 +90,7 @@ void FileAnalyzer::Start(const base::Fil
+@@ -95,7 +95,7 @@ void FileAnalyzer::Start(const base::Fil
    if (inspection_type == DownloadFileType::ZIP) {
      StartExtractZipFeatures();
    } else if (inspection_type == DownloadFileType::RAR) {
@@ -15,7 +15,7 @@ bug: http://bugs.debian.org/914487
      StartExtractDmgFeatures();
 --- a/chrome/common/safe_browsing/BUILD.gn
 +++ b/chrome/common/safe_browsing/BUILD.gn
-@@ -43,39 +43,6 @@ if (safe_browsing_mode == 1) {
+@@ -58,39 +58,6 @@ if (safe_browsing_mode == 1) {
      public_deps = [ "//components/safe_browsing/core/common/proto:csd_proto" ]
    }
  
@@ -52,10 +52,10 @@ bug: http://bugs.debian.org/914487
 -    public_deps = [ "//components/safe_browsing/core/common/proto:csd_proto" ]
 -  }
 -
-   if (is_mac) {
-     source_set("disk_image_type_sniffer_mac") {
+   if (is_linux || is_win) {
+     source_set("document_analyzer") {
        sources = [
-@@ -149,7 +116,6 @@ source_set("safe_browsing") {
+@@ -189,7 +156,6 @@ source_set("safe_browsing") {
        ":archive_analyzer_results",
        ":binary_feature_extractor",
        ":download_type_util",

+ 33 - 31
patches/core/inox-patchset/0001-fix-building-without-safebrowsing.patch

@@ -1,6 +1,6 @@
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -2158,7 +2158,6 @@ static_library("browser") {
+@@ -2180,7 +2180,6 @@ static_library("browser") {
      "//components/reputation/core:proto",
      "//components/resources",
      "//components/safe_browsing/content/browser",
@@ -8,7 +8,7 @@
      "//components/safe_browsing/content/browser:safe_browsing_service",
      "//components/safe_browsing/content/browser/password_protection",
      "//components/safe_browsing/content/browser/web_ui",
-@@ -3600,8 +3599,6 @@ static_library("browser") {
+@@ -3660,8 +3659,6 @@ static_library("browser") {
        "download/download_commands.h",
        "download/download_crx_util.cc",
        "download/download_crx_util.h",
@@ -19,7 +19,7 @@
        "download/download_dir_util.cc",
 --- a/chrome/browser/browser_process.h
 +++ b/chrome/browser/browser_process.h
-@@ -51,10 +51,6 @@ class NetworkQualityTracker;
+@@ -55,10 +55,6 @@ class NetworkQualityTracker;
  class SharedURLLoaderFactory;
  }
  
@@ -30,7 +30,7 @@
  namespace subresource_filter {
  class RulesetService;
  }
-@@ -210,9 +206,6 @@ class BrowserProcess {
+@@ -214,9 +210,6 @@ class BrowserProcess {
    // on this platform (or this is a unit test).
    virtual StatusTray* status_tray() = 0;
  
@@ -50,7 +50,7 @@
  #include "chrome/browser/shell_integration.h"
  #include "chrome/browser/site_isolation/prefs_observer.h"
  #include "chrome/browser/ssl/secure_origin_prefs_observer.h"
-@@ -388,8 +387,6 @@ void BrowserProcessImpl::StartTearDown()
+@@ -392,8 +391,6 @@ void BrowserProcessImpl::StartTearDown()
  
    metrics_services_manager_.reset();
    intranet_redirect_detector_.reset();
@@ -59,7 +59,7 @@
    network_time_tracker_.reset();
  #if BUILDFLAG(ENABLE_PLUGINS)
    plugins_resource_service_.reset();
-@@ -1006,14 +1003,6 @@ StatusTray* BrowserProcessImpl::status_t
+@@ -1023,14 +1020,6 @@ StatusTray* BrowserProcessImpl::status_t
    return status_tray_.get();
  }
  
@@ -74,7 +74,7 @@
  subresource_filter::RulesetService*
  BrowserProcessImpl::subresource_filter_ruleset_service() {
    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-@@ -1261,26 +1250,6 @@ void BrowserProcessImpl::CreateBackgroun
+@@ -1295,26 +1284,6 @@ void BrowserProcessImpl::CreateBackgroun
  #endif
  }
  
@@ -103,7 +103,7 @@
    created_subresource_filter_ruleset_service_ = true;
 --- a/chrome/browser/browser_process_impl.h
 +++ b/chrome/browser/browser_process_impl.h
-@@ -180,7 +180,6 @@ class BrowserProcessImpl : public Browse
+@@ -186,7 +186,6 @@ class BrowserProcessImpl : public Browse
        std::unique_ptr<BackgroundModeManager> manager) override;
  #endif
    StatusTray* status_tray() override;
@@ -111,7 +111,7 @@
    subresource_filter::RulesetService* subresource_filter_ruleset_service()
        override;
    federated_learning::FlocSortingLshClustersService*
-@@ -332,9 +331,6 @@ class BrowserProcessImpl : public Browse
+@@ -340,9 +339,6 @@ class BrowserProcessImpl : public Browse
    std::unique_ptr<BackgroundModeManager> background_mode_manager_;
  #endif
  
@@ -131,7 +131,7 @@
  #include "chrome/browser/search_engines/template_url_service_factory.h"
  #include "chrome/browser/share/share_history.h"
  #include "chrome/browser/share/share_ranking.h"
-@@ -674,10 +673,6 @@ void ChromeBrowsingDataRemoverDelegate::
+@@ -662,10 +661,6 @@ void ChromeBrowsingDataRemoverDelegate::
      base::RecordAction(UserMetricsAction("ClearBrowsingData_Cookies"));
  
      network::mojom::NetworkContext* safe_browsing_context = nullptr;
@@ -144,7 +144,7 @@
          delete_begin, delete_end, filter_builder, host_content_settings_map_,
 --- a/chrome/browser/chrome_content_browser_client.cc
 +++ b/chrome/browser/chrome_content_browser_client.cc
-@@ -914,30 +914,6 @@ void SetApplicationLocaleOnIOThread(cons
+@@ -916,30 +916,6 @@ void SetApplicationLocaleOnIOThread(cons
    GetIOThreadApplicationLocale() = locale;
  }
  
@@ -175,7 +175,7 @@
  #if BUILDFLAG(ENABLE_EXTENSIONS)
  
  AppLoadedInTabSource ClassifyAppLoadedInTabSource(
-@@ -1339,7 +1315,6 @@ void ChromeContentBrowserClient::PostAft
+@@ -1356,7 +1332,6 @@ void ChromeContentBrowserClient::PostAft
    InitNetworkContextsParentDirectory();
  
    DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -183,7 +183,7 @@
  }
  
  bool ChromeContentBrowserClient::IsBrowserStartupComplete() {
-@@ -4054,7 +4029,7 @@ ChromeContentBrowserClient::CreateThrott
+@@ -4059,7 +4034,7 @@ ChromeContentBrowserClient::CreateThrott
    content::WebContents* web_contents = handle->GetWebContents();
    throttles.push_back(std::make_unique<SSLErrorNavigationThrottle>(
        handle,
@@ -192,7 +192,7 @@
        base::BindOnce(&HandleSSLErrorWrapper), base::BindOnce(&IsInHostedApp),
        base::BindOnce(
            &ShouldIgnoreSslInterstitialBecauseNavigationDefaultedToHttps)));
-@@ -4083,15 +4058,6 @@ ChromeContentBrowserClient::CreateThrott
+@@ -4088,15 +4063,6 @@ ChromeContentBrowserClient::CreateThrott
                     &throttles);
  #endif
  
@@ -210,7 +210,7 @@
          std::make_unique<safe_browsing::DelayedWarningNavigationThrottle>(
 --- a/chrome/browser/component_updater/file_type_policies_component_installer.cc
 +++ b/chrome/browser/component_updater/file_type_policies_component_installer.cc
-@@ -39,20 +39,6 @@ const uint8_t kFileTypePoliciesPublicKey
+@@ -40,20 +40,6 @@ const uint8_t kFileTypePoliciesPublicKey
  const char kFileTypePoliciesManifestName[] = "File Type Policies";
  
  void LoadFileTypesFromDisk(const base::FilePath& pb_path) {
@@ -233,7 +233,7 @@
  }  // namespace
 --- a/chrome/browser/download/chrome_download_manager_delegate.cc
 +++ b/chrome/browser/download/chrome_download_manager_delegate.cc
-@@ -395,13 +395,6 @@ ChromeDownloadManagerDelegate::~ChromeDo
+@@ -396,13 +396,6 @@ ChromeDownloadManagerDelegate::~ChromeDo
  
  void ChromeDownloadManagerDelegate::SetDownloadManager(DownloadManager* dm) {
    download_manager_ = dm;
@@ -247,7 +247,7 @@
  }
  
  #if defined(OS_ANDROID)
-@@ -748,16 +741,6 @@ void ChromeDownloadManagerDelegate::Choo
+@@ -749,16 +742,6 @@ void ChromeDownloadManagerDelegate::Choo
  
  void ChromeDownloadManagerDelegate::SanitizeSavePackageResourceName(
      base::FilePath* filename) {
@@ -356,7 +356,7 @@
    // If no mime type or explicitly specified a name, don't replace file
    // extension.
    if (sniffed_mime_type.empty() || !suggested_filename.empty())
-@@ -1111,29 +1104,7 @@ DownloadFileType::DangerLevel DownloadTa
+@@ -1113,29 +1106,7 @@ DownloadFileType::DangerLevel DownloadTa
        download_->HasUserGesture())
      return DownloadFileType::NOT_DANGEROUS;
  
@@ -406,7 +406,7 @@
 -
  ExtensionFunction::ResponseAction DownloadsAcceptDangerFunction::Run() {
    std::unique_ptr<downloads::AcceptDanger::Params> params(
-       downloads::AcceptDanger::Params::Create(*args_));
+       downloads::AcceptDanger::Params::Create(args()));
 @@ -1311,42 +1307,7 @@ void DownloadsAcceptDangerFunction::Prom
      return;
    }
@@ -686,7 +686,7 @@
    // SimpleURLLoader -> (owned loader, extension id).
 --- a/chrome/browser/metrics/chrome_metrics_service_client.cc
 +++ b/chrome/browser/metrics/chrome_metrics_service_client.cc
-@@ -806,9 +806,6 @@ void ChromeMetricsServiceClient::Registe
+@@ -823,9 +823,6 @@ void ChromeMetricsServiceClient::Registe
    metrics_service_->RegisterMetricsProvider(
        std::make_unique<HttpsEngagementMetricsProvider>());
  
@@ -710,7 +710,7 @@
  // static
 --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
 +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
-@@ -288,7 +288,6 @@ void ChromeBrowserMainExtraPartsProfiles
+@@ -294,7 +294,6 @@ void ChromeBrowserMainExtraPartsProfiles
  #if BUILDFLAG(IS_CHROMEOS_LACROS)
    CertDbInitializerFactory::GetInstance();
  #endif
@@ -720,7 +720,7 @@
  #endif
 --- a/chrome/browser/profiles/profile_impl.cc
 +++ b/chrome/browser/profiles/profile_impl.cc
-@@ -90,7 +90,6 @@
+@@ -93,7 +93,6 @@
  #include "chrome/browser/profiles/profile_metrics.h"
  #include "chrome/browser/push_messaging/push_messaging_service_factory.h"
  #include "chrome/browser/push_messaging/push_messaging_service_impl.h"
@@ -728,7 +728,7 @@
  #include "chrome/browser/sharing/sharing_service_factory.h"
  #include "chrome/browser/signin/identity_manager_factory.h"
  #include "chrome/browser/signin/signin_ui_util.h"
-@@ -647,17 +646,6 @@ void ProfileImpl::LoadPrefsForNormalStar
+@@ -658,17 +657,6 @@ void ProfileImpl::LoadPrefsForNormalStar
  
    mojo::PendingRemote<prefs::mojom::TrackedPreferenceValidationDelegate>
        pref_validation_delegate;
@@ -748,7 +748,7 @@
        CreatePrefService(pref_registry_, CreateExtensionPrefStore(this, false),
 --- a/chrome/browser/profiles/profiles_state.cc
 +++ b/chrome/browser/profiles/profiles_state.cc
-@@ -258,9 +258,6 @@ void RemoveBrowsingDataForProfile(const
+@@ -259,9 +259,6 @@ void RemoveBrowsingDataForProfile(const
    // The BrowsingDataRemover relies on many objects that aren't created in unit
    // tests. Previously this code would depend on content::ResourceDispatcherHost
    // but that's gone, so do a similar hack for now.
@@ -760,7 +760,7 @@
    if (!profile)
 --- a/chrome/browser/safe_browsing/BUILD.gn
 +++ b/chrome/browser/safe_browsing/BUILD.gn
-@@ -6,6 +6,7 @@ import("//components/safe_browsing/build
+@@ -5,6 +5,7 @@ import("//components/safe_browsing/build
  import("//extensions/buildflags/buildflags.gni")
  
  static_library("safe_browsing") {
@@ -768,7 +768,7 @@
    sources = [
      "chrome_controller_client.cc",
      "chrome_controller_client.h",
-@@ -87,6 +88,7 @@ static_library("safe_browsing") {
+@@ -86,6 +87,7 @@ static_library("safe_browsing") {
        "//extensions/browser",
      ]
    }
@@ -776,7 +776,7 @@
  
    if (safe_browsing_mode != 0) {
      # "Safe Browsing Basic" files used for safe browsing in full mode
-@@ -398,6 +400,7 @@ static_library("advanced_protection") {
+@@ -410,6 +412,7 @@ static_library("advanced_protection") {
  }
  
  source_set("metrics_collector") {
@@ -784,7 +784,7 @@
    sources = [
      "safe_browsing_metrics_collector_factory.cc",
      "safe_browsing_metrics_collector_factory.h",
-@@ -414,6 +417,7 @@ source_set("metrics_collector") {
+@@ -426,6 +429,7 @@ source_set("metrics_collector") {
      "//components/safe_browsing/core/common:safe_browsing_prefs",
      "//content/public/browser",
    ]
@@ -886,7 +886,7 @@
  
 --- a/chrome/browser/ui/BUILD.gn
 +++ b/chrome/browser/ui/BUILD.gn
-@@ -3861,7 +3861,6 @@ static_library("ui") {
+@@ -3885,7 +3885,6 @@ static_library("ui") {
        "views/device_chooser_content_view.h",
        "views/devtools_process_observer.cc",
        "views/devtools_process_observer.h",
@@ -896,7 +896,7 @@
        "views/download/download_item_view.cc",
 --- a/chrome/browser/ui/tab_helpers.cc
 +++ b/chrome/browser/ui/tab_helpers.cc
-@@ -316,14 +316,6 @@ void TabHelpers::AttachTabHelpers(WebCon
+@@ -318,16 +318,6 @@ void TabHelpers::AttachTabHelpers(WebCon
    //     See https://crbug.com/910288.
    resource_coordinator::ResourceCoordinatorTabHelper::CreateForWebContents(
        web_contents);
@@ -905,7 +905,9 @@
 -      safe_browsing::SafeBrowsingNavigationObserverManagerFactory::
 -          GetForBrowserContext(profile),
 -      profile->GetPrefs(), g_browser_process->safe_browsing_service());
--  safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(web_contents);
+-  safe_browsing::SafeBrowsingTabObserver::CreateForWebContents(
+-      web_contents,
+-      std::make_unique<safe_browsing::ChromeSafeBrowsingTabObserverDelegate>());
 -  safe_browsing::TriggerCreator::MaybeCreateTriggersForWebContents(
 -      profile, web_contents);
    ReputationWebContentsObserver::CreateForWebContents(web_contents);

+ 4 - 4
patches/core/inox-patchset/0005-disable-default-extensions.patch

@@ -6,8 +6,8 @@
    const char* const kAllowed[] = {
 -    extension_misc::kInAppPaymentsSupportAppId,
      extension_misc::kPdfExtensionId,
- #if BUILDFLAG(IS_CHROMEOS_ASH)
-     extension_misc::kAccessibilityCommonExtensionId,
+ #if defined(OS_CHROMEOS)
+     extension_misc::kAssessmentAssistantExtensionId,
 --- a/chrome/browser/extensions/component_loader.cc
 +++ b/chrome/browser/extensions/component_loader.cc
 @@ -354,11 +354,6 @@ void ComponentLoader::AddWebStoreApp() {
@@ -22,7 +22,7 @@
  }
  
  #if BUILDFLAG(IS_CHROMEOS_ASH)
-@@ -531,18 +526,6 @@ void ComponentLoader::AddDefaultComponen
+@@ -526,18 +521,6 @@ void ComponentLoader::AddDefaultComponen
      AddHangoutServicesExtension();
  #endif  // BUILDFLAG(ENABLE_HANGOUT_SERVICES_EXTENSION)
  
@@ -51,7 +51,7 @@
 -  AddExternalExtension(extension_misc::kInAppPaymentsSupportAppId, prefs.get());
 -#endif  // BUILDFLAG(GOOGLE_CHROME_BRANDING)
  
- #if BUILDFLAG(IS_CHROMEOS_ASH)
+ #if defined(OS_CHROMEOS)
    {
 --- a/chrome/browser/extensions/webstore_installer.cc
 +++ b/chrome/browser/extensions/webstore_installer.cc

+ 1 - 1
patches/core/inox-patchset/0009-disable-google-ipv6-probes.patch

@@ -1,6 +1,6 @@
 --- a/net/dns/host_resolver_manager.cc
 +++ b/net/dns/host_resolver_manager.cc
-@@ -136,10 +136,10 @@ const unsigned kMinimumTTLSeconds = kCac
+@@ -138,10 +138,10 @@ const unsigned kMinimumTTLSeconds = kCac
  // cached.
  const int kIPv6ProbePeriodMs = 1000;
  

+ 1 - 1
patches/core/inox-patchset/0015-disable-update-pings.patch

@@ -1,6 +1,6 @@
 --- a/chrome/updater/configurator.cc
 +++ b/chrome/updater/configurator.cc
-@@ -80,7 +80,7 @@ int Configurator::UpdateDelay() const {
+@@ -82,7 +82,7 @@ int Configurator::UpdateDelay() const {
  }
  
  std::vector<GURL> Configurator::UpdateUrl() const {

+ 1 - 1
patches/core/inox-patchset/0021-disable-rlz.patch

@@ -2,7 +2,7 @@
 
 --- a/BUILD.gn
 +++ b/BUILD.gn
-@@ -479,14 +479,6 @@ group("gn_all") {
+@@ -483,14 +483,6 @@ group("gn_all") {
      deps += [ "//chromeos:chromeos_unittests" ]
    }
  

+ 24 - 14
patches/core/iridium-browser/all-add-trk-prefixes-to-possibly-evil-connections.patch

@@ -90,7 +90,7 @@ by default.
  // creates and uses to publish OEM default apps to the extensions system.
 --- a/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
 +++ b/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
-@@ -85,7 +85,7 @@ namespace {
+@@ -87,7 +87,7 @@ namespace {
  
  using api::file_manager_private::ProfileInfo;
  
@@ -101,7 +101,7 @@ by default.
  constexpr base::TimeDelta kMountCrostiniSlowOperationThreshold =
 --- a/chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc
 +++ b/chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc
-@@ -42,8 +42,8 @@ namespace {
+@@ -46,8 +46,8 @@ namespace {
  
  const char kGoogleDotCom[] = "google.com";
  constexpr const char* kGoogleGstaticAppIds[] = {
@@ -214,15 +214,15 @@ by default.
                base::ToLowerASCII(bdict_file));
 --- a/chrome/browser/supervised_user/supervised_user_service.cc
 +++ b/chrome/browser/supervised_user/supervised_user_service.cc
-@@ -86,7 +86,7 @@ namespace {
+@@ -87,7 +87,7 @@ namespace {
  
  // The URL from which to download a host denylist if no local one exists yet.
  const char kDenylistURL[] =
--    "https://www.gstatic.com/chrome/supervised_user/blacklist-20141001-1k.bin";
-+    "trk:272:https://www.gstatic.com/chrome/supervised_user/blacklist-20141001-1k.bin";
- // The filename under which we'll store the denylist (in the user data dir).
- const char kDenylistFilename[] = "su-blacklist.bin";
- 
+-    "https://www.gstatic.com/chrome/supervised_user/denylist-20141001-1k.bin";
++    "trk:272:https://www.gstatic.com/chrome/supervised_user/denylist-20141001-1k.bin";
+ // The filename under which we'll store the denylist (in the user data dir). The
+ // old file will be used as a backup in case the new file has not been loaded
+ // yet.
 --- a/chrome/browser/tracing/crash_service_uploader.cc
 +++ b/chrome/browser/tracing/crash_service_uploader.cc
 @@ -42,7 +42,7 @@ using std::string;
@@ -551,7 +551,7 @@ by default.
    extensions::ExtensionsClient* client = extensions::ExtensionsClient::Get();
 --- a/google_apis/gaia/gaia_constants.cc
 +++ b/google_apis/gaia/gaia_constants.cc
-@@ -25,125 +25,125 @@ const char kSyncService[] = "chromiumsyn
+@@ -25,133 +25,133 @@ const char kSyncService[] = "chromiumsyn
  const char kRemotingService[] = "chromoting";
  
  // OAuth scopes.
@@ -687,30 +687,40 @@ by default.
 -    "https://www.googleapis.com/auth/assistant-sdk-prototype";
 +    "trk:097:https://www.googleapis.com/auth/assistant-sdk-prototype";
  
+ // OAuth2 scope for access to nearby devices (fast pair) APIs.
+ const char kCloudPlatformProjectsOAuth2Scope[] =
+-    "https://www.googleapis.com/auth/cloudplatformprojects";
++    "trk:098:https://www.googleapis.com/auth/cloudplatformprojects";
+ 
  // OAuth2 scope for access to nearby sharing.
  const char kNearbyShareOAuth2Scope[] =
 -    "https://www.googleapis.com/auth/nearbysharing-pa";
-+    "trk:098:https://www.googleapis.com/auth/nearbysharing-pa";
++    "trk:099:https://www.googleapis.com/auth/nearbysharing-pa";
  
  // OAuth2 scopes for access to GCM account tracker.
 -const char kGCMGroupServerOAuth2Scope[] = "https://www.googleapis.com/auth/gcm";
-+const char kGCMGroupServerOAuth2Scope[] = "trk:099:https://www.googleapis.com/auth/gcm";
++const char kGCMGroupServerOAuth2Scope[] = "trk:100:https://www.googleapis.com/auth/gcm";
  const char kGCMCheckinServerOAuth2Scope[] =
 -    "https://www.googleapis.com/auth/android_checkin";
-+    "trk:100:https://www.googleapis.com/auth/android_checkin";
++    "trk:101:https://www.googleapis.com/auth/android_checkin";
  
  // OAuth2 scope for access to readonly Chrome web store.
  const char kChromeWebstoreOAuth2Scope[] =
 -    "https://www.googleapis.com/auth/chromewebstore.readonly";
-+    "trk:101:https://www.googleapis.com/auth/chromewebstore.readonly";
++    "trk:102:https://www.googleapis.com/auth/chromewebstore.readonly";
  
  // OAuth2 scope for access to Account Capabilities API.
  const char kAccountCapabilitiesOAuth2Scope[] =
 -    "https://www.googleapis.com/auth/account.capabilities";
-+    "trk:102:https://www.googleapis.com/auth/account.capabilities";
++    "trk:103:https://www.googleapis.com/auth/account.capabilities";
  
  // OAuth2 scope for support content API.
  const char kSupportContentOAuth2Scope[] =
+-    "https://www.googleapis.com/auth/supportcontent";
++    "trk:104:https://www.googleapis.com/auth/supportcontent";
+ 
+ // Used to mint uber auth tokens when needed.
+ const char kGaiaSid[] = "sid";
 --- a/google_apis/gaia/gaia_urls.cc
 +++ b/google_apis/gaia/gaia_urls.cc
 @@ -24,6 +24,7 @@

+ 1 - 1
patches/core/iridium-browser/safe_browsing-disable-incident-reporting.patch

@@ -56,7 +56,7 @@ the URL so we get notified if this happens again in the future).
  IncidentReportingService::IncidentReportingService(
 --- a/chrome/browser/safe_browsing/safe_browsing_service.cc
 +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
-@@ -285,7 +285,7 @@ SafeBrowsingUIManager* SafeBrowsingServi
+@@ -282,7 +282,7 @@ SafeBrowsingUIManager* SafeBrowsingServi
  }
  
  void SafeBrowsingService::RegisterAllDelayedAnalysis() {

+ 1 - 1
patches/core/ungoogled-chromium/block-requests.patch

@@ -2,7 +2,7 @@
 # chrome://discards/ attempts to use d3 to display the graph
 --- a/chrome/browser/new_tab_page/one_google_bar/one_google_bar_loader_impl.cc
 +++ b/chrome/browser/new_tab_page/one_google_bar/one_google_bar_loader_impl.cc
-@@ -299,6 +299,7 @@ OneGoogleBarLoaderImpl::OneGoogleBarLoad
+@@ -286,6 +286,7 @@ OneGoogleBarLoaderImpl::OneGoogleBarLoad
  OneGoogleBarLoaderImpl::~OneGoogleBarLoaderImpl() = default;
  
  void OneGoogleBarLoaderImpl::Load(OneGoogleCallback callback) {

+ 8 - 8
patches/core/ungoogled-chromium/block-trk-and-subdomains.patch

@@ -60,7 +60,7 @@
      return GURL(parts.scheme.is_valid() ? text : FixupPath(text));
 --- a/content/browser/child_process_security_policy_impl.cc
 +++ b/content/browser/child_process_security_policy_impl.cc
-@@ -819,6 +819,7 @@ ChildProcessSecurityPolicyImpl::ChildPro
+@@ -821,6 +821,7 @@ ChildProcessSecurityPolicyImpl::ChildPro
  #endif  // BUILDFLAG(ENABLE_WEBSOCKETS)
    RegisterWebSafeScheme(url::kFtpScheme);
    RegisterWebSafeScheme(url::kDataScheme);
@@ -70,7 +70,7 @@
    // TODO(nick): https://crbug.com/651534 blob: and filesystem: schemes embed
 --- a/net/BUILD.gn
 +++ b/net/BUILD.gn
-@@ -1013,6 +1013,8 @@ component("net") {
+@@ -1008,6 +1008,8 @@ component("net") {
      "url_request/report_sender.h",
      "url_request/static_http_user_agent_settings.cc",
      "url_request/static_http_user_agent_settings.h",
@@ -152,7 +152,7 @@
  #include "base/strings/utf_string_conversions.h"
  #include "base/synchronization/lock.h"
  #include "base/threading/thread_task_runner_handle.h"
-@@ -44,6 +45,7 @@
+@@ -46,6 +47,7 @@
  #include "net/url_request/url_request_redirect_job.h"
  #include "url/gurl.h"
  #include "url/origin.h"
@@ -160,7 +160,7 @@
  
  using base::Time;
  using std::string;
-@@ -580,6 +582,12 @@ URLRequest::URLRequest(const GURL& url,
+@@ -584,6 +586,12 @@ URLRequest::URLRequest(const GURL& url,
    // Sanity check out environment.
    DCHECK(base::ThreadTaskRunnerHandle::IsSet());
  
@@ -183,16 +183,16 @@
  #include "net/url_request/url_request_context.h"
  #include "net/url_request/url_request_context_storage.h"
  #include "net/url_request/url_request_job_factory.h"
-@@ -554,6 +555,9 @@ std::unique_ptr<URLRequestContext> URLRe
+@@ -546,6 +547,9 @@ std::unique_ptr<URLRequestContext> URLRe
    }
    protocol_handlers_.clear();
  
 +  job_factory->SetProtocolHandler(url::kTraceScheme,
 +                                  std::make_unique<TrkProtocolHandler>());
 +
- #if !BUILDFLAG(DISABLE_FTP_SUPPORT)
-   if (ftp_enabled_) {
-     storage->set_ftp_auth_cache(std::make_unique<FtpAuthCache>());
+   storage->set_job_factory(std::move(job_factory));
+ 
+   return std::move(context);
 --- a/url/url_constants.cc
 +++ b/url/url_constants.cc
 @@ -28,6 +28,7 @@ const char kMailToScheme[] = "mailto";

+ 1 - 1
patches/core/ungoogled-chromium/disable-crash-reporter.patch

@@ -23,7 +23,7 @@
  }
  
  void TraceCrashServiceUploader::DoCompressOnBackgroundThread(
-@@ -310,6 +315,7 @@ bool TraceCrashServiceUploader::Compress
+@@ -312,6 +317,7 @@ bool TraceCrashServiceUploader::Compress
  void TraceCrashServiceUploader::CreateAndStartURLLoader(
      const std::string& upload_url,
      const std::string& post_data) {

+ 22 - 7
patches/core/ungoogled-chromium/disable-floc.patch

@@ -46,18 +46,33 @@
  }  // namespace federated_learning
 --- a/chrome/browser/privacy_sandbox/privacy_sandbox_settings.cc
 +++ b/chrome/browser/privacy_sandbox/privacy_sandbox_settings.cc
-@@ -211,13 +211,7 @@ PrivacySandboxSettings::~PrivacySandboxS
+@@ -132,8 +132,7 @@ bool ShouldDisablePrivacySandbox(
+ 
+ // Returns whether FLoC is allowable by the current state of |pref_service|.
+ bool IsFlocAllowedByPrefs(PrefService* pref_service) {
+-  return pref_service->GetBoolean(prefs::kPrivacySandboxFlocEnabled) &&
+-         pref_service->GetBoolean(prefs::kPrivacySandboxApisEnabled);
++  return false;
  }
  
+ // Returns the number of days in |time|, rounded to the closest day by hour if
+@@ -208,7 +207,7 @@ PrivacySandboxSettings::PrivacySandboxSe
+ PrivacySandboxSettings::~PrivacySandboxSettings() = default;
+ 
  bool PrivacySandboxSettings::IsFlocAllowed() const {
--  if (!PrivacySandboxSettingsFunctional()) {
--    // Simply respect 3rd-party cookies blocking settings if the UI is not
--    // available.
--    return !cookie_settings_->ShouldBlockThirdPartyCookies();
--  }
--
 -  return IsFlocAllowedByPrefs(pref_service_);
 +  return false;
  }
  
  bool PrivacySandboxSettings::IsFlocAllowedForContext(
+--- a/components/privacy_sandbox/privacy_sandbox_prefs.cc
++++ b/components/privacy_sandbox/privacy_sandbox_prefs.cc
+@@ -42,7 +42,7 @@ void RegisterProfilePrefs(PrefRegistrySi
+   registry->RegisterTimePref(prefs::kPrivacySandboxFlocDataAccessibleSince,
+                              base::Time());
+   registry->RegisterBooleanPref(
+-      prefs::kPrivacySandboxFlocEnabled, true,
++      prefs::kPrivacySandboxFlocEnabled, false,
+       user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
+ }
+ 

+ 2 - 2
patches/core/ungoogled-chromium/disable-mei-preload.patch

@@ -7,7 +7,7 @@
 
 --- a/chrome/BUILD.gn
 +++ b/chrome/BUILD.gn
-@@ -325,7 +325,6 @@ if (!is_android && !is_mac) {
+@@ -345,7 +345,6 @@ if (!is_android && !is_mac) {
      }
  
      data_deps += [
@@ -15,7 +15,7 @@
        "//third_party/widevine/cdm",
      ]
    }
-@@ -1131,7 +1130,6 @@ if (is_win) {
+@@ -1151,7 +1150,6 @@ if (is_win) {
        ":keystone_registration_framework",
        ":swiftshader_library",
        ":widevine_cdm_library",

+ 44 - 13
patches/core/ungoogled-chromium/disable-privacy-sandbox.patch

@@ -1,25 +1,56 @@
 --- a/chrome/browser/privacy_sandbox/privacy_sandbox_settings.cc
 +++ b/chrome/browser/privacy_sandbox/privacy_sandbox_settings.cc
-@@ -207,7 +207,7 @@ PrivacySandboxSettings::PrivacySandboxSe
- PrivacySandboxSettings::~PrivacySandboxSettings() = default;
+@@ -379,7 +379,7 @@ std::vector<GURL> PrivacySandboxSettings
+ }
  
- /*static*/ bool PrivacySandboxSettings::PrivacySandboxSettingsFunctional() {
--  return base::FeatureList::IsEnabled(features::kPrivacySandboxSettings);
+ bool PrivacySandboxSettings::IsPrivacySandboxAllowed() {
+-  return pref_service_->GetBoolean(prefs::kPrivacySandboxApisEnabled);
 +  return false;
  }
  
- bool PrivacySandboxSettings::IsFlocAllowed() const {
+ bool PrivacySandboxSettings::IsPrivacySandboxEnabled() {
+@@ -391,8 +391,6 @@ bool PrivacySandboxSettings::IsPrivacySa
+ }
+ 
+ void PrivacySandboxSettings::SetPrivacySandboxEnabled(bool enabled) {
+-  pref_service_->SetBoolean(prefs::kPrivacySandboxManuallyControlled, true);
+-  pref_service_->SetBoolean(prefs::kPrivacySandboxApisEnabled, enabled);
+ }
+ 
+ void PrivacySandboxSettings::OnCookiesCleared() {
+--- a/chrome/browser/resources/settings/privacy_page/privacy_page.html
++++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html
+@@ -65,19 +65,6 @@
+             sub-label="$i18n{permissionsPageDescription}"
+             on-click="onPermissionsPageClick_"
+             role-description="$i18n{subpageArrowRoleDescription}"></cr-link-row>
+-        <cr-link-row id="privacySandboxLinkRow"
+-            start-icon="settings20:experiment"
+-            class="hr"
+-            label="$i18n{privacySandboxTitle}"
+-            sub-label="[[computePrivacySandboxSublabel_(
+-                prefs.privacy_sandbox.apis_enabled.*)]]"
+-            on-click="onPrivacySandboxClick_"
+-            external
+-            role-description="$i18n{subpageArrowRoleDescription}">
+-        </cr-link-row>
+-        <a id="privacySandboxLink" href="privacySandbox"
+-            target="_blank" tabindex="-1" aria-disabled="true"
+-            role="none"></a>
+       </div>
+ 
+ <if expr="use_nss_certs">
 --- a/chrome/common/chrome_features.cc
 +++ b/chrome/common/chrome_features.cc
-@@ -782,7 +782,7 @@ const base::Feature kPrivacyReview{"Priv
- 
- // Enables the privacy sandbox settings page.
- const base::Feature kPrivacySandboxSettings{"PrivacySandboxSettings",
--                                            base::FEATURE_ENABLED_BY_DEFAULT};
-+                                            base::FEATURE_DISABLED_BY_DEFAULT};
- const base::FeatureParam<std::string> kPrivacySandboxSettingsURL{
-     &kPrivacySandboxSettings, "website-url", "https://www.privacysandbox.com"};
+@@ -789,7 +789,7 @@ const base::Feature kPrivacyReview{"Priv
  
+ // Enables additional control set 2 on the privacy sandbox settings page.
+ const base::Feature kPrivacySandboxSettings2{"PrivacySandboxSettings2",
+-                                             base::FEATURE_ENABLED_BY_DEFAULT};
++                                             base::FEATURE_DISABLED_BY_DEFAULT};
+ const base::FeatureParam<std::string> kPrivacySandboxSettings2FlocURL{
+     &kPrivacySandboxSettings2, "floc-website-url",
+     "https://privacysandbox.com/proposals/floc"};
 --- a/components/privacy_sandbox/privacy_sandbox_prefs.cc
 +++ b/components/privacy_sandbox/privacy_sandbox_prefs.cc
 @@ -31,7 +31,7 @@ namespace privacy_sandbox {

+ 2 - 2
patches/core/ungoogled-chromium/disable-webstore-urls.patch

@@ -146,7 +146,7 @@
    } else {
      url_stats_.other_url_count++;
    }
-@@ -848,20 +826,6 @@ void ExtensionDownloader::HandleManifest
+@@ -846,20 +824,6 @@ void ExtensionDownloader::HandleManifest
          update->info);
    }
  
@@ -167,7 +167,7 @@
    NotifyExtensionsDownloadStageChanged(
        no_updates, ExtensionDownloaderDelegate::Stage::FINISHED);
    NotifyExtensionsDownloadFailed(
-@@ -1421,11 +1385,7 @@ bool ExtensionDownloader::IterateFetchCr
+@@ -1418,11 +1382,7 @@ bool ExtensionDownloader::IterateFetchCr
    // fetch.
    switch (fetch->credentials) {
      case ExtensionFetch::CREDENTIALS_NONE:

+ 1 - 1
patches/core/ungoogled-chromium/fix-building-with-prunned-binaries.patch

@@ -34,7 +34,7 @@
    deps = [
 --- a/third_party/devtools-frontend/src/BUILD.gn
 +++ b/third_party/devtools-frontend/src/BUILD.gn
-@@ -139,7 +139,6 @@ foreach(module_file, non_autostart_non_r
+@@ -137,7 +137,6 @@ foreach(module_file, non_autostart_non_r
  devtools_frontend_resources_deps = [
    ":build_release_devtools",
    "front_end",

+ 52 - 15
patches/core/ungoogled-chromium/fix-building-without-enabling-reporting.patch

@@ -1,6 +1,6 @@
 --- a/content/browser/BUILD.gn
 +++ b/content/browser/BUILD.gn
-@@ -1239,6 +1239,10 @@ source_set("browser") {
+@@ -1250,6 +1250,10 @@ source_set("browser") {
      "net/browser_online_state_observer.cc",
      "net/browser_online_state_observer.h",
      "net/cookie_store_factory.cc",
@@ -11,7 +11,7 @@
      "net/network_errors_listing_ui.cc",
      "net/network_errors_listing_ui.h",
      "net/network_quality_observer_impl.cc",
-@@ -2988,10 +2992,6 @@ source_set("browser") {
+@@ -3008,10 +3012,6 @@ source_set("browser") {
  
    if (enable_reporting) {
      sources += [
@@ -22,9 +22,22 @@
        "net/reporting_service_proxy.cc",
        "net/reporting_service_proxy.h",
      ]
+--- a/content/browser/devtools/protocol/network_handler.h
++++ b/content/browser/devtools/protocol/network_handler.h
+@@ -304,8 +304,10 @@ class NetworkHandler : public DevToolsDo
+       Response response,
+       mojo::ScopedDataPipeConsumerHandle pipe,
+       const std::string& mime_type);
++#if BUILDFLAG(ENABLE_REPORTING)
+   std::unique_ptr<protocol::Network::ReportingApiReport> BuildProtocolReport(
+       const net::ReportingReport& report);
++#endif
+ 
+   // TODO(dgozman): Remove this.
+   const std::string host_id_;
 --- a/content/public/common/content_switch_dependent_feature_overrides.cc
 +++ b/content/public/common/content_switch_dependent_feature_overrides.cc
-@@ -46,9 +46,11 @@ GetSwitchDependentFeatureOverrides(const
+@@ -40,9 +40,11 @@ GetSwitchDependentFeatureOverrides(const
        {switches::kEnableExperimentalWebPlatformFeatures,
         std::cref(features::kDocumentPolicyNegotiation),
         base::FeatureList::OVERRIDE_ENABLE_FEATURE},
@@ -36,6 +49,34 @@
        {switches::kEnableExperimentalWebPlatformFeatures,
         std::cref(features::kExperimentalContentSecurityPolicyFeatures),
         base::FeatureList::OVERRIDE_ENABLE_FEATURE},
+--- a/services/network/network_context.cc
++++ b/services/network/network_context.cc
+@@ -1137,6 +1137,11 @@ void NetworkContext::QueueSignedExchange
+     const net::NetworkIsolationKey& network_isolation_key) {
+   NOTREACHED();
+ }
++
++void NetworkContext::AddReportingApiObserver(
++    mojo::PendingRemote<network::mojom::ReportingApiObserver> observer) {
++  NOTREACHED();
++}
+ #endif  // BUILDFLAG(ENABLE_REPORTING)
+ 
+ void NetworkContext::ClearDomainReliability(
+--- a/services/network/network_context.h
++++ b/services/network/network_context.h
+@@ -567,10 +567,10 @@ class COMPONENT_EXPORT(NETWORK_SERVICE)
+     return require_network_isolation_key_;
+   }
+ 
+-#if BUILDFLAG(ENABLE_REPORTING)
+   void AddReportingApiObserver(
+       mojo::PendingRemote<network::mojom::ReportingApiObserver> observer)
+       override;
++#if BUILDFLAG(ENABLE_REPORTING)
+   void OnReportAdded(const net::ReportingReport* service_report) override;
+   void OnReportUpdated(const net::ReportingReport* service_report) override;
+   void OnReportingObserverDisconnect(mojo::RemoteSetElementId mojo_id);
 --- a/third_party/blink/renderer/core/frame/local_frame.cc
 +++ b/third_party/blink/renderer/core/frame/local_frame.cc
 @@ -39,6 +39,7 @@
@@ -60,7 +101,7 @@
  void LocalFrame::NotifyUserActivation(
 --- a/third_party/blink/renderer/core/frame/local_frame.h
 +++ b/third_party/blink/renderer/core/frame/local_frame.h
-@@ -36,6 +36,7 @@
+@@ -37,6 +37,7 @@
  #include "build/build_config.h"
  #include "mojo/public/cpp/bindings/pending_associated_receiver.h"
  #include "mojo/public/cpp/bindings/pending_receiver.h"
@@ -68,18 +109,16 @@
  #include "services/device/public/mojom/device_posture_provider.mojom-blink-forward.h"
  #include "services/network/public/mojom/fetch_api.mojom-blink-forward.h"
  #include "third_party/blink/public/common/frame/frame_ad_evidence.h"
-@@ -543,9 +544,9 @@ class CORE_EXPORT LocalFrame final : pub
-   }
+@@ -545,7 +546,9 @@ class CORE_EXPORT LocalFrame final : pub
  
    SmoothScrollSequencer& GetSmoothScrollSequencer();
--
+ 
 +#if BUILDFLAG(ENABLE_REPORTING)
    mojom::blink::ReportingServiceProxy* GetReportingService();
--
 +#endif
+ 
    // Returns the frame host ptr. The interface returned is backed by an
    // associated interface with the legacy Chrome IPC channel.
-   mojom::blink::LocalFrameHost& GetLocalFrameHostRemote() const;
 --- a/third_party/blink/renderer/core/frame/reporting_context.cc
 +++ b/third_party/blink/renderer/core/frame/reporting_context.cc
 @@ -4,6 +4,7 @@
@@ -152,20 +191,18 @@
  #include "third_party/blink/public/mojom/frame/reporting_observer.mojom-blink.h"
  #include "third_party/blink/public/mojom/reporting/reporting.mojom-blink.h"
  #include "third_party/blink/renderer/core/core_export.h"
-@@ -53,10 +54,10 @@ class CORE_EXPORT ReportingContext : pub
-  private:
+@@ -54,8 +55,10 @@ class CORE_EXPORT ReportingContext : pub
    // Counts the use of a report type via UseCounter.
    void CountReport(Report*);
--
+ 
 +#if BUILDFLAG(ENABLE_REPORTING)
    const HeapMojoRemote<mojom::blink::ReportingServiceProxy>&
    GetReportingService() const;
--
 +#endif
+ 
    void NotifyInternal(Report* report);
    // Send |report| via the Reporting API to |endpoint|.
-   void SendToReportingAPI(Report* report, const String& endpoint) const;
-@@ -67,8 +68,10 @@ class CORE_EXPORT ReportingContext : pub
+@@ -67,8 +70,10 @@ class CORE_EXPORT ReportingContext : pub
  
    // This is declared mutable so that the service endpoint can be cached by
    // const methods.

+ 128 - 86
patches/core/ungoogled-chromium/fix-building-without-safebrowsing.patch

@@ -2,7 +2,7 @@
 
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -3620,9 +3620,6 @@ static_library("browser") {
+@@ -3680,9 +3680,6 @@ static_library("browser") {
        "download/offline_item_model_manager_factory.h",
        "enterprise/connectors/analysis/analysis_service_settings.cc",
        "enterprise/connectors/analysis/analysis_service_settings.h",
@@ -12,7 +12,7 @@
        "enterprise/connectors/analysis/content_analysis_dialog.cc",
        "enterprise/connectors/analysis/content_analysis_dialog.h",
        "enterprise/connectors/analysis/content_analysis_downloads_delegate.cc",
-@@ -6804,9 +6801,14 @@ static_library("browser") {
+@@ -6903,9 +6900,14 @@ static_library("browser") {
        "//components/safe_browsing/content/browser:safe_browsing_blocking_page",
        "//components/safe_browsing/content/browser/download:download_stats",
        "//components/safe_browsing/content/common:file_type_policies",
@@ -44,7 +44,7 @@
    auto delegate = std::make_unique<AccuracyServiceDelegate>(profile);
 --- a/chrome/browser/chrome_content_browser_client.cc
 +++ b/chrome/browser/chrome_content_browser_client.cc
-@@ -4058,11 +4058,13 @@ ChromeContentBrowserClient::CreateThrott
+@@ -4063,11 +4063,13 @@ ChromeContentBrowserClient::CreateThrott
                     &throttles);
  #endif
  
@@ -58,7 +58,7 @@
  
  // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
  // of lacros-chrome is complete.
-@@ -5387,26 +5389,7 @@ ChromeContentBrowserClient::GetSafeBrows
+@@ -5452,26 +5454,7 @@ ChromeContentBrowserClient::GetSafeBrows
      const std::vector<std::string>& allowlist_domains) {
    DCHECK_CURRENTLY_ON(BrowserThread::IO);
  
@@ -86,7 +86,7 @@
  }
  
  safe_browsing::RealTimeUrlLookupServiceBase*
-@@ -5427,11 +5410,6 @@ ChromeContentBrowserClient::GetUrlLookup
+@@ -5492,11 +5475,6 @@ ChromeContentBrowserClient::GetUrlLookup
          GetForProfile(profile);
    }
  #endif
@@ -100,7 +100,7 @@
  
 --- a/chrome/browser/chrome_content_browser_client_receiver_bindings.cc
 +++ b/chrome/browser/chrome_content_browser_client_receiver_bindings.cc
-@@ -131,45 +131,6 @@ void MaybeCreateSafeBrowsingForRenderer(
+@@ -135,45 +135,6 @@ void MaybeCreateSafeBrowsingForRenderer(
          const std::vector<std::string>& allowlist_domains)>
          get_checker_delegate,
      mojo::PendingReceiver<safe_browsing::mojom::SafeBrowsing> receiver) {
@@ -181,7 +181,7 @@
  
 --- a/chrome/browser/download/chrome_download_manager_delegate.cc
 +++ b/chrome/browser/download/chrome_download_manager_delegate.cc
-@@ -129,7 +129,6 @@ using content::DownloadManager;
+@@ -130,7 +130,6 @@ using content::DownloadManager;
  using download::DownloadItem;
  using download::DownloadPathReservationTracker;
  using download::PathValidationResult;
@@ -189,7 +189,7 @@
  using safe_browsing::DownloadProtectionService;
  using ConnectionType = net::NetworkChangeNotifier::ConnectionType;
  
-@@ -1382,8 +1381,6 @@ void ChromeDownloadManagerDelegate::OnDo
+@@ -1389,8 +1388,6 @@ void ChromeDownloadManagerDelegate::OnDo
      if (item->GetOriginalMimeType() == "application/x-x509-user-cert")
        DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true);
  #endif
@@ -198,7 +198,7 @@
    }
    if (ShouldBlockFile(target_info->danger_type, item)) {
      MaybeReportDangerousDownloadBlocked(
-@@ -1522,10 +1519,10 @@ void ChromeDownloadManagerDelegate::Mayb
+@@ -1529,10 +1526,10 @@ void ChromeDownloadManagerDelegate::Mayb
      service->MaybeSendDangerousDownloadOpenedReport(download,
                                                      show_download_in_folder);
    }
@@ -212,14 +212,14 @@
  void ChromeDownloadManagerDelegate::CheckDownloadAllowed(
 --- a/chrome/browser/download/download_stats.cc
 +++ b/chrome/browser/download/download_stats.cc
-@@ -4,6 +4,7 @@
- 
- #include "chrome/browser/download/download_stats.h"
+@@ -7,6 +7,7 @@
+ #include "base/metrics/histogram_functions.h"
+ #include "base/metrics/user_metrics.h"
  #include "components/profile_metrics/browser_profile_type.h"
 +#include "components/safe_browsing/buildflags.h"
  #include "components/safe_browsing/content/browser/download/download_stats.h"
  
- #include "base/metrics/histogram_functions.h"
+ void RecordDownloadCount(ChromeDownloadCountTypes type) {
 @@ -26,8 +27,10 @@ void RecordDangerousDownloadWarningShown
      bool has_user_gesture) {
    base::UmaHistogramEnumeration("Download.ShowedDownloadWarning", danger_type,
@@ -250,7 +250,7 @@
  #include "crypto/secure_hash.h"
 --- a/chrome/browser/enterprise/connectors/connectors_service.cc
 +++ b/chrome/browser/enterprise/connectors/connectors_service.cc
-@@ -446,19 +446,6 @@ absl::optional<std::string> ConnectorsSe
+@@ -422,19 +422,6 @@ absl::optional<std::string> ConnectorsSe
    return absl::nullopt;
  }
  
@@ -295,7 +295,7 @@
    // precedence.
 --- a/chrome/browser/enterprise/signals/context_info_fetcher.cc
 +++ b/chrome/browser/enterprise/signals/context_info_fetcher.cc
-@@ -174,7 +174,6 @@ void ContextInfoFetcher::Fetch(ContextIn
+@@ -179,7 +179,6 @@ void ContextInfoFetcher::Fetch(ContextIn
        GetAnalysisConnectorProviders(enterprise_connectors::FILE_DOWNLOADED);
    info.on_bulk_data_entry_providers =
        GetAnalysisConnectorProviders(enterprise_connectors::BULK_DATA_ENTRY);
@@ -303,7 +303,7 @@
    info.on_security_event_providers = GetOnSecurityEventProviders();
    info.browser_version = version_info::GetVersionNumber();
    info.safe_browsing_protection_level = GetSafeBrowsingProtectionLevel();
-@@ -223,11 +222,6 @@ std::vector<std::string> ContextInfoFetc
+@@ -228,11 +227,6 @@ std::vector<std::string> ContextInfoFetc
    return connectors_service_->GetAnalysisServiceProviderNames(connector);
  }
  
@@ -339,7 +339,7 @@
    std::string browser_version;
    safe_browsing::SafeBrowsingState safe_browsing_protection_level;
    bool site_isolation_enabled;
-@@ -87,7 +86,6 @@ class ContextInfoFetcher {
+@@ -88,7 +87,6 @@ class ContextInfoFetcher {
    std::vector<std::string> GetAnalysisConnectorProviders(
        enterprise_connectors::AnalysisConnector connector);
  
@@ -349,7 +349,7 @@
  
 --- a/chrome/browser/extensions/BUILD.gn
 +++ b/chrome/browser/extensions/BUILD.gn
-@@ -646,8 +646,6 @@ static_library("extensions") {
+@@ -650,8 +650,6 @@ static_library("extensions") {
      "menu_manager_factory.h",
      "navigation_observer.cc",
      "navigation_observer.h",
@@ -360,10 +360,10 @@
      "pending_extension_info.cc",
 --- a/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc
 +++ b/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc
-@@ -71,17 +71,8 @@ api::enterprise_reporting_private::Conte
-           ? std::make_unique<bool>(signals.third_party_blocking_enabled.value())
+@@ -72,17 +72,8 @@ api::enterprise_reporting_private::Conte
            : nullptr;
    info.os_firewall = ToInfoSettingValue(signals.os_firewall);
+   info.system_dns_servers = std::move(signals.system_dns_servers);
 -  switch (signals.realtime_url_check_mode) {
 -    case safe_browsing::REAL_TIME_CHECK_DISABLED:
        info.realtime_url_check_mode = extensions::api::
@@ -380,15 +380,15 @@
  
 --- a/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router.cc
 +++ b/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router.cc
-@@ -307,6 +307,7 @@ void SafeBrowsingPrivateEventRouter::OnD
+@@ -325,6 +325,7 @@ void SafeBrowsingPrivateEventRouter::OnD
      event_router_->BroadcastEvent(std::move(extension_event));
    }
  
 +#if defined(FULL_SAFE_BROWSING)
-   auto settings = GetReportingSettings();
+   absl::optional<enterprise_connectors::ReportingSettings> settings =
+       GetReportingSettings();
    if (!settings.has_value() ||
-       settings->enabled_event_names.count(kKeyDangerousDownloadEvent) == 0) {
-@@ -336,6 +337,7 @@ void SafeBrowsingPrivateEventRouter::OnD
+@@ -355,6 +356,7 @@ void SafeBrowsingPrivateEventRouter::OnD
  
    ReportRealtimeEvent(kKeyDangerousDownloadEvent, std::move(settings.value()),
                        std::move(event));
@@ -396,15 +396,15 @@
  }
  
  void SafeBrowsingPrivateEventRouter::OnSecurityInterstitialShown(
-@@ -363,6 +365,7 @@ void SafeBrowsingPrivateEventRouter::OnS
+@@ -382,6 +384,7 @@ void SafeBrowsingPrivateEventRouter::OnS
      event_router_->BroadcastEvent(std::move(extension_event));
    }
  
 +#if defined(FULL_SAFE_BROWSING)
-   auto settings = GetReportingSettings();
+   absl::optional<enterprise_connectors::ReportingSettings> settings =
+       GetReportingSettings();
    if (!settings.has_value() ||
-       settings->enabled_event_names.count(kKeyInterstitialEvent) == 0) {
-@@ -385,6 +388,7 @@ void SafeBrowsingPrivateEventRouter::OnS
+@@ -405,6 +408,7 @@ void SafeBrowsingPrivateEventRouter::OnS
  
    ReportRealtimeEvent(kKeyInterstitialEvent, std::move(settings.value()),
                        std::move(event));
@@ -412,15 +412,15 @@
  }
  
  void SafeBrowsingPrivateEventRouter::OnSecurityInterstitialProceeded(
-@@ -412,6 +416,7 @@ void SafeBrowsingPrivateEventRouter::OnS
+@@ -432,6 +436,7 @@ void SafeBrowsingPrivateEventRouter::OnS
      event_router_->BroadcastEvent(std::move(extension_event));
    }
  
 +#if defined(FULL_SAFE_BROWSING)
-   auto settings = GetReportingSettings();
+   absl::optional<enterprise_connectors::ReportingSettings> settings =
+       GetReportingSettings();
    if (!settings.has_value() ||
-       settings->enabled_event_names.count(kKeyInterstitialEvent) == 0) {
-@@ -430,6 +435,7 @@ void SafeBrowsingPrivateEventRouter::OnS
+@@ -451,6 +456,7 @@ void SafeBrowsingPrivateEventRouter::OnS
  
    ReportRealtimeEvent(kKeyInterstitialEvent, std::move(settings.value()),
                        std::move(event));
@@ -428,7 +428,7 @@
  }
  
  void SafeBrowsingPrivateEventRouter::OnAnalysisConnectorResult(
-@@ -443,6 +449,7 @@ void SafeBrowsingPrivateEventRouter::OnA
+@@ -464,6 +470,7 @@ void SafeBrowsingPrivateEventRouter::OnA
      const enterprise_connectors::ContentAnalysisResponse::Result& result,
      const int64_t content_size,
      safe_browsing::EventResult event_result) {
@@ -436,7 +436,7 @@
    if (result.tag() == "malware") {
      DCHECK_EQ(1, result.triggered_rules().size());
      OnDangerousDeepScanningResult(
-@@ -454,6 +461,7 @@ void SafeBrowsingPrivateEventRouter::OnA
+@@ -475,6 +482,7 @@ void SafeBrowsingPrivateEventRouter::OnA
      OnSensitiveDataEvent(url, file_name, download_digest_sha256, mime_type,
                           trigger, scan_id, result, content_size, event_result);
    }
@@ -444,15 +444,15 @@
  }
  
  void SafeBrowsingPrivateEventRouter::OnDangerousDeepScanningResult(
-@@ -469,6 +477,7 @@ void SafeBrowsingPrivateEventRouter::OnD
+@@ -490,6 +498,7 @@ void SafeBrowsingPrivateEventRouter::OnD
      const std::string& malware_category,
      const std::string& evidence_locker_filepath,
      const std::string& scan_id) {
 +#if defined(FULL_SAFE_BROWSING)
-   auto settings = GetReportingSettings();
+   absl::optional<enterprise_connectors::ReportingSettings> settings =
+       GetReportingSettings();
    if (!settings.has_value() ||
-       settings->enabled_event_names.count(kKeyDangerousDownloadEvent) == 0) {
-@@ -505,6 +514,7 @@ void SafeBrowsingPrivateEventRouter::OnD
+@@ -527,6 +536,7 @@ void SafeBrowsingPrivateEventRouter::OnD
  
    ReportRealtimeEvent(kKeyDangerousDownloadEvent, std::move(settings.value()),
                        std::move(event));
@@ -460,15 +460,15 @@
  }
  
  void SafeBrowsingPrivateEventRouter::OnSensitiveDataEvent(
-@@ -517,6 +527,7 @@ void SafeBrowsingPrivateEventRouter::OnS
+@@ -539,6 +549,7 @@ void SafeBrowsingPrivateEventRouter::OnS
      const enterprise_connectors::ContentAnalysisResponse::Result& result,
      const int64_t content_size,
      safe_browsing::EventResult event_result) {
 +#if defined(FULL_SAFE_BROWSING)
-   auto settings = GetReportingSettings();
+   absl::optional<enterprise_connectors::ReportingSettings> settings =
+       GetReportingSettings();
    if (!settings.has_value() ||
-       settings->enabled_event_names.count(kKeySensitiveDataEvent) == 0) {
-@@ -548,6 +559,7 @@ void SafeBrowsingPrivateEventRouter::OnS
+@@ -571,6 +582,7 @@ void SafeBrowsingPrivateEventRouter::OnS
  
    ReportRealtimeEvent(kKeySensitiveDataEvent, std::move(settings.value()),
                        std::move(event));
@@ -476,15 +476,15 @@
  }
  
  void SafeBrowsingPrivateEventRouter::OnAnalysisConnectorWarningBypassed(
-@@ -560,6 +572,7 @@ void SafeBrowsingPrivateEventRouter::OnA
+@@ -583,6 +595,7 @@ void SafeBrowsingPrivateEventRouter::OnA
      safe_browsing::DeepScanAccessPoint access_point,
      const enterprise_connectors::ContentAnalysisResponse::Result& result,
      const int64_t content_size) {
 +#if defined(FULL_SAFE_BROWSING)
-   auto settings = GetReportingSettings();
+   absl::optional<enterprise_connectors::ReportingSettings> settings =
+       GetReportingSettings();
    if (!settings.has_value() ||
-       settings->enabled_event_names.count(kKeySensitiveDataEvent) == 0) {
-@@ -591,6 +604,7 @@ void SafeBrowsingPrivateEventRouter::OnA
+@@ -615,6 +628,7 @@ void SafeBrowsingPrivateEventRouter::OnA
  
    ReportRealtimeEvent(kKeySensitiveDataEvent, std::move(settings.value()),
                        std::move(event));
@@ -492,15 +492,15 @@
  }
  
  void SafeBrowsingPrivateEventRouter::OnUnscannedFileEvent(
-@@ -603,6 +617,7 @@ void SafeBrowsingPrivateEventRouter::OnU
+@@ -627,6 +641,7 @@ void SafeBrowsingPrivateEventRouter::OnU
      const std::string& reason,
      const int64_t content_size,
      safe_browsing::EventResult event_result) {
 +#if defined(FULL_SAFE_BROWSING)
-   auto settings = GetReportingSettings();
+   absl::optional<enterprise_connectors::ReportingSettings> settings =
+       GetReportingSettings();
    if (!settings.has_value() ||
-       settings->enabled_event_names.count(kKeyUnscannedFileEvent) == 0) {
-@@ -628,6 +643,7 @@ void SafeBrowsingPrivateEventRouter::OnU
+@@ -653,6 +668,7 @@ void SafeBrowsingPrivateEventRouter::OnU
  
    ReportRealtimeEvent(kKeyUnscannedFileEvent, std::move(settings.value()),
                        std::move(event));
@@ -508,15 +508,15 @@
  }
  
  void SafeBrowsingPrivateEventRouter::OnDangerousDownloadEvent(
-@@ -653,6 +669,7 @@ void SafeBrowsingPrivateEventRouter::OnD
+@@ -678,6 +694,7 @@ void SafeBrowsingPrivateEventRouter::OnD
      const std::string& scan_id,
      const int64_t content_size,
      safe_browsing::EventResult event_result) {
 +#if defined(FULL_SAFE_BROWSING)
-   auto settings = GetReportingSettings();
+   absl::optional<enterprise_connectors::ReportingSettings> settings =
+       GetReportingSettings();
    if (!settings.has_value() ||
-       settings->enabled_event_names.count(kKeyDangerousDownloadEvent) == 0) {
-@@ -682,6 +699,7 @@ void SafeBrowsingPrivateEventRouter::OnD
+@@ -708,6 +725,7 @@ void SafeBrowsingPrivateEventRouter::OnD
  
    ReportRealtimeEvent(kKeyDangerousDownloadEvent, std::move(settings.value()),
                        std::move(event));
@@ -524,23 +524,23 @@
  }
  
  void SafeBrowsingPrivateEventRouter::OnDangerousDownloadWarningBypassed(
-@@ -705,6 +723,7 @@ void SafeBrowsingPrivateEventRouter::OnD
+@@ -731,6 +749,7 @@ void SafeBrowsingPrivateEventRouter::OnD
      const std::string& mime_type,
      const std::string& scan_id,
      const int64_t content_size) {
 +#if defined(FULL_SAFE_BROWSING)
-   auto settings = GetReportingSettings();
+   absl::optional<enterprise_connectors::ReportingSettings> settings =
+       GetReportingSettings();
    if (!settings.has_value() ||
-       settings->enabled_event_names.count(kKeyDangerousDownloadEvent) == 0) {
-@@ -734,6 +753,7 @@ void SafeBrowsingPrivateEventRouter::OnD
+@@ -761,6 +780,7 @@ void SafeBrowsingPrivateEventRouter::OnD
  
    ReportRealtimeEvent(kKeyDangerousDownloadEvent, std::move(settings.value()),
                        std::move(event));
 +#endif // FULL_SAFE_BROWSING
  }
  
- // static
-@@ -1010,7 +1030,11 @@ void SafeBrowsingPrivateEventRouter::Rep
+ void SafeBrowsingPrivateEventRouter::OnLoginEvent(
+@@ -1089,7 +1109,11 @@ void SafeBrowsingPrivateEventRouter::Rep
  }
  
  std::string SafeBrowsingPrivateEventRouter::GetProfileUserName() const {
@@ -554,7 +554,7 @@
  #if BUILDFLAG(IS_CHROMEOS_ASH)
 --- a/chrome/browser/extensions/extension_service.cc
 +++ b/chrome/browser/extensions/extension_service.cc
-@@ -53,7 +53,6 @@
+@@ -54,7 +54,6 @@
  #include "chrome/browser/extensions/forced_extensions/install_stage_tracker.h"
  #include "chrome/browser/extensions/install_verifier.h"
  #include "chrome/browser/extensions/installed_loader.h"
@@ -562,7 +562,7 @@
  #include "chrome/browser/extensions/pending_extension_manager.h"
  #include "chrome/browser/extensions/permissions_updater.h"
  #include "chrome/browser/extensions/shared_module_service.h"
-@@ -373,7 +372,6 @@ ExtensionService::ExtensionService(Profi
+@@ -374,7 +373,6 @@ ExtensionService::ExtensionService(Profi
        safe_browsing_verdict_handler_(extension_prefs,
                                       ExtensionRegistry::Get(profile),
                                       this),
@@ -570,7 +570,7 @@
        registry_(ExtensionRegistry::Get(profile)),
        pending_extension_manager_(profile),
        install_directory_(install_directory),
-@@ -841,47 +839,6 @@ bool ExtensionService::IsExtensionEnable
+@@ -855,47 +853,6 @@ bool ExtensionService::IsExtensionEnable
    return extension_registrar_.IsExtensionEnabled(extension_id);
  }
  
@@ -618,7 +618,7 @@
  
  void ExtensionService::MaybeEnableRemotelyDisabledExtension(
      const std::string& extension_id) {
-@@ -898,56 +855,6 @@ void ExtensionService::MaybeEnableRemote
+@@ -912,56 +869,6 @@ void ExtensionService::MaybeEnableRemote
    unchanged.erase(extension_id);
    // Remove the extension from the blocklist.
    UpdateBlocklistedExtensions({}, unchanged);
@@ -685,7 +685,7 @@
  #include "chrome/browser/extensions/pending_extension_manager.h"
  #include "chrome/browser/extensions/safe_browsing_verdict_handler.h"
  #include "chrome/browser/profiles/profile_manager.h"
-@@ -253,28 +252,11 @@ class ExtensionService : public Extensio
+@@ -258,28 +257,11 @@ class ExtensionService : public Extensio
    // nothing.
    void EnableExtension(const std::string& extension_id);
  
@@ -714,7 +714,7 @@
    // Disables the extension. If the extension is already disabled, just adds
    // the |disable_reasons| (a bitmask of disable_reason::DisableReason - there
    // can be multiple DisableReasons e.g. when an extension comes in disabled
-@@ -546,11 +528,6 @@ class ExtensionService : public Extensio
+@@ -551,11 +533,6 @@ class ExtensionService : public Extensio
    // Helper method to determine if an extension can be blocked.
    bool CanBlockExtension(const Extension* extension) const;
  
@@ -726,7 +726,7 @@
    // Enables an extension that was only previously disabled remotely.
    void MaybeEnableRemotelyDisabledExtension(const std::string& extension_id);
  
-@@ -623,8 +600,6 @@ class ExtensionService : public Extensio
+@@ -628,8 +605,6 @@ class ExtensionService : public Extensio
  
    SafeBrowsingVerdictHandler safe_browsing_verdict_handler_;
  
@@ -737,7 +737,7 @@
  
 --- a/chrome/browser/extensions/extension_system_impl.cc
 +++ b/chrome/browser/extensions/extension_system_impl.cc
-@@ -466,8 +466,6 @@ void ExtensionSystemImpl::InstallUpdate(
+@@ -467,8 +467,6 @@ void ExtensionSystemImpl::InstallUpdate(
  void ExtensionSystemImpl::PerformActionBasedOnOmahaAttributes(
      const std::string& extension_id,
      const base::Value& attributes) {
@@ -777,7 +777,7 @@
  #include "chrome/browser/ui/file_system_access_dialogs.h"
  #include "chrome/common/chrome_paths.h"
  #include "components/content_settings/core/browser/host_content_settings_map.h"
-@@ -301,80 +299,6 @@ BindResultCallbackToCurrentSequence(
+@@ -301,83 +299,6 @@ BindResultCallbackToCurrentSequence(
        base::SequencedTaskRunnerHandle::Get(), std::move(callback));
  }
  
@@ -808,8 +808,11 @@
 -
 -  if (!item->web_contents) {
 -    content::RenderFrameHost* rfh = content::RenderFrameHost::FromID(frame_id);
--    if (rfh)
+-    if (rfh) {
+-      DCHECK_NE(rfh->GetLifecycleState(),
+-                content::RenderFrameHost::LifecycleState::kPrerendering);
 -      item->web_contents = content::WebContents::FromRenderFrameHost(rfh);
+-    }
 -  }
 -
 -  sb_service->download_protection_service()->CheckFileSystemAccessWrite(
@@ -858,7 +861,7 @@
  std::string GenerateLastPickedDirectoryKey(const std::string& id) {
    return id.empty() ? kDefaultLastPickedDirectoryKey
                      : base::StrCat({kCustomLastPickedDirectoryKey, "-", id});
-@@ -1105,28 +1029,6 @@ void ChromeFileSystemAccessPermissionCon
+@@ -1108,28 +1029,6 @@ void ChromeFileSystemAccessPermissionCon
                       std::move(callback)));
  }
  
@@ -949,7 +952,7 @@
  
  #if defined(OS_ANDROID)
  #include "base/feature_list.h"
-@@ -820,6 +819,7 @@ autofill::LanguageCode ChromePasswordMan
+@@ -824,6 +823,7 @@ autofill::LanguageCode ChromePasswordMan
    return autofill::LanguageCode();
  }
  
@@ -957,7 +960,7 @@
  safe_browsing::PasswordProtectionService*
  ChromePasswordManagerClient::GetPasswordProtectionService() const {
    return safe_browsing::ChromePasswordProtectionService::
-@@ -830,13 +830,6 @@ ChromePasswordManagerClient::GetPassword
+@@ -834,13 +834,6 @@ ChromePasswordManagerClient::GetPassword
  void ChromePasswordManagerClient::CheckSafeBrowsingReputation(
      const GURL& form_action,
      const GURL& frame_url) {
@@ -971,7 +974,7 @@
  }
  #endif  // defined(ON_FOCUS_PING_ENABLED)
  
-@@ -846,22 +839,10 @@ void ChromePasswordManagerClient::CheckP
+@@ -850,22 +843,10 @@ void ChromePasswordManagerClient::CheckP
      const std::vector<password_manager::MatchingReusedCredential>&
          matching_reused_credentials,
      bool password_field_exists) {
@@ -994,8 +997,8 @@
 -  }
  }
  
- ukm::SourceId ChromePasswordManagerClient::GetUkmSourceId() {
-@@ -1326,9 +1307,11 @@ void ChromePasswordManagerClient::OnPast
+ #if !defined(OS_ANDROID)
+@@ -1342,9 +1323,11 @@ void ChromePasswordManagerClient::OnPast
    }
  
    was_on_paste_called_ = true;
@@ -1008,7 +1011,7 @@
  
  void ChromePasswordManagerClient::RenderFrameCreated(
      content::RenderFrameHost* render_frame_host) {
-@@ -1363,7 +1346,9 @@ void ChromePasswordManagerClient::OnInpu
+@@ -1379,7 +1362,9 @@ void ChromePasswordManagerClient::OnInpu
    if (key_event.windows_key_code == (ui::VKEY_V & 0x1f)) {
      OnPaste();
    } else {
@@ -1018,7 +1021,7 @@
    }
  #endif  // defined(OS_ANDROID)
  }
-@@ -1402,6 +1387,7 @@ bool ChromePasswordManagerClient::IsPass
+@@ -1418,6 +1403,7 @@ bool ChromePasswordManagerClient::IsPass
      is_enabled = false;
    }
  
@@ -1026,7 +1029,7 @@
    // SafeBrowsing Delayed Warnings experiment can delay some SafeBrowsing
    // warnings until user interaction. If the current page has a delayed warning,
    // it'll have a user interaction observer attached. Disable password
-@@ -1412,6 +1398,7 @@ bool ChromePasswordManagerClient::IsPass
+@@ -1428,6 +1414,7 @@ bool ChromePasswordManagerClient::IsPass
      observer->OnPasswordSaveOrAutofillDenied();
      is_enabled = false;
    }
@@ -1059,7 +1062,7 @@
 +#endif // BUILDFLAG(FULL_SAFE_BROWSING)
  
    void LogPasswordReuseDetectedEvent() override;
- 
+ #if !defined(OS_ANDROID)
 --- a/chrome/browser/permissions/abusive_origin_permission_revocation_request.cc
 +++ b/chrome/browser/permissions/abusive_origin_permission_revocation_request.cc
 @@ -17,7 +17,6 @@
@@ -1214,7 +1217,7 @@
 -  return new RealTimeUrlLookupService(
 -      network::SharedURLLoaderFactory::Create(std::move(url_loader_factory)),
 -      VerdictCacheManagerFactory::GetForProfile(profile),
--      base::BindRepeating(&safe_browsing::GetUserPopulation, profile),
+-      base::BindRepeating(&safe_browsing::GetUserPopulationForProfile, profile),
 -      profile->GetPrefs(),
 -      std::make_unique<SafeBrowsingPrimaryAccountTokenFetcher>(
 -          IdentityManagerFactory::GetForProfile(profile)),
@@ -1270,6 +1273,16 @@
  }
  
  }  // namespace
+--- a/chrome/browser/ui/BUILD.gn
++++ b/chrome/browser/ui/BUILD.gn
+@@ -512,7 +512,6 @@ static_library("ui") {
+     "//components/renderer_context_menu",
+     "//components/resources",
+     "//components/safe_browsing/content/browser",
+-    "//components/safe_browsing/content/browser:client_side_detection",
+     "//components/safe_browsing/content/browser/password_protection",
+     "//components/safe_browsing/content/browser/web_ui",
+     "//components/safe_browsing/core/browser/db:database_manager",
 --- a/chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_desktop.cc
 +++ b/chrome/browser/ui/javascript_dialogs/javascript_tab_modal_dialog_manager_delegate_desktop.cc
 @@ -16,6 +16,7 @@
@@ -1473,6 +1486,24 @@
  
    OnSafeBrowsingResultReceived(title, text, share_url, std::move(files),
                                 std::move(callback),
+--- a/chrome/test/BUILD.gn
++++ b/chrome/test/BUILD.gn
+@@ -1241,7 +1241,6 @@ if (!is_android && !is_fuchsia) {
+       "//components/resources",
+       "//components/safe_browsing:buildflags",
+       "//components/safe_browsing/content/browser",
+-      "//components/safe_browsing/content/browser:client_side_detection",
+       "//components/safe_browsing/content/browser:safe_browsing_service",
+       "//components/safe_browsing/content/browser/password_protection",
+       "//components/safe_browsing/content/browser/password_protection:test_support",
+@@ -5358,7 +5357,6 @@ test("unit_tests") {
+     "//components/resources",
+     "//components/safe_browsing:buildflags",
+     "//components/safe_browsing/content/browser",
+-    "//components/safe_browsing/content/browser:client_side_detection",
+     "//components/safe_browsing/content/browser:client_side_model_loader",
+     "//components/safe_browsing/content/browser/password_protection",
+     "//components/safe_browsing/content/browser/password_protection:mock_password_protection",
 --- a/components/password_manager/content/browser/content_password_manager_driver.cc
 +++ b/components/password_manager/content/browser/content_password_manager_driver.cc
 @@ -408,7 +408,7 @@ void ContentPasswordManagerDriver::Check
@@ -1532,6 +1563,17 @@
  }
  
  void PasswordReuseDetectionManager::SetClockForTesting(base::Clock* clock) {
+--- a/components/safe_browsing/content/browser/BUILD.gn
++++ b/components/safe_browsing/content/browser/BUILD.gn
+@@ -83,8 +83,6 @@ source_set("browser") {
+     "threat_details_cache.h",
+     "threat_details_history.cc",
+     "threat_details_history.h",
+-    "user_population.cc",
+-    "user_population.h",
+     "web_api_handshake_checker.cc",
+     "web_api_handshake_checker.h",
+   ]
 --- a/components/safe_browsing/content/common/proto/BUILD.gn
 +++ b/components/safe_browsing/content/common/proto/BUILD.gn
 @@ -5,8 +5,12 @@
@@ -1561,7 +1603,7 @@
    // A classification model for client-side phishing detection.
 --- a/content/browser/file_system_access/file_system_access_file_writer_impl.cc
 +++ b/content/browser/file_system_access/file_system_access_file_writer_impl.cc
-@@ -339,15 +339,8 @@ void FileSystemAccessFileWriterImpl::Clo
+@@ -343,15 +343,8 @@ void FileSystemAccessFileWriterImpl::Clo
  
    close_callback_ = std::move(callback);
  
@@ -1579,7 +1621,7 @@
  }
  
  void FileSystemAccessFileWriterImpl::AbortImpl(AbortCallback callback) {
-@@ -367,35 +360,6 @@ void FileSystemAccessFileWriterImpl::Abo
+@@ -371,35 +364,6 @@ void FileSystemAccessFileWriterImpl::Abo
    manager()->RemoveFileWriter(this);
  }
  
@@ -1617,7 +1659,7 @@
    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
 --- a/content/browser/file_system_access/file_system_access_file_writer_impl.h
 +++ b/content/browser/file_system_access/file_system_access_file_writer_impl.h
-@@ -103,9 +103,6 @@ class CONTENT_EXPORT FileSystemAccessFil
+@@ -104,9 +104,6 @@ class CONTENT_EXPORT FileSystemAccessFil
    void TruncateImpl(uint64_t length, TruncateCallback callback);
    void CloseImpl(CloseCallback callback);
    void AbortImpl(AbortCallback callback);
@@ -1660,10 +1702,10 @@
  UpdateService::UpdateService(
 --- a/weblayer/BUILD.gn
 +++ b/weblayer/BUILD.gn
-@@ -455,7 +455,6 @@ source_set("weblayer_lib_base") {
-     "//components/pref_registry:pref_registry",
+@@ -458,7 +458,6 @@ source_set("weblayer_lib_base") {
      "//components/prefs",
      "//components/profile_metrics",
+     "//components/safe_browsing/content/browser",
 -    "//components/safe_browsing/content/browser:client_side_detection",
      "//components/safe_browsing/content/common:interfaces",
      "//components/safe_browsing/content/renderer:throttles",

+ 171 - 129
patches/core/ungoogled-chromium/remove-unused-preferences-fields.patch

@@ -12,7 +12,7 @@
  #include "components/url_formatter/url_fixer.h"
  #include "components/user_prefs/user_prefs.h"
  #include "components/visitedlink/browser/visitedlink_writer.h"
-@@ -458,8 +457,6 @@ void AwBrowserContext::RebuildTable(
+@@ -463,8 +462,6 @@ void AwBrowserContext::RebuildTable(
  }
  
  void AwBrowserContext::SetExtendedReportingAllowed(bool allowed) {
@@ -23,7 +23,7 @@
  // TODO(amalova): Make sure NetworkContextParams is configured correctly when
 --- a/chrome/app/settings_strings.grdp
 +++ b/chrome/app/settings_strings.grdp
-@@ -1573,78 +1573,9 @@
+@@ -1591,78 +1591,9 @@
    <message name="IDS_SETTINGS_NETWORK_PREDICTION_ENABLED_DESC_COOKIES_PAGE" desc="On the cookies page, the secondary text next to the checkbox that enables prediction of network actions.">
      Preloads pages that Chrome thinks you might visit. To do this, Chrome may use cookies, if you allow cookies, and may encrypt and send pages through Google to hide your identity from sites.
    </message>
@@ -152,7 +152,7 @@
  jboolean SigninManagerAndroid::IsSigninAllowedByPolicy(JNIEnv* env) const {
 --- a/chrome/browser/android/signin/signin_manager_android.h
 +++ b/chrome/browser/android/signin/signin_manager_android.h
-@@ -113,9 +113,6 @@ class SigninManagerAndroid : public Keye
+@@ -114,9 +114,6 @@ class SigninManagerAndroid : public Keye
  
    Profile* const profile_ = nullptr;
  
@@ -233,7 +233,7 @@
    user_manager::known_user::SetStringPref(
 --- a/chrome/browser/chrome_content_browser_client.cc
 +++ b/chrome/browser/chrome_content_browser_client.cc
-@@ -224,7 +224,6 @@
+@@ -221,7 +221,6 @@
  #include "components/safe_browsing/core/browser/realtime/url_lookup_service.h"
  #include "components/safe_browsing/core/browser/url_checker_delegate.h"
  #include "components/safe_browsing/core/common/features.h"
@@ -289,7 +289,7 @@
  
 --- a/chrome/browser/enterprise/connectors/connectors_service.cc
 +++ b/chrome/browser/enterprise/connectors/connectors_service.cc
-@@ -35,7 +35,6 @@
+@@ -36,7 +36,6 @@
  #include "components/policy/core/common/cloud/machine_level_user_cloud_policy_store.h"
  #include "components/policy/core/common/cloud/user_cloud_policy_manager.h"
  #include "components/policy/core/common/policy_types.h"
@@ -297,7 +297,7 @@
  #include "components/signin/public/identity_manager/consent_level.h"
  #include "components/signin/public/identity_manager/identity_manager.h"
  #include "components/user_prefs/user_prefs.h"
-@@ -389,8 +388,7 @@ std::string ConnectorsService::GetManage
+@@ -365,8 +364,7 @@ std::string ConnectorsService::GetManage
  
    absl::optional<policy::PolicyScope> scope = absl::nullopt;
    for (const char* scope_pref :
@@ -307,7 +307,7 @@
          ConnectorScopePref(AnalysisConnector::FILE_DOWNLOADED),
          ConnectorScopePref(AnalysisConnector::BULK_DATA_ENTRY),
          ConnectorScopePref(ReportingConnector::SECURITY_EVENT)}) {
-@@ -429,20 +427,6 @@ std::string ConnectorsService::GetManage
+@@ -405,20 +403,6 @@ std::string ConnectorsService::GetManage
  
  absl::optional<std::string> ConnectorsService::GetDMTokenForRealTimeUrlCheck()
      const {
@@ -330,7 +330,7 @@
  
 --- a/chrome/browser/enterprise/signals/context_info_fetcher.cc
 +++ b/chrome/browser/enterprise/signals/context_info_fetcher.cc
-@@ -176,12 +176,9 @@ void ContextInfoFetcher::Fetch(ContextIn
+@@ -181,12 +181,9 @@ void ContextInfoFetcher::Fetch(ContextIn
        GetAnalysisConnectorProviders(enterprise_connectors::BULK_DATA_ENTRY);
    info.on_security_event_providers = GetOnSecurityEventProviders();
    info.browser_version = version_info::GetVersionNumber();
@@ -343,7 +343,7 @@
    info.chrome_cleanup_enabled = GetChromeCleanupEnabled();
    info.chrome_remote_desktop_app_blocked = GetChromeRemoteDesktopAppBlocked();
    info.third_party_blocking_enabled = GetThirdPartyBLockingEnabled();
-@@ -227,25 +224,6 @@ std::vector<std::string> ContextInfoFetc
+@@ -232,25 +229,6 @@ std::vector<std::string> ContextInfoFetc
        enterprise_connectors::ReportingConnector::SECURITY_EVENT);
  }
  
@@ -358,18 +358,18 @@
 -
 -  if (safe_browsing_enabled) {
 -    if (safe_browsing_enhanced_enabled)
--      return safe_browsing::ENHANCED_PROTECTION;
+-      return safe_browsing::SafeBrowsingState::ENHANCED_PROTECTION;
 -    else
--      return safe_browsing::STANDARD_PROTECTION;
+-      return safe_browsing::SafeBrowsingState::STANDARD_PROTECTION;
 -  } else {
--    return safe_browsing::NO_SAFE_BROWSING;
+-    return safe_browsing::SafeBrowsingState::NO_SAFE_BROWSING;
 -  }
 -}
 -
  absl::optional<bool> ContextInfoFetcher::GetThirdPartyBLockingEnabled() {
  #if defined(OS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
    return g_browser_process->local_state()->GetBoolean(
-@@ -260,17 +238,6 @@ bool ContextInfoFetcher::GetBuiltInDnsCl
+@@ -265,17 +243,6 @@ bool ContextInfoFetcher::GetBuiltInDnsCl
        prefs::kBuiltInDnsClientEnabled);
  }
  
@@ -409,7 +409,7 @@
    absl::optional<bool> chrome_cleanup_enabled;
    bool chrome_remote_desktop_app_blocked;
    absl::optional<bool> third_party_blocking_enabled;
-@@ -89,13 +87,8 @@ class ContextInfoFetcher {
+@@ -90,13 +88,8 @@ class ContextInfoFetcher {
  
    std::vector<std::string> GetOnSecurityEventProviders();
  
@@ -425,20 +425,20 @@
    absl::optional<bool> GetChromeCleanupEnabled();
 --- a/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc
 +++ b/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc
-@@ -76,45 +76,10 @@ api::enterprise_reporting_private::Conte
+@@ -77,45 +77,10 @@ api::enterprise_reporting_private::Conte
    info.browser_version = std::move(signals.browser_version);
    info.built_in_dns_client_enabled = signals.built_in_dns_client_enabled;
  
 -  switch (signals.safe_browsing_protection_level) {
--    case safe_browsing::NO_SAFE_BROWSING:
+-    case safe_browsing::SafeBrowsingState::NO_SAFE_BROWSING:
 -      info.safe_browsing_protection_level = extensions::api::
 -          enterprise_reporting_private::SAFE_BROWSING_LEVEL_DISABLED;
 -      break;
--    case safe_browsing::STANDARD_PROTECTION:
+-    case safe_browsing::SafeBrowsingState::STANDARD_PROTECTION:
 -      info.safe_browsing_protection_level = extensions::api::
 -          enterprise_reporting_private::SAFE_BROWSING_LEVEL_STANDARD;
 -      break;
--    case safe_browsing::ENHANCED_PROTECTION:
+-    case safe_browsing::SafeBrowsingState::ENHANCED_PROTECTION:
 -      info.safe_browsing_protection_level = extensions::api::
 -          enterprise_reporting_private::SAFE_BROWSING_LEVEL_ENHANCED;
 -      break;
@@ -526,7 +526,7 @@
      {"searchSuggestEnabled", prefs::kSearchSuggestEnabled,
       APIPermissionID::kPrivacy, APIPermissionID::kPrivacy},
      {"spellingServiceEnabled", spellcheck::prefs::kSpellCheckUseSpellingService,
-@@ -842,18 +836,6 @@ ExtensionFunction::ResponseAction SetPre
+@@ -843,18 +837,6 @@ ExtensionFunction::ResponseAction SetPre
          base::Value(browser_pref_value->GetBool()));
    }
  
@@ -628,8 +628,8 @@
  #include "components/search_engines/default_search_manager.h"
  #include "components/spellcheck/browser/pref_names.h"
  #include "components/translate/core/browser/translate_pref_names.h"
-@@ -285,16 +284,6 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
-   }
+@@ -283,16 +282,6 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
+       settings_api::PrefType::PREF_TYPE_BOOLEAN;
  
    // Security page
 -  (*s_allowlist)[::kGeneratedPasswordLeakDetectionPref] =
@@ -735,7 +735,7 @@
  #include "content/public/browser/browser_context.h"
  #include "content/public/browser/browser_thread.h"
  #include "content/public/browser/network_service_instance.h"
-@@ -750,13 +749,6 @@ void ProfileNetworkContextService::Confi
+@@ -738,13 +737,6 @@ void ProfileNetworkContextService::Confi
    network_context_params->enable_certificate_reporting = true;
    network_context_params->enable_expect_ct_reporting = true;
  
@@ -904,9 +904,9 @@
 --- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc
 +++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
 @@ -82,12 +82,9 @@
- #include "components/policy/core/common/policy_pref_names.h"
  #include "components/policy/core/common/schema.h"
  #include "components/policy/policy_constants.h"
+ #include "components/proxy_config/proxy_policy_handler.h"
 -#include "components/safe_browsing/core/common/safe_browsing_policy_handler.h"
 -#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
  #include "components/search_engines/default_search_policy_handler.h"
@@ -977,7 +977,7 @@
    { key::kAccessibilityImageLabelsEnabled,
      prefs::kAccessibilityImageLabelsEnabled,
      base::Value::Type::BOOLEAN },
-@@ -1590,8 +1560,6 @@ std::unique_ptr<ConfigurationPolicyHandl
+@@ -1600,8 +1570,6 @@ std::unique_ptr<ConfigurationPolicyHandl
    handlers->AddHandler(std::make_unique<JavascriptPolicyHandler>());
    handlers->AddHandler(std::make_unique<NetworkPredictionPolicyHandler>());
    handlers->AddHandler(std::make_unique<RestoreOnStartupPolicyHandler>());
@@ -986,7 +986,7 @@
    handlers->AddHandler(std::make_unique<SimpleDeprecatingPolicyHandler>(
        std::make_unique<SimplePolicyHandler>(key::kAuthServerWhitelist,
                                              prefs::kAuthServerAllowlist,
-@@ -1615,9 +1583,6 @@ std::unique_ptr<ConfigurationPolicyHandl
+@@ -1625,9 +1593,6 @@ std::unique_ptr<ConfigurationPolicyHandl
            key::kWindowOcclusionEnabled,
            policy::policy_prefs::kNativeWindowOcclusionEnabled,
            base::Value::Type::BOOLEAN)));
@@ -996,7 +996,7 @@
    handlers->AddHandler(std::make_unique<syncer::SyncPolicyHandler>());
    handlers->AddHandler(std::make_unique<BrowsingHistoryPolicyHandler>());
  
-@@ -1706,12 +1671,6 @@ std::unique_ptr<ConfigurationPolicyHandl
+@@ -1716,12 +1681,6 @@ std::unique_ptr<ConfigurationPolicyHandl
            key::kOnSecurityEventEnterpriseConnector,
            enterprise_connectors::kOnSecurityEventPref,
            enterprise_connectors::kOnSecurityEventScopePref, chrome_schema));
@@ -1009,7 +1009,7 @@
  
    handlers->AddHandler(std::make_unique<BrowsingDataLifetimePolicyHandler>(
        key::kBrowsingDataLifetime, browsing_data::prefs::kBrowsingDataLifetime,
-@@ -1754,17 +1713,6 @@ std::unique_ptr<ConfigurationPolicyHandl
+@@ -1764,17 +1723,6 @@ std::unique_ptr<ConfigurationPolicyHandl
    signin_legacy_policies.push_back(std::make_unique<SimplePolicyHandler>(
        key::kForceBrowserSignin, prefs::kForceBrowserSignin,
        base::Value::Type::BOOLEAN));
@@ -1037,7 +1037,7 @@
  #include "components/search_engines/template_url_prepopulate_data.h"
  #include "components/security_interstitials/content/insecure_form_blocking_page.h"
  #include "components/security_interstitials/content/stateful_ssl_host_state_delegate.h"
-@@ -878,7 +877,6 @@ void RegisterLocalState(PrefRegistrySimp
+@@ -905,7 +904,6 @@ void RegisterLocalState(PrefRegistrySimp
    ProfileNetworkContextService::RegisterLocalStatePrefs(registry);
    profiles::RegisterPrefs(registry);
    RegisterScreenshotPrefs(registry);
@@ -1045,7 +1045,7 @@
    secure_origin_allowlist::RegisterPrefs(registry);
  #if !defined(OS_ANDROID)
    SerialPolicyAllowedPorts::RegisterPrefs(registry);
-@@ -1123,7 +1121,6 @@ void RegisterProfilePrefs(user_prefs::Pr
+@@ -1152,7 +1150,6 @@ void RegisterProfilePrefs(user_prefs::Pr
    PushMessagingAppIdentifier::RegisterProfilePrefs(registry);
    QuietNotificationPermissionUiState::RegisterProfilePrefs(registry);
    RegisterBrowserUserPrefs(registry);
@@ -1212,7 +1212,7 @@
    ProfileAttributesEntry* entry = InitEntryWithKey(key, params.is_omitted);
 --- a/chrome/browser/profiles/profile_impl.cc
 +++ b/chrome/browser/profiles/profile_impl.cc
-@@ -141,7 +141,6 @@
+@@ -149,7 +149,6 @@
  #include "components/prefs/scoped_user_pref_update.h"
  #include "components/profile_metrics/browser_profile_type.h"
  #include "components/security_interstitials/content/stateful_ssl_host_state_delegate.h"
@@ -1230,7 +1230,7 @@
  #include "components/signin/public/identity_manager/consent_level.h"
  #include "components/signin/public/identity_manager/identity_manager.h"
  #include "components/signin/public/identity_manager/primary_account_mutator.h"
-@@ -2083,8 +2082,7 @@ void ProfileManager::AddProfileToStorage
+@@ -2092,8 +2091,7 @@ void ProfileManager::AddProfileToStorage
        entry->SetAuthInfo(account_info.gaia, username,
                           is_consented_primary_account);
  
@@ -1240,7 +1240,7 @@
  
  #if !defined(OS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
        // Sign out if force-sign-in policy is enabled and profile is not signed
-@@ -2139,14 +2137,13 @@ void ProfileManager::AddProfileToStorage
+@@ -2148,14 +2146,13 @@ void ProfileManager::AddProfileToStorage
  
    init_params.is_ephemeral = IsEphemeral(profile);
    init_params.is_signed_in_with_credential_provider =
@@ -1293,8 +1293,8 @@
      </cr-dialog>
 --- a/chrome/browser/resources/settings/privacy_page/privacy_page.html
 +++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html
-@@ -748,7 +748,7 @@
-           </template>
+@@ -536,7 +536,7 @@
+           </category-setting-exceptions>
          </settings-subpage>
        </template>
 -      <template is="dom-if" if="[[enableSafeBrowsingSubresourceFilter_]]"
@@ -1460,9 +1460,9 @@
    /**
 --- a/chrome/browser/resources/settings/site_settings_page/site_settings_page.js
 +++ b/chrome/browser/resources/settings/site_settings_page/site_settings_page.js
-@@ -56,7 +56,7 @@ function getCategoryItemMap() {
-       disabledLabel: redesignEnabled ? 'siteSettingsAdsBlocked' :
-                                        'siteSettingsAdsBlock',
+@@ -51,7 +51,7 @@ function getCategoryItemMap() {
+       enabledLabel: 'siteSettingsAdsAllowed',
+       disabledLabel: 'siteSettingsAdsBlocked',
        shouldShow: () =>
 -          loadTimeData.getBoolean('enableSafeBrowsingSubresourceFilter'),
 +          false,
@@ -1627,7 +1627,7 @@
  }
  
  bool ChromePasswordProtectionService::IsExtendedReporting() {
-@@ -1493,40 +1484,7 @@ bool ChromePasswordProtectionService::Is
+@@ -1493,44 +1484,7 @@ bool ChromePasswordProtectionService::Is
  bool ChromePasswordProtectionService::IsPingingEnabled(
      LoginReputationClientRequest::TriggerType trigger_type,
      ReusedPasswordAccountType password_type) {
@@ -1652,12 +1652,16 @@
 -      return extended_reporting_enabled;
 -    }
 -
--// TODO(rsamp) Expand GAIA password pings from extended reporting to the general
--// Safe Browsing population.
--
--// Only saved password reuse warnings are shown on Android, so other types of
--// password reuse events should be gated by extended reporting.
+-// Only saved password and GAIA password reuse warnings are shown to users on
+-// Android, so other types of password reuse events should be gated by Safe
+-// Browsing extended reporting.
 -#if defined(OS_ANDROID)
+-    if (password_type.account_type() ==
+-            ReusedPasswordAccountType::SAVED_PASSWORD ||
+-        IsSyncingGMAILPasswordWithSignedInProtectionEnabled(password_type)) {
+-      return true;
+-    }
+-
 -    return extended_reporting_enabled;
 -#else
 -    return true;
@@ -1669,7 +1673,7 @@
  }
  
  RequestOutcome ChromePasswordProtectionService::GetPingNotSentReason(
-@@ -1721,22 +1679,6 @@ MaybeCreateNavigationThrottle(content::N
+@@ -1725,22 +1679,6 @@ MaybeCreateNavigationThrottle(content::N
                   : nullptr;
  }
  
@@ -1694,7 +1698,7 @@
    if (!profile_)
 --- a/chrome/browser/safe_browsing/chrome_password_protection_service.h
 +++ b/chrome/browser/safe_browsing/chrome_password_protection_service.h
-@@ -212,13 +212,6 @@ class ChromePasswordProtectionService :
+@@ -213,13 +213,6 @@ class ChromePasswordProtectionService :
    bool UserClickedThroughSBInterstitial(
        PasswordProtectionRequest* request) override;
  
@@ -1762,7 +1766,7 @@
  #include "content/public/browser/browser_task_traits.h"
 --- a/chrome/browser/safe_browsing/download_protection/download_protection_service_unittest.cc
 +++ b/chrome/browser/safe_browsing/download_protection/download_protection_service_unittest.cc
-@@ -90,7 +90,6 @@
+@@ -93,7 +93,6 @@
  #include "components/safe_browsing/core/browser/db/v4_protocol_manager_util.h"
  #include "components/safe_browsing/core/common/features.h"
  #include "components/safe_browsing/core/common/proto/csd.pb.h"
@@ -1975,7 +1979,7 @@
  #include "components/security_interstitials/content/security_interstitial_tab_helper.h"
 --- a/chrome/browser/safe_browsing/safe_browsing_service.cc
 +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
-@@ -103,7 +103,6 @@ base::FilePath SafeBrowsingService::GetB
+@@ -100,7 +100,6 @@ base::FilePath SafeBrowsingService::GetB
  
  SafeBrowsingService::SafeBrowsingService()
      : services_delegate_(ServicesDelegate::Create(this)),
@@ -1983,7 +1987,7 @@
        shutdown_(false),
        enabled_(false),
        enabled_by_prefs_(false) {}
-@@ -256,8 +255,6 @@ TriggerManager* SafeBrowsingService::tri
+@@ -253,8 +252,6 @@ TriggerManager* SafeBrowsingService::tri
  
  PasswordProtectionService* SafeBrowsingService::GetPasswordProtectionService(
      Profile* profile) const {
@@ -1992,7 +1996,7 @@
    return nullptr;
  }
  
-@@ -386,9 +383,6 @@ void SafeBrowsingService::OnProfileAdded
+@@ -383,9 +380,6 @@ void SafeBrowsingService::OnProfileAdded
    std::unique_ptr<PrefChangeRegistrar> registrar =
        std::make_unique<PrefChangeRegistrar>();
    registrar->Init(pref_service);
@@ -2002,7 +2006,7 @@
    // ClientSideDetectionService will need to be refresh the models
    // renderers have if extended-reporting changes.
    registrar->Add(prefs::kSafeBrowsingScoutReportingEnabled,
-@@ -400,14 +394,6 @@ void SafeBrowsingService::OnProfileAdded
+@@ -397,14 +391,6 @@ void SafeBrowsingService::OnProfileAdded
    prefs_map_[pref_service] = std::move(registrar);
    RefreshState();
  
@@ -2017,7 +2021,7 @@
    // Extended Reporting metrics are handled together elsewhere.
    RecordExtendedReportingMetrics(*pref_service);
  
-@@ -445,18 +431,6 @@ void SafeBrowsingService::RefreshState()
+@@ -442,18 +428,6 @@ void SafeBrowsingService::RefreshState()
    DCHECK_CURRENTLY_ON(BrowserThread::UI);
    // Check if any profile requires the service to be active.
    enabled_by_prefs_ = false;
@@ -2221,7 +2225,7 @@
  #include "components/user_manager/user_manager.h"
 --- a/chrome/browser/signin/dice_browsertest.cc
 +++ b/chrome/browser/signin/dice_browsertest.cc
-@@ -61,7 +61,6 @@
+@@ -59,7 +59,6 @@
  #include "components/signin/public/base/account_consistency_method.h"
  #include "components/signin/public/base/signin_client.h"
  #include "components/signin/public/base/signin_metrics.h"
@@ -2258,6 +2262,45 @@
  #include "content/public/common/content_client.h"
  #include "content/public/test/browser_test.h"
  #include "google_apis/gaia/gaia_urls.h"
+--- a/chrome/browser/signin/signin_manager.cc
++++ b/chrome/browser/signin/signin_manager.cc
+@@ -5,7 +5,6 @@
+ #include "chrome/browser/signin/signin_manager.h"
+ 
+ #include "components/prefs/pref_service.h"
+-#include "components/signin/public/base/signin_pref_names.h"
+ #include "components/signin/public/identity_manager/accounts_in_cookie_jar_info.h"
+ #include "components/signin/public/identity_manager/identity_manager.h"
+ #include "components/signin/public/identity_manager/primary_account_mutator.h"
+@@ -13,11 +12,6 @@
+ SigninManager::SigninManager(PrefService* prefs,
+                              signin::IdentityManager* identity_manager)
+     : prefs_(prefs), identity_manager_(identity_manager) {
+-  signin_allowed_.Init(
+-      prefs::kSigninAllowed, prefs_,
+-      base::BindRepeating(&SigninManager::OnSigninAllowedPrefChanged,
+-                          base::Unretained(this)));
+-
+   UpdateUnconsentedPrimaryAccount();
+   identity_manager_->AddObserver(this);
+ }
+@@ -63,16 +57,6 @@ SigninManager::ComputeUnconsentedPrimary
+         signin::ConsentLevel::kSync);
+   }
+ 
+-  // Clearing the primary sync account when sign-in is not allowed is handled
+-  // by PrimaryAccountPolicyManager. That flow is extremely hard to follow
+-  // especially for the case when the user is syncing with a managed account
+-  // as in that case the whole profile needs to be deleted.
+-  //
+-  // It was considered simpler to keep the logic to update the unconsented
+-  // primary account in a single place.
+-  if (!signin_allowed_.GetValue())
+-    return absl::nullopt;
+-
+   signin::AccountsInCookieJarInfo cookie_info =
+       identity_manager_->GetAccountsInCookieJar();
+ 
 --- a/chrome/browser/signin/signin_promo_util.cc
 +++ b/chrome/browser/signin/signin_promo_util.cc
 @@ -8,7 +8,6 @@
@@ -2438,9 +2481,9 @@
      // Copy supervised user settings to prefs.
 --- a/chrome/browser/ui/autofill/payments/save_card_bubble_controller_impl.cc
 +++ b/chrome/browser/ui/autofill/payments/save_card_bubble_controller_impl.cc
-@@ -39,7 +39,6 @@
- #include "components/autofill/core/common/autofill_prefs.h"
- #include "components/prefs/pref_service.h"
+@@ -37,7 +37,6 @@
+ #include "components/autofill/core/common/autofill_features.h"
+ #include "components/autofill/core/common/autofill_payments_features.h"
  #include "components/signin/public/base/signin_buildflags.h"
 -#include "components/signin/public/base/signin_pref_names.h"
  #include "components/signin/public/identity_manager/identity_manager.h"
@@ -2467,7 +2510,7 @@
  
    InitCommandState();
  
-@@ -1521,7 +1516,7 @@ void BrowserCommandController::UpdateSho
+@@ -1526,7 +1521,7 @@ void BrowserCommandController::UpdateSho
      return;
  
    command_updater_.UpdateCommandEnabled(
@@ -2663,28 +2706,8 @@
  #include "components/signin/public/identity_manager/identity_test_utils.h"
  #include "content/public/browser/render_frame_host.h"
  #include "content/public/browser/render_process_host.h"
---- a/chrome/browser/ui/webui/downloads/downloads_dom_handler.cc
-+++ b/chrome/browser/ui/webui/downloads/downloads_dom_handler.cc
-@@ -37,7 +37,6 @@
- #include "chrome/common/url_constants.h"
- #include "components/download/public/common/download_item.h"
- #include "components/prefs/pref_service.h"
--#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
- #include "content/public/browser/browser_thread.h"
- #include "content/public/browser/download_manager.h"
- #include "content/public/browser/render_process_host.h"
---- a/chrome/browser/ui/webui/management/management_ui_handler.cc
-+++ b/chrome/browser/ui/webui/management/management_ui_handler.cc
-@@ -29,7 +29,6 @@
- #include "chrome/browser/profiles/profile.h"
- #include "chrome/browser/ui/managed_ui.h"
- #include "chrome/common/pref_names.h"
--#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
- #include "components/strings/grit/components_strings.h"
- #include "content/public/browser/storage_partition.h"
- #include "content/public/browser/web_contents.h"
---- a/chrome/browser/ui/webui/new_tab_page/promo_browser_command/promo_browser_command_handler.cc
-+++ b/chrome/browser/ui/webui/new_tab_page/promo_browser_command/promo_browser_command_handler.cc
+--- a/chrome/browser/ui/webui/browser_command/browser_command_handler.cc
++++ b/chrome/browser/ui/webui/browser_command/browser_command_handler.cc
 @@ -16,7 +16,6 @@
  #include "chrome/common/webui_url_constants.h"
  #include "components/safe_browsing/content/browser/web_ui/safe_browsing_ui.h"
@@ -2693,7 +2716,7 @@
  #include "ui/base/page_transition_types.h"
  #include "ui/base/window_open_disposition.h"
  
-@@ -61,13 +60,6 @@ void PromoBrowserCommandHandler::CanExec
+@@ -61,13 +60,6 @@ void BrowserCommandHandler::CanExecuteCo
        can_execute =
            !chrome::enterprise_util::HasBrowserPoliciesApplied(profile_);
        break;
@@ -2707,6 +2730,26 @@
      case Command::kOpenFeedbackForm:
        can_execute = true;
        break;
+--- a/chrome/browser/ui/webui/downloads/downloads_dom_handler.cc
++++ b/chrome/browser/ui/webui/downloads/downloads_dom_handler.cc
+@@ -37,7 +37,6 @@
+ #include "chrome/common/url_constants.h"
+ #include "components/download/public/common/download_item.h"
+ #include "components/prefs/pref_service.h"
+-#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
+ #include "content/public/browser/browser_thread.h"
+ #include "content/public/browser/download_manager.h"
+ #include "content/public/browser/render_process_host.h"
+--- a/chrome/browser/ui/webui/management/management_ui_handler.cc
++++ b/chrome/browser/ui/webui/management/management_ui_handler.cc
+@@ -29,7 +29,6 @@
+ #include "chrome/browser/profiles/profile.h"
+ #include "chrome/browser/ui/managed_ui.h"
+ #include "chrome/common/pref_names.h"
+-#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
+ #include "components/strings/grit/components_strings.h"
+ #include "content/public/browser/storage_partition.h"
+ #include "content/public/browser/web_contents.h"
 --- a/chrome/browser/ui/webui/profile_info_watcher.cc
 +++ b/chrome/browser/ui/webui/profile_info_watcher.cc
 @@ -12,7 +12,6 @@
@@ -2760,7 +2803,7 @@
  #include "components/signin/public/identity_manager/accounts_mutator.h"
  #include "components/signin/public/identity_manager/consent_level.h"
  #include "components/signin/public/identity_manager/identity_manager.h"
-@@ -287,10 +286,6 @@ void PeopleHandler::RegisterMessages() {
+@@ -292,10 +291,6 @@ void PeopleHandler::RegisterMessages() {
  void PeopleHandler::OnJavascriptAllowed() {
    PrefService* prefs = profile_->GetPrefs();
    profile_pref_registrar_.Init(prefs);
@@ -2791,7 +2834,7 @@
  #include "components/signin/public/base/signin_buildflags.h"
  #include "components/strings/grit/components_chromium_strings.h"
  #include "components/strings/grit/components_strings.h"
-@@ -1386,46 +1385,6 @@ void AddPrivacyStrings(content::WebUIDat
+@@ -1390,46 +1389,6 @@ void AddPrivacyStrings(content::WebUIDat
      {"clearBrowsingData", IDS_SETTINGS_CLEAR_BROWSING_DATA},
      {"clearBrowsingDataDescription", IDS_SETTINGS_CLEAR_DATA_DESCRIPTION},
      {"titleAndCount", IDS_SETTINGS_TITLE_AND_COUNT},
@@ -2838,7 +2881,7 @@
      {"safeBrowsingSectionLabel", IDS_SETTINGS_SAFEBROWSING_SECTION_LABEL},
      {"syncAndGoogleServicesPrivacyDescription",
       IDS_SETTINGS_SYNC_AND_GOOGLE_SERVICES_PRIVACY_DESC_UNIFIED_CONSENT},
-@@ -2584,11 +2543,6 @@ void AddSiteSettingsStrings(content::Web
+@@ -2582,11 +2541,6 @@ void AddSiteSettingsStrings(content::Web
    html_source->AddLocalizedStrings(kSensorsLocalizedStrings);
  
    html_source->AddBoolean(
@@ -2852,7 +2895,7 @@
  
 --- a/chrome/browser/ui/webui/settings/settings_ui.cc
 +++ b/chrome/browser/ui/webui/settings/settings_ui.cc
-@@ -74,7 +74,6 @@
+@@ -71,7 +71,6 @@
  #include "components/pref_registry/pref_registry_syncable.h"
  #include "components/prefs/pref_service.h"
  #include "components/safe_browsing/core/common/features.h"
@@ -2860,7 +2903,7 @@
  #include "content/public/browser/url_data_source.h"
  #include "content/public/browser/web_contents.h"
  #include "content/public/browser/web_ui.h"
-@@ -285,9 +284,7 @@ SettingsUI::SettingsUI(content::WebUI* w
+@@ -276,9 +275,7 @@ SettingsUI::SettingsUI(content::WebUI* w
            ? "enable-branding-update"
            : "");
  
@@ -2873,15 +2916,15 @@
                            base::FeatureList::IsEnabled(
 --- a/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper.cc
 +++ b/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper.cc
-@@ -48,7 +48,6 @@
- #include "components/policy/core/common/management/platform_management_service.h"
+@@ -47,7 +47,6 @@
+ #include "components/policy/core/common/management/management_service.h"
  #include "components/prefs/pref_service.h"
  #include "components/signin/public/base/signin_metrics.h"
 -#include "components/signin/public/base/signin_pref_names.h"
  #include "components/signin/public/identity_manager/accounts_mutator.h"
  #include "components/signin/public/identity_manager/identity_manager.h"
  #include "components/signin/public/identity_manager/primary_account_mutator.h"
-@@ -243,8 +242,7 @@ DiceTurnSyncOnHelper::DiceTurnSyncOnHelp
+@@ -242,8 +241,7 @@ DiceTurnSyncOnHelper::DiceTurnSyncOnHelp
    // last authenticated account of the current profile, then Chrome will show a
    // confirmation dialog before starting sync.
    // TODO(skym): Warn for high risk upgrade scenario (https://crbug.com/572754).
@@ -2893,7 +2936,7 @@
        base::BindOnce(&DiceTurnSyncOnHelper::OnMergeAccountConfirmation,
 --- a/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper_unittest.cc
 +++ b/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper_unittest.cc
-@@ -37,7 +37,6 @@
+@@ -38,7 +38,6 @@
  #include "components/prefs/pref_service.h"
  #include "components/signin/public/base/account_consistency_method.h"
  #include "components/signin/public/base/signin_metrics.h"
@@ -3046,7 +3089,7 @@
  #include "services/network/public/cpp/shared_url_loader_factory.h"
  
  namespace password_manager {
-@@ -162,28 +161,7 @@ void LeakDetectionDelegate::OnError(Leak
+@@ -163,28 +162,7 @@ void LeakDetectionDelegate::OnError(Leak
  
  bool CanStartLeakCheck(const PrefService& prefs,
                         const PasswordManagerClient* client) {
@@ -3059,14 +3102,14 @@
 -  safe_browsing::SafeBrowsingState sb_state =
 -      safe_browsing::GetSafeBrowsingState(prefs);
 -  switch (sb_state) {
--    case safe_browsing::NO_SAFE_BROWSING:
+-    case safe_browsing::SafeBrowsingState::NO_SAFE_BROWSING:
 -      LogString(client, Logger::STRING_LEAK_DETECTION_DISABLED_SAFE_BROWSING);
 -      return false;
--    case safe_browsing::STANDARD_PROTECTION:
+-    case safe_browsing::SafeBrowsingState::STANDARD_PROTECTION:
 -      if (!is_leak_protection_on)
 -        LogString(client, Logger::STRING_LEAK_DETECTION_DISABLED_FEATURE);
 -      return is_leak_protection_on;
--    case safe_browsing::ENHANCED_PROTECTION:
+-    case safe_browsing::SafeBrowsingState::ENHANCED_PROTECTION:
 -      // feature is on.
 -      break;
 -  }
@@ -3140,7 +3183,7 @@
  void PasswordReuseManagerImpl::OnGetPasswordStoreResults(
 --- a/components/password_manager/core/browser/password_store.cc
 +++ b/components/password_manager/core/browser/password_store.cc
-@@ -42,7 +42,6 @@
+@@ -44,7 +44,6 @@
  #include "components/password_manager/core/common/password_manager_features.h"
  #include "components/password_manager/core/common/password_manager_pref_names.h"
  #include "components/prefs/pref_service.h"
@@ -3380,16 +3423,16 @@
 -  }
 -
 -  if (!pref_service_->GetBoolean(prefs::kSafeBrowsingEnhanced)) {
--    AddSafeBrowsingEventAndUserStateToPref(UserState::ENHANCED_PROTECTION,
+-    AddSafeBrowsingEventAndUserStateToPref(UserState::kEnhancedProtection,
 -                                           EventType::USER_STATE_DISABLED);
 -    int disabled_times_last_week = GetEventCountSince(
--        UserState::ENHANCED_PROTECTION, EventType::USER_STATE_DISABLED,
+-        UserState::kEnhancedProtection, EventType::USER_STATE_DISABLED,
 -        base::Time::Now() - base::TimeDelta::FromDays(7));
 -    if (disabled_times_last_week <= kEsbDisabledMetricsQuota) {
 -      LogEnhancedProtectionDisabledMetrics();
 -    }
 -  } else {
--    AddSafeBrowsingEventAndUserStateToPref(UserState::ENHANCED_PROTECTION,
+-    AddSafeBrowsingEventAndUserStateToPref(UserState::kEnhancedProtection,
 -                                           EventType::USER_STATE_ENABLED);
 -  }
  }
@@ -3409,18 +3452,18 @@
  
  UserState SafeBrowsingMetricsCollector::GetUserState() {
 -  if (IsSafeBrowsingPolicyManaged(*pref_service_)) {
--    return UserState::MANAGED;
+-    return UserState::kManaged;
 -  }
 -
 -  SafeBrowsingState sb_state = GetSafeBrowsingState(*pref_service_);
 -  switch (sb_state) {
 -    case SafeBrowsingState::ENHANCED_PROTECTION:
--      return UserState::ENHANCED_PROTECTION;
+-      return UserState::kEnhancedProtection;
 -    case SafeBrowsingState::STANDARD_PROTECTION:
--      return UserState::STANDARD_PROTECTION;
+-      return UserState::kStandardProtection;
 -    case SafeBrowsingState::NO_SAFE_BROWSING:
 -      NOTREACHED() << "Unexpected Safe Browsing state.";
--      return UserState::STANDARD_PROTECTION;
+-      return UserState::kStandardProtection;
 -  }
 +  NOTREACHED() << "Unexpected Safe Browsing state.";
  }
@@ -3436,11 +3479,11 @@
  #include "components/safe_browsing/core/common/utils.h"
  #include "components/sessions/content/session_tab_helper.h"
  #include "content/public/browser/navigation_details.h"
-@@ -299,7 +298,7 @@ GURL SafeBrowsingNavigationObserverManag
+@@ -304,7 +303,7 @@ GURL SafeBrowsingNavigationObserverManag
  bool SafeBrowsingNavigationObserverManager::IsEnabledAndReady(
      PrefService* prefs,
-     SafeBrowsingServiceInterface* safe_browsing_service) {
--  return IsSafeBrowsingEnabled(*prefs) && safe_browsing_service;
+     bool has_safe_browsing_service) {
+-  return IsSafeBrowsingEnabled(*prefs) && has_safe_browsing_service;
 +  return false;
  }
  
@@ -3569,7 +3612,7 @@
  #include "services/network/public/mojom/cookie_manager.mojom.h"
  #if BUILDFLAG(FULL_SAFE_BROWSING)
  #include "components/enterprise/common/proto/connectors.pb.h"
-@@ -1962,18 +1961,13 @@ void SafeBrowsingUIHandler::GetPrefs(con
+@@ -1991,18 +1990,13 @@ void SafeBrowsingUIHandler::GetPrefs(con
    AllowJavascript();
    std::string callback_id;
    args->GetString(0, &callback_id);
@@ -3659,7 +3702,7 @@
  void V4LocalDatabaseManager::UpdateRequestCompleted(
 --- a/components/safe_browsing/core/browser/db/v4_local_database_manager.h
 +++ b/components/safe_browsing/core/browser/db/v4_local_database_manager.h
-@@ -36,8 +36,7 @@ class V4LocalDatabaseManager : public Sa
+@@ -37,8 +37,7 @@ class V4LocalDatabaseManager : public Sa
    static scoped_refptr<V4LocalDatabaseManager> Create(
        const base::FilePath& base_path,
        scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
@@ -3669,7 +3712,7 @@
  
    // Populates the protobuf with the database data.
    void CollectDatabaseManagerInfo(
-@@ -104,7 +103,6 @@ class V4LocalDatabaseManager : public Sa
+@@ -105,7 +104,6 @@ class V4LocalDatabaseManager : public Sa
    // Must be initialized by calling StartOnIOThread() before using.
    V4LocalDatabaseManager(
        const base::FilePath& base_path,
@@ -3677,7 +3720,7 @@
        scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
        scoped_refptr<base::SequencedTaskRunner> io_task_runner,
        scoped_refptr<base::SequencedTaskRunner> task_runner_for_tests);
-@@ -363,10 +361,6 @@ class V4LocalDatabaseManager : public Sa
+@@ -364,10 +362,6 @@ class V4LocalDatabaseManager : public Sa
    // ready to process next update.
    DatabaseUpdatedCallback db_updated_callback_;
  
@@ -3949,18 +3992,18 @@
  #include "components/unified_consent/pref_names.h"
  #include "net/base/ip_address.h"
  #include "net/base/load_flags.h"
-@@ -60,10 +59,6 @@ RealTimeUrlLookupService::RealTimeUrlLoo
-       is_off_the_record_(is_off_the_record),
+@@ -61,10 +60,6 @@ RealTimeUrlLookupService::RealTimeUrlLoo
        variations_(variations_service) {
    pref_change_registrar_.Init(pref_service_);
--  pref_change_registrar_.Add(
+   pref_change_registrar_.Add(
 -      prefs::kSafeBrowsingEnhanced,
 -      base::BindRepeating(&RealTimeUrlLookupService::OnPrefChanged,
 -                          base::Unretained(this)));
-   pref_change_registrar_.Add(
+-  pref_change_registrar_.Add(
        unified_consent::prefs::kUrlKeyedAnonymizedDataCollectionEnabled,
        base::BindRepeating(&RealTimeUrlLookupService::OnPrefChanged,
-@@ -131,7 +126,7 @@ int RealTimeUrlLookupService::GetReferre
+                           base::Unretained(this)));
+@@ -134,7 +129,7 @@ int RealTimeUrlLookupService::GetReferre
  }
  
  bool RealTimeUrlLookupService::CanCheckSubresourceURL() const {
@@ -4426,7 +4469,7 @@
  #include "components/sync_preferences/testing_pref_service_syncable.h"
 --- a/components/signin/core/browser/account_reconcilor_unittest.cc
 +++ b/components/signin/core/browser/account_reconcilor_unittest.cc
-@@ -28,7 +28,6 @@
+@@ -29,7 +29,6 @@
  #include "components/signin/public/base/list_accounts_test_utils.h"
  #include "components/signin/public/base/signin_buildflags.h"
  #include "components/signin/public/base/signin_metrics.h"
@@ -4547,7 +4590,7 @@
 -
 -  base::DictionaryValue* dict = nullptr;
 -  ListPrefUpdate update(pref_service_, prefs::kAccountInfo);
--  for (size_t i = 0; i < update->GetSize(); ++i, dict = nullptr) {
+-  for (size_t i = 0; i < update->GetList().size(); ++i, dict = nullptr) {
 -    if (update->GetDictionary(i, &dict)) {
 -      std::string value;
 -      if (dict->GetString(kAccountKeyPath, &value) &&
@@ -4570,7 +4613,7 @@
  void AccountTrackerService::LoadFromPrefs() {
 -  const base::ListValue* list = pref_service_->GetList(prefs::kAccountInfo);
    std::set<CoreAccountId> to_remove;
--  for (size_t i = 0; i < list->GetSize(); ++i) {
+-  for (size_t i = 0; i < list->GetList().size(); ++i) {
 +  for (size_t i = 0; false; ++i) {
      const base::DictionaryValue* dict = nullptr;
 -    if (list->GetDictionary(i, &dict)) {
@@ -4603,7 +4646,7 @@
  
    base::DictionaryValue* dict = nullptr;
 -  ListPrefUpdate update(pref_service_, prefs::kAccountInfo);
--  for (size_t i = 0; i < update->GetSize(); ++i, dict = nullptr) {
+-  for (size_t i = 0; i < update->GetList().size(); ++i, dict = nullptr) {
 -    if (update->GetDictionary(i, &dict)) {
 +  if (false) {
 +    while (false) {
@@ -4616,7 +4659,7 @@
      dict = new base::DictionaryValue();
 -    update->Append(base::WrapUnique(dict));
 -    // |dict| is invalidated at this point, so it needs to be reset.
--    update->GetDictionary(update->GetSize() - 1, &dict);
+-    update->GetDictionary(update->GetList().size() - 1, &dict);
      dict->SetString(kAccountKeyPath, account_info.account_id.ToString());
    }
  
@@ -4666,7 +4709,7 @@
  #include "components/signin/public/identity_manager/set_accounts_in_cookie_result.h"
  #include "google_apis/gaia/gaia_constants.h"
  #include "google_apis/gaia/gaia_urls.h"
-@@ -459,9 +458,7 @@ GaiaCookieManagerService::GaiaCookieMana
+@@ -457,9 +456,7 @@ GaiaCookieManagerService::GaiaCookieMana
        listAccountsUnexpectedServerResponseRetried_(false),
        external_cc_result_fetched_(false),
        list_accounts_stale_(true) {
@@ -4677,7 +4720,7 @@
  
    if (!gaia_cookie_last_list_accounts_data.empty()) {
      if (!gaia::ParseListAccountsData(gaia_cookie_last_list_accounts_data,
-@@ -485,8 +482,6 @@ GaiaCookieManagerService::~GaiaCookieMan
+@@ -483,8 +480,6 @@ GaiaCookieManagerService::~GaiaCookieMan
  
  // static
  void GaiaCookieManagerService::RegisterPrefs(PrefRegistrySimple* registry) {
@@ -4686,7 +4729,7 @@
  }
  
  void GaiaCookieManagerService::InitCookieListener() {
-@@ -909,16 +904,12 @@ void GaiaCookieManagerService::OnListAcc
+@@ -907,16 +902,12 @@ void GaiaCookieManagerService::OnListAcc
                                     &signed_out_accounts_)) {
      listed_accounts_.clear();
      signed_out_accounts_.clear();
@@ -4789,7 +4832,7 @@
  #include "components/signin/public/base/signin_switches.h"
  
  using signin::PrimaryAccountChangeEvent;
-@@ -47,23 +46,10 @@ PrimaryAccountManager::~PrimaryAccountMa
+@@ -47,22 +46,10 @@ PrimaryAccountManager::~PrimaryAccountMa
  
  // static
  void PrimaryAccountManager::RegisterProfilePrefs(PrefRegistrySimple* registry) {
@@ -4802,7 +4845,6 @@
 -  registry->RegisterBooleanPref(prefs::kAutologinEnabled, true);
 -  registry->RegisterListPref(prefs::kReverseAutologinRejectedEmailList);
 -  registry->RegisterBooleanPref(prefs::kSigninAllowed, true);
--  registry->RegisterBooleanPref(prefs::kSigninAllowedByPolicy, true);
 -  registry->RegisterBooleanPref(prefs::kSignedInWithCredentialProvider, false);
  }
  
@@ -4813,7 +4855,7 @@
  }
  
  void PrimaryAccountManager::Initialize(PrefService* local_state) {
-@@ -71,25 +57,7 @@ void PrimaryAccountManager::Initialize(P
+@@ -70,25 +57,7 @@ void PrimaryAccountManager::Initialize(P
    DCHECK(!IsInitialized());
    initialized_ = true;
  
@@ -4840,7 +4882,7 @@
  
    if (!pref_account_id.empty()) {
      if (account_tracker_service_->GetMigrationState() ==
-@@ -99,14 +67,11 @@ void PrimaryAccountManager::Initialize(P
+@@ -98,14 +67,11 @@ void PrimaryAccountManager::Initialize(P
        // |account_info.gaia| could be empty if |account_id| is already gaia id.
        if (!account_info.gaia.empty()) {
          pref_account_id = account_info.gaia;
@@ -4856,7 +4898,7 @@
    CoreAccountId account_id = CoreAccountId::FromString(pref_account_id);
    CoreAccountInfo account_info =
        account_tracker_service_->GetAccountInfo(account_id);
-@@ -167,8 +132,7 @@ void PrimaryAccountManager::SetSyncPrima
+@@ -166,8 +132,7 @@ void PrimaryAccountManager::SetSyncPrima
  
  #if DCHECK_IS_ON()
    {
@@ -4866,7 +4908,7 @@
      bool consented_to_sync =
          client_->GetPrefs()->GetBoolean(prefs::kGoogleServicesConsentedToSync);
  
-@@ -184,10 +148,6 @@ void PrimaryAccountManager::SetSyncPrima
+@@ -183,10 +148,6 @@ void PrimaryAccountManager::SetSyncPrima
    // Go ahead and update the last signed in account info here as well. Once a
    // user is signed in the corresponding preferences should match. Doing it here
    // as opposed to on signin allows us to catch the upgrade scenario.
@@ -4877,7 +4919,7 @@
  
    // Commit primary sync account info immediately so that it does not get lost
    // if Chrome crashes before the next commit interval.
-@@ -201,20 +161,11 @@ void PrimaryAccountManager::SetPrimaryAc
+@@ -200,20 +161,11 @@ void PrimaryAccountManager::SetPrimaryAc
  
    PrefService* prefs = client_->GetPrefs();
    const std::string& account_id = primary_account_info_.account_id.ToString();
@@ -5158,7 +5200,7 @@
  #include "components/signin/public/identity_manager/identity_test_utils.h"
 --- a/tools/metrics/histograms/enums.xml
 +++ b/tools/metrics/histograms/enums.xml
-@@ -82038,7 +82038,6 @@ Full version information for the fingerp
+@@ -82686,7 +82686,6 @@ Full version information for the fingerp
    <int value="3" label="kRestoreOnStartup"/>
    <int value="4" label="kURLsToRestoreOnStartup"/>
    <int value="5" label="extensions::pref_names::kExtensions"/>
@@ -5166,7 +5208,7 @@
    <int value="7" label="kSearchProviderOverrides"/>
    <int value="8" label="kDefaultSearchProviderSearchURL (Obsolete 12/2016)"/>
    <int value="9" label="kDefaultSearchProviderKeyword (Obsolete 12/2016)"/>
-@@ -82053,10 +82052,7 @@ Full version information for the fingerp
+@@ -82701,10 +82700,7 @@ Full version information for the fingerp
    <int value="18" label="kSafeBrowsingIncidentsSent"/>
    <int value="19" label="kSwReporterPromptVersion"/>
    <int value="20" label="kSwReporterPromptReason"/>

+ 3 - 3
patches/core/ungoogled-chromium/toggle-translation-via-switch.patch

@@ -1,7 +1,7 @@
 # Disables translation and removes the "Translate to" context menu when --translate-script-url flag is not set
 --- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
 +++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
-@@ -130,6 +130,7 @@
+@@ -131,6 +131,7 @@
  #include "components/spellcheck/common/spellcheck_common.h"
  #include "components/spellcheck/spellcheck_buildflags.h"
  #include "components/strings/grit/components_strings.h"
@@ -9,7 +9,7 @@
  #include "components/translate/core/browser/translate_download_manager.h"
  #include "components/translate/core/browser/translate_manager.h"
  #include "components/translate/core/browser/translate_prefs.h"
-@@ -1731,6 +1732,8 @@ void RenderViewContextMenu::AppendPageIt
+@@ -1729,6 +1730,8 @@ void RenderViewContextMenu::AppendPageIt
      menu_model_.AddSeparator(ui::NORMAL_SEPARATOR);
    }
  
@@ -18,7 +18,7 @@
    ChromeTranslateClient* chrome_translate_client =
        ChromeTranslateClient::FromWebContents(embedder_web_contents_);
    const bool canTranslate =
-@@ -1752,6 +1755,7 @@ void RenderViewContextMenu::AppendPageIt
+@@ -1750,6 +1753,7 @@ void RenderViewContextMenu::AppendPageIt
          IDC_CONTENT_CONTEXT_TRANSLATE,
          l10n_util::GetStringFUTF16(IDS_CONTENT_CONTEXT_TRANSLATE, language));
    }

+ 22 - 22
patches/extra/bromite/fingerprinting-flags-client-rects-and-measuretext.patch

@@ -9,7 +9,7 @@
 
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -2331,6 +2331,7 @@ static_library("browser") {
+@@ -2354,6 +2354,7 @@ static_library("browser") {
      "//third_party/libyuv",
      "//third_party/metrics_proto",
      "//third_party/re2",
@@ -19,7 +19,7 @@
      "//third_party/widevine/cdm:headers",
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -141,6 +141,7 @@
+@@ -147,6 +147,7 @@
  #include "components/translate/core/browser/translate_ranker_impl.h"
  #include "components/translate/core/common/translate_util.h"
  #include "components/ui_devtools/switches.h"
@@ -44,7 +44,7 @@
  #endif  // CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_
 --- a/content/browser/BUILD.gn
 +++ b/content/browser/BUILD.gn
-@@ -221,6 +221,7 @@ source_set("browser") {
+@@ -220,6 +220,7 @@ source_set("browser") {
      "//third_party/libyuv",
      "//third_party/re2",
      "//third_party/sqlite",
@@ -54,15 +54,15 @@
      "//third_party/zlib",
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
-@@ -215,6 +215,7 @@
- #include "third_party/blink/public/common/user_agent/user_agent_metadata.h"
- #include "third_party/blink/public/mojom/disk_allocator.mojom.h"
- #include "third_party/blink/public/public_buildflags.h"
+@@ -68,6 +68,7 @@
+ #include "components/services/storage/public/mojom/cache_storage_control.mojom.h"
+ #include "components/services/storage/public/mojom/indexed_db_control.mojom.h"
+ #include "components/tracing/common/tracing_switches.h"
 +#include "components/ungoogled/ungoogled_switches.h"
- #include "third_party/skia/include/core/SkBitmap.h"
- #include "ui/accessibility/accessibility_switches.h"
- #include "ui/base/ui_base_switches.h"
-@@ -3446,6 +3447,8 @@ void RenderProcessHostImpl::PropagateBro
+ #include "components/viz/common/switches.h"
+ #include "components/viz/host/gpu_client.h"
+ #include "content/browser/bad_message.h"
+@@ -3479,6 +3480,8 @@ void RenderProcessHostImpl::PropagateBro
      switches::kEnableWebGLDraftExtensions,
      switches::kEnableWebGLImageChromium,
      switches::kFileUrlPathAlias,
@@ -123,7 +123,7 @@
  #include "base/time/time.h"
  #include "cc/input/overscroll_behavior.h"
  #include "cc/input/scroll_snap_data.h"
-@@ -858,6 +859,14 @@ Range* Document::CreateRangeAdjustedToTr
+@@ -856,6 +857,14 @@ Range* Document::CreateRangeAdjustedToTr
                                       Position::BeforeNode(*shadow_host));
  }
  
@@ -138,9 +138,9 @@
  SelectorQueryCache& Document::GetSelectorQueryCache() {
    if (!selector_query_cache_)
      selector_query_cache_ = std::make_unique<SelectorQueryCache>();
-@@ -2131,6 +2140,15 @@ void Document::UpdateStyleAndLayoutTreeF
+@@ -2146,6 +2155,15 @@ void Document::UpdateStyleAndLayoutTreeF
  #if DCHECK_IS_ON()
-   AssertLayoutTreeUpdated(*this);
+   AssertLayoutTreeUpdated(*this, true /* allow_dirty_container_subtrees */);
  #endif
 +
 +  if (RuntimeEnabledFeatures::FingerprintingClientRectsNoiseEnabled()) {
@@ -156,7 +156,7 @@
  void Document::InvalidateStyleAndLayoutForFontUpdates() {
 --- a/third_party/blink/renderer/core/dom/document.h
 +++ b/third_party/blink/renderer/core/dom/document.h
-@@ -453,6 +453,10 @@ class CORE_EXPORT Document : public Cont
+@@ -456,6 +456,10 @@ class CORE_EXPORT Document : public Cont
      has_xml_declaration_ = has_xml_declaration ? 1 : 0;
    }
  
@@ -167,7 +167,7 @@
    AtomicString visibilityState() const;
    bool IsPageVisible() const;
    bool hidden() const;
-@@ -2049,6 +2053,9 @@ class CORE_EXPORT Document : public Cont
+@@ -2074,6 +2078,9 @@ class CORE_EXPORT Document : public Cont
  
    base::ElapsedTimer start_time_;
  
@@ -179,7 +179,7 @@
    HeapVector<Member<ScriptElementBase>> current_script_stack_;
 --- a/third_party/blink/renderer/core/dom/element.cc
 +++ b/third_party/blink/renderer/core/dom/element.cc
-@@ -2107,6 +2107,11 @@ DOMRectList* Element::getClientRects() {
+@@ -2115,6 +2115,11 @@ DOMRectList* Element::getClientRects() {
    DCHECK(element_layout_object);
    GetDocument().AdjustFloatQuadsForScrollAndAbsoluteZoom(
        quads, *element_layout_object);
@@ -191,7 +191,7 @@
    return MakeGarbageCollected<DOMRectList>(quads);
  }
  
-@@ -2124,6 +2129,9 @@ FloatRect Element::GetBoundingClientRect
+@@ -2132,6 +2137,9 @@ FloatRect Element::GetBoundingClientRect
    DCHECK(element_layout_object);
    GetDocument().AdjustFloatRectForScrollAndAbsoluteZoom(result,
                                                          *element_layout_object);
@@ -203,7 +203,7 @@
  
 --- a/third_party/blink/renderer/core/dom/range.cc
 +++ b/third_party/blink/renderer/core/dom/range.cc
-@@ -1591,11 +1591,21 @@ DOMRectList* Range::getClientRects() con
+@@ -1595,11 +1595,21 @@ DOMRectList* Range::getClientRects() con
    Vector<FloatQuad> quads;
    GetBorderAndTextQuads(quads);
  
@@ -266,7 +266,7 @@
                const TextDirection&,
 --- a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc
 +++ b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc
-@@ -960,9 +960,15 @@ TextMetrics* CanvasRenderingContext2D::m
+@@ -963,9 +963,15 @@ TextMetrics* CanvasRenderingContext2D::m
    TextDirection direction =
        ToTextDirection(GetState().GetDirection(), canvas());
  
@@ -285,7 +285,7 @@
  void CanvasRenderingContext2D::fillFormattedText(
 --- a/third_party/blink/renderer/platform/BUILD.gn
 +++ b/third_party/blink/renderer/platform/BUILD.gn
-@@ -1678,6 +1678,7 @@ component("platform") {
+@@ -1681,6 +1681,7 @@ component("platform") {
      "//components/paint_preview/common",
      "//components/power_scheduler",
      "//components/search_engines:search_engine_utils",
@@ -310,7 +310,7 @@
  }  // namespace blink
 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
-@@ -1041,6 +1041,12 @@
+@@ -1066,6 +1066,12 @@
        origin_trial_feature_name: "FledgeInterestGroupAPI",
      },
      {

+ 7 - 7
patches/extra/bromite/flag-fingerprinting-canvas-image-data-noise.patch

@@ -34,7 +34,7 @@ approach to change color components.
  #endif  // CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
-@@ -3449,6 +3449,7 @@ void RenderProcessHostImpl::PropagateBro
+@@ -3482,6 +3482,7 @@ void RenderProcessHostImpl::PropagateBro
      switches::kFileUrlPathAlias,
      switches::kFingerprintingClientRectsNoise,
      switches::kFingerprintingCanvasMeasureTextNoise,
@@ -73,7 +73,7 @@ approach to change color components.
  #include "third_party/blink/renderer/platform/graphics/stroke_data.h"
  #include "third_party/blink/renderer/platform/heap/heap.h"
  #include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
-@@ -2304,6 +2305,9 @@ ImageData* BaseRenderingContext2D::getIm
+@@ -2273,6 +2274,9 @@ ImageData* BaseRenderingContext2D::getIm
            snapshot->PaintImageForCurrentFrame().GetSkImageInfo().bounds();
        DCHECK(!bounds.intersect(SkIRect::MakeXYWH(sx, sy, sw, sh)));
      }
@@ -82,10 +82,10 @@ approach to change color components.
 +    }
    }
  
-   if (!IsPaint2D()) {
+   return image_data;
 --- a/third_party/blink/renderer/platform/BUILD.gn
 +++ b/third_party/blink/renderer/platform/BUILD.gn
-@@ -1636,7 +1636,9 @@ component("platform") {
+@@ -1639,7 +1639,9 @@ component("platform") {
      "//third_party/blink/renderer:non_test_config",
    ]
  
@@ -154,8 +154,8 @@ approach to change color components.
  #include "v8/include/v8.h"
  
  namespace blink {
-@@ -81,4 +85,154 @@ void StaticBitmapImage::DrawHelper(
-                         WebCoreClampingModeToSkiaRectConstraint(clamp_mode));
+@@ -80,4 +84,154 @@ void StaticBitmapImage::DrawHelper(cc::P
+       WebCoreClampingModeToSkiaRectConstraint(draw_options.clamping_mode));
  }
  
 +// set the component to maximum-delta if it is >= maximum, or add to existing color component (color + delta)
@@ -322,7 +322,7 @@ approach to change color components.
    // Methods overridden by all sub-classes
 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
-@@ -1047,6 +1047,9 @@
+@@ -1072,6 +1072,9 @@
        name: "FingerprintingCanvasMeasureTextNoise",
      },
      {

+ 6 - 6
patches/extra/bromite/flag-max-connections-per-host.patch

@@ -17,7 +17,7 @@ with limited CPU/memory resources and it is disabled by default.
 
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -2091,6 +2091,7 @@ static_library("browser") {
+@@ -2113,6 +2113,7 @@ static_library("browser") {
      "//components/net_log",
      "//components/network_hints/common:mojo_bindings",
      "//components/network_session_configurator/browser",
@@ -64,7 +64,7 @@ with limited CPU/memory resources and it is disabled by default.
  #include "base/synchronization/waitable_event.h"
  #include "base/task/task_traits.h"
  #include "base/task/thread_pool.h"
-@@ -99,6 +101,7 @@
+@@ -103,6 +105,7 @@
  #include "components/metrics/metrics_service.h"
  #include "components/metrics_services_manager/metrics_services_manager.h"
  #include "components/metrics_services_manager/metrics_services_manager_client.h"
@@ -72,7 +72,7 @@ with limited CPU/memory resources and it is disabled by default.
  #include "components/network_time/network_time_tracker.h"
  #include "components/permissions/permissions_client.h"
  #include "components/policy/core/common/policy_service.h"
-@@ -131,6 +134,7 @@
+@@ -135,6 +138,7 @@
  #include "media/media_buildflags.h"
  #include "mojo/public/cpp/bindings/pending_receiver.h"
  #include "net/log/net_log.h"
@@ -80,7 +80,7 @@ with limited CPU/memory resources and it is disabled by default.
  #include "ppapi/buildflags/buildflags.h"
  #include "printing/buildflags/buildflags.h"
  #include "services/network/public/cpp/features.h"
-@@ -338,6 +342,18 @@ void BrowserProcessImpl::Init() {
+@@ -342,6 +346,18 @@ void BrowserProcessImpl::Init() {
                               base::BindRepeating(&ApplyMetricsReportingPolicy));
  #endif
  
@@ -101,7 +101,7 @@ with limited CPU/memory resources and it is disabled by default.
  
 --- a/chrome/browser/flag_descriptions.cc
 +++ b/chrome/browser/flag_descriptions.cc
-@@ -1519,6 +1519,10 @@ const char kMediaHistoryDescription[] =
+@@ -1567,6 +1567,10 @@ const char kMediaHistoryDescription[] =
      "Enables Media History which records data around media playbacks on "
      "websites.";
  
@@ -114,7 +114,7 @@ with limited CPU/memory resources and it is disabled by default.
  const char kMediaRouterCastAllowAllIPsDescription[] =
 --- a/chrome/browser/flag_descriptions.h
 +++ b/chrome/browser/flag_descriptions.h
-@@ -874,6 +874,9 @@ extern const char kLogJsConsoleMessagesD
+@@ -902,6 +902,9 @@ extern const char kLogJsConsoleMessagesD
  extern const char kMediaHistoryName[];
  extern const char kMediaHistoryDescription[];
  

+ 1 - 1
patches/extra/debian/disable/google-api-warning.patch

@@ -3,7 +3,7 @@ author: Michael Gilbert <mgilbert@debian.org>
 
 --- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc
 +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
-@@ -666,9 +666,6 @@ void StartupBrowserCreatorImpl::AddInfoB
+@@ -695,9 +695,6 @@ void StartupBrowserCreatorImpl::AddInfoB
      }
  #endif
  

+ 1 - 1
patches/extra/debian/disable/welcome-page.patch

@@ -4,7 +4,7 @@ bug-debian: http://bugs.debian.org/857767
 
 --- a/chrome/browser/profiles/profile_manager.cc
 +++ b/chrome/browser/profiles/profile_manager.cc
-@@ -1284,7 +1284,7 @@ void ProfileManager::InitProfileUserPref
+@@ -1294,7 +1294,7 @@ void ProfileManager::InitProfileUserPref
      profile->GetPrefs()->SetString(prefs::kSupervisedUserId,
                                     supervised_user_id);
    }

+ 16 - 11
patches/extra/inox-patchset/0006-modify-default-prefs.patch

@@ -12,7 +12,7 @@
  void BackgroundModeManager::RegisterProfile(Profile* profile) {
 --- a/chrome/browser/chrome_content_browser_client.cc
 +++ b/chrome/browser/chrome_content_browser_client.cc
-@@ -1161,7 +1161,7 @@ void ChromeContentBrowserClient::Registe
+@@ -1178,7 +1178,7 @@ void ChromeContentBrowserClient::Registe
  void ChromeContentBrowserClient::RegisterProfilePrefs(
      user_prefs::PrefRegistrySyncable* registry) {
    registry->RegisterBooleanPref(prefs::kDisable3DAPIs, false);
@@ -116,7 +116,7 @@
        prefs::kCloudPrintXmppPingEnabled, false);
 --- a/components/autofill/core/common/autofill_prefs.cc
 +++ b/components/autofill/core/common/autofill_prefs.cc
-@@ -138,10 +138,10 @@ const char kAutocompleteLastVersionReten
+@@ -131,10 +131,10 @@ const char kAutocompleteLastVersionReten
  void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
    // Synced prefs. Used for cross-device choices, e.g., credit card Autofill.
    registry->RegisterBooleanPref(
@@ -129,7 +129,7 @@
        user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
    registry->RegisterIntegerPref(
        prefs::kAutofillLastVersionDeduped, 0,
-@@ -154,7 +154,7 @@ void RegisterProfilePrefs(user_prefs::Pr
+@@ -147,7 +147,7 @@ void RegisterProfilePrefs(user_prefs::Pr
        prefs::kAutofillLastVersionDisusedAddressesDeleted, 0,
        user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
    registry->RegisterBooleanPref(
@@ -140,7 +140,7 @@
        prefs::kAutofillProfileValidity, "",
 --- a/components/bookmarks/browser/bookmark_utils.cc
 +++ b/components/bookmarks/browser/bookmark_utils.cc
-@@ -440,12 +440,12 @@ bool DoesBookmarkContainWords(const std:
+@@ -437,7 +437,7 @@ bool DoesBookmarkContainWords(const std:
  void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
    registry->RegisterBooleanPref(
        prefs::kShowBookmarkBar,
@@ -149,15 +149,20 @@
        user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
    registry->RegisterBooleanPref(prefs::kEditBookmarksEnabled, true);
    registry->RegisterBooleanPref(
-       prefs::kShowAppsShortcutInBookmarkBar,
--      true,
-+      false,
-       user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
-   registry->RegisterBooleanPref(
-       prefs::kShowReadingListInBookmarkBar, true,
+--- a/components/bookmarks/browser/features.cc
++++ b/components/bookmarks/browser/features.cc
+@@ -10,7 +10,7 @@ namespace features {
+ // Changes the apps shortcut on the bookmarks bar to default to off.
+ // https://crbug.com/1236793
+ const base::Feature kAppsShortcutDefaultOff{"AppsShortcutDefaultOff",
+-                                            base::FEATURE_DISABLED_BY_DEFAULT};
++                                            base::FEATURE_ENABLED_BY_DEFAULT};
+ 
+ }  // namespace features
+ }  // namespace bookmarks
 --- a/components/content_settings/core/browser/cookie_settings.cc
 +++ b/components/content_settings/core/browser/cookie_settings.cc
-@@ -62,7 +62,7 @@ void CookieSettings::RegisterProfilePref
+@@ -63,7 +63,7 @@ void CookieSettings::RegisterProfilePref
      user_prefs::PrefRegistrySyncable* registry) {
    registry->RegisterIntegerPref(
        prefs::kCookieControlsMode,

+ 1 - 1
patches/extra/inox-patchset/0018-disable-first-run-behaviour.patch

@@ -1,6 +1,6 @@
 --- a/chrome/browser/ui/startup/startup_tab_provider.cc
 +++ b/chrome/browser/ui/startup/startup_tab_provider.cc
-@@ -48,7 +48,7 @@ bool ProfileHasOtherTabbedBrowser(Profil
+@@ -105,7 +105,7 @@ bool ValidateUrl(const GURL& url) {
  
  StartupTabs StartupTabProviderImpl::GetOnboardingTabs(Profile* profile) const {
  // Chrome OS has its own welcome flow provided by OOBE.

+ 1 - 1
patches/extra/iridium-browser/browser-disable-profile-auto-import-on-first-run.patch

@@ -9,7 +9,7 @@ Subject: [PATCH 56/66] browser: disable profile auto-import on first run
 
 --- a/chrome/browser/chrome_browser_main.cc
 +++ b/chrome/browser/chrome_browser_main.cc
-@@ -1461,8 +1461,6 @@ int ChromeBrowserMainParts::PreMainMessa
+@@ -1484,8 +1484,6 @@ int ChromeBrowserMainParts::PreMainMessa
    // and preferences have been registered since some of the import code depends
    // on preferences.
    if (first_run::IsChromeFirstRun()) {

+ 1 - 1
patches/extra/iridium-browser/updater-disable-auto-update.patch

@@ -16,7 +16,7 @@ the case anyway, since we are based off Chromium, not Chrome.
 
 --- a/chrome/browser/app_controller_mac.mm
 +++ b/chrome/browser/app_controller_mac.mm
-@@ -858,7 +858,7 @@ static base::mac::ScopedObjCClassSwizzle
+@@ -863,7 +863,7 @@ static base::mac::ScopedObjCClassSwizzle
    CFStringRef checkInterval = CFSTR("checkInterval");
    CFPropertyListRef plist = CFPreferencesCopyAppValue(checkInterval, app);
    if (!plist) {

+ 8 - 8
patches/extra/ungoogled-chromium/add-flag-for-close-confirmation.patch

@@ -7,9 +7,9 @@
 +#include "chrome/browser/ui/views/frame/browser_view.h"
 +#include "chrome/browser/ui/views/message_box_dialog.h"
  #include "chrome/browser/ui/web_applications/app_browser_controller.h"
+ #include "chrome/browser/ui/web_applications/web_app_launch_utils.h"
  #include "chrome/browser/ui/webui/signin/login_ui_service.h"
- #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
-@@ -464,6 +466,7 @@ Browser::Browser(const CreateParams& par
+@@ -468,6 +470,7 @@ Browser::Browser(const CreateParams& par
        omit_from_session_restore_(params.omit_from_session_restore),
        should_trigger_session_restore_(params.should_trigger_session_restore),
        cancel_download_confirmation_state_(NOT_PROMPTED),
@@ -17,7 +17,7 @@
        override_bounds_(params.initial_bounds),
        initial_show_state_(params.initial_show_state),
        initial_workspace_(params.initial_workspace),
-@@ -828,7 +831,7 @@ Browser::WarnBeforeClosingResult Browser
+@@ -831,7 +834,7 @@ Browser::WarnBeforeClosingResult Browser
    // If the browser can close right away (there are no pending downloads we need
    // to prompt about) then there's no need to warn. In the future, we might need
    // to check other conditions as well.
@@ -26,7 +26,7 @@
      return WarnBeforeClosingResult::kOkToClose;
  
    DCHECK(!warn_before_closing_callback_)
-@@ -858,6 +861,7 @@ bool Browser::TryToCloseWindow(
+@@ -861,6 +864,7 @@ bool Browser::TryToCloseWindow(
  
  void Browser::ResetTryToCloseWindow() {
    cancel_download_confirmation_state_ = NOT_PROMPTED;
@@ -34,7 +34,7 @@
    unload_controller_.ResetTryToCloseWindow();
  }
  
-@@ -2696,6 +2700,62 @@ bool Browser::CanCloseWithInProgressDown
+@@ -2699,6 +2703,62 @@ bool Browser::CanCloseWithInProgressDown
    return false;
  }
  
@@ -70,7 +70,7 @@
 +    if (total_window_count >= 1 || this->tab_strip_model()->count() <= 1)
 +      return true;
 +  } else {
-+    if (total_window_count == 0 && this->tab_strip_model()->count() <= 1) 
++    if (total_window_count == 0 && this->tab_strip_model()->count() <= 1)
 +      return true;
 +    if (this->tab_strip_model()->count() == 0)
 +      tab_strip_model_delegate_->AddTabAt(GURL(), -1, true);
@@ -97,7 +97,7 @@
  void Browser::InProgressDownloadResponse(bool cancel_downloads) {
    if (cancel_downloads) {
      cancel_download_confirmation_state_ = RESPONSE_RECEIVED;
-@@ -2714,6 +2774,22 @@ void Browser::InProgressDownloadResponse
+@@ -2717,6 +2777,22 @@ void Browser::InProgressDownloadResponse
  
    std::move(warn_before_closing_callback_)
        .Run(WarnBeforeClosingResult::kDoNotClose);
@@ -179,7 +179,7 @@
       "Remove Grab Handle",
       "Removes the reserved empty space in the tabstrip for moving the window.  ungoogled-chromium flag",
       kOsDesktop, SINGLE_VALUE_TYPE("remove-grab-handle")},
-+    {"close-confirmation", 
++    {"close-confirmation",
 +     "Close Confirmation",
 +     "Show a warning prompt when closing the browser window.  ungoogled-chromium flag",
 +     kOsDesktop, MULTI_VALUE_TYPE(kCloseConfirmation)},

+ 1 - 1
patches/extra/ungoogled-chromium/add-flag-for-omnibox-autocomplete-filtering.patch

@@ -60,7 +60,7 @@
    if (provider_types & AutocompleteProvider::TYPE_BUILTIN)
 --- a/components/omnibox/browser/history_url_provider.cc
 +++ b/components/omnibox/browser/history_url_provider.cc
-@@ -553,6 +553,9 @@ void HistoryURLProvider::Start(const Aut
+@@ -551,6 +551,9 @@ void HistoryURLProvider::Start(const Aut
    if (fixed_up_input.type() != metrics::OmniboxInputType::QUERY)
      matches_.push_back(what_you_typed_match);
  

+ 6 - 6
patches/extra/ungoogled-chromium/add-flag-for-pdf-plugin-name.patch

@@ -1,6 +1,6 @@
 --- a/chrome/browser/chrome_content_browser_client.cc
 +++ b/chrome/browser/chrome_content_browser_client.cc
-@@ -5752,7 +5752,7 @@ bool ChromeContentBrowserClient::ShouldA
+@@ -5818,7 +5818,7 @@ bool ChromeContentBrowserClient::ShouldA
      const url::Origin& embedder_origin,
      const content::PepperPluginInfo& plugin_info) {
  #if BUILDFLAG(ENABLE_PDF)
@@ -254,7 +254,7 @@
  #endif  // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
 --- a/chrome/common/BUILD.gn
 +++ b/chrome/common/BUILD.gn
-@@ -248,6 +248,7 @@ static_library("common") {
+@@ -246,6 +246,7 @@ static_library("common") {
      "//components/no_state_prefetch/common",
      "//components/no_state_prefetch/common:mojo_bindings",
      "//components/page_load_metrics/common:common",
@@ -264,7 +264,7 @@
    if (enable_pdf) {
 --- a/chrome/common/chrome_content_client.cc
 +++ b/chrome/common/chrome_content_client.cc
-@@ -121,7 +121,7 @@ void ComputeBuiltInPlugins(std::vector<c
+@@ -122,7 +122,7 @@ void ComputeBuiltInPlugins(std::vector<c
    content::PepperPluginInfo pdf_info;
    pdf_info.is_internal = true;
    pdf_info.is_out_of_process = true;
@@ -363,7 +363,7 @@
      FILE_PATH_LITERAL("internal-pdf-viewer");
 --- a/chrome/renderer/chrome_content_renderer_client.cc
 +++ b/chrome/renderer/chrome_content_renderer_client.cc
-@@ -1027,7 +1027,7 @@ WebPlugin* ChromeContentRendererClient::
+@@ -1043,7 +1043,7 @@ WebPlugin* ChromeContentRendererClient::
              }
            }
          } else if (info.name ==
@@ -372,7 +372,7 @@
            // Report PDF load metrics. Since the PDF plugin is comprised of an
            // extension that loads a second plugin, avoid double counting by
            // ignoring the creation of the second plugin.
-@@ -1059,7 +1059,7 @@ WebPlugin* ChromeContentRendererClient::
+@@ -1075,7 +1075,7 @@ WebPlugin* ChromeContentRendererClient::
  
  #if BUILDFLAG(ENABLE_PDF)
          if (info.name ==
@@ -381,7 +381,7 @@
            return pdf::CreateInternalPlugin(
                info, std::move(params), render_frame,
                std::make_unique<ChromePdfInternalPluginDelegate>());
-@@ -1072,7 +1072,7 @@ WebPlugin* ChromeContentRendererClient::
+@@ -1088,7 +1088,7 @@ WebPlugin* ChromeContentRendererClient::
          PluginUMAReporter::GetInstance()->ReportPluginDisabled(orig_mime_type,
                                                                 url);
          if (info.name ==

+ 2 - 2
patches/extra/ungoogled-chromium/add-flag-for-qr-generator.patch

@@ -19,7 +19,7 @@
  #endif  // CHROME_BROWSER_SHARING_FEATURES_H_
 --- a/chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc
 +++ b/chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc
-@@ -22,7 +22,7 @@ QRCodeGeneratorBubbleController::~QRCode
+@@ -23,7 +23,7 @@ QRCodeGeneratorBubbleController::~QRCode
  
  // static
  bool QRCodeGeneratorBubbleController::IsGeneratorAvailable(const GURL& url) {
@@ -30,7 +30,7 @@
    return true;
 --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
 +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
-@@ -295,7 +295,8 @@ void LocationBarView::Init() {
+@@ -296,7 +296,8 @@ void LocationBarView::Init() {
      // the left most icon.
      params.types_enabled.push_back(PageActionIconType::kSendTabToSelf);
      params.types_enabled.push_back(PageActionIconType::kClickToCall);

+ 3 - 3
patches/extra/ungoogled-chromium/add-flag-for-search-engine-collection.patch

@@ -102,7 +102,7 @@
  }
  
  bool TemplateURLService::IsPrepopulatedOrCreatedByPolicy(
-@@ -1485,6 +1493,8 @@ SyncDataMap TemplateURLService::CreateGU
+@@ -1495,6 +1503,8 @@ SyncDataMap TemplateURLService::CreateGU
  
  void TemplateURLService::Init(const Initializer* initializers,
                                int num_initializers) {
@@ -111,7 +111,7 @@
    if (client_)
      client_->SetOwner(this);
  
-@@ -1621,6 +1631,9 @@ void TemplateURLService::ChangeToLoadedS
+@@ -1631,6 +1641,9 @@ void TemplateURLService::ChangeToLoadedS
  
  bool TemplateURLService::CanAddAutogeneratedKeywordForHost(
      const std::string& host) const {
@@ -123,7 +123,7 @@
      return true;
 --- a/components/search_engines/template_url_service.h
 +++ b/components/search_engines/template_url_service.h
-@@ -697,6 +697,8 @@ class TemplateURLService : public WebDat
+@@ -702,6 +702,8 @@ class TemplateURLService : public WebDat
    // ---------- Browser state related members ---------------------------------
    PrefService* prefs_ = nullptr;
  

+ 1 - 1
patches/extra/ungoogled-chromium/add-flag-for-tabsearch-button.patch

@@ -1,6 +1,6 @@
 --- a/chrome/browser/ui/browser_command_controller.cc
 +++ b/chrome/browser/ui/browser_command_controller.cc
-@@ -1138,7 +1138,8 @@ void BrowserCommandController::InitComma
+@@ -1141,7 +1141,8 @@ void BrowserCommandController::InitComma
    command_updater_.UpdateCommandEnabled(IDC_WINDOW_CLOSE_OTHER_TABS,
                                          normal_window);
  

+ 1 - 1
patches/extra/ungoogled-chromium/add-flag-to-close-window-with-last-tab.patch

@@ -8,7 +8,7 @@
  #include "base/containers/flat_map.h"
  #include "base/cxx17_backports.h"
  #include "base/metrics/histogram_macros.h"
-@@ -1777,6 +1778,10 @@ bool TabStripModel::CloseTabs(base::span
+@@ -1780,6 +1781,10 @@ bool TabStripModel::CloseTabs(base::span
    if (items.empty())
      return true;
  

+ 2 - 2
patches/extra/ungoogled-chromium/add-flag-to-configure-extension-downloading.patch

@@ -50,7 +50,7 @@
  bool IsExtensionDownload(const download::DownloadItem& download_item);
 --- a/chrome/browser/download/download_target_determiner.cc
 +++ b/chrome/browser/download/download_target_determiner.cc
-@@ -1055,10 +1055,12 @@ DownloadConfirmationReason DownloadTarge
+@@ -1057,10 +1057,12 @@ DownloadConfirmationReason DownloadTarge
      return DownloadConfirmationReason::SAVE_AS;
  
  #if BUILDFLAG(ENABLE_EXTENSIONS)
@@ -77,7 +77,7 @@
  #include "base/containers/contains.h"
  #include "base/logging.h"
  #include "base/metrics/histogram_functions.h"
-@@ -237,6 +238,13 @@ bool ExtensionManagement::IsInstallation
+@@ -238,6 +239,13 @@ bool ExtensionManagement::IsInstallation
  bool ExtensionManagement::IsOffstoreInstallAllowed(
      const GURL& url,
      const GURL& referrer_url) const {

+ 1 - 1
patches/extra/ungoogled-chromium/add-flag-to-disable-beforeunload.patch

@@ -21,7 +21,7 @@
  #include "base/i18n/rtl.h"
  #include "base/macros.h"
  #include "base/metrics/histogram_macros.h"
-@@ -199,7 +200,8 @@ void AppModalDialogManager::RunBeforeUnl
+@@ -194,7 +195,8 @@ void AppModalDialogManager::RunBeforeUnl
    ChromeJavaScriptDialogExtraData* extra_data =
        &javascript_dialog_extra_data_[web_contents];
  

+ 1 - 1
patches/extra/ungoogled-chromium/add-flag-to-disable-local-history-expiration.patch

@@ -21,7 +21,7 @@
  #include "base/callback_helpers.h"
  #include "base/compiler_specific.h"
  #include "base/containers/flat_set.h"
-@@ -910,7 +911,8 @@ void HistoryBackend::InitImpl(
+@@ -916,7 +917,8 @@ void HistoryBackend::InitImpl(
    db_->GetStartDate(&first_recorded_time_);
  
    // Start expiring old stuff.

+ 1 - 1
patches/extra/ungoogled-chromium/add-flag-to-hide-crashed-bubble.patch

@@ -3,7 +3,7 @@
 
 --- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc
 +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
-@@ -622,7 +622,8 @@ void StartupBrowserCreatorImpl::AddInfoB
+@@ -651,7 +651,8 @@ void StartupBrowserCreatorImpl::AddInfoB
    if (command_line_.HasSwitch(switches::kKioskMode))
      return;
  

+ 1 - 1
patches/extra/ungoogled-chromium/add-flag-to-scroll-tabs.patch

@@ -49,7 +49,7 @@
      // tabstrip, or the empty space beside the tabstrip.
 --- a/chrome/browser/ui/views/frame/browser_root_view.h
 +++ b/chrome/browser/ui/views/frame/browser_root_view.h
-@@ -142,6 +142,8 @@ class BrowserRootView : public views::in
+@@ -143,6 +143,8 @@ class BrowserRootView : public views::in
    int scroll_remainder_x_ = 0;
    int scroll_remainder_y_ = 0;
  

+ 1 - 1
patches/extra/ungoogled-chromium/add-flag-to-stack-tabs.patch

@@ -2,7 +2,7 @@
 
 --- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
 +++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
-@@ -82,14 +82,13 @@ using content::WebContents;
+@@ -83,14 +83,13 @@ using content::WebContents;
  namespace {
  
  bool DetermineTabStripLayoutStacked(PrefService* prefs, bool* adjust_layout) {

+ 8 - 8
patches/extra/ungoogled-chromium/add-ipv6-probing-option.patch

@@ -13,9 +13,9 @@
  #endif  // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
 --- a/net/base/features.cc
 +++ b/net/base/features.cc
-@@ -260,5 +260,7 @@ const base::Feature kSamePartyCookiesCon
- const base::Feature kPartitionedCookies{"PartitionedCookies",
-                                         base::FEATURE_DISABLED_BY_DEFAULT};
+@@ -266,5 +266,7 @@ const base::Feature kPartitionedCookies{
+ const base::Feature kExtraCookieValidityChecks{
+     "ExtraCookieValidityChecks", base::FEATURE_ENABLED_BY_DEFAULT};
  
 +const base::Feature kSetIpv6ProbeFalse{"SetIpv6ProbeFalse", base::FEATURE_DISABLED_BY_DEFAULT};
 +
@@ -23,9 +23,9 @@
  }  // namespace net
 --- a/net/base/features.h
 +++ b/net/base/features.h
-@@ -387,6 +387,8 @@ NET_EXPORT extern const base::Feature kS
- // the cookie was set.
- NET_EXPORT extern const base::Feature kPartitionedCookies;
+@@ -400,6 +400,8 @@ NET_EXPORT extern const base::Feature kP
+ // feature flag, assuming no breakage occurs with it enabled.
+ NET_EXPORT extern const base::Feature kExtraCookieValidityChecks;
  
 +NET_EXPORT extern const base::Feature kSetIpv6ProbeFalse;
 +
@@ -34,7 +34,7 @@
  
 --- a/net/dns/host_resolver_manager.cc
 +++ b/net/dns/host_resolver_manager.cc
-@@ -136,11 +136,6 @@ const unsigned kMinimumTTLSeconds = kCac
+@@ -138,11 +138,6 @@ const unsigned kMinimumTTLSeconds = kCac
  // cached.
  const int kIPv6ProbePeriodMs = 1000;
  
@@ -46,7 +46,7 @@
  enum DnsResolveStatus {
    RESOLVE_STATUS_DNS_SUCCESS = 0,
    RESOLVE_STATUS_PROC_SUCCESS,
-@@ -3513,7 +3508,7 @@ bool HostResolverManager::IsIPv6Reachabl
+@@ -3693,7 +3688,7 @@ bool HostResolverManager::IsIPv6Reachabl
        (tick_clock_->NowTicks() - last_ipv6_probe_time_).InMilliseconds() >
            kIPv6ProbePeriodMs) {
      SetLastIPv6ProbeResult(

+ 12 - 11
patches/extra/ungoogled-chromium/add-suggestions-url-field.patch

@@ -100,7 +100,7 @@
    urlLocked: boolean,
  };
  
-@@ -49,7 +50,7 @@ export interface SearchEnginesBrowserPro
+@@ -51,7 +52,7 @@ export interface SearchEnginesBrowserPro
    searchEngineEditCancelled(): void;
  
    searchEngineEditCompleted(
@@ -109,7 +109,7 @@
  
    getSearchEnginesList(): Promise<SearchEnginesInfo>;
  
-@@ -76,11 +77,12 @@ export class SearchEnginesBrowserProxyIm
+@@ -82,11 +83,12 @@ export class SearchEnginesBrowserProxyIm
    }
  
    searchEngineEditCompleted(
@@ -272,7 +272,7 @@
    bool CanEdit(const TemplateURL* url) const;
 --- a/chrome/browser/ui/search_engines/template_url_table_model.cc
 +++ b/chrome/browser/ui/search_engines/template_url_table_model.cc
-@@ -109,20 +109,24 @@ void TemplateURLTableModel::Remove(int i
+@@ -109,21 +109,25 @@ void TemplateURLTableModel::Remove(int i
  void TemplateURLTableModel::Add(int index,
                                  const std::u16string& short_name,
                                  const std::u16string& keyword,
@@ -286,6 +286,7 @@
    data.SetKeyword(keyword);
    data.SetURL(url);
 +  data.suggestions_url = suggestions_url;
+   data.is_active = TemplateURLData::ActiveStatus::kTrue;
    template_url_service_->Add(std::make_unique<TemplateURL>(data));
  }
  
@@ -302,7 +303,7 @@
    DCHECK(index >= 0 && index <= RowCount());
    DCHECK(!url.empty());
    TemplateURL* template_url = GetTemplateURL(index);
-@@ -131,7 +135,8 @@ void TemplateURLTableModel::ModifyTempla
+@@ -132,7 +136,8 @@ void TemplateURLTableModel::ModifyTempla
    DCHECK(template_url_service_->GetDefaultSearchProvider() != template_url ||
           template_url->SupportsReplacement(
               template_url_service_->search_terms_data()));
@@ -342,7 +343,7 @@
  
  // Dummy number used for indicating that a new search engine is added.
  const int kNewSearchEngineIndex = -1;
-@@ -208,6 +209,9 @@ SearchEnginesHandler::CreateDictionaryFo
+@@ -212,6 +213,9 @@ SearchEnginesHandler::CreateDictionaryFo
    Profile* profile = Profile::FromWebUI(web_ui());
    dict->SetString(
        "url", template_url->url_ref().DisplayURL(UIThreadSearchTermsData()));
@@ -352,7 +353,7 @@
    dict->SetBoolean("urlLocked", template_url->prepopulate_id() > 0);
    GURL icon_url = template_url->favicon_url();
    if (icon_url.is_valid())
-@@ -304,12 +308,14 @@ void SearchEnginesHandler::HandleSearchE
+@@ -320,12 +324,14 @@ void SearchEnginesHandler::HandleSearchE
  void SearchEnginesHandler::OnEditedKeyword(TemplateURL* template_url,
                                             const std::u16string& title,
                                             const std::u16string& keyword,
@@ -370,7 +371,7 @@
  
    edit_controller_.reset();
  }
-@@ -340,6 +346,8 @@ bool SearchEnginesHandler::CheckFieldVal
+@@ -356,6 +362,8 @@ bool SearchEnginesHandler::CheckFieldVal
      is_valid = edit_controller_->IsKeywordValid(base::UTF8ToUTF16(field_value));
    else if (field_name.compare(kQueryUrlField) == 0)
      is_valid = edit_controller_->IsURLValid(field_value);
@@ -379,7 +380,7 @@
    else
      NOTREACHED();
  
-@@ -361,17 +369,21 @@ void SearchEnginesHandler::HandleSearchE
+@@ -377,17 +385,21 @@ void SearchEnginesHandler::HandleSearchE
    std::string search_engine;
    std::string keyword;
    std::string query_url;
@@ -415,7 +416,7 @@
  
    // SettingsPageUIHandler implementation.
    void RegisterMessages() override;
-@@ -74,8 +75,8 @@ class SearchEnginesHandler : public Sett
+@@ -78,8 +79,8 @@ class SearchEnginesHandler : public Sett
    // to WebUI. Called from WebUI.
    void HandleValidateSearchEngineInput(const base::ListValue* args);
  
@@ -456,5 +457,5 @@
 +                        const std::string& search_url,
 +                        const std::string& suggestions_url);
  
-   // Creates a TemplateURL for |keyword| marked with created_from_play_api().
-   // Returns the newly created engine.
+   // Sets the `is_active` field of the specified TemplateURL to `kTrue` or
+   // `kFalse`. Called when a user explicitly activates/deactivates the search

+ 1 - 1
patches/extra/ungoogled-chromium/add-ungoogled-flag-headers.patch

@@ -1,6 +1,6 @@
 --- a/chrome/browser/about_flags.cc
 +++ b/chrome/browser/about_flags.cc
-@@ -2635,7 +2635,13 @@ const FeatureEntry::FeatureVariation kRe
+@@ -2764,7 +2764,13 @@ const FeatureEntry::Choice kDocumentTran
  // calculate and verify checksum.
  //
  // When adding a new choice, add it to the end of the list.

+ 5 - 5
patches/extra/ungoogled-chromium/disable-download-quarantine.patch

@@ -153,7 +153,7 @@
  }  // namespace download
 --- a/content/browser/BUILD.gn
 +++ b/content/browser/BUILD.gn
-@@ -81,7 +81,6 @@ source_set("browser") {
+@@ -82,7 +82,6 @@ source_set("browser") {
      "//components/permissions:permissions_common",
      "//components/power_scheduler",
      "//components/services/filesystem:lib",
@@ -171,7 +171,7 @@
  #include "content/browser/file_system_access/file_system_access_error.h"
  #include "content/browser/file_system_access/file_system_access_manager_impl.h"
  #include "content/public/browser/content_browser_client.h"
-@@ -378,22 +377,9 @@ void FileSystemAccessFileWriterImpl::Did
+@@ -382,22 +381,9 @@ void FileSystemAccessFileWriterImpl::Did
    // In case of error, the swap file URL will point to a valid filesystem
    // location. The file at this URL will be deleted when the mojo pipe closes.
    base::OnceCallback<void(base::File::Error)> result_callback;
@@ -194,7 +194,7 @@
    DoFileSystemOperation(
        FROM_HERE, &FileSystemOperationRunner::MoveFileLocal,
        std::move(result_callback), swap_url(), url(),
-@@ -418,7 +404,6 @@ void FileSystemAccessFileWriterImpl::Did
+@@ -422,7 +408,6 @@ void FileSystemAccessFileWriterImpl::Did
  void FileSystemAccessFileWriterImpl::DidSwapFileDoQuarantine(
      const storage::FileSystemURL& target_url,
      const GURL& referrer_url,
@@ -202,7 +202,7 @@
      base::File::Error result) {
    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
  
-@@ -449,37 +434,9 @@ void FileSystemAccessFileWriterImpl::Did
+@@ -453,37 +438,9 @@ void FileSystemAccessFileWriterImpl::Did
        referrer_url.is_valid() && referrer_url.SchemeIsHTTPOrHTTPS()
            ? referrer_url
            : GURL();
@@ -242,7 +242,7 @@
  
 --- a/content/browser/file_system_access/file_system_access_file_writer_impl.h
 +++ b/content/browser/file_system_access/file_system_access_file_writer_impl.h
-@@ -109,10 +109,8 @@ class CONTENT_EXPORT FileSystemAccessFil
+@@ -110,10 +110,8 @@ class CONTENT_EXPORT FileSystemAccessFil
    void DidSwapFileDoQuarantine(
        const storage::FileSystemURL& target_url,
        const GURL& referrer_url,

+ 2 - 2
patches/extra/ungoogled-chromium/disable-webgl-renderer-info.patch

@@ -3,7 +3,7 @@
 
 --- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
 +++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
-@@ -3597,8 +3597,7 @@ ScriptValue WebGLRenderingContextBase::g
+@@ -3596,8 +3596,7 @@ ScriptValue WebGLRenderingContextBase::g
                pname, IdentifiabilityBenignStringToken(
                           String(ContextGL()->GetString(GL_RENDERER))));
          }
@@ -13,7 +13,7 @@
        }
        SynthesizeGLError(
            GL_INVALID_ENUM, "getParameter",
-@@ -3612,8 +3611,7 @@ ScriptValue WebGLRenderingContextBase::g
+@@ -3611,8 +3610,7 @@ ScriptValue WebGLRenderingContextBase::g
                pname, IdentifiabilityBenignStringToken(
                           String(ContextGL()->GetString(GL_VENDOR))));
          }

+ 1 - 1
patches/extra/ungoogled-chromium/enable-default-prefetch-privacy-changes.patch

@@ -2,7 +2,7 @@
 
 --- a/third_party/blink/common/features.cc
 +++ b/third_party/blink/common/features.cc
-@@ -399,7 +399,7 @@ const base::Feature kComputePressure{"Co
+@@ -408,7 +408,7 @@ const base::Feature kComputePressure{"Co
  // Prefetch request properties are updated to be privacy-preserving. See
  // crbug.com/988956.
  const base::Feature kPrefetchPrivacyChanges{"PrefetchPrivacyChanges",

+ 2 - 2
patches/extra/ungoogled-chromium/enable-page-saving-on-more-pages.patch

@@ -2,7 +2,7 @@
 
 --- a/chrome/browser/ui/browser_commands.cc
 +++ b/chrome/browser/ui/browser_commands.cc
-@@ -428,11 +428,6 @@ int GetContentRestrictions(const Browser
+@@ -438,11 +438,6 @@ int GetContentRestrictions(const Browser
      CoreTabHelper* core_tab_helper =
          CoreTabHelper::FromWebContents(current_tab);
      content_restrictions = core_tab_helper->content_restrictions();
@@ -14,7 +14,7 @@
    }
    return content_restrictions;
  }
-@@ -1329,8 +1324,7 @@ bool CanSavePage(const Browser* browser)
+@@ -1338,8 +1333,7 @@ bool CanSavePage(const Browser* browser)
            prefs::kAllowFileSelectionDialogs)) {
      return false;
    }

+ 0 - 1
patches/series

@@ -36,7 +36,6 @@ core/ungoogled-chromium/block-requests.patch
 core/ungoogled-chromium/disable-floc.patch
 core/ungoogled-chromium/disable-privacy-sandbox.patch
 core/bromite/disable-fetching-field-trials.patch
-core/chromium-upstream/missing-header-without-tflite.patch
 
 extra/inox-patchset/0006-modify-default-prefs.patch
 extra/inox-patchset/0008-restore-classic-ntp.patch

File diff suppressed because it is too large
+ 470 - 4
pruning.list


Some files were not shown because too many files changed in this diff