├── revision.txt ├── utils ├── __init__.py ├── tests │ ├── __init__.py │ ├── test_patches.py │ └── test_domain_substitution.py ├── third_party │ ├── __init__.py │ └── README.md ├── pytest.ini ├── .coveragerc ├── replace_resources.py └── generate_resources.py ├── version.txt ├── devutils ├── __init__.py ├── tests │ ├── __init__.py │ └── test_check_patch_files.py ├── third_party │ ├── __init__.py │ ├── README.md │ └── unidiff │ │ ├── __version__.py │ │ ├── errors.py │ │ ├── __init__.py │ │ └── constants.py ├── run_other_yapf.sh ├── print_tag_version.sh ├── run_utils_tests.sh ├── run_devutils_tests.sh ├── run_utils_yapf.sh ├── README.md ├── run_devutils_yapf.sh ├── pytest.ini ├── .coveragerc ├── check_all_code.sh ├── set_quilt_vars.fish ├── check_files_exist.py ├── lint.py ├── clear-ublock-assets.js ├── set_quilt_vars.sh ├── run_utils_pylint.py ├── run_devutils_pylint.py ├── validate_config.py └── check_downloads_ini.py ├── chromium_version.txt ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── config.yml │ ├── misc.md │ └── feature-request.yml ├── .well-known │ └── funding-manifest-urls ├── workflows │ ├── cirrus.yml │ ├── lint.yml │ ├── stale.yml │ └── release-and-tag.yml └── PULL_REQUEST_TEMPLATE.md ├── resources ├── branding │ ├── app_icon │ │ ├── file.png │ │ ├── raw.png │ │ ├── shadow.png │ │ └── shadow_cropped.png │ ├── product_logo.png │ ├── product_logo_200.png │ ├── product_logo_white.png │ ├── product_logo_22_mono.png │ ├── product_logo_white_200.png │ ├── product_logo.icon │ ├── product_logo.svg │ └── product_logo_color.icon ├── favicons │ ├── favicon_ntp_16.png │ ├── favicon_ntp_32.png │ ├── favicon_flags_16.png │ ├── favicon_flags_32.png │ ├── favicon_flags_48.png │ ├── favicon_history_16.png │ ├── favicon_history_32.png │ ├── favicon_history_48.png │ ├── favicon_plugins_16.png │ ├── favicon_plugins_32.png │ ├── favicon_bookmarks_16.png │ ├── favicon_bookmarks_32.png │ ├── favicon_conflicts_16.png │ ├── favicon_conflicts_32.png │ ├── favicon_downloads_16.png │ ├── favicon_downloads_32.png │ ├── favicon_settings_16.png │ ├── favicon_settings_32.png │ ├── favicon_management_16.png │ └── favicon_management_32.png └── generate_resources.txt ├── .cirrus_Dockerfile ├── .style.yapf ├── shell.nix ├── .cirrus_requirements.txt ├── .gitignore ├── patches ├── helium │ ├── core │ │ ├── search │ │ │ ├── fix-search-engine-icons.patch │ │ │ └── engine-defaults.patch │ │ ├── disable-live-caption-completely.patch │ │ ├── fix-building-without-safebrowsing.patch │ │ ├── disable-history-clusters.patch │ │ ├── disable-update-toast.patch │ │ ├── replace-default-profile-name.patch │ │ ├── disable-unsupported-importers.patch │ │ ├── disable-outdated-build-detector.patch │ │ ├── infinite-tab-freezing.patch │ │ ├── disable-ntp-footer.patch │ │ ├── prefer-https-by-default.patch │ │ ├── fix-instance-id-stuck.patch │ │ ├── disable-fedcm-bubble.patch │ │ ├── disable-bookmarks-bar.patch │ │ ├── unbreak-chromium-link.patch │ │ ├── reduce-accept-language-headers.patch │ │ ├── enable-tab-hover-cards.patch │ │ ├── enable-parallel-downloading.patch │ │ ├── memory-saving-by-default.patch │ │ ├── webrtc-default-handling-policy.patch │ │ ├── disable-touch-ui.patch │ │ ├── fix-component-extension-reenablement.patch │ │ ├── change-chromium-branding.patch │ │ ├── spoof-chrome-ua-brand.patch │ │ ├── fix-tab-sync-unreached-error.patch │ │ ├── update-default-browser-prefs.patch │ │ ├── disable-ad-topics-and-etc.patch │ │ ├── disable-user-education-nags.patch │ │ ├── increase-incognito-storage-quota.patch │ │ ├── browser-window-context-menu.patch │ │ ├── reenable-update-checks.patch │ │ ├── add-disable-ech-flag.patch │ │ ├── enable-tab-search-toolbar-button.patch │ │ ├── clean-omnibox-suggestions.patch │ │ ├── flags-setup.patch │ │ └── update-credits.patch │ ├── ui │ │ ├── square-ntp-monograms.patch │ │ ├── remove-autofill-link-to-password-manager.patch │ │ ├── smaller-window-grab-handle.patch │ │ ├── disable-tab-group-editor-footer.patch │ │ ├── enable-fluent-scrollbar.patch │ │ ├── remove-dead-profile-actions.patch │ │ ├── center-window-on-launch.patch │ │ ├── reduce-text-button-height.patch │ │ ├── remove-reading-list-from-app-menu.patch │ │ ├── square-interstitial-buttons.patch │ │ ├── profile-customization-cleanup.patch │ │ ├── clean-up-installed-extension-bubble.patch │ │ ├── remove-zoom-action.patch │ │ ├── helium-logo-icons.patch │ │ ├── bookmark-button-bg-fix.patch │ │ ├── thinner-infobar.patch │ │ ├── location-bar-intent-chip.patch │ │ ├── selected-keyword-view.patch │ │ ├── tab-strip-controls.patch │ │ ├── always-use-better-ntp.patch │ │ ├── bookmarks-bar-padding.patch │ │ ├── improve-flags-webui.patch │ │ ├── top-container.patch │ │ ├── profile-picker-cleanup.patch │ │ ├── fix-customize-side-panel.patch │ │ └── pwa-toolbar.patch │ ├── settings │ │ ├── remove-results-help-link.patch │ │ ├── enable-quad9-doh-option.patch │ │ ├── disable-safety-hub-page.patch │ │ ├── reenable-update-status.patch │ │ ├── remove-translate-section.patch │ │ ├── fix-page-names.patch │ │ ├── fix-section-separators.patch │ │ ├── reorder-settings-menu.patch │ │ ├── remove-autofill.patch │ │ ├── about-page-tweaks.patch │ │ └── fix-appearance-page.patch │ └── hop │ │ └── disable-password-manager.patch ├── inox-patchset │ ├── disable-update-pings.patch │ ├── disable-missing-key-warning.patch │ └── disable-rlz.patch ├── ungoogled-chromium │ ├── fix-distilled-icons.patch │ ├── enable-menu-on-reload-button.patch │ ├── disable-downloads-page-referrer-url.patch │ ├── remove-f1-shortcut.patch │ ├── remove-pac-size-limit.patch │ ├── remove-disable-setuid-sandbox-as-bad-flag.patch │ ├── prepopulated-search-engines.patch │ ├── disable-network-time-tracker.patch │ ├── disable-intranet-redirect-detector.patch │ ├── disable-profile-avatar-downloading.patch │ ├── fix-learn-doubleclick-hsts.patch │ ├── disable-dial-repeating-discovery.patch │ ├── add-flag-for-grab-handle.patch │ ├── disable-untraceable-urls.patch │ ├── enable-certificate-transparency-and-add-flag.patch │ ├── add-flag-to-disable-sharing-hub.patch │ ├── add-flag-to-hide-crashed-bubble.patch │ ├── disable-chromelabs.patch │ ├── add-flag-to-disable-tls-grease.patch │ ├── disable-mei-preload.patch │ ├── add-flag-to-hide-tab-close-buttons.patch │ ├── add-flag-to-disable-beforeunload.patch │ ├── fix-building-without-mdns-and-service-discovery.patch │ ├── add-flag-to-disable-local-history-expiration.patch │ ├── add-flag-to-force-punycode-hostnames.patch │ ├── add-flag-for-bookmark-bar-ntp.patch │ ├── disable-crash-reporter.patch │ ├── add-flag-to-hide-fullscreen-exit-ui.patch │ ├── enable-paste-and-go-new-tab-button.patch │ ├── add-flag-for-qr-generator.patch │ ├── add-flag-for-incognito-themes.patch │ ├── add-flag-to-show-avatar-button.patch │ ├── add-components-ungoogled.patch │ └── move-js-optimizer-unfamiliar-sites.patch ├── debian │ └── disable-google-api-warning.patch ├── iridium-browser │ ├── updater-disable-auto-update.patch │ └── browser-disable-profile-auto-import-on-first-run.patch └── upstream-fixes │ ├── fix-python-codecs-deprecation.patch │ └── fix-macos-widget-rect.patch ├── downloads.ini ├── flags.gn ├── domain_regex.list ├── extras.ini └── LICENSE.ungoogled_chromium /revision.txt: -------------------------------------------------------------------------------- 1 | 6 2 | -------------------------------------------------------------------------------- /utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /version.txt: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /devutils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /utils/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /devutils/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /devutils/third_party/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /utils/third_party/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /chromium_version.txt: -------------------------------------------------------------------------------- 1 | 143.0.7499.169 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.patch linguist-language=C++ 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | -------------------------------------------------------------------------------- /.github/.well-known/funding-manifest-urls: -------------------------------------------------------------------------------- 1 | https://helium.computer/funding.json -------------------------------------------------------------------------------- /resources/branding/app_icon/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/branding/app_icon/file.png -------------------------------------------------------------------------------- /resources/branding/app_icon/raw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/branding/app_icon/raw.png -------------------------------------------------------------------------------- /resources/branding/product_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/branding/product_logo.png -------------------------------------------------------------------------------- /resources/branding/app_icon/shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/branding/app_icon/shadow.png -------------------------------------------------------------------------------- /resources/favicons/favicon_ntp_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/favicons/favicon_ntp_16.png -------------------------------------------------------------------------------- /resources/favicons/favicon_ntp_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/favicons/favicon_ntp_32.png -------------------------------------------------------------------------------- /resources/branding/product_logo_200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/branding/product_logo_200.png -------------------------------------------------------------------------------- /resources/branding/product_logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/branding/product_logo_white.png -------------------------------------------------------------------------------- /resources/favicons/favicon_flags_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/favicons/favicon_flags_16.png -------------------------------------------------------------------------------- /resources/favicons/favicon_flags_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/favicons/favicon_flags_32.png -------------------------------------------------------------------------------- /resources/favicons/favicon_flags_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/favicons/favicon_flags_48.png -------------------------------------------------------------------------------- /resources/favicons/favicon_history_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/favicons/favicon_history_16.png -------------------------------------------------------------------------------- /resources/favicons/favicon_history_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/favicons/favicon_history_32.png -------------------------------------------------------------------------------- /resources/favicons/favicon_history_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/favicons/favicon_history_48.png -------------------------------------------------------------------------------- /resources/favicons/favicon_plugins_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/favicons/favicon_plugins_16.png -------------------------------------------------------------------------------- /resources/favicons/favicon_plugins_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/favicons/favicon_plugins_32.png -------------------------------------------------------------------------------- /resources/branding/product_logo_22_mono.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/branding/product_logo_22_mono.png -------------------------------------------------------------------------------- /resources/favicons/favicon_bookmarks_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/favicons/favicon_bookmarks_16.png -------------------------------------------------------------------------------- /resources/favicons/favicon_bookmarks_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/favicons/favicon_bookmarks_32.png -------------------------------------------------------------------------------- /resources/favicons/favicon_conflicts_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/favicons/favicon_conflicts_16.png -------------------------------------------------------------------------------- /resources/favicons/favicon_conflicts_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/favicons/favicon_conflicts_32.png -------------------------------------------------------------------------------- /resources/favicons/favicon_downloads_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/favicons/favicon_downloads_16.png -------------------------------------------------------------------------------- /resources/favicons/favicon_downloads_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/favicons/favicon_downloads_32.png -------------------------------------------------------------------------------- /resources/favicons/favicon_settings_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/favicons/favicon_settings_16.png -------------------------------------------------------------------------------- /resources/favicons/favicon_settings_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/favicons/favicon_settings_32.png -------------------------------------------------------------------------------- /devutils/run_other_yapf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | 5 | python3 -m yapf --style "$(dirname $(readlink -f $0))/.style.yapf" -rpi $@ 6 | -------------------------------------------------------------------------------- /resources/branding/app_icon/shadow_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/branding/app_icon/shadow_cropped.png -------------------------------------------------------------------------------- /resources/branding/product_logo_white_200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/branding/product_logo_white_200.png -------------------------------------------------------------------------------- /resources/favicons/favicon_management_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/favicons/favicon_management_16.png -------------------------------------------------------------------------------- /resources/favicons/favicon_management_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imputnet/helium/HEAD/resources/favicons/favicon_management_32.png -------------------------------------------------------------------------------- /devutils/print_tag_version.sh: -------------------------------------------------------------------------------- 1 | _root_dir=$(dirname $(dirname $(readlink -f $0))) 2 | printf '%s-%s' $(cat $_root_dir/chromium_version.txt) $(cat $_root_dir/revision.txt) 3 | -------------------------------------------------------------------------------- /.cirrus_Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile for Python 3 with xz-utils (for tar.xz unpacking) 2 | 3 | FROM python:3.10-slim-bookworm 4 | 5 | RUN apt update && apt install -y xz-utils patch axel curl git 6 | -------------------------------------------------------------------------------- /devutils/run_utils_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | 5 | _root_dir=$(dirname $(dirname $(readlink -f $0))) 6 | cd ${_root_dir}/utils 7 | python3 -m pytest -c ${_root_dir}/utils/pytest.ini 8 | -------------------------------------------------------------------------------- /devutils/run_devutils_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | 5 | _root_dir=$(dirname $(dirname $(readlink -f $0))) 6 | cd ${_root_dir}/devutils 7 | python3 -m pytest -c ${_root_dir}/devutils/pytest.ini 8 | -------------------------------------------------------------------------------- /devutils/run_utils_yapf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | 5 | _root_dir=$(dirname $(dirname $(readlink -f $0))) 6 | python3 -m yapf --style "$_root_dir/.style.yapf" -e '*/third_party/*' -rpi "$_root_dir/utils" 7 | -------------------------------------------------------------------------------- /devutils/README.md: -------------------------------------------------------------------------------- 1 | # Developer utilities for ungoogled-chromium 2 | 3 | This is a collection of scripts written for developing on ungoogled-chromium. See the descriptions at the top of each script for more information. 4 | -------------------------------------------------------------------------------- /.style.yapf: -------------------------------------------------------------------------------- 1 | [style] 2 | based_on_style = pep8 3 | allow_split_before_dict_value = false 4 | coalesce_brackets = true 5 | column_limit = 100 6 | indent_width = 4 7 | join_multiple_lines = true 8 | spaces_before_comment = 1 9 | -------------------------------------------------------------------------------- /shell.nix: -------------------------------------------------------------------------------- 1 | { pkgs ? import {} }: pkgs.mkShell { 2 | nativeBuildInputs = with pkgs; [ 3 | quilt 4 | 5 | (python3.withPackages (ps: with ps; [ 6 | httplib2 7 | six 8 | ])) 9 | ]; 10 | } 11 | -------------------------------------------------------------------------------- /devutils/third_party/README.md: -------------------------------------------------------------------------------- 1 | This directory contains third-party libraries used by devutils. 2 | 3 | Contents: 4 | 5 | * [python-unidiff](https://github.com/matiasb/python-unidiff) 6 | * For parsing and modifying unified diffs. 7 | -------------------------------------------------------------------------------- /utils/third_party/README.md: -------------------------------------------------------------------------------- 1 | This directory contains third-party libraries used by build utilities. 2 | 3 | Contents: 4 | 5 | * [schema](https://github.com/keleshev/schema) 6 | * For validating more sophisticated files such as INIs 7 | -------------------------------------------------------------------------------- /devutils/run_devutils_yapf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | 5 | _current_dir=$(dirname $(readlink -f $0)) 6 | _root_dir=$(dirname $_current_dir) 7 | python3 -m yapf --style "$_root_dir/.style.yapf" -e '*/third_party/*' -rpi "$_current_dir" 8 | -------------------------------------------------------------------------------- /utils/pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | testpaths = tests 3 | #filterwarnings = 4 | # error 5 | # ignore::DeprecationWarning 6 | #addopts = --cov-report term-missing --hypothesis-show-statistics -p no:warnings 7 | addopts = --cov=. --cov-config=.coveragerc --cov-report term-missing -p no:warnings 8 | -------------------------------------------------------------------------------- /.cirrus_requirements.txt: -------------------------------------------------------------------------------- 1 | # Based on Python package versions in Debian bookworm 2 | # https://packages.debian.org/bookworm/python/ 3 | astroid==2.14.2 # via pylint 4 | pylint==2.16.2 5 | pytest-cov==4.0.0 6 | pytest==7.2.1 7 | httplib2==0.20.4 8 | requests==2.28.1 9 | pillow==11.3.0 10 | yapf==0.32.0 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Python files 2 | __pycache__/ 3 | *.py[cod] 4 | 5 | # Python testing files 6 | .coverage 7 | 8 | # Ignore macOS Finder meta 9 | .DS_Store 10 | .tm_properties 11 | 12 | # Ignore optional build / cache directory 13 | /build 14 | 15 | # Ignore generated resources 16 | /resources/generated 17 | -------------------------------------------------------------------------------- /.github/workflows/cirrus.yml: -------------------------------------------------------------------------------- 1 | name: cirrus 2 | 3 | on: [push, pull_request] 4 | 5 | permissions: 6 | contents: read 7 | 8 | jobs: 9 | cirrus: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v4 13 | - uses: cirruslabs/cirrus-action@ac5191d18a9bff05ff1a38f280f2b6d768e32153 14 | -------------------------------------------------------------------------------- /devutils/pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | testpaths = tests 3 | #filterwarnings = 4 | # error 5 | # ignore::DeprecationWarning 6 | #addopts = --cov-report term-missing --hypothesis-show-statistics -p no:warnings 7 | # Live logging 8 | #log_cli=true 9 | #log_level=DEBUG 10 | addopts = -capture=all --cov=. --cov-config=.coveragerc --cov-report term-missing -p no:warnings 11 | -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | name: Check patch series correctness 2 | 3 | on: [push, pull_request] 4 | 5 | permissions: 6 | contents: read 7 | 8 | jobs: 9 | lint: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v4 13 | - uses: actions/setup-python@v5 14 | with: 15 | python-version: '3.13' 16 | - run: python3 ./devutils/lint.py 17 | -------------------------------------------------------------------------------- /patches/helium/core/search/fix-search-engine-icons.patch: -------------------------------------------------------------------------------- 1 | --- a/build/config/chrome_build.gni 2 | +++ b/build/config/chrome_build.gni 3 | @@ -92,4 +92,4 @@ declare_args() { 4 | 5 | # Whether to enable built-in branding assets (logos & marketing snippets) for 6 | # search providers in choice UIs. 7 | -enable_builtin_search_provider_assets = is_chrome_branded 8 | +enable_builtin_search_provider_assets = true 9 | -------------------------------------------------------------------------------- /patches/helium/core/disable-live-caption-completely.patch: -------------------------------------------------------------------------------- 1 | --- a/components/live_caption/caption_util.cc 2 | +++ b/components/live_caption/caption_util.cc 3 | @@ -125,6 +125,7 @@ std::optional GetCapti 4 | } 5 | 6 | bool IsLiveCaptionFeatureSupported() { 7 | + return false; 8 | #if !BUILDFLAG(IS_FUCHSIA) && !BUILDFLAG(IS_ANDROID) 9 | return speech::IsOnDeviceSpeechRecognitionSupported(); 10 | #else 11 | -------------------------------------------------------------------------------- /patches/helium/ui/square-ntp-monograms.patch: -------------------------------------------------------------------------------- 1 | --- a/ui/gfx/monogram_utils.cc 2 | +++ b/ui/gfx/monogram_utils.cc 3 | @@ -25,7 +25,7 @@ void DrawCircleInCanvas(Canvas* canvas, 4 | flags.setStyle(cc::PaintFlags::kFill_Style); 5 | flags.setAntiAlias(true); 6 | flags.setColor(background_color); 7 | - int corner_radius = size / 2; 8 | + int corner_radius = 14; 9 | canvas->DrawRoundRect(Rect(offset, offset, size, size), corner_radius, flags); 10 | } 11 | 12 | -------------------------------------------------------------------------------- /patches/inox-patchset/disable-update-pings.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/updater/configurator.cc 2 | +++ b/chrome/updater/configurator.cc 3 | @@ -132,7 +132,7 @@ base::TimeDelta Configurator::UpdateDela 4 | 5 | std::vector Configurator::UpdateUrl() const { 6 | DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); 7 | - return external_constants_->UpdateURL(); 8 | + return std::vector(); 9 | } 10 | 11 | std::vector Configurator::PingUrl() const { 12 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/fix-distilled-icons.patch: -------------------------------------------------------------------------------- 1 | --- a/components/dom_distiller/core/css/distilledpage_common.css 2 | +++ b/components/dom_distiller/core/css/distilledpage_common.css 3 | @@ -26,6 +26,11 @@ 4 | box-sizing: border-box; 5 | } 6 | 7 | +.material-icons { 8 | + font-family: Material Icons; 9 | + font-style: normal !important; 10 | +} 11 | + 12 | /* Remove all margins and padding from certain element and add word wrap. */ 13 | 14 | blockquote, 15 | -------------------------------------------------------------------------------- /patches/helium/core/fix-building-without-safebrowsing.patch: -------------------------------------------------------------------------------- 1 | --- a/components/resources/BUILD.gn 2 | +++ b/components/resources/BUILD.gn 3 | @@ -93,7 +93,7 @@ grit("components_resources") { 4 | deps += [ "//components/resources/ssl/ssl_error_assistant:make_ssl_error_assistant_protobuf" ] 5 | } 6 | 7 | - if (safe_browsing_mode > 0) { 8 | + if (true) { 9 | deps += [ 10 | "//components/safe_browsing/content/resources:make_file_types_protobuf", 11 | ] 12 | -------------------------------------------------------------------------------- /patches/helium/core/disable-history-clusters.patch: -------------------------------------------------------------------------------- 1 | --- a/components/history_clusters/core/features.cc 2 | +++ b/components/history_clusters/core/features.cc 3 | @@ -16,11 +16,7 @@ namespace history_clusters { 4 | namespace { 5 | 6 | constexpr auto enabled_by_default_desktop_only = 7 | -#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS) 8 | base::FEATURE_DISABLED_BY_DEFAULT; 9 | -#else 10 | - base::FEATURE_ENABLED_BY_DEFAULT; 11 | -#endif 12 | 13 | } // namespace 14 | 15 | -------------------------------------------------------------------------------- /patches/helium/core/disable-update-toast.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/ui_features.cc 2 | +++ b/chrome/browser/ui/ui_features.cc 3 | @@ -670,7 +670,7 @@ bool HasTabSearchToolbarButton() { 4 | return is_tab_search_moving; 5 | } 6 | 7 | -BASE_FEATURE(kNonMilestoneUpdateToast, base::FEATURE_ENABLED_BY_DEFAULT); 8 | +BASE_FEATURE(kNonMilestoneUpdateToast, base::FEATURE_DISABLED_BY_DEFAULT); 9 | 10 | BASE_FEATURE(kBookmarkTabGroupConversion, base::FEATURE_DISABLED_BY_DEFAULT); 11 | 12 | -------------------------------------------------------------------------------- /patches/helium/core/replace-default-profile-name.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/profiles/profiles_state.cc 2 | +++ b/chrome/browser/profiles/profiles_state.cc 3 | @@ -326,7 +326,7 @@ std::u16string GetDefaultNameForNewEnter 4 | name = base::UTF8ToUTF16(hosted_domain); 5 | } else { 6 | name = l10n_util::GetStringUTF16( 7 | - IDS_SIGNIN_DICE_WEB_INTERCEPT_ENTERPRISE_PROFILE_NAME); 8 | + IDS_SINGLE_PROFILE_DISPLAY_NAME); 9 | } 10 | CHECK(!name.empty()); 11 | return name; 12 | -------------------------------------------------------------------------------- /patches/helium/settings/remove-results-help-link.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/resources/settings/settings_main/settings_main.html 2 | +++ b/chrome/browser/resources/settings/settings_main/settings_main.html 3 | @@ -35,7 +35,6 @@ 4 | 5 |
6 |
$i18n{searchNoResults}
7 | -
$i18nRaw{searchNoResultsHelp}
8 |
9 | 24 | 25 | + 26 | \ No newline at end of file 27 | -------------------------------------------------------------------------------- /patches/helium/ui/bookmark-button-bg-fix.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/views/bookmarks/bookmark_button.cc 2 | +++ b/chrome/browser/ui/views/bookmarks/bookmark_button.cc 3 | @@ -60,7 +60,8 @@ BookmarkButtonBase::BookmarkButtonBase(P 4 | SetImageLabelSpacing( 5 | GetLayoutConstant(BOOKMARK_BAR_BUTTON_IMAGE_LABEL_PADDING)); 6 | 7 | - views::InstallPillHighlightPathGenerator(this); 8 | + views::InstallRoundRectHighlightPathGenerator(this, gfx::Insets(), 9 | + 6.0f); 10 | 11 | SetFocusBehavior(FocusBehavior::ACCESSIBLE_ONLY); 12 | views::FocusRing::Get(this)->SetOutsetFocusRingDisabled(true); 13 | --- a/chrome/browser/ui/views/bookmarks/bookmark_menu_button_base.cc 14 | +++ b/chrome/browser/ui/views/bookmarks/bookmark_menu_button_base.cc 15 | @@ -20,7 +20,8 @@ BookmarkMenuButtonBase::BookmarkMenuButt 16 | ConfigureInkDropForToolbar(this); 17 | SetImageLabelSpacing(ChromeLayoutProvider::Get()->GetDistanceMetric( 18 | DISTANCE_RELATED_LABEL_HORIZONTAL_LIST)); 19 | - views::InstallPillHighlightPathGenerator(this); 20 | + views::InstallRoundRectHighlightPathGenerator(this, gfx::Insets(), 21 | + 6.0f); 22 | } 23 | 24 | // MenuButton: 25 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/disable-untraceable-urls.patch: -------------------------------------------------------------------------------- 1 | # Disable additional URLs that are not caught by the "trk" scheme 2 | 3 | --- a/rlz/lib/financial_ping.cc 4 | +++ b/rlz/lib/financial_ping.cc 5 | @@ -308,7 +308,7 @@ FinancialPing::PingResponse FinancialPin 6 | response->clear(); 7 | 8 | std::string url = 9 | - base::StringPrintf("https://%s%s", kFinancialServer, request); 10 | + base::StringPrintf("https://%s%s", "about:blank", request); 11 | 12 | // Use a waitable event to cause this function to block, to match the 13 | // wininet implementation. 14 | --- a/rlz/lib/lib_values.cc 15 | +++ b/rlz/lib/lib_values.cc 16 | @@ -45,7 +45,6 @@ const char kSetDccResponseVariable[] = " 17 | // 18 | 19 | const char kFinancialPingPath[] = "/tools/pso/ping"; 20 | -const char kFinancialServer[] = "trk:443:clients1.google.com"; /* not using URLRequest! catch with cache.ir */ 21 | const int kFinancialPort = 443; 22 | 23 | // Ping times in 100-nanosecond intervals. 24 | --- a/rlz/lib/lib_values.h 25 | +++ b/rlz/lib/lib_values.h 26 | @@ -72,7 +72,6 @@ extern const char kSetDccResponseVariabl 27 | // 28 | 29 | extern const char kFinancialPingPath[]; 30 | -extern const char kFinancialServer[]; 31 | 32 | extern const int kFinancialPort; 33 | 34 | -------------------------------------------------------------------------------- /patches/helium/ui/thinner-infobar.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/views/chrome_layout_provider.cc 2 | +++ b/chrome/browser/ui/views/chrome_layout_provider.cc 3 | @@ -160,7 +160,7 @@ int ChromeLayoutProvider::GetDistanceMet 4 | case DISTANCE_INFOBAR_HEIGHT: 5 | // Spec says height of button should be 36dp, vertical padding on both 6 | // top and bottom should be 8dp. 7 | - return 36 + 2 * 8; 8 | + return 36 + 2 * 3; 9 | case DISTANCE_PERMISSION_PROMPT_HORIZONTAL_ICON_LABEL_PADDING: 10 | return 8; 11 | case DISTANCE_RICH_HOVER_BUTTON_ICON_HORIZONTAL: 12 | --- a/chrome/browser/ui/views/infobars/infobar_container_view.cc 13 | +++ b/chrome/browser/ui/views/infobars/infobar_container_view.cc 14 | @@ -120,8 +120,7 @@ void InfoBarContainerView::Layout(PassKe 15 | // there drawn by the shadow code (so we don't have to extend our bounds out 16 | // to be able to draw it; see comments in CalculatePreferredSize() on why the 17 | // shadow is drawn outside the container bounds). 18 | - content_shadow_->SetBounds(0, top, width(), 19 | - content_shadow_->GetPreferredSize().height()); 20 | + content_shadow_->SetBounds(0, top, width(), 1); 21 | } 22 | 23 | gfx::Size InfoBarContainerView::CalculatePreferredSize( 24 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/enable-certificate-transparency-and-add-flag.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/browser_features.cc 2 | +++ b/chrome/browser/browser_features.cc 3 | @@ -49,7 +49,7 @@ BASE_FEATURE(kBookmarkTriggerForPrefetch 4 | // On builds where CT is enabled, this flag is also used as an emergency kill 5 | // switch. 6 | BASE_FEATURE(kCertificateTransparencyAskBeforeEnabling, 7 | -#if BUILDFLAG(GOOGLE_CHROME_BRANDING) 8 | +#if true 9 | base::FEATURE_ENABLED_BY_DEFAULT); 10 | #else 11 | base::FEATURE_DISABLED_BY_DEFAULT); 12 | --- a/chrome/browser/ungoogled_flag_entries.h 13 | +++ b/chrome/browser/ungoogled_flag_entries.h 14 | @@ -136,4 +136,8 @@ 15 | "Remove Client Hints", 16 | "Removes client hints (information sent to servers about your system, similar to a user agent). ungoogled-chromium flag.", 17 | kOsAll, FEATURE_VALUE_TYPE(blink::features::kRemoveClientHints)}, 18 | + {"enforce-certificate-transparency", 19 | + "Enforce Certificate Transparency", 20 | + "Enforce Certificate Transparency for certificates that sites present. This is enabled by default. ungoogled-chromium flag.", 21 | + kOsAll, FEATURE_VALUE_TYPE(features::kCertificateTransparencyAskBeforeEnabling)}, 22 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 23 | -------------------------------------------------------------------------------- /resources/branding/product_logo.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /devutils/third_party/unidiff/__version__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # The MIT License (MIT) 4 | # Copyright (c) 2014-2017 Matias Bordese 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to deal 8 | # in the Software without restriction, including without limitation the rights 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in 14 | # all copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 20 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 21 | # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 22 | # OR OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | __version__ = '0.5.5' 25 | -------------------------------------------------------------------------------- /devutils/check_files_exist.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE.ungoogled_chromium file. 6 | """ 7 | Checks if files in a list exist. 8 | 9 | Used for quick validation of lists in CI checks. 10 | """ 11 | 12 | import argparse 13 | import sys 14 | from pathlib import Path 15 | 16 | 17 | def main(): 18 | """CLI entrypoint""" 19 | parser = argparse.ArgumentParser(description=__doc__) 20 | parser.add_argument('root_dir', type=Path, help='The directory to check from') 21 | parser.add_argument('input_files', type=Path, nargs='+', help='The files lists to check') 22 | args = parser.parse_args() 23 | 24 | for input_name in args.input_files: 25 | file_iter = filter( 26 | len, map(str.strip, 27 | Path(input_name).read_text(encoding='UTF-8').splitlines())) 28 | for file_name in file_iter: 29 | if not Path(args.root_dir, file_name).exists(): 30 | print(f'ERROR: Path "{file_name}" from file "{input_name}" does not exist.', 31 | file=sys.stderr) 32 | sys.exit(1) 33 | 34 | 35 | if __name__ == "__main__": 36 | main() 37 | -------------------------------------------------------------------------------- /extras.ini: -------------------------------------------------------------------------------- 1 | # Everything that's downloaded after cloning Chromium goes here. 2 | # It will not work from main downloads.ini 3 | [search_engines_data] 4 | url = https://gist.githubusercontent.com/wukko/2a591364dda346e10219e4adabd568b1/raw/e75ae3c4a1ce940ef7627916a48bc40882d24d40/nonfree-search-engines-data.tar.gz 5 | download_filename = nonfree-search-engines-data.tar.gz 6 | sha256 = 00a87050fa3f941d04d67fb5763991e0b8ea399a88b505ab0e56dd263f06864c 7 | output_path = ./third_party/search_engines_data/resources_internal 8 | 9 | [onboarding] 10 | version = 202512121537 11 | url = https://github.com/imputnet/helium-onboarding/releases/download/%(version)s/helium-onboarding-%(version)s.tar.gz 12 | download_filename = onboarding-page-%(version)s.tar.gz 13 | sha256 = d9729e4d160a2425d8bce36ab2e77588ec85e0f7ce6f5bdb8325997f1b5315fa 14 | output_path = ./components/helium_onboarding 15 | 16 | # If you are bumping this, you *NEED* to re-strip the assets.json 17 | # file *every time* by using `devutils/clear-ublock-assets.js`. 18 | [ublock_origin] 19 | version = 1.67.0 20 | url = https://github.com/imputnet/ublock-origin-crx/releases/download/%(version)s/uBlock0_%(version)s.crx 21 | sha256 = 969eaaa4e0b1893a35e1c5767c33bcfcc62737667644c97f644ff3c84677aff7 22 | download_filename = ublock-origin-%(version)s.zip 23 | output_path = third_party/ublock 24 | -------------------------------------------------------------------------------- /utils/tests/test_patches.py: -------------------------------------------------------------------------------- 1 | # -*- coding: UTF-8 -*- 2 | 3 | # Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE.ungoogled_chromium file. 6 | 7 | from pathlib import Path 8 | import os 9 | import shutil 10 | 11 | import pytest 12 | 13 | from .. import patches 14 | 15 | 16 | def test_find_and_check_patch(): 17 | assert isinstance(patches.find_and_check_patch(), Path) 18 | 19 | with pytest.raises(ValueError): 20 | patches.find_and_check_patch(patch_bin_path=Path('/this/should/not/exist')) 21 | 22 | with pytest.raises(RuntimeError): 23 | # Use comamnd "false" to return non-zero exit code 24 | patches.find_and_check_patch(patch_bin_path=Path('/bin/false')) 25 | 26 | 27 | def test_patch_from_which(): 28 | # We assume GNU patch is already installed to PATH 29 | assert patches._find_patch_from_which() 30 | 31 | 32 | def test_patch_from_env(): 33 | os.environ['PATCH_BIN'] = 'patch' 34 | assert patches._find_patch_from_env() == Path(shutil.which('patch')) 35 | 36 | os.environ['PATCH_BIN'] = shutil.which('patch') 37 | assert patches._find_patch_from_env() == Path(shutil.which('patch')) 38 | 39 | del os.environ['PATCH_BIN'] 40 | assert patches._find_patch_from_env() is None 41 | -------------------------------------------------------------------------------- /devutils/lint.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright 2025 The Helium Authors 4 | # You can use, redistribute, and/or modify this source code under 5 | # the terms of the GPL-3.0 license that can be found in the LICENSE file. 6 | """Script to run sanity checks against the Helium patchset.""" 7 | 8 | import sys 9 | import inspect 10 | import argparse 11 | from pathlib import Path 12 | 13 | import _lint_tests 14 | 15 | 16 | def parse_args(): 17 | """Parses the CLI arguments.""" 18 | parser = argparse.ArgumentParser() 19 | parser.add_argument('-t', '--tree', help='root of the source tree to check') 20 | return parser.parse_args() 21 | 22 | 23 | def main(): 24 | """CLI entrypoint for executing tests""" 25 | args = parse_args() 26 | root_dir = (Path(__file__).parent / "..").resolve() 27 | 28 | if args.tree: 29 | root_dir = Path(args.tree).resolve() 30 | 31 | _lint_tests._init(root_dir) # pylint: disable=protected-access 32 | 33 | for name, func in inspect.getmembers(_lint_tests, inspect.isfunction): 34 | if name.startswith("_"): 35 | continue 36 | 37 | try: 38 | func() 39 | print(f"[OK] {name}") 40 | except Exception: 41 | print(f"[ERR] {name}:", file=sys.stderr) 42 | raise 43 | 44 | 45 | if __name__ == '__main__': 46 | main() 47 | -------------------------------------------------------------------------------- /patches/iridium-browser/updater-disable-auto-update.patch: -------------------------------------------------------------------------------- 1 | From f97af1715c10c5926169ff317ca7c91f1d073af9 Mon Sep 17 00:00:00 2001 2 | From: Jan Engelhardt 3 | Date: Fri, 13 Feb 2015 00:59:04 +0100 4 | Subject: [PATCH 39/66] updater: disable auto-update 5 | 6 | As per http://www.chromium.org/administrators/turning-off-auto-updates , 7 | the auto update function is decidedly disabled on Linux, i.e. 8 | the following patch is for Windows and MacOS. 9 | 10 | For Windows, all we need is to build without -DGOOGLE_CHROME_BUILD (cf. 11 | chrome/installer/util/google_update_settings.cc), which may already be 12 | the case anyway, since we are based off Chromium, not Chrome. 13 | --- 14 | chrome/browser/app_controller_mac.mm | 2 +- 15 | 1 file changed, 1 insertion(+), 1 deletion(-) 16 | 17 | --- a/chrome/browser/app_controller_mac.mm 18 | +++ b/chrome/browser/app_controller_mac.mm 19 | @@ -1098,7 +1098,7 @@ class AppControllerNativeThemeObserver : 20 | CFStringRef checkInterval = CFSTR("checkInterval"); 21 | CFPropertyListRef plist = CFPreferencesCopyAppValue(checkInterval, app); 22 | if (!plist) { 23 | - const float fiveHoursInSeconds = 5.0 * 60.0 * 60.0; 24 | + const float fiveHoursInSeconds = 0.0; 25 | CFPreferencesSetAppValue( 26 | checkInterval, base::apple::NSToCFPtrCast(@(fiveHoursInSeconds)), app); 27 | CFPreferencesAppSynchronize(app); 28 | -------------------------------------------------------------------------------- /patches/helium/core/disable-user-education-nags.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/user_education/user_education_service_factory.cc 2 | +++ b/chrome/browser/user_education/user_education_service_factory.cc 3 | @@ -112,6 +112,7 @@ UserEducationServiceFactory::BuildServic 4 | 5 | // static 6 | bool UserEducationServiceFactory::ProfileAllowsUserEducation(Profile* profile) { 7 | + return false; 8 | #if BUILDFLAG(CHROME_FOR_TESTING) 9 | // IPH is always disabled in Chrome for Testing. 10 | return false; 11 | --- a/components/user_education/common/tutorial/tutorial_registry.cc 12 | +++ b/components/user_education/common/tutorial/tutorial_registry.cc 13 | @@ -26,7 +26,6 @@ bool TutorialRegistry::IsTutorialRegiste 14 | 15 | const TutorialDescription* TutorialRegistry::GetTutorialDescription( 16 | TutorialIdentifier id) const { 17 | - DCHECK(tutorial_registry_.size() > 0); 18 | auto pair = tutorial_registry_.find(id); 19 | if (pair == tutorial_registry_.end()) { 20 | return nullptr; 21 | @@ -36,7 +35,6 @@ const TutorialDescription* TutorialRegis 22 | 23 | const std::vector TutorialRegistry::GetTutorialIdentifiers() 24 | const { 25 | - DCHECK(tutorial_registry_.size() > 0); 26 | std::vector id_strings; 27 | std::ranges::transform(tutorial_registry_, std::back_inserter(id_strings), 28 | &Registry::value_type::first); 29 | -------------------------------------------------------------------------------- /patches/helium/ui/location-bar-intent-chip.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/views/location_bar/intent_chip_button.cc 2 | +++ b/chrome/browser/ui/views/location_bar/intent_chip_button.cc 3 | @@ -87,14 +87,10 @@ bool IntentChipButton::GetShowChip() con 4 | } 5 | 6 | bool IntentChipButton::GetChipExpanded() const { 7 | - auto* tab_helper = GetTabHelper(); 8 | - return tab_helper && tab_helper->ShouldShowExpandedChip(); 9 | + return false; 10 | } 11 | 12 | ui::ImageModel IntentChipButton::GetAppIcon() const { 13 | - if (auto* tab_helper = GetTabHelper()) { 14 | - return tab_helper->app_icon(); 15 | - } 16 | return ui::ImageModel(); 17 | } 18 | 19 | --- a/chrome/browser/ui/views/location_bar/omnibox_chip_button.cc 20 | +++ b/chrome/browser/ui/views/location_bar/omnibox_chip_button.cc 21 | @@ -56,8 +56,7 @@ OmniboxChipButton::OmniboxChipButton(Pre 22 | SetFocusBehavior(views::View::FocusBehavior::ALWAYS); 23 | // Equalizing padding on the left, right and between icon and label. 24 | SetImageLabelSpacing(kChipImagePadding); 25 | - SetCustomPadding( 26 | - gfx::Insets::VH(kChipVerticalPadding, kChipHorizontalPadding)); 27 | + SetCustomPadding(GetLayoutInsets(LOCATION_BAR_PAGE_ACTION_ICON_PADDING)); 28 | label()->SetTextStyle(views::style::STYLE_BODY_4_EMPHASIS); 29 | SetCornerRadius(GetLayoutConstant(LOCATION_BAR_CHILD_CORNER_RADIUS)); 30 | animation_ = std::make_unique(this); 31 | -------------------------------------------------------------------------------- /utils/tests/test_domain_substitution.py: -------------------------------------------------------------------------------- 1 | # -*- coding: UTF-8 -*- 2 | 3 | # Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE.ungoogled_chromium file. 6 | 7 | import os 8 | import tempfile 9 | from pathlib import Path 10 | 11 | from .. import domain_substitution 12 | 13 | 14 | def test_update_timestamp(): 15 | with tempfile.TemporaryDirectory() as tmpdirname: 16 | path = Path(tmpdirname, 'tmp_update_timestamp') 17 | path.touch() 18 | orig_stats: os.stat_result = path.stat() 19 | 20 | # Add delta to timestamp 21 | with domain_substitution._update_timestamp(path, set_new=True): 22 | with path.open('w') as fileobj: 23 | fileobj.write('foo') 24 | 25 | new_stats: os.stat_result = path.stat() 26 | assert orig_stats.st_atime_ns != new_stats.st_atime_ns 27 | assert orig_stats.st_mtime_ns != new_stats.st_mtime_ns 28 | 29 | # Remove delta from timestamp 30 | with domain_substitution._update_timestamp(path, set_new=False): 31 | with path.open('w') as fileobj: 32 | fileobj.write('bar') 33 | 34 | new_stats: os.stat_result = path.stat() 35 | assert orig_stats.st_atime_ns == new_stats.st_atime_ns 36 | assert orig_stats.st_mtime_ns == new_stats.st_mtime_ns 37 | -------------------------------------------------------------------------------- /patches/helium/settings/fix-page-names.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/webui/cr_components/history/history_util.cc 2 | +++ b/chrome/browser/ui/webui/cr_components/history/history_util.cc 3 | @@ -51,7 +51,7 @@ content::WebUIDataSource* HistoryUtil::P 4 | {"foundSearchResults", IDS_HISTORY_FOUND_SEARCH_RESULTS}, 5 | {"actorTaskTooltip", IDS_ACTOR_TASK}, 6 | {"historyMenuButton", IDS_HISTORY_HISTORY_MENU_DESCRIPTION}, 7 | - {"historyMenuItem", IDS_HISTORY_HISTORY_MENU_ITEM}, 8 | + {"historyMenuItem", IDS_HISTORY_TITLE}, 9 | {"itemsSelected", IDS_HISTORY_ITEMS_SELECTED}, 10 | {"itemsUnselected", IDS_HISTORY_ITEMS_UNSELECTED}, 11 | {"loading", IDS_HISTORY_LOADING}, 12 | --- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc 13 | +++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc 14 | @@ -1965,7 +1965,7 @@ void AddSyncControlsStrings(content::Web 15 | void AddPeopleStrings(content::WebUIDataSource* html_source, Profile* profile) { 16 | static constexpr webui::LocalizedString kLocalizedStrings[] = { 17 | // Top level people strings: 18 | - {"peoplePageTitle", IDS_SETTINGS_PEOPLE}, 19 | + {"peoplePageTitle", IDS_PROFILES_MENU_NAME}, 20 | {"syncSettingsSavedToast", IDS_SETTINGS_SYNC_SETTINGS_SAVED_TOAST_LABEL}, 21 | {"manageGoogleAccount", IDS_SETTINGS_MANAGE_GOOGLE_ACCOUNT}, 22 | {"syncAndNonPersonalizedServices", 23 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/add-flag-to-disable-sharing-hub.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/sharing_hub/sharing_hub_features.cc 2 | +++ b/chrome/browser/sharing_hub/sharing_hub_features.cc 3 | @@ -4,6 +4,7 @@ 4 | 5 | #include "chrome/browser/sharing_hub/sharing_hub_features.h" 6 | 7 | +#include "base/command_line.h" 8 | #include "build/build_config.h" 9 | #include "chrome/browser/profiles/profile.h" 10 | #include "chrome/common/pref_names.h" 11 | @@ -36,6 +37,7 @@ bool ScreenshotsDisabledByPolicy(content 12 | } // namespace 13 | 14 | bool SharingHubOmniboxEnabled(content::BrowserContext* context) { 15 | + if (base::CommandLine::ForCurrentProcess()->HasSwitch("disable-sharing-hub")) return false; 16 | #if BUILDFLAG(IS_CHROMEOS) 17 | return false; 18 | #else 19 | --- a/chrome/browser/ungoogled_flag_entries.h 20 | +++ b/chrome/browser/ungoogled_flag_entries.h 21 | @@ -96,4 +96,8 @@ 22 | "Custom HTTP Accept Header", 23 | "Set a custom value for the Accept header which is sent by the browser with every HTTP request. (e.g. `text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8`). ungoogled-chromium flag.", 24 | kOsAll, ORIGIN_LIST_VALUE_TYPE("http-accept-header", "")}, 25 | + {"disable-sharing-hub", 26 | + "Disable Sharing Hub", 27 | + "Disables the sharing hub button. ungoogled-chromium flag.", 28 | + kOsDesktop, SINGLE_VALUE_TYPE("disable-sharing-hub")}, 29 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 30 | -------------------------------------------------------------------------------- /devutils/third_party/unidiff/errors.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # The MIT License (MIT) 4 | # Copyright (c) 2014-2017 Matias Bordese 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to deal 8 | # in the Software without restriction, including without limitation the rights 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in 14 | # all copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 20 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 21 | # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 22 | # OR OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | 25 | """Errors and exceptions raised by the package.""" 26 | 27 | from __future__ import unicode_literals 28 | 29 | 30 | class UnidiffParseError(Exception): 31 | """Exception when parsing the unified diff data.""" 32 | -------------------------------------------------------------------------------- /patches/helium/core/increase-incognito-storage-quota.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ungoogled_flag_entries.h 2 | +++ b/chrome/browser/ungoogled_flag_entries.h 3 | @@ -145,7 +145,7 @@ 4 | "Return generic values for WebGLDebugRendererInfo to remove a potential data leak while preventing potential website breakage. ungoogled-chromium flag.", 5 | kOsAll, FEATURE_WITH_PARAMS_VALUE_TYPE(blink::features::kSpoofWebGLInfo, kSpoofWebGLChoices, "SpoofWebGLInfo")}, 6 | {"increase-incognito-storage-quota", 7 | - "Increases the storage quota for Incognito and Guest profiles", 8 | + "Increase the storage quota for Incognito and Guest profiles", 9 | "Makes Incognito and Guest profiles compute the storage quota with the same algorithm that regular profiles use. This makes it harder for websites to detect Incognito mode, but may allow sites to induce heavy memory pressure. ungoogled-chromium flag.", 10 | kOsAll, FEATURE_VALUE_TYPE(storage::features::kIncreaseIncognitoStorageQuota)}, 11 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 12 | --- a/storage/browser/quota/quota_features.cc 13 | +++ b/storage/browser/quota/quota_features.cc 14 | @@ -39,7 +39,7 @@ BASE_FEATURE(kStaticStorageQuota, base:: 15 | 16 | BASE_FEATURE(kIncreaseIncognitoStorageQuota, 17 | "IncreaseIncognitoStorageQuota", 18 | - base::FEATURE_DISABLED_BY_DEFAULT); 19 | + base::FEATURE_ENABLED_BY_DEFAULT); 20 | 21 | } // namespace features 22 | } // namespace storage 23 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/add-flag-to-hide-crashed-bubble.patch: -------------------------------------------------------------------------------- 1 | # Add flag --hide-crashed-bubble to hide the bubble box: 2 | # "Restore Pages? Chromium didn't shut down correctly." 3 | 4 | --- a/chrome/browser/ui/startup/infobar_utils.cc 5 | +++ b/chrome/browser/ui/startup/infobar_utils.cc 6 | @@ -152,7 +152,8 @@ void AddInfoBarsIfNecessary(BrowserWindo 7 | } 8 | 9 | // Web apps should not display the session restore bubble (crbug.com/1264121) 10 | - if (!is_web_app && HasPendingUncleanExit(browser->GetProfile())) { 11 | + if (!is_web_app && HasPendingUncleanExit(browser->GetProfile()) && 12 | + !startup_command_line.HasSwitch("hide-crashed-bubble")) { 13 | SessionCrashedBubble::ShowIfNotOffTheRecordProfile( 14 | browser, 15 | /*skip_tab_checking=*/false); 16 | --- a/chrome/browser/ungoogled_flag_entries.h 17 | +++ b/chrome/browser/ungoogled_flag_entries.h 18 | @@ -28,4 +28,8 @@ 19 | "Show avatar/people/profile button", 20 | "Show avatar/people/profile button in the browser toolbar. ungoogled-chromium flag.", 21 | kOsDesktop, MULTI_VALUE_TYPE(kShowAvatarButtonChoices)}, 22 | + {"hide-crashed-bubble", 23 | + "Hide crashed bubble", 24 | + "Hides the bubble box with the message \"Restore Pages? Chromium didn't shut down correctly.\" that shows on startup after the browser did not exit cleanly. ungoogled-chromium flag.", 25 | + kOsAll, SINGLE_VALUE_TYPE("hide-crashed-bubble")}, 26 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 27 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/disable-chromelabs.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/toolbar/chrome_labs/chrome_labs_utils.cc 2 | +++ b/chrome/browser/ui/toolbar/chrome_labs/chrome_labs_utils.cc 3 | @@ -140,35 +140,6 @@ bool AreNewChromeLabsExperimentsAvailabl 4 | } 5 | 6 | bool IsChromeLabsEnabled() { 7 | - // Always early out on the stable channel regardless of other conditions. 8 | - if (chrome::GetChannel() == version_info::Channel::STABLE) { 9 | - return false; 10 | - } 11 | - if (base::CommandLine::ForCurrentProcess()->HasSwitch( 12 | - variations::switches::kEnableBenchmarking)) { 13 | - return true; 14 | - } 15 | - // Could be null in unit tests. 16 | - if (!g_browser_process->local_state()) { 17 | - return false; 18 | - } 19 | - if (g_browser_process->local_state()->GetInteger( 20 | - chrome_labs_prefs::kChromeLabsActivationThreshold) == 21 | - chrome_labs_prefs::kChromeLabsActivationThresholdDefaultValue) { 22 | - g_browser_process->local_state()->SetInteger( 23 | - chrome_labs_prefs::kChromeLabsActivationThreshold, 24 | - base::RandInt(1, 100)); 25 | - } 26 | - 27 | - // The percentage of users that should see the feature. 28 | - const int kChromeLabsActivationPercentage = 99; 29 | - 30 | - if (force_activation_for_testing || 31 | - g_browser_process->local_state()->GetInteger( 32 | - chrome_labs_prefs::kChromeLabsActivationThreshold) <= 33 | - kChromeLabsActivationPercentage) { 34 | - return true; 35 | - } 36 | return false; 37 | } 38 | 39 | -------------------------------------------------------------------------------- /patches/helium/settings/fix-section-separators.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/resources/settings/a11y_page/a11y_page.html 2 | +++ b/chrome/browser/resources/settings/a11y_page/a11y_page.html 3 | @@ -10,11 +10,7 @@ 4 | 5 | 6 | 7 | - 10 | 18 | 23 | --- a/chrome/browser/resources/settings/languages_page/spell_check_page.html 24 | +++ b/chrome/browser/resources/settings/languages_page/spell_check_page.html 25 | @@ -56,7 +56,7 @@ 26 | 27 | 28 |
29 | - { 11 | console.error('usage: node clear-ublock-assets 18 | [c].flat().filter(s => !URL.canParse(s)); 19 | 20 | const breakKey = (obj, key_) => { 21 | const keys = Object.keys(obj); 22 | const idx = keys.indexOf(key_); 23 | 24 | if (idx === -1) { 25 | return; 26 | } 27 | 28 | for (let key of keys.splice(idx)) { 29 | const val = obj[key]; 30 | delete obj[key]; 31 | 32 | if (key === key_) { 33 | key = `^${key}`; 34 | } 35 | 36 | obj[key] = val; 37 | } 38 | } 39 | 40 | const clear = obj => { 41 | for (const filter of Object.values(obj)) { 42 | if (filter.off) { 43 | continue; 44 | } 45 | 46 | filter.contentURL = stripURLs(filter.contentURL); 47 | breakKey(filter, 'cdnURLs'); 48 | breakKey(filter, 'patchURLs'); 49 | } 50 | 51 | return obj; 52 | } 53 | 54 | fs.writeFileSync( 55 | assets_path, 56 | JSON.stringify(clear( 57 | JSON.parse(fs.readFileSync( 58 | assets_path 59 | )) 60 | ), null, '\t') + '\n' 61 | ); 62 | -------------------------------------------------------------------------------- /patches/helium/core/browser-window-context-menu.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/views/frame/system_menu_model_builder.cc 2 | +++ b/chrome/browser/ui/views/frame/system_menu_model_builder.cc 3 | @@ -8,6 +8,7 @@ 4 | #include "base/strings/utf_string_conversions.h" 5 | #include "build/build_config.h" 6 | #include "chrome/app/chrome_command_ids.h" 7 | +#include "chrome/browser/profiles/profile.h" 8 | #include "chrome/browser/ui/browser_commands.h" 9 | #include "chrome/browser/ui/browser_window/public/browser_window_features.h" 10 | #include "chrome/browser/ui/tabs/features.h" 11 | @@ -25,7 +26,6 @@ 12 | #if BUILDFLAG(IS_CHROMEOS) 13 | #include "ash/multi_user/multi_user_window_manager.h" 14 | #include "ash/shell.h" 15 | -#include "chrome/browser/profiles/profile.h" 16 | #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" 17 | #include "chrome/browser/ui/browser_window.h" 18 | #include "chrome/browser/ui/settings_window_manager_chromeos.h" 19 | @@ -97,6 +97,12 @@ void SystemMenuModelBuilder::BuildSystem 20 | 21 | model->AddItemWithStringId(IDC_BOOKMARK_ALL_TABS, IDS_BOOKMARK_ALL_TABS); 22 | model->AddItemWithStringId(IDC_NAME_WINDOW, IDS_NAME_WINDOW); 23 | + 24 | + if (!browser()->profile()->IsOffTheRecord()) { 25 | + model->AddSeparator(ui::NORMAL_SEPARATOR); 26 | + model->AddItemWithStringId(IDC_SHOW_CUSTOMIZE_CHROME_SIDE_PANEL, 27 | + IDS_SHOW_CUSTOMIZE_CHROME_SIDE_PANEL); 28 | + } 29 | #if BUILDFLAG(ENABLE_GLIC) 30 | #if BUILDFLAG(IS_WIN) 31 | // On Windows we can not remove an item when showing the menu. So only add 32 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/add-flag-to-disable-tls-grease.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ungoogled_flag_entries.h 2 | +++ b/chrome/browser/ungoogled_flag_entries.h 3 | @@ -88,4 +88,8 @@ 4 | "Hide tab close buttons", 5 | "Hides the close buttons on tabs. ungoogled-chromium flag.", 6 | kOsDesktop, SINGLE_VALUE_TYPE("hide-tab-close-buttons")}, 7 | + {"disable-grease-tls", 8 | + "Disable GREASE for TLS", 9 | + "Turn off GREASE (Generate Random Extensions And Sustain Extensibility) for TLS connections. ungoogled-chromium flag.", 10 | + kOsAll, SINGLE_VALUE_TYPE("disable-grease-tls")}, 11 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 12 | --- a/net/socket/ssl_client_socket_impl.cc 13 | +++ b/net/socket/ssl_client_socket_impl.cc 14 | @@ -14,6 +14,7 @@ 15 | #include 16 | #include 17 | 18 | +#include "base/command_line.h" 19 | #include "base/containers/span.h" 20 | #include "base/containers/to_vector.h" 21 | #include "base/feature_list.h" 22 | @@ -200,7 +201,8 @@ class SSLClientSocketImpl::SSLContext { 23 | SSL_CTX_sess_set_new_cb(ssl_ctx_.get(), NewSessionCallback); 24 | SSL_CTX_set_timeout(ssl_ctx_.get(), 1 * 60 * 60 /* one hour */); 25 | 26 | - SSL_CTX_set_grease_enabled(ssl_ctx_.get(), 1); 27 | + int grease_mode = !base::CommandLine::ForCurrentProcess()->HasSwitch("disable-grease-tls"); 28 | + SSL_CTX_set_grease_enabled(ssl_ctx_.get(), grease_mode); 29 | 30 | // Deduplicate all certificates minted from the SSL_CTX in memory. 31 | SSL_CTX_set0_buffer_pool(ssl_ctx_.get(), x509_util::GetBufferPool()); 32 | -------------------------------------------------------------------------------- /patches/helium/ui/selected-keyword-view.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/views/location_bar/selected_keyword_view.cc 2 | +++ b/chrome/browser/ui/views/location_bar/selected_keyword_view.cc 3 | @@ -56,12 +56,8 @@ SelectedKeywordView::GetKeywordLabelName 4 | template_url_starter_pack_data::kPage) { 5 | names.full_name = 6 | l10n_util::GetStringUTF16(IDS_STARTER_PACK_PAGE_KEYWORD_TEXT); 7 | - } else if (template_url && 8 | - template_url->type() == TemplateURL::OMNIBOX_API_EXTENSION) { 9 | - names.full_name = names.short_name; 10 | } else { 11 | - names.full_name = l10n_util::GetStringFUTF16(IDS_OMNIBOX_KEYWORD_TEXT_MD, 12 | - names.short_name); 13 | + names.full_name = names.short_name; 14 | } 15 | return names; 16 | } 17 | @@ -77,6 +73,8 @@ SelectedKeywordView::SelectedKeywordView 18 | partial_label_.SetVisible(false); 19 | label()->SetElideBehavior(gfx::FADE_TAIL); 20 | 21 | + SetExpandedLabelAdditionalInsets(views::Inset1D(2, 0)); 22 | + 23 | // TODO(crbug.com/40890218): `IconLabelBubbleView::GetAccessibleNodeData` 24 | // would set the name to explicitly empty when the name was missing. 25 | // That function no longer exists. As a result we need to handle that here. 26 | @@ -197,7 +195,7 @@ const std::u16string& SelectedKeywordVie 27 | 28 | int SelectedKeywordView::GetExtraInternalSpacing() const { 29 | // Align the label text with the suggestion text. 30 | - return 14; 31 | + return 2; 32 | } 33 | 34 | void SelectedKeywordView::SetLabelForCurrentWidth() { 35 | -------------------------------------------------------------------------------- /patches/upstream-fixes/fix-python-codecs-deprecation.patch: -------------------------------------------------------------------------------- 1 | From 9c7aa2956eebd3f739dc9f60d041923cdb9ffa06 Mon Sep 17 00:00:00 2001 2 | From: jj 3 | Date: Thu, 06 Nov 2025 09:27:04 -0800 4 | Subject: [PATCH] Remove unneeded codecs usage in mojom_parser 5 | 6 | Python >=3.14 loudly complains on every mojom_parser use, with: 7 | 8 | DeprecationWarning: codecs.open() is deprecated. Use open() instead. 9 | 10 | `codecs` has not been useful for a long time, so let's drop it, 11 | and simply call open() instead. 12 | 13 | Change-Id: Iaf4ab7bcdefb4c2b31aa825bac5d79970db0ba46 14 | Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7123066 15 | Reviewed-by: Tom Sepez 16 | Commit-Queue: Oksana Zhuravlova 17 | Reviewed-by: Oksana Zhuravlova 18 | Cr-Commit-Position: refs/heads/main@{#1541277} 19 | --- 20 | 21 | --- a/mojo/public/tools/mojom/mojom_parser.py 22 | +++ b/mojo/public/tools/mojom/mojom_parser.py 23 | @@ -12,7 +12,6 @@ generate usable language bindings. 24 | 25 | import argparse 26 | import builtins 27 | -import codecs 28 | import errno 29 | import json 30 | import logging 31 | @@ -180,7 +179,7 @@ def _CollectAllowedImportsFromBuildMetad 32 | 33 | # multiprocessing helper. 34 | def _ParseAstHelper(mojom_abspath, enabled_features): 35 | - with codecs.open(mojom_abspath, encoding='utf-8') as f: 36 | + with open(mojom_abspath, encoding='utf-8') as f: 37 | ast = parser.Parse(f.read(), mojom_abspath) 38 | conditional_features.RemoveDisabledDefinitions(ast, enabled_features) 39 | return mojom_abspath, ast 40 | -------------------------------------------------------------------------------- /patches/helium/core/search/engine-defaults.patch: -------------------------------------------------------------------------------- 1 | --- a/components/search_engines/template_url_prepopulate_data.cc 2 | +++ b/components/search_engines/template_url_prepopulate_data.cc 3 | @@ -258,7 +258,7 @@ std::unique_ptr GetPrep 4 | const std::vector& 5 | regional_prepopulated_engines) { 6 | return FindPrepopulatedEngineInternal(prefs, regional_prepopulated_engines, 7 | - google.id, 8 | + duckduckgo.id, 9 | /*use_first_as_fallback=*/true); 10 | } 11 | 12 | --- a/third_party/search_engines_data/resources/definitions/regional_settings.json 13 | +++ b/third_party/search_engines_data/resources/definitions/regional_settings.json 14 | @@ -3,6 +3,19 @@ 15 | // found in the LICENSE file. 16 | { 17 | "elements": { 18 | + "ZZ": { 19 | + // Default 20 | + "search_engines": [ 21 | + "&duckduckgo", 22 | + "&ecosia", 23 | + "&bing", 24 | + "&break_stuff_google", 25 | + "&qwant", 26 | + "&kagi" 27 | + ] 28 | + } 29 | + }, 30 | + "elements_ignored": { 31 | "AE": { 32 | // United Arab Emirates 33 | "search_engines": [ 34 | @@ -1154,7 +1167,8 @@ 35 | "name": "kRegionalSettings", 36 | "export_items": false, 37 | "map_key_type": "country_codes::CountryId", 38 | - "map_aliases": { 39 | + "map_aliases": {}, 40 | + "map_aliases_ignored": { 41 | "AD": "ES", // Andorra 42 | "AF": "ZZ", // Afghanistan 43 | "AG": "ZZ", // Antigua and Barbuda 44 | -------------------------------------------------------------------------------- /patches/helium/ui/tab-strip-controls.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/views/tabs/tab_strip_control_button.cc 2 | +++ b/chrome/browser/ui/views/tabs/tab_strip_control_button.cc 3 | @@ -240,7 +240,7 @@ void TabStripControlButton::UpdateBackgr 4 | } 5 | 6 | int TabStripControlButton::GetCornerRadius() const { 7 | - return TabStripControlButton::kButtonSize.width() / 2; 8 | + return 8; 9 | } 10 | 11 | int TabStripControlButton::GetFlatCornerRadius() const { 12 | --- a/chrome/browser/ui/views/tabs/tab_search_button.cc 13 | +++ b/chrome/browser/ui/views/tabs/tab_search_button.cc 14 | @@ -23,7 +23,7 @@ 15 | #include "ui/views/view_class_properties.h" 16 | 17 | namespace { 18 | -constexpr int kCRTabSearchCornerRadius = 10; 19 | +constexpr int kCRTabSearchCornerRadius = 8; 20 | constexpr int kCRTabSearchFlatCornerRadius = 4; 21 | constexpr int kComboButtonFlatCornerRadius = 0; 22 | } // namespace 23 | @@ -44,15 +44,6 @@ TabSearchButton::TabSearchButton( 24 | SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_TAB_SEARCH)); 25 | GetViewAccessibility().SetName( 26 | l10n_util::GetStringUTF16(IDS_ACCNAME_TAB_SEARCH)); 27 | - 28 | - CHECK(!features::HasTabSearchToolbarButton()); 29 | - SetForegroundFrameActiveColorId(kColorNewTabButtonForegroundFrameActive); 30 | - SetForegroundFrameInactiveColorId(kColorNewTabButtonForegroundFrameInactive); 31 | - SetBackgroundFrameActiveColorId(kColorNewTabButtonCRBackgroundFrameActive); 32 | - SetBackgroundFrameInactiveColorId( 33 | - kColorNewTabButtonCRBackgroundFrameInactive); 34 | - 35 | - UpdateColors(); 36 | } 37 | 38 | TabSearchButton::~TabSearchButton() = default; 39 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/disable-mei-preload.patch: -------------------------------------------------------------------------------- 1 | # Disables use of a binary for preloading the Media Engagement index 2 | # Said binary is: chrome/browser/resources/media/mei_preload/preloaded_data.pb 3 | # According to media/base/media_switches (for PreloadMediaEngagementData), it 4 | # "enables a list of origins to be considered as having a high MEI until there 5 | # is enough local data to determine the user's preferred behavior." This feature 6 | # does not seem to outweigh the benefit of removing the binary, thus this patch. 7 | 8 | --- a/chrome/BUILD.gn 9 | +++ b/chrome/BUILD.gn 10 | @@ -368,7 +368,6 @@ if (!is_android && !is_mac) { 11 | } 12 | 13 | data_deps += [ 14 | - "//chrome/browser/resources/media/mei_preload:component", 15 | "//components/webapps/isolated_web_apps/preload:component", 16 | "//third_party/widevine/cdm", 17 | ] 18 | @@ -1180,7 +1179,6 @@ if (is_win) { 19 | ":optimization_guide_library", 20 | ":swiftshader_binaries", 21 | ":widevine_cdm_library", 22 | - "//chrome/browser/resources/media/mei_preload:component_bundle", 23 | "//components/webapps/isolated_web_apps/preload:component_bundle", 24 | ] 25 | 26 | --- a/chrome/browser/resources/BUILD.gn 27 | +++ b/chrome/browser/resources/BUILD.gn 28 | @@ -108,11 +108,6 @@ group("resources") { 29 | ] 30 | } 31 | 32 | - if (is_mac) { 33 | - public_deps += [ 34 | - "//chrome/browser/resources/media/mei_preload:component", 35 | - ] 36 | - } 37 | 38 | if (is_win || is_mac || is_linux || is_chromeos || is_desktop_android) { 39 | public_deps += [ "discards:resources" ] 40 | -------------------------------------------------------------------------------- /devutils/third_party/unidiff/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # The MIT License (MIT) 4 | # Copyright (c) 2014-2017 Matias Bordese 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to deal 8 | # in the Software without restriction, including without limitation the rights 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in 14 | # all copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 20 | # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 21 | # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 22 | # OR OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | 25 | """Unidiff parsing library.""" 26 | 27 | from __future__ import unicode_literals 28 | 29 | from . import __version__ 30 | from .patch import ( 31 | DEFAULT_ENCODING, 32 | LINE_TYPE_ADDED, 33 | LINE_TYPE_CONTEXT, 34 | LINE_TYPE_REMOVED, 35 | Hunk, 36 | PatchedFile, 37 | PatchSet, 38 | UnidiffParseError, 39 | ) 40 | 41 | VERSION = __version__.__version__ 42 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/add-flag-to-hide-tab-close-buttons.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/views/tabs/tab.cc 2 | +++ b/chrome/browser/ui/views/tabs/tab.cc 3 | @@ -1178,7 +1178,11 @@ void Tab::UpdateIconVisibility() { 4 | // Close button is shown on active tabs regardless of the size. 5 | showing_close_button_ = true; 6 | #endif // BUILDFLAG(IS_CHROMEOS) 7 | + if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-tab-close-buttons")) { 8 | + showing_close_button_ = false; 9 | + } else { 10 | available_width -= close_button_width; 11 | + } 12 | 13 | showing_alert_indicator_ = 14 | has_alert_icon && alert_icon_width <= available_width; 15 | @@ -1207,6 +1211,8 @@ void Tab::UpdateIconVisibility() { 16 | !controller_->IsLockedForOnTask() && 17 | #endif 18 | large_enough_for_close_button; 19 | + if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-tab-close-buttons")) 20 | + showing_close_button_ = false; 21 | if (showing_close_button_) { 22 | available_width -= close_button_width; 23 | } 24 | --- a/chrome/browser/ungoogled_flag_entries.h 25 | +++ b/chrome/browser/ungoogled_flag_entries.h 26 | @@ -84,4 +84,8 @@ 27 | "Tab Hover Cards", 28 | "Allows removing the tab hover cards or using a tooltip as a replacement. ungoogled-chromium flag.", 29 | kOsDesktop, MULTI_VALUE_TYPE(kTabHoverCards)}, 30 | + {"hide-tab-close-buttons", 31 | + "Hide tab close buttons", 32 | + "Hides the close buttons on tabs. ungoogled-chromium flag.", 33 | + kOsDesktop, SINGLE_VALUE_TYPE("hide-tab-close-buttons")}, 34 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 35 | -------------------------------------------------------------------------------- /LICENSE.ungoogled_chromium: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2015-2023, The ungoogled-chromium Authors 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | 3. Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/add-flag-to-disable-beforeunload.patch: -------------------------------------------------------------------------------- 1 | # Add --disable-beforeunload to always disable beforeunload JavaScript dialogs 2 | 3 | --- a/chrome/browser/ungoogled_flag_entries.h 4 | +++ b/chrome/browser/ungoogled_flag_entries.h 5 | @@ -16,4 +16,8 @@ 6 | "Disable search engine collection", 7 | "Prevents search engines from being added automatically. ungoogled-chromium flag.", 8 | kOsAll, SINGLE_VALUE_TYPE("disable-search-engine-collection")}, 9 | + {"disable-beforeunload", 10 | + "Disable beforeunload", 11 | + "Disables JavaScript dialog boxes triggered by beforeunload. ungoogled-chromium flag.", 12 | + kOsAll, SINGLE_VALUE_TYPE("disable-beforeunload")}, 13 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 14 | --- a/components/javascript_dialogs/app_modal_dialog_manager.cc 15 | +++ b/components/javascript_dialogs/app_modal_dialog_manager.cc 16 | @@ -7,6 +7,7 @@ 17 | #include 18 | #include 19 | 20 | +#include "base/command_line.h" 21 | #include "base/functional/bind.h" 22 | #include "base/metrics/histogram_macros.h" 23 | #include "base/strings/utf_string_conversions.h" 24 | @@ -145,7 +146,8 @@ void AppModalDialogManager::RunBeforeUnl 25 | ChromeJavaScriptDialogExtraData* extra_data = 26 | &javascript_dialog_extra_data_[web_contents]; 27 | 28 | - if (extra_data->suppress_javascript_messages_) { 29 | + if (extra_data->suppress_javascript_messages_ 30 | + || base::CommandLine::ForCurrentProcess()->HasSwitch("disable-beforeunload")) { 31 | // If a site harassed the user enough for them to put it on mute, then it 32 | // lost its privilege to deny unloading. 33 | std::move(callback).Run(true, std::u16string()); 34 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/fix-building-without-mdns-and-service-discovery.patch: -------------------------------------------------------------------------------- 1 | # Fix building with enable_service_discovery=false and enable_mds=false 2 | 3 | --- a/chrome/browser/media/router/discovery/mdns/dns_sd_device_lister.cc 4 | +++ b/chrome/browser/media/router/discovery/mdns/dns_sd_device_lister.cc 5 | @@ -40,37 +40,22 @@ DnsSdDeviceLister::DnsSdDeviceLister( 6 | DnsSdDeviceLister::~DnsSdDeviceLister() = default; 7 | 8 | void DnsSdDeviceLister::Discover() { 9 | -#if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) 10 | - if (!device_lister_) { 11 | - device_lister_ = local_discovery::ServiceDiscoveryDeviceLister::Create( 12 | - this, service_discovery_client_, service_type_); 13 | - device_lister_->Start(); 14 | - } 15 | - device_lister_->DiscoverNewDevices(); 16 | -#endif 17 | } 18 | 19 | void DnsSdDeviceLister::Reset() { 20 | - device_lister_.reset(); 21 | } 22 | 23 | void DnsSdDeviceLister::OnDeviceChanged( 24 | const std::string& service_type, 25 | bool added, 26 | const ServiceDescription& service_description) { 27 | - DnsSdService service; 28 | - FillServiceInfo(service_description, &service); 29 | - delegate_->ServiceChanged(device_lister_->service_type(), added, service); 30 | } 31 | 32 | void DnsSdDeviceLister::OnDeviceRemoved(const std::string& service_type, 33 | const std::string& service_name) { 34 | - delegate_->ServiceRemoved(service_type, service_name); 35 | } 36 | 37 | void DnsSdDeviceLister::OnDeviceCacheFlushed(const std::string& service_type) { 38 | - delegate_->ServicesFlushed(device_lister_->service_type()); 39 | - device_lister_->DiscoverNewDevices(); 40 | } 41 | 42 | void DnsSdDeviceLister::OnPermissionRejected() { 43 | -------------------------------------------------------------------------------- /devutils/tests/test_check_patch_files.py: -------------------------------------------------------------------------------- 1 | # -*- coding: UTF-8 -*- 2 | 3 | # Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE.ungoogled_chromium file. 6 | """Test check_patch_files.py""" 7 | 8 | import logging 9 | import tempfile 10 | import sys 11 | from pathlib import Path 12 | 13 | sys.path.insert(0, str(Path(__file__).resolve().parent.parent.parent / 'utils')) 14 | from _common import ENCODING, get_logger, set_logging_level 15 | 16 | sys.path.pop(0) 17 | 18 | sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) 19 | from check_patch_files import check_series_duplicates 20 | 21 | sys.path.pop(0) 22 | 23 | 24 | def test_check_series_duplicates(): 25 | """Test check_series_duplicates""" 26 | 27 | set_logging_level(logging.DEBUG) 28 | 29 | with tempfile.TemporaryDirectory() as tmpdirname: 30 | patches_dir = Path(tmpdirname) 31 | series_path = Path(tmpdirname, 'series') 32 | 33 | get_logger().info('Check no duplicates') 34 | series_path.write_text('\n'.join([ 35 | 'a.patch', 36 | 'b.patch', 37 | 'c.patch', 38 | ]), encoding=ENCODING) 39 | assert not check_series_duplicates(patches_dir) 40 | 41 | get_logger().info('Check duplicates') 42 | series_path.write_text('\n'.join([ 43 | 'a.patch', 44 | 'b.patch', 45 | 'c.patch', 46 | 'a.patch', 47 | ]), 48 | encoding=ENCODING) 49 | assert check_series_duplicates(patches_dir) 50 | 51 | 52 | if __name__ == '__main__': 53 | test_check_series_duplicates() 54 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/add-flag-to-disable-local-history-expiration.patch: -------------------------------------------------------------------------------- 1 | # Keep local history longer than 90 days 2 | 3 | --- a/chrome/browser/ungoogled_flag_entries.h 4 | +++ b/chrome/browser/ungoogled_flag_entries.h 5 | @@ -52,4 +52,8 @@ 6 | "Popups to tabs", 7 | "Makes popups open in new tabs. ungoogled-chromium flag", 8 | kOsAll, SINGLE_VALUE_TYPE("popups-to-tabs")}, 9 | + {"keep-old-history", 10 | + "Keep old history", 11 | + "Keep history older than 3 months. ungoogled-chromium flag", 12 | + kOsAll, SINGLE_VALUE_TYPE("keep-old-history")}, 13 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 14 | --- a/components/history/core/browser/history_backend.cc 15 | +++ b/components/history/core/browser/history_backend.cc 16 | @@ -14,6 +14,7 @@ 17 | #include 18 | #include 19 | 20 | +#include "base/command_line.h" 21 | #include "base/compiler_specific.h" 22 | #include "base/containers/flat_set.h" 23 | #include "base/feature_list.h" 24 | @@ -1344,7 +1345,8 @@ void HistoryBackend::InitImpl( 25 | db_->GetStartDate(&first_recorded_time_); 26 | 27 | // Start expiring old stuff. 28 | - expirer_.StartExpiringOldStuff(base::Days(kExpireDaysThreshold)); 29 | + if (!base::CommandLine::ForCurrentProcess()->HasSwitch("keep-old-history")) 30 | + expirer_.StartExpiringOldStuff(base::Days(kExpireDaysThreshold)); 31 | } 32 | 33 | void HistoryBackend::OnMemoryPressure( 34 | @@ -1580,6 +1582,8 @@ void HistoryBackend::AddPagesWithDetails 35 | } 36 | 37 | bool HistoryBackend::IsExpiredVisitTime(const base::Time& time) const { 38 | + if (base::CommandLine::ForCurrentProcess()->HasSwitch("keep-old-history")) 39 | + return false; 40 | return time < expirer_.GetCurrentExpirationTime(); 41 | } 42 | 43 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/add-flag-to-force-punycode-hostnames.patch: -------------------------------------------------------------------------------- 1 | # Add flag to force punycode in hostnames instead of Unicode when displaying Internationalized Domain Names (IDNs) to mitigate homograph attacks 2 | 3 | --- a/chrome/browser/ungoogled_flag_entries.h 4 | +++ b/chrome/browser/ungoogled_flag_entries.h 5 | @@ -20,4 +20,8 @@ 6 | "Disable beforeunload", 7 | "Disables JavaScript dialog boxes triggered by beforeunload. ungoogled-chromium flag.", 8 | kOsAll, SINGLE_VALUE_TYPE("disable-beforeunload")}, 9 | + {"force-punycode-hostnames", 10 | + "Force punycode hostnames", 11 | + "Force punycode in hostnames instead of Unicode when displaying Internationalized Domain Names (IDNs). ungoogled-chromium flag.", 12 | + kOsAll, SINGLE_VALUE_TYPE("force-punycode-hostnames")}, 13 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 14 | --- a/components/url_formatter/url_formatter.cc 15 | +++ b/components/url_formatter/url_formatter.cc 16 | @@ -10,6 +10,7 @@ 17 | #include 18 | #include 19 | 20 | +#include "base/command_line.h" 21 | #include "base/memory/raw_ptr.h" 22 | #include "base/no_destructor.h" 23 | #include "base/numerics/safe_conversions.h" 24 | @@ -317,6 +318,13 @@ IDNConversionResult IDNToUnicodeWithAdju 25 | host16.reserve(host.length()); 26 | host16.insert(host16.end(), host.begin(), host.end()); 27 | 28 | + if (base::CommandLine::ForCurrentProcess()->HasSwitch("force-punycode-hostnames")) { 29 | + // Leave as punycode. 30 | + IDNConversionResult result; 31 | + result.result = host16; 32 | + return result; 33 | + } 34 | + 35 | // Compute the top level domain to be used in spoof checks later. 36 | std::string_view top_level_domain; 37 | std::u16string top_level_domain_unicode; 38 | -------------------------------------------------------------------------------- /devutils/set_quilt_vars.sh: -------------------------------------------------------------------------------- 1 | # Sets quilt variables for updating the patches 2 | # Make sure to run this with the shell command "source" in order to inherit the variables into the interactive environment 3 | 4 | # There is some problem with the absolute paths in QUILT_PATCHES and QUILT_SERIES breaking quilt 5 | # (refresh and diff don't read QUILT_*_ARGS, and series displays absolute paths instead of relative) 6 | # Specifying a quiltrc file fixes this, so "--quiltrc -" fixes this too. 7 | # One side effect of '--quiltrc -' is that we lose default settings from /etc/quilt.quiltrc, so they are redefined below. 8 | alias quilt='quilt --quiltrc -' 9 | 10 | # Assume this script lives within the repository 11 | REPO_ROOT=$(dirname "$(dirname "$(readlink -f "${BASH_SOURCE[0]:-${(%):-%x}}")")") 12 | 13 | export QUILT_PATCHES="$REPO_ROOT/patches" 14 | #export QUILT_SERIES=$(readlink -f "$REPO_ROOT/patches/series") 15 | 16 | # Options below borrowed from Debian and default quilt options (from /etc/quilt.quiltrc on Debian) 17 | export QUILT_PUSH_ARGS="--color=auto" 18 | export QUILT_DIFF_OPTS="--show-c-function" 19 | export QUILT_PATCH_OPTS="--unified --reject-format=unified" 20 | export QUILT_DIFF_ARGS="-p ab --no-timestamps --no-index --color=auto" 21 | export QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index --strip-trailing-whitespace" 22 | export QUILT_COLORS="diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:diff_ctx=35:diff_cctx=33" 23 | export QUILT_SERIES_ARGS="--color=auto" 24 | export QUILT_PATCHES_ARGS="--color=auto" 25 | 26 | export LC_ALL=C 27 | # When non-default less options are used, add the -R option so that less outputs 28 | # ANSI color escape codes "raw". 29 | if [ -n "${LESS-}" -a -z "${QUILT_PAGER+x}" ]; then 30 | export QUILT_PAGER="less -FRX" 31 | fi 32 | -------------------------------------------------------------------------------- /.github/workflows/release-and-tag.yml: -------------------------------------------------------------------------------- 1 | name: Create new release on version bump 2 | 3 | permissions: 4 | contents: write 5 | 6 | on: 7 | push: { branches: ["main"] } 8 | 9 | jobs: 10 | check-release: 11 | name: Create release if it makes sense 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Clone repository 15 | uses: actions/checkout@v4 16 | with: { fetch-depth: 0 } 17 | 18 | - name: Check if a new release is needed 19 | id: info 20 | env: 21 | COMMIT_BEFORE: ${{ github.event.before }} 22 | COMMIT_AFTER: ${{ github.event.after }} 23 | shell: bash 24 | run: | 25 | mkdir -p dummy && echo 0 > dummy/revision.txt 26 | cp utils/helium_version.py . 27 | 28 | git checkout "$COMMIT_BEFORE" \ 29 | && OLD_VERSION=$(python3 helium_version.py --tree . --print) 30 | 31 | git checkout "$COMMIT_AFTER" \ 32 | && NEW_VERSION=$(python3 helium_version.py --tree . --print) 33 | 34 | if [ "$OLD_VERSION" != "$NEW_VERSION" ]; then 35 | echo "version=$NEW_VERSION" >> "$GITHUB_OUTPUT" 36 | { 37 | printf '### Changelog\n```\n' 38 | git log --oneline "$OLD_VERSION.." 39 | echo '```' 40 | } | tee body.md 41 | fi 42 | 43 | - name: Create Release 44 | if: steps.info.outputs.version 45 | id: create_release 46 | uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 47 | env: 48 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 49 | with: 50 | tag_name: ${{ steps.info.outputs.version }} 51 | name: ${{ steps.info.outputs.version }} 52 | body_path: body.md 53 | -------------------------------------------------------------------------------- /patches/helium/core/reenable-update-checks.patch: -------------------------------------------------------------------------------- 1 | --- a/components/update_client/update_checker.cc 2 | +++ b/components/update_client/update_checker.cc 3 | @@ -104,7 +104,6 @@ void UpdateCheckerImpl::CheckForUpdates( 4 | scoped_refptr context, 5 | const base::flat_map& additional_attributes, 6 | UpdateCheckCallback update_check_callback) { 7 | - return; 8 | DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); 9 | 10 | update_check_callback_ = std::move(update_check_callback); 11 | --- a/components/component_updater/configurator_impl.cc 12 | +++ b/components/component_updater/configurator_impl.cc 13 | @@ -76,6 +76,8 @@ base::TimeDelta ConfiguratorImpl::Update 14 | } 15 | 16 | std::vector ConfiguratorImpl::UpdateUrl() const { 17 | + return {}; 18 | + 19 | DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); 20 | if (url_source_override_.is_valid()) { 21 | return {GURL(url_source_override_)}; 22 | @@ -133,7 +135,7 @@ bool ConfiguratorImpl::EnabledBackground 23 | 24 | bool ConfiguratorImpl::EnabledCupSigning() const { 25 | DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); 26 | - return true; 27 | + return false; 28 | } 29 | 30 | // The default implementation for most embedders returns an empty string. 31 | --- a/extensions/browser/updater/extension_downloader.cc 32 | +++ b/extensions/browser/updater/extension_downloader.cc 33 | @@ -346,6 +346,10 @@ void ExtensionDownloader::DoStartAllPend 34 | AddToFetches(fetches_preparing, std::move(task)); 35 | pending_tasks_.clear(); 36 | 37 | + for (auto& fetch_list : fetches_preparing) { 38 | + for (auto& fetch : fetch_list.second) 39 | + StartUpdateCheck(std::move(fetch)); 40 | + } 41 | } 42 | 43 | void ExtensionDownloader::SetIdentityManager( 44 | -------------------------------------------------------------------------------- /patches/helium/ui/always-use-better-ntp.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/search/search.cc 2 | +++ b/chrome/browser/search/search.cc 3 | @@ -174,37 +174,9 @@ struct NewTabURLDetails { 4 | #if BUILDFLAG(IS_ANDROID) 5 | const GURL local_url; 6 | #else 7 | - const bool default_is_google = DefaultSearchProviderIsGoogle(profile); 8 | - const GURL local_url(default_is_google 9 | - ? chrome::kChromeUINewTabPageURL 10 | - : chrome::kChromeUINewTabPageThirdPartyURL); 11 | - if (default_is_google) { 12 | - return NewTabURLDetails(local_url, NEW_TAB_URL_VALID); 13 | - } 14 | + const GURL local_url(chrome::kChromeUINewTabPageURL); 15 | #endif 16 | - 17 | - const TemplateURL* template_url = 18 | - GetDefaultSearchProviderTemplateURL(profile); 19 | - if (!profile || !template_url) { 20 | - return NewTabURLDetails(local_url, NEW_TAB_URL_BAD); 21 | - } 22 | - 23 | - GURL search_provider_url(template_url->new_tab_url_ref().ReplaceSearchTerms( 24 | - TemplateURLRef::SearchTermsArgs(std::u16string()), 25 | - UIThreadSearchTermsData())); 26 | - 27 | - if (!search_provider_url.is_valid()) { 28 | - return NewTabURLDetails(local_url, NEW_TAB_URL_NOT_SET); 29 | - } 30 | - if (!search_provider_url.SchemeIsCryptographic()) { 31 | - return NewTabURLDetails(local_url, NEW_TAB_URL_INSECURE); 32 | - } 33 | - if (!IsURLAllowedForSupervisedUser(search_provider_url, 34 | - CHECK_DEREF(profile))) { 35 | - return NewTabURLDetails(local_url, NEW_TAB_URL_BLOCKED); 36 | - } 37 | - 38 | - return NewTabURLDetails(search_provider_url, NEW_TAB_URL_VALID); 39 | + return NewTabURLDetails(local_url, NEW_TAB_URL_VALID); 40 | } 41 | 42 | const GURL url; 43 | -------------------------------------------------------------------------------- /utils/replace_resources.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright 2025 The Helium Authors 4 | # You can use, redistribute, and/or modify this source code under 5 | # the terms of the GPL-3.0 license that can be found in the LICENSE file. 6 | """ 7 | Replaces resources (such as icons) with Helium branding. 8 | """ 9 | 10 | import os 11 | import shutil 12 | import sys 13 | 14 | 15 | def copy_resources(resource_list, resource_dir, chromium_dir): 16 | """ 17 | Handles copying resources from the source tree into the build 18 | tree based on a resources list. 19 | """ 20 | with open(resource_list, 'r', encoding='utf-8') as file: 21 | for line_number, line in enumerate(file, start=1): 22 | line = line.strip() 23 | if not line or line.startswith('#'): 24 | continue 25 | 26 | line_parts = line.split() 27 | 28 | if len(line_parts) != 2: 29 | raise ValueError(f"Line {line_number} in the resource file is invalid.") 30 | 31 | source = os.path.join(resource_dir, line_parts[0]) 32 | dest = os.path.join(chromium_dir, line_parts[1]) 33 | 34 | shutil.copyfile(source, dest) 35 | print(f"Copied {line_parts[0]} to {line_parts[1]}") 36 | 37 | 38 | def main(): 39 | """CLI entrypoint""" 40 | if len(sys.argv) != 4: 41 | print( 42 | "Usage: python3 replace_resources.py " \ 43 | " " 44 | ) 45 | sys.exit(1) 46 | 47 | resource_list = sys.argv[1] 48 | resource_dir = sys.argv[2] 49 | chromium_dir = sys.argv[3] 50 | 51 | copy_resources(resource_list, resource_dir, chromium_dir) 52 | 53 | 54 | if __name__ == "__main__": 55 | main() 56 | -------------------------------------------------------------------------------- /devutils/run_utils_pylint.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE.ungoogled_chromium file. 6 | """Run Pylint over utils""" 7 | 8 | import argparse 9 | import sys 10 | from pathlib import Path 11 | 12 | from run_other_pylint import ChangeDir, run_pylint 13 | 14 | 15 | def main(): 16 | """CLI entrypoint""" 17 | parser = argparse.ArgumentParser(description='Run Pylint over utils') 18 | parser.add_argument('--hide-fixme', action='store_true', help='Hide "fixme" Pylint warnings.') 19 | parser.add_argument('--show-locally-disabled', 20 | action='store_true', 21 | help='Show "locally-disabled" Pylint warnings.') 22 | args = parser.parse_args() 23 | 24 | pylint_options = [ 25 | '--jobs=4', 26 | '--max-args=7', 27 | '--score=n', 28 | '--persistent=n', 29 | ] 30 | 31 | if args.hide_fixme: 32 | pylint_options.append('--disable=fixme') 33 | if not args.show_locally_disabled: 34 | pylint_options.append('--disable=locally-disabled') 35 | 36 | ignore_prefixes = [ 37 | ('third_party', ), 38 | ('tests', ), 39 | ] 40 | 41 | sys.path.insert(1, str(Path(__file__).resolve().parent.parent / 'utils' / 'third_party')) 42 | sys.path.append(Path(__file__).resolve().parent.parent / 'utils') 43 | with ChangeDir(Path(__file__).resolve().parent.parent / 'utils'): 44 | result = run_pylint( 45 | Path(), 46 | pylint_options, 47 | ignore_prefixes=ignore_prefixes, 48 | ) 49 | sys.path.pop(1) 50 | if not result: 51 | sys.exit(1) 52 | sys.exit(0) 53 | 54 | 55 | if __name__ == '__main__': 56 | main() 57 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.yml: -------------------------------------------------------------------------------- 1 | name: Feature request 2 | description: Suggest an idea 3 | labels: ["feat", "pending"] 4 | title: "[FR]: " 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Before submitting this request, please search existing issues and make sure it's unique. 10 | If you ignore this text, and create this one, you will be permanently banned from 11 | interacting with the entire organization. 12 | 13 | Please do not use AI for writing your request's description, no one wishes 14 | to read that and thus your request will be closed. 15 | 16 | If your request is for a platform-specific feature (e.g. for macOS), please 17 | submit it to the relevant platform repo instead of the generic "helium" repo. 18 | - type: input 19 | id: description 20 | attributes: 21 | label: Description 22 | description: A clear and concise description (in one line) of what your suggestion is 23 | validations: 24 | required: true 25 | - type: checkboxes 26 | attributes: 27 | label: Who's implementing? 28 | options: 29 | - label: I'm willing to implement this feature myself 30 | - type: textarea 31 | id: prob 32 | attributes: 33 | label: The problem 34 | description: Please describe the problem you are solving or new feature you're suggesting 35 | placeholder: I'm always frustrated when [...] happens 36 | validations: 37 | required: true 38 | - type: textarea 39 | id: sol 40 | attributes: 41 | label: Possible solutions 42 | description: Please describe possible solution(-s) to your problem 43 | validations: 44 | required: true 45 | - type: textarea 46 | id: additional 47 | attributes: 48 | label: Additional context 49 | description: Add any other context about the feature request here 50 | -------------------------------------------------------------------------------- /patches/helium/ui/bookmarks-bar-padding.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc 2 | +++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc 3 | @@ -173,7 +173,7 @@ using PermanentFolderType = BookmarkPare 4 | bool animations_enabled = true; 5 | 6 | // Thickness of the separator (|) in dips (density-independent pixels). 7 | -constexpr int kBookmarkBarSeparatorThickness = 2; 8 | +constexpr int kBookmarkBarSeparatorThickness = 1; 9 | 10 | gfx::ImageSkia* GetImageSkiaNamed(int id) { 11 | return ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(id); 12 | @@ -353,8 +353,8 @@ class BookmarkBarView::ButtonSeparatorVi 13 | 14 | public: 15 | ButtonSeparatorView() { 16 | - const int leading_padding = 8; 17 | - const int trailing_padding = 8; 18 | + const int leading_padding = 3; 19 | + const int trailing_padding = 3; 20 | separator_thickness_ = kBookmarkBarSeparatorThickness; 21 | const gfx::Insets border_insets = 22 | gfx::Insets::TLBR(0, leading_padding, 0, trailing_padding); 23 | @@ -700,7 +700,7 @@ void BookmarkBarView::Layout(PassKey) { 24 | } 25 | 26 | int x = GetLeadingMargin(); 27 | - static constexpr int kBookmarkBarTrailingMargin = 8; 28 | + static constexpr int kBookmarkBarTrailingMargin = 6; 29 | int width = View::width() - x - kBookmarkBarTrailingMargin; 30 | 31 | const int button_height = GetLayoutConstant(BOOKMARK_BAR_BUTTON_HEIGHT); 32 | @@ -821,7 +821,7 @@ void BookmarkBarView::Layout(PassKey) { 33 | // the bookmark buttons. 34 | if (saved_tab_group_bar_width > 0) { 35 | // Possibly update the paddings of the separator 36 | - constexpr int kSeparatorPadding = 8; 37 | + constexpr int kSeparatorPadding = 6; 38 | const int left_padding = saved_tab_group_bar_->IsOverflowButtonVisible() 39 | ? 0 40 | : kSeparatorPadding; 41 | -------------------------------------------------------------------------------- /patches/helium/core/add-disable-ech-flag.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/helium_flag_choices.h 2 | +++ b/chrome/browser/helium_flag_choices.h 3 | @@ -26,6 +26,8 @@ namespace helium { 4 | {kChannelBeta, kChannelCommandLine, kChannelBeta}, 5 | }; 6 | 7 | + constexpr const char kDisableEchCommandLine[] = "disable-ech"; 8 | + 9 | } // namespace helium 10 | 11 | #endif /* CHROME_BROWSER_HELIUM_FLAG_CHOICES_H_ */ 12 | --- a/chrome/browser/helium_flag_entries.h 13 | +++ b/chrome/browser/helium_flag_entries.h 14 | @@ -11,4 +11,9 @@ 15 | "Maximum frame rate for Energy Saver", 16 | "Configures the frame rate the browser is throttled to when Energy Saver is enabled. Helium flag.", 17 | kOsDesktop, MULTI_VALUE_TYPE(helium::kEnergySaverFrameRateChoices)}, 18 | + {helium::kDisableEchCommandLine, 19 | + "Disable ECH (Encrypted Client Hello)", 20 | + "Disables TLS Encrypted Client Hello. Not recommended unless you live in an area with heavy Internet" 21 | + " censorship and ECH prevents websites from loading. Helium flag.", 22 | + kOsAll, SINGLE_VALUE_TYPE(helium::kDisableEchCommandLine)}, 23 | #endif /* CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_ */ 24 | --- a/chrome/browser/ssl/ssl_config_service_manager.cc 25 | +++ b/chrome/browser/ssl/ssl_config_service_manager.cc 26 | @@ -10,6 +10,7 @@ 27 | #include 28 | #include 29 | 30 | +#include "base/command_line.h" 31 | #include "base/containers/to_vector.h" 32 | #include "base/feature_list.h" 33 | #include "base/functional/bind.h" 34 | @@ -265,6 +266,10 @@ network::mojom::SSLConfigPtr SSLConfigSe 35 | 36 | config->ech_enabled = ech_enabled_.GetValue(); 37 | 38 | + if (base::CommandLine::ForCurrentProcess()->HasSwitch("disable-ech")) { 39 | + config->ech_enabled = false; 40 | + } 41 | + 42 | if (post_quantum_enabled_.IsManaged()) { 43 | config->post_quantum_key_agreement_enabled = 44 | post_quantum_enabled_.GetValue(); 45 | -------------------------------------------------------------------------------- /devutils/run_devutils_pylint.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved. 4 | # Use of this source code is governed by a BSD-style license that can be 5 | # found in the LICENSE.ungoogled_chromium file. 6 | """Run Pylint over devutils""" 7 | 8 | import argparse 9 | import sys 10 | from pathlib import Path 11 | 12 | from run_other_pylint import ChangeDir, run_pylint 13 | 14 | 15 | def main(): 16 | """CLI entrypoint""" 17 | parser = argparse.ArgumentParser(description='Run Pylint over devutils') 18 | parser.add_argument('--hide-fixme', action='store_true', help='Hide "fixme" Pylint warnings.') 19 | parser.add_argument('--show-locally-disabled', 20 | action='store_true', 21 | help='Show "locally-disabled" Pylint warnings.') 22 | args = parser.parse_args() 23 | 24 | disables = [ 25 | 'wrong-import-position', 26 | 'duplicate-code', 27 | ] 28 | 29 | if args.hide_fixme: 30 | disables.append('fixme') 31 | if not args.show_locally_disabled: 32 | disables.append('locally-disabled') 33 | 34 | pylint_options = [ 35 | f"--disable={','.join(disables)}", 36 | '--jobs=4', 37 | '--score=n', 38 | '--persistent=n', 39 | ] 40 | 41 | ignore_prefixes = [ 42 | ('third_party', ), 43 | ] 44 | 45 | sys.path.insert(1, str(Path(__file__).resolve().parent.parent / 'utils')) 46 | sys.path.insert(2, str(Path(__file__).resolve().parent.parent / 'devutils' / 'third_party')) 47 | with ChangeDir(Path(__file__).parent): 48 | result = run_pylint( 49 | Path(), 50 | pylint_options, 51 | ignore_prefixes=ignore_prefixes, 52 | ) 53 | sys.path.pop(2) 54 | sys.path.pop(1) 55 | if not result: 56 | sys.exit(1) 57 | sys.exit(0) 58 | 59 | 60 | if __name__ == '__main__': 61 | main() 62 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/add-flag-for-bookmark-bar-ntp.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/bookmarks/bookmark_bar_controller.cc 2 | +++ b/chrome/browser/ui/bookmarks/bookmark_bar_controller.cc 3 | @@ -4,6 +4,7 @@ 4 | 5 | #include "chrome/browser/ui/bookmarks/bookmark_bar_controller.h" 6 | 7 | +#include "base/command_line.h" 8 | #include "chrome/browser/bookmarks/bookmark_model_factory.h" 9 | #include "chrome/browser/browser_features.h" 10 | #include "chrome/browser/defaults.h" 11 | @@ -139,6 +140,10 @@ void BookmarkBarController::OnSplitTabCh 12 | } 13 | 14 | bool BookmarkBarController::ShouldShowBookmarkBar() const { 15 | + if (base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII("bookmark-bar-ntp") == "never") { 16 | + return false; 17 | + } 18 | + 19 | Profile* profile = browser_->GetProfile(); 20 | if (profile->IsGuestSession()) { 21 | return false; 22 | --- a/chrome/browser/ungoogled_flag_choices.h 23 | +++ b/chrome/browser/ungoogled_flag_choices.h 24 | @@ -34,4 +34,10 @@ const FeatureEntry::Choice kScrollEventC 25 | "scroll-tabs", 26 | "never"} 27 | }; 28 | +const FeatureEntry::Choice kBookmarkBarNewTab[] = { 29 | + {flags_ui::kGenericExperimentChoiceDefault, "", ""}, 30 | + {"Never", 31 | + "bookmark-bar-ntp", 32 | + "never"}, 33 | +}; 34 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ 35 | --- a/chrome/browser/ungoogled_flag_entries.h 36 | +++ b/chrome/browser/ungoogled_flag_entries.h 37 | @@ -36,4 +36,8 @@ 38 | "Scroll switches tab", 39 | "Switch to the left/right tab if the wheel-scroll happens over the tabstrip, or the empty space beside the tabstrip. ungoogled-chromium flag.", 40 | kOsDesktop, MULTI_VALUE_TYPE(kScrollEventChangesTab)}, 41 | + {"bookmark-bar-ntp", 42 | + "Bookmark Bar on New-Tab-Page", 43 | + "Disable the Bookmark Bar on the New-Tab-Page. ungoogled-chromium flag.", 44 | + kOsDesktop, MULTI_VALUE_TYPE(kBookmarkBarNewTab)}, 45 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 46 | -------------------------------------------------------------------------------- /devutils/validate_config.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: UTF-8 -*- 3 | 4 | # Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved. 5 | # Use of this source code is governed by a BSD-style license that can be 6 | # found in the LICENSE.ungoogled_chromium file. 7 | """Run sanity checking algorithms over ungoogled-chromium's config files 8 | 9 | NOTE: This script is hardcoded to run over ungoogled-chromium's config files only. 10 | To check other files, use the other scripts imported by this script. 11 | 12 | It checks the following: 13 | 14 | * All patches exist 15 | * All patches are referenced by the patch order 16 | * Each patch is used only once 17 | * GN flags in flags.gn are sorted and not duplicated 18 | * downloads.ini has the correct format (i.e. conforms to its schema) 19 | 20 | Exit codes: 21 | * 0 if no problems detected 22 | * 1 if warnings or errors occur 23 | """ 24 | 25 | import sys 26 | from pathlib import Path 27 | 28 | from check_downloads_ini import check_downloads_ini 29 | from check_gn_flags import check_gn_flags 30 | from check_patch_files import (check_patch_readability, check_series_duplicates, 31 | check_unused_patches) 32 | 33 | 34 | def main(): 35 | """CLI entrypoint""" 36 | 37 | warnings = False 38 | root_dir = Path(__file__).resolve().parent.parent 39 | patches_dir = root_dir / 'patches' 40 | 41 | # Check patches 42 | warnings |= check_patch_readability(patches_dir) 43 | warnings |= check_series_duplicates(patches_dir) 44 | warnings |= check_unused_patches(patches_dir) 45 | 46 | # Check GN flags 47 | warnings |= check_gn_flags(root_dir / 'flags.gn') 48 | 49 | # Check downloads.ini 50 | warnings |= check_downloads_ini([root_dir / 'downloads.ini']) 51 | 52 | if warnings: 53 | sys.exit(1) 54 | sys.exit(0) 55 | 56 | 57 | if __name__ == '__main__': 58 | if sys.argv[1:]: 59 | print(__doc__) 60 | else: 61 | main() 62 | -------------------------------------------------------------------------------- /devutils/check_downloads_ini.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: UTF-8 -*- 3 | 4 | # Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved. 5 | # Use of this source code is governed by a BSD-style license that can be 6 | # found in the LICENSE.ungoogled_chromium file. 7 | """Run sanity checking algorithms over downloads.ini files 8 | 9 | It checks the following: 10 | 11 | * downloads.ini has the correct format (i.e. conforms to its schema) 12 | 13 | Exit codes: 14 | * 0 if no problems detected 15 | * 1 if warnings or errors occur 16 | """ 17 | 18 | import argparse 19 | import sys 20 | from pathlib import Path 21 | 22 | sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils')) 23 | from downloads import DownloadInfo, schema 24 | 25 | sys.path.pop(0) 26 | 27 | 28 | def check_downloads_ini(downloads_ini_iter): 29 | """ 30 | Combines and checks if the the downloads.ini files provided are valid. 31 | 32 | downloads_ini_iter must be an iterable of strings to downloads.ini files. 33 | 34 | Returns True if errors occured, False otherwise. 35 | """ 36 | try: 37 | DownloadInfo(downloads_ini_iter) 38 | except schema.SchemaError: 39 | return True 40 | return False 41 | 42 | 43 | def main(): 44 | """CLI entrypoint""" 45 | 46 | root_dir = Path(__file__).resolve().parent.parent 47 | default_downloads_ini = [str(root_dir / 'downloads.ini')] 48 | 49 | parser = argparse.ArgumentParser(description=__doc__) 50 | parser.add_argument('-d', 51 | '--downloads-ini', 52 | type=Path, 53 | nargs='*', 54 | default=default_downloads_ini, 55 | help='List of downloads.ini files to check. Default: %(default)s') 56 | args = parser.parse_args() 57 | 58 | if check_downloads_ini(args.downloads_ini): 59 | sys.exit(1) 60 | sys.exit(0) 61 | 62 | 63 | if __name__ == '__main__': 64 | main() 65 | -------------------------------------------------------------------------------- /patches/helium/core/enable-tab-search-toolbar-button.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc 2 | +++ b/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc 3 | @@ -240,8 +240,7 @@ void PinnedToolbarActionsModel::MaybeMig 4 | UpdatePinnedState(kActionShowChromeLabs, true); 5 | pref_service_->SetBoolean(prefs::kPinnedChromeLabsMigrationComplete, true); 6 | } 7 | - if (features::HasTabSearchToolbarButton() && 8 | - !pref_service_->GetBoolean(prefs::kTabSearchMigrationComplete)) { 9 | + if ((false)) { 10 | UpdatePinnedState(kActionTabSearch, true); 11 | pref_service_->SetBoolean(prefs::kTabSearchMigrationComplete, true); 12 | } 13 | --- a/chrome/browser/ui/toolbar/toolbar_pref_names.cc 14 | +++ b/chrome/browser/ui/toolbar/toolbar_pref_names.cc 15 | @@ -23,7 +23,7 @@ void RegisterProfilePrefs(user_prefs::Pr 16 | default_pinned_actions.Append(chrome_labs_action.value()); 17 | } 18 | 19 | - if (features::HasTabSearchToolbarButton()) { 20 | + if ((false)) { 21 | const std::optional& tab_search_action = 22 | actions::ActionIdMap::ActionIdToString(kActionTabSearch); 23 | if (tab_search_action.has_value()) { 24 | --- a/chrome/browser/ui/ui_features.cc 25 | +++ b/chrome/browser/ui/ui_features.cc 26 | @@ -620,7 +620,7 @@ BASE_FEATURE(kByDateHistoryInSidePanel, 27 | 28 | BASE_FEATURE(kTabStripBrowserApi, base::FEATURE_DISABLED_BY_DEFAULT); 29 | 30 | -BASE_FEATURE(kTabstripComboButton, base::FEATURE_DISABLED_BY_DEFAULT); 31 | +BASE_FEATURE(kTabstripComboButton, base::FEATURE_ENABLED_BY_DEFAULT); 32 | 33 | // This serves as a "kill-switch" for migrating the Tab Search feature to be a 34 | // toolbar button for non-ChromeOS users in the US. 35 | @@ -655,6 +655,8 @@ bool HasTabSearchToolbarButton() { 36 | return false; 37 | } 38 | 39 | + return true; 40 | + 41 | static const bool is_tab_search_moving = [] { 42 | if (GetCountryCode() == "us" && 43 | base::FeatureList::IsEnabled( 44 | -------------------------------------------------------------------------------- /patches/helium/ui/improve-flags-webui.patch: -------------------------------------------------------------------------------- 1 | --- a/components/webui/flags/resources/app.css 2 | +++ b/components/webui/flags/resources/app.css 3 | @@ -106,8 +106,8 @@ button { 4 | } 5 | 6 | :focus-visible { 7 | - box-shadow: 0 0 0 2px var(--focus-shadow-color); 8 | - outline: none; 9 | + outline: var(--focus-shadow-color) 2px solid; 10 | + outline-offset: 2px; 11 | } 12 | 13 | @media (forced-colors: active) { 14 | @@ -160,7 +160,7 @@ button { 15 | #header .flex-container { 16 | box-sizing: border-box; 17 | margin: 0 auto; 18 | - max-width: 700px; 19 | + max-width: calc(700px + 2rem); 20 | } 21 | 22 | #header .flex-container .flex:first-child { 23 | @@ -186,14 +186,18 @@ button { 24 | background: var(--input-background) 25 | url(chrome://resources/images/icon_search.svg) no-repeat 8px 50%; 26 | border: 1px solid transparent; 27 | - border-radius: 3px; 28 | + border-radius: 8px; 29 | box-sizing: border-box; 30 | color: inherit; 31 | - font-size: .8125rem; 32 | - padding: 12px 36px; 33 | + font-size: 14px; 34 | + padding: 9px 38px; 35 | width: 100%; 36 | } 37 | 38 | +#header .flex-container .flex:last-child { 39 | + flex: unset; 40 | +} 41 | + 42 | #search::placeholder { 43 | color: rgba(var(--google-grey-900-rgb), .71); 44 | } 45 | --- a/components/webui/flags/resources/experiment.css 46 | +++ b/components/webui/flags/resources/experiment.css 47 | @@ -12,8 +12,8 @@ 48 | } 49 | 50 | :focus-visible { 51 | - box-shadow: 0 0 0 2px var(--focus-shadow-color); 52 | - outline: none; 53 | + outline: var(--focus-shadow-color) 2px solid; 54 | + outline-offset: 2px; 55 | } 56 | 57 | .experiment { 58 | @@ -89,11 +89,12 @@ select { 59 | border: 1px solid var(--link-color); 60 | color: var(--link-color); 61 | font-size: .8125rem; 62 | - height: 1.625rem; 63 | + height: 1.8rem; 64 | letter-spacing: .01em; 65 | max-width: 150px; 66 | text-align-last: center; 67 | width: 100%; 68 | + border-radius: 6px; 69 | } 70 | 71 | @media (prefers-color-scheme: dark) { 72 | -------------------------------------------------------------------------------- /patches/helium/ui/top-container.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/views/frame/layout/browser_view_layout_delegate_impl.cc 2 | +++ b/chrome/browser/ui/views/frame/layout/browser_view_layout_delegate_impl.cc 3 | @@ -91,6 +91,7 @@ bool BrowserViewLayoutDelegateImplBase:: 4 | } 5 | 6 | bool BrowserViewLayoutDelegateImplBase::IsContentsSeparatorEnabled() const { 7 | + return false; 8 | // Web app windows manage their own separator. 9 | // TODO(crbug.com/40102629): Make PWAs set the visibility of the ToolbarView 10 | // based on whether it is visible instead of setting the height to 0px. This 11 | --- a/chrome/browser/ui/views/frame/top_container_background.cc 12 | +++ b/chrome/browser/ui/views/frame/top_container_background.cc 13 | @@ -8,6 +8,7 @@ 14 | 15 | #include "chrome/browser/themes/theme_properties.h" 16 | #include "chrome/browser/ui/color/chrome_color_id.h" 17 | +#include "chrome/browser/ui/views/frame/browser_frame_view.h" 18 | #include "chrome/browser/ui/views/frame/browser_view.h" 19 | #include "chrome/browser/ui/views/tabs/tab_strip.h" 20 | #include "chrome/grit/theme_resources.h" 21 | @@ -79,7 +80,8 @@ void TopContainerBackground::PaintBackgr 22 | const BrowserView* browser_view) { 23 | bool painted = PaintThemeCustomImage(canvas, view, browser_view); 24 | if (!painted) { 25 | - canvas->DrawColor(view->GetColorProvider()->GetColor(kColorToolbar)); 26 | + canvas->DrawColor(browser_view->browser_widget()->GetFrameView()->GetFrameColor( 27 | + BrowserFrameActiveState::kUseCurrent)); 28 | } 29 | } 30 | 31 | @@ -88,7 +90,8 @@ std::optional TopContainerBackg 32 | const BrowserView* browser_view) { 33 | const bool will_be_painted = WillPaintCustomImage(view); 34 | if (!will_be_painted) { 35 | - return view->GetColorProvider()->GetColor(kColorToolbar); 36 | + return browser_view->browser_widget()->GetFrameView()->GetFrameColor( 37 | + BrowserFrameActiveState::kUseCurrent); 38 | } 39 | 40 | return std::nullopt; 41 | -------------------------------------------------------------------------------- /patches/iridium-browser/browser-disable-profile-auto-import-on-first-run.patch: -------------------------------------------------------------------------------- 1 | From 7134d5fd762237ad2d80093b68ccbd1582476640 Mon Sep 17 00:00:00 2001 2 | From: Joachim Bauch 3 | Date: Thu, 25 Jun 2015 15:51:59 +0200 4 | Subject: [PATCH 56/66] browser: disable profile auto-import on first run 5 | 6 | --- a/chrome/browser/chrome_browser_main.cc 7 | +++ b/chrome/browser/chrome_browser_main.cc 8 | @@ -1793,30 +1793,6 @@ int ChromeBrowserMainParts::PreMainMessa 9 | // and preferences have been registered since some of the import code depends 10 | // on preferences. 11 | if (first_run::IsChromeFirstRun()) { 12 | - // `profile` may be nullptr even on first run, for example when the 13 | - // "BrowserSignin" policy is set to "Force". If so, skip the auto import. 14 | - if (profile) { 15 | - first_run::AutoImport(profile, master_prefs_->import_bookmarks_path); 16 | - 17 | - if (base::FeatureList::IsEnabled(features::kBookmarksImportOnFirstRun) && 18 | - !master_prefs_->import_bookmarks_dict.empty()) { 19 | - first_run::StartBookmarkImportFromDict( 20 | - profile, std::move(master_prefs_->import_bookmarks_dict)); 21 | - } 22 | - 23 | -#if BUILDFLAG(ENABLE_EXTENSIONS) 24 | - if (base::FeatureList::IsEnabled(features::kInitialExternalExtensions)) { 25 | - profile->GetPrefs()->SetString( 26 | - extensions::pref_names::kInitialInstallProviderName, 27 | - std::move(master_prefs_->initial_extensions_provider_name)); 28 | - // Store the initial extension IDs into the profile's prefs so that 29 | - // InitialExternalExtensionLoader can later pick them up. 30 | - profile->GetPrefs()->SetList( 31 | - extensions::pref_names::kInitialInstallList, 32 | - std::move(master_prefs_->initial_extensions)); 33 | - } 34 | -#endif // BUILDFLAG(ENABLE_EXTENSIONS) 35 | - } 36 | 37 | // Note: This can pop-up the first run consent dialog on Linux & Mac. 38 | first_run::DoPostImportTasks(master_prefs_->make_chrome_default_for_user); 39 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/disable-crash-reporter.patch: -------------------------------------------------------------------------------- 1 | # Disable some background communication with clients2.google.com 2 | 3 | --- a/components/crash/core/app/crash_reporter_client.cc 4 | +++ b/components/crash/core/app/crash_reporter_client.cc 5 | @@ -146,7 +146,7 @@ void CrashReporterClient::GetSanitizatio 6 | #endif 7 | 8 | std::string CrashReporterClient::GetUploadUrl() { 9 | -#if BUILDFLAG(GOOGLE_CHROME_BRANDING) && defined(OFFICIAL_BUILD) 10 | +#if 0 11 | return kDefaultUploadURL; 12 | #else 13 | return std::string(); 14 | --- a/components/crash/core/app/crashpad.cc 15 | +++ b/components/crash/core/app/crashpad.cc 16 | @@ -78,6 +78,13 @@ bool InitializeCrashpadImpl(bool initial 17 | const std::vector& initial_arguments, 18 | bool embedded_handler, 19 | const std::vector& attachments) { 20 | +// Crashpad is needed on Linux because it's used as a WASM signal handler. 21 | +// This is not the case on other platforms, and so it can remain entirely 22 | +// disabled there. 23 | +#if !BUILDFLAG(IS_LINUX) 24 | + return false; 25 | +#endif 26 | + 27 | static bool initialized = false; 28 | DCHECK(!initialized); 29 | initialized = true; 30 | --- a/third_party/crashpad/crashpad/handler/handler_main.cc 31 | +++ b/third_party/crashpad/crashpad/handler/handler_main.cc 32 | @@ -875,7 +875,7 @@ int HandlerMain(int argc, 33 | #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || 34 | // BUILDFLAG(IS_ANDROID) 35 | case kOptionURL: { 36 | - options.url = optarg; 37 | + options.url = ""; 38 | break; 39 | } 40 | #if BUILDFLAG(IS_CHROMEOS) 41 | @@ -1016,7 +1016,7 @@ int HandlerMain(int argc, 42 | } 43 | 44 | ScopedStoppable upload_thread; 45 | - if (!options.url.empty()) { 46 | + if ((false)) { 47 | // TODO(scottmg): options.rate_limit should be removed when we have a 48 | // configurable database setting to control upload limiting. 49 | // See https://crashpad.chromium.org/bug/23. 50 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/add-flag-to-hide-fullscreen-exit-ui.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/views/frame/browser_view.cc 2 | +++ b/chrome/browser/ui/views/frame/browser_view.cc 3 | @@ -715,6 +715,9 @@ class BrowserView::ExclusiveAccessContex 4 | void UpdateExclusiveAccessBubble( 5 | const ExclusiveAccessBubbleParams& params, 6 | ExclusiveAccessBubbleHideCallback first_hide_callback) override { 7 | + if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-fullscreen-exit-ui")) { 8 | + return; 9 | + } 10 | // Trusted pinned mode does not allow to escape. So do not show the bubble. 11 | bool is_trusted_pinned = 12 | platform_util::IsBrowserLockedFullscreen(browser_view_->browser_.get()); 13 | --- a/chrome/browser/ui/views/fullscreen_control/fullscreen_control_host.cc 14 | +++ b/chrome/browser/ui/views/fullscreen_control/fullscreen_control_host.cc 15 | @@ -75,6 +75,10 @@ bool IsExitUiEnabled() { 16 | // menu and controls reveal when the cursor is moved to the top. 17 | return false; 18 | #else 19 | + if (base::CommandLine::ForCurrentProcess()->HasSwitch( 20 | + "hide-fullscreen-exit-ui")) 21 | + return false; 22 | + 23 | // Kiosk mode is a fullscreen experience, which makes the exit UI 24 | // inappropriate. 25 | return !IsRunningInAppMode(); 26 | --- a/chrome/browser/ungoogled_flag_entries.h 27 | +++ b/chrome/browser/ungoogled_flag_entries.h 28 | @@ -108,4 +108,8 @@ 29 | "Hide Extensions Menu", 30 | "Hides the extensions container. This includes the puzzle piece icon as well as any pinned extensions. ungoogled-chromium flag.", 31 | kOsDesktop, SINGLE_VALUE_TYPE("hide-extensions-menu")}, 32 | + {"hide-fullscreen-exit-ui", 33 | + "Hide Fullscreen Exit UI", 34 | + "Hides the \"X\" that appears when the mouse cursor is moved towards the top of the window in fullscreen mode. Additionally, this hides the \"Press F11 to exit full screen\" popup. ungoogled-chromium flag.", 35 | + kOsDesktop, SINGLE_VALUE_TYPE("hide-fullscreen-exit-ui")}, 36 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 37 | -------------------------------------------------------------------------------- /patches/helium/ui/profile-picker-cleanup.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/resources/signin/profile_picker/profile_picker_app.html.ts 2 | +++ b/chrome/browser/resources/signin/profile_picker/profile_picker_app.html.ts 3 | @@ -8,8 +8,6 @@ import type {ProfilePickerAppElement} fr 4 | 5 | export function getHtml(this: ProfilePickerAppElement) { 6 | return html` 7 | - 8 | - 9 | 10 | 11 | 12 | --- a/chrome/browser/resources/signin/profile_picker/profile_picker_main_view.css 13 | +++ b/chrome/browser/resources/signin/profile_picker/profile_picker_main_view.css 14 | @@ -137,11 +137,6 @@ cr-icon[icon='profiles:add'] { 15 | --iron-icon-stroke-color: var(--google-grey-700); 16 | } 17 | 18 | -#browseAsGuestButton { 19 | - margin-inline-start: var(--footer-spacing); 20 | - padding: 8px 16px; 21 | -} 22 | - 23 | #browseAsGuestButton > cr-icon { 24 | margin-inline-end: 0; 25 | --iron-icon-height: 20px; 26 | @@ -152,10 +147,10 @@ cr-checkbox { 27 | --cr-checkbox-label-color: var(--cr-secondary-text-color); 28 | --cr-checkbox-label-padding-start: 8px; 29 | justify-content: flex-end; 30 | - margin-inline-end: var(--footer-spacing); 31 | - margin-inline-start: auto; 32 | - padding-inline-end: 5px; 33 | - padding-inline-start: 5px; 34 | +} 35 | + 36 | +.footer { 37 | + justify-content: space-evenly; 38 | } 39 | 40 | #button-sign-in { 41 | --- a/chrome/browser/resources/signin/profile_picker/profile_picker_main_view.html.ts 42 | +++ b/chrome/browser/resources/signin/profile_picker/profile_picker_main_view.html.ts 43 | @@ -19,7 +19,7 @@ ${function() { 44 | }()} 45 |
46 |
47 | - 50 |

51 |
52 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/enable-paste-and-go-new-tab-button.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/views/frame/tab_strip_region_view.cc 2 | +++ b/chrome/browser/ui/views/frame/tab_strip_region_view.cc 3 | @@ -301,6 +301,9 @@ TabStripRegionView::TabStripRegionView(s 4 | l10n_util::GetStringUTF16(IDS_TOOLTIP_NEW_TAB)); 5 | new_tab_button_->GetViewAccessibility().SetName( 6 | l10n_util::GetStringUTF16(IDS_ACCNAME_NEWTAB)); 7 | + new_tab_button_->SetTriggerableEventFlags( 8 | + new_tab_button_->GetTriggerableEventFlags() | 9 | + ui::EF_MIDDLE_MOUSE_BUTTON); 10 | } 11 | 12 | reserved_grab_handle_space_ = 13 | --- a/chrome/browser/ui/views/tabs/tab_strip.cc 14 | +++ b/chrome/browser/ui/views/tabs/tab_strip.cc 15 | @@ -83,6 +83,8 @@ 16 | #include "components/tab_groups/tab_group_id.h" 17 | #include "components/tab_groups/tab_group_visual_data.h" 18 | #include "components/tabs/public/split_tab_id.h" 19 | +#include "ui/base/clipboard/clipboard.h" 20 | +#include "ui/base/clipboard/clipboard_constants.h" 21 | #include "ui/base/dragdrop/drag_drop_types.h" 22 | #include "ui/base/dragdrop/mojom/drag_drop_types.mojom.h" 23 | #include "ui/base/interaction/element_identifier.h" 24 | @@ -2255,6 +2257,20 @@ void TabStrip::NewTabButtonPressed(const 25 | if (hover_card_controller_) { 26 | hover_card_controller_->PreventImmediateReshow(); 27 | } 28 | + const ui::MouseEvent& mouse = static_cast(event); 29 | + if (mouse.IsOnlyMiddleMouseButton()) { 30 | + ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread(); 31 | + CHECK(clipboard) 32 | + << "Clipboard instance is not available, cannot proceed with " 33 | + "middle mouse button action."; 34 | + std::u16string clipboard_text; 35 | + clipboard->ReadText(ui::ClipboardBuffer::kSelection, 36 | + /* data_dst = */ nullptr, &clipboard_text); 37 | + if (!clipboard_text.empty()) { 38 | + controller_->CreateNewTabWithLocation(clipboard_text); 39 | + } 40 | + return; 41 | + } 42 | } 43 | controller_->CreateNewTab(NewTabTypes::NEW_TAB_BUTTON); 44 | } 45 | -------------------------------------------------------------------------------- /patches/helium/settings/reorder-settings-menu.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/resources/settings/route.ts 2 | +++ b/chrome/browser/resources/settings/route.ts 3 | @@ -357,7 +357,7 @@ export let routes: SettingsRoutes = Rout 4 | // Returns the "effective" route when at chrome://settings/. 5 | export function getTopLevelRoute(): Route { 6 | if (!loadTimeData.getBoolean('isGuest')) { 7 | - return routes.PEOPLE; 8 | + return routes.APPEARANCE; 9 | } 10 | 11 | let guestTopLevelRoute = routes.SEARCH; 12 | --- a/chrome/browser/resources/settings/settings_menu/settings_menu.html 13 | +++ b/chrome/browser/resources/settings/settings_menu/settings_menu.html 14 | @@ -57,6 +57,13 @@ 15 | $i18n{peoplePageTitle} 16 | 17 | 18 | + 25 | 32 | - 40 | - 47 | 48 | 49 | $i18n{searchPageTitle} 50 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/add-flag-for-qr-generator.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc 2 | +++ b/chrome/browser/ui/qrcode_generator/qrcode_generator_bubble_controller.cc 3 | @@ -13,6 +13,7 @@ 4 | #include "chrome/common/pref_names.h" 5 | #include "components/prefs/pref_change_registrar.h" 6 | #include "components/prefs/pref_service.h" 7 | +#include "components/sharing_message/features.h" 8 | #include "content/public/browser/web_contents.h" 9 | #include "url/gurl.h" 10 | 11 | @@ -38,7 +39,7 @@ QRCodeGeneratorBubbleController::~QRCode 12 | 13 | // static 14 | bool QRCodeGeneratorBubbleController::IsGeneratorAvailable(const GURL& url) { 15 | - if (!url.SchemeIsHTTPOrHTTPS()) { 16 | + if (!url.SchemeIsHTTPOrHTTPS() || base::FeatureList::IsEnabled(kDisableQRGenerator)) { 17 | return false; 18 | } 19 | 20 | --- a/chrome/browser/ungoogled_flag_entries.h 21 | +++ b/chrome/browser/ungoogled_flag_entries.h 22 | @@ -64,4 +64,8 @@ 23 | "Remove Tabsearch Button", 24 | "Removes the tabsearch button from the tabstrip. ungoogled-chromium flag", 25 | kOsDesktop, SINGLE_VALUE_TYPE("remove-tabsearch-button")}, 26 | + {"disable-qr-generator", 27 | + "Disable QR Generator", 28 | + "Disables the QR generator for sharing page links. ungoogled-chromium flag", 29 | + kOsDesktop, FEATURE_VALUE_TYPE(kDisableQRGenerator)}, 30 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 31 | --- a/components/sharing_message/features.cc 32 | +++ b/components/sharing_message/features.cc 33 | @@ -7,6 +7,8 @@ 34 | #include "build/build_config.h" 35 | #include "components/sync_preferences/features.h" 36 | 37 | +BASE_FEATURE(kDisableQRGenerator, "DisableQRGenerator", base::FEATURE_DISABLED_BY_DEFAULT); 38 | + 39 | BASE_FEATURE(kClickToCall, base::FEATURE_DISABLED_BY_DEFAULT); 40 | 41 | BASE_FEATURE(kMobilePromoOnDesktop, base::FEATURE_DISABLED_BY_DEFAULT); 42 | --- a/components/sharing_message/features.h 43 | +++ b/components/sharing_message/features.h 44 | @@ -34,4 +34,5 @@ MobilePromoOnDesktopPromoType MobileProm 45 | // notification arm, false otherwise. 46 | bool IsMobilePromoOnDesktopNotificationsEnabled(); 47 | 48 | +BASE_DECLARE_FEATURE(kDisableQRGenerator); 49 | #endif // COMPONENTS_SHARING_MESSAGE_FEATURES_H_ 50 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/add-flag-for-incognito-themes.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/views/frame/browser_widget.cc 2 | +++ b/chrome/browser/ui/views/frame/browser_widget.cc 3 | @@ -605,5 +605,7 @@ bool BrowserWidget::RegenerateFrameOnThe 4 | } 5 | 6 | bool BrowserWidget::IsIncognitoBrowser() const { 7 | + if (base::CommandLine::ForCurrentProcess()->HasSwitch("enable-incognito-themes")) 8 | + return false; 9 | return browser_view_->browser()->profile()->IsIncognitoProfile(); 10 | } 11 | --- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc 12 | +++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc 13 | @@ -50,6 +50,7 @@ 14 | #include "ui/base/webui/jstemplate_builder.h" 15 | #include "ui/base/webui/web_ui_util.h" 16 | #include "ui/color/color_provider.h" 17 | +#include "ui/color/color_provider_manager.h" 18 | #include "ui/gfx/color_utils.h" 19 | #include "ui/native_theme/native_theme.h" 20 | 21 | @@ -392,7 +393,9 @@ void NTPResourceCache::CreateNewTabIncog 22 | profile_->GetPrefs()->GetString(prefs::kCurrentThemeID); 23 | 24 | // Colors. 25 | - const ui::ColorProvider& cp = web_contents->GetColorProvider(); 26 | + auto key = native_theme->GetColorProviderKey(nullptr); 27 | + key.color_mode = ui::ColorProviderKey::ColorMode::kDark; 28 | + const ui::ColorProvider& cp = *ui::ColorProviderManager::Get().GetColorProviderFor(key); 29 | substitutions["colorBackground"] = color_utils::SkColorToRgbaString( 30 | GetThemeColor(native_theme, cp, kColorNewTabPageBackground)); 31 | substitutions["backgroundPosition"] = GetNewTabBackgroundPositionCSS(tp); 32 | --- a/chrome/browser/ungoogled_flag_entries.h 33 | +++ b/chrome/browser/ungoogled_flag_entries.h 34 | @@ -112,4 +112,8 @@ 35 | "Hide Fullscreen Exit UI", 36 | "Hides the \"X\" that appears when the mouse cursor is moved towards the top of the window in fullscreen mode. Additionally, this hides the \"Press F11 to exit full screen\" popup. ungoogled-chromium flag.", 37 | kOsDesktop, SINGLE_VALUE_TYPE("hide-fullscreen-exit-ui")}, 38 | + {"enable-incognito-themes", 39 | + "Enable themes in Incognito mode", 40 | + "Allows themes to override Google's built-in Incognito theming. ungoogled-chromium flag.", 41 | + kOsDesktop, SINGLE_VALUE_TYPE("enable-incognito-themes")}, 42 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 43 | -------------------------------------------------------------------------------- /patches/helium/ui/fix-customize-side-panel.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/resources/side_panel/customize_chrome/app.ts 2 | +++ b/chrome/browser/resources/side_panel/customize_chrome/app.ts 3 | @@ -155,23 +155,6 @@ export class AppElement extends AppEleme 4 | element.scrollIntoView({behavior: 'auto'}); 5 | }); 6 | 7 | - this.attachedTabStateUpdatedId_ = 8 | - CustomizeChromeApiProxy.getInstance() 9 | - .callbackRouter.attachedTabStateUpdated.addListener( 10 | - (newTabPageType: NewTabPageType) => { 11 | - if (this.newTabPageType_ === newTabPageType) { 12 | - return; 13 | - } 14 | - 15 | - this.newTabPageType_ = newTabPageType; 16 | - 17 | - // Since some pages aren't supported in non first party mode, 18 | - // change the section back to the overview. 19 | - if (!this.isSourceTabFirstPartyNtp_() && 20 | - !this.pageSupportedOnNonFirstPartyNtps()) { 21 | - this.page_ = CustomizeChromePage.OVERVIEW; 22 | - } 23 | - }); 24 | this.pageHandler_.updateAttachedTabState(); 25 | 26 | this.setThemeEditableId_ = CustomizeChromeApiProxy.getInstance() 27 | @@ -346,10 +329,6 @@ export class AppElement extends AppEleme 28 | await this.updateComplete; 29 | page.focusOnBackButton(); 30 | } 31 | - 32 | - private pageSupportedOnNonFirstPartyNtps() { 33 | - return this.page_ === CustomizeChromePage.TOOLBAR; 34 | - } 35 | } 36 | 37 | declare global { 38 | --- a/chrome/browser/resources/side_panel/customize_chrome/appearance.ts 39 | +++ b/chrome/browser/resources/side_panel/customize_chrome/appearance.ts 40 | @@ -141,12 +141,6 @@ export class AppearanceElement extends A 41 | }); 42 | this.pageHandler_.updateTheme(); 43 | 44 | - this.attachedTabStateUpdatedId_ = 45 | - CustomizeChromeApiProxy.getInstance() 46 | - .callbackRouter.attachedTabStateUpdated.addListener( 47 | - (newTabPageType: NewTabPageType) => { 48 | - this.newTabPageType_ = newTabPageType; 49 | - }); 50 | this.pageHandler_.updateAttachedTabState(); 51 | 52 | this.setThemeEditableId_ = CustomizeChromeApiProxy.getInstance() 53 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/add-flag-to-show-avatar-button.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/views/toolbar/toolbar_view.cc 2 | +++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc 3 | @@ -475,6 +475,17 @@ void ToolbarView::Init() { 4 | browser_->profile()->IsGuestSession() || 5 | browser_->profile()->IsRegularProfile(); 6 | #endif 7 | + 8 | + const std::string sab_value = base::CommandLine::ForCurrentProcess()-> 9 | + GetSwitchValueASCII("show-avatar-button"); 10 | + if (sab_value == "always") 11 | + show_avatar_toolbar_button = true; 12 | + else if (sab_value == "incognito-and-guest") 13 | + show_avatar_toolbar_button = browser_->profile()->IsIncognitoProfile() || 14 | + browser_->profile()->IsGuestSession(); 15 | + else if (sab_value == "never") 16 | + show_avatar_toolbar_button = false; 17 | + 18 | avatar_->SetVisible(show_avatar_toolbar_button); 19 | 20 | #if BUILDFLAG(ENABLE_WEBUI_TAB_STRIP) 21 | --- a/chrome/browser/ungoogled_flag_choices.h 22 | +++ b/chrome/browser/ungoogled_flag_choices.h 23 | @@ -13,4 +13,16 @@ const FeatureEntry::Choice kExtensionHan 24 | "extension-mime-request-handling", 25 | "always-prompt-for-install"}, 26 | }; 27 | +const FeatureEntry::Choice kShowAvatarButtonChoices[] = { 28 | + {flags_ui::kGenericExperimentChoiceDefault, "", ""}, 29 | + {"Always", 30 | + "show-avatar-button", 31 | + "always"}, 32 | + {"Incognito and Guest", 33 | + "show-avatar-button", 34 | + "incognito-and-guest"}, 35 | + {"Never", 36 | + "show-avatar-button", 37 | + "never"} 38 | +}; 39 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ 40 | --- a/chrome/browser/ungoogled_flag_entries.h 41 | +++ b/chrome/browser/ungoogled_flag_entries.h 42 | @@ -24,4 +24,8 @@ 43 | "Force punycode hostnames", 44 | "Force punycode in hostnames instead of Unicode when displaying Internationalized Domain Names (IDNs). ungoogled-chromium flag.", 45 | kOsAll, SINGLE_VALUE_TYPE("force-punycode-hostnames")}, 46 | + {"show-avatar-button", 47 | + "Show avatar/people/profile button", 48 | + "Show avatar/people/profile button in the browser toolbar. ungoogled-chromium flag.", 49 | + kOsDesktop, MULTI_VALUE_TYPE(kShowAvatarButtonChoices)}, 50 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 51 | -------------------------------------------------------------------------------- /patches/helium/core/clean-omnibox-suggestions.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/omnibox/omnibox_pedal_implementations.cc 2 | +++ b/chrome/browser/ui/omnibox/omnibox_pedal_implementations.cc 3 | @@ -1990,12 +1990,7 @@ GetPedalImplementations(bool incognito, 4 | if (!incognito && !guest) { 5 | add(new OmniboxPedalClearBrowsingData(/*incognito=*/false)); 6 | } 7 | - add(new OmniboxPedalManagePasswords()); 8 | - add(new OmniboxPedalUpdateCreditCard()); 9 | add(new OmniboxPedalLaunchIncognito()); 10 | - if (!base::android::device_info::is_automotive()) { 11 | - add(new OmniboxPedalRunChromeSafetyCheck()); 12 | - } 13 | add(new OmniboxPedalPlayChromeDinoGame()); 14 | add(new OmniboxPedalManageSiteSettings()); 15 | add(new OmniboxPedalManageChromeSettings()); 16 | @@ -2007,37 +2002,15 @@ GetPedalImplementations(bool incognito, 17 | if (!guest) { 18 | add(new OmniboxPedalClearBrowsingData(incognito)); 19 | } 20 | - add(new OmniboxPedalManagePasswords()); 21 | - add(new OmniboxPedalUpdateCreditCard()); 22 | add(new OmniboxPedalLaunchIncognito()); 23 | - add(new OmniboxPedalTranslate()); 24 | add(new OmniboxPedalUpdateChrome()); 25 | - add(new OmniboxPedalRunChromeSafetyCheck()); 26 | add(new OmniboxPedalManageSecuritySettings()); 27 | add(new OmniboxPedalManageCookies()); 28 | - add(new OmniboxPedalManageAddresses()); 29 | - add(new OmniboxPedalManageSync()); 30 | add(new OmniboxPedalManageSiteSettings()); 31 | - add(new OmniboxPedalSeeChromeTips()); 32 | - 33 | - if (testing || BUILDFLAG(GOOGLE_CHROME_BRANDING)) { 34 | - add(new OmniboxPedalCreateGoogleDoc()); 35 | - add(new OmniboxPedalCreateGoogleSheet()); 36 | - add(new OmniboxPedalCreateGoogleSlide()); 37 | - add(new OmniboxPedalCreateGoogleCalendarEvent()); 38 | - add(new OmniboxPedalCreateGoogleSite()); 39 | - add(new OmniboxPedalCreateGoogleKeepNote()); 40 | - add(new OmniboxPedalCreateGoogleForm()); 41 | - add(new OmniboxPedalManageGoogleAccount()); 42 | - add(new OmniboxPedalChangeGooglePassword()); 43 | - } 44 | - 45 | if (incognito) { 46 | add(new OmniboxPedalCloseIncognitoWindows()); 47 | } 48 | add(new OmniboxPedalPlayChromeDinoGame()); 49 | - add(new OmniboxPedalFindMyPhone()); 50 | - add(new OmniboxPedalManageGooglePrivacy()); 51 | add(new OmniboxPedalManageChromeSettings()); 52 | add(new OmniboxPedalManageChromeDownloads()); 53 | add(new OmniboxPedalViewChromeHistory()); 54 | -------------------------------------------------------------------------------- /patches/helium/settings/remove-autofill.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/resources/settings/settings_menu/settings_menu.html 2 | +++ b/chrome/browser/resources/settings/settings_menu/settings_menu.html 3 | @@ -57,25 +57,6 @@ 4 | $i18n{peoplePageTitle} 5 | 6 | 7 | - 16 | - 26 |