├── .cirrus.yml ├── .cirrus_Dockerfile ├── .cirrus_requirements.txt ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bugreport.md │ ├── create-an--updating-to-chromium-x-x-x-x-.md │ ├── feature_request.md │ └── other.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .gitlab-ci.yml ├── .gitmodules ├── .style.yapf ├── LICENSE ├── README.md ├── SUPPORT.md ├── chromium_version.txt ├── devutils ├── .coveragerc ├── README.md ├── __init__.py ├── check_all_code.sh ├── check_downloads_ini.py ├── check_files_exist.py ├── check_gn_flags.py ├── check_patch_files.py ├── print_tag_version.sh ├── pytest.ini ├── run_devutils_pylint.py ├── run_devutils_tests.sh ├── run_devutils_yapf.sh ├── run_other_pylint.py ├── run_other_yapf.sh ├── run_utils_pylint.py ├── run_utils_tests.sh ├── run_utils_yapf.sh ├── set_quilt_vars.sh ├── tests │ ├── __init__.py │ ├── test_check_patch_files.py │ └── test_validate_patches.py ├── third_party │ ├── README.md │ ├── __init__.py │ └── unidiff │ │ ├── __init__.py │ │ ├── __version__.py │ │ ├── constants.py │ │ ├── errors.py │ │ └── patch.py ├── update_lists.py ├── update_platform_patches.py ├── validate_config.py └── validate_patches.py ├── docs ├── building.md ├── contributing.md ├── design.md ├── developing.md ├── flags.md ├── platforms.md └── repo_management.md ├── domain_regex.list ├── domain_substitution.list ├── downloads.ini ├── flags.gn ├── patches ├── 0001-Add-PPC64-support-for-libdav1d.patch ├── 0001-Fix-libdav1d-compilation-on-clang-ppc.patch ├── Revert-Vulkan-Disable-global-merge-for-volk.patch ├── aw-snap-temporary-patch.patch ├── change-user-agent.patch ├── chromium-77-std-string.patch ├── core │ ├── bromite │ │ └── disable-fetching-field-trials.patch │ ├── debian │ │ └── disable │ │ │ └── unrar.patch │ ├── inox-patchset │ │ ├── 0001-fix-building-without-safebrowsing.patch │ │ ├── 0003-disable-autofill-download-manager.patch │ │ ├── 0005-disable-default-extensions.patch │ │ ├── 0007-disable-web-resource-service.patch │ │ ├── 0009-disable-google-ipv6-probes.patch │ │ ├── 0015-disable-update-pings.patch │ │ ├── 0017-disable-new-avatar-menu.patch │ │ └── 0021-disable-rlz.patch │ ├── iridium-browser │ │ ├── all-add-trk-prefixes-to-possibly-evil-connections.patch │ │ ├── safe_browsing-disable-incident-reporting.patch │ │ └── safe_browsing-disable-reporting-of-safebrowsing-over.patch │ └── ungoogled-chromium │ │ ├── block-requests.patch │ │ ├── block-trk-and-subdomains.patch │ │ ├── disable-crash-reporter.patch │ │ ├── disable-domain-reliability.patch │ │ ├── disable-fonts-googleapis-references.patch │ │ ├── disable-gaia.patch │ │ ├── disable-gcm.patch │ │ ├── disable-google-host-detection.patch │ │ ├── disable-mei-preload.patch │ │ ├── disable-network-time-tracker.patch │ │ ├── disable-profile-avatar-downloading.patch │ │ ├── disable-signin.patch │ │ ├── disable-untraceable-urls.patch │ │ ├── disable-webrtc-log-uploader.patch │ │ ├── disable-webstore-urls.patch │ │ ├── fix-building-without-enabling-reporting.patch │ │ ├── fix-building-without-one-click-signin.patch │ │ ├── fix-building-without-safebrowsing.patch │ │ ├── fix-learn-doubleclick-hsts.patch │ │ ├── remove-enable-dse-memoryssa-cflag.patch │ │ ├── remove-unused-preferences-fields.patch │ │ ├── replace-google-search-engine-with-nosearch.patch │ │ ├── toggle-translation-via-switch.patch │ │ └── use-local-devtools-files.patch ├── enable-rpm-build-ungoogled-chromium.patch ├── enable-rpm-build.patch ├── enable-vaapi.patch ├── eu-strip.patch ├── extra │ ├── bromite │ │ ├── fingerprinting-flags-client-rects-and-measuretext.patch │ │ ├── flag-fingerprinting-canvas-image-data-noise.patch │ │ └── flag-max-connections-per-host.patch │ ├── debian │ │ ├── disable │ │ │ ├── google-api-warning.patch │ │ │ └── welcome-page.patch │ │ ├── fixes │ │ │ └── connection-message.patch │ │ └── gn │ │ │ └── parallel.patch │ ├── inox-patchset │ │ ├── 0006-modify-default-prefs.patch │ │ ├── 0008-restore-classic-ntp.patch │ │ ├── 0011-add-duckduckgo-search-engine.patch │ │ ├── 0013-disable-missing-key-warning.patch │ │ ├── 0016-chromium-sandbox-pie.patch │ │ ├── 0018-disable-first-run-behaviour.patch │ │ └── 0019-disable-battery-status-service.patch │ ├── iridium-browser │ │ ├── Remove-EV-certificates.patch │ │ ├── browser-disable-profile-auto-import-on-first-run.patch │ │ ├── mime_util-force-text-x-suse-ymp-to-be-downloaded.patch │ │ ├── net-cert-increase-default-key-length-for-newly-gener.patch │ │ ├── prefs-always-prompt-for-download-directory-by-defaul.patch │ │ ├── prefs-only-keep-cookies-until-exit.patch │ │ └── updater-disable-auto-update.patch │ └── ungoogled-chromium │ │ ├── add-components-ungoogled.patch │ │ ├── add-extra-channel-info.patch │ │ ├── add-flag-for-bookmark-bar-ntp.patch │ │ ├── add-flag-for-omnibox-autocomplete-filtering.patch │ │ ├── add-flag-for-pdf-plugin-name.patch │ │ ├── add-flag-for-search-engine-collection.patch │ │ ├── add-flag-to-close-window-with-last-tab.patch │ │ ├── add-flag-to-configure-extension-downloading.patch │ │ ├── add-flag-to-convert-popups-to-tabs.patch │ │ ├── add-flag-to-disable-beforeunload.patch │ │ ├── add-flag-to-force-punycode-hostnames.patch │ │ ├── add-flag-to-hide-crashed-bubble.patch │ │ ├── add-flag-to-scroll-tabs.patch │ │ ├── add-flag-to-show-avatar-button.patch │ │ ├── add-flag-to-stack-tabs.patch │ │ ├── add-ipv6-probing-option.patch │ │ ├── add-suggestions-url-field.patch │ │ ├── add-ungoogled-flag-headers.patch │ │ ├── disable-dial-repeating-discovery.patch │ │ ├── disable-download-quarantine.patch │ │ ├── disable-formatting-in-omnibox.patch │ │ ├── disable-intranet-redirect-detector.patch │ │ ├── disable-webgl-renderer-info.patch │ │ ├── enable-default-prefetch-privacy-changes.patch │ │ ├── enable-menu-on-reload-button.patch │ │ ├── enable-page-saving-on-more-pages.patch │ │ ├── enable-paste-and-go-new-tab-button.patch │ │ ├── fix-building-without-mdns-and-service-discovery.patch │ │ ├── remove-disable-setuid-sandbox-as-bad-flag.patch │ │ ├── remove-uneeded-ui.patch │ │ └── searx.patch ├── fix-breakpad-compile.patch ├── fix-libvpx-compile.patch ├── fix-swiftshader-link.patch ├── gl-bug-workaround.patch ├── llvm-bug-workaround.patch ├── llvm-codegen.patch ├── mei_preload2.patch ├── scoped_nss_types-h-compile-fix.patch ├── series ├── skia-vsx-instructions.patch ├── xxx-ppc64le-libvpx.patch └── xxx-ppc64le-support.patch ├── ppc64le_build.bash ├── pruning.list ├── revision.txt └── utils ├── .coveragerc ├── __init__.py ├── _common.py ├── _extraction.py ├── domain_substitution.py ├── downloads.py ├── filescfg.py ├── patches.py ├── prune_binaries.py ├── pytest.ini ├── tests ├── __init__.py ├── test_domain_substitution.py └── test_patches.py └── third_party ├── README.md ├── __init__.py └── schema.py /.cirrus.yml: -------------------------------------------------------------------------------- 1 | container: 2 | dockerfile: .cirrus_Dockerfile 3 | 4 | code_check_task: 5 | pip_cache: 6 | folder: ~/.cache/pip 7 | fingerprint_script: cat .cirrus_requirements.txt 8 | populate_script: pip install -r .cirrus_requirements.txt 9 | pip_install_script: 10 | # Needed in order for yapf to be fully installed 11 | - pip install -r .cirrus_requirements.txt 12 | utils_script: 13 | - python3 -m yapf --style '.style.yapf' -e '*/third_party/*' -rpd utils 14 | - ./devutils/run_utils_pylint.py --hide-fixme 15 | - ./devutils/run_utils_tests.sh 16 | devutils_script: 17 | - python3 -m yapf --style '.style.yapf' -e '*/third_party/*' -rpd devutils 18 | - ./devutils/run_devutils_pylint.py --hide-fixme 19 | - ./devutils/run_devutils_tests.sh 20 | 21 | validate_config_task: 22 | validate_config_script: ./devutils/validate_config.py 23 | 24 | validate_with_source_task: 25 | chromium_download_cache: 26 | folder: chromium_download_cache 27 | fingerprint_script: cat chromium_version.txt 28 | populate_script: 29 | # This directory will not exist when this is called, unless cach retrieval 30 | # fails and leaves partially-complete files around. 31 | - rm -rf chromium_download_cache || true 32 | - mkdir chromium_download_cache 33 | - ./utils/downloads.py retrieve -i downloads.ini -c chromium_download_cache 34 | unpack_source_script: 35 | - ./utils/downloads.py unpack -i downloads.ini -c chromium_download_cache chromium_src 36 | validate_patches_script: 37 | - ./devutils/validate_patches.py -l chromium_src 38 | validate_lists_script: 39 | # NOTE: This check is prone to false positives, but not false negatives. 40 | - ./devutils/check_files_exist.py chromium_src pruning.list domain_substitution.list 41 | 42 | # vim: set expandtab shiftwidth=4 softtabstop=4: 43 | -------------------------------------------------------------------------------- /.cirrus_Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile for Python 3 with xz-utils (for tar.xz unpacking) 2 | 3 | FROM python:3.6-slim 4 | 5 | RUN apt update && apt install -y xz-utils patch axel 6 | -------------------------------------------------------------------------------- /.cirrus_requirements.txt: -------------------------------------------------------------------------------- 1 | # Based on Python package versions in Debian buster 2 | astroid==2.1.0 # via pylint 3 | pylint==2.2.2 4 | pytest-cov==2.6.0 5 | pytest==3.10.1 6 | requests==2.21.0 7 | yapf==0.25.0 8 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: leo-lb 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bugreport.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Report a bug building or running ungoogled-chromium 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Environment (please complete the following information):** 27 | - OS/Platform and version: 28 | - ungoogled-chromium version: 29 | 30 | **Additional context** 31 | Add any other context about the problem here. 32 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/create-an--updating-to-chromium-x-x-x-x-.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Create an "Updating to Chromium x.x.x.x" 3 | about: For letting the community track progress to a new stable Chromium 4 | title: Updating to Chromium [VERSION_HERE] 5 | labels: enhancement, help wanted 6 | assignees: '' 7 | 8 | --- 9 | 10 | ### Please respond if you would like to update ungoogled-chromium to the new stable Chromium version. 11 | 12 | ## Notes for the developer 13 | 14 | Once you claim it, it is advisable that you create a [Draft Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests#draft-pull-requests) for increased visibility: 15 | 16 | ![GitHub Interface for creating Draft Pull Requests](https://help.github.com/assets/images/help/pull_requests/pullrequest-send.png) 17 | 18 | Finally, make sure to reference this issue in your PR. 19 | 20 | Feel free to ask questions and discuss issues here along the way. Thanks! 21 | 22 | ## Notes for others 23 | 24 | Feel free to raise issues or questions throughout the process. However, please refrain from asking ETAs unless no visible progress has been made here or on the developer's PR for a while (e.g. 2 weeks). 25 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/other.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Other 3 | about: Anything else not listed 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | *IMPORTANT: Please ensure you have read SUPPORT.md before continuing* 11 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | *(Please ensure you have read SUPPORT.md and docs/contributing.md before submitting the Pull Request)* 2 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | image: registry.gitlab.com/chromium-ppc64le/ungoogled-chromium-ci-docker-image/ppc64le:latest 2 | 3 | build: 4 | variables: 5 | GIT_SUBMODULE_STRATEGY: recursive 6 | stage: build 7 | tags: 8 | - docker 9 | - ppc64le 10 | script: 11 | - "./ppc64le_build.bash" 12 | - "cd build/src/out/Default && tar --exclude=obj --exclude=gen -cvjSf ungoogled-chromium-linux-ppc64le-$CI_COMMIT_SHA.tar.bz2 *" 13 | artifacts: 14 | paths: 15 | - "build/src/out/Default/ungoogled-chromium-linux-ppc64le-$CI_COMMIT_SHA.tar.bz2" 16 | - "build/src/out/Default/*.rpm" 17 | cache: 18 | key: download-cache 19 | paths: 20 | - "build/download_cache/" 21 | # cache: 22 | # key: binary-cache 23 | # - "ccache/" 24 | # - "build/llvm-project/" 25 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "patches/chromium_power"] 2 | path = patches/chromium_power 3 | url = https://github.com/leo-lb/chromium_power 4 | branch = ungoogled-chromium 5 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2015-2020, 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 | -------------------------------------------------------------------------------- /SUPPORT.md: -------------------------------------------------------------------------------- 1 | # Support 2 | 3 | **Before you submit feedback, please ensure you have tried the following**: 4 | 5 | * Read the [FAQ](//ungoogled-software.github.io/ungoogled-chromium-wiki/faq) 6 | * Check if your feedback already exists in the [Issue Tracker](//github.com/Eloston/ungoogled-chromium/issues) (make sure to search closed issues and use search filters, as applicable) 7 | * [If your platform is officially supported (links here)](docs/platforms.md), make sure to visit the issue trackers for the platform's repository. 8 | * If this is a problem, ensure it does *not* occur with regular Chromium or Google Chrome. If it does, then this is *not* a problem with ungoogled-chromium. Instead, please submit your feedback to the [Chromium bug tracker](//bugs.chromium.org/p/chromium/issues/list) or Google. 9 | * Read the documentation under [docs/](docs/) 10 | 11 | There are two channels for support: 12 | 13 | * The [Issue Tracker](//github.com/Eloston/ungoogled-chromium/issues). The Issue Tracker is the main hub for discussions and development activity, and thus the primary means of support. It includes problems, suggestions, and questions. 14 | * [If your platform is officially supported (links here)](docs/platforms.md), there are also platform-specific issue trackers. You may post an issue there if you believe it is an issue specific to that platform. 15 | * A chat room. There are two options available: 16 | * [Gitter](https://gitter.im/ungoogled-software/Lobby). It can use your GitHub account as an identity. 17 | * Matrix.org under name `ungoogled-software/lobby`. It has a bidirectional connection with Gitter. 18 | -------------------------------------------------------------------------------- /chromium_version.txt: -------------------------------------------------------------------------------- 1 | 89.0.4389.90 2 | -------------------------------------------------------------------------------- /devutils/.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | branch = True 3 | parallel = True 4 | omit = tests/* 5 | 6 | [report] 7 | # Regexes for lines to exclude from consideration 8 | exclude_lines = 9 | # Have to re-enable the standard pragma 10 | pragma: no cover 11 | 12 | # Don't complain about missing debug-only code: 13 | def __repr__ 14 | if self\.debug 15 | 16 | # Don't complain if tests don't hit defensive assertion code: 17 | raise AssertionError 18 | raise NotImplementedError 19 | 20 | # Don't complain if non-runnable code isn't run: 21 | if 0: 22 | if __name__ == .__main__.: 23 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /devutils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/llebout/ungoogled-chromium/f8ed009f1afe5ee57b8bd49a2c57b270a24d715c/devutils/__init__.py -------------------------------------------------------------------------------- /devutils/check_all_code.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Wrapper for devutils and utils formatter, linter, and tester 4 | 5 | set -eu 6 | 7 | _root_dir=$(dirname $(dirname $(readlink -f $0))) 8 | cd ${_root_dir}/devutils 9 | 10 | printf '###### utils yapf ######\n' 11 | ./run_utils_yapf.sh 12 | printf '###### utils pylint ######\n' 13 | ./run_utils_pylint.py || ./run_utils_pylint.py --hide-fixme 14 | printf '###### utils tests ######\n' 15 | ./run_utils_tests.sh 16 | 17 | printf '### devutils yapf ######\n' 18 | ./run_devutils_yapf.sh 19 | printf '###### devutils pylint ######\n' 20 | ./run_devutils_pylint.py || ./run_devutils_pylint.py --hide-fixme 21 | printf '###### devutils tests ######\n' 22 | ./run_devutils_tests.sh 23 | -------------------------------------------------------------------------------- /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 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 | sys.path.pop(0) 25 | 26 | 27 | def check_downloads_ini(downloads_ini_iter): 28 | """ 29 | Combines and checks if the the downloads.ini files provided are valid. 30 | 31 | downloads_ini_iter must be an iterable of strings to downloads.ini files. 32 | 33 | Returns True if errors occured, False otherwise. 34 | """ 35 | try: 36 | DownloadInfo(downloads_ini_iter) 37 | except schema.SchemaError: 38 | return True 39 | return False 40 | 41 | 42 | def main(): 43 | """CLI entrypoint""" 44 | 45 | root_dir = Path(__file__).resolve().parent.parent 46 | default_downloads_ini = [str(root_dir / 'downloads.ini')] 47 | 48 | parser = argparse.ArgumentParser(description=__doc__) 49 | parser.add_argument( 50 | '-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 | exit(1) 60 | exit(0) 61 | 62 | 63 | if __name__ == '__main__': 64 | main() 65 | -------------------------------------------------------------------------------- /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 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( 31 | 'ERROR: Path "{}" from file "{}" does not exist.'.format(file_name, input_name), 32 | file=sys.stderr) 33 | exit(1) 34 | 35 | 36 | if __name__ == "__main__": 37 | main() 38 | -------------------------------------------------------------------------------- /devutils/check_gn_flags.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 file. 7 | """Run sanity checking algorithms over GN flags 8 | 9 | It checks the following: 10 | 11 | * GN flags in flags.gn are sorted and not duplicated 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 _common import ENCODING, get_logger 24 | sys.path.pop(0) 25 | 26 | 27 | def check_gn_flags(gn_flags_path): 28 | """ 29 | Checks if GN flags are sorted and not duplicated. 30 | 31 | gn_flags_path is a pathlib.Path to the GN flags file to check 32 | 33 | Returns True if warnings were logged; False otherwise 34 | """ 35 | keys_seen = set() 36 | warnings = False 37 | with gn_flags_path.open(encoding=ENCODING) as file_obj: 38 | iterator = iter(file_obj.read().splitlines()) 39 | try: 40 | previous = next(iterator) 41 | except StopIteration: 42 | return warnings 43 | for current in iterator: 44 | gn_key = current.split('=')[0] 45 | if gn_key in keys_seen: 46 | get_logger().warning('In GN flags %s, "%s" appears at least twice', gn_flags_path, 47 | gn_key) 48 | warnings = True 49 | else: 50 | keys_seen.add(gn_key) 51 | if current < previous: 52 | get_logger().warning('In GN flags %s, "%s" should be sorted before "%s"', gn_flags_path, 53 | current, previous) 54 | warnings = True 55 | previous = current 56 | return warnings 57 | 58 | 59 | def main(): 60 | """CLI entrypoint""" 61 | 62 | root_dir = Path(__file__).resolve().parent.parent 63 | default_flags_gn = root_dir / 'flags.gn' 64 | 65 | parser = argparse.ArgumentParser(description=__doc__) 66 | parser.add_argument( 67 | '-f', 68 | '--flags-gn', 69 | type=Path, 70 | default=default_flags_gn, 71 | help='Path to the GN flags to use. Default: %(default)s') 72 | args = parser.parse_args() 73 | 74 | if check_gn_flags(args.flags_gn): 75 | exit(1) 76 | exit(0) 77 | 78 | 79 | if __name__ == '__main__': 80 | main() 81 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 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( 20 | '--show-locally-disabled', 21 | action='store_true', 22 | help='Show "locally-disabled" Pylint warnings.') 23 | args = parser.parse_args() 24 | 25 | disables = [ 26 | 'wrong-import-position', 27 | 'bad-continuation', 28 | ] 29 | 30 | if args.hide_fixme: 31 | disables.append('fixme') 32 | if not args.show_locally_disabled: 33 | disables.append('locally-disabled') 34 | 35 | pylint_options = [ 36 | '--disable={}'.format(','.join(disables)), 37 | '--jobs=4', 38 | '--score=n', 39 | '--persistent=n', 40 | ] 41 | 42 | ignore_prefixes = [ 43 | ('third_party', ), 44 | ] 45 | 46 | sys.path.insert(1, str(Path(__file__).resolve().parent.parent / 'utils')) 47 | sys.path.insert(2, str(Path(__file__).resolve().parent.parent / 'devutils' / 'third_party')) 48 | with ChangeDir(Path(__file__).parent): 49 | result = run_pylint( 50 | Path(), 51 | pylint_options, 52 | ignore_prefixes=ignore_prefixes, 53 | ) 54 | sys.path.pop(2) 55 | sys.path.pop(1) 56 | if not result: 57 | exit(1) 58 | exit(0) 59 | 60 | 61 | if __name__ == '__main__': 62 | main() 63 | -------------------------------------------------------------------------------- /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_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 | -------------------------------------------------------------------------------- /devutils/run_other_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 file. 6 | """Run Pylint over any module""" 7 | 8 | import argparse 9 | import os 10 | import shutil 11 | from pathlib import Path 12 | 13 | from pylint import lint 14 | 15 | 16 | class ChangeDir: 17 | """ 18 | Changes directory to path in with statement 19 | """ 20 | 21 | def __init__(self, path): 22 | self._path = path 23 | self._orig_path = os.getcwd() 24 | 25 | def __enter__(self): 26 | os.chdir(str(self._path)) 27 | 28 | def __exit__(self, *_): 29 | os.chdir(self._orig_path) 30 | 31 | 32 | def run_pylint(module_path, pylint_options, ignore_prefixes=tuple()): 33 | """Runs Pylint. Returns a boolean indicating success""" 34 | pylint_stats = Path('/run/user/{}/pylint_stats'.format(os.getuid())) 35 | if not pylint_stats.parent.is_dir(): #pylint: disable=no-member 36 | pylint_stats = Path('/run/shm/pylint_stats') 37 | os.environ['PYLINTHOME'] = str(pylint_stats) 38 | 39 | input_paths = list() 40 | if not module_path.exists(): 41 | print('ERROR: Cannot find', module_path) 42 | exit(1) 43 | if module_path.is_dir(): 44 | for path in module_path.rglob('*.py'): 45 | ignore_matched = False 46 | for prefix in ignore_prefixes: 47 | if path.parts[:len(prefix)] == prefix: 48 | ignore_matched = True 49 | break 50 | if ignore_matched: 51 | continue 52 | input_paths.append(str(path)) 53 | else: 54 | input_paths.append(str(module_path)) 55 | runner = lint.Run((*input_paths, *pylint_options), do_exit=False) 56 | 57 | if pylint_stats.is_dir(): 58 | shutil.rmtree(str(pylint_stats)) 59 | 60 | if runner.linter.msg_status != 0: 61 | print('WARNING: Non-zero exit status:', runner.linter.msg_status) 62 | return False 63 | return True 64 | 65 | 66 | def main(): 67 | """CLI entrypoint""" 68 | 69 | parser = argparse.ArgumentParser(description='Run Pylint over arbitrary module') 70 | parser.add_argument('--hide-fixme', action='store_true', help='Hide "fixme" Pylint warnings.') 71 | parser.add_argument( 72 | '--show-locally-disabled', 73 | action='store_true', 74 | help='Show "locally-disabled" Pylint warnings.') 75 | parser.add_argument('module_path', type=Path, help='Path to the module to check') 76 | args = parser.parse_args() 77 | 78 | if not args.module_path.exists(): 79 | print('ERROR: Module path "{}" does not exist'.format(args.module_path)) 80 | exit(1) 81 | 82 | disables = [ 83 | 'wrong-import-position', 84 | 'bad-continuation', 85 | ] 86 | 87 | if args.hide_fixme: 88 | disables.append('fixme') 89 | if not args.show_locally_disabled: 90 | disables.append('locally-disabled') 91 | 92 | pylint_options = [ 93 | '--disable={}'.format(','.join(disables)), 94 | '--jobs=4', 95 | '--score=n', 96 | '--persistent=n', 97 | ] 98 | 99 | if not run_pylint(args.module_path, pylint_options): 100 | exit(1) 101 | exit(0) 102 | 103 | 104 | if __name__ == '__main__': 105 | main() 106 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 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( 20 | '--show-locally-disabled', 21 | action='store_true', 22 | help='Show "locally-disabled" Pylint warnings.') 23 | args = parser.parse_args() 24 | 25 | disable = ['bad-continuation'] 26 | 27 | if args.hide_fixme: 28 | disable.append('fixme') 29 | if not args.show_locally_disabled: 30 | disable.append('locally-disabled') 31 | 32 | pylint_options = [ 33 | '--disable={}'.format(','.join(disable)), 34 | '--jobs=4', 35 | '--score=n', 36 | '--persistent=n', 37 | ] 38 | 39 | ignore_prefixes = [ 40 | ('third_party', ), 41 | ('tests', ), 42 | ] 43 | 44 | sys.path.insert(1, str(Path(__file__).resolve().parent.parent / 'utils' / 'third_party')) 45 | with ChangeDir(Path(__file__).resolve().parent.parent / 'utils'): 46 | result = run_pylint( 47 | Path(), 48 | pylint_options, 49 | ignore_prefixes=ignore_prefixes, 50 | ) 51 | sys.path.pop(1) 52 | if not result: 53 | exit(1) 54 | exit(0) 55 | 56 | 57 | if __name__ == '__main__': 58 | main() 59 | -------------------------------------------------------------------------------- /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_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/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 --sort" 21 | export QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index --sort --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 | # When non-default less options are used, add the -R option so that less outputs 27 | # ANSI color escape codes "raw". 28 | [ -n "$LESS" -a -z "${QUILT_PAGER+x}" ] && export QUILT_PAGER="less -FRX" 29 | -------------------------------------------------------------------------------- /devutils/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/llebout/ungoogled-chromium/f8ed009f1afe5ee57b8bd49a2c57b270a24d715c/devutils/tests/__init__.py -------------------------------------------------------------------------------- /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 file. 6 | """Test check_patch_files.py""" 7 | 8 | import tempfile 9 | from pathlib import Path 10 | 11 | from ..check_patch_files import check_series_duplicates 12 | 13 | 14 | def test_check_series_duplicates(): 15 | """Test check_series_duplicates""" 16 | with tempfile.TemporaryDirectory() as tmpdirname: 17 | patches_dir = Path(tmpdirname) 18 | series_path = Path(tmpdirname, 'series') 19 | 20 | # Check no duplicates 21 | series_path.write_text('\n'.join([ 22 | 'a.patch', 23 | 'b.patch', 24 | 'c.patch', 25 | ])) 26 | assert not check_series_duplicates(patches_dir) 27 | 28 | # Check duplicates 29 | series_path.write_text('\n'.join([ 30 | 'a.patch', 31 | 'b.patch', 32 | 'c.patch', 33 | 'a.patch', 34 | ])) 35 | assert check_series_duplicates(patches_dir) 36 | -------------------------------------------------------------------------------- /devutils/tests/test_validate_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 file. 6 | """Test validate_patches.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 LOGGER_NAME 15 | sys.path.pop(0) 16 | 17 | from .. import validate_patches 18 | 19 | 20 | def test_test_patches(caplog): 21 | """Test _dry_check_patched_file""" 22 | 23 | #pylint: disable=protected-access 24 | caplog.set_level(logging.DEBUG, logger=LOGGER_NAME) 25 | #set_logging_level(logging.DEBUG) 26 | 27 | orig_file_content = """bye world""" 28 | series_iter = ['test.patch'] 29 | 30 | def _run_test_patches(patch_content): 31 | with tempfile.TemporaryDirectory() as tmpdirname: 32 | Path(tmpdirname, 'foobar.txt').write_text(orig_file_content) 33 | Path(tmpdirname, 'test.patch').write_text(patch_content) 34 | _, patch_cache = validate_patches._load_all_patches(series_iter, Path(tmpdirname)) 35 | required_files = validate_patches._get_required_files(patch_cache) 36 | files_under_test = validate_patches._retrieve_local_files(required_files, 37 | Path(tmpdirname)) 38 | return validate_patches._test_patches(series_iter, patch_cache, files_under_test) 39 | 40 | # Check valid modification 41 | patch_content = """--- a/foobar.txt 42 | +++ b/foobar.txt 43 | @@ -1 +1 @@ 44 | -bye world 45 | +hello world 46 | """ 47 | assert not _run_test_patches(patch_content) 48 | 49 | # Check invalid modification 50 | patch_content = """--- a/foobar.txt 51 | +++ b/foobar.txt 52 | @@ -1 +1 @@ 53 | -hello world 54 | +olleh world 55 | """ 56 | assert _run_test_patches(patch_content) 57 | 58 | # Check correct removal 59 | patch_content = """--- a/foobar.txt 60 | +++ /dev/null 61 | @@ -1 +0,0 @@ 62 | -bye world 63 | """ 64 | assert not _run_test_patches(patch_content) 65 | 66 | # Check incorrect removal 67 | patch_content = """--- a/foobar.txt 68 | +++ /dev/null 69 | @@ -1 +0,0 @@ 70 | -this line does not exist in foobar 71 | """ 72 | assert _run_test_patches(patch_content) 73 | -------------------------------------------------------------------------------- /devutils/third_party/README.md: -------------------------------------------------------------------------------- 1 | This directory contains third-party libraries used by devutils. 2 | 3 | Contents: 4 | 5 | * [python-unidiff](//github.com/matiasb/python-unidiff) 6 | * For parsing and modifying unified diffs. 7 | -------------------------------------------------------------------------------- /devutils/third_party/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/llebout/ungoogled-chromium/f8ed009f1afe5ee57b8bd49a2c57b270a24d715c/devutils/third_party/__init__.py -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/third_party/unidiff/constants.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 | """Useful constants and regexes used by the package.""" 26 | 27 | from __future__ import unicode_literals 28 | 29 | import re 30 | 31 | 32 | RE_SOURCE_FILENAME = re.compile( 33 | r'^--- (?P[^\t\n]+)(?:\t(?P[^\n]+))?') 34 | RE_TARGET_FILENAME = re.compile( 35 | r'^\+\+\+ (?P[^\t\n]+)(?:\t(?P[^\n]+))?') 36 | 37 | # @@ (source offset, length) (target offset, length) @@ (section header) 38 | RE_HUNK_HEADER = re.compile( 39 | r"^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))?\ @@[ ]?(.*)") 40 | 41 | # kept line (context) 42 | # \n empty line (treat like context) 43 | # + added line 44 | # - deleted line 45 | # \ No newline case 46 | RE_HUNK_BODY_LINE = re.compile( 47 | r'^(?P[- \+\\])(?P.*)', re.DOTALL) 48 | RE_HUNK_EMPTY_BODY_LINE = re.compile( 49 | r'^(?P[- \+\\]?)(?P[\r\n]{1,2})', re.DOTALL) 50 | 51 | RE_NO_NEWLINE_MARKER = re.compile(r'^\\ No newline at end of file') 52 | 53 | DEFAULT_ENCODING = 'UTF-8' 54 | 55 | LINE_TYPE_ADDED = '+' 56 | LINE_TYPE_REMOVED = '-' 57 | LINE_TYPE_CONTEXT = ' ' 58 | LINE_TYPE_EMPTY = '' 59 | LINE_TYPE_NO_NEWLINE = '\\' 60 | LINE_VALUE_NO_NEWLINE = ' No newline at end of file' 61 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 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 | exit(1) 54 | exit(0) 55 | 56 | 57 | if __name__ == '__main__': 58 | if sys.argv[1:]: 59 | print(__doc__) 60 | else: 61 | main() 62 | -------------------------------------------------------------------------------- /docs/building.md: -------------------------------------------------------------------------------- 1 | # Building ungoogled-chromium 2 | 3 | The recommended way to build ungoogled-chromium is by consulting [the repository for your supported platform (links here)](platforms.md). 4 | 5 | * *Linux users*: If your distribution is not listed, you will need to use Portable Linux. 6 | 7 | If you want to add ungoogled-chromium to your existing Chromium build process, see the next section. Additionally, you may reference the repositories for supported platforms for inspiration. 8 | 9 | ## Integrating ungoogled-chromium into your Chromium build process 10 | 11 | Typically, ungoogled-chromium is built from [code in platform-specific repositories](platforms.md). However, ungoogled-chromium can also be included in part or in whole into any custom Chromium build. In this section, **we will assume you already have a process to make your own Chromium builds**. 12 | 13 | **NOTE**: You may need additional patches and/or build configuration for [your supported platform](platforms.md) because this repository does not contain all the code necessary for all platforms. 14 | 15 | Before continuing, you may find it helpful to have a look through [the design documentation](design.md). 16 | 17 | The following procedure outline the essential steps to build Chromium will all of ungoogled-chromium's features. **They are not sufficient to build ungoogled-chromium on their own**. 18 | 19 | 1. Ensure Chromium is downloaded, such as by `depot_tools`. In most of our supported platforms, we instead use a custom tool to do this. 20 | 21 | ```sh 22 | mkdir -p build/download_cache 23 | ./utils/downloads.py retrieve -c build/download_cache -i downloads.ini 24 | ./utils/downloads.py unpack -c build/download_cache -i downloads.ini -- build/src 25 | ``` 26 | 27 | 2. Prune binaries 28 | 29 | ```sh 30 | ./utils/prune_binaries.py build/src pruning.list 31 | ``` 32 | 33 | 3. Apply patches 34 | 35 | ```sh 36 | ./utils/patches.py apply build/src patches 37 | ``` 38 | 39 | 4. Substitute domains 40 | 41 | ```sh 42 | ./utils/domain_substitution.py apply -r domain_regex.list -f domain_substitution.list -c build/domsubcache.tar.gz build/src 43 | ``` 44 | 45 | 5. Build GN. If you are using `depot_tools` to checkout Chromium or you already have a GN binary, you should skip this step. 46 | 47 | ```sh 48 | mkdir -p build/src/out/Default 49 | cd build/src 50 | ./tools/gn/bootstrap/bootstrap.py --skip-generate-buildfiles -j4 -o out/Default/ 51 | ``` 52 | 53 | 6. Invoke the build: 54 | 55 | ``` 56 | mkdir -p build/src/out/Default 57 | # NOTE: flags.gn contains only a subset of what is needed to run the build. 58 | cp flags.gn build/src/out/Default/args.gn 59 | cd build/src 60 | # If you have additional GN flags to add, make sure to add them now. 61 | ./out/Default/gn gen out/Default --fail-on-unused-args 62 | ninja -C out/Default chrome chromedriver chrome_sandbox 63 | ``` 64 | 65 | ## Building FAQ 66 | 67 | ### My build keeps crashing because I run out of RAM! How can I fix it? 68 | 69 | Here are several ways to address this, in decreasing order of preference: 70 | 71 | 1. Decrease the number of parallel threads to Ninja (the `-j` flag) 72 | 2. Add swap space 73 | -------------------------------------------------------------------------------- /docs/contributing.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This document contains our criteria and guidelines for contributing to ungoogled-chromium. 4 | 5 | If you have **small contributions that don't fit our criteria**, consider adding them to [ungoogled-software/contrib](https://github.com/ungoogled-software/contrib) or [our Wiki](https://github.com/ungoogled-software/ungoogled-chromium-wiki) instead. 6 | 7 | If you are a developer of an **officially-supported platform**, be sure to check out the [Platform Repository Standards and Guidelines](repo_management.md). 8 | 9 | List of contents: 10 | 11 | * [How to help](#how-to-help) 12 | * [Submitting changes](#submitting-changes) 13 | * [Criteria for new features](#criteria-for-new-features) 14 | 15 | ### How to help 16 | 17 | Generally, ungoogled-chromium needs contributors to help: 18 | 19 | * Keep up-to-date with the latest stable Chromium, and any problematic changes in the new version that needs modification. 20 | * Help with issues marked with the `help wanted` tag (usually either questions for other users, or request for help from other developers) 21 | * Review Pull Requests from other contributors 22 | * Implement feature requests ("enhancements" in the Issue Tracker), large or small. 23 | * Implement issues marked with the `backlog` tag (that are closed). 24 | * If it requires new code, please read through the [Submitting changes](#submitting-changes) section below. 25 | 26 | In addition, anyone is free to help others in need of support in the Issue Tracker. 27 | 28 | If there are fixes, tweaks, or additions you want to make, continue onto the following section. 29 | 30 | ### Submitting changes 31 | 32 | Please submit all changes via Pull Requests. 33 | 34 | Guidelines: 35 | 36 | * You are welcome to submit minor changes, such as bug fixes, documentation fixes, and tweaks. 37 | * If your change has an associated issue, please let others know that you are working on it. 38 | * If you want to submit a new feature, please read through the [Criteria for new features](#criteria-for-new-features) below. 39 | * When in doubt about the acceptance of a change, you are welcome to ask via an issue first. 40 | 41 | ### Criteria for new features 42 | 43 | 1. New features should not detract from the default Chromium experience, unless it falls under the project's main objectives (i.e. removing Google integration and enhancing privacy). 44 | 45 | * For larger features, please propose them via an issue first. 46 | 47 | 2. New features should live behind a setting that is **off by default**. 48 | 49 | * Settings are usually added via a command-line flag and `chrome://flags` entries. See [the relevant section in docs/developing.md](developing.md#adding-command-line-flags-and-chromeflags-options) for more information. 50 | * Unless there are significant benefits, adding the setting to `chrome://settings` is *not recommended* due to the additional maintenance required (caused by the infrastructure that backs preferences). 51 | 52 | **NOTE**: In the event that the codebase changes significantly for a non-essential patch (i.e. a patch that does not contribute to the main objectives of ungoogled-chromium), it will be removed until someone updates it. 53 | -------------------------------------------------------------------------------- /docs/platforms.md: -------------------------------------------------------------------------------- 1 | # Supported Platforms 2 | 3 | This page lists platforms officially supported by ungoogled-chromium, and their associated repositories. 4 | 5 | * Android: [ungoogled-chromium-android](//github.com/ungoogled-software/ungoogled-chromium-android) 6 | * Arch Linux: [ungoogled-chromium-archlinux](//github.com/ungoogled-software/ungoogled-chromium-archlinux) 7 | * Debian, Ubuntu, and derivatives: [ungoogled-chromium-debian](//github.com/ungoogled-software/ungoogled-chromium-debian) 8 | * Fedora and CentOS: [ungoogled-chromium-fedora](//github.com/ungoogled-software/ungoogled-chromium-fedora) 9 | * Portable Linux (for any Linux distro): [ungoogled-chromium-portablelinux](//github.com/ungoogled-software/ungoogled-chromium-portablelinux) 10 | * Windows: [ungoogled-chromium-windows](//github.com/ungoogled-software/ungoogled-chromium-windows) 11 | * macOS: [ungoogled-chromium-macos](//github.com/ungoogled-software/ungoogled-chromium-macos) 12 | -------------------------------------------------------------------------------- /docs/repo_management.md: -------------------------------------------------------------------------------- 1 | # Platform Repository Standards and Guidelines 2 | 3 | *This document is new, and its structure and content may change. If you have suggestions, please create an issue!* 4 | 5 | ungoogled-chromium is comprised of anonymous developers who volunteer their efforts. Some of these developers may choose to provide long-term support for [an officially-supported platform](platforms.md), or bring support to a new platform. For such developers, this document consists of standards and management guidelines for platform repos. 6 | 7 | We will refer to this git repository as "the main repo", and refer to repositories that add platform-specific code to build ungoogled-chromium as "platform repos". An "officially-supported platform" is a platform with a platform repo in [the ungoogled-software organization](//github.com/ungoogled-software) and noted in [docs/platforms.md](platforms.md). 8 | 9 | ## Standards 10 | 11 | An officially-supported platform repo: 12 | 13 | * Must not modify or remove existing patches, GN flags, domain substitution, or binary pruning in the main repo. Instead, you can add new patches or add more files/rules to domain substitution or binary pruning. (If you think a change is needed in the main repo, please make an issue!) 14 | * Must have a tagging/versioning scheme that includes the ungoogled-chromium version. 15 | * Must not require an Internet connection during compilation (before compilation is OK). 16 | * Should allow the user to download all build requirements before building. 17 | * Must not require external services to build, aside from repos in the ungoogled-software organization and repos provided by or used by Chromium. 18 | * Should have a reproducible build for all versions (currently, there is no formal process to enforce/verify reproducibility of binaries) 19 | 20 | Each deviation must be clearly noted in the platform repo's documentation (such as the repo's README), and have an associated issue in the platform repo. 21 | 22 | ## Teams in the ungoogled-software organization 23 | 24 | Each officially-supported platform has one or more teams in the ungoogled-software organization. These teams provide additional means for collaborating with other developers, such as issue triaging and private discussions (see section "How to communicate" below). 25 | 26 | If you are a regular contributor and would like to provide long-term support for a platform, you can request to be included in the ungoogled-software organization team for your platform. Since the number of developers is low, there is no formal process to do this; just ask in an issue. 27 | 28 | ## How to communicate 29 | 30 | In the interest of transparency, it is recommended to discuss work in public spaces like issues or PRs. If a discussion should not involve outsiders, you can lock the issue or PR to collaborators only. 31 | 32 | You must use team discussions if you are discussing or sharing information that can affect the security of the repository. Otherwise, you may use team discussions at your discretion. 33 | 34 | ## Issues 35 | 36 | Each platform repo should have a team in ungoogled-software with the Triage permission level. All members should feel free to manage issues. 37 | 38 | TODO: More details? 39 | 40 | ## Pull Requests 41 | 42 | TODO 43 | 44 | ## Repository Settings and Shared Resources 45 | 46 | Shared resources includes: 47 | 48 | * CI services like CirrusCI, GitHub Actions, etc. 49 | * Build services like OpenSUSE Build Service (OBS) 50 | 51 | These need to be handled with care, as they can cause a wide variety of issues from security and privacy leaks all the way to data loss. 52 | 53 | There are several ways to handle shared resources: 54 | 55 | * Assign one person to manage a certain set of settings (i.e. grant them "ownership" of those settings). If you want to change a setting, you should request a change in a team discussion. 56 | * TODO: More ways to manage settings? 57 | -------------------------------------------------------------------------------- /domain_regex.list: -------------------------------------------------------------------------------- 1 | fonts(\\*?)\.googleapis(\\*?)\.com#f0ntz\g<1>.9oo91e8p1\g<2>.qjz9zk 2 | google([A-Za-z\-]*?\\*?)\.com(?!mon)#9oo91e\g<1>.qjz9zk 3 | gstatic([A-Za-z\-]*?\\*?)\.com#95tat1c\g<1>.qjz9zk 4 | chrome([A-Za-z\-]*?\\*?)\.com#ch40me\g<1>.qjz9zk 5 | chromium([A-Za-z\-]*?\\*?)\.org#ch40m1um\g<1>.qjz9zk 6 | mozilla([A-Za-z\-]*?\\*?)\.org#m0z111a\g<1>.qjz9zk 7 | facebook([A-Za-z\-]*?\\*?)\.com#f8c3b00k\g<1>.qjz9zk 8 | appspot([A-Za-z\-]*?\\*?)\.com#8pp2p8t\g<1>.qjz9zk 9 | youtube([A-Za-z\-]*?\\*?)\.com#y0u1ub3\g<1>.qjz9zk 10 | ytimg([A-Za-z\-]*?\\*?)\.com#yt1mg\g<1>.qjz9zk 11 | gmail([A-Za-z\-]*?\\*?)\.com#9ma1l\g<1>.qjz9zk 12 | doubleclick([A-Za-z\-]*?\\*?)\.net#60u613cl1c4\g<1>.n3t.qjz9zk 13 | doubleclick([A-Za-z\-]*?\\*?)\.com#60u613cl1c4\g<1>.c0m.qjz9zk 14 | googlezip(\\*?)\.net#9oo91e21p\g<1>.qjz9zk 15 | beacons([1-9]?\\*?)\.gvt([1-9]?\\*?)\.com#b3ac0n2\g<1>.9vt\g<2>.qjz9zk 16 | ggpht(\\*?)\.com#99pht\g<1>.qjz9zk 17 | microsoft(\\*?)\.com#m1cr050ft\g<1>.qjz9zk 18 | 1e100(\\*?)\.net#l3lOO\g<1>.qjz9zk 19 | (?.qjz9zk 20 | goo\.gl#goo.gl.qjz9zk 21 | -------------------------------------------------------------------------------- /downloads.ini: -------------------------------------------------------------------------------- 1 | # Official Chromium source code archive 2 | # NOTE: Substitutions beginning with underscore are provided by utils 3 | [chromium] 4 | url = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-%(_chromium_version)s.tar.xz 5 | download_filename = chromium-%(_chromium_version)s.tar.xz 6 | hash_url = chromium|chromium-%(_chromium_version)s.tar.xz.hashes|https://commondatastorage.googleapis.com/chromium-browser-official/chromium-%(_chromium_version)s.tar.xz.hashes 7 | output_path = ./ 8 | strip_leading_dirs = chromium-%(_chromium_version)s 9 | -------------------------------------------------------------------------------- /flags.gn: -------------------------------------------------------------------------------- 1 | chrome_pgo_phase=0 2 | clang_use_chrome_plugins=false 3 | enable_hangout_services_extension=false 4 | enable_js_type_check=false 5 | enable_mdns=false 6 | enable_mse_mpeg2ts_stream_parser=true 7 | enable_nacl=false 8 | enable_nacl_nonsfi=false 9 | enable_one_click_signin=false 10 | enable_reading_list=false 11 | enable_remoting=false 12 | enable_reporting=false 13 | enable_service_discovery=false 14 | enable_widevine=false 15 | exclude_unwind_tables=true 16 | fieldtrial_testing_like_official_build=true 17 | google_api_key="" 18 | google_default_client_id="" 19 | google_default_client_secret="" 20 | safe_browsing_mode=0 21 | treat_warnings_as_errors=false 22 | use_official_google_api_keys=false 23 | use_unofficial_version_number=false 24 | is_clang=true 25 | clang_base_path="../llvm_build" 26 | use_lld=true 27 | use_thin_lto=true 28 | thin_lto_enable_optimizations=true 29 | #concurrent_links=2 30 | enable_dav1d_decoder=true 31 | #use_jumbo_build=true 32 | #jumbo_file_merge_limit=8 33 | #enable_ac3_eac3_audio_demuxing=true 34 | blink_symbol_level=0 35 | enable_iterator_debugging=false 36 | fatal_linker_warnings=false 37 | is_debug=false 38 | is_official_build=true 39 | symbol_level=0 40 | #cc_wrapper="/usr/bin/ccache" 41 | 42 | ffmpeg_branding="ChromeOS" 43 | proprietary_codecs=true 44 | enable_mse_mpeg2ts_stream_parser=true 45 | enable_av1_decoder=true 46 | use_openh264=true 47 | 48 | #use_vaapi=true 49 | use_vaapi=false # broken according to chromium repo in this group 50 | 51 | is_component_build = false # statically link components 52 | #enable_linux_installer=true 53 | 54 | # system integration 55 | system_libdir="lib64" 56 | use_gio=true 57 | use_pulseaudio=true 58 | icu_use_data_file=true 59 | 60 | pdf_enable_xfa=true 61 | -------------------------------------------------------------------------------- /patches/0001-Fix-libdav1d-compilation-on-clang-ppc.patch: -------------------------------------------------------------------------------- 1 | From e14024659e0fc2af3df6ec56ce39a8e93b75722d Mon Sep 17 00:00:00 2001 2 | From: Colin Samples 3 | Date: Sun, 8 Dec 2019 19:25:02 -0500 4 | Subject: [PATCH] Fix libdav1d compilation on clang ppc 5 | 6 | --- 7 | src/ppc/types.h | 15 +++++++++++++++ 8 | 1 file changed, 15 insertions(+) 9 | 10 | diff --git a/third_party/dav1d/libdav1d/src/ppc/types.h b/third_party/dav1d/libdav1d/src/ppc/types.h 11 | index 0b4bd72..a0caa5e 100644 12 | --- a/third_party/dav1d/libdav1d/src/ppc/types.h 13 | +++ b/third_party/dav1d/libdav1d/src/ppc/types.h 14 | @@ -51,4 +51,19 @@ 15 | #define u16l_to_i32(v) ((i32x4) vec_mergel((u16x8) v, vec_splat_u16(0))) 16 | #define i16l_to_i32(v) ((i32x4) vec_unpackl((i16x8)v)) 17 | 18 | +#if defined(__clang__) 19 | +#undef vec_splats 20 | +#define vec_splats(N) \ 21 | + _Generic((N), \ 22 | + unsigned char: ((u8x16)(N)), \ 23 | + signed char: ((i8x16)(N)), \ 24 | + unsigned short: ((u16x8)(N)), \ 25 | + signed short: ((i16x8)(N)), \ 26 | + unsigned int: ((u32x4)(N)), \ 27 | + signed int: ((i32x4)(N)), \ 28 | + unsigned long long: ((u64x2)(N)), \ 29 | + signed long long: ((i64x2)(N)) \ 30 | + ) 31 | +#endif 32 | + 33 | #endif /* DAV1D_SRC_PPC_TYPES_H */ 34 | -- 35 | 2.23.0 36 | 37 | -------------------------------------------------------------------------------- /patches/Revert-Vulkan-Disable-global-merge-for-volk.patch: -------------------------------------------------------------------------------- 1 | --- chromium-81.0.4044.92.orig/third_party/angle/src/third_party/volk/BUILD.gn 2 | +++ chromium-81.0.4044.92/third_party/angle/src/third_party/volk/BUILD.gn 3 | @@ -6,27 +6,12 @@ config("volk_config") { 4 | include_dirs = [ "." ] 5 | } 6 | 7 | -# TODO(anglebug.com/4351): Remove this after clang rolls. 8 | -config("volk_internal_config") { 9 | - if (is_clang) { 10 | - cflags = [ 11 | - "-Xclang", 12 | - "-mllvm", 13 | - "-Xclang", 14 | - "--enable-global-merge=false", 15 | - ] 16 | - } 17 | -} 18 | - 19 | source_set("volk") { 20 | sources = [ 21 | "volk.c", 22 | "volk.h", 23 | ] 24 | - public_configs = [ 25 | - ":volk_config", 26 | - ":volk_internal_config", 27 | - ] 28 | + public_configs = [ ":volk_config" ] 29 | public_deps = [ 30 | "../../../third_party/vulkan-headers/src:vulkan_headers", 31 | ] 32 | -------------------------------------------------------------------------------- /patches/aw-snap-temporary-patch.patch: -------------------------------------------------------------------------------- 1 | From c51e6a126bcd220c2243cba97daf1c226055c82b Mon Sep 17 00:00:00 2001 2 | From: Shawn Anastasio 3 | Date: Tue, 15 Oct 2019 19:22:15 -0500 4 | Subject: [PATCH] HACK: Disable format detection until buffer overflow is 5 | found/fixed 6 | 7 | --- 8 | libavformat/utils.c | 2 ++ 9 | 1 file changed, 2 insertions(+) 10 | 11 | diff --git a/libavformat/utils.c b/libavformat/utils.c 12 | index 66e4a66dc4..207f7e2135 100644 13 | --- a/third_party/ffmpeg/libavformat/utils.c 14 | +++ b/third_party/ffmpeg/libavformat/utils.c 15 | @@ -627,9 +627,11 @@ FF_ENABLE_DEPRECATION_WARNINGS 16 | ff_id3v2_read_dict(s->pb, &s->internal->id3v2_meta, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta); 17 | 18 | 19 | + /* 20 | if (!(s->flags&AVFMT_FLAG_PRIV_OPT) && s->iformat->read_header) 21 | if ((ret = s->iformat->read_header(s)) < 0) 22 | goto fail; 23 | + */ 24 | 25 | if (!s->metadata) { 26 | s->metadata = s->internal->id3v2_meta; 27 | -- 28 | 2.23.0 29 | 30 | -------------------------------------------------------------------------------- /patches/change-user-agent.patch: -------------------------------------------------------------------------------- 1 | --- chromium-81.0.4044.83.orig/content/common/user_agent.cc 2 | +++ chromium-81.0.4044.83/content/common/user_agent.cc 3 | @@ -87,7 +87,7 @@ std::string BuildCpuInfo() { 4 | sizeof(void*) == sizeof(int32_t)) { 5 | cpuinfo.assign("i686 (x86_64)"); 6 | } else { 7 | - cpuinfo.assign(unixinfo.machine); 8 | + cpuinfo.assign("x86_64"); 9 | } 10 | #endif 11 | 12 | --- chromium-81.0.4044.83.orig/third_party/blink/renderer/core/frame/navigator_id.cc 13 | +++ chromium-81.0.4044.83/third_party/blink/renderer/core/frame/navigator_id.cc 14 | @@ -83,7 +83,7 @@ String NavigatorID::platform() const { 15 | if (platform_name->IsNull()) { 16 | *platform_name = 17 | String(uname(&osname) >= 0 ? String(osname.sysname) + String(" ") + 18 | - String(osname.machine) 19 | + String("x86_64") 20 | : g_empty_string); 21 | } 22 | return *platform_name; 23 | -------------------------------------------------------------------------------- /patches/core/bromite/disable-fetching-field-trials.patch: -------------------------------------------------------------------------------- 1 | # NOTE: Modified to remove usage of compiler #if macros 2 | From: csagan5 <32685696+csagan5@users.noreply.github.com> 3 | Date: Sun, 8 Jul 2018 18:16:34 +0200 4 | Subject: Disable fetching of all field trials 5 | 6 | --- 7 | .../browser/flags/ChromeFeatureList.java | 19 ++++--------------- 8 | .../variations/service/variations_service.cc | 12 +----------- 9 | 2 files changed, 5 insertions(+), 26 deletions(-) 10 | 11 | --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java 12 | +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java 13 | @@ -122,9 +122,7 @@ public abstract class ChromeFeatureList 14 | * the specified parameter does not exist. 15 | */ 16 | public static String getFieldTrialParamByFeature(String featureName, String paramName) { 17 | - if (FeatureList.hasTestFeatures()) return ""; 18 | - assert FeatureList.isInitialized(); 19 | - return ChromeFeatureListJni.get().getFieldTrialParamByFeature(featureName, paramName); 20 | + return ""; 21 | } 22 | 23 | /** 24 | @@ -141,10 +139,7 @@ public abstract class ChromeFeatureList 25 | */ 26 | public static int getFieldTrialParamByFeatureAsInt( 27 | String featureName, String paramName, int defaultValue) { 28 | - if (FeatureList.hasTestFeatures()) return defaultValue; 29 | - assert FeatureList.isInitialized(); 30 | - return ChromeFeatureListJni.get().getFieldTrialParamByFeatureAsInt( 31 | - featureName, paramName, defaultValue); 32 | + return defaultValue; 33 | } 34 | 35 | /** 36 | @@ -161,10 +156,7 @@ public abstract class ChromeFeatureList 37 | */ 38 | public static double getFieldTrialParamByFeatureAsDouble( 39 | String featureName, String paramName, double defaultValue) { 40 | - if (FeatureList.hasTestFeatures()) return defaultValue; 41 | - assert FeatureList.isInitialized(); 42 | - return ChromeFeatureListJni.get().getFieldTrialParamByFeatureAsDouble( 43 | - featureName, paramName, defaultValue); 44 | + return defaultValue; 45 | } 46 | 47 | /** 48 | @@ -181,10 +173,7 @@ public abstract class ChromeFeatureList 49 | */ 50 | public static boolean getFieldTrialParamByFeatureAsBoolean( 51 | String featureName, String paramName, boolean defaultValue) { 52 | - if (FeatureList.hasTestFeatures()) return defaultValue; 53 | - assert FeatureList.isInitialized(); 54 | - return ChromeFeatureListJni.get().getFieldTrialParamByFeatureAsBoolean( 55 | - featureName, paramName, defaultValue); 56 | + return defaultValue; 57 | } 58 | 59 | /** Alphabetical: */ 60 | --- a/components/variations/service/variations_service.cc 61 | +++ b/components/variations/service/variations_service.cc 62 | @@ -239,17 +239,7 @@ bool GetInstanceManipulations(const net: 63 | // Variations seed fetching is only enabled in official Chrome builds, if a URL 64 | // is specified on the command line, and for testing. 65 | bool IsFetchingEnabled() { 66 | -#if !BUILDFLAG(GOOGLE_CHROME_BRANDING) 67 | - if (!base::CommandLine::ForCurrentProcess()->HasSwitch( 68 | - switches::kVariationsServerURL) && 69 | - !g_should_fetch_for_testing) { 70 | - DVLOG(1) 71 | - << "Not performing repeated fetching in unofficial build without --" 72 | - << switches::kVariationsServerURL << " specified."; 73 | - return false; 74 | - } 75 | -#endif 76 | - return true; 77 | + return false; 78 | } 79 | 80 | std::unique_ptr MaybeImportFirstRunSeed( 81 | -------------------------------------------------------------------------------- /patches/core/debian/disable/unrar.patch: -------------------------------------------------------------------------------- 1 | description: disable support for safe browsing inspection of rar files 2 | author: Michael Gilbert 3 | bug: http://bugs.debian.org/914487 4 | 5 | --- a/chrome/browser/safe_browsing/download_protection/file_analyzer.cc 6 | +++ b/chrome/browser/safe_browsing/download_protection/file_analyzer.cc 7 | @@ -90,7 +90,7 @@ void FileAnalyzer::Start(const base::Fil 8 | if (inspection_type == DownloadFileType::ZIP) { 9 | StartExtractZipFeatures(); 10 | } else if (inspection_type == DownloadFileType::RAR) { 11 | - StartExtractRarFeatures(); 12 | + LOG(WARNING) << "Safebrowser inspection of rar files is disabled in this build"; 13 | #if defined(OS_MAC) 14 | } else if (inspection_type == DownloadFileType::DMG) { 15 | StartExtractDmgFeatures(); 16 | --- a/chrome/common/safe_browsing/BUILD.gn 17 | +++ b/chrome/common/safe_browsing/BUILD.gn 18 | @@ -43,39 +43,6 @@ if (safe_browsing_mode == 1) { 19 | public_deps = [ "//components/safe_browsing/core:csd_proto" ] 20 | } 21 | 22 | - source_set("rar_analyzer") { 23 | - sources = [ 24 | - "rar_analyzer.cc", 25 | - "rar_analyzer.h", 26 | - ] 27 | - 28 | - deps = [ 29 | - ":archive_analyzer_results", 30 | - ":download_type_util", 31 | - "//base", 32 | - "//base:i18n", 33 | - "//components/safe_browsing/core:features", 34 | - "//components/safe_browsing/core:file_type_policies", 35 | - "//third_party/unrar:unrar", 36 | - ] 37 | - 38 | - defines = [ 39 | - "_FILE_OFFSET_BITS=64", 40 | - "LARGEFILE_SOURCE", 41 | - "RAR_SMP", 42 | - "SILENT", 43 | - 44 | - # The following is set to disable certain macro definitions in the unrar 45 | - # source code. 46 | - "CHROMIUM_UNRAR", 47 | - 48 | - # Disables exceptions in unrar, replaces them with process termination. 49 | - "UNRAR_NO_EXCEPTIONS", 50 | - ] 51 | - 52 | - public_deps = [ "//components/safe_browsing/core:csd_proto" ] 53 | - } 54 | - 55 | if (is_mac) { 56 | source_set("disk_image_type_sniffer_mac") { 57 | sources = [ 58 | @@ -145,7 +112,6 @@ source_set("safe_browsing") { 59 | ":archive_analyzer_results", 60 | ":binary_feature_extractor", 61 | ":download_type_util", 62 | - ":rar_analyzer", 63 | "//components/safe_browsing/core:features", 64 | ] 65 | 66 | --- a/chrome/services/file_util/safe_archive_analyzer.cc 67 | +++ b/chrome/services/file_util/safe_archive_analyzer.cc 68 | @@ -7,7 +7,6 @@ 69 | #include "base/macros.h" 70 | #include "build/build_config.h" 71 | #include "chrome/common/safe_browsing/archive_analyzer_results.h" 72 | -#include "chrome/common/safe_browsing/rar_analyzer.h" 73 | #include "chrome/common/safe_browsing/zip_analyzer.h" 74 | 75 | #if defined(OS_MAC) 76 | @@ -47,8 +46,7 @@ void SafeArchiveAnalyzer::AnalyzeRarFile 77 | AnalyzeRarFileCallback callback) { 78 | DCHECK(rar_file.IsValid()); 79 | 80 | + LOG(FATAL) << "AnalyzeRarFile is disabled in this build"; 81 | safe_browsing::ArchiveAnalyzerResults results; 82 | - safe_browsing::rar_analyzer::AnalyzeRarFile( 83 | - std::move(rar_file), std::move(temporary_file), &results); 84 | std::move(callback).Run(results); 85 | } 86 | -------------------------------------------------------------------------------- /patches/core/inox-patchset/0003-disable-autofill-download-manager.patch: -------------------------------------------------------------------------------- 1 | --- a/components/autofill/core/browser/autofill_download_manager.cc 2 | +++ b/components/autofill/core/browser/autofill_download_manager.cc 3 | @@ -826,87 +826,6 @@ AutofillDownloadManager::GetRequestURLAn 4 | } 5 | 6 | bool AutofillDownloadManager::StartRequest(FormRequestData request_data) { 7 | - scoped_refptr url_loader_factory = 8 | - driver_->GetURLLoaderFactory(); 9 | - DCHECK(url_loader_factory); 10 | - 11 | - // Get the URL and method to use for this request. 12 | - std::string method; 13 | - GURL request_url; 14 | - std::tie(request_url, method) = GetRequestURLAndMethodForApi(request_data); 15 | - 16 | - // Track the URL length for GET queries because the URL length can be in the 17 | - // thousands when rich metadata is enabled. 18 | - if (request_data.request_type == AutofillDownloadManager::REQUEST_QUERY && 19 | - method == "GET") { 20 | - UMA_HISTOGRAM_COUNTS_100000("Autofill.Query.GetUrlLength", 21 | - request_url.spec().length()); 22 | - } 23 | - 24 | - auto resource_request = std::make_unique(); 25 | - resource_request->url = request_url; 26 | - resource_request->credentials_mode = network::mojom::CredentialsMode::kOmit; 27 | - resource_request->method = method; 28 | - 29 | - // On iOS we have a single, shared URLLoaderFactory provided by BrowserState. 30 | - // As it is shared, it is not trusted and we cannot assign trusted_params 31 | - // to the network request. 32 | -#if !defined(OS_IOS) 33 | - resource_request->trusted_params = network::ResourceRequest::TrustedParams(); 34 | - resource_request->trusted_params->isolation_info = driver_->IsolationInfo(); 35 | -#endif 36 | - 37 | - // Add Chrome experiment state to the request headers. 38 | - variations::AppendVariationsHeaderUnknownSignedIn( 39 | - request_url, 40 | - driver_->IsIncognito() ? variations::InIncognito::kYes 41 | - : variations::InIncognito::kNo, 42 | - resource_request.get()); 43 | - 44 | - // Set headers specific to the API. 45 | - // Encode response serialized proto in base64 for safety. 46 | - resource_request->headers.SetHeader(kGoogEncodeResponseIfExecutable, 47 | - "base64"); 48 | - 49 | - // Put API key in request's header if a key exists, and the endpoint is 50 | - // trusted by Google. 51 | - if (!api_key_.empty() && request_url.SchemeIs(url::kHttpsScheme) && 52 | - google_util::IsGoogleAssociatedDomainUrl(request_url)) { 53 | - resource_request->headers.SetHeader(kGoogApiKey, api_key_); 54 | - } 55 | - 56 | - auto simple_loader = network::SimpleURLLoader::Create( 57 | - std::move(resource_request), 58 | - GetNetworkTrafficAnnotation(request_data.request_type)); 59 | - 60 | - // This allows reading the error message within the API response when status 61 | - // is not 200 (e.g., 400). Otherwise, URL loader will not give any content in 62 | - // the response when there is a failure, which makes debugging hard. 63 | - simple_loader->SetAllowHttpErrorResults(true); 64 | - 65 | - if (method == "POST") { 66 | - const std::string content_type = "application/x-protobuf"; 67 | - std::string payload; 68 | - if (!GetAPIBodyPayload(request_data.payload, request_data.request_type, 69 | - &payload)) { 70 | - return false; 71 | - } 72 | - 73 | - // Attach payload data and add data format header. 74 | - simple_loader->AttachStringForUpload(payload, content_type); 75 | - } 76 | - 77 | - // Transfer ownership of the loader into url_loaders_. Temporarily hang 78 | - // onto the raw pointer to use it as a key and to kick off the request; 79 | - // transferring ownership (std::move) invalidates the |simple_loader| 80 | - // variable. 81 | - auto* raw_simple_loader = simple_loader.get(); 82 | - url_loaders_.push_back(std::move(simple_loader)); 83 | - raw_simple_loader->DownloadToStringOfUnboundedSizeUntilCrashAndDie( 84 | - url_loader_factory.get(), 85 | - base::BindOnce(&AutofillDownloadManager::OnSimpleLoaderComplete, 86 | - base::Unretained(this), std::move(--url_loaders_.end()), 87 | - std::move(request_data), AutofillTickClock::NowTicks())); 88 | return true; 89 | } 90 | 91 | -------------------------------------------------------------------------------- /patches/core/inox-patchset/0005-disable-default-extensions.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/extensions/component_extensions_allowlist/allowlist.cc 2 | +++ b/chrome/browser/extensions/component_extensions_allowlist/allowlist.cc 3 | @@ -27,7 +27,6 @@ namespace extensions { 4 | 5 | bool IsComponentExtensionAllowlisted(const std::string& extension_id) { 6 | const char* const kAllowed[] = { 7 | - extension_misc::kInAppPaymentsSupportAppId, 8 | extension_misc::kCastExtensionIdRelease, 9 | extension_misc::kPdfExtensionId, 10 | #if BUILDFLAG(IS_CHROMEOS_ASH) 11 | --- a/chrome/browser/extensions/component_loader.cc 12 | +++ b/chrome/browser/extensions/component_loader.cc 13 | @@ -350,11 +350,6 @@ void ComponentLoader::AddWebStoreApp() { 14 | if (!IsNormalSession()) 15 | return; 16 | #endif 17 | - 18 | - AddWithNameAndDescription( 19 | - IDR_WEBSTORE_MANIFEST, base::FilePath(FILE_PATH_LITERAL("web_store")), 20 | - l10n_util::GetStringUTF8(IDS_WEBSTORE_NAME_STORE), 21 | - l10n_util::GetStringUTF8(IDS_WEBSTORE_APP_DESCRIPTION)); 22 | } 23 | 24 | #if BUILDFLAG(IS_CHROMEOS_ASH) 25 | @@ -521,18 +516,6 @@ void ComponentLoader::AddDefaultComponen 26 | AddHangoutServicesExtension(); 27 | #endif // BUILDFLAG(ENABLE_HANGOUT_SERVICES_EXTENSION) 28 | 29 | - bool install_feedback = enable_background_extensions_during_testing; 30 | -#if BUILDFLAG(GOOGLE_CHROME_BRANDING) 31 | - install_feedback = true; 32 | -#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) 33 | - if (install_feedback) { 34 | - AddWithNameAndDescription( 35 | - IDR_FEEDBACK_MANIFEST, base::FilePath(FILE_PATH_LITERAL("feedback")), 36 | - l10n_util::GetStringUTF8(IDS_FEEDBACK_REPORT_APP_TITLE), 37 | - // Description string 38 | - l10n_util::GetStringUTF8(IDS_FEEDBACK_REPORT_PAGE_TITLE)); 39 | - } 40 | - 41 | #if BUILDFLAG(IS_CHROMEOS_ASH) 42 | AddChromeCameraApp(); 43 | AddVideoPlayerExtension(); 44 | --- a/chrome/browser/extensions/external_component_loader.cc 45 | +++ b/chrome/browser/extensions/external_component_loader.cc 46 | @@ -32,9 +32,6 @@ ExternalComponentLoader::~ExternalCompon 47 | 48 | void ExternalComponentLoader::StartLoading() { 49 | auto prefs = std::make_unique(); 50 | -#if BUILDFLAG(GOOGLE_CHROME_BRANDING) 51 | - AddExternalExtension(extension_misc::kInAppPaymentsSupportAppId, prefs.get()); 52 | -#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) 53 | 54 | #if BUILDFLAG(IS_CHROMEOS_ASH) 55 | { 56 | --- a/chrome/browser/extensions/webstore_installer.cc 57 | +++ b/chrome/browser/extensions/webstore_installer.cc 58 | @@ -552,20 +552,6 @@ void WebstoreInstaller::DownloadNextPend 59 | void WebstoreInstaller::DownloadCrx( 60 | const std::string& extension_id, 61 | InstallSource source) { 62 | - download_url_ = GetWebstoreInstallURL(extension_id, source); 63 | - MaybeAppendAuthUserParameter(approval_->authuser, &download_url_); 64 | - 65 | - base::FilePath user_data_dir; 66 | - base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); 67 | - base::FilePath download_path = user_data_dir.Append(kWebstoreDownloadFolder); 68 | - 69 | - base::FilePath download_directory(g_download_directory_for_tests ? 70 | - *g_download_directory_for_tests : download_path); 71 | - 72 | - base::PostTaskAndReplyWithResult( 73 | - GetExtensionFileTaskRunner().get(), FROM_HERE, 74 | - base::BindOnce(&GetDownloadFilePath, download_directory, extension_id), 75 | - base::BindOnce(&WebstoreInstaller::StartDownload, this, extension_id)); 76 | } 77 | 78 | // http://crbug.com/165634 79 | @@ -710,21 +696,6 @@ void WebstoreInstaller::UpdateDownloadPr 80 | void WebstoreInstaller::StartCrxInstaller(const DownloadItem& download) { 81 | DCHECK_CURRENTLY_ON(BrowserThread::UI); 82 | DCHECK(!crx_installer_.get()); 83 | - 84 | - ExtensionService* service = ExtensionSystem::Get(profile_)-> 85 | - extension_service(); 86 | - CHECK(service); 87 | - 88 | - const Approval* approval = GetAssociatedApproval(download); 89 | - DCHECK(approval); 90 | - 91 | - crx_installer_ = download_crx_util::CreateCrxInstaller(profile_, download); 92 | - 93 | - crx_installer_->set_expected_id(approval->extension_id); 94 | - crx_installer_->set_is_gallery_install(true); 95 | - crx_installer_->set_allow_silent_install(true); 96 | - 97 | - crx_installer_->InstallCrx(download.GetFullPath()); 98 | } 99 | 100 | void WebstoreInstaller::ReportFailure(const std::string& error, 101 | -------------------------------------------------------------------------------- /patches/core/inox-patchset/0007-disable-web-resource-service.patch: -------------------------------------------------------------------------------- 1 | --- a/components/web_resource/web_resource_service.cc 2 | +++ b/components/web_resource/web_resource_service.cc 3 | @@ -120,44 +120,7 @@ bool WebResourceService::GetFetchSchedul 4 | // Initializes the fetching of data from the resource server. Data 5 | // load calls OnSimpleLoaderComplete. 6 | void WebResourceService::StartFetch() { 7 | - // Set to false so that next fetch can be scheduled after this fetch or 8 | - // if we receive notification that resource is allowed. 9 | - fetch_scheduled_ = false; 10 | - // Check whether fetching is allowed. 11 | - if (!resource_request_allowed_notifier_->ResourceRequestsAllowed()) 12 | - return; 13 | - 14 | - // First, put our next cache load on the MessageLoop. 15 | - ScheduleFetch(cache_update_delay_ms_); 16 | - 17 | - // Set cache update time in preferences. 18 | - prefs_->SetString(last_update_time_pref_name_, 19 | - base::NumberToString(base::Time::Now().ToDoubleT())); 20 | - 21 | - // If we are still fetching data, exit. 22 | - if (in_fetch_) 23 | - return; 24 | - in_fetch_ = true; 25 | - 26 | - GURL web_resource_server = 27 | - application_locale_.empty() 28 | - ? web_resource_server_ 29 | - : google_util::AppendGoogleLocaleParam(web_resource_server_, 30 | - application_locale_); 31 | - 32 | - DVLOG(1) << "WebResourceService StartFetch " << web_resource_server; 33 | - auto resource_request = std::make_unique(); 34 | - resource_request->url = web_resource_server; 35 | - // Do not let url fetcher affect existing state in system context 36 | - // (by setting cookies, for example). 37 | - resource_request->load_flags = net::LOAD_DISABLE_CACHE; 38 | - resource_request->credentials_mode = network::mojom::CredentialsMode::kOmit; 39 | - simple_url_loader_ = network::SimpleURLLoader::Create( 40 | - std::move(resource_request), traffic_annotation_); 41 | - simple_url_loader_->DownloadToStringOfUnboundedSizeUntilCrashAndDie( 42 | - url_loader_factory_.get(), 43 | - base::BindOnce(&WebResourceService::OnSimpleLoaderComplete, 44 | - base::Unretained(this))); 45 | + in_fetch_ = false; 46 | } 47 | 48 | void WebResourceService::EndFetch() { 49 | -------------------------------------------------------------------------------- /patches/core/inox-patchset/0009-disable-google-ipv6-probes.patch: -------------------------------------------------------------------------------- 1 | --- a/net/dns/host_resolver_manager.cc 2 | +++ b/net/dns/host_resolver_manager.cc 3 | @@ -132,10 +132,10 @@ const unsigned kMinimumTTLSeconds = kCac 4 | // cached. 5 | const int kIPv6ProbePeriodMs = 1000; 6 | 7 | -// Google DNS address used for IPv6 probes. 8 | -const uint8_t kIPv6ProbeAddress[] = {0x20, 0x01, 0x48, 0x60, 0x48, 0x60, 9 | +// RIPE NCC k.root-servers.net. 2001:7fd::1 (anycasted), used for IPv6 probes. 10 | +const uint8_t kIPv6ProbeAddress[] = {0x20, 0x01, 0x07, 0xfd, 0x00, 0x00, 11 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 12 | - 0x00, 0x00, 0x88, 0x88}; 13 | + 0x00, 0x00, 0x00, 0x01}; 14 | 15 | enum DnsResolveStatus { 16 | RESOLVE_STATUS_DNS_SUCCESS = 0, 17 | -------------------------------------------------------------------------------- /patches/core/inox-patchset/0015-disable-update-pings.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/updater/configurator.cc 2 | +++ b/chrome/updater/configurator.cc 3 | @@ -67,7 +67,7 @@ int Configurator::UpdateDelay() const { 4 | } 5 | 6 | std::vector Configurator::UpdateUrl() const { 7 | - return external_constants_->UpdateURL(); 8 | + return std::vector; 9 | } 10 | 11 | std::vector Configurator::PingUrl() const { 12 | -------------------------------------------------------------------------------- /patches/core/inox-patchset/0017-disable-new-avatar-menu.patch: -------------------------------------------------------------------------------- 1 | --- a/components/signin/internal/identity_manager/primary_account_policy_manager_impl.cc 2 | +++ b/components/signin/internal/identity_manager/primary_account_policy_manager_impl.cc 3 | @@ -86,7 +86,7 @@ void PrimaryAccountPolicyManagerImpl::On 4 | } 5 | 6 | bool PrimaryAccountPolicyManagerImpl::IsSigninAllowed() const { 7 | - return signin_allowed_.GetValue(); 8 | + return false; 9 | } 10 | 11 | void PrimaryAccountPolicyManagerImpl::OnSigninAllowedPrefChanged( 12 | -------------------------------------------------------------------------------- /patches/core/inox-patchset/0021-disable-rlz.patch: -------------------------------------------------------------------------------- 1 | # Disable rlz 2 | 3 | --- a/BUILD.gn 4 | +++ b/BUILD.gn 5 | @@ -449,14 +449,6 @@ group("gn_all") { 6 | ] 7 | } 8 | 9 | - if (is_chromeos_ash || is_mac || is_win) { 10 | - deps += [ 11 | - "//rlz:rlz_id", 12 | - "//rlz:rlz_lib", 13 | - "//rlz:rlz_unittests", 14 | - ] 15 | - } 16 | - 17 | if (is_linux || is_chromeos) { 18 | # The following are definitely linux-only. 19 | deps += [ 20 | --- a/rlz/buildflags/buildflags.gni 21 | +++ b/rlz/buildflags/buildflags.gni 22 | @@ -7,6 +7,6 @@ import("//build/config/chromeos/ui_mode. 23 | 24 | # Whether we are using the rlz library or not. Platforms like Android send 25 | # rlz codes for searches but do not use the library. 26 | -enable_rlz_support = is_win || is_apple || is_chromeos_ash 27 | +enable_rlz_support = false 28 | 29 | enable_rlz = is_chrome_branded && enable_rlz_support 30 | -------------------------------------------------------------------------------- /patches/core/iridium-browser/safe_browsing-disable-incident-reporting.patch: -------------------------------------------------------------------------------- 1 | From 4dfa8ed0814040317cb82d8545502186daa0a204 Mon Sep 17 00:00:00 2001 2 | From: Jan Engelhardt 3 | Date: Tue, 7 Jul 2015 17:02:09 +0200 4 | Subject: [PATCH 62/76] safe_browsing: disable incident reporting 5 | 6 | Disables the safebrowsing incident reporting where you could upload 7 | information about a blocked URL to Google (also added a trk prefix to 8 | the URL so we get notified if this happens again in the future). 9 | --- 10 | .../incident_reporting/incident_report_uploader_impl.cc | 2 +- 11 | .../incident_reporting/incident_reporting_service.cc | 3 +++ 12 | chrome/browser/safe_browsing/safe_browsing_blocking_page.cc | 3 +-- 13 | chrome/browser/safe_browsing/safe_browsing_service.cc | 2 +- 14 | .../security_interstitials/core/safe_browsing_loud_error_ui.cc | 1 + 15 | 5 files changed, 7 insertions(+), 4 deletions(-) 16 | 17 | --- a/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc 18 | +++ b/chrome/browser/safe_browsing/incident_reporting/incident_report_uploader_impl.cc 19 | @@ -24,7 +24,7 @@ namespace safe_browsing { 20 | namespace { 21 | 22 | const char kSbIncidentReportUrl[] = 23 | - "https://sb-ssl.google.com/safebrowsing/clientreport/incident"; 24 | + "trk:268:https://sb-ssl.google.com/safebrowsing/clientreport/incident"; 25 | 26 | constexpr net::NetworkTrafficAnnotationTag 27 | kSafeBrowsingIncidentTrafficAnnotation = 28 | --- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc 29 | +++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc 30 | @@ -303,11 +303,14 @@ IncidentReportingService::UploadContext: 31 | 32 | // static 33 | bool IncidentReportingService::IsEnabledForProfile(Profile* profile) { 34 | + return false; 35 | +#if 0 36 | if (profile->IsOffTheRecord()) 37 | return false; 38 | if (!IsSafeBrowsingEnabled(*profile->GetPrefs())) 39 | return false; 40 | return IsExtendedReportingEnabled(*profile->GetPrefs()); 41 | +#endif 42 | } 43 | 44 | IncidentReportingService::IncidentReportingService( 45 | --- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc 46 | +++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc 47 | @@ -65,8 +65,7 @@ class SafeBrowsingBlockingPageFactoryImp 48 | PrefService* prefs = 49 | Profile::FromBrowserContext(web_contents->GetBrowserContext()) 50 | ->GetPrefs(); 51 | - bool is_extended_reporting_opt_in_allowed = 52 | - IsExtendedReportingOptInAllowed(*prefs); 53 | + bool is_extended_reporting_opt_in_allowed = false; 54 | bool is_proceed_anyway_disabled = 55 | prefs->GetBoolean(prefs::kSafeBrowsingProceedAnywayDisabled); 56 | 57 | --- a/chrome/browser/safe_browsing/safe_browsing_service.cc 58 | +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc 59 | @@ -260,7 +260,7 @@ SafeBrowsingUIManager* SafeBrowsingServi 60 | } 61 | 62 | void SafeBrowsingService::RegisterAllDelayedAnalysis() { 63 | -#if BUILDFLAG(FULL_SAFE_BROWSING) 64 | +#if 0 65 | RegisterBinaryIntegrityAnalysis(); 66 | #endif 67 | } 68 | --- a/components/security_interstitials/core/safe_browsing_loud_error_ui.cc 69 | +++ b/components/security_interstitials/core/safe_browsing_loud_error_ui.cc 70 | @@ -25,11 +25,11 @@ namespace { 71 | // For malware interstitial pages, we link the problematic URL to Google's 72 | // diagnostic page. 73 | const char kSbDiagnosticUrl[] = 74 | - "https://transparencyreport.google.com/safe-browsing/search?url=%s"; 75 | + "trk:227:https://transparencyreport.google.com/safe-browsing/search?url=%s"; 76 | 77 | // Constants for the V4 phishing string upgrades. 78 | const char kReportPhishingErrorUrl[] = 79 | - "https://safebrowsing.google.com/safebrowsing/report_error/?url=%s"; 80 | + "trk:228:https://safebrowsing.google.com/safebrowsing/report_error/?url=%s"; 81 | 82 | void RecordExtendedReportingPrefChanged(bool report) { 83 | UMA_HISTOGRAM_BOOLEAN("SafeBrowsing.Pref.Extended.SecurityInterstitial", 84 | -------------------------------------------------------------------------------- /patches/core/iridium-browser/safe_browsing-disable-reporting-of-safebrowsing-over.patch: -------------------------------------------------------------------------------- 1 | From c89ce946e5328ca8a7df923d421e904bb6bfe9b6 Mon Sep 17 00:00:00 2001 2 | From: Jan Engelhardt 3 | Date: Tue, 7 Jul 2015 18:28:46 +0200 4 | Subject: [PATCH 63/76] safe_browsing: disable reporting of safebrowsing 5 | override 6 | 7 | Disables reporting of the safebrowsing override, i.e. the report sent 8 | if a user decides to visit a page that was flagged as "insecure". 9 | This prevents trk:148 (phishing) and trk:149 (malware). 10 | --- 11 | components/safe_browsing/content/browser/client_side_detection_service.cc | 5 +++++ 12 | 1 file changed, 5 insertions(+) 13 | 14 | --- a/components/safe_browsing/content/browser/client_side_detection_service.cc 15 | +++ b/components/safe_browsing/content/browser/client_side_detection_service.cc 16 | @@ -216,6 +216,10 @@ void ClientSideDetectionService::StartCl 17 | return; 18 | } 19 | 20 | +#if 1 21 | + if (!callback.is_null()) 22 | + callback.Run(GURL(request->url()), false); 23 | +#else 24 | // Fill in metadata about which model we used. 25 | request->set_model_filename(model_loader_->name()); 26 | if (is_extended_reporting || is_enhanced_reporting) { 27 | @@ -293,6 +297,7 @@ void ClientSideDetectionService::StartCl 28 | 29 | // Record that we made a request 30 | phishing_report_times_.push(base::Time::Now()); 31 | +#endif 32 | } 33 | 34 | void ClientSideDetectionService::HandlePhishingVerdict( 35 | -------------------------------------------------------------------------------- /patches/core/ungoogled-chromium/block-requests.patch: -------------------------------------------------------------------------------- 1 | ## Prevent request attempts 2 | # chrome://discards/ attempts to use d3 to display the graph 3 | --- a/chrome/browser/resources/discards/graph_doc_template.html 4 | +++ b/chrome/browser/resources/discards/graph_doc_template.html 5 | @@ -78,10 +78,6 @@ URL. As result, this document needs to b 6 | } 7 | 8 | 9 | - 13 | 16 | --- a/chrome/browser/search/background/ntp_background_service.cc 17 | +++ b/chrome/browser/search/background/ntp_background_service.cc 18 | @@ -61,6 +61,7 @@ void NtpBackgroundService::Shutdown() { 19 | } 20 | 21 | void NtpBackgroundService::FetchCollectionInfo() { 22 | + return; 23 | if (collections_loader_ != nullptr) 24 | return; 25 | collection_error_info_.ClearError(); 26 | --- a/chrome/browser/search/one_google_bar/one_google_bar_loader_impl.cc 27 | +++ b/chrome/browser/search/one_google_bar/one_google_bar_loader_impl.cc 28 | @@ -285,6 +285,7 @@ OneGoogleBarLoaderImpl::OneGoogleBarLoad 29 | OneGoogleBarLoaderImpl::~OneGoogleBarLoaderImpl() = default; 30 | 31 | void OneGoogleBarLoaderImpl::Load(OneGoogleCallback callback) { 32 | + return; 33 | callbacks_.push_back(std::move(callback)); 34 | 35 | // Note: If there is an ongoing request, abandon it. It's possible that 36 | --- a/chrome/browser/search/promos/promo_service.cc 37 | +++ b/chrome/browser/search/promos/promo_service.cc 38 | @@ -138,6 +138,7 @@ PromoService::PromoService( 39 | PromoService::~PromoService() = default; 40 | 41 | void PromoService::Refresh() { 42 | + return; 43 | if (extensions::ShouldShowExtensionsCheckupPromo(profile_)) { 44 | ServeExtensionCheckupPromo(); 45 | return; 46 | --- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc 47 | +++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc 48 | @@ -285,6 +285,7 @@ GURL SpellcheckHunspellDictionary::GetDi 49 | } 50 | 51 | void SpellcheckHunspellDictionary::DownloadDictionary(GURL url) { 52 | + return; 53 | DCHECK_CURRENTLY_ON(BrowserThread::UI); 54 | DCHECK(browser_context_); 55 | 56 | --- a/components/assist_ranker/ranker_url_fetcher.cc 57 | +++ b/components/assist_ranker/ranker_url_fetcher.cc 58 | @@ -31,6 +31,7 @@ bool RankerURLFetcher::Request( 59 | const GURL& url, 60 | RankerURLFetcher::Callback callback, 61 | network::mojom::URLLoaderFactory* url_loader_factory) { 62 | + return false; 63 | // This function is not supposed to be called if the previous operation is not 64 | // finished. 65 | if (state_ == REQUESTING) { 66 | --- a/components/update_client/update_checker.cc 67 | +++ b/components/update_client/update_checker.cc 68 | @@ -128,6 +128,7 @@ void UpdateCheckerImpl::CheckForUpdates( 69 | const base::flat_map& additional_attributes, 70 | bool enabled_component_updates, 71 | UpdateCheckCallback update_check_callback) { 72 | + return; 73 | DCHECK(thread_checker_.CalledOnValidThread()); 74 | 75 | ids_checked_ = ids_checked; 76 | -------------------------------------------------------------------------------- /patches/core/ungoogled-chromium/disable-crash-reporter.patch: -------------------------------------------------------------------------------- 1 | # Disable some background communication with clients2.google.com 2 | 3 | --- a/chrome/browser/tracing/crash_service_uploader.cc 4 | +++ b/chrome/browser/tracing/crash_service_uploader.cc 5 | @@ -130,11 +130,16 @@ void TraceCrashServiceUploader::DoUpload 6 | progress_callback_ = progress_callback; 7 | done_callback_ = std::move(done_callback); 8 | 9 | - base::ThreadPool::PostTask( 10 | + if (!progress_callback_.is_null()) { 11 | + base::ThreadPool::PostTask( 12 | FROM_HERE, {base::TaskPriority::BEST_EFFORT}, 13 | - base::BindOnce(&TraceCrashServiceUploader::DoCompressOnBackgroundThread, 14 | - base::Unretained(this), file_contents, upload_mode, 15 | - upload_url_, std::move(metadata))); 16 | + base::Bind(progress_callback_, 1, 1)); 17 | + } 18 | + if (!done_callback_.is_null()) { 19 | + base::ThreadPool::PostTask( 20 | + FROM_HERE, {base::TaskPriority::BEST_EFFORT}, 21 | + base::BindOnce(std::move(done_callback_), true, "Upload skipped.")); 22 | + } 23 | } 24 | 25 | void TraceCrashServiceUploader::DoCompressOnBackgroundThread( 26 | @@ -307,6 +312,7 @@ bool TraceCrashServiceUploader::Compress 27 | void TraceCrashServiceUploader::CreateAndStartURLLoader( 28 | const std::string& upload_url, 29 | const std::string& post_data) { 30 | + return; 31 | DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 32 | DCHECK(!simple_url_loader_); 33 | 34 | --- a/third_party/breakpad/breakpad/src/client/linux/sender/google_crash_report_sender.cc 35 | +++ b/third_party/breakpad/breakpad/src/client/linux/sender/google_crash_report_sender.cc 36 | @@ -85,6 +85,7 @@ bool CheckForRequiredFlagsOrDie() { 37 | } 38 | 39 | int main(int argc, char* argv[]) { 40 | + return 0; 41 | google::InitGoogleLogging(argv[0]); 42 | google::ParseCommandLineFlags(&argc, &argv, true); 43 | if (!CheckForRequiredFlagsOrDie()) { 44 | -------------------------------------------------------------------------------- /patches/core/ungoogled-chromium/disable-gaia.patch: -------------------------------------------------------------------------------- 1 | # Disables Gaia code 2 | # Somehow it is still activated even without being signed-in: https://github.com/Eloston/ungoogled-chromium/issues/104 3 | 4 | --- a/google_apis/gaia/gaia_auth_fetcher.cc 5 | +++ b/google_apis/gaia/gaia_auth_fetcher.cc 6 | @@ -294,65 +294,6 @@ void GaiaAuthFetcher::CreateAndStartGaia 7 | network::mojom::CredentialsMode credentials_mode, 8 | const net::NetworkTrafficAnnotationTag& traffic_annotation) { 9 | DCHECK(!fetch_pending_) << "Tried to fetch two things at once!"; 10 | - 11 | - auto resource_request = std::make_unique(); 12 | - resource_request->url = gaia_gurl; 13 | - original_url_ = gaia_gurl; 14 | - 15 | - if (credentials_mode != network::mojom::CredentialsMode::kOmit) { 16 | - DCHECK_EQ(GaiaUrls::GetInstance()->gaia_url(), gaia_gurl.GetOrigin()) 17 | - << gaia_gurl; 18 | - url::Origin origin = 19 | - url::Origin::Create(GaiaUrls::GetInstance()->gaia_url()); 20 | - resource_request->site_for_cookies = 21 | - net::SiteForCookies::FromOrigin(origin); 22 | - resource_request->trusted_params = 23 | - network::ResourceRequest::TrustedParams(); 24 | - resource_request->trusted_params->isolation_info = 25 | - net::IsolationInfo::CreateForInternalRequest(origin); 26 | - } 27 | - 28 | - if (!body.empty()) 29 | - resource_request->method = "POST"; 30 | - 31 | - if (!headers.empty()) 32 | - resource_request->headers.AddHeadersFromString(headers); 33 | - 34 | - // The Gaia token exchange requests do not require any cookie-based 35 | - // identification as part of requests. We suppress sending any cookies to 36 | - // maintain a separation between the user's browsing and Chrome's internal 37 | - // services. Where such mixing is desired (MergeSession or OAuthLogin), it 38 | - // will be done explicitly. 39 | - resource_request->credentials_mode = credentials_mode; 40 | - 41 | - url_loader_ = network::SimpleURLLoader::Create(std::move(resource_request), 42 | - traffic_annotation); 43 | - if (!body.empty()) { 44 | - DCHECK(!body_content_type.empty()); 45 | - url_loader_->AttachStringForUpload(body, body_content_type); 46 | - } 47 | - 48 | - url_loader_->SetAllowHttpErrorResults(true); 49 | - 50 | - VLOG(2) << "Gaia fetcher URL: " << gaia_gurl.spec(); 51 | - VLOG(2) << "Gaia fetcher headers: " << headers; 52 | - VLOG(2) << "Gaia fetcher body: " << body; 53 | - 54 | - // Fetchers are sometimes cancelled because a network change was detected, 55 | - // especially at startup and after sign-in on ChromeOS. Retrying once should 56 | - // be enough in those cases; let the fetcher retry up to 3 times just in case. 57 | - // http://crbug.com/163710 58 | - url_loader_->SetRetryOptions( 59 | - 3, network::SimpleURLLoader::RETRY_ON_NETWORK_CHANGE); 60 | - 61 | - fetch_pending_ = true; 62 | - 63 | - // Unretained is OK below as |url_loader_| is owned by this. 64 | - url_loader_->DownloadToString( 65 | - url_loader_factory_.get(), 66 | - base::BindOnce(&GaiaAuthFetcher::OnURLLoadComplete, 67 | - base::Unretained(this)), 68 | - kMaxMessageSize); 69 | } 70 | 71 | // static 72 | -------------------------------------------------------------------------------- /patches/core/ungoogled-chromium/disable-gcm.patch: -------------------------------------------------------------------------------- 1 | # Disable Google Cloud Messaging (GCM) client 2 | 3 | --- a/components/gcm_driver/gcm_client_impl.cc 4 | +++ b/components/gcm_driver/gcm_client_impl.cc 5 | @@ -467,6 +467,7 @@ void GCMClientImpl::StartGCM() { 6 | 7 | void GCMClientImpl::InitializeMCSClient() { 8 | DCHECK(network_connection_tracker_); 9 | + return; 10 | std::vector endpoints; 11 | endpoints.push_back(gservices_settings_.GetMCSMainEndpoint()); 12 | GURL fallback_endpoint = gservices_settings_.GetMCSFallbackEndpoint(); 13 | @@ -672,27 +673,6 @@ void GCMClientImpl::RemoveHeartbeatInter 14 | 15 | void GCMClientImpl::StartCheckin() { 16 | DCHECK(io_task_runner_->RunsTasksInCurrentSequence()); 17 | - 18 | - // Make sure no checkin is in progress. 19 | - if (checkin_request_) 20 | - return; 21 | - 22 | - checkin_proto::ChromeBuildProto chrome_build_proto; 23 | - ToCheckinProtoVersion(chrome_build_info_, &chrome_build_proto); 24 | - CheckinRequest::RequestInfo request_info(device_checkin_info_.android_id, 25 | - device_checkin_info_.secret, 26 | - device_checkin_info_.account_tokens, 27 | - gservices_settings_.digest(), 28 | - chrome_build_proto); 29 | - checkin_request_.reset(new CheckinRequest( 30 | - gservices_settings_.GetCheckinURL(), request_info, GetGCMBackoffPolicy(), 31 | - base::BindOnce(&GCMClientImpl::OnCheckinCompleted, 32 | - weak_ptr_factory_.GetWeakPtr()), 33 | - url_loader_factory_, io_task_runner_, &recorder_)); 34 | - // Taking a snapshot of the accounts count here, as there might be an asynch 35 | - // update of the account tokens while checkin is in progress. 36 | - device_checkin_info_.SnapshotCheckinAccounts(); 37 | - checkin_request_->Start(); 38 | } 39 | 40 | void GCMClientImpl::OnCheckinCompleted( 41 | @@ -749,24 +729,6 @@ void GCMClientImpl::SetGServicesSettings 42 | 43 | void GCMClientImpl::SchedulePeriodicCheckin() { 44 | DCHECK(io_task_runner_->RunsTasksInCurrentSequence()); 45 | - 46 | - // Make sure no checkin is in progress. 47 | - if (checkin_request_.get() || !device_checkin_info_.accounts_set) 48 | - return; 49 | - 50 | - // There should be only one periodic checkin pending at a time. Removing 51 | - // pending periodic checkin to schedule a new one. 52 | - periodic_checkin_ptr_factory_.InvalidateWeakPtrs(); 53 | - 54 | - base::TimeDelta time_to_next_checkin = GetTimeToNextCheckin(); 55 | - if (time_to_next_checkin < base::TimeDelta()) 56 | - time_to_next_checkin = base::TimeDelta(); 57 | - 58 | - io_task_runner_->PostDelayedTask( 59 | - FROM_HERE, 60 | - base::BindOnce(&GCMClientImpl::StartCheckin, 61 | - periodic_checkin_ptr_factory_.GetWeakPtr()), 62 | - time_to_next_checkin); 63 | } 64 | 65 | base::TimeDelta GCMClientImpl::GetTimeToNextCheckin() const { 66 | -------------------------------------------------------------------------------- /patches/core/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 | @@ -314,7 +314,6 @@ if (!is_android && !is_mac) { 11 | } 12 | 13 | data_deps += [ 14 | - "//chrome/browser/resources/media/mei_preload:component", 15 | "//third_party/widevine/cdm", 16 | ] 17 | } 18 | @@ -1039,7 +1038,6 @@ if (is_win) { 19 | ":keystone_registration_framework", 20 | ":swiftshader_library", 21 | ":widevine_cdm_library", 22 | - "//chrome/browser/resources/media/mei_preload:component_bundle", 23 | ] 24 | 25 | if (is_chrome_branded) { 26 | -------------------------------------------------------------------------------- /patches/core/ungoogled-chromium/disable-network-time-tracker.patch: -------------------------------------------------------------------------------- 1 | # Disable Network Time Tracker 2 | # This connects to Google to check if the system time is correct when a website certificate 3 | # date seems incorrect, according to https://bugs.chromium.org/p/chromium/issues/detail?id=725232, 4 | # Fixes https://github.com/Eloston/ungoogled-chromium/issues/302 5 | 6 | --- a/components/network_time/network_time_tracker.cc 7 | +++ b/components/network_time/network_time_tracker.cc 8 | @@ -277,7 +277,7 @@ void NetworkTimeTracker::UpdateNetworkTi 9 | } 10 | 11 | bool NetworkTimeTracker::AreTimeFetchesEnabled() const { 12 | - return base::FeatureList::IsEnabled(kNetworkTimeServiceQuerying); 13 | + return false; 14 | } 15 | 16 | NetworkTimeTracker::FetchBehavior NetworkTimeTracker::GetFetchBehavior() const { 17 | -------------------------------------------------------------------------------- /patches/core/ungoogled-chromium/disable-profile-avatar-downloading.patch: -------------------------------------------------------------------------------- 1 | # Stop downloading of profile avatar (trk:271:...) 2 | 3 | --- a/chrome/browser/profiles/profile_avatar_downloader.cc 4 | +++ b/chrome/browser/profiles/profile_avatar_downloader.cc 5 | @@ -26,8 +26,7 @@ ProfileAvatarDownloader::ProfileAvatarDo 6 | FetchCompleteCallback callback) 7 | : icon_index_(icon_index), callback_(std::move(callback)) { 8 | DCHECK(!callback_.is_null()); 9 | - GURL url(std::string(kHighResAvatarDownloadUrlPrefix) + 10 | - profiles::GetDefaultAvatarIconFileNameAtIndex(icon_index)); 11 | + GURL url(std::string("about:blank")); 12 | net::NetworkTrafficAnnotationTag traffic_annotation = 13 | net::DefineNetworkTrafficAnnotation("profile_avatar", R"( 14 | semantics { 15 | -------------------------------------------------------------------------------- /patches/core/ungoogled-chromium/disable-signin.patch: -------------------------------------------------------------------------------- 1 | # Disables browser sign-in 2 | 3 | --- a/chrome/browser/ui/chrome_pages.cc 4 | +++ b/chrome/browser/ui/chrome_pages.cc 5 | @@ -493,32 +493,6 @@ GURL GetOSSettingsUrl(const std::string& 6 | void ShowBrowserSignin(Browser* browser, 7 | signin_metrics::AccessPoint access_point, 8 | signin::ConsentLevel consent_level) { 9 | - Profile* original_profile = browser->profile()->GetOriginalProfile(); 10 | - DCHECK(original_profile->GetPrefs()->GetBoolean(prefs::kSigninAllowed)); 11 | - 12 | - // If the browser's profile is an incognito profile, make sure to use 13 | - // a browser window from the original profile. The user cannot sign in 14 | - // from an incognito window. 15 | - auto displayer = 16 | - std::make_unique(original_profile); 17 | - browser = displayer->browser(); 18 | - 19 | - profiles::BubbleViewMode bubble_view_mode; 20 | - if (IdentityManagerFactory::GetForProfile(original_profile) 21 | - ->HasPrimaryAccount()) { 22 | - bubble_view_mode = profiles::BUBBLE_VIEW_MODE_GAIA_REAUTH; 23 | - } else { 24 | - switch (consent_level) { 25 | - case signin::ConsentLevel::kSync: 26 | - bubble_view_mode = profiles::BUBBLE_VIEW_MODE_GAIA_SIGNIN; 27 | - break; 28 | - case signin::ConsentLevel::kNotRequired: 29 | - bubble_view_mode = profiles::BUBBLE_VIEW_MODE_GAIA_ADD_ACCOUNT; 30 | - break; 31 | - } 32 | - } 33 | - 34 | - browser->signin_view_controller()->ShowSignin(bubble_view_mode, access_point); 35 | } 36 | 37 | void ShowBrowserSigninOrSettings(Browser* browser, 38 | -------------------------------------------------------------------------------- /patches/core/ungoogled-chromium/disable-untraceable-urls.patch: -------------------------------------------------------------------------------- 1 | # Disable additional URLs that are not caught by the "trk" scheme 2 | 3 | --- a/chrome/browser/plugins/plugins_resource_service.cc 4 | +++ b/chrome/browser/plugins/plugins_resource_service.cc 5 | @@ -53,9 +53,6 @@ const int kStartResourceFetchDelayMs = 6 6 | // Delay between calls to update the cache 1 day and 2 minutes in testing mode. 7 | const int kCacheUpdateDelayMs = 24 * 60 * 60 * 1000; 8 | 9 | -const char kPluginsServerUrl[] = 10 | - "https://www.gstatic.com/chrome/config/plugins_3/"; 11 | - 12 | GURL GetPluginsServerURL() { 13 | std::string filename; 14 | #if defined(OS_WIN) 15 | @@ -70,7 +67,7 @@ GURL GetPluginsServerURL() { 16 | #error Unknown platform 17 | #endif 18 | 19 | - return GURL(kPluginsServerUrl + filename); 20 | + return GURL("about:blank"); 21 | } 22 | 23 | } // namespace 24 | --- a/components/safe_browsing/content/browser/client_side_model_loader.cc 25 | +++ b/components/safe_browsing/content/browser/client_side_model_loader.cc 26 | @@ -60,8 +60,6 @@ std::string ReadFileIntoString(base::Fil 27 | // Model Loader strings 28 | const size_t ModelLoader::kMaxModelSizeBytes = 150 * 1024; 29 | const int ModelLoader::kClientModelFetchIntervalMs = 3600 * 1000; 30 | -const char ModelLoader::kClientModelUrlPrefix[] = 31 | - "https://ssl.gstatic.com/safebrowsing/csd/"; 32 | const char ModelLoader::kClientModelNamePattern[] = 33 | "client_model_v5%s_variation_%d.pb"; 34 | #if !BUILDFLAG(FULL_SAFE_BROWSING) 35 | @@ -124,7 +122,7 @@ ModelLoader::ModelLoader( 36 | scoped_refptr url_loader_factory, 37 | bool is_extended_reporting) 38 | : name_(FillInModelName(is_extended_reporting, GetModelNumber())), 39 | - url_(kClientModelUrlPrefix + name_), 40 | + url_("about:blank"), 41 | update_renderers_callback_(update_renderers_callback), 42 | url_loader_factory_(url_loader_factory), 43 | last_client_model_status_(ClientModelStatus::MODEL_NEVER_FETCHED) { 44 | @@ -138,7 +136,7 @@ ModelLoader::ModelLoader( 45 | scoped_refptr url_loader_factory, 46 | const std::string& model_name) 47 | : name_(model_name), 48 | - url_(kClientModelUrlPrefix + name_), 49 | + url_("about:blank"), 50 | update_renderers_callback_(update_renderers_callback), 51 | url_loader_factory_(url_loader_factory), 52 | last_client_model_status_(ClientModelStatus::MODEL_NEVER_FETCHED) { 53 | --- a/components/safe_browsing/content/browser/client_side_model_loader.h 54 | +++ b/components/safe_browsing/content/browser/client_side_model_loader.h 55 | @@ -42,7 +42,6 @@ class ModelLoader { 56 | static const int kClientModelFetchIntervalMs; 57 | static const char kClientModelFinchExperiment[]; 58 | static const char kClientModelFinchParam[]; 59 | - static const char kClientModelUrlPrefix[]; 60 | static const char kClientModelNamePattern[]; 61 | 62 | // Enum used to keep stats about why we fail to get the client model. This 63 | --- a/rlz/lib/financial_ping.cc 64 | +++ b/rlz/lib/financial_ping.cc 65 | @@ -336,7 +336,7 @@ FinancialPing::PingResponse FinancialPin 66 | 67 | // Open network connection. 68 | InternetHandle connection_handle = InternetConnectA(inet_handle, 69 | - kFinancialServer, kFinancialPort, "", "", INTERNET_SERVICE_HTTP, 70 | + "about:blank", kFinancialPort, "", "", INTERNET_SERVICE_HTTP, 71 | INTERNET_FLAG_NO_CACHE_WRITE, 0); 72 | if (!connection_handle) 73 | return PING_FAILURE; 74 | @@ -380,7 +380,7 @@ FinancialPing::PingResponse FinancialPin 75 | return PING_SUCCESSFUL; 76 | #else 77 | std::string url = 78 | - base::StringPrintf("https://%s%s", kFinancialServer, request); 79 | + base::StringPrintf("https://%s%s", "about:blank", request); 80 | 81 | // Use a waitable event to cause this function to block, to match the 82 | // wininet implementation. 83 | --- a/rlz/lib/lib_values.cc 84 | +++ b/rlz/lib/lib_values.cc 85 | @@ -41,7 +41,6 @@ const char kSetDccResponseVariable[] = " 86 | // 87 | 88 | const char kFinancialPingPath[] = "/tools/pso/ping"; 89 | -const char kFinancialServer[] = "trk:443:clients1.google.com"; /* not using URLRequest! catch with cache.ir */ 90 | const int kFinancialPort = 443; 91 | 92 | // Ping times in 100-nanosecond intervals. 93 | --- a/rlz/lib/lib_values.h 94 | +++ b/rlz/lib/lib_values.h 95 | @@ -72,7 +72,6 @@ extern const char kSetDccResponseVariabl 96 | // 97 | 98 | extern const char kFinancialPingPath[]; 99 | -extern const char kFinancialServer[]; 100 | 101 | extern const int kFinancialPort; 102 | 103 | -------------------------------------------------------------------------------- /patches/core/ungoogled-chromium/fix-building-without-one-click-signin.patch: -------------------------------------------------------------------------------- 1 | # Fix building without one click signin 2 | 3 | --- a/chrome/browser/ui/BUILD.gn 4 | +++ b/chrome/browser/ui/BUILD.gn 5 | @@ -4353,8 +4353,6 @@ static_library("ui") { 6 | "views/sync/dice_bubble_sync_promo_view.h", 7 | "views/sync/dice_signin_button_view.cc", 8 | "views/sync/dice_signin_button_view.h", 9 | - "views/sync/one_click_signin_dialog_view.cc", 10 | - "views/sync/one_click_signin_dialog_view.h", 11 | ] 12 | deps += [ "//ui/views/window/vector_icons" ] 13 | } 14 | --- a/chrome/browser/ui/sync/one_click_signin_links_delegate_impl.cc 15 | +++ b/chrome/browser/ui/sync/one_click_signin_links_delegate_impl.cc 16 | @@ -16,9 +16,4 @@ OneClickSigninLinksDelegateImpl::OneClic 17 | OneClickSigninLinksDelegateImpl::~OneClickSigninLinksDelegateImpl() {} 18 | 19 | void OneClickSigninLinksDelegateImpl::OnLearnMoreLinkClicked(bool is_dialog) { 20 | - NavigateParams params(browser_, GURL(chrome::kChromeSyncLearnMoreURL), 21 | - ui::PAGE_TRANSITION_LINK); 22 | - params.disposition = is_dialog ? WindowOpenDisposition::NEW_WINDOW 23 | - : WindowOpenDisposition::NEW_FOREGROUND_TAB; 24 | - Navigate(¶ms); 25 | } 26 | --- a/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc 27 | +++ b/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc 28 | @@ -371,6 +371,7 @@ void InlineSigninHelper::OnClientOAuthSu 29 | const ClientOAuthResult& result, 30 | Profile* /*profile*/, 31 | Profile::CreateStatus /*status*/) { 32 | +#if BUILDFLAG(ENABLE_ONE_CLICK_SIGNIN) 33 | HandlerSigninReason reason = GetHandlerSigninReason(current_url_); 34 | if (reason == HandlerSigninReason::FETCH_LST_ONLY) { 35 | // Constants are only available on Windows for the Google Credential 36 | @@ -459,6 +460,7 @@ void InlineSigninHelper::OnClientOAuthSu 37 | CreateSyncStarter(result.refresh_token); 38 | } 39 | base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); 40 | +#endif 41 | } 42 | 43 | void InlineSigninHelper::UntrustedSigninConfirmed( 44 | -------------------------------------------------------------------------------- /patches/core/ungoogled-chromium/fix-learn-doubleclick-hsts.patch: -------------------------------------------------------------------------------- 1 | # Split up the learn.doubleclick.net string literal to prevent domain substitution breaking compilation due to the use of the excluded HSTS list json file in this code. 2 | 3 | --- a/net/tools/transport_security_state_generator/transport_security_state_generator.cc 4 | +++ b/net/tools/transport_security_state_generator/transport_security_state_generator.cc 5 | @@ -125,7 +125,7 @@ bool CheckDuplicateEntries(const Transpo 6 | bool CheckNoopEntries(const TransportSecurityStateEntries& entries) { 7 | for (const auto& entry : entries) { 8 | if (!entry->force_https && entry->pinset.empty() && !entry->expect_ct) { 9 | - if (entry->hostname == "learn.doubleclick.net") { 10 | + if (entry->hostname == "learn.double" "click." "net") { 11 | // This entry is deliberately used as an exclusion. 12 | continue; 13 | } 14 | -------------------------------------------------------------------------------- /patches/core/ungoogled-chromium/remove-enable-dse-memoryssa-cflag.patch: -------------------------------------------------------------------------------- 1 | --- a/build/config/compiler/BUILD.gn 2 | +++ b/build/config/compiler/BUILD.gn 3 | @@ -651,9 +651,6 @@ config("compiler") { 4 | "-Wl,--thinlto-cache-policy,$cache_policy", 5 | ] 6 | 7 | - # TODO(https://crbug.com/1127713): Investigate, remove. 8 | - ldflags += [ "-Wl,-mllvm,-enable-dse-memoryssa=false" ] 9 | - 10 | ldflags += [ "-Wl,--lto-O" + lto_opt_level ] 11 | if (thin_lto_enable_optimizations) { 12 | # TODO(gbiv): We ideally shouldn't need to specify this; ThinLTO 13 | -------------------------------------------------------------------------------- /patches/core/ungoogled-chromium/replace-google-search-engine-with-nosearch.patch: -------------------------------------------------------------------------------- 1 | --- a/components/search_engines/prepopulated_engines.json 2 | +++ b/components/search_engines/prepopulated_engines.json 3 | @@ -113,21 +113,11 @@ 4 | }, 5 | 6 | "google": { 7 | - "name": "Google", 8 | - "keyword": "google.com", 9 | - "favicon_url": "https://www.google.com/images/branding/product/ico/googleg_lodp.ico", 10 | - "search_url": "{google:baseURL}search?q={searchTerms}&{google:RLZ}{google:originalQueryForSuggestion}{google:assistedQueryStats}{google:searchFieldtrialParameter}{google:iOSSearchLanguage}{google:prefetchSource}{google:searchClient}{google:sourceId}{google:contextualSearchVersion}ie={inputEncoding}", 11 | - "suggest_url": "{google:baseSuggestURL}search?{google:searchFieldtrialParameter}client={google:suggestClient}&gs_ri={google:suggestRid}&xssi=t&q={searchTerms}&{google:inputType}{google:omniboxFocusType}{google:cursorPosition}{google:currentPageUrl}{google:pageClassification}{google:searchVersion}{google:sessionToken}{google:prefetchQuery}sugkey={google:suggestAPIKeyParameter}", 12 | - "image_url": "{google:baseURL}searchbyimage/upload", 13 | - "contextual_search_url": "{google:baseURL}_/contextualsearch?{google:contextualSearchVersion}{google:contextualSearchContextData}", 14 | - "image_url_post_params": "encoded_image={google:imageThumbnail},image_url={google:imageURL},sbisrc={google:imageSearchSource},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight}", 15 | - "alternate_urls": [ 16 | - "{google:baseURL}#q={searchTerms}", 17 | - "{google:baseURL}search#q={searchTerms}", 18 | - "{google:baseURL}webhp#q={searchTerms}", 19 | - "{google:baseURL}s#q={searchTerms}", 20 | - "{google:baseURL}s?q={searchTerms}" 21 | - ], 22 | + "name": "No Search", 23 | + "keyword": "nosearch", 24 | + "favicon_url": "about:blank", 25 | + "search_url": "http://{searchTerms}", 26 | + "new_tab_url": "about:blank", 27 | "type": "SEARCH_ENGINE_GOOGLE", 28 | "id": 1 29 | }, 30 | -------------------------------------------------------------------------------- /patches/core/ungoogled-chromium/use-local-devtools-files.patch: -------------------------------------------------------------------------------- 1 | # Always use local DevTools files instead of remote files from Google 2 | # NOTE: This can break Remote Debugging 3 | # This also fixes local debugging with domain substitution 4 | # Related comment: https://bugs.chromium.org/p/chromium/issues/detail?id=710701#c14 5 | 6 | --- a/third_party/devtools-frontend/src/BUILD.gn 7 | +++ b/third_party/devtools-frontend/src/BUILD.gn 8 | @@ -212,7 +212,7 @@ devtools_applications = [ 9 | devtools_frontend_resources_deps = [ 10 | ":build_release_devtools", 11 | "front_end", 12 | - "test", 13 | +# "test", 14 | ] 15 | 16 | group("devtools_all_files") { 17 | -------------------------------------------------------------------------------- /patches/enable-rpm-build-ungoogled-chromium.patch: -------------------------------------------------------------------------------- 1 | --- chromium-78.0.3904.97.orig/chrome/installer/linux/BUILD.gn 2 | +++ chromium-78.0.3904.97/chrome/installer/linux/BUILD.gn 3 | @@ -62,8 +62,6 @@ packaging_files = packaging_files_binari 4 | "$root_out_dir/xdg-mime", 5 | "$root_out_dir/xdg-settings", 6 | "$root_out_dir/locales/en-US.pak", 7 | - "$root_out_dir/MEIPreload/manifest.json", 8 | - "$root_out_dir/MEIPreload/preloaded_data.pb", 9 | ] 10 | 11 | action_foreach("calculate_deb_dependencies") { 12 | @@ -350,7 +348,6 @@ group("installer_deps") { 13 | ":theme_files", 14 | "//chrome", 15 | "//chrome:packed_resources", 16 | - "//chrome/browser/resources/media/mei_preload:component", 17 | "//sandbox/linux:chrome_sandbox", 18 | ] 19 | if (enable_nacl) { 20 | -------------------------------------------------------------------------------- /patches/enable-vaapi.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/about_flags.cc 2019-07-29 16:35:46.000000000 -0400 2 | +++ b/chrome/browser/about_flags.cc 2019-08-01 20:47:16.512941695 -0400 3 | @@ -1450,7 +1450,7 @@ const FeatureEntry kFeatureEntries[] = { 4 | "disable-accelerated-video-decode", 5 | flag_descriptions::kAcceleratedVideoDecodeName, 6 | flag_descriptions::kAcceleratedVideoDecodeDescription, 7 | - kOsMac | kOsWin | kOsCrOS | kOsAndroid, 8 | + kOsMac | kOsWin | kOsCrOS | kOsAndroid | kOsLinux, 9 | SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode), 10 | }, 11 | {"enable-history-favicons-google-server-query", 12 | @@ -1883,12 +1883,12 @@ const FeatureEntry kFeatureEntries[] = { 13 | FEATURE_VALUE_TYPE(service_manager::features::kXRSandbox)}, 14 | #endif // ENABLE_ISOLATED_XR_SERVICE 15 | #endif // ENABLE_VR 16 | -#if defined(OS_CHROMEOS) 17 | +#if defined(OS_CHROMEOS) || defined(OS_LINUX) 18 | {"disable-accelerated-mjpeg-decode", 19 | flag_descriptions::kAcceleratedMjpegDecodeName, 20 | - flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS, 21 | + flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS | kOsLinux, 22 | SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)}, 23 | -#endif // OS_CHROMEOS 24 | +#endif // OS_CHROMEOS // OS_LINUX 25 | {"system-keyboard-lock", flag_descriptions::kSystemKeyboardLockName, 26 | flag_descriptions::kSystemKeyboardLockDescription, kOsDesktop, 27 | FEATURE_VALUE_TYPE(features::kSystemKeyboardLock)}, 28 | --- a/chrome/browser/flag_descriptions.cc 2019-08-01 21:00:51.244301688 -0400 29 | +++ b/chrome/browser/flag_descriptions.cc 2019-08-01 20:55:34.224901232 -0400 30 | @@ -2766,15 +2766,20 @@ const char kMacSystemMediaPermissionsInf 31 | 32 | #endif 33 | 34 | -// Chrome OS ------------------------------------------------------------------- 35 | +// Chrome OS & Linux------------------------------------------------------------ 36 | 37 | -#if defined(OS_CHROMEOS) 38 | +#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID)) 39 | 40 | const char kAcceleratedMjpegDecodeName[] = 41 | "Hardware-accelerated mjpeg decode for captured frame"; 42 | const char kAcceleratedMjpegDecodeDescription[] = 43 | "Enable hardware-accelerated mjpeg decode for captured frame where " 44 | "available."; 45 | +#endif 46 | + 47 | +// Chrome OS ------------------------------------------------------------------- 48 | + 49 | +#if defined(OS_CHROMEOS) 50 | 51 | const char kAppServiceAshName[] = "App Service Ash"; 52 | const char kAppServiceAshDescription[] = 53 | --- a/chrome/browser/flag_descriptions.h 2019-10-21 15:06:22.000000000 -0400 54 | +++ b/chrome/browser/flag_descriptions.h 2019-10-23 20:22:51.372428783 -0400 55 | @@ -1822,13 +1822,19 @@ extern const char kPermissionPromptPersi 56 | 57 | #endif // defined(OS_MACOSX) 58 | 59 | -// Chrome OS ------------------------------------------------------------------ 60 | +// Chrome OS & Linux----------------------------------------------------------- 61 | 62 | -#if defined(OS_CHROMEOS) 63 | +#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID)) 64 | 65 | extern const char kAcceleratedMjpegDecodeName[]; 66 | extern const char kAcceleratedMjpegDecodeDescription[]; 67 | 68 | +#endif 69 | + 70 | +// Chrome OS ------------------------------------------------------------------ 71 | + 72 | +#if defined(OS_CHROMEOS) 73 | + 74 | extern const char kAggregatedMlAppRankingName[]; 75 | extern const char kAggregatedMlAppRankingDescription[]; 76 | 77 | --- a/gpu/config/software_rendering_list.json 2019-08-01 21:06:16.192938498 -0400 78 | +++ b/gpu/config/software_rendering_list.json 2019-08-01 21:06:03.174195033 -0400 79 | @@ -370,11 +370,12 @@ 80 | }, 81 | { 82 | "id": 48, 83 | - "description": "Accelerated video decode is unavailable on Linux", 84 | + "description": "Accelerated VA-API video decode is not supported on NVIDIA platforms", 85 | "cr_bugs": [137247, 1032907], 86 | "os": { 87 | "type": "linux" 88 | }, 89 | + "vendor_id": "0x10de", 90 | "exceptions": [ 91 | { 92 | "machine_model_name": ["Chromecast"] 93 | -------------------------------------------------------------------------------- /patches/eu-strip.patch: -------------------------------------------------------------------------------- 1 | diff --git a/chrome/installer/linux/BUILD.gn b/chrome/installer/linux/BUILD.gn 2 | index 6624417999bb..64bdb07aad62 100644 3 | --- a/chrome/installer/linux/BUILD.gn 4 | +++ b/chrome/installer/linux/BUILD.gn 5 | @@ -118,7 +118,6 @@ action("strip_chrome_binary") { 6 | ] 7 | script = "//build/gn_run_binary.py" 8 | sources = [ 9 | - "//buildtools/third_party/eu-strip/bin/eu-strip", 10 | prog_name, 11 | ] 12 | outputs = [ 13 | @@ -204,8 +203,6 @@ copy("common_packaging_files") { 14 | ] 15 | } 16 | 17 | - sources += [ "//buildtools/third_party/eu-strip/bin/eu-strip" ] 18 | - 19 | outputs = [ 20 | "$root_out_dir/installer/common/{{source_file_part}}", 21 | ] 22 | 23 | -------------------------------------------------------------------------------- /patches/extra/debian/disable/google-api-warning.patch: -------------------------------------------------------------------------------- 1 | description: disable the google api key warning when those aren't found 2 | author: Michael Gilbert 3 | 4 | --- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc 5 | +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc 6 | @@ -596,9 +596,6 @@ void StartupBrowserCreatorImpl::AddInfoB 7 | } 8 | #endif 9 | 10 | - if (!google_apis::HasAPIKeyConfigured()) 11 | - GoogleApiKeysInfoBarDelegate::Create(infobar_service); 12 | - 13 | if (ObsoleteSystem::IsObsoleteNowOrSoon()) { 14 | PrefService* local_state = g_browser_process->local_state(); 15 | if (!local_state || 16 | -------------------------------------------------------------------------------- /patches/extra/debian/disable/welcome-page.patch: -------------------------------------------------------------------------------- 1 | description: do not override the welcome page setting set in master_preferences 2 | author: Michael Gilbert 3 | bug-debian: http://bugs.debian.org/857767 4 | 5 | --- a/chrome/browser/profiles/profile_manager.cc 6 | +++ b/chrome/browser/profiles/profile_manager.cc 7 | @@ -1189,7 +1189,7 @@ void ProfileManager::InitProfileUserPref 8 | profile->GetPrefs()->SetString(prefs::kSupervisedUserId, 9 | supervised_user_id); 10 | } 11 | -#if !defined(OS_ANDROID) 12 | +#if 0 13 | // TODO(pmonette): Fix IsNewProfile() to handle the case where the profile is 14 | // new even if the "Preferences" file already existed. (For example: The 15 | // master_preferences file is dumped into the default profile on first run, 16 | -------------------------------------------------------------------------------- /patches/extra/debian/fixes/connection-message.patch: -------------------------------------------------------------------------------- 1 | description: suggest proxy misconfiguration when network is unreachable 2 | author: Michael Gilbert 3 | bug-debian: http://bugs.debian.org/864539 4 | 5 | --- a/components/error_page_strings.grdp 6 | +++ b/components/error_page_strings.grdp 7 | @@ -54,7 +54,7 @@ 8 | 9 | 10 | Check any cables and reboot any routers, modems, or other network 11 | - devices you may be using. 12 | + devices you may be using. Also check that any proxy server currently in use is reachable and configured correctly. 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /patches/extra/debian/gn/parallel.patch: -------------------------------------------------------------------------------- 1 | description: respect specified number of parallel jobs while bootstrapping gn 2 | author: Michael Gilbert 3 | 4 | --- a/tools/gn/bootstrap/bootstrap.py 5 | +++ b/tools/gn/bootstrap/bootstrap.py 6 | @@ -47,6 +47,7 @@ def main(argv): 7 | help='The directory in which to build gn, ' 8 | 'relative to the src directory. (eg. out/Release)') 9 | parser.add_option('-v', '--verbose', help='ignored') 10 | + parser.add_option('-j', '--jobs', help='Number of jobs') 11 | parser.add_option( 12 | '--skip-generate-buildfiles', 13 | action='store_true', 14 | @@ -120,8 +121,12 @@ def main(argv): 15 | 16 | shutil.copy2( 17 | os.path.join(BOOTSTRAP_DIR, 'last_commit_position.h'), gn_build_dir) 18 | - subprocess.check_call( 19 | - [ninja_binary, '-C', gn_build_dir, '-w', 'dupbuild=err', 'gn']) 20 | + if options.jobs: 21 | + subprocess.check_call( 22 | + [ninja_binary, '-C', gn_build_dir, '-w', 'dupbuild=err', '-j'+str(options.jobs), 'gn']) 23 | + else: 24 | + subprocess.check_call( 25 | + [ninja_binary, '-C', gn_build_dir, '-w', 'dupbuild=err', 'gn']) 26 | shutil.copy2(os.path.join(gn_build_dir, 'gn'), gn_path) 27 | 28 | if not options.skip_generate_buildfiles: 29 | -------------------------------------------------------------------------------- /patches/extra/inox-patchset/0008-restore-classic-ntp.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/search/search.cc 2 | +++ b/chrome/browser/search/search.cc 3 | @@ -188,26 +188,7 @@ struct NewTabURLDetails { 4 | : chrome::kChromeSearchLocalNtpUrl); 5 | #endif 6 | 7 | - if (ShouldShowLocalNewTab(profile)) 8 | - return NewTabURLDetails(local_url, NEW_TAB_URL_VALID); 9 | - 10 | - const TemplateURL* template_url = 11 | - GetDefaultSearchProviderTemplateURL(profile); 12 | - if (!profile || !template_url) 13 | - return NewTabURLDetails(local_url, NEW_TAB_URL_BAD); 14 | - 15 | - GURL search_provider_url(template_url->new_tab_url_ref().ReplaceSearchTerms( 16 | - TemplateURLRef::SearchTermsArgs(base::string16()), 17 | - UIThreadSearchTermsData())); 18 | - 19 | - if (!search_provider_url.is_valid()) 20 | - return NewTabURLDetails(local_url, NEW_TAB_URL_NOT_SET); 21 | - if (!search_provider_url.SchemeIsCryptographic()) 22 | - return NewTabURLDetails(local_url, NEW_TAB_URL_INSECURE); 23 | - if (!IsURLAllowedForSupervisedUser(search_provider_url, profile)) 24 | - return NewTabURLDetails(local_url, NEW_TAB_URL_BLOCKED); 25 | - 26 | - return NewTabURLDetails(search_provider_url, NEW_TAB_URL_VALID); 27 | + return NewTabURLDetails(local_url, NEW_TAB_URL_VALID); 28 | } 29 | 30 | const GURL url; 31 | --- a/components/ntp_snippets/features.cc 32 | +++ b/components/ntp_snippets/features.cc 33 | @@ -39,7 +39,7 @@ const base::Feature* const kAllFeatures[ 34 | &kOptionalImagesEnabledFeature}; 35 | 36 | const base::Feature kArticleSuggestionsFeature{ 37 | - "NTPArticleSuggestions", base::FEATURE_ENABLED_BY_DEFAULT}; 38 | + "NTPArticleSuggestions", base::FEATURE_DISABLED_BY_DEFAULT}; 39 | 40 | const base::Feature kRemoteSuggestionsEmulateM58FetchingSchedule{ 41 | "RemoteSuggestionsEmulateM58FetchingSchedule", 42 | @@ -69,10 +69,10 @@ const char kNotificationsDailyLimit[] = 43 | const char kNotificationsIgnoredLimitParam[] = "ignored_limit"; 44 | 45 | const base::Feature kKeepPrefetchedContentSuggestions{ 46 | - "KeepPrefetchedContentSuggestions", base::FEATURE_ENABLED_BY_DEFAULT}; 47 | + "KeepPrefetchedContentSuggestions", base::FEATURE_DISABLED_BY_DEFAULT}; 48 | 49 | const base::Feature kOptionalImagesEnabledFeature{ 50 | - "NTPRemoteSuggestionsOptionalImages", base::FEATURE_ENABLED_BY_DEFAULT}; 51 | + "NTPRemoteSuggestionsOptionalImages", base::FEATURE_DISABLED_BY_DEFAULT}; 52 | 53 | std::vector GetAllFeatures() { 54 | // Skip the last feature as it's a nullptr. 55 | -------------------------------------------------------------------------------- /patches/extra/inox-patchset/0011-add-duckduckgo-search-engine.patch: -------------------------------------------------------------------------------- 1 | --- a/components/search_engines/template_url_prepopulate_data.cc 2 | +++ b/components/search_engines/template_url_prepopulate_data.cc 3 | @@ -29,6 +29,7 @@ namespace { 4 | 5 | // Default (for countries with no better engine set) 6 | const PrepopulatedEngine* const engines_default[] = { 7 | + &duckduckgo, 8 | &google, 9 | &bing, 10 | &yahoo, 11 | @@ -199,6 +200,7 @@ const PrepopulatedEngine* const engines_ 12 | 13 | // China 14 | const PrepopulatedEngine* const engines_CN[] = { 15 | + &duckduckgo, 16 | &baidu, 17 | &sogou, 18 | &google, 19 | @@ -280,6 +282,7 @@ const PrepopulatedEngine* const engines_ 20 | 21 | // Estonia 22 | const PrepopulatedEngine* const engines_EE[] = { 23 | + &duckduckgo, 24 | &google, 25 | &bing, 26 | &yandex_ru, 27 | @@ -325,6 +328,7 @@ const PrepopulatedEngine* const engines_ 28 | 29 | // France 30 | const PrepopulatedEngine* const engines_FR[] = { 31 | + &duckduckgo, 32 | &google, 33 | &bing, 34 | &yahoo_fr, 35 | @@ -442,6 +446,7 @@ const PrepopulatedEngine* const engines_ 36 | 37 | // Iran 38 | const PrepopulatedEngine* const engines_IR[] = { 39 | + &duckduckgo, 40 | &google, 41 | &bing, 42 | &yahoo, 43 | @@ -505,6 +510,7 @@ const PrepopulatedEngine* const engines_ 44 | 45 | // South Korea 46 | const PrepopulatedEngine* const engines_KR[] = { 47 | + &duckduckgo, 48 | &google, 49 | &naver, 50 | &bing, 51 | @@ -523,6 +529,7 @@ const PrepopulatedEngine* const engines_ 52 | 53 | // Kazakhstan 54 | const PrepopulatedEngine* const engines_KZ[] = { 55 | + &duckduckgo, 56 | &google, 57 | &yandex_kz, 58 | &mail_ru, 59 | @@ -604,6 +611,7 @@ const PrepopulatedEngine* const engines_ 60 | 61 | // Moldova 62 | const PrepopulatedEngine* const engines_MD[] = { 63 | + &duckduckgo, 64 | &google, 65 | &yandex_ru, 66 | &mail_ru, 67 | @@ -908,6 +916,7 @@ const PrepopulatedEngine* const engines_ 68 | 69 | // Taiwan 70 | const PrepopulatedEngine* const engines_TW[] = { 71 | + &duckduckgo, 72 | &google, 73 | &yahoo_tw, 74 | &bing, 75 | @@ -962,6 +971,7 @@ const PrepopulatedEngine* const engines_ 76 | 77 | // Vietnam 78 | const PrepopulatedEngine* const engines_VN[] = { 79 | + &duckduckgo, 80 | &google, 81 | &coccoc, 82 | &bing, 83 | -------------------------------------------------------------------------------- /patches/extra/inox-patchset/0013-disable-missing-key-warning.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc 2 | +++ b/chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc 3 | @@ -16,6 +16,7 @@ 4 | 5 | // static 6 | void GoogleApiKeysInfoBarDelegate::Create(InfoBarService* infobar_service) { 7 | + return; 8 | infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar( 9 | std::unique_ptr( 10 | new GoogleApiKeysInfoBarDelegate()))); 11 | -------------------------------------------------------------------------------- /patches/extra/inox-patchset/0016-chromium-sandbox-pie.patch: -------------------------------------------------------------------------------- 1 | --- a/sandbox/linux/BUILD.gn 2 | +++ b/sandbox/linux/BUILD.gn 3 | @@ -323,6 +323,12 @@ if (is_linux || is_chromeos) { 4 | # These files have a suspicious comparison. 5 | # TODO fix this and re-enable this warning. 6 | "-Wno-sign-compare", 7 | + 8 | + "-fPIE", 9 | + ] 10 | + 11 | + ldflags = [ 12 | + "-pie", 13 | ] 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /patches/extra/inox-patchset/0018-disable-first-run-behaviour.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/startup/startup_tab_provider.cc 2 | +++ b/chrome/browser/ui/startup/startup_tab_provider.cc 3 | @@ -48,7 +48,7 @@ bool ProfileHasOtherTabbedBrowser(Profil 4 | 5 | StartupTabs StartupTabProviderImpl::GetOnboardingTabs(Profile* profile) const { 6 | // Chrome OS has its own welcome flow provided by OOBE. 7 | -#if BUILDFLAG(IS_CHROMEOS_ASH) 8 | +#if 1 9 | return StartupTabs(); 10 | #else 11 | if (!profile) 12 | -------------------------------------------------------------------------------- /patches/extra/inox-patchset/0019-disable-battery-status-service.patch: -------------------------------------------------------------------------------- 1 | --- a/services/device/battery/battery_status_service.cc 2 | +++ b/services/device/battery/battery_status_service.cc 3 | @@ -22,10 +22,7 @@ BatteryStatusService::BatteryStatusServi 4 | update_callback_( 5 | base::BindRepeating(&BatteryStatusService::NotifyConsumers, 6 | base::Unretained(this))), 7 | - status_updated_(false), 8 | is_shutdown_(false) { 9 | - callback_list_.set_removal_callback(base::BindRepeating( 10 | - &BatteryStatusService::ConsumersChanged, base::Unretained(this))); 11 | } 12 | 13 | BatteryStatusService::~BatteryStatusService() = default; 14 | @@ -40,58 +37,16 @@ base::CallbackListSubscription BatterySt 15 | DCHECK(main_thread_task_runner_->BelongsToCurrentThread()); 16 | DCHECK(!is_shutdown_); 17 | 18 | - if (!battery_fetcher_) 19 | - battery_fetcher_ = BatteryStatusManager::Create(update_callback_); 20 | - 21 | - if (callback_list_.empty()) { 22 | - bool success = battery_fetcher_->StartListeningBatteryChange(); 23 | - // On failure pass the default values back. 24 | - if (!success) 25 | - callback.Run(mojom::BatteryStatus()); 26 | - } 27 | - 28 | - if (status_updated_) { 29 | - // Send recent status to the new callback if already available. 30 | - callback.Run(status_); 31 | - } 32 | + // Always pass the default values. 33 | + callback.Run(mojom::BatteryStatus()); 34 | 35 | return callback_list_.Add(callback); 36 | } 37 | 38 | -void BatteryStatusService::ConsumersChanged() { 39 | - if (is_shutdown_) 40 | - return; 41 | - 42 | - if (callback_list_.empty()) { 43 | - battery_fetcher_->StopListeningBatteryChange(); 44 | - status_updated_ = false; 45 | - } 46 | -} 47 | - 48 | void BatteryStatusService::NotifyConsumers(const mojom::BatteryStatus& status) { 49 | - DCHECK(!is_shutdown_); 50 | - 51 | - main_thread_task_runner_->PostTask( 52 | - FROM_HERE, 53 | - base::BindOnce(&BatteryStatusService::NotifyConsumersOnMainThread, 54 | - base::Unretained(this), status)); 55 | -} 56 | - 57 | -void BatteryStatusService::NotifyConsumersOnMainThread( 58 | - const mojom::BatteryStatus& status) { 59 | - DCHECK(main_thread_task_runner_->BelongsToCurrentThread()); 60 | - if (callback_list_.empty()) 61 | - return; 62 | - 63 | - status_ = status; 64 | - status_updated_ = true; 65 | - callback_list_.Notify(status_); 66 | } 67 | 68 | void BatteryStatusService::Shutdown() { 69 | - if (!callback_list_.empty()) 70 | - battery_fetcher_->StopListeningBatteryChange(); 71 | - battery_fetcher_.reset(); 72 | is_shutdown_ = true; 73 | } 74 | 75 | @@ -102,9 +57,6 @@ BatteryStatusService::GetUpdateCallbackF 76 | 77 | void BatteryStatusService::SetBatteryManagerForTesting( 78 | std::unique_ptr test_battery_manager) { 79 | - battery_fetcher_ = std::move(test_battery_manager); 80 | - status_ = mojom::BatteryStatus(); 81 | - status_updated_ = false; 82 | is_shutdown_ = false; 83 | main_thread_task_runner_ = base::ThreadTaskRunnerHandle::Get(); 84 | } 85 | --- a/services/device/battery/battery_status_service.h 86 | +++ b/services/device/battery/battery_status_service.h 87 | @@ -56,15 +56,10 @@ class BatteryStatusService { 88 | // Updates current battery status and sends new status to interested 89 | // render processes. Can be called on any thread via a callback. 90 | void NotifyConsumers(const mojom::BatteryStatus& status); 91 | - void NotifyConsumersOnMainThread(const mojom::BatteryStatus& status); 92 | - void ConsumersChanged(); 93 | 94 | scoped_refptr main_thread_task_runner_; 95 | - std::unique_ptr battery_fetcher_; 96 | BatteryUpdateCallbackList callback_list_; 97 | BatteryUpdateCallback update_callback_; 98 | - mojom::BatteryStatus status_; 99 | - bool status_updated_; 100 | bool is_shutdown_; 101 | 102 | DISALLOW_COPY_AND_ASSIGN(BatteryStatusService); 103 | -------------------------------------------------------------------------------- /patches/extra/iridium-browser/Remove-EV-certificates.patch: -------------------------------------------------------------------------------- 1 | From d32e222a2706cb59f9855b9cf4330f88d1af5435 Mon Sep 17 00:00:00 2001 2 | From: Jan Engelhardt 3 | Date: Thu, 2 Apr 2015 12:44:23 +0200 4 | Subject: [PATCH 41/66] Remove EV certificates 5 | 6 | The team chose to let EV certificates appear just like normal 7 | certificates. The web of trust is considered a failure in itself, so 8 | do not give users a false sense of extra security with EV certs. 9 | Instead, let them appear just like regular ones. 10 | --- 11 | net/cert/ev_root_ca_metadata.cc | 14 +++++++++++++- 12 | 1 file changed, 13 insertions(+), 1 deletion(-) 13 | 14 | --- a/net/cert/ev_root_ca_metadata.cc 15 | +++ b/net/cert/ev_root_ca_metadata.cc 16 | @@ -41,6 +41,16 @@ struct EVMetadata { 17 | 18 | // These certificates may be found in net/data/ssl/ev_roots. 19 | static const EVMetadata kEvRootCaMetadata[] = { 20 | + // need some dummy thing to make compiler happy, because 21 | + // arraysize() is implemented as a convoluted template rather than 22 | + // the traditional sizeof(x)/sizeof(*x) 23 | + { { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 24 | + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } }, 25 | + { 26 | + "0", 27 | + } 28 | + }, 29 | +#if 0 30 | // AC Camerfirma S.A. Chambers of Commerce Root - 2008 31 | // https://www.camerfirma.com 32 | { 33 | @@ -590,7 +600,9 @@ static const EVMetadata kEvRootCaMetadat 34 | 0xd2, 0x09, 0xb7, 0x37, 0xcb, 0xe2, 0xc1, 0x8c, 0xfb, 0x2c, 0x10, 35 | 0xc0, 0xff, 0x0b, 0xcf, 0x0d, 0x32, 0x86, 0xfc, 0x1a, 0xa2}}, 36 | {"2.16.840.1.114404.1.1.2.4.1", ""}, 37 | - }}; 38 | + } 39 | +#endif 40 | +}; 41 | 42 | #endif // defined(PLATFORM_USES_CHROMIUM_EV_METADATA) 43 | } // namespace 44 | -------------------------------------------------------------------------------- /patches/extra/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 | --- 7 | chrome/browser/chrome_browser_main.cc | 2 -- 8 | 1 file changed, 2 deletions(-) 9 | 10 | --- a/chrome/browser/chrome_browser_main.cc 11 | +++ b/chrome/browser/chrome_browser_main.cc 12 | @@ -1448,8 +1448,6 @@ int ChromeBrowserMainParts::PreMainMessa 13 | // and preferences have been registered since some of the import code depends 14 | // on preferences. 15 | if (first_run::IsChromeFirstRun()) { 16 | - first_run::AutoImport(profile_, master_prefs_->import_bookmarks_path); 17 | - 18 | // Note: This can pop-up the first run consent dialog on Linux & Mac. 19 | first_run::DoPostImportTasks(profile_, 20 | master_prefs_->make_chrome_default_for_user); 21 | -------------------------------------------------------------------------------- /patches/extra/iridium-browser/mime_util-force-text-x-suse-ymp-to-be-downloaded.patch: -------------------------------------------------------------------------------- 1 | From d3dcad96b3c2091026c3a81054bb3ce56538a702 Mon Sep 17 00:00:00 2001 2 | From: Jan Engelhardt 3 | Date: Thu, 29 Jan 2015 10:46:40 +0100 4 | Subject: [PATCH 16/66] mime_util: force text/x-suse-ymp to be downloaded 5 | 6 | YMP files (YaST One Click Install) are plaintext XML, but also not 7 | very interesting in themselves. Force them to be stored. 8 | --- 9 | components/mime_util/mime_util.cc | 1 + 10 | 1 file changed, 1 insertion(+) 11 | 12 | --- a/third_party/blink/common/mime_util/mime_util.cc 13 | +++ b/third_party/blink/common/mime_util/mime_util.cc 14 | @@ -81,6 +81,7 @@ static const char* const kUnsupportedTex 15 | "text/x-csv", 16 | "text/x-vcf", 17 | "text/rtf", 18 | + "text/x-suse-ymp", 19 | "text/comma-separated-values", 20 | "text/csv", 21 | "text/tab-separated-values", 22 | -------------------------------------------------------------------------------- /patches/extra/iridium-browser/net-cert-increase-default-key-length-for-newly-gener.patch: -------------------------------------------------------------------------------- 1 | From 088a50b2fc66418294166b61f31925426b1a9c54 Mon Sep 17 00:00:00 2001 2 | From: Jan Engelhardt 3 | Date: Mon, 15 Sep 2014 10:52:32 +0200 4 | Subject: [PATCH 12/66] net/cert: increase default key length for 5 | newly-generated RSA keys 6 | 7 | Should we add something for chrome://settings, or just leave 8 | it as hidden as it was before? 9 | --- 10 | net/cert/x509_util.cc | 2 +- 11 | 1 file changed, 1 insertion(+), 1 deletion(-) 12 | 13 | --- a/net/cert/x509_util.cc 14 | +++ b/net/cert/x509_util.cc 15 | @@ -241,7 +241,7 @@ bool GetTLSServerEndPointChannelBinding( 16 | } 17 | 18 | // RSA keys created by CreateKeyAndSelfSignedCert will be of this length. 19 | -static const uint16_t kRSAKeyLength = 1024; 20 | +static const uint16_t kRSAKeyLength = 2048; 21 | 22 | // Certificates made by CreateKeyAndSelfSignedCert will be signed using this 23 | // digest algorithm. 24 | -------------------------------------------------------------------------------- /patches/extra/iridium-browser/prefs-always-prompt-for-download-directory-by-defaul.patch: -------------------------------------------------------------------------------- 1 | From 93010fd16c1c9f01a06eab18055bcab54b028cc8 Mon Sep 17 00:00:00 2001 2 | From: Jan Engelhardt 3 | Date: Fri, 13 Feb 2015 01:04:21 +0100 4 | Subject: [PATCH 28/66] prefs: always prompt for download directory by default 5 | 6 | If the user opens a link, one of two things might happen. The URI 7 | resolves to a "web page" and will be displayed, then everything is 8 | good. Or it has a MIME type like application/* or so that causes the 9 | browser to consider it a file download instead. 10 | 11 | In that case, one of two things might happen. The browser may display 12 | a dialog box asking explicitly for an action, then everything is 13 | good. Or it does not and instead readily stores the file on disk. 14 | 15 | (Modern browsers also download the file in the background when waiting 16 | for the dialog box confirmation, but that is a separate tuning knob.) 17 | 18 | When the file is chosen to be immediately stored on disk without user 19 | interaction, the visual feedback for this may be rather miniscule. 20 | 21 | And then, you have to open a terminal or file manager again just to 22 | move the file to the location you wanted it to be in in the first 23 | place. 24 | 25 | TLDR: Do not let files sneak onto the disk too easily. 26 | --- 27 | chrome/browser/download/download_prefs.cc | 2 +- 28 | 1 file changed, 1 insertion(+), 1 deletion(-) 29 | 30 | --- a/chrome/browser/download/download_prefs.cc 31 | +++ b/chrome/browser/download/download_prefs.cc 32 | @@ -277,7 +277,7 @@ void DownloadPrefs::RegisterProfilePrefs 33 | user_prefs::PrefRegistrySyncable* registry) { 34 | registry->RegisterBooleanPref( 35 | prefs::kPromptForDownload, 36 | - false, 37 | + true, 38 | user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 39 | registry->RegisterStringPref(prefs::kDownloadExtensionsToOpen, std::string()); 40 | registry->RegisterListPref(prefs::kDownloadExtensionsToOpenByPolicy, {}); 41 | -------------------------------------------------------------------------------- /patches/extra/iridium-browser/prefs-only-keep-cookies-until-exit.patch: -------------------------------------------------------------------------------- 1 | From 0839326fb1b7ff7937cee0efa45f5a4ba23c2f78 Mon Sep 17 00:00:00 2001 2 | From: Jan Engelhardt 3 | Date: Sat, 13 Sep 2014 17:25:47 +0200 4 | Subject: [PATCH 27/66] prefs: only keep cookies until exit 5 | 6 | Out with all those tracking cookies! 7 | --- 8 | components/content_settings/core/browser/content_settings_registry.cc | 2 +- 9 | 1 file changed, 1 insertion(+), 1 deletion(-) 10 | 11 | --- a/components/content_settings/core/browser/content_settings_registry.cc 12 | +++ b/components/content_settings/core/browser/content_settings_registry.cc 13 | @@ -140,7 +140,7 @@ void ContentSettingsRegistry::Init() { 14 | // WARNING: The string names of the permissions passed in below are used to 15 | // generate preference names and should never be changed! 16 | 17 | - Register(ContentSettingsType::COOKIES, "cookies", CONTENT_SETTING_ALLOW, 18 | + Register(ContentSettingsType::COOKIES, "cookies", CONTENT_SETTING_SESSION_ONLY, 19 | WebsiteSettingsInfo::SYNCABLE, 20 | AllowlistedSchemes(kChromeUIScheme, kChromeDevToolsScheme), 21 | ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, 22 | -------------------------------------------------------------------------------- /patches/extra/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 | @@ -738,7 +738,7 @@ static base::mac::ScopedObjCClassSwizzle 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 | NSNumber* value = [NSNumber numberWithFloat:fiveHoursInSeconds]; 26 | CFPreferencesSetAppValue(checkInterval, value, app); 27 | CFPreferencesAppSynchronize(app); 28 | -------------------------------------------------------------------------------- /patches/extra/ungoogled-chromium/add-components-ungoogled.patch: -------------------------------------------------------------------------------- 1 | # Add ungoogled-chromium-specific code to components/ungoogled/ 2 | 3 | --- /dev/null 4 | +++ b/components/ungoogled/BUILD.gn 5 | @@ -0,0 +1,14 @@ 6 | +# Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved. 7 | +# Use of this source code is governed by a BSD-style license that can be 8 | +# found in the LICENSE file. 9 | + 10 | +component("ungoogled_switches") { 11 | + sources = [ 12 | + "ungoogled_switches.h", 13 | + "ungoogled_switches.cc", 14 | + ] 15 | + 16 | + defines = [ "IS_UNGOOGLED_IMPL" ] 17 | + 18 | + deps = [ "//base" ] 19 | +} 20 | --- /dev/null 21 | +++ b/components/ungoogled/ungoogled_switches.cc 22 | @@ -0,0 +1,21 @@ 23 | +// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved. 24 | +// Use of this source code is governed by a BSD-style license that can be 25 | +// found in the LICENSE file. 26 | + 27 | +#include "components/ungoogled/ungoogled_switches.h" 28 | + 29 | +namespace switches { 30 | + 31 | +// Enable fingerprinting deception for getClientRects and getBoundingClientRect 32 | +const char kFingerprintingClientRectsNoise[] = "fingerprinting-client-rects-noise"; 33 | + 34 | +// Enable fingerprinting deception for measureText 35 | +const char kFingerprintingCanvasMeasureTextNoise[] = "fingerprinting-canvas-measuretext-noise"; 36 | + 37 | +// Enable fingerprinting deception for Canvas image data 38 | +const char kFingerprintingCanvasImageDataNoise[] = "fingerprinting-canvas-image-data-noise"; 39 | + 40 | +// Set PDF Plugin name, for websites that analyze JavaScript API navigator.plugins 41 | +const char kPDFPluginName[] = "pdf-plugin-name"; 42 | + 43 | +} // namespace switches 44 | --- /dev/null 45 | +++ b/components/ungoogled/ungoogled_switches.h 46 | @@ -0,0 +1,21 @@ 47 | +// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved. 48 | +// Use of this source code is governed by a BSD-style license that can be 49 | +// found in the LICENSE file. 50 | + 51 | +// Defines all the fingerprinting command-line switches. 52 | + 53 | +#ifndef THIRD_PARTY_UNGOOGLED_FINGERPRINTING_SWITCHES_H_ 54 | +#define THIRD_PARTY_UNGOOGLED_FINGERPRINTING_SWITCHES_H_ 55 | + 56 | +#include "base/component_export.h" 57 | + 58 | +namespace switches { 59 | + 60 | +COMPONENT_EXPORT(UNGOOGLED) extern const char kFingerprintingClientRectsNoise[]; 61 | +COMPONENT_EXPORT(UNGOOGLED) extern const char kFingerprintingCanvasMeasureTextNoise[]; 62 | +COMPONENT_EXPORT(UNGOOGLED) extern const char kFingerprintingCanvasImageDataNoise[]; 63 | +COMPONENT_EXPORT(UNGOOGLED) extern const char kPDFPluginName[]; 64 | + 65 | +} 66 | + 67 | +#endif // THIRD_PARTY_UNGOOGLED_FINGERPRINTING_SWITCHES_H_ 68 | -------------------------------------------------------------------------------- /patches/extra/ungoogled-chromium/add-extra-channel-info.patch: -------------------------------------------------------------------------------- 1 | description: change extra channel info to "Ungoogled Chromium" 2 | author: Wengling Chen 3 | 4 | --- 5 | components/version_ui_strings.grdp | 4 ++-- 6 | 1 file changed, 2 insertions(+), 2 deletions(-) 7 | 8 | --- a/components/version_ui_strings.grdp 9 | +++ b/components/version_ui_strings.grdp 10 | @@ -4,10 +4,10 @@ 11 | About Version 12 | 13 | 14 | - Official Build 15 | + Official Build, ungoogled-chromium 16 | 17 | 18 | - Developer Build 19 | + Developer Build, ungoogled-chromium 20 | 21 | 22 | (32-bit) 23 | -------------------------------------------------------------------------------- /patches/extra/ungoogled-chromium/add-flag-for-bookmark-bar-ntp.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc 2 | +++ b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc 3 | @@ -4,6 +4,7 @@ 4 | 5 | #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" 6 | 7 | +#include "base/command_line.h" 8 | #include "base/observer_list.h" 9 | #include "build/build_config.h" 10 | #include "build/chromeos_buildflags.h" 11 | @@ -69,10 +70,12 @@ bool BookmarkTabHelper::ShouldShowBookma 12 | !prefs->GetBoolean(bookmarks::prefs::kShowBookmarkBar)) 13 | return false; 14 | 15 | + const std::string flag_value = 16 | + base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII("bookmark-bar-ntp"); 17 | // The bookmark bar is only shown on the NTP if the user 18 | // has added something to it. 19 | return IsNTP(web_contents()) && bookmark_model_ && 20 | - bookmark_model_->HasBookmarks(); 21 | + bookmark_model_->HasBookmarks() && (flag_value != "never"); 22 | } 23 | 24 | void BookmarkTabHelper::AddObserver(BookmarkTabHelperObserver* observer) { 25 | --- a/chrome/browser/ungoogled_flag_choices.h 26 | +++ b/chrome/browser/ungoogled_flag_choices.h 27 | @@ -39,4 +39,10 @@ const FeatureEntry::Choice kPDFPluginNam 28 | {"Google Chrome", switches::kPDFPluginName, "chrome"}, 29 | {"Microsoft Edge", switches::kPDFPluginName, "edge"}, 30 | }; 31 | +const FeatureEntry::Choice kBookmarkBarNewTab[] = { 32 | + {flags_ui::kGenericExperimentChoiceDefault, "", ""}, 33 | + {"Never", 34 | + "bookmark-bar-ntp", 35 | + "never"}, 36 | +}; 37 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ 38 | --- a/chrome/browser/ungoogled_flag_entries.h 39 | +++ b/chrome/browser/ungoogled_flag_entries.h 40 | @@ -44,4 +44,8 @@ 41 | "Set internal PDF plugin name", 42 | "Sets the internal PDF viewer plugin name. Useful for sites that probe JS API navigator.plugins. ungoogled-chromium flag.", 43 | kOsDesktop, MULTI_VALUE_TYPE(kPDFPluginNameChoices)}, 44 | + {"bookmark-bar-ntp", 45 | + "Bookmark Bar on New-Tab-Page", 46 | + "Disable the Bookmark Bar on the New-Tab-Page. ungoogled-chromium flag.", 47 | + kOsDesktop, MULTI_VALUE_TYPE(kBookmarkBarNewTab)}, 48 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 49 | -------------------------------------------------------------------------------- /patches/extra/ungoogled-chromium/add-flag-to-close-window-with-last-tab.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/tabs/tab_strip_model.cc 2 | +++ b/chrome/browser/ui/tabs/tab_strip_model.cc 3 | @@ -10,6 +10,7 @@ 4 | #include 5 | 6 | #include "base/auto_reset.h" 7 | +#include "base/command_line.h" 8 | #include "base/containers/flat_map.h" 9 | #include "base/metrics/histogram_macros.h" 10 | #include "base/metrics/user_metrics.h" 11 | @@ -1741,6 +1742,10 @@ bool TabStripModel::InternalCloseTabs( 12 | if (items.empty()) 13 | return true; 14 | 15 | + const std::string flag_value = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII("close-window-with-last-tab"); 16 | + if (flag_value == "never" && !closing_all_ && items.size() == count()) 17 | + delegate()->AddTabAt(GURL(), -1, true); 18 | + 19 | const bool closing_all = static_cast(items.size()) == count(); 20 | base::WeakPtr ref = weak_factory_.GetWeakPtr(); 21 | if (closing_all) { 22 | --- a/chrome/browser/ungoogled_flag_choices.h 23 | +++ b/chrome/browser/ungoogled_flag_choices.h 24 | @@ -60,4 +60,10 @@ const FeatureEntry::Choice kOmniboxAutoc 25 | "omnibox-autocomplete-filtering", 26 | "search-bookmarks-chrome"}, 27 | }; 28 | +const FeatureEntry::Choice kCloseWindowWithLastTab[] = { 29 | + {flags_ui::kGenericExperimentChoiceDefault, "", ""}, 30 | + {"Never", 31 | + "close-window-with-last-tab", 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 | @@ -52,4 +52,8 @@ 38 | "Omnibox Autocomplete Filtering", 39 | "Restrict omnibox autocomplete results to a combination of search suggestions (if enabled), bookmarks, and internal chrome pages. ungoogled-chromium flag.", 40 | kOsAll, MULTI_VALUE_TYPE(kOmniboxAutocompleteFiltering)}, 41 | + {"close-window-with-last-tab", 42 | + "Close window with last tab", 43 | + "Determines whether a window should close once the last tab is closed. ungoogled-chromium flag.", 44 | + kOsDesktop, MULTI_VALUE_TYPE(kCloseWindowWithLastTab)}, 45 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 46 | -------------------------------------------------------------------------------- /patches/extra/ungoogled-chromium/add-flag-to-convert-popups-to-tabs.patch: -------------------------------------------------------------------------------- 1 | # Make popups go to tabs instead 2 | 3 | --- a/chrome/browser/ungoogled_flag_entries.h 4 | +++ b/chrome/browser/ungoogled_flag_entries.h 5 | @@ -56,4 +56,8 @@ 6 | "Close window with last tab", 7 | "Determines whether a window should close once the last tab is closed. ungoogled-chromium flag.", 8 | kOsDesktop, MULTI_VALUE_TYPE(kCloseWindowWithLastTab)}, 9 | + {"popups-to-tabs", 10 | + "Popups to tabs", 11 | + "Makes popups open in new tabs. ungoogled-chromium flag", 12 | + kOsAll, SINGLE_VALUE_TYPE("popups-to-tabs")}, 13 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 14 | --- a/content/renderer/render_view_impl.cc 15 | +++ b/content/renderer/render_view_impl.cc 16 | @@ -86,6 +86,8 @@ WindowOpenDisposition RenderViewImpl::Na 17 | case blink::kWebNavigationPolicyNewWindow: 18 | return WindowOpenDisposition::NEW_WINDOW; 19 | case blink::kWebNavigationPolicyNewPopup: 20 | + if (base::CommandLine::ForCurrentProcess()->HasSwitch("popups-to-tabs")) 21 | + return WindowOpenDisposition::NEW_FOREGROUND_TAB; 22 | return WindowOpenDisposition::NEW_POPUP; 23 | default: 24 | NOTREACHED() << "Unexpected WebNavigationPolicy"; 25 | --- a/ui/base/mojom/window_open_disposition_mojom_traits.h 26 | +++ b/ui/base/mojom/window_open_disposition_mojom_traits.h 27 | @@ -5,6 +5,7 @@ 28 | #ifndef UI_BASE_MOJOM_WINDOW_OPEN_DISPOSITION_MOJOM_TRAITS_H_ 29 | #define UI_BASE_MOJOM_WINDOW_OPEN_DISPOSITION_MOJOM_TRAITS_H_ 30 | 31 | +#include "base/command_line.h" 32 | #include "base/notreached.h" 33 | #include "mojo/public/cpp/bindings/enum_traits.h" 34 | #include "ui/base/mojom/window_open_disposition.mojom.h" 35 | @@ -28,6 +29,8 @@ struct EnumTraitsHasSwitch("popups-to-tabs")) 40 | + return ui::mojom::WindowOpenDisposition::NEW_FOREGROUND_TAB; 41 | return ui::mojom::WindowOpenDisposition::NEW_POPUP; 42 | case WindowOpenDisposition::NEW_WINDOW: 43 | return ui::mojom::WindowOpenDisposition::NEW_WINDOW; 44 | @@ -63,6 +66,8 @@ struct EnumTraitsHasSwitch("popups-to-tabs")) 49 | + *out = WindowOpenDisposition::NEW_FOREGROUND_TAB; 50 | return true; 51 | case ui::mojom::WindowOpenDisposition::NEW_WINDOW: 52 | *out = WindowOpenDisposition::NEW_WINDOW; 53 | -------------------------------------------------------------------------------- /patches/extra/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 | @@ -20,4 +20,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 | @@ -8,6 +8,7 @@ 17 | #include 18 | 19 | #include "base/bind.h" 20 | +#include "base/command_line.h" 21 | #include "base/i18n/rtl.h" 22 | #include "base/macros.h" 23 | #include "base/metrics/histogram_macros.h" 24 | @@ -199,7 +200,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, base::string16()); 34 | -------------------------------------------------------------------------------- /patches/extra/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 | @@ -24,4 +24,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 | @@ -8,6 +8,7 @@ 17 | #include 18 | #include 19 | 20 | +#include "base/command_line.h" 21 | #include "base/i18n/uchar.h" 22 | #include "base/lazy_instance.h" 23 | #include "base/numerics/safe_conversions.h" 24 | @@ -268,6 +269,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 | base::StringPiece top_level_domain; 37 | base::string16 top_level_domain_unicode; 38 | -------------------------------------------------------------------------------- /patches/extra/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/startup_browser_creator_impl.cc 5 | +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc 6 | @@ -551,7 +551,8 @@ void StartupBrowserCreatorImpl::AddInfoB 7 | if (command_line_.HasSwitch(switches::kKioskMode)) 8 | return; 9 | 10 | - if (HasPendingUncleanExit(browser->profile())) 11 | + if (HasPendingUncleanExit(browser->profile()) && 12 | + !command_line_.HasSwitch("hide-crashed-bubble")) 13 | SessionCrashedBubble::ShowIfNotOffTheRecordProfile(browser); 14 | 15 | // The below info bars are only added to the first profile which is launched. 16 | --- a/chrome/browser/ungoogled_flag_entries.h 17 | +++ b/chrome/browser/ungoogled_flag_entries.h 18 | @@ -32,4 +32,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/extra/ungoogled-chromium/add-flag-to-scroll-tabs.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/views/frame/browser_root_view.cc 2 | +++ b/chrome/browser/ui/views/frame/browser_root_view.cc 3 | @@ -9,6 +9,7 @@ 4 | #include 5 | 6 | #include "base/bind.h" 7 | +#include "base/command_line.h" 8 | #include "base/metrics/user_metrics.h" 9 | #include "base/task/post_task.h" 10 | #include "base/task/thread_pool.h" 11 | @@ -101,6 +102,18 @@ int GetDropEffect(const ui::DropTargetEv 12 | return ui::DragDropTypes::DRAG_MOVE; 13 | } 14 | 15 | +bool ShouldScrollChangesTab() { 16 | + const std::string flag_value = 17 | + base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII("scroll-tabs"); 18 | + 19 | + if (flag_value == "always") 20 | + return true; 21 | + else if (flag_value == "never") 22 | + return false; 23 | + 24 | + return browser_defaults::kScrollEventChangesTab; 25 | +} 26 | + 27 | } // namespace 28 | 29 | BrowserRootView::DropInfo::DropInfo() = default; 30 | @@ -115,7 +128,9 @@ const char BrowserRootView::kViewClassNa 31 | 32 | BrowserRootView::BrowserRootView(BrowserView* browser_view, 33 | views::Widget* widget) 34 | - : views::internal::RootView(widget), browser_view_(browser_view) {} 35 | + : views::internal::RootView(widget), browser_view_(browser_view) { 36 | + scroll_event_changes_tab_ = ShouldScrollChangesTab(); 37 | +} 38 | 39 | BrowserRootView::~BrowserRootView() { 40 | // It's possible to destroy the browser while a drop is active. In this case, 41 | @@ -265,7 +280,7 @@ bool BrowserRootView::OnMouseWheel(const 42 | 43 | // Scroll-event-changes-tab is incompatible with scrolling tabstrip, so 44 | // disable it if the latter feature is enabled. 45 | - if (browser_defaults::kScrollEventChangesTab && 46 | + if (scroll_event_changes_tab_ && 47 | !base::FeatureList::IsEnabled(features::kScrollableTabStrip)) { 48 | // Switch to the left/right tab if the wheel-scroll happens over the 49 | // tabstrip, or the empty space beside the tabstrip. 50 | --- a/chrome/browser/ui/views/frame/browser_root_view.h 51 | +++ b/chrome/browser/ui/views/frame/browser_root_view.h 52 | @@ -129,6 +129,8 @@ class BrowserRootView : public views::in 53 | int scroll_remainder_x_ = 0; 54 | int scroll_remainder_y_ = 0; 55 | 56 | + bool scroll_event_changes_tab_ = false; 57 | + 58 | std::unique_ptr drop_info_; 59 | 60 | base::WeakPtrFactory weak_ptr_factory_{this}; 61 | --- a/chrome/browser/ungoogled_flag_choices.h 62 | +++ b/chrome/browser/ungoogled_flag_choices.h 63 | @@ -25,4 +25,13 @@ const FeatureEntry::Choice kShowAvatarBu 64 | "show-avatar-button", 65 | "never"} 66 | }; 67 | +const FeatureEntry::Choice kScrollEventChangesTab[] = { 68 | + {flags_ui::kGenericExperimentChoiceDefault, "", ""}, 69 | + {"Always", 70 | + "scroll-tabs", 71 | + "always"}, 72 | + {"Never", 73 | + "scroll-tabs", 74 | + "never"} 75 | +}; 76 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ 77 | --- a/chrome/browser/ungoogled_flag_entries.h 78 | +++ b/chrome/browser/ungoogled_flag_entries.h 79 | @@ -36,4 +36,8 @@ 80 | "Hide crashed bubble", 81 | "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.", 82 | kOsAll, SINGLE_VALUE_TYPE("hide-crashed-bubble")}, 83 | + {"scroll-tabs", 84 | + "Scroll switches tab", 85 | + "Switch to the left/right tab if the wheel-scroll happens over the tabstrip, or the empty space beside the tabstrip. ungoogled-chromium flag.", 86 | + kOsDesktop, MULTI_VALUE_TYPE(kScrollEventChangesTab)}, 87 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 88 | -------------------------------------------------------------------------------- /patches/extra/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 | @@ -241,14 +241,30 @@ void ToolbarView::Init() { 4 | 5 | std::unique_ptr 6 | toolbar_account_icon_container; 7 | + 8 | + const base::CommandLine& command_line = 9 | + *base::CommandLine::ForCurrentProcess(); 10 | + const std::string flag_value = 11 | + command_line.GetSwitchValueASCII("show-avatar-button"); 12 | + 13 | + bool in_incognito_or_guest_mode = browser_->profile()->IsOffTheRecord() || 14 | + browser_->profile()->IsGuestSession(); 15 | + 16 | bool show_avatar_toolbar_button = true; 17 | #if BUILDFLAG(IS_CHROMEOS_ASH) 18 | if (!base::FeatureList::IsEnabled(chromeos::features::kAvatarToolbarButton)) { 19 | // ChromeOS only badges Incognito and Guest icons in the browser window. 20 | - show_avatar_toolbar_button = browser_->profile()->IsOffTheRecord() || 21 | - browser_->profile()->IsGuestSession(); 22 | + show_avatar_toolbar_button = in_incognito_or_guest_mode; 23 | } 24 | #endif 25 | + 26 | + if (flag_value == "always") 27 | + show_avatar_toolbar_button = true; 28 | + else if (flag_value == "incognito-and-guest") 29 | + show_avatar_toolbar_button = in_incognito_or_guest_mode; 30 | + else if (flag_value == "never") 31 | + show_avatar_toolbar_button = false; 32 | + 33 | if (base::FeatureList::IsEnabled( 34 | autofill::features::kAutofillEnableToolbarStatusChip)) { 35 | // The avatar button is contained inside the page-action container and 36 | --- a/chrome/browser/ungoogled_flag_choices.h 37 | +++ b/chrome/browser/ungoogled_flag_choices.h 38 | @@ -13,4 +13,16 @@ const FeatureEntry::Choice kExtensionHan 39 | "extension-mime-request-handling", 40 | "always-prompt-for-install"}, 41 | }; 42 | +const FeatureEntry::Choice kShowAvatarButtonChoices[] = { 43 | + {flags_ui::kGenericExperimentChoiceDefault, "", ""}, 44 | + {"Always", 45 | + "show-avatar-button", 46 | + "always"}, 47 | + {"Incognito and Guest", 48 | + "show-avatar-button", 49 | + "incognito-and-guest"}, 50 | + {"Never", 51 | + "show-avatar-button", 52 | + "never"} 53 | +}; 54 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ 55 | --- a/chrome/browser/ungoogled_flag_entries.h 56 | +++ b/chrome/browser/ungoogled_flag_entries.h 57 | @@ -28,4 +28,8 @@ 58 | "Force punycode hostnames", 59 | "Force punycode in hostnames instead of Unicode when displaying Internationalized Domain Names (IDNs). ungoogled-chromium flag.", 60 | kOsAll, SINGLE_VALUE_TYPE("force-punycode-hostnames")}, 61 | + {"show-avatar-button", 62 | + "Show avatar/people/profile button", 63 | + "Show avatar/people/profile button in the browser toolbar. ungoogled-chromium flag.", 64 | + kOsDesktop, MULTI_VALUE_TYPE(kShowAvatarButtonChoices)}, 65 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 66 | -------------------------------------------------------------------------------- /patches/extra/ungoogled-chromium/add-flag-to-stack-tabs.patch: -------------------------------------------------------------------------------- 1 | # Add --enable-stacked-tab-strip and --enable-tab-adjust-layout flags to tweak tab strip behavior 2 | 3 | --- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc 4 | +++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc 5 | @@ -79,14 +79,13 @@ using content::WebContents; 6 | namespace { 7 | 8 | bool DetermineTabStripLayoutStacked(PrefService* prefs, bool* adjust_layout) { 9 | - *adjust_layout = false; 10 | - // For ash, always allow entering stacked mode. 11 | #if BUILDFLAG(IS_CHROMEOS_ASH) 12 | *adjust_layout = true; 13 | return prefs->GetBoolean(prefs::kTabStripStackedLayout); 14 | #else 15 | - return base::CommandLine::ForCurrentProcess()->HasSwitch( 16 | - switches::kForceStackedTabStripLayout); 17 | + *adjust_layout = base::CommandLine::ForCurrentProcess()->HasSwitch("enable-tab-adjust-layout"); 18 | + return prefs->GetBoolean(prefs::kTabStripStackedLayout) || 19 | + base::CommandLine::ForCurrentProcess()->HasSwitch("enable-stacked-tab-strip"); 20 | #endif 21 | } 22 | 23 | --- a/chrome/browser/ungoogled_flag_entries.h 24 | +++ b/chrome/browser/ungoogled_flag_entries.h 25 | @@ -8,4 +8,8 @@ 26 | "SetIpv6ProbeFalse", 27 | "Forces the result of the browser's IPv6 probing (i.e. IPv6 connectivity test) to be unsuccessful. This causes IPv4 addresses to be prioritized over IPv6 addresses. Without this flag, the probing result is set to be successful, which causes IPv6 to be used over IPv4 when possible. ungoogled-chromium flag.", 28 | kOsAll, FEATURE_VALUE_TYPE(net::features::kSetIpv6ProbeFalse)}, 29 | + {"enable-stacked-tab-strip", 30 | + "Enable stacking in the tab strip", 31 | + "Forces tabs to be stacked in the tab strip. Otherwise, they follow default behavior. ungoogled-chromium flag.", 32 | + kOsAll, SINGLE_VALUE_TYPE("enable-stacked-tab-strip")}, 33 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 34 | -------------------------------------------------------------------------------- /patches/extra/ungoogled-chromium/add-ipv6-probing-option.patch: -------------------------------------------------------------------------------- 1 | # Disables IPv6 probing and adds an option to change the IPv6 probing result 2 | 3 | --- a/chrome/browser/ungoogled_flag_entries.h 4 | +++ b/chrome/browser/ungoogled_flag_entries.h 5 | @@ -4,4 +4,8 @@ 6 | 7 | #ifndef CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 8 | #define CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 9 | + {"set-ipv6-probe-false", 10 | + "SetIpv6ProbeFalse", 11 | + "Forces the result of the browser's IPv6 probing (i.e. IPv6 connectivity test) to be unsuccessful. This causes IPv4 addresses to be prioritized over IPv6 addresses. Without this flag, the probing result is set to be successful, which causes IPv6 to be used over IPv4 when possible. ungoogled-chromium flag.", 12 | + kOsAll, FEATURE_VALUE_TYPE(net::features::kSetIpv6ProbeFalse)}, 13 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 14 | --- a/net/base/features.cc 15 | +++ b/net/base/features.cc 16 | @@ -199,5 +199,7 @@ constexpr base::Feature kFirstPartySets{ 17 | const base::FeatureParam kFirstPartySetsIsDogfooder{ 18 | &kFirstPartySets, "FirstPartySetsIsDogfooder", false}; 19 | 20 | +const base::Feature kSetIpv6ProbeFalse{"SetIpv6ProbeFalse", base::FEATURE_DISABLED_BY_DEFAULT}; 21 | + 22 | } // namespace features 23 | } // namespace net 24 | --- a/net/base/features.h 25 | +++ b/net/base/features.h 26 | @@ -294,6 +294,8 @@ NET_EXPORT extern const base::Feature kF 27 | // feature. 28 | NET_EXPORT extern const base::FeatureParam kFirstPartySetsIsDogfooder; 29 | 30 | +NET_EXPORT extern const base::Feature kSetIpv6ProbeFalse; 31 | + 32 | } // namespace features 33 | } // namespace net 34 | 35 | --- a/net/dns/host_resolver_manager.cc 36 | +++ b/net/dns/host_resolver_manager.cc 37 | @@ -132,11 +132,6 @@ const unsigned kMinimumTTLSeconds = kCac 38 | // cached. 39 | const int kIPv6ProbePeriodMs = 1000; 40 | 41 | -// RIPE NCC k.root-servers.net. 2001:7fd::1 (anycasted), used for IPv6 probes. 42 | -const uint8_t kIPv6ProbeAddress[] = {0x20, 0x01, 0x07, 0xfd, 0x00, 0x00, 43 | - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 44 | - 0x00, 0x00, 0x00, 0x01}; 45 | - 46 | enum DnsResolveStatus { 47 | RESOLVE_STATUS_DNS_SUCCESS = 0, 48 | RESOLVE_STATUS_PROC_SUCCESS, 49 | @@ -3370,7 +3365,7 @@ bool HostResolverManager::IsIPv6Reachabl 50 | (tick_clock_->NowTicks() - last_ipv6_probe_time_).InMilliseconds() > 51 | kIPv6ProbePeriodMs) { 52 | SetLastIPv6ProbeResult( 53 | - IsGloballyReachable(IPAddress(kIPv6ProbeAddress), net_log)); 54 | + !base::FeatureList::IsEnabled(features::kSetIpv6ProbeFalse)); 55 | cached = false; 56 | } 57 | net_log.AddEvent( 58 | -------------------------------------------------------------------------------- /patches/extra/ungoogled-chromium/add-ungoogled-flag-headers.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/about_flags.cc 2 | +++ b/chrome/browser/about_flags.cc 3 | @@ -2570,7 +2570,13 @@ const FeatureEntry::FeatureVariation kPa 4 | // calculate and verify checksum. 5 | // 6 | // When adding a new choice, add it to the end of the list. 7 | +#include "chrome/browser/ungoogled_flag_choices.h" 8 | +#include "chrome/browser/bromite_flag_choices.h" 9 | +#include "chrome/browser/ungoogled_platform_flag_choices.h" 10 | const FeatureEntry kFeatureEntries[] = { 11 | +#include "chrome/browser/ungoogled_flag_entries.h" 12 | +#include "chrome/browser/bromite_flag_entries.h" 13 | +#include "chrome/browser/ungoogled_platform_flag_entries.h" 14 | // Include generated flags for flag unexpiry; see //docs/flag_expiry.md and 15 | // //tools/flags/generate_unexpire_flags.py. 16 | #include "build/chromeos_buildflags.h" 17 | --- /dev/null 18 | +++ b/chrome/browser/bromite_flag_choices.h 19 | @@ -0,0 +1,7 @@ 20 | +// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved. 21 | +// Use of this source code is governed by a BSD-style license that can be 22 | +// found in the LICENSE file. 23 | + 24 | +#ifndef CHROME_BROWSER_BROMITE_FLAG_CHOICES_H_ 25 | +#define CHROME_BROWSER_BROMITE_FLAG_CHOICES_H_ 26 | +#endif // CHROME_BROWSER_BROMITE_FLAG_CHOICES_H_ 27 | --- /dev/null 28 | +++ b/chrome/browser/bromite_flag_entries.h 29 | @@ -0,0 +1,7 @@ 30 | +// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved. 31 | +// Use of this source code is governed by a BSD-style license that can be 32 | +// found in the LICENSE file. 33 | + 34 | +#ifndef CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_ 35 | +#define CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_ 36 | +#endif // CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_ 37 | --- /dev/null 38 | +++ b/chrome/browser/ungoogled_flag_choices.h 39 | @@ -0,0 +1,7 @@ 40 | +// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved. 41 | +// Use of this source code is governed by a BSD-style license that can be 42 | +// found in the LICENSE file. 43 | + 44 | +#ifndef CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ 45 | +#define CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ 46 | +#endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_ 47 | --- /dev/null 48 | +++ b/chrome/browser/ungoogled_flag_entries.h 49 | @@ -0,0 +1,7 @@ 50 | +// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved. 51 | +// Use of this source code is governed by a BSD-style license that can be 52 | +// found in the LICENSE file. 53 | + 54 | +#ifndef CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 55 | +#define CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 56 | +#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ 57 | --- /dev/null 58 | +++ b/chrome/browser/ungoogled_platform_flag_choices.h 59 | @@ -0,0 +1,7 @@ 60 | +// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved. 61 | +// Use of this source code is governed by a BSD-style license that can be 62 | +// found in the LICENSE file. 63 | + 64 | +#ifndef CHROME_BROWSER_UNGOOGLED_PLATFORM_FLAG_CHOICES_H_ 65 | +#define CHROME_BROWSER_UNGOOGLED_PLATFORM_FLAG_CHOICES_H_ 66 | +#endif // CHROME_BROWSER_UNGOOGLED_PLATFORM_FLAG_CHOICES_H_ 67 | --- /dev/null 68 | +++ b/chrome/browser/ungoogled_platform_flag_entries.h 69 | @@ -0,0 +1,7 @@ 70 | +// Copyright (c) 2020 The ungoogled-chromium Authors. All rights reserved. 71 | +// Use of this source code is governed by a BSD-style license that can be 72 | +// found in the LICENSE file. 73 | + 74 | +#ifndef CHROME_BROWSER_UNGOOGLED_PLATFORM_FLAG_ENTRIES_H_ 75 | +#define CHROME_BROWSER_UNGOOGLED_PLATFORM_FLAG_ENTRIES_H_ 76 | +#endif // CHROME_BROWSER_UNGOOGLED_PLATFORM_FLAG_ENTRIES_H_ 77 | -------------------------------------------------------------------------------- /patches/extra/ungoogled-chromium/disable-dial-repeating-discovery.patch: -------------------------------------------------------------------------------- 1 | # Disables the dial registry's repeating discovery timer 2 | # This caused unnecessary SSDP network spam 3 | 4 | --- a/chrome/browser/media/router/discovery/dial/dial_registry.cc 5 | +++ b/chrome/browser/media/router/discovery/dial/dial_registry.cc 6 | @@ -192,10 +192,6 @@ void DialRegistry::StartPeriodicDiscover 7 | 8 | dial_ = CreateDialService(); 9 | dial_->AddObserver(this); 10 | - DoDiscovery(); 11 | - repeating_timer_.reset(new base::RepeatingTimer()); 12 | - repeating_timer_->Start(FROM_HERE, refresh_interval_delta_, this, 13 | - &DialRegistry::DoDiscovery); 14 | } 15 | 16 | void DialRegistry::DoDiscovery() { 17 | @@ -209,8 +205,6 @@ void DialRegistry::StopPeriodicDiscovery 18 | if (!dial_) 19 | return; 20 | 21 | - repeating_timer_->Stop(); 22 | - repeating_timer_.reset(); 23 | dial_->RemoveObserver(this); 24 | ClearDialService(); 25 | } 26 | -------------------------------------------------------------------------------- /patches/extra/ungoogled-chromium/disable-formatting-in-omnibox.patch: -------------------------------------------------------------------------------- 1 | # Disables omission of URL elements in Omnibox 2 | 3 | --- a/components/url_formatter/url_formatter.cc 4 | +++ b/components/url_formatter/url_formatter.cc 5 | @@ -471,14 +471,14 @@ ComponentResult IDNToUnicodeOneComponent 6 | } // namespace 7 | 8 | const FormatUrlType kFormatUrlOmitNothing = 0; 9 | -const FormatUrlType kFormatUrlOmitUsernamePassword = 1 << 0; 10 | -const FormatUrlType kFormatUrlOmitHTTP = 1 << 1; 11 | -const FormatUrlType kFormatUrlOmitTrailingSlashOnBareHostname = 1 << 2; 12 | -const FormatUrlType kFormatUrlOmitHTTPS = 1 << 3; 13 | -const FormatUrlType kFormatUrlOmitTrivialSubdomains = 1 << 5; 14 | -const FormatUrlType kFormatUrlTrimAfterHost = 1 << 6; 15 | -const FormatUrlType kFormatUrlOmitFileScheme = 1 << 7; 16 | -const FormatUrlType kFormatUrlOmitMailToScheme = 1 << 8; 17 | +const FormatUrlType kFormatUrlOmitUsernamePassword = 0 << 0; 18 | +const FormatUrlType kFormatUrlOmitHTTP = 0 << 1; 19 | +const FormatUrlType kFormatUrlOmitTrailingSlashOnBareHostname = 0 << 2; 20 | +const FormatUrlType kFormatUrlOmitHTTPS = 0 << 3; 21 | +const FormatUrlType kFormatUrlOmitTrivialSubdomains = 0 << 5; 22 | +const FormatUrlType kFormatUrlTrimAfterHost = 0 << 6; 23 | +const FormatUrlType kFormatUrlOmitFileScheme = 0 << 7; 24 | +const FormatUrlType kFormatUrlOmitMailToScheme = 0 << 8; 25 | 26 | const FormatUrlType kFormatUrlOmitDefaults = 27 | kFormatUrlOmitUsernamePassword | kFormatUrlOmitHTTP | 28 | -------------------------------------------------------------------------------- /patches/extra/ungoogled-chromium/disable-intranet-redirect-detector.patch: -------------------------------------------------------------------------------- 1 | # Disables the intranet redirect detector. It generates extra DNS requests and the functionality using this is disabled 2 | # See this page for more information: https://mikewest.org/2012/02/chrome-connects-to-three-random-domains-at-startup 3 | 4 | --- a/chrome/browser/intranet_redirect_detector.cc 5 | +++ b/chrome/browser/intranet_redirect_detector.cc 6 | @@ -122,9 +122,7 @@ void IntranetRedirectDetector::FinishSle 7 | simple_loaders_.clear(); 8 | resulting_origins_.clear(); 9 | 10 | - const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); 11 | - if (cmd_line->HasSwitch(switches::kDisableBackgroundNetworking)) 12 | - return; 13 | + return; 14 | 15 | DCHECK(simple_loaders_.empty() && resulting_origins_.empty()); 16 | 17 | -------------------------------------------------------------------------------- /patches/extra/ungoogled-chromium/disable-webgl-renderer-info.patch: -------------------------------------------------------------------------------- 1 | # Return blank values for WebGLDebugRendererInfo to remove a potential data 2 | # leak while preventing potential website breakage 3 | 4 | --- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc 5 | +++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc 6 | @@ -3691,8 +3691,7 @@ ScriptValue WebGLRenderingContextBase::g 7 | pname, IdentifiabilityBenignStringToken( 8 | String(ContextGL()->GetString(GL_RENDERER)))); 9 | } 10 | - return WebGLAny(script_state, 11 | - String(ContextGL()->GetString(GL_RENDERER))); 12 | + return WebGLAny(script_state, String("")); 13 | } 14 | SynthesizeGLError( 15 | GL_INVALID_ENUM, "getParameter", 16 | @@ -3706,8 +3705,7 @@ ScriptValue WebGLRenderingContextBase::g 17 | pname, IdentifiabilityBenignStringToken( 18 | String(ContextGL()->GetString(GL_VENDOR)))); 19 | } 20 | - return WebGLAny(script_state, 21 | - String(ContextGL()->GetString(GL_VENDOR))); 22 | + return WebGLAny(script_state, String("")); 23 | } 24 | SynthesizeGLError( 25 | GL_INVALID_ENUM, "getParameter", 26 | -------------------------------------------------------------------------------- /patches/extra/ungoogled-chromium/enable-default-prefetch-privacy-changes.patch: -------------------------------------------------------------------------------- 1 | # Enable chrome://flags/#prefetch-privacy-changes by default 2 | 3 | --- a/third_party/blink/common/features.cc 4 | +++ b/third_party/blink/common/features.cc 5 | @@ -322,7 +322,7 @@ const base::Feature kFontAccessChooser{" 6 | // Prefetch request properties are updated to be privacy-preserving. See 7 | // crbug.com/988956. 8 | const base::Feature kPrefetchPrivacyChanges{"PrefetchPrivacyChanges", 9 | - base::FEATURE_DISABLED_BY_DEFAULT}; 10 | + base::FEATURE_ENABLED_BY_DEFAULT}; 11 | 12 | // Decodes jpeg 4:2:0 formatted images to YUV instead of RGBX and stores in this 13 | // format in the image decode cache. See crbug.com/919627 for details on the 14 | -------------------------------------------------------------------------------- /patches/extra/ungoogled-chromium/enable-menu-on-reload-button.patch: -------------------------------------------------------------------------------- 1 | # Add ability to always open dev context menu on reload button. 2 | 3 | --- a/chrome/browser/ui/views/toolbar/reload_button.cc 4 | +++ b/chrome/browser/ui/views/toolbar/reload_button.cc 5 | @@ -94,7 +94,7 @@ bool ReloadButton::GetMenuEnabled() cons 6 | } 7 | 8 | void ReloadButton::SetMenuEnabled(bool enable) { 9 | - menu_enabled_ = enable; 10 | + menu_enabled_ = true; 11 | } 12 | 13 | void ReloadButton::OnThemeChanged() { 14 | -------------------------------------------------------------------------------- /patches/extra/ungoogled-chromium/enable-page-saving-on-more-pages.patch: -------------------------------------------------------------------------------- 1 | # Add more URL schemes allowed for saving 2 | 3 | --- a/chrome/browser/ui/browser_commands.cc 4 | +++ b/chrome/browser/ui/browser_commands.cc 5 | @@ -407,11 +407,6 @@ int GetContentRestrictions(const Browser 6 | CoreTabHelper* core_tab_helper = 7 | CoreTabHelper::FromWebContents(current_tab); 8 | content_restrictions = core_tab_helper->content_restrictions(); 9 | - NavigationEntry* last_committed_entry = 10 | - current_tab->GetController().GetLastCommittedEntry(); 11 | - if (!content::IsSavableURL( 12 | - last_committed_entry ? last_committed_entry->GetURL() : GURL())) 13 | - content_restrictions |= CONTENT_RESTRICTION_SAVE; 14 | } 15 | return content_restrictions; 16 | } 17 | @@ -1202,8 +1197,7 @@ bool CanSavePage(const Browser* browser) 18 | prefs::kAllowFileSelectionDialogs)) { 19 | return false; 20 | } 21 | - return !browser->is_type_devtools() && 22 | - !(GetContentRestrictions(browser) & CONTENT_RESTRICTION_SAVE); 23 | + return true; 24 | } 25 | 26 | void Print(Browser* browser) { 27 | --- a/components/offline_pages/core/offline_page_model.cc 28 | +++ b/components/offline_pages/core/offline_page_model.cc 29 | @@ -22,7 +22,7 @@ OfflinePageModel::SavePageParams::~SaveP 30 | 31 | // static 32 | bool OfflinePageModel::CanSaveURL(const GURL& url) { 33 | - return url.is_valid() && url.SchemeIsHTTPOrHTTPS(); 34 | + return url.is_valid(); 35 | } 36 | 37 | OfflinePageModel::OfflinePageModel() = default; 38 | --- a/content/common/url_schemes.cc 39 | +++ b/content/common/url_schemes.cc 40 | @@ -22,6 +22,9 @@ namespace { 41 | bool g_registered_url_schemes = false; 42 | 43 | const char* const kDefaultSavableSchemes[] = { 44 | + url::kAboutScheme, 45 | + url::kBlobScheme, 46 | + url::kContentScheme, 47 | url::kHttpScheme, 48 | url::kHttpsScheme, 49 | url::kFileScheme, 50 | @@ -29,7 +32,13 @@ const char* const kDefaultSavableSchemes 51 | url::kFtpScheme, 52 | kChromeDevToolsScheme, 53 | kChromeUIScheme, 54 | - url::kDataScheme 55 | + url::kDataScheme, 56 | + url::kJavaScriptScheme, 57 | + url::kMailToScheme, 58 | + url::kWsScheme, 59 | + url::kWssScheme, 60 | + kGuestScheme, 61 | + kViewSourceScheme 62 | }; 63 | 64 | // These lists are lazily initialized below and are leaked on shutdown to 65 | --- a/content/public/common/url_utils.cc 66 | +++ b/content/public/common/url_utils.cc 67 | @@ -26,11 +26,7 @@ bool HasWebUIScheme(const GURL& url) { 68 | } 69 | 70 | bool IsSavableURL(const GURL& url) { 71 | - for (auto& scheme : GetSavableSchemes()) { 72 | - if (url.SchemeIs(scheme)) 73 | - return true; 74 | - } 75 | - return false; 76 | + return true; 77 | } 78 | 79 | bool IsURLHandledByNetworkStack(const GURL& url) { 80 | -------------------------------------------------------------------------------- /patches/extra/ungoogled-chromium/enable-paste-and-go-new-tab-button.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/ui/views/tabs/new_tab_button.cc 2 | +++ b/chrome/browser/ui/views/tabs/new_tab_button.cc 3 | @@ -58,10 +58,8 @@ NewTabButton::NewTabButton(TabStrip* tab 4 | SetAnimateOnStateChange(true); 5 | // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch 6 | // of lacros-chrome is complete. 7 | -#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) 8 | SetTriggerableEventFlags(GetTriggerableEventFlags() | 9 | ui::EF_MIDDLE_MOUSE_BUTTON); 10 | -#endif 11 | 12 | ink_drop_container_ = 13 | AddChildView(std::make_unique()); 14 | --- a/chrome/browser/ui/views/tabs/tab_strip.cc 15 | +++ b/chrome/browser/ui/views/tabs/tab_strip.cc 16 | @@ -2605,8 +2605,6 @@ void TabStrip::NewTabButtonPressed(const 17 | 18 | const ui::MouseEvent& mouse = static_cast(event); 19 | if (mouse.IsOnlyMiddleMouseButton()) { 20 | - if (ui::Clipboard::IsSupportedClipboardBuffer( 21 | - ui::ClipboardBuffer::kSelection)) { 22 | ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread(); 23 | CHECK(clipboard); 24 | base::string16 clipboard_text; 25 | @@ -2614,7 +2612,6 @@ void TabStrip::NewTabButtonPressed(const 26 | /* data_dst = */ nullptr, &clipboard_text); 27 | if (!clipboard_text.empty()) 28 | controller_->CreateNewTabWithLocation(clipboard_text); 29 | - } 30 | return; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /patches/extra/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() {} 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 | } // namespace media_router 43 | -------------------------------------------------------------------------------- /patches/extra/ungoogled-chromium/remove-disable-setuid-sandbox-as-bad-flag.patch: -------------------------------------------------------------------------------- 1 | # Remove the "--disable-setuid-sandbox" command line flag as a bad flag 2 | 3 | --- a/chrome/browser/ui/startup/bad_flags_prompt.cc 4 | +++ b/chrome/browser/ui/startup/bad_flags_prompt.cc 5 | @@ -62,7 +62,6 @@ static const char* kBadFlags[] = { 6 | // These flags disable sandbox-related security. 7 | sandbox::policy::switches::kDisableGpuSandbox, 8 | sandbox::policy::switches::kDisableSeccompFilterSandbox, 9 | - sandbox::policy::switches::kDisableSetuidSandbox, 10 | sandbox::policy::switches::kNoSandbox, 11 | #if defined(OS_WIN) 12 | sandbox::policy::switches::kAllowThirdPartyModules, 13 | -------------------------------------------------------------------------------- /patches/fix-breakpad-compile.patch: -------------------------------------------------------------------------------- 1 | --- chromium-84.0.4147.89.orig/third_party/breakpad/BUILD.gn 2 | +++ chromium-84.0.4147.89/third_party/breakpad/BUILD.gn 3 | @@ -598,7 +598,6 @@ if (is_linux || is_android) { 4 | "breakpad/src/client/minidump_file_writer.h", 5 | "breakpad/src/common/convert_UTF.cc", 6 | "breakpad/src/common/convert_UTF.h", 7 | - "breakpad/src/common/linux/breakpad_getcontext.S", 8 | "breakpad/src/common/linux/elf_core_dump.cc", 9 | "breakpad/src/common/linux/elf_core_dump.h", 10 | "breakpad/src/common/linux/elfutils.cc", 11 | @@ -628,6 +627,8 @@ if (is_linux || is_android) { 12 | configs += [ "//build/config/compiler:no_chromium_code" ] 13 | public_configs = [ ":client_config" ] 14 | 15 | + defines = [ "HAVE_GETCONTEXT" ] 16 | + 17 | if (current_cpu == "arm" && is_chromeos) { 18 | # Avoid running out of registers in 19 | # linux_syscall_support.h:sys_clone()'s inline assembly. 20 | @@ -686,7 +687,6 @@ if (is_linux || is_android) { 21 | "breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc", 22 | "breakpad/src/client/linux/minidump_writer/minidump_writer_unittest_utils.cc", 23 | "breakpad/src/client/linux/minidump_writer/proc_cpuinfo_reader_unittest.cc", 24 | - "breakpad/src/common/linux/breakpad_getcontext_unittest.cc", 25 | "breakpad/src/common/linux/elf_core_dump_unittest.cc", 26 | "breakpad/src/common/linux/file_id_unittest.cc", 27 | "breakpad/src/common/linux/linux_libc_support_unittest.cc", 28 | -------------------------------------------------------------------------------- /patches/fix-libvpx-compile.patch: -------------------------------------------------------------------------------- 1 | --- chromium-84.0.4147.89.orig/third_party/libvpx/BUILD.gn 2 | +++ chromium-84.0.4147.89/third_party/libvpx/BUILD.gn 3 | @@ -411,6 +411,8 @@ static_library("libvp9rc") { 4 | } else { 5 | sources = libvpx_srcs_arm64 6 | } 7 | + } else if (current_cpu == "ppc64") { 8 | + sources = libvpx_srcs_ppc64 9 | } 10 | sources += [ "//third_party/libvpx/source/libvpx/vp9/ratectrl_rtc.cc" ] 11 | sources += [ "//third_party/libvpx/source/libvpx/vp9/ratectrl_rtc.h" ] 12 | -------------------------------------------------------------------------------- /patches/fix-swiftshader-link.patch: -------------------------------------------------------------------------------- 1 | --- chromium-84.0.4147.135.orig/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn 2 | +++ chromium-84.0.4147.135/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn 3 | @@ -574,6 +574,7 @@ swiftshader_llvm_source_set("swiftshader 4 | "llvm/lib/MC/MCAsmInfoCOFF.cpp", 5 | "llvm/lib/MC/MCAsmInfoDarwin.cpp", 6 | "llvm/lib/MC/MCAsmInfoELF.cpp", 7 | + "llvm/lib/MC/MCAsmInfoXCOFF.cpp", 8 | "llvm/lib/MC/MCAsmMacro.cpp", 9 | "llvm/lib/MC/MCAsmStreamer.cpp", 10 | "llvm/lib/MC/MCAssembler.cpp", 11 | @@ -629,6 +630,7 @@ swiftshader_llvm_source_set("swiftshader 12 | "llvm/lib/MC/MCWinCOFFStreamer.cpp", 13 | "llvm/lib/MC/MCWinEH.cpp", 14 | "llvm/lib/MC/MCXCOFFStreamer.cpp", 15 | + "llvm/lib/MC/MCXCOFFObjectTargetWriter.cpp", 16 | "llvm/lib/MC/MachObjectWriter.cpp", 17 | "llvm/lib/MC/StringTableBuilder.cpp", 18 | "llvm/lib/MC/SubtargetFeature.cpp", 19 | -------------------------------------------------------------------------------- /patches/gl-bug-workaround.patch: -------------------------------------------------------------------------------- 1 | --- chromium-80.0.3987.87.orig/third_party/angle/src/compiler/translator/InfoSink.h 2 | +++ chromium-80.0.3987.87/third_party/angle/src/compiler/translator/InfoSink.h 3 | @@ -92,7 +92,16 @@ class TInfoSinkBase 4 | stream.precision(8); 5 | stream << f; 6 | } 7 | - sink.append(stream.str()); 8 | + 9 | + // Hack to work around a bug where negative floating point values 10 | + // are rendered like '.0.5' instead of '-0.5' 11 | + std::string res(stream.str()); 12 | + 13 | + if (signbit(f)) { // test if f is negative 14 | + res[0] = '-'; 15 | + } 16 | + 17 | + sink.append(res); 18 | return *this; 19 | } 20 | // Write boolean values as their names instead of integral value. 21 | --- chromium-80.0.3987.87.orig/third_party/skia/src/sksl/SkSLString.cpp 22 | +++ chromium-80.0.3987.87/third_party/skia/src/sksl/SkSLString.cpp 23 | @@ -240,7 +240,12 @@ String to_string(double value) { 24 | if (needsDotZero) { 25 | buffer << ".0"; 26 | } 27 | - return String(buffer.str().c_str()); 28 | + 29 | + std::string ret(buffer.str()); 30 | + if (signbit(value) && ret[0] == '.') { 31 | + ret[0] = '-'; 32 | + } 33 | + return String(ret.c_str()); 34 | } 35 | 36 | SKSL_INT stoi(const String& s) { 37 | -------------------------------------------------------------------------------- /patches/llvm-bug-workaround.patch: -------------------------------------------------------------------------------- 1 | --- a/third_party/ffmpeg/libavformat/utils.c 2019-10-10 14:55:27.000000000 -0400 2 | +++ b/third_party/ffmpeg/libavformat/utils.c 2019-10-17 15:39:59.495117121 -0400 3 | @@ -3316,7 +3316,7 @@ 4 | 5 | int ff_rfps_add_frame(AVFormatContext *ic, AVStream *st, int64_t ts) 6 | { 7 | - int i, j; 8 | + volatile int i, j; 9 | int64_t last = st->info->last_dts; 10 | 11 | if ( ts != AV_NOPTS_VALUE && last != AV_NOPTS_VALUE && ts > last 12 | -------------------------------------------------------------------------------- /patches/llvm-codegen.patch: -------------------------------------------------------------------------------- 1 | diff --git a/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp b/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp 2 | --- a/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp 3 | +++ b/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp 4 | @@ -331,8 +331,12 @@ 5 | case Intrinsic::ceil: Opcode = ISD::FCEIL; break; 6 | case Intrinsic::trunc: Opcode = ISD::FTRUNC; break; 7 | case Intrinsic::rint: Opcode = ISD::FRINT; break; 8 | + case Intrinsic::lrint: Opcode = ISD::LRINT; break; 9 | + case Intrinsic::llrint: Opcode = ISD::LLRINT; break; 10 | case Intrinsic::nearbyint: Opcode = ISD::FNEARBYINT; break; 11 | case Intrinsic::round: Opcode = ISD::FROUND; break; 12 | + case Intrinsic::lround: Opcode = ISD::LROUND; break; 13 | + case Intrinsic::llround: Opcode = ISD::LLROUND; break; 14 | case Intrinsic::minnum: Opcode = ISD::FMINNUM; break; 15 | case Intrinsic::maxnum: Opcode = ISD::FMAXNUM; break; 16 | case Intrinsic::umul_with_overflow: Opcode = ISD::UMULO; break; 17 | diff --git a/llvm/test/CodeGen/PowerPC/pr43527.ll b/llvm/test/CodeGen/PowerPC/pr43527.ll 18 | new file mode 100644 19 | --- /dev/null 20 | +++ b/llvm/test/CodeGen/PowerPC/pr43527.ll 21 | @@ -0,0 +1,75 @@ 22 | +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 23 | +; RUN: llc -ppc-asm-full-reg-names -verify-machineinstrs \ 24 | +; RUN: -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 < %s | FileCheck %s 25 | +; We don't want to produce a CTR loop due to the call to lrint in the body. 26 | +define dso_local void @test(i64 %arg, i64 %arg1) { 27 | +; CHECK-LABEL: test: 28 | +; CHECK: # %bb.0: # %bb 29 | +; CHECK-NEXT: bc 4, 4*cr5+lt, .LBB0_5 30 | +; CHECK-NEXT: # %bb.1: # %bb3 31 | +; CHECK-NEXT: bc 12, 4*cr5+lt, .LBB0_6 32 | +; CHECK-NEXT: # %bb.2: # %bb4 33 | +; CHECK-NEXT: mflr r0 34 | +; CHECK-NEXT: .cfi_def_cfa_offset 64 35 | +; CHECK-NEXT: .cfi_offset lr, 16 36 | +; CHECK-NEXT: .cfi_offset r29, -24 37 | +; CHECK-NEXT: .cfi_offset r30, -16 38 | +; CHECK-NEXT: std r29, -24(r1) # 8-byte Folded Spill 39 | +; CHECK-NEXT: std r30, -16(r1) # 8-byte Folded Spill 40 | +; CHECK-NEXT: std r0, 16(r1) 41 | +; CHECK-NEXT: stdu r1, -64(r1) 42 | +; CHECK-NEXT: sub r30, r4, r3 43 | +; CHECK-NEXT: li r29, 0 44 | +; CHECK-NEXT: .p2align 5 45 | +; CHECK-NEXT: .LBB0_3: # %bb5 46 | +; CHECK-NEXT: # 47 | +; CHECK-NEXT: lfsx f1, 0, r29 48 | +; CHECK-NEXT: bl lrint 49 | +; CHECK-NEXT: nop 50 | +; CHECK-NEXT: addi r30, r30, -1 51 | +; CHECK-NEXT: addi r29, r29, 4 52 | +; CHECK-NEXT: cmpldi r30, 0 53 | +; CHECK-NEXT: bne cr0, .LBB0_3 54 | +; CHECK-NEXT: # %bb.4: # %bb15 55 | +; CHECK-NEXT: stb r3, 0(r3) 56 | +; CHECK-NEXT: addi r1, r1, 64 57 | +; CHECK-NEXT: ld r0, 16(r1) 58 | +; CHECK-NEXT: mtlr r0 59 | +; CHECK-NEXT: ld r30, -16(r1) # 8-byte Folded Reload 60 | +; CHECK-NEXT: ld r29, -24(r1) # 8-byte Folded Reload 61 | +; CHECK-NEXT: blr 62 | +; CHECK-NEXT: .LBB0_5: # %bb2 63 | +; CHECK-NEXT: .LBB0_6: # %bb14 64 | +bb: 65 | + br i1 undef, label %bb3, label %bb2 66 | + 67 | +bb2: ; preds = %bb 68 | + unreachable 69 | + 70 | +bb3: ; preds = %bb 71 | + %tmp = sub i64 %arg1, %arg 72 | + br i1 undef, label %bb4, label %bb14 73 | + 74 | +bb4: ; preds = %bb3 75 | + br label %bb5 76 | + 77 | +bb5: ; preds = %bb5, %bb4 78 | + %tmp6 = phi i64 [ %tmp12, %bb5 ], [ 0, %bb4 ] 79 | + %tmp7 = getelementptr inbounds float, float* null, i64 %tmp6 80 | + %tmp8 = load float, float* %tmp7, align 4 81 | + %tmp9 = fpext float %tmp8 to double 82 | + %tmp10 = tail call i64 @llvm.lrint.i64.f64(double %tmp9) #2 83 | + %tmp11 = trunc i64 %tmp10 to i8 84 | + store i8 %tmp11, i8* undef, align 1 85 | + %tmp12 = add nuw i64 %tmp6, 1 86 | + %tmp13 = icmp eq i64 %tmp12, %tmp 87 | + br i1 %tmp13, label %bb15, label %bb5 88 | + 89 | +bb14: ; preds = %bb3 90 | + unreachable 91 | + 92 | +bb15: ; preds = %bb5 93 | + ret void 94 | +} 95 | + 96 | +declare i64 @llvm.lrint.i64.f64(double) 97 | 98 | -------------------------------------------------------------------------------- /patches/mei_preload2.patch: -------------------------------------------------------------------------------- 1 | diff --git a/chrome/installer/linux/BUILD.gn b/chrome/installer/linux/BUILD.gn 2 | index 6624417999bb..c45a13d47458 100644 3 | --- a/chrome/installer/linux/BUILD.gn 4 | +++ b/chrome/installer/linux/BUILD.gn 5 | @@ -63,8 +63,6 @@ packaging_files = packaging_files_binaries + [ 6 | "$root_out_dir/xdg-mime", 7 | "$root_out_dir/xdg-settings", 8 | "$root_out_dir/locales/en-US.pak", 9 | - "$root_out_dir/MEIPreload/manifest.json", 10 | - "$root_out_dir/MEIPreload/preloaded_data.pb", 11 | ] 12 | 13 | action_foreach("calculate_rpm_dependencies") { 14 | diff --git a/chrome/installer/linux/common/installer.include b/chrome/installer/linux/common/installer.include 15 | index 9a25d3ec2c1c..ca7e2e81672b 100644 16 | --- a/chrome/installer/linux/common/installer.include 17 | +++ b/chrome/installer/linux/common/installer.include 18 | @@ -192,13 +192,6 @@ stage_install_common() { 19 | cp -a '{}' "${STAGEDIR}/${INSTALLDIR}/locales/" \; 20 | find "${STAGEDIR}/${INSTALLDIR}/locales" -type f -exec chmod 644 '{}' \; 21 | 22 | - # MEI Preload 23 | - if [ -f "${BUILDDIR}/MEIPreload/manifest.json" ]; then 24 | - install -m 755 -d "${STAGEDIR}/${INSTALLDIR}/MEIPreload/" 25 | - install -m 644 "${BUILDDIR}/MEIPreload/manifest.json" "${STAGEDIR}/${INSTALLDIR}/MEIPreload/" 26 | - install -m 644 "${BUILDDIR}/MEIPreload/preloaded_data.pb" "${STAGEDIR}/${INSTALLDIR}/MEIPreload/" 27 | - fi 28 | - 29 | # Widevine CDM. 30 | if [ -d "${BUILDDIR}/WidevineCdm" ]; then 31 | # No need to strip; libwidevinecdm.so starts out stripped. 32 | diff --git a/chrome/installer/mini_installer/chrome.release b/chrome/installer/mini_installer/chrome.release 33 | index 029bf08f5363..fef367925e74 100644 34 | --- a/chrome/installer/mini_installer/chrome.release 35 | +++ b/chrome/installer/mini_installer/chrome.release 36 | @@ -66,12 +66,6 @@ SmallLogoDev.png: %(VersionDir)s\VisualElements\ 37 | swiftshader\libEGL.dll: %(VersionDir)s\swiftshader\ 38 | swiftshader\libGLESv2.dll: %(VersionDir)s\swiftshader\ 39 | 40 | -# 41 | -# MEI Preload sub dir 42 | -# 43 | -MEIPreload\manifest.json: %(VersionDir)s\MEIPreload\ 44 | -MEIPreload\preloaded_data.pb: %(VersionDir)s\MEIPreload\ 45 | - 46 | [HIDPI] 47 | chrome_200_percent.pak: %(VersionDir)s\ 48 | 49 | diff --git a/chrome/tools/build/chromeos/FILES.cfg b/chrome/tools/build/chromeos/FILES.cfg 50 | index 12f15ad0220d..62bf13886294 100644 51 | --- a/chrome/tools/build/chromeos/FILES.cfg 52 | +++ b/chrome/tools/build/chromeos/FILES.cfg 53 | @@ -122,13 +122,4 @@ FILES = [ 54 | 'filename': 'nacl_helper_nonsfi', 55 | 'buildtype': ['dev', 'official'], 56 | }, 57 | - # MEI Preload files: 58 | - { 59 | - 'filename': 'MEIPreload/manifest.json', 60 | - 'buildtype': ['dev', 'official'], 61 | - }, 62 | - { 63 | - 'filename': 'MEIPreload/preloaded_data.pb', 64 | - 'buildtype': ['dev', 'official'], 65 | - }, 66 | ] 67 | diff --git a/chrome/tools/build/linux/FILES.cfg b/chrome/tools/build/linux/FILES.cfg 68 | index eb046367e281..bd37c1c75775 100644 69 | --- a/chrome/tools/build/linux/FILES.cfg 70 | +++ b/chrome/tools/build/linux/FILES.cfg 71 | @@ -275,15 +275,6 @@ FILES = [ 72 | 'archive': 'content-shell.zip', 73 | 'optional': ['dev'], 74 | }, 75 | - # MEI Preload files: 76 | - { 77 | - 'filename': 'MEIPreload/manifest.json', 78 | - 'buildtype': ['dev', 'official'], 79 | - }, 80 | - { 81 | - 'filename': 'MEIPreload/preloaded_data.pb', 82 | - 'buildtype': ['dev', 'official'], 83 | - }, 84 | # ChromeDriver binary: 85 | { 86 | 'filename': 'chromedriver', 87 | diff --git a/chrome/tools/build/win/FILES.cfg b/chrome/tools/build/win/FILES.cfg 88 | index 66c0f7842be4..178d56660b93 100644 89 | --- a/chrome/tools/build/win/FILES.cfg 90 | +++ b/chrome/tools/build/win/FILES.cfg 91 | @@ -819,15 +819,6 @@ FILES = [ 92 | 'archive': 'metrics-metadata.zip', 93 | 'optional': ['dev', 'official'], 94 | }, 95 | - # MEI Preload files: 96 | - { 97 | - 'filename': 'MEIPreload/manifest.json', 98 | - 'buildtype': ['dev', 'official'], 99 | - }, 100 | - { 101 | - 'filename': 'MEIPreload/preloaded_data.pb', 102 | - 'buildtype': ['dev', 'official'], 103 | - }, 104 | # ChromeDriver binary: 105 | { 106 | 'filename': 'chromedriver.exe', 107 | -------------------------------------------------------------------------------- /patches/scoped_nss_types-h-compile-fix.patch: -------------------------------------------------------------------------------- 1 | From 3a3effdd81e97bfc4f2698cd1f41b008355b0469 Mon Sep 17 00:00:00 2001 2 | From: Raphael Kubo da Costa 3 | Date: Tue, 26 May 2020 16:34:45 +0000 4 | Subject: [PATCH] scoped_nss_types.h: Include instead of 5 | 6 | Follow-up to commit 701cae5de ("Introduce a function to format a DER-encoded 7 | SPKI for UI"). 8 | 9 | That is the format used by other files that include , and the 10 | pkg-config configuration already passes -I/path/to/nss to the compiler. 11 | 12 | This can potentially fix the non-sysroot build, as the NSS headers might be 13 | installed in e.g. /usr/include/nss3 rather than /usr/include/nss. 14 | 15 | Change-Id: I0461a7a7f8c93459f2281ea71c96434a74687ee8 16 | Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2214390 17 | Auto-Submit: Raphael Kubo da Costa 18 | Commit-Queue: David Benjamin 19 | Reviewed-by: David Benjamin 20 | Cr-Commit-Position: refs/heads/master@{#771840} 21 | --- 22 | 23 | diff --git a/crypto/scoped_nss_types.h b/crypto/scoped_nss_types.h 24 | index 2a3a6e1..0a663ea 100644 25 | --- a/crypto/scoped_nss_types.h 26 | +++ b/crypto/scoped_nss_types.h 27 | @@ -5,9 +5,9 @@ 28 | #ifndef CRYPTO_SCOPED_NSS_TYPES_H_ 29 | #define CRYPTO_SCOPED_NSS_TYPES_H_ 30 | 31 | +#include 32 | #include 33 | #include 34 | -#include 35 | #include 36 | #include 37 | 38 | -------------------------------------------------------------------------------- /patches/xxx-ppc64le-libvpx.patch: -------------------------------------------------------------------------------- 1 | Uses generic target for now. To use ppc64le, change --target to ppc64le-gnu 2 | and add --enable-vsx, and change generic to ppc for the rtcd header. 3 | 4 | From 18e6c5c55cfae0cfb458d8210d7bc709360a0e90 Mon Sep 17 00:00:00 2001 5 | From: q66 6 | Date: Wed, 9 Sep 2020 19:08:25 +0200 7 | Subject: [PATCH] enable generation of ppc64 libvpx bits 8 | 9 | this doesn't update the gni file, that's done from 10 | the template by running the appropriate scripts 11 | --- 12 | third_party/libvpx/BUILD.gn | 4 ++++ 13 | third_party/libvpx/generate_gni.sh | 9 +++++++++ 14 | 2 files changed, 13 insertions(+) 15 | 16 | diff --git third_party/libvpx/BUILD.gn third_party/libvpx/BUILD.gn 17 | index 7198e59..3300485 100644 18 | --- third_party/libvpx/BUILD.gn 19 | +++ third_party/libvpx/BUILD.gn 20 | @@ -336,6 +336,8 @@ static_library("libvpx") { 21 | } else { 22 | sources = libvpx_srcs_arm64 23 | } 24 | + } else if (current_cpu == "ppc64") { 25 | + sources = libvpx_srcs_ppc64 26 | } 27 | 28 | configs -= [ "//build/config/compiler:chromium_code" ] 29 | diff --git third_party/libvpx/generate_gni.sh third_party/libvpx/generate_gni.sh 30 | index bcf84b0..8a3f4f1 100755 31 | --- third_party/libvpx/generate_gni.sh 32 | +++ third_party/libvpx/generate_gni.sh 33 | @@ -361,6 +361,7 @@ gen_config_files linux/arm-neon-highbd "--target=armv7-linux-gcc ${all_platforms 34 | gen_config_files linux/arm64-highbd "--target=armv8-linux-gcc ${all_platforms} ${HIGHBD}" 35 | gen_config_files linux/mipsel "--target=mips32-linux-gcc ${all_platforms}" 36 | gen_config_files linux/mips64el "--target=mips64-linux-gcc ${all_platforms}" 37 | +gen_config_files linux/ppc64 "--target=generic-gnu $HIGHBD ${all_platforms}" 38 | gen_config_files linux/generic "--target=generic-gnu $HIGHBD ${all_platforms}" 39 | gen_config_files win/arm64 "--target=arm64-win64-vs15 ${all_platforms} ${HIGHBD}" 40 | gen_config_files win/ia32 "--target=x86-win32-vs14 ${all_platforms} ${x86_platforms}" 41 | @@ -386,6 +387,7 @@ lint_config linux/arm-neon-highbd 42 | lint_config linux/arm64-highbd 43 | lint_config linux/mipsel 44 | lint_config linux/mips64el 45 | +lint_config linux/ppc64 46 | lint_config linux/generic 47 | lint_config win/arm64 48 | lint_config win/ia32 49 | @@ -415,6 +417,7 @@ gen_rtcd_header linux/arm-neon-highbd armv7 50 | gen_rtcd_header linux/arm64-highbd armv8 51 | gen_rtcd_header linux/mipsel mipsel 52 | gen_rtcd_header linux/mips64el mips64el 53 | +gen_rtcd_header linux/ppc64 generic 54 | gen_rtcd_header linux/generic generic 55 | gen_rtcd_header win/arm64 armv8 56 | gen_rtcd_header win/ia32 x86 "${require_sse2}" 57 | @@ -500,6 +503,12 @@ if [ -z $ONLY_CONFIGS ]; then 58 | 59 | echo "MIPS64 source list is identical to MIPS source list. No need to generate it." 60 | 61 | + echo "Generate ppc64 source list." 62 | + config=$(print_config_basic linux/ppc64) 63 | + make_clean 64 | + make libvpx_srcs.txt target=libs $config > /dev/null 65 | + convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_ppc64 66 | + 67 | echo "Generate NaCl source list." 68 | config=$(print_config_basic nacl) 69 | make_clean 70 | -- 71 | 2.28.0 72 | 73 | -------------------------------------------------------------------------------- /ppc64le_build.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "#####################" 4 | echo "IT IS RECOMMENDED TO RUN THIS BUILD SCRIPT ON FEDORA 30!" 5 | echo "#####################" 6 | echo "If any error occurs, please refer to https://wiki.raptorcs.com/wiki/Porting/Chromium for missing dependencies or others." 7 | echo "#####################" 8 | 9 | set -eux 10 | 11 | cp -r /usr/lib/python3.7/site-packages/xcbgen /usr/lib/python2.7/site-packages 12 | 13 | #export CCACHE_MAXSIZE=25G 14 | 15 | #du -sh ccache/ || echo 16 | #du -sh build/llvm-project/ || echo 17 | 18 | env 19 | 20 | #mkdir -p ccache 21 | #export CCACHE_BASEDIR=${PWD} 22 | #export CCACHE_DIR=${PWD}/ccache 23 | 24 | #mkdir ccache_bin 25 | #cd ccache_bin 26 | 27 | #ln -s "$(which ccache)" ccache 28 | #ln -s "${PWD}/ccache" clang 29 | #ln -s "${PWD}/ccache" clang++ 30 | 31 | #NOCCACHE_PATH="${PATH}" 32 | #export PATH="${PWD}:${PATH}" 33 | 34 | which clang 35 | which clang++ 36 | 37 | ls -lGha 38 | 39 | #cd ../ 40 | 41 | mkdir -p build/download_cache 42 | ./utils/downloads.py retrieve -c build/download_cache -i downloads.ini 43 | ./utils/downloads.py unpack -c build/download_cache -i downloads.ini -- build/src 44 | 45 | ./utils/prune_binaries.py build/src pruning.list 46 | 47 | ./utils/patches.py apply build/src patches 48 | 49 | patch -p0 --ignore-whitespace -i "$(pwd)/patches/xxx-ppc64le-support.patch" -d build/src --no-backup-if-mismatch --forward 50 | patch -p0 --ignore-whitespace -i "$(pwd)/patches/xxx-ppc64le-libvpx.patch" -d build/src --no-backup-if-mismatch --forward 51 | 52 | ./utils/domain_substitution.py apply -r domain_regex.list -f domain_substitution.list -c build/domsubcache.tar.gz build/src 53 | 54 | cd build/src 55 | 56 | sed -i "s/default=False, dest='no_static_libstdcpp'/default=True, dest='no_static_libstdcpp'/" tools/gn/build/gen.py 57 | 58 | export CC=clang 59 | export CXX=clang++ 60 | 61 | mkdir -p out/Default 62 | ./tools/gn/bootstrap/bootstrap.py --skip-generate-buildfiles -j$(nproc) -o out/Default/gn 63 | export PATH="${PWD}/out/Default:${PATH}" 64 | 65 | cd third_party/libvpx 66 | mkdir source/config/linux/ppc64 67 | ./generate_gni.sh 68 | cd ../../ 69 | 70 | cd third_party/ffmpeg 71 | ./chromium/scripts/build_ffmpeg.py linux ppc64 72 | ./chromium/scripts/generate_gn.py 73 | ./chromium/scripts/copy_config.sh 74 | cd ../../ 75 | 76 | #cd third_party/dav1d 77 | #./generate_configs.py 78 | #./generate_source.py 79 | #cd ../../ 80 | 81 | unset CC 82 | unset CXX 83 | #export PATH="${NOCCACHE_PATH}" 84 | 85 | cd ../ 86 | 87 | REVISION=$(grep -Po "(?<=CLANG_REVISION = ').+(?=')" src/tools/clang/scripts/update.py) 88 | 89 | if [ -d "llvm-project" ]; then 90 | cd llvm-project 91 | git add -A 92 | git status 93 | git reset --hard HEAD 94 | git fetch 95 | git status 96 | cd ../ 97 | else 98 | git clone https://github.com/llvm/llvm-project.git 99 | fi 100 | 101 | git -C llvm-project checkout "${REVISION}" 102 | 103 | mkdir -p llvm_build 104 | cd llvm_build 105 | 106 | LLVM_BUILD_DIR=$(pwd) 107 | 108 | cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DLLVM_ENABLE_PROJECTS="clang;lld" -DLLVM_TARGETS_TO_BUILD="PowerPC" -G "Ninja" ../llvm-project/llvm 109 | ninja -j$(nproc) 110 | 111 | cd ../ 112 | cd src 113 | 114 | cp ../../flags.gn out/Default/args.gn 115 | 116 | sed "s#../llvm_build#${LLVM_BUILD_DIR}#g" -i out/Default/args.gn 117 | 118 | ./out/Default/gn gen out/Default --fail-on-unused-args 119 | ninja -C out/Default chrome chrome_sandbox chromedriver #stable_rpm 120 | -------------------------------------------------------------------------------- /revision.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /utils/.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | branch = True 3 | parallel = True 4 | omit = tests/* 5 | 6 | [report] 7 | # Regexes for lines to exclude from consideration 8 | exclude_lines = 9 | # Have to re-enable the standard pragma 10 | pragma: no cover 11 | 12 | # Don't complain about missing debug-only code: 13 | def __repr__ 14 | if self\.debug 15 | 16 | # Don't complain if tests don't hit defensive assertion code: 17 | raise AssertionError 18 | raise NotImplementedError 19 | 20 | # Don't complain if non-runnable code isn't run: 21 | if 0: 22 | if __name__ == .__main__.: 23 | -------------------------------------------------------------------------------- /utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/llebout/ungoogled-chromium/f8ed009f1afe5ee57b8bd49a2c57b270a24d715c/utils/__init__.py -------------------------------------------------------------------------------- /utils/prune_binaries.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 file. 7 | """Prune binaries from the source tree""" 8 | 9 | import argparse 10 | from pathlib import Path 11 | 12 | from _common import ENCODING, get_logger, add_common_params 13 | 14 | 15 | def prune_dir(unpack_root, prune_files): 16 | """ 17 | Delete files under unpack_root listed in prune_files. Returns an iterable of unremovable files. 18 | 19 | unpack_root is a pathlib.Path to the directory to be pruned 20 | prune_files is an iterable of files to be removed. 21 | """ 22 | unremovable_files = set() 23 | for relative_file in prune_files: 24 | file_path = unpack_root / relative_file 25 | try: 26 | file_path.unlink() 27 | except FileNotFoundError: 28 | unremovable_files.add(Path(relative_file).as_posix()) 29 | return unremovable_files 30 | 31 | 32 | def _callback(args): 33 | if not args.directory.exists(): 34 | get_logger().error('Specified directory does not exist: %s', args.directory) 35 | exit(1) 36 | if not args.pruning_list.exists(): 37 | get_logger().error('Could not find the pruning list: %s', args.pruning_list) 38 | prune_files = tuple(filter(len, args.pruning_list.read_text(encoding=ENCODING).splitlines())) 39 | unremovable_files = prune_dir(args.directory, prune_files) 40 | if unremovable_files: 41 | get_logger().error('%d files could not be pruned.', len(unremovable_files)) 42 | get_logger().debug('Files could not be pruned:\n%s', 43 | '\n'.join(f for f in unremovable_files)) 44 | exit(1) 45 | 46 | 47 | def main(): 48 | """CLI Entrypoint""" 49 | parser = argparse.ArgumentParser() 50 | parser.add_argument('directory', type=Path, help='The directory to apply binary pruning.') 51 | parser.add_argument('pruning_list', type=Path, help='Path to pruning.list') 52 | add_common_params(parser) 53 | parser.set_defaults(callback=_callback) 54 | 55 | args = parser.parse_args() 56 | args.callback(args) 57 | 58 | 59 | if __name__ == '__main__': 60 | main() 61 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /utils/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/llebout/ungoogled-chromium/f8ed009f1afe5ee57b8bd49a2c57b270a24d715c/utils/tests/__init__.py -------------------------------------------------------------------------------- /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 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 | -------------------------------------------------------------------------------- /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 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 | -------------------------------------------------------------------------------- /utils/third_party/README.md: -------------------------------------------------------------------------------- 1 | This directory contains third-party libraries used by build utilities. 2 | 3 | Contents: 4 | 5 | * [schema](//github.com/keleshev/schema) 6 | * For validating more sophisticated files such as INIs 7 | -------------------------------------------------------------------------------- /utils/third_party/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/llebout/ungoogled-chromium/f8ed009f1afe5ee57b8bd49a2c57b270a24d715c/utils/third_party/__init__.py --------------------------------------------------------------------------------