mirror of
https://github.com/imputnet/helium.git
synced 2026-08-20 00:57:32 +02:00
Compare commits
132 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fc9e935120 | |||
| d0198c25f9 | |||
| 92f6d7d2c8 | |||
| 988e4b4fb4 | |||
| 2ea2284c35 | |||
| e06a3a62f5 | |||
| 46b3fa7099 | |||
| b249347978 | |||
| 803eb8c3f5 | |||
| 9ec3ed6ecd | |||
| f240e14a58 | |||
| b497f44124 | |||
| 475fd063f3 | |||
| 31bdefc2de | |||
| 25c7197893 | |||
| f4f122c9f6 | |||
| e9785fd0ac | |||
| bcd55afb27 | |||
| df88312959 | |||
| 3826ee65e4 | |||
| b3b03d89a8 | |||
| d5b941f6a1 | |||
| 11d0256815 | |||
| 04ecb9e752 | |||
| 9617147a23 | |||
| 053a134aca | |||
| 80158a7006 | |||
| 6267361984 | |||
| 185e973431 | |||
| b66c25b115 | |||
| a078b9be0f | |||
| dfd5a4b8f8 | |||
| 89ee3b3b14 | |||
| cfa6338be0 | |||
| fe8ffb61e4 | |||
| 2da6aa7a41 | |||
| af66427d7a | |||
| f67127450a | |||
| 72be230adb | |||
| 5973e33db0 | |||
| ce3794932e | |||
| c3c2cfdce5 | |||
| d591df2fac | |||
| 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 | |||
| 13d630288f | |||
| d2021bb3ef | |||
| a5b8806ff9 | |||
| 62467f9b12 | |||
| e8355e7d7c | |||
| 15c3d58053 | |||
| e2f0519286 | |||
| 566f20b5ed | |||
| 2fa5711cea | |||
| c653aeb93b | |||
| eb50fd7139 | |||
| be70b704a2 | |||
| 8f98e3eac5 | |||
| 457da2ea74 | |||
| c471f52d54 | |||
| 8d01b7d62f | |||
| 51aaf38e8d | |||
| d35f39cd85 | |||
| e5f27a9138 | |||
| f7e6d2273d | |||
| 8900b76f0b | |||
| 15ee44b5a9 | |||
| 37da72130f |
+4
-4
@@ -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
-1
@@ -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
|
||||
@@ -1,4 +1,7 @@
|
||||
name: New version check
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
|
||||
on:
|
||||
# enabling manual trigger
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
name: Create new empty release
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
@@ -11,3 +11,6 @@ __pycache__/
|
||||
|
||||
# Ignore optional build / cache directory
|
||||
/build
|
||||
|
||||
# Ignore generated resources
|
||||
/resources/generated
|
||||
|
||||
@@ -1 +1 @@
|
||||
138.0.7204.49
|
||||
139.0.7258.138
|
||||
|
||||
@@ -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
|
||||
|
||||
Executable
+46
@@ -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
|
||||
@@ -70,6 +70,8 @@ PRUNING_EXCLUDE_PATTERNS = [
|
||||
'third_party/node/node_modules/@rollup/wasm-node/dist/wasm-node/bindings_wasm_bg.wasm',
|
||||
# Exclusion for performance tracing
|
||||
'third_party/perfetto/src/trace_processor/importers/proto/atoms.descriptor',
|
||||
# Exclusion for jiff
|
||||
'third_party/rust/chromium_crates_io/vendor/jiff-tzdb-v0_1/concatenated-zoneinfo.dat',
|
||||
# Exclusions for safe file extensions
|
||||
'*.avif',
|
||||
'*.ttf',
|
||||
@@ -118,14 +120,13 @@ DOMAIN_EXCLUDE_PREFIXES = [
|
||||
'third_party/blink/renderer/core/dom/document.cc',
|
||||
# Exclusion to allow download of sysroots
|
||||
'build/linux/sysroot_scripts/sysroots.json',
|
||||
# Licenses and credits
|
||||
'tools/licenses/licenses.py',
|
||||
# Google Web Store extension stuff
|
||||
'tools/search_engine_choice/generate_search_engine_icons.py',
|
||||
'extensions/common/api/_api_features.json',
|
||||
'chrome/common/extensions/api/_api_features.json',
|
||||
'extensions/common/extension_urls.cc',
|
||||
'extensions/browser/updater/safe_manifest_parser.cc',
|
||||
# License/credits stuff
|
||||
'tools/licenses/licenses.py',
|
||||
]
|
||||
|
||||
# pylint: enable=line-too-long
|
||||
@@ -256,6 +257,7 @@ def should_domain_substitute(path, relative_path, search_regex, used_dep_set, us
|
||||
if relative_path_posix.startswith(exclude_prefix):
|
||||
used_dep_set.add(exclude_prefix)
|
||||
return False
|
||||
# Skip LICENSE.* files so that they remain untouched.
|
||||
for license_path in ['license', 'license.txt', 'license.html']:
|
||||
if relative_path_posix.endswith('/' + license_path):
|
||||
return False
|
||||
@@ -399,9 +401,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)
|
||||
|
||||
+228
-101
File diff suppressed because it is too large
Load Diff
+7
-7
@@ -1,12 +1,12 @@
|
||||
[icons]
|
||||
url = https://gist.githubusercontent.com/dumbmoron/a8aeb8926c4baa8fdd0fa8e8de47e5eb/raw/b5aae9abdceb64661afcf3dc2712523f8e3b1952/icons.tar.gz
|
||||
download_filename = icons.tar.gz
|
||||
sha256 = cd954c7257f126be871f79ecf8fff143425708d5d33501d0ba870fa466dafbe7
|
||||
output_path = ./components/resources/default_100_percent/search_engine_choice
|
||||
[search_engines_data]
|
||||
url = https://gist.githubusercontent.com/wukko/2a591364dda346e10219e4adabd568b1/raw/e75ae3c4a1ce940ef7627916a48bc40882d24d40/nonfree-search-engines-data.tar.gz
|
||||
download_filename = nonfree-search-engines-data.tar.gz
|
||||
sha256 = 00a87050fa3f941d04d67fb5763991e0b8ea399a88b505ab0e56dd263f06864c
|
||||
output_path = ./third_party/search_engines_data/resources_internal
|
||||
|
||||
[onboarding]
|
||||
version = 202505202136
|
||||
version = 202508081112
|
||||
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 = 375f719e1ebadbc528ceda2ce88dac23b5e59bca8be581b21d04f75e6b0a054c
|
||||
output_path = ./components/helium_onboarding
|
||||
|
||||
@@ -4,7 +4,6 @@ clang_use_chrome_plugins=false
|
||||
disable_fieldtrial_testing_config=true
|
||||
enable_hangout_services_extension=false
|
||||
enable_mdns=false
|
||||
enable_nacl=false
|
||||
enable_remoting=false
|
||||
enable_reporting=false
|
||||
enable_service_discovery=false
|
||||
|
||||
@@ -51,7 +51,7 @@ Subject: Disable fetching of all field trials
|
||||
/**
|
||||
--- a/components/variations/service/variations_service.cc
|
||||
+++ b/components/variations/service/variations_service.cc
|
||||
@@ -224,22 +224,7 @@ bool GetInstanceManipulations(const net:
|
||||
@@ -223,22 +223,7 @@ bool GetInstanceManipulations(const net:
|
||||
// Variations seed fetching is only enabled in official Chrome builds, if a URL
|
||||
// is specified on the command line, and for testing.
|
||||
bool IsFetchingEnabled() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -3752,8 +3752,6 @@ static_library("browser") {
|
||||
@@ -3797,8 +3797,6 @@ static_library("browser") {
|
||||
"download/download_auto_open_policy_handler.cc",
|
||||
"download/download_auto_open_policy_handler.h",
|
||||
"download/download_commands.cc",
|
||||
@@ -11,7 +11,7 @@
|
||||
"download/download_dir_util.cc",
|
||||
--- a/chrome/browser/chrome_content_browser_client_navigation_throttles.cc
|
||||
+++ b/chrome/browser/chrome_content_browser_client_navigation_throttles.cc
|
||||
@@ -391,10 +391,6 @@ void CreateAndAddChromeThrottlesForNavig
|
||||
@@ -388,10 +388,6 @@ void CreateAndAddChromeThrottlesForNavig
|
||||
registry.AddThrottle(std::make_unique<PolicyBlocklistNavigationThrottle>(
|
||||
registry, handle.GetWebContents()->GetBrowserContext()));
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
base::BindOnce(&IsInHostedApp),
|
||||
--- a/chrome/browser/component_updater/file_type_policies_component_installer.cc
|
||||
+++ b/chrome/browser/component_updater/file_type_policies_component_installer.cc
|
||||
@@ -38,21 +38,6 @@ const uint8_t kFileTypePoliciesPublicKey
|
||||
@@ -36,21 +36,6 @@ const uint8_t kFileTypePoliciesPublicKey
|
||||
const char kFileTypePoliciesManifestName[] = "File Type Policies";
|
||||
|
||||
void LoadFileTypesFromDisk(const base::FilePath& pb_path) {
|
||||
@@ -48,7 +48,7 @@
|
||||
} // namespace
|
||||
--- a/chrome/browser/download/download_item_model.cc
|
||||
+++ b/chrome/browser/download/download_item_model.cc
|
||||
@@ -128,7 +128,7 @@ class DownloadItemModelData : public bas
|
||||
@@ -129,7 +129,7 @@ class DownloadItemModelData : public bas
|
||||
|
||||
// Danger level of the file determined based on the file type and whether
|
||||
// there was a user action associated with the download.
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
// Whether the download is currently being revived.
|
||||
bool is_being_revived_ = false;
|
||||
@@ -512,13 +512,13 @@ void DownloadItemModel::SetShouldPreferO
|
||||
@@ -513,13 +513,13 @@ void DownloadItemModel::SetShouldPreferO
|
||||
data->should_prefer_opening_in_browser_ = preference;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
@@ -1430,44 +1426,7 @@ void DownloadsAcceptDangerFunction::Prom
|
||||
return;
|
||||
}
|
||||
RecordApiFunctions(DOWNLOADS_FUNCTION_ACCEPT_DANGER);
|
||||
RecordApiFunctions(DownloadsFunctionName::kDownloadsFunctionAcceptDanger);
|
||||
- // DownloadDangerPrompt displays a modal dialog using native widgets that the
|
||||
- // user must either accept or cancel. It cannot be scripted.
|
||||
- DownloadDangerPrompt* prompt = DownloadDangerPrompt::Create(
|
||||
@@ -180,7 +180,7 @@
|
||||
class DownloadsShowFunction : public ExtensionFunction {
|
||||
--- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc
|
||||
+++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc
|
||||
@@ -702,18 +702,6 @@ void WebstorePrivateBeginInstallWithMani
|
||||
@@ -703,18 +703,6 @@ void WebstorePrivateBeginInstallWithMani
|
||||
|
||||
void WebstorePrivateBeginInstallWithManifest3Function::
|
||||
ReportFrictionAcceptedEvent() {
|
||||
@@ -251,9 +251,9 @@
|
||||
]
|
||||
+ }
|
||||
|
||||
# Note: is_android is not equivalent to safe_browsing_mode == 2.
|
||||
# Sources and dependencies added to this block must not depend on anything
|
||||
@@ -579,6 +581,7 @@ static_library("advanced_protection") {
|
||||
if (enable_extensions) {
|
||||
deps += [ "//chrome/browser/ui/web_applications" ]
|
||||
@@ -598,6 +600,7 @@ static_library("advanced_protection") {
|
||||
}
|
||||
|
||||
source_set("metrics_collector") {
|
||||
@@ -261,7 +261,7 @@
|
||||
sources = [
|
||||
"safe_browsing_metrics_collector_factory.cc",
|
||||
"safe_browsing_metrics_collector_factory.h",
|
||||
@@ -598,6 +601,7 @@ source_set("metrics_collector") {
|
||||
@@ -617,6 +620,7 @@ source_set("metrics_collector") {
|
||||
"//components/safe_browsing/core/common:safe_browsing_prefs",
|
||||
"//content/public/browser",
|
||||
]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/components/autofill/core/browser/crowdsourcing/autofill_crowdsourcing_manager.cc
|
||||
+++ b/components/autofill/core/browser/crowdsourcing/autofill_crowdsourcing_manager.cc
|
||||
@@ -924,93 +924,6 @@ std::tuple<GURL, std::string> AutofillCr
|
||||
@@ -938,93 +938,6 @@ std::tuple<GURL, std::string> AutofillCr
|
||||
}
|
||||
|
||||
bool AutofillCrowdsourcingManager::StartRequest(FormRequestData request_data) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/updater/configurator.cc
|
||||
+++ b/chrome/updater/configurator.cc
|
||||
@@ -133,7 +133,7 @@ base::TimeDelta Configurator::UpdateDela
|
||||
@@ -147,7 +147,7 @@ base::TimeDelta Configurator::UpdateDela
|
||||
|
||||
std::vector<GURL> Configurator::UpdateUrl() const {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
|
||||
+2
-2
@@ -167,7 +167,7 @@ by default.
|
||||
DownloadFeedbackFactory* DownloadFeedback::factory_ = nullptr;
|
||||
--- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
|
||||
@@ -273,7 +273,7 @@ GURL SpellcheckHunspellDictionary::GetDi
|
||||
@@ -274,7 +274,7 @@ GURL SpellcheckHunspellDictionary::GetDi
|
||||
DCHECK(!bdict_file.empty());
|
||||
|
||||
static const char kDownloadServerUrl[] =
|
||||
@@ -189,7 +189,7 @@ by default.
|
||||
|
||||
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
|
||||
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
|
||||
@@ -75,17 +75,17 @@ namespace {
|
||||
@@ -76,17 +76,17 @@ namespace {
|
||||
// The URL for the the Learn More page shown on incognito new tab.
|
||||
const char kLearnMoreIncognitoUrl[] =
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@ This prevents trk:148 (phishing) and trk:149 (malware).
|
||||
|
||||
--- a/components/safe_browsing/content/browser/client_side_detection_service.cc
|
||||
+++ b/components/safe_browsing/content/browser/client_side_detection_service.cc
|
||||
@@ -342,6 +342,10 @@ void ClientSideDetectionService::StartCl
|
||||
@@ -340,6 +340,10 @@ void ClientSideDetectionService::StartCl
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ This prevents trk:148 (phishing) and trk:149 (malware).
|
||||
std::string request_data;
|
||||
request->SerializeToString(&request_data);
|
||||
|
||||
@@ -424,6 +428,7 @@ void ClientSideDetectionService::StartCl
|
||||
@@ -421,6 +425,7 @@ void ClientSideDetectionService::StartCl
|
||||
base::BindOnce(&WebUIInfoSingleton::AddToClientPhishingRequestsSent,
|
||||
base::Unretained(WebUIInfoSingleton::GetInstance()),
|
||||
std::move(request), access_token));
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
// Note: If there is an ongoing request, abandon it. It's possible that
|
||||
--- a/chrome/browser/new_tab_page/promos/promo_service.cc
|
||||
+++ b/chrome/browser/new_tab_page/promos/promo_service.cc
|
||||
@@ -175,6 +175,7 @@ PromoService::PromoService(
|
||||
@@ -176,6 +176,7 @@ PromoService::PromoService(
|
||||
PromoService::~PromoService() = default;
|
||||
|
||||
void PromoService::Refresh() {
|
||||
@@ -28,7 +28,7 @@
|
||||
// via the feature params.
|
||||
--- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
|
||||
@@ -280,6 +280,7 @@ GURL SpellcheckHunspellDictionary::GetDi
|
||||
@@ -281,6 +281,7 @@ GURL SpellcheckHunspellDictionary::GetDi
|
||||
}
|
||||
|
||||
void SpellcheckHunspellDictionary::DownloadDictionary(GURL url) {
|
||||
@@ -51,7 +51,7 @@
|
||||
base::OnceCallback<void(FetchResult)> result_callback) {
|
||||
--- a/components/affiliations/core/browser/hash_affiliation_fetcher.h
|
||||
+++ b/components/affiliations/core/browser/hash_affiliation_fetcher.h
|
||||
@@ -39,6 +39,8 @@ class HashAffiliationFetcher : public Af
|
||||
@@ -40,6 +40,8 @@ class HashAffiliationFetcher : public Af
|
||||
const std::vector<FacetURI>& facet_uris,
|
||||
RequestInfo request_info,
|
||||
base::OnceCallback<void(FetchResult)> result_callback) override;
|
||||
@@ -72,14 +72,16 @@
|
||||
if (state_ == REQUESTING) {
|
||||
--- a/components/themes/ntp_background_service.cc
|
||||
+++ b/components/themes/ntp_background_service.cc
|
||||
@@ -88,6 +88,7 @@ void NtpBackgroundService::Shutdown() {
|
||||
}
|
||||
|
||||
void NtpBackgroundService::FetchCollectionInfo() {
|
||||
+ return;
|
||||
@@ -90,9 +90,7 @@ void NtpBackgroundService::Shutdown() {
|
||||
void NtpBackgroundService::FetchCollectionInfo(
|
||||
const std::string& filtering_label) {
|
||||
// If a request is currently in progress, drop the new request.
|
||||
if (collections_loader_ != nullptr) {
|
||||
- if (collections_loader_ != nullptr) {
|
||||
return;
|
||||
- }
|
||||
collection_error_info_.ClearError();
|
||||
|
||||
net::NetworkTrafficAnnotationTag traffic_annotation =
|
||||
--- a/components/update_client/update_checker.cc
|
||||
+++ b/components/update_client/update_checker.cc
|
||||
@@ -104,6 +104,7 @@ void UpdateCheckerImpl::CheckForUpdates(
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
--- a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc
|
||||
+++ b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc
|
||||
@@ -56,6 +56,7 @@ ChromeAutocompleteSchemeClassifier::GetI
|
||||
@@ -72,6 +72,7 @@ ChromeAutocompleteSchemeClassifier::GetI
|
||||
if (base::IsStringASCII(scheme) &&
|
||||
(ProfileIOData::IsHandledProtocol(scheme) ||
|
||||
base::EqualsCaseInsensitiveASCII(scheme, content::kViewSourceScheme) ||
|
||||
@@ -47,7 +47,7 @@
|
||||
std::u16string real_url(text.substr(after_scheme_and_colon));
|
||||
--- a/components/url_formatter/url_fixer.cc
|
||||
+++ b/components/url_formatter/url_fixer.cc
|
||||
@@ -607,6 +607,10 @@ GURL FixupURLInternal(const std::string&
|
||||
@@ -602,6 +602,10 @@ GURL FixupURLInternal(const std::string&
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
// other origins, so we should not treat them as web safe. Remove callers of
|
||||
--- a/net/BUILD.gn
|
||||
+++ b/net/BUILD.gn
|
||||
@@ -1101,6 +1101,8 @@ component("net") {
|
||||
@@ -1108,6 +1108,8 @@ component("net") {
|
||||
"url_request/static_http_user_agent_settings.cc",
|
||||
"url_request/static_http_user_agent_settings.h",
|
||||
"url_request/storage_access_status_cache.h",
|
||||
@@ -204,7 +204,7 @@
|
||||
inline constexpr char kUuidInPackageScheme[] = "uuid-in-package";
|
||||
--- a/url/url_util.cc
|
||||
+++ b/url/url_util.cc
|
||||
@@ -84,6 +84,7 @@ struct SchemeRegistry {
|
||||
@@ -85,6 +85,7 @@ struct SchemeRegistry {
|
||||
kWssScheme,
|
||||
kDataScheme,
|
||||
kAboutScheme,
|
||||
@@ -212,7 +212,7 @@
|
||||
};
|
||||
|
||||
// Schemes that normal pages cannot link to or access (i.e., with the same
|
||||
@@ -98,6 +99,7 @@ struct SchemeRegistry {
|
||||
@@ -99,6 +100,7 @@ struct SchemeRegistry {
|
||||
kAboutScheme,
|
||||
kJavaScriptScheme,
|
||||
kDataScheme,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
--- a/chrome/browser/chrome_content_browser_client.cc
|
||||
+++ b/chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -2636,24 +2636,6 @@ void ChromeContentBrowserClient::AppendE
|
||||
@@ -2693,24 +2693,6 @@ void ChromeContentBrowserClient::AppendE
|
||||
command_line->AppendSwitchASCII(switches::kMetricsClientID,
|
||||
client_info->client_id);
|
||||
}
|
||||
@@ -44,7 +44,7 @@
|
||||
const base::FilePath& exe_path,
|
||||
--- a/components/gwp_asan/client/gwp_asan.cc
|
||||
+++ b/components/gwp_asan/client/gwp_asan.cc
|
||||
@@ -340,6 +340,11 @@ GWP_ASAN_EXPORT std::optional<AllocatorS
|
||||
@@ -345,6 +345,11 @@ GWP_ASAN_EXPORT std::optional<AllocatorS
|
||||
|
||||
// Exported for testing.
|
||||
GWP_ASAN_EXPORT std::optional<AllocatorSettings> GetAllocatorSettings(
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
--- a/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc
|
||||
+++ b/components/dom_distiller/content/browser/dom_distiller_viewer_source.cc
|
||||
@@ -291,7 +291,7 @@ bool DomDistillerViewerSource::ShouldSer
|
||||
@@ -295,7 +295,7 @@ bool DomDistillerViewerSource::ShouldSer
|
||||
std::string DomDistillerViewerSource::GetContentSecurityPolicy(
|
||||
network::mojom::CSPDirectiveName directive) {
|
||||
if (directive == network::mojom::CSPDirectiveName::StyleSrc) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -565,7 +565,7 @@
|
||||
bool IsProbablyGoogleSearchUrl(const GURL& url) {
|
||||
--- a/components/search_engines/template_url.cc
|
||||
+++ b/components/search_engines/template_url.cc
|
||||
@@ -621,10 +621,7 @@ std::u16string TemplateURLRef::SearchTer
|
||||
@@ -615,10 +615,7 @@ std::u16string TemplateURLRef::SearchTer
|
||||
bool TemplateURLRef::HasGoogleBaseURLs(
|
||||
const SearchTermsData& search_terms_data) const {
|
||||
ParseIfNecessary(search_terms_data);
|
||||
@@ -681,7 +681,7 @@
|
||||
} // namespace variations
|
||||
--- a/content/browser/preloading/prefetch/prefetch_container.cc
|
||||
+++ b/content/browser/preloading/prefetch/prefetch_container.cc
|
||||
@@ -970,7 +970,7 @@ void PrefetchContainer::AddRedirectHop(c
|
||||
@@ -988,7 +988,7 @@ void PrefetchContainer::AddRedirectHop(c
|
||||
// some which are added by throttles). These aren't yet supported for
|
||||
// prefetch, including browsing topics and client hints.
|
||||
net::HttpRequestHeaders updated_headers;
|
||||
@@ -692,7 +692,7 @@
|
||||
|
||||
--- a/net/base/url_util.cc
|
||||
+++ b/net/base/url_util.cc
|
||||
@@ -537,28 +537,6 @@ bool HasGoogleHost(const GURL& url) {
|
||||
@@ -536,28 +536,6 @@ bool HasGoogleHost(const GURL& url) {
|
||||
}
|
||||
|
||||
bool IsGoogleHost(std::string_view host) {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -369,7 +369,6 @@ if (!is_android && !is_mac) {
|
||||
@@ -368,7 +368,6 @@ if (!is_android && !is_mac) {
|
||||
}
|
||||
|
||||
data_deps += [
|
||||
@@ -15,7 +15,7 @@
|
||||
"//components/webapps/isolated_web_apps/preload:component",
|
||||
"//third_party/widevine/cdm",
|
||||
]
|
||||
@@ -1204,7 +1203,6 @@ if (is_win) {
|
||||
@@ -1177,7 +1176,6 @@ if (is_win) {
|
||||
":optimization_guide_library",
|
||||
":swiftshader_binaries",
|
||||
":widevine_cdm_library",
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
--- a/chrome/browser/resources/BUILD.gn
|
||||
+++ b/chrome/browser/resources/BUILD.gn
|
||||
@@ -97,11 +97,6 @@ group("resources") {
|
||||
@@ -98,11 +98,6 @@ group("resources") {
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/components/browsing_data/content/browsing_data_model.cc
|
||||
+++ b/components/browsing_data/content/browsing_data_model.cc
|
||||
@@ -992,12 +992,6 @@ void BrowsingDataModel::PopulateFromDisk
|
||||
@@ -991,12 +991,6 @@ void BrowsingDataModel::PopulateFromDisk
|
||||
base::FeatureList::IsEnabled(network::features::kSharedStorageAPI);
|
||||
bool is_shared_dictionary_enabled = base::FeatureList::IsEnabled(
|
||||
network::features::kCompressionDictionaryTransportBackend);
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
base::RepeatingClosure completion =
|
||||
base::BindRepeating([](const base::OnceClosure&) {},
|
||||
@@ -1034,27 +1028,7 @@ void BrowsingDataModel::PopulateFromDisk
|
||||
@@ -1033,27 +1027,7 @@ void BrowsingDataModel::PopulateFromDisk
|
||||
base::BindOnce(&OnSharedDictionaryUsageLoaded, this, completion));
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
void AdAuctionServiceImpl::JoinInterestGroup(
|
||||
--- a/content/browser/storage_partition_impl.cc
|
||||
+++ b/content/browser/storage_partition_impl.cc
|
||||
@@ -1469,38 +1469,7 @@ void StoragePartitionImpl::Initialize(
|
||||
@@ -1485,38 +1485,7 @@ void StoragePartitionImpl::Initialize(
|
||||
|
||||
bucket_manager_ = std::make_unique<BucketManager>(this);
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
|
||||
GeneratedCodeCacheSettings settings =
|
||||
GetContentClient()->browser()->GetGeneratedCodeCacheSettings(
|
||||
@@ -1529,8 +1498,6 @@ void StoragePartitionImpl::Initialize(
|
||||
@@ -1545,8 +1514,6 @@ void StoragePartitionImpl::Initialize(
|
||||
|
||||
font_access_manager_ = FontAccessManager::Create();
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
|
||||
#if BUILDFLAG(ENABLE_LIBRARY_CDMS)
|
||||
if (is_in_memory()) {
|
||||
@@ -1554,11 +1521,6 @@ void StoragePartitionImpl::Initialize(
|
||||
@@ -1570,11 +1537,6 @@ void StoragePartitionImpl::Initialize(
|
||||
std::make_unique<SharedStorageHeaderObserver>(this);
|
||||
}
|
||||
|
||||
@@ -237,10 +237,10 @@
|
||||
- }
|
||||
}
|
||||
|
||||
void StoragePartitionImpl::OnStorageServiceDisconnected() {
|
||||
void StoragePartitionImpl::ResetSessionStorageConnections() {
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4107,12 +4107,6 @@ void WebContentsImpl::Init(const WebCont
|
||||
@@ -4127,12 +4127,6 @@ void WebContentsImpl::Init(const WebCont
|
||||
DateTimeChooser::CreateDateTimeChooser(this);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
--- a/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc
|
||||
+++ b/chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc
|
||||
@@ -678,12 +678,6 @@ std::vector<url::Origin> ChromeContentBr
|
||||
@@ -677,12 +677,6 @@ std::vector<url::Origin> ChromeContentBr
|
||||
GetOriginsRequiringDedicatedProcess() {
|
||||
std::vector<url::Origin> list;
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
fetch->oauth2_attempt_count++;
|
||||
--- a/extensions/common/extension_urls.cc
|
||||
+++ b/extensions/common/extension_urls.cc
|
||||
@@ -74,8 +74,6 @@ GURL AppendUtmSource(const GURL& url, st
|
||||
@@ -77,8 +77,6 @@ GURL AppendUtmSource(const GURL& url, st
|
||||
|
||||
GURL GetWebstoreExtensionsCategoryURL() {
|
||||
GURL base_url = GetNewWebstoreLaunchURL();
|
||||
|
||||
@@ -1,26 +1,28 @@
|
||||
--- a/chrome/browser/extensions/api/developer_private/extension_info_generator_desktop.cc
|
||||
+++ b/chrome/browser/extensions/api/developer_private/extension_info_generator_desktop.cc
|
||||
@@ -54,17 +54,6 @@ void ExtensionInfoGenerator::FillExtensi
|
||||
info.controlled_info.emplace();
|
||||
info.controlled_info->text =
|
||||
l10n_util::GetStringUTF8(IDS_EXTENSIONS_INSTALL_LOCATION_ENTERPRISE);
|
||||
- } else {
|
||||
- // Create Safety Hub information for any non-enterprise extension.
|
||||
- developer::SafetyCheckWarningReason warning_reason =
|
||||
- ExtensionSafetyCheckUtils::GetSafetyCheckWarningReason(extension,
|
||||
- profile);
|
||||
- if (warning_reason != developer::SafetyCheckWarningReason::kNone) {
|
||||
- info.safety_check_warning_reason = warning_reason;
|
||||
- info.safety_check_text =
|
||||
- ExtensionSafetyCheckUtils::GetSafetyCheckWarningStrings(
|
||||
- warning_reason, state);
|
||||
- }
|
||||
--- a/chrome/browser/extensions/api/developer_private/extension_info_generator.cc
|
||||
+++ b/chrome/browser/extensions/api/developer_private/extension_info_generator.cc
|
||||
@@ -865,19 +865,6 @@ void ExtensionInfoGenerator::FillExtensi
|
||||
toolbar_actions_model->IsActionPinned(extension.id());
|
||||
}
|
||||
|
||||
// Pinned to toolbar.
|
||||
- // MV2 deprecation.
|
||||
- ManifestV2ExperimentManager* mv2_experiment_manager =
|
||||
- ManifestV2ExperimentManager::Get(profile);
|
||||
- CHECK(mv2_experiment_manager);
|
||||
- info.is_affected_by_mv2_deprecation =
|
||||
- mv2_experiment_manager->IsExtensionAffected(extension);
|
||||
- info.did_acknowledge_mv2_deprecation_notice =
|
||||
- mv2_experiment_manager->DidUserAcknowledgeNotice(extension.id());
|
||||
- if (info.web_store_url.length() > 0) {
|
||||
- info.recommendations_url =
|
||||
- extension_urls::GetNewWebstoreItemRecommendationsUrl(extension.id())
|
||||
- .spec();
|
||||
- }
|
||||
|
||||
// Whether the extension can be uploaded as an account extension.
|
||||
// `CanUploadAsAccountExtension` should already check for the feature flag
|
||||
--- a/chrome/browser/extensions/extension_management.cc
|
||||
+++ b/chrome/browser/extensions/extension_management.cc
|
||||
@@ -322,31 +322,7 @@ bool ExtensionManagement::IsAllowedManif
|
||||
@@ -355,31 +355,7 @@ bool ExtensionManagement::IsAllowedManif
|
||||
int manifest_version,
|
||||
const std::string& extension_id,
|
||||
Manifest::Type manifest_type) {
|
||||
@@ -52,7 +54,7 @@
|
||||
}
|
||||
|
||||
bool ExtensionManagement::IsAllowedManifestVersion(const Extension* extension) {
|
||||
@@ -367,26 +343,8 @@ bool ExtensionManagement::IsExemptFromMV
|
||||
@@ -400,26 +376,8 @@ bool ExtensionManagement::IsExemptFromMV
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -126,15 +128,15 @@
|
||||
// Returns true if the given `stage` is one in which extension enablement should
|
||||
--- a/chrome/browser/ui/webui/extensions/extensions_ui.cc
|
||||
+++ b/chrome/browser/ui/webui/extensions/extensions_ui.cc
|
||||
@@ -490,7 +490,7 @@ content::WebUIDataSource* CreateAndAddEx
|
||||
@@ -482,7 +482,7 @@ content::WebUIDataSource* CreateAndAddEx
|
||||
extensions_features::kExtensionsMenuAccessControlWithPermittedSites));
|
||||
source->AddBoolean(
|
||||
"safetyHubThreeDotDetails",
|
||||
- base::FeatureList::IsEnabled(features::kSafetyHubThreeDotDetails));
|
||||
+ false);
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
source->AddResourcePath("images/product_logo.png",
|
||||
// MV2 deprecation.
|
||||
auto* mv2_experiment_manager = ManifestV2ExperimentManager::Get(profile);
|
||||
--- a/extensions/common/extension.cc
|
||||
+++ b/extensions/common/extension.cc
|
||||
@@ -104,13 +104,6 @@ bool IsManifestSupported(int manifest_ve
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -370,7 +370,6 @@ if (!is_android && !is_mac) {
|
||||
@@ -369,7 +369,6 @@ if (!is_android && !is_mac) {
|
||||
|
||||
data_deps += [
|
||||
"//chrome/browser/resources/media/mei_preload:component",
|
||||
@@ -11,7 +11,7 @@
|
||||
"//components/webapps/isolated_web_apps/preload:component",
|
||||
"//third_party/widevine/cdm",
|
||||
]
|
||||
@@ -934,8 +933,6 @@ if (is_win) {
|
||||
@@ -933,8 +932,6 @@ if (is_win) {
|
||||
|
||||
bundle_data("chrome_framework_resources") {
|
||||
sources = [
|
||||
@@ -20,7 +20,7 @@
|
||||
# This image is used to badge the lock icon in the
|
||||
# authentication dialogs, such as those used for installation
|
||||
# from disk image and Keystone promotion (if so enabled). It
|
||||
@@ -1208,7 +1205,6 @@ if (is_win) {
|
||||
@@ -1181,7 +1178,6 @@ if (is_win) {
|
||||
":swiftshader_binaries",
|
||||
":widevine_cdm_library",
|
||||
"//chrome/browser/resources/media/mei_preload:component_bundle",
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -775,10 +775,6 @@ static_library("browser") {
|
||||
@@ -796,10 +796,6 @@ static_library("browser") {
|
||||
"navigation_predictor/navigation_predictor_metrics_document_data.h",
|
||||
"navigation_predictor/navigation_predictor_preconnect_client.cc",
|
||||
"navigation_predictor/navigation_predictor_preconnect_client.h",
|
||||
@@ -41,7 +41,7 @@
|
||||
"navigation_predictor/search_engine_preconnector_keyed_service_factory.cc",
|
||||
"navigation_predictor/search_engine_preconnector_keyed_service_factory.h",
|
||||
"net/cert_verifier_service_time_updater.cc",
|
||||
@@ -3618,10 +3614,6 @@ static_library("browser") {
|
||||
@@ -3665,10 +3661,6 @@ static_library("browser") {
|
||||
} else {
|
||||
#!is_android
|
||||
sources += [
|
||||
@@ -52,16 +52,16 @@
|
||||
"accessibility/caption_bubble_context_browser.h",
|
||||
"accessibility/embedded_a11y_extension_loader.cc",
|
||||
"accessibility/embedded_a11y_extension_loader.h",
|
||||
@@ -4329,8 +4321,6 @@ static_library("browser") {
|
||||
@@ -4386,8 +4378,6 @@ static_library("browser") {
|
||||
"//chrome/app:command_ids",
|
||||
"//chrome/app/theme:chrome_unscaled_resources_grit",
|
||||
"//chrome/app/vector_icons",
|
||||
- "//chrome/browser/accessibility/tree_fixing:prefs",
|
||||
- "//chrome/browser/accessibility/tree_fixing:service",
|
||||
"//chrome/browser/actor",
|
||||
"//chrome/browser/actor:impl",
|
||||
"//chrome/browser/apps/app_service",
|
||||
"//chrome/browser/apps/link_capturing",
|
||||
@@ -4350,10 +4340,6 @@ static_library("browser") {
|
||||
@@ -4408,10 +4398,6 @@ static_library("browser") {
|
||||
"//chrome/browser/metrics/desktop_session_duration",
|
||||
"//chrome/browser/new_tab_page/chrome_colors",
|
||||
"//chrome/browser/policy:path_parser",
|
||||
@@ -72,7 +72,7 @@
|
||||
"//chrome/browser/search/background",
|
||||
"//chrome/browser/sharing_hub",
|
||||
"//chrome/browser/smart_card",
|
||||
@@ -4512,9 +4498,6 @@ static_library("browser") {
|
||||
@@ -4573,9 +4559,6 @@ static_library("browser") {
|
||||
"//components/webauthn/core/browser",
|
||||
"//components/webauthn/core/browser:passkey_model",
|
||||
"//services/device/public/cpp/hid",
|
||||
@@ -82,7 +82,7 @@
|
||||
"//third_party/crashpad/crashpad/client:common",
|
||||
"//third_party/zxcvbn-cpp",
|
||||
"//ui/views",
|
||||
@@ -4630,8 +4613,6 @@ static_library("browser") {
|
||||
@@ -4695,8 +4678,6 @@ static_library("browser") {
|
||||
sources += [
|
||||
"accessibility/soda_installer_impl.cc",
|
||||
"accessibility/soda_installer_impl.h",
|
||||
@@ -91,7 +91,7 @@
|
||||
"device_identity/device_oauth2_token_store_desktop.cc",
|
||||
"device_identity/device_oauth2_token_store_desktop.h",
|
||||
"device_notifications/device_status_icon_renderer.cc",
|
||||
@@ -4670,8 +4651,6 @@ static_library("browser") {
|
||||
@@ -4735,8 +4716,6 @@ static_library("browser") {
|
||||
"profiles/profile_activity_metrics_recorder.h",
|
||||
"profiles/profile_list_desktop.cc",
|
||||
"profiles/profile_list_desktop.h",
|
||||
@@ -100,7 +100,7 @@
|
||||
"signin/force_signin_verifier.cc",
|
||||
"signin/force_signin_verifier.h",
|
||||
"signin/signin_manager.cc",
|
||||
@@ -5471,7 +5450,6 @@ static_library("browser") {
|
||||
@@ -5541,7 +5520,6 @@ static_library("browser") {
|
||||
"//chrome/browser/policy:system_features_disable_list",
|
||||
"//chrome/browser/push_notification:push_notification",
|
||||
"//chrome/browser/resources:app_icon_resources",
|
||||
@@ -108,7 +108,7 @@
|
||||
"//chrome/browser/sharesheet",
|
||||
"//chrome/browser/support_tool/ash",
|
||||
"//chrome/browser/ui/ash/accelerator",
|
||||
@@ -5738,7 +5716,6 @@ static_library("browser") {
|
||||
@@ -5808,7 +5786,6 @@ static_library("browser") {
|
||||
"//remoting/host/chromeos:browser_interop",
|
||||
"//remoting/host/chromeos:features",
|
||||
"//services/device/public/cpp/geolocation",
|
||||
@@ -116,22 +116,9 @@
|
||||
"//third_party/nearby:rpc_resources_proto",
|
||||
"//third_party/nearby:wire_format_proto",
|
||||
"//ui/chromeos",
|
||||
@@ -7993,12 +7970,6 @@ static_library("browser") {
|
||||
}
|
||||
|
||||
if (enable_pdf) {
|
||||
- sources += [
|
||||
- "accessibility/pdf_ocr_controller.cc",
|
||||
- "accessibility/pdf_ocr_controller.h",
|
||||
- "accessibility/pdf_ocr_controller_factory.cc",
|
||||
- "accessibility/pdf_ocr_controller_factory.h",
|
||||
- ]
|
||||
deps += [
|
||||
"//chrome/browser/pdf",
|
||||
"//chrome/browser/pdf:pdf_pref_names",
|
||||
--- a/chrome/browser/accessibility/tree_fixing/BUILD.gn
|
||||
+++ b/chrome/browser/accessibility/tree_fixing/BUILD.gn
|
||||
@@ -64,11 +64,9 @@ source_set("internal") {
|
||||
@@ -63,11 +63,9 @@ source_set("internal") {
|
||||
deps = [
|
||||
"//base",
|
||||
"//chrome/browser/profiles:profile",
|
||||
@@ -192,7 +179,7 @@
|
||||
std::unique_ptr<BrowserProcessPlatformPart> platform_part_;
|
||||
--- a/chrome/browser/chrome_browser_interface_binders.cc
|
||||
+++ b/chrome/browser/chrome_browser_interface_binders.cc
|
||||
@@ -81,8 +81,6 @@
|
||||
@@ -83,8 +83,6 @@
|
||||
|
||||
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || \
|
||||
BUILDFLAG(IS_CHROMEOS)
|
||||
@@ -201,7 +188,7 @@
|
||||
#include "chrome/browser/ui/web_applications/sub_apps_service_impl.h"
|
||||
#endif
|
||||
|
||||
@@ -362,27 +360,6 @@ void BindMediaFoundationPreferences(
|
||||
@@ -364,27 +362,6 @@ void BindMediaFoundationPreferences(
|
||||
}
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
@@ -229,7 +216,7 @@
|
||||
|
||||
void BindModelBroker(
|
||||
content::RenderFrameHost* frame_host,
|
||||
@@ -532,11 +509,6 @@ void PopulateChromeFrameBinders(
|
||||
@@ -560,11 +537,6 @@ void PopulateChromeFrameBinders(
|
||||
base::BindRepeating(&web_app::SubAppsServiceImpl::CreateIfAllowed));
|
||||
}
|
||||
|
||||
@@ -243,7 +230,7 @@
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
--- a/chrome/browser/component_updater/registration.cc
|
||||
+++ b/chrome/browser/component_updater/registration.cc
|
||||
@@ -72,8 +72,6 @@
|
||||
@@ -66,8 +66,6 @@
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
#include "chrome/browser/component_updater/real_time_url_checks_allowlist_component_installer.h"
|
||||
@@ -252,7 +239,7 @@
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
@@ -239,9 +237,6 @@ void RegisterComponentsForUpdate() {
|
||||
@@ -229,9 +227,6 @@ void RegisterComponentsForUpdate() {
|
||||
|
||||
RegisterAutofillStatesComponent(cus, g_browser_process->local_state());
|
||||
|
||||
@@ -388,7 +375,7 @@
|
||||
"prediction_service_request.cc",
|
||||
--- a/chrome/browser/permissions/prediction_based_permission_ui_selector.cc
|
||||
+++ b/chrome/browser/permissions/prediction_based_permission_ui_selector.cc
|
||||
@@ -250,30 +250,6 @@ void PredictionBasedPermissionUiSelector
|
||||
@@ -249,30 +249,6 @@ void PredictionBasedPermissionUiSelector
|
||||
if (snapshot.drawsNothing()) {
|
||||
VLOG(1) << "[PermissionsAIv3] The page's snapshot is empty";
|
||||
} else {
|
||||
@@ -444,9 +431,9 @@
|
||||
VLOG(1) << "[PermissionsAIv1] The page's content is too short or empty";
|
||||
--- a/chrome/browser/prefs/BUILD.gn
|
||||
+++ b/chrome/browser/prefs/BUILD.gn
|
||||
@@ -286,7 +286,6 @@ source_set("impl") {
|
||||
} else {
|
||||
@@ -293,7 +293,6 @@ source_set("impl") {
|
||||
deps += [
|
||||
"//chrome/browser/contextual_cueing",
|
||||
"//chrome/browser/promos:utils",
|
||||
- "//chrome/browser/screen_ai:prefs",
|
||||
"//chrome/browser/search/background",
|
||||
@@ -454,7 +441,7 @@
|
||||
"//chrome/browser/search_engines",
|
||||
--- a/chrome/browser/prefs/browser_prefs.cc
|
||||
+++ b/chrome/browser/prefs/browser_prefs.cc
|
||||
@@ -1842,9 +1842,6 @@ void RegisterLocalState(PrefRegistrySimp
|
||||
@@ -1915,9 +1915,6 @@ void RegisterLocalState(PrefRegistrySimp
|
||||
DeviceOAuth2TokenStoreDesktop::RegisterPrefs(registry);
|
||||
#endif
|
||||
|
||||
@@ -466,7 +453,7 @@
|
||||
PlatformAuthPolicyObserver::RegisterPrefs(registry);
|
||||
--- a/chrome/browser/profiles/BUILD.gn
|
||||
+++ b/chrome/browser/profiles/BUILD.gn
|
||||
@@ -305,7 +305,6 @@ source_set("profiles_extra_parts_impl")
|
||||
@@ -309,7 +309,6 @@ source_set("profiles_extra_parts_impl")
|
||||
]
|
||||
} else {
|
||||
deps += [
|
||||
@@ -474,7 +461,7 @@
|
||||
"//chrome/browser/apps/app_service",
|
||||
"//chrome/browser/autofill",
|
||||
"//chrome/browser/contextual_cueing",
|
||||
@@ -313,7 +312,6 @@ source_set("profiles_extra_parts_impl")
|
||||
@@ -317,7 +316,6 @@ source_set("profiles_extra_parts_impl")
|
||||
"//chrome/browser/feedback",
|
||||
"//chrome/browser/hid",
|
||||
"//chrome/browser/media/router/discovery/access_code:access_code_sink_service",
|
||||
@@ -492,7 +479,7 @@
|
||||
#include "chrome/browser/navigation_predictor/search_engine_preconnector.h"
|
||||
#include "chrome/browser/navigation_predictor/search_engine_preconnector_keyed_service_factory.h"
|
||||
#include "chrome/browser/net/dns_probe_service_factory.h"
|
||||
@@ -332,7 +331,6 @@
|
||||
@@ -334,7 +333,6 @@
|
||||
#include "chrome/browser/prefs/persistent_renderer_prefs_manager_factory.h"
|
||||
#include "chrome/browser/privacy_sandbox/privacy_sandbox_survey_desktop_controller_factory.h"
|
||||
#include "chrome/browser/profile_resetter/reset_report_uploader_factory.h"
|
||||
@@ -500,7 +487,7 @@
|
||||
#include "chrome/browser/search/background/ntp_background_service_factory.h"
|
||||
#include "chrome/browser/search/background/ntp_custom_background_service_factory.h"
|
||||
#include "chrome/browser/search/instant_service_factory.h"
|
||||
@@ -1039,7 +1037,6 @@ void ChromeBrowserMainExtraPartsProfiles
|
||||
@@ -1046,7 +1044,6 @@ void ChromeBrowserMainExtraPartsProfiles
|
||||
#if BUILDFLAG(CHROME_ROOT_STORE_CERT_MANAGEMENT_UI)
|
||||
net::ServerCertificateDatabaseServiceFactory::GetInstance();
|
||||
#endif
|
||||
@@ -508,7 +495,7 @@
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
NearbySharingServiceFactory::GetInstance();
|
||||
if (base::FeatureList::IsEnabled(ash::features::kNearbyPresence)) {
|
||||
@@ -1091,9 +1088,6 @@ void ChromeBrowserMainExtraPartsProfiles
|
||||
@@ -1098,9 +1095,6 @@ void ChromeBrowserMainExtraPartsProfiles
|
||||
OneTimePermissionsTrackerFactory::GetInstance();
|
||||
#endif
|
||||
OpenerHeuristicServiceFactory::GetInstance();
|
||||
@@ -518,7 +505,7 @@
|
||||
OptimizationGuideKeyedServiceFactory::GetInstance();
|
||||
OriginKeyedPermissionActionServiceFactory::GetInstance();
|
||||
OriginTrialsFactory::GetInstance();
|
||||
@@ -1168,13 +1162,6 @@ void ChromeBrowserMainExtraPartsProfiles
|
||||
@@ -1175,13 +1169,6 @@ void ChromeBrowserMainExtraPartsProfiles
|
||||
policy::UserPolicySigninServiceFactory::GetInstance();
|
||||
#endif
|
||||
PolicyBlocklistFactory::GetInstance();
|
||||
@@ -532,21 +519,18 @@
|
||||
PredictionServiceFactory::GetInstance();
|
||||
predictors::AutocompleteActionPredictorFactory::GetInstance();
|
||||
predictors::LoadingPredictorFactory::GetInstance();
|
||||
@@ -1261,13 +1248,6 @@ void ChromeBrowserMainExtraPartsProfiles
|
||||
@@ -1270,10 +1257,6 @@ void ChromeBrowserMainExtraPartsProfiles
|
||||
#else
|
||||
SafetyHubMenuNotificationServiceFactory::GetInstance();
|
||||
SafetyHubHatsServiceFactory::GetInstance();
|
||||
- if (features::IsMainNodeAnnotationsEnabled()) {
|
||||
- screen_ai::AXMainNodeAnnotatorControllerFactory::GetInstance();
|
||||
- }
|
||||
-#if BUILDFLAG(ENABLE_PDF)
|
||||
- screen_ai::PdfOcrControllerFactory::GetInstance();
|
||||
-#endif
|
||||
- screen_ai::ScreenAIServiceRouterFactory::EnsureFactoryBuilt();
|
||||
#endif
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
if (ash::features::IsScannerEnabled()) {
|
||||
@@ -1378,7 +1358,6 @@ void ChromeBrowserMainExtraPartsProfiles
|
||||
@@ -1387,7 +1370,6 @@ void ChromeBrowserMainExtraPartsProfiles
|
||||
TrackingProtectionSettingsFactory::GetInstance();
|
||||
translate::TranslateRankerFactory::GetInstance();
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
@@ -570,25 +554,12 @@
|
||||
// System Profile.
|
||||
--- a/chrome/browser/profiles/profile_impl.cc
|
||||
+++ b/chrome/browser/profiles/profile_impl.cc
|
||||
@@ -845,24 +845,6 @@ void ProfileImpl::DoFinalInit(CreateMode
|
||||
@@ -853,11 +853,6 @@ void ProfileImpl::DoFinalInit(CreateMode
|
||||
// The password settings service needs to start listening to settings
|
||||
// changes from Google Mobile Services, as early as possible.
|
||||
PasswordManagerSettingsServiceFactory::GetForProfile(this);
|
||||
-#else
|
||||
-
|
||||
-#if BUILDFLAG(ENABLE_PDF)
|
||||
- bool pcf_ocr_may_be_needed = true;
|
||||
-#if BUILDFLAG(IS_CHROMEOS)
|
||||
- // `PdfOcrControllerFactory` is not needed in the not-signed-in profile of
|
||||
- // ChromeOS as no user navigation to PDFs is possible there.
|
||||
- pcf_ocr_may_be_needed = IsSignedIn();
|
||||
-#endif
|
||||
- // Create the PDF OCR controller so that it can self-activate as needed.
|
||||
- if (pcf_ocr_may_be_needed) {
|
||||
- screen_ai::PdfOcrControllerFactory::GetForProfile(this);
|
||||
- }
|
||||
-#endif // BUILDFLAG(ENABLE_PDF)
|
||||
-
|
||||
- if (features::IsMainNodeAnnotationsEnabled()) {
|
||||
- screen_ai::AXMainNodeAnnotatorControllerFactory::GetForProfile(this);
|
||||
- }
|
||||
@@ -597,7 +568,7 @@
|
||||
// The announcement notification service might not be available for some
|
||||
--- a/chrome/browser/profiles/profile_manager.cc
|
||||
+++ b/chrome/browser/profiles/profile_manager.cc
|
||||
@@ -50,7 +50,6 @@
|
||||
@@ -51,7 +51,6 @@
|
||||
#include "chrome/browser/extensions/chrome_content_browser_client_extensions_part.h"
|
||||
#include "chrome/browser/lifetime/application_lifetime.h"
|
||||
#include "chrome/browser/navigation_predictor/navigation_predictor_keyed_service_factory.h"
|
||||
@@ -605,7 +576,7 @@
|
||||
#include "chrome/browser/prefs/incognito_mode_prefs.h"
|
||||
#include "chrome/browser/profiles/delete_profile_helper.h"
|
||||
#include "chrome/browser/profiles/keep_alive/profile_keep_alive_types.h"
|
||||
@@ -1509,9 +1508,6 @@ void ProfileManager::DoFinalInitForServi
|
||||
@@ -1493,9 +1492,6 @@ void ProfileManager::DoFinalInitForServi
|
||||
// Ensure NavigationPredictorKeyedService is started.
|
||||
NavigationPredictorKeyedServiceFactory::GetForProfile(profile);
|
||||
|
||||
@@ -617,7 +588,7 @@
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
--- a/chrome/browser/resources/BUILD.gn
|
||||
+++ b/chrome/browser/resources/BUILD.gn
|
||||
@@ -100,7 +100,6 @@ group("resources") {
|
||||
@@ -101,7 +101,6 @@ group("resources") {
|
||||
if (is_mac) {
|
||||
public_deps += [
|
||||
"//chrome/browser/resources/media/mei_preload:component",
|
||||
@@ -627,7 +598,7 @@
|
||||
|
||||
--- a/chrome/browser/resources/pdf/pdf_viewer.html
|
||||
+++ b/chrome/browser/resources/pdf/pdf_viewer.html
|
||||
@@ -100,10 +100,6 @@ import {AnnotationMode} from './constant
|
||||
@@ -107,10 +107,6 @@ import {AnnotationMode} from './constant
|
||||
</cr-page-selector>
|
||||
` : ''}
|
||||
</if>
|
||||
@@ -640,7 +611,7 @@
|
||||
${this.showErrorDialog ? html`<viewer-error-dialog id="error-dialog">
|
||||
--- a/chrome/browser/ui/BUILD.gn
|
||||
+++ b/chrome/browser/ui/BUILD.gn
|
||||
@@ -1657,8 +1657,6 @@ static_library("ui") {
|
||||
@@ -1631,8 +1631,6 @@ static_library("ui") {
|
||||
"//chrome/browser/regional_capabilities",
|
||||
"//chrome/browser/safe_browsing",
|
||||
"//chrome/browser/safe_browsing:advanced_protection",
|
||||
@@ -649,7 +620,7 @@
|
||||
"//chrome/browser/smart_card:smart_card",
|
||||
"//chrome/browser/tab_group_sync:utils",
|
||||
"//chrome/browser/themes",
|
||||
@@ -2370,7 +2368,6 @@ static_library("ui") {
|
||||
@@ -2348,7 +2346,6 @@ static_library("ui") {
|
||||
"//chrome/browser/policy:onc",
|
||||
"//chrome/browser/policy:system_features_disable_list",
|
||||
"//chrome/browser/push_notification:push_notification",
|
||||
@@ -677,17 +648,29 @@
|
||||
"//chrome/common",
|
||||
--- a/chrome/browser/ui/pdf/chrome_pdf_document_helper_client.cc
|
||||
+++ b/chrome/browser/ui/pdf/chrome_pdf_document_helper_client.cc
|
||||
@@ -97,10 +97,4 @@ void ChromePDFDocumentHelperClient::SetP
|
||||
@@ -95,12 +95,3 @@ void ChromePDFDocumentHelperClient::SetP
|
||||
}
|
||||
}
|
||||
|
||||
void ChromePDFDocumentHelperClient::OnSearchifyStarted(
|
||||
content::WebContents* contents) {
|
||||
-void ChromePDFDocumentHelperClient::OnSearchifyStarted(
|
||||
- content::WebContents* contents) {
|
||||
- // TODO(crbug.com/360803943): Add test.
|
||||
- // Show the promo only when ScreenAI component is available and OCR can be
|
||||
- // done.
|
||||
- if (screen_ai::ScreenAIInstallState::GetInstance()->IsComponentAvailable()) {
|
||||
- MaybeShowFeaturePromo(contents);
|
||||
- }
|
||||
}
|
||||
-}
|
||||
--- a/chrome/browser/ui/pdf/chrome_pdf_document_helper_client.h
|
||||
+++ b/chrome/browser/ui/pdf/chrome_pdf_document_helper_client.h
|
||||
@@ -24,7 +24,6 @@ class ChromePDFDocumentHelperClient : pu
|
||||
void OnSaveURL(content::WebContents* contents) override;
|
||||
void SetPluginCanSave(content::RenderFrameHost* render_frame_host,
|
||||
bool can_save) override;
|
||||
- void OnSearchifyStarted(content::WebContents* contents) override;
|
||||
};
|
||||
|
||||
#endif // CHROME_BROWSER_UI_PDF_CHROME_PDF_DOCUMENT_HELPER_CLIENT_H_
|
||||
--- a/chrome/browser/ui/webui/settings/accessibility_main_handler.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/accessibility_main_handler.cc
|
||||
@@ -35,11 +35,6 @@ void AccessibilityMainHandler::RegisterM
|
||||
@@ -793,7 +776,7 @@
|
||||
#include "chrome/browser/speech/extension_api/tts_engine_extension_api.h"
|
||||
#include "chrome/browser/translate/chrome_translate_client.h"
|
||||
#include "chrome/browser/ui/browser.h"
|
||||
@@ -369,24 +367,6 @@ ReadAnythingUntrustedPageHandler::ReadAn
|
||||
@@ -370,14 +368,6 @@ ReadAnythingUntrustedPageHandler::ReadAn
|
||||
prefs_lang = language::ExtractBaseLanguage(prefs_lang);
|
||||
SetDefaultLanguageCode(prefs_lang);
|
||||
|
||||
@@ -804,33 +787,10 @@
|
||||
- base::BindOnce(
|
||||
- &ReadAnythingUntrustedPageHandler::OnScreenAIServiceInitialized,
|
||||
- weak_factory_.GetWeakPtr()));
|
||||
-#if BUILDFLAG(ENABLE_PDF)
|
||||
- // PDF searchify feature adds OCR text to images while loading the PDF, so
|
||||
- // warming up the OCR service is not needed.
|
||||
- if (!base::FeatureList::IsEnabled(chrome_pdf::features::kPdfSearchify)) {
|
||||
- screen_ai::ScreenAIServiceRouterFactory::GetForBrowserContext(profile_)
|
||||
- ->GetServiceStateAsync(
|
||||
- screen_ai::ScreenAIServiceRouter::Service::kOCR,
|
||||
- base::DoNothing());
|
||||
- }
|
||||
-#endif // BUILDFLAG(ENABLE_PDF)
|
||||
- }
|
||||
|
||||
// Enable accessibility for the top level render frame and all descendants.
|
||||
// This causes AXTreeSerializer to reset and send accessibility events of
|
||||
@@ -856,12 +836,6 @@ void ReadAnythingUntrustedPageHandler::S
|
||||
weak_factory_.GetSafeRef(), inner_contents[0], kReadAnythingAXMode);
|
||||
}
|
||||
}
|
||||
- // PDF searchify feature adds OCR text to images while loading the PDF, so
|
||||
- // activating PDF OCR is not needed.
|
||||
- if (use_screen_ai_service_ &&
|
||||
- !base::FeatureList::IsEnabled(chrome_pdf::features::kPdfSearchify)) {
|
||||
- screen_ai::PdfOcrControllerFactory::GetForProfile(profile_)->Activate();
|
||||
- }
|
||||
#endif // BUILDFLAG(ENABLE_PDF)
|
||||
}
|
||||
|
||||
--- a/chrome/renderer/BUILD.gn
|
||||
+++ b/chrome/renderer/BUILD.gn
|
||||
@@ -373,18 +373,6 @@ static_library("renderer") {
|
||||
@@ -862,15 +822,15 @@
|
||||
]
|
||||
--- a/chrome/renderer/chrome_render_frame_observer.cc
|
||||
+++ b/chrome/renderer/chrome_render_frame_observer.cc
|
||||
@@ -69,7 +69,6 @@
|
||||
@@ -70,7 +70,6 @@
|
||||
#include "url/gurl.h"
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
-#include "chrome/renderer/accessibility/read_anything/read_anything_app_controller.h"
|
||||
#include "chrome/renderer/actor/journal.h"
|
||||
#include "chrome/renderer/actor/tool_executor.h"
|
||||
#include "chrome/renderer/searchbox/searchbox_extension.h"
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
@@ -318,21 +317,6 @@ void ChromeRenderFrameObserver::DidCommi
|
||||
@@ -323,21 +322,6 @@ void ChromeRenderFrameObserver::DidCommi
|
||||
}
|
||||
|
||||
void ChromeRenderFrameObserver::DidClearWindowObject() {
|
||||
@@ -894,7 +854,7 @@
|
||||
void ChromeRenderFrameObserver::DidMeaningfulLayout(
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -2275,9 +2275,6 @@ if (!is_android) {
|
||||
@@ -2334,9 +2334,6 @@ if (!is_android) {
|
||||
"//chrome/browser/resource_coordinator:tab_manager_features",
|
||||
"//chrome/browser/safe_browsing:advanced_protection",
|
||||
"//chrome/browser/safe_browsing:verdict_cache_manager_factory",
|
||||
@@ -904,17 +864,16 @@
|
||||
"//chrome/browser/search",
|
||||
"//chrome/browser/search_engines",
|
||||
"//chrome/browser/segmentation_platform:test_utils",
|
||||
@@ -2699,9 +2696,6 @@ if (!is_android) {
|
||||
"//services/network/public/proto:sct_audit_report_proto",
|
||||
@@ -2755,8 +2752,6 @@ if (!is_android) {
|
||||
"//services/preferences/public/cpp",
|
||||
"//services/preferences/public/cpp/tracked",
|
||||
- "//services/screen_ai:test_support",
|
||||
"//services/preferences/tracked:features",
|
||||
- "//services/screen_ai/public/cpp:utilities",
|
||||
- "//services/screen_ai/public/mojom",
|
||||
"//services/service_manager/public/cpp",
|
||||
"//services/strings",
|
||||
"//services/test/echo/public/mojom",
|
||||
@@ -8265,7 +8259,6 @@ test("unit_tests") {
|
||||
@@ -8405,7 +8400,6 @@ test("unit_tests") {
|
||||
#
|
||||
# TODO(crbug.com/417513088): Maybe merge with the non-android `deps` declaration above?
|
||||
deps += [
|
||||
@@ -922,7 +881,7 @@
|
||||
"//chrome:packed_resources_integrity_header",
|
||||
"//chrome/browser/apps:icon_standardizer",
|
||||
"//chrome/browser/apps/app_service",
|
||||
@@ -8299,7 +8292,6 @@ test("unit_tests") {
|
||||
@@ -8439,7 +8433,6 @@ test("unit_tests") {
|
||||
"//chrome/browser/profile_resetter:fake_profile_resetter",
|
||||
"//chrome/browser/resource_coordinator:tab_manager_features",
|
||||
"//chrome/browser/resources/new_tab_page_instant:resources_grit",
|
||||
@@ -930,14 +889,6 @@
|
||||
"//chrome/browser/search/background",
|
||||
"//chrome/browser/search/background:constants",
|
||||
"//chrome/browser/search_engine_choice:unit_tests",
|
||||
@@ -8413,7 +8405,6 @@ test("unit_tests") {
|
||||
"//components/webapps/browser",
|
||||
"//services/metrics/public/cpp:ukm_builders",
|
||||
"//services/network:test_support",
|
||||
- "//services/screen_ai:test_support",
|
||||
"//third_party/crashpad/crashpad/util",
|
||||
"//third_party/libaddressinput",
|
||||
"//third_party/lzma_sdk/google:unit_tests",
|
||||
--- a/chrome/test/chromedriver/BUILD.gn
|
||||
+++ b/chrome/test/chromedriver/BUILD.gn
|
||||
@@ -408,7 +408,7 @@ source_set("lib") {
|
||||
@@ -1003,7 +954,7 @@
|
||||
#if BUILDFLAG(ENABLE_BROWSER_SPEECH_SERVICE)
|
||||
--- a/components/BUILD.gn
|
||||
+++ b/components/BUILD.gn
|
||||
@@ -600,7 +600,6 @@ test("components_unittests") {
|
||||
@@ -607,7 +607,6 @@ test("components_unittests") {
|
||||
"//components/media_router/common/providers/cast/channel:unit_tests",
|
||||
"//components/page_info:unit_tests",
|
||||
"//components/permissions:unit_tests",
|
||||
@@ -1013,7 +964,7 @@
|
||||
"//components/safety_check:unit_tests",
|
||||
--- a/components/omnibox/browser/autocomplete_classifier.cc
|
||||
+++ b/components/omnibox/browser/autocomplete_classifier.cc
|
||||
@@ -126,8 +126,6 @@ void AutocompleteClassifier::Classify(
|
||||
@@ -127,8 +127,6 @@ void AutocompleteClassifier::Classify(
|
||||
metrics::OmniboxEventProto::PageClassification page_classification,
|
||||
AutocompleteMatch* match,
|
||||
GURL* alternate_nav_url) {
|
||||
@@ -1022,95 +973,6 @@
|
||||
DCHECK(!inside_classify_);
|
||||
base::AutoReset<bool> reset(&inside_classify_, true);
|
||||
AutocompleteInput input(text, page_classification, *scheme_classifier_);
|
||||
--- a/components/pdf/renderer/pdf_accessibility_tree.cc
|
||||
+++ b/components/pdf/renderer/pdf_accessibility_tree.cc
|
||||
@@ -537,20 +537,6 @@ void PdfAccessibilityTree::SetAccessibil
|
||||
std::move(chars), std::move(page_objects)));
|
||||
}
|
||||
|
||||
-void PdfAccessibilityTree::OnHasSearchifyText() {
|
||||
- // TODO(crbug.com/360803943): Look into if `render_frame()` can be null, why
|
||||
- // it is assumed to be not null in `SetOcrCompleteStatus()`, and create a
|
||||
- // better distinction between `render_frame()` and `render_frame_`.
|
||||
- // TODO(accessibility): remove this dependency.
|
||||
- content::RenderAccessibility* render_accessibility =
|
||||
- render_frame() ? render_frame()->GetRenderAccessibility() : nullptr;
|
||||
- bool screen_reader_mode =
|
||||
- (render_accessibility && render_accessibility->GetAXMode().has_mode(
|
||||
- ui::AXMode::kExtendedProperties));
|
||||
- base::UmaHistogramBoolean(
|
||||
- "Accessibility.ScreenAI.Searchify.ScreenReaderModeEnabled",
|
||||
- screen_reader_mode);
|
||||
-}
|
||||
|
||||
void PdfAccessibilityTree::DoSetAccessibilityPageInfo(
|
||||
const chrome_pdf::AccessibilityPageInfo& page_info,
|
||||
--- a/components/pdf/renderer/pdf_accessibility_tree_builder.cc
|
||||
+++ b/components/pdf/renderer/pdf_accessibility_tree_builder.cc
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "base/containers/fixed_flat_map.h"
|
||||
#include "base/i18n/break_iterator.h"
|
||||
#include "base/strings/utf_string_conversion_utils.h"
|
||||
-#include "components/pdf/renderer/pdf_ocr_helper.h"
|
||||
#include "components/strings/grit/components_strings.h"
|
||||
#include "pdf/accessibility_structs.h"
|
||||
#include "pdf/pdf_features.h"
|
||||
@@ -994,8 +993,6 @@ ui::AXNodeData* PdfAccessibilityTreeBuil
|
||||
wrapper_node->relative_bounds.bounds = gfx::RectF(position, gfx::SizeF(1, 1));
|
||||
|
||||
ui::AXNodeData* text_node = CreateStaticTextNode();
|
||||
- text_node->SetNameChecked(l10n_util::GetStringUTF8(
|
||||
- start ? IDS_PDF_OCR_RESULT_BEGIN : IDS_PDF_OCR_RESULT_END));
|
||||
text_node->relative_bounds.bounds = wrapper_node->relative_bounds.bounds;
|
||||
wrapper_node->child_ids.push_back(text_node->id);
|
||||
return wrapper_node;
|
||||
--- a/components/pdf/renderer/pdf_view_web_plugin_client.cc
|
||||
+++ b/components/pdf/renderer/pdf_view_web_plugin_client.cc
|
||||
@@ -203,44 +203,6 @@ PdfViewWebPluginClient::CreateAssociated
|
||||
return GetFrame()->CreateAssociatedURLLoader(options);
|
||||
}
|
||||
|
||||
-void PdfViewWebPluginClient::GetOcrMaxImageDimension(
|
||||
- base::OnceCallback<void(uint32_t)> callback) {
|
||||
- ConnectOcrIfNeeded();
|
||||
- return screen_ai_annotator_->GetMaxImageDimension(std::move(callback));
|
||||
-}
|
||||
-
|
||||
-void PdfViewWebPluginClient::PerformOcr(
|
||||
- const SkBitmap& image,
|
||||
- base::OnceCallback<void(screen_ai::mojom::VisualAnnotationPtr)> callback) {
|
||||
- ConnectOcrIfNeeded();
|
||||
- screen_ai_annotator_->PerformOcrAndReturnAnnotation(image,
|
||||
- std::move(callback));
|
||||
-}
|
||||
-
|
||||
-void PdfViewWebPluginClient::SetOcrDisconnectedCallback(
|
||||
- base::RepeatingClosure callback) {
|
||||
- ocr_disconnect_callback_ = std::move(callback);
|
||||
-}
|
||||
-
|
||||
-void PdfViewWebPluginClient::OnOcrDisconnected() {
|
||||
- screen_ai_annotator_.reset();
|
||||
- CHECK(ocr_disconnect_callback_);
|
||||
- ocr_disconnect_callback_.Run();
|
||||
-}
|
||||
-
|
||||
-void PdfViewWebPluginClient::ConnectOcrIfNeeded() {
|
||||
- CHECK(base::FeatureList::IsEnabled(ax::mojom::features::kScreenAIOCREnabled));
|
||||
-
|
||||
- if (!screen_ai_annotator_.is_bound()) {
|
||||
- render_frame_->GetBrowserInterfaceBroker().GetInterface(
|
||||
- screen_ai_annotator_.BindNewPipeAndPassReceiver());
|
||||
- screen_ai_annotator_->SetClientType(
|
||||
- screen_ai::mojom::OcrClientType::kPdfViewer);
|
||||
- screen_ai_annotator_.set_disconnect_handler(
|
||||
- base::BindOnce(&PdfViewWebPluginClient::OnOcrDisconnected,
|
||||
- weak_factory_.GetWeakPtr()));
|
||||
- }
|
||||
-}
|
||||
|
||||
void PdfViewWebPluginClient::UpdateTextInputState() {
|
||||
// `widget` is null in Print Preview.
|
||||
--- a/components/pdf/renderer/pdf_view_web_plugin_client.h
|
||||
+++ b/components/pdf/renderer/pdf_view_web_plugin_client.h
|
||||
@@ -12,7 +12,6 @@
|
||||
@@ -1121,27 +983,7 @@
|
||||
|
||||
namespace blink {
|
||||
class WebLocalFrame;
|
||||
@@ -87,19 +86,10 @@ class PdfViewWebPluginClient : public ch
|
||||
chrome_pdf::PdfAccessibilityImageFetcher* image_fetcher,
|
||||
blink::WebPluginContainer* plugin_element,
|
||||
bool print_preview) override;
|
||||
- void GetOcrMaxImageDimension(
|
||||
- base::OnceCallback<void(uint32_t)> callback) override;
|
||||
- void PerformOcr(
|
||||
- const SkBitmap& image,
|
||||
- base::OnceCallback<void(screen_ai::mojom::VisualAnnotationPtr)> callback)
|
||||
- override;
|
||||
- void SetOcrDisconnectedCallback(base::RepeatingClosure callback) override;
|
||||
|
||||
private:
|
||||
blink::WebLocalFrame* GetFrame() const;
|
||||
|
||||
- void OnOcrDisconnected();
|
||||
- void ConnectOcrIfNeeded();
|
||||
|
||||
const raw_ptr<content::RenderFrame> render_frame_;
|
||||
|
||||
@@ -108,8 +98,6 @@ class PdfViewWebPluginClient : public ch
|
||||
@@ -110,8 +109,6 @@ class PdfViewWebPluginClient : public ch
|
||||
|
||||
raw_ptr<blink::WebPluginContainer> plugin_container_;
|
||||
|
||||
@@ -1174,74 +1016,6 @@
|
||||
if (v8_use_external_startup_data) {
|
||||
public_deps += [ "//v8" ]
|
||||
if (use_v8_context_snapshot) {
|
||||
--- a/pdf/accessibility.cc
|
||||
+++ b/pdf/accessibility.cc
|
||||
@@ -46,7 +46,6 @@ void GetAccessibilityInfo(PDFiumEngine*
|
||||
page_info.page_index = page_index;
|
||||
page_info.bounds = page->rect();
|
||||
page_info.char_count = char_count;
|
||||
- page_info.is_searchified = page->IsPageSearchified();
|
||||
page->GetTextAndImageInfo(text_runs, chars, page_objects.images);
|
||||
page_info.text_run_count = text_runs.size();
|
||||
page_objects.links = page->GetLinkInfo(text_runs);
|
||||
--- a/pdf/pdf_view_web_plugin.cc
|
||||
+++ b/pdf/pdf_view_web_plugin.cc
|
||||
@@ -1378,14 +1378,6 @@ void PdfViewWebPlugin::DocumentLoadCompl
|
||||
if (accessibility_state_ == AccessibilityState::kPending)
|
||||
LoadAccessibility();
|
||||
|
||||
- // To avoid delaying page load for searchify, start searchify after document
|
||||
- // load is completed.
|
||||
- // Maximum image dimension is asked once and stored for the next usages, so
|
||||
- // `BindOnce` is sufficient.
|
||||
- client_->SetOcrDisconnectedCallback(engine_->GetOcrDisconnectHandler());
|
||||
- engine_->StartSearchify(
|
||||
- base::BindOnce(&Client::GetOcrMaxImageDimension, client_->GetWeakPtr()),
|
||||
- base::BindRepeating(&Client::PerformOcr, client_->GetWeakPtr()));
|
||||
|
||||
if (!full_frame_)
|
||||
return;
|
||||
@@ -2482,7 +2474,7 @@ void PdfViewWebPlugin::EnableAccessibili
|
||||
|
||||
SkBitmap PdfViewWebPlugin::GetImageForOcr(int32_t page_index,
|
||||
int32_t page_object_index) {
|
||||
- return engine_->GetImageForOcr(page_index, page_object_index);
|
||||
+ return SkBitmap();
|
||||
}
|
||||
|
||||
void PdfViewWebPlugin::HandleAccessibilityAction(
|
||||
@@ -3001,19 +2993,6 @@ void PdfViewWebPlugin::PrepareAndSetAcce
|
||||
return;
|
||||
}
|
||||
|
||||
- // Wait for the page to be loaded and searchified before getting accessibility
|
||||
- // page info.
|
||||
- // Ensure page is loaded so that it can schedule a searchify operation if
|
||||
- // needed.
|
||||
- engine_->GetPage(page_index)->GetPage();
|
||||
- if (engine_->PageNeedsSearchify(page_index)) {
|
||||
- base::SingleThreadTaskRunner::GetCurrentDefault()->PostDelayedTask(
|
||||
- FROM_HERE,
|
||||
- base::BindOnce(&PdfViewWebPlugin::PrepareAndSetAccessibilityPageInfo,
|
||||
- weak_factory_.GetWeakPtr(), page_index),
|
||||
- kAccessibilityPageDelay * 10);
|
||||
- return;
|
||||
- }
|
||||
|
||||
++next_accessibility_page_index_;
|
||||
|
||||
--- a/pdf/pdfium/pdfium_engine.cc
|
||||
+++ b/pdf/pdfium/pdfium_engine.cc
|
||||
@@ -2674,8 +2674,7 @@ SkBitmap PDFiumEngine::GetImageForOcr(in
|
||||
// This function is not used after launch of PDF Searchify. Default OCR
|
||||
// expected resolution is used to avoid unnecessary update of the call chain.
|
||||
// TODO(crbug.com/360803943): Remove this function and call chain.
|
||||
- return pages_[page_index]->GetImageForOcr(image_index,
|
||||
- /*max_image_dimension=*/2048);
|
||||
+ return SkBitmap();
|
||||
}
|
||||
|
||||
bool PDFiumEngine::GetPrintScaling() {
|
||||
--- a/services/passage_embeddings/passage_embeddings_service.cc
|
||||
+++ b/services/passage_embeddings/passage_embeddings_service.cc
|
||||
@@ -23,7 +23,6 @@ PassageEmbeddingsService::~PassageEmbedd
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -613,8 +613,6 @@ static_library("browser") {
|
||||
"infobars/simple_alert_infobar_creator.h",
|
||||
@@ -634,8 +634,6 @@ static_library("browser") {
|
||||
"idle/idle_detection_permission_context.h",
|
||||
"interstitials/chrome_settings_page_helper.cc",
|
||||
"interstitials/chrome_settings_page_helper.h",
|
||||
- "interstitials/enterprise_util.cc",
|
||||
@@ -11,7 +11,7 @@
|
||||
"invalidation/profile_invalidation_provider_factory.cc",
|
||||
"invalidation/profile_invalidation_provider_factory.h",
|
||||
"k_anonymity_service/k_anonymity_service_client.cc",
|
||||
@@ -2346,7 +2344,6 @@ static_library("browser") {
|
||||
@@ -2385,7 +2383,6 @@ static_library("browser") {
|
||||
"//components/resources",
|
||||
"//components/safe_browsing/content/browser",
|
||||
"//components/safe_browsing/content/browser:safe_browsing_service",
|
||||
@@ -19,7 +19,7 @@
|
||||
"//components/safe_browsing/content/browser/password_protection",
|
||||
"//components/safe_browsing/content/browser/web_ui",
|
||||
"//components/safe_browsing/content/common/proto:download_file_types_proto",
|
||||
@@ -3956,10 +3953,6 @@ static_library("browser") {
|
||||
@@ -4001,10 +3998,6 @@ static_library("browser") {
|
||||
"new_tab_page/modules/modules_switches.h",
|
||||
"new_tab_page/modules/new_tab_page_modules.cc",
|
||||
"new_tab_page/modules/new_tab_page_modules.h",
|
||||
@@ -30,7 +30,7 @@
|
||||
"new_tab_page/modules/v2/authentication/microsoft_auth_page_handler.cc",
|
||||
"new_tab_page/modules/v2/authentication/microsoft_auth_page_handler.h",
|
||||
"new_tab_page/modules/v2/calendar/calendar_fake_data_helper.cc",
|
||||
@@ -8621,7 +8614,6 @@ static_library("browser_generated_files"
|
||||
@@ -8699,7 +8692,6 @@ static_library("browser_generated_files"
|
||||
"//chrome/browser/new_tab_page/chrome_colors:generate_chrome_colors_info",
|
||||
"//chrome/browser/new_tab_page/chrome_colors:generate_colors_info",
|
||||
"//chrome/browser/new_tab_page/modules/file_suggestion:mojo_bindings",
|
||||
@@ -38,7 +38,7 @@
|
||||
"//chrome/browser/new_tab_page/modules/v2/authentication:mojo_bindings",
|
||||
"//chrome/browser/new_tab_page/modules/v2/calendar:mojo_bindings",
|
||||
"//chrome/browser/new_tab_page/modules/v2/most_relevant_tab_resumption:mojo_bindings",
|
||||
@@ -9116,8 +9108,6 @@ static_library("test_support") {
|
||||
@@ -9187,8 +9179,6 @@ static_library("test_support") {
|
||||
"//components/reporting/util:status",
|
||||
"//components/reporting/util:status_macros",
|
||||
"//components/reporting/util:task_runner_context",
|
||||
@@ -74,7 +74,7 @@
|
||||
// Launch a HaTS survey. Note this needs to come before the command is
|
||||
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
|
||||
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
|
||||
@@ -171,7 +171,6 @@ using content::DownloadManager;
|
||||
@@ -172,7 +172,6 @@ using content::DownloadManager;
|
||||
using download::DownloadItem;
|
||||
using download::DownloadPathReservationTracker;
|
||||
using download::PathValidationResult;
|
||||
@@ -82,7 +82,7 @@
|
||||
using ConnectionType = net::NetworkChangeNotifier::ConnectionType;
|
||||
|
||||
#if BUILDFLAG(SAFE_BROWSING_DOWNLOAD_PROTECTION)
|
||||
@@ -1873,7 +1872,6 @@ void ChromeDownloadManagerDelegate::OnDo
|
||||
@@ -1876,7 +1875,6 @@ void ChromeDownloadManagerDelegate::OnDo
|
||||
DownloadItemModel model(item);
|
||||
model.DetermineAndSetShouldPreferOpeningInBrowser(
|
||||
target_info.target_path, target_info.is_filetype_handled_safely);
|
||||
@@ -90,7 +90,7 @@
|
||||
}
|
||||
if (ShouldBlockFile(item, target_info.danger_type)) {
|
||||
MaybeReportDangerousDownloadBlocked(
|
||||
@@ -1954,49 +1952,20 @@ bool ChromeDownloadManagerDelegate::IsOp
|
||||
@@ -1957,49 +1955,20 @@ bool ChromeDownloadManagerDelegate::IsOp
|
||||
bool ChromeDownloadManagerDelegate::ShouldBlockFile(
|
||||
download::DownloadItem* item,
|
||||
download::DownloadDangerType danger_type) const {
|
||||
@@ -515,7 +515,7 @@
|
||||
std::string RealtimeReportingClient::GetProfileIdentifier() {
|
||||
--- a/chrome/browser/enterprise/connectors/reporting/telomere_reporting_context.cc
|
||||
+++ b/chrome/browser/enterprise/connectors/reporting/telomere_reporting_context.cc
|
||||
@@ -176,19 +176,6 @@ TelomereReportingContext* TelomereReport
|
||||
@@ -177,19 +177,6 @@ TelomereReportingContext* TelomereReport
|
||||
}
|
||||
|
||||
RealtimeReportingClient* TelomereReportingContext::GetReportingClient() const {
|
||||
@@ -537,7 +537,7 @@
|
||||
|
||||
--- a/chrome/browser/enterprise/data_controls/reporting_service.cc
|
||||
+++ b/chrome/browser/enterprise/data_controls/reporting_service.cc
|
||||
@@ -163,10 +163,6 @@ void ReportingService::ReportPaste(
|
||||
@@ -182,10 +182,6 @@ void ReportingService::ReportPaste(
|
||||
const content::ClipboardEndpoint& destination,
|
||||
const content::ClipboardMetadata& metadata,
|
||||
const Verdict& verdict) {
|
||||
@@ -548,7 +548,7 @@
|
||||
}
|
||||
|
||||
void ReportingService::ReportPasteWarningBypassed(
|
||||
@@ -174,29 +170,17 @@ void ReportingService::ReportPasteWarnin
|
||||
@@ -193,29 +189,17 @@ void ReportingService::ReportPasteWarnin
|
||||
const content::ClipboardEndpoint& destination,
|
||||
const content::ClipboardMetadata& metadata,
|
||||
const Verdict& verdict) {
|
||||
@@ -578,7 +578,7 @@
|
||||
}
|
||||
|
||||
void ReportingService::ReportCopyOrPaste(
|
||||
@@ -206,45 +190,6 @@ void ReportingService::ReportCopyOrPaste
|
||||
@@ -225,45 +209,6 @@ void ReportingService::ReportCopyOrPaste
|
||||
const Verdict& verdict,
|
||||
const std::string& trigger,
|
||||
enterprise_connectors::EventResult event_result) {
|
||||
@@ -624,7 +624,7 @@
|
||||
}
|
||||
|
||||
// --------------------------------------
|
||||
@@ -274,7 +219,6 @@ ReportingServiceFactory::ReportingServic
|
||||
@@ -293,7 +238,6 @@ ReportingServiceFactory::ReportingServic
|
||||
.WithSystem(ProfileSelection::kNone)
|
||||
.WithAshInternals(ProfileSelection::kNone)
|
||||
.Build()) {
|
||||
@@ -634,7 +634,7 @@
|
||||
ReportingServiceFactory::~ReportingServiceFactory() = default;
|
||||
--- a/chrome/browser/enterprise/data_protection/data_protection_navigation_observer.cc
|
||||
+++ b/chrome/browser/enterprise/data_protection/data_protection_navigation_observer.cc
|
||||
@@ -193,9 +193,7 @@ void LogVerdictSource(
|
||||
@@ -195,9 +195,7 @@ void LogVerdictSource(
|
||||
|
||||
bool IsScreenshotAllowedByDataControls(content::BrowserContext* context,
|
||||
const GURL& url) {
|
||||
@@ -665,22 +665,22 @@
|
||||
bool site_isolation_enabled;
|
||||
--- a/chrome/browser/enterprise/signals/profile_signals_collector.cc
|
||||
+++ b/chrome/browser/enterprise/signals/profile_signals_collector.cc
|
||||
@@ -45,13 +45,7 @@ ProfileSignalsCollector::ProfileSignalsC
|
||||
policy_blocklist_service_(
|
||||
@@ -48,14 +48,8 @@ ProfileSignalsCollector::ProfileSignalsC
|
||||
PolicyBlocklistFactory::GetForBrowserContext(profile)),
|
||||
profile_prefs_(profile->GetPrefs()),
|
||||
- policy_manager_(profile->GetCloudPolicyManager()),
|
||||
policy_manager_(profile->GetCloudPolicyManager()),
|
||||
- connectors_service_(
|
||||
- enterprise_connectors::ConnectorsServiceFactory::GetForBrowserContext(
|
||||
- profile)) {
|
||||
- profile)),
|
||||
profile_id_service_(
|
||||
enterprise::ProfileIdServiceFactory::GetForProfile(profile)) {
|
||||
-#if BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS)
|
||||
- DCHECK(connectors_service_);
|
||||
- CHECK(connectors_service_);
|
||||
-#endif // BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS)
|
||||
+ policy_manager_(profile->GetCloudPolicyManager()) {
|
||||
DCHECK(policy_blocklist_service_);
|
||||
CHECK(policy_blocklist_service_);
|
||||
CHECK(profile_id_service_);
|
||||
}
|
||||
|
||||
@@ -68,12 +62,8 @@ void ProfileSignalsCollector::GetProfile
|
||||
@@ -73,12 +67,8 @@ void ProfileSignalsCollector::GetProfile
|
||||
signal_response.chrome_remote_desktop_app_blocked =
|
||||
device_signals::GetChromeRemoteDesktopAppBlocked(
|
||||
policy_blocklist_service_);
|
||||
@@ -692,12 +692,12 @@
|
||||
- device_signals::GetSafeBrowsingProtectionLevel(profile_prefs_);
|
||||
signal_response.site_isolation_enabled =
|
||||
device_signals::GetSiteIsolationEnabled();
|
||||
#if BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS)
|
||||
signal_response.profile_id = profile_id_service_->GetProfileId();
|
||||
--- a/chrome/browser/extensions/BUILD.gn
|
||||
+++ b/chrome/browser/extensions/BUILD.gn
|
||||
@@ -348,8 +348,6 @@ source_set("extensions") {
|
||||
"management/management_util.h",
|
||||
"manifest_check_level.h",
|
||||
@@ -400,8 +400,6 @@ source_set("extensions") {
|
||||
"mv2_deprecation_impact_checker.cc",
|
||||
"mv2_deprecation_impact_checker.h",
|
||||
"mv2_experiment_stage.h",
|
||||
- "omaha_attributes_handler.cc",
|
||||
- "omaha_attributes_handler.h",
|
||||
@@ -723,6 +723,17 @@
|
||||
info.browser_version = std::move(signals.browser_version);
|
||||
info.built_in_dns_client_enabled = signals.built_in_dns_client_enabled;
|
||||
info.enterprise_profile_id = signals.enterprise_profile_id;
|
||||
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
@@ -375,8 +375,6 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
settings_api::PrefType::kBoolean;
|
||||
(*s_allowlist)[::kGeneratedHttpsFirstModePref] =
|
||||
settings_api::PrefType::kNumber;
|
||||
- (*s_allowlist)[::prefs::kSecuritySettingsBundle] =
|
||||
- settings_api::PrefType::kNumber;
|
||||
(*s_allowlist)[::safe_browsing::kGeneratedSecuritySettingsBundlePref] =
|
||||
settings_api::PrefType::kNumber;
|
||||
|
||||
--- a/chrome/browser/extensions/blocklist.cc
|
||||
+++ b/chrome/browser/extensions/blocklist.cc
|
||||
@@ -190,21 +190,8 @@ Blocklist* Blocklist::Get(content::Brows
|
||||
@@ -749,7 +760,7 @@
|
||||
void Blocklist::GetMalwareIDs(const std::set<ExtensionId>& ids,
|
||||
--- a/chrome/browser/extensions/chrome_extension_system.cc
|
||||
+++ b/chrome/browser/extensions/chrome_extension_system.cc
|
||||
@@ -463,8 +463,6 @@ void ChromeExtensionSystem::InstallUpdat
|
||||
@@ -461,8 +461,6 @@ void ChromeExtensionSystem::InstallUpdat
|
||||
void ChromeExtensionSystem::PerformActionBasedOnOmahaAttributes(
|
||||
const std::string& extension_id,
|
||||
const base::Value::Dict& attributes) {
|
||||
@@ -768,17 +779,29 @@
|
||||
}
|
||||
|
||||
ExtensionAllowlistFactory::~ExtensionAllowlistFactory() = default;
|
||||
--- a/chrome/browser/extensions/extension_safety_check_utils.cc
|
||||
+++ b/chrome/browser/extensions/extension_safety_check_utils.cc
|
||||
@@ -262,9 +262,6 @@ developer::SafetyCheckWarningReason GetS
|
||||
top_warning_reason =
|
||||
developer::SafetyCheckWarningReason::kNoPrivacyPractice;
|
||||
|
||||
- } else if (SafetyCheckShouldShowOffstoreExtension(extension, profile,
|
||||
- cws_info)) {
|
||||
- top_warning_reason = developer::SafetyCheckWarningReason::kOffstore;
|
||||
}
|
||||
}
|
||||
|
||||
--- a/chrome/browser/extensions/extension_service.cc
|
||||
+++ b/chrome/browser/extensions/extension_service.cc
|
||||
@@ -54,7 +54,6 @@
|
||||
#include "chrome/browser/extensions/forced_extensions/install_stage_tracker.h"
|
||||
#include "chrome/browser/extensions/install_verifier.h"
|
||||
@@ -56,7 +56,6 @@
|
||||
#include "chrome/browser/extensions/installed_loader.h"
|
||||
#include "chrome/browser/extensions/manifest_v2_experiment_manager.h"
|
||||
#include "chrome/browser/extensions/mv2_experiment_stage.h"
|
||||
-#include "chrome/browser/extensions/omaha_attributes_handler.h"
|
||||
#include "chrome/browser/extensions/permissions/permissions_updater.h"
|
||||
#include "chrome/browser/extensions/profile_util.h"
|
||||
#include "chrome/browser/extensions/unpacked_installer.h"
|
||||
@@ -215,9 +214,6 @@ ExtensionService::ExtensionService(
|
||||
@@ -212,9 +211,6 @@ ExtensionService::ExtensionService(
|
||||
extension_telemetry_service_verdict_handler_(extension_prefs,
|
||||
registry_,
|
||||
extension_registrar_),
|
||||
@@ -788,7 +811,7 @@
|
||||
force_installed_tracker_(registry_, profile_),
|
||||
force_installed_metrics_(registry_, profile_, &force_installed_tracker_),
|
||||
corrupted_extension_reinstaller_(
|
||||
@@ -404,11 +400,6 @@ void ExtensionService::LoadExtensionsFro
|
||||
@@ -402,11 +398,6 @@ void ExtensionService::LoadExtensionsFro
|
||||
<< "--load-extension is not allowed in Google Chrome, ignoring.";
|
||||
return;
|
||||
}
|
||||
@@ -800,7 +823,7 @@
|
||||
if (ShouldBlockCommandLineExtension(*profile_)) {
|
||||
// TODO(crbug.com/401529219): Deprecate this restriction once
|
||||
// --load-extension removal on Chrome builds is fully launched.
|
||||
@@ -456,17 +447,6 @@ void ExtensionService::LoadSigninProfile
|
||||
@@ -461,17 +452,6 @@ void ExtensionService::LoadSigninProfile
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -839,7 +862,7 @@
|
||||
// Performs action based on verdicts received from the Extension Telemetry
|
||||
// server. Currently, these verdicts are limited to off-store extensions.
|
||||
void PerformActionBasedOnExtensionTelemetryServiceVerdicts(
|
||||
@@ -374,8 +369,6 @@ class ExtensionService : public Extensio
|
||||
@@ -384,8 +379,6 @@ class ExtensionService : public Extensio
|
||||
ExtensionTelemetryServiceVerdictHandler
|
||||
extension_telemetry_service_verdict_handler_;
|
||||
|
||||
@@ -901,7 +924,7 @@
|
||||
}
|
||||
--- a/chrome/browser/notifications/persistent_notification_handler.cc
|
||||
+++ b/chrome/browser/notifications/persistent_notification_handler.cc
|
||||
@@ -307,16 +307,6 @@ void PersistentNotificationHandler::Disa
|
||||
@@ -308,16 +308,6 @@ void PersistentNotificationHandler::Disa
|
||||
NotificationPermissionContext::UpdatePermission(profile, origin,
|
||||
CONTENT_SETTING_BLOCK);
|
||||
#endif
|
||||
@@ -918,7 +941,7 @@
|
||||
}
|
||||
|
||||
void PersistentNotificationHandler::OpenSettings(Profile* profile,
|
||||
@@ -355,42 +345,6 @@ void PersistentNotificationHandler::OnMa
|
||||
@@ -356,42 +346,6 @@ void PersistentNotificationHandler::OnMa
|
||||
Profile* profile,
|
||||
bool did_show_warning,
|
||||
bool did_user_unsubscribe) {
|
||||
@@ -963,7 +986,7 @@
|
||||
#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
|
||||
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
|
||||
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
|
||||
@@ -775,38 +775,8 @@ void PlatformNotificationServiceImpl::Up
|
||||
@@ -778,38 +778,8 @@ void PlatformNotificationServiceImpl::Up
|
||||
std::unique_ptr<PersistentNotificationMetadata> persistent_metadata,
|
||||
bool should_show_warning,
|
||||
std::optional<std::string> serialized_content_detection_metadata) {
|
||||
@@ -1089,7 +1112,7 @@
|
||||
|
||||
--- a/chrome/browser/permissions/prediction_based_permission_ui_selector.cc
|
||||
+++ b/chrome/browser/permissions/prediction_based_permission_ui_selector.cc
|
||||
@@ -597,68 +597,6 @@ bool PredictionBasedPermissionUiSelector
|
||||
@@ -596,62 +596,6 @@ bool PredictionBasedPermissionUiSelector
|
||||
|
||||
PredictionSource PredictionBasedPermissionUiSelector::GetPredictionTypeToUse(
|
||||
permissions::RequestType request_type) {
|
||||
@@ -1125,13 +1148,7 @@
|
||||
- if (use_server_side) {
|
||||
- // Aiv3 takes priority over Aiv1 if both are enabled.
|
||||
-#if BUILDFLAG(BUILD_WITH_TFLITE_LIB)
|
||||
- if (request_type == permissions::RequestType::kNotifications &&
|
||||
- base::FeatureList::IsEnabled(permissions::features::kPermissionsAIv3)) {
|
||||
- return PredictionSource::kOnDeviceAiv3AndServerSideModel;
|
||||
- }
|
||||
- if (request_type == permissions::RequestType::kGeolocation &&
|
||||
- base::FeatureList::IsEnabled(
|
||||
- permissions::features::kPermissionsAIv3Geolocation)) {
|
||||
- if (base::FeatureList::IsEnabled(permissions::features::kPermissionsAIv3)) {
|
||||
- return PredictionSource::kOnDeviceAiv3AndServerSideModel;
|
||||
- }
|
||||
-#endif // BUILDFLAG(BUILD_WITH_TFLITE_LIB)
|
||||
@@ -1160,7 +1177,7 @@
|
||||
|
||||
--- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc
|
||||
+++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
|
||||
@@ -2494,8 +2494,6 @@ std::unique_ptr<ConfigurationPolicyHandl
|
||||
@@ -2498,8 +2498,6 @@ std::unique_ptr<ConfigurationPolicyHandl
|
||||
handlers->AddHandler(
|
||||
std::make_unique<bookmarks::ManagedBookmarksPolicyHandler>(
|
||||
chrome_schema));
|
||||
@@ -1171,7 +1188,7 @@
|
||||
std::make_unique<URLBlocklistPolicyHandler>(key::kURLBlocklist));
|
||||
--- a/chrome/browser/prefs/browser_prefs.cc
|
||||
+++ b/chrome/browser/prefs/browser_prefs.cc
|
||||
@@ -284,7 +284,6 @@
|
||||
@@ -287,7 +287,6 @@
|
||||
#include "chrome/browser/nearby_sharing/common/nearby_share_prefs.h"
|
||||
#include "chrome/browser/new_tab_page/modules/file_suggestion/drive_service.h"
|
||||
#include "chrome/browser/new_tab_page/modules/file_suggestion/microsoft_files_page_handler.h"
|
||||
@@ -1179,7 +1196,7 @@
|
||||
#include "chrome/browser/new_tab_page/modules/v2/authentication/microsoft_auth_page_handler.h"
|
||||
#include "chrome/browser/new_tab_page/modules/v2/calendar/google_calendar_page_handler.h"
|
||||
#include "chrome/browser/new_tab_page/modules/v2/calendar/outlook_calendar_page_handler.h"
|
||||
@@ -2089,7 +2088,6 @@ void RegisterProfilePrefs(user_prefs::Pr
|
||||
@@ -2164,7 +2163,6 @@ void RegisterProfilePrefs(user_prefs::Pr
|
||||
NewTabFooterUI::RegisterProfilePrefs(registry);
|
||||
NewTabPageHandler::RegisterProfilePrefs(registry);
|
||||
NewTabPageUI::RegisterProfilePrefs(registry);
|
||||
@@ -1189,7 +1206,7 @@
|
||||
promos_utils::RegisterProfilePrefs(registry);
|
||||
--- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
|
||||
+++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
|
||||
@@ -867,9 +867,7 @@ void ChromeBrowserMainExtraPartsProfiles
|
||||
@@ -874,9 +874,7 @@ void ChromeBrowserMainExtraPartsProfiles
|
||||
enterprise_connectors::TelomereEventRouterFactory::GetInstance();
|
||||
}
|
||||
#endif
|
||||
@@ -1201,7 +1218,17 @@
|
||||
enterprise_connectors::DeviceTrustConnectorServiceFactory::GetInstance();
|
||||
--- a/chrome/browser/safe_browsing/BUILD.gn
|
||||
+++ b/chrome/browser/safe_browsing/BUILD.gn
|
||||
@@ -94,13 +94,6 @@ static_library("safe_browsing") {
|
||||
@@ -76,9 +76,6 @@ static_library("safe_browsing") {
|
||||
]
|
||||
}
|
||||
|
||||
- if (enable_extensions) {
|
||||
- deps += [ "//chrome/browser/ui/web_applications" ]
|
||||
- }
|
||||
|
||||
# Note: is_android is not equivalent to safe_browsing_mode == 2.
|
||||
# Sources and dependencies added to this block must not depend on anything
|
||||
@@ -98,13 +95,6 @@ static_library("safe_browsing") {
|
||||
allow_circular_includes_from += [ "//chrome/browser/ash/file_manager" ]
|
||||
}
|
||||
|
||||
@@ -1217,7 +1244,7 @@
|
||||
# "Safe Browsing Basic" files used for safe browsing in full mode
|
||||
--- a/chrome/browser/safe_browsing/cloud_content_scanning/file_opening_job.cc
|
||||
+++ b/chrome/browser/safe_browsing/cloud_content_scanning/file_opening_job.cc
|
||||
@@ -71,10 +71,6 @@ void FileOpeningJob::ProcessNextTask(bas
|
||||
@@ -72,10 +72,6 @@ void FileOpeningJob::ProcessNextTask(bas
|
||||
if (tasks_[i].taken.exchange(true, std::memory_order_relaxed))
|
||||
continue;
|
||||
|
||||
@@ -1249,6 +1276,63 @@
|
||||
// Indicates if this task has been taken and is owned by a thread.
|
||||
std::atomic_bool taken{false};
|
||||
};
|
||||
--- a/chrome/browser/safe_browsing/generated_security_settings_bundle_pref.cc
|
||||
+++ b/chrome/browser/safe_browsing/generated_security_settings_bundle_pref.cc
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/common/extensions/api/settings_private.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
-#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
|
||||
|
||||
namespace settings_api = extensions::api::settings_private;
|
||||
|
||||
@@ -21,28 +20,10 @@ GeneratedSecuritySettingsBundlePref::Gen
|
||||
Profile* profile)
|
||||
: profile_(profile) {
|
||||
user_prefs_registrar_.Init(profile->GetPrefs());
|
||||
- user_prefs_registrar_.Add(
|
||||
- prefs::kSecuritySettingsBundle,
|
||||
- base::BindRepeating(&GeneratedSecuritySettingsBundlePref::
|
||||
- OnSecuritySettingsBundlePreferencesChanged,
|
||||
- base::Unretained(this)));
|
||||
}
|
||||
|
||||
extensions::settings_private::SetPrefResult
|
||||
GeneratedSecuritySettingsBundlePref::SetPref(const base::Value* value) {
|
||||
- if (!value->is_int()) {
|
||||
- return extensions::settings_private::SetPrefResult::PREF_TYPE_MISMATCH;
|
||||
- }
|
||||
-
|
||||
- auto selection = static_cast<int>(value->GetInt());
|
||||
-
|
||||
- if (selection != static_cast<int>(SecuritySettingsBundleSetting::STANDARD) &&
|
||||
- selection != static_cast<int>(SecuritySettingsBundleSetting::ENHANCED)) {
|
||||
- return extensions::settings_private::SetPrefResult::PREF_TYPE_MISMATCH;
|
||||
- }
|
||||
- // Update Security Settings Bundle preference to match selection.
|
||||
- profile_->GetPrefs()->SetInteger(prefs::kSecuritySettingsBundle, selection);
|
||||
-
|
||||
return extensions::settings_private::SetPrefResult::SUCCESS;
|
||||
}
|
||||
|
||||
@@ -52,17 +33,8 @@ GeneratedSecuritySettingsBundlePref::Get
|
||||
pref_object.key = kGeneratedSecuritySettingsBundlePref;
|
||||
pref_object.type = extensions::api::settings_private::PrefType::kNumber;
|
||||
|
||||
- auto security_settings_bundle_enabled =
|
||||
- profile_->GetPrefs()->GetInteger(prefs::kSecuritySettingsBundle);
|
||||
-
|
||||
- if (security_settings_bundle_enabled ==
|
||||
- static_cast<int>(SecuritySettingsBundleSetting::ENHANCED)) {
|
||||
- pref_object.value =
|
||||
- base::Value(static_cast<int>(SecuritySettingsBundleSetting::ENHANCED));
|
||||
- } else {
|
||||
pref_object.value =
|
||||
base::Value(static_cast<int>(SecuritySettingsBundleSetting::STANDARD));
|
||||
- }
|
||||
|
||||
return pref_object;
|
||||
}
|
||||
--- a/chrome/browser/safe_browsing/metrics/safe_browsing_metrics_provider.cc
|
||||
+++ b/chrome/browser/safe_browsing/metrics/safe_browsing_metrics_provider.cc
|
||||
@@ -17,15 +17,6 @@ SafeBrowsingMetricsProvider::~SafeBrowsi
|
||||
@@ -1366,7 +1450,7 @@
|
||||
// certificate. So, when users click proceed on an interstitial, move the tab
|
||||
--- a/chrome/browser/ui/BUILD.gn
|
||||
+++ b/chrome/browser/ui/BUILD.gn
|
||||
@@ -4535,8 +4535,6 @@ static_library("ui") {
|
||||
@@ -4466,8 +4466,6 @@ static_library("ui") {
|
||||
"views/safe_browsing/prompt_for_scanning_modal_dialog.h",
|
||||
"views/safe_browsing/tailored_security_desktop_dialog_manager.cc",
|
||||
"views/safe_browsing/tailored_security_desktop_dialog_manager.h",
|
||||
@@ -1385,29 +1469,26 @@
|
||||
#include "content/public/browser/browser_context.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "revoked_permissions_service.h"
|
||||
@@ -409,34 +408,6 @@ RevokedPermissionsService::RevokedPermis
|
||||
@@ -406,31 +405,6 @@ RevokedPermissionsService::RevokedPermis
|
||||
base::Unretained(this)));
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
- if (base::FeatureList::IsEnabled(
|
||||
- safe_browsing::kSafetyHubAbusiveNotificationRevocation)) {
|
||||
- abusive_notification_manager_ =
|
||||
- std::make_unique<AbusiveNotificationPermissionsManager>(
|
||||
- abusive_notification_manager_ =
|
||||
- std::make_unique<AbusiveNotificationPermissionsManager>(
|
||||
-#if BUILDFLAG(SAFE_BROWSING_AVAILABLE)
|
||||
- g_browser_process->safe_browsing_service()
|
||||
- ? g_browser_process->safe_browsing_service()->database_manager()
|
||||
- : nullptr,
|
||||
- g_browser_process->safe_browsing_service()
|
||||
- ? g_browser_process->safe_browsing_service()->database_manager()
|
||||
- : nullptr,
|
||||
-#else
|
||||
- nullptr,
|
||||
- nullptr,
|
||||
-#endif
|
||||
- hcsm());
|
||||
- hcsm(), pref_change_registrar_->prefs());
|
||||
-
|
||||
- pref_change_registrar_->Add(
|
||||
- prefs::kSafeBrowsingEnabled,
|
||||
- base::BindRepeating(&RevokedPermissionsService::
|
||||
- OnPermissionsAutorevocationControlChanged,
|
||||
- base::Unretained(this)));
|
||||
- }
|
||||
- pref_change_registrar_->Add(
|
||||
- prefs::kSafeBrowsingEnabled,
|
||||
- base::BindRepeating(
|
||||
- &RevokedPermissionsService::OnPermissionsAutorevocationControlChanged,
|
||||
- base::Unretained(this)));
|
||||
-
|
||||
- if (base::FeatureList::IsEnabled(
|
||||
- features::kSafetyHubDisruptiveNotificationRevocation)) {
|
||||
@@ -1420,13 +1501,11 @@
|
||||
|
||||
bool migration_completed = pref_change_registrar_->prefs()->GetBoolean(
|
||||
safety_hub_prefs::kUnusedSitePermissionsRevocationMigrationCompleted);
|
||||
@@ -1204,9 +1175,7 @@ bool RevokedPermissionsService::IsUnused
|
||||
@@ -1198,7 +1172,7 @@ bool RevokedPermissionsService::IsUnused
|
||||
}
|
||||
|
||||
bool RevokedPermissionsService::IsAbusiveNotificationAutoRevocationEnabled() {
|
||||
- return base::FeatureList::IsEnabled(
|
||||
- safe_browsing::kSafetyHubAbusiveNotificationRevocation) &&
|
||||
- safe_browsing::IsSafeBrowsingEnabled(*pref_change_registrar_->prefs());
|
||||
- return safe_browsing::IsSafeBrowsingEnabled(*pref_change_registrar_->prefs());
|
||||
+ return false;
|
||||
}
|
||||
|
||||
@@ -1451,7 +1530,7 @@
|
||||
#include "components/strings/grit/components_strings.h"
|
||||
#include "components/tabs/public/tab_interface.h"
|
||||
#include "components/vector_icons/vector_icons.h"
|
||||
@@ -146,57 +145,6 @@ void ToastService::RegisterToasts(
|
||||
@@ -144,57 +143,6 @@ void ToastService::RegisterToasts(
|
||||
.Build());
|
||||
}
|
||||
|
||||
@@ -1522,7 +1601,7 @@
|
||||
std::unique_ptr<content::WebContentsViewDelegate> CreateWebContentsViewDelegate(
|
||||
--- a/chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views_mac.mm
|
||||
+++ b/chrome/browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views_mac.mm
|
||||
@@ -89,7 +89,7 @@ bool ChromeWebContentsViewDelegateViewsM
|
||||
@@ -103,7 +103,7 @@ bool ChromeWebContentsViewDelegateViewsM
|
||||
void ChromeWebContentsViewDelegateViewsMac::OnPerformingDrop(
|
||||
const content::DropData& drop_data,
|
||||
DropCompletionCallback callback) {
|
||||
@@ -1680,7 +1759,7 @@
|
||||
std::move(callback),
|
||||
--- a/chrome/common/webui_url_constants.cc
|
||||
+++ b/chrome/common/webui_url_constants.cc
|
||||
@@ -123,7 +123,6 @@ base::span<const base::cstring_view> Chr
|
||||
@@ -124,7 +124,6 @@ base::span<const base::cstring_view> Chr
|
||||
kChromeUISuggestInternalsHost,
|
||||
#endif
|
||||
kChromeUINTPTilesInternalsHost,
|
||||
@@ -1690,7 +1769,7 @@
|
||||
kChromeUITabSearchHost,
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -2558,7 +2558,6 @@ if (!is_android) {
|
||||
@@ -2614,7 +2614,6 @@ if (!is_android) {
|
||||
"//components/resources",
|
||||
"//components/safe_browsing:buildflags",
|
||||
"//components/safe_browsing/content/browser",
|
||||
@@ -1698,7 +1777,7 @@
|
||||
"//components/safe_browsing/content/browser:safe_browsing_service",
|
||||
"//components/safe_browsing/content/browser/password_protection",
|
||||
"//components/safe_browsing/content/browser/password_protection:test_support",
|
||||
@@ -6921,7 +6920,6 @@ test("unit_tests") {
|
||||
@@ -7065,7 +7064,6 @@ test("unit_tests") {
|
||||
"//components/resources",
|
||||
"//components/safe_browsing:buildflags",
|
||||
"//components/safe_browsing/content/browser",
|
||||
@@ -1778,19 +1857,21 @@
|
||||
std::optional<std::string> profile_enrollment_domain = std::nullopt;
|
||||
- safe_browsing::SafeBrowsingState safe_browsing_protection_level;
|
||||
bool site_isolation_enabled;
|
||||
std::optional<std::string> profile_id = std::nullopt;
|
||||
|
||||
// Enterprise cloud content analysis exclusives
|
||||
--- a/components/enterprise/browser/reporting/chrome_profile_request_generator.cc
|
||||
+++ b/components/enterprise/browser/reporting/chrome_profile_request_generator.cc
|
||||
@@ -229,16 +229,10 @@ void ChromeProfileRequestGenerator::OnAg
|
||||
@@ -245,18 +245,12 @@ void ChromeProfileRequestGenerator::OnAg
|
||||
profile_signals.built_in_dns_client_enabled);
|
||||
profile_signals_report->set_chrome_remote_desktop_app_blocked(
|
||||
profile_signals.chrome_remote_desktop_app_blocked);
|
||||
- profile_signals_report->set_password_protection_warning_trigger(
|
||||
- TranslatePasswordProtectionTrigger(
|
||||
- profile_signals.password_protection_warning_trigger));
|
||||
profile_signals_report->set_profile_enrollment_domain(
|
||||
profile_signals.profile_enrollment_domain.value_or(""));
|
||||
if (profile_signals.profile_enrollment_domain) {
|
||||
profile_signals_report->set_profile_enrollment_domain(
|
||||
profile_signals.profile_enrollment_domain.value());
|
||||
}
|
||||
profile_signals_report->set_realtime_url_check_mode(
|
||||
TranslateRealtimeUrlCheckMode(profile_signals.realtime_url_check_mode));
|
||||
- profile_signals_report->set_safe_browsing_protection_level(
|
||||
@@ -1884,7 +1965,7 @@
|
||||
enterprise_data_controls =
|
||||
--- a/components/enterprise/connectors/core/reporting_service_settings.cc
|
||||
+++ b/components/enterprise/connectors/core/reporting_service_settings.cc
|
||||
@@ -44,16 +44,6 @@ ReportingServiceSettings::ReportingServi
|
||||
@@ -45,16 +45,6 @@ ReportingServiceSettings::ReportingServi
|
||||
else
|
||||
DVLOG(1) << "Enabled event name list contains a non string value!";
|
||||
}
|
||||
@@ -1919,7 +2000,7 @@
|
||||
} // namespace password_manager
|
||||
--- a/components/safe_browsing/content/common/safe_browsing.mojom
|
||||
+++ b/components/safe_browsing/content/common/safe_browsing.mojom
|
||||
@@ -146,7 +146,6 @@ interface PhishingDetector {
|
||||
@@ -168,7 +168,6 @@ interface PhishingDetector {
|
||||
|
||||
// Interface for setting a phishing model. This is scoped to an entire
|
||||
// RenderProcess.
|
||||
@@ -2040,7 +2121,7 @@
|
||||
bool ChromeEnterpriseRealTimeUrlLookupService::
|
||||
--- a/components/safe_browsing/core/browser/realtime/url_lookup_service.cc
|
||||
+++ b/components/safe_browsing/core/browser/realtime/url_lookup_service.cc
|
||||
@@ -284,17 +284,6 @@ void RealTimeUrlLookupService::MaybeLogP
|
||||
@@ -244,17 +244,6 @@ void RealTimeUrlLookupService::MaybeLogP
|
||||
bool request_had_cookie,
|
||||
bool was_first_request,
|
||||
bool sent_with_token) {
|
||||
@@ -2060,7 +2141,7 @@
|
||||
void RealTimeUrlLookupService::MaybeFillReferringWebApk(
|
||||
--- a/components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc
|
||||
+++ b/components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc
|
||||
@@ -593,17 +593,6 @@ void RealTimeUrlLookupServiceBase::Start
|
||||
@@ -645,17 +645,6 @@ void RealTimeUrlLookupServiceBase::Start
|
||||
request->set_report_type(is_sampled_report ? RTLookupRequest::SAMPLED_REPORT
|
||||
: RTLookupRequest::FULL_REPORT);
|
||||
request->set_frame_type(RTLookupRequest::MAIN_FRAME);
|
||||
@@ -2155,7 +2236,7 @@
|
||||
raw_ptr<signin::IdentityManager> identity_manager_;
|
||||
--- a/components/safe_browsing/core/browser/verdict_cache_manager.cc
|
||||
+++ b/components/safe_browsing/core/browser/verdict_cache_manager.cc
|
||||
@@ -447,16 +447,6 @@ VerdictCacheManager::VerdictCacheManager
|
||||
@@ -459,16 +459,6 @@ VerdictCacheManager::VerdictCacheManager
|
||||
// pref_service can be null in tests.
|
||||
if (pref_service) {
|
||||
pref_change_registrar_.Init(pref_service);
|
||||
@@ -2218,7 +2299,7 @@
|
||||
void SSLBlockingPageBase::PopulateEnhancedProtectionMessage(
|
||||
--- a/components/sync_preferences/common_syncable_prefs_database.cc
|
||||
+++ b/components/sync_preferences/common_syncable_prefs_database.cc
|
||||
@@ -327,9 +327,6 @@ constexpr auto kCommonSyncablePrefsAllow
|
||||
@@ -328,9 +328,6 @@ constexpr auto kCommonSyncablePrefsAllow
|
||||
{plus_addresses::prefs::kLastPlusAddressFillingTime,
|
||||
{syncable_prefs_ids::kLastPlusAddressFillingTime, syncer::PREFERENCES,
|
||||
PrefSensitivity::kNone, MergeBehavior::kNone}},
|
||||
@@ -2306,7 +2387,7 @@
|
||||
void DidFileSkipQuarantine(base::File::Error result);
|
||||
--- a/extensions/browser/extension_registrar.cc
|
||||
+++ b/extensions/browser/extension_registrar.cc
|
||||
@@ -772,103 +772,27 @@ void ExtensionRegistrar::UnblockAllExten
|
||||
@@ -777,103 +777,27 @@ void ExtensionRegistrar::UnblockAllExten
|
||||
|
||||
void ExtensionRegistrar::OnBlocklistStateRemoved(
|
||||
const std::string& extension_id) {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/chrome/browser/ui/views/accelerator_table.cc
|
||||
+++ b/chrome/browser/ui/views/accelerator_table.cc
|
||||
@@ -132,7 +132,6 @@ const AcceleratorMapping kAcceleratorMap
|
||||
{ui::VKEY_OEM_PLUS, ui::EF_PLATFORM_ACCELERATOR, IDC_ZOOM_PLUS},
|
||||
{ui::VKEY_ADD, ui::EF_PLATFORM_ACCELERATOR, IDC_ZOOM_PLUS},
|
||||
|
||||
- {ui::VKEY_F1, ui::EF_NONE, IDC_HELP_PAGE_VIA_KEYBOARD},
|
||||
{ui::VKEY_F3, ui::EF_NONE, IDC_FIND_NEXT},
|
||||
{ui::VKEY_F3, ui::EF_SHIFT_DOWN, IDC_FIND_PREVIOUS},
|
||||
{ui::VKEY_F4, ui::EF_CONTROL_DOWN, IDC_CLOSE_TAB},
|
||||
File diff suppressed because it is too large
Load Diff
@@ -9,7 +9,7 @@
|
||||
#include "components/translate/core/browser/translate_download_manager.h"
|
||||
#include "components/translate/core/browser/translate_manager.h"
|
||||
#include "components/translate/core/browser/translate_prefs.h"
|
||||
@@ -2281,6 +2282,7 @@ void RenderViewContextMenu::AppendPageIt
|
||||
@@ -2154,6 +2155,7 @@ void RenderViewContextMenu::AppendPageIt
|
||||
}
|
||||
|
||||
if (CanTranslate(/*menu_logging=*/true)) {
|
||||
|
||||
@@ -39,21 +39,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+#include "base/values.h"
|
||||
+#include "chrome/common/importer/chrome_importer_utils.h"
|
||||
+#include "chrome/common/importer/importer_constants.h"
|
||||
+#include "chrome/common/importer/importer_type.h"
|
||||
+#include "components/user_data_importer/common/importer_type.h"
|
||||
+#include "chrome/grit/generated_resources.h"
|
||||
+#include "ui/base/l10n/l10n_util.h"
|
||||
+
|
||||
+namespace {
|
||||
+void AddChromeToProfiles(std::vector<importer::SourceProfile>* profiles,
|
||||
+void AddChromeToProfiles(std::vector<user_data_importer::SourceProfile>* profiles,
|
||||
+ base::Value::List chrome_profiles,
|
||||
+ const base::FilePath& user_data_folder,
|
||||
+ const std::string& brand,
|
||||
+ importer::ImporterType type) {
|
||||
+ user_data_importer::ImporterType type) {
|
||||
+ for (const auto& value : chrome_profiles) {
|
||||
+ const auto* dict = value.GetIfDict();
|
||||
+ if (!dict)
|
||||
+ continue;
|
||||
+ uint16_t items = importer::NONE;
|
||||
+ uint16_t items = user_data_importer::NONE;
|
||||
+ auto* profile = dict->FindString("id");
|
||||
+ auto* name = dict->FindString("name");
|
||||
+ DCHECK(profile);
|
||||
@@ -66,11 +66,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
|
||||
+ // We can import password from Whale only on macOS.
|
||||
+ // Decryption failed on Windows and Linux.
|
||||
+ if (type == importer::TYPE_WHALE && (items & importer::PASSWORDS)) {
|
||||
+ items ^= importer::PASSWORDS;
|
||||
+ if (type == user_data_importer::TYPE_WHALE && (items & user_data_importer::PASSWORDS)) {
|
||||
+ items ^= user_data_importer::PASSWORDS;
|
||||
+ }
|
||||
+#endif
|
||||
+ importer::SourceProfile chrome;
|
||||
+ user_data_importer::SourceProfile chrome;
|
||||
+ chrome.importer_name = base::UTF8ToUTF16(brand);
|
||||
+ chrome.importer_type = type;
|
||||
+ chrome.source_path = user_data_folder.Append(
|
||||
@@ -81,82 +81,82 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void DetectChromeProfiles(std::vector<importer::SourceProfile>* profiles) {
|
||||
+void DetectChromeProfiles(std::vector<user_data_importer::SourceProfile>* profiles) {
|
||||
+ base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
|
||||
+ base::BlockingType::WILL_BLOCK);
|
||||
+ AddChromeToProfiles(
|
||||
+ profiles,
|
||||
+ GetChromeSourceProfiles(GetChromeUserDataFolder().Append(
|
||||
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
|
||||
+ GetChromeUserDataFolder(), kGoogleChromeBrowser, importer::TYPE_CHROME);
|
||||
+ GetChromeUserDataFolder(), kGoogleChromeBrowser, user_data_importer::TYPE_CHROME);
|
||||
+ AddChromeToProfiles(
|
||||
+ profiles,
|
||||
+ GetChromeSourceProfiles(GetChromeBetaUserDataFolder().Append(
|
||||
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
|
||||
+ GetChromeBetaUserDataFolder(), kGoogleChromeBrowserBeta,
|
||||
+ importer::TYPE_CHROME);
|
||||
+ user_data_importer::TYPE_CHROME);
|
||||
+ AddChromeToProfiles(
|
||||
+ profiles,
|
||||
+ GetChromeSourceProfiles(GetChromeDevUserDataFolder().Append(
|
||||
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
|
||||
+ GetChromeDevUserDataFolder(), kGoogleChromeBrowserDev,
|
||||
+ importer::TYPE_CHROME);
|
||||
+ user_data_importer::TYPE_CHROME);
|
||||
+#if !BUILDFLAG(IS_LINUX)
|
||||
+ AddChromeToProfiles(
|
||||
+ profiles,
|
||||
+ GetChromeSourceProfiles(GetCanaryUserDataFolder().Append(
|
||||
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
|
||||
+ GetCanaryUserDataFolder(), kGoogleChromeBrowserCanary,
|
||||
+ importer::TYPE_CHROME);
|
||||
+ user_data_importer::TYPE_CHROME);
|
||||
+
|
||||
+ AddChromeToProfiles(
|
||||
+ profiles,
|
||||
+ GetChromeSourceProfiles(GetArcUserDataFolder().Append(
|
||||
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
|
||||
+ GetArcUserDataFolder(), kArcBrowser, importer::TYPE_ARC);
|
||||
+ GetArcUserDataFolder(), kArcBrowser, user_data_importer::TYPE_ARC);
|
||||
+#endif
|
||||
+ AddChromeToProfiles(
|
||||
+ profiles,
|
||||
+ GetChromeSourceProfiles(GetChromiumUserDataFolder().Append(
|
||||
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
|
||||
+ GetChromiumUserDataFolder(), kChromiumBrowser, importer::TYPE_CHROME);
|
||||
+ GetChromiumUserDataFolder(), kChromiumBrowser, user_data_importer::TYPE_CHROME);
|
||||
+
|
||||
+ AddChromeToProfiles(
|
||||
+ profiles,
|
||||
+ GetChromeSourceProfiles(GetEdgeUserDataFolder().Append(
|
||||
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
|
||||
+ GetEdgeUserDataFolder(), kMicrosoftEdgeBrowser,
|
||||
+ importer::TYPE_EDGE_CHROMIUM);
|
||||
+ user_data_importer::TYPE_EDGE_CHROMIUM);
|
||||
+
|
||||
+ AddChromeToProfiles(
|
||||
+ profiles,
|
||||
+ GetChromeSourceProfiles(GetVivaldiUserDataFolder().Append(
|
||||
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
|
||||
+ GetVivaldiUserDataFolder(), kVivaldiBrowser, importer::TYPE_VIVALDI);
|
||||
+ GetVivaldiUserDataFolder(), kVivaldiBrowser, user_data_importer::TYPE_VIVALDI);
|
||||
+
|
||||
+ AddChromeToProfiles(
|
||||
+ profiles,
|
||||
+ GetChromeSourceProfiles(GetOperaUserDataFolder().Append(
|
||||
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
|
||||
+ GetOperaUserDataFolder(), kOperaBrowser, importer::TYPE_OPERA);
|
||||
+ GetOperaUserDataFolder(), kOperaBrowser, user_data_importer::TYPE_OPERA);
|
||||
+
|
||||
+ AddChromeToProfiles(
|
||||
+ profiles,
|
||||
+ GetChromeSourceProfiles(GetYandexUserDataFolder().Append(
|
||||
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
|
||||
+ GetYandexUserDataFolder(), kYandexBrowser, importer::TYPE_YANDEX);
|
||||
+ GetYandexUserDataFolder(), kYandexBrowser, user_data_importer::TYPE_YANDEX);
|
||||
+
|
||||
+ AddChromeToProfiles(
|
||||
+ profiles,
|
||||
+ GetChromeSourceProfiles(GetWhaleUserDataFolder().Append(
|
||||
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
|
||||
+ GetWhaleUserDataFolder(), kWhaleBrowser, importer::TYPE_WHALE);
|
||||
+ GetWhaleUserDataFolder(), kWhaleBrowser, user_data_importer::TYPE_WHALE);
|
||||
+
|
||||
+ AddChromeToProfiles(
|
||||
+ profiles,
|
||||
+ GetChromeSourceProfiles(GetBraveUserDataFolder().Append(
|
||||
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
|
||||
+ GetBraveUserDataFolder(), kBraveBrowser, importer::TYPE_BRAVE);
|
||||
+ GetBraveUserDataFolder(), kBraveBrowser, user_data_importer::TYPE_BRAVE);
|
||||
+
|
||||
+#if BUILDFLAG(IS_LINUX)
|
||||
+ // Installed via snap Opera has different profile path.
|
||||
@@ -164,7 +164,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ profiles,
|
||||
+ GetChromeSourceProfiles(GetOperaSnapUserDataFolder().Append(
|
||||
+ base::FilePath::StringType(FILE_PATH_LITERAL("Local State")))),
|
||||
+ GetOperaSnapUserDataFolder(), kOperaBrowser, importer::TYPE_OPERA);
|
||||
+ GetOperaSnapUserDataFolder(), kOperaBrowser, user_data_importer::TYPE_OPERA);
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
@@ -189,7 +189,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+#include "base/values.h"
|
||||
+#include "chrome/common/importer/importer_constants.h"
|
||||
+#include "chrome/common/importer/scoped_copy_file.h"
|
||||
+#include "chrome/common/importer/importer_data_types.h"
|
||||
+#include "components/user_data_importer/common/importer_data_types.h"
|
||||
+#include "components/webdata/common/webdata_constants.h"
|
||||
+#include "sql/database.h"
|
||||
+#include "sql/statement.h"
|
||||
@@ -354,7 +354,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+bool ChromeImporterCanImport(const base::FilePath& profile,
|
||||
+ uint16_t* services_supported) {
|
||||
+ DCHECK(services_supported);
|
||||
+ *services_supported = importer::NONE;
|
||||
+ *services_supported = user_data_importer::NONE;
|
||||
+
|
||||
+ base::FilePath bookmarks =
|
||||
+ profile.Append(base::FilePath::StringType(FILE_PATH_LITERAL("Bookmarks")));
|
||||
@@ -365,18 +365,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ base::FilePath passwords_for_account = profile.Append(
|
||||
+ base::FilePath::StringType(FILE_PATH_LITERAL("Login Data For Account")));
|
||||
+ if (base::PathExists(bookmarks))
|
||||
+ *services_supported |= importer::FAVORITES;
|
||||
+ *services_supported |= user_data_importer::FAVORITES;
|
||||
+ if (base::PathExists(history))
|
||||
+ *services_supported |= importer::HISTORY;
|
||||
+ *services_supported |= user_data_importer::HISTORY;
|
||||
+ if (base::PathExists(passwords) || base::PathExists(passwords_for_account)) {
|
||||
+ *services_supported |= importer::PASSWORDS;
|
||||
+ *services_supported |= user_data_importer::PASSWORDS;
|
||||
+ }
|
||||
+#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
+ if (HasImportableExtensions(profile))
|
||||
+ *services_supported |= importer::EXTENSIONS;
|
||||
+ *services_supported |= user_data_importer::EXTENSIONS;
|
||||
+#endif
|
||||
+
|
||||
+ return *services_supported != importer::NONE;
|
||||
+ return *services_supported != user_data_importer::NONE;
|
||||
+}
|
||||
+
|
||||
+#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
@@ -936,7 +936,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ const base::FilePath& library_dir = base::apple::GetUserLibraryPath();
|
||||
+ const base::FilePath safari_dir = library_dir.Append("Safari");
|
||||
+
|
||||
+ if (imported_items & importer::FAVORITES) {
|
||||
+ if (imported_items & user_data_importer::FAVORITES) {
|
||||
+ const base::FilePath bookmarks_path = safari_dir.Append("Bookmarks.plist");
|
||||
+ if (!PathIsWritable(bookmarks_path)) {
|
||||
+ LOG(ERROR) << __func__ << " " << bookmarks_path << " is not accessible."
|
||||
@@ -945,7 +945,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (imported_items & importer::HISTORY) {
|
||||
+ if (imported_items & user_data_importer::HISTORY) {
|
||||
+ const base::FilePath history_path = safari_dir.Append("History.plist");
|
||||
+ if (!PathIsWritable(history_path)) {
|
||||
+ LOG(ERROR) << __func__ << " " << history_path << " is not accessible."
|
||||
@@ -967,7 +967,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+BraveImportDataHandler::~BraveImportDataHandler() = default;
|
||||
+
|
||||
+void BraveImportDataHandler::StartImport(
|
||||
+ const importer::SourceProfile& source_profile,
|
||||
+ const user_data_importer::SourceProfile& source_profile,
|
||||
+ uint16_t imported_items) {
|
||||
+ if (!imported_items)
|
||||
+ return;
|
||||
@@ -984,7 +984,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+}
|
||||
+
|
||||
+void BraveImportDataHandler::StartImportImpl(
|
||||
+ const importer::SourceProfile& source_profile,
|
||||
+ const user_data_importer::SourceProfile& source_profile,
|
||||
+ uint16_t imported_items,
|
||||
+ Profile* profile) {
|
||||
+ // If another import is already ongoing, let it finish silently.
|
||||
@@ -1004,7 +1004,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+}
|
||||
+
|
||||
+void BraveImportDataHandler::NotifyImportProgress(
|
||||
+ const importer::SourceProfile& source_profile,
|
||||
+ const user_data_importer::SourceProfile& source_profile,
|
||||
+ const base::Value::Dict& info) {
|
||||
+ const std::string* event = info.FindString("event");
|
||||
+ if (!event)
|
||||
@@ -1023,14 +1023,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+}
|
||||
+
|
||||
+void BraveImportDataHandler::OnImportEnded(
|
||||
+ const importer::SourceProfile& source_profile) {
|
||||
+ const user_data_importer::SourceProfile& source_profile) {
|
||||
+ import_observers_.erase(source_profile.source_path);
|
||||
+ FireWebUIListener("import-data-status-changed",
|
||||
+ base::Value(import_did_succeed_ ? kImportStatusSucceeded
|
||||
+ : kImportStatusFailed));
|
||||
+}
|
||||
+
|
||||
+const importer::SourceProfile& BraveImportDataHandler::GetSourceProfileAt(
|
||||
+const user_data_importer::SourceProfile& BraveImportDataHandler::GetSourceProfileAt(
|
||||
+ int browser_index) {
|
||||
+ return importer_list_->GetSourceProfileAt(browser_index);
|
||||
+}
|
||||
@@ -1039,13 +1039,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+void BraveImportDataHandler::CheckDiskAccess(
|
||||
+ uint16_t imported_items,
|
||||
+ base::FilePath source_path,
|
||||
+ importer::ImporterType importer_type,
|
||||
+ user_data_importer::ImporterType importer_type,
|
||||
+ ContinueImportCallback callback) {
|
||||
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
+
|
||||
+ guide_dialog_is_requested_ = false;
|
||||
+
|
||||
+ if (importer_type == importer::TYPE_SAFARI) {
|
||||
+ if (importer_type == user_data_importer::TYPE_SAFARI) {
|
||||
+ // Start import if Brave has full disk access permission.
|
||||
+ // If not, show dialog that has infos about that permission.
|
||||
+ base::ThreadPool::PostTaskAndReplyWithResult(
|
||||
@@ -1143,26 +1143,26 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ protected:
|
||||
+ using ContinueImportCallback = base::OnceCallback<void()>;
|
||||
+
|
||||
+ const importer::SourceProfile& GetSourceProfileAt(int browser_index);
|
||||
+ const user_data_importer::SourceProfile& GetSourceProfileAt(int browser_index);
|
||||
+ void HandleImportData(const base::Value::List& args);
|
||||
+ // ImportDataHandler overrides:
|
||||
+ void StartImport(const importer::SourceProfile& source_profile,
|
||||
+ void StartImport(const user_data_importer::SourceProfile& source_profile,
|
||||
+ uint16_t imported_items) override;
|
||||
+
|
||||
+ void StartImportImpl(const importer::SourceProfile& source_profile,
|
||||
+ void StartImportImpl(const user_data_importer::SourceProfile& source_profile,
|
||||
+ uint16_t imported_items,
|
||||
+ Profile* profile);
|
||||
+ virtual void NotifyImportProgress(
|
||||
+ const importer::SourceProfile& source_profile,
|
||||
+ const user_data_importer::SourceProfile& source_profile,
|
||||
+ const base::Value::Dict& info);
|
||||
+ virtual void OnImportEnded(const importer::SourceProfile& source_profile);
|
||||
+ virtual void OnImportEnded(const user_data_importer::SourceProfile& source_profile);
|
||||
+
|
||||
+ void OnStartImport(const importer::SourceProfile& source_profile,
|
||||
+ void OnStartImport(const user_data_importer::SourceProfile& source_profile,
|
||||
+ uint16_t imported_items);
|
||||
+#if BUILDFLAG(IS_MAC)
|
||||
+ void CheckDiskAccess(uint16_t imported_items,
|
||||
+ base::FilePath source_path,
|
||||
+ importer::ImporterType importer_type,
|
||||
+ user_data_importer::ImporterType importer_type,
|
||||
+ ContinueImportCallback callback);
|
||||
+ void OnGetDiskAccessPermission(ContinueImportCallback callback,
|
||||
+ base::FilePath source_path,
|
||||
@@ -1199,7 +1199,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+BraveImporterObserver::BraveImporterObserver(
|
||||
+ ExternalProcessImporterHost* importer_host,
|
||||
+ const importer::SourceProfile& source_profile,
|
||||
+ const user_data_importer::SourceProfile& source_profile,
|
||||
+ uint16_t imported_items,
|
||||
+ ReportProgressCallback callback)
|
||||
+ : source_profile_(source_profile),
|
||||
@@ -1215,7 +1215,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ importer_host_->set_observer(nullptr);
|
||||
+}
|
||||
+
|
||||
+// importer::ImporterProgressObserver:
|
||||
+// user_data_importer::ImporterProgressObserver:
|
||||
+void BraveImporterObserver::ImportStarted() {
|
||||
+ if (import_started_called_)
|
||||
+ return;
|
||||
@@ -1228,7 +1228,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ callback_.Run(source_profile_, data);
|
||||
+}
|
||||
+
|
||||
+void BraveImporterObserver::ImportItemStarted(importer::ImportItem item) {
|
||||
+void BraveImporterObserver::ImportItemStarted(user_data_importer::ImportItem item) {
|
||||
+ base::Value::Dict data;
|
||||
+ data.Set("importer_name", source_profile_.importer_name);
|
||||
+ data.Set("importer_type", source_profile_.importer_type);
|
||||
@@ -1238,7 +1238,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ callback_.Run(source_profile_, data);
|
||||
+}
|
||||
+
|
||||
+void BraveImporterObserver::ImportItemEnded(importer::ImportItem item) {
|
||||
+void BraveImporterObserver::ImportItemEnded(user_data_importer::ImportItem item) {
|
||||
+ base::Value::Dict data;
|
||||
+ data.Set("importer_name", source_profile_.importer_name);
|
||||
+ data.Set("importer_type", source_profile_.importer_type);
|
||||
@@ -1290,18 +1290,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+class BraveImporterObserver : public importer::ImporterProgressObserver {
|
||||
+ public:
|
||||
+ using ReportProgressCallback = base::RepeatingCallback<void(
|
||||
+ const importer::SourceProfile& source_profile,
|
||||
+ const user_data_importer::SourceProfile& source_profile,
|
||||
+ const base::Value::Dict&)>;
|
||||
+
|
||||
+ BraveImporterObserver(ExternalProcessImporterHost* host,
|
||||
+ const importer::SourceProfile& source_profile,
|
||||
+ const user_data_importer::SourceProfile& source_profile,
|
||||
+ uint16_t imported_items,
|
||||
+ ReportProgressCallback callback);
|
||||
+ ~BraveImporterObserver() override;
|
||||
+
|
||||
+ void ImportStarted() override;
|
||||
+ void ImportItemStarted(importer::ImportItem item) override;
|
||||
+ void ImportItemEnded(importer::ImportItem item) override;
|
||||
+ void ImportItemStarted(user_data_importer::ImportItem item) override;
|
||||
+ void ImportItemEnded(user_data_importer::ImportItem item) override;
|
||||
+ void ImportEnded() override;
|
||||
+
|
||||
+ private:
|
||||
@@ -1309,7 +1309,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ ExternalProcessImporterHost* GetImporterHostForTesting();
|
||||
+
|
||||
+ importer::SourceProfile source_profile_;
|
||||
+ user_data_importer::SourceProfile source_profile_;
|
||||
+ uint16_t imported_items_ = 0;
|
||||
+ ReportProgressCallback callback_;
|
||||
+ // By some reasons ImportStarted event is called few times from different
|
||||
@@ -1339,16 +1339,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+#include "content/public/browser/service_process_host.h"
|
||||
+
|
||||
+namespace {
|
||||
+bool ShouldUseBraveImporter(importer::ImporterType type) {
|
||||
+bool ShouldUseBraveImporter(user_data_importer::ImporterType type) {
|
||||
+ switch (type) {
|
||||
+ case importer::TYPE_CHROME:
|
||||
+ case importer::TYPE_EDGE_CHROMIUM:
|
||||
+ case importer::TYPE_VIVALDI:
|
||||
+ case importer::TYPE_OPERA:
|
||||
+ case importer::TYPE_YANDEX:
|
||||
+ case importer::TYPE_WHALE:
|
||||
+ case importer::TYPE_ARC:
|
||||
+ case importer::TYPE_BRAVE:
|
||||
+ case user_data_importer::TYPE_CHROME:
|
||||
+ case user_data_importer::TYPE_EDGE_CHROMIUM:
|
||||
+ case user_data_importer::TYPE_VIVALDI:
|
||||
+ case user_data_importer::TYPE_OPERA:
|
||||
+ case user_data_importer::TYPE_YANDEX:
|
||||
+ case user_data_importer::TYPE_WHALE:
|
||||
+ case user_data_importer::TYPE_ARC:
|
||||
+ case user_data_importer::TYPE_BRAVE:
|
||||
+ return true;
|
||||
+ default:
|
||||
+ return false;
|
||||
@@ -1364,7 +1364,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+BraveExternalProcessImporterClient::BraveExternalProcessImporterClient(
|
||||
+ base::WeakPtr<ExternalProcessImporterHost> importer_host,
|
||||
+ const importer::SourceProfile& source_profile,
|
||||
+ const user_data_importer::SourceProfile& source_profile,
|
||||
+ uint16_t items,
|
||||
+ InProcessImporterBridge* bridge)
|
||||
+ : ExternalProcessImporterClient(
|
||||
@@ -1422,7 +1422,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+}
|
||||
+
|
||||
+void BraveExternalProcessImporterClient::OnImportItemFinished(
|
||||
+ importer::ImportItem import_item) {
|
||||
+ user_data_importer::ImportItem import_item) {
|
||||
+ if (!ShouldUseBraveImporter(source_profile_.importer_type)) {
|
||||
+ ExternalProcessImporterClient::OnImportItemFinished(import_item);
|
||||
+ return;
|
||||
@@ -1458,7 +1458,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ public:
|
||||
+ BraveExternalProcessImporterClient(
|
||||
+ base::WeakPtr<ExternalProcessImporterHost> importer_host,
|
||||
+ const importer::SourceProfile& source_profile,
|
||||
+ const user_data_importer::SourceProfile& source_profile,
|
||||
+ uint16_t items,
|
||||
+ InProcessImporterBridge* bridge);
|
||||
+
|
||||
@@ -1471,7 +1471,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ void Start() override;
|
||||
+ void Cancel() override;
|
||||
+ void CloseMojoHandles() override;
|
||||
+ void OnImportItemFinished(importer::ImportItem import_item) override;
|
||||
+ void OnImportItemFinished(user_data_importer::ImportItem import_item) override;
|
||||
+
|
||||
+ protected:
|
||||
+ ~BraveExternalProcessImporterClient() override;
|
||||
@@ -1607,7 +1607,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ }
|
||||
+
|
||||
+ if (!ids.empty() && observer_)
|
||||
+ observer_->ImportItemEnded(importer::EXTENSIONS);
|
||||
+ observer_->ImportItemEnded(user_data_importer::EXTENSIONS);
|
||||
+
|
||||
+ ExternalProcessImporterHost::NotifyImportEnded();
|
||||
+}
|
||||
@@ -1637,7 +1637,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ // Handling extensions importing after finishing all other properties makes
|
||||
+ // logic simpler.
|
||||
+ // Don't import if cancelled.
|
||||
+ if (!cancelled_ && (items_ & importer::EXTENSIONS)) {
|
||||
+ if (!cancelled_ && (items_ & user_data_importer::EXTENSIONS)) {
|
||||
+ LaunchExtensionsImport();
|
||||
+ return;
|
||||
+ }
|
||||
@@ -1807,9 +1807,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+#include "chrome/browser/ui/browser_tabstrip.h"
|
||||
+#include "chrome/browser/ui/tab_modal_confirm_dialog.h"
|
||||
+#include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h"
|
||||
+#include "chrome/common/importer/importer_data_types.h"
|
||||
+#include "chrome/grit/generated_resources.h"
|
||||
+#include "content/public/browser/web_ui.h"
|
||||
+#include "components/user_data_importer/common/importer_data_types.h"
|
||||
+#include "ui/base/ui_base_types.h"
|
||||
+#include "url/gurl.h"
|
||||
+
|
||||
@@ -2071,33 +2071,33 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+#include "chrome/utility/importer/brave_external_process_importer_bridge.h"
|
||||
+#include "chrome/utility/importer/chrome_importer.h"
|
||||
+#include "build/build_config.h"
|
||||
+#include "chrome/common/importer/importer_type.h"
|
||||
+#include "chrome/common/importer/profile_import.mojom.h"
|
||||
+#include "chrome/utility/importer/external_process_importer_bridge.h"
|
||||
+#include "chrome/utility/importer/importer.h"
|
||||
+#include "components/user_data_importer/common/importer_type.h"
|
||||
+#include "content/public/utility/utility_thread.h"
|
||||
+#include "mojo/public/cpp/bindings/remote.h"
|
||||
+#include "mojo/public/cpp/bindings/shared_remote.h"
|
||||
+
|
||||
+namespace {
|
||||
+
|
||||
+scoped_refptr<Importer> CreateImporterByType(importer::ImporterType type) {
|
||||
+scoped_refptr<Importer> CreateImporterByType(user_data_importer::ImporterType type) {
|
||||
+ switch (type) {
|
||||
+ case importer::TYPE_CHROME:
|
||||
+ case user_data_importer::TYPE_CHROME:
|
||||
+ return new ChromeImporter();
|
||||
+ case importer::TYPE_EDGE_CHROMIUM:
|
||||
+ case user_data_importer::TYPE_EDGE_CHROMIUM:
|
||||
+ return new ChromeImporter();
|
||||
+ case importer::TYPE_VIVALDI:
|
||||
+ case user_data_importer::TYPE_VIVALDI:
|
||||
+ return new ChromeImporter();
|
||||
+ case importer::TYPE_OPERA:
|
||||
+ case user_data_importer::TYPE_OPERA:
|
||||
+ return new ChromeImporter();
|
||||
+ case importer::TYPE_YANDEX:
|
||||
+ case user_data_importer::TYPE_YANDEX:
|
||||
+ return new ChromeImporter();
|
||||
+ case importer::TYPE_WHALE:
|
||||
+ case user_data_importer::TYPE_WHALE:
|
||||
+ return new ChromeImporter();
|
||||
+ case importer::TYPE_ARC:
|
||||
+ case user_data_importer::TYPE_ARC:
|
||||
+ return new ChromeImporter();
|
||||
+ case importer::TYPE_BRAVE:
|
||||
+ case user_data_importer::TYPE_BRAVE:
|
||||
+ return new ChromeImporter();
|
||||
+ default:
|
||||
+ break;
|
||||
@@ -2114,7 +2114,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+BraveProfileImportImpl::~BraveProfileImportImpl() = default;
|
||||
+
|
||||
+void BraveProfileImportImpl::StartImport(
|
||||
+ const importer::SourceProfile& source_profile,
|
||||
+ const user_data_importer::SourceProfile& source_profile,
|
||||
+ uint16_t items,
|
||||
+ const base::flat_map<uint32_t, std::string>& localized_strings,
|
||||
+ mojo::PendingRemote<chrome::mojom::ProfileImportObserver> observer) {
|
||||
@@ -2122,21 +2122,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
||||
+ if (source_profile.importer_name.starts_with(u"Chrome")) {
|
||||
+ command_line->AppendSwitch("import-chrome");
|
||||
+ } else if (source_profile.importer_type == importer::TYPE_EDGE_CHROMIUM) {
|
||||
+ } else if (source_profile.importer_type == user_data_importer::TYPE_EDGE_CHROMIUM) {
|
||||
+ command_line->AppendSwitch("import-edge");
|
||||
+ } else if (source_profile.importer_name.starts_with(u"Chromium")) {
|
||||
+ command_line->AppendSwitch("import-chromium");
|
||||
+ } else if (source_profile.importer_type == importer::TYPE_OPERA) {
|
||||
+ } else if (source_profile.importer_type == user_data_importer::TYPE_OPERA) {
|
||||
+ command_line->AppendSwitch("import-opera");
|
||||
+ } else if (source_profile.importer_type == importer::TYPE_YANDEX) {
|
||||
+ } else if (source_profile.importer_type == user_data_importer::TYPE_YANDEX) {
|
||||
+ command_line->AppendSwitch("import-yandex");
|
||||
+ } else if (source_profile.importer_type == importer::TYPE_WHALE) {
|
||||
+ } else if (source_profile.importer_type == user_data_importer::TYPE_WHALE) {
|
||||
+ command_line->AppendSwitch("import-whale");
|
||||
+ } else if (source_profile.importer_type == importer::TYPE_ARC) {
|
||||
+ } else if (source_profile.importer_type == user_data_importer::TYPE_ARC) {
|
||||
+ command_line->AppendSwitch("import-arc");
|
||||
+ } else if (source_profile.importer_type == importer::TYPE_BRAVE) {
|
||||
+ } else if (source_profile.importer_type == user_data_importer::TYPE_BRAVE) {
|
||||
+ command_line->AppendSwitch("import-brave");
|
||||
+ } else if (source_profile.importer_type == importer::TYPE_VIVALDI) {
|
||||
+ } else if (source_profile.importer_type == user_data_importer::TYPE_VIVALDI) {
|
||||
+ command_line->AppendSwitch("import-vivaldi");
|
||||
+ }
|
||||
+
|
||||
@@ -2171,7 +2171,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+}
|
||||
+
|
||||
+void BraveProfileImportImpl::ReportImportItemFinished(
|
||||
+ importer::ImportItem item) {
|
||||
+ user_data_importer::ImportItem item) {
|
||||
+ items_to_import_ ^= item; // Remove finished item from mask.
|
||||
+ if (items_to_import_ == 0) {
|
||||
+ ImporterCleanup();
|
||||
@@ -2226,13 +2226,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ private:
|
||||
+ // chrome::mojom::ChromeProfileImport overrides:
|
||||
+ void StartImport(
|
||||
+ const importer::SourceProfile& source_profile,
|
||||
+ const user_data_importer::SourceProfile& source_profile,
|
||||
+ uint16_t items,
|
||||
+ const base::flat_map<uint32_t, std::string>& localized_strings,
|
||||
+ mojo::PendingRemote<chrome::mojom::ProfileImportObserver> observer)
|
||||
+ override;
|
||||
+ void CancelImport() override;
|
||||
+ void ReportImportItemFinished(importer::ImportItem item) override;
|
||||
+ void ReportImportItemFinished(user_data_importer::ImportItem item) override;
|
||||
+
|
||||
+ void ImporterCleanup();
|
||||
+
|
||||
@@ -2243,7 +2243,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ // directly back to the ProfileImportProcessHost.
|
||||
+ scoped_refptr<BraveExternalProcessImporterBridge> bridge_;
|
||||
+
|
||||
+ // A bitmask of importer::ImportItem.
|
||||
+ // A bitmask of user_data_importer::ImportItem.
|
||||
+ uint16_t items_to_import_ = 0;
|
||||
+
|
||||
+ // Importer of the appropriate type (Firefox, Safari, IE, etc.)
|
||||
@@ -2324,10 +2324,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+#include "base/strings/string_util.h"
|
||||
+#include "base/strings/utf_string_conversions.h"
|
||||
+#include "build/build_config.h"
|
||||
+#include "chrome/common/importer/imported_bookmark_entry.h"
|
||||
+#include "chrome/common/importer/importer_bridge.h"
|
||||
+#include "chrome/common/importer/importer_data_types.h"
|
||||
+#include "chrome/common/importer/importer_url_row.h"
|
||||
+#include "chrome/common/importer/scoped_copy_file.h"
|
||||
+#include "chrome/grit/generated_resources.h"
|
||||
+#include "chrome/utility/importer/brave_external_process_importer_bridge.h"
|
||||
@@ -2338,6 +2335,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+#include "components/password_manager/core/common/password_manager_pref_names.h"
|
||||
+#include "components/prefs/json_pref_store.h"
|
||||
+#include "components/prefs/pref_filter.h"
|
||||
+#include "components/user_data_importer/common/imported_bookmark_entry.h"
|
||||
+#include "components/user_data_importer/common/importer_data_types.h"
|
||||
+#include "components/user_data_importer/common/importer_url_row.h"
|
||||
+#include "components/webdata/common/webdata_constants.h"
|
||||
+#include "sql/database.h"
|
||||
+#include "sql/statement.h"
|
||||
@@ -2446,16 +2446,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+bool PasswordFormToImportedPasswordForm(
|
||||
+ const password_manager::PasswordForm& form,
|
||||
+ importer::ImportedPasswordForm& imported_form) {
|
||||
+ user_data_importer::ImportedPasswordForm& imported_form) {
|
||||
+ if (form.scheme != password_manager::PasswordForm::Scheme::kHtml &&
|
||||
+ form.scheme != password_manager::PasswordForm::Scheme::kBasic) {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ if (form.scheme == password_manager::PasswordForm::Scheme::kHtml) {
|
||||
+ imported_form.scheme = importer::ImportedPasswordForm::Scheme::kHtml;
|
||||
+ imported_form.scheme = user_data_importer::ImportedPasswordForm::Scheme::kHtml;
|
||||
+ } else {
|
||||
+ imported_form.scheme = importer::ImportedPasswordForm::Scheme::kBasic;
|
||||
+ imported_form.scheme = user_data_importer::ImportedPasswordForm::Scheme::kBasic;
|
||||
+ }
|
||||
+
|
||||
+ imported_form.signon_realm = form.signon_realm;
|
||||
@@ -2475,7 +2475,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+ChromeImporter::~ChromeImporter() = default;
|
||||
+
|
||||
+void ChromeImporter::StartImport(const importer::SourceProfile& source_profile,
|
||||
+void ChromeImporter::StartImport(const user_data_importer::SourceProfile& source_profile,
|
||||
+ uint16_t items,
|
||||
+ ImporterBridge* bridge) {
|
||||
+ bridge_ = bridge;
|
||||
@@ -2484,32 +2484,32 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ // The order here is important!
|
||||
+ bridge_->NotifyStarted();
|
||||
+
|
||||
+ if ((items & importer::HISTORY) && !cancelled()) {
|
||||
+ bridge_->NotifyItemStarted(importer::HISTORY);
|
||||
+ if ((items & user_data_importer::HISTORY) && !cancelled()) {
|
||||
+ bridge_->NotifyItemStarted(user_data_importer::HISTORY);
|
||||
+ ImportHistory();
|
||||
+ bridge_->NotifyItemEnded(importer::HISTORY);
|
||||
+ bridge_->NotifyItemEnded(user_data_importer::HISTORY);
|
||||
+ }
|
||||
+
|
||||
+ if ((items & importer::FAVORITES) && !cancelled()) {
|
||||
+ bridge_->NotifyItemStarted(importer::FAVORITES);
|
||||
+ if ((items & user_data_importer::FAVORITES) && !cancelled()) {
|
||||
+ bridge_->NotifyItemStarted(user_data_importer::FAVORITES);
|
||||
+ ImportBookmarks();
|
||||
+ bridge_->NotifyItemEnded(importer::FAVORITES);
|
||||
+ bridge_->NotifyItemEnded(user_data_importer::FAVORITES);
|
||||
+ }
|
||||
+
|
||||
+#if BUILDFLAG(IS_WIN)
|
||||
+ auto source_path = source_profile.importer_type == importer::TYPE_OPERA
|
||||
+ auto source_path = source_profile.importer_type == user_data_importer::TYPE_OPERA
|
||||
+ ? source_path_
|
||||
+ : source_path_.DirName();
|
||||
+#else
|
||||
+ auto source_path = source_path_;
|
||||
+#endif
|
||||
+ const bool set_encryption_key = SetEncryptionKey(source_path);
|
||||
+ if ((items & importer::PASSWORDS) && !cancelled() && set_encryption_key) {
|
||||
+ bridge_->NotifyItemStarted(importer::PASSWORDS);
|
||||
+ if ((items & user_data_importer::PASSWORDS) && !cancelled() && set_encryption_key) {
|
||||
+ bridge_->NotifyItemStarted(user_data_importer::PASSWORDS);
|
||||
+ ImportPasswords(base::FilePath(FILE_PATH_LITERAL("Login Data")));
|
||||
+ ImportPasswords(
|
||||
+ base::FilePath(FILE_PATH_LITERAL("Login Data For Account")));
|
||||
+ bridge_->NotifyItemEnded(importer::PASSWORDS);
|
||||
+ bridge_->NotifyItemEnded(user_data_importer::PASSWORDS);
|
||||
+ }
|
||||
+
|
||||
+ bridge_->NotifyEnded();
|
||||
@@ -2545,11 +2545,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ s.BindInt64(3, ui::PAGE_TRANSITION_MANUAL_SUBFRAME);
|
||||
+ s.BindInt64(4, ui::PAGE_TRANSITION_KEYWORD_GENERATED);
|
||||
+
|
||||
+ std::vector<ImporterURLRow> rows;
|
||||
+ std::vector<user_data_importer::ImporterURLRow> rows;
|
||||
+ while (s.Step() && !cancelled()) {
|
||||
+ GURL url(s.ColumnString(0));
|
||||
+
|
||||
+ ImporterURLRow row(url);
|
||||
+ user_data_importer::ImporterURLRow row(url);
|
||||
+ row.title = s.ColumnString16(1);
|
||||
+ row.last_visit = base::Time::FromSecondsSinceUnixEpoch(
|
||||
+ chromeTimeToDouble((s.ColumnInt64(2))));
|
||||
@@ -2561,7 +2561,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ }
|
||||
+
|
||||
+ if (!rows.empty() && !cancelled())
|
||||
+ bridge_->SetHistoryItems(rows, importer::VISIT_SOURCE_CHROME_IMPORTED);
|
||||
+ bridge_->SetHistoryItems(rows, user_data_importer::VISIT_SOURCE_CHROME_IMPORTED);
|
||||
+}
|
||||
+
|
||||
+void ChromeImporter::ImportBookmarks() {
|
||||
@@ -2579,7 +2579,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ if (!bookmark_dict)
|
||||
+ return;
|
||||
+
|
||||
+ std::vector<ImportedBookmarkEntry> bookmarks;
|
||||
+ std::vector<user_data_importer::ImportedBookmarkEntry> bookmarks;
|
||||
+ const base::Value::Dict* roots = bookmark_dict->FindDict("roots");
|
||||
+ if (roots) {
|
||||
+ // Importing bookmark bar items
|
||||
@@ -2690,7 +2690,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ const base::Value::Dict* folder,
|
||||
+ const std::vector<std::u16string>& parent_path,
|
||||
+ bool is_in_toolbar,
|
||||
+ std::vector<ImportedBookmarkEntry>* bookmarks) {
|
||||
+ std::vector<user_data_importer::ImportedBookmarkEntry>* bookmarks) {
|
||||
+ const base::Value::List* children = folder->FindList("children");
|
||||
+ if (children) {
|
||||
+ for (const auto& value : *children) {
|
||||
@@ -2702,7 +2702,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ auto name = base::UTF8ToUTF16(name_found ? *name_found : std::string());
|
||||
+ const auto* type = dict->FindString("type");
|
||||
+ const auto* url = dict->FindString("url");
|
||||
+ ImportedBookmarkEntry entry;
|
||||
+ user_data_importer::ImportedBookmarkEntry entry;
|
||||
+ if (type && *type == "folder") {
|
||||
+ // Folders are added implicitly on adding children, so we only
|
||||
+ // explicitly add empty folders.
|
||||
@@ -2764,7 +2764,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ bool success = database.GetAutofillableLogins(&forms);
|
||||
+ if (success) {
|
||||
+ for (auto& entry : forms) {
|
||||
+ importer::ImportedPasswordForm form;
|
||||
+ user_data_importer::ImportedPasswordForm form;
|
||||
+ if (PasswordFormToImportedPasswordForm(entry, form)) {
|
||||
+ bridge_->SetPasswordForm(form);
|
||||
+ }
|
||||
@@ -2774,7 +2774,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ success = database.GetBlocklistLogins(&blocklist);
|
||||
+ if (success) {
|
||||
+ for (auto& entry : blocklist) {
|
||||
+ importer::ImportedPasswordForm form;
|
||||
+ user_data_importer::ImportedPasswordForm form;
|
||||
+ if (PasswordFormToImportedPasswordForm(entry, form)) {
|
||||
+ bridge_->SetPasswordForm(form);
|
||||
+ }
|
||||
@@ -2783,7 +2783,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/chrome/utility/importer/chrome_importer.h
|
||||
@@ -0,0 +1,75 @@
|
||||
@@ -0,0 +1,77 @@
|
||||
+/* Copyright (c) 2019 The Brave Authors. All rights reserved.
|
||||
+ * This Source Code Form is subject to the terms of the Mozilla Public
|
||||
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
@@ -2807,7 +2807,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+#include "chrome/utility/importer/importer.h"
|
||||
+#include "components/favicon_base/favicon_usage_data.h"
|
||||
+
|
||||
+namespace user_data_importer {
|
||||
+struct ImportedBookmarkEntry;
|
||||
+}
|
||||
+
|
||||
+namespace sql {
|
||||
+class Database;
|
||||
@@ -2820,7 +2822,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ ChromeImporter& operator=(const ChromeImporter&) = delete;
|
||||
+
|
||||
+ // Importer:
|
||||
+ void StartImport(const importer::SourceProfile& source_profile,
|
||||
+ void StartImport(const user_data_importer::SourceProfile& source_profile,
|
||||
+ uint16_t items,
|
||||
+ ImporterBridge* bridge) override;
|
||||
+
|
||||
@@ -2853,7 +2855,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ const base::Value::Dict* folder,
|
||||
+ const std::vector<std::u16string>& parent_path,
|
||||
+ bool is_in_toolbar,
|
||||
+ std::vector<ImportedBookmarkEntry>* bookmarks);
|
||||
+ std::vector<user_data_importer::ImportedBookmarkEntry>* bookmarks);
|
||||
+
|
||||
+ std::u16string importer_name_;
|
||||
+};
|
||||
@@ -2861,7 +2863,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+#endif // BRAVE_UTILITY_IMPORTER_CHROME_IMPORTER_H_
|
||||
--- a/chrome/app/generated_resources.grd
|
||||
+++ b/chrome/app/generated_resources.grd
|
||||
@@ -10879,6 +10879,9 @@ Check your passwords anytime in <ph name
|
||||
@@ -10985,6 +10985,9 @@ Check your passwords anytime in <ph name
|
||||
Microsoft Edge
|
||||
</message>
|
||||
</if>
|
||||
|
||||
@@ -34,7 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
namespace {
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
@@ -164,20 +166,30 @@ std::vector<importer::SourceProfile> Det
|
||||
@@ -171,20 +173,30 @@ std::vector<user_data_importer::SourcePr
|
||||
if (shell_integration::IsFirefoxDefaultBrowser()) {
|
||||
DetectFirefoxProfiles(locale, &profiles);
|
||||
DetectBuiltinWindowsProfiles(&profiles);
|
||||
@@ -65,15 +65,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ }
|
||||
#endif
|
||||
if (include_interactive_profiles) {
|
||||
importer::SourceProfile bookmarks_profile;
|
||||
@@ -227,5 +239,11 @@ void ImporterList::SourceProfilesLoaded(
|
||||
user_data_importer::SourceProfile bookmarks_profile;
|
||||
@@ -234,5 +246,11 @@ void ImporterList::SourceProfilesLoaded(
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
|
||||
source_profiles_.assign(profiles.begin(), profiles.end());
|
||||
+
|
||||
+ for (auto& profile : source_profiles_) {
|
||||
+ if (profile.services_supported & importer::PASSWORDS)
|
||||
+ profile.services_supported ^= importer::PASSWORDS;
|
||||
+ if (profile.services_supported & user_data_importer::PASSWORDS)
|
||||
+ profile.services_supported ^= user_data_importer::PASSWORDS;
|
||||
+ }
|
||||
+
|
||||
std::move(profiles_loaded_callback).Run();
|
||||
@@ -97,19 +97,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
public_deps = [
|
||||
"//mojo/public/mojom/base",
|
||||
@@ -81,6 +85,9 @@ source_set("importer") {
|
||||
@@ -82,19 +86,28 @@ source_set("importer") {
|
||||
sources = [
|
||||
"firefox_importer_utils.cc",
|
||||
"firefox_importer_utils.h",
|
||||
+ "chrome_importer_constants.h",
|
||||
+ "chrome_importer_utils.cc",
|
||||
+ "chrome_importer_utils.h",
|
||||
"imported_bookmark_entry.cc",
|
||||
"imported_bookmark_entry.h",
|
||||
"importer_autofill_form_data_entry.cc",
|
||||
@@ -93,14 +100,20 @@ source_set("importer") {
|
||||
"importer_url_row.cc",
|
||||
"importer_url_row.h",
|
||||
"importer_autofill_form_data_entry.h",
|
||||
"importer_bridge.cc",
|
||||
"importer_bridge.h",
|
||||
"pstore_declarations.h",
|
||||
+ "scoped_copy_file.cc",
|
||||
+ "scoped_copy_file.h",
|
||||
@@ -130,7 +128,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
]
|
||||
} else if (is_win) {
|
||||
sources += [
|
||||
@@ -111,6 +124,7 @@ source_set("importer") {
|
||||
@@ -105,6 +118,7 @@ source_set("importer") {
|
||||
"ie_importer_utils_win.h",
|
||||
"importer_test_registry_overrider_win.cc",
|
||||
"importer_test_registry_overrider_win.h",
|
||||
@@ -138,10 +136,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
]
|
||||
}
|
||||
deps = [
|
||||
@@ -118,8 +132,17 @@ source_set("importer") {
|
||||
"//chrome/app:generated_resources",
|
||||
@@ -113,8 +127,17 @@ source_set("importer") {
|
||||
"//chrome/common:ini_parser",
|
||||
"//components/favicon_base",
|
||||
"//components/user_data_importer/common",
|
||||
+ "//components/webdata/common",
|
||||
"//content/public/common",
|
||||
+ "//extensions/buildflags",
|
||||
@@ -156,8 +154,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ ]
|
||||
+ }
|
||||
}
|
||||
--- a/chrome/common/importer/importer_type.h
|
||||
+++ b/chrome/common/importer/importer_type.h
|
||||
--- a/components/user_data_importer/common/importer_type.h
|
||||
+++ b/components/user_data_importer/common/importer_type.h
|
||||
@@ -28,6 +28,14 @@ enum ImporterType {
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
TYPE_EDGE = 6,
|
||||
@@ -172,7 +170,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ TYPE_BRAVE = 71,
|
||||
};
|
||||
|
||||
} // namespace importer
|
||||
} // namespace user_data_importer
|
||||
--- a/tools/metrics/histograms/metadata/sql/histograms.xml
|
||||
+++ b/tools/metrics/histograms/metadata/sql/histograms.xml
|
||||
@@ -39,6 +39,7 @@ chromium-metrics-reviews@google.com.
|
||||
@@ -183,15 +181,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<variant name="FileIndexService" summary="FileIndexService"/>
|
||||
<variant name="FirefoxImporter" summary="FirefoxImporter"/>
|
||||
<variant name="FirstPartySets" summary="FirstPartySets"/>
|
||||
--- a/chrome/common/importer/importer_data_types.h
|
||||
+++ b/chrome/common/importer/importer_data_types.h
|
||||
--- a/components/user_data_importer/common/importer_data_types.h
|
||||
+++ b/components/user_data_importer/common/importer_data_types.h
|
||||
@@ -29,7 +29,8 @@ enum ImportItem {
|
||||
SEARCH_ENGINES = 1 << 4,
|
||||
HOME_PAGE = 1 << 5,
|
||||
SEARCH_ENGINES = 1 << 4,
|
||||
HOME_PAGE = 1 << 5,
|
||||
AUTOFILL_FORM_DATA = 1 << 6,
|
||||
- ALL = (1 << 7) - 1 // All the bits should be 1, hence the -1.
|
||||
+ EXTENSIONS = 1 << 7,
|
||||
+ ALL = (1 << 8) - 1 // All the bits should be 1, hence the -1.
|
||||
- ALL = (1 << 7) - 1 // All the bits should be 1, hence the -1.
|
||||
+ EXTENSIONS = 1 << 7,
|
||||
+ ALL = (1 << 8) - 1 // All the bits should be 1, hence the -1.
|
||||
};
|
||||
|
||||
// Information about a profile needed by an importer to do import work.
|
||||
@@ -202,60 +200,59 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ VISIT_SOURCE_CHROME_IMPORTED = 4,
|
||||
};
|
||||
|
||||
} // namespace importer
|
||||
} // namespace user_data_importer
|
||||
--- a/chrome/common/importer/profile_import_process_param_traits_macros.h
|
||||
+++ b/chrome/common/importer/profile_import_process_param_traits_macros.h
|
||||
@@ -20,11 +20,11 @@
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
IPC_ENUM_TRAITS_MIN_MAX_VALUE(importer::ImporterType,
|
||||
importer::TYPE_UNKNOWN,
|
||||
- importer::TYPE_EDGE)
|
||||
+ importer::TYPE_BRAVE)
|
||||
IPC_ENUM_TRAITS_MIN_MAX_VALUE(user_data_importer::ImporterType,
|
||||
user_data_importer::TYPE_UNKNOWN,
|
||||
- user_data_importer::TYPE_EDGE)
|
||||
+ user_data_importer::TYPE_BRAVE)
|
||||
#else
|
||||
IPC_ENUM_TRAITS_MIN_MAX_VALUE(importer::ImporterType,
|
||||
importer::TYPE_UNKNOWN,
|
||||
- importer::TYPE_BOOKMARKS_FILE)
|
||||
+ importer::TYPE_BRAVE)
|
||||
IPC_ENUM_TRAITS_MIN_MAX_VALUE(user_data_importer::ImporterType,
|
||||
user_data_importer::TYPE_UNKNOWN,
|
||||
- user_data_importer::TYPE_BOOKMARKS_FILE)
|
||||
+ user_data_importer::TYPE_BRAVE)
|
||||
#endif
|
||||
|
||||
IPC_ENUM_TRAITS_MIN_MAX_VALUE(importer::ImportItem,
|
||||
IPC_ENUM_TRAITS_MIN_MAX_VALUE(user_data_importer::ImportItem,
|
||||
--- a/chrome/browser/ui/webui/settings/import_data_handler.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/import_data_handler.cc
|
||||
@@ -146,6 +146,9 @@ void ImportDataHandler::HandleImportData
|
||||
if (*type_dict.FindBool(prefs::kImportDialogSearchEngine)) {
|
||||
selected_items |= importer::SEARCH_ENGINES;
|
||||
selected_items |= user_data_importer::SEARCH_ENGINES;
|
||||
}
|
||||
+ if (*type_dict.FindBool(prefs::kImportDialogExtensions)) {
|
||||
+ selected_items |= importer::EXTENSIONS;
|
||||
+ selected_items |= user_data_importer::EXTENSIONS;
|
||||
+ }
|
||||
|
||||
const importer::SourceProfile& source_profile =
|
||||
const user_data_importer::SourceProfile& source_profile =
|
||||
importer_list_->GetSourceProfileAt(browser_index);
|
||||
@@ -223,6 +226,8 @@ void ImportDataHandler::SendBrowserProfi
|
||||
(browser_services & importer::SEARCH_ENGINES) != 0);
|
||||
browser_profile.Set("autofillFormData",
|
||||
(browser_services & importer::AUTOFILL_FORM_DATA) != 0);
|
||||
@@ -225,6 +228,8 @@ void ImportDataHandler::SendBrowserProfi
|
||||
browser_profile.Set(
|
||||
"autofillFormData",
|
||||
(browser_services & user_data_importer::AUTOFILL_FORM_DATA) != 0);
|
||||
+ browser_profile.Set("extensions",
|
||||
+ (browser_services & importer::EXTENSIONS) != 0);
|
||||
+ (browser_services & user_data_importer::EXTENSIONS) != 0);
|
||||
|
||||
browser_profiles.Append(std::move(browser_profile));
|
||||
}
|
||||
--- a/chrome/common/pref_names.h
|
||||
+++ b/chrome/common/pref_names.h
|
||||
@@ -4271,6 +4271,10 @@ inline constexpr char kServiceWorkerToCo
|
||||
// is set as a SharedWorker script URL.
|
||||
@@ -4254,6 +4254,9 @@ inline constexpr char kServiceWorkerToCo
|
||||
inline constexpr char kSharedWorkerBlobURLFixEnabled[] =
|
||||
"worker.shared_worker_blob_url_fix_enabled";
|
||||
+
|
||||
|
||||
+inline constexpr char kImportDialogExtensions[] =
|
||||
+ "import_dialog_extensions";
|
||||
+
|
||||
} // namespace prefs
|
||||
|
||||
#endif // CHROME_COMMON_PREF_NAMES_H_
|
||||
// Boolean indicating whether clearing window.name when the navigation is
|
||||
// top-level, cross-site and swaps BrowsingContextGroup is allowed or not.
|
||||
inline constexpr char kClearWindowNameForNewBrowsingContextGroup[] =
|
||||
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
@@ -1150,6 +1150,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
@@ -1151,6 +1151,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
settings_api::PrefType::kBoolean;
|
||||
(*s_allowlist)[::prefs::kImportDialogSearchEngine] =
|
||||
settings_api::PrefType::kBoolean;
|
||||
@@ -274,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"
|
||||
@@ -213,6 +214,7 @@ void SettingsUI::RegisterProfilePrefs(
|
||||
@@ -203,6 +204,7 @@ void SettingsUI::RegisterProfilePrefs(
|
||||
registry->RegisterBooleanPref(prefs::kImportDialogHistory, true);
|
||||
registry->RegisterBooleanPref(prefs::kImportDialogSavedPasswords, true);
|
||||
registry->RegisterBooleanPref(prefs::kImportDialogSearchEngine, true);
|
||||
@@ -282,7 +279,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
|
||||
SettingsUI::SettingsUI(content::WebUI* web_ui)
|
||||
@@ -259,7 +261,7 @@ SettingsUI::SettingsUI(content::WebUI* w
|
||||
@@ -232,7 +234,7 @@ SettingsUI::SettingsUI(content::WebUI* w
|
||||
AddSettingsPageUIHandler(std::make_unique<DownloadsHandler>(profile));
|
||||
AddSettingsPageUIHandler(std::make_unique<ExtensionControlHandler>());
|
||||
AddSettingsPageUIHandler(std::make_unique<FontHandler>(profile));
|
||||
@@ -293,7 +290,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -880,6 +880,8 @@ void AddImportDataStrings(content::WebUI
|
||||
@@ -897,6 +897,8 @@ void AddImportDataStrings(content::WebUI
|
||||
{"importHistory", IDS_SETTINGS_IMPORT_HISTORY_CHECKBOX},
|
||||
{"importFavorites", IDS_SETTINGS_IMPORT_FAVORITES_CHECKBOX},
|
||||
{"importPasswords", IDS_SETTINGS_IMPORT_PASSWORDS_CHECKBOX},
|
||||
@@ -318,7 +315,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
</div>
|
||||
--- a/chrome/browser/ui/BUILD.gn
|
||||
+++ b/chrome/browser/ui/BUILD.gn
|
||||
@@ -1528,6 +1528,10 @@ static_library("ui") {
|
||||
@@ -1430,6 +1430,10 @@ static_library("ui") {
|
||||
"webui/settings/accessibility_main_handler.h",
|
||||
"webui/settings/appearance_handler.cc",
|
||||
"webui/settings/appearance_handler.h",
|
||||
@@ -329,7 +326,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"webui/settings/browser_lifetime_handler.cc",
|
||||
"webui/settings/browser_lifetime_handler.h",
|
||||
"webui/settings/captions_handler.cc",
|
||||
@@ -1683,6 +1687,13 @@ static_library("ui") {
|
||||
@@ -1585,6 +1589,13 @@ static_library("ui") {
|
||||
]
|
||||
}
|
||||
|
||||
@@ -345,14 +342,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"//base",
|
||||
--- a/chrome/browser/ui/webui/settings/import_data_handler.h
|
||||
+++ b/chrome/browser/ui/webui/settings/import_data_handler.h
|
||||
@@ -38,7 +38,9 @@ class ImportDataHandler : public Setting
|
||||
@@ -36,9 +36,9 @@ class ImportDataHandler : public Setting
|
||||
void RegisterMessages() override;
|
||||
void OnJavascriptAllowed() override {}
|
||||
void OnJavascriptDisallowed() override;
|
||||
|
||||
private:
|
||||
- void StartImport(const importer::SourceProfile& source_profile,
|
||||
-
|
||||
+ friend class BraveImportDataHandler;
|
||||
+ private:
|
||||
+ virtual void StartImport(const importer::SourceProfile& source_profile,
|
||||
private:
|
||||
- void StartImport(const user_data_importer::SourceProfile& source_profile,
|
||||
+ virtual void StartImport(const user_data_importer::SourceProfile& source_profile,
|
||||
uint16_t imported_items);
|
||||
|
||||
// Handler for the "importData" message. First argument is the selected
|
||||
@@ -369,7 +367,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"external_process_importer_client.h",
|
||||
"external_process_importer_host.h",
|
||||
"firefox_profile_lock.h",
|
||||
@@ -36,6 +40,10 @@ source_set("impl") {
|
||||
@@ -37,6 +41,10 @@ source_set("impl") {
|
||||
public_deps = [ "//chrome/browser:browser_public_dependencies" ]
|
||||
|
||||
sources = [
|
||||
@@ -382,10 +380,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"firefox_profile_lock.cc",
|
||||
--- a/chrome/browser/importer/external_process_importer_host.h
|
||||
+++ b/chrome/browser/importer/external_process_importer_host.h
|
||||
@@ -78,8 +78,9 @@ class ExternalProcessImporterHost
|
||||
@@ -79,8 +79,9 @@ class ExternalProcessImporterHost
|
||||
void NotifyImportStarted();
|
||||
void NotifyImportItemStarted(importer::ImportItem item);
|
||||
void NotifyImportItemEnded(importer::ImportItem item);
|
||||
void NotifyImportItemStarted(user_data_importer::ImportItem item);
|
||||
void NotifyImportItemEnded(user_data_importer::ImportItem item);
|
||||
- void NotifyImportEnded();
|
||||
+ void virtual NotifyImportEnded();
|
||||
|
||||
@@ -395,7 +393,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
~ExternalProcessImporterHost() override;
|
||||
--- a/components/history/core/browser/history_types.h
|
||||
+++ b/components/history/core/browser/history_types.h
|
||||
@@ -54,6 +54,8 @@ enum VisitSource {
|
||||
@@ -53,6 +53,8 @@ enum VisitSource {
|
||||
SOURCE_FIREFOX_IMPORTED = 3,
|
||||
SOURCE_IE_IMPORTED = 4,
|
||||
SOURCE_SAFARI_IMPORTED = 5,
|
||||
@@ -406,7 +404,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// Corresponds to the "id" column of the "visits" SQL table.
|
||||
--- a/components/history/core/browser/visit_database.cc
|
||||
+++ b/components/history/core/browser/visit_database.cc
|
||||
@@ -118,6 +118,8 @@ VisitSource VisitSourceFromInt(int value
|
||||
@@ -117,6 +117,8 @@ VisitSource VisitSourceFromInt(int value
|
||||
case SOURCE_FIREFOX_IMPORTED:
|
||||
case SOURCE_IE_IMPORTED:
|
||||
case SOURCE_SAFARI_IMPORTED:
|
||||
@@ -419,9 +417,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+++ b/chrome/browser/importer/in_process_importer_bridge.cc
|
||||
@@ -53,6 +53,8 @@ history::VisitSource ConvertImporterVisi
|
||||
return history::SOURCE_IE_IMPORTED;
|
||||
case importer::VISIT_SOURCE_SAFARI_IMPORTED:
|
||||
case user_data_importer::VISIT_SOURCE_SAFARI_IMPORTED:
|
||||
return history::SOURCE_SAFARI_IMPORTED;
|
||||
+ case importer::VISIT_SOURCE_CHROME_IMPORTED:
|
||||
+ case user_data_importer::VISIT_SOURCE_CHROME_IMPORTED:
|
||||
+ return history::SOURCE_CHROME_IMPORTED;
|
||||
}
|
||||
NOTREACHED();
|
||||
@@ -477,7 +475,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
services.Add(RunPassageEmbeddingsService);
|
||||
--- a/chrome/utility/importer/external_process_importer_bridge.h
|
||||
+++ b/chrome/utility/importer/external_process_importer_bridge.h
|
||||
@@ -69,7 +69,7 @@ class ExternalProcessImporterBridge : pu
|
||||
@@ -72,7 +72,7 @@ class ExternalProcessImporterBridge : pu
|
||||
|
||||
std::u16string GetLocalizedString(int message_id) override;
|
||||
// End ImporterBridge implementation.
|
||||
@@ -513,7 +511,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
--- a/chrome/browser/importer/in_process_importer_bridge.h
|
||||
+++ b/chrome/browser/importer/in_process_importer_bridge.h
|
||||
@@ -57,7 +57,7 @@ class InProcessImporterBridge : public I
|
||||
@@ -59,7 +59,7 @@ class InProcessImporterBridge : public I
|
||||
|
||||
std::u16string GetLocalizedString(int message_id) override;
|
||||
// End ImporterBridge implementation.
|
||||
@@ -527,13 +525,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
@@ -35,6 +35,7 @@ enum ImporterTypeMetrics {
|
||||
|
||||
void LogImporterUseToMetrics(const std::string& metric_postfix,
|
||||
ImporterType type) {
|
||||
user_data_importer::ImporterType type) {
|
||||
+ return;
|
||||
ImporterTypeMetrics metrics_type = IMPORTER_METRICS_UNKNOWN;
|
||||
switch (type) {
|
||||
case TYPE_UNKNOWN:
|
||||
case user_data_importer::TYPE_UNKNOWN:
|
||||
@@ -59,6 +60,9 @@ void LogImporterUseToMetrics(const std::
|
||||
case TYPE_BOOKMARKS_FILE:
|
||||
case user_data_importer::TYPE_BOOKMARKS_FILE:
|
||||
metrics_type = IMPORTER_METRICS_BOOKMARKS_FILE;
|
||||
break;
|
||||
+ default:
|
||||
@@ -544,7 +542,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// Note: This leaks memory, which is the expected behavior as the factory
|
||||
--- a/chrome/browser/importer/external_process_importer_client.h
|
||||
+++ b/chrome/browser/importer/external_process_importer_client.h
|
||||
@@ -51,10 +51,10 @@ class ExternalProcessImporterClient
|
||||
@@ -48,10 +48,10 @@ class ExternalProcessImporterClient
|
||||
const ExternalProcessImporterClient&) = delete;
|
||||
|
||||
// Launches the task to start the external process.
|
||||
@@ -557,7 +555,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// chrome::mojom::ProfileImportObserver:
|
||||
void OnImportStart() override;
|
||||
@@ -84,6 +84,8 @@ class ExternalProcessImporterClient
|
||||
@@ -82,6 +82,8 @@ class ExternalProcessImporterClient
|
||||
const std::vector<ImporterAutofillFormDataEntry>&
|
||||
autofill_form_data_entry_group) override;
|
||||
|
||||
@@ -566,7 +564,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
protected:
|
||||
~ExternalProcessImporterClient() override;
|
||||
|
||||
@@ -99,7 +101,7 @@ class ExternalProcessImporterClient
|
||||
@@ -97,7 +99,7 @@ class ExternalProcessImporterClient
|
||||
// The Mojo connections need to be torn down on the same thread that created
|
||||
// them, but the destructor is not guaranteed to be run on that thread so we
|
||||
// tear down the connections explicitly.
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -2564,6 +2564,7 @@ static_library("browser") {
|
||||
@@ -2602,6 +2602,7 @@ static_library("browser") {
|
||||
"//third_party/libyuv",
|
||||
"//third_party/metrics_proto",
|
||||
"//third_party/re2",
|
||||
@@ -19,7 +19,7 @@
|
||||
"//third_party/widevine/cdm:headers",
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -182,6 +182,7 @@
|
||||
@@ -184,6 +184,7 @@
|
||||
#include "components/translate/core/common/translate_util.h"
|
||||
#include "components/trusted_vault/features.h"
|
||||
#include "components/ui_devtools/switches.h"
|
||||
@@ -44,7 +44,7 @@
|
||||
#endif // CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -296,6 +296,7 @@ source_set("browser") {
|
||||
@@ -295,6 +295,7 @@ source_set("browser") {
|
||||
"//third_party/re2",
|
||||
"//third_party/snappy",
|
||||
"//third_party/sqlite",
|
||||
@@ -54,7 +54,7 @@
|
||||
"//tools/v8_context_snapshot:buildflags",
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -80,6 +80,7 @@
|
||||
@@ -81,6 +81,7 @@
|
||||
#include "components/services/storage/public/cpp/quota_error_or.h"
|
||||
#include "components/services/storage/public/mojom/cache_storage_control.mojom.h"
|
||||
#include "components/tracing/common/tracing_switches.h"
|
||||
@@ -62,7 +62,7 @@
|
||||
#include "components/viz/common/switches.h"
|
||||
#include "components/viz/host/gpu_client.h"
|
||||
#include "components/viz/host/host_frame_sink_manager.h"
|
||||
@@ -3507,6 +3508,8 @@ void RenderProcessHostImpl::PropagateBro
|
||||
@@ -3517,6 +3518,8 @@ void RenderProcessHostImpl::PropagateBro
|
||||
switches::kEnableWebGLImageChromium,
|
||||
switches::kEnableWebGPUDeveloperFeatures,
|
||||
switches::kFileUrlPathAlias,
|
||||
@@ -70,7 +70,7 @@
|
||||
+ switches::kFingerprintingCanvasMeasureTextNoise,
|
||||
switches::kForceDeviceScaleFactor,
|
||||
switches::kForceDisplayColorProfile,
|
||||
switches::kForceGpuMemAvailableMb,
|
||||
switches::kForceHighContrast,
|
||||
--- a/content/child/BUILD.gn
|
||||
+++ b/content/child/BUILD.gn
|
||||
@@ -110,6 +110,7 @@ target(link_target_type, "child") {
|
||||
@@ -83,7 +83,7 @@
|
||||
"//ui/events/blink",
|
||||
--- a/content/child/runtime_features.cc
|
||||
+++ b/content/child/runtime_features.cc
|
||||
@@ -40,6 +40,7 @@
|
||||
@@ -41,6 +41,7 @@
|
||||
#include "third_party/blink/public/common/loader/referrer_utils.h"
|
||||
#include "third_party/blink/public/common/switches.h"
|
||||
#include "third_party/blink/public/platform/web_runtime_features.h"
|
||||
@@ -124,7 +124,7 @@
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "base/time/time.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
@@ -890,6 +891,11 @@ Document::Document(const DocumentInit& i
|
||||
@@ -984,6 +985,11 @@ Document::Document(const DocumentInit& i
|
||||
TRACE_EVENT_WITH_FLOW0("blink", "Document::Document", TRACE_ID_LOCAL(this),
|
||||
TRACE_EVENT_FLAG_FLOW_OUT);
|
||||
DCHECK(agent_);
|
||||
@@ -136,7 +136,7 @@
|
||||
if (base::FeatureList::IsEnabled(features::kDelayAsyncScriptExecution) &&
|
||||
features::kDelayAsyncScriptExecutionDelayByDefaultParam.Get()) {
|
||||
script_runner_delayer_->Activate();
|
||||
@@ -1020,6 +1026,14 @@ const Position Document::PositionAdjuste
|
||||
@@ -1114,6 +1120,14 @@ const Position Document::PositionAdjuste
|
||||
return Position::BeforeNode(*shadow_host);
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
selector_query_cache_ = MakeGarbageCollected<SelectorQueryCache>();
|
||||
--- a/third_party/blink/renderer/core/dom/document.h
|
||||
+++ b/third_party/blink/renderer/core/dom/document.h
|
||||
@@ -558,6 +558,10 @@ class CORE_EXPORT Document : public Cont
|
||||
@@ -582,6 +582,10 @@ class CORE_EXPORT Document : public Cont
|
||||
has_xml_declaration_ = has_xml_declaration ? 1 : 0;
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
V8VisibilityState visibilityState() const;
|
||||
String visibilityStateAsString() const;
|
||||
bool IsPageVisible() const;
|
||||
@@ -2747,6 +2751,9 @@ class CORE_EXPORT Document : public Cont
|
||||
@@ -2780,6 +2784,9 @@ class CORE_EXPORT Document : public Cont
|
||||
|
||||
base::ElapsedTimer start_time_;
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
|
||||
--- a/third_party/blink/renderer/core/dom/element.cc
|
||||
+++ b/third_party/blink/renderer/core/dom/element.cc
|
||||
@@ -2959,6 +2959,11 @@ DOMRectList* Element::getClientRects() {
|
||||
@@ -3016,6 +3016,11 @@ DOMRectList* Element::getClientRects() {
|
||||
DCHECK(element_layout_object);
|
||||
GetDocument().AdjustQuadsForScrollAndAbsoluteZoom(quads,
|
||||
*element_layout_object);
|
||||
@@ -188,7 +188,7 @@
|
||||
return MakeGarbageCollected<DOMRectList>(quads);
|
||||
}
|
||||
|
||||
@@ -2986,6 +2991,9 @@ gfx::RectF Element::GetBoundingClientRec
|
||||
@@ -3043,6 +3048,9 @@ gfx::RectF Element::GetBoundingClientRec
|
||||
DCHECK(element_layout_object);
|
||||
GetDocument().AdjustRectForScrollAndAbsoluteZoom(result,
|
||||
*element_layout_object);
|
||||
@@ -200,7 +200,7 @@
|
||||
|
||||
--- a/third_party/blink/renderer/core/dom/range.cc
|
||||
+++ b/third_party/blink/renderer/core/dom/range.cc
|
||||
@@ -1648,6 +1648,12 @@ DOMRectList* Range::getClientRects() con
|
||||
@@ -1646,6 +1646,12 @@ DOMRectList* Range::getClientRects() con
|
||||
Vector<gfx::QuadF> quads;
|
||||
GetBorderAndTextQuads(quads);
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
return MakeGarbageCollected<DOMRectList>(quads);
|
||||
}
|
||||
|
||||
@@ -1655,7 +1661,11 @@ DOMRect* Range::getBoundingClientRect()
|
||||
@@ -1653,7 +1659,11 @@ DOMRect* Range::getBoundingClientRect()
|
||||
// TODO(crbug.com/1499981): This should be removed once synchronized scrolling
|
||||
// impact is understood.
|
||||
SyncScrollAttemptHeuristic::DidAccessScrollOffset();
|
||||
@@ -276,7 +276,7 @@
|
||||
namespace blink {
|
||||
namespace {
|
||||
|
||||
@@ -1276,13 +1279,26 @@ TextMetrics* BaseRenderingContext2D::mea
|
||||
@@ -1246,13 +1249,26 @@ TextMetrics* BaseRenderingContext2D::mea
|
||||
TextDirection direction =
|
||||
ToTextDirection(state.GetDirection(), host, computed_style);
|
||||
|
||||
@@ -308,7 +308,7 @@
|
||||
String BaseRenderingContext2D::lang() const {
|
||||
--- a/third_party/blink/renderer/platform/BUILD.gn
|
||||
+++ b/third_party/blink/renderer/platform/BUILD.gn
|
||||
@@ -1793,6 +1793,7 @@ component("platform") {
|
||||
@@ -1792,6 +1792,7 @@ component("platform") {
|
||||
"//components/paint_preview/common",
|
||||
"//components/search_engines:search_engine_utils",
|
||||
"//components/translate/core/language_detection:language_detection",
|
||||
@@ -339,11 +339,11 @@
|
||||
#include "third_party/blink/renderer/platform/image-encoders/image_encoder_utils.h"
|
||||
+#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/text/base64.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/text/strcat.h"
|
||||
#include "third_party/skia/include/core/SkImage.h"
|
||||
#include "third_party/skia/include/core/SkSurface.h"
|
||||
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
@@ -2254,6 +2254,12 @@
|
||||
@@ -2310,6 +2310,12 @@
|
||||
status: "stable",
|
||||
},
|
||||
{
|
||||
|
||||
@@ -34,14 +34,14 @@ approach to change color components.
|
||||
#endif // CHROME_BROWSER_BROMITE_FLAG_ENTRIES_H_
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -3510,6 +3510,7 @@ void RenderProcessHostImpl::PropagateBro
|
||||
@@ -3520,6 +3520,7 @@ void RenderProcessHostImpl::PropagateBro
|
||||
switches::kFileUrlPathAlias,
|
||||
switches::kFingerprintingClientRectsNoise,
|
||||
switches::kFingerprintingCanvasMeasureTextNoise,
|
||||
+ switches::kFingerprintingCanvasImageDataNoise,
|
||||
switches::kForceDeviceScaleFactor,
|
||||
switches::kForceDisplayColorProfile,
|
||||
switches::kForceGpuMemAvailableMb,
|
||||
switches::kForceHighContrast,
|
||||
--- a/content/child/runtime_features.cc
|
||||
+++ b/content/child/runtime_features.cc
|
||||
@@ -492,6 +492,8 @@ void SetRuntimeFeaturesFromCommandLine(c
|
||||
@@ -65,7 +65,7 @@ approach to change color components.
|
||||
};
|
||||
--- a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc
|
||||
+++ b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc
|
||||
@@ -599,6 +599,9 @@ ImageData* BaseRenderingContext2D::getIm
|
||||
@@ -555,6 +555,9 @@ ImageData* BaseRenderingContext2D::getIm
|
||||
snapshot->PaintImageForCurrentFrame().GetSkImageInfo().bounds();
|
||||
DCHECK(!bounds.intersect(SkIRect::MakeXYWH(sx, sy, sw, sh)));
|
||||
}
|
||||
@@ -77,7 +77,7 @@ approach to change color components.
|
||||
return image_data;
|
||||
--- a/third_party/blink/renderer/platform/BUILD.gn
|
||||
+++ b/third_party/blink/renderer/platform/BUILD.gn
|
||||
@@ -1737,7 +1737,9 @@ component("platform") {
|
||||
@@ -1736,7 +1736,9 @@ component("platform") {
|
||||
"//third_party/blink/renderer:non_test_config",
|
||||
]
|
||||
|
||||
@@ -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,9 +290,31 @@ 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 @@
|
||||
@@ -2316,6 +2316,9 @@
|
||||
name: "FingerprintingCanvasMeasureTextNoise",
|
||||
},
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ with limited CPU/memory resources and it is disabled by default.
|
||||
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -2241,6 +2241,7 @@ static_library("browser") {
|
||||
@@ -2279,6 +2279,7 @@ static_library("browser") {
|
||||
"//components/net_log",
|
||||
"//components/network_hints/common:mojo_bindings",
|
||||
"//components/network_session_configurator/browser",
|
||||
@@ -102,7 +102,7 @@ with limited CPU/memory resources and it is disabled by default.
|
||||
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -2632,6 +2632,10 @@ const char kMantisFeatureKeyDescription[
|
||||
@@ -2774,6 +2774,10 @@ const char kMantisFeatureKeyDescription[
|
||||
"Feature key to use the Mantis feature on ChromeOS.";
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
@@ -115,7 +115,7 @@ with limited CPU/memory resources and it is disabled by default.
|
||||
const char kMediaRouterCastAllowAllIPsDescription[] =
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -1528,6 +1528,9 @@ extern const char kMantisFeatureKeyName[
|
||||
@@ -1608,6 +1608,9 @@ extern const char kMantisFeatureKeyName[
|
||||
extern const char kMantisFeatureKeyDescription[];
|
||||
#endif // IS_CHROMEOS
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
--- a/chrome/browser/background/extensions/background_mode_manager.cc
|
||||
+++ b/chrome/browser/background/extensions/background_mode_manager.cc
|
||||
@@ -364,7 +364,7 @@ BackgroundModeManager::~BackgroundModeMa
|
||||
@@ -350,7 +350,7 @@ BackgroundModeManager::~BackgroundModeMa
|
||||
|
||||
// static
|
||||
void BackgroundModeManager::RegisterPrefs(PrefRegistrySimple* registry) {
|
||||
@@ -12,7 +12,7 @@
|
||||
void BackgroundModeManager::RegisterProfile(Profile* profile) {
|
||||
--- a/chrome/browser/chrome_content_browser_client.cc
|
||||
+++ b/chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -1407,7 +1407,7 @@ void ChromeContentBrowserClient::Registe
|
||||
@@ -1418,7 +1418,7 @@ void ChromeContentBrowserClient::Registe
|
||||
void ChromeContentBrowserClient::RegisterProfilePrefs(
|
||||
user_prefs::PrefRegistrySyncable* registry) {
|
||||
registry->RegisterBooleanPref(prefs::kDisable3DAPIs, false);
|
||||
@@ -23,7 +23,7 @@
|
||||
// used for mapping the command-line flags).
|
||||
--- a/chrome/browser/net/profile_network_context_service.cc
|
||||
+++ b/chrome/browser/net/profile_network_context_service.cc
|
||||
@@ -529,7 +529,7 @@ void ProfileNetworkContextService::Confi
|
||||
@@ -535,7 +535,7 @@ void ProfileNetworkContextService::Confi
|
||||
void ProfileNetworkContextService::RegisterProfilePrefs(
|
||||
user_prefs::PrefRegistrySyncable* registry) {
|
||||
registry->RegisterBooleanPref(embedder_support::kAlternateErrorPagesEnabled,
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ Subject: [PATCH 56/66] browser: disable profile auto-import on first run
|
||||
|
||||
--- a/chrome/browser/chrome_browser_main.cc
|
||||
+++ b/chrome/browser/chrome_browser_main.cc
|
||||
@@ -1568,11 +1568,6 @@ int ChromeBrowserMainParts::PreMainMessa
|
||||
@@ -1582,11 +1582,6 @@ int ChromeBrowserMainParts::PreMainMessa
|
||||
// and preferences have been registered since some of the import code depends
|
||||
// on preferences.
|
||||
if (first_run::IsChromeFirstRun()) {
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ very interesting in themselves. Force them to be stored.
|
||||
|
||||
--- a/third_party/blink/common/mime_util/mime_util.cc
|
||||
+++ b/third_party/blink/common/mime_util/mime_util.cc
|
||||
@@ -87,6 +87,7 @@ constexpr auto kUnsupportedTextTypes =
|
||||
@@ -88,6 +88,7 @@ constexpr auto kUnsupportedTextTypes =
|
||||
"text/x-csv",
|
||||
"text/x-vcf",
|
||||
"text/rtf",
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ it as hidden as it was before?
|
||||
|
||||
--- a/net/cert/x509_util.cc
|
||||
+++ b/net/cert/x509_util.cc
|
||||
@@ -281,7 +281,7 @@ bool GetTLSServerEndPointChannelBinding(
|
||||
@@ -282,7 +282,7 @@ bool GetTLSServerEndPointChannelBinding(
|
||||
}
|
||||
|
||||
// RSA keys created by CreateKeyAndSelfSignedCert will be of this length.
|
||||
|
||||
@@ -16,7 +16,7 @@ the case anyway, since we are based off Chromium, not Chrome.
|
||||
|
||||
--- a/chrome/browser/app_controller_mac.mm
|
||||
+++ b/chrome/browser/app_controller_mac.mm
|
||||
@@ -1072,7 +1072,7 @@ class AppControllerNativeThemeObserver :
|
||||
@@ -1075,7 +1075,7 @@ class AppControllerNativeThemeObserver :
|
||||
CFStringRef checkInterval = CFSTR("checkInterval");
|
||||
CFPropertyListRef plist = CFPreferencesCopyAppValue(checkInterval, app);
|
||||
if (!plist) {
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
--- a/components/webui/about/resources/about_credits_reciprocal.tmpl
|
||||
+++ b/components/webui/about/resources/about_credits_reciprocal.tmpl
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="open-sourced">
|
||||
- {{opensource_project}} software is made available as source code
|
||||
- <a href="{{opensource_link}}">here</a>.
|
||||
+ {{opensource_project}} source code is available in
|
||||
+ the <a href="{{opensource_link}}">repository</a>.
|
||||
</div>
|
||||
--- /dev/null
|
||||
+++ b/third_party/ungoogled-chromium/LICENSE
|
||||
@@ -0,0 +1,29 @@
|
||||
+BSD 3-Clause License
|
||||
+
|
||||
+Copyright (c) 2015-2025, The ungoogled-chromium Authors
|
||||
+All rights reserved.
|
||||
+
|
||||
+Redistribution and use in source and binary forms, with or without
|
||||
+modification, are permitted provided that the following conditions are met:
|
||||
+
|
||||
+1. Redistributions of source code must retain the above copyright notice, this
|
||||
+ list of conditions and the following disclaimer.
|
||||
+
|
||||
+2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
+ this list of conditions and the following disclaimer in the documentation
|
||||
+ and/or other materials provided with the distribution.
|
||||
+
|
||||
+3. Neither the name of the copyright holder nor the names of its
|
||||
+ contributors may be used to endorse or promote products derived from
|
||||
+ this software without specific prior written permission.
|
||||
+
|
||||
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
--- a/tools/licenses/licenses.py
|
||||
+++ b/tools/licenses/licenses.py
|
||||
@@ -1015,6 +1015,16 @@ def GenerateCredits(file_template_file,
|
||||
entries.append(
|
||||
MetadataToTemplateEntry(chromium_license_metadata, entry_template))
|
||||
|
||||
+ ugc_license_metadata = {
|
||||
+ 'Name': 'ungoogled-chromium',
|
||||
+ 'URL': 'https://github.com/ungoogled-software/ungoogled-chromium',
|
||||
+ 'Shipped': 'yes',
|
||||
+ 'License File': [os.path.join(_REPOSITORY_ROOT, 'third_party', 'ungoogled-chromium', 'LICENSE')],
|
||||
+ }
|
||||
+
|
||||
+ entries.append(
|
||||
+ MetadataToTemplateEntry(ugc_license_metadata, entry_template))
|
||||
+
|
||||
entries_by_name = {}
|
||||
for path in third_party_dirs:
|
||||
try:
|
||||
@@ -1059,8 +1069,8 @@ def GenerateCredits(file_template_file,
|
||||
reciprocal_template = codecs.open(reciprocal_template_file,
|
||||
encoding='utf-8').read()
|
||||
reciprocal_contents = EvaluateTemplate(reciprocal_template, {
|
||||
- 'opensource_project': 'Chromium',
|
||||
- 'opensource_link': 'https://source.chromium.org/chromium'
|
||||
+ 'opensource_project': 'ungoogled-chromium',
|
||||
+ 'opensource_link': 'https://github.com/ungoogled-software/ungoogled-chromium'
|
||||
},
|
||||
escape=False)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/browser/ui/browser.cc
|
||||
+++ b/chrome/browser/ui/browser.cc
|
||||
@@ -3824,6 +3824,10 @@ void Browser::UpdateBookmarkBarState(Boo
|
||||
@@ -3825,6 +3825,10 @@ void Browser::UpdateBookmarkBarState(Boo
|
||||
}
|
||||
|
||||
bool Browser::ShouldShowBookmarkBar() const {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/browser/ui/browser.cc
|
||||
+++ b/chrome/browser/ui/browser.cc
|
||||
@@ -143,6 +143,7 @@
|
||||
@@ -140,6 +140,7 @@
|
||||
#include "chrome/browser/ui/unload_controller.h"
|
||||
#include "chrome/browser/ui/views/frame/browser_view.h"
|
||||
#include "chrome/browser/ui/views/frame/contents_web_view.h"
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "chrome/browser/ui/views/status_bubble_views.h"
|
||||
#include "chrome/browser/ui/web_applications/app_browser_controller.h"
|
||||
#include "chrome/browser/ui/web_applications/web_app_launch_utils.h"
|
||||
@@ -640,6 +641,7 @@ Browser::Browser(const CreateParams& par
|
||||
@@ -658,6 +659,7 @@ Browser::Browser(const CreateParams& par
|
||||
omit_from_session_restore_(params.omit_from_session_restore),
|
||||
should_trigger_session_restore_(params.should_trigger_session_restore),
|
||||
cancel_download_confirmation_state_(NOT_PROMPTED),
|
||||
@@ -16,7 +16,7 @@
|
||||
override_bounds_(params.initial_bounds),
|
||||
initial_show_state_(params.initial_show_state),
|
||||
initial_workspace_(params.initial_workspace),
|
||||
@@ -1102,20 +1104,22 @@ Browser::WarnBeforeClosingResult Browser
|
||||
@@ -1073,20 +1075,22 @@ Browser::WarnBeforeClosingResult Browser
|
||||
return WarnBeforeClosingResult::kOkToClose;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
}
|
||||
|
||||
DCHECK(!warn_before_closing_callback_)
|
||||
@@ -1153,6 +1157,7 @@ bool Browser::TryToCloseWindow(
|
||||
@@ -1124,6 +1128,7 @@ bool Browser::TryToCloseWindow(
|
||||
|
||||
void Browser::ResetTryToCloseWindow() {
|
||||
cancel_download_confirmation_state_ = NOT_PROMPTED;
|
||||
@@ -60,7 +60,7 @@
|
||||
unload_controller_.ResetTryToCloseWindow();
|
||||
}
|
||||
|
||||
@@ -3542,6 +3547,58 @@ bool Browser::CanCloseWithInProgressDown
|
||||
@@ -3543,6 +3548,58 @@ bool Browser::CanCloseWithInProgressDown
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
void Browser::InProgressDownloadResponse(bool cancel_downloads) {
|
||||
if (cancel_downloads) {
|
||||
cancel_download_confirmation_state_ = RESPONSE_RECEIVED;
|
||||
@@ -3567,6 +3624,22 @@ void Browser::InProgressDownloadResponse
|
||||
@@ -3568,6 +3625,22 @@ void Browser::InProgressDownloadResponse
|
||||
|
||||
std::move(warn_before_closing_callback_)
|
||||
.Run(WarnBeforeClosingResult::kDoNotClose);
|
||||
@@ -144,15 +144,15 @@
|
||||
void Browser::CookieMigrationNoticeResponse(bool proceed_closing) {
|
||||
--- a/chrome/browser/ui/browser.h
|
||||
+++ b/chrome/browser/ui/browser.h
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "chrome/browser/ui/browser_navigator_params.h"
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "chrome/browser/ui/browser_window/public/browser_window_interface.h"
|
||||
#include "chrome/browser/ui/browser_window/public/desktop_browser_window_capabilities_delegate.h"
|
||||
#include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h"
|
||||
+#include "chrome/browser/ui/simple_message_box.h"
|
||||
#include "chrome/browser/ui/signin/signin_view_controller.h"
|
||||
#include "chrome/browser/ui/tabs/tab_strip_model.h"
|
||||
#include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
|
||||
@@ -1237,12 +1238,17 @@ class Browser : public TabStripModelObse
|
||||
#include "chrome/browser/ui/unload_controller.h"
|
||||
@@ -1204,12 +1205,17 @@ class Browser : public TabStripModelObse
|
||||
// Returns true if the window can close, false otherwise.
|
||||
bool CanCloseWithInProgressDownloads();
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
// Called when the user has decided whether to proceed or not with the browser
|
||||
// closure, in case the cookie migration notice was shown. |proceed_closing|
|
||||
// is true if the browser can be closed.
|
||||
@@ -1413,6 +1419,8 @@ class Browser : public TabStripModelObse
|
||||
@@ -1389,6 +1395,8 @@ class Browser : public TabStripModelObse
|
||||
// when the browser is closed with in-progress downloads.
|
||||
CancelDownloadConfirmationState cancel_download_confirmation_state_;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/browser/chrome_content_browser_client.cc
|
||||
+++ b/chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -821,11 +821,15 @@ bool HandleNewTabPageLocationOverride(
|
||||
@@ -833,11 +833,15 @@ bool HandleNewTabPageLocationOverride(
|
||||
|
||||
// Don't change the URL when incognito mode.
|
||||
if (profile->IsOffTheRecord()) {
|
||||
@@ -29,7 +29,7 @@
|
||||
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
|
||||
--- a/components/webui/flags/flags_state.cc
|
||||
+++ b/components/webui/flags/flags_state.cc
|
||||
@@ -233,6 +233,7 @@ std::string GetCombinedOriginListValue(c
|
||||
@@ -234,6 +234,7 @@ std::string GetCombinedOriginListValue(c
|
||||
command_line.GetSwitchValueASCII(command_line_switch);
|
||||
const std::string new_value =
|
||||
flags_storage.GetOriginListFlag(internal_entry_name);
|
||||
@@ -37,7 +37,7 @@
|
||||
return CombineAndSanitizeOriginLists(existing_value, new_value);
|
||||
}
|
||||
|
||||
@@ -483,6 +484,7 @@ void FlagsState::SetOriginListFlag(const
|
||||
@@ -484,6 +485,7 @@ void FlagsState::SetOriginListFlag(const
|
||||
const std::string& value,
|
||||
FlagsStorage* flags_storage) {
|
||||
const std::string new_value =
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
--- a/third_party/blink/public/common/features.h
|
||||
+++ b/third_party/blink/public/common/features.h
|
||||
@@ -20,6 +20,8 @@
|
||||
@@ -22,6 +22,8 @@
|
||||
namespace blink {
|
||||
namespace features {
|
||||
|
||||
@@ -33,15 +33,15 @@
|
||||
//
|
||||
--- a/third_party/blink/renderer/core/editing/selection_controller.cc
|
||||
+++ b/third_party/blink/renderer/core/editing/selection_controller.cc
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "third_party/blink/renderer/core/editing/selection_controller.h"
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include "base/auto_reset.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
+#include "third_party/blink/public/common/features.h"
|
||||
#include "third_party/blink/public/common/input/web_menu_source_type.h"
|
||||
#include "third_party/blink/public/platform/web_input_event_result.h"
|
||||
#include "third_party/blink/renderer/core/annotation/annotation_agent_impl.h"
|
||||
@@ -1436,10 +1437,14 @@ FrameSelection& SelectionController::Sel
|
||||
@@ -1437,10 +1438,14 @@ FrameSelection& SelectionController::Sel
|
||||
}
|
||||
|
||||
bool IsSelectionOverLink(const MouseEventWithHitTestResults& event) {
|
||||
@@ -66,7 +66,7 @@
|
||||
#include "third_party/blink/public/platform/web_input_event_result.h"
|
||||
#include "third_party/blink/renderer/bindings/core/v8/v8_drag_event_init.h"
|
||||
#include "third_party/blink/renderer/bindings/core/v8/v8_pointer_event_init.h"
|
||||
@@ -656,8 +657,14 @@ WebInputEventResult MouseEventManager::H
|
||||
@@ -632,8 +633,14 @@ WebInputEventResult MouseEventManager::H
|
||||
|
||||
bool single_click = event.Event().click_count <= 1;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/browser/ui/views/frame/browser_frame.cc
|
||||
+++ b/chrome/browser/ui/views/frame/browser_frame.cc
|
||||
@@ -643,5 +643,7 @@ bool BrowserFrame::RegenerateFrameOnThem
|
||||
@@ -707,5 +707,7 @@ bool BrowserFrame::RegenerateFrameOnThem
|
||||
}
|
||||
|
||||
bool BrowserFrame::IsIncognitoBrowser() const {
|
||||
@@ -10,7 +10,7 @@
|
||||
}
|
||||
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
|
||||
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
|
||||
@@ -59,6 +59,7 @@
|
||||
@@ -60,6 +60,7 @@
|
||||
#include "ui/base/webui/jstemplate_builder.h"
|
||||
#include "ui/base/webui/web_ui_util.h"
|
||||
#include "ui/color/color_provider.h"
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "ui/gfx/color_utils.h"
|
||||
#include "ui/native_theme/native_theme.h"
|
||||
|
||||
@@ -467,7 +468,9 @@ void NTPResourceCache::CreateNewTabIncog
|
||||
@@ -468,7 +469,9 @@ void NTPResourceCache::CreateNewTabIncog
|
||||
profile_->GetPrefs()->GetString(prefs::kCurrentThemeID);
|
||||
|
||||
// Colors.
|
||||
|
||||
@@ -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
|
||||
@@ -569,6 +570,15 @@ AutocompleteController::AutocompleteCont
|
||||
steady_state_omnibox_position_(
|
||||
metrics::OmniboxEventProto::UNKNOWN_POSITION) {
|
||||
provider_types &= ~OmniboxFieldTrial::GetDisabledProviderTypes();
|
||||
@@ -71,15 +71,15 @@
|
||||
client()->GetHistoryService();
|
||||
--- a/components/omnibox/browser/search_provider.cc
|
||||
+++ b/components/omnibox/browser/search_provider.cc
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <utility>
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "base/base64.h"
|
||||
+#include "base/command_line.h"
|
||||
#include "base/feature_list.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/functional/callback.h"
|
||||
@@ -628,6 +629,9 @@ void SearchProvider::Run(bool query_is_p
|
||||
@@ -631,6 +632,9 @@ void SearchProvider::Run(bool query_is_p
|
||||
}
|
||||
|
||||
void SearchProvider::DoHistoryQuery(bool minimal_changes) {
|
||||
@@ -100,7 +100,7 @@
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/i18n/char_iterator.h"
|
||||
@@ -655,6 +657,8 @@ GURL FixupURLInternal(const std::string&
|
||||
@@ -648,6 +650,8 @@ GURL FixupURLInternal(const std::string&
|
||||
|
||||
FixupHost(trimmed, parts.host, parts.scheme.is_valid(), desired_tld, &url);
|
||||
if (chrome_url && !parts.host.is_valid()) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
--- a/chrome/browser/ui/tab_helpers.cc
|
||||
+++ b/chrome/browser/ui/tab_helpers.cc
|
||||
@@ -545,7 +545,9 @@ void TabHelpers::AttachTabHelpers(WebCon
|
||||
@@ -544,7 +544,9 @@ void TabHelpers::AttachTabHelpers(WebCon
|
||||
profile, web_contents);
|
||||
#endif // BUILDFLAG(SAFE_BROWSING_AVAILABLE)
|
||||
SafetyTipWebContentsObserver::CreateForWebContents(web_contents);
|
||||
@@ -25,7 +25,7 @@
|
||||
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
|
||||
--- a/chrome/renderer/chrome_render_frame_observer.cc
|
||||
+++ b/chrome/renderer/chrome_render_frame_observer.cc
|
||||
@@ -253,14 +253,16 @@ void ChromeRenderFrameObserver::DidFinis
|
||||
@@ -258,14 +258,16 @@ void ChromeRenderFrameObserver::DidFinis
|
||||
if (frame->Parent() || frame->IsInFencedFrameTree())
|
||||
return;
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
#include "base/containers/contains.h"
|
||||
#include "base/containers/fixed_flat_map.h"
|
||||
#include "base/containers/flat_map.h"
|
||||
@@ -346,6 +347,12 @@ bool ShouldCommitUpdateToAccount(
|
||||
@@ -370,6 +371,12 @@ bool ShouldCommitUpdateToAccount(
|
||||
return account_data_changed;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
} // namespace
|
||||
|
||||
// TemplateURLService::LessWithPrefix -----------------------------------------
|
||||
@@ -526,6 +533,7 @@ TemplateURLService::TemplateURLService(
|
||||
@@ -550,6 +557,7 @@ TemplateURLService::TemplateURLService(
|
||||
std::unique_ptr<TemplateURLServiceClient> client,
|
||||
const base::RepeatingClosure& dsp_change_callback)
|
||||
: prefs_(prefs),
|
||||
@@ -81,7 +81,7 @@
|
||||
search_engine_choice_service_(search_engine_choice_service),
|
||||
prepopulate_data_resolver_(prepopulate_data_resolver),
|
||||
search_terms_data_(std::move(search_terms_data)),
|
||||
@@ -631,8 +639,8 @@ bool TemplateURLService::CanAddAutogener
|
||||
@@ -655,8 +663,8 @@ bool TemplateURLService::CanAddAutogener
|
||||
// that may interfere with search queries). An easy heuristic for this is
|
||||
// whether the user has a TemplateURL that has been manually modified (e.g.,
|
||||
// renamed) connected to the same host.
|
||||
@@ -92,7 +92,7 @@
|
||||
}
|
||||
|
||||
bool TemplateURLService::IsPrepopulatedOrDefaultProviderByPolicy(
|
||||
@@ -2441,6 +2449,8 @@ SyncDataMap TemplateURLService::CreateGU
|
||||
@@ -2480,6 +2488,8 @@ SyncDataMap TemplateURLService::CreateGU
|
||||
}
|
||||
|
||||
void TemplateURLService::Init() {
|
||||
@@ -101,7 +101,7 @@
|
||||
if (client_) {
|
||||
client_->SetOwner(this);
|
||||
}
|
||||
@@ -2623,6 +2633,9 @@ void TemplateURLService::ChangeToLoadedS
|
||||
@@ -2662,6 +2672,9 @@ void TemplateURLService::ChangeToLoadedS
|
||||
|
||||
bool TemplateURLService::CanAddAutogeneratedKeywordForHost(
|
||||
const std::string& host) const {
|
||||
@@ -113,7 +113,7 @@
|
||||
return true;
|
||||
--- a/components/search_engines/template_url_service.h
|
||||
+++ b/components/search_engines/template_url_service.h
|
||||
@@ -911,6 +911,8 @@ class TemplateURLService final : public
|
||||
@@ -908,6 +908,8 @@ class TemplateURLService final : public
|
||||
|
||||
raw_ref<TemplateURLPrepopulateData::Resolver> prepopulate_data_resolver_;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "base/debug/alias.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/i18n/rtl.h"
|
||||
@@ -728,6 +729,13 @@ void Tab::HideHover(TabStyle::HideHoverS
|
||||
@@ -741,6 +742,13 @@ void Tab::HideHover(TabStyle::HideHoverS
|
||||
DeprecatedLayoutImmediately();
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// BrowserView::GetAccessibleTabLabel to get the updated accessible name.
|
||||
--- a/chrome/browser/ui/views/tabs/tab.h
|
||||
+++ b/chrome/browser/ui/views/tabs/tab.h
|
||||
@@ -93,6 +93,7 @@ class Tab : public gfx::AnimationDelegat
|
||||
@@ -98,6 +98,7 @@ class Tab : public gfx::AnimationDelegat
|
||||
void OnMouseEntered(const ui::MouseEvent& event) override;
|
||||
void OnMouseExited(const ui::MouseEvent& event) override;
|
||||
void OnGestureEvent(ui::GestureEvent* event) override;
|
||||
@@ -42,7 +42,7 @@
|
||||
#include "base/check.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/containers/adapters.h"
|
||||
@@ -1936,6 +1937,8 @@ void TabStrip::OnMouseEventInTab(views::
|
||||
@@ -1960,6 +1961,8 @@ void TabStrip::OnMouseEventInTab(views::
|
||||
}
|
||||
|
||||
void TabStrip::UpdateHoverCard(Tab* tab, HoverCardUpdateType update_type) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/browser/ui/browser_command_controller.cc
|
||||
+++ b/chrome/browser/ui/browser_command_controller.cc
|
||||
@@ -1555,7 +1555,8 @@ void BrowserCommandController::InitComma
|
||||
@@ -1558,7 +1558,8 @@ void BrowserCommandController::InitComma
|
||||
command_updater_.UpdateCommandEnabled(IDC_WINDOW_CLOSE_OTHER_TABS,
|
||||
normal_window);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
command_updater_.UpdateCommandEnabled(IDC_TAB_SEARCH_CLOSE,
|
||||
--- a/chrome/browser/ui/ui_features.cc
|
||||
+++ b/chrome/browser/ui/ui_features.cc
|
||||
@@ -458,6 +458,10 @@ static std::string GetCountryCode() {
|
||||
@@ -388,6 +388,10 @@ static std::string GetCountryCode() {
|
||||
}
|
||||
|
||||
bool IsTabSearchMoving() {
|
||||
@@ -25,7 +25,7 @@
|
||||
base::FeatureList::IsEnabled(
|
||||
--- a/chrome/browser/ui/views/frame/browser_view.cc
|
||||
+++ b/chrome/browser/ui/views/frame/browser_view.cc
|
||||
@@ -5283,6 +5283,7 @@ void BrowserView::AddedToWidget() {
|
||||
@@ -5272,6 +5272,7 @@ void BrowserView::AddedToWidget() {
|
||||
|
||||
toolbar_->Init();
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
|
||||
--- a/components/webui/flags/flags_state.cc
|
||||
+++ b/components/webui/flags/flags_state.cc
|
||||
@@ -234,6 +234,7 @@ std::string GetCombinedOriginListValue(c
|
||||
@@ -235,6 +235,7 @@ std::string GetCombinedOriginListValue(c
|
||||
const std::string new_value =
|
||||
flags_storage.GetOriginListFlag(internal_entry_name);
|
||||
if (command_line_switch == "custom-ntp") return existing_value.empty() ? new_value : existing_value;
|
||||
@@ -19,7 +19,7 @@
|
||||
return CombineAndSanitizeOriginLists(existing_value, new_value);
|
||||
}
|
||||
|
||||
@@ -485,6 +486,7 @@ void FlagsState::SetOriginListFlag(const
|
||||
@@ -486,6 +487,7 @@ void FlagsState::SetOriginListFlag(const
|
||||
FlagsStorage* flags_storage) {
|
||||
const std::string new_value =
|
||||
internal_name == "custom-ntp" ? value :
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "base/containers/adapters.h"
|
||||
#include "base/containers/flat_map.h"
|
||||
#include "base/containers/span.h"
|
||||
@@ -1161,6 +1162,10 @@ void TabStripModel::CloseAllTabsInGroup(
|
||||
@@ -1165,6 +1166,10 @@ void TabStripModel::CloseAllTabsInGroup(
|
||||
|
||||
void TabStripModel::CloseWebContentsAt(int index, uint32_t close_types) {
|
||||
CHECK(ContainsIndex(index));
|
||||
@@ -19,7 +19,7 @@
|
||||
CloseTabs({GetWebContentsAt(index)}, close_types);
|
||||
}
|
||||
|
||||
@@ -2789,9 +2794,13 @@ TabStripModel::GetGroupsDestroyedFromRem
|
||||
@@ -2827,9 +2832,13 @@ TabStripModel::GetGroupsDestroyedFromRem
|
||||
void TabStripModel::ExecuteCloseTabsByIndices(
|
||||
base::RepeatingCallback<std::vector<int>()> get_indices_to_close,
|
||||
uint32_t close_types) {
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
|
||||
#include "base/auto_reset.h"
|
||||
+#include "base/command_line.h"
|
||||
#include "base/notimplemented.h"
|
||||
#include "build/build_config.h"
|
||||
#include "chrome/browser/extensions/crx_installer.h"
|
||||
#include "chrome/browser/extensions/extension_install_prompt.h"
|
||||
@@ -113,6 +114,14 @@ scoped_refptr<extensions::CrxInstaller>
|
||||
@@ -114,6 +115,14 @@ scoped_refptr<extensions::CrxInstaller>
|
||||
return installer;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
bool IsExtensionDownload(const DownloadItem& download_item) {
|
||||
if (download_item.GetTargetDisposition() ==
|
||||
DownloadItem::TARGET_DISPOSITION_PROMPT)
|
||||
@@ -121,7 +130,7 @@ bool IsExtensionDownload(const DownloadI
|
||||
@@ -122,7 +131,7 @@ bool IsExtensionDownload(const DownloadI
|
||||
if (download_item.GetMimeType() == extensions::Extension::kMimeType ||
|
||||
extensions::UserScript::IsURLUserScript(download_item.GetURL(),
|
||||
download_item.GetMimeType())) {
|
||||
@@ -69,7 +69,7 @@
|
||||
// Don't prompt for file types that are marked for opening automatically.
|
||||
--- a/chrome/browser/extensions/extension_management.cc
|
||||
+++ b/chrome/browser/extensions/extension_management.cc
|
||||
@@ -286,6 +286,13 @@ bool ExtensionManagement::IsInstallation
|
||||
@@ -319,6 +319,13 @@ bool ExtensionManagement::IsInstallation
|
||||
bool ExtensionManagement::IsOffstoreInstallAllowed(
|
||||
const GURL& url,
|
||||
const GURL& referrer_url) const {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
|
||||
--- a/net/socket/ssl_client_socket_impl.cc
|
||||
+++ b/net/socket/ssl_client_socket_impl.cc
|
||||
@@ -198,7 +198,8 @@ class SSLClientSocketImpl::SSLContext {
|
||||
@@ -199,7 +199,8 @@ class SSLClientSocketImpl::SSLContext {
|
||||
SSL_CTX_sess_set_new_cb(ssl_ctx_.get(), NewSessionCallback);
|
||||
SSL_CTX_set_timeout(ssl_ctx_.get(), 1 * 60 * 60 /* one hour */);
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
widget->Show();
|
||||
}
|
||||
|
||||
@@ -943,6 +956,9 @@ void ExtensionsToolbarContainer::UpdateC
|
||||
@@ -958,6 +971,9 @@ void ExtensionsToolbarContainer::UpdateC
|
||||
}
|
||||
|
||||
bool ExtensionsToolbarContainer::ShouldContainerBeVisible() const {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/browser/ui/views/frame/browser_view.cc
|
||||
+++ b/chrome/browser/ui/views/frame/browser_view.cc
|
||||
@@ -2370,6 +2370,10 @@ void BrowserView::ExitFullscreen() {
|
||||
@@ -2238,6 +2238,10 @@ void BrowserView::ExitFullscreen() {
|
||||
void BrowserView::UpdateExclusiveAccessBubble(
|
||||
const ExclusiveAccessBubbleParams& params,
|
||||
ExclusiveAccessBubbleHideCallback first_hide_callback) {
|
||||
@@ -13,7 +13,7 @@
|
||||
platform_util::IsBrowserLockedFullscreen(browser_.get());
|
||||
--- a/chrome/browser/ui/views/fullscreen_control/fullscreen_control_host.cc
|
||||
+++ b/chrome/browser/ui/views/fullscreen_control/fullscreen_control_host.cc
|
||||
@@ -72,6 +72,10 @@ bool IsExitUiEnabled() {
|
||||
@@ -73,6 +73,10 @@ bool IsExitUiEnabled() {
|
||||
// menu and controls reveal when the cursor is moved to the top.
|
||||
return false;
|
||||
#else
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/browser/ui/views/tabs/tab.cc
|
||||
+++ b/chrome/browser/ui/views/tabs/tab.cc
|
||||
@@ -1174,7 +1174,11 @@ void Tab::UpdateIconVisibility() {
|
||||
@@ -1139,7 +1139,11 @@ void Tab::UpdateIconVisibility() {
|
||||
// Close button is shown on active tabs regardless of the size.
|
||||
showing_close_button_ = true;
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
showing_alert_indicator_ =
|
||||
has_alert_icon && alert_icon_width <= available_width;
|
||||
@@ -1203,6 +1207,8 @@ void Tab::UpdateIconVisibility() {
|
||||
@@ -1168,6 +1172,8 @@ void Tab::UpdateIconVisibility() {
|
||||
!controller_->IsLockedForOnTask() &&
|
||||
#endif
|
||||
large_enough_for_close_button;
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
--- a/chrome/browser/ungoogled_flag_entries.h
|
||||
+++ b/chrome/browser/ungoogled_flag_entries.h
|
||||
@@ -144,4 +144,8 @@
|
||||
"Spoof WebGL Info",
|
||||
"Return generic values for WebGLDebugRendererInfo to remove a potential data leak while preventing potential website breakage. ungoogled-chromium flag.",
|
||||
kOsAll, FEATURE_WITH_PARAMS_VALUE_TYPE(blink::features::kSpoofWebGLInfo, kSpoofWebGLChoices, "SpoofWebGLInfo")},
|
||||
+ {"increase-incognito-storage-quota",
|
||||
+ "Increases the storage quota for Incognito and Guest profiles",
|
||||
+ "Makes Incognito and Guest profiles compute the storage quota with the same algorithm that regular profiles use. This makes it harder for websites to detect Incognito mode, but may allow sites to induce heavy memory pressure. ungoogled-chromium flag.",
|
||||
+ kOsAll, FEATURE_VALUE_TYPE(storage::features::kIncreaseIncognitoStorageQuota)},
|
||||
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
|
||||
--- a/storage/browser/quota/quota_features.cc
|
||||
+++ b/storage/browser/quota/quota_features.cc
|
||||
@@ -41,5 +41,9 @@ BASE_FEATURE(kStaticStorageQuota,
|
||||
"StaticStorageQuota",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
+BASE_FEATURE(kIncreaseIncognitoStorageQuota,
|
||||
+ "IncreaseIncognitoStorageQuota",
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
+
|
||||
} // namespace features
|
||||
} // namespace storage
|
||||
--- a/storage/browser/quota/quota_features.h
|
||||
+++ b/storage/browser/quota/quota_features.h
|
||||
@@ -23,6 +23,8 @@ extern const base::FeatureParam<double>
|
||||
|
||||
COMPONENT_EXPORT(STORAGE_BROWSER) BASE_DECLARE_FEATURE(kStaticStorageQuota);
|
||||
|
||||
+COMPONENT_EXPORT(STORAGE_BROWSER) BASE_DECLARE_FEATURE(kIncreaseIncognitoStorageQuota);
|
||||
+
|
||||
} // namespace features
|
||||
|
||||
} // namespace storage
|
||||
--- a/storage/browser/quota/quota_settings.cc
|
||||
+++ b/storage/browser/quota/quota_settings.cc
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
+#include "base/feature_list.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/no_destructor.h"
|
||||
@@ -56,7 +57,8 @@ std::optional<QuotaSettings> CalculateNo
|
||||
base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
|
||||
base::BlockingType::MAY_BLOCK);
|
||||
|
||||
- if (is_incognito) {
|
||||
+ if (is_incognito &&
|
||||
+ !base::FeatureList::IsEnabled(features::kIncreaseIncognitoStorageQuota)) {
|
||||
return CalculateIncognitoDynamicSettings(
|
||||
device_info_helper->AmountOfPhysicalMemory());
|
||||
}
|
||||
@@ -117,7 +119,9 @@ std::optional<QuotaSettings> CalculateNo
|
||||
|
||||
QuotaSettings settings;
|
||||
|
||||
- int64_t total = device_info_helper->AmountOfTotalDiskSpace(partition_path);
|
||||
+ int64_t total =
|
||||
+ is_incognito ? device_info_helper->AmountOfPhysicalMemory()
|
||||
+ : device_info_helper->AmountOfTotalDiskSpace(partition_path);
|
||||
if (total == -1) {
|
||||
LOG(ERROR) << "Unable to compute QuotaSettings.";
|
||||
return std::nullopt;
|
||||
@@ -11,7 +11,7 @@
|
||||
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
|
||||
--- a/components/embedder_support/user_agent_utils.cc
|
||||
+++ b/components/embedder_support/user_agent_utils.cc
|
||||
@@ -160,6 +160,8 @@ const std::string& GetWindowsPlatformVer
|
||||
@@ -164,6 +164,8 @@ const std::string& GetWindowsPlatformVer
|
||||
// TODO(crbug.com/1330890): Remove this method along with policy.
|
||||
bool ShouldReduceUserAgentMinorVersion(
|
||||
UserAgentReductionEnterprisePolicyState user_agent_reduction) {
|
||||
@@ -20,7 +20,7 @@
|
||||
return ((user_agent_reduction !=
|
||||
UserAgentReductionEnterprisePolicyState::kForceDisabled &&
|
||||
base::FeatureList::IsEnabled(
|
||||
@@ -183,6 +185,8 @@ bool ShouldReduceUserAgentMinorVersion(
|
||||
@@ -187,6 +189,8 @@ bool ShouldReduceUserAgentMinorVersion(
|
||||
// sending unified platform for the user agent string.
|
||||
bool ShouldSendUserAgentUnifiedPlatform(
|
||||
UserAgentReductionEnterprisePolicyState user_agent_reduction) {
|
||||
@@ -29,7 +29,7 @@
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
return ShouldReduceUserAgentMinorVersion(user_agent_reduction) &&
|
||||
base::FeatureList::IsEnabled(
|
||||
@@ -612,6 +616,8 @@ blink::UserAgentMetadata GetUserAgentMet
|
||||
@@ -616,6 +620,8 @@ blink::UserAgentMetadata GetUserAgentMet
|
||||
|
||||
blink::UserAgentMetadata GetUserAgentMetadata(const PrefService* pref_service,
|
||||
bool only_low_entropy_ch) {
|
||||
@@ -50,7 +50,7 @@
|
||||
// Feature definitions and associated constants (feature params, et cetera)
|
||||
--- a/third_party/blink/public/common/features.h
|
||||
+++ b/third_party/blink/public/common/features.h
|
||||
@@ -21,6 +21,7 @@ namespace blink {
|
||||
@@ -23,6 +23,7 @@ namespace blink {
|
||||
namespace features {
|
||||
|
||||
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kDisableLinkDrag);
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
// Feature definitions and associated constants (feature params, et cetera)
|
||||
--- a/third_party/blink/public/common/features.h
|
||||
+++ b/third_party/blink/public/common/features.h
|
||||
@@ -22,6 +22,7 @@ namespace features {
|
||||
@@ -24,6 +24,7 @@ namespace features {
|
||||
|
||||
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kDisableLinkDrag);
|
||||
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kReducedSystemInfo);
|
||||
@@ -78,7 +78,7 @@
|
||||
#include "third_party/blink/public/common/switches.h"
|
||||
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
|
||||
#include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom-blink.h"
|
||||
@@ -504,6 +505,8 @@ void FrameFetchContext::ModifyRequestFor
|
||||
@@ -528,6 +529,8 @@ void FrameFetchContext::ModifyRequestFor
|
||||
void FrameFetchContext::AddClientHintsIfNecessary(
|
||||
const std::optional<float> resource_width,
|
||||
ResourceRequest& request) {
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
// Feature definitions and associated constants (feature params, et cetera)
|
||||
--- a/third_party/blink/public/common/features.h
|
||||
+++ b/third_party/blink/public/common/features.h
|
||||
@@ -23,6 +23,11 @@ namespace features {
|
||||
@@ -25,6 +25,11 @@ namespace features {
|
||||
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kDisableLinkDrag);
|
||||
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kReducedSystemInfo);
|
||||
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kRemoveClientHints);
|
||||
@@ -86,7 +86,7 @@
|
||||
// Feature declarations and associated constants (feature params, et cetera)
|
||||
--- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
|
||||
+++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
|
||||
@@ -3915,6 +3915,8 @@ ScriptValue WebGLRenderingContextBase::g
|
||||
@@ -4052,6 +4052,8 @@ ScriptValue WebGLRenderingContextBase::g
|
||||
pname, IdentifiabilityBenignStringToken(
|
||||
String(ContextGL()->GetString(GL_RENDERER))));
|
||||
}
|
||||
@@ -95,7 +95,7 @@
|
||||
return WebGLAny(script_state,
|
||||
String(ContextGL()->GetString(GL_RENDERER)));
|
||||
}
|
||||
@@ -3930,6 +3932,8 @@ ScriptValue WebGLRenderingContextBase::g
|
||||
@@ -4067,6 +4069,8 @@ ScriptValue WebGLRenderingContextBase::g
|
||||
pname, IdentifiabilityBenignStringToken(
|
||||
String(ContextGL()->GetString(GL_VENDOR))));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -4732,10 +4732,12 @@ const FeatureEntry::FeatureVariation kHi
|
||||
@@ -4862,10 +4862,12 @@ const FeatureEntry::Choice kDataSharingV
|
||||
#include "chrome/browser/ungoogled_flag_choices.h"
|
||||
#include "chrome/browser/bromite_flag_choices.h"
|
||||
#include "chrome/browser/ungoogled_platform_flag_choices.h"
|
||||
@@ -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"},
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
|
||||
--- a/content/browser/renderer_host/navigation_request.cc
|
||||
+++ b/content/browser/renderer_host/navigation_request.cc
|
||||
@@ -168,6 +168,7 @@
|
||||
@@ -170,6 +170,7 @@
|
||||
#include "services/network/public/cpp/permissions_policy/fenced_frame_permissions_policies.h"
|
||||
#include "services/network/public/cpp/permissions_policy/permissions_policy_declaration.h"
|
||||
#include "services/network/public/cpp/permissions_policy/permissions_policy_features.h"
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "services/network/public/cpp/resource_request_body.h"
|
||||
#include "services/network/public/cpp/supports_loading_mode/supports_loading_mode_parser.h"
|
||||
#include "services/network/public/cpp/url_loader_completion_status.h"
|
||||
@@ -388,10 +389,10 @@ void AddAdditionalRequestHeaders(
|
||||
@@ -390,10 +391,10 @@ void AddAdditionalRequestHeaders(
|
||||
net::HttpRequestHeaders::kUserAgent,
|
||||
ComputeUserAgentValue(*headers, user_agent_override, browser_context));
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
|
||||
#include "services/network/public/mojom/fetch_api.mojom.h"
|
||||
#include "services/network/public/mojom/restricted_cookie_manager.mojom.h"
|
||||
@@ -4664,10 +4665,13 @@ void RenderFrameImpl::FinalizeRequestInt
|
||||
@@ -4702,10 +4703,13 @@ void RenderFrameImpl::FinalizeRequestInt
|
||||
|
||||
request.SetHasUserGesture(frame_->HasTransientUserActivation());
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
void RenderFrameImpl::DidLoadResourceFromMemoryCache(
|
||||
--- a/services/network/network_service_network_delegate.cc
|
||||
+++ b/services/network/network_service_network_delegate.cc
|
||||
@@ -31,6 +31,7 @@
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "services/network/network_service_proxy_delegate.h"
|
||||
#include "services/network/pending_callback_chain.h"
|
||||
#include "services/network/public/cpp/features.h"
|
||||
@@ -80,7 +80,7 @@
|
||||
#include "services/network/url_loader.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
@@ -68,9 +69,14 @@ NetworkServiceNetworkDelegate::~NetworkS
|
||||
@@ -69,9 +70,14 @@ NetworkServiceNetworkDelegate::~NetworkS
|
||||
void NetworkServiceNetworkDelegate::MaybeTruncateReferrer(
|
||||
net::URLRequest* const request,
|
||||
const GURL& effective_url) {
|
||||
@@ -259,8 +259,8 @@
|
||||
}
|
||||
|
||||
std::vector<std::unique_ptr<URLLoaderThrottle>>
|
||||
--- a/third_party/blink/renderer/platform/loader/fetch/url_loader/dedicated_or_shared_worker_fetch_context_impl.cc
|
||||
+++ b/third_party/blink/renderer/platform/loader/fetch/url_loader/dedicated_or_shared_worker_fetch_context_impl.cc
|
||||
--- a/third_party/blink/renderer/platform/loader/fetch/url_loader/dedicated_or_shared_worker_global_scope_context_impl.cc
|
||||
+++ b/third_party/blink/renderer/platform/loader/fetch/url_loader/dedicated_or_shared_worker_global_scope_context_impl.cc
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
@@ -269,7 +269,7 @@
|
||||
#include "services/network/public/cpp/resource_request.h"
|
||||
#include "services/network/public/cpp/wrapper_shared_url_loader_factory.h"
|
||||
#include "third_party/blink/public/common/loader/loader_constants.h"
|
||||
@@ -23,6 +24,7 @@
|
||||
@@ -24,6 +25,7 @@
|
||||
#include "third_party/blink/public/platform/modules/service_worker/web_service_worker_provider_context.h"
|
||||
#include "third_party/blink/public/platform/platform.h"
|
||||
#include "third_party/blink/public/platform/resource_load_info_notifier_wrapper.h"
|
||||
@@ -277,7 +277,7 @@
|
||||
#include "third_party/blink/public/platform/url_loader_throttle_provider.h"
|
||||
#include "third_party/blink/public/platform/weak_wrapper_resource_load_info_notifier.h"
|
||||
#include "third_party/blink/public/platform/web_security_origin.h"
|
||||
@@ -373,10 +375,13 @@ void DedicatedOrSharedWorkerFetchContext
|
||||
@@ -381,10 +383,13 @@ void DedicatedOrSharedWorkerGlobalScopeC
|
||||
auto url_request_extra_data = base::MakeRefCounted<WebURLRequestExtraData>();
|
||||
request.SetURLRequestExtraData(std::move(url_request_extra_data));
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
// True if |hostname| ends with either ".local" or ".local.".
|
||||
bool ResemblesMulticastDNSName(std::string_view hostname) {
|
||||
return hostname.ends_with(".local") || hostname.ends_with(".local.");
|
||||
@@ -1489,33 +1484,10 @@ int HostResolverManager::StartIPv6Reacha
|
||||
@@ -1497,33 +1492,10 @@ int HostResolverManager::StartIPv6Reacha
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
--- a/chrome/browser/resources/settings/search_engines_page/search_engine_edit_dialog.html
|
||||
+++ b/chrome/browser/resources/settings/search_engines_page/search_engine_edit_dialog.html
|
||||
@@ -22,6 +22,13 @@
|
||||
@@ -37,6 +37,13 @@
|
||||
error-message="$i18n{notValid}"
|
||||
value="{{queryUrl_}}" on-focus="validate_" on-input="validate_">
|
||||
</cr-input>
|
||||
@@ -19,7 +19,7 @@
|
||||
<cr-button class="cancel-button" on-click="cancel_" id="cancel"
|
||||
--- a/chrome/browser/resources/settings/search_engines_page/search_engine_edit_dialog.ts
|
||||
+++ b/chrome/browser/resources/settings/search_engines_page/search_engine_edit_dialog.ts
|
||||
@@ -36,6 +36,7 @@ export interface SettingsSearchEngineEdi
|
||||
@@ -37,6 +37,7 @@ export interface SettingsSearchEngineEdi
|
||||
dialog: CrDialogElement,
|
||||
keyword: CrInputElement,
|
||||
queryUrl: CrInputElement,
|
||||
@@ -27,31 +27,31 @@
|
||||
searchEngine: CrInputElement,
|
||||
};
|
||||
}
|
||||
@@ -64,6 +65,7 @@ export class SettingsSearchEngineEditDia
|
||||
@@ -65,6 +66,7 @@ export class SettingsSearchEngineEditDia
|
||||
searchEngine_: String,
|
||||
keyword_: String,
|
||||
queryUrl_: String,
|
||||
+ suggestionsUrl_: String,
|
||||
dialogTitle_: String,
|
||||
actionButtonText_: String,
|
||||
cancelButtonHidden_: Boolean,
|
||||
@@ -79,6 +81,7 @@ export class SettingsSearchEngineEditDia
|
||||
showPolicySubtitle_: Boolean,
|
||||
@@ -80,6 +82,7 @@ export class SettingsSearchEngineEditDia
|
||||
declare private searchEngine_: string;
|
||||
declare private keyword_: string;
|
||||
declare private queryUrl_: string;
|
||||
+ declare private suggestionsUrl_: string;
|
||||
declare private dialogTitle_: string;
|
||||
declare private actionButtonText_: string;
|
||||
declare private cancelButtonHidden_: boolean;
|
||||
@@ -109,6 +112,7 @@ export class SettingsSearchEngineEditDia
|
||||
declare private showPolicySubtitle_: boolean;
|
||||
@@ -110,6 +113,7 @@ export class SettingsSearchEngineEditDia
|
||||
this.searchEngine_ = this.model.name;
|
||||
this.keyword_ = this.model.keyword;
|
||||
this.queryUrl_ = this.model.url;
|
||||
this.readonly_ = this.model.isManaged;
|
||||
+ this.suggestionsUrl_ = this.model.suggestionsUrl;
|
||||
} else {
|
||||
this.dialogTitle_ = loadTimeData.getString('searchEnginesAddSiteSearch');
|
||||
this.actionButtonText_ = loadTimeData.getString('add');
|
||||
@@ -144,8 +148,12 @@ export class SettingsSearchEngineEditDia
|
||||
@@ -146,8 +150,12 @@ export class SettingsSearchEngineEditDia
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
}
|
||||
|
||||
private cancel_() {
|
||||
@@ -154,7 +162,8 @@ export class SettingsSearchEngineEditDia
|
||||
@@ -156,7 +164,8 @@ export class SettingsSearchEngineEditDia
|
||||
|
||||
private onActionButtonClick_() {
|
||||
this.browserProxy_.searchEngineEditCompleted(
|
||||
@@ -76,7 +76,7 @@
|
||||
this.$.dialog.close();
|
||||
}
|
||||
|
||||
@@ -192,8 +201,10 @@ export class SettingsSearchEngineEditDia
|
||||
@@ -194,8 +203,10 @@ export class SettingsSearchEngineEditDia
|
||||
this.$.searchEngine,
|
||||
this.$.keyword,
|
||||
this.$.queryUrl,
|
||||
@@ -271,7 +271,7 @@
|
||||
bool CanEdit(const TemplateURL* url) const;
|
||||
--- a/chrome/browser/ui/search_engines/template_url_table_model.cc
|
||||
+++ b/chrome/browser/ui/search_engines/template_url_table_model.cc
|
||||
@@ -201,21 +201,25 @@ void TemplateURLTableModel::Remove(size_
|
||||
@@ -202,21 +202,25 @@ void TemplateURLTableModel::Remove(size_
|
||||
void TemplateURLTableModel::Add(size_t index,
|
||||
const std::u16string& short_name,
|
||||
const std::u16string& keyword,
|
||||
@@ -302,7 +302,7 @@
|
||||
DCHECK(index <= RowCount());
|
||||
DCHECK(!url.empty());
|
||||
TemplateURL* template_url = GetTemplateURL(index);
|
||||
@@ -224,7 +228,8 @@ void TemplateURLTableModel::ModifyTempla
|
||||
@@ -225,7 +229,8 @@ void TemplateURLTableModel::ModifyTempla
|
||||
DCHECK(template_url_service_->GetDefaultSearchProvider() != template_url ||
|
||||
template_url->SupportsReplacement(
|
||||
template_url_service_->search_terms_data()));
|
||||
@@ -428,7 +428,7 @@
|
||||
|
||||
--- a/components/search_engines/template_url_service.cc
|
||||
+++ b/components/search_engines/template_url_service.cc
|
||||
@@ -998,7 +998,8 @@ void TemplateURLService::IncrementUsageC
|
||||
@@ -1028,7 +1028,8 @@ void TemplateURLService::IncrementUsageC
|
||||
void TemplateURLService::ResetTemplateURL(TemplateURL* url,
|
||||
const std::u16string& title,
|
||||
const std::u16string& keyword,
|
||||
@@ -438,10 +438,10 @@
|
||||
DCHECK(!IsCreatedByExtension(url));
|
||||
DCHECK(!keyword.empty());
|
||||
DCHECK(!search_url.empty());
|
||||
@@ -1013,6 +1014,7 @@ void TemplateURLService::ResetTemplateUR
|
||||
data.safe_for_autoreplace = false;
|
||||
@@ -1052,6 +1053,7 @@ void TemplateURLService::ResetTemplateUR
|
||||
data.last_modified = clock_->Now();
|
||||
data.is_active = TemplateURLData::ActiveStatus::kTrue;
|
||||
data.policy_origin = TemplateURLData::PolicyOrigin::kNoPolicy;
|
||||
+ data.suggestions_url = suggestions_url;
|
||||
|
||||
Update(url, base::FeatureList::IsEnabled(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -4728,7 +4728,13 @@ const FeatureEntry::FeatureVariation kHi
|
||||
@@ -4858,7 +4858,13 @@ const FeatureEntry::Choice kDataSharingV
|
||||
// calculate and verify checksum.
|
||||
//
|
||||
// When adding a new choice, add it to the end of the list.
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
--- a/chrome/browser/ui/search_engines/template_url_table_model.cc
|
||||
+++ b/chrome/browser/ui/search_engines/template_url_table_model.cc
|
||||
@@ -119,12 +119,11 @@ void TemplateURLTableModel::Reload() {
|
||||
for (TemplateURL* template_url : urls) {
|
||||
// Don't include the expanded set of starter pack keywords if the expansion
|
||||
// feature flag is not enabled.
|
||||
- if ((template_url->starter_pack_id() ==
|
||||
- template_url_starter_pack_data::kGemini &&
|
||||
- !OmniboxFieldTrial::IsStarterPackExpansionEnabled()) ||
|
||||
- (template_url->starter_pack_id() ==
|
||||
- template_url_starter_pack_data::kPage &&
|
||||
- !omnibox_feature_configs::ContextualSearch::Get().starter_pack_page)) {
|
||||
+
|
||||
+ // Disable all Google AI starter pack options
|
||||
+ if (template_url->starter_pack_id() == template_url_starter_pack_data::kGemini ||
|
||||
+ template_url->starter_pack_id() == template_url_starter_pack_data::kAiMode ||
|
||||
+ template_url->starter_pack_id() == template_url_starter_pack_data::kPage) {
|
||||
continue;
|
||||
}
|
||||
|
||||
--- a/components/omnibox/browser/featured_search_provider.cc
|
||||
+++ b/components/omnibox/browser/featured_search_provider.cc
|
||||
@@ -291,13 +291,14 @@ void FeaturedSearchProvider::AddFeatured
|
||||
turl->is_active() == TemplateURLData::ActiveStatus::kTrue) {
|
||||
// Don't add the expanded set of starter pack engines unless the feature
|
||||
// is enabled.
|
||||
- if ((turl->starter_pack_id() == template_url_starter_pack_data::kGemini &&
|
||||
- !OmniboxFieldTrial::IsStarterPackExpansionEnabled()) ||
|
||||
- (turl->starter_pack_id() == template_url_starter_pack_data::kPage &&
|
||||
- !omnibox_feature_configs::ContextualSearch::Get()
|
||||
- .starter_pack_page)) {
|
||||
+
|
||||
+ // Disable all Google AI starter pack options
|
||||
+ if (turl->starter_pack_id() == template_url_starter_pack_data::kGemini ||
|
||||
+ turl->starter_pack_id() == template_url_starter_pack_data::kAiMode ||
|
||||
+ turl->starter_pack_id() == template_url_starter_pack_data::kPage) {
|
||||
continue;
|
||||
}
|
||||
+
|
||||
// The history starter pack engine is disabled in incognito mode.
|
||||
if (client_->IsOffTheRecord() &&
|
||||
turl->starter_pack_id() == template_url_starter_pack_data::kHistory) {
|
||||
@@ -275,7 +275,7 @@
|
||||
#include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
|
||||
#include "ipc/ipc_listener.h"
|
||||
#include "ipc/ipc_platform_file.h"
|
||||
@@ -93,12 +92,6 @@ class PepperFileIOHost final : public pp
|
||||
@@ -92,12 +91,6 @@ class PepperFileIOHost final : public pp
|
||||
const base::FilePath& path,
|
||||
base::File::Error error_code);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/components/safe_browsing/core/common/features.cc
|
||||
+++ b/components/safe_browsing/core/common/features.cc
|
||||
@@ -133,7 +133,7 @@ BASE_FEATURE(kDlpRegionalizedEndpoints,
|
||||
@@ -127,7 +127,7 @@ BASE_FEATURE(kDlpRegionalizedEndpoints,
|
||||
|
||||
BASE_FEATURE(kDownloadsPageReferrerUrl,
|
||||
"DownloadsPageReferrerUrl",
|
||||
|
||||
@@ -7,5 +7,5 @@
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kRemoteOptimizationGuideFetchingAnonymousDataConsent,
|
||||
"OptimizationHintsFetchingAnonymousDataConsent",
|
||||
// Enables the prediction of optimization targets.
|
||||
BASE_FEATURE(kOptimizationTargetPrediction,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
--- a/third_party/blink/common/features.cc
|
||||
+++ b/third_party/blink/common/features.cc
|
||||
@@ -2099,7 +2099,7 @@ BASE_FEATURE(kPrefetchFontLookupTables,
|
||||
@@ -2068,7 +2068,7 @@ BASE_FEATURE(kPrefetchFontLookupTables,
|
||||
// crbug.com/988956.
|
||||
BASE_FEATURE(kPrefetchPrivacyChanges,
|
||||
"PrefetchPrivacyChanges",
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
}
|
||||
return content_restrictions;
|
||||
}
|
||||
@@ -1917,8 +1912,7 @@ bool CanSavePage(const Browser* browser)
|
||||
@@ -1919,8 +1914,7 @@ bool CanSavePage(const Browser* browser)
|
||||
policy::DownloadRestriction::ALL_FILES) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
|
||||
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
|
||||
@@ -2198,8 +2198,6 @@ void TabStrip::NewTabButtonPressed(const
|
||||
@@ -2222,8 +2222,6 @@ void TabStrip::NewTabButtonPressed(const
|
||||
|
||||
const ui::MouseEvent& mouse = static_cast<const ui::MouseEvent&>(event);
|
||||
if (mouse.IsOnlyMiddleMouseButton()) {
|
||||
@@ -24,7 +24,7 @@
|
||||
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
|
||||
CHECK(clipboard)
|
||||
<< "Clipboard instance is not available, cannot proceed with "
|
||||
@@ -2210,7 +2208,6 @@ void TabStrip::NewTabButtonPressed(const
|
||||
@@ -2234,7 +2232,6 @@ void TabStrip::NewTabButtonPressed(const
|
||||
if (!clipboard_text.empty()) {
|
||||
controller_->CreateNewTabWithLocation(clipboard_text);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/components/webui/flags/flags_state.cc
|
||||
+++ b/components/webui/flags/flags_state.cc
|
||||
@@ -30,6 +30,7 @@
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/values.h"
|
||||
#include "build/build_config.h"
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "components/variations/field_trial_config/field_trial_util.h"
|
||||
#include "components/variations/variations_associated_data.h"
|
||||
#include "components/variations/variations_switches.h"
|
||||
@@ -685,14 +686,19 @@ void FlagsState::GetFlagFeatureEntries(
|
||||
@@ -686,14 +687,19 @@ void FlagsState::GetFlagFeatureEntries(
|
||||
int current_platform = GetCurrentPlatform();
|
||||
|
||||
for (const FeatureEntry& entry : feature_entries_) {
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
base::Value::List supported_platforms;
|
||||
AddOsStrings(entry.supported_platforms, &supported_platforms);
|
||||
@@ -1101,7 +1107,9 @@ bool FlagsState::IsSupportedFeature(cons
|
||||
@@ -1102,7 +1108,9 @@ bool FlagsState::IsSupportedFeature(cons
|
||||
continue;
|
||||
}
|
||||
if (delegate_ && delegate_->ShouldExcludeFlag(storage, entry)) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
--- a/components/omnibox/common/omnibox_features.cc
|
||||
+++ b/components/omnibox/common/omnibox_features.cc
|
||||
@@ -313,7 +313,7 @@ BASE_FEATURE(kOmniboxTouchDownTriggerFor
|
||||
@@ -306,7 +306,7 @@ BASE_FEATURE(kOmniboxTouchDownTriggerFor
|
||||
// Enables additional site search providers for the Site search Starter Pack.
|
||||
BASE_FEATURE(kStarterPackExpansion,
|
||||
"StarterPackExpansion",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
--- a/chrome/browser/ui/startup/bad_flags_prompt.cc
|
||||
+++ b/chrome/browser/ui/startup/bad_flags_prompt.cc
|
||||
@@ -69,7 +69,6 @@ const char* const kBadFlags[] = {
|
||||
@@ -68,7 +68,6 @@ const char* const kBadFlags[] = {
|
||||
// These flags disable sandbox-related security.
|
||||
sandbox::policy::switches::kDisableGpuSandbox,
|
||||
sandbox::policy::switches::kDisableSeccompFilterSandbox,
|
||||
|
||||
@@ -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">
|
||||
@@ -53,7 +53,7 @@
|
||||
<!-- Languages Page -->
|
||||
--- a/chrome/app/settings_strings.grdp
|
||||
+++ b/chrome/app/settings_strings.grdp
|
||||
@@ -965,7 +965,7 @@
|
||||
@@ -1009,7 +1009,7 @@
|
||||
Active site
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_PERFORMANCE_TAB_DISCARDING_EXCEPTIONS_ADD_DIALOG_HELP" desc="Help text shown on the second tab of the tab discarding exception list add dialog. Explains how to use the filter format to add an exclusion rule to the list.">
|
||||
@@ -62,7 +62,7 @@
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_PERFORMANCE_BATTERY_PAGE_TITLE" desc="Title of the power section in the performance settings page.">
|
||||
Power
|
||||
@@ -989,7 +989,7 @@
|
||||
@@ -1033,7 +1033,7 @@
|
||||
Inactive tabs appearance
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_PERFORMANCE_DISCARD_RING_TREATMENT_ENABLED_DESCRIPTION_WITH_LEARN_LINK" desc="Label for a performance settings toggle description that controls whether the inactive tab UI is shown. Also contains a link to the help center article.">
|
||||
@@ -71,7 +71,7 @@
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_PERFORMANCE_TAB_HOVER_PREVIEW_CARD_LINK_TITLE" desc="Title for the link row that points to tab hover preview card apperance settings.">
|
||||
Tab hover preview card appearance
|
||||
@@ -1001,7 +1001,7 @@
|
||||
@@ -1045,7 +1045,7 @@
|
||||
Performance issue alerts
|
||||
</message>
|
||||
<message name="IDS_SETTINGS_PERFORMANCE_INTERVENTION_NOTIFICATION_ENABLED_DESCRIPTION" desc="Label for a performance settings toggle that controls whether performance intervention notifications should be shown and link to learn more about performance issue alerts.">
|
||||
@@ -156,20 +156,20 @@
|
||||
declare global {
|
||||
--- a/chrome/browser/resources/history/side_bar.html
|
||||
+++ b/chrome/browser/resources/history/side_bar.html
|
||||
@@ -88,13 +88,6 @@
|
||||
$i18n{historyMenuItem}
|
||||
<cr-ripple></cr-ripple>
|
||||
</a>
|
||||
- <a id="syncedTabs" role="menuitem" href="/syncedTabs"
|
||||
- class="page-item cr-nav-menu-item"
|
||||
- path="syncedTabs" on-click="onItemClick_">
|
||||
- <cr-icon icon="cr:phonelink"></cr-icon>
|
||||
- $i18n{openTabsMenuItem}
|
||||
- <cr-ripple></cr-ripple>
|
||||
- </a>
|
||||
<template is="dom-if" if="[[compareHistoryEnabled_]]">
|
||||
<a id="productSpecificationsLists" role="menuitem"
|
||||
href="/comparisonTables"
|
||||
@@ -11,13 +11,6 @@
|
||||
$i18n{historyMenuItem}
|
||||
<cr-ripple></cr-ripple>
|
||||
</a>
|
||||
- <a id="syncedTabs" role="menuitem" href="/syncedTabs"
|
||||
- class="page-item cr-nav-menu-item"
|
||||
- path="syncedTabs" @click="${this.onItemClick_}">
|
||||
- <cr-icon icon="cr:phonelink"></cr-icon>
|
||||
- $i18n{openTabsMenuItem}
|
||||
- <cr-ripple></cr-ripple>
|
||||
- </a>
|
||||
<a role="menuitem" id="clear-browsing-data"
|
||||
class="cr-nav-menu-item"
|
||||
href="chrome://settings/clearBrowserData"
|
||||
--- a/chrome/browser/resources/new_tab_page_incognito_guest/incognito_tab.html
|
||||
+++ b/chrome/browser/resources/new_tab_page_incognito_guest/incognito_tab.html
|
||||
@@ -24,9 +24,6 @@ document.querySelector('#incognitothemec
|
||||
@@ -184,16 +184,7 @@
|
||||
<div class="bulletpoints first">$i18nRaw{incognitoTabFeatures}</div>
|
||||
--- a/chrome/browser/resources/settings/a11y_page/a11y_page.html
|
||||
+++ b/chrome/browser/resources/settings/a11y_page/a11y_page.html
|
||||
@@ -26,7 +26,7 @@
|
||||
external$="[[captionSettingsOpensExternally_]]">
|
||||
</cr-link-row>
|
||||
</template>
|
||||
- <template is="dom-if" if="[[!captionSettingsOpensExternally_]]">
|
||||
+ <template is="dom-if" if="[[false]]">
|
||||
<cr-link-row id="captions"
|
||||
class="hr"
|
||||
label="$i18n{captionsTitle}"
|
||||
@@ -102,11 +102,6 @@
|
||||
@@ -103,11 +103,6 @@
|
||||
sub-label="$i18n{toastAlertLevelDescription}">
|
||||
</settings-toggle-button>
|
||||
</if>
|
||||
@@ -203,8 +194,8 @@
|
||||
- external>
|
||||
- </cr-link-row>
|
||||
</div>
|
||||
<if expr="not is_chromeos">
|
||||
<template is="dom-if" if="[[!captionSettingsOpensExternally_]]">
|
||||
<if expr="is_linux">
|
||||
<template is="dom-if" route-path="/captions">
|
||||
--- a/chrome/browser/resources/settings/about_page/about_page.html
|
||||
+++ b/chrome/browser/resources/settings/about_page/about_page.html
|
||||
@@ -57,7 +57,7 @@
|
||||
@@ -251,11 +242,11 @@
|
||||
<template is="dom-if"
|
||||
--- a/chrome/browser/resources/settings/basic_page/basic_page.html
|
||||
+++ b/chrome/browser/resources/settings/basic_page/basic_page.html
|
||||
@@ -70,7 +70,7 @@
|
||||
@@ -68,7 +68,7 @@
|
||||
<!-- TODO(crbug.com/40267370): Add a test to basic_page_test.ts
|
||||
to check that settings-safety-hub-entry-point is not visible
|
||||
in the guest mode. -->
|
||||
- <template is="dom-if" if="[[showPage_(pageVisibility.safetyHub)]]"
|
||||
- <template is="dom-if" if="[[showPage_(pageVisibility_.safetyHub)]]"
|
||||
+ <template is="dom-if" if="[[false]]"
|
||||
restamp>
|
||||
<settings-section page-title="$i18n{safetyHub}"
|
||||
@@ -270,7 +261,7 @@
|
||||
import '../privacy_page/privacy_page.js';
|
||||
import '../safety_hub/safety_hub_entry_point.js';
|
||||
import '../autofill_page/autofill_page.js';
|
||||
@@ -265,7 +264,6 @@ export class SettingsBasicPageElement ex
|
||||
@@ -263,7 +262,6 @@ export class SettingsBasicPageElement ex
|
||||
this.showPrivacyGuidePromo_ = false;
|
||||
return;
|
||||
}
|
||||
@@ -304,7 +295,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
|
||||
@@ -199,10 +199,6 @@ export class SettingsPersonalizationOpti
|
||||
'chrome-signin-user-choice-info-change',
|
||||
this.setChromeSigninUserChoiceInfo_.bind(this));
|
||||
// </if>
|
||||
@@ -317,7 +308,7 @@
|
||||
// <if expr="chromeos_ash">
|
||||
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.html
|
||||
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html
|
||||
@@ -51,15 +51,6 @@
|
||||
@@ -52,15 +52,6 @@
|
||||
label="$i18n{clearBrowsingData}"
|
||||
sub-label="$i18n{clearBrowsingDataDescription}"
|
||||
on-click="onClearBrowsingDataClick_"></cr-link-row>
|
||||
@@ -349,11 +340,11 @@
|
||||
<template is="dom-if" if="[[!enableHttpsFirstModeNewSettings_]]" restamp>
|
||||
<settings-toggle-button id="httpsOnlyModeToggle"
|
||||
pref="{{prefs.generated.https_first_mode_enabled}}"
|
||||
@@ -179,9 +172,3 @@
|
||||
@@ -170,9 +163,3 @@
|
||||
on-click="onManageCertificatesClick_" external>
|
||||
</cr-link-row>
|
||||
|
||||
- <cr-link-row id="advanced-protection-program-link" class="hr"
|
||||
- <cr-link-row id="advancedProtectionProgramLink" class="hr"
|
||||
- label="$i18n{advancedProtectionProgramTitle}"
|
||||
- sub-label="$i18n{advancedProtectionProgramDesc}"
|
||||
- on-click="onAdvancedProtectionProgramLinkClick_"
|
||||
@@ -386,7 +377,7 @@
|
||||
aria-description="$i18n{opensInNewTab}" on-click="onHelpClick_">
|
||||
--- a/chrome/browser/ui/tabs/recent_tabs_sub_menu_model.cc
|
||||
+++ b/chrome/browser/ui/tabs/recent_tabs_sub_menu_model.cc
|
||||
@@ -367,7 +367,6 @@ void RecentTabsSubMenuModel::Build() {
|
||||
@@ -368,7 +368,6 @@ void RecentTabsSubMenuModel::Build() {
|
||||
AddSeparator(ui::NORMAL_SEPARATOR);
|
||||
history_separator_index_ = GetItemCount() - 1;
|
||||
BuildLocalEntries();
|
||||
@@ -396,7 +387,7 @@
|
||||
void RecentTabsSubMenuModel::BuildLocalEntries() {
|
||||
--- a/chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
+++ b/chrome/browser/ui/toolbar/app_menu_model.cc
|
||||
@@ -954,16 +954,6 @@ void ExtensionsMenuModel::Build(Browser*
|
||||
@@ -958,16 +958,6 @@ void ExtensionsMenuModel::Build(Browser*
|
||||
SetElementIdentifierAt(
|
||||
GetIndexOfCommandId(IDC_EXTENSIONS_SUBMENU_MANAGE_EXTENSIONS).value(),
|
||||
kManageExtensionsMenuItem);
|
||||
@@ -433,7 +424,7 @@
|
||||
}
|
||||
--- a/chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_content_view.cc
|
||||
+++ b/chrome/browser/ui/views/location_bar/cookie_controls/cookie_controls_content_view.cc
|
||||
@@ -148,14 +148,7 @@ void CookieControlsContentView::SetEnfor
|
||||
@@ -156,14 +156,7 @@ void CookieControlsContentView::SetEnfor
|
||||
}
|
||||
|
||||
void CookieControlsContentView::SetFeedbackSectionVisibility(bool visible) {
|
||||
@@ -447,7 +438,7 @@
|
||||
- }
|
||||
}
|
||||
|
||||
void CookieControlsContentView::AddToggleRow() {
|
||||
void CookieControlsContentView::SetCookiesRowVisible(bool visible) {
|
||||
--- a/chrome/browser/ui/views/sad_tab_view.cc
|
||||
+++ b/chrome/browser/ui/views/sad_tab_view.cc
|
||||
@@ -574,9 +574,6 @@ SadTabView::SadTabView(content::WebConte
|
||||
@@ -485,7 +476,7 @@
|
||||
// Specify the maximum message and title width explicitly.
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -941,40 +941,20 @@ void AddPerformanceStrings(content::WebU
|
||||
@@ -976,40 +976,20 @@ void AddPerformanceStrings(content::WebU
|
||||
IDS_SETTINGS_PERFORMANCE_TAB_HOVER_PREVIEW_CARD_LINK_SUBTITLE},
|
||||
{"performanceInterventionEnabledLabel",
|
||||
IDS_SETTINGS_PERFORMANCE_INTERVENTION_NOTIFICATION_ENABLED_LABEL},
|
||||
@@ -535,7 +526,7 @@
|
||||
|
||||
html_source->AddString(
|
||||
"tabDiscardTimerFiveMinutes",
|
||||
@@ -1020,11 +1000,6 @@ void AddPerformanceStrings(content::WebU
|
||||
@@ -1055,11 +1035,6 @@ void AddPerformanceStrings(content::WebU
|
||||
base::NumberToString16(
|
||||
performance_manager::user_tuning::BatterySaverModeManager::
|
||||
kLowBatteryThresholdPercent)));
|
||||
@@ -547,7 +538,7 @@
|
||||
|
||||
html_source->AddString("discardRingTreatmentLearnMoreUrl",
|
||||
chrome::kDiscardRingTreatmentLearnMoreUrl);
|
||||
@@ -3468,7 +3443,7 @@ void AddSiteSettingsStrings(content::Web
|
||||
@@ -3515,7 +3490,7 @@ void AddSiteSettingsStrings(content::Web
|
||||
base::FeatureList::IsEnabled(blink::features::kWebPrinting));
|
||||
|
||||
html_source->AddBoolean("enableFederatedIdentityApiContentSetting",
|
||||
@@ -558,7 +549,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
|
||||
@@ -603,27 +603,20 @@ SettingsUI::SettingsUI(content::WebUI* w
|
||||
autofill::AutofillAiAction::kListEntityInstancesInSettings)},
|
||||
};
|
||||
|
||||
@@ -592,8 +583,8 @@
|
||||
html_source->AddBoolean(
|
||||
--- a/media/base/media_switches.cc
|
||||
+++ b/media/base/media_switches.cc
|
||||
@@ -852,7 +852,7 @@ BASE_FEATURE(kOnDeviceWebSpeech,
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
@@ -878,7 +878,7 @@ BASE_FEATURE(kOnDeviceWebSpeech,
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
// Enables the Live Caption feature on supported devices.
|
||||
-BASE_FEATURE(kLiveCaption, "LiveCaption", base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
@@ -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/containers/to_vector.h"
|
||||
#include "base/feature_list.h"
|
||||
#include "base/functional/bind.h"
|
||||
@@ -249,6 +250,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();
|
||||
@@ -14,7 +14,7 @@
|
||||
# BUILD will always be an increasing value, so BUILD_PATH gives us
|
||||
# something unique that meetings what LS wants.
|
||||
- 'CFBundleVersion': '@BUILD@.@PATCH@',
|
||||
+ 'CFBundleVersion': '@MAJOR@.@PATCH@',
|
||||
+ 'CFBundleVersion': '@MAJOR@.@MINOR@.@BUILD@.@PATCH@',
|
||||
}
|
||||
else:
|
||||
version_format_for_key = {
|
||||
@@ -43,7 +43,7 @@
|
||||
return PRODUCT_VERSION;
|
||||
--- a/chrome/browser/ui/webui/version/version_ui.cc
|
||||
+++ b/chrome/browser/ui/webui/version/version_ui.cc
|
||||
@@ -220,6 +220,8 @@ void VersionUI::AddVersionDetailStrings(
|
||||
@@ -221,6 +221,8 @@ void VersionUI::AddVersionDetailStrings(
|
||||
VersionProcessorVariation());
|
||||
|
||||
// Data strings.
|
||||
@@ -52,7 +52,7 @@
|
||||
html_source->AddString(version_ui::kVersion,
|
||||
version_info::GetVersionNumber());
|
||||
html_source->AddString(version_ui::kVersionSuffix,
|
||||
@@ -311,12 +313,14 @@ void VersionUI::AddVersionDetailStrings(
|
||||
@@ -310,12 +312,14 @@ void VersionUI::AddVersionDetailStrings(
|
||||
std::u16string VersionUI::GetAnnotatedVersionStringForUi() {
|
||||
return l10n_util::GetStringFUTF16(
|
||||
IDS_SETTINGS_ABOUT_PAGE_BROWSER_VERSION,
|
||||
@@ -70,7 +70,7 @@
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
--- a/components/webui/version/version_ui_constants.cc
|
||||
+++ b/components/webui/version/version_ui_constants.cc
|
||||
@@ -88,6 +88,7 @@ const char kVariationsName[] = "variatio
|
||||
@@ -86,6 +86,7 @@ const char kVariationsName[] = "variatio
|
||||
const char kVariationsSeed[] = "variations_seed";
|
||||
const char kVariationsSeedName[] = "variations_seed_name";
|
||||
const char kVersion[] = "version";
|
||||
|
||||
@@ -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 {
|
||||
@@ -28,7 +28,7 @@
|
||||
struct PrepopulatedEngine;
|
||||
@@ -40,4 +41,5 @@ std::unique_ptr<TemplateURLData> Templat
|
||||
std::unique_ptr<TemplateURLData> TemplateURLDataFromStarterPackEngine(
|
||||
const TemplateURLStarterPackData::StarterPackEngine& engine);
|
||||
const template_url_starter_pack_data::StarterPackEngine& engine);
|
||||
|
||||
+TemplateURLData TemplateURLDataFromBang(const Bangs::Bang& bang);
|
||||
#endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_DATA_UTIL_H_
|
||||
@@ -53,7 +53,7 @@
|
||||
"//components/lens/proto/server:proto",
|
||||
--- a/components/search_engines/template_url_data_util.cc
|
||||
+++ b/components/search_engines/template_url_data_util.cc
|
||||
@@ -13,6 +13,7 @@
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "components/search_engines/default_search_manager.h"
|
||||
#include "components/search_engines/template_url_data.h"
|
||||
#include "components/search_engines/template_url_starter_pack_data.h"
|
||||
@@ -61,7 +61,7 @@
|
||||
#include "third_party/search_engines_data/resources/definitions/prepopulated_engines.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "url/gurl.h"
|
||||
@@ -510,3 +511,20 @@ std::unique_ptr<TemplateURLData> Templat
|
||||
@@ -519,3 +520,20 @@ std::unique_ptr<TemplateURLData> Templat
|
||||
|
||||
return turl;
|
||||
}
|
||||
@@ -84,7 +84,7 @@
|
||||
+}
|
||||
--- a/components/search_engines/template_url_service.cc
|
||||
+++ b/components/search_engines/template_url_service.cc
|
||||
@@ -46,6 +46,8 @@
|
||||
@@ -40,6 +40,8 @@
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "build/build_config.h"
|
||||
#include "components/country_codes/country_codes.h"
|
||||
@@ -93,7 +93,7 @@
|
||||
#include "components/omnibox/common/omnibox_features.h"
|
||||
#include "components/pref_registry/pref_registry_syncable.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
@@ -62,7 +64,9 @@
|
||||
@@ -56,7 +58,9 @@
|
||||
#include "components/search_engines/search_engines_switches.h"
|
||||
#include "components/search_engines/search_terms_data.h"
|
||||
#include "components/search_engines/template_url.h"
|
||||
@@ -103,7 +103,7 @@
|
||||
#include "components/search_engines/template_url_prepopulate_data.h"
|
||||
#include "components/search_engines/template_url_prepopulate_data_resolver.h"
|
||||
#include "components/search_engines/template_url_service_client.h"
|
||||
@@ -76,6 +80,7 @@
|
||||
@@ -70,6 +74,7 @@
|
||||
#include "components/sync/protocol/search_engine_specifics.pb.h"
|
||||
#include "components/url_formatter/url_fixer.h"
|
||||
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
|
||||
@@ -111,7 +111,7 @@
|
||||
#include "url/gurl.h"
|
||||
#include "url/origin.h"
|
||||
#include "url/url_util.h"
|
||||
@@ -489,6 +494,7 @@ class TemplateURLService::PreLoadingProv
|
||||
@@ -550,6 +555,7 @@ class TemplateURLService::PreLoadingProv
|
||||
// TemplateURLService ---------------------------------------------------------
|
||||
TemplateURLService::TemplateURLService(
|
||||
PrefService& prefs,
|
||||
@@ -119,7 +119,7 @@
|
||||
search_engines::SearchEngineChoiceService& search_engine_choice_service,
|
||||
TemplateURLPrepopulateData::Resolver& prepopulate_data_resolver,
|
||||
std::unique_ptr<SearchTermsData> search_terms_data,
|
||||
@@ -501,6 +507,8 @@ TemplateURLService::TemplateURLService(
|
||||
@@ -562,6 +568,8 @@ TemplateURLService::TemplateURLService(
|
||||
prepopulate_data_resolver_(prepopulate_data_resolver),
|
||||
search_terms_data_(std::move(search_terms_data)),
|
||||
web_data_service_(web_data_service),
|
||||
@@ -128,7 +128,7 @@
|
||||
client_(std::move(client)),
|
||||
dsp_change_callback_(dsp_change_callback),
|
||||
pre_loading_providers_(std::make_unique<PreLoadingProviders>()),
|
||||
@@ -517,11 +525,13 @@ TemplateURLService::TemplateURLService(
|
||||
@@ -578,11 +586,13 @@ TemplateURLService::TemplateURLService(
|
||||
|
||||
TemplateURLService::TemplateURLService(
|
||||
PrefService& prefs,
|
||||
@@ -142,7 +142,7 @@
|
||||
search_engine_choice_service,
|
||||
prepopulate_data_resolver,
|
||||
/*search_terms_data=*/std::make_unique<SearchTermsData>(),
|
||||
@@ -624,6 +634,10 @@ bool TemplateURLService::ShowInActivesLi
|
||||
@@ -685,6 +695,10 @@ bool TemplateURLService::ShowInActivesLi
|
||||
}
|
||||
|
||||
bool TemplateURLService::HiddenFromLists(const TemplateURL* t_url) const {
|
||||
@@ -151,9 +151,9 @@
|
||||
+ }
|
||||
+
|
||||
switch (t_url->policy_origin()) {
|
||||
case TemplateURLData::PolicyOrigin::kNoPolicy:
|
||||
// Hide if another engine (e.g., one set by policy) takes precedence for
|
||||
@@ -1481,11 +1495,37 @@ void TemplateURLService::Load() {
|
||||
case TemplateURLData::PolicyOrigin::kDefaultSearchProvider:
|
||||
return false;
|
||||
@@ -1514,11 +1528,37 @@ void TemplateURLService::Load() {
|
||||
|
||||
if (web_data_service_) {
|
||||
load_handle_ = web_data_service_->GetKeywords(this);
|
||||
@@ -164,7 +164,7 @@
|
||||
}
|
||||
|
||||
+void TemplateURLService::LoadBangs() {
|
||||
+ LOG(ERROR) << "LoadBangs() called";
|
||||
+ VLOG(2) << "LoadBangs() called";
|
||||
+ bang_manager_->LoadBangs(url_loader_factory_, prefs_.get(),
|
||||
+ base::BindOnce(&TemplateURLService::BangsLoadedCallback, base::Unretained(this)));
|
||||
+}
|
||||
@@ -191,7 +191,7 @@
|
||||
base::CallbackListSubscription TemplateURLService::RegisterOnLoadedCallback(
|
||||
base::OnceClosure callback) {
|
||||
return loaded_ ? base::CallbackListSubscription()
|
||||
@@ -2478,6 +2518,13 @@ void TemplateURLService::Init() {
|
||||
@@ -2520,6 +2560,13 @@ void TemplateURLService::Init() {
|
||||
base::Unretained(this)));
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
search_engines::SearchEngineChoiceService& search_engine_choice_service,
|
||||
TemplateURLPrepopulateData::Resolver& prepopulate_data_resolver,
|
||||
base::span<const TemplateURLService::Initializer> initializers = {});
|
||||
@@ -480,6 +484,8 @@ class TemplateURLService final : public
|
||||
@@ -475,6 +479,8 @@ class TemplateURLService final : public
|
||||
// OnTemplateURLServiceChanged.
|
||||
void Load();
|
||||
|
||||
@@ -245,7 +245,7 @@
|
||||
// Registers a callback to be called when the service has loaded.
|
||||
//
|
||||
// If the service has already loaded, this function does nothing.
|
||||
@@ -708,6 +714,8 @@ class TemplateURLService final : public
|
||||
@@ -711,6 +717,8 @@ class TemplateURLService final : public
|
||||
|
||||
void Init();
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
// Simulate a loaded `TemplateURLService`.
|
||||
void ApplyInitializersForTesting(
|
||||
base::span<const TemplateURLService::Initializer> initializers);
|
||||
@@ -911,6 +919,10 @@ class TemplateURLService final : public
|
||||
@@ -918,6 +926,10 @@ class TemplateURLService final : public
|
||||
// Service used to store entries.
|
||||
scoped_refptr<KeywordWebDataService> web_data_service_;
|
||||
|
||||
@@ -267,7 +267,7 @@
|
||||
// This closure is run when the default search provider is set to Google.
|
||||
--- /dev/null
|
||||
+++ b/components/search_engines/template_url_bang_manager.cc
|
||||
@@ -0,0 +1,197 @@
|
||||
@@ -0,0 +1,215 @@
|
||||
+// 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.
|
||||
@@ -427,9 +427,25 @@
|
||||
+
|
||||
+ auto dict = std::move(bang).TakeDict();
|
||||
+ auto bname = dict.FindString("s");
|
||||
+ auto bbang = dict.FindString("t");
|
||||
+
|
||||
+ std::vector<const std::string*> triggers;
|
||||
+ if (auto bbang = dict.FindString("t")) {
|
||||
+ triggers.push_back(bbang);
|
||||
+ }
|
||||
+
|
||||
+ if (auto bbangs = dict.FindList("ts")) {
|
||||
+ triggers.reserve(triggers.size() + bbangs->size());
|
||||
+
|
||||
+ for (const auto& trigger : *bbangs) {
|
||||
+ const std::string* value = trigger.GetIfString();
|
||||
+ if (!value) continue;
|
||||
+
|
||||
+ triggers.push_back(value);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ auto burl_template = dict.FindString("u");
|
||||
+ if (!bname || !bbang || !burl_template) {
|
||||
+ if (!bname || !burl_template || triggers.empty()) {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
@@ -444,10 +460,12 @@
|
||||
+ category_map_[index] = GetCategoryFromJSONObject(*bcategory);
|
||||
+ }
|
||||
+
|
||||
+ // We need to pass the URL here as-is, because otherwise URLs
|
||||
+ // which have the template in the path will have it %-encoded,
|
||||
+ // which will break everything.
|
||||
+ bangs_.emplace_back(index++, *bname, *bbang, *burl_template);
|
||||
+ for (auto trigger : triggers) {
|
||||
+ // We need to pass the URL here as-is, because otherwise URLs
|
||||
+ // which have the template in the path will have it %-encoded,
|
||||
+ // which will break everything.
|
||||
+ bangs_.emplace_back(index++, *bname, *trigger, *burl_template);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ LOG(INFO) << bangs_.size() << " bangs loaded";
|
||||
@@ -472,8 +490,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,11 +559,11 @@
|
||||
+ };
|
||||
+}
|
||||
+
|
||||
+#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
|
||||
@@ -743,9 +743,9 @@ bool AutocompleteInput::HasHTTPSScheme(c
|
||||
@@ -739,9 +739,9 @@ bool AutocompleteInput::HasHTTPSScheme(c
|
||||
// static
|
||||
AutocompleteInput::FeaturedKeywordMode
|
||||
AutocompleteInput::GetFeaturedKeywordMode(std::u16string_view text) {
|
||||
@@ -557,7 +575,7 @@
|
||||
return FeaturedKeywordMode::kPrefix;
|
||||
return FeaturedKeywordMode::kFalse;
|
||||
}
|
||||
@@ -913,6 +913,7 @@ std::u16string AutocompleteInput::Autoco
|
||||
@@ -909,6 +909,7 @@ std::u16string AutocompleteInput::Autoco
|
||||
const std::u16string& input,
|
||||
bool trim_leading_whitespace,
|
||||
std::u16string* remaining_input) {
|
||||
@@ -565,7 +583,7 @@
|
||||
// Find end of first token. The AutocompleteController has trimmed leading
|
||||
// whitespace, so we need not skip over that.
|
||||
const size_t first_white(input.find_first_of(base::kWhitespaceUTF16));
|
||||
@@ -921,6 +922,39 @@ std::u16string AutocompleteInput::Autoco
|
||||
@@ -917,6 +918,39 @@ std::u16string AutocompleteInput::Autoco
|
||||
return input; // Only one token provided.
|
||||
}
|
||||
|
||||
@@ -607,7 +625,7 @@
|
||||
const size_t remaining_start =
|
||||
--- a/components/search_engines/template_url_data.cc
|
||||
+++ b/components/search_engines/template_url_data.cc
|
||||
@@ -27,7 +27,7 @@ namespace {
|
||||
@@ -32,7 +32,7 @@ constexpr bool kEnableBuiltinSearchProvi
|
||||
// Returns a GUID used for sync, which is random except for built-in search
|
||||
// engines. The latter benefit from using a deterministic GUID, to make sure
|
||||
// sync doesn't incur in duplicates for prepopulated engines.
|
||||
@@ -616,7 +634,7 @@
|
||||
// We compute a GUID deterministically given |prepopulate_id| or
|
||||
// |starter_pack_id|, using an arbitrary base GUID.
|
||||
std::string guid;
|
||||
@@ -38,6 +38,9 @@ std::string GenerateGUID(int prepopulate
|
||||
@@ -43,6 +43,9 @@ std::string GenerateGUID(int prepopulate
|
||||
} else if (starter_pack_id > 0) {
|
||||
guid = base::StringPrintf("ec205736-edd7-4022-a9a3-b431fc%06d",
|
||||
starter_pack_id);
|
||||
@@ -626,7 +644,7 @@
|
||||
} else {
|
||||
guid = base::Uuid::GenerateRandomV4().AsLowercaseString();
|
||||
}
|
||||
@@ -117,7 +120,7 @@ TemplateURLData::TemplateURLData(
|
||||
@@ -128,7 +131,7 @@ TemplateURLData::TemplateURLData(
|
||||
regulatory_origin(RegulatoryExtensionType::kDefault),
|
||||
usage_count(0),
|
||||
prepopulate_id(prepopulate_id),
|
||||
@@ -635,7 +653,7 @@
|
||||
preconnect_to_search_url(preconnect_to_search_url),
|
||||
prefetch_likely_navigations(prefetch_likely_navigations) {
|
||||
SetShortName(name);
|
||||
@@ -183,7 +186,7 @@ std::vector<uint8_t> TemplateURLData::Ge
|
||||
@@ -201,7 +204,7 @@ std::string TemplateURLData::GetBuiltinI
|
||||
}
|
||||
|
||||
void TemplateURLData::GenerateSyncGUID() {
|
||||
@@ -646,7 +664,7 @@
|
||||
size_t TemplateURLData::EstimateMemoryUsage() const {
|
||||
--- a/components/search_engines/template_url_data.h
|
||||
+++ b/components/search_engines/template_url_data.h
|
||||
@@ -256,6 +256,9 @@ struct TemplateURLData {
|
||||
@@ -268,6 +268,9 @@ struct TemplateURLData {
|
||||
// starter_pack_id > 0.
|
||||
int starter_pack_id{0};
|
||||
|
||||
@@ -658,7 +676,7 @@
|
||||
|
||||
--- a/components/search_engines/template_url.cc
|
||||
+++ b/components/search_engines/template_url.cc
|
||||
@@ -1682,6 +1682,8 @@ bool TemplateURL::IsBetterThanConflictin
|
||||
@@ -1675,6 +1675,8 @@ bool TemplateURL::IsBetterThanConflictin
|
||||
: base::Time(),
|
||||
// Prefer engines that CANNOT be auto-replaced.
|
||||
!engine->safe_for_autoreplace(),
|
||||
@@ -669,9 +687,9 @@
|
||||
// Favor prepopulated engines over other auto-generated engines.
|
||||
--- a/components/search_engines/template_url.h
|
||||
+++ b/components/search_engines/template_url.h
|
||||
@@ -818,6 +818,8 @@ class TemplateURL {
|
||||
|
||||
int starter_pack_id() const { return data().starter_pack_id; }
|
||||
@@ -825,6 +825,8 @@ class TemplateURL {
|
||||
starter_pack_id() == template_url_starter_pack_data::kAiMode;
|
||||
}
|
||||
|
||||
+ int bang_id() const { return data().bang_id; }
|
||||
+
|
||||
@@ -704,7 +722,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
|
||||
@@ -1876,6 +1876,9 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
@@ -1898,6 +1898,9 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
{"heliumServicesToggle", IDS_SETTINGS_HELIUM_SERVICES_TOGGLE},
|
||||
{"heliumServicesToggleDescription",
|
||||
IDS_SETTINGS_HELIUM_SERVICES_TOGGLE_DESCRIPTION},
|
||||
@@ -716,15 +734,15 @@
|
||||
{"heliumExtProxyToggleDescription",
|
||||
--- a/chrome/app/settings_strings.grdp
|
||||
+++ b/chrome/app/settings_strings.grdp
|
||||
@@ -2112,6 +2112,12 @@
|
||||
@@ -1890,6 +1890,12 @@
|
||||
<message name="IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE_DESCRIPTION" desc="Description of the toggle for enabling/disabling of downloading and proxying extensions">
|
||||
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
|
||||
@@ -745,7 +763,7 @@
|
||||
label="$i18n{heliumExtProxyToggle}"
|
||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
@@ -173,6 +173,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
@@ -191,6 +191,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
|
||||
{
|
||||
registry->RegisterBooleanPref(prefs::kHeliumServicesEnabled, true);
|
||||
@@ -755,7 +773,7 @@
|
||||
registry->RegisterBooleanPref(prefs::kHeliumDidOnboarding, false);
|
||||
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
@@ -349,6 +349,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
@@ -350,6 +350,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
settings_api::PrefType::kBoolean;
|
||||
(*s_allowlist)[::prefs::kHeliumExtProxyEnabled] =
|
||||
settings_api::PrefType::kBoolean;
|
||||
@@ -778,19 +796,50 @@
|
||||
#endif // COMPONENTS_HELIUM_SERVICES_PREF_NAMES_H_
|
||||
--- a/components/omnibox/browser/omnibox_edit_model.cc
|
||||
+++ b/components/omnibox/browser/omnibox_edit_model.cc
|
||||
@@ -1722,7 +1722,10 @@ void OmniboxEditModel::InternalSetUserTe
|
||||
@@ -780,6 +780,17 @@ bool OmniboxEditModel::AcceptKeyword(
|
||||
|
||||
controller_->StopAutocomplete(/*clear_result=*/false);
|
||||
|
||||
+ const TemplateURL* turl =
|
||||
+ controller_->client()->GetTemplateURLService()->GetTemplateURLForKeyword(
|
||||
+ keyword_);
|
||||
+
|
||||
+ if (turl && turl->bang_id() > 0 && !user_text_.starts_with(u'!')) {
|
||||
+ AutocompleteMatch match = CurrentMatch(nullptr);
|
||||
+ if (!match.fill_into_edit.empty()) {
|
||||
+ user_text_ = match.fill_into_edit;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
is_keyword_hint_ = false;
|
||||
keyword_mode_entry_method_ = entry_method;
|
||||
if (original_user_text_with_keyword_.empty()) {
|
||||
@@ -822,9 +833,6 @@ bool OmniboxEditModel::AcceptKeyword(
|
||||
}
|
||||
|
||||
base::RecordAction(base::UserMetricsAction("AcceptedKeywordHint"));
|
||||
- const TemplateURL* turl =
|
||||
- controller_->client()->GetTemplateURLService()->GetTemplateURLForKeyword(
|
||||
- keyword_);
|
||||
EmitEnteredKeywordModeHistogram(entry_method, turl);
|
||||
return true;
|
||||
}
|
||||
@@ -1506,7 +1514,13 @@ void OmniboxEditModel::InternalSetUserTe
|
||||
|
||||
std::u16string OmniboxEditModel::MaybeStripKeyword(
|
||||
const std::u16string& text) const {
|
||||
- return is_keyword_selected()
|
||||
+ std::u16string trimmed_text;
|
||||
+ base::TrimWhitespace(text, base::TRIM_LEADING, &trimmed_text);
|
||||
+
|
||||
+ std::u16string actual_keyword = base::ToLowerASCII(
|
||||
+ AutocompleteInput::SplitKeywordFromInput(text, false, nullptr));
|
||||
+ AutocompleteInput::SplitKeywordFromInput(trimmed_text, false, nullptr));
|
||||
+
|
||||
+ return is_keyword_selected() && actual_keyword == keyword_
|
||||
? AutocompleteInput::SplitReplacementStringFromInput(text, false)
|
||||
: text;
|
||||
}
|
||||
@@ -2976,9 +2979,8 @@ bool OmniboxEditModel::MaybeAcceptKeywor
|
||||
@@ -2746,9 +2760,8 @@ bool OmniboxEditModel::MaybeAcceptKeywor
|
||||
return false;
|
||||
|
||||
size_t keyword_length = new_text.length() - 1;
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -41,6 +41,7 @@
|
||||
#include "chrome/browser/apps/app_discovery_service/app_discovery_service.h"
|
||||
#include "chrome/browser/browser_features.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
+#include "chrome/browser/channel_selection.h"
|
||||
#include "chrome/browser/devtools/features.h"
|
||||
#include "chrome/browser/flag_descriptions.h"
|
||||
#include "chrome/browser/ip_protection/ip_protection_switches.h"
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/channel_selection.cc
|
||||
@@ -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() {
|
||||
+ auto* command_line = base::CommandLine::ForCurrentProcess();
|
||||
+
|
||||
+ if (command_line->HasSwitch(kChannelCommandLine)) {
|
||||
+ std::string override_channel =
|
||||
+ command_line->GetSwitchValueASCII(kChannelCommandLine);
|
||||
+
|
||||
+ if ((override_channel == kChannelStable) ||
|
||||
+ (override_channel == kChannelBeta)) {
|
||||
+ return override_channel;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return kChannelStable;
|
||||
+}
|
||||
+
|
||||
+} // namespace helium
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/channel_selection.h
|
||||
@@ -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_
|
||||
+
|
||||
+#include <string>
|
||||
+namespace helium {
|
||||
+
|
||||
+constexpr const char kChannelCommandLine[] = "helium-update-channel";
|
||||
+
|
||||
+constexpr const char kChannelStable[] = "stable";
|
||||
+constexpr const char kChannelBeta[] = "beta";
|
||||
+
|
||||
+std::string GetSelectedChannel();
|
||||
+
|
||||
+} // namespace helium
|
||||
+#endif /* CHROME_BROWSER_CHANNEL_SELECTION_H_ */
|
||||
--- a/chrome/browser/helium_flag_choices.h
|
||||
+++ b/chrome/browser/helium_flag_choices.h
|
||||
@@ -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_ */
|
||||
--- a/chrome/browser/helium_flag_entries.h
|
||||
+++ b/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)},
|
||||
{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
|
||||
@@ -307,6 +307,8 @@ static_library("browser") {
|
||||
"btm/btm_browser_signin_detector_factory.h",
|
||||
"btm/stateful_bounce_counter.cc",
|
||||
"btm/stateful_bounce_counter.h",
|
||||
+ "channel_selection.cc",
|
||||
+ "channel_selection.h",
|
||||
"chained_back_navigation_tracker.cc",
|
||||
"chained_back_navigation_tracker.h",
|
||||
"child_process_host_flags.h",
|
||||
@@ -0,0 +1,150 @@
|
||||
TODO: guard services_page.html with is_mac
|
||||
|
||||
--- a/components/helium_services/pref_names.h
|
||||
+++ b/components/helium_services/pref_names.h
|
||||
@@ -27,6 +27,9 @@ inline constexpr char kHeliumExtProxyEna
|
||||
inline constexpr char kHeliumBangsEnabled[] =
|
||||
"helium.services.bangs";
|
||||
|
||||
+inline constexpr char kHeliumUpdateFetchingEnabled[] =
|
||||
+ "helium.services.browser_updates";
|
||||
+
|
||||
inline constexpr char kHeliumSpellcheckEnabled[] =
|
||||
"helium.services.spellcheck_files";
|
||||
|
||||
--- a/components/helium_services/helium_services_helpers.h
|
||||
+++ b/components/helium_services/helium_services_helpers.h
|
||||
@@ -20,10 +20,12 @@ const char kHeliumDummyOrigin[] =
|
||||
|
||||
COMPONENT_EXPORT(HELIUM) bool ShouldFetchBangs(const PrefService& prefs);
|
||||
COMPONENT_EXPORT(HELIUM) bool ShouldAccessExtensionService(const PrefService& prefs);
|
||||
+COMPONENT_EXPORT(HELIUM) bool ShouldAccessUpdateService(const PrefService& prefs);
|
||||
COMPONENT_EXPORT(HELIUM) GURL GetServicesBaseURL(const PrefService& prefs);
|
||||
COMPONENT_EXPORT(HELIUM) GURL GetDummyURL();
|
||||
COMPONENT_EXPORT(HELIUM) GURL GetExtensionUpdateURL(const PrefService& prefs);
|
||||
COMPONENT_EXPORT(HELIUM) GURL GetSpellcheckURL(const PrefService& prefs);
|
||||
+COMPONENT_EXPORT(HELIUM) GURL GetBrowserUpdateURL(const PrefService& prefs);
|
||||
COMPONENT_EXPORT(HELIUM) std::optional<GURL> GetValidUserOverridenURL(std::string_view user_url_);
|
||||
COMPONENT_EXPORT(HELIUM) void ConfigurePrefChangeRegistrarFor(std::string_view pref_name,
|
||||
PrefChangeRegistrar& registrar, const base::RepeatingClosure& observer);
|
||||
--- a/components/helium_services/helium_services_helpers.cc
|
||||
+++ b/components/helium_services/helium_services_helpers.cc
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <optional>
|
||||
|
||||
#include "base/functional/bind.h"
|
||||
+#include "base/strings/stringprintf.h"
|
||||
#include "components/helium_services/pref_names.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "net/base/url_util.h"
|
||||
@@ -15,6 +16,12 @@
|
||||
|
||||
namespace helium {
|
||||
|
||||
+#if defined(ARCH_CPU_ARM_FAMILY)
|
||||
+constexpr std::string cpu_arch = "arm64";
|
||||
+#else
|
||||
+constexpr std::string cpu_arch = "x86_64";
|
||||
+#endif
|
||||
+
|
||||
std::optional<GURL> GetValidUserOverridenURL(std::string_view user_url_) {
|
||||
if (user_url_.empty()) {
|
||||
return std::nullopt;
|
||||
@@ -76,6 +83,11 @@ bool ShouldFetchBangs(const PrefService&
|
||||
prefs.GetBoolean(prefs::kHeliumBangsEnabled);
|
||||
}
|
||||
|
||||
+bool ShouldAccessUpdateService(const PrefService& prefs) {
|
||||
+ return ShouldAccessServices(prefs) &&
|
||||
+ prefs.GetBoolean(prefs::kHeliumUpdateFetchingEnabled);
|
||||
+}
|
||||
+
|
||||
GURL GetExtensionUpdateURL(const PrefService& prefs) {
|
||||
if (!ShouldAccessExtensionService(prefs)) {
|
||||
return GetDummyURL();
|
||||
@@ -92,6 +104,20 @@ GURL GetSpellcheckURL(const PrefService&
|
||||
return GetServicesBaseURL(prefs).Resolve("/dict/");
|
||||
}
|
||||
|
||||
+GURL GetBrowserUpdateURL(const PrefService& prefs) {
|
||||
+ if (!ShouldAccessUpdateService(prefs)) {
|
||||
+ return GetDummyURL();
|
||||
+ }
|
||||
+
|
||||
+#if BUILDFLAG(IS_MAC)
|
||||
+ std::string path = base::StringPrintf(
|
||||
+ "/updates/mac/appcast-%s.xml", cpu_arch);
|
||||
+ return GetServicesBaseURL(prefs).Resolve(path);
|
||||
+#else
|
||||
+ return GetDummyURL();
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
void ConfigurePrefChangeRegistrarFor(std::string_view pref_name,
|
||||
PrefChangeRegistrar& registrar, const base::RepeatingClosure& observer) {
|
||||
registrar.Add(prefs::kHeliumServicesEnabled, observer);
|
||||
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||
@@ -29,6 +29,13 @@
|
||||
sub-label="$i18n{heliumSpellcheckToggleDescription}">
|
||||
</settings-toggle-button>
|
||||
</if>
|
||||
+ <if expr="is_macosx">
|
||||
+ <settings-toggle-button id="updatesToggleButton"
|
||||
+ pref="{{prefs.helium.services.browser_updates}}"
|
||||
+ label="$i18n{heliumUpdatesToggle}"
|
||||
+ sub-label="$i18n{heliumUpdatesToggleDescription}">
|
||||
+ </settings-toggle-button>
|
||||
+ </if>
|
||||
</cr-collapse>
|
||||
</div>
|
||||
</div>
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -1906,6 +1906,10 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE},
|
||||
{"heliumExtProxyToggleDescription",
|
||||
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE_DESCRIPTION},
|
||||
+ {"heliumUpdatesToggle",
|
||||
+ IDS_SETTINGS_HELIUM_SERVICES_UPDATE},
|
||||
+ {"heliumUpdatesToggleDescription",
|
||||
+ IDS_SETTINGS_HELIUM_SERVICES_UPDATE_DESCRIPTION},
|
||||
{"heliumOriginOverride", IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE},
|
||||
{"heliumOriginOverrideDescription",
|
||||
IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE_DESCRIPTION},
|
||||
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
@@ -360,6 +360,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
settings_api::PrefType::kBoolean;
|
||||
(*s_allowlist)[::prefs::kHeliumSpellcheckEnabled] =
|
||||
settings_api::PrefType::kBoolean;
|
||||
+ (*s_allowlist)[::prefs::kHeliumUpdateFetchingEnabled] =
|
||||
+ settings_api::PrefType::kBoolean;
|
||||
(*s_allowlist)[::prefs::kHeliumServicesOrigin] =
|
||||
settings_api::PrefType::kString;
|
||||
|
||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
@@ -202,6 +202,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
registry->RegisterStringPref(prefs::kHeliumServicesOrigin, "");
|
||||
registry->RegisterBooleanPref(prefs::kHeliumDidOnboarding, false);
|
||||
registry->RegisterBooleanPref(prefs::kHeliumServicesConsented, false);
|
||||
+ registry->RegisterBooleanPref(prefs::kHeliumUpdateFetchingEnabled, true);
|
||||
}
|
||||
|
||||
registry->RegisterBooleanPref(
|
||||
--- a/chrome/app/settings_strings.grdp
|
||||
+++ b/chrome/app/settings_strings.grdp
|
||||
@@ -1902,6 +1902,12 @@
|
||||
<message name="IDS_SETTINGS_HELIUM_SERVICES_SPELLCHECK_TOGGLE_DESCRIPTION" desc="Description of the for enabling/disabling of downloading spellcheck files">
|
||||
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 automatic browser updates
|
||||
+ </message>
|
||||
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_UPDATE_DESCRIPTION" desc="Description of the toggle for automatic update downloads">
|
||||
+ 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
|
||||
</message>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user