Compare commits
70 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 72be230adb | |||
| 5973e33db0 | |||
| ce3794932e | |||
| c3c2cfdce5 | |||
| d5328e5468 | |||
| df3f623ce3 | |||
| c85860fa87 | |||
| 5bf0662a2e | |||
| 9721334c56 | |||
| 374735e1ba | |||
| 5333dad88e | |||
| f353c28ab7 | |||
| 0d9cf8aefa | |||
| 9d9d4479ae | |||
| b2ea2d84bd | |||
| ea001f53af | |||
| 29b9fd70dd | |||
| cd5f460053 | |||
| 0c784d8e79 | |||
| a86284a2c8 | |||
| 10132253e9 | |||
| deeebee817 | |||
| 88d7a03d8d | |||
| 7b231012ef | |||
| 8013b3af73 | |||
| d2bb884eee | |||
| a25b8fdf15 | |||
| 07314070e0 | |||
| b8e154c0a4 | |||
| edd517e75f | |||
| dc4a8b6686 | |||
| 5fd0da8902 | |||
| 2fe35f1cbc | |||
| c0e49a6e5f | |||
| a68148b1b3 | |||
| d7a24f79d3 | |||
| ba4fee2f1c | |||
| ada3db3214 | |||
| 1fe2601442 | |||
| 69ec6832db | |||
| b7e051ff66 | |||
| 5e6679af3b | |||
| 127c193c16 | |||
| 1430f2f69b | |||
| 593fd56dd9 | |||
| 10a9c6387a | |||
| f1b511b12c | |||
| 5cd4d9e585 | |||
| dfd4885224 | |||
| 84e0fdbde7 | |||
| 6e6809a053 | |||
| 4473e83be8 | |||
| 8c7b2012a9 | |||
| fe261284a0 | |||
| 4439e6c91b | |||
| 6e8168f3bc | |||
| 3f97be7852 | |||
| 8136fa3543 | |||
| e379f406e5 | |||
| 7a02f2ac4b | |||
| 3a8dcfc49f | |||
| 2f1884b2e5 | |||
| 49e177c717 | |||
| 21f7d239c9 | |||
| 56d91da258 | |||
| d945d574c6 | |||
| d06b7de006 | |||
| cff0ad9d51 | |||
| c27928ab4a | |||
| 3fa437ef53 |
@@ -9,9 +9,9 @@ container:
|
||||
|
||||
code_check_task:
|
||||
pip_cache:
|
||||
folder: /usr/local/lib/python3.9/site-packages
|
||||
folder: /usr/local/lib/python3.10/site-packages
|
||||
fingerprint_script: cat .cirrus_requirements.txt
|
||||
populate_script: pip install -r .cirrus_requirements.txt
|
||||
populate_script: python3 -m ensurepip && pip install -r .cirrus_requirements.txt
|
||||
utils_script:
|
||||
- python3 -m yapf --style '.style.yapf' -e '*/third_party/*' -rpd utils
|
||||
- ./devutils/run_utils_pylint.py --hide-fixme
|
||||
@@ -26,9 +26,9 @@ validate_config_task:
|
||||
|
||||
validate_with_source_task:
|
||||
pip_cache:
|
||||
folder: /usr/local/lib/python3.9/site-packages
|
||||
folder: /usr/local/lib/python3.10/site-packages
|
||||
fingerprint_script: cat .cirrus_requirements.txt
|
||||
populate_script: pip install -r .cirrus_requirements.txt
|
||||
populate_script: python3 -m ensurepip && pip install -r .cirrus_requirements.txt
|
||||
chromium_download_script: |
|
||||
# These directories will not exist when this is called, unless cache retrieval
|
||||
# fails and leaves partially-complete files around.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Dockerfile for Python 3 with xz-utils (for tar.xz unpacking)
|
||||
|
||||
FROM python:3.9-slim-bullseye
|
||||
FROM python:3.10-slim-bookworm
|
||||
|
||||
RUN apt update && apt install -y xz-utils patch axel curl git
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Based on Python package versions in Debian bullseye
|
||||
# https://packages.debian.org/bullseye/python/
|
||||
astroid==2.5.1 # via pylint
|
||||
pylint==2.7.2
|
||||
pytest-cov==2.10.1
|
||||
pytest==6.0.2
|
||||
httplib2==0.18.1
|
||||
requests==2.25.1
|
||||
yapf==0.30.0
|
||||
# Based on Python package versions in Debian bookworm
|
||||
# https://packages.debian.org/bookworm/python/
|
||||
astroid==2.14.2 # via pylint
|
||||
pylint==2.16.2
|
||||
pytest-cov==4.0.0
|
||||
pytest==7.2.1
|
||||
httplib2==0.20.4
|
||||
requests==2.28.1
|
||||
pillow==11.3.0
|
||||
yapf==0.32.0
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
name: cirrus
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
cirrus:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cirruslabs/cirrus-action@ac5191d18a9bff05ff1a38f280f2b6d768e32153
|
||||
@@ -0,0 +1,16 @@
|
||||
name: Check patch series correctness
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.13'
|
||||
- run: python3 ./devutils/lint.py
|
||||
@@ -11,3 +11,6 @@ __pycache__/
|
||||
|
||||
# Ignore optional build / cache directory
|
||||
/build
|
||||
|
||||
# Ignore generated resources
|
||||
/resources/generated
|
||||
|
||||
@@ -1 +1 @@
|
||||
138.0.7204.96
|
||||
138.0.7204.183
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
# pylint: disable=missing-function-docstring,invalid-name,global-statement,missing-module-docstring
|
||||
# Copyright 2025 The Helium Authors
|
||||
# You can use, redistribute, and/or modify this source code under
|
||||
# the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||
|
||||
from third_party import unidiff
|
||||
|
||||
LICENSE_HEADER_IGNORES = ["html", "license", "readme"]
|
||||
|
||||
patches_dir = None
|
||||
series = None
|
||||
|
||||
|
||||
def _read_text(path):
|
||||
with open(patches_dir / path, "r", encoding="utf-8") as f:
|
||||
return filter(str, f.read().splitlines())
|
||||
|
||||
|
||||
def _init(root):
|
||||
global patches_dir
|
||||
global series
|
||||
patches_dir = root / "patches"
|
||||
series = set(_read_text("series"))
|
||||
|
||||
|
||||
def a_all_patches_in_series_exist():
|
||||
for patch in series:
|
||||
assert (patches_dir / patch).is_file(), \
|
||||
f"{patch} is in series, but does not exist in the source tree"
|
||||
|
||||
|
||||
def a_all_patches_in_tree_are_in_series():
|
||||
for patch in patches_dir.rglob('*'):
|
||||
if not patch.is_file() or patch == patches_dir / "series":
|
||||
continue
|
||||
|
||||
assert str(patch.relative_to(patches_dir)) in series, \
|
||||
f"{patch} exists in source tree, but is not included in the series"
|
||||
|
||||
|
||||
def b_all_patches_have_meaningful_contents():
|
||||
for patch in series:
|
||||
assert any(l.startswith('+++ ') for l in _read_text(patch)), \
|
||||
f"{patch} does not have any meaningful content"
|
||||
|
||||
|
||||
def b_all_patches_have_no_trailing_whitespace():
|
||||
for patch in series:
|
||||
for i, line in enumerate(_read_text(patch)):
|
||||
if not line.startswith('+ '):
|
||||
continue
|
||||
|
||||
assert not line.endswith(' '), \
|
||||
f"{patch} contains trailing whitespace on line {i + 1}"
|
||||
|
||||
|
||||
def c_all_new_files_have_license_header():
|
||||
for patch in series:
|
||||
if 'helium' not in patch:
|
||||
continue
|
||||
|
||||
patch_set = unidiff.PatchSet('\n'.join(_read_text(patch)))
|
||||
added_files = filter(lambda f: f.is_added_file, patch_set)
|
||||
|
||||
for file in added_files:
|
||||
if any(p in file.path.lower() for p in LICENSE_HEADER_IGNORES):
|
||||
continue
|
||||
|
||||
assert any('terms of the GPL-3.0 license' in str(hunk) for hunk in file), \
|
||||
f"File {file.path} was added in {patch}, but contains no Helium license header"
|
||||
|
||||
|
||||
def c_all_new_headers_have_correct_guard():
|
||||
for patch in series:
|
||||
if 'helium' not in patch:
|
||||
continue
|
||||
|
||||
patch_set = unidiff.PatchSet('\n'.join(_read_text(patch)))
|
||||
added_files = filter(lambda f: f.is_added_file and f.path.endswith('.h'), patch_set)
|
||||
|
||||
for file in added_files:
|
||||
expected_macro_name = file.path.upper() \
|
||||
.replace('.', '_') \
|
||||
.replace('/', '_') + '_'
|
||||
|
||||
assert len(file) == 1
|
||||
|
||||
expected = {
|
||||
"ifndef": f'#ifndef {expected_macro_name}',
|
||||
"define": f'#define {expected_macro_name}'
|
||||
}
|
||||
|
||||
found = {
|
||||
"ifndef": None,
|
||||
"define": None,
|
||||
}
|
||||
|
||||
for _line in file[0]:
|
||||
line = str(_line)
|
||||
|
||||
if '#ifndef' in line:
|
||||
assert found["define"] is None
|
||||
assert found["ifndef"] is None
|
||||
found["ifndef"] = line
|
||||
elif '#define' in line:
|
||||
assert found["ifndef"] is not None
|
||||
assert found["define"] is None
|
||||
found["define"] = line
|
||||
|
||||
for macro_type, value in found.items():
|
||||
value_print = (value or '(none)').rstrip()
|
||||
assert value == f"+{expected[macro_type]}\n", \
|
||||
f"Patch {patch} has unexpected {macro_type} in {file.path}:" \
|
||||
f"{value_print}, expecting: {expected[macro_type]}"
|
||||
@@ -21,6 +21,7 @@ from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils'))
|
||||
from downloads import DownloadInfo, schema
|
||||
|
||||
sys.path.pop(0)
|
||||
|
||||
|
||||
|
||||
@@ -27,8 +27,7 @@ def main():
|
||||
Path(input_name).read_text(encoding='UTF-8').splitlines()))
|
||||
for file_name in file_iter:
|
||||
if not Path(args.root_dir, file_name).exists():
|
||||
print('ERROR: Path "{}" from file "{}" does not exist.'.format(
|
||||
file_name, input_name),
|
||||
print(f'ERROR: Path "{file_name}" from file "{input_name}" does not exist.',
|
||||
file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils'))
|
||||
from _common import ENCODING, get_logger
|
||||
|
||||
sys.path.pop(0)
|
||||
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ from third_party import unidiff
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils'))
|
||||
from _common import ENCODING, get_logger, parse_series # pylint: disable=wrong-import-order
|
||||
|
||||
sys.path.pop(0)
|
||||
|
||||
# File suffixes to ignore for checking unused patches
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Copyright 2025 The Helium Authors
|
||||
# You can use, redistribute, and/or modify this source code under
|
||||
# the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||
"""Script to run sanity checks against the Helium patchset."""
|
||||
|
||||
import sys
|
||||
import inspect
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
|
||||
import _lint_tests
|
||||
|
||||
|
||||
def parse_args():
|
||||
"""Parses the CLI arguments."""
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('-t', '--tree', help='root of the source tree to check')
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def main():
|
||||
"""CLI entrypoint for executing tests"""
|
||||
args = parse_args()
|
||||
root_dir = (Path(__file__).parent / "..").resolve()
|
||||
|
||||
if args.tree:
|
||||
root_dir = Path(args.tree).resolve()
|
||||
|
||||
_lint_tests._init(root_dir) # pylint: disable=protected-access
|
||||
|
||||
for name, func in inspect.getmembers(_lint_tests, inspect.isfunction):
|
||||
if name.startswith("_"):
|
||||
continue
|
||||
|
||||
try:
|
||||
func()
|
||||
print(f"[OK] {name}")
|
||||
except Exception:
|
||||
print(f"[ERR] {name}:", file=sys.stderr)
|
||||
raise
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -23,7 +23,6 @@ def main():
|
||||
|
||||
disables = [
|
||||
'wrong-import-position',
|
||||
'bad-continuation',
|
||||
'duplicate-code',
|
||||
]
|
||||
|
||||
@@ -33,7 +32,7 @@ def main():
|
||||
disables.append('locally-disabled')
|
||||
|
||||
pylint_options = [
|
||||
'--disable={}'.format(','.join(disables)),
|
||||
f"--disable={','.join(disables)}",
|
||||
'--jobs=4',
|
||||
'--score=n',
|
||||
'--persistent=n',
|
||||
|
||||
@@ -18,6 +18,7 @@ class ChangeDir:
|
||||
"""
|
||||
Changes directory to path in with statement
|
||||
"""
|
||||
|
||||
def __init__(self, path):
|
||||
self._path = path
|
||||
self._orig_path = os.getcwd()
|
||||
@@ -31,12 +32,12 @@ class ChangeDir:
|
||||
|
||||
def run_pylint(module_path, pylint_options, ignore_prefixes=tuple()):
|
||||
"""Runs Pylint. Returns a boolean indicating success"""
|
||||
pylint_stats = Path('/run/user/{}/pylint_stats'.format(os.getuid()))
|
||||
pylint_stats = Path(f'/run/user/{os.getuid()}/pylint_stats')
|
||||
if not pylint_stats.parent.is_dir(): #pylint: disable=no-member
|
||||
pylint_stats = Path('/run/shm/pylint_stats')
|
||||
os.environ['PYLINTHOME'] = str(pylint_stats)
|
||||
|
||||
input_paths = list()
|
||||
input_paths = []
|
||||
if not module_path.exists():
|
||||
print('ERROR: Cannot find', module_path)
|
||||
sys.exit(1)
|
||||
@@ -75,12 +76,11 @@ def main():
|
||||
args = parser.parse_args()
|
||||
|
||||
if not args.module_path.exists():
|
||||
print('ERROR: Module path "{}" does not exist'.format(args.module_path))
|
||||
print(f'ERROR: Module path "{args.module_path}" does not exist')
|
||||
sys.exit(1)
|
||||
|
||||
disables = [
|
||||
'wrong-import-position',
|
||||
'bad-continuation',
|
||||
]
|
||||
|
||||
if args.hide_fixme:
|
||||
@@ -89,7 +89,7 @@ def main():
|
||||
disables.append('locally-disabled')
|
||||
|
||||
pylint_options = [
|
||||
'--disable={}'.format(','.join(disables)),
|
||||
f"--disable={','.join(disables)}",
|
||||
'--jobs=4',
|
||||
'--score=n',
|
||||
'--persistent=n',
|
||||
|
||||
@@ -21,21 +21,18 @@ def main():
|
||||
help='Show "locally-disabled" Pylint warnings.')
|
||||
args = parser.parse_args()
|
||||
|
||||
disable = ['bad-continuation']
|
||||
|
||||
if args.hide_fixme:
|
||||
disable.append('fixme')
|
||||
if not args.show_locally_disabled:
|
||||
disable.append('locally-disabled')
|
||||
|
||||
pylint_options = [
|
||||
'--disable={}'.format(','.join(disable)),
|
||||
'--jobs=4',
|
||||
'--max-args=7',
|
||||
'--score=n',
|
||||
'--persistent=n',
|
||||
]
|
||||
|
||||
if args.hide_fixme:
|
||||
pylint_options.append('--disable=fixme')
|
||||
if not args.show_locally_disabled:
|
||||
pylint_options.append('--disable=locally-disabled')
|
||||
|
||||
ignore_prefixes = [
|
||||
('third_party', ),
|
||||
('tests', ),
|
||||
|
||||
@@ -11,11 +11,13 @@ import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent.parent.parent / 'utils'))
|
||||
from _common import get_logger, set_logging_level
|
||||
from _common import ENCODING, get_logger, set_logging_level
|
||||
|
||||
sys.path.pop(0)
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
|
||||
from check_patch_files import check_series_duplicates
|
||||
|
||||
sys.path.pop(0)
|
||||
|
||||
|
||||
@@ -33,7 +35,7 @@ def test_check_series_duplicates():
|
||||
'a.patch',
|
||||
'b.patch',
|
||||
'c.patch',
|
||||
]))
|
||||
]), encoding=ENCODING)
|
||||
assert not check_series_duplicates(patches_dir)
|
||||
|
||||
get_logger().info('Check duplicates')
|
||||
@@ -42,7 +44,8 @@ def test_check_series_duplicates():
|
||||
'b.patch',
|
||||
'c.patch',
|
||||
'a.patch',
|
||||
]))
|
||||
]),
|
||||
encoding=ENCODING)
|
||||
assert check_series_duplicates(patches_dir)
|
||||
|
||||
|
||||
|
||||
@@ -11,11 +11,13 @@ import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent.parent.parent / 'utils'))
|
||||
from _common import get_logger, set_logging_level
|
||||
from _common import ENCODING, get_logger, set_logging_level
|
||||
|
||||
sys.path.pop(0)
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
|
||||
import validate_patches
|
||||
|
||||
sys.path.pop(0)
|
||||
|
||||
|
||||
@@ -30,8 +32,8 @@ def test_test_patches():
|
||||
|
||||
def _run_test_patches(patch_content):
|
||||
with tempfile.TemporaryDirectory() as tmpdirname:
|
||||
Path(tmpdirname, 'foobar.txt').write_text(orig_file_content)
|
||||
Path(tmpdirname, 'test.patch').write_text(patch_content)
|
||||
Path(tmpdirname, 'foobar.txt').write_text(orig_file_content, encoding=ENCODING)
|
||||
Path(tmpdirname, 'test.patch').write_text(patch_content, encoding=ENCODING)
|
||||
_, patch_cache = validate_patches._load_all_patches(series_iter, Path(tmpdirname))
|
||||
required_files = validate_patches._get_required_files(patch_cache)
|
||||
files_under_test = validate_patches._retrieve_local_files(required_files,
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
# Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE.ungoogled_chromium file.
|
||||
|
||||
"""
|
||||
Update binary pruning and domain substitution lists automatically.
|
||||
|
||||
@@ -28,6 +27,7 @@ sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils'))
|
||||
from _common import get_logger
|
||||
from domain_substitution import DomainRegexList, TREE_ENCODINGS
|
||||
from prune_binaries import CONTINGENT_PATHS
|
||||
|
||||
sys.path.pop(0)
|
||||
|
||||
# Encoding for output files
|
||||
@@ -398,9 +398,9 @@ def main(args_list=None):
|
||||
args.tree,
|
||||
DomainRegexList(args.domain_regex).search_regex, args.processes)
|
||||
with args.pruning.open('w', encoding=_ENCODING) as file_obj:
|
||||
file_obj.writelines('%s\n' % line for line in pruning_set)
|
||||
file_obj.writelines(f'{line}\n' for line in pruning_set)
|
||||
with args.domain_substitution.open('w', encoding=_ENCODING) as file_obj:
|
||||
file_obj.writelines('%s\n' % line for line in domain_substitution_set)
|
||||
file_obj.writelines(f'{line}\n' for line in domain_substitution_set)
|
||||
if unused_patterns.log_unused(args.error_unused) and args.error_unused:
|
||||
get_logger().error('Please update or remove unused patterns and/or prefixes. '
|
||||
'The lists have still been updated with the remaining valid entries.')
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
# Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE.ungoogled_chromium file.
|
||||
|
||||
"""
|
||||
Utility to ease the updating of platform patches against ungoogled-chromium's patches
|
||||
"""
|
||||
@@ -22,6 +21,7 @@ from pathlib import Path
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils'))
|
||||
from _common import ENCODING, get_logger
|
||||
from patches import merge_patches
|
||||
|
||||
sys.path.pop(0)
|
||||
|
||||
_SERIES = 'series'
|
||||
@@ -114,14 +114,14 @@ def unmerge_platform_patches(platform_patches_dir):
|
||||
return False
|
||||
orig_series = (platform_patches_dir / _SERIES_ORIG).read_text(encoding=ENCODING).splitlines()
|
||||
# patch path -> list of lines after patch path and before next patch path
|
||||
path_comments = dict()
|
||||
path_comments = {}
|
||||
# patch path -> inline comment for patch
|
||||
path_inline_comments = dict()
|
||||
path_inline_comments = {}
|
||||
previous_path = None
|
||||
for partial_path in orig_series:
|
||||
if not partial_path or partial_path.startswith('#'):
|
||||
if partial_path not in path_comments:
|
||||
path_comments[previous_path] = list()
|
||||
path_comments[previous_path] = []
|
||||
path_comments[previous_path].append(partial_path)
|
||||
else:
|
||||
path_parts = partial_path.split(' #', maxsplit=1)
|
||||
|
||||
@@ -23,12 +23,14 @@ from pathlib import Path
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent / 'third_party'))
|
||||
import unidiff
|
||||
from unidiff.constants import LINE_TYPE_EMPTY, LINE_TYPE_NO_NEWLINE
|
||||
|
||||
sys.path.pop(0)
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'utils'))
|
||||
from domain_substitution import TREE_ENCODINGS
|
||||
from _common import ENCODING, get_logger, get_chromium_version, parse_series, add_common_params
|
||||
from patches import dry_run_check
|
||||
|
||||
sys.path.pop(0)
|
||||
|
||||
try:
|
||||
@@ -38,6 +40,7 @@ try:
|
||||
|
||||
class _VerboseRetry(urllib3.util.Retry):
|
||||
"""A more verbose version of HTTP Adatper about retries"""
|
||||
|
||||
def sleep_for_retry(self, response=None):
|
||||
"""Sleeps for Retry-After, and logs the sleep time"""
|
||||
if response:
|
||||
@@ -100,16 +103,16 @@ class _DepsNodeVisitor(ast.NodeVisitor):
|
||||
def visit_Call(self, node): #pylint: disable=invalid-name
|
||||
"""Override Call syntax handling"""
|
||||
if node.func.id not in self._allowed_callables:
|
||||
raise _UnexpectedSyntaxError('Unexpected call of "%s" at line %s, column %s' %
|
||||
(node.func.id, node.lineno, node.col_offset))
|
||||
raise _UnexpectedSyntaxError(f'Unexpected call of "{node.func.id}" '
|
||||
f'at line {node.lineno}, column {node.col_offset}')
|
||||
|
||||
def generic_visit(self, node):
|
||||
for ast_type in self._valid_syntax_types:
|
||||
if isinstance(node, ast_type):
|
||||
super().generic_visit(node)
|
||||
return
|
||||
raise _UnexpectedSyntaxError('Unexpected {} at line {}, column {}'.format(
|
||||
type(node).__name__, node.lineno, node.col_offset))
|
||||
raise _UnexpectedSyntaxError(f'Unexpected {type(node).__name__} '
|
||||
f'at line {node.lineno}, column {node.col_offset}')
|
||||
|
||||
|
||||
def _validate_deps(deps_text):
|
||||
@@ -124,6 +127,7 @@ def _validate_deps(deps_text):
|
||||
|
||||
def _deps_var(deps_globals):
|
||||
"""Return a function that implements DEPS's Var() function"""
|
||||
|
||||
def _var_impl(var_name):
|
||||
"""Implementation of Var() in DEPS"""
|
||||
return deps_globals['vars'][var_name]
|
||||
@@ -145,8 +149,8 @@ def _download_googlesource_file(download_session, repo_url, version, relative_pa
|
||||
googlesource.com repo as a string.
|
||||
"""
|
||||
if 'googlesource.com' not in repo_url:
|
||||
raise ValueError('Repository URL is not a googlesource.com URL: {}'.format(repo_url))
|
||||
full_url = repo_url + '/+/{}/{}?format=TEXT'.format(version, str(relative_path))
|
||||
raise ValueError(f'Repository URL is not a googlesource.com URL: {repo_url}')
|
||||
full_url = repo_url + f'/+/{version}/{str(relative_path)}?format=TEXT'
|
||||
get_logger().debug('Downloading: %s', full_url)
|
||||
response = download_session.get(full_url)
|
||||
if response.status_code == 404:
|
||||
@@ -172,13 +176,13 @@ def _get_dep_value_url(deps_globals, dep_value):
|
||||
# Probably a Python format string
|
||||
url = url.format(**deps_globals['vars'])
|
||||
if url.count('@') != 1:
|
||||
raise _PatchValidationError('Invalid number of @ symbols in URL: {}'.format(url))
|
||||
raise _PatchValidationError(f'Invalid number of @ symbols in URL: {url}')
|
||||
return url
|
||||
|
||||
|
||||
def _process_deps_entries(deps_globals, child_deps_tree, child_path, deps_use_relative_paths):
|
||||
"""Helper for _get_child_deps_tree"""
|
||||
for dep_path_str, dep_value in deps_globals.get('deps', dict()).items():
|
||||
for dep_path_str, dep_value in deps_globals.get('deps', {}).items():
|
||||
url = _get_dep_value_url(deps_globals, dep_value)
|
||||
if url is None:
|
||||
continue
|
||||
@@ -200,7 +204,7 @@ def _process_deps_entries(deps_globals, child_deps_tree, child_path, deps_use_re
|
||||
grandchild_deps_tree = recursedeps_item_depsfile
|
||||
if grandchild_deps_tree is None:
|
||||
# This dep is not recursive; i.e. it is fully loaded
|
||||
grandchild_deps_tree = dict()
|
||||
grandchild_deps_tree = {}
|
||||
child_deps_tree[dep_path] = (*url.split('@'), grandchild_deps_tree)
|
||||
|
||||
|
||||
@@ -211,7 +215,7 @@ def _get_child_deps_tree(download_session, current_deps_tree, child_path, deps_u
|
||||
# Load unloaded DEPS
|
||||
deps_globals = _parse_deps(
|
||||
_download_googlesource_file(download_session, repo_url, version, child_deps_tree))
|
||||
child_deps_tree = dict()
|
||||
child_deps_tree = {}
|
||||
current_deps_tree[child_path] = (repo_url, version, child_deps_tree)
|
||||
deps_use_relative_paths = deps_globals.get('use_relative_paths', False)
|
||||
_process_deps_entries(deps_globals, child_deps_tree, child_path, deps_use_relative_paths)
|
||||
@@ -221,9 +225,8 @@ def _get_child_deps_tree(download_session, current_deps_tree, child_path, deps_u
|
||||
def _get_last_chromium_modification():
|
||||
"""Returns the last modification date of the chromium-browser-official tar file"""
|
||||
with _get_requests_session() as session:
|
||||
response = session.head(
|
||||
'https://storage.googleapis.com/chromium-browser-official/chromium-{}.tar.xz'.format(
|
||||
get_chromium_version()))
|
||||
response = session.head('https://storage.googleapis.com/chromium-browser-official/'
|
||||
f'chromium-{get_chromium_version()}.tar.xz')
|
||||
response.raise_for_status()
|
||||
return email.utils.parsedate_to_datetime(response.headers['Last-Modified'])
|
||||
|
||||
@@ -235,7 +238,7 @@ def _get_gitiles_git_log_date(log_entry):
|
||||
|
||||
def _get_gitiles_commit_before_date(repo_url, target_branch, target_datetime):
|
||||
"""Returns the hexadecimal hash of the closest commit before target_datetime"""
|
||||
json_log_url = '{repo}/+log/{branch}?format=JSON'.format(repo=repo_url, branch=target_branch)
|
||||
json_log_url = f'{repo_url}/+log/{target_branch}?format=JSON'
|
||||
with _get_requests_session() as session:
|
||||
response = session.get(json_log_url)
|
||||
response.raise_for_status()
|
||||
@@ -410,7 +413,7 @@ def _retrieve_remote_files(file_iter):
|
||||
Returns a dict of relative UNIX path strings to a list of lines in the file as strings
|
||||
"""
|
||||
|
||||
files = dict()
|
||||
files = {}
|
||||
|
||||
root_deps_tree = _initialize_deps_tree()
|
||||
|
||||
@@ -459,7 +462,7 @@ def _retrieve_local_files(file_iter, source_dir):
|
||||
|
||||
Returns a dict of relative UNIX path strings to a list of lines in the file as strings
|
||||
"""
|
||||
files = dict()
|
||||
files = {}
|
||||
for file_path in file_iter:
|
||||
try:
|
||||
raw_content = (source_dir / file_path).read_bytes()
|
||||
@@ -473,7 +476,7 @@ def _retrieve_local_files(file_iter, source_dir):
|
||||
except UnicodeDecodeError:
|
||||
continue
|
||||
if not content:
|
||||
raise UnicodeDecodeError('Unable to decode with any encoding: %s' % file_path)
|
||||
raise UnicodeDecodeError(f'Unable to decode with any encoding: {file_path}')
|
||||
files[file_path] = content.split('\n')
|
||||
if not files:
|
||||
get_logger().error('All files used by patches are missing!')
|
||||
@@ -488,7 +491,7 @@ def _modify_file_lines(patched_file, file_lines):
|
||||
for hunk in patched_file:
|
||||
# Validate hunk will match
|
||||
if not hunk.is_valid():
|
||||
raise _PatchValidationError('Hunk is not valid: {}'.format(repr(hunk)))
|
||||
raise _PatchValidationError(f'Hunk is not valid: {repr(hunk)}')
|
||||
line_cursor = hunk.target_start - 1
|
||||
for line in hunk:
|
||||
normalized_line = line.value.rstrip('\n')
|
||||
@@ -497,18 +500,16 @@ def _modify_file_lines(patched_file, file_lines):
|
||||
line_cursor += 1
|
||||
elif line.is_removed:
|
||||
if normalized_line != file_lines[line_cursor]:
|
||||
raise _PatchValidationError(
|
||||
"Line '{}' does not match removal line '{}' from patch".format(
|
||||
file_lines[line_cursor], normalized_line))
|
||||
raise _PatchValidationError(f"Line '{file_lines[line_cursor]}' does not match "
|
||||
f"removal line '{normalized_line}' from patch")
|
||||
del file_lines[line_cursor]
|
||||
elif line.is_context:
|
||||
if not normalized_line and line_cursor == len(file_lines):
|
||||
# We reached the end of the file
|
||||
break
|
||||
if normalized_line != file_lines[line_cursor]:
|
||||
raise _PatchValidationError(
|
||||
"Line '{}' does not match context line '{}' from patch".format(
|
||||
file_lines[line_cursor], normalized_line))
|
||||
raise _PatchValidationError(f"Line '{file_lines[line_cursor]}' does not match "
|
||||
f"context line '{normalized_line}' from patch")
|
||||
line_cursor += 1
|
||||
else:
|
||||
assert line.line_type in (LINE_TYPE_EMPTY, LINE_TYPE_NO_NEWLINE)
|
||||
@@ -592,7 +593,7 @@ def _load_all_patches(series_iter, patches_dir):
|
||||
- dict of relative UNIX path strings to unidiff.PatchSet
|
||||
"""
|
||||
had_failure = False
|
||||
unidiff_dict = dict()
|
||||
unidiff_dict = {}
|
||||
for relative_path in series_iter:
|
||||
if relative_path in unidiff_dict:
|
||||
continue
|
||||
@@ -682,12 +683,12 @@ def main():
|
||||
if args.cache_remote.parent.exists():
|
||||
args.cache_remote.mkdir()
|
||||
else:
|
||||
parser.error('Parent of cache path {} does not exist'.format(args.cache_remote))
|
||||
parser.error(f'Parent of cache path {args.cache_remote} does not exist')
|
||||
|
||||
if not args.series.is_file():
|
||||
parser.error('--series path is not a file or not found: {}'.format(args.series))
|
||||
parser.error(f'--series path is not a file or not found: {args.series}')
|
||||
if not args.patches.is_dir():
|
||||
parser.error('--patches path is not a directory or not found: {}'.format(args.patches))
|
||||
parser.error(f'--patches path is not a directory or not found: {args.patches}')
|
||||
|
||||
series_iterable = tuple(parse_series(args.series))
|
||||
had_failure, patch_cache = _load_all_patches(series_iterable, args.patches)
|
||||
|
||||
@@ -5,8 +5,8 @@ sha256 = cd954c7257f126be871f79ecf8fff143425708d5d33501d0ba870fa466dafbe7
|
||||
output_path = ./components/resources/default_100_percent/search_engine_choice
|
||||
|
||||
[onboarding]
|
||||
version = 202505202136
|
||||
version = 202507241203
|
||||
url = https://github.com/imputnet/helium-onboarding/releases/download/%(version)s/helium-onboarding-%(version)s.tar.gz
|
||||
download_filename = onboarding-page-%(version)s.tar.gz
|
||||
sha256 = 7719da3c819a1f52c5688d223ba190b268312de78934959c5a909c0018ebe384
|
||||
sha256 = ee993f917371f53f5f9e5fee347425d96f1793a5613058dc18f123f41e84f02f
|
||||
output_path = ./components/helium_onboarding
|
||||
|
||||
@@ -2,7 +2,46 @@
|
||||
|
||||
--- a/components/gcm_driver/gcm_client_impl.cc
|
||||
+++ b/components/gcm_driver/gcm_client_impl.cc
|
||||
@@ -431,6 +431,7 @@ void GCMClientImpl::StartGCM() {
|
||||
@@ -296,38 +296,6 @@ void GCMClientImpl::Initialize(
|
||||
}
|
||||
|
||||
void GCMClientImpl::Start(StartMode start_mode) {
|
||||
- DCHECK_NE(UNINITIALIZED, state_);
|
||||
- DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
|
||||
-
|
||||
- if (state_ == LOADED) {
|
||||
- // Start the GCM if not yet.
|
||||
- if (start_mode == IMMEDIATE_START) {
|
||||
- // Give up the scheduling to wipe out the store since now some one starts
|
||||
- // to use GCM.
|
||||
- destroying_gcm_store_ptr_factory_.InvalidateWeakPtrs();
|
||||
-
|
||||
- StartGCM();
|
||||
- }
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- // The delay start behavior will be abandoned when Start has been called
|
||||
- // once with IMMEDIATE_START behavior.
|
||||
- if (start_mode == IMMEDIATE_START)
|
||||
- start_mode_ = IMMEDIATE_START;
|
||||
-
|
||||
- // Bail out if the loading is not started or completed.
|
||||
- if (state_ != INITIALIZED)
|
||||
- return;
|
||||
-
|
||||
- // Once the loading is completed, the check-in will be initiated.
|
||||
- // If we're in lazy start mode, don't create a new store since none is really
|
||||
- // using GCM functionality yet.
|
||||
- gcm_store_->Load((start_mode == IMMEDIATE_START) ? GCMStore::CREATE_IF_MISSING
|
||||
- : GCMStore::DO_NOT_CREATE,
|
||||
- base::BindOnce(&GCMClientImpl::OnLoadCompleted,
|
||||
- weak_ptr_factory_.GetWeakPtr()));
|
||||
- state_ = LOADING;
|
||||
}
|
||||
|
||||
void GCMClientImpl::OnLoadCompleted(
|
||||
@@ -431,6 +399,7 @@ void GCMClientImpl::StartGCM() {
|
||||
|
||||
void GCMClientImpl::InitializeMCSClient() {
|
||||
DCHECK(network_connection_tracker_);
|
||||
@@ -10,7 +49,37 @@
|
||||
std::vector<GURL> endpoints;
|
||||
endpoints.push_back(gservices_settings_.GetMCSMainEndpoint());
|
||||
GURL fallback_endpoint = gservices_settings_.GetMCSFallbackEndpoint();
|
||||
@@ -610,23 +611,6 @@ void GCMClientImpl::RemoveHeartbeatInter
|
||||
@@ -482,8 +451,6 @@ void GCMClientImpl::OnReady(const std::v
|
||||
void GCMClientImpl::StartMCSLogin() {
|
||||
DCHECK_EQ(READY, state_);
|
||||
DCHECK(device_checkin_info_.IsValid());
|
||||
- mcs_client_->Login(device_checkin_info_.android_id,
|
||||
- device_checkin_info_.secret);
|
||||
}
|
||||
|
||||
void GCMClientImpl::DestroyStoreWhenNotNeeded() {
|
||||
@@ -554,8 +521,6 @@ void GCMClientImpl::SetLastTokenFetchTim
|
||||
void GCMClientImpl::UpdateHeartbeatTimer(
|
||||
std::unique_ptr<base::RetainingOneShotTimer> timer) {
|
||||
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
|
||||
- DCHECK(mcs_client_);
|
||||
- mcs_client_->UpdateHeartbeatTimer(std::move(timer));
|
||||
}
|
||||
|
||||
void GCMClientImpl::AddInstanceIDData(const std::string& app_id,
|
||||
@@ -598,35 +563,14 @@ void GCMClientImpl::GetInstanceIDData(co
|
||||
void GCMClientImpl::AddHeartbeatInterval(const std::string& scope,
|
||||
int interval_ms) {
|
||||
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
|
||||
- DCHECK(mcs_client_);
|
||||
- mcs_client_->AddHeartbeatInterval(scope, interval_ms);
|
||||
}
|
||||
|
||||
void GCMClientImpl::RemoveHeartbeatInterval(const std::string& scope) {
|
||||
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
|
||||
- DCHECK(mcs_client_);
|
||||
- mcs_client_->RemoveHeartbeatInterval(scope);
|
||||
}
|
||||
|
||||
void GCMClientImpl::StartCheckin() {
|
||||
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
|
||||
@@ -34,7 +103,7 @@
|
||||
}
|
||||
|
||||
void GCMClientImpl::OnCheckinCompleted(
|
||||
@@ -683,24 +667,6 @@ void GCMClientImpl::SetGServicesSettings
|
||||
@@ -683,24 +627,6 @@ void GCMClientImpl::SetGServicesSettings
|
||||
|
||||
void GCMClientImpl::SchedulePeriodicCheckin() {
|
||||
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
|
||||
@@ -59,3 +128,29 @@
|
||||
}
|
||||
|
||||
base::TimeDelta GCMClientImpl::GetTimeToNextCheckin() const {
|
||||
@@ -1124,25 +1050,6 @@ void GCMClientImpl::Send(const std::stri
|
||||
const OutgoingMessage& message) {
|
||||
DCHECK_EQ(state_, READY);
|
||||
DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
|
||||
-
|
||||
- mcs_proto::DataMessageStanza stanza;
|
||||
- stanza.set_ttl(message.time_to_live);
|
||||
- stanza.set_sent(clock_->Now().ToInternalValue() /
|
||||
- base::Time::kMicrosecondsPerSecond);
|
||||
- stanza.set_id(message.id);
|
||||
- stanza.set_from(kSendMessageFromValue);
|
||||
- stanza.set_to(receiver_id);
|
||||
- stanza.set_category(app_id);
|
||||
-
|
||||
- for (auto iter = message.data.begin(); iter != message.data.end(); ++iter) {
|
||||
- mcs_proto::AppData* app_data = stanza.add_app_data();
|
||||
- app_data->set_key(iter->first);
|
||||
- app_data->set_value(iter->second);
|
||||
- }
|
||||
-
|
||||
- MCSMessage mcs_message(stanza);
|
||||
- DVLOG(1) << "MCS message size: " << mcs_message.size();
|
||||
- mcs_client_->SendMessage(mcs_message);
|
||||
}
|
||||
|
||||
std::string GCMClientImpl::GetStateString() const {
|
||||
|
||||
@@ -930,7 +930,7 @@
|
||||
"//chrome/browser/search/background",
|
||||
"//chrome/browser/search/background:constants",
|
||||
"//chrome/browser/search_engine_choice:unit_tests",
|
||||
@@ -8413,7 +8405,6 @@ test("unit_tests") {
|
||||
@@ -8414,7 +8406,6 @@ test("unit_tests") {
|
||||
"//components/webapps/browser",
|
||||
"//services/metrics/public/cpp:ukm_builders",
|
||||
"//services/network:test_support",
|
||||
|
||||
@@ -3604,7 +3604,7 @@
|
||||
#include "components/saved_tab_groups/public/features.h"
|
||||
#include "components/signin/public/base/signin_buildflags.h"
|
||||
#include "components/signin/public/base/signin_switches.h"
|
||||
@@ -3450,11 +3449,6 @@ void AddSiteSettingsStrings(content::Web
|
||||
@@ -3453,11 +3452,6 @@ void AddSiteSettingsStrings(content::Web
|
||||
html_source->AddLocalizedStrings(kSensorsLocalizedStrings);
|
||||
|
||||
html_source->AddBoolean(
|
||||
@@ -3618,15 +3618,15 @@
|
||||
|
||||
--- a/chrome/browser/ui/webui/settings/settings_ui.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_ui.cc
|
||||
@@ -114,7 +114,6 @@
|
||||
#include "components/regional_capabilities/regional_capabilities_service.h"
|
||||
@@ -116,7 +116,6 @@
|
||||
#include "components/safe_browsing/core/common/features.h"
|
||||
#include "components/safe_browsing/core/common/hashprefix_realtime/hash_realtime_utils.h"
|
||||
#include "components/search_engines/template_url_service.h"
|
||||
-#include "components/signin/public/base/signin_pref_names.h"
|
||||
#include "components/signin/public/base/signin_switches.h"
|
||||
#include "components/sync/base/features.h"
|
||||
#include "content/public/browser/url_data_source.h"
|
||||
@@ -296,9 +295,7 @@ SettingsUI::SettingsUI(content::WebUI* w
|
||||
@@ -298,9 +297,7 @@ SettingsUI::SettingsUI(content::WebUI* w
|
||||
}
|
||||
#endif // BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
|
||||
|
||||
@@ -263,7 +263,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// Supervised Users. This setting is queried in our Tast tests (b/241943380).
|
||||
--- a/chrome/browser/ui/webui/settings/settings_ui.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_ui.cc
|
||||
@@ -62,6 +62,7 @@
|
||||
@@ -63,6 +63,7 @@
|
||||
#include "chrome/browser/ui/webui/settings/font_handler.h"
|
||||
#include "chrome/browser/ui/webui/settings/hats_handler.h"
|
||||
#include "chrome/browser/ui/webui/settings/import_data_handler.h"
|
||||
@@ -271,7 +271,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "chrome/browser/ui/webui/settings/metrics_reporting_handler.h"
|
||||
#include "chrome/browser/ui/webui/settings/on_startup_handler.h"
|
||||
#include "chrome/browser/ui/webui/settings/password_manager_handler.h"
|
||||
@@ -206,6 +207,7 @@ void SettingsUI::RegisterProfilePrefs(
|
||||
@@ -208,6 +209,7 @@ void SettingsUI::RegisterProfilePrefs(
|
||||
registry->RegisterBooleanPref(prefs::kImportDialogHistory, true);
|
||||
registry->RegisterBooleanPref(prefs::kImportDialogSavedPasswords, true);
|
||||
registry->RegisterBooleanPref(prefs::kImportDialogSearchEngine, true);
|
||||
@@ -279,7 +279,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
|
||||
SettingsUI::SettingsUI(content::WebUI* web_ui)
|
||||
@@ -235,7 +237,7 @@ SettingsUI::SettingsUI(content::WebUI* w
|
||||
@@ -237,7 +239,7 @@ SettingsUI::SettingsUI(content::WebUI* w
|
||||
AddSettingsPageUIHandler(std::make_unique<DownloadsHandler>(profile));
|
||||
AddSettingsPageUIHandler(std::make_unique<ExtensionControlHandler>());
|
||||
AddSettingsPageUIHandler(std::make_unique<FontHandler>(profile));
|
||||
|
||||
@@ -99,19 +99,6 @@ approach to change color components.
|
||||
+}
|
||||
+
|
||||
} // namespace blink
|
||||
--- a/third_party/blink/renderer/platform/graphics/image_data_buffer.cc
|
||||
+++ b/third_party/blink/renderer/platform/graphics/image_data_buffer.cc
|
||||
@@ -130,6 +130,10 @@ base::span<const uint8_t> ImageDataBuffe
|
||||
bool ImageDataBuffer::EncodeImage(const ImageEncodingMimeType mime_type,
|
||||
const double& quality,
|
||||
Vector<unsigned char>* encoded_image) const {
|
||||
+ if (RuntimeEnabledFeatures::FingerprintingCanvasImageDataNoiseEnabled()) {
|
||||
+ // shuffle subchannel color data within the pixmap
|
||||
+ StaticBitmapImage::ShuffleSubchannelColorData(pixmap_.writable_addr(), pixmap_.info(), 0, 0);
|
||||
+ }
|
||||
return ImageEncoder::Encode(encoded_image, pixmap_, mime_type, quality);
|
||||
}
|
||||
|
||||
--- a/third_party/blink/renderer/platform/graphics/static_bitmap_image.cc
|
||||
+++ b/third_party/blink/renderer/platform/graphics/static_bitmap_image.cc
|
||||
@@ -4,6 +4,8 @@
|
||||
@@ -303,6 +290,28 @@ approach to change color components.
|
||||
bool IsStaticBitmapImage() const override { return true; }
|
||||
|
||||
// Methods overridden by all sub-classes
|
||||
--- a/third_party/blink/renderer/platform/image-encoders/image_encoder.cc
|
||||
+++ b/third_party/blink/renderer/platform/image-encoders/image_encoder.cc
|
||||
@@ -14,6 +14,8 @@
|
||||
#include <stdio.h> // Needed by jpeglib.h
|
||||
|
||||
#include "jpeglib.h" // for JPEG_MAX_DIMENSION
|
||||
+#include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h"
|
||||
+#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
|
||||
#include "third_party/libwebp/src/src/webp/encode.h" // for WEBP_MAX_DIMENSION
|
||||
|
||||
namespace blink {
|
||||
@@ -43,6 +45,10 @@ bool ImageEncoder::Encode(Vector<unsigne
|
||||
const SkPixmap& src,
|
||||
ImageEncodingMimeType mime_type,
|
||||
double quality) {
|
||||
+ if (RuntimeEnabledFeatures::FingerprintingCanvasImageDataNoiseEnabled()) {
|
||||
+ // shuffle subchannel color data within the pixmap
|
||||
+ StaticBitmapImage::ShuffleSubchannelColorData(src.writable_addr(), src.info(), 0, 0);
|
||||
+ }
|
||||
switch (mime_type) {
|
||||
case kMimeTypeJpeg: {
|
||||
SkJpegEncoder::Options options;
|
||||
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
@@ -2260,6 +2260,9 @@
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include "base/feature_list.h"
|
||||
#include "base/format_macros.h"
|
||||
#include "base/functional/bind.h"
|
||||
@@ -566,6 +567,15 @@ AutocompleteController::AutocompleteCont
|
||||
@@ -568,6 +569,15 @@ AutocompleteController::AutocompleteCont
|
||||
steady_state_omnibox_position_(
|
||||
metrics::OmniboxEventProto::UNKNOWN_POSITION) {
|
||||
provider_types &= ~OmniboxFieldTrial::GetDisabledProviderTypes();
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "build/chromeos_buildflags.h"
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/existing_switch_flag_choices.h
|
||||
@@ -0,0 +1,21 @@
|
||||
@@ -0,0 +1,19 @@
|
||||
+// Copyright (c) 2023 The ungoogled-chromium Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE.ungoogled_chromium file.
|
||||
@@ -23,9 +23,7 @@
|
||||
+#ifndef CHROME_BROWSER_EXISTING_SWITCH_FLAG_CHOICES_H_
|
||||
+#define CHROME_BROWSER_EXISTING_SWITCH_FLAG_CHOICES_H_
|
||||
+const FeatureEntry::Choice kWebRTCIPPolicy[] = {
|
||||
+ {"Disable non proxied udp",
|
||||
+ "",
|
||||
+ ""},
|
||||
+ {"Disable non proxied udp", "", ""},
|
||||
+ {"Default",
|
||||
+ "webrtc-ip-handling-policy",
|
||||
+ "default"},
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
--- a/chrome/app/settings_chromium_strings.grdp
|
||||
+++ b/chrome/app/settings_chromium_strings.grdp
|
||||
@@ -369,13 +369,13 @@
|
||||
@@ -372,13 +372,13 @@
|
||||
|
||||
<!-- Performance Page -->
|
||||
<message name="IDS_SETTINGS_PERFORMANCE_MEMORY_SAVER_MODE_SETTING_DESCRIPTION" desc="Description for the memory saver mode setting">
|
||||
@@ -304,7 +304,7 @@
|
||||
<settings-toggle-button id="spellCheckControl"
|
||||
--- a/chrome/browser/resources/settings/privacy_page/personalization_options.ts
|
||||
+++ b/chrome/browser/resources/settings/privacy_page/personalization_options.ts
|
||||
@@ -179,10 +179,6 @@ export class SettingsPersonalizationOpti
|
||||
@@ -201,10 +201,6 @@ export class SettingsPersonalizationOpti
|
||||
'chrome-signin-user-choice-info-change',
|
||||
this.setChromeSigninUserChoiceInfo_.bind(this));
|
||||
// </if>
|
||||
@@ -547,7 +547,7 @@
|
||||
|
||||
html_source->AddString("discardRingTreatmentLearnMoreUrl",
|
||||
chrome::kDiscardRingTreatmentLearnMoreUrl);
|
||||
@@ -3468,7 +3443,7 @@ void AddSiteSettingsStrings(content::Web
|
||||
@@ -3471,7 +3446,7 @@ void AddSiteSettingsStrings(content::Web
|
||||
base::FeatureList::IsEnabled(blink::features::kWebPrinting));
|
||||
|
||||
html_source->AddBoolean("enableFederatedIdentityApiContentSetting",
|
||||
@@ -558,7 +558,7 @@
|
||||
html_source->AddBoolean(
|
||||
--- a/chrome/browser/ui/webui/settings/settings_ui.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_ui.cc
|
||||
@@ -619,27 +619,20 @@ SettingsUI::SettingsUI(content::WebUI* w
|
||||
@@ -627,27 +627,20 @@ SettingsUI::SettingsUI(content::WebUI* w
|
||||
autofill::AutofillAiAction::kListEntityInstancesInSettings)},
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
--- a/chrome/browser/helium_flag_choices.h
|
||||
+++ b/chrome/browser/helium_flag_choices.h
|
||||
@@ -26,6 +26,8 @@ namespace helium {
|
||||
{kChannelBeta, kChannelCommandLine, kChannelBeta},
|
||||
};
|
||||
|
||||
+ constexpr const char kDisableEchCommandLine[] = "disable-ech";
|
||||
+
|
||||
} // namespace helium
|
||||
|
||||
#endif /* CHROME_BROWSER_HELIUM_FLAG_CHOICES_H_ */
|
||||
--- a/chrome/browser/helium_flag_entries.h
|
||||
+++ b/chrome/browser/helium_flag_entries.h
|
||||
@@ -11,4 +11,9 @@
|
||||
"Maximum frame rate for Energy Saver",
|
||||
"Configures the frame rate the browser is throttled to when Energy Saver is enabled. Helium flag.",
|
||||
kOsDesktop, MULTI_VALUE_TYPE(helium::kEnergySaverFrameRateChoices)},
|
||||
+ {helium::kDisableEchCommandLine,
|
||||
+ "Disable ECH (Encrypted Client Hello)",
|
||||
+ "Disables TLS Encrypted Client Hello. Not recommended unless you live in an area with heavy Internet"
|
||||
+ " censorship and ECH prevents websites from loading. Helium flag.",
|
||||
+ kOsAll, SINGLE_VALUE_TYPE(helium::kDisableEchCommandLine)},
|
||||
#endif /* CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_ */
|
||||
--- a/chrome/browser/ssl/ssl_config_service_manager.cc
|
||||
+++ b/chrome/browser/ssl/ssl_config_service_manager.cc
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
+#include "base/command_line.h"
|
||||
#include "base/feature_list.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/location.h"
|
||||
@@ -232,6 +233,10 @@ network::mojom::SSLConfigPtr SSLConfigSe
|
||||
|
||||
config->ech_enabled = ech_enabled_.GetValue();
|
||||
|
||||
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("disable-ech")) {
|
||||
+ config->ech_enabled = false;
|
||||
+ }
|
||||
+
|
||||
if (post_quantum_enabled_.IsManaged()) {
|
||||
config->post_quantum_key_agreement_enabled =
|
||||
post_quantum_enabled_.GetValue();
|
||||
@@ -0,0 +1,69 @@
|
||||
--- a/chrome/browser/helium_flag_choices.h
|
||||
+++ b/chrome/browser/helium_flag_choices.h
|
||||
@@ -11,6 +11,15 @@
|
||||
namespace helium {
|
||||
using namespace ::helium;
|
||||
|
||||
+ constexpr const char kEnergySaverFrameRateCommandLine[] = "energy-saver-fps-limit";
|
||||
+ constexpr const FeatureEntry::Choice kEnergySaverFrameRateChoices[] = {
|
||||
+ {flags_ui::kGenericExperimentChoiceAutomatic, "", ""},
|
||||
+ {"30", kEnergySaverFrameRateCommandLine, "30"},
|
||||
+ {"60", kEnergySaverFrameRateCommandLine, "60"},
|
||||
+ {"120", kEnergySaverFrameRateCommandLine, "120"},
|
||||
+ {"Disabled", kEnergySaverFrameRateCommandLine, "9001"},
|
||||
+ };
|
||||
+
|
||||
} // namespace helium
|
||||
|
||||
#endif /* CHROME_BROWSER_HELIUM_FLAG_CHOICES_H_ */
|
||||
--- a/chrome/browser/helium_flag_entries.h
|
||||
+++ b/chrome/browser/helium_flag_entries.h
|
||||
@@ -4,4 +4,8 @@
|
||||
|
||||
#ifndef CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_
|
||||
#define CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_
|
||||
+ {helium::kEnergySaverFrameRateCommandLine,
|
||||
+ "Maximum frame rate for Energy Saver",
|
||||
+ "Configures the frame rate the browser is throttled to when Energy Saver is enabled. Helium flag.",
|
||||
+ kOsDesktop, MULTI_VALUE_TYPE(helium::kEnergySaverFrameRateChoices)},
|
||||
#endif /* CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_ */
|
||||
--- a/chrome/browser/performance_manager/user_tuning/battery_saver_mode_manager.cc
|
||||
+++ b/chrome/browser/performance_manager/user_tuning/battery_saver_mode_manager.cc
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "base/power_monitor/power_observer.h"
|
||||
#include "base/run_loop.h"
|
||||
#include "base/scoped_multi_source_observation.h"
|
||||
+#include "base/strings/string_number_conversions.h"
|
||||
#include "base/values.h"
|
||||
#include "components/performance_manager/freezing/freezing_policy.h"
|
||||
#include "components/performance_manager/performance_manager_impl.h"
|
||||
@@ -68,12 +69,28 @@ constexpr int kBatterySaverModeThreshold
|
||||
constexpr int kBatterySaverModeThresholdAdjustmentForDisplayLevel = 0;
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
+int GetMaxRate() {
|
||||
+ auto* command_line = base::CommandLine::ForCurrentProcess();
|
||||
+ int fps;
|
||||
+
|
||||
+ if (command_line->HasSwitch("energy-saver-fps-limit") &&
|
||||
+ base::StringToInt(command_line->GetSwitchValueASCII(
|
||||
+ "energy-saver-fps-limit"), &fps) && fps > 0) {
|
||||
+ return fps;
|
||||
+ }
|
||||
+
|
||||
+ return 30;
|
||||
+}
|
||||
+
|
||||
class FrameThrottlingDelegateImpl
|
||||
: public performance_manager::user_tuning::BatterySaverModeManager::
|
||||
FrameThrottlingDelegate {
|
||||
public:
|
||||
void StartThrottlingAllFrameSinks() override {
|
||||
- content::StartThrottlingAllFrameSinks(base::Hertz(30));
|
||||
+ static int max_rate = GetMaxRate();
|
||||
+ if (max_rate < 9000) {
|
||||
+ content::StartThrottlingAllFrameSinks(base::Hertz(max_rate));
|
||||
+ }
|
||||
}
|
||||
|
||||
void StopThrottlingAllFrameSinks() override {
|
||||
@@ -472,8 +472,8 @@
|
||||
+// You can use, redistribute, and/or modify this source code under
|
||||
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||
+
|
||||
+#ifndef COMPONENTS_SEARCH_ENGINES_BANG_PROVIDER_H_
|
||||
+#define COMPONENTS_SEARCH_ENGINES_BANG_PROVIDER_H_
|
||||
+#ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_BANG_MANAGER_H_
|
||||
+#define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_BANG_MANAGER_H_
|
||||
+
|
||||
+#include <memory>
|
||||
+#include <string>
|
||||
@@ -541,7 +541,7 @@
|
||||
+ };
|
||||
+}
|
||||
+
|
||||
+#endif // COMPONENTS_SEARCH_ENGINES_BANG_PROVIDER_H_
|
||||
+#endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_BANG_MANAGER_H_
|
||||
+
|
||||
--- a/components/omnibox/browser/autocomplete_input.cc
|
||||
+++ b/components/omnibox/browser/autocomplete_input.cc
|
||||
@@ -704,7 +704,7 @@
|
||||
COMPONENT_EXPORT(HELIUM) GURL GetDummyURL();
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -1853,6 +1853,9 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
@@ -1856,6 +1856,9 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
{"heliumServicesToggle", IDS_SETTINGS_HELIUM_SERVICES_TOGGLE},
|
||||
{"heliumServicesToggleDescription",
|
||||
IDS_SETTINGS_HELIUM_SERVICES_TOGGLE_DESCRIPTION},
|
||||
@@ -721,10 +721,10 @@
|
||||
When enabled, Helium will proxy extension downloads and updates to protect your privacy. When disabled, downloading and updating extensions will not work.
|
||||
</message>
|
||||
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE" desc="Toggle for enabling/disabling of downloading bangs">
|
||||
+ Allow downloading the !bang list
|
||||
+ Allow downloading the !bangs list
|
||||
+ </message>
|
||||
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE_DESCRIPTION" desc="Description of the toggle for enabling/disabling of downloading bangs">
|
||||
+ When enabled, Helium will fetch our list of bangs that help you browse the Internet faster, such as !w or !gh.
|
||||
+ Helium will fetch a list of bangs that help you browse the Internet faster, such as !w or !gh. When disabled, bangs will not work.
|
||||
+ </message>
|
||||
<message name="IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE" desc="Text input for overriding the Helium services server">
|
||||
Use your own instance of Helium services
|
||||
|
||||
@@ -8,29 +8,18 @@
|
||||
#include "chrome/browser/devtools/features.h"
|
||||
#include "chrome/browser/flag_descriptions.h"
|
||||
#include "chrome/browser/ip_protection/ip_protection_switches.h"
|
||||
@@ -4733,11 +4734,13 @@ const FeatureEntry::FeatureVariation kHi
|
||||
#include "chrome/browser/bromite_flag_choices.h"
|
||||
#include "chrome/browser/ungoogled_platform_flag_choices.h"
|
||||
#include "chrome/browser/existing_switch_flag_choices.h"
|
||||
+#include "chrome/browser/helium_flag_choices.h"
|
||||
const FeatureEntry kFeatureEntries[] = {
|
||||
#include "chrome/browser/ungoogled_flag_entries.h"
|
||||
#include "chrome/browser/bromite_flag_entries.h"
|
||||
#include "chrome/browser/ungoogled_platform_flag_entries.h"
|
||||
#include "chrome/browser/existing_switch_flag_entries.h"
|
||||
+#include "chrome/browser/helium_flag_entries.h"
|
||||
// Include generated flags for flag unexpiry; see //docs/flag_expiry.md and
|
||||
// //tools/flags/generate_unexpire_flags.py.
|
||||
#include "build/chromeos_buildflags.h"
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/channel_selection.cc
|
||||
@@ -0,0 +1,25 @@
|
||||
@@ -0,0 +1,28 @@
|
||||
+// Copyright 2025 The Helium Authors
|
||||
+// You can use, redistribute, and/or modify this source code under
|
||||
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||
+
|
||||
+#include <string>
|
||||
+
|
||||
+#include "base/command_line.h"
|
||||
+#include "chrome/browser/channel_selection.h"
|
||||
+
|
||||
+
|
||||
+namespace helium {
|
||||
+
|
||||
+std::string GetSelectedChannel() {
|
||||
@@ -52,7 +41,11 @@
|
||||
+} // namespace helium
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/channel_selection.h
|
||||
@@ -0,0 +1,15 @@
|
||||
@@ -0,0 +1,19 @@
|
||||
+// Copyright 2025 The Helium Authors
|
||||
+// You can use, redistribute, and/or modify this source code under
|
||||
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||
+
|
||||
+#ifndef CHROME_BROWSER_CHANNEL_SELECTION_H_
|
||||
+#define CHROME_BROWSER_CHANNEL_SELECTION_H_
|
||||
+
|
||||
@@ -68,36 +61,33 @@
|
||||
+
|
||||
+} // namespace helium
|
||||
+#endif /* CHROME_BROWSER_CHANNEL_SELECTION_H_ */
|
||||
--- /dev/null
|
||||
--- a/chrome/browser/helium_flag_choices.h
|
||||
+++ b/chrome/browser/helium_flag_choices.h
|
||||
@@ -0,0 +1,18 @@
|
||||
+#ifndef CHROME_BROWSER_HELIUM_FLAG_CHOICES_H_
|
||||
+#define CHROME_BROWSER_HELIUM_FLAG_CHOICES_H_
|
||||
+
|
||||
+#include "components/webui/flags/feature_entry.h"
|
||||
+#include "chrome/browser/channel_selection.h"
|
||||
+
|
||||
+namespace helium {
|
||||
+ using namespace ::helium;
|
||||
+
|
||||
@@ -20,6 +20,12 @@ namespace helium {
|
||||
{"Disabled", kEnergySaverFrameRateCommandLine, "9001"},
|
||||
};
|
||||
|
||||
+ constexpr const FeatureEntry::Choice kChannelChoices[] = {
|
||||
+ {flags_ui::kGenericExperimentChoiceAutomatic, "", ""},
|
||||
+ {kChannelStable, kChannelCommandLine, kChannelStable},
|
||||
+ {kChannelBeta, kChannelCommandLine, kChannelBeta},
|
||||
+ };
|
||||
+
|
||||
+} // namespace helium
|
||||
+
|
||||
+#endif /* CHROME_BROWSER_HELIUM_FLAG_CHOICES_H_ */
|
||||
--- /dev/null
|
||||
} // namespace helium
|
||||
|
||||
#endif /* CHROME_BROWSER_HELIUM_FLAG_CHOICES_H_ */
|
||||
--- a/chrome/browser/helium_flag_entries.h
|
||||
+++ b/chrome/browser/helium_flag_entries.h
|
||||
@@ -0,0 +1,6 @@
|
||||
+#ifndef CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_
|
||||
+#define CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_
|
||||
@@ -4,6 +4,9 @@
|
||||
|
||||
#ifndef CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_
|
||||
#define CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_
|
||||
+ {helium::kChannelCommandLine,
|
||||
+ "Update channel", "Selects which update channel to use for update checking. Helium flag.",
|
||||
+ kOsAll, MULTI_VALUE_TYPE(helium::kChannelChoices)},
|
||||
+#endif /* CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_ */
|
||||
{helium::kEnergySaverFrameRateCommandLine,
|
||||
"Maximum frame rate for Energy Saver",
|
||||
"Configures the frame rate the browser is throttled to when Energy Saver is enabled. Helium flag.",
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -281,6 +281,8 @@ static_library("browser") {
|
||||
@@ -73,7 +73,7 @@ TODO: guard services_page.html with is_mac
|
||||
+
|
||||
+#if BUILDFLAG(IS_MAC)
|
||||
+ std::string path = base::StringPrintf(
|
||||
+ "/updates/mac-%s/appcast.xml", cpu_arch);
|
||||
+ "/updates/mac/appcast-%s.xml", cpu_arch);
|
||||
+ return GetServicesBaseURL(prefs).Resolve(path);
|
||||
+#else
|
||||
+ return GetDummyURL();
|
||||
@@ -101,7 +101,7 @@ TODO: guard services_page.html with is_mac
|
||||
</div>
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -1861,6 +1861,10 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
@@ -1864,6 +1864,10 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE},
|
||||
{"heliumExtProxyToggleDescription",
|
||||
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE_DESCRIPTION},
|
||||
@@ -140,10 +140,10 @@ TODO: guard services_page.html with is_mac
|
||||
When enabled, Helium will fetch dictionary files used for spell checking when requested.
|
||||
</message>
|
||||
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_UPDATE" desc="Toggle for automatic update downloads">
|
||||
+ Allow fetching browser updates
|
||||
+ Allow automatic browser updates
|
||||
+ </message>
|
||||
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_UPDATE_DESCRIPTION" desc="Description of the toggle for automatic update downloads">
|
||||
+ When enabled, Helium will download and install browser updates whenever they are available.
|
||||
+ Helium will automatically download and install browser updates as they become available. We recommend keeping this setting enabled to ensure you get the latest security patches and features.
|
||||
+ </message>
|
||||
<message name="IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE" desc="Text input for overriding the Helium services server">
|
||||
Use your own instance of Helium services
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
ui::VKEY_N},
|
||||
--- a/chrome/browser/ui/views/accelerator_table.cc
|
||||
+++ b/chrome/browser/ui/views/accelerator_table.cc
|
||||
@@ -267,7 +267,7 @@ const AcceleratorMapping kDevToolsAccele
|
||||
@@ -269,7 +269,7 @@ const AcceleratorMapping kDevToolsAccele
|
||||
{ui::VKEY_J, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
|
||||
IDC_DEV_TOOLS_CONSOLE},
|
||||
{ui::VKEY_C, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -4733,11 +4733,13 @@ const FeatureEntry::FeatureVariation kHi
|
||||
#include "chrome/browser/bromite_flag_choices.h"
|
||||
#include "chrome/browser/ungoogled_platform_flag_choices.h"
|
||||
#include "chrome/browser/existing_switch_flag_choices.h"
|
||||
+#include "chrome/browser/helium_flag_choices.h"
|
||||
const FeatureEntry kFeatureEntries[] = {
|
||||
#include "chrome/browser/ungoogled_flag_entries.h"
|
||||
#include "chrome/browser/bromite_flag_entries.h"
|
||||
#include "chrome/browser/ungoogled_platform_flag_entries.h"
|
||||
#include "chrome/browser/existing_switch_flag_entries.h"
|
||||
+#include "chrome/browser/helium_flag_entries.h"
|
||||
// Include generated flags for flag unexpiry; see //docs/flag_expiry.md and
|
||||
// //tools/flags/generate_unexpire_flags.py.
|
||||
#include "build/chromeos_buildflags.h"
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/helium_flag_choices.h
|
||||
@@ -0,0 +1,16 @@
|
||||
+// Copyright 2025 The Helium Authors
|
||||
+// You can use, redistribute, and/or modify this source code under
|
||||
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||
+
|
||||
+#ifndef CHROME_BROWSER_HELIUM_FLAG_CHOICES_H_
|
||||
+#define CHROME_BROWSER_HELIUM_FLAG_CHOICES_H_
|
||||
+
|
||||
+#include "components/webui/flags/feature_entry.h"
|
||||
+#include "chrome/browser/channel_selection.h"
|
||||
+
|
||||
+namespace helium {
|
||||
+ using namespace ::helium;
|
||||
+
|
||||
+} // namespace helium
|
||||
+
|
||||
+#endif /* CHROME_BROWSER_HELIUM_FLAG_CHOICES_H_ */
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/helium_flag_entries.h
|
||||
@@ -0,0 +1,7 @@
|
||||
+// Copyright 2025 The Helium Authors
|
||||
+// You can use, redistribute, and/or modify this source code under
|
||||
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||
+
|
||||
+#ifndef CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_
|
||||
+#define CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_
|
||||
+#endif /* CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_ */
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "components/safe_browsing/core/common/features.h"
|
||||
#include "components/safe_browsing/core/common/hashprefix_realtime/hash_realtime_utils.h"
|
||||
#include "components/saved_tab_groups/public/features.h"
|
||||
@@ -2388,14 +2386,9 @@ void AddSearchStrings(content::WebUIData
|
||||
@@ -2391,14 +2389,9 @@ void AddSearchStrings(content::WebUIData
|
||||
html_source->AddString("searchExplanationLearnMoreURL",
|
||||
chrome::kOmniboxLearnMoreURL);
|
||||
|
||||
|
||||
@@ -201,8 +201,8 @@
|
||||
+// You can use, redistribute, and/or modify this source code under
|
||||
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||
+
|
||||
+#ifndef CHROME_BROWSER_UI_WEBUI_ONBOARDING_ONBOARDING_PAGE_H_
|
||||
+#define CHROME_BROWSER_UI_WEBUI_ONBOARDING_ONBOARDING_PAGE_H_
|
||||
+#ifndef CHROME_BROWSER_UI_WEBUI_ONBOARDING_ONBOARDING_PAGE_UI_H_
|
||||
+#define CHROME_BROWSER_UI_WEBUI_ONBOARDING_ONBOARDING_PAGE_UI_H_
|
||||
+
|
||||
+#include "chrome/common/webui_url_constants.h"
|
||||
+#include "content/public/browser/webui_config.h"
|
||||
@@ -227,7 +227,7 @@
|
||||
+ ~HeliumOnboardingPage() override;
|
||||
+};
|
||||
+
|
||||
+#endif // CHROME_BROWSER_UI_WEBUI_ONBOARDING_ONBOARDING_PAGE_H_
|
||||
+#endif // CHROME_BROWSER_UI_WEBUI_ONBOARDING_ONBOARDING_PAGE_UI_H_
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/ui/webui/onboarding/onboarding_handler.cc
|
||||
@@ -0,0 +1,190 @@
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
</div>
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -1853,6 +1853,10 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
@@ -1856,6 +1856,10 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
{"heliumServicesToggle", IDS_SETTINGS_HELIUM_SERVICES_TOGGLE},
|
||||
{"heliumServicesToggleDescription",
|
||||
IDS_SETTINGS_HELIUM_SERVICES_TOGGLE_DESCRIPTION},
|
||||
@@ -216,7 +216,7 @@
|
||||
+++ b/chrome/app/settings_strings.grdp
|
||||
@@ -1852,6 +1852,12 @@
|
||||
<message name="IDS_SETTINGS_HELIUM_SERVICES_TOGGLE_DESCRIPTION" desc="Description of the toggle for enabling/disabling of all Helium services">
|
||||
When enabled, Helium will be able to connect to anonymous services for providing additional functionality, such as native !bangs or extension downloads.
|
||||
When enabled, Helium will be able to connect to anonymous web services to provide additional functionality. When disabled, additional features will not work.
|
||||
</message>
|
||||
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE" desc="Toggle for enabling/disabling of downloading and proxying extensions">
|
||||
+ Proxy extension downloads and updates
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
+++ b/chrome/app/settings_strings.grdp
|
||||
@@ -1864,6 +1864,12 @@
|
||||
<message name="IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE_DESCRIPTION" desc="Description of the toggle for enabling/disabling of downloading bangs">
|
||||
When enabled, Helium will fetch our list of bangs that help you browse the Internet faster, such as !w or !gh.
|
||||
Helium will fetch a list of bangs that help you browse the Internet faster, such as !w or !gh. When disabled, bangs will not work.
|
||||
</message>
|
||||
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_SPELLCHECK_TOGGLE" desc="Toggle for enabling/disabling of downloading spellcheck files">
|
||||
+ Allow downloading dictionary files for spell checking
|
||||
@@ -159,7 +159,7 @@
|
||||
</message>
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -1854,6 +1854,9 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
@@ -1857,6 +1857,9 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
{"heliumBangsToggle", IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE},
|
||||
{"heliumBangsToggleDescription",
|
||||
IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE_DESCRIPTION},
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
+bool GetChromeUserDataDirectory(base::FilePath* result) {
|
||||
+ if (!base::PathService::Get(base::DIR_LOCAL_APP_DATA, result))
|
||||
+ return false;
|
||||
+ *result = result->Append("Google\\Chrome");
|
||||
+ *result = result->Append(L"Google\\Chrome");
|
||||
+ *result = result->Append(chrome::kUserDataDirname);
|
||||
+ return true;
|
||||
+}
|
||||
|
||||
@@ -8,22 +8,22 @@
|
||||
+ Helium services
|
||||
+ </message>
|
||||
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_DESCRIPTION" desc="Description of the controls available on the Helium services settings page">
|
||||
+ Control Helium services and whether your browser is allowed to use them
|
||||
+ Manage what Helium services are allowed in your browser
|
||||
+ </message>
|
||||
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_TOGGLE" desc="Global toggle for enabling/disabling of all Helium services">
|
||||
+ Allow connecting to Helium services
|
||||
+ </message>
|
||||
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_TOGGLE_DESCRIPTION" desc="Description of the toggle for enabling/disabling of all Helium services">
|
||||
+ When enabled, Helium will be able to connect to anonymous services for providing additional functionality, such as native !bangs or extension downloads.
|
||||
+ When enabled, Helium will be able to connect to anonymous web services to provide additional functionality. When disabled, additional features will not work.
|
||||
+ </message>
|
||||
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE" desc="Text input for overriding the Helium services server">
|
||||
+ Use your own instance of Helium services
|
||||
+ </message>
|
||||
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE_DESCRIPTION" desc="Description of the text input for overriding the Helium services server">
|
||||
+ You can host your own instance of Helium services and use it in your browser instead of the default services server. HTTPS only.
|
||||
+ You can host your own instance of Helium services and use it in your browser instead of the default one. HTTPS only.
|
||||
+ </message>
|
||||
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE_DESCRIPTION_WARNING" desc="Warning section of description for overriding the Helium services server">
|
||||
+ Do not use this field unless you know exactly what you're doing. Do not paste URLs from other people here, they're trying to steal your data. We are not responsible for any damages caused by using a custom server.
|
||||
+ Do not use this field unless you know exactly what you are doing. Never paste URLs from other people here, they are trying to steal your data. We are not responsible for any damages caused by using a custom server and will not be able to help you.
|
||||
+ </message>
|
||||
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE_ARIA_LABEL" desc="ARIA label of the text input for overriding the Helium services server">
|
||||
+ Custom origin URL for Helium services
|
||||
@@ -34,7 +34,7 @@
|
||||
Google Advanced Protection Program
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -1848,6 +1848,18 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
@@ -1851,6 +1851,18 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
{"permissionsPageDescription", IDS_SETTINGS_PERMISSIONS_DESCRIPTION},
|
||||
{"securityPageTitle", IDS_SETTINGS_SECURITY},
|
||||
{"securityPageDescription", IDS_SETTINGS_SECURITY_DESCRIPTION},
|
||||
@@ -129,7 +129,7 @@
|
||||
"privacy_sandbox/privacy_sandbox_interest_item.ts",
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||
@@ -0,0 +1,41 @@
|
||||
@@ -0,0 +1,45 @@
|
||||
+<style include="cr-shared-style settings-shared">
|
||||
+ .label-wrapper {
|
||||
+ padding: var(--cr-section-vertical-padding) 0;
|
||||
@@ -153,7 +153,11 @@
|
||||
+ <div class="flex">
|
||||
+ <div class="flex label-wrapper">
|
||||
+ <div class="label">$i18n{heliumOriginOverride}</div>
|
||||
+ <div class="cr-secondary-text label">$i18n{heliumOriginOverrideDescription} <b>$i18n{heliumOriginOverrideDescriptionWarning}</b></div>
|
||||
+ <div class="cr-secondary-text label">
|
||||
+ $i18n{heliumOriginOverrideDescription}
|
||||
+ <br><br>
|
||||
+ <b>$i18n{heliumOriginOverrideDescriptionWarning}</b>
|
||||
+ </div>
|
||||
+ </div>
|
||||
+ <cr-input
|
||||
+ id="heliumOriginOverride"
|
||||
@@ -173,7 +177,11 @@
|
||||
+</div>
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/resources/settings/privacy_page/services_page.ts
|
||||
@@ -0,0 +1,70 @@
|
||||
@@ -0,0 +1,74 @@
|
||||
+// Copyright 2025 The Helium Authors
|
||||
+// You can use, redistribute, and/or modify this source code under
|
||||
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||
+
|
||||
+import {HelpBubbleMixin} from 'chrome://resources/cr_components/help_bubble/help_bubble_mixin.js';
|
||||
+import {I18nMixin} from 'chrome://resources/cr_elements/i18n_mixin.js';
|
||||
+import {PrefsMixin} from '/shared/settings/prefs/prefs_mixin.js';
|
||||
@@ -406,8 +414,8 @@
|
||||
+// You can use, redistribute, and/or modify this source code under
|
||||
+// the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||
+
|
||||
+#ifndef COMPONENTS_HELIUM_SEREVICES_HELIUM_SERVICES_HELPERS_H_
|
||||
+#define COMPONENTS_HELIUM_SEREVICES_HELIUM_SERVICES_HELPERS_H_
|
||||
+#ifndef COMPONENTS_HELIUM_SERVICES_HELIUM_SERVICES_HELPERS_H_
|
||||
+#define COMPONENTS_HELIUM_SERVICES_HELIUM_SERVICES_HELPERS_H_
|
||||
+
|
||||
+#include "base/functional/bind.h"
|
||||
+#include "components/prefs/pref_change_registrar.h"
|
||||
@@ -429,7 +437,7 @@
|
||||
+ PrefChangeRegistrar& registrar, const base::RepeatingClosure& observer);
|
||||
+} // namespace helium
|
||||
+
|
||||
+#endif // COMPONENTS_HELIUM_SEREVICES_HELIUM_SERVICES_HELPERS_H_
|
||||
+#endif // COMPONENTS_HELIUM_SERVICES_HELIUM_SERVICES_HELPERS_H_
|
||||
--- /dev/null
|
||||
+++ b/components/helium_services/pref_names.h
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
const int kHandleHeight = 24;
|
||||
-const int kHandlePadding = 6;
|
||||
-const int kHandleWidth = 4;
|
||||
+const int kHandlePadding = 3;
|
||||
+const int kHandlePadding = 4;
|
||||
+const int kHandleWidth = 2;
|
||||
} // namespace
|
||||
|
||||
@@ -38,13 +38,14 @@
|
||||
static constexpr int kMinWebContentsWidth = 200;
|
||||
static constexpr double kMinWebContentsWidthPercentage = 0.1;
|
||||
- static constexpr int kContentCornerRadius = 6;
|
||||
+ static constexpr int kContentCornerRadius = 5;
|
||||
static constexpr int kContentOutlineCornerRadius = 8;
|
||||
- static constexpr int kContentOutlineCornerRadius = 8;
|
||||
+ static constexpr int kContentCornerRadius = 8;
|
||||
+ static constexpr int kContentOutlineCornerRadius = 9;
|
||||
static constexpr int kContentOutlineThickness = 1;
|
||||
- static constexpr int kSplitViewContentInset = 8;
|
||||
- static constexpr int kSplitViewContentPadding = 4;
|
||||
+ static constexpr int kSplitViewContentInset = 3;
|
||||
+ static constexpr int kSplitViewContentPadding = 2;
|
||||
+ static constexpr int kSplitViewContentPadding = 0;
|
||||
|
||||
// ContentsContainerView holds the ContentsWebView and the outlines and
|
||||
// minitoolbar when in split view.
|
||||
@@ -77,6 +78,17 @@
|
||||
line-height: 20px;
|
||||
--- a/chrome/browser/ui/views/frame/multi_contents_view.cc
|
||||
+++ b/chrome/browser/ui/views/frame/multi_contents_view.cc
|
||||
@@ -192,8 +192,8 @@ void MultiContentsView::Layout(PassKey)
|
||||
gfx::Size(widths.end_width, available_space.height()));
|
||||
float corner_radius = 0;
|
||||
if (IsInSplitView()) {
|
||||
- start_rect.Inset(gfx::Insets(kSplitViewContentInset).set_right(0));
|
||||
- end_rect.Inset(gfx::Insets(kSplitViewContentInset).set_left(0));
|
||||
+ start_rect.Inset(gfx::Insets(kSplitViewContentInset).set_right(0).set_top(0));
|
||||
+ end_rect.Inset(gfx::Insets(kSplitViewContentInset).set_left(0).set_top(0));
|
||||
corner_radius = kContentCornerRadius;
|
||||
}
|
||||
for (auto* contents_container_view : contents_container_views_) {
|
||||
@@ -235,8 +235,6 @@ MultiContentsView::ContentsContainerView
|
||||
SetLayoutManager(std::make_unique<views::DelegatingLayoutManager>(this));
|
||||
contents_view_ = AddChildView(
|
||||
@@ -118,13 +130,19 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -347,9 +327,6 @@ void MultiContentsView::UpdateContentsBo
|
||||
@@ -343,13 +323,9 @@ void MultiContentsView::UpdateContentsBo
|
||||
kColorMulitContentsViewActiveContentOutline)
|
||||
: GetColorProvider()->GetColor(
|
||||
kColorMulitContentsViewInactiveContentOutline);
|
||||
- contents_container_view->SetBorder(views::CreatePaddedBorder(
|
||||
+ contents_container_view->SetBorder(
|
||||
views::CreateRoundedRectBorder(kContentOutlineThickness,
|
||||
kContentOutlineCornerRadius, color),
|
||||
gfx::Insets(kSplitViewContentPadding)));
|
||||
- kContentOutlineCornerRadius, color),
|
||||
- gfx::Insets(kSplitViewContentPadding)));
|
||||
- // Mini toolbar should only be visible for the inactive contents
|
||||
- // container view.
|
||||
- contents_container_view->GetMiniToolbar()->SetVisible(!is_active);
|
||||
+ kContentOutlineCornerRadius, color));
|
||||
};
|
||||
for (auto* contents_container_view : contents_container_views_) {
|
||||
set_contents_border_and_mini_toolbar(contents_container_view);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
{"loading", IDS_HISTORY_LOADING},
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -1716,7 +1716,7 @@ void AddPeopleStrings(content::WebUIData
|
||||
@@ -1719,7 +1719,7 @@ void AddPeopleStrings(content::WebUIData
|
||||
// Top level people strings:
|
||||
{"peopleSignInPromptSecondaryWithAccount",
|
||||
IDS_SETTINGS_PEOPLE_SIGN_IN_PROMPT_SECONDARY_WITH_ACCOUNT},
|
||||
|
||||
@@ -57,12 +57,12 @@
|
||||
- </settings-toggle-button>
|
||||
- </template>
|
||||
-
|
||||
<template is="dom-if" if="[[showPriceEmailNotificationsToggle_(
|
||||
syncStatus, syncStatus.signedInState)]]" restamp>
|
||||
<settings-toggle-button id="priceEmailNotificationsToggle"
|
||||
<!-- This toggle is only shown for users with the appropriate enterprise
|
||||
policy enabled. The state is not changeable by the user, so when shown,
|
||||
it is alays selected but disabled. -->
|
||||
--- a/chrome/browser/resources/settings/privacy_page/personalization_options.ts
|
||||
+++ b/chrome/browser/resources/settings/privacy_page/personalization_options.ts
|
||||
@@ -230,14 +230,6 @@ export class SettingsPersonalizationOpti
|
||||
@@ -252,14 +252,6 @@ export class SettingsPersonalizationOpti
|
||||
}
|
||||
// </if>
|
||||
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
--- a/chrome/app/settings_strings.grdp
|
||||
+++ b/chrome/app/settings_strings.grdp
|
||||
@@ -1837,6 +1837,12 @@
|
||||
users to manage security settings">
|
||||
Security
|
||||
</message>
|
||||
+ <message name="IDS_SETTINGS_PERMISSIONS_DESCRIPTION_NORMAL" desc="Description of the controls available on the permissions and site content settings page">
|
||||
+ Manage site permissions and content settings (cookies, pop-ups, and more)
|
||||
+ </message>
|
||||
+ <message name="IDS_SETTINGS_SECURITY_DESCRIPTION_NORMAL" desc="Description of the controls available on the security settings page">
|
||||
+ Connection security, DNS settings, certificate management, and other security settings
|
||||
+ </message>
|
||||
<message name="IDS_SETTINGS_SECURITY_DESCRIPTION" desc="Description of the controls available on the security settings page">
|
||||
Safe Browsing (protection from dangerous sites) and other security settings
|
||||
</message>
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -1846,9 +1846,9 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
IDS_SETTINGS_ENABLE_DO_NOT_TRACK_DIALOG_LEARN_MORE_ACCESSIBILITY_LABEL},
|
||||
// TODO(crbug.com/40122957): This string is no longer used. Remove.
|
||||
{"permissionsPageTitle", IDS_SETTINGS_PERMISSIONS},
|
||||
- {"permissionsPageDescription", IDS_SETTINGS_PERMISSIONS_DESCRIPTION},
|
||||
+ {"permissionsPageDescription", IDS_SETTINGS_PERMISSIONS_DESCRIPTION_NORMAL},
|
||||
{"securityPageTitle", IDS_SETTINGS_SECURITY},
|
||||
- {"securityPageDescription", IDS_SETTINGS_SECURITY_DESCRIPTION},
|
||||
+ {"securityPageDescription", IDS_SETTINGS_SECURITY_DESCRIPTION_NORMAL},
|
||||
{"heliumServicesTitle", IDS_SETTINGS_HELIUM_SERVICES},
|
||||
{"heliumServicesDescription", IDS_SETTINGS_HELIUM_SERVICES_DESCRIPTION},
|
||||
{"heliumServicesToggle", IDS_SETTINGS_HELIUM_SERVICES_TOGGLE},
|
||||
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.html
|
||||
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html
|
||||
@@ -51,6 +51,7 @@
|
||||
label="$i18n{clearBrowsingData}"
|
||||
sub-label="$i18n{clearBrowsingDataDescription}"
|
||||
on-click="onClearBrowsingDataClick_"></cr-link-row>
|
||||
+ <template is="dom-if" if="[[false]]">
|
||||
<cr-link-row id="thirdPartyCookiesLinkRow"
|
||||
start-icon="privacy:cookie"
|
||||
class="hr" label="$i18n{thirdPartyCookiesLinkRowLabel}"
|
||||
@@ -61,6 +62,7 @@
|
||||
on-click="onCookiesClick_"
|
||||
role-description="$i18n{subpageArrowRoleDescription}">
|
||||
</cr-link-row>
|
||||
+ </template>
|
||||
<template is="dom-if" if="[[enableIncognitoTrackingProtections_]]">
|
||||
<cr-link-row id="incognitoTrackingProtectionsLinkRow" class="hr"
|
||||
start-icon="settings:visibility-off"
|
||||
@@ -85,16 +87,16 @@
|
||||
role-description="$i18n{subpageArrowRoleDescription}">
|
||||
</cr-link-row>
|
||||
</template>
|
||||
- <cr-link-row id="securityLinkRow" start-icon="privacy:lock"
|
||||
- class="hr" label="$i18n{securityPageTitle}"
|
||||
- sub-label="$i18n{securityPageDescription}"
|
||||
- on-click="onSecurityPageClick_"
|
||||
- role-description="$i18n{subpageArrowRoleDescription}"></cr-link-row>
|
||||
<cr-link-row id="permissionsLinkRow" start-icon="privacy:page-info"
|
||||
class="hr" label="$i18n{siteSettings}"
|
||||
sub-label="$i18n{permissionsPageDescription}"
|
||||
on-click="onPermissionsPageClick_"
|
||||
role-description="$i18n{subpageArrowRoleDescription}"></cr-link-row>
|
||||
+ <cr-link-row id="securityLinkRow" start-icon="privacy:lock"
|
||||
+ class="hr" label="$i18n{securityPageTitle}"
|
||||
+ sub-label="$i18n{securityPageDescription}"
|
||||
+ on-click="onSecurityPageClick_"
|
||||
+ role-description="$i18n{subpageArrowRoleDescription}"></cr-link-row>
|
||||
<cr-link-row id="heliumServicesLinkRow" start-icon="cr:chrome-product"
|
||||
class="hr" label="$i18n{heliumServicesTitle}"
|
||||
sub-label="$i18n{heliumServicesDescription}"
|
||||
@@ -4,7 +4,7 @@
|
||||
</settings-spell-check-page>
|
||||
</settings-section>
|
||||
</template>
|
||||
+<if expr="_google_chrome">
|
||||
+<if expr="False">
|
||||
<settings-section page-title="$i18n{translatePageTitle}"
|
||||
section="translate" nest-under-section="languages">
|
||||
<settings-translate-page prefs="{{prefs}}"
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
--- a/chrome/browser/ui/views/location_bar/selected_keyword_view.cc
|
||||
+++ b/chrome/browser/ui/views/location_bar/selected_keyword_view.cc
|
||||
@@ -60,8 +60,7 @@ SelectedKeywordView::GetKeywordLabelName
|
||||
names.full_name =
|
||||
l10n_util::GetStringUTF16(IDS_STARTER_PACK_PAGE_KEYWORD_TEXT);
|
||||
} else {
|
||||
- names.full_name = l10n_util::GetStringFUTF16(IDS_OMNIBOX_KEYWORD_TEXT_MD,
|
||||
- names.short_name);
|
||||
+ names.full_name = names.short_name;
|
||||
}
|
||||
}
|
||||
return names;
|
||||
@@ -194,7 +193,7 @@ const std::u16string& SelectedKeywordVie
|
||||
|
||||
int SelectedKeywordView::GetExtraInternalSpacing() const {
|
||||
// Align the label text with the suggestion text.
|
||||
- return 14;
|
||||
+ return 3;
|
||||
}
|
||||
|
||||
void SelectedKeywordView::SetLabelForCurrentWidth() {
|
||||
@@ -59,7 +59,7 @@
|
||||
#include "components/search_engines/template_url_service.h"
|
||||
#include "components/search_engines/template_url_starter_pack_data.h"
|
||||
#include "components/strings/grit/components_strings.h"
|
||||
@@ -1850,7 +1851,21 @@ void AutocompleteController::UpdateKeywo
|
||||
@@ -1855,7 +1856,21 @@ void AutocompleteController::UpdateKeywo
|
||||
// - For contextual search matches, the description indicates the
|
||||
// alternative UX because they're opened in the side panel.
|
||||
i->description = template_url->AdjustedShortNameForLocaleDirection();
|
||||
@@ -162,11 +162,10 @@
|
||||
#include "components/strings/grit/components_strings.h"
|
||||
#include "components/vector_icons/vector_icons.h"
|
||||
#include "ui/accessibility/ax_enums.mojom.h"
|
||||
@@ -115,6 +116,15 @@ void SelectedKeywordView::SetCustomImage
|
||||
if (template_url &&
|
||||
@@ -118,6 +119,14 @@ void SelectedKeywordView::SetCustomImage
|
||||
template_url->starter_pack_id() == TemplateURLStarterPackData::kGemini) {
|
||||
vector_icon = &omnibox::kSparkIcon;
|
||||
+
|
||||
|
||||
+ } else if (template_url && template_url->bang_id() > 0) {
|
||||
+ switch (bang_manager_->GetCategoryForBang(template_url->bang_id())) {
|
||||
+ case Bangs::BANG_CATEGORY_AI:
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
return touch_ui ? 3 : 8;
|
||||
case LOCATION_BAR_HEIGHT:
|
||||
- return touch_ui ? 36 : 34;
|
||||
+ return touch_ui ? 36 : 30;
|
||||
+ return touch_ui ? 36 : 28;
|
||||
case LOCATION_BAR_ICON_SIZE:
|
||||
return touch_ui ? 20 : 16;
|
||||
case LOCATION_BAR_LEADING_ICON_SIZE:
|
||||
@@ -46,7 +46,7 @@
|
||||
return touch_ui ? 24 : 16;
|
||||
case TAB_HEIGHT:
|
||||
- return 34 + GetLayoutConstant(TABSTRIP_TOOLBAR_OVERLAP);
|
||||
+ return 33;
|
||||
+ return 31;
|
||||
case TAB_STRIP_HEIGHT:
|
||||
return GetLayoutConstant(TAB_HEIGHT) +
|
||||
GetLayoutConstant(TAB_STRIP_PADDING);
|
||||
@@ -92,19 +92,6 @@
|
||||
case PAGE_INFO_ICON_SIZE:
|
||||
return 20;
|
||||
case DOWNLOAD_ICON_SIZE:
|
||||
@@ -157,10 +152,10 @@ gfx::Insets GetLayoutInsets(LayoutInset
|
||||
return gfx::Insets::VH(2, 2);
|
||||
|
||||
case LOCATION_BAR_PAGE_INFO_ICON_PADDING:
|
||||
- return touch_ui ? gfx::Insets::VH(5, 10) : gfx::Insets::VH(4, 4);
|
||||
+ return touch_ui ? gfx::Insets::VH(5, 10) : gfx::Insets::VH(4, 5);
|
||||
|
||||
case LOCATION_BAR_PAGE_ACTION_ICON_PADDING:
|
||||
- return touch_ui ? gfx::Insets::VH(5, 10) : gfx::Insets::VH(2, 2);
|
||||
+ return touch_ui ? gfx::Insets::VH(5, 10) : gfx::Insets::VH(2, 3);
|
||||
|
||||
case TOOLBAR_ACTION_VIEW: {
|
||||
// TODO(afakhry): Unify all toolbar button sizes on all platforms.
|
||||
@@ -169,7 +164,7 @@ gfx::Insets GetLayoutInsets(LayoutInset
|
||||
}
|
||||
|
||||
@@ -119,12 +106,12 @@
|
||||
return GetLayoutInsets(TOOLBAR_BUTTON);
|
||||
} else {
|
||||
- return gfx::Insets::TLBR(7, 10, 7, 4);
|
||||
+ return gfx::Insets::TLBR(5, 7, 5, 5);
|
||||
+ return gfx::Insets::TLBR(4, 5, 4, 4);
|
||||
}
|
||||
|
||||
case TOOLBAR_INTERIOR_MARGIN:
|
||||
- return touch_ui ? gfx::Insets() : gfx::Insets::VH(6, 5);
|
||||
+ return touch_ui ? gfx::Insets() : gfx::Insets::VH(3, 6);
|
||||
+ return touch_ui ? gfx::Insets() : gfx::Insets::TLBR(0, 6, 3, 6);
|
||||
|
||||
case WEBUI_TAB_STRIP_TOOLBAR_INTERIOR_MARGIN:
|
||||
return gfx::Insets::VH(4, 0);
|
||||
|
||||
@@ -100,7 +100,41 @@
|
||||
|
||||
auto location_icon_view =
|
||||
std::make_unique<LocationIconView>(omnibox_chip_font_list, this, this);
|
||||
@@ -490,7 +493,7 @@ bool LocationBarView::IsInitialized() co
|
||||
@@ -391,22 +394,13 @@ void LocationBarView::Init() {
|
||||
// first so that they appear on the left side of the icon container.
|
||||
// TODO(crbug.com/40835681): Improve the ordering heuristics for page action
|
||||
// icons and determine a way to handle simultaneous icon animations.
|
||||
- if (base::FeatureList::IsEnabled(commerce::kProductSpecifications)) {
|
||||
- params.types_enabled.push_back(
|
||||
- PageActionIconType::kProductSpecifications);
|
||||
- }
|
||||
- params.types_enabled.push_back(PageActionIconType::kDiscounts);
|
||||
- params.types_enabled.push_back(PageActionIconType::kPriceInsights);
|
||||
- params.types_enabled.push_back(PageActionIconType::kPriceTracking);
|
||||
|
||||
if (optimization_guide::features::ShouldEnableOptimizationGuideIconView()) {
|
||||
params.types_enabled.push_back(PageActionIconType::kOptimizationGuide);
|
||||
}
|
||||
params.types_enabled.push_back(PageActionIconType::kClickToCall);
|
||||
params.types_enabled.push_back(PageActionIconType::kSmsRemoteFetcher);
|
||||
- params.types_enabled.push_back(PageActionIconType::kAutofillAddress);
|
||||
- params.types_enabled.push_back(PageActionIconType::kManagePasswords);
|
||||
- params.types_enabled.push_back(PageActionIconType::kChangePassword);
|
||||
+
|
||||
if (!apps::features::ShouldShowLinkCapturingUX()) {
|
||||
params.types_enabled.push_back(PageActionIconType::kIntentPicker);
|
||||
}
|
||||
@@ -416,9 +410,6 @@ void LocationBarView::Init() {
|
||||
params.types_enabled.push_back(PageActionIconType::kZoom);
|
||||
params.types_enabled.push_back(PageActionIconType::kFileSystemAccess);
|
||||
|
||||
- params.types_enabled.push_back(PageActionIconType::kCookieControls);
|
||||
- params.types_enabled.push_back(
|
||||
- PageActionIconType::kPaymentsOfferNotification);
|
||||
params.types_enabled.push_back(PageActionIconType::kMemorySaver);
|
||||
}
|
||||
params.types_enabled.push_back(PageActionIconType::kSaveCard);
|
||||
@@ -490,7 +481,7 @@ bool LocationBarView::IsInitialized() co
|
||||
|
||||
int LocationBarView::GetBorderRadius() const {
|
||||
return ChromeLayoutProvider::Get()->GetCornerRadiusMetric(
|
||||
@@ -109,7 +143,7 @@
|
||||
}
|
||||
|
||||
std::unique_ptr<views::Background> LocationBarView::CreateRoundRectBackground(
|
||||
@@ -690,9 +693,9 @@ void LocationBarView::Layout(PassKey) {
|
||||
@@ -690,9 +681,9 @@ void LocationBarView::Layout(PassKey) {
|
||||
// TODO(manukh): Move constants to layout_constants.cc.
|
||||
// The padding between the left edges of the location bar and the LHS icon,
|
||||
// e.g. the page info icon, the google G icon, the selected suggestion icon.
|
||||
@@ -121,7 +155,7 @@
|
||||
|
||||
// Apply indentation to align the omnibox input icon and the text with those
|
||||
// of the suggestions in the popup. However, there are two exceptions where
|
||||
@@ -711,22 +714,22 @@ void LocationBarView::Layout(PassKey) {
|
||||
@@ -711,22 +702,22 @@ void LocationBarView::Layout(PassKey) {
|
||||
!location_icon_view_->ShouldShowLabel() &&
|
||||
!ShouldShowKeywordBubble();
|
||||
if (should_indent) {
|
||||
@@ -139,7 +173,7 @@
|
||||
// Otherwise, if in keyword mode, adjust indentation to align the icon and
|
||||
// the text with the suggestion icons & texts.
|
||||
- icon_left += 9; /*icon_indent_keyword_mode*/
|
||||
+ icon_left += 3; /*icon_indent_keyword_mode*/
|
||||
+ icon_left += 0; /*icon_indent_keyword_mode*/
|
||||
icon_left += omnibox_feature_configs::AdjustOmniboxIndent()
|
||||
.Get()
|
||||
.input_icon_indent_offset;
|
||||
@@ -148,7 +182,7 @@
|
||||
}
|
||||
|
||||
LocationBarLayout leading_decorations(LocationBarLayout::Position::kLeftEdge,
|
||||
@@ -1183,7 +1186,7 @@ int LocationBarView::GetMinimumTrailingW
|
||||
@@ -1183,7 +1174,7 @@ int LocationBarView::GetMinimumTrailingW
|
||||
}
|
||||
|
||||
gfx::Rect LocationBarView::GetLocalBoundsWithoutEndcaps() const {
|
||||
@@ -157,6 +191,18 @@
|
||||
gfx::Rect bounds_without_endcaps(GetLocalBounds());
|
||||
bounds_without_endcaps.Inset(gfx::Insets::VH(0, border_radius));
|
||||
return bounds_without_endcaps;
|
||||
@@ -1197,9 +1188,9 @@ void LocationBarView::RefreshBackground(
|
||||
const bool high_contrast = GetNativeTheme()->UserHasContrastPreference();
|
||||
|
||||
const auto* const color_provider = GetColorProvider();
|
||||
- SkColor normal = color_provider->GetColor(kColorLocationBarBackground);
|
||||
+ SkColor normal = color_provider->GetColor(kColorOmniboxResultsBackground);
|
||||
SkColor hovered =
|
||||
- color_provider->GetColor(kColorLocationBarBackgroundHovered);
|
||||
+ color_provider->GetColor(kColorOmniboxResultsBackgroundHovered);
|
||||
|
||||
background_color_ = gfx::Tween::ColorValueBetween(opacity, normal, hovered);
|
||||
if (is_caret_visible) {
|
||||
--- a/chrome/browser/ui/views/location_bar/location_icon_view.cc
|
||||
+++ b/chrome/browser/ui/views/location_bar/location_icon_view.cc
|
||||
@@ -110,7 +110,7 @@ SkColor LocationIconView::GetForegroundC
|
||||
@@ -9,17 +9,45 @@
|
||||
|
||||
#if !defined(USE_AURA)
|
||||
|
||||
@@ -232,8 +232,7 @@ RoundedOmniboxResultsFrame::RoundedOmnib
|
||||
@@ -162,7 +162,9 @@ class TopBackgroundView : public views::
|
||||
// not antialiased, since the goal is to completely cover the underlying
|
||||
// pixels, and AA would let those on the edge partly bleed through.
|
||||
SetBackground(location_bar_->CreateRoundRectBackground(
|
||||
- SK_ColorTRANSPARENT, background_color, SkBlendMode::kSrc, false));
|
||||
+ SK_ColorTRANSPARENT, background_color, SkBlendMode::kSrc,
|
||||
+ /*antialias=*/false,
|
||||
+ /*should_border_scale=*/true));
|
||||
}
|
||||
|
||||
#if !defined(USE_AURA)
|
||||
@@ -215,7 +217,7 @@ END_METADATA
|
||||
// Insets used to position |contents_| within |contents_host_|.
|
||||
gfx::Insets GetContentInsets() {
|
||||
return gfx::Insets::TLBR(
|
||||
- RoundedOmniboxResultsFrame::GetNonResultSectionHeight(), 0, 0, 0);
|
||||
+ RoundedOmniboxResultsFrame::GetNonResultSectionHeight() - 4, 0, 0, 0);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -232,8 +234,7 @@ RoundedOmniboxResultsFrame::RoundedOmnib
|
||||
contents_host_->layer()->SetFillsBoundsOpaquely(false);
|
||||
|
||||
// Use rounded corners.
|
||||
- const int corner_radius = views::LayoutProvider::Get()->GetCornerRadiusMetric(
|
||||
- views::ShapeContextTokens::kOmniboxExpandedRadius);
|
||||
+ const int corner_radius = 12.0f;
|
||||
+ const int corner_radius = 12;
|
||||
contents_host_->layer()->SetRoundedCornerRadius(
|
||||
gfx::RoundedCornersF(corner_radius));
|
||||
contents_host_->layer()->SetIsFastRoundedCorner(true);
|
||||
@@ -284,10 +283,10 @@ int RoundedOmniboxResultsFrame::GetNonRe
|
||||
@@ -248,6 +249,7 @@ RoundedOmniboxResultsFrame::RoundedOmnib
|
||||
views::BubbleBorder::Shadow::STANDARD_SHADOW);
|
||||
border->set_rounded_corners(gfx::RoundedCornersF(corner_radius));
|
||||
border->set_md_shadow_elevation(kElevation);
|
||||
+ border->set_draw_border_stroke(true);
|
||||
SetBorder(std::move(border));
|
||||
|
||||
AddChildViewRaw(contents_host_.get());
|
||||
@@ -284,10 +286,10 @@ int RoundedOmniboxResultsFrame::GetNonRe
|
||||
|
||||
// static
|
||||
gfx::Insets RoundedOmniboxResultsFrame::GetLocationBarAlignmentInsets() {
|
||||
@@ -28,21 +56,12 @@
|
||||
return gfx::Insets::TLBR(6, 1, 5, 1);
|
||||
}
|
||||
- return gfx::Insets::VH(5, 6);
|
||||
+ return gfx::Insets::VH(3, 10);
|
||||
+ return gfx::Insets::VH(3, 8);
|
||||
}
|
||||
|
||||
// static
|
||||
--- a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
|
||||
+++ b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
|
||||
@@ -103,7 +103,7 @@ class OmniboxResultViewButton : public v
|
||||
BEGIN_METADATA(OmniboxResultViewButton)
|
||||
END_METADATA
|
||||
|
||||
-constexpr float kIPHBackgroundBorderRadius = 8;
|
||||
+constexpr float kIPHBackgroundBorderRadius = 6;
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -190,9 +190,6 @@ OmniboxResultView::OmniboxResultView(Omn
|
||||
|
||||
SetLayoutManager(std::make_unique<views::FillLayout>());
|
||||
@@ -102,7 +121,7 @@
|
||||
- }
|
||||
-
|
||||
- return gfx::Insets::TLBR(0, 0, 0, 16);
|
||||
+ return gfx::Insets::TLBR(2, 6, 0, 6);
|
||||
+ return gfx::Insets::TLBR(2, 4, 0, 4);
|
||||
}
|
||||
|
||||
BEGIN_METADATA(OmniboxRowView)
|
||||
@@ -118,12 +137,21 @@
|
||||
// When a PEDAL suggestion has been split out to its own row, apply a square
|
||||
// background with a distinctive color to the respective icon. Journeys
|
||||
// suggestion rows should also receive the same treatment.
|
||||
@@ -568,7 +567,7 @@ gfx::Size OmniboxMatchCellView::Calculat
|
||||
}
|
||||
} else if (layout_style_ == LayoutStyle::IPH_SUGGESTION) {
|
||||
// IPH suggestions have extra height.
|
||||
- height = kRowHeight + 4;
|
||||
+ height = kRowHeight;
|
||||
} else {
|
||||
// The height for traditional 1-line matches.
|
||||
height = kRowHeight;
|
||||
@@ -584,7 +583,7 @@ int OmniboxMatchCellView::GetImageIndent
|
||||
// align with any other UI; it's just arbitrarily chosen by UX. Hence, it's
|
||||
// not derived from other matches' `indent` below.
|
||||
if (layout_style_ == LayoutStyle::IPH_SUGGESTION) {
|
||||
- return 2;
|
||||
+ return 0;
|
||||
+ return -3;
|
||||
}
|
||||
|
||||
// The entity, answer, and icon images are horizontally centered within their
|
||||
@@ -132,7 +160,7 @@
|
||||
// c) Regardless of the state of those other features and their widths.
|
||||
// This applies to both touch-UI and non-touch-UI.
|
||||
- int indent = 16 + kUniformRowHeightIconSize / 2 - kImageBoundsWidth / 2;
|
||||
+ int indent = 5 + kUniformRowHeightIconSize / 2 - kImageBoundsWidth / 2;
|
||||
+ int indent = 3 + kUniformRowHeightIconSize / 2 - kImageBoundsWidth / 2;
|
||||
|
||||
indent += omnibox_feature_configs::AdjustOmniboxIndent()
|
||||
.Get()
|
||||
@@ -140,7 +168,7 @@
|
||||
}
|
||||
|
||||
int OmniboxMatchCellView::GetTextIndent() const {
|
||||
+ return 33;
|
||||
+ return 30;
|
||||
+
|
||||
// Text indent is added to the `OmniboxMatchCellView::GetInsets()`. It is not
|
||||
// added to the image position & size.
|
||||
@@ -152,7 +180,7 @@
|
||||
// The height of the standard 1-line match row. Multiline & IPH matches have
|
||||
// larger heights.
|
||||
- static constexpr int kRowHeight = 40;
|
||||
+ static constexpr int kRowHeight = 30;
|
||||
+ static constexpr int kRowHeight = 28;
|
||||
|
||||
// The width of icon, answer, and entity image bounds. These images are
|
||||
// smaller than this bounds; they'll be centered within the bounds.
|
||||
@@ -163,7 +191,7 @@
|
||||
// (result set is empty or all results are hidden).
|
||||
if (popup_height != 0) {
|
||||
- constexpr int kExtraBottomPadding = 8;
|
||||
+ constexpr int kExtraBottomPadding = 6;
|
||||
+ constexpr int kExtraBottomPadding = 2;
|
||||
popup_height += kExtraBottomPadding;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
--- a/chrome/browser/ui/views/location_bar/selected_keyword_view.cc
|
||||
+++ b/chrome/browser/ui/views/location_bar/selected_keyword_view.cc
|
||||
@@ -60,8 +60,7 @@ SelectedKeywordView::GetKeywordLabelName
|
||||
names.full_name =
|
||||
l10n_util::GetStringUTF16(IDS_STARTER_PACK_PAGE_KEYWORD_TEXT);
|
||||
} else {
|
||||
- names.full_name = l10n_util::GetStringFUTF16(IDS_OMNIBOX_KEYWORD_TEXT_MD,
|
||||
- names.short_name);
|
||||
+ names.full_name = names.short_name;
|
||||
}
|
||||
}
|
||||
return names;
|
||||
@@ -78,6 +77,8 @@ SelectedKeywordView::SelectedKeywordView
|
||||
partial_label_.SetVisible(false);
|
||||
label()->SetElideBehavior(gfx::FADE_TAIL);
|
||||
|
||||
+ SetExpandedLabelAdditionalInsets(views::Inset1D(2, 0));
|
||||
+
|
||||
// TODO(crbug.com/40890218): `IconLabelBubbleView::GetAccessibleNodeData`
|
||||
// would set the name to explicitly empty when the name was missing.
|
||||
// That function no longer exists. As a result we need to handle that here.
|
||||
@@ -116,6 +117,7 @@ void SelectedKeywordView::SetCustomImage
|
||||
if (template_url &&
|
||||
template_url->starter_pack_id() == TemplateURLStarterPackData::kGemini) {
|
||||
vector_icon = &omnibox::kSparkIcon;
|
||||
+
|
||||
} else if (history_embeddings::IsHistoryEmbeddingsEnabledForProfile(
|
||||
profile_) &&
|
||||
history_embeddings::GetFeatureParameters().omnibox_scoped &&
|
||||
@@ -194,7 +196,7 @@ const std::u16string& SelectedKeywordVie
|
||||
|
||||
int SelectedKeywordView::GetExtraInternalSpacing() const {
|
||||
// Align the label text with the suggestion text.
|
||||
- return 14;
|
||||
+ return 2;
|
||||
}
|
||||
|
||||
void SelectedKeywordView::SetLabelForCurrentWidth() {
|
||||
@@ -35,3 +35,30 @@
|
||||
SetProperty(views::kMarginsKey,
|
||||
gfx::Insets().set_left(resize_handle_left_margin));
|
||||
} else {
|
||||
--- a/chrome/browser/ui/views/side_panel/side_panel_rounded_corner.cc
|
||||
+++ b/chrome/browser/ui/views/side_panel/side_panel_rounded_corner.cc
|
||||
@@ -32,8 +32,7 @@ void SidePanelRoundedCorner::Layout(Pass
|
||||
path.moveTo(0, 0);
|
||||
path.lineTo(local_bounds.width(), 0);
|
||||
path.lineTo(local_bounds.width(), local_bounds.height());
|
||||
- path.lineTo(local_bounds.width() - views::Separator::kThickness,
|
||||
- local_bounds.height());
|
||||
+ path.lineTo(local_bounds.width(), local_bounds.height());
|
||||
path.arcTo(corner_radius, corner_radius, 0, SkPath::kSmall_ArcSize,
|
||||
SkPathDirection::kCCW, 0, views::Separator::kThickness);
|
||||
path.lineTo(0, 0);
|
||||
@@ -66,12 +65,12 @@ void SidePanelRoundedCorner::OnPaint(gfx
|
||||
views::ShapeContextTokens::kSidePanelPageContentRadius);
|
||||
const gfx::Rect local_bounds = GetLocalBounds();
|
||||
SkPath path;
|
||||
- if (is_right_aligned) {
|
||||
+ if ((false)) {
|
||||
path.moveTo(local_bounds.width() - views::Separator::kThickness,
|
||||
local_bounds.height());
|
||||
path.arcTo(corner_radius, corner_radius, 0, SkPath::kSmall_ArcSize,
|
||||
SkPathDirection::kCCW, 0, views::Separator::kThickness);
|
||||
- } else {
|
||||
+ } else if ((false)) {
|
||||
path.moveTo(local_bounds.width(), views::Separator::kThickness);
|
||||
path.arcTo(corner_radius, corner_radius, 0, SkPath::kSmall_ArcSize,
|
||||
SkPathDirection::kCCW, views::Separator::kThickness,
|
||||
@@ -0,0 +1,149 @@
|
||||
--- a/chrome/browser/ui/views/status_bubble_views.cc
|
||||
+++ b/chrome/browser/ui/views/status_bubble_views.cc
|
||||
@@ -58,7 +58,7 @@
|
||||
namespace {
|
||||
|
||||
// The roundedness of the edges of our bubble.
|
||||
-constexpr int kBubbleCornerRadius = 4;
|
||||
+constexpr int kBubbleCornerRadius = 6;
|
||||
|
||||
// How close the mouse can get to the infobubble before it starts sliding
|
||||
// off-screen.
|
||||
@@ -66,7 +66,10 @@ constexpr int kMousePadding = 20;
|
||||
|
||||
// The minimum horizontal space between the edges of the text and the edges of
|
||||
// the status bubble, not including the outer shadow ring.
|
||||
-constexpr int kTextHorizPadding = 5;
|
||||
+constexpr int kTextHorizPadding = 8;
|
||||
+constexpr int kTextVertPadding = 3;
|
||||
+
|
||||
+constexpr int kWindowMargin = 8;
|
||||
|
||||
// Delays before we start hiding or showing the bubble after we receive a
|
||||
// show or hide request.
|
||||
@@ -258,7 +261,7 @@ StatusView::~StatusView() {
|
||||
}
|
||||
|
||||
gfx::Insets StatusView::GetInsets() const {
|
||||
- return gfx::Insets::VH(kShadowThickness,
|
||||
+ return gfx::Insets::VH(kShadowThickness + kTextVertPadding,
|
||||
kShadowThickness + kTextHorizPadding);
|
||||
}
|
||||
|
||||
@@ -450,47 +453,13 @@ void StatusView::OnPaint(gfx::Canvas* ca
|
||||
float scale = canvas->UndoDeviceScaleFactor();
|
||||
const float radius = kBubbleCornerRadius * scale;
|
||||
|
||||
- std::array<SkScalar, 8> rad{};
|
||||
- auto round_corner = [&rad, radius](gfx::RRectF::Corner c) {
|
||||
- int index = base::to_underlying(c);
|
||||
- rad[2 * index] = radius;
|
||||
- rad[2 * index + 1] = radius;
|
||||
+ std::array<SkScalar, 8> rad = {
|
||||
+ radius, radius, // Upper-left
|
||||
+ radius, radius, // Upper-right
|
||||
+ radius, radius, // Lower-right
|
||||
+ radius, radius // Lower-left
|
||||
};
|
||||
|
||||
- // Top Edges - if the bubble is in its bottom position (sticking downwards),
|
||||
- // then we square the top edges. Otherwise, we square the edges based on the
|
||||
- // position of the bubble within the window (the bubble is positioned in the
|
||||
- // southeast corner in RTL and in the southwest corner in LTR).
|
||||
- if (style_ != BubbleStyle::kBottom) {
|
||||
- if (base::i18n::IsRTL() != (style_ == BubbleStyle::kStandardRight)) {
|
||||
- // The text is RtL or the bubble is on the right side (but not both).
|
||||
- round_corner(gfx::RRectF::Corner::kUpperLeft);
|
||||
- } else {
|
||||
- round_corner(gfx::RRectF::Corner::kUpperRight);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- // Bottom edges - Keep these squared off if the bubble is in its standard
|
||||
- // position (sticking upward).
|
||||
- if (style_ != BubbleStyle::kStandard &&
|
||||
- style_ != BubbleStyle::kStandardRight) {
|
||||
- round_corner(gfx::RRectF::Corner::kLowerRight);
|
||||
- round_corner(gfx::RRectF::Corner::kLowerLeft);
|
||||
- } else {
|
||||
-#if BUILDFLAG(IS_MAC)
|
||||
- // Mac's window has rounded corners, but the corner radius might be
|
||||
- // different on different versions. Status bubble will use its own round
|
||||
- // corner on Mac when there is no download shelf beneath.
|
||||
- if (!status_bubble_->download_shelf_is_visible_) {
|
||||
- if (base::i18n::IsRTL() != (style_ == BubbleStyle::kStandard)) {
|
||||
- round_corner(gfx::RRectF::Corner::kLowerLeft);
|
||||
- } else {
|
||||
- round_corner(gfx::RRectF::Corner::kLowerRight);
|
||||
- }
|
||||
- }
|
||||
-#endif
|
||||
- }
|
||||
-
|
||||
// Snap to pixels to avoid shadow blurriness.
|
||||
gfx::Size scaled_size = gfx::ScaleToRoundedSize(size(), scale);
|
||||
|
||||
@@ -499,20 +468,7 @@ void StatusView::OnPaint(gfx::Canvas* ca
|
||||
// where the web content is visible.
|
||||
const int shadow_thickness_pixels = std::floor(kShadowThickness * scale);
|
||||
|
||||
- // The shadow will overlap the window frame. Clip it off when the bubble is
|
||||
- // docked. Otherwise when the bubble is floating preserve the full shadow so
|
||||
- // the bubble looks complete.
|
||||
- int clip_left =
|
||||
- style_ == BubbleStyle::kStandard ? shadow_thickness_pixels : 0;
|
||||
- int clip_right =
|
||||
- style_ == BubbleStyle::kStandardRight ? shadow_thickness_pixels : 0;
|
||||
- if (base::i18n::IsRTL()) {
|
||||
- std::swap(clip_left, clip_right);
|
||||
- }
|
||||
-
|
||||
- const int clip_bottom = clip_left || clip_right ? shadow_thickness_pixels : 0;
|
||||
gfx::Rect clip_rect(scaled_size);
|
||||
- clip_rect.Inset(gfx::Insets::TLBR(0, clip_left, clip_bottom, clip_right));
|
||||
canvas->ClipRect(clip_rect);
|
||||
|
||||
gfx::RectF bubble_rect{gfx::SizeF(scaled_size)};
|
||||
@@ -522,11 +478,7 @@ void StatusView::OnPaint(gfx::Canvas* ca
|
||||
// bubble bounds by 1 DIP minus 1 pixel. Failing to do this results in drawing
|
||||
// further and further outside the window as the scale increases.
|
||||
const int inset = shadow_thickness_pixels - 1;
|
||||
- bubble_rect.Inset(
|
||||
- gfx::InsetsF()
|
||||
- .set_left(style_ == BubbleStyle::kStandardRight ? 0 : inset)
|
||||
- .set_right(style_ == BubbleStyle::kStandardRight ? inset : 0)
|
||||
- .set_bottom(inset));
|
||||
+ bubble_rect.Inset(gfx::InsetsF::VH(inset, inset));
|
||||
// Align to pixel centers now that the layout is correct.
|
||||
bubble_rect.Inset(0.5);
|
||||
|
||||
@@ -553,9 +505,6 @@ void StatusView::OnPaint(gfx::Canvas* ca
|
||||
: kColorStatusBubbleBackgroundFrameInactive;
|
||||
flags.setColor(color_provider->GetColor(id));
|
||||
canvas->sk_canvas()->drawPath(fill_path, flags);
|
||||
-
|
||||
- flags.setColor(color_provider->GetColor(kColorStatusBubbleShadow));
|
||||
- canvas->sk_canvas()->drawPath(stroke_path, flags);
|
||||
}
|
||||
|
||||
DEFINE_ENUM_CONVERTERS(StatusView::BubbleState,
|
||||
@@ -769,7 +718,9 @@ void StatusBubbleViews::Reposition() {
|
||||
int overlap = kShadowThickness;
|
||||
int height = GetPreferredHeight();
|
||||
int base_view_height = base_view_->bounds().height();
|
||||
- gfx::Point origin(-overlap, base_view_height - height + overlap);
|
||||
+ gfx::Point origin(
|
||||
+ -overlap + kWindowMargin, base_view_height - height - kWindowMargin + overlap
|
||||
+ );
|
||||
SetBounds(origin.x(), origin.y(), base_view_->bounds().width() / 3, height);
|
||||
}
|
||||
|
||||
@@ -807,7 +758,7 @@ int StatusBubbleViews::GetWidthForURL(co
|
||||
// Get the width of the elided url
|
||||
int elided_url_width = gfx::GetStringWidth(url_string, GetFont());
|
||||
// Add proper paddings
|
||||
- return elided_url_width + (kShadowThickness + kTextHorizPadding) * 2 + 1;
|
||||
+ return elided_url_width + (kShadowThickness + kTextHorizPadding) * 2;
|
||||
}
|
||||
|
||||
void StatusBubbleViews::SetStatus(const std::u16string& status_text) {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/browser/ui/tabs/tab_style.cc
|
||||
+++ b/chrome/browser/ui/tabs/tab_style.cc
|
||||
@@ -18,13 +18,13 @@ namespace {
|
||||
@@ -18,17 +18,20 @@ namespace {
|
||||
|
||||
// Thickness in DIPs of the separator painted on the left and right edges of
|
||||
// the tab.
|
||||
@@ -12,12 +12,29 @@
|
||||
constexpr int kChromeRefreshSeparatorHeight = 16;
|
||||
|
||||
// The padding from the top of the tab to the content area.
|
||||
-constexpr int kChromeRefreshTabVerticalPadding = 6;
|
||||
+constexpr int kChromeRefreshTabVerticalPadding = 7;
|
||||
constexpr int kChromeRefreshTabHorizontalPadding = 8;
|
||||
constexpr int kChromeRefreshTabVerticalPadding = 6;
|
||||
-constexpr int kChromeRefreshTabHorizontalPadding = 8;
|
||||
+constexpr int kChromeRefreshTabHorizontalPadding = 7;
|
||||
|
||||
// The standard tab width is 232 DIP, excluding separators and overlap.
|
||||
@@ -104,11 +104,11 @@ int TabStyle::GetMinimumInactiveWidth()
|
||||
-constexpr int kTabWidth = 232;
|
||||
+constexpr int kTabWidth = 200;
|
||||
+
|
||||
+// Split tabs need more space to be readable
|
||||
+constexpr int kSplitTabWidth = 250;
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -42,7 +45,7 @@ int TabStyle::GetStandardWidth(const boo
|
||||
if (is_split) {
|
||||
// Split tabs appear as half width with one bottom extension. They also must
|
||||
// include half the tab overlap as the tabs fill the space between them.
|
||||
- return kTabWidth / 2 + GetBottomCornerRadius() + GetTabOverlap() / 2;
|
||||
+ return kSplitTabWidth / 2 + GetBottomCornerRadius() + GetTabOverlap() / 2;
|
||||
} else {
|
||||
// The full width includes two extensions with the bottom corner radius.
|
||||
return kTabWidth + 2 * GetBottomCornerRadius();
|
||||
@@ -104,11 +107,11 @@ int TabStyle::GetMinimumInactiveWidth()
|
||||
}
|
||||
|
||||
int TabStyle::GetTopCornerRadius() const {
|
||||
@@ -31,42 +48,6 @@
|
||||
}
|
||||
|
||||
int TabStyle::GetTabOverlap() const {
|
||||
--- a/chrome/browser/ui/views/tabs/tab_group_highlight.cc
|
||||
+++ b/chrome/browser/ui/views/tabs/tab_group_highlight.cc
|
||||
@@ -47,33 +47,7 @@ void TabGroupHighlight::OnPaint(gfx::Can
|
||||
}
|
||||
|
||||
SkPath TabGroupHighlight::GetPath() const {
|
||||
- // This path imitates the shape of a tab (see GM2TabStyle::GetPath()). It
|
||||
- // doesn't reuse the exact same GetPath() function because it doesn't need
|
||||
- // much of the complexity there. Group highlights only appear on group drag,
|
||||
- // which is a well-scoped interaction. A dragging group doesn't nestle in with
|
||||
- // the tabs around it, so there are no special cases needed when determining
|
||||
- // its shape.
|
||||
- const int corner_radius = TabStyle::Get()->GetBottomCornerRadius();
|
||||
- const int top = GetLayoutConstant(TAB_STRIP_PADDING);
|
||||
-
|
||||
SkPath path;
|
||||
- path.moveTo(0, bounds().height());
|
||||
- path.arcTo(corner_radius, corner_radius, 0, SkPath::kSmall_ArcSize,
|
||||
- SkPathDirection::kCCW, corner_radius,
|
||||
- bounds().height() - corner_radius);
|
||||
- path.lineTo(corner_radius, top + corner_radius);
|
||||
- path.arcTo(corner_radius, corner_radius, 0, SkPath::kSmall_ArcSize,
|
||||
- SkPathDirection::kCW, 2 * corner_radius, top);
|
||||
- path.lineTo(bounds().width() - 2 * corner_radius, top);
|
||||
- path.arcTo(corner_radius, corner_radius, 0, SkPath::kSmall_ArcSize,
|
||||
- SkPathDirection::kCW, bounds().width() - corner_radius,
|
||||
- top + corner_radius);
|
||||
- path.lineTo(bounds().width() - corner_radius,
|
||||
- bounds().height() - corner_radius);
|
||||
- path.arcTo(corner_radius, corner_radius, 0, SkPath::kSmall_ArcSize,
|
||||
- SkPathDirection::kCCW, bounds().width(), bounds().height());
|
||||
- path.close();
|
||||
-
|
||||
return path;
|
||||
}
|
||||
|
||||
--- a/chrome/browser/ui/views/tabs/tab_style_views.cc
|
||||
+++ b/chrome/browser/ui/views/tabs/tab_style_views.cc
|
||||
@@ -214,8 +214,6 @@ SkPath TabStyleViewsImpl::GetPath(TabSty
|
||||
@@ -91,3 +72,57 @@
|
||||
float top_left_corner_radius = content_corner_radius;
|
||||
float top_right_corner_radius = content_corner_radius;
|
||||
float bottom_left_corner_radius = content_corner_radius;
|
||||
--- a/chrome/browser/ui/views/tabs/tab.cc
|
||||
+++ b/chrome/browser/ui/views/tabs/tab.cc
|
||||
@@ -1161,9 +1161,7 @@ void Tab::UpdateIconVisibility() {
|
||||
// left that needs to be considered.
|
||||
const int close_button_width = GetLayoutConstant(TAB_CLOSE_BUTTON_SIZE) +
|
||||
GetLayoutConstant(TAB_AFTER_TITLE_PADDING);
|
||||
- const bool large_enough_for_close_button =
|
||||
- available_width >= (touch_ui ? kTouchMinimumContentsWidthForCloseButtons
|
||||
- : kMinimumContentsWidthForCloseButtons);
|
||||
+ const bool large_enough_for_close_button = mouse_hovered_;
|
||||
|
||||
if (IsActive()) {
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
@@ -1209,6 +1207,10 @@ void Tab::UpdateIconVisibility() {
|
||||
large_enough_for_close_button;
|
||||
if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-tab-close-buttons"))
|
||||
showing_close_button_ = false;
|
||||
+
|
||||
+ if (closing_) {
|
||||
+ showing_close_button_ = false;
|
||||
+ }
|
||||
if (showing_close_button_) {
|
||||
available_width -= close_button_width;
|
||||
}
|
||||
--- a/chrome/browser/ui/views/tabs/tab_group_highlight.cc
|
||||
+++ b/chrome/browser/ui/views/tabs/tab_group_highlight.cc
|
||||
@@ -53,27 +53,8 @@ SkPath TabGroupHighlight::GetPath() cons
|
||||
// which is a well-scoped interaction. A dragging group doesn't nestle in with
|
||||
// the tabs around it, so there are no special cases needed when determining
|
||||
// its shape.
|
||||
- const int corner_radius = TabStyle::Get()->GetBottomCornerRadius();
|
||||
- const int top = GetLayoutConstant(TAB_STRIP_PADDING);
|
||||
|
||||
SkPath path;
|
||||
- path.moveTo(0, bounds().height());
|
||||
- path.arcTo(corner_radius, corner_radius, 0, SkPath::kSmall_ArcSize,
|
||||
- SkPathDirection::kCCW, corner_radius,
|
||||
- bounds().height() - corner_radius);
|
||||
- path.lineTo(corner_radius, top + corner_radius);
|
||||
- path.arcTo(corner_radius, corner_radius, 0, SkPath::kSmall_ArcSize,
|
||||
- SkPathDirection::kCW, 2 * corner_radius, top);
|
||||
- path.lineTo(bounds().width() - 2 * corner_radius, top);
|
||||
- path.arcTo(corner_radius, corner_radius, 0, SkPath::kSmall_ArcSize,
|
||||
- SkPathDirection::kCW, bounds().width() - corner_radius,
|
||||
- top + corner_radius);
|
||||
- path.lineTo(bounds().width() - corner_radius,
|
||||
- bounds().height() - corner_radius);
|
||||
- path.arcTo(corner_radius, corner_radius, 0, SkPath::kSmall_ArcSize,
|
||||
- SkPathDirection::kCCW, bounds().width(), bounds().height());
|
||||
- path.close();
|
||||
-
|
||||
return path;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
--- a/chrome/browser/ui/views/profiles/avatar_toolbar_button_delegate.cc
|
||||
+++ b/chrome/browser/ui/views/profiles/avatar_toolbar_button_delegate.cc
|
||||
@@ -1753,7 +1753,7 @@ AvatarToolbarButtonDelegate::GetTextAndC
|
||||
break;
|
||||
}
|
||||
case ButtonState::kNormal:
|
||||
- color = color_provider->GetColor(kColorAvatarButtonHighlightNormal);
|
||||
+ color = std::nullopt;
|
||||
break;
|
||||
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
|
||||
case ButtonState::kHistorySyncOptin: {
|
||||
@@ -1989,7 +1989,6 @@ ui::ImageModel AvatarToolbarButtonDelega
|
||||
bool AvatarToolbarButtonDelegate::ShouldPaintBorder() const {
|
||||
switch (state_manager_->GetButtonActiveState()) {
|
||||
case ButtonState::kGuestSession:
|
||||
- return true;
|
||||
case ButtonState::kShowIdentityName:
|
||||
case ButtonState::kNormal:
|
||||
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
|
||||
--- a/chrome/browser/profiles/profile_avatar_icon_util.cc
|
||||
+++ b/chrome/browser/profiles/profile_avatar_icon_util.cc
|
||||
@@ -436,7 +436,7 @@ ui::ImageModel GetGuestAvatar(int size)
|
||||
if (base::FeatureList::IsEnabled(switches::kEnableImprovedGuestProfileMenu)) {
|
||||
// Guest profiles generally use the default theme, no need to go through the
|
||||
// `ThemeService`.
|
||||
- color_id = ui::kColorSysPrimary;
|
||||
+ color_id = ui::kColorMenuIcon;
|
||||
vector_icon = &kAccountBoxIcon;
|
||||
}
|
||||
return ui::ImageModel::FromVectorIcon(*vector_icon, color_id, size);
|
||||
@@ -31,3 +31,25 @@
|
||||
|
||||
SkPath path;
|
||||
path.addRoundRect(gfx::RectToSkRect(rect), radii, radii);
|
||||
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
@@ -1036,7 +1036,7 @@ void ToolbarView::LayoutCommon() {
|
||||
views::ManualLayoutUtil(layout_manager_)
|
||||
.SetViewHidden(toolbar_divider_, !extensions_container_->GetVisible());
|
||||
const SkColor toolbar_extension_separator_color =
|
||||
- GetColorProvider()->GetColor(kColorToolbarExtensionSeparatorEnabled);
|
||||
+ GetColorProvider()->GetColor(kColorTabDividerFrameActive);
|
||||
toolbar_divider_->SetBackground(views::CreateRoundedRectBackground(
|
||||
toolbar_extension_separator_color,
|
||||
GetLayoutConstant(TOOLBAR_DIVIDER_CORNER_RADIUS)));
|
||||
--- a/chrome/browser/ui/views/toolbar/pinned_toolbar_actions_container.cc
|
||||
+++ b/chrome/browser/ui/views/toolbar/pinned_toolbar_actions_container.cc
|
||||
@@ -269,7 +269,7 @@ void PinnedToolbarActionsContainer::Upda
|
||||
|
||||
void PinnedToolbarActionsContainer::OnThemeChanged() {
|
||||
const SkColor toolbar_divider_color =
|
||||
- GetColorProvider()->GetColor(kColorToolbarExtensionSeparatorEnabled);
|
||||
+ GetColorProvider()->GetColor(kColorTabDividerFrameActive);
|
||||
toolbar_divider_->SetBackground(views::CreateRoundedRectBackground(
|
||||
toolbar_divider_color, GetLayoutConstant(TOOLBAR_DIVIDER_CORNER_RADIUS)));
|
||||
ToolbarIconContainerView::OnThemeChanged();
|
||||
@@ -0,0 +1,48 @@
|
||||
--- a/chrome/browser/ui/views/frame/browser_view.cc
|
||||
+++ b/chrome/browser/ui/views/frame/browser_view.cc
|
||||
@@ -561,15 +561,7 @@ class ContentsSeparator : public views::
|
||||
METADATA_HEADER(ContentsSeparator, views::View)
|
||||
|
||||
public:
|
||||
- ContentsSeparator() {
|
||||
- SetBackground(
|
||||
- views::CreateSolidBackground(kColorToolbarContentAreaSeparator));
|
||||
-
|
||||
- // BrowserViewLayout will respect either the height or width of this,
|
||||
- // depending on orientation, not simultaneously both.
|
||||
- SetPreferredSize(
|
||||
- gfx::Size(views::Separator::kThickness, views::Separator::kThickness));
|
||||
- }
|
||||
+ ContentsSeparator() {}
|
||||
};
|
||||
|
||||
BEGIN_METADATA(ContentsSeparator)
|
||||
@@ -833,8 +825,7 @@ class BrowserViewLayoutDelegateImpl : pu
|
||||
// will enable BrowserViewLayout to hide the contents separator on its own
|
||||
// using the same logic used by normal BrowserViews.
|
||||
// The separator should not be shown when in split view.
|
||||
- return !browser_view_->browser()->app_controller() &&
|
||||
- !browser_view_->IsInSplitView();
|
||||
+ return false;
|
||||
}
|
||||
|
||||
bool IsInSplitView() const override { return browser_view_->IsInSplitView(); }
|
||||
--- a/chrome/browser/ui/views/frame/top_container_background.cc
|
||||
+++ b/chrome/browser/ui/views/frame/top_container_background.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "chrome/browser/themes/theme_properties.h"
|
||||
#include "chrome/browser/ui/color/chrome_color_id.h"
|
||||
+#include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
|
||||
#include "chrome/browser/ui/views/frame/browser_view.h"
|
||||
#include "chrome/browser/ui/views/tabs/tab_strip.h"
|
||||
#include "chrome/grit/theme_resources.h"
|
||||
@@ -68,6 +69,7 @@ void TopContainerBackground::PaintBackgr
|
||||
const BrowserView* browser_view) {
|
||||
bool painted = PaintThemeCustomImage(canvas, view, browser_view);
|
||||
if (!painted) {
|
||||
- canvas->DrawColor(view->GetColorProvider()->GetColor(kColorToolbar));
|
||||
+ canvas->DrawColor(browser_view->frame()->GetFrameView()->GetFrameColor(
|
||||
+ BrowserFrameActiveState::kUseCurrent));
|
||||
}
|
||||
}
|
||||
@@ -144,8 +144,11 @@ helium/core/hide-extensions-via-toolbar-prefs.patch
|
||||
helium/core/clean-context-menu.patch
|
||||
helium/core/split-view.patch
|
||||
helium/core/fix-tab-sync-unreached-error.patch
|
||||
helium/core/add-update-channels.patch
|
||||
helium/core/flags-setup.patch
|
||||
helium/core/add-low-power-framerate-flag.patch
|
||||
helium/core/add-update-channel-flag.patch
|
||||
helium/core/add-updater-preference.patch
|
||||
helium/core/add-disable-ech-flag.patch
|
||||
|
||||
helium/settings/move-search-suggest.patch
|
||||
helium/settings/remove-autofill.patch
|
||||
@@ -156,6 +159,7 @@ helium/settings/about-page-tweaks.patch
|
||||
helium/settings/remove-translate-section.patch
|
||||
helium/settings/remove-safety-hub-entry-points.patch
|
||||
helium/settings/reenable-update-status.patch
|
||||
helium/settings/privacy-page-tweaks.patch
|
||||
|
||||
helium/hop/setup.patch
|
||||
helium/hop/disable-password-manager.patch
|
||||
@@ -165,25 +169,25 @@ helium/ui/update-cr-components.patch
|
||||
helium/ui/always-use-better-ntp.patch
|
||||
helium/ui/clean-new-tab-page.patch
|
||||
helium/ui/remove-toolbar-corners.patch
|
||||
helium/ui/location-bar-style.patch
|
||||
helium/ui/location-bar.patch
|
||||
helium/ui/layout-constants.patch
|
||||
helium/ui/tab-style.patch
|
||||
helium/ui/tabs.patch
|
||||
helium/ui/tab-strip-controls.patch
|
||||
helium/ui/toolbar-style.patch
|
||||
helium/ui/omnibox-style.patch
|
||||
helium/ui/toolbar.patch
|
||||
helium/ui/omnibox.patch
|
||||
helium/ui/app-menu-style.patch
|
||||
helium/ui/fix-customize-side-panel.patch
|
||||
helium/ui/adjust-immersive-padding.patch
|
||||
helium/ui/adjust-side-panel-padding.patch
|
||||
helium/ui/narrow-layout-provider.patch
|
||||
helium/ui/immersive-padding.patch
|
||||
helium/ui/side-panel.patch
|
||||
helium/ui/layout-provider.patch
|
||||
helium/ui/app-menu-model.patch
|
||||
helium/ui/remove-dead-toolbar-actions.patch
|
||||
helium/ui/remove-dead-profile-actions.patch
|
||||
helium/ui/clean-up-installed-extension-bubble.patch
|
||||
helium/ui/adjust-selected-keyword-view.patch
|
||||
helium/ui/selected-keyword-view.patch
|
||||
helium/ui/bookmark-button-bg-fix.patch
|
||||
helium/ui/restyle-ntp-tiles.patch
|
||||
helium/ui/restyle-sidepanels.patch
|
||||
helium/ui/side-panel-webui.patch
|
||||
helium/ui/helium-logo-icons.patch
|
||||
helium/ui/settings-page-icons.patch
|
||||
helium/ui/square-ntp-monograms.patch
|
||||
@@ -203,3 +207,6 @@ helium/ui/reduce-text-button-height.patch
|
||||
helium/ui/fix-omnibox-tabs-icon.patch
|
||||
helium/ui/smaller-window-grab-handle.patch
|
||||
helium/ui/fix-pwa-toolbar.patch
|
||||
helium/ui/top-container.patch
|
||||
helium/ui/toolbar-avatar-button.patch
|
||||
helium/ui/status-bubble.patch
|
||||
|
||||
|
After Width: | Height: | Size: 99 KiB |
|
After Width: | Height: | Size: 357 KiB |
|
After Width: | Height: | Size: 324 KiB |
|
After Width: | Height: | Size: 132 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 617 B After Width: | Height: | Size: 600 B |
@@ -1 +1 @@
|
||||
<svg width="256" height="256" viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M256 79.7288C256 76.6897 256.001 73.6504 255.983 70.611C255.967 68.0507 255.938 65.491 255.868 62.932C255.718 57.3544 255.389 51.7289 254.397 46.2134C253.391 40.6184 251.748 35.4111 249.159 30.3275C246.614 25.3309 243.29 20.7586 239.323 16.7947C235.357 12.8307 230.784 9.50832 225.785 6.96479C220.696 4.37529 215.483 2.73304 209.882 1.72737C204.366 0.736929 198.739 0.408542 193.161 0.257863C190.601 0.188582 188.04 0.159378 185.478 0.143533C182.437 0.124893 179.396 0.126446 176.355 0.126446L141.048 0H114.64L79.9568 0.126446C76.91 0.126446 73.8632 0.124893 70.8164 0.143533C68.2496 0.159378 65.684 0.188582 63.1181 0.257863C57.5275 0.408542 51.8878 0.73724 46.3586 1.72893C40.75 2.73428 35.5294 4.37591 30.4336 6.96355C25.4246 9.50738 20.8412 12.8301 16.867 16.7947C12.8934 20.7583 9.56265 25.3296 7.01292 30.3253C4.4169 35.4114 2.77093 40.6218 1.76247 46.2199C0.769548 51.7333 0.44054 57.3568 0.289241 62.932C0.22027 65.4913 0.190445 68.051 0.174911 70.611C0.156271 73.6507 0 77.4264 0 80.4657L0.000932032 114.668L0 141.359L0.157824 176.288C0.157824 179.331 0.156581 182.375 0.174911 185.418C0.190445 187.982 0.22027 190.545 0.289551 193.108C0.44054 198.693 0.770169 204.326 1.76403 209.849C2.77217 215.451 4.41783 220.666 7.01168 225.756C9.56172 230.76 12.8931 235.338 16.867 239.308C20.8409 243.277 25.423 246.604 30.4312 249.151C35.53 251.744 40.7531 253.389 46.3652 254.396C51.8918 255.388 57.5297 255.717 63.1181 255.867C65.684 255.937 68.2499 255.966 70.8167 255.982C73.8635 256 76.91 255.999 79.9568 255.999L114.953 256H141.427L176.355 255.999C179.396 255.999 182.437 256 185.478 255.982C188.04 255.966 190.601 255.937 193.161 255.867C198.741 255.716 204.37 255.387 209.889 254.394C215.486 253.388 220.697 251.744 225.783 249.152C230.782 246.605 235.357 243.278 239.323 239.308C243.289 235.339 246.613 230.761 249.158 225.759C251.749 220.666 253.392 215.449 254.398 209.843C255.389 204.322 255.718 198.69 255.869 193.108C255.938 190.545 255.967 187.982 255.983 185.418C256.002 182.375 256 179.331 256 176.288C256 176.288 255.998 141.975 255.998 141.359V114.64C255.998 114.185 256 79.7288 256 79.7288Z" fill="#5566B1"/><path d="M122.494 51.4321C122.494 48.6035 124.787 46.3105 127.615 46.3105C130.444 46.3105 132.737 48.6035 132.737 51.4321V203.797C132.737 206.625 130.444 208.918 127.615 208.918C124.787 208.918 122.494 206.625 122.494 203.797V51.4321Z" fill="white"/><path d="M56.1719 63.3416C54.1719 61.3415 54.1719 58.0987 56.1719 56.0987C58.172 54.0986 61.4148 54.0986 63.4148 56.0987L199.899 192.582C201.899 194.582 201.899 197.825 199.899 199.825C197.899 201.825 194.656 201.825 192.656 199.825L56.1719 63.3416Z" fill="white"/><path d="M192.655 56.0977C194.655 54.0976 197.898 54.0976 199.898 56.0977C201.898 58.0978 201.898 61.3405 199.898 63.3406L63.4148 199.825C61.4147 201.825 58.172 201.825 56.1719 199.825C54.1718 197.824 54.1718 194.582 56.1719 192.582L192.655 56.0977Z" fill="white"/><path d="M204.182 122.876C207.01 122.876 209.303 125.169 209.303 127.998C209.303 130.826 207.01 133.119 204.182 133.119H51.8168C48.9883 133.119 46.6953 130.826 46.6953 127.998C46.6953 125.169 48.9883 122.876 51.8168 122.876H204.182Z" fill="white"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 256 256"><g clip-path="url(#a)"><path fill="url(#b)" d="M84.93 0h86.14c29.53 0 40.24 3.07 51.04 8.85a60.2 60.2 0 0 1 25.04 25.04c5.78 10.8 8.85 21.5 8.85 51.04v86.14c0 29.53-3.07 40.24-8.85 51.04a60.2 60.2 0 0 1-25.04 25.04c-10.8 5.78-21.5 8.85-51.04 8.85H84.93c-29.53 0-40.24-3.07-51.04-8.85a60.2 60.2 0 0 1-25.04-25.04C3.07 211.3 0 200.6 0 171.07V84.93C0 55.4 3.07 44.69 8.85 33.89A60.2 60.2 0 0 1 33.89 8.85C44.7 3.07 55.4 0 84.93 0Z"/><path fill="#fff" d="M133.38 47.5a5.5 5.5 0 1 0-11.01 0v160.24a5.5 5.5 0 1 0 11.01 0V47.51Z"/><path fill="#fff" d="M213.5 127.88a5.5 5.5 0 0 1-5.5 5.5H48.25a5.5 5.5 0 1 1 0-11.01h159.73a5.5 5.5 0 0 1 5.51 5.5Z"/><path fill="#fff" d="M52.45 52.07c2.1-2.1 5.5-2.1 7.6 0l143.32 143.74a5.4 5.4 0 0 1 0 7.63 5.37 5.37 0 0 1-7.59.01l-.01-.01L52.45 59.7a5.4 5.4 0 0 1 0-7.63Z"/><path fill="#fff" d="M203.38 52.07a5.4 5.4 0 0 1 0 7.63L60.06 203.44a5.37 5.37 0 0 1-7.6 0 5.4 5.4 0 0 1 0-7.63L195.76 52.07c2.1-2.1 5.5-2.1 7.6 0Z"/></g><defs><linearGradient id="b" x1="128" x2="128" y1="41.25" y2="256" gradientUnits="userSpaceOnUse"><stop stop-color="#152671"/><stop offset="1" stop-color="#5669BD"/></linearGradient><clipPath id="a"><path fill="#fff" d="M0 0h256v256H0z"/></clipPath></defs></svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1009 B |
@@ -3,97 +3,66 @@
|
||||
// the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||
|
||||
CANVAS_DIMENSIONS, 256,
|
||||
MOVE_TO, 256, 79.73f,
|
||||
CUBIC_TO, 256, 76.69f, 256, 73.65f, 255.98f, 70.61f,
|
||||
CUBIC_TO, 255.97f, 68.05f, 255.94f, 65.49f, 255.87f, 62.93f,
|
||||
CUBIC_TO, 255.72f, 57.35f, 255.39f, 51.73f, 254.4f, 46.21f,
|
||||
CUBIC_TO, 253.39f, 40.62f, 251.75f, 35.41f, 249.16f, 30.33f,
|
||||
CUBIC_TO, 246.61f, 25.33f, 243.29f, 20.76f, 239.32f, 16.79f,
|
||||
CUBIC_TO, 235.36f, 12.83f, 230.78f, 9.51f, 225.79f, 6.96f,
|
||||
CUBIC_TO, 220.7f, 4.38f, 215.48f, 2.73f, 209.88f, 1.73f,
|
||||
CUBIC_TO, 204.37f, 0.74f, 198.74f, 0.41f, 193.16f, 0.26f,
|
||||
CUBIC_TO, 190.6f, 0.19f, 188.04f, 0.16f, 185.48f, 0.14f,
|
||||
CUBIC_TO, 182.44f, 0.12f, 179.4f, 0.13f, 176.36f, 0.13f,
|
||||
LINE_TO, 141.05f, 0,
|
||||
H_LINE_TO, 114.64f,
|
||||
LINE_TO, 79.96f, 0.13f,
|
||||
CUBIC_TO, 76.91f, 0.13f, 73.86f, 0.12f, 70.82f, 0.14f,
|
||||
CUBIC_TO, 68.25f, 0.16f, 65.68f, 0.19f, 63.12f, 0.26f,
|
||||
CUBIC_TO, 57.53f, 0.41f, 51.89f, 0.74f, 46.36f, 1.73f,
|
||||
CUBIC_TO, 40.75f, 2.73f, 35.53f, 4.38f, 30.43f, 6.96f,
|
||||
CUBIC_TO, 25.42f, 9.51f, 20.84f, 12.83f, 16.87f, 16.79f,
|
||||
CUBIC_TO, 12.89f, 20.76f, 9.56f, 25.33f, 7.01f, 30.33f,
|
||||
CUBIC_TO, 4.42f, 35.41f, 2.77f, 40.62f, 1.76f, 46.22f,
|
||||
CUBIC_TO, 0.77f, 51.73f, 0.44f, 57.36f, 0.29f, 62.93f,
|
||||
CUBIC_TO, 0.22f, 65.49f, 0.19f, 68.05f, 0.17f, 70.61f,
|
||||
CUBIC_TO, 0.16f, 73.65f, 0, 77.43f, 0, 80.47f,
|
||||
LINE_TO, 0, 114.67f,
|
||||
LINE_TO, 0, 141.36f,
|
||||
LINE_TO, 0.16f, 176.29f,
|
||||
CUBIC_TO, 0.16f, 179.33f, 0.16f, 182.38f, 0.17f, 185.42f,
|
||||
CUBIC_TO, 0.19f, 187.98f, 0.22f, 190.55f, 0.29f, 193.11f,
|
||||
CUBIC_TO, 0.44f, 198.69f, 0.77f, 204.33f, 1.76f, 209.85f,
|
||||
CUBIC_TO, 2.77f, 215.45f, 4.42f, 220.67f, 7.01f, 225.76f,
|
||||
CUBIC_TO, 9.56f, 230.76f, 12.89f, 235.34f, 16.87f, 239.31f,
|
||||
CUBIC_TO, 20.84f, 243.28f, 25.42f, 246.6f, 30.43f, 249.15f,
|
||||
CUBIC_TO, 35.53f, 251.74f, 40.75f, 253.39f, 46.37f, 254.4f,
|
||||
CUBIC_TO, 51.89f, 255.39f, 57.53f, 255.72f, 63.12f, 255.87f,
|
||||
CUBIC_TO, 65.68f, 255.94f, 68.25f, 255.97f, 70.82f, 255.98f,
|
||||
CUBIC_TO, 73.86f, 256, 76.91f, 256, 79.96f, 256,
|
||||
LINE_TO, 114.95f, 256,
|
||||
H_LINE_TO, 141.43f,
|
||||
LINE_TO, 176.36f, 256,
|
||||
CUBIC_TO, 179.4f, 256, 182.44f, 256, 185.48f, 255.98f,
|
||||
CUBIC_TO, 188.04f, 255.97f, 190.6f, 255.94f, 193.16f, 255.87f,
|
||||
CUBIC_TO, 198.74f, 255.72f, 204.37f, 255.39f, 209.89f, 254.39f,
|
||||
CUBIC_TO, 215.49f, 253.39f, 220.7f, 251.74f, 225.78f, 249.15f,
|
||||
CUBIC_TO, 230.78f, 246.61f, 235.36f, 243.28f, 239.32f, 239.31f,
|
||||
CUBIC_TO, 243.29f, 235.34f, 246.61f, 230.76f, 249.16f, 225.76f,
|
||||
CUBIC_TO, 251.75f, 220.67f, 253.39f, 215.45f, 254.4f, 209.84f,
|
||||
CUBIC_TO, 255.39f, 204.32f, 255.72f, 198.69f, 255.87f, 193.11f,
|
||||
CUBIC_TO, 255.94f, 190.55f, 255.97f, 187.98f, 255.98f, 185.42f,
|
||||
CUBIC_TO, 256, 182.38f, 256, 179.33f, 256, 176.29f,
|
||||
CUBIC_TO, 256, 176.29f, 256, 141.98f, 256, 141.36f,
|
||||
V_LINE_TO, 114.64f,
|
||||
CUBIC_TO, 256, 114.19f, 256, 79.73f, 256, 79.73f,
|
||||
FILL_RULE_NONZERO,
|
||||
PATH_COLOR_ARGB, 0xFF, 0x56, 0x69, 0xBD,
|
||||
MOVE_TO, 84.93f, 0,
|
||||
R_H_LINE_TO, 86.14f,
|
||||
R_CUBIC_TO, 29.53f, 0, 40.24f, 3.07f, 51.04f, 8.85f,
|
||||
R_ARC_TO, 60.2f, 60.2f, 0, 0, 1, 25.04f, 25.04f,
|
||||
R_CUBIC_TO, 5.78f, 10.8f, 8.85f, 21.5f, 8.85f, 51.04f,
|
||||
R_V_LINE_TO, 86.14f,
|
||||
R_CUBIC_TO, 0, 29.53f, -3.07f, 40.24f, -8.85f, 51.04f,
|
||||
R_ARC_TO, 60.2f, 60.2f, 0, 0, 1, -25.04f, 25.04f,
|
||||
R_CUBIC_TO, -10.8f, 5.78f, -21.5f, 8.85f, -51.04f, 8.85f,
|
||||
H_LINE_TO, 84.93f,
|
||||
R_CUBIC_TO, -29.53f, 0, -40.24f, -3.07f, -51.04f, -8.85f,
|
||||
R_ARC_TO, 60.2f, 60.2f, 0, 0, 1, -25.04f, -25.04f,
|
||||
CUBIC_TO, 3.07f, 211.3f, 0, 200.6f, 0, 171.07f,
|
||||
V_LINE_TO, 84.93f,
|
||||
CUBIC_TO, 0, 55.4f, 3.07f, 44.69f, 8.85f, 33.89f,
|
||||
ARC_TO, 60.2f, 60.2f, 0, 0, 1, 33.89f, 8.85f,
|
||||
CUBIC_TO, 44.7f, 3.07f, 55.4f, 0, 84.93f, 0,
|
||||
CLOSE,
|
||||
NEW_PATH,
|
||||
FILL_RULE_NONZERO,
|
||||
MOVE_TO, 122.49f, 51.43f,
|
||||
CUBIC_TO, 122.49f, 48.6f, 124.79f, 46.31f, 127.62f, 46.31f,
|
||||
CUBIC_TO, 130.44f, 46.31f, 132.74f, 48.6f, 132.74f, 51.43f,
|
||||
V_LINE_TO, 203.8f,
|
||||
CUBIC_TO, 132.74f, 206.63f, 130.44f, 208.92f, 127.62f, 208.92f,
|
||||
CUBIC_TO, 124.79f, 208.92f, 122.49f, 206.63f, 122.49f, 203.8f,
|
||||
V_LINE_TO, 51.43f,
|
||||
PATH_COLOR_ARGB, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
MOVE_TO, 133.38f, 47.5f,
|
||||
R_ARC_TO, 5.5f, 5.5f, 0, 1, 0, -11.01f, 0,
|
||||
R_V_LINE_TO, 160.24f,
|
||||
R_ARC_TO, 5.5f, 5.5f, 0, 1, 0, 11.01f, 0,
|
||||
V_LINE_TO, 47.51f,
|
||||
CLOSE,
|
||||
NEW_PATH,
|
||||
FILL_RULE_NONZERO,
|
||||
MOVE_TO, 56.17f, 63.34f,
|
||||
CUBIC_TO, 54.17f, 61.34f, 54.17f, 58.1f, 56.17f, 56.1f,
|
||||
CUBIC_TO, 58.17f, 54.1f, 61.41f, 54.1f, 63.41f, 56.1f,
|
||||
LINE_TO, 199.9f, 192.58f,
|
||||
CUBIC_TO, 201.9f, 194.58f, 201.9f, 197.83f, 199.9f, 199.83f,
|
||||
CUBIC_TO, 197.9f, 201.83f, 194.66f, 201.83f, 192.66f, 199.83f,
|
||||
LINE_TO, 56.17f, 63.34f,
|
||||
PATH_COLOR_ARGB, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
MOVE_TO, 213.5f, 127.88f,
|
||||
R_ARC_TO, 5.5f, 5.5f, 0, 0, 1, -5.5f, 5.5f,
|
||||
H_LINE_TO, 48.25f,
|
||||
R_ARC_TO, 5.5f, 5.5f, 0, 1, 1, 0, -11.01f,
|
||||
R_H_LINE_TO, 159.73f,
|
||||
R_ARC_TO, 5.5f, 5.5f, 0, 0, 1, 5.51f, 5.5f,
|
||||
CLOSE,
|
||||
NEW_PATH,
|
||||
FILL_RULE_NONZERO,
|
||||
MOVE_TO, 192.66f, 56.1f,
|
||||
CUBIC_TO, 194.66f, 54.1f, 197.9f, 54.1f, 199.9f, 56.1f,
|
||||
CUBIC_TO, 201.9f, 58.1f, 201.9f, 61.34f, 199.9f, 63.34f,
|
||||
LINE_TO, 63.41f, 199.83f,
|
||||
CUBIC_TO, 61.41f, 201.83f, 58.17f, 201.83f, 56.17f, 199.83f,
|
||||
CUBIC_TO, 54.17f, 197.82f, 54.17f, 194.58f, 56.17f, 192.58f,
|
||||
LINE_TO, 192.66f, 56.1f,
|
||||
PATH_COLOR_ARGB, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
MOVE_TO, 52.45f, 52.07f,
|
||||
R_CUBIC_TO, 2.1f, -2.1f, 5.5f, -2.1f, 7.6f, 0,
|
||||
R_LINE_TO, 143.32f, 143.74f,
|
||||
R_ARC_TO, 5.4f, 5.4f, 0, 0, 1, 0, 7.63f,
|
||||
R_ARC_TO, 5.37f, 5.37f, 0, 0, 1, -7.59f, 0.01f,
|
||||
R_LINE_TO, -0.01f, -0.01f,
|
||||
LINE_TO, 52.45f, 59.7f,
|
||||
R_ARC_TO, 5.4f, 5.4f, 0, 0, 1, 0, -7.63f,
|
||||
CLOSE,
|
||||
NEW_PATH,
|
||||
FILL_RULE_NONZERO,
|
||||
MOVE_TO, 204.18f, 122.88f,
|
||||
CUBIC_TO, 207.01f, 122.88f, 209.3f, 125.17f, 209.3f, 128,
|
||||
CUBIC_TO, 209.3f, 130.83f, 207.01f, 133.12f, 204.18f, 133.12f,
|
||||
H_LINE_TO, 51.82f,
|
||||
CUBIC_TO, 48.99f, 133.12f, 46.7f, 130.83f, 46.7f, 128,
|
||||
CUBIC_TO, 46.7f, 125.17f, 48.99f, 122.88f, 51.82f, 122.88f,
|
||||
H_LINE_TO, 204.18f,
|
||||
CLOSE
|
||||
PATH_COLOR_ARGB, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
MOVE_TO, 203.38f, 52.07f,
|
||||
R_ARC_TO, 5.4f, 5.4f, 0, 0, 1, 0, 7.63f,
|
||||
LINE_TO, 60.06f, 203.44f,
|
||||
R_ARC_TO, 5.37f, 5.37f, 0, 0, 1, -7.6f, 0,
|
||||
R_ARC_TO, 5.4f, 5.4f, 0, 0, 1, 0, -7.63f,
|
||||
LINE_TO, 195.76f, 52.07f,
|
||||
R_CUBIC_TO, 2.1f, -2.1f, 5.5f, -2.1f, 7.6f, 0,
|
||||
CLOSE,
|
||||
NEW_PATH
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# input size output
|
||||
branding/app_icon/raw.png 256 generated/product_icon/256x256.png
|
||||
branding/app_icon/raw.png 128 generated/product_icon/128x128.png
|
||||
branding/app_icon/raw.png 64 generated/product_icon/64x64.png
|
||||
branding/app_icon/raw.png 48 generated/product_icon/48x48.png
|
||||
branding/app_icon/raw.png 32 generated/product_icon/32x32.png
|
||||
branding/app_icon/raw.png 24 generated/product_icon/24x24.png
|
||||
branding/app_icon/raw.png 16 generated/product_icon/16x16.png
|
||||
@@ -32,31 +32,32 @@ branding/product_logo_white_200.png components/resources/default_200_percent/chr
|
||||
|
||||
branding/product_logo_22_mono.png chrome/app/theme/chromium/product_logo_22_mono.png
|
||||
|
||||
branding/product_icon/16x16.png chrome/app/theme/chromium/product_logo_16.png
|
||||
branding/product_icon/24x24.png chrome/app/theme/chromium/product_logo_24.png
|
||||
branding/product_icon/48x48.png chrome/app/theme/chromium/product_logo_48.png
|
||||
branding/product_icon/64x64.png chrome/app/theme/chromium/product_logo_64.png
|
||||
branding/product_icon/128x128.png chrome/app/theme/chromium/product_logo_128.png
|
||||
branding/product_icon/256x256.png chrome/app/theme/chromium/product_logo_256.png
|
||||
|
||||
branding/product_icon/16x16.png chrome/app/theme/default_100_percent/chromium/product_logo_16.png
|
||||
branding/product_icon/32x32.png chrome/app/theme/default_100_percent/chromium/product_logo_32.png
|
||||
|
||||
branding/product_icon/32x32.png chrome/app/theme/default_200_percent/chromium/product_logo_16.png
|
||||
branding/product_icon/64x64.png chrome/app/theme/default_200_percent/chromium/product_logo_32.png
|
||||
|
||||
branding/product_icon/24x24.png chrome/app/theme/chromium/linux/product_logo_24.png
|
||||
branding/product_icon/48x48.png chrome/app/theme/chromium/linux/product_logo_48.png
|
||||
branding/product_icon/64x64.png chrome/app/theme/chromium/linux/product_logo_64.png
|
||||
branding/product_icon/128x128.png chrome/app/theme/chromium/linux/product_logo_128.png
|
||||
branding/product_icon/256x256.png chrome/app/theme/chromium/linux/product_logo_256.png
|
||||
|
||||
branding/product_icon/16x16.png chrome/app/theme/default_100_percent/chromium/linux/product_logo_16.png
|
||||
branding/product_icon/32x32.png chrome/app/theme/default_100_percent/chromium/linux/product_logo_32.png
|
||||
|
||||
branding/product_logo.svg chrome/app/theme/chromium/product_logo.svg
|
||||
|
||||
branding/product_logo.icon chrome/app/vector_icons/browser_logo.icon
|
||||
branding/product_logo.icon components/omnibox/browser/vector_icons/product_chrome_refresh.icon
|
||||
branding/product_logo.icon components/vector_icons/chromium/product.icon
|
||||
branding/product_logo_color.icon components/vector_icons/chromium/product_refresh.icon
|
||||
|
||||
# generated resources
|
||||
generated/product_icon/16x16.png chrome/app/theme/chromium/product_logo_16.png
|
||||
generated/product_icon/24x24.png chrome/app/theme/chromium/product_logo_24.png
|
||||
generated/product_icon/48x48.png chrome/app/theme/chromium/product_logo_48.png
|
||||
generated/product_icon/64x64.png chrome/app/theme/chromium/product_logo_64.png
|
||||
generated/product_icon/128x128.png chrome/app/theme/chromium/product_logo_128.png
|
||||
generated/product_icon/256x256.png chrome/app/theme/chromium/product_logo_256.png
|
||||
|
||||
generated/product_icon/16x16.png chrome/app/theme/default_100_percent/chromium/product_logo_16.png
|
||||
generated/product_icon/32x32.png chrome/app/theme/default_100_percent/chromium/product_logo_32.png
|
||||
|
||||
generated/product_icon/32x32.png chrome/app/theme/default_200_percent/chromium/product_logo_16.png
|
||||
generated/product_icon/64x64.png chrome/app/theme/default_200_percent/chromium/product_logo_32.png
|
||||
|
||||
generated/product_icon/24x24.png chrome/app/theme/chromium/linux/product_logo_24.png
|
||||
generated/product_icon/48x48.png chrome/app/theme/chromium/linux/product_logo_48.png
|
||||
generated/product_icon/64x64.png chrome/app/theme/chromium/linux/product_logo_64.png
|
||||
generated/product_icon/128x128.png chrome/app/theme/chromium/linux/product_logo_128.png
|
||||
generated/product_icon/256x256.png chrome/app/theme/chromium/linux/product_logo_256.png
|
||||
|
||||
generated/product_icon/16x16.png chrome/app/theme/default_100_percent/chromium/linux/product_logo_16.png
|
||||
generated/product_icon/32x32.png chrome/app/theme/default_100_percent/chromium/linux/product_logo_32.png
|
||||
|
||||
@@ -1 +1 @@
|
||||
4
|
||||
14
|
||||
|
||||
@@ -36,6 +36,7 @@ class ExtractorEnum: #pylint: disable=too-few-public-methods
|
||||
|
||||
class SetLogLevel(argparse.Action): #pylint: disable=too-few-public-methods
|
||||
"""Sets logging level based on command line arguments it receives"""
|
||||
|
||||
def __init__(self, option_strings, dest, nargs=None, **kwargs):
|
||||
super().__init__(option_strings, dest, nargs=nargs, **kwargs)
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ def _process_relative_to(unpack_root, relative_to):
|
||||
if not relative_root.is_dir():
|
||||
get_logger().error('Could not find relative_to directory in extracted files: %s',
|
||||
relative_to)
|
||||
raise Exception()
|
||||
raise FileNotFoundError()
|
||||
for src_path in relative_root.iterdir():
|
||||
dest_path = unpack_root / src_path.name
|
||||
if os.path.isdir(dest_path):
|
||||
@@ -94,20 +94,20 @@ def _extract_tar_with_7z(binary, archive_path, output_dir, relative_to):
|
||||
if not relative_to is None and (output_dir / relative_to).exists():
|
||||
get_logger().error('Temporary unpacking directory already exists: %s',
|
||||
output_dir / relative_to)
|
||||
raise Exception()
|
||||
raise FileExistsError()
|
||||
cmd1 = (binary, 'x', str(archive_path), '-so')
|
||||
cmd2 = (binary, 'x', '-si', '-aoa', '-ttar', '-o{}'.format(str(output_dir)))
|
||||
cmd2 = (binary, 'x', '-si', '-snld', '-aoa', '-ttar', f'-o{str(output_dir)}')
|
||||
get_logger().debug('7z command line: %s | %s', ' '.join(cmd1), ' '.join(cmd2))
|
||||
|
||||
proc1 = subprocess.Popen(cmd1, stdout=subprocess.PIPE)
|
||||
proc2 = subprocess.Popen(cmd2, stdin=proc1.stdout, stdout=subprocess.PIPE)
|
||||
proc1 = subprocess.Popen(cmd1, stdout=subprocess.PIPE) #pylint: disable=consider-using-with
|
||||
proc2 = subprocess.Popen(cmd2, stdin=proc1.stdout, stdout=subprocess.PIPE) #pylint: disable=consider-using-with
|
||||
proc1.stdout.close()
|
||||
(stdout_data, stderr_data) = proc2.communicate()
|
||||
if proc2.returncode != 0:
|
||||
get_logger().error('7z commands returned non-zero status: %s', proc2.returncode)
|
||||
get_logger().debug('stdout: %s', stdout_data)
|
||||
get_logger().debug('stderr: %s', stderr_data)
|
||||
raise Exception()
|
||||
raise ChildProcessError()
|
||||
|
||||
_process_relative_to(output_dir, relative_to)
|
||||
|
||||
@@ -120,7 +120,7 @@ def _extract_tar_with_tar(binary, archive_path, output_dir, relative_to):
|
||||
result = subprocess.run(cmd, check=False)
|
||||
if result.returncode != 0:
|
||||
get_logger().error('tar command returned %s', result.returncode)
|
||||
raise Exception()
|
||||
raise ChildProcessError()
|
||||
|
||||
# for gnu tar, the --transform option could be used. but to keep compatibility with
|
||||
# bsdtar on macos, we just do this ourselves
|
||||
@@ -135,7 +135,7 @@ def _extract_tar_with_winrar(binary, archive_path, output_dir, relative_to):
|
||||
result = subprocess.run(cmd, check=False)
|
||||
if result.returncode != 0:
|
||||
get_logger().error('WinRAR command returned %s', result.returncode)
|
||||
raise Exception()
|
||||
raise ChildProcessError()
|
||||
|
||||
_process_relative_to(output_dir, relative_to)
|
||||
|
||||
@@ -145,10 +145,12 @@ def _extract_tar_with_python(archive_path, output_dir, relative_to):
|
||||
|
||||
class NoAppendList(list):
|
||||
"""Hack to workaround memory issues with large tar files"""
|
||||
|
||||
def append(self, obj):
|
||||
pass
|
||||
|
||||
# Simple hack to check if symlinks are supported
|
||||
symlink_supported = False
|
||||
try:
|
||||
os.symlink('', '')
|
||||
except FileNotFoundError:
|
||||
@@ -157,13 +159,12 @@ def _extract_tar_with_python(archive_path, output_dir, relative_to):
|
||||
except OSError:
|
||||
# Symlinks probably not supported
|
||||
get_logger().info('System does not support symlinks. Ignoring them.')
|
||||
symlink_supported = False
|
||||
except BaseException:
|
||||
# Unexpected exception
|
||||
get_logger().exception('Unexpected exception during symlink support check.')
|
||||
raise
|
||||
|
||||
with tarfile.open(str(archive_path), 'r|%s' % archive_path.suffix[1:]) as tar_file_obj:
|
||||
with tarfile.open(str(archive_path), f'r|{archive_path.suffix[1:]}') as tar_file_obj:
|
||||
tar_file_obj.members = NoAppendList()
|
||||
for tarinfo in tar_file_obj:
|
||||
try:
|
||||
@@ -260,21 +261,21 @@ def extract_with_7z(archive_path, output_dir, relative_to, extractors=None):
|
||||
if sevenzip_cmd == USE_REGISTRY:
|
||||
if not get_running_platform() == PlatformEnum.WINDOWS:
|
||||
get_logger().error('"%s" for 7-zip is only available on Windows', sevenzip_cmd)
|
||||
raise Exception()
|
||||
raise EnvironmentError()
|
||||
sevenzip_cmd = str(_find_7z_by_registry())
|
||||
sevenzip_bin = _find_extractor_by_cmd(sevenzip_cmd)
|
||||
|
||||
if not relative_to is None and (output_dir / relative_to).exists():
|
||||
get_logger().error('Temporary unpacking directory already exists: %s',
|
||||
output_dir / relative_to)
|
||||
raise Exception()
|
||||
cmd = (sevenzip_bin, 'x', str(archive_path), '-aoa', '-o{}'.format(str(output_dir)))
|
||||
raise FileExistsError()
|
||||
cmd = (sevenzip_bin, 'x', str(archive_path), '-aoa', f'-o{str(output_dir)}')
|
||||
get_logger().debug('7z command line: %s', ' '.join(cmd))
|
||||
|
||||
result = subprocess.run(cmd, check=False)
|
||||
if result.returncode != 0:
|
||||
get_logger().error('7z command returned %s', result.returncode)
|
||||
raise Exception()
|
||||
raise ChildProcessError()
|
||||
|
||||
_process_relative_to(output_dir, relative_to)
|
||||
|
||||
@@ -298,20 +299,20 @@ def extract_with_winrar(archive_path, output_dir, relative_to, extractors=None):
|
||||
if winrar_cmd == USE_REGISTRY:
|
||||
if not get_running_platform() == PlatformEnum.WINDOWS:
|
||||
get_logger().error('"%s" for WinRAR is only available on Windows', winrar_cmd)
|
||||
raise Exception()
|
||||
raise EnvironmentError()
|
||||
winrar_cmd = str(_find_winrar_by_registry())
|
||||
winrar_bin = _find_extractor_by_cmd(winrar_cmd)
|
||||
|
||||
if not relative_to is None and (output_dir / relative_to).exists():
|
||||
get_logger().error('Temporary unpacking directory already exists: %s',
|
||||
output_dir / relative_to)
|
||||
raise Exception()
|
||||
raise FileExistsError()
|
||||
cmd = (winrar_bin, 'x', '-o+', str(archive_path), str(output_dir))
|
||||
get_logger().debug('WinRAR command line: %s', ' '.join(cmd))
|
||||
|
||||
result = subprocess.run(cmd, check=False)
|
||||
if result.returncode != 0:
|
||||
get_logger().error('WinRAR command returned %s', result.returncode)
|
||||
raise Exception()
|
||||
raise ChildProcessError()
|
||||
|
||||
_process_relative_to(output_dir, relative_to)
|
||||
|
||||
@@ -17,7 +17,7 @@ from shutil import copytree, copy, move
|
||||
from stat import S_IWRITE
|
||||
from subprocess import run
|
||||
|
||||
from _common import add_common_params, get_chromium_version, get_logger
|
||||
from _common import ENCODING, add_common_params, get_chromium_version, get_logger
|
||||
|
||||
# Config file for gclient
|
||||
# Instances of 'src' replaced with UC_OUT, which will be replaced with the output directory
|
||||
@@ -53,7 +53,7 @@ def clone(args): # pylint: disable=too-many-branches, too-many-locals, too-many-
|
||||
ucstaging = args.output / 'uc_staging'
|
||||
dtpath = ucstaging / 'depot_tools'
|
||||
gsuver = '5.30'
|
||||
gsupath = dtpath / 'external_bin' / 'gsutil' / ('gsutil_%s' % gsuver) / 'gsutil'
|
||||
gsupath = dtpath / 'external_bin' / 'gsutil' / f'gsutil_{gsuver}' / 'gsutil'
|
||||
gnpath = ucstaging / 'gn'
|
||||
environ['GCLIENT_FILE'] = str(ucstaging / '.gclient')
|
||||
environ['PATH'] += pathsep + str(dtpath)
|
||||
@@ -88,7 +88,7 @@ def clone(args): # pylint: disable=too-many-branches, too-many-locals, too-many-
|
||||
|
||||
get_logger().info('Cloning depot_tools')
|
||||
dt_commit = re.search(r"depot_tools\.git'\s*\+\s*'@'\s*\+\s*'([^']+)',",
|
||||
Path(args.output / 'DEPS').read_text()).group(1)
|
||||
Path(args.output / 'DEPS').read_text(encoding=ENCODING)).group(1)
|
||||
if not dt_commit:
|
||||
get_logger().error('Unable to obtain commit for depot_tools checkout')
|
||||
sys.exit(1)
|
||||
@@ -108,7 +108,7 @@ def clone(args): # pylint: disable=too-many-branches, too-many-locals, too-many-
|
||||
(dtpath / 'git.bat').write_text('git')
|
||||
# Apply changes to gclient
|
||||
run(['git', 'apply', '--ignore-whitespace'],
|
||||
input=Path(__file__).with_name('depot_tools.patch').read_text().replace(
|
||||
input=Path(__file__).with_name('depot_tools.patch').read_text(encoding=ENCODING).replace(
|
||||
'UC_OUT', str(args.output)).replace('UC_STAGING',
|
||||
str(ucstaging)).replace('GSUVER', gsuver),
|
||||
cwd=dtpath,
|
||||
@@ -123,7 +123,7 @@ def clone(args): # pylint: disable=too-many-branches, too-many-locals, too-many-
|
||||
run(['git', 'remote', 'add', 'origin', 'https://github.com/GoogleCloudPlatform/gsutil'],
|
||||
cwd=gsupath,
|
||||
check=True)
|
||||
run(['git', 'fetch', '--depth=1', 'origin', 'v%s' % gsuver], cwd=gsupath, check=True)
|
||||
run(['git', 'fetch', '--depth=1', 'origin', f'v{gsuver}'], cwd=gsupath, check=True)
|
||||
run(['git', 'reset', '--hard', 'FETCH_HEAD'], cwd=gsupath, check=True)
|
||||
run(['git', 'clean', '-ffdx'], cwd=gsupath, check=True)
|
||||
get_logger().info('Updating gsutil submodules')
|
||||
@@ -142,7 +142,7 @@ def clone(args): # pylint: disable=too-many-branches, too-many-locals, too-many-
|
||||
# gn requires full history to be able to generate last_commit_position.h
|
||||
get_logger().info('Cloning gn')
|
||||
gn_commit = re.search(r"gn_version': 'git_revision:([^']+)',",
|
||||
Path(args.output / 'DEPS').read_text()).group(1)
|
||||
Path(args.output / 'DEPS').read_text(encoding=ENCODING)).group(1)
|
||||
if not gn_commit:
|
||||
get_logger().error('Unable to obtain commit for gn checkout')
|
||||
sys.exit(1)
|
||||
@@ -226,7 +226,7 @@ def clone(args): # pylint: disable=too-many-branches, too-many-locals, too-many-
|
||||
for item in gnpath.iterdir():
|
||||
if not item.is_dir():
|
||||
copy(item, args.output / 'tools' / 'gn')
|
||||
elif item.name != '.git' and item.name != 'out':
|
||||
elif item.name not in ('.git', 'out'):
|
||||
copytree(item, args.output / 'tools' / 'gn' / item.name)
|
||||
move(str(gnpath / 'out' / 'last_commit_position.h'),
|
||||
str(args.output / 'tools' / 'gn' / 'bootstrap'))
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
# Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE.ungoogled_chromium file.
|
||||
|
||||
"""
|
||||
Substitute domain names in the source tree with blockable strings.
|
||||
"""
|
||||
@@ -111,7 +110,7 @@ def _substitute_path(path, regex_iter):
|
||||
except UnicodeDecodeError:
|
||||
continue
|
||||
if not content:
|
||||
raise UnicodeDecodeError('Unable to decode with any encoding: %s' % path)
|
||||
raise UnicodeDecodeError(f'Unable to decode with any encoding: {path}')
|
||||
file_subs = 0
|
||||
for regex_pair in regex_iter:
|
||||
content, sub_count = regex_pair.pattern.subn(regex_pair.replacement, content)
|
||||
@@ -211,16 +210,17 @@ def apply_substitution(regex_path, files_path, source_tree, domainsub_cache):
|
||||
resolved_tree = source_tree.resolve()
|
||||
regex_pairs = DomainRegexList(regex_path).regex_pairs
|
||||
fileindex_content = io.BytesIO()
|
||||
with tarfile.open(str(domainsub_cache), 'w:%s' % domainsub_cache.suffix[1:]) if domainsub_cache else open(os.devnull, 'w') as cache_tar:
|
||||
with tarfile.open(str(domainsub_cache), f'w:{domainsub_cache.suffix[1:]}',
|
||||
compresslevel=1) if domainsub_cache else open(
|
||||
os.devnull, 'w', encoding=ENCODING) as cache_tar:
|
||||
for relative_path in filter(len, files_path.read_text().splitlines()):
|
||||
if _INDEX_HASH_DELIMITER in relative_path:
|
||||
if domainsub_cache:
|
||||
# Cache tar will be incomplete; remove it for convenience
|
||||
cache_tar.close()
|
||||
domainsub_cache.unlink()
|
||||
raise ValueError(
|
||||
'Path "%s" contains the file index hash delimiter "%s"' % relative_path,
|
||||
_INDEX_HASH_DELIMITER)
|
||||
raise ValueError(f'Path "{relative_path}" contains '
|
||||
f'the file index hash delimiter "{_INDEX_HASH_DELIMITER}"')
|
||||
path = resolved_tree / relative_path
|
||||
if not path.exists():
|
||||
get_logger().warning('Skipping non-existant path: %s', path)
|
||||
@@ -234,8 +234,8 @@ def apply_substitution(regex_path, files_path, source_tree, domainsub_cache):
|
||||
get_logger().info('Path has no substitutions: %s', relative_path)
|
||||
continue
|
||||
if domainsub_cache:
|
||||
fileindex_content.write('{}{}{:08x}\n'.format(relative_path, _INDEX_HASH_DELIMITER,
|
||||
crc32_hash).encode(ENCODING))
|
||||
fileindex_content.write(
|
||||
f'{relative_path}{_INDEX_HASH_DELIMITER}{crc32_hash:08x}\n'.encode(ENCODING))
|
||||
orig_tarinfo = tarfile.TarInfo(str(Path(_ORIG_DIR) / relative_path))
|
||||
orig_tarinfo.size = len(orig_content)
|
||||
with io.BytesIO(orig_content) as orig_file:
|
||||
|
||||
@@ -25,6 +25,7 @@ from _extraction import extract_tar_file, extract_with_7z, extract_with_winrar
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).parent / 'third_party'))
|
||||
import schema #pylint: disable=wrong-import-position, wrong-import-order
|
||||
|
||||
sys.path.pop(0)
|
||||
|
||||
# Constants
|
||||
@@ -74,6 +75,7 @@ class DownloadInfo: #pylint: disable=too-few-public-methods
|
||||
})
|
||||
|
||||
class _DownloadsProperties: #pylint: disable=too-few-public-methods
|
||||
|
||||
def __init__(self, section_dict, passthrough_properties, hashes):
|
||||
self._section_dict = section_dict
|
||||
self._passthrough_properties = passthrough_properties
|
||||
@@ -97,7 +99,7 @@ class DownloadInfo: #pylint: disable=too-few-public-methods
|
||||
value = value.split(DownloadInfo.hash_url_delimiter)
|
||||
hashes_dict[hash_name] = value
|
||||
return hashes_dict
|
||||
raise AttributeError('"{}" has no attribute "{}"'.format(type(self).__name__, name))
|
||||
raise AttributeError(f'"{type(self).__name__}" has no attribute "{name}"')
|
||||
|
||||
def _parse_data(self, path):
|
||||
"""
|
||||
@@ -105,6 +107,7 @@ class DownloadInfo: #pylint: disable=too-few-public-methods
|
||||
|
||||
Raises schema.SchemaError if validation fails
|
||||
"""
|
||||
|
||||
def _section_generator(data):
|
||||
for section in data:
|
||||
if section == configparser.DEFAULTSECT:
|
||||
@@ -157,11 +160,12 @@ class DownloadInfo: #pylint: disable=too-few-public-methods
|
||||
return
|
||||
for name in section_names:
|
||||
if name not in self:
|
||||
raise KeyError('"{}" has no section "{}"'.format(type(self).__name__, name))
|
||||
raise KeyError(f'"{type(self).__name__}" has no section "{name}"')
|
||||
|
||||
|
||||
class _UrlRetrieveReportHook: #pylint: disable=too-few-public-methods
|
||||
"""Hook for urllib.request.urlretrieve to log progress information to console"""
|
||||
|
||||
def __init__(self):
|
||||
self._max_len_printed = 0
|
||||
self._last_percentage = None
|
||||
@@ -181,10 +185,10 @@ class _UrlRetrieveReportHook: #pylint: disable=too-few-public-methods
|
||||
return
|
||||
self._last_percentage = percentage
|
||||
print('\r' + ' ' * self._max_len_printed, end='')
|
||||
status_line = 'Progress: {:.1%} of {:,d} B'.format(percentage, total_size)
|
||||
status_line = f'Progress: {percentage:.1%} of {total_size:,d} B'
|
||||
else:
|
||||
downloaded_estimate = block_count * block_size
|
||||
status_line = 'Progress: {:,d} B of unknown size'.format(downloaded_estimate)
|
||||
status_line = f'Progress: {downloaded_estimate:,d} B of unknown size'
|
||||
self._max_len_printed = len(status_line)
|
||||
print('\r' + status_line, end='')
|
||||
|
||||
@@ -259,7 +263,7 @@ def _get_hash_pairs(download_properties, cache_dir):
|
||||
if hash_processor == 'chromium':
|
||||
yield from _chromium_hashes_generator(cache_dir / hash_filename)
|
||||
else:
|
||||
raise ValueError('Unknown hash_url processor: %s' % hash_processor)
|
||||
raise ValueError(f'Unknown hash_url processor: {hash_processor}')
|
||||
else:
|
||||
yield entry_type, entry_value
|
||||
|
||||
|
||||
@@ -57,10 +57,10 @@ def _get_archive_writer(output_path, timestamp=None):
|
||||
timestamp is a file timestamp to use for all files, if set.
|
||||
"""
|
||||
if not output_path.suffixes:
|
||||
raise ValueError('Output name has no suffix: %s' % output_path.name)
|
||||
raise ValueError(f'Output name has no suffix: {output_path.name}')
|
||||
if output_path.suffixes[-1].lower() == '.zip':
|
||||
archive_root = Path(output_path.stem)
|
||||
output_archive = zipfile.ZipFile(str(output_path), 'w', zipfile.ZIP_DEFLATED)
|
||||
output_archive = zipfile.ZipFile(str(output_path), 'w', zipfile.ZIP_DEFLATED) # pylint: disable=consider-using-with
|
||||
zip_date_time = None
|
||||
if timestamp:
|
||||
zip_date_time = datetime.datetime.fromtimestamp(timestamp).timetuple()[:6]
|
||||
@@ -83,17 +83,18 @@ def _get_archive_writer(output_path, timestamp=None):
|
||||
zip_write(str(in_path), str(arc_path))
|
||||
elif '.tar' in output_path.name.lower():
|
||||
if len(output_path.suffixes) >= 2 and output_path.suffixes[-2].lower() == '.tar':
|
||||
tar_mode = 'w:%s' % output_path.suffixes[-1][1:]
|
||||
tar_mode = f'w:{output_path.suffixes[-1][1:]}'
|
||||
archive_root = Path(output_path.with_suffix('').stem)
|
||||
elif output_path.suffixes[-1].lower() == '.tar':
|
||||
tar_mode = 'w'
|
||||
archive_root = Path(output_path.stem)
|
||||
else:
|
||||
raise ValueError('Could not detect tar format for output: %s' % output_path.name)
|
||||
raise ValueError(f'Could not detect tar format for output: {output_path.name}')
|
||||
if timestamp:
|
||||
|
||||
class TarInfoFixedTimestamp(tarfile.TarInfo):
|
||||
"""TarInfo class with predefined constant mtime"""
|
||||
|
||||
@property
|
||||
def mtime(self):
|
||||
"""Return predefined timestamp"""
|
||||
@@ -106,10 +107,13 @@ def _get_archive_writer(output_path, timestamp=None):
|
||||
tarinfo_class = TarInfoFixedTimestamp
|
||||
else:
|
||||
tarinfo_class = tarfile.TarInfo
|
||||
output_archive = tarfile.open(str(output_path), tar_mode, tarinfo=tarinfo_class)
|
||||
add_func = lambda in_path, arc_path: output_archive.add(str(in_path), str(arc_path))
|
||||
output_archive = tarfile.open(str(output_path), tar_mode, tarinfo=tarinfo_class) # pylint: disable=consider-using-with
|
||||
|
||||
def add_func(in_path, arc_path):
|
||||
"""Add files to tar archive"""
|
||||
output_archive.add(str(in_path), str(arc_path))
|
||||
else:
|
||||
raise ValueError('Unknown archive extension with name: %s' % output_path.name)
|
||||
raise ValueError(f'Unknown archive extension with name: {output_path.name}')
|
||||
return output_archive, add_func, archive_root
|
||||
|
||||
|
||||
@@ -147,7 +151,7 @@ def _files_generator_by_args(args):
|
||||
|
||||
def _list_callback(args):
|
||||
"""List files needed to run Chromium."""
|
||||
sys.stdout.writelines('%s\n' % x for x in _files_generator_by_args(args))
|
||||
sys.stdout.writelines(f'{x}\n' for x in _files_generator_by_args(args))
|
||||
|
||||
|
||||
def _archive_callback(args):
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
# Copyright 2025 The Helium Authors
|
||||
# You can use, redistribute, and/or modify this source code under
|
||||
# the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||
"""
|
||||
Generates scaled resources for Helium branding
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
from PIL import Image
|
||||
|
||||
|
||||
def scale_image(input_file, size, output_path):
|
||||
"""
|
||||
Scales the square image to provided size and saves it
|
||||
"""
|
||||
img = Image.open(input_file)
|
||||
img.thumbnail((size, size))
|
||||
|
||||
# make sure output path exists
|
||||
os.makedirs(os.path.dirname(output_path), exist_ok=True)
|
||||
|
||||
img.save(output_path, optimize=True)
|
||||
|
||||
|
||||
def generate_resources(resource_list, resource_dir):
|
||||
"""
|
||||
Parses the resource list and generates resources
|
||||
for each valid line
|
||||
"""
|
||||
with open(resource_list, 'r', encoding='utf-8') as file:
|
||||
for line_number, line in enumerate(file, start=1):
|
||||
line = line.strip()
|
||||
if not line or line.startswith('#'):
|
||||
continue
|
||||
|
||||
line_parts = line.split()
|
||||
|
||||
if len(line_parts) != 3:
|
||||
raise ValueError(f"Line {line_number} in the resource file is invalid.")
|
||||
|
||||
input_file = os.path.join(resource_dir, line_parts[0])
|
||||
size = int(line_parts[1])
|
||||
output_file = os.path.join(resource_dir, line_parts[2])
|
||||
|
||||
scale_image(input_file, size, output_file)
|
||||
print(f"Created {line_parts[2]}")
|
||||
|
||||
|
||||
def main():
|
||||
"""CLI entrypoint"""
|
||||
if len(sys.argv) != 3:
|
||||
print(
|
||||
"Usage: python3 generate_resources.py " \
|
||||
"<generate_resources.txt> <resources_dir>"
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
resource_list = sys.argv[1]
|
||||
resource_dir = sys.argv[2]
|
||||
|
||||
generate_resources(resource_list, resource_dir)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -1,21 +1,42 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Copyright 2025 The Helium Authors
|
||||
# You can use, redistribute, and/or modify this source code under
|
||||
# the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||
"""
|
||||
Script to generate Helium version numbers
|
||||
and inject them into the Chromium build tree.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
|
||||
CHROME_VERSION_BASE = 136
|
||||
|
||||
|
||||
def get_version_part(path):
|
||||
with open(path, "r") as file:
|
||||
"""
|
||||
Gets the (first) digit representing a part of
|
||||
the version from a particular file.
|
||||
"""
|
||||
with open(path, "r", encoding="utf-8") as file:
|
||||
return int(file.readline().split(".")[0].strip())
|
||||
|
||||
|
||||
def append_version(file, name, version):
|
||||
"""Appends a version part to the chromium VERSION file"""
|
||||
file.write(f"{name}={version}\n")
|
||||
|
||||
|
||||
def check_existing_version(path):
|
||||
with open(path, "r") as f:
|
||||
if "HELIUM" in f.read():
|
||||
raise Exception("file already contains helium versioning")
|
||||
"""Verifies that the version has not yet been added to the build tree"""
|
||||
with open(path, "r", encoding="utf-8") as file:
|
||||
if "HELIUM" in file.read():
|
||||
raise ValueError("file already contains helium versioning")
|
||||
|
||||
|
||||
def parse_args():
|
||||
"""Argument parsing"""
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--tree", type=Path, required=True)
|
||||
parser.add_argument("--platform-tree", type=Path, required=True)
|
||||
@@ -24,21 +45,25 @@ def parse_args():
|
||||
args = parser.parse_args()
|
||||
return (args.tree, args.platform_tree, args.chromium_tree, args.print)
|
||||
|
||||
|
||||
def get_version_parts(tree, platform_tree):
|
||||
"""Compiles all the version parts into the full version"""
|
||||
version_paths = {
|
||||
"HELIUM_MAJOR": tree / "version.txt",
|
||||
"HELIUM_MINOR": tree / "chromium_version.txt",
|
||||
"HELIUM_PATCH": tree / "revision.txt",
|
||||
"HELIUM_PLATFORM": platform_tree / "revision.txt",
|
||||
}
|
||||
|
||||
|
||||
version_parts = {}
|
||||
for name, path in version_paths.items():
|
||||
delta = 0 if name != "HELIUM_MINOR" else -CHROME_VERSION_BASE
|
||||
version_parts[name] = get_version_part(path) + delta
|
||||
return version_parts
|
||||
|
||||
|
||||
def main():
|
||||
"""CLI entrypoint"""
|
||||
tree, platform_tree, chromium_tree, should_print = parse_args()
|
||||
|
||||
version_parts = get_version_parts(tree, platform_tree)
|
||||
@@ -48,9 +73,10 @@ def main():
|
||||
else:
|
||||
chrome_version_path = chromium_tree / "chrome/VERSION"
|
||||
check_existing_version(chrome_version_path)
|
||||
with open(chrome_version_path, "a") as f:
|
||||
with open(chrome_version_path, "a", encoding="utf-8") as file:
|
||||
for name, version in version_parts.items():
|
||||
append_version(f, name, version)
|
||||
append_version(file, name, version)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -11,6 +11,7 @@ Generate standalone script that performs the domain substitution.
|
||||
from pathlib import Path
|
||||
import argparse
|
||||
import re
|
||||
from _common import ENCODING
|
||||
|
||||
|
||||
def make_domain_substitution_script(regex_path, files_path, output_path):
|
||||
@@ -41,8 +42,8 @@ def make_domain_substitution_script(regex_path, files_path, output_path):
|
||||
files_list_str = '\n'.join(files_list)
|
||||
perl_replace_list_str = '\n'.join([f' {x};' for x in perl_replace_list])
|
||||
|
||||
with open(output_path, 'w') as out:
|
||||
out.write("""#!/bin/sh -e
|
||||
with open(output_path, 'w', encoding=ENCODING) as out:
|
||||
out.write(f"""#!/bin/sh -e
|
||||
#
|
||||
# This script performs domain substitution on the Chromium source files.
|
||||
#
|
||||
@@ -54,25 +55,25 @@ def make_domain_substitution_script(regex_path, files_path, output_path):
|
||||
test -f build/config/compiler/BUILD.gn
|
||||
|
||||
# These filenames may contain spaces and/or other unusual characters
|
||||
print_file_list() {
|
||||
print_file_list() {{
|
||||
cat <<'__END__'
|
||||
%s
|
||||
{files_list_str}
|
||||
__END__
|
||||
}
|
||||
}}
|
||||
|
||||
echo "Creating backup archive ..."
|
||||
|
||||
backup=domain-substitution.orig.tar
|
||||
print_file_list | tar cf $backup --verbatim-files-from --files-from=-
|
||||
|
||||
echo "Applying ungoogled-chromium domain substitution to %d files ..."
|
||||
echo "Applying ungoogled-chromium domain substitution to {len(files_list)} files ..."
|
||||
|
||||
print_file_list | xargs -d '\\n' perl -0777 -C0 -pwi -e '
|
||||
%s
|
||||
{perl_replace_list_str}
|
||||
'
|
||||
|
||||
# end
|
||||
""" % (files_list_str, len(files_list), perl_replace_list_str))
|
||||
""")
|
||||
|
||||
|
||||
def _callback(args):
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Copyright 2025 The Helium Authors
|
||||
# You can use, redistribute, and/or modify this source code under
|
||||
# the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||
"""Script to replace instances of Chrome/Chromium with Helium"""
|
||||
|
||||
from pathlib import Path
|
||||
import argparse
|
||||
@@ -12,8 +14,8 @@ import re
|
||||
|
||||
REPLACEMENT_REGEXES_STR = [
|
||||
# stuff we don't want to replace
|
||||
(r'(\w+) Root Program', r'\1_unreplace Root Program'),
|
||||
(r'(\w+) Web( S|s)tore', r'\1_unreplace Web Store'),
|
||||
(r'(\w+) Root Program', r'\1_unreplace Root Program'),
|
||||
(r'(\w+) Web( S|s)tore', r'\1_unreplace Web Store'),
|
||||
(r'(\w+) Remote Desktop', r'\1_unreplace Remote Desktop'),
|
||||
(r'("BEGIN_LINK_CHROMIUM")(.*?Chromium)(.*?<ph name="END_LINK_CHROMIUM")', r'\1\2_unreplace\3'),
|
||||
|
||||
@@ -25,19 +27,19 @@ REPLACEMENT_REGEXES_STR = [
|
||||
(r'_unreplace', r'')
|
||||
]
|
||||
|
||||
REPLACEMENT_REGEXES = list(
|
||||
map(
|
||||
lambda line: (re.compile(line[0]), line[1]),
|
||||
REPLACEMENT_REGEXES_STR
|
||||
)
|
||||
)
|
||||
REPLACEMENT_REGEXES = list(map(lambda line: (re.compile(line[0]), line[1]),
|
||||
REPLACEMENT_REGEXES_STR))
|
||||
|
||||
def replace(str):
|
||||
|
||||
def replace(text):
|
||||
"""Replaces instances of Chrom(e | ium) with Helium, where desired"""
|
||||
for regex, replacement in REPLACEMENT_REGEXES:
|
||||
str = re.sub(regex, replacement, str)
|
||||
return str
|
||||
text = re.sub(regex, replacement, text)
|
||||
return text
|
||||
|
||||
|
||||
def replacement_sanity():
|
||||
"""Sanity check to ensure replacement regexes are working as intended"""
|
||||
before_after = [
|
||||
('Chrome Root Program', 'Chrome Root Program'),
|
||||
('Chrome Web Store', 'Chrome Web Store'),
|
||||
@@ -49,10 +51,12 @@ def replacement_sanity():
|
||||
('Chromium', 'Helium'),
|
||||
]
|
||||
|
||||
for a, b in before_after:
|
||||
assert(replace(a) == b)
|
||||
for source, expected in before_after:
|
||||
assert replace(source) == expected
|
||||
|
||||
|
||||
def parse_args():
|
||||
"""CLI argument parsing logic"""
|
||||
parser = argparse.ArgumentParser()
|
||||
group = parser.add_mutually_exclusive_group(required=True)
|
||||
group.add_argument('--sub', action='store_true')
|
||||
@@ -63,11 +67,24 @@ def parse_args():
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.unsub and not args.backup_path:
|
||||
raise Exception("backup_path is missing, but unsub was specified")
|
||||
raise ValueError("backup_path is missing, but unsub was specified")
|
||||
|
||||
return args
|
||||
|
||||
|
||||
def is_substitutable(filename):
|
||||
"""Determines whether a file should be name-substituted"""
|
||||
if filename.startswith('.'):
|
||||
return False
|
||||
|
||||
return filename.split('.')[-1].lower() in ['xtb', 'grd', 'grdp']
|
||||
|
||||
|
||||
def get_substitutable_files(tree):
|
||||
"""
|
||||
Finds all candidates for substitution, which are source
|
||||
string files (.grd*), or localization files (.xtb).
|
||||
"""
|
||||
out = tree / 'out'
|
||||
|
||||
for root, _, files in os.walk(tree):
|
||||
@@ -75,54 +92,57 @@ def get_substitutable_files(tree):
|
||||
if out in root.parents:
|
||||
continue
|
||||
|
||||
yield from map(
|
||||
lambda filename: root / filename,
|
||||
filter(
|
||||
lambda filename: not filename.startswith('.') and (
|
||||
filename.endswith('.xtb') or filename.endswith('.grd') or filename.endswith('.grdp')
|
||||
),
|
||||
files
|
||||
)
|
||||
)
|
||||
yield from map(lambda filename, root=root: root / filename, filter(is_substitutable, files))
|
||||
|
||||
async def substitute_file(tree, path, tarball = None):
|
||||
|
||||
async def substitute_file(tree, path, tarball=None):
|
||||
"""
|
||||
Replaces strings in a particular file,
|
||||
if there is anything to replace.
|
||||
"""
|
||||
arcname = str(path.relative_to(tree))
|
||||
text = None
|
||||
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
text = f.read()
|
||||
with open(path, 'r', encoding='utf-8') as file:
|
||||
text = file.read()
|
||||
|
||||
replaced = replace(text)
|
||||
if text != replaced:
|
||||
print(f"Replaced strings in {arcname}")
|
||||
if tarball:
|
||||
tarball.add(path, arcname=arcname, recursive=False)
|
||||
with open(path, 'w', encoding='utf-8') as f:
|
||||
f.write(replaced)
|
||||
with open(path, 'w', encoding='utf-8') as file:
|
||||
file.write(replaced)
|
||||
|
||||
|
||||
def do_unsubstitution(tree, tarpath):
|
||||
"""Reverts name substitutions from the backup tarball"""
|
||||
with tarfile.open(str(tarpath), 'r:gz') as tar:
|
||||
tar.extractall(path=tree, filter='fully_trusted')
|
||||
tarpath.unlink()
|
||||
|
||||
|
||||
async def do_substitution(tree, tarpath):
|
||||
with tarfile.open(str(tarpath), 'w:gz') if tarpath else open(os.devnull, 'w') as cache_tar:
|
||||
"""Performs name substitutions on all candidate files"""
|
||||
with tarfile.open(str(tarpath), 'w:gz') if tarpath else open(os.devnull, 'w',
|
||||
encoding="utf-8") as cache_tar:
|
||||
pending_substitutions = map(
|
||||
lambda path: substitute_file(tree, path, cache_tar if tarpath else None),
|
||||
get_substitutable_files(tree)
|
||||
)
|
||||
get_substitutable_files(tree))
|
||||
await asyncio.gather(*pending_substitutions)
|
||||
|
||||
|
||||
async def main():
|
||||
"""CLI entrypoint"""
|
||||
replacement_sanity()
|
||||
args = parse_args()
|
||||
|
||||
if not (args.t / "OWNERS").exists():
|
||||
raise Exception("wrong src directory")
|
||||
raise ValueError("wrong src directory")
|
||||
|
||||
if args.sub:
|
||||
if args.backup_path is not None and args.backup_path.exists():
|
||||
raise Exception("unsub tarball already exists, aborting")
|
||||
raise FileExistsError("unsub tarball already exists, aborting")
|
||||
await do_substitution(args.t, args.backup_path)
|
||||
elif args.unsub and args.backup_path:
|
||||
do_unsubstitution(args.t, args.backup_path)
|
||||
|
||||
@@ -60,7 +60,7 @@ def find_and_check_patch(patch_bin_path=None):
|
||||
raise ValueError('Could not find patch from PATCH_BIN env var or "which patch"')
|
||||
|
||||
if not patch_bin_path.exists():
|
||||
raise ValueError('Could not find the patch binary: {}'.format(patch_bin_path))
|
||||
raise ValueError(f'Could not find the patch binary: {patch_bin_path}')
|
||||
|
||||
# Ensure patch actually runs
|
||||
cmd = [str(patch_bin_path), '--version']
|
||||
@@ -73,7 +73,7 @@ def find_and_check_patch(patch_bin_path=None):
|
||||
get_logger().error('"%s" returned non-zero exit code', ' '.join(cmd))
|
||||
get_logger().error('stdout:\n%s', result.stdout)
|
||||
get_logger().error('stderr:\n%s', result.stderr)
|
||||
raise RuntimeError('Got non-zero exit code running "{}"'.format(' '.join(cmd)))
|
||||
raise RuntimeError(f"Got non-zero exit code running \"{' '.join(cmd)}\"")
|
||||
|
||||
return patch_bin_path
|
||||
|
||||
@@ -167,18 +167,16 @@ def merge_patches(source_iter, destination, prepend=False):
|
||||
if prepend:
|
||||
if not (destination / 'series').exists():
|
||||
raise FileNotFoundError(
|
||||
'Could not find series file in existing destination: {}'.format(destination /
|
||||
'series'))
|
||||
f"Could not find series file in existing destination: {destination / 'series'}")
|
||||
known_paths.update(generate_patches_from_series(destination))
|
||||
else:
|
||||
raise FileExistsError('destination already exists: {}'.format(destination))
|
||||
raise FileExistsError(f'destination already exists: {destination}')
|
||||
for source_dir in source_iter:
|
||||
patch_paths = tuple(generate_patches_from_series(source_dir))
|
||||
patch_intersection = known_paths.intersection(patch_paths)
|
||||
if patch_intersection:
|
||||
raise FileExistsError(
|
||||
'Patches from {} have conflicting paths with other sources: {}'.format(
|
||||
source_dir, patch_intersection))
|
||||
raise FileExistsError(f'Patches from {source_dir} have conflicting paths '
|
||||
f'with other sources: {patch_intersection}')
|
||||
series.extend(patch_paths)
|
||||
_copy_files(patch_paths, source_dir, destination)
|
||||
if prepend and (destination / 'series').exists():
|
||||
|
||||
@@ -1,23 +1,21 @@
|
||||
# Copyright 2025 The Helium Authors
|
||||
# You can use, redistribute, and/or modify this source code under
|
||||
# the terms of the GPL-3.0 license that can be found in the LICENSE file.
|
||||
"""
|
||||
Replaces resources (such as icons) with Helium branding.
|
||||
"""
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
def copy_resources(resource_list, resource_dir, chromium_dir):
|
||||
if not os.path.isfile(resource_list):
|
||||
print(f"Resource list '{resource_list}' does not exist, skipping")
|
||||
return
|
||||
if not os.path.isdir(resource_dir):
|
||||
print(f"Resource dir '{resource_dir}' does not exist.")
|
||||
sys.exit(1)
|
||||
if not os.path.isdir(chromium_dir):
|
||||
print(f"Chromium dir '{chromium_dir}' does not exist.")
|
||||
sys.exit(1)
|
||||
|
||||
with open(resource_list, 'r') as file:
|
||||
def copy_resources(resource_list, resource_dir, chromium_dir):
|
||||
"""
|
||||
Handles copying resources from the source tree into the build
|
||||
tree based on a resources list.
|
||||
"""
|
||||
with open(resource_list, 'r', encoding='utf-8') as file:
|
||||
for line_number, line in enumerate(file, start=1):
|
||||
line = line.strip()
|
||||
if not line or line.startswith('#'):
|
||||
@@ -26,28 +24,22 @@ def copy_resources(resource_list, resource_dir, chromium_dir):
|
||||
line_parts = line.split()
|
||||
|
||||
if len(line_parts) != 2:
|
||||
print(f"Line {line_number} is invalid. Skipping.")
|
||||
continue
|
||||
raise ValueError(f"Line {line_number} in the resource file is invalid.")
|
||||
|
||||
source = os.path.join(resource_dir, line_parts[0])
|
||||
dest = os.path.join(chromium_dir, line_parts[1])
|
||||
|
||||
if not os.path.exists(source):
|
||||
print(f"Source file '{source}' does not exist. Skipping copy.")
|
||||
continue
|
||||
if not os.path.exists(dest):
|
||||
print(f"Destination file '{dest}' does not exist. Skipping copy.")
|
||||
continue
|
||||
shutil.copyfile(source, dest)
|
||||
print(f"Copied {line_parts[0]} to {line_parts[1]}")
|
||||
|
||||
try:
|
||||
shutil.copyfile(source, dest)
|
||||
print(f"Copied {line_parts[0]} to {line_parts[1]}")
|
||||
except Exception as e:
|
||||
print(f"Error copying '{source}' to '{dest}': {e}")
|
||||
|
||||
def main():
|
||||
"""CLI entrypoint"""
|
||||
if len(sys.argv) != 4:
|
||||
print("Usage: python3 replace_resources.py <helium_resources.txt> <resources_dir> <chromium_src_dir>")
|
||||
print(
|
||||
"Usage: python3 replace_resources.py <helium_resources.txt> " \
|
||||
"<resources_dir> <chromium_src_dir>"
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
resource_list = sys.argv[1]
|
||||
@@ -56,5 +48,6 @@ def main():
|
||||
|
||||
copy_resources(resource_list, resource_dir, chromium_dir)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||