From d092af81268d8239a2ae50905eefe972eda14849 Mon Sep 17 00:00:00 2001 From: Daniel Farina Date: Sun, 21 Jun 2026 10:43:39 -0400 Subject: [PATCH] feat(privacy): borrow ungoogled-chromium degoogling patches (no domain-sub/pruning) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Strip the remaining Google phone-home / telemetry / tracking channels from the Chromium base using ungoogled-chromium's patch series, without disturbing Xplorer's Grok integration or branding. What's included: - patches/ungoogled/: 24 active degoogling patches (vendored verbatim from ungoogled 149.0.7827.155-1), each verified to apply cleanly to our Chromium 151 pin via `git apply --check`; 11 more vendored but quarantined (drift / capability tradeoffs). - scripts/apply_ungoogled.sh + .ps1: best-effort, idempotent apply pass wired into apply.sh / apply.ps1 AFTER apply_integration.py so Grok + branding stay authoritative. - scripts/check_ungoogled_patches.sh: read-only `git apply --check` validation gate. - build/args.gn{,.x64,.win,.linux}: 7 build-safe degoogling GN flags (enable_reporting, enable_remoting, enable_mdns, enable_service_discovery, enable_hangout_services_extension, disable_fieldtrial_testing_config, exclude_unwind_tables). - VERSIONS: records the Chromium + ungoogled pins. - docs/UNGOOGLED.md: compatibility report, per-patch status, and the update process. - README: generic Acknowledgements credit to ungoogled-chromium (BSD-3-Clause). Deliberately excluded: domain substitution (qjz9zk), binary pruning, and any patch touching default search / new-tab / branding (they fight Xplorer's Grok-default + branding edits). safe_browsing_mode=0 is held back because its companion build-fix patches do not yet apply to 151 (quarantined) and the flag alone would break the link. Not built/verified yet — applies-clean only; build verification pending. Co-Authored-By: Claude Opus 4.8 (1M context) --- README.md | 12 + VERSIONS | 10 + apply.ps1 | 5 + apply.sh | 7 + build/args.gn | 13 + build/args.gn.linux | 13 + build/args.gn.win | 13 + build/args.gn.x64 | 13 + docs/UNGOOGLED.md | 184 + patches/ungoogled/LICENSE.ungoogled | 29 + .../disable-fetching-field-trials.patch | 76 + ...01-fix-building-without-safebrowsing.patch | 199 + ...03-disable-autofill-download-manager.patch | 97 + .../0005-disable-default-extensions.patch | 85 + .../0015-disable-update-pings.patch | 11 + .../core/inox-patchset/0021-disable-rlz.patch | 30 + ..._browsing-disable-incident-reporting.patch | 83 + ...sable-reporting-of-safebrowsing-over.patch | 34 + .../disable-crash-reporter.patch | 49 + .../disable-domain-reliability.patch | 721 ++ .../disable-fonts-googleapis-references.patch | 70 + .../ungoogled-chromium/disable-gaia.patch | 71 + .../core/ungoogled-chromium/disable-gcm.patch | 156 + .../disable-google-host-detection.patch | 797 ++ .../disable-mei-preload.patch | 35 + .../disable-network-time-tracker.patch | 17 + .../disable-privacy-sandbox.patch | 336 + .../disable-profile-avatar-downloading.patch | 14 + .../disable-untraceable-urls.patch | 33 + .../disable-webrtc-log-uploader.patch | 127 + .../disable-webstore-urls.patch | 184 + .../core/ungoogled-chromium/doh-changes.patch | 73 + .../extensions-manifestv2.patch | 149 + .../fix-building-without-safebrowsing.patch | 3520 ++++++++ .../remove-f1-shortcut.patch | 10 + .../remove-unused-preferences-fields.patch | 7153 +++++++++++++++++ .../toggle-translation-via-switch.patch | 106 + .../debian/disable/google-api-warning.patch | 16 + .../0006-modify-default-prefs.patch | 146 + .../0013-disable-missing-key-warning.patch | 12 + .../0019-disable-battery-status-service.patch | 102 + .../default-webrtc-ip-handling-policy.patch | 11 + .../disable-dial-repeating-discovery.patch | 25 + .../disable-fedcm-by-default.patch | 13 + .../disable-intranet-redirect-detector.patch | 16 + patches/ungoogled/quarantine.series | 30 + patches/ungoogled/series | 53 + scripts/apply_ungoogled.ps1 | 39 + scripts/apply_ungoogled.sh | 50 + scripts/check_ungoogled_patches.sh | 56 + 50 files changed, 15104 insertions(+) create mode 100644 VERSIONS create mode 100644 docs/UNGOOGLED.md create mode 100644 patches/ungoogled/LICENSE.ungoogled create mode 100644 patches/ungoogled/core/bromite/disable-fetching-field-trials.patch create mode 100644 patches/ungoogled/core/inox-patchset/0001-fix-building-without-safebrowsing.patch create mode 100644 patches/ungoogled/core/inox-patchset/0003-disable-autofill-download-manager.patch create mode 100644 patches/ungoogled/core/inox-patchset/0005-disable-default-extensions.patch create mode 100644 patches/ungoogled/core/inox-patchset/0015-disable-update-pings.patch create mode 100644 patches/ungoogled/core/inox-patchset/0021-disable-rlz.patch create mode 100644 patches/ungoogled/core/iridium-browser/safe_browsing-disable-incident-reporting.patch create mode 100644 patches/ungoogled/core/iridium-browser/safe_browsing-disable-reporting-of-safebrowsing-over.patch create mode 100644 patches/ungoogled/core/ungoogled-chromium/disable-crash-reporter.patch create mode 100644 patches/ungoogled/core/ungoogled-chromium/disable-domain-reliability.patch create mode 100644 patches/ungoogled/core/ungoogled-chromium/disable-fonts-googleapis-references.patch create mode 100644 patches/ungoogled/core/ungoogled-chromium/disable-gaia.patch create mode 100644 patches/ungoogled/core/ungoogled-chromium/disable-gcm.patch create mode 100644 patches/ungoogled/core/ungoogled-chromium/disable-google-host-detection.patch create mode 100644 patches/ungoogled/core/ungoogled-chromium/disable-mei-preload.patch create mode 100644 patches/ungoogled/core/ungoogled-chromium/disable-network-time-tracker.patch create mode 100644 patches/ungoogled/core/ungoogled-chromium/disable-privacy-sandbox.patch create mode 100644 patches/ungoogled/core/ungoogled-chromium/disable-profile-avatar-downloading.patch create mode 100644 patches/ungoogled/core/ungoogled-chromium/disable-untraceable-urls.patch create mode 100644 patches/ungoogled/core/ungoogled-chromium/disable-webrtc-log-uploader.patch create mode 100644 patches/ungoogled/core/ungoogled-chromium/disable-webstore-urls.patch create mode 100644 patches/ungoogled/core/ungoogled-chromium/doh-changes.patch create mode 100644 patches/ungoogled/core/ungoogled-chromium/extensions-manifestv2.patch create mode 100644 patches/ungoogled/core/ungoogled-chromium/fix-building-without-safebrowsing.patch create mode 100644 patches/ungoogled/core/ungoogled-chromium/remove-f1-shortcut.patch create mode 100644 patches/ungoogled/core/ungoogled-chromium/remove-unused-preferences-fields.patch create mode 100644 patches/ungoogled/core/ungoogled-chromium/toggle-translation-via-switch.patch create mode 100644 patches/ungoogled/extra/debian/disable/google-api-warning.patch create mode 100644 patches/ungoogled/extra/inox-patchset/0006-modify-default-prefs.patch create mode 100644 patches/ungoogled/extra/inox-patchset/0013-disable-missing-key-warning.patch create mode 100644 patches/ungoogled/extra/inox-patchset/0019-disable-battery-status-service.patch create mode 100644 patches/ungoogled/extra/ungoogled-chromium/default-webrtc-ip-handling-policy.patch create mode 100644 patches/ungoogled/extra/ungoogled-chromium/disable-dial-repeating-discovery.patch create mode 100644 patches/ungoogled/extra/ungoogled-chromium/disable-fedcm-by-default.patch create mode 100644 patches/ungoogled/extra/ungoogled-chromium/disable-intranet-redirect-detector.patch create mode 100644 patches/ungoogled/quarantine.series create mode 100644 patches/ungoogled/series create mode 100644 scripts/apply_ungoogled.ps1 create mode 100755 scripts/apply_ungoogled.sh create mode 100755 scripts/check_ungoogled_patches.sh diff --git a/README.md b/README.md index 30311cf..3e36fee 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ launch flags, no setup dance. - [Project layout](#project-layout) - [Contributing](#contributing) - [Star history](#star-history) +- [Acknowledgements](#acknowledgements) - [License](#license) --- @@ -374,6 +375,17 @@ If Xplorer is useful to you, please **[give it a ⭐ on GitHub](https://github.c --- +## Acknowledgements + +Xplorer's privacy hardening borrows degoogling patches from the +[ungoogled-chromium](https://github.com/ungoogled-software/ungoogled-chromium) project (and +the upstream patch sets it builds on) to strip Google phone‑home and telemetry from the +Chromium base. Those patches are BSD‑3‑Clause licensed; see +[`docs/UNGOOGLED.md`](docs/UNGOOGLED.md) for what we use and what we intentionally leave out. +With thanks to the maintainers. + +--- + ## License Xplorer is a derivative of [Chromium](https://www.chromium.org/), which is distributed diff --git a/VERSIONS b/VERSIONS new file mode 100644 index 0000000..f7e762d --- /dev/null +++ b/VERSIONS @@ -0,0 +1,10 @@ +# Upstream version pins for the Xplorer overlay. Keep this in sync when bumping Chromium +# or refreshing the vendored ungoogled patches. Grep-friendly; not parsed by the build. + +chromium = 151.0.7897.0 # git cd1d42cba19c64f3386d5dfa1475d620b6efb6a4 +ungoogled = 149.0.7827.155-1 # git 2a53b77d33b055a4a41139007fb60b6ec1960a48 — source of patches/ungoogled/ + +# NOTE: ungoogled-chromium has NO 150 or 151 release yet (it trails Chromium stable), so our +# Chromium pin is ~2 milestones AHEAD of ungoogled. The vendored degoogling patches were +# selected/validated against 151 by hand. When ungoogled ships a >=150 tag, refresh from it. +# See docs/UNGOOGLED.md ("Keeping it updated"). diff --git a/apply.ps1 b/apply.ps1 index c215f36..bec0595 100644 --- a/apply.ps1 +++ b/apply.ps1 @@ -69,4 +69,9 @@ $env:PYTHONUTF8 = "1" & $python (Join-Path $Xplorer "patches\apply_integration.py") $Src if ($LASTEXITCODE -ne 0) { throw "apply_integration.py failed (exit $LASTEXITCODE)" } +# Degoogling pass: vendored ungoogled-chromium series, applied LAST so Grok + branding +# edits stay authoritative. Best-effort/idempotent — drifted patches are logged, not fatal. +Write-Host "Applying ungoogled degoogling patches..." +& powershell -ExecutionPolicy Bypass -File (Join-Path $Xplorer "scripts\apply_ungoogled.ps1") -Src $Src + Write-Host "Done. Next: .\build.ps1" diff --git a/apply.sh b/apply.sh index 523a676..9143150 100755 --- a/apply.sh +++ b/apply.sh @@ -88,4 +88,11 @@ fi # end macOS-only product-logo block echo "Applying integration edits..." python3 "$XPLORER/patches/apply_integration.py" "$SRC" +# Degoogling pass: apply the vendored ungoogled-chromium series LAST, so the Grok + +# branding edits above stay authoritative. Best-effort and idempotent — a patch that has +# drifted against the current Chromium pin is logged and skipped, never fatal. +# See patches/ungoogled/series and docs/UNGOOGLED.md. +echo "Applying ungoogled degoogling patches..." +sh "$XPLORER/scripts/apply_ungoogled.sh" "$SRC" + echo "Done. Next: ./build.sh" diff --git a/build/args.gn b/build/args.gn index 9ac9155..ff2833c 100644 --- a/build/args.gn +++ b/build/args.gn @@ -34,3 +34,16 @@ google_api_key = "" google_default_client_id = "" google_default_client_secret = "" enable_rlz = false # no RLZ ping (also the unbranded default) + +# === ungoogled-chromium degoogling flags (vendored 149.0.7827.155-1) — see docs/UNGOOGLED.md === +# Build-safe subset of ungoogled's flags.gn: removes Google-connected services / phone-home +# without requiring source patches. NOTE: safe_browsing_mode=0 is intentionally NOT set — it +# needs the safe-browsing stub patches (patches/ungoogled/quarantine.series), which do not yet +# apply to this Chromium pin; setting it alone would break the link. +enable_reporting = false # no NEL / Reporting-API upload pipeline +enable_remoting = false # no Chrome Remote Desktop (Google-account-tied) +enable_mdns = false # no multicast-DNS local discovery +enable_service_discovery = false # no privet/Cast local service discovery (pairs with enable_mdns) +enable_hangout_services_extension = false # no built-in Google Meet/Hangouts helper extension +disable_fieldtrial_testing_config = true # behave like stable: no baked-in Google experiment config +exclude_unwind_tables = true # smaller binary, less stack metadata (symbol_level=0 already) diff --git a/build/args.gn.linux b/build/args.gn.linux index f38e109..99d1939 100644 --- a/build/args.gn.linux +++ b/build/args.gn.linux @@ -32,3 +32,16 @@ google_api_key = "" google_default_client_id = "" google_default_client_secret = "" enable_rlz = false # no RLZ ping (also the unbranded default) + +# === ungoogled-chromium degoogling flags (vendored 149.0.7827.155-1) — see docs/UNGOOGLED.md === +# Build-safe subset of ungoogled's flags.gn: removes Google-connected services / phone-home +# without requiring source patches. NOTE: safe_browsing_mode=0 is intentionally NOT set — it +# needs the safe-browsing stub patches (patches/ungoogled/quarantine.series), which do not yet +# apply to this Chromium pin; setting it alone would break the link. +enable_reporting = false # no NEL / Reporting-API upload pipeline +enable_remoting = false # no Chrome Remote Desktop (Google-account-tied) +enable_mdns = false # no multicast-DNS local discovery +enable_service_discovery = false # no privet/Cast local service discovery (pairs with enable_mdns) +enable_hangout_services_extension = false # no built-in Google Meet/Hangouts helper extension +disable_fieldtrial_testing_config = true # behave like stable: no baked-in Google experiment config +exclude_unwind_tables = true # smaller binary, less stack metadata (symbol_level=0 already) diff --git a/build/args.gn.win b/build/args.gn.win index 2816ff1..b237e32 100644 --- a/build/args.gn.win +++ b/build/args.gn.win @@ -39,3 +39,16 @@ google_api_key = "" google_default_client_id = "" google_default_client_secret = "" enable_rlz = false # no RLZ ping (also the unbranded default) + +# === ungoogled-chromium degoogling flags (vendored 149.0.7827.155-1) — see docs/UNGOOGLED.md === +# Build-safe subset of ungoogled's flags.gn: removes Google-connected services / phone-home +# without requiring source patches. NOTE: safe_browsing_mode=0 is intentionally NOT set — it +# needs the safe-browsing stub patches (patches/ungoogled/quarantine.series), which do not yet +# apply to this Chromium pin; setting it alone would break the link. +enable_reporting = false # no NEL / Reporting-API upload pipeline +enable_remoting = false # no Chrome Remote Desktop (Google-account-tied) +enable_mdns = false # no multicast-DNS local discovery +enable_service_discovery = false # no privet/Cast local service discovery (pairs with enable_mdns) +enable_hangout_services_extension = false # no built-in Google Meet/Hangouts helper extension +disable_fieldtrial_testing_config = true # behave like stable: no baked-in Google experiment config +exclude_unwind_tables = true # smaller binary, less stack metadata (symbol_level=0 already) diff --git a/build/args.gn.x64 b/build/args.gn.x64 index eaed8f7..b2847b2 100644 --- a/build/args.gn.x64 +++ b/build/args.gn.x64 @@ -31,3 +31,16 @@ google_api_key = "" google_default_client_id = "" google_default_client_secret = "" enable_rlz = false # no RLZ ping (also the unbranded default) + +# === ungoogled-chromium degoogling flags (vendored 149.0.7827.155-1) — see docs/UNGOOGLED.md === +# Build-safe subset of ungoogled's flags.gn: removes Google-connected services / phone-home +# without requiring source patches. NOTE: safe_browsing_mode=0 is intentionally NOT set — it +# needs the safe-browsing stub patches (patches/ungoogled/quarantine.series), which do not yet +# apply to this Chromium pin; setting it alone would break the link. +enable_reporting = false # no NEL / Reporting-API upload pipeline +enable_remoting = false # no Chrome Remote Desktop (Google-account-tied) +enable_mdns = false # no multicast-DNS local discovery +enable_service_discovery = false # no privet/Cast local service discovery (pairs with enable_mdns) +enable_hangout_services_extension = false # no built-in Google Meet/Hangouts helper extension +disable_fieldtrial_testing_config = true # behave like stable: no baked-in Google experiment config +exclude_unwind_tables = true # smaller binary, less stack metadata (symbol_level=0 already) diff --git a/docs/UNGOOGLED.md b/docs/UNGOOGLED.md new file mode 100644 index 0000000..8f3ab02 --- /dev/null +++ b/docs/UNGOOGLED.md @@ -0,0 +1,184 @@ +# Degoogling — ungoogled-chromium integration + +Xplorer borrows the **degoogling patches** from +[ungoogled-chromium](https://github.com/ungoogled-software/ungoogled-chromium) to strip the +remaining Google phone-home / telemetry / tracking channels out of the Chromium base, while +keeping Xplorer's own integration (Grok in every tab, the Agent Gateway, branding) fully +intact. This document explains exactly what was taken, what was deliberately left out, why, +and how to keep it current. + +> **Scope decision:** we take the **patch series only**. We do **not** apply ungoogled's +> *domain substitution* (rewriting every Google domain to the `qjz9zk` placeholder) or its +> *binary pruning*. Those break legitimate Google sign-in / Chrome Web Store / Translate and +> carry a large per-bump maintenance cost, for little additional benefit to a browser that is +> meant to stay usable. Grok runs over `grok.com` / `x.com` (not Google domains) and is +> unaffected by anything here. + +## The version-skew situation (read this first) + +ungoogled-chromium patches target an **exact** Chromium version. Their newest release is +**149.0.7827.155-1**; they have shipped **no 150 and no 151**. Xplorer pins +**Chromium 151.0.7897.0** — roughly **two milestones ahead** of ungoogled. + +Consequence: their 149-targeted patches cannot be expected to apply to 151 verbatim. We +therefore treat their 149 series as the **source of truth for content**, and select only the +patches that still apply to our 151 tree (verified with `git apply --check`). Patches that +have drifted are kept in-repo but **quarantined** (not applied) until they can be re-anchored +or until ungoogled ships a ≥150 tag we can refresh from. + +The pins are recorded in [`/VERSIONS`](../VERSIONS). + +## How it's wired + +``` +apply.sh / apply.ps1 + ├─ copy src/chrome, icons … + ├─ patches/apply_integration.py # Xplorer's Grok + branding edits (authoritative) + └─ scripts/apply_ungoogled.sh # ← degoogling pass, runs LAST +``` + +- The degoogling pass runs **after** `apply_integration.py` on purpose: Xplorer's Grok and + branding edits land first and unconditionally; the ungoogled patches are best-effort on top. +- `scripts/apply_ungoogled.sh` (and the `.ps1` mirror) is **idempotent** (skips + already-applied patches) and **non-fatal** (a patch that has drifted against the current pin + is logged and skipped — it never breaks the overlay, since these patches only *remove* + Google channels; a missing one degrades privacy coverage, it doesn't break Xplorer). +- Patches are **vendored verbatim** under `patches/ungoogled/`, preserving their upstream + sub-paths (`core/…`, `extra/…`) as provenance, so they diff cleanly against future + ungoogled refreshes. Source: ungoogled-chromium 149.0.7827.155-1 + (`2a53b77d33b055a4a41139007fb60b6ec1960a48`). + +### Verify (read-only — never builds, never writes the tree) + +```sh +scripts/check_ungoogled_patches.sh # checks the ACTIVE series against ../chromium/src +scripts/check_ungoogled_patches.sh --all # also reports the quarantine set +scripts/check_ungoogled_patches.sh /path/to/chromium/src --all +``` + +It runs `git apply --check` per patch and reports `APPLIES` / `FAILS`. Run it whenever you +bump the Chromium pin or refresh the vendored patches; it exits non-zero if any **active** +patch fails (suitable as a CI / pre-bump gate). + +## What's applied — active series (24 patches) + +All verified to apply cleanly to Chromium 151.0.7897.0 (after Xplorer's overlay). Source: +[`patches/ungoogled/series`](../patches/ungoogled/series). Three change behavior (not just +telemetry) and are marked **[B]**. + +| Patch | Effect | +|-------|--------| +| `inox/0003-disable-autofill-download-manager` | No autofill crowdsourcing upload to Google | +| `inox/0015-disable-update-pings` | Empty updater Update/Ping URLs | +| `inox/0021-disable-rlz` | Compile out RLZ search-attribution tracking | +| `iridium/safe_browsing-disable-incident-reporting` | No Safe Browsing incident-report upload | +| `iridium/safe_browsing-disable-reporting-of-safebrowsing-over` | No client-side phishing verdict upload | +| `ungoogled/disable-crash-reporter` | No crash-dump upload to Google | +| `ungoogled/disable-fonts-googleapis-references` | Drop `fonts.googleapis.com` references | +| `ungoogled/disable-gaia` **[B]** | No browser-level Google sign-in / sync | +| `ungoogled/disable-gcm` | Disable Google Cloud Messaging (push) | +| `ungoogled/disable-network-time-tracker` | No `time.google` network-time ping | +| `ungoogled/disable-untraceable-urls` | Blank the RLZ financial-ping endpoint | +| `ungoogled/disable-webrtc-log-uploader` | No WebRTC log upload to Google | +| `ungoogled/doh-changes` **[B]** | Neutral DoH defaults (no Google auto-DoH) | +| `ungoogled/disable-mei-preload` | Drop Google Media-Engagement preload data | +| `ungoogled/remove-f1-shortcut` | F1 no longer opens `support.google.com` | +| `ungoogled/disable-domain-reliability` | No Google Domain Reliability uploads | +| `ungoogled/disable-profile-avatar-downloading` | No profile-avatar fetch from Google | +| `bromite/disable-fetching-field-trials` | Never fetch variations / field-trials from Google | +| `inox/0019-disable-battery-status-service` | Remove Battery Status API (fingerprinting surface) | +| `debian/google-api-warning` | Suppress the "Google API keys are missing" nag | +| `inox/0013-disable-missing-key-warning` | Companion missing-API-key warning suppression | +| `ungoogled/default-webrtc-ip-handling-policy` **[B]** | Default WebRTC IP policy that avoids local-IP leak | +| `ungoogled/disable-dial-repeating-discovery` | Stop repeating DIAL / Cast discovery | +| `ungoogled/disable-intranet-redirect-detector` | Stop random-hostname captive-portal DNS probes | + +**Behavioral notes for review** — `disable-gaia` removes the browser's own *sign-in to +Chrome / sync to Google* (it does **not** affect "Sign in with Google" on websites); +`doh-changes` adjusts Secure-DNS defaults; `default-webrtc-ip-handling-policy` changes the +default WebRTC IP-handling mode. If any of these isn't wanted, delete its line from +`patches/ungoogled/series` (the file is the single source of what gets applied). + +## What's added — GN flags + +Build-safe degoogling switches from ungoogled's `flags.gn`, appended to all four +`build/args.gn*` files: + +`enable_reporting=false`, `enable_remoting=false`, `enable_mdns=false`, +`enable_service_discovery=false`, `enable_hangout_services_extension=false`, +`disable_fieldtrial_testing_config=true`, `exclude_unwind_tables=true`. + +Five ungoogled flags (`use_official_google_api_keys=false`, the three empty +`google_*` keys, `enable_rlz=false`) were **already** set by Xplorer. + +> **Held back: `safe_browsing_mode=0`.** This is the single biggest degoogling flag, but +> setting it strips the Safe Browsing subsystem and requires ungoogled's +> `*-fix-building-without-safebrowsing` companion patches — which currently **fail** on 151 +> (they're quarantined). Enabling the flag without them would break the link. Runtime Safe +> Browsing *reporting* is already removed by the two iridium patches in the active series, so +> we keep the privacy win without the build risk. Graduate the flag once those patches are +> re-anchored. + +## What's quarantined (vendored, NOT applied — 10 patches) + +See [`patches/ungoogled/quarantine.series`](../patches/ungoogled/quarantine.series). Reasons: + +- **Drift (fail on 151, need a re-anchor):** `disable-privacy-sandbox`, + `toggle-translation-via-switch`, `remove-unused-preferences-fields`, + `disable-google-host-detection` (also touches suggest plumbing near the Grok omnibox — + reconcile carefully), `disable-fedcm-by-default`, `inox/0006-modify-default-prefs`. +- **Coupled to the held-back flag:** both `*-fix-building-without-safebrowsing` (only needed + with `safe_browsing_mode=0`). +- **Capability tradeoffs:** `disable-default-extensions`, `extensions-manifestv2`, and + `disable-webstore-urls` (this last one *applies cleanly* but removes Chrome Web Store + access, which conflicts with Xplorer's "every extension runs" positioning — opt in only if + you want full Web Store removal). + +## What's deliberately excluded (not vendored) + +- **Domain substitution** (`qjz9zk`) and **binary pruning** — out of scope (see top). +- **`replace-google-search-engine-with-nosearch`** and other **search / new-tab / branding** + patches — they rewrite the same `prepopulated_engines.json` "google" block and NTP/branding + that `patches/apply_integration.py` already rewrites to make **Grok** the default. They are + mutually exclusive with Xplorer's integration; Xplorer already achieves "no Google search" + via its own Grok edit. +- ungoogled's **chrome://flags UX toggles** (fingerprinting/referrer/etc. flag patches) — they + depend on ungoogled's flag-header infrastructure and are UX, not core degoogling. Candidates + for a later pass. + +## Keeping it updated + +ungoogled's own maintenance model (for reference): patches are a GNU **quilt** series pinned +to an exact Chromium version via `chromium_version.txt` + `revision.txt`; on a Chromium bump a +maintainer runs `quilt push -a --refresh` to rebase the whole series, fixes breakages one +patch at a time, and validates with `devutils/validate_patches.py` (no-fuzz apply against a +clean tree). Releases are tagged `{chromium_version}-{revision}`; an hourly Action watches +Google's version history and files a tracking issue when stable moves. Updating is volunteer / +best-effort, so they trail Chromium stable by days-to-weeks (today: a full ~2 milestones). + +**Xplorer's process** (lightweight analog — `scripts/check_ungoogled_patches.sh` is our +`validate_patches.py`): + +1. **On every Chromium pin bump:** re-run `scripts/check_ungoogled_patches.sh --all`. Any + active patch that newly `FAILS` moves to `quarantine.series` (coverage degrades *visibly* + in review, never silently). Put the `applies N / quarantined M` line in the PR. +2. **Reconcile high-value drift by hand** when needed before ungoogled catches up: re-anchor + the patch against `../chromium/src`, keep the reconciled copy under `patches/ungoogled/` + with a `reconciled-from ugc 149, pending upstream` note, and re-run the check. +3. **Graduate on an ungoogled ≥150/151 tag:** when ungoogled ships a tag at/after our + milestone, diff their refreshed `core/ungoogled-chromium/` series against our vendored copy, + replace our hand-reconciled patches with their official ones, re-run the check, clear the + matching quarantine entries, and bump `ungoogled =` in `/VERSIONS`. +4. **Watch upstream:** periodically check + for a tag whose + `chromium_version` ≥ our pin's milestone (mirrors ungoogled's own `new_version_check`). + +## Credit & license + +The patches under `patches/ungoogled/` are from +[ungoogled-chromium](https://github.com/ungoogled-software/ungoogled-chromium), which is +distributed under the **BSD-3-Clause** license — the same family as Chromium's. The upstream +license text is vendored alongside the patches at +[`patches/ungoogled/LICENSE.ungoogled`](../patches/ungoogled/LICENSE.ungoogled). With thanks +to the ungoogled-chromium project and the upstream patch sets it draws on (Inox, Bromite, +Iridium, Debian). diff --git a/patches/ungoogled/LICENSE.ungoogled b/patches/ungoogled/LICENSE.ungoogled new file mode 100644 index 0000000..41a4f15 --- /dev/null +++ b/patches/ungoogled/LICENSE.ungoogled @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2015-2026, The ungoogled-chromium Authors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/patches/ungoogled/core/bromite/disable-fetching-field-trials.patch b/patches/ungoogled/core/bromite/disable-fetching-field-trials.patch new file mode 100644 index 0000000..73dfb28 --- /dev/null +++ b/patches/ungoogled/core/bromite/disable-fetching-field-trials.patch @@ -0,0 +1,76 @@ +# NOTE: Modified to remove usage of compiler #if macros +From: csagan5 <32685696+csagan5@users.noreply.github.com> +Date: Sun, 8 Jul 2018 18:16:34 +0200 +Subject: Disable fetching of all field trials + +--- + .../browser/flags/ChromeFeatureList.java | 19 ++++--------------- + .../variations/service/variations_service.cc | 12 +----------- + 2 files changed, 5 insertions(+), 26 deletions(-) + +--- 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 +@@ -61,7 +61,7 @@ public abstract class ChromeFeatureList + * |kFeaturesExposedToJava| in chrome/browser/flags/android/chrome_feature_list.cc + */ + public static String getFieldTrialParamByFeature(String featureName, String paramName) { +- return ChromeFeatureMap.getInstance().getFieldTrialParamByFeature(featureName, paramName); ++ return ""; + } + + /** +@@ -73,8 +73,7 @@ public abstract class ChromeFeatureList + */ + public static boolean getFieldTrialParamByFeatureAsBoolean( + String featureName, String paramName, boolean defaultValue) { +- return ChromeFeatureMap.getInstance() +- .getFieldTrialParamByFeatureAsBoolean(featureName, paramName, defaultValue); ++ return defaultValue; + } + + /** +@@ -86,8 +85,7 @@ public abstract class ChromeFeatureList + */ + public static int getFieldTrialParamByFeatureAsInt( + String featureName, String paramName, int defaultValue) { +- return ChromeFeatureMap.getInstance() +- .getFieldTrialParamByFeatureAsInt(featureName, paramName, defaultValue); ++ return defaultValue; + } + + /** +@@ -99,8 +97,7 @@ public abstract class ChromeFeatureList + */ + public static double getFieldTrialParamByFeatureAsDouble( + String featureName, String paramName, double defaultValue) { +- return ChromeFeatureMap.getInstance() +- .getFieldTrialParamByFeatureAsDouble(featureName, paramName, defaultValue); ++ return defaultValue; + } + + /** +--- a/components/variations/service/variations_service.cc ++++ b/components/variations/service/variations_service.cc +@@ -225,22 +225,7 @@ bool GetInstanceManipulations(const net: + // Variations seed fetching is only enabled in official Chrome builds, if a URL + // is specified on the command line, and for testing. + bool IsFetchingEnabled() { +-#if BUILDFLAG(GOOGLE_CHROME_BRANDING) +- if (base::CommandLine::ForCurrentProcess()->HasSwitch( +- switches::kDisableVariationsSeedFetch)) { + return false; +- } +-#else +- if (!base::CommandLine::ForCurrentProcess()->HasSwitch( +- switches::kVariationsServerURL) && +- !g_should_fetch_for_testing) { +- DVLOG(1) +- << "Not performing repeated fetching in unofficial build without --" +- << switches::kVariationsServerURL << " specified."; +- return false; +- } +-#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) +- return true; + } + + // Returns the already downloaded first run seed, and clear the seed from the diff --git a/patches/ungoogled/core/inox-patchset/0001-fix-building-without-safebrowsing.patch b/patches/ungoogled/core/inox-patchset/0001-fix-building-without-safebrowsing.patch new file mode 100644 index 0000000..1de7fab --- /dev/null +++ b/patches/ungoogled/core/inox-patchset/0001-fix-building-without-safebrowsing.patch @@ -0,0 +1,199 @@ +--- a/chrome/browser/chrome_content_browser_client_navigation_throttles.cc ++++ b/chrome/browser/chrome_content_browser_client_navigation_throttles.cc +@@ -433,10 +433,6 @@ void CreateAndAddChromeThrottlesForNavig + Profile::FromBrowserContext(context)), + SafeSearchFactory::GetForBrowserContext(context))); + +- // Before setting up SSL error detection, configure SSLErrorHandler to invoke +- // the relevant extension API whenever an SSL interstitial is shown. +- SSLErrorHandler::SetClientCallbackOnInterstitialsShown( +- base::BindRepeating(&MaybeTriggerSecurityInterstitialShownEvent)); + registry.AddThrottle(std::make_unique( + registry, base::BindOnce(&HandleSSLErrorWrapper), + base::BindOnce(&IsInWebApp), +--- a/chrome/browser/component_updater/file_type_policies_component_installer.cc ++++ b/chrome/browser/component_updater/file_type_policies_component_installer.cc +@@ -36,21 +36,6 @@ const uint8_t kFileTypePoliciesPublicKey + const char kFileTypePoliciesManifestName[] = "File Type Policies"; + + void LoadFileTypesFromDisk(const base::FilePath& pb_path) { +- if (pb_path.empty()) { +- return; +- } +- +- VLOG(1) << "Reading Download File Types from file: " << pb_path.value(); +- std::string binary_pb; +- if (!base::ReadFileToString(pb_path, &binary_pb)) { +- // The file won't exist on new installations, so this is not always an +- // error. +- VLOG(1) << "Failed reading from " << pb_path.value(); +- return; +- } +- +- safe_browsing::FileTypePolicies::GetInstance()->PopulateFromDynamicUpdate( +- binary_pb); + } + + } // namespace +--- a/chrome/browser/download/download_item_model.cc ++++ b/chrome/browser/download/download_item_model.cc +@@ -129,7 +129,7 @@ class DownloadItemModelData : public bas + + // Danger level of the file determined based on the file type and whether + // there was a user action associated with the download. +- DownloadFileType::DangerLevel danger_level_ = DownloadFileType::NOT_DANGEROUS; ++ safe_browsing::DownloadFileType::DangerLevel danger_level_ = safe_browsing::DownloadFileType::NOT_DANGEROUS; + + // Whether the download is currently being revived. + bool is_being_revived_ = false; +@@ -468,13 +468,13 @@ void DownloadItemModel::SetShouldPreferO + data->should_prefer_opening_in_browser_ = preference; + } + +-DownloadFileType::DangerLevel DownloadItemModel::GetDangerLevel() const { ++safe_browsing::DownloadFileType::DangerLevel DownloadItemModel::GetDangerLevel() const { + const DownloadItemModelData* data = DownloadItemModelData::Get(download_); +- return data ? data->danger_level_ : DownloadFileType::NOT_DANGEROUS; ++ return data ? data->danger_level_ : safe_browsing::DownloadFileType::NOT_DANGEROUS; + } + + void DownloadItemModel::SetDangerLevel( +- DownloadFileType::DangerLevel danger_level) { ++ safe_browsing::DownloadFileType::DangerLevel danger_level) { + DownloadItemModelData* data = DownloadItemModelData::GetOrCreate(download_); + data->danger_level_ = danger_level; + } +--- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc ++++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc +@@ -849,18 +849,6 @@ void WebstorePrivateBeginInstallWithMani + + void WebstorePrivateBeginInstallWithManifest3Function:: + ReportFrictionAcceptedEvent() { +- if (!profile_) { +- return; +- } +- auto* metrics_collector = +- safe_browsing::SafeBrowsingMetricsCollectorFactory::GetForProfile( +- profile_); +- // `metrics_collector` can be null in incognito. +- if (metrics_collector) { +- metrics_collector->AddSafeBrowsingEventToPref( +- safe_browsing::SafeBrowsingMetricsCollector::EventType:: +- EXTENSION_ALLOWLIST_INSTALL_BYPASS); +- } + } + + void WebstorePrivateBeginInstallWithManifest3Function::OnInstallPromptDone( +--- a/chrome/browser/safe_browsing/BUILD.gn ++++ b/chrome/browser/safe_browsing/BUILD.gn +@@ -7,6 +7,7 @@ import("//components/safe_browsing/build + import("//extensions/buildflags/buildflags.gni") + + static_library("safe_browsing") { ++ if (false) { + public = [ + "chrome_controller_client.h", + "metrics/bundled_settings_metrics_provider.h", +@@ -104,6 +105,7 @@ static_library("safe_browsing") { + "//services/metrics/public/cpp:ukm_builders", + "//services/preferences/public/cpp", + ] ++ } + + if (enable_extensions) { + deps += [ "//chrome/browser/ui/web_applications" ] +@@ -678,6 +680,7 @@ static_library("advanced_protection") { + } + + source_set("metrics_collector") { ++ if (false) { + sources = [ + "safe_browsing_metrics_collector_factory.cc", + "safe_browsing_metrics_collector_factory.h", +@@ -697,6 +700,7 @@ source_set("metrics_collector") { + "//components/safe_browsing/core/common:safe_browsing_prefs", + "//content/public/browser", + ] ++ } + } + + source_set("unit_tests") { +--- a/chrome/browser/ui/webui/downloads/downloads_dom_handler.cc ++++ b/chrome/browser/ui/webui/downloads/downloads_dom_handler.cc +@@ -25,7 +25,6 @@ + #include "base/values.h" + #include "build/branding_buildflags.h" + #include "chrome/browser/browser_process.h" +-#include "chrome/browser/download/download_danger_prompt.h" + #include "chrome/browser/download/download_history.h" + #include "chrome/browser/download/download_item_model.h" + #include "chrome/browser/download/download_item_warning_data.h" +@@ -565,12 +564,6 @@ void DownloadsDOMHandler::RemoveDownload + IdSet ids; + + for (download::DownloadItem* download : to_remove) { +- if (download->IsDangerous() || download->IsInsecure()) { +- // Don't allow users to revive dangerous downloads; just nuke 'em. +- download->Remove(); +- continue; +- } +- + DownloadItemModel item_model(download); + if (!item_model.ShouldShowInUi() || + download->GetState() == download::DownloadItem::IN_PROGRESS) { +--- a/chrome/browser/ui/webui/downloads/downloads_dom_handler.h ++++ b/chrome/browser/ui/webui/downloads/downloads_dom_handler.h +@@ -13,7 +13,6 @@ + #include "base/memory/raw_ptr.h" + #include "base/memory/weak_ptr.h" + #include "base/time/time.h" +-#include "chrome/browser/download/download_danger_prompt.h" + #include "chrome/browser/download/download_warning_desktop_hats_utils.h" + #include "chrome/browser/ui/webui/downloads/downloads.mojom-forward.h" + #include "chrome/browser/ui/webui/downloads/downloads_list_tracker.h" +--- a/chrome/renderer/chrome_content_renderer_client.cc ++++ b/chrome/renderer/chrome_content_renderer_client.cc +@@ -110,7 +110,6 @@ + #include "components/pdf/common/pdf_util.h" + #include "components/permissions/features.h" + #include "components/safe_browsing/buildflags.h" +-#include "components/safe_browsing/content/renderer/threat_dom_details.h" + #include "components/sampling_profiler/process_type.h" + #include "components/sampling_profiler/thread_profiler.h" + #include "components/security_interstitials/content/renderer/security_interstitial_page_controller_delegate_impl.h" +--- a/extensions/browser/blocklist_state_fetcher.cc ++++ b/extensions/browser/blocklist_state_fetcher.cc +@@ -69,8 +69,7 @@ void BlocklistStateFetcher::SendRequest( + std::string request_str; + request.SerializeToString(&request_str); + +- GURL request_url = GURL(safe_browsing::GetReportUrl( +- *safe_browsing_config_, "clientreport/crx-list-info")); ++ GURL request_url = GURL(); + net::NetworkTrafficAnnotationTag traffic_annotation = + net::DefineNetworkTrafficAnnotation("extension_blacklist", R"( + semantics { +@@ -134,12 +133,6 @@ void BlocklistStateFetcher::SendRequest( + base::Unretained(this), fetcher)); + } + +-void BlocklistStateFetcher::SetSafeBrowsingConfig( +- const safe_browsing::V4ProtocolConfig& config) { +- safe_browsing_config_ = +- std::make_unique(config); +-} +- + void BlocklistStateFetcher::OnURLLoaderComplete( + network::SimpleURLLoader* url_loader, + std::optional response_body) { +--- a/extensions/browser/blocklist_state_fetcher.h ++++ b/extensions/browser/blocklist_state_fetcher.h +@@ -41,8 +41,6 @@ class BlocklistStateFetcher { + + virtual void Request(const std::string& id, RequestCallback callback); + +- void SetSafeBrowsingConfig(const safe_browsing::V4ProtocolConfig& config); +- + protected: + void OnURLLoaderComplete(network::SimpleURLLoader* url_loader, + std::optional response_body); diff --git a/patches/ungoogled/core/inox-patchset/0003-disable-autofill-download-manager.patch b/patches/ungoogled/core/inox-patchset/0003-disable-autofill-download-manager.patch new file mode 100644 index 0000000..4015a09 --- /dev/null +++ b/patches/ungoogled/core/inox-patchset/0003-disable-autofill-download-manager.patch @@ -0,0 +1,97 @@ +--- a/components/autofill/core/browser/crowdsourcing/autofill_crowdsourcing_manager.cc ++++ b/components/autofill/core/browser/crowdsourcing/autofill_crowdsourcing_manager.cc +@@ -916,94 +916,6 @@ std::tuple AutofillCr + } + + bool AutofillCrowdsourcingManager::StartRequest(FormRequestData request_data) { +- // kRequestUploads take no IsolationInfo because Password Manager uploads when +- // RenderFrameHostImpl::DidCommitNavigation() is called, in which case +- // AutofillDriver::IsolationInfo() may crash because there is no committing +- // NavigationRequest. Not setting an IsolationInfo is safe because no +- // information about the response is passed to the renderer, or is otherwise +- // visible to a page. See crbug/1176635#c22. +-#if BUILDFLAG(IS_IOS) +- DCHECK(!request_data.isolation_info); +-#else +- DCHECK( +- (request_data.request_type == CrowdsourcingRequestType::kRequestUpload) == +- !request_data.isolation_info); +-#endif +- // Get the URL and method to use for this request. +- auto [request_url, method] = GetRequestURLAndMethod(request_data); +- +- // Track the URL length for GET queries because the URL length can be in the +- // thousands when rich metadata is enabled. +- if (request_data.request_type == CrowdsourcingRequestType::kRequestQuery && +- method == "GET") { +- base::UmaHistogramCounts100000(kUmaGetUrlLength, +- request_url.spec().length()); +- } +- +- auto resource_request = std::make_unique(); +- resource_request->url = request_url; +- resource_request->credentials_mode = network::mojom::CredentialsMode::kOmit; +- resource_request->method = method; +- +- if (request_data.isolation_info) { +- resource_request->trusted_params = +- network::ResourceRequest::TrustedParams(); +- resource_request->trusted_params->isolation_info = +- *request_data.isolation_info; +- } +- +- // Add Chrome experiment state to the request headers. +- variations::AppendVariationsHeaderUnknownSignedIn( +- request_url, +- client_->IsOffTheRecord() ? variations::InIncognito::kYes +- : variations::InIncognito::kNo, +- resource_request.get()); +- +- // Set headers specific to the API. +- // Encode response serialized proto in base64 for safety. +- resource_request->headers.SetHeader(kGoogEncodeResponseIfExecutable, +- "base64"); +- +- // Add API key to the request if a key exists, and the endpoint is trusted by +- // Google. +- if (!api_key_.empty() && request_url.SchemeIs(url::kHttpsScheme) && +- google_util::IsGoogleAssociatedDomainUrl(request_url)) { +- google_apis::AddAPIKeyToRequest(*resource_request, api_key_); +- } +- +- auto simple_loader = network::SimpleURLLoader::Create( +- std::move(resource_request), +- GetNetworkTrafficAnnotation(request_data.request_type)); +- +- // This allows reading the error message within the API response when status +- // is not 200 (e.g., 400). Otherwise, URL loader will not give any content in +- // the response when there is a failure, which makes debugging hard. +- simple_loader->SetAllowHttpErrorResults(true); +- +- if (method == "POST") { +- static constexpr char content_type[] = "application/x-protobuf"; +- std::optional payload = +- GetAPIBodyPayload(request_data.payload, request_data.request_type); +- if (!payload) { +- return false; +- } +- // Attach payload data and add data format header. +- simple_loader->AttachStringForUpload(std::move(payload).value(), +- content_type); +- } +- +- // Transfer ownership of the loader into url_loaders_. Temporarily hang +- // onto the raw pointer to use it as a key and to kick off the request; +- // transferring ownership (std::move) invalidates the `simple_loader` +- // variable. +- auto* raw_simple_loader = simple_loader.get(); +- url_loaders_.push_back(std::move(simple_loader)); +- raw_simple_loader->SetTimeoutDuration(kFetchTimeout); +- raw_simple_loader->DownloadToStringOfUnboundedSizeUntilCrashAndDie( +- client_->GetURLLoaderFactory().get(), +- base::BindOnce(&AutofillCrowdsourcingManager::OnSimpleLoaderComplete, +- base::Unretained(this), std::move(--url_loaders_.end()), +- std::move(request_data), base::TimeTicks::Now())); + return true; + } + diff --git a/patches/ungoogled/core/inox-patchset/0005-disable-default-extensions.patch b/patches/ungoogled/core/inox-patchset/0005-disable-default-extensions.patch new file mode 100644 index 0000000..eed75d5 --- /dev/null +++ b/patches/ungoogled/core/inox-patchset/0005-disable-default-extensions.patch @@ -0,0 +1,85 @@ +--- a/chrome/browser/extensions/component_extensions_allowlist/allowlist.cc ++++ b/chrome/browser/extensions/component_extensions_allowlist/allowlist.cc +@@ -34,7 +34,6 @@ namespace extensions { + bool IsComponentExtensionAllowlisted(const std::string& extension_id) { + constexpr auto kAllowed = base::MakeFixedFlatSet({ + extension_misc::kGlicExtensionId, +- extension_misc::kInAppPaymentsSupportAppId, + extension_misc::kPdfExtensionId, + #if BUILDFLAG(IS_CHROMEOS) + extension_misc::kAssessmentAssistantExtensionId, +--- a/chrome/browser/extensions/component_loader.cc ++++ b/chrome/browser/extensions/component_loader.cc +@@ -432,11 +432,6 @@ void ComponentLoader::AddWebStoreApp() { + return; + } + #endif +- +- AddWithNameAndDescription( +- IDR_WEBSTORE_MANIFEST, base::FilePath(FILE_PATH_LITERAL("web_store")), +- l10n_util::GetStringUTF8(IDS_WEBSTORE_NAME_STORE), +- l10n_util::GetStringUTF8(IDS_WEBSTORE_APP_DESCRIPTION)); + } + + #if BUILDFLAG(IS_CHROMEOS) +--- a/chrome/browser/extensions/external_component_loader.cc ++++ b/chrome/browser/extensions/external_component_loader.cc +@@ -41,9 +41,6 @@ ExternalComponentLoader::~ExternalCompon + void ExternalComponentLoader::StartLoading() { + auto prefs = base::DictValue(); + // Skip in-app payments app on Android. crbug.com/409396604 +-#if BUILDFLAG(GOOGLE_CHROME_BRANDING) && !BUILDFLAG(IS_ANDROID) +- AddExternalExtension(extension_misc::kInAppPaymentsSupportAppId, prefs); +-#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) && !BUILDFLAG(IS_ANDROID) + + #if BUILDFLAG(IS_CHROMEOS) + { +--- a/extensions/browser/webstore_installer.cc ++++ b/extensions/browser/webstore_installer.cc +@@ -483,21 +483,6 @@ void WebstoreInstaller::DownloadNextPend + + void WebstoreInstaller::DownloadCrx(const ExtensionId& extension_id, + InstallSource source) { +- download_url_ = GetWebstoreInstallURL(extension_id, source); +- MaybeAppendAuthUserParameter(approval_->authuser, download_url_); +- +- base::FilePath user_data_dir = +- ExtensionsBrowserClient::Get()->GetUserDataDir(); +- base::FilePath download_path = user_data_dir.Append(kWebstoreDownloadFolder); +- +- base::FilePath download_directory(g_download_directory_for_tests +- ? *g_download_directory_for_tests +- : download_path); +- +- GetExtensionFileTaskRunner()->PostTaskAndReplyWithResult( +- FROM_HERE, +- base::BindOnce(&GetDownloadFilePath, download_directory, extension_id), +- base::BindOnce(&WebstoreInstaller::StartDownload, this, extension_id)); + } + + // http://crbug.com/40957413 +@@ -655,24 +640,6 @@ void WebstoreInstaller::UpdateDownloadPr + void WebstoreInstaller::StartCrxInstaller(const DownloadItem& download) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + DCHECK(!crx_installer_.get()); +- +- const InstallApproval* approval = GetAssociatedApproval(download); +- DCHECK(approval); +- +- crx_installer_ = +- ExtensionsBrowserClient::Get()->CreateCrxInstallerFromDownloadItem( +- browser_context_, download); +- +- crx_installer_->set_expected_id(approval->extension_id); +- crx_installer_->set_is_gallery_install(true); +- crx_installer_->set_allow_silent_install(true); +- crx_installer_->AddInstallerCallback(base::BindOnce( +- &WebstoreInstaller::OnInstallerDone, weak_ptr_factory_.GetWeakPtr())); +- if (approval->withhold_permissions) { +- crx_installer_->set_withhold_permissions(); +- } +- +- crx_installer_->InstallCrx(download.GetFullPath()); + } + + void WebstoreInstaller::ReportFailure(const std::string& error, diff --git a/patches/ungoogled/core/inox-patchset/0015-disable-update-pings.patch b/patches/ungoogled/core/inox-patchset/0015-disable-update-pings.patch new file mode 100644 index 0000000..fccd227 --- /dev/null +++ b/patches/ungoogled/core/inox-patchset/0015-disable-update-pings.patch @@ -0,0 +1,11 @@ +--- a/chrome/updater/configurator.cc ++++ b/chrome/updater/configurator.cc +@@ -136,7 +136,7 @@ base::TimeDelta Configurator::UpdateDela + + std::vector Configurator::UpdateUrl() const { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +- return external_constants_->UpdateURL(); ++ return std::vector(); + } + + std::vector Configurator::PingUrl() const { diff --git a/patches/ungoogled/core/inox-patchset/0021-disable-rlz.patch b/patches/ungoogled/core/inox-patchset/0021-disable-rlz.patch new file mode 100644 index 0000000..4a096a9 --- /dev/null +++ b/patches/ungoogled/core/inox-patchset/0021-disable-rlz.patch @@ -0,0 +1,30 @@ +# Disable rlz + +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -455,14 +455,6 @@ group("gn_all") { + ] + } + +- if (is_chromeos || is_mac || is_win) { +- deps += [ +- "//rlz:rlz_id", +- "//rlz:rlz_lib", +- "//rlz:rlz_unittests", +- ] +- } +- + if (is_linux || is_chromeos) { + # The following are definitely linux-only. + deps += [ +--- a/rlz/buildflags/buildflags.gni ++++ b/rlz/buildflags/buildflags.gni +@@ -6,7 +6,7 @@ import("//build/config/chrome_build.gni" + + # Whether we are using the rlz library or not. Platforms like Android send + # rlz codes for searches but do not use the library. +-enable_rlz_support = is_win || is_apple || is_chromeos ++enable_rlz_support = false + + declare_args() { + enable_rlz = is_chrome_branded && enable_rlz_support diff --git a/patches/ungoogled/core/iridium-browser/safe_browsing-disable-incident-reporting.patch b/patches/ungoogled/core/iridium-browser/safe_browsing-disable-incident-reporting.patch new file mode 100644 index 0000000..78a1896 --- /dev/null +++ b/patches/ungoogled/core/iridium-browser/safe_browsing-disable-incident-reporting.patch @@ -0,0 +1,83 @@ +From 4dfa8ed0814040317cb82d8545502186daa0a204 Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +Date: Tue, 7 Jul 2015 17:02:09 +0200 +Subject: [PATCH 62/76] safe_browsing: disable incident reporting + +Disables the safebrowsing incident reporting where you could upload +information about a blocked URL to Google (also added a trk prefix to +the URL so we get notified if this happens again in the future). +--- + .../incident_reporting/incident_report_uploader_impl.cc | 2 +- + .../incident_reporting/incident_reporting_service.cc | 3 +++ + chrome/browser/safe_browsing/safe_browsing_blocking_page.cc | 3 +-- + chrome/browser/safe_browsing/safe_browsing_service.cc | 2 +- + .../security_interstitials/core/safe_browsing_loud_error_ui.cc | 1 + + 5 files changed, 7 insertions(+), 4 deletions(-) + +--- a/chrome/browser/safe_browsing/chrome_safe_browsing_blocking_page_factory.cc ++++ b/chrome/browser/safe_browsing/chrome_safe_browsing_blocking_page_factory.cc +@@ -63,8 +63,7 @@ ChromeSafeBrowsingBlockingPageFactory::C + Profile::FromBrowserContext(web_contents->GetBrowserContext()); + // Create appropriate display options for this blocking page. + PrefService* prefs = profile->GetPrefs(); +- bool is_extended_reporting_opt_in_allowed = +- IsExtendedReportingOptInAllowed(*prefs); ++ bool is_extended_reporting_opt_in_allowed = false; + bool is_proceed_anyway_disabled = IsSafeBrowsingProceedAnywayDisabled(*prefs); + + // Determine if any prefs need to be updated prior to showing the security +--- a/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc ++++ b/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc +@@ -29,7 +29,7 @@ namespace safe_browsing { + namespace { + + const char kSbIncidentReportUrl[] = +- "https://sb-ssl.google.com/safebrowsing/clientreport/incident"; ++ "trk:268:https://sb-ssl.google.com/safebrowsing/clientreport/incident"; + + constexpr net::NetworkTrafficAnnotationTag + kSafeBrowsingIncidentTrafficAnnotation = +--- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc ++++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc +@@ -302,11 +302,14 @@ IncidentReportingService::UploadContext: + + // static + bool IncidentReportingService::IsEnabledForProfile(Profile* profile) { ++ return false; ++#if 0 + if (profile->IsOffTheRecord()) + return false; + if (!IsSafeBrowsingEnabled(*profile->GetPrefs())) + return false; + return IsExtendedReportingEnabled(*profile->GetPrefs()); ++#endif + } + + IncidentReportingService::IncidentReportingService( +--- a/chrome/browser/safe_browsing/safe_browsing_service.cc ++++ b/chrome/browser/safe_browsing/safe_browsing_service.cc +@@ -519,7 +519,7 @@ SafeBrowsingUIManager* SafeBrowsingServi + } + + void SafeBrowsingServiceImpl::RegisterAllDelayedAnalysis() { +-#if BUILDFLAG(FULL_SAFE_BROWSING) ++#if 0 + RegisterBinaryIntegrityAnalysis(); + #endif + } +--- a/components/security_interstitials/core/safe_browsing_loud_error_ui.cc ++++ b/components/security_interstitials/core/safe_browsing_loud_error_ui.cc +@@ -27,11 +27,11 @@ namespace { + // For malware interstitial pages, we link the problematic URL to Google's + // diagnostic page. + const char kSbDiagnosticUrl[] = +- "https://transparencyreport.google.com/safe-browsing/search?url=%s"; ++ "trk:227:https://transparencyreport.google.com/safe-browsing/search?url=%s"; + + // Constants for the V4 phishing string upgrades. + const char kReportPhishingErrorUrl[] = +- "https://safebrowsing.google.com/safebrowsing/report_error/?url=%s"; ++ "trk:228:https://safebrowsing.google.com/safebrowsing/report_error/?url=%s"; + + void RecordExtendedReportingPrefChanged(bool report) { + UMA_HISTOGRAM_BOOLEAN("SafeBrowsing.Pref.Extended.SecurityInterstitial", diff --git a/patches/ungoogled/core/iridium-browser/safe_browsing-disable-reporting-of-safebrowsing-over.patch b/patches/ungoogled/core/iridium-browser/safe_browsing-disable-reporting-of-safebrowsing-over.patch new file mode 100644 index 0000000..4ec24c5 --- /dev/null +++ b/patches/ungoogled/core/iridium-browser/safe_browsing-disable-reporting-of-safebrowsing-over.patch @@ -0,0 +1,34 @@ +From c89ce946e5328ca8a7df923d421e904bb6bfe9b6 Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +Date: Tue, 7 Jul 2015 18:28:46 +0200 +Subject: [PATCH 63/76] safe_browsing: disable reporting of safebrowsing + override + +Disables reporting of the safebrowsing override, i.e. the report sent +if a user decides to visit a page that was flagged as "insecure". +This prevents trk:148 (phishing) and trk:149 (malware). +--- + components/safe_browsing/content/browser/client_side_detection_service.cc | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/components/safe_browsing/content/browser/client_side_detection_service.cc ++++ b/components/safe_browsing/content/browser/client_side_detection_service.cc +@@ -291,6 +291,10 @@ void ClientSideDetectionService::StartCl + return; + } + ++#if 1 ++ if (!callback.is_null()) ++ std::move(callback).Run(GURL(request->url()), false, std::nullopt, std::nullopt); ++#else + std::string request_data; + request->SerializeToString(&request_data); + +@@ -370,6 +374,7 @@ void ClientSideDetectionService::StartCl + &WebUIContentInfoSingleton::AddToClientPhishingRequestsSent, + base::Unretained(WebUIContentInfoSingleton::GetInstance()), + std::move(request), access_token)); ++#endif + } + + void ClientSideDetectionService::HandlePhishingVerdict( diff --git a/patches/ungoogled/core/ungoogled-chromium/disable-crash-reporter.patch b/patches/ungoogled/core/ungoogled-chromium/disable-crash-reporter.patch new file mode 100644 index 0000000..c725c9e --- /dev/null +++ b/patches/ungoogled/core/ungoogled-chromium/disable-crash-reporter.patch @@ -0,0 +1,49 @@ +# Disable some background communication with clients2.google.com + +--- a/components/crash/core/app/crash_reporter_client.cc ++++ b/components/crash/core/app/crash_reporter_client.cc +@@ -146,7 +146,7 @@ void CrashReporterClient::GetSanitizatio + #endif + + std::string CrashReporterClient::GetUploadUrl() { +-#if BUILDFLAG(GOOGLE_CHROME_BRANDING) && defined(OFFICIAL_BUILD) ++#if 0 + return kDefaultUploadURL; + #else + return std::string(); +--- a/components/crash/core/app/crashpad.cc ++++ b/components/crash/core/app/crashpad.cc +@@ -73,6 +73,13 @@ bool InitializeCrashpadImpl(bool initial + const std::vector& initial_arguments, + bool embedded_handler, + const std::vector& attachments) { ++// Crashpad is needed on Linux because it's used as a WASM signal handler. ++// This is not the case on other platforms, and so it can remain entirely ++// disabled there. ++#if !BUILDFLAG(IS_LINUX) ++ return false; ++#endif ++ + static bool initialized = false; + DCHECK(!initialized); + initialized = true; +--- a/third_party/crashpad/crashpad/handler/handler_main.cc ++++ b/third_party/crashpad/crashpad/handler/handler_main.cc +@@ -875,7 +875,7 @@ int HandlerMain(int argc, + #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || + // BUILDFLAG(IS_ANDROID) + case kOptionURL: { +- options.url = optarg; ++ options.url = ""; + break; + } + #if BUILDFLAG(IS_CHROMEOS) +@@ -1016,7 +1016,7 @@ int HandlerMain(int argc, + } + + ScopedStoppable upload_thread; +- if (!options.url.empty()) { ++ if ((false)) { + // TODO(scottmg): options.rate_limit should be removed when we have a + // configurable database setting to control upload limiting. + // See https://crashpad.chromium.org/bug/23. diff --git a/patches/ungoogled/core/ungoogled-chromium/disable-domain-reliability.patch b/patches/ungoogled/core/ungoogled-chromium/disable-domain-reliability.patch new file mode 100644 index 0000000..d3eda46 --- /dev/null +++ b/patches/ungoogled/core/ungoogled-chromium/disable-domain-reliability.patch @@ -0,0 +1,721 @@ +## Disable domain reliability component +# Many of these changes are for thoroughness, +# the most significant changes are in service_factory.cc and uploader.cc + +--- a/chrome/browser/domain_reliability/service_factory.cc ++++ b/chrome/browser/domain_reliability/service_factory.cc +@@ -10,36 +10,10 @@ + + namespace domain_reliability { + +-namespace { +- +-// If Domain Reliability is enabled in the absence of a flag or field trial. +-const bool kDefaultEnabled = true; +- +-// The name and value of the field trial to turn Domain Reliability on. +-const char kFieldTrialName[] = "DomRel-Enable"; +-const char kFieldTrialValueEnable[] = "enable"; +- +-} // namespace +- + const char kUploadReporterString[] = "chrome"; + + bool ShouldCreateService(const DomainReliabilityServiceDelegate* delegate) { +- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); +- if (command_line->HasSwitch(switches::kDisableDomainReliability)) +- return false; +- if (command_line->HasSwitch(switches::kEnableDomainReliability)) +- return true; +- if (!delegate->IsDomainReliabilityAllowed()) { +- return false; +- } +- if (!delegate->IsMetricsAndCrashReportingEnabled()) { +- return false; +- } +- if (base::FieldTrialList::TrialExists(kFieldTrialName)) { +- std::string value = base::FieldTrialList::FindFullName(kFieldTrialName); +- return (value == kFieldTrialValueEnable); +- } +- return kDefaultEnabled; ++ return false; + } + + } // namespace domain_reliability +--- a/chrome/browser/net/profile_network_context_service.cc ++++ b/chrome/browser/net/profile_network_context_service.cc +@@ -184,8 +184,7 @@ class ChromeDomainReliabilityDelegate + ~ChromeDomainReliabilityDelegate() override = default; + + bool IsDomainReliabilityAllowed() const override { +- return g_browser_process->local_state()->GetBoolean( +- domain_reliability::prefs::kDomainReliabilityAllowedByPolicy); ++ return false; + } + + bool IsMetricsAndCrashReportingEnabled() const override { +--- a/components/domain_reliability/BUILD.gn ++++ b/components/domain_reliability/BUILD.gn +@@ -7,26 +7,6 @@ action("bake_in_configs") { + script = "bake_in_configs.py" + + inputs = [ +- "baked_in_configs/c_android_clients_google_com.json", +- "baked_in_configs/c_bigcache_googleapis_com.json", +- "baked_in_configs/c_doc-0-0-sj_sj_googleusercontent_com.json", +- "baked_in_configs/c_docs_google_com.json", +- "baked_in_configs/c_drive_google_com.json", +- "baked_in_configs/c_googlesyndication_com.json", +- "baked_in_configs/c_pack_google_com.json", +- "baked_in_configs/c_play_google_com.json", +- "baked_in_configs/c_youtube_com.json", +- "baked_in_configs/clients2_google_com.json", +- "baked_in_configs/docs_google_com.json", +- "baked_in_configs/gcp_gvt2_com.json", +- "baked_in_configs/gcp_gvt6_com.json", +- "baked_in_configs/google-analytics_com.json", +- "baked_in_configs/googlevideo_com.json", +- "baked_in_configs/gvt1_com.json", +- "baked_in_configs/gvt2_com.json", +- "baked_in_configs/gvt6_com.json", +- "baked_in_configs/ssl_gstatic_com.json", +- "baked_in_configs/www_google_com.json", + ] + + output_file = "$target_gen_dir/baked_in_configs.cc" +@@ -34,13 +14,21 @@ action("bake_in_configs") { + + # The JSON file list is too long for the command line on Windows, so put + # them in a response file. +- response_file_contents = rebase_path(inputs, root_build_dir) +- args = [ +- "--file-list", +- "{{response_file_name}}", +- "--output", +- rebase_path(output_file, root_build_dir), +- ] ++ if (host_os == "win") { ++ args = [ ++ "--file-list", ++ "nul", ++ "--output", ++ rebase_path(output_file, root_build_dir), ++ ] ++ } else { ++ args = [ ++ "--file-list", ++ "/dev/null", ++ "--output", ++ rebase_path(output_file, root_build_dir), ++ ] ++ } + } + + component("domain_reliability") { +--- a/components/domain_reliability/bake_in_configs.py ++++ b/components/domain_reliability/bake_in_configs.py +@@ -490,7 +490,7 @@ def origin_is_whitelisted(origin): + domain = origin[8:-1] + else: + return False +- return any(domain == e or domain.endswith('.' + e) for e in DOMAIN_WHITELIST) ++ return False + + + def quote_and_wrap_text(text, width=79, prefix=' "', suffix='"'): +--- a/components/domain_reliability/google_configs.cc ++++ b/components/domain_reliability/google_configs.cc +@@ -13,569 +13,8 @@ + + namespace domain_reliability { + +-namespace { +- +-struct GoogleConfigParams { +- bool include_subdomains; +- +- // If true, prepend a collector URL within https://|hostname|/. +- bool include_origin_specific_collector; +- +- // If true, also add a config for www.|hostname|. +- // +- // |include_subdomains| will be false in the extra config, but +- // |include_origin_specific_collector| will be respected, and will use the +- // www subdomain as the origin for the collector so it matches the config. +- bool duplicate_for_www; +-}; +- +-const auto kGoogleConfigs = base::MakeFixedFlatMap({ +- // Origins with subdomains and same-origin collectors. Currently, all +- // origins with same-origin collectors also run collectors on their www +- // subdomain. (e.g., both foo.com and www.foo.com.) +- {"google.ac", {true, true, true}}, +- {"google.ad", {true, true, true}}, +- {"google.ae", {true, true, true}}, +- {"google.af", {true, true, true}}, +- {"google.ag", {true, true, true}}, +- {"google.al", {true, true, true}}, +- {"google.am", {true, true, true}}, +- {"google.as", {true, true, true}}, +- {"google.at", {true, true, true}}, +- {"google.az", {true, true, true}}, +- {"google.ba", {true, true, true}}, +- {"google.be", {true, true, true}}, +- {"google.bf", {true, true, true}}, +- {"google.bg", {true, true, true}}, +- {"google.bi", {true, true, true}}, +- {"google.bj", {true, true, true}}, +- {"google.bs", {true, true, true}}, +- {"google.bt", {true, true, true}}, +- {"google.by", {true, true, true}}, +- {"google.ca", {true, true, true}}, +- {"google.cc", {true, true, true}}, +- {"google.cd", {true, true, true}}, +- {"google.cf", {true, true, true}}, +- {"google.cg", {true, true, true}}, +- {"google.ch", {true, true, true}}, +- {"google.ci", {true, true, true}}, +- {"google.cl", {true, true, true}}, +- {"google.cm", {true, true, true}}, +- {"google.cn", {true, true, true}}, +- {"google.co.ao", {true, true, true}}, +- {"google.co.bw", {true, true, true}}, +- {"google.co.ck", {true, true, true}}, +- {"google.co.cr", {true, true, true}}, +- {"google.co.hu", {true, true, true}}, +- {"google.co.id", {true, true, true}}, +- {"google.co.il", {true, true, true}}, +- {"google.co.im", {true, true, true}}, +- {"google.co.in", {true, true, true}}, +- {"google.co.je", {true, true, true}}, +- {"google.co.jp", {true, true, true}}, +- {"google.co.ke", {true, true, true}}, +- {"google.co.kr", {true, true, true}}, +- {"google.co.ls", {true, true, true}}, +- {"google.co.ma", {true, true, true}}, +- {"google.co.mz", {true, true, true}}, +- {"google.co.nz", {true, true, true}}, +- {"google.co.th", {true, true, true}}, +- {"google.co.tz", {true, true, true}}, +- {"google.co.ug", {true, true, true}}, +- {"google.co.uk", {true, true, true}}, +- {"google.co.uz", {true, true, true}}, +- {"google.co.ve", {true, true, true}}, +- {"google.co.vi", {true, true, true}}, +- {"google.co.za", {true, true, true}}, +- {"google.co.zm", {true, true, true}}, +- {"google.co.zw", {true, true, true}}, +- {"google.com.af", {true, true, true}}, +- {"google.com.ag", {true, true, true}}, +- {"google.com.ai", {true, true, true}}, +- {"google.com.ar", {true, true, true}}, +- {"google.com.au", {true, true, true}}, +- {"google.com.bd", {true, true, true}}, +- {"google.com.bh", {true, true, true}}, +- {"google.com.bn", {true, true, true}}, +- {"google.com.bo", {true, true, true}}, +- {"google.com.br", {true, true, true}}, +- {"google.com.by", {true, true, true}}, +- {"google.com.bz", {true, true, true}}, +- {"google.com.cn", {true, true, true}}, +- {"google.com.co", {true, true, true}}, +- {"google.com.cu", {true, true, true}}, +- {"google.com.cy", {true, true, true}}, +- {"google.com.do", {true, true, true}}, +- {"google.com.ec", {true, true, true}}, +- {"google.com.eg", {true, true, true}}, +- {"google.com.et", {true, true, true}}, +- {"google.com.fj", {true, true, true}}, +- {"google.com.ge", {true, true, true}}, +- {"google.com.gh", {true, true, true}}, +- {"google.com.gi", {true, true, true}}, +- {"google.com.gr", {true, true, true}}, +- {"google.com.gt", {true, true, true}}, +- {"google.com.hk", {true, true, true}}, +- {"google.com.iq", {true, true, true}}, +- {"google.com.jm", {true, true, true}}, +- {"google.com.jo", {true, true, true}}, +- {"google.com.kh", {true, true, true}}, +- {"google.com.kw", {true, true, true}}, +- {"google.com.lb", {true, true, true}}, +- {"google.com.ly", {true, true, true}}, +- {"google.com.mm", {true, true, true}}, +- {"google.com.mt", {true, true, true}}, +- {"google.com.mx", {true, true, true}}, +- {"google.com.my", {true, true, true}}, +- {"google.com.na", {true, true, true}}, +- {"google.com.nf", {true, true, true}}, +- {"google.com.ng", {true, true, true}}, +- {"google.com.ni", {true, true, true}}, +- {"google.com.np", {true, true, true}}, +- {"google.com.nr", {true, true, true}}, +- {"google.com.om", {true, true, true}}, +- {"google.com.pa", {true, true, true}}, +- {"google.com.pe", {true, true, true}}, +- {"google.com.pg", {true, true, true}}, +- {"google.com.ph", {true, true, true}}, +- {"google.com.pk", {true, true, true}}, +- {"google.com.pl", {true, true, true}}, +- {"google.com.pr", {true, true, true}}, +- {"google.com.py", {true, true, true}}, +- {"google.com.qa", {true, true, true}}, +- {"google.com.ru", {true, true, true}}, +- {"google.com.sa", {true, true, true}}, +- {"google.com.sb", {true, true, true}}, +- {"google.com.sg", {true, true, true}}, +- {"google.com.sl", {true, true, true}}, +- {"google.com.sv", {true, true, true}}, +- {"google.com.tj", {true, true, true}}, +- {"google.com.tn", {true, true, true}}, +- {"google.com.tr", {true, true, true}}, +- {"google.com.tw", {true, true, true}}, +- {"google.com.ua", {true, true, true}}, +- {"google.com.uy", {true, true, true}}, +- {"google.com.vc", {true, true, true}}, +- {"google.com.ve", {true, true, true}}, +- {"google.com.vn", {true, true, true}}, +- {"google.cv", {true, true, true}}, +- {"google.cz", {true, true, true}}, +- {"google.de", {true, true, true}}, +- {"google.dj", {true, true, true}}, +- {"google.dk", {true, true, true}}, +- {"google.dm", {true, true, true}}, +- {"google.dz", {true, true, true}}, +- {"google.ee", {true, true, true}}, +- {"google.es", {true, true, true}}, +- {"google.fi", {true, true, true}}, +- {"google.fm", {true, true, true}}, +- {"google.fr", {true, true, true}}, +- {"google.ga", {true, true, true}}, +- {"google.ge", {true, true, true}}, +- {"google.gg", {true, true, true}}, +- {"google.gl", {true, true, true}}, +- {"google.gm", {true, true, true}}, +- {"google.gp", {true, true, true}}, +- {"google.gr", {true, true, true}}, +- {"google.gy", {true, true, true}}, +- {"google.hk", {true, true, true}}, +- {"google.hn", {true, true, true}}, +- {"google.hr", {true, true, true}}, +- {"google.ht", {true, true, true}}, +- {"google.hu", {true, true, true}}, +- {"google.ie", {true, true, true}}, +- {"google.im", {true, true, true}}, +- {"google.iq", {true, true, true}}, +- {"google.ir", {true, true, true}}, +- {"google.is", {true, true, true}}, +- {"google.it", {true, true, true}}, +- {"google.it.ao", {true, true, true}}, +- {"google.je", {true, true, true}}, +- {"google.jo", {true, true, true}}, +- {"google.jp", {true, true, true}}, +- {"google.kg", {true, true, true}}, +- {"google.ki", {true, true, true}}, +- {"google.kz", {true, true, true}}, +- {"google.la", {true, true, true}}, +- {"google.li", {true, true, true}}, +- {"google.lk", {true, true, true}}, +- {"google.lt", {true, true, true}}, +- {"google.lu", {true, true, true}}, +- {"google.lv", {true, true, true}}, +- {"google.md", {true, true, true}}, +- {"google.me", {true, true, true}}, +- {"google.mg", {true, true, true}}, +- {"google.mk", {true, true, true}}, +- {"google.ml", {true, true, true}}, +- {"google.mn", {true, true, true}}, +- {"google.ms", {true, true, true}}, +- {"google.mu", {true, true, true}}, +- {"google.mv", {true, true, true}}, +- {"google.mw", {true, true, true}}, +- {"google.ne", {true, true, true}}, +- {"google.ne.jp", {true, true, true}}, +- {"google.ng", {true, true, true}}, +- {"google.nl", {true, true, true}}, +- {"google.no", {true, true, true}}, +- {"google.nr", {true, true, true}}, +- {"google.nu", {true, true, true}}, +- {"google.off.ai", {true, true, true}}, +- {"google.pk", {true, true, true}}, +- {"google.pl", {true, true, true}}, +- {"google.pn", {true, true, true}}, +- {"google.ps", {true, true, true}}, +- {"google.pt", {true, true, true}}, +- {"google.ro", {true, true, true}}, +- {"google.rs", {true, true, true}}, +- {"google.ru", {true, true, true}}, +- {"google.rw", {true, true, true}}, +- {"google.sc", {true, true, true}}, +- {"google.se", {true, true, true}}, +- {"google.sh", {true, true, true}}, +- {"google.si", {true, true, true}}, +- {"google.sk", {true, true, true}}, +- {"google.sm", {true, true, true}}, +- {"google.sn", {true, true, true}}, +- {"google.so", {true, true, true}}, +- {"google.sr", {true, true, true}}, +- {"google.st", {true, true, true}}, +- {"google.td", {true, true, true}}, +- {"google.tg", {true, true, true}}, +- {"google.tk", {true, true, true}}, +- {"google.tl", {true, true, true}}, +- {"google.tm", {true, true, true}}, +- {"google.tn", {true, true, true}}, +- {"google.to", {true, true, true}}, +- {"google.tt", {true, true, true}}, +- {"google.us", {true, true, true}}, +- {"google.uz", {true, true, true}}, +- {"google.vg", {true, true, true}}, +- {"google.vu", {true, true, true}}, +- {"google.ws", {true, true, true}}, +- {"l.google.com", {true, true, true}}, +- +- // google.com is a special case. We have a custom config for www.google.com, +- // so set duplicate_for_www = false. +- {"google.com", {true, true, false}}, +- +- // Origins with subdomains and without same-origin collectors. +- {"2mdn.net", {true, false, false}}, +- {"adgoogle.net", {true, false, false}}, +- {"admeld.com", {true, false, false}}, +- {"admob.biz", {true, false, false}}, +- {"admob.co.in", {true, false, false}}, +- {"admob.co.kr", {true, false, false}}, +- {"admob.co.nz", {true, false, false}}, +- {"admob.co.uk", {true, false, false}}, +- {"admob.co.za", {true, false, false}}, +- {"admob.com", {true, false, false}}, +- {"admob.com.br", {true, false, false}}, +- {"admob.com.es", {true, false, false}}, +- {"admob.com.fr", {true, false, false}}, +- {"admob.com.mx", {true, false, false}}, +- {"admob.com.pt", {true, false, false}}, +- {"admob.de", {true, false, false}}, +- {"admob.dk", {true, false, false}}, +- {"admob.es", {true, false, false}}, +- {"admob.fi", {true, false, false}}, +- {"admob.fr", {true, false, false}}, +- {"admob.gr", {true, false, false}}, +- {"admob.hk", {true, false, false}}, +- {"admob.ie", {true, false, false}}, +- {"admob.in", {true, false, false}}, +- {"admob.it", {true, false, false}}, +- {"admob.jp", {true, false, false}}, +- {"admob.kr", {true, false, false}}, +- {"admob.mobi", {true, false, false}}, +- {"admob.no", {true, false, false}}, +- {"admob.ph", {true, false, false}}, +- {"admob.pt", {true, false, false}}, +- {"admob.sg", {true, false, false}}, +- {"admob.tw", {true, false, false}}, +- {"admob.us", {true, false, false}}, +- {"admob.vn", {true, false, false}}, +- {"adwhirl.com", {true, false, false}}, +- {"ampproject.com", {true, false, false}}, +- {"ampproject.net", {true, false, false}}, +- {"ampproject.org", {true, false, false}}, +- {"android.com", {true, false, false}}, +- {"cdn.ampproject.org", {true, false, false}}, +- {"chromecast.com", {true, false, false}}, +- {"chromeexperiments.com", {true, false, false}}, +- {"chromestatus.com", {true, false, false}}, +- {"chromium.org", {true, false, false}}, +- {"clients6.google.com", {true, false, false}}, +- {"cloudendpointsapis.com", {true, false, false}}, +- {"dartmotif.com", {true, false, false}}, +- {"dartsearch.net", {true, false, false}}, +- {"doubleclick.com", {true, false, false}}, +- {"doubleclick.ne.jp", {true, false, false}}, +- {"doubleclick.net", {true, false, false}}, +- {"doubleclickusercontent.com", {true, false, false}}, +- {"fls.doubleclick.net", {true, false, false}}, +- {"g.co", {true, false, false}}, +- {"g.doubleclick.net", {true, false, false}}, +- {"ggpht.com", {true, false, false}}, +- {"gmodules.com", {true, false, false}}, +- {"goo.gl", {true, false, false}}, +- {"google-syndication.com", {true, false, false}}, +- {"google.cat", {true, false, false}}, +- {"google.info", {true, false, false}}, +- {"google.jobs", {true, false, false}}, +- {"google.net", {true, false, false}}, +- {"google.org", {true, false, false}}, +- {"google.stackdriver.com", {true, false, false}}, +- {"googleadservices.com", {true, false, false}}, +- {"googleadsserving.cn", {true, false, false}}, +- {"googlealumni.com", {true, false, false}}, +- {"googleapis.cn", {true, false, false}}, +- {"googleapis.com", {true, false, false}}, +- {"googleapps.com", {true, false, false}}, +- {"googlecbs.com", {true, false, false}}, +- {"googlecode.com", {true, false, false}}, +- {"googlecommerce.com", {true, false, false}}, +- {"googledrive.com", {true, false, false}}, +- {"googleenterprise.com", {true, false, false}}, +- {"googlefiber.com", {true, false, false}}, +- {"googlefiber.net", {true, false, false}}, +- {"googlegoro.com", {true, false, false}}, +- {"googlehosted.com", {true, false, false}}, +- {"googlepayments.com", {true, false, false}}, +- {"googlesource.com", {true, false, false}}, +- {"googlesyndication.com", {true, false, false}}, +- {"googletagmanager.com", {true, false, false}}, +- {"googletagservices.com", {true, false, false}}, +- {"googleusercontent.com", {true, false, false}}, +- {"googlezip.net", {true, false, false}}, +- {"gstatic.cn", {true, false, false}}, +- {"gstatic.com", {true, false, false}}, +- {"gvt3.com", {true, false, false}}, +- {"gvt9.com", {true, false, false}}, +- {"picasa.com", {true, false, false}}, +- {"recaptcha.net", {true, false, false}}, +- {"stackdriver.com", {true, false, false}}, +- {"usercontent.google.com", {true, false, false}}, +- {"waze.com", {true, false, false}}, +- {"withgoogle.com", {true, false, false}}, +- {"youtu.be", {true, false, false}}, +- {"youtube-3rd-party.com", {true, false, false}}, +- {"youtube-nocookie.com", {true, false, false}}, +- {"youtube.ae", {true, false, false}}, +- {"youtube.al", {true, false, false}}, +- {"youtube.am", {true, false, false}}, +- {"youtube.at", {true, false, false}}, +- {"youtube.az", {true, false, false}}, +- {"youtube.ba", {true, false, false}}, +- {"youtube.be", {true, false, false}}, +- {"youtube.bg", {true, false, false}}, +- {"youtube.bh", {true, false, false}}, +- {"youtube.bo", {true, false, false}}, +- {"youtube.ca", {true, false, false}}, +- {"youtube.cat", {true, false, false}}, +- {"youtube.ch", {true, false, false}}, +- {"youtube.cl", {true, false, false}}, +- {"youtube.co", {true, false, false}}, +- {"youtube.co.ae", {true, false, false}}, +- {"youtube.co.at", {true, false, false}}, +- {"youtube.co.hu", {true, false, false}}, +- {"youtube.co.id", {true, false, false}}, +- {"youtube.co.il", {true, false, false}}, +- {"youtube.co.in", {true, false, false}}, +- {"youtube.co.jp", {true, false, false}}, +- {"youtube.co.ke", {true, false, false}}, +- {"youtube.co.kr", {true, false, false}}, +- {"youtube.co.ma", {true, false, false}}, +- {"youtube.co.nz", {true, false, false}}, +- {"youtube.co.th", {true, false, false}}, +- {"youtube.co.ug", {true, false, false}}, +- {"youtube.co.uk", {true, false, false}}, +- {"youtube.co.ve", {true, false, false}}, +- {"youtube.co.za", {true, false, false}}, +- {"youtube.com", {true, false, false}}, +- {"youtube.com.ar", {true, false, false}}, +- {"youtube.com.au", {true, false, false}}, +- {"youtube.com.az", {true, false, false}}, +- {"youtube.com.bh", {true, false, false}}, +- {"youtube.com.bo", {true, false, false}}, +- {"youtube.com.br", {true, false, false}}, +- {"youtube.com.by", {true, false, false}}, +- {"youtube.com.co", {true, false, false}}, +- {"youtube.com.do", {true, false, false}}, +- {"youtube.com.ee", {true, false, false}}, +- {"youtube.com.eg", {true, false, false}}, +- {"youtube.com.es", {true, false, false}}, +- {"youtube.com.gh", {true, false, false}}, +- {"youtube.com.gr", {true, false, false}}, +- {"youtube.com.gt", {true, false, false}}, +- {"youtube.com.hk", {true, false, false}}, +- {"youtube.com.hr", {true, false, false}}, +- {"youtube.com.jm", {true, false, false}}, +- {"youtube.com.jo", {true, false, false}}, +- {"youtube.com.kw", {true, false, false}}, +- {"youtube.com.lb", {true, false, false}}, +- {"youtube.com.lv", {true, false, false}}, +- {"youtube.com.mk", {true, false, false}}, +- {"youtube.com.mt", {true, false, false}}, +- {"youtube.com.mx", {true, false, false}}, +- {"youtube.com.my", {true, false, false}}, +- {"youtube.com.ng", {true, false, false}}, +- {"youtube.com.om", {true, false, false}}, +- {"youtube.com.pe", {true, false, false}}, +- {"youtube.com.ph", {true, false, false}}, +- {"youtube.com.pk", {true, false, false}}, +- {"youtube.com.pt", {true, false, false}}, +- {"youtube.com.qa", {true, false, false}}, +- {"youtube.com.ro", {true, false, false}}, +- {"youtube.com.sa", {true, false, false}}, +- {"youtube.com.sg", {true, false, false}}, +- {"youtube.com.tn", {true, false, false}}, +- {"youtube.com.tr", {true, false, false}}, +- {"youtube.com.tw", {true, false, false}}, +- {"youtube.com.ua", {true, false, false}}, +- {"youtube.com.uy", {true, false, false}}, +- {"youtube.com.ve", {true, false, false}}, +- {"youtube.cz", {true, false, false}}, +- {"youtube.de", {true, false, false}}, +- {"youtube.dk", {true, false, false}}, +- {"youtube.ee", {true, false, false}}, +- {"youtube.es", {true, false, false}}, +- {"youtube.fi", {true, false, false}}, +- {"youtube.fr", {true, false, false}}, +- {"youtube.ge", {true, false, false}}, +- {"youtube.gr", {true, false, false}}, +- {"youtube.gt", {true, false, false}}, +- {"youtube.hk", {true, false, false}}, +- {"youtube.hr", {true, false, false}}, +- {"youtube.hu", {true, false, false}}, +- {"youtube.ie", {true, false, false}}, +- {"youtube.in", {true, false, false}}, +- {"youtube.is", {true, false, false}}, +- {"youtube.it", {true, false, false}}, +- {"youtube.jo", {true, false, false}}, +- {"youtube.jp", {true, false, false}}, +- {"youtube.kr", {true, false, false}}, +- {"youtube.lk", {true, false, false}}, +- {"youtube.lt", {true, false, false}}, +- {"youtube.lv", {true, false, false}}, +- {"youtube.ma", {true, false, false}}, +- {"youtube.md", {true, false, false}}, +- {"youtube.me", {true, false, false}}, +- {"youtube.mk", {true, false, false}}, +- {"youtube.mx", {true, false, false}}, +- {"youtube.my", {true, false, false}}, +- {"youtube.ng", {true, false, false}}, +- {"youtube.nl", {true, false, false}}, +- {"youtube.no", {true, false, false}}, +- {"youtube.pe", {true, false, false}}, +- {"youtube.ph", {true, false, false}}, +- {"youtube.pk", {true, false, false}}, +- {"youtube.pl", {true, false, false}}, +- {"youtube.pr", {true, false, false}}, +- {"youtube.pt", {true, false, false}}, +- {"youtube.qa", {true, false, false}}, +- {"youtube.ro", {true, false, false}}, +- {"youtube.rs", {true, false, false}}, +- {"youtube.ru", {true, false, false}}, +- {"youtube.sa", {true, false, false}}, +- {"youtube.se", {true, false, false}}, +- {"youtube.sg", {true, false, false}}, +- {"youtube.si", {true, false, false}}, +- {"youtube.sk", {true, false, false}}, +- {"youtube.sn", {true, false, false}}, +- {"youtube.tn", {true, false, false}}, +- {"youtube.ua", {true, false, false}}, +- {"youtube.ug", {true, false, false}}, +- {"youtube.uy", {true, false, false}}, +- {"youtube.vn", {true, false, false}}, +- {"youtubeeducation.com", {true, false, false}}, +- {"youtubemobilesupport.com", {true, false, false}}, +- {"ytimg.com", {true, false, false}}, +- +- // Origins without subdomains and with same-origin collectors. +- {"accounts.google.com", {false, true, false}}, +- {"apis.google.com", {false, true, false}}, +- {"app.google.stackdriver.com", {false, true, false}}, +- {"b.mail.google.com", {false, true, false}}, +- {"chatenabled.mail.google.com", {false, true, false}}, +- {"ddm.google.com", {false, true, false}}, +- {"gmail.com", {false, true, false}}, +- {"gmail.google.com", {false, true, false}}, +- {"mail-attachment.googleusercontent.com", {false, true, false}}, +- {"mail.google.com", {false, true, false}}, +- {"www.gmail.com", {false, true, false}}, +- +- // Origins without subdomains or same-origin collectors. +- {"ad.doubleclick.net", {false, false, false}}, +- {"drive.google.com", {false, false, false}}, +- {"redirector.googlevideo.com", {false, false, false}}, +-}); +- +-const char* const kGoogleStandardCollectors[] = { +- "https://beacons.gcp.gvt2.com/domainreliability/upload", +- "https://beacons.gvt2.com/domainreliability/upload", +- "https://beacons2.gvt2.com/domainreliability/upload", +- "https://beacons3.gvt2.com/domainreliability/upload", +- "https://beacons4.gvt2.com/domainreliability/upload", +- "https://beacons5.gvt2.com/domainreliability/upload", +- "https://beacons5.gvt3.com/domainreliability/upload", +- "https://clients2.google.com/domainreliability/upload", +-}; +- +-const char* const kGoogleOriginSpecificCollectorPathString = +- "/domainreliability/upload"; +- +-std::unique_ptr CreateGoogleConfig( +- std::string_view hostname, +- const GoogleConfigParams& params, +- bool is_www) { +- CHECK(params.duplicate_for_www || !is_www); +- +- bool include_subdomains = params.include_subdomains && !is_www; +- +- auto config = std::make_unique(); +- GURL url(base::StrCat({"https://", (is_www ? "www." : ""), hostname, "/"})); +- config->origin = url::Origin::Create(url); +- config->include_subdomains = include_subdomains; +- config->collectors.clear(); +- if (params.include_origin_specific_collector) { +- GURL::Replacements replacements; +- replacements.SetPathStr(kGoogleOriginSpecificCollectorPathString); +- config->collectors.push_back( +- std::make_unique(url.ReplaceComponents(replacements))); +- } +- for (const char* collector : kGoogleStandardCollectors) { +- config->collectors.push_back(std::make_unique(collector)); +- } +- config->success_sample_rate = 0.05; +- config->failure_sample_rate = 1.00; +- config->path_prefixes.clear(); +- return config; +-} +- +-} // namespace +- + std::unique_ptr MaybeGetGoogleConfig( + const std::string& hostname) { +- bool is_www_subdomain = +- base::StartsWith(hostname, "www.", base::CompareCase::SENSITIVE); +- +- const auto itr = kGoogleConfigs.find(hostname); +- if (itr != std::end(kGoogleConfigs)) { +- return CreateGoogleConfig(hostname, itr->second, /*is_www=*/false); +- } +- std::string hostname_parent = net::GetSuperdomain(hostname); +- const auto parent_it = kGoogleConfigs.find(hostname_parent); +- if (parent_it != std::end(kGoogleConfigs)) { +- const GoogleConfigParams& params = parent_it->second; +- if (is_www_subdomain && params.duplicate_for_www) { +- return CreateGoogleConfig(hostname_parent, params, /*is_www=*/true); +- } +- if (params.include_subdomains) { +- return CreateGoogleConfig(hostname_parent, params, /*is_www=*/false); +- } +- } +- + return nullptr; + } + +@@ -583,12 +22,6 @@ std::vector> configs_out; + +- for (const auto& [hostname, params] : kGoogleConfigs) { +- configs_out.push_back(CreateGoogleConfig(hostname, params, false)); +- if (params.duplicate_for_www) { +- configs_out.push_back(CreateGoogleConfig(hostname, params, true)); +- } +- } + return configs_out; + } + +--- a/components/domain_reliability/uploader.cc ++++ b/components/domain_reliability/uploader.cc +@@ -80,7 +80,7 @@ class DomainReliabilityUploaderImpl : pu + if (discard_uploads_) + discarded_upload_count_++; + +- if (discard_uploads_ || shutdown_) { ++ if (true) { + DVLOG(1) << "Discarding report instead of uploading."; + UploadResult result; + result.status = UploadResult::SUCCESS; diff --git a/patches/ungoogled/core/ungoogled-chromium/disable-fonts-googleapis-references.patch b/patches/ungoogled/core/ungoogled-chromium/disable-fonts-googleapis-references.patch new file mode 100644 index 0000000..94c377e --- /dev/null +++ b/patches/ungoogled/core/ungoogled-chromium/disable-fonts-googleapis-references.patch @@ -0,0 +1,70 @@ +# Disables references to fonts.googleapis.com + +--- a/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc ++++ b/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc +@@ -308,7 +308,7 @@ bool DomDistillerViewerSource::ShouldSer + std::string DomDistillerViewerSource::GetContentSecurityPolicy( + network::mojom::CSPDirectiveName directive) { + if (directive == network::mojom::CSPDirectiveName::StyleSrc) { +- return "style-src 'self' https://fonts.googleapis.com;"; ++ return "style-src 'self';"; + } else if (directive == network::mojom::CSPDirectiveName::ChildSrc) { + return "child-src *;"; + } else if (directive == +--- a/components/dom_distiller/core/html/preview.html ++++ b/components/dom_distiller/core/html/preview.html +@@ -11,7 +11,7 @@ found in the LICENSE file. + + Title goes here and it could be kind of lengthy - Publisher name + +- ++ +