mirror of
https://github.com/imputnet/helium.git
synced 2026-08-20 00:57:32 +02:00
Compare commits
160 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b06b34b5e9 | |||
| b102956f52 | |||
| 1676a4071e | |||
| 9b49458bc2 | |||
| b3733ec6aa | |||
| ac863716dd | |||
| 05ab79d610 | |||
| e67c0db58f | |||
| 8041351f2b | |||
| 2fd8ab8736 | |||
| bb720ee09f | |||
| 3175ba89bd | |||
| 1d218c894b | |||
| 3e07bd785f | |||
| a3072fedab | |||
| a749a3e3e2 | |||
| d145111dd0 | |||
| 2ce45ab9f2 | |||
| ab9a39c516 | |||
| 7b77584e8c | |||
| bcf3330b42 | |||
| a2d63db83b | |||
| b3f08938ce | |||
| 4a95606bfa | |||
| 76462eb66c | |||
| ec8480c3f5 | |||
| c94c96e62e | |||
| fa41ca5fca | |||
| 9df88459b8 | |||
| 7e1d9dd767 | |||
| ccb227dc03 | |||
| 94fa070851 | |||
| 1a266da9a3 | |||
| 6312142913 | |||
| 64ef95a6eb | |||
| a7e5433e7c | |||
| 4f803de791 | |||
| aebf0a4387 | |||
| be8ba95803 | |||
| c3ba3d8999 | |||
| 403e3fe01d | |||
| 5ee42465ab | |||
| aa487a75cd | |||
| 24b594f89e | |||
| 6a1cd43391 | |||
| 675cf80cde | |||
| 0008cd2cec | |||
| fece071fb4 | |||
| 43dfac4447 | |||
| 5d33305095 | |||
| 52dc69ac18 | |||
| 633d41748b | |||
| c8a824ec85 | |||
| 1fe645253d | |||
| a4f89dfb1c | |||
| 13f49f28cc | |||
| e9a04a2ccf | |||
| 80dfd780db | |||
| c9a0eaf2c0 | |||
| 9f7755dbd7 | |||
| 110cab3432 | |||
| 0f9df28d13 | |||
| 060fa834e5 | |||
| be47d96c1f | |||
| f049404ad5 | |||
| 232f940dbd | |||
| b3d929f6e2 | |||
| 5f296ba37d | |||
| 3668280470 | |||
| 673aaf7698 | |||
| 9113a4cda7 | |||
| e9de843abe | |||
| 367118d103 | |||
| 8da7b370f7 | |||
| 06a3ebf3d3 | |||
| 4991dcc364 | |||
| 7222174274 | |||
| 2315522ef2 | |||
| dc61f5cf4f | |||
| 8486eb8436 | |||
| 537ba368e9 | |||
| 61c7f706eb | |||
| ee6294e217 | |||
| e3bcfa4148 | |||
| 4700d1bc7e | |||
| 617bd4b75e | |||
| 7b31f0b137 | |||
| 7815dd5522 | |||
| 48577b920b | |||
| a264ac047d | |||
| eaf2714853 | |||
| cc1db76e65 | |||
| ae476a674c | |||
| 74779ebab4 | |||
| 70627f67f4 | |||
| c50904a16e | |||
| 2300b0f239 | |||
| 19d1c7fa61 | |||
| 36f1f56e6a | |||
| 0455a0ebc1 | |||
| 34ebe96fcc | |||
| 0198aeaac1 | |||
| 7c6d64e244 | |||
| eadab75c6e | |||
| 0366b01487 | |||
| 83a38925d8 | |||
| c12e746219 | |||
| 9cfd581f96 | |||
| 6a7a75d0d4 | |||
| e0995b8b42 | |||
| c7275e01d6 | |||
| 3952195984 | |||
| d7451e760c | |||
| efaf686acf | |||
| 0b535463d6 | |||
| 792a3d0dfa | |||
| bf550b7cb2 | |||
| b2050c2c8b | |||
| ec7340c086 | |||
| 35fe39c483 | |||
| 2e9125d326 | |||
| e347cca951 | |||
| 2a79cab2b4 | |||
| 256b83e902 | |||
| f7ad164068 | |||
| ed72676c85 | |||
| b3031f79b3 | |||
| ab6faeaed9 | |||
| 5bf2bc5966 | |||
| 68ef8ffe61 | |||
| 11b9b4f0eb | |||
| fd4e3ec87b | |||
| 7f886834a7 | |||
| 1c4ad07e9c | |||
| ce80c9748f | |||
| ea61e0bcd5 | |||
| d813f47f4e | |||
| dd24681d9d | |||
| 50e0255fe2 | |||
| b735b3ae1d | |||
| 115cf2e55a | |||
| 7022a9e02e | |||
| 9fc0ab1720 | |||
| abb3c6628a | |||
| f62b1281a3 | |||
| f46cc85e7c | |||
| 6f6679d446 | |||
| 662041df27 | |||
| 86710deb6a | |||
| 8f51e9f904 | |||
| f01e2d502a | |||
| 5ed9e4cff3 | |||
| 0fbca2dcbd | |||
| 1da4771ecd | |||
| 7cc782cf18 | |||
| eff0437c87 | |||
| 6eaf98d1c5 | |||
| 739f2f2fd2 | |||
| 1fd0941818 | |||
| 12534c0398 |
@@ -0,0 +1 @@
|
||||
*.patch linguist-language=C++
|
||||
@@ -0,0 +1 @@
|
||||
https://helium.computer/funding.json
|
||||
@@ -13,6 +13,14 @@ runs:
|
||||
shell: bash
|
||||
run: sudo apt install quilt
|
||||
|
||||
- name: Clear disk space
|
||||
shell: bash
|
||||
run: |
|
||||
sudo rm -rf /usr/lib/jvm \
|
||||
/usr/lib/google-cloud-sdk \
|
||||
/usr/lib/dotnet \
|
||||
/usr/share/swift
|
||||
|
||||
- name: Bump revision and make PR
|
||||
shell: bash
|
||||
env:
|
||||
@@ -83,8 +91,8 @@ runs:
|
||||
# commit, push, make pr
|
||||
TITLE="update: helium $version_after"
|
||||
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git config user.name "helium-bot"
|
||||
git config user.email "helium-bot@imput.net"
|
||||
git add -u patches helium-chromium revision.txt
|
||||
if ! git status | tail -1 | grep -q 'nothing to commit'; then
|
||||
git commit -m "$TITLE"
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
name: New version check
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
|
||||
on:
|
||||
# enabling manual trigger
|
||||
workflow_dispatch:
|
||||
# running every hour
|
||||
schedule:
|
||||
- cron: '48 * * * *'
|
||||
|
||||
jobs:
|
||||
check:
|
||||
# do not run in forks
|
||||
if: github.repository == 'ungoogled-software/ungoogled-chromium'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set maintainer groups
|
||||
id: maintainers
|
||||
run: |
|
||||
echo "all=@networkException" >> $GITHUB_OUTPUT
|
||||
echo "linux=@rany2 @clickot @emilylange" >> $GITHUB_OUTPUT
|
||||
echo "windows=" >> $GITHUB_OUTPUT
|
||||
echo "macos=" >> $GITHUB_OUTPUT
|
||||
- name: Get the latest Chromium version
|
||||
id: latest-version
|
||||
run: |
|
||||
set -eo pipefail
|
||||
BASE_URL="https://versionhistory.googleapis.com/v1/chrome/platforms"
|
||||
END_URL="channels/stable/versions/all/releases?filter=endtime%3Dnone%2Cfraction%3E%3D0.5&order_by=version%20desc"
|
||||
JQ_FILTER='if .releases | select(type=="array") | length > 0 then .releases | first | .version else "null" end'
|
||||
for platform in linux win mac; do
|
||||
printf %s "${platform}_version=" >> $GITHUB_OUTPUT
|
||||
curl -sf "${BASE_URL}/${platform}/${END_URL}" | jq -re "${JQ_FILTER}" >> $GITHUB_OUTPUT
|
||||
done
|
||||
- uses: actions/checkout@v3
|
||||
- name: Create Issue for all platforms
|
||||
if: |
|
||||
contains(steps.latest-version.outputs.win_version, steps.latest-version.outputs.mac_version) &&
|
||||
contains(steps.latest-version.outputs.mac_version, steps.latest-version.outputs.linux_version) &&
|
||||
!contains(steps.latest-version.outputs.linux_version, 'null')
|
||||
uses: dblock/create-a-github-issue@v3
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
VERSION: ${{ steps.latest-version.outputs.linux_version }}
|
||||
PLATFORM: all platforms
|
||||
NOTIFY_MAINTAINERS: "${{ steps.maintainers.outputs.all }} ${{ steps.maintainers.outputs.linux }} ${{ steps.maintainers.outputs.windows }} ${{ steps.maintainers.outputs.macos }}"
|
||||
with:
|
||||
update_existing: false
|
||||
search_existing: all
|
||||
filename: .github/ISSUE_TEMPLATE/create-an--updating-to-chromium-x-x-x-x-.md
|
||||
- name: Create Issue for Linux
|
||||
if: |
|
||||
(
|
||||
!contains(steps.latest-version.outputs.win_version, steps.latest-version.outputs.mac_version) ||
|
||||
!contains(steps.latest-version.outputs.mac_version, steps.latest-version.outputs.linux_version)
|
||||
) && !contains(steps.latest-version.outputs.linux_version, 'null')
|
||||
uses: dblock/create-a-github-issue@v3
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
VERSION: ${{ steps.latest-version.outputs.linux_version }}
|
||||
PLATFORM: Linux
|
||||
NOTIFY_MAINTAINERS: "${{ steps.maintainers.outputs.all }} ${{ steps.maintainers.outputs.linux }}"
|
||||
with:
|
||||
update_existing: false
|
||||
search_existing: all
|
||||
filename: .github/ISSUE_TEMPLATE/create-an--updating-to-chromium-x-x-x-x-.md
|
||||
- name: Create Issue for macOS
|
||||
if: |
|
||||
(
|
||||
!contains(steps.latest-version.outputs.win_version, steps.latest-version.outputs.mac_version) ||
|
||||
!contains(steps.latest-version.outputs.mac_version, steps.latest-version.outputs.linux_version)
|
||||
) && !contains(steps.latest-version.outputs.mac_version, 'null')
|
||||
uses: dblock/create-a-github-issue@v3
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
VERSION: ${{ steps.latest-version.outputs.mac_version }}
|
||||
PLATFORM: macOS
|
||||
NOTIFY_MAINTAINERS: "${{ steps.maintainers.outputs.all }} ${{ steps.maintainers.outputs.macos }}"
|
||||
with:
|
||||
update_existing: false
|
||||
search_existing: all
|
||||
filename: .github/ISSUE_TEMPLATE/create-an--updating-to-chromium-x-x-x-x-.md
|
||||
- name: Create Issue for Windows
|
||||
if: |
|
||||
(
|
||||
!contains(steps.latest-version.outputs.win_version, steps.latest-version.outputs.mac_version) ||
|
||||
!contains(steps.latest-version.outputs.mac_version, steps.latest-version.outputs.linux_version)
|
||||
) && !contains(steps.latest-version.outputs.win_version, 'null')
|
||||
uses: dblock/create-a-github-issue@v3
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
VERSION: ${{ steps.latest-version.outputs.win_version }}
|
||||
PLATFORM: Windows
|
||||
NOTIFY_MAINTAINERS: "${{ steps.maintainers.outputs.all }} ${{ steps.maintainers.outputs.windows }}"
|
||||
with:
|
||||
update_existing: false
|
||||
search_existing: all
|
||||
filename: .github/ISSUE_TEMPLATE/create-an--updating-to-chromium-x-x-x-x-.md
|
||||
@@ -1 +1 @@
|
||||
141.0.7390.54
|
||||
143.0.7499.40
|
||||
|
||||
+26
-4
@@ -16,6 +16,10 @@ def _read_text(path):
|
||||
return filter(str, f.read().splitlines())
|
||||
|
||||
|
||||
def _read_patch(path):
|
||||
return unidiff.PatchSet('\n'.join(_read_text(path)))
|
||||
|
||||
|
||||
def _init(root):
|
||||
global patches_dir
|
||||
global series
|
||||
@@ -59,8 +63,7 @@ def c_all_new_files_have_license_header():
|
||||
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)
|
||||
added_files = filter(lambda f: f.is_added_file, _read_patch(patch))
|
||||
|
||||
for file in added_files:
|
||||
if any(p in file.path.lower() for p in LICENSE_HEADER_IGNORES):
|
||||
@@ -75,8 +78,8 @@ def c_all_new_headers_have_correct_guard():
|
||||
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)
|
||||
added_files = filter(lambda f: f.is_added_file and f.path.endswith('.h'),
|
||||
_read_patch(patch))
|
||||
|
||||
for file in added_files:
|
||||
expected_macro_name = file.path.upper() \
|
||||
@@ -112,3 +115,22 @@ def c_all_new_headers_have_correct_guard():
|
||||
assert value == f"+{expected[macro_type]}\n", \
|
||||
f"Patch {patch} has unexpected {macro_type} in {file.path}:" \
|
||||
f"{value_print}, expecting: {expected[macro_type]}"
|
||||
|
||||
|
||||
def d_no_whitespace_only_changes():
|
||||
for patch in series:
|
||||
if 'helium' not in patch:
|
||||
continue
|
||||
|
||||
for file in _read_patch(patch):
|
||||
for hunk in file:
|
||||
seen_nonws = False
|
||||
for line in hunk:
|
||||
line = str(line)
|
||||
|
||||
if line.startswith('+') or line.startswith('-'):
|
||||
seen_nonws = seen_nonws or len(line.rstrip()) > 1
|
||||
|
||||
assert seen_nonws, \
|
||||
f"Patch {patch} contains hunk consisting of "\
|
||||
f"only whitespace characters in {file.path}: {hunk}"
|
||||
|
||||
@@ -70,8 +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',
|
||||
# Exclusion for zoneinfo64
|
||||
'third_party/rust/chromium_crates_io/vendor/zoneinfo64-v0_2/src/data/zoneinfo64.res',
|
||||
# Exclusions for safe file extensions
|
||||
'*.avif',
|
||||
'*.ttf',
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# 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.
|
||||
|
||||
# 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.
|
||||
@@ -67,19 +63,19 @@ def _dir_empty(path):
|
||||
return False
|
||||
|
||||
|
||||
def _rename_files_with_dirs(root_dir, sorted_file_iter):
|
||||
def _rename_files_with_dirs(root_dir, source_dir, sorted_file_iter):
|
||||
'''
|
||||
Moves a list of sorted files back to the upstream repo, removing empty directories along the way
|
||||
Moves a list of sorted files back to their original location,
|
||||
removing empty directories along the way
|
||||
'''
|
||||
past_parent = None
|
||||
upstream_path = Path(os.path.dirname(os.path.realpath(__file__))) / '../patches'
|
||||
for partial_path in sorted_file_iter:
|
||||
complete_path = Path(root_dir, partial_path)
|
||||
complete_upstream_path = Path(upstream_path, partial_path)
|
||||
complete_source_path = Path(source_dir, partial_path)
|
||||
try:
|
||||
complete_path.rename(complete_upstream_path)
|
||||
complete_path.rename(complete_source_path)
|
||||
except FileNotFoundError:
|
||||
get_logger().warning('Could not remove prepended patch: %s', complete_path)
|
||||
get_logger().warning('Could not move prepended patch: %s', complete_path)
|
||||
if past_parent != complete_path.parent:
|
||||
while past_parent and _dir_empty(past_parent):
|
||||
past_parent.rmdir()
|
||||
@@ -91,7 +87,7 @@ def _rename_files_with_dirs(root_dir, sorted_file_iter):
|
||||
complete_path = complete_path.parent
|
||||
|
||||
|
||||
def unmerge_platform_patches(platform_patches_dir):
|
||||
def unmerge_platform_patches(platform_patches_dir, prepend_patches_dir):
|
||||
'''
|
||||
Undo merge_platform_patches(), adding any new patches from series.merged as necessary
|
||||
|
||||
@@ -105,8 +101,8 @@ def unmerge_platform_patches(platform_patches_dir):
|
||||
filter(len,
|
||||
(platform_patches_dir / _SERIES_PREPEND).read_text(encoding=ENCODING).splitlines()))
|
||||
|
||||
# Move prepended files to original location, preserving changes, and clean up
|
||||
_rename_files_with_dirs(platform_patches_dir, sorted(prepend_series))
|
||||
# Move prepended files back to original location, preserving changes
|
||||
_rename_files_with_dirs(platform_patches_dir, prepend_patches_dir, sorted(prepend_series))
|
||||
|
||||
# Determine positions of blank spaces in series.orig
|
||||
if not (platform_patches_dir / _SERIES_ORIG).exists():
|
||||
@@ -175,10 +171,11 @@ def main():
|
||||
repo_dir = Path(__file__).resolve().parent.parent
|
||||
|
||||
success = False
|
||||
prepend_patches_dir = repo_dir / 'patches'
|
||||
if args.command == 'merge':
|
||||
success = merge_platform_patches(args.platform_patches, repo_dir / 'patches')
|
||||
success = merge_platform_patches(args.platform_patches, prepend_patches_dir)
|
||||
elif args.command == 'unmerge':
|
||||
success = unmerge_platform_patches(args.platform_patches)
|
||||
success = unmerge_platform_patches(args.platform_patches, prepend_patches_dir)
|
||||
else:
|
||||
raise NotImplementedError(args.command)
|
||||
|
||||
|
||||
+543
-141
File diff suppressed because it is too large
Load Diff
+4
-4
@@ -7,17 +7,17 @@ sha256 = 00a87050fa3f941d04d67fb5763991e0b8ea399a88b505ab0e56dd263f06864c
|
||||
output_path = ./third_party/search_engines_data/resources_internal
|
||||
|
||||
[onboarding]
|
||||
version = 202509241653
|
||||
version = 202511061712
|
||||
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 = fb23110d391419fbbbe2c8f7c3d96765b9b50aa1c20025343ab7f8bd59f9e7ab
|
||||
sha256 = 5728d2c6806f3f918f7fd0b358935fd4daa34c1117703c564917ede1dac8e199
|
||||
output_path = ./components/helium_onboarding
|
||||
|
||||
# If you are bumping this, you *NEED* to re-strip the assets.json
|
||||
# file *every time* by using `devutils/clear-ublock-assets.js`.
|
||||
[ublock_origin]
|
||||
version = 1.66.4
|
||||
version = 1.67.0
|
||||
url = https://github.com/imputnet/ublock-origin-crx/releases/download/%(version)s/uBlock0_%(version)s.crx
|
||||
sha256 = c2809bb4cd2f3a6b9ddfc5e165cba74a200cd80ca691521f73d98bf5ab5abcef
|
||||
sha256 = 969eaaa4e0b1893a35e1c5767c33bcfcc62737667644c97f644ff3c84677aff7
|
||||
download_filename = ublock-origin-%(version)s.zip
|
||||
output_path = third_party/ublock
|
||||
|
||||
+11
-8
@@ -189,7 +189,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+} // namespace
|
||||
--- /dev/null
|
||||
+++ b/chrome/common/importer/chrome_importer_utils.cc
|
||||
@@ -0,0 +1,241 @@
|
||||
@@ -0,0 +1,243 @@
|
||||
+/* Copyright (c) 2019 The Brave Authors, 2025 imput. 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,
|
||||
@@ -235,7 +235,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ base::ReadFileToString(preference_path, &preference_content);
|
||||
+
|
||||
+ std::optional<base::Value::Dict> preference =
|
||||
+ base::JSONReader::ReadDict(preference_content);
|
||||
+ base::JSONReader::ReadDict(preference_content,
|
||||
+ base::JSON_PARSE_CHROMIUM_EXTENSIONS);
|
||||
+ if (!preference) {
|
||||
+ return std::nullopt;
|
||||
+ }
|
||||
@@ -335,7 +336,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ std::string local_state_content;
|
||||
+ base::ReadFileToString(local_state_path, &local_state_content);
|
||||
+ std::optional<base::Value::Dict> local_state_dict =
|
||||
+ base::JSONReader::ReadDict(local_state_content);
|
||||
+ base::JSONReader::ReadDict(local_state_content,
|
||||
+ base::JSON_PARSE_CHROMIUM_EXTENSIONS);
|
||||
+ if (!local_state_dict)
|
||||
+ return profiles;
|
||||
+
|
||||
@@ -2733,7 +2735,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+#endif // BRAVE_UTILITY_IMPORTER_BRAVE_EXTERNAL_PROCESS_IMPORTER_BRIDGE_H_
|
||||
--- /dev/null
|
||||
+++ b/chrome/utility/importer/chrome_importer.cc
|
||||
@@ -0,0 +1,435 @@
|
||||
@@ -0,0 +1,436 @@
|
||||
+/* 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,
|
||||
@@ -2822,7 +2824,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ std::string local_state_content;
|
||||
+ base::ReadFileToString(local_state_path, &local_state_content);
|
||||
+ std::optional<base::Value::Dict> local_state =
|
||||
+ base::JSONReader::ReadDict(local_state_content);
|
||||
+ base::JSONReader::ReadDict(local_state_content,
|
||||
+ base::JSON_PARSE_CHROMIUM_EXTENSIONS);
|
||||
+ if (!local_state) {
|
||||
+ return false;
|
||||
+ }
|
||||
@@ -3006,7 +3009,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ base::ReadFileToString(copy_bookmark_file.copied_file_path(),
|
||||
+ &bookmarks_content);
|
||||
+ std::optional<base::Value::Dict> bookmark_dict =
|
||||
+ base::JSONReader::ReadDict(bookmarks_content);
|
||||
+ base::JSONReader::ReadDict(bookmarks_content,
|
||||
+ base::JSON_PARSE_CHROMIUM_EXTENSIONS);
|
||||
+ if (!bookmark_dict)
|
||||
+ return;
|
||||
+
|
||||
@@ -3099,8 +3103,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ if (!usage.favicon_url.is_valid())
|
||||
+ continue; // Don't bother importing favicons with invalid URLs.
|
||||
+
|
||||
+ std::vector<uint8_t> data;
|
||||
+ s.ColumnBlobAsVector(1, &data);
|
||||
+ std::vector<uint8_t> data = s.ColumnBlobAsVector(1);
|
||||
+ if (data.empty())
|
||||
+ continue; // Data definitely invalid.
|
||||
+
|
||||
@@ -177,7 +177,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
} // namespace user_data_importer
|
||||
--- a/tools/metrics/histograms/metadata/sql/histograms.xml
|
||||
+++ b/tools/metrics/histograms/metadata/sql/histograms.xml
|
||||
@@ -40,6 +40,7 @@ chromium-metrics-reviews@google.com.
|
||||
@@ -42,6 +42,7 @@ chromium-metrics-reviews@google.com.
|
||||
<variant name="DBSCSessions" summary="DBSCSessions"/>
|
||||
<variant name="DIPS" summary="DIPS"/>
|
||||
<variant name="DownloadRecord" summary="DownloadRecord"/>
|
||||
@@ -207,7 +207,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
} // 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 @@
|
||||
@@ -23,11 +23,11 @@
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
IPC_ENUM_TRAITS_MIN_MAX_VALUE(user_data_importer::ImporterType,
|
||||
user_data_importer::TYPE_UNKNOWN,
|
||||
@@ -244,7 +244,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
--- a/chrome/common/pref_names.h
|
||||
+++ b/chrome/common/pref_names.h
|
||||
@@ -4260,6 +4260,9 @@ inline constexpr char kServiceWorkerToCo
|
||||
@@ -4281,6 +4281,9 @@ inline constexpr char kServiceWorkerToCo
|
||||
inline constexpr char kSharedWorkerBlobURLFixEnabled[] =
|
||||
"worker.shared_worker_blob_url_fix_enabled";
|
||||
|
||||
@@ -256,7 +256,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
inline constexpr char kClearWindowNameForNewBrowsingContextGroup[] =
|
||||
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
@@ -1161,6 +1161,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
@@ -1147,6 +1147,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
settings_api::PrefType::kBoolean;
|
||||
(*s_allowlist)[::prefs::kImportDialogSearchEngine] =
|
||||
settings_api::PrefType::kBoolean;
|
||||
@@ -267,7 +267,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// Supervised Users. This setting is queried in our Tast tests (b/241943380).
|
||||
--- a/chrome/browser/ui/webui/settings/settings_ui.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_ui.cc
|
||||
@@ -62,6 +62,7 @@
|
||||
@@ -63,6 +63,7 @@
|
||||
#include "chrome/browser/ui/webui/settings/font_handler.h"
|
||||
#include "chrome/browser/ui/webui/settings/hats_handler.h"
|
||||
#include "chrome/browser/ui/webui/settings/import_data_handler.h"
|
||||
@@ -275,7 +275,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"
|
||||
@@ -202,6 +203,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);
|
||||
@@ -283,7 +283,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
|
||||
SettingsUI::SettingsUI(content::WebUI* web_ui)
|
||||
@@ -231,7 +233,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));
|
||||
@@ -294,7 +294,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
|
||||
@@ -893,6 +893,8 @@ void AddImportDataStrings(content::WebUI
|
||||
@@ -999,6 +999,8 @@ void AddImportDataStrings(content::WebUI
|
||||
{"importHistory", IDS_SETTINGS_IMPORT_HISTORY_CHECKBOX},
|
||||
{"importFavorites", IDS_SETTINGS_IMPORT_FAVORITES_CHECKBOX},
|
||||
{"importPasswords", IDS_SETTINGS_IMPORT_PASSWORDS_CHECKBOX},
|
||||
@@ -319,7 +319,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
|
||||
@@ -1203,6 +1203,10 @@ static_library("ui") {
|
||||
@@ -1252,6 +1252,10 @@ static_library("ui") {
|
||||
"webui/settings/accessibility_main_handler.h",
|
||||
"webui/settings/appearance_handler.cc",
|
||||
"webui/settings/appearance_handler.h",
|
||||
@@ -330,7 +330,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",
|
||||
@@ -1355,6 +1359,13 @@ static_library("ui") {
|
||||
@@ -1408,6 +1412,13 @@ static_library("ui") {
|
||||
]
|
||||
}
|
||||
|
||||
@@ -412,7 +412,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
|
||||
@@ -119,6 +119,8 @@ VisitSource VisitSourceFromInt(int value
|
||||
@@ -120,6 +120,8 @@ VisitSource VisitSourceFromInt(int value
|
||||
case SOURCE_SAFARI_IMPORTED:
|
||||
case SOURCE_ACTOR:
|
||||
case SOURCE_OS_MIGRATION_IMPORTED:
|
||||
@@ -434,7 +434,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
--- a/chrome/utility/BUILD.gn
|
||||
+++ b/chrome/utility/BUILD.gn
|
||||
@@ -92,6 +92,12 @@ static_library("utility") {
|
||||
@@ -90,6 +90,12 @@ static_library("utility") {
|
||||
sources += [
|
||||
"importer/bookmarks_file_importer.cc",
|
||||
"importer/bookmarks_file_importer.h",
|
||||
@@ -459,7 +459,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "components/mirroring/service/mirroring_service.h"
|
||||
#include "services/passage_embeddings/passage_embeddings_service.h"
|
||||
#include "services/proxy_resolver/proxy_resolver_factory_impl.h" // nogncheck
|
||||
@@ -146,6 +148,13 @@ static_assert(BUILDFLAG(ENABLE_PRINTING)
|
||||
@@ -138,6 +140,13 @@ static_assert(BUILDFLAG(ENABLE_PRINTING)
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -473,7 +473,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
auto RunFilePatcher(mojo::PendingReceiver<patch::mojom::FilePatcher> receiver) {
|
||||
return std::make_unique<patch::FilePatcherImpl>(std::move(receiver));
|
||||
}
|
||||
@@ -465,6 +474,7 @@ void RegisterMainThreadServices(mojo::Se
|
||||
@@ -434,6 +443,7 @@ void RegisterMainThreadServices(mojo::Se
|
||||
services.Add(ContentBookmarkParser);
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
@@ -583,7 +583,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// entire group has been collected and is ready to be written to the profile.
|
||||
--- a/chrome/app/generated_resources.grd
|
||||
+++ b/chrome/app/generated_resources.grd
|
||||
@@ -11122,6 +11122,15 @@ Check your passwords anytime in <ph name
|
||||
@@ -11279,6 +11279,15 @@ Check your passwords anytime in <ph name
|
||||
Microsoft Edge
|
||||
</message>
|
||||
</if>
|
||||
+1
-1
@@ -33,7 +33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "extensions/browser/blocklist_extension_prefs.h"
|
||||
#include "extensions/browser/delayed_install_manager.h"
|
||||
#include "extensions/browser/disable_reason.h"
|
||||
@@ -533,6 +534,22 @@ void ExtensionRegistrar::AddComponentExt
|
||||
@@ -540,6 +541,22 @@ void ExtensionRegistrar::AddComponentExt
|
||||
}
|
||||
|
||||
AddExtension(extension);
|
||||
@@ -0,0 +1,260 @@
|
||||
Based on Brave's MRU tab cycling implementation, adapted for Helium.
|
||||
|
||||
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,
|
||||
You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
Copyright (c) 2025, The Brave Authors
|
||||
Copyright (c) 2025, The Helium Authors
|
||||
|
||||
Alternatively, the contents of this file may be used under the terms
|
||||
of the GNU General Public License Version 3, as described below:
|
||||
|
||||
Copyright (C) 2025 The Helium Authors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
--- a/chrome/browser/ui/tabs/tab_strip_model.cc
|
||||
+++ b/chrome/browser/ui/tabs/tab_strip_model.cc
|
||||
@@ -54,6 +54,7 @@
|
||||
#include "chrome/browser/ui/browser_commands.h"
|
||||
#include "chrome/browser/ui/browser_finder.h"
|
||||
#include "chrome/browser/ui/browser_window.h"
|
||||
+#include "chrome/browser/ui/views/frame/browser_view.h"
|
||||
#include "chrome/browser/ui/commerce/ui_utils.h"
|
||||
#include "chrome/browser/ui/send_tab_to_self/send_tab_to_self_bubble.h"
|
||||
#include "chrome/browser/ui/tabs/features.h"
|
||||
@@ -3703,6 +3704,44 @@ TabStripSelectionChange TabStripModel::S
|
||||
return selection;
|
||||
}
|
||||
|
||||
+void TabStripModel::SelectMRUTab(TabRelativeDirection direction,
|
||||
+ TabStripUserGestureDetails detail) {
|
||||
+ if (mru_cycle_list_.empty()) {
|
||||
+ Browser* browser = chrome::FindBrowserWithTab(GetWebContentsAt(0));
|
||||
+ if (!browser) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ for (int i = 0; i < count(); ++i) {
|
||||
+ mru_cycle_list_.push_back(i);
|
||||
+ }
|
||||
+
|
||||
+ std::sort(mru_cycle_list_.begin(), mru_cycle_list_.end(),
|
||||
+ [this](int a, int b) {
|
||||
+ return GetWebContentsAt(a)->GetLastActiveTimeTicks() >
|
||||
+ GetWebContentsAt(b)->GetLastActiveTimeTicks();
|
||||
+ });
|
||||
+
|
||||
+ if (BrowserView* browser_view = browser->window()->AsBrowserView()) {
|
||||
+ browser_view->StartTabCycling();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (direction == TabRelativeDirection::kNext) {
|
||||
+ std::rotate(mru_cycle_list_.begin(), mru_cycle_list_.begin() + 1,
|
||||
+ mru_cycle_list_.end());
|
||||
+ } else {
|
||||
+ std::rotate(mru_cycle_list_.rbegin(), mru_cycle_list_.rbegin() + 1,
|
||||
+ mru_cycle_list_.rend());
|
||||
+ }
|
||||
+
|
||||
+ ActivateTabAt(mru_cycle_list_[0], detail);
|
||||
+}
|
||||
+
|
||||
+void TabStripModel::StopMRUCycling() {
|
||||
+ mru_cycle_list_.clear();
|
||||
+}
|
||||
+
|
||||
void TabStripModel::SelectRelativeTab(TabRelativeDirection direction,
|
||||
TabStripUserGestureDetails detail) {
|
||||
// This may happen during automated testing or if a user somehow buffers
|
||||
--- a/chrome/browser/ui/tabs/tab_strip_model.h
|
||||
+++ b/chrome/browser/ui/tabs/tab_strip_model.h
|
||||
@@ -611,6 +611,10 @@ class TabStripModel {
|
||||
TabStripUserGestureDetails detail = TabStripUserGestureDetails(
|
||||
TabStripUserGestureDetails::GestureType::kOther));
|
||||
|
||||
+ // Stops cycling through tabs in MRU order when Ctrl is released.
|
||||
+ // Used in BrowserView::StopTabCycling().
|
||||
+ void StopMRUCycling();
|
||||
+
|
||||
// Moves the active in the specified direction. Respects group boundaries.
|
||||
void MoveTabNext();
|
||||
void MoveTabPrevious();
|
||||
@@ -1139,6 +1143,11 @@ class TabStripModel {
|
||||
kPrevious,
|
||||
};
|
||||
|
||||
+ // Selects either the most recently used tab
|
||||
+ // or the least recently used tab.
|
||||
+ void SelectMRUTab(TabRelativeDirection direction,
|
||||
+ TabStripUserGestureDetails detail);
|
||||
+
|
||||
// Selects either the next tab (kNext), or the previous tab (kPrevious).
|
||||
void SelectRelativeTab(TabRelativeDirection direction,
|
||||
TabStripUserGestureDetails detail);
|
||||
@@ -1393,6 +1402,9 @@ class TabStripModel {
|
||||
// Tracks whether a modal UI is showing.
|
||||
bool showing_modal_ui_ = false;
|
||||
|
||||
+ // List of tabs for MRU cycling
|
||||
+ std::vector<int> mru_cycle_list_;
|
||||
+
|
||||
base::WeakPtrFactory<TabStripModel> weak_factory_{this};
|
||||
};
|
||||
|
||||
--- a/chrome/browser/ui/views/frame/browser_view.cc
|
||||
+++ b/chrome/browser/ui/views/frame/browser_view.cc
|
||||
@@ -291,7 +291,10 @@
|
||||
#include "ui/compositor/paint_recorder.h"
|
||||
#include "ui/content_accelerators/accelerator_util.h"
|
||||
#include "ui/display/screen.h"
|
||||
+#include "ui/events/event.h"
|
||||
+#include "ui/events/event_handler.h"
|
||||
#include "ui/events/event_utils.h"
|
||||
+#include "ui/events/keycodes/keyboard_codes.h"
|
||||
#include "ui/gfx/animation/animation_runner.h"
|
||||
#include "ui/gfx/canvas.h"
|
||||
#include "ui/gfx/color_utils.h"
|
||||
@@ -309,6 +312,7 @@
|
||||
#include "ui/views/controls/button/menu_button.h"
|
||||
#include "ui/views/controls/textfield/textfield.h"
|
||||
#include "ui/views/controls/webview/webview.h"
|
||||
+#include "ui/views/event_monitor.h"
|
||||
#include "ui/views/interaction/element_tracker_views.h"
|
||||
#include "ui/views/layout/fill_layout.h"
|
||||
#include "ui/views/view.h"
|
||||
@@ -809,6 +813,83 @@ class BrowserView::ExclusiveAccessContex
|
||||
base::WeakPtrFactory<ExclusiveAccessContextImpl> weak_ptr_factory_{this};
|
||||
};
|
||||
|
||||
+// Handles events during MRU tab cycling to start/stop tab cycling.
|
||||
+class TabCyclingEventHandler : public ui::EventObserver,
|
||||
+ public views::WidgetObserver {
|
||||
+ public:
|
||||
+ explicit TabCyclingEventHandler(BrowserView* browser_view)
|
||||
+ : browser_view_(browser_view) {
|
||||
+ Start();
|
||||
+ }
|
||||
+
|
||||
+ ~TabCyclingEventHandler() override { Stop(); }
|
||||
+
|
||||
+ TabCyclingEventHandler(const TabCyclingEventHandler&) = delete;
|
||||
+ TabCyclingEventHandler& operator=(const TabCyclingEventHandler&) = delete;
|
||||
+
|
||||
+ private:
|
||||
+ // ui::EventObserver overrides:
|
||||
+ void OnEvent(const ui::Event& event) override {
|
||||
+ if (event.type() == ui::EventType::kKeyReleased &&
|
||||
+ event.AsKeyEvent()->key_code() == ui::VKEY_CONTROL) {
|
||||
+ // Ctrl key was released, stop the tab cycling.
|
||||
+ Stop();
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (event.type() == ui::EventType::kMousePressed) {
|
||||
+ Stop();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // views::WidgetObserver overrides:
|
||||
+ void OnWidgetActivationChanged(views::Widget* widget, bool active) override {
|
||||
+ // We should stop cycling if other application gets active state.
|
||||
+ if (!active) {
|
||||
+ Stop();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // Handle browser widget closing while tab cycling is in-progress.
|
||||
+ void OnWidgetClosing(views::Widget* widget) override { Stop(); }
|
||||
+
|
||||
+ void Start() {
|
||||
+ // Add the event handler.
|
||||
+ auto* widget = browser_view_->GetWidget();
|
||||
+ if (widget->GetNativeWindow()) {
|
||||
+ monitor_ = views::EventMonitor::CreateWindowMonitor(
|
||||
+ this, widget->GetNativeWindow(),
|
||||
+ {ui::EventType::kMousePressed, ui::EventType::kKeyReleased});
|
||||
+ }
|
||||
+ widget->AddObserver(this);
|
||||
+ }
|
||||
+
|
||||
+ void Stop() {
|
||||
+ if (!monitor_) {
|
||||
+ // Already stopped.
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ // Remove event handler.
|
||||
+ auto* widget = browser_view_->GetWidget();
|
||||
+ monitor_.reset();
|
||||
+ widget->RemoveObserver(this);
|
||||
+ browser_view_->StopTabCycling();
|
||||
+ }
|
||||
+
|
||||
+ raw_ptr<BrowserView> browser_view_;
|
||||
+ std::unique_ptr<views::EventMonitor> monitor_;
|
||||
+};
|
||||
+
|
||||
+void BrowserView::StartTabCycling() {
|
||||
+ tab_cycling_event_handler_ = std::make_unique<TabCyclingEventHandler>(this);
|
||||
+}
|
||||
+
|
||||
+void BrowserView::StopTabCycling() {
|
||||
+ tab_cycling_event_handler_.reset();
|
||||
+ browser()->tab_strip_model()->StopMRUCycling();
|
||||
+}
|
||||
+
|
||||
class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
|
||||
public:
|
||||
explicit AccessibilityModeObserver(BrowserView* browser_view)
|
||||
--- a/chrome/browser/ui/views/frame/browser_view.h
|
||||
+++ b/chrome/browser/ui/views/frame/browser_view.h
|
||||
@@ -80,6 +80,7 @@ class LocationBarView;
|
||||
class MultiContentsView;
|
||||
class ScrimView;
|
||||
class SidePanel;
|
||||
+class TabCyclingEventHandler;
|
||||
class TabDragDelegate;
|
||||
class TabSearchBubbleHost;
|
||||
class TabStrip;
|
||||
@@ -555,6 +556,10 @@ class BrowserView : public BrowserWindow
|
||||
bool IsBorderlessModeEnabled() const override;
|
||||
void ShowChromeLabs() override;
|
||||
BrowserView* AsBrowserView() override;
|
||||
+
|
||||
+ void StartTabCycling();
|
||||
+ void StopTabCycling();
|
||||
+
|
||||
SharingDialog* ShowSharingDialog(content::WebContents* contents,
|
||||
SharingDialogData data) override;
|
||||
void ShowUpdateChromeDialog() override;
|
||||
@@ -860,6 +865,7 @@ class BrowserView : public BrowserWindow
|
||||
friend class BrowserViewLayoutDelegateImpl;
|
||||
friend class BrowserViewLayoutDelegateImplOld;
|
||||
friend class BrowserViewLayoutDelegateImplBrowsertest;
|
||||
+ friend class TabCyclingEventHandler;
|
||||
friend class TopControlsSlideControllerTest;
|
||||
FRIEND_TEST_ALL_PREFIXES(BrowserViewTest, BrowserView);
|
||||
FRIEND_TEST_ALL_PREFIXES(BrowserViewTest, AccessibleWindowTitle);
|
||||
@@ -1387,6 +1393,8 @@ class BrowserView : public BrowserWindow
|
||||
|
||||
base::CallbackListSubscription vertical_tab_subscription_;
|
||||
|
||||
+ std::unique_ptr<TabCyclingEventHandler> tab_cycling_event_handler_;
|
||||
+
|
||||
mutable base::WeakPtrFactory<BrowserView> weak_ptr_factory_{this};
|
||||
};
|
||||
|
||||
+5
-5
@@ -10,7 +10,7 @@ Subject: Disable fetching of all field trials
|
||||
|
||||
--- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
|
||||
+++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
|
||||
@@ -60,7 +60,7 @@ public abstract class ChromeFeatureList
|
||||
@@ -61,7 +61,7 @@ public abstract class ChromeFeatureList
|
||||
* |kFeaturesExposedToJava| in chrome/browser/flags/android/chrome_feature_list.cc
|
||||
*/
|
||||
public static String getFieldTrialParamByFeature(String featureName, String paramName) {
|
||||
@@ -19,7 +19,7 @@ Subject: Disable fetching of all field trials
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -72,8 +72,7 @@ public abstract class ChromeFeatureList
|
||||
@@ -73,8 +73,7 @@ public abstract class ChromeFeatureList
|
||||
*/
|
||||
public static boolean getFieldTrialParamByFeatureAsBoolean(
|
||||
String featureName, String paramName, boolean defaultValue) {
|
||||
@@ -29,7 +29,7 @@ Subject: Disable fetching of all field trials
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -85,8 +84,7 @@ public abstract class ChromeFeatureList
|
||||
@@ -86,8 +85,7 @@ public abstract class ChromeFeatureList
|
||||
*/
|
||||
public static int getFieldTrialParamByFeatureAsInt(
|
||||
String featureName, String paramName, int defaultValue) {
|
||||
@@ -39,7 +39,7 @@ Subject: Disable fetching of all field trials
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -98,8 +96,7 @@ public abstract class ChromeFeatureList
|
||||
@@ -99,8 +97,7 @@ public abstract class ChromeFeatureList
|
||||
*/
|
||||
public static double getFieldTrialParamByFeatureAsDouble(
|
||||
String featureName, String paramName, double defaultValue) {
|
||||
@@ -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() {
|
||||
+29
-37
@@ -9,7 +9,7 @@
|
||||
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -2599,6 +2599,7 @@ static_library("browser") {
|
||||
@@ -2596,6 +2596,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
|
||||
@@ -188,6 +188,7 @@
|
||||
@@ -191,6 +191,7 @@
|
||||
#include "components/translate/core/common/translate_util.h"
|
||||
#include "components/trusted_vault/features.h"
|
||||
#include "components/ui_devtools/switches.h"
|
||||
@@ -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
|
||||
@@ -83,6 +83,7 @@
|
||||
@@ -84,6 +84,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"
|
||||
@@ -3541,6 +3542,8 @@ void RenderProcessHostImpl::PropagateBro
|
||||
@@ -3698,6 +3699,8 @@ void RenderProcessHostImpl::PropagateBro
|
||||
switches::kEnableWebGLImageChromium,
|
||||
switches::kEnableWebGPUDeveloperFeatures,
|
||||
switches::kFileUrlPathAlias,
|
||||
@@ -73,7 +73,7 @@
|
||||
switches::kForceHighContrast,
|
||||
--- a/content/child/BUILD.gn
|
||||
+++ b/content/child/BUILD.gn
|
||||
@@ -110,6 +110,7 @@ target(link_target_type, "child") {
|
||||
@@ -109,6 +109,7 @@ target(link_target_type, "child") {
|
||||
"//third_party/blink/public/common:buildflags",
|
||||
"//third_party/blink/public/strings",
|
||||
"//third_party/ced",
|
||||
@@ -83,7 +83,7 @@
|
||||
"//ui/events/blink",
|
||||
--- a/content/child/runtime_features.cc
|
||||
+++ b/content/child/runtime_features.cc
|
||||
@@ -41,6 +41,7 @@
|
||||
@@ -42,6 +42,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"
|
||||
@@ -91,7 +91,7 @@
|
||||
#include "ui/accessibility/accessibility_features.h"
|
||||
#include "ui/base/ui_base_features.h"
|
||||
#include "ui/events/blink/blink_features.h"
|
||||
@@ -484,6 +485,10 @@ void SetRuntimeFeaturesFromCommandLine(c
|
||||
@@ -485,6 +486,10 @@ void SetRuntimeFeaturesFromCommandLine(c
|
||||
true},
|
||||
{wrf::EnableWebAudioBypassOutputBufferingOptOut,
|
||||
blink::switches::kWebAudioBypassOutputBufferingOptOut, true},
|
||||
@@ -124,7 +124,7 @@
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
#include "base/time/time.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
@@ -1084,6 +1085,11 @@ Document::Document(const DocumentInit& i
|
||||
@@ -1089,6 +1090,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();
|
||||
@@ -1221,6 +1227,14 @@ const Position Document::PositionAdjuste
|
||||
@@ -1226,6 +1232,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
|
||||
@@ -572,6 +572,10 @@ class CORE_EXPORT Document : public Cont
|
||||
@@ -574,6 +574,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;
|
||||
@@ -2783,6 +2787,9 @@ class CORE_EXPORT Document : public Cont
|
||||
@@ -2810,6 +2814,9 @@ class CORE_EXPORT Document : public Cont
|
||||
|
||||
base::ElapsedTimer start_time_;
|
||||
|
||||
@@ -176,19 +176,17 @@
|
||||
// - ScriptSchedulingType::kInOrder
|
||||
--- a/third_party/blink/renderer/core/dom/element.cc
|
||||
+++ b/third_party/blink/renderer/core/dom/element.cc
|
||||
@@ -3133,6 +3133,11 @@ DOMRectList* Element::getClientRects() {
|
||||
DCHECK(element_layout_object);
|
||||
GetDocument().AdjustQuadsForScrollAndAbsoluteZoom(quads,
|
||||
*element_layout_object);
|
||||
+ if (RuntimeEnabledFeatures::FingerprintingClientRectsNoiseEnabled()) {
|
||||
+ for (gfx::QuadF& quad : quads) {
|
||||
@@ -3195,6 +3195,9 @@ Vector<gfx::RectF> Element::GetClientRec
|
||||
}
|
||||
Vector<gfx::RectF> result;
|
||||
for (auto& quad : quads) {
|
||||
+ if (RuntimeEnabledFeatures::FingerprintingClientRectsNoiseEnabled()) {
|
||||
+ quad.Scale(GetDocument().GetNoiseFactorX(), GetDocument().GetNoiseFactorY());
|
||||
+ }
|
||||
+ }
|
||||
return MakeGarbageCollected<DOMRectList>(quads);
|
||||
}
|
||||
|
||||
@@ -3160,6 +3165,9 @@ gfx::RectF Element::GetBoundingClientRec
|
||||
result.emplace_back(quad.BoundingBox());
|
||||
}
|
||||
return result;
|
||||
@@ -3224,6 +3227,9 @@ gfx::RectF Element::GetBoundingClientRec
|
||||
DCHECK(element_layout_object);
|
||||
GetDocument().AdjustRectForScrollAndAbsoluteZoom(result,
|
||||
*element_layout_object);
|
||||
@@ -228,9 +226,9 @@
|
||||
// TODO(editing-dev): We should make
|
||||
--- a/third_party/blink/renderer/core/html/canvas/text_metrics.cc
|
||||
+++ b/third_party/blink/renderer/core/html/canvas/text_metrics.cc
|
||||
@@ -106,6 +106,24 @@ const ShapeResult* ShapeWord(const TextR
|
||||
@@ -89,6 +89,24 @@ TextMetrics::TextMetrics(const Font* fon
|
||||
Update(font, direction, baseline, align, text, text_painter);
|
||||
}
|
||||
} // namespace
|
||||
|
||||
+void TextMetrics::Shuffle(const double factor) {
|
||||
+ // x-direction
|
||||
@@ -255,7 +253,7 @@
|
||||
const V8CanvasTextBaseline::Enum baseline,
|
||||
--- a/third_party/blink/renderer/core/html/canvas/text_metrics.h
|
||||
+++ b/third_party/blink/renderer/core/html/canvas/text_metrics.h
|
||||
@@ -111,6 +111,8 @@ class CORE_EXPORT TextMetrics final : pu
|
||||
@@ -109,6 +109,8 @@ class CORE_EXPORT TextMetrics final : pu
|
||||
float x_position_;
|
||||
};
|
||||
|
||||
@@ -266,7 +264,7 @@
|
||||
const TextDirection& direction,
|
||||
--- 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
|
||||
@@ -108,6 +108,9 @@
|
||||
@@ -107,6 +107,9 @@
|
||||
// https://github.com/include-what-you-use/include-what-you-use/issues/1122
|
||||
// IWYU pragma: no_include "base/numerics/clamped_math.h"
|
||||
|
||||
@@ -276,20 +274,14 @@
|
||||
namespace blink {
|
||||
|
||||
class MemoryManagedPaintCanvas;
|
||||
@@ -1245,13 +1248,26 @@ TextMetrics* BaseRenderingContext2D::mea
|
||||
@@ -1233,9 +1236,22 @@ TextMetrics* BaseRenderingContext2D::mea
|
||||
TextDirection direction =
|
||||
ToTextDirection(state.GetDirection(), host, computed_style);
|
||||
|
||||
- return MakeGarbageCollected<TextMetrics>(
|
||||
- font, direction, state.GetTextBaseline().AsEnum(),
|
||||
- state.GetTextAlign().AsEnum(), text,
|
||||
+ TextMetrics* text_metrics = MakeGarbageCollected<TextMetrics>(
|
||||
+ font, direction, GetState().GetTextBaseline().AsEnum(),
|
||||
+ GetState().GetTextAlign().AsEnum(), text,
|
||||
RuntimeEnabledFeatures::CanvasTextNgEnabled(
|
||||
host->GetTopExecutionContext())
|
||||
? &host->GetPlainTextPainter()
|
||||
: nullptr);
|
||||
font, direction, state.GetTextBaseline().AsEnum(),
|
||||
state.GetTextAlign().AsEnum(), text, host->GetPlainTextPainter());
|
||||
+
|
||||
+ // Scale text metrics if enabled
|
||||
+ if (RuntimeEnabledFeatures::FingerprintingCanvasMeasureTextNoiseEnabled()) {
|
||||
@@ -308,7 +300,7 @@
|
||||
String BaseRenderingContext2D::lang() const {
|
||||
--- a/third_party/blink/renderer/platform/BUILD.gn
|
||||
+++ b/third_party/blink/renderer/platform/BUILD.gn
|
||||
@@ -1813,6 +1813,7 @@ component("platform") {
|
||||
@@ -1811,6 +1811,7 @@ component("platform") {
|
||||
"//components/paint_preview/common",
|
||||
"//components/search_engines:search_engine_utils",
|
||||
"//components/translate/core/language_detection",
|
||||
@@ -343,7 +335,7 @@
|
||||
#include "third_party/skia/include/core/SkImage.h"
|
||||
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
@@ -2319,6 +2319,12 @@
|
||||
@@ -2441,6 +2441,12 @@
|
||||
status: "stable",
|
||||
},
|
||||
{
|
||||
+8
-8
@@ -34,7 +34,7 @@ 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
|
||||
@@ -3544,6 +3544,7 @@ void RenderProcessHostImpl::PropagateBro
|
||||
@@ -3701,6 +3701,7 @@ void RenderProcessHostImpl::PropagateBro
|
||||
switches::kFileUrlPathAlias,
|
||||
switches::kFingerprintingClientRectsNoise,
|
||||
switches::kFingerprintingCanvasMeasureTextNoise,
|
||||
@@ -44,7 +44,7 @@ approach to change color components.
|
||||
switches::kForceHighContrast,
|
||||
--- a/content/child/runtime_features.cc
|
||||
+++ b/content/child/runtime_features.cc
|
||||
@@ -489,6 +489,8 @@ void SetRuntimeFeaturesFromCommandLine(c
|
||||
@@ -490,6 +490,8 @@ void SetRuntimeFeaturesFromCommandLine(c
|
||||
switches::kFingerprintingClientRectsNoise, true},
|
||||
{wrf::EnableFingerprintingCanvasMeasureTextNoise,
|
||||
switches::kFingerprintingCanvasMeasureTextNoise, true},
|
||||
@@ -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
|
||||
@@ -555,6 +555,9 @@ ImageData* BaseRenderingContext2D::getIm
|
||||
@@ -557,6 +557,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
|
||||
@@ -1756,7 +1756,9 @@ component("platform") {
|
||||
@@ -1753,7 +1753,9 @@ component("platform") {
|
||||
"//third_party/blink/renderer:non_test_config",
|
||||
]
|
||||
|
||||
@@ -281,7 +281,7 @@ approach to change color components.
|
||||
} // namespace blink
|
||||
--- a/third_party/blink/renderer/platform/graphics/static_bitmap_image.h
|
||||
+++ b/third_party/blink/renderer/platform/graphics/static_bitmap_image.h
|
||||
@@ -39,6 +39,8 @@ class PLATFORM_EXPORT StaticBitmapImage
|
||||
@@ -38,6 +38,8 @@ class PLATFORM_EXPORT StaticBitmapImage
|
||||
|
||||
StaticBitmapImage(ImageOrientation orientation) : orientation_(orientation) {}
|
||||
|
||||
@@ -292,7 +292,7 @@ approach to change color components.
|
||||
// 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 @@
|
||||
@@ -13,6 +13,8 @@
|
||||
#include <stdio.h> // Needed by jpeglib.h
|
||||
|
||||
#include "jpeglib.h" // for JPEG_MAX_DIMENSION
|
||||
@@ -301,7 +301,7 @@ approach to change color components.
|
||||
#include "third_party/libwebp/src/src/webp/encode.h" // for WEBP_MAX_DIMENSION
|
||||
|
||||
namespace blink {
|
||||
@@ -43,6 +45,10 @@ bool ImageEncoder::Encode(Vector<unsigne
|
||||
@@ -44,6 +46,10 @@ bool ImageEncoder::Encode(Vector<unsigne
|
||||
const SkPixmap& src,
|
||||
ImageEncodingMimeType mime_type,
|
||||
double quality) {
|
||||
@@ -314,7 +314,7 @@ approach to change color components.
|
||||
SkJpegEncoder::Options options;
|
||||
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
@@ -2325,6 +2325,9 @@
|
||||
@@ -2447,6 +2447,9 @@
|
||||
name: "FingerprintingCanvasMeasureTextNoise",
|
||||
},
|
||||
{
|
||||
+9
-21
@@ -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
|
||||
@@ -2276,6 +2276,7 @@ static_library("browser") {
|
||||
@@ -2269,6 +2269,7 @@ static_library("browser") {
|
||||
"//components/net_log",
|
||||
"//components/network_hints/common:mojo_bindings",
|
||||
"//components/network_session_configurator/browser",
|
||||
@@ -81,7 +81,7 @@ with limited CPU/memory resources and it is disabled by default.
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "services/network/public/cpp/features.h"
|
||||
#include "services/network/public/cpp/network_switches.h"
|
||||
@@ -417,6 +421,18 @@ void BrowserProcessImpl::Init() {
|
||||
@@ -432,6 +436,18 @@ void BrowserProcessImpl::Init() {
|
||||
pref_change_registrar_.Add(metrics::prefs::kMetricsReportingEnabled,
|
||||
base::BindRepeating(&ApplyMetricsReportingPolicy));
|
||||
|
||||
@@ -100,31 +100,19 @@ with limited CPU/memory resources and it is disabled by default.
|
||||
DCHECK(!webrtc_event_log_manager_);
|
||||
webrtc_event_log_manager_ = WebRtcEventLogManager::CreateSingletonInstance();
|
||||
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -2654,6 +2654,10 @@ const char kLogJsConsoleMessagesDescript
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -2753,6 +2753,10 @@ inline constexpr char kLogJsConsoleMessa
|
||||
"Enable logging JS console messages in system logs, please note that they "
|
||||
"may contain PII.";
|
||||
|
||||
+const char kMaxConnectionsPerHostName[] = "Maximum connections per host";
|
||||
+const char kMaxConnectionsPerHostDescription[] =
|
||||
+inline constexpr char kMaxConnectionsPerHostName[] = "Maximum connections per host";
|
||||
+inline constexpr char kMaxConnectionsPerHostDescription[] =
|
||||
+ "Customize maximum allowed connections per host. ungoogled-chromium flag, Bromite feature.";
|
||||
+
|
||||
const char kMediaRouterCastAllowAllIPsName[] =
|
||||
inline constexpr char kMediaRouterCastAllowAllIPsName[] =
|
||||
"Connect to Cast devices on all IP addresses";
|
||||
const char kMediaRouterCastAllowAllIPsDescription[] =
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -1555,6 +1555,9 @@ extern const char kLockTopControlsOnLarg
|
||||
extern const char kLogJsConsoleMessagesName[];
|
||||
extern const char kLogJsConsoleMessagesDescription[];
|
||||
|
||||
+extern const char kMaxConnectionsPerHostName[];
|
||||
+extern const char kMaxConnectionsPerHostDescription[];
|
||||
+
|
||||
extern const char kMediaRouterCastAllowAllIPsName[];
|
||||
extern const char kMediaRouterCastAllowAllIPsDescription[];
|
||||
|
||||
inline constexpr char kMediaRouterCastAllowAllIPsDescription[] =
|
||||
--- a/components/network_session_configurator/common/network_features.cc
|
||||
+++ b/components/network_session_configurator/common/network_features.cc
|
||||
@@ -8,4 +8,7 @@
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
From c89ce946e5328ca8a7df923d421e904bb6bfe9b6 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: Tue, 7 Jul 2015 18:28:46 +0200
|
||||
Subject: [PATCH 63/76] safe_browsing: disable reporting of safebrowsing
|
||||
override
|
||||
|
||||
Disables reporting of the safebrowsing override, i.e. the report sent
|
||||
if a user decides to visit a page that was flagged as "insecure".
|
||||
This prevents trk:148 (phishing) and trk:149 (malware).
|
||||
---
|
||||
components/safe_browsing/content/browser/client_side_detection_service.cc | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
--- a/components/safe_browsing/content/browser/client_side_detection_service.cc
|
||||
+++ b/components/safe_browsing/content/browser/client_side_detection_service.cc
|
||||
@@ -281,6 +281,10 @@ void ClientSideDetectionService::StartCl
|
||||
return;
|
||||
}
|
||||
|
||||
+#if 1
|
||||
+ if (!callback.is_null())
|
||||
+ callback.Run(GURL(request->url()), false);
|
||||
+#else
|
||||
std::string request_data;
|
||||
request->SerializeToString(&request_data);
|
||||
|
||||
@@ -362,6 +366,7 @@ void ClientSideDetectionService::StartCl
|
||||
base::BindOnce(&WebUIInfoSingleton::AddToClientPhishingRequestsSent,
|
||||
base::Unretained(WebUIInfoSingleton::GetInstance()),
|
||||
std::move(request), access_token));
|
||||
+#endif
|
||||
}
|
||||
|
||||
void ClientSideDetectionService::HandlePhishingVerdict(
|
||||
+1
-1
@@ -3,7 +3,7 @@ author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/chrome/browser/ui/startup/infobar_utils.cc
|
||||
+++ b/chrome/browser/ui/startup/infobar_utils.cc
|
||||
@@ -178,10 +178,6 @@ void AddInfoBarsIfNecessary(Browser* bro
|
||||
@@ -188,10 +188,6 @@ void AddInfoBarsIfNecessary(BrowserWindo
|
||||
infobars::ContentInfoBarManager* infobar_manager =
|
||||
infobars::ContentInfoBarManager::FromWebContents(web_contents);
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
--- a/sandbox/linux/BUILD.gn
|
||||
+++ b/sandbox/linux/BUILD.gn
|
||||
@@ -299,6 +299,14 @@ if (is_linux || is_chromeos) {
|
||||
"suid/process_util_linux.c",
|
||||
"suid/sandbox.c",
|
||||
]
|
||||
+
|
||||
+ cflags = [
|
||||
+ "-fPIE",
|
||||
+ ]
|
||||
+
|
||||
+ ldflags = [
|
||||
+ "-pie",
|
||||
+ ]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
From d32e222a2706cb59f9855b9cf4330f88d1af5435 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: Thu, 2 Apr 2015 12:44:23 +0200
|
||||
Subject: [PATCH 41/66] Remove EV certificates
|
||||
|
||||
The team chose to let EV certificates appear just like normal
|
||||
certificates. The web of trust is considered a failure in itself, so
|
||||
do not give users a false sense of extra security with EV certs.
|
||||
Instead, let them appear just like regular ones.
|
||||
|
||||
--- a/net/cert/ev_root_ca_metadata.cc
|
||||
+++ b/net/cert/ev_root_ca_metadata.cc
|
||||
@@ -36,7 +36,17 @@ struct EVMetadata {
|
||||
const std::string_view policy_oids[kMaxOIDsPerCA];
|
||||
};
|
||||
|
||||
-#include "net/data/ssl/chrome_root_store/chrome-ev-roots-inc.cc"
|
||||
+static const EVMetadata kEvRootCaMetadata[] = {
|
||||
+ // need some dummy thing to make compiler happy, because
|
||||
+ // arraysize() is implemented as a convoluted template rather than
|
||||
+ // the traditional sizeof(x)/sizeof(*x)
|
||||
+ { { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } },
|
||||
+ {
|
||||
+ "0",
|
||||
+ }
|
||||
+ }
|
||||
+};
|
||||
|
||||
#endif // defined(PLATFORM_USES_CHROMIUM_EV_METADATA)
|
||||
} // namespace
|
||||
@@ -1,21 +0,0 @@
|
||||
From d3dcad96b3c2091026c3a81054bb3ce56538a702 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: Thu, 29 Jan 2015 10:46:40 +0100
|
||||
Subject: [PATCH 16/66] mime_util: force text/x-suse-ymp to be downloaded
|
||||
|
||||
YMP files (YaST One Click Install) are plaintext XML, but also not
|
||||
very interesting in themselves. Force them to be stored.
|
||||
---
|
||||
components/mime_util/mime_util.cc | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/third_party/blink/common/mime_util/mime_util.cc
|
||||
+++ b/third_party/blink/common/mime_util/mime_util.cc
|
||||
@@ -88,6 +88,7 @@ constexpr auto kUnsupportedTextTypes =
|
||||
"text/x-csv",
|
||||
"text/x-vcf",
|
||||
"text/rtf",
|
||||
+ "text/x-suse-ymp",
|
||||
"text/comma-separated-values",
|
||||
"text/csv",
|
||||
"text/tab-separated-values",
|
||||
@@ -1,22 +0,0 @@
|
||||
# Disables omission of URL elements in Omnibox and status bubble
|
||||
|
||||
--- a/chrome/browser/ui/status_bubble.h
|
||||
+++ b/chrome/browser/ui/status_bubble.h
|
||||
@@ -17,7 +17,7 @@ class GURL;
|
||||
class StatusBubble {
|
||||
public:
|
||||
// On hover, expand status bubble to fit long URL after this delay.
|
||||
- static const int kExpandHoverDelayMS = 1600;
|
||||
+ static const int kExpandHoverDelayMS = 0;
|
||||
|
||||
virtual ~StatusBubble() = default;
|
||||
|
||||
--- a/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc
|
||||
+++ b/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.cc
|
||||
@@ -268,5 +268,5 @@ TemplateURLService* ChromeLocationBarMod
|
||||
// static
|
||||
void ChromeLocationBarModelDelegate::RegisterProfilePrefs(
|
||||
user_prefs::PrefRegistrySyncable* registry) {
|
||||
- registry->RegisterBooleanPref(omnibox::kPreventUrlElisionsInOmnibox, false);
|
||||
+ registry->RegisterBooleanPref(omnibox::kPreventUrlElisionsInOmnibox, true);
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
--- a/chrome/browser/ui/views/frame/tab_strip_region_view.cc
|
||||
+++ b/chrome/browser/ui/views/frame/tab_strip_region_view.cc
|
||||
@@ -304,12 +304,10 @@ TabStripRegionView::TabStripRegionView(s
|
||||
new_tab_button_->GetViewAccessibility().SetName(
|
||||
l10n_util::GetStringUTF16(IDS_ACCNAME_NEWTAB));
|
||||
|
||||
-#if BUILDFLAG(IS_LINUX)
|
||||
// The New Tab Button can be middle-clicked on Linux.
|
||||
new_tab_button_->SetTriggerableEventFlags(
|
||||
new_tab_button_->GetTriggerableEventFlags() |
|
||||
ui::EF_MIDDLE_MOUSE_BUTTON);
|
||||
-#endif
|
||||
}
|
||||
|
||||
reserved_grab_handle_space_ =
|
||||
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
|
||||
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
|
||||
@@ -2269,8 +2269,6 @@ void TabStrip::NewTabButtonPressed(const
|
||||
|
||||
const ui::MouseEvent& mouse = static_cast<const ui::MouseEvent&>(event);
|
||||
if (mouse.IsOnlyMiddleMouseButton()) {
|
||||
- if (ui::Clipboard::IsSupportedClipboardBuffer(
|
||||
- ui::ClipboardBuffer::kSelection)) {
|
||||
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
|
||||
CHECK(clipboard)
|
||||
<< "Clipboard instance is not available, cannot proceed with "
|
||||
@@ -2281,7 +2279,6 @@ void TabStrip::NewTabButtonPressed(const
|
||||
if (!clipboard_text.empty()) {
|
||||
controller_->CreateNewTabWithLocation(clipboard_text);
|
||||
}
|
||||
- }
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
--- a/components/webui/flags/flags_state.cc
|
||||
+++ b/components/webui/flags/flags_state.cc
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/values.h"
|
||||
#include "build/build_config.h"
|
||||
+#include "chrome/browser/unexpire_flags.h"
|
||||
#include "components/variations/field_trial_config/field_trial_util.h"
|
||||
#include "components/variations/variations_associated_data.h"
|
||||
#include "components/variations/variations_switches.h"
|
||||
@@ -686,14 +687,19 @@ void FlagsState::GetFlagFeatureEntries(
|
||||
int current_platform = GetCurrentPlatform();
|
||||
|
||||
for (const FeatureEntry& entry : feature_entries_) {
|
||||
+ std::string desc = entry.visible_description;
|
||||
if (skip_feature_entry.Run(entry)) {
|
||||
+ if (flags::IsFlagExpired(flags_storage, entry.internal_name)) {
|
||||
+ desc.insert(0, "!!! NOTE: THIS FLAG IS EXPIRED AND MAY STOP FUNCTIONING OR BE REMOVED SOON !!! ");
|
||||
+ } else {
|
||||
continue;
|
||||
+ }
|
||||
}
|
||||
|
||||
base::Value::Dict data;
|
||||
data.Set("internal_name", entry.internal_name);
|
||||
data.Set("name", entry.visible_name);
|
||||
- data.Set("description", entry.visible_description);
|
||||
+ data.Set("description", desc);
|
||||
|
||||
base::Value::List supported_platforms;
|
||||
AddOsStrings(entry.supported_platforms, &supported_platforms);
|
||||
@@ -1102,7 +1108,9 @@ bool FlagsState::IsSupportedFeature(cons
|
||||
continue;
|
||||
}
|
||||
if (delegate_ && delegate_->ShouldExcludeFlag(storage, entry)) {
|
||||
+ if (!flags::IsFlagExpired(storage, entry.internal_name)) {
|
||||
continue;
|
||||
+ }
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
namespace errors = extensions::manifest_errors;
|
||||
namespace keys = extensions::manifest_keys;
|
||||
@@ -113,6 +118,19 @@ std::optional<base::Value::Dict> LoadMes
|
||||
@@ -114,6 +119,19 @@ std::optional<base::Value::Dict> LoadMes
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
// Localizes manifest value of string type for a given key.
|
||||
bool LocalizeManifestValue(const std::string& key,
|
||||
const extensions::MessageBundle& messages,
|
||||
@@ -360,13 +378,16 @@ bool LocalizeManifest(const extensions::
|
||||
@@ -361,13 +379,16 @@ bool LocalizeManifest(const extensions::
|
||||
bool LocalizeExtension(const base::FilePath& extension_path,
|
||||
base::Value::Dict* manifest,
|
||||
GzippedMessagesPermission gzip_permission,
|
||||
@@ -90,7 +90,7 @@
|
||||
gzip_permission, error));
|
||||
|
||||
if (!message_bundle && !error->empty())
|
||||
@@ -504,6 +525,42 @@ extensions::MessageBundle* LoadMessageCa
|
||||
@@ -505,6 +526,42 @@ extensions::MessageBundle* LoadMessageCa
|
||||
return extensions::MessageBundle::Create(catalogs, error);
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
base::FilePath GetComputedHashesPath(const base::FilePath& extension_path);
|
||||
--- a/extensions/common/file_util.cc
|
||||
+++ b/extensions/common/file_util.cc
|
||||
@@ -593,6 +593,25 @@ MessageBundle* LoadMessageBundle(
|
||||
@@ -597,6 +597,25 @@ MessageBundle* LoadMessageBundle(
|
||||
return message_bundle;
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
.Append(kVerifiedContentsFilename);
|
||||
--- a/extensions/browser/renderer_startup_helper.cc
|
||||
+++ b/extensions/browser/renderer_startup_helper.cc
|
||||
@@ -608,6 +608,18 @@ void RendererStartupHelper::GetMessageBu
|
||||
@@ -688,6 +688,18 @@ void RendererStartupHelper::GetMessageBu
|
||||
paths_to_load.push_back(imported_extension->path());
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
--- a/chrome/browser/extensions/api/storage/managed_value_store_cache.cc
|
||||
+++ b/chrome/browser/extensions/api/storage/managed_value_store_cache.cc
|
||||
@@ -97,9 +97,11 @@ class ManagedValueStoreCache::ExtensionT
|
||||
|
||||
// Loads the schemas of the |extensions| and passes a ComponentMap to
|
||||
// Register().
|
||||
+ void LoadSchemasOnUIThread(ExtensionSet extensions);
|
||||
static void LoadSchemasOnFileTaskRunner(ExtensionSet extensions,
|
||||
base::WeakPtr<ExtensionTracker> self);
|
||||
- void Register(const policy::ComponentMap* components);
|
||||
+ void Register(const policy::ComponentMap* components,
|
||||
+ ExtensionSet extensions);
|
||||
|
||||
raw_ptr<Profile> profile_;
|
||||
policy::PolicyDomain policy_domain_;
|
||||
@@ -178,6 +180,22 @@ bool ManagedValueStoreCache::ExtensionTr
|
||||
return extension->manifest()->FindPath(manifest_keys::kStorageManagedSchema);
|
||||
}
|
||||
|
||||
+void ManagedValueStoreCache::ExtensionTracker::LoadSchemasOnUIThread(ExtensionSet extensions) {
|
||||
+ auto components = std::make_unique<policy::ComponentMap>();
|
||||
+
|
||||
+ for (const auto& extension : extensions) {
|
||||
+ if (!Manifest::IsComponentLocation(extension->location())) {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ (*components)[extension->id()] =
|
||||
+ StorageSchemaManifestHandler::GetComponentSchema(extension.get())
|
||||
+ .value_or(policy::Schema());
|
||||
+ }
|
||||
+
|
||||
+ schema_registry_->RegisterComponents(policy_domain_, *components);
|
||||
+}
|
||||
+
|
||||
// static
|
||||
void ManagedValueStoreCache::ExtensionTracker::LoadSchemasOnFileTaskRunner(
|
||||
ExtensionSet extensions,
|
||||
@@ -202,14 +220,21 @@ void ManagedValueStoreCache::ExtensionTr
|
||||
|
||||
content::GetUIThreadTaskRunner({})->PostTask(
|
||||
FROM_HERE, base::BindOnce(&ExtensionTracker::Register, self,
|
||||
- base::Owned(components.release())));
|
||||
+ base::Owned(components.release()),
|
||||
+ std::move(extensions)));
|
||||
}
|
||||
|
||||
void ManagedValueStoreCache::ExtensionTracker::Register(
|
||||
- const policy::ComponentMap* components) {
|
||||
+ const policy::ComponentMap* components,
|
||||
+ ExtensionSet extensions) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
schema_registry_->RegisterComponents(policy_domain_, *components);
|
||||
|
||||
+ // Our uBlock Origin component has a policy schema, but is
|
||||
+ // not anywhere on the actual filesystem - so we need to pull
|
||||
+ // it out on the UI thread from resources.
|
||||
+ LoadSchemasOnUIThread(std::move(extensions));
|
||||
+
|
||||
// The first SetExtensionsDomainsReady() call is performed after the
|
||||
// ExtensionSystem is ready, even if there are no managed extensions. It will
|
||||
// trigger a loading of the initial policy for any managed extensions, and
|
||||
--- a/chrome/common/extensions/api/storage/storage_schema_manifest_handler.cc
|
||||
+++ b/chrome/common/extensions/api/storage/storage_schema_manifest_handler.cc
|
||||
@@ -15,6 +15,8 @@
|
||||
#include "base/types/expected.h"
|
||||
#include "base/types/expected_macros.h"
|
||||
#include "components/policy/core/common/schema.h"
|
||||
+#include "extensions/browser/extensions_browser_client.h"
|
||||
+#include "extensions/browser/component_extension_resource_manager.h"
|
||||
#include "extensions/common/extension.h"
|
||||
#include "extensions/common/install_warning.h"
|
||||
#include "extensions/common/manifest.h"
|
||||
@@ -23,6 +25,7 @@
|
||||
#include "extensions/common/permissions/api_permission.h"
|
||||
#include "extensions/common/permissions/api_permission_set.h"
|
||||
#include "extensions/common/permissions/permissions_info.h"
|
||||
+#include "ui/base/resource/resource_bundle.h"
|
||||
|
||||
using extensions::manifest_keys::kStorageManagedSchema;
|
||||
|
||||
@@ -34,6 +37,33 @@ StorageSchemaManifestHandler::~StorageSc
|
||||
|
||||
// static
|
||||
base::expected<policy::Schema, std::string>
|
||||
+StorageSchemaManifestHandler::GetComponentSchema(const Extension* extension) {
|
||||
+ auto* manager =
|
||||
+ extensions::ExtensionsBrowserClient::Get()->GetComponentExtensionResourceManager();
|
||||
+ const ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
|
||||
+
|
||||
+ int resource_id;
|
||||
+ std::string path;
|
||||
+ if (const std::string* temp =
|
||||
+ extension->manifest()->FindStringPath(kStorageManagedSchema)) {
|
||||
+ path = *temp;
|
||||
+ } else {
|
||||
+ return base::unexpected(base::StringPrintf(
|
||||
+ "%s does not have a schema path", extension->id()));
|
||||
+ }
|
||||
+
|
||||
+ if (!manager->IsComponentExtensionResource(
|
||||
+ extension->path(), base::FilePath::FromUTF8Unsafe(path), &resource_id)) {
|
||||
+ return base::unexpected(base::StringPrintf(
|
||||
+ "%s/%s is not a component extension resource",
|
||||
+ base::UTF16ToUTF8(extension->path().LossyDisplayName()), path));
|
||||
+ }
|
||||
+
|
||||
+ return policy::Schema::Parse(rb.LoadDataResourceString(resource_id));
|
||||
+}
|
||||
+
|
||||
+// static
|
||||
+base::expected<policy::Schema, std::string>
|
||||
StorageSchemaManifestHandler::GetSchema(const Extension* extension) {
|
||||
std::string path;
|
||||
if (const std::string* temp =
|
||||
--- a/chrome/common/extensions/api/storage/storage_schema_manifest_handler.h
|
||||
+++ b/chrome/common/extensions/api/storage/storage_schema_manifest_handler.h
|
||||
@@ -29,6 +29,8 @@ class StorageSchemaManifestHandler : pub
|
||||
// If the schema is invalid then the Schema returned is invalid too, and
|
||||
// the failure reason is stored in |error|.
|
||||
// This function does file I/O and must be called on a thread that allows I/O.
|
||||
+ static base::expected<policy::Schema, std::string> GetComponentSchema(
|
||||
+ const Extension* extension);
|
||||
static base::expected<policy::Schema, std::string> GetSchema(
|
||||
const Extension* extension);
|
||||
|
||||
--- a/chrome/common/extensions/BUILD.gn
|
||||
+++ b/chrome/common/extensions/BUILD.gn
|
||||
@@ -82,6 +82,7 @@ source_set("extensions") {
|
||||
"//components/url_formatter",
|
||||
"//components/version_info",
|
||||
"//extensions:extensions_resources",
|
||||
+ "//extensions/browser",
|
||||
"//extensions/common",
|
||||
"//extensions/common:common_constants",
|
||||
"//extensions/common:core_api_provider",
|
||||
@@ -89,6 +90,7 @@ source_set("extensions") {
|
||||
"//extensions/strings",
|
||||
"//ui/gfx/geometry",
|
||||
"//ui/message_center/public/cpp",
|
||||
+ "//ui/base",
|
||||
"//url",
|
||||
]
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
--- a/chrome/common/pref_names.h
|
||||
+++ b/chrome/common/pref_names.h
|
||||
@@ -1407,6 +1407,11 @@ inline constexpr char kExtensionCommands
|
||||
inline constexpr char kPluginsAlwaysOpenPdfExternally[] =
|
||||
"plugins.always_open_pdf_externally";
|
||||
|
||||
+// Boolean indicating that the user has rejected setting
|
||||
+// the browser as default for an indefinite amount of time.
|
||||
+inline constexpr char kHeliumDefaultBrowserRejected[] =
|
||||
+ "helium.browser.default_browser_infobar_rejected";
|
||||
+
|
||||
// Int64 containing the internal value of the time at which the default browser
|
||||
// infobar was last dismissed by the user.
|
||||
inline constexpr char kDefaultBrowserLastDeclined[] =
|
||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
@@ -80,6 +80,8 @@ void RegisterBrowserPrefs(PrefRegistrySi
|
||||
registry->RegisterIntegerPref(prefs::kDefaultBrowserDeclinedCount, 0);
|
||||
registry->RegisterTimePref(prefs::kDefaultBrowserFirstShownTime,
|
||||
base::Time());
|
||||
+ registry->RegisterBooleanPref(prefs::kHeliumDefaultBrowserRejected, false);
|
||||
+
|
||||
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
|
||||
registry->RegisterTimePref(prefs::kPdfInfoBarLastShown, base::Time());
|
||||
registry->RegisterIntegerPref(prefs::kPdfInfoBarTimesShown, 0);
|
||||
--- a/chrome/browser/ui/startup/infobar_utils.cc
|
||||
+++ b/chrome/browser/ui/startup/infobar_utils.cc
|
||||
@@ -211,6 +211,11 @@ void AddInfoBarsIfNecessary(BrowserWindo
|
||||
return;
|
||||
}
|
||||
|
||||
+ PrefService* local_state = g_browser_process->local_state();
|
||||
+ if (local_state && local_state->GetBoolean(prefs::kHeliumDefaultBrowserRejected)) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
base::OnceCallback<void(bool)> default_browser_prompt_shown_callback =
|
||||
base::DoNothing();
|
||||
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
|
||||
--- a/components/infobars/core/confirm_infobar_delegate.h
|
||||
+++ b/components/infobars/core/confirm_infobar_delegate.h
|
||||
@@ -84,6 +84,8 @@ class ConfirmInfoBarDelegate : public in
|
||||
// on the infobar.
|
||||
virtual int GetLinkSpacingWhenPositionedBeforeButton() const;
|
||||
|
||||
+ virtual bool OkButtonShouldAlwaysLead() const;
|
||||
+
|
||||
#if BUILDFLAG(IS_IOS)
|
||||
// Returns whether or not a tint should be applied to the icon background.
|
||||
// Defaults to true.
|
||||
--- a/components/infobars/core/confirm_infobar_delegate.cc
|
||||
+++ b/components/infobars/core/confirm_infobar_delegate.cc
|
||||
@@ -71,6 +71,10 @@ int ConfirmInfoBarDelegate::GetLinkSpaci
|
||||
return 0;
|
||||
}
|
||||
|
||||
+bool ConfirmInfoBarDelegate::OkButtonShouldAlwaysLead() const {
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
#if BUILDFLAG(IS_IOS)
|
||||
bool ConfirmInfoBarDelegate::UseIconBackgroundTint() const {
|
||||
return true;
|
||||
--- a/chrome/browser/ui/startup/default_browser_prompt/default_browser_infobar_delegate.cc
|
||||
+++ b/chrome/browser/ui/startup/default_browser_prompt/default_browser_infobar_delegate.cc
|
||||
@@ -112,13 +112,15 @@ std::u16string DefaultBrowserInfoBarDele
|
||||
}
|
||||
|
||||
int DefaultBrowserInfoBarDelegate::GetButtons() const {
|
||||
- return BUTTON_OK;
|
||||
+ return BUTTON_OK | BUTTON_CANCEL;
|
||||
}
|
||||
|
||||
std::u16string DefaultBrowserInfoBarDelegate::GetButtonLabel(
|
||||
InfoBarButton button) const {
|
||||
- DCHECK_EQ(BUTTON_OK, button);
|
||||
- return l10n_util::GetStringUTF16(IDS_DEFAULT_BROWSER_INFOBAR_OK_BUTTON_LABEL);
|
||||
+ DCHECK(button == BUTTON_OK || button == BUTTON_CANCEL);
|
||||
+ return l10n_util::GetStringUTF16(
|
||||
+ button == BUTTON_OK ? IDS_DEFAULT_BROWSER_INFOBAR_OK_BUTTON_LABEL
|
||||
+ : IDS_CARET_BROWSING_DO_NOT_ASK);
|
||||
}
|
||||
|
||||
bool DefaultBrowserInfoBarDelegate::Accept() {
|
||||
@@ -156,6 +158,22 @@ bool DefaultBrowserInfoBarDelegate::Acce
|
||||
return ConfirmInfoBarDelegate::Accept();
|
||||
}
|
||||
|
||||
+bool DefaultBrowserInfoBarDelegate::Cancel() {
|
||||
+ PrefService* local_state = g_browser_process->local_state();
|
||||
+ if (!local_state) {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ local_state->SetBoolean(prefs::kHeliumDefaultBrowserRejected, true);
|
||||
+ ConfirmInfoBarDelegate::InfoBarDismissed();
|
||||
+
|
||||
+ return ConfirmInfoBarDelegate::Cancel();
|
||||
+}
|
||||
+
|
||||
bool DefaultBrowserInfoBarDelegate::ShouldHideInFullscreen() const {
|
||||
return true;
|
||||
}
|
||||
+
|
||||
+bool DefaultBrowserInfoBarDelegate::OkButtonShouldAlwaysLead() const {
|
||||
+ return true;
|
||||
+}
|
||||
--- a/chrome/browser/ui/startup/default_browser_prompt/default_browser_infobar_delegate.h
|
||||
+++ b/chrome/browser/ui/startup/default_browser_prompt/default_browser_infobar_delegate.h
|
||||
@@ -61,7 +61,9 @@ class DefaultBrowserInfoBarDelegate : pu
|
||||
int GetButtons() const override;
|
||||
std::u16string GetButtonLabel(InfoBarButton button) const override;
|
||||
bool Accept() override;
|
||||
+ bool Cancel() override;
|
||||
bool ShouldHideInFullscreen() const override;
|
||||
+ bool OkButtonShouldAlwaysLead() const override;
|
||||
|
||||
// The WebContents's corresponding profile.
|
||||
raw_ptr<Profile> profile_;
|
||||
--- a/chrome/browser/ui/views/infobars/confirm_infobar.cc
|
||||
+++ b/chrome/browser/ui/views/infobars/confirm_infobar.cc
|
||||
@@ -137,7 +137,9 @@ void ConfirmInfoBar::Layout(PassKey) {
|
||||
}
|
||||
|
||||
if constexpr (!views::PlatformStyle::kIsOkButtonLeading) {
|
||||
- std::ranges::reverse(order_of_buttons);
|
||||
+ if (!GetDelegate()->OkButtonShouldAlwaysLead()) {
|
||||
+ std::ranges::reverse(order_of_buttons);
|
||||
+ }
|
||||
}
|
||||
|
||||
for (views::MdTextButton* button : order_of_buttons) {
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "base/containers/to_vector.h"
|
||||
#include "base/feature_list.h"
|
||||
#include "base/functional/bind.h"
|
||||
@@ -249,6 +250,10 @@ network::mojom::SSLConfigPtr SSLConfigSe
|
||||
@@ -265,6 +266,10 @@ network::mojom::SSLConfigPtr SSLConfigSe
|
||||
|
||||
config->ech_enabled = ech_enabled_.GetValue();
|
||||
|
||||
|
||||
@@ -160,3 +160,25 @@
|
||||
#copy-to-clipboard,
|
||||
#copy-variations-to-clipboard {
|
||||
background-color: var(--background-color);
|
||||
--- a/chrome/app/chrome_main_delegate.cc
|
||||
+++ b/chrome/app/chrome_main_delegate.cc
|
||||
@@ -367,15 +367,15 @@ bool HandleCreditsSwitch(const base::Com
|
||||
bool HandleVersionSwitches(const base::CommandLine& command_line) {
|
||||
#if !BUILDFLAG(IS_MAC)
|
||||
if (command_line.HasSwitch(switches::kProductVersion)) {
|
||||
- printf("%s\n", version_info::GetVersionNumber().data());
|
||||
+ printf("%s\n", version_info::GetHeliumVersionNumber().data());
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (command_line.HasSwitch(switches::kVersion)) {
|
||||
- printf("%s %s %s\n", version_info::GetProductName().data(),
|
||||
- version_info::GetVersionNumber().data(),
|
||||
- chrome::GetChannelName(chrome::WithExtendedStable(true)).c_str());
|
||||
+ printf("%s %s (Chromium %s)\n", version_info::GetProductName().data(),
|
||||
+ version_info::GetHeliumVersionNumber().data(),
|
||||
+ version_info::GetVersionNumber().data());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
--- a/third_party/search_engines_data/resources/definitions/regional_settings.json
|
||||
+++ b/third_party/search_engines_data/resources/definitions/regional_settings.json
|
||||
@@ -10,7 +10,8 @@
|
||||
"&ecosia",
|
||||
"&bing",
|
||||
"&break_stuff_google",
|
||||
- "&qwant"
|
||||
+ "&qwant",
|
||||
+ "&kagi"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -0,0 +1,64 @@
|
||||
--- a/chrome/browser/helium_flag_choices.h
|
||||
+++ b/chrome/browser/helium_flag_choices.h
|
||||
@@ -29,6 +29,7 @@ namespace helium {
|
||||
constexpr const char kDisableEchCommandLine[] = "disable-ech";
|
||||
constexpr const char kCanvasNoiseCommandLine[] = "fingerprinting-canvas-noise";
|
||||
constexpr const char kAudioContextJitterCommandLine[] = "fingerprinting-audio-context-jitter";
|
||||
+ constexpr const char kMiddleClickAutoscrollCommandLine[] = "middle-click-autoscroll";
|
||||
|
||||
} // namespace helium
|
||||
|
||||
--- a/chrome/browser/helium_flag_entries.h
|
||||
+++ b/chrome/browser/helium_flag_entries.h
|
||||
@@ -24,4 +24,8 @@
|
||||
"Audio Context fingerprint deception",
|
||||
"Adds small random jitter (±0.01%) to audio data to prevent fingerprinting. Helium flag.",
|
||||
kOsAll, FEATURE_VALUE_TYPE(blink::features::kAudioContextJitter)},
|
||||
+ {helium::kMiddleClickAutoscrollCommandLine,
|
||||
+ "Middle Click Autoscroll",
|
||||
+ "Enables autoscroll on middle click. Helium flag, Chromium feature.",
|
||||
+ kOsDesktop, FEATURE_VALUE_TYPE(blink::features::kHeliumMiddleClickAutoscroll)},
|
||||
#endif /* CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_ */
|
||||
--- a/third_party/blink/public/common/features.h
|
||||
+++ b/third_party/blink/public/common/features.h
|
||||
@@ -23,6 +23,7 @@ namespace blink {
|
||||
namespace features {
|
||||
|
||||
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kAudioContextJitter);
|
||||
+BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kHeliumMiddleClickAutoscroll);
|
||||
|
||||
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kDisableLinkDrag);
|
||||
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kReducedSystemInfo);
|
||||
--- a/third_party/blink/common/features.cc
|
||||
+++ b/third_party/blink/common/features.cc
|
||||
@@ -24,6 +24,15 @@ BASE_FEATURE(kAudioContextJitter,
|
||||
"AudioContextJitter",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
+BASE_FEATURE(kHeliumMiddleClickAutoscroll,
|
||||
+ "HeliumMiddleClickAutoscroll",
|
||||
+#if BUILDFLAG(IS_WIN)
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT
|
||||
+#else
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT
|
||||
+#endif
|
||||
+);
|
||||
+
|
||||
BASE_FEATURE(kDisableLinkDrag, "DisableLinkDrag", base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
BASE_FEATURE(kReducedSystemInfo, "ReducedSystemInfo", base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
BASE_FEATURE(kRemoveClientHints, "RemoveClientHints", base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -1903,9 +1903,9 @@ void WebView::ApplyWebPreferences(const
|
||||
prefs.default_maximum_page_scale_factor);
|
||||
#endif
|
||||
|
||||
-#if BUILDFLAG(IS_WIN)
|
||||
- RuntimeEnabledFeatures::SetMiddleClickAutoscrollEnabled(true);
|
||||
-#endif
|
||||
+ RuntimeEnabledFeatures::SetMiddleClickAutoscrollEnabled(
|
||||
+ base::FeatureList::IsEnabled(features::kHeliumMiddleClickAutoscroll)
|
||||
+ );
|
||||
|
||||
RuntimeEnabledFeatures::SetTranslateServiceEnabled(
|
||||
prefs.translate_service_available);
|
||||
@@ -111,7 +111,7 @@
|
||||
#include "url/gurl.h"
|
||||
#include "url/origin.h"
|
||||
#include "url/third_party/mozilla/url_parse.h"
|
||||
@@ -582,6 +587,7 @@ class TemplateURLService::PreLoadingProv
|
||||
@@ -581,6 +586,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,
|
||||
@@ -594,6 +600,8 @@ TemplateURLService::TemplateURLService(
|
||||
@@ -593,6 +599,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>()),
|
||||
@@ -610,11 +618,13 @@ TemplateURLService::TemplateURLService(
|
||||
@@ -609,11 +617,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>(),
|
||||
@@ -695,6 +705,10 @@ bool TemplateURLService::ShowInActivesLi
|
||||
@@ -694,6 +704,10 @@ bool TemplateURLService::ShowInActivesLi
|
||||
}
|
||||
|
||||
bool TemplateURLService::HiddenFromLists(const TemplateURL* t_url) const {
|
||||
@@ -153,7 +153,7 @@
|
||||
switch (t_url->policy_origin()) {
|
||||
case TemplateURLData::PolicyOrigin::kDefaultSearchProvider:
|
||||
return false;
|
||||
@@ -1524,11 +1538,37 @@ void TemplateURLService::Load() {
|
||||
@@ -1527,11 +1541,37 @@ void TemplateURLService::Load() {
|
||||
|
||||
if (web_data_service_) {
|
||||
load_handle_ = web_data_service_->GetKeywords(this);
|
||||
@@ -170,7 +170,7 @@
|
||||
+}
|
||||
+
|
||||
+void TemplateURLService::BangsLoadedCallback() {
|
||||
+ LOG(INFO) << "BangsLoadedCallback() called";
|
||||
+ VLOG(2) << "BangsLoadedCallback() called";
|
||||
+
|
||||
+ for (const auto& bang : bang_manager_->GetBangs()) {
|
||||
+ auto template_data = TemplateURLDataFromBang(bang);
|
||||
@@ -191,7 +191,7 @@
|
||||
base::CallbackListSubscription TemplateURLService::RegisterOnLoadedCallback(
|
||||
base::OnceClosure callback) {
|
||||
return loaded_ ? base::CallbackListSubscription()
|
||||
@@ -2512,6 +2552,13 @@ void TemplateURLService::Init() {
|
||||
@@ -2515,6 +2555,13 @@ void TemplateURLService::Init() {
|
||||
&TemplateURLService::OnDefaultSearchProviderGUIDChanged,
|
||||
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 = {});
|
||||
@@ -479,6 +483,8 @@ class TemplateURLService final : public
|
||||
@@ -482,6 +486,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.
|
||||
@@ -717,6 +723,8 @@ class TemplateURLService final : public
|
||||
@@ -720,6 +726,8 @@ class TemplateURLService final : public
|
||||
|
||||
void Init();
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
// Simulate a loaded `TemplateURLService`.
|
||||
void ApplyInitializersForTesting(
|
||||
base::span<const TemplateURLService::Initializer> initializers);
|
||||
@@ -919,6 +927,10 @@ class TemplateURLService final : public
|
||||
@@ -922,6 +930,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,215 @@
|
||||
@@ -0,0 +1,217 @@
|
||||
+// 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.
|
||||
@@ -401,6 +401,21 @@
|
||||
+ load_pending_ = false;
|
||||
+}
|
||||
+
|
||||
+std::vector<std::string> FilterTriggers(base::Value::List&& list) {
|
||||
+ std::vector<std::string> triggers;
|
||||
+ triggers.reserve(list.size());
|
||||
+
|
||||
+ for (auto& value : list) {
|
||||
+ if (!value.is_string()) {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ triggers.push_back(std::move(value).TakeString());
|
||||
+ }
|
||||
+
|
||||
+ return triggers;
|
||||
+}
|
||||
+
|
||||
+void BangManager::LoadManifestFromString(const std::string& manifest) {
|
||||
+ auto parsed = base::JSONReader::ReadAndReturnValueWithError(
|
||||
+ manifest,
|
||||
@@ -426,49 +441,36 @@
|
||||
+ }
|
||||
+
|
||||
+ auto dict = std::move(bang).TakeDict();
|
||||
+ auto bname = dict.FindString("s");
|
||||
+ auto* name = dict.FindString("s");
|
||||
+ auto* triggers_ptr = dict.FindList("ts");
|
||||
+ auto* url_template = dict.FindString("u");
|
||||
+
|
||||
+ std::vector<const std::string*> triggers;
|
||||
+ if (auto bbang = dict.FindString("t")) {
|
||||
+ triggers.push_back(bbang);
|
||||
+ if (!name || !triggers_ptr || !url_template || triggers_ptr->empty()) {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ if (auto bbangs = dict.FindList("ts")) {
|
||||
+ triggers.reserve(triggers.size() + bbangs->size());
|
||||
+ auto triggers = FilterTriggers(std::move(*triggers_ptr));
|
||||
+ auto bang_gurl = GURL(*url_template);
|
||||
+
|
||||
+ for (const auto& trigger : *bbangs) {
|
||||
+ const std::string* value = trigger.GetIfString();
|
||||
+ if (!value) continue;
|
||||
+ if (!bang_gurl.is_valid() || !bang_gurl.SchemeIsHTTPOrHTTPS()) {
|
||||
+ VLOG(2) << "invalid bang url " << *url_template;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ triggers.push_back(value);
|
||||
+ auto category = dict.FindString("sc");
|
||||
+
|
||||
+ for (auto&& trigger : std::move(triggers)) {
|
||||
+ if (category) {
|
||||
+ category_map_[index] = GetCategoryFromJSONObject(*category);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ auto burl_template = dict.FindString("u");
|
||||
+ if (!bname || !burl_template || triggers.empty()) {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ auto b_gurl = GURL(*burl_template);
|
||||
+ if (!b_gurl.is_valid() || !b_gurl.SchemeIsHTTPOrHTTPS()) {
|
||||
+ LOG(INFO) << "invalid bang url " << *burl_template;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ auto bcategory = dict.FindString("sc");
|
||||
+ if (bcategory) {
|
||||
+ category_map_[index] = GetCategoryFromJSONObject(*bcategory);
|
||||
+ }
|
||||
+
|
||||
+ 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);
|
||||
+ bangs_.emplace_back(index++, *name, std::move(trigger), *url_template);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ LOG(INFO) << bangs_.size() << " bangs loaded";
|
||||
+ if (!callbacks_.empty()) {
|
||||
+ auto callbacks = std::move(callbacks_);
|
||||
+ for (auto& cb : callbacks) {
|
||||
@@ -563,7 +565,7 @@
|
||||
+
|
||||
--- a/components/omnibox/browser/autocomplete_input.cc
|
||||
+++ b/components/omnibox/browser/autocomplete_input.cc
|
||||
@@ -739,9 +739,9 @@ bool AutocompleteInput::HasHTTPSScheme(c
|
||||
@@ -741,9 +741,9 @@ bool AutocompleteInput::HasHTTPSScheme(c
|
||||
// static
|
||||
AutocompleteInput::FeaturedKeywordMode
|
||||
AutocompleteInput::GetFeaturedKeywordMode(std::u16string_view text) {
|
||||
@@ -575,7 +577,7 @@
|
||||
return FeaturedKeywordMode::kPrefix;
|
||||
return FeaturedKeywordMode::kFalse;
|
||||
}
|
||||
@@ -909,6 +909,7 @@ std::u16string AutocompleteInput::Autoco
|
||||
@@ -911,6 +911,7 @@ std::u16string AutocompleteInput::Autoco
|
||||
const std::u16string& input,
|
||||
bool trim_leading_whitespace,
|
||||
std::u16string* remaining_input) {
|
||||
@@ -583,7 +585,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));
|
||||
@@ -917,6 +918,39 @@ std::u16string AutocompleteInput::Autoco
|
||||
@@ -919,6 +920,39 @@ std::u16string AutocompleteInput::Autoco
|
||||
return input; // Only one token provided.
|
||||
}
|
||||
|
||||
@@ -676,7 +678,7 @@
|
||||
|
||||
--- a/components/search_engines/template_url.cc
|
||||
+++ b/components/search_engines/template_url.cc
|
||||
@@ -1689,6 +1689,8 @@ bool TemplateURL::IsBetterThanConflictin
|
||||
@@ -1700,6 +1700,8 @@ bool TemplateURL::IsBetterThanConflictin
|
||||
: base::Time(),
|
||||
// Prefer engines that CANNOT be auto-replaced.
|
||||
!engine->safe_for_autoreplace(),
|
||||
@@ -687,7 +689,7 @@
|
||||
// Favor prepopulated engines over other auto-generated engines.
|
||||
--- a/components/search_engines/template_url.h
|
||||
+++ b/components/search_engines/template_url.h
|
||||
@@ -842,6 +842,8 @@ class TemplateURL {
|
||||
@@ -847,6 +847,8 @@ class TemplateURL {
|
||||
starter_pack_id() == template_url_starter_pack_data::kAiMode;
|
||||
}
|
||||
|
||||
@@ -722,7 +724,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
|
||||
@@ -1958,6 +1958,9 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
@@ -2125,6 +2125,9 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
{"heliumServicesToggle", IDS_SETTINGS_HELIUM_SERVICES_TOGGLE},
|
||||
{"heliumServicesToggleDescription",
|
||||
IDS_SETTINGS_HELIUM_SERVICES_TOGGLE_DESCRIPTION},
|
||||
@@ -734,7 +736,7 @@
|
||||
{"heliumExtProxyToggleDescription",
|
||||
--- a/chrome/app/settings_strings.grdp
|
||||
+++ b/chrome/app/settings_strings.grdp
|
||||
@@ -1921,6 +1921,12 @@
|
||||
@@ -1981,6 +1981,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>
|
||||
@@ -749,21 +751,21 @@
|
||||
</message>
|
||||
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||
@@ -12,6 +12,11 @@
|
||||
</settings-toggle-button>
|
||||
<div class="cr-col">
|
||||
<cr-collapse id="servicesCollapse" opened="[[prefs.helium.services.enabled.value]]">
|
||||
@@ -50,6 +50,11 @@
|
||||
label="$i18n{heliumExtProxyToggle}"
|
||||
sub-label="$i18n{heliumExtProxyToggleDescription}">
|
||||
</settings-toggle-button>
|
||||
+ <settings-toggle-button id="bangToggleButton"
|
||||
+ pref="{{prefs.helium.services.bangs}}"
|
||||
+ label="$i18n{heliumBangsToggle}"
|
||||
+ sub-label="$i18n{heliumBangsToggleDescription}">
|
||||
+ </settings-toggle-button>
|
||||
<settings-toggle-button id="extProxyToggleButton"
|
||||
pref="{{prefs.helium.services.ext_proxy}}"
|
||||
label="$i18n{heliumExtProxyToggle}"
|
||||
</cr-collapse>
|
||||
</div>
|
||||
</template>
|
||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
@@ -200,6 +200,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
@@ -211,6 +211,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
|
||||
{
|
||||
registry->RegisterBooleanPref(prefs::kHeliumServicesEnabled, true);
|
||||
@@ -773,7 +775,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
|
||||
@@ -356,6 +356,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
@@ -360,6 +360,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
settings_api::PrefType::kBoolean;
|
||||
(*s_allowlist)[::prefs::kHeliumExtProxyEnabled] =
|
||||
settings_api::PrefType::kBoolean;
|
||||
@@ -781,7 +783,7 @@
|
||||
+ settings_api::PrefType::kBoolean;
|
||||
(*s_allowlist)[::prefs::kHeliumServicesOrigin] =
|
||||
settings_api::PrefType::kString;
|
||||
|
||||
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
|
||||
--- a/components/helium_services/pref_names.h
|
||||
+++ b/components/helium_services/pref_names.h
|
||||
@@ -24,6 +24,9 @@ inline constexpr char kHeliumDidOnboardi
|
||||
@@ -794,9 +796,68 @@
|
||||
} // namespace prefs
|
||||
|
||||
#endif // COMPONENTS_HELIUM_SERVICES_PREF_NAMES_H_
|
||||
--- a/components/omnibox/browser/omnibox_edit_model.cc
|
||||
+++ b/components/omnibox/browser/omnibox_edit_model.cc
|
||||
@@ -824,6 +824,17 @@ bool OmniboxEditModel::AcceptKeyword(
|
||||
--- a/third_party/metrics_proto/omnibox_event.proto
|
||||
+++ b/third_party/metrics_proto/omnibox_event.proto
|
||||
@@ -774,6 +774,8 @@ message OmniboxEventProto {
|
||||
// or tabbing to it.
|
||||
TOOLBELT = 9; // Select and activate a search shortcuts action
|
||||
// from the omnibox toolbelt.
|
||||
+ RETURN_BANG = 10; // Accept a bang at the end of the query by pressing
|
||||
+ // the Return/Enter key.
|
||||
}
|
||||
|
||||
optional KeywordModeEntryMethod keyword_mode_entry_method = 20;
|
||||
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.h
|
||||
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.h
|
||||
@@ -300,6 +300,9 @@ class OmniboxEditModel {
|
||||
return !is_keyword_hint_ && !keyword_.empty();
|
||||
}
|
||||
|
||||
+ // Accepts the bang at the end of the user query.
|
||||
+ void MaybeAcceptTrailingBang();
|
||||
+
|
||||
// Accepts the current keyword hint as a keyword. It always returns true for
|
||||
// caller convenience. |entry_method| indicates how the user entered
|
||||
// keyword mode.
|
||||
@@ -655,6 +658,10 @@ class OmniboxEditModel {
|
||||
// triggering is enabled, false otherwise.
|
||||
bool AllowKeywordSpaceTriggering() const;
|
||||
|
||||
+ // Checks whether the user text contains a bang at the end of it
|
||||
+ // that can be accepted by pressing the Return key.
|
||||
+ bool HasTrailingBangKeyword() const;
|
||||
+
|
||||
// Accepts current keyword if the user just typed a space at the end of
|
||||
// |new_text|. This handles both of the following cases:
|
||||
// (assume "foo" is a keyword, | is the input caret, [] is selected text)
|
||||
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
|
||||
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
|
||||
@@ -859,6 +859,24 @@ void OmniboxEditModel::OpenSelectionForT
|
||||
OpenSelection(popup_selection_, timestamp, disposition, via_keyboard);
|
||||
}
|
||||
|
||||
+void OmniboxEditModel::MaybeAcceptTrailingBang() {
|
||||
+ if (!HasTrailingBangKeyword()) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ AcceptKeyword(OmniboxEventProto::RETURN_BANG);
|
||||
+
|
||||
+ const AutocompleteResult& result = autocomplete_controller()->result();
|
||||
+ for (size_t i = 0; i < result.size(); i++) {
|
||||
+ const AutocompleteMatch& match = result.match_at(i);
|
||||
+
|
||||
+ if (input_.text() == match.fill_into_edit) {
|
||||
+ SetPopupSelection(OmniboxPopupSelection(i));
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
bool OmniboxEditModel::AcceptKeyword(
|
||||
OmniboxEventProto::KeywordModeEntryMethod entry_method) {
|
||||
TRACE_EVENT0("omnibox", "OmniboxEditModel::AcceptKeyword");
|
||||
@@ -867,6 +885,17 @@ bool OmniboxEditModel::AcceptKeyword(
|
||||
|
||||
controller_->StopAutocomplete(/*clear_result=*/false);
|
||||
|
||||
@@ -805,16 +866,16 @@
|
||||
+ keyword_);
|
||||
+
|
||||
+ if (turl && turl->bang_id() > 0 && !user_text_.starts_with(u'!')) {
|
||||
+ AutocompleteMatch match = CurrentMatch(nullptr);
|
||||
+ AutocompleteMatch match = CurrentMatch();
|
||||
+ if (!match.fill_into_edit.empty()) {
|
||||
+ user_text_ = match.fill_into_edit;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
is_keyword_hint_ = false;
|
||||
SetIsKeywordHint(false);
|
||||
keyword_mode_entry_method_ = entry_method;
|
||||
if (original_user_text_with_keyword_.empty()) {
|
||||
@@ -866,9 +877,6 @@ bool OmniboxEditModel::AcceptKeyword(
|
||||
@@ -909,9 +938,6 @@ bool OmniboxEditModel::AcceptKeyword(
|
||||
}
|
||||
|
||||
base::RecordAction(base::UserMetricsAction("AcceptedKeywordHint"));
|
||||
@@ -824,7 +885,7 @@
|
||||
EmitEnteredKeywordModeHistogram(entry_method, turl, !user_text_.empty());
|
||||
return true;
|
||||
}
|
||||
@@ -1520,7 +1528,13 @@ void OmniboxEditModel::InternalSetUserTe
|
||||
@@ -1561,7 +1587,13 @@ void OmniboxEditModel::InternalSetUserTe
|
||||
|
||||
std::u16string OmniboxEditModel::MaybeStripKeyword(
|
||||
const std::u16string& text) const {
|
||||
@@ -839,14 +900,49 @@
|
||||
? AutocompleteInput::SplitReplacementStringFromInput(text, false)
|
||||
: text;
|
||||
}
|
||||
@@ -2779,9 +2793,8 @@ bool OmniboxEditModel::MaybeAcceptKeywor
|
||||
return false;
|
||||
@@ -2735,16 +2767,33 @@ bool OmniboxEditModel::AllowKeywordSpace
|
||||
return GetPrefService()->GetBoolean(omnibox::kKeywordSpaceTriggeringEnabled);
|
||||
}
|
||||
|
||||
+bool OmniboxEditModel::HasTrailingBangKeyword() const {
|
||||
+ if (!is_keyword_hint_ || input_.InKeywordMode()
|
||||
+ || !keyword_.starts_with('!')
|
||||
+ || !AutocompleteMatch::IsSearchType(current_match_.type)
|
||||
+ || !GetText().ends_with(keyword_)) {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ const TemplateURL* turl =
|
||||
+ controller_->client()->GetTemplateURLService()->GetTemplateURLForKeyword(
|
||||
+ keyword_);
|
||||
+
|
||||
+ return turl && turl->bang_id() > 0;
|
||||
+}
|
||||
+
|
||||
bool OmniboxEditModel::MaybeAcceptKeywordBySpace(
|
||||
const std::u16string& new_text) {
|
||||
if (!AllowKeywordSpaceTriggering()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
+ std::u16string new_keyword = base::ToLowerASCII(
|
||||
+ AutocompleteInput::SplitKeywordFromInput(new_text, false, nullptr));
|
||||
+
|
||||
size_t keyword_length = new_text.length() - 1;
|
||||
- return is_keyword_hint_ && (keyword_.length() == keyword_length) &&
|
||||
+ return is_keyword_hint_ &&
|
||||
+ return is_keyword_hint_ && new_keyword == keyword_ &&
|
||||
IsSpaceCharForAcceptingKeyword(new_text[keyword_length]) &&
|
||||
- !new_text.compare(0, keyword_length, keyword_, 0, keyword_length) &&
|
||||
AcceptKeyword(OmniboxEventProto::SPACE_AT_END);
|
||||
}
|
||||
|
||||
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
|
||||
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
|
||||
@@ -1956,6 +1956,7 @@ bool OmniboxViewViews::HandleKeyEvent(vi
|
||||
metric_value);
|
||||
if (controller()->IsPopupOpen() && !control) {
|
||||
// Normal case of pressing <return> when the popup is open.
|
||||
+ controller()->edit_model()->MaybeAcceptTrailingBang();
|
||||
controller()->edit_model()->OpenSelection(
|
||||
controller()->edit_model()->GetPopupSelection(), event.time_stamp(),
|
||||
disposition,
|
||||
|
||||
@@ -90,12 +90,12 @@
|
||||
"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
|
||||
@@ -300,6 +300,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",
|
||||
@@ -255,6 +255,8 @@ static_library("browser") {
|
||||
"browsing_topics/browsing_topics_service_factory.h",
|
||||
"chained_back_navigation_tracker.cc",
|
||||
"chained_back_navigation_tracker.h",
|
||||
+ "channel_selection.cc",
|
||||
+ "channel_selection.h",
|
||||
"child_process_host_flags.h",
|
||||
"chrome_browser_field_trials.cc",
|
||||
"chrome_browser_field_trials.h",
|
||||
|
||||
@@ -86,7 +86,7 @@ TODO: guard services_page.html with is_mac
|
||||
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 @@
|
||||
@@ -62,6 +62,13 @@
|
||||
sub-label="$i18n{heliumSpellcheckToggleDescription}">
|
||||
</settings-toggle-button>
|
||||
</if>
|
||||
@@ -99,10 +99,10 @@ TODO: guard services_page.html with is_mac
|
||||
+ </if>
|
||||
</cr-collapse>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -1966,6 +1966,10 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
@@ -2135,6 +2135,10 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE},
|
||||
{"heliumExtProxyToggleDescription",
|
||||
IDS_SETTINGS_HELIUM_SERVICES_EXT_PROXY_TOGGLE_DESCRIPTION},
|
||||
@@ -115,7 +115,7 @@ TODO: guard services_page.html with is_mac
|
||||
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
|
||||
@@ -366,6 +366,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
@@ -364,6 +364,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
settings_api::PrefType::kBoolean;
|
||||
(*s_allowlist)[::prefs::kHeliumSpellcheckEnabled] =
|
||||
settings_api::PrefType::kBoolean;
|
||||
@@ -123,10 +123,10 @@ TODO: guard services_page.html with is_mac
|
||||
+ settings_api::PrefType::kBoolean;
|
||||
(*s_allowlist)[::prefs::kHeliumServicesOrigin] =
|
||||
settings_api::PrefType::kString;
|
||||
|
||||
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
|
||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
@@ -211,6 +211,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
@@ -217,6 +217,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
registry->RegisterStringPref(prefs::kHeliumServicesOrigin, "");
|
||||
registry->RegisterBooleanPref(prefs::kHeliumDidOnboarding, false);
|
||||
registry->RegisterBooleanPref(prefs::kHeliumServicesConsented, false);
|
||||
@@ -136,7 +136,7 @@ TODO: guard services_page.html with is_mac
|
||||
registry->RegisterBooleanPref(
|
||||
--- a/chrome/app/settings_strings.grdp
|
||||
+++ b/chrome/app/settings_strings.grdp
|
||||
@@ -1933,6 +1933,12 @@
|
||||
@@ -1996,6 +1996,12 @@
|
||||
<message name="IDS_SETTINGS_HELIUM_SERVICES_SPELLCHECK_TOGGLE_DESCRIPTION" desc="Description of the for enabling/disabling of downloading spellcheck files">
|
||||
Helium will fetch dictionary files used for spell checking when requested. When disabled, spell checking will not work.
|
||||
</message>
|
||||
|
||||
@@ -480,7 +480,7 @@
|
||||
private:
|
||||
--- 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 @@
|
||||
@@ -23,11 +23,11 @@
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
IPC_ENUM_TRAITS_MIN_MAX_VALUE(user_data_importer::ImporterType,
|
||||
user_data_importer::TYPE_UNKNOWN,
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
--- a/chrome/browser/ui/views/frame/system_menu_model_builder.cc
|
||||
+++ b/chrome/browser/ui/views/frame/system_menu_model_builder.cc
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "build/build_config.h"
|
||||
#include "chrome/app/chrome_command_ids.h"
|
||||
+#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/ui/browser_commands.h"
|
||||
#include "chrome/browser/ui/browser_window/public/browser_window_features.h"
|
||||
#include "chrome/browser/ui/tabs/features.h"
|
||||
@@ -25,7 +26,6 @@
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
#include "ash/multi_user/multi_user_window_manager.h"
|
||||
#include "ash/shell.h"
|
||||
-#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
|
||||
#include "chrome/browser/ui/browser_window.h"
|
||||
#include "chrome/browser/ui/settings_window_manager_chromeos.h"
|
||||
@@ -97,6 +97,12 @@ void SystemMenuModelBuilder::BuildSystem
|
||||
|
||||
model->AddItemWithStringId(IDC_BOOKMARK_ALL_TABS, IDS_BOOKMARK_ALL_TABS);
|
||||
model->AddItemWithStringId(IDC_NAME_WINDOW, IDS_NAME_WINDOW);
|
||||
+
|
||||
+ if (!browser()->profile()->IsOffTheRecord()) {
|
||||
+ model->AddSeparator(ui::NORMAL_SEPARATOR);
|
||||
+ model->AddItemWithStringId(IDC_SHOW_CUSTOMIZE_CHROME_SIDE_PANEL,
|
||||
+ IDS_SHOW_CUSTOMIZE_CHROME_SIDE_PANEL);
|
||||
+ }
|
||||
#if BUILDFLAG(ENABLE_GLIC)
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
// On Windows we can not remove an item when showing the menu. So only add
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
||||
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
||||
@@ -1106,11 +1106,6 @@ void RenderViewContextMenu::InitMenu() {
|
||||
@@ -1146,11 +1146,6 @@ void RenderViewContextMenu::InitMenu() {
|
||||
AppendSpellingAndSearchSuggestionItems();
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
if (editable) {
|
||||
AppendOtherEditableItems();
|
||||
}
|
||||
@@ -2166,7 +2161,6 @@ void RenderViewContextMenu::AppendPageIt
|
||||
@@ -2245,7 +2240,6 @@ void RenderViewContextMenu::AppendPageIt
|
||||
IDS_CONTENT_CONTEXT_SAVEPAGEAS);
|
||||
menu_model_.AddItemWithStringId(IDC_PRINT, IDS_CONTENT_CONTEXT_PRINT);
|
||||
AppendLiveCaptionItem();
|
||||
@@ -20,9 +20,9 @@
|
||||
if (IsRegionSearchEnabled()) {
|
||||
AppendRegionSearchItem();
|
||||
}
|
||||
@@ -2295,8 +2289,7 @@ void RenderViewContextMenu::AppendMediaR
|
||||
@@ -2374,8 +2368,7 @@ void RenderViewContextMenu::AppendMediaR
|
||||
|
||||
void RenderViewContextMenu::AppendReadingModeItem() {
|
||||
void RenderViewContextMenu::AppendReadAnythingItem() {
|
||||
// Show Read Anything option if it's not already open in the side panel.
|
||||
- if (GetBrowser() && GetBrowser()->is_type_normal() &&
|
||||
- !IsReadAnythingEntryShowing(GetBrowser())) {
|
||||
@@ -30,7 +30,7 @@
|
||||
menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_OPEN_IN_READING_MODE,
|
||||
IDS_CONTENT_CONTEXT_READING_MODE);
|
||||
}
|
||||
@@ -3567,10 +3560,12 @@ void RenderViewContextMenu::ExecuteComma
|
||||
@@ -3657,10 +3650,12 @@ void RenderViewContextMenu::ExecuteComma
|
||||
}
|
||||
|
||||
void RenderViewContextMenu::AddSpellCheckServiceItem(bool is_checked) {
|
||||
@@ -43,7 +43,7 @@
|
||||
if (is_checked) {
|
||||
menu_model_.AddCheckItemWithStringId(
|
||||
IDC_CONTENT_CONTEXT_ACCESSIBILITY_LABELS_TOGGLE,
|
||||
@@ -3947,6 +3942,8 @@ bool RenderViewContextMenu::IsVideoFrame
|
||||
@@ -4038,6 +4033,8 @@ bool RenderViewContextMenu::IsVideoFrame
|
||||
bool RenderViewContextMenu::AppendQRCodeGeneratorItem(bool for_image,
|
||||
bool draw_icon,
|
||||
bool add_separator) {
|
||||
@@ -54,7 +54,7 @@
|
||||
}
|
||||
--- a/chrome/browser/ui/browser_tab_strip_model_delegate.cc
|
||||
+++ b/chrome/browser/ui/browser_tab_strip_model_delegate.cc
|
||||
@@ -308,6 +308,7 @@ void BrowserTabStripModelDelegate::AddTo
|
||||
@@ -310,6 +310,7 @@ void BrowserTabStripModelDelegate::AddTo
|
||||
}
|
||||
|
||||
bool BrowserTabStripModelDelegate::SupportsReadLater() {
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
--- a/chrome/app/chrome_dll.rc
|
||||
+++ b/chrome/app/chrome_dll.rc
|
||||
@@ -49,7 +49,7 @@ BEGIN
|
||||
"W", IDC_CLOSE_WINDOW, VIRTKEY, CONTROL, SHIFT
|
||||
"I", IDC_DEV_TOOLS, VIRTKEY, CONTROL, SHIFT
|
||||
"J", IDC_DEV_TOOLS_CONSOLE, VIRTKEY, CONTROL, SHIFT
|
||||
- "C", IDC_DEV_TOOLS_INSPECT, VIRTKEY, CONTROL, SHIFT
|
||||
+ "C", IDC_COPY_URL, VIRTKEY, CONTROL, SHIFT
|
||||
VK_F12, IDC_DEV_TOOLS_TOGGLE, VIRTKEY
|
||||
"F", IDC_FIND, VIRTKEY, CONTROL
|
||||
"G", IDC_FIND_NEXT, VIRTKEY, CONTROL
|
||||
--- a/chrome/browser/global_keyboard_shortcuts_mac.mm
|
||||
+++ b/chrome/browser/global_keyboard_shortcuts_mac.mm
|
||||
@@ -145,7 +145,7 @@ const std::vector<KeyboardShortcutData>&
|
||||
|
||||
{true, true, false, false, kVK_ANSI_M, IDC_SHOW_AVATAR_MENU},
|
||||
{true, false, false, true, kVK_ANSI_L, IDC_SHOW_DOWNLOADS},
|
||||
- {true, true, false, false, kVK_ANSI_C, IDC_DEV_TOOLS_INSPECT},
|
||||
+ {true, true, false, false, kVK_ANSI_C, IDC_COPY_URL},
|
||||
{true, false, false, true, kVK_ANSI_C, IDC_DEV_TOOLS_INSPECT},
|
||||
{true, false, false, true, kVK_DownArrow, IDC_FOCUS_NEXT_PANE},
|
||||
{true, false, false, true, kVK_UpArrow, IDC_FOCUS_PREVIOUS_PANE},
|
||||
--- a/chrome/browser/ui/cocoa/accelerators_cocoa.mm
|
||||
+++ b/chrome/browser/ui/cocoa/accelerators_cocoa.mm
|
||||
@@ -37,7 +37,7 @@ const struct AcceleratorMapping {
|
||||
{IDC_CUT, ui::EF_COMMAND_DOWN, ui::VKEY_X},
|
||||
{IDC_DEV_TOOLS, ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, ui::VKEY_I},
|
||||
{IDC_DEV_TOOLS_CONSOLE, ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, ui::VKEY_J},
|
||||
- {IDC_DEV_TOOLS_INSPECT, ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, ui::VKEY_C},
|
||||
+ {IDC_COPY_URL, ui::EF_COMMAND_DOWN | ui::EF_SHIFT_DOWN, ui::VKEY_C},
|
||||
{IDC_FIND, ui::EF_COMMAND_DOWN, ui::VKEY_F},
|
||||
{IDC_NEW_INCOGNITO_WINDOW, ui::EF_COMMAND_DOWN | ui::EF_SHIFT_DOWN,
|
||||
ui::VKEY_N},
|
||||
--- a/chrome/browser/ui/accelerator_table.cc
|
||||
+++ b/chrome/browser/ui/accelerator_table.cc
|
||||
@@ -269,7 +269,7 @@ const AcceleratorMapping kDevToolsAccele
|
||||
{ui::VKEY_J, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
|
||||
IDC_DEV_TOOLS_CONSOLE},
|
||||
{ui::VKEY_C, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
|
||||
- IDC_DEV_TOOLS_INSPECT},
|
||||
+ IDC_COPY_URL},
|
||||
{ui::VKEY_U, ui::EF_CONTROL_DOWN, IDC_VIEW_SOURCE},
|
||||
#endif // !BUILDFLAG(IS_MAC)
|
||||
};
|
||||
--- a/chrome/browser/ui/cocoa/main_menu_builder.mm
|
||||
+++ b/chrome/browser/ui/cocoa/main_menu_builder.mm
|
||||
@@ -189,6 +189,8 @@ NSMenuItem* BuildEditMenu(NSApplication*
|
||||
Item(IDS_COPY_MAC)
|
||||
.tag(IDC_CONTENT_CONTEXT_COPY)
|
||||
.action(@selector(copy:)),
|
||||
+ Item(IDS_COPY_URL)
|
||||
+ .command_id(IDC_COPY_URL),
|
||||
Item(IDS_PASTE_MAC)
|
||||
.tag(IDC_CONTENT_CONTEXT_PASTE)
|
||||
.action(@selector(paste:)),
|
||||
@@ -1,20 +1,20 @@
|
||||
--- a/services/network/public/cpp/features.cc
|
||||
+++ b/services/network/public/cpp/features.cc
|
||||
@@ -490,7 +490,7 @@ BASE_FEATURE(kUpdateRequestForCorsRedire
|
||||
@@ -439,7 +439,7 @@ BASE_FEATURE(kUpdateRequestForCorsRedire
|
||||
|
||||
// https://github.com/patcg-individual-drafts/topics
|
||||
// Kill switch for the Topics API.
|
||||
BASE_FEATURE(kBrowsingTopics,
|
||||
"BrowsingTopics",
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
-BASE_FEATURE(kBrowsingTopics, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
+BASE_FEATURE(kBrowsingTopics, base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
// Enable the shared storage API. Note that enabling this feature does not
|
||||
// automatically expose this API to the web, it only allows the element to be
|
||||
@@ -574,7 +574,7 @@ BASE_FEATURE(kSharedStorageTransactional
|
||||
@@ -518,7 +518,7 @@ BASE_FEATURE(kSharedStorageTransactional
|
||||
|
||||
// Kill switch for the Interest Group API, i.e. if disabled, the
|
||||
// API exposure will be disabled regardless of the OT config.
|
||||
BASE_FEATURE(kInterestGroupStorage,
|
||||
"InterestGroupStorage",
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
-BASE_FEATURE(kInterestGroupStorage, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
+BASE_FEATURE(kInterestGroupStorage, base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
// TODO(crbug.com/40176812): Adjust these limits in response to usage.
|
||||
BASE_FEATURE_PARAM(int,
|
||||
kInterestGroupStorageMaxOwners,
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
--- a/chrome/browser/ui/views/webid/fedcm_account_selection_view_desktop.cc
|
||||
+++ b/chrome/browser/ui/views/webid/fedcm_account_selection_view_desktop.cc
|
||||
@@ -1282,6 +1282,9 @@ gfx::Rect FedCmAccountSelectionView::Get
|
||||
|
||||
void FedCmAccountSelectionView::ShouldShowDialog(bool& should_show) {
|
||||
if (dialog_type_ == DialogType::BUBBLE) {
|
||||
+ should_show = false;
|
||||
+ return;
|
||||
+
|
||||
// Hide the bubble dialog if it can't fit.
|
||||
if (!CanFitInWebContents()) {
|
||||
should_show = false;
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/components/live_caption/caption_util.cc
|
||||
+++ b/components/live_caption/caption_util.cc
|
||||
@@ -127,6 +127,7 @@ std::optional<ui::CaptionStyle> GetCapti
|
||||
@@ -125,6 +125,7 @@ std::optional<ui::CaptionStyle> GetCapti
|
||||
}
|
||||
|
||||
bool IsLiveCaptionFeatureSupported() {
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/components/search/ntp_features.cc
|
||||
+++ b/components/search/ntp_features.cc
|
||||
@@ -240,7 +240,7 @@ BASE_FEATURE(kNtpNextFeatures, base::FEA
|
||||
BASE_FEATURE(kNtpOneGoogleBarAsyncBarParts, base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
// If enabled, a footer will show on the NTP.
|
||||
-BASE_FEATURE(kNtpFooter, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
+BASE_FEATURE(kNtpFooter, base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
// If enabled, tab groups module will be shown.
|
||||
BASE_FEATURE(kNtpTabGroupsModule,
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/browser/upgrade_detector/upgrade_detector_impl.cc
|
||||
+++ b/chrome/browser/upgrade_detector/upgrade_detector_impl.cc
|
||||
@@ -214,6 +214,8 @@ void UpgradeDetectorImpl::DoCalculateThr
|
||||
@@ -220,6 +220,8 @@ void UpgradeDetectorImpl::DoCalculateThr
|
||||
|
||||
void UpgradeDetectorImpl::StartOutdatedBuildDetector() {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
--- a/ui/base/pointer/touch_ui_controller.cc
|
||||
+++ b/ui/base/pointer/touch_ui_controller.cc
|
||||
@@ -177,13 +177,7 @@ void TouchUiController::TouchUiScoperFor
|
||||
// static
|
||||
TouchUiController* TouchUiController::Get() {
|
||||
static base::NoDestructor<TouchUiController> instance([] {
|
||||
- const std::string switch_value =
|
||||
- base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
|
||||
- switches::kTopChromeTouchUi);
|
||||
- if (switch_value == switches::kTopChromeTouchUiDisabled)
|
||||
- return TouchUiState::kDisabled;
|
||||
- const bool enabled = switch_value == switches::kTopChromeTouchUiEnabled;
|
||||
- return enabled ? TouchUiState::kEnabled : TouchUiState::kAuto;
|
||||
+ return TouchUiState::kDisabled;
|
||||
}());
|
||||
return instance.get();
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/chrome/browser/ui/ui_features.cc
|
||||
+++ b/chrome/browser/ui/ui_features.cc
|
||||
@@ -670,7 +670,7 @@ bool HasTabSearchToolbarButton() {
|
||||
return is_tab_search_moving;
|
||||
}
|
||||
|
||||
-BASE_FEATURE(kNonMilestoneUpdateToast, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
+BASE_FEATURE(kNonMilestoneUpdateToast, base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kBookmarkTabGroupConversion, base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
--- a/components/download/public/common/download_features.cc
|
||||
+++ b/components/download/public/common/download_features.cc
|
||||
@@ -11,11 +11,7 @@ namespace features {
|
||||
@@ -9,13 +9,7 @@
|
||||
namespace download {
|
||||
namespace features {
|
||||
|
||||
BASE_FEATURE(kParallelDownloading,
|
||||
"ParallelDownloading",
|
||||
-BASE_FEATURE(kParallelDownloading,
|
||||
-#if BUILDFLAG(IS_ANDROID)
|
||||
base::FEATURE_ENABLED_BY_DEFAULT
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT
|
||||
-#else
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT
|
||||
-#endif
|
||||
);
|
||||
-);
|
||||
+BASE_FEATURE(kParallelDownloading, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
|
||||
BASE_FEATURE(kBackoffInDownloading, base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
--- a/chrome/browser/ui/ui_features.cc
|
||||
+++ b/chrome/browser/ui/ui_features.cc
|
||||
@@ -317,12 +317,7 @@ BASE_FEATURE(kTabGroupMenuMoreEntryPoint
|
||||
@@ -307,13 +307,7 @@ bool IsTabGroupMenuMoreEntryPointsEnable
|
||||
|
||||
// Enables preview images in tab-hover cards.
|
||||
// https://crbug.com/928954
|
||||
BASE_FEATURE(kTabHoverCardImages,
|
||||
"TabHoverCardImages",
|
||||
-BASE_FEATURE(kTabHoverCardImages,
|
||||
-#if BUILDFLAG(IS_MAC)
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT
|
||||
-#else
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT
|
||||
-#endif
|
||||
-);
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
+BASE_FEATURE(kTabHoverCardImages, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kTabGroupHoverCards, base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kTabModalUsesDesktopWidget,
|
||||
"TabModalUsesDesktopWidget",
|
||||
|
||||
@@ -23,16 +23,16 @@
|
||||
if (tab_search_action.has_value()) {
|
||||
--- a/chrome/browser/ui/ui_features.cc
|
||||
+++ b/chrome/browser/ui/ui_features.cc
|
||||
@@ -671,7 +671,7 @@ BASE_FEATURE(kTabStripBrowserApi,
|
||||
@@ -620,7 +620,7 @@ BASE_FEATURE(kByDateHistoryInSidePanel,
|
||||
|
||||
BASE_FEATURE(kTabstripComboButton,
|
||||
"TabstripComboButton",
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
BASE_FEATURE(kTabStripBrowserApi, base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
-BASE_FEATURE(kTabstripComboButton, base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
+BASE_FEATURE(kTabstripComboButton, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
// This serves as a "kill-switch" for migrating the Tab Search feature to be a
|
||||
// toolbar button for non-ChromeOS users in the US.
|
||||
@@ -707,6 +707,8 @@ bool HasTabSearchToolbarButton() {
|
||||
@@ -655,6 +655,8 @@ bool HasTabSearchToolbarButton() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,350 @@
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -13643,11 +13643,328 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
// AboutFlagsHistogramTest unit test to verify this process).
|
||||
};
|
||||
|
||||
+// Flags that either break Helium functionality or are not relevant to Helium
|
||||
+constexpr auto kExcludedFlags = base::MakeFixedFlatSet<std::string_view>({
|
||||
+ // Misc UI features
|
||||
+ "enable-immersive-fullscreen-toolbar",
|
||||
+ "windows11-mica-titlebar",
|
||||
+ "omnibox-toolbelt",
|
||||
+ "webium",
|
||||
+ "webui-omnibox-popup",
|
||||
+ "top-chrome-touch-ui",
|
||||
+
|
||||
+ // Google's broken canvas noising flag,
|
||||
+ // replaced by Helium's fingerprinting-canvas-noise
|
||||
+ "enable-canvas-noise",
|
||||
+
|
||||
+ // Google's fingerprinting protection blocklist
|
||||
+ // Helium blocks fingerprinting by default, and these don't even work
|
||||
+ "enable-fingerprinting-protection-blocklist",
|
||||
+ "enable-fingerprinting-protection-blocklist-incognito",
|
||||
+
|
||||
+ // Google's experimental APIs that don't work in Helium
|
||||
+ // due to missing model binaries
|
||||
+ "translation-api",
|
||||
+ "translation-api-streaming-by-sentence",
|
||||
+
|
||||
+ // Misc features not relevant to Helium
|
||||
+ "extensions-menu-access-control",
|
||||
+ "extensions-collapse-main-menu",
|
||||
+
|
||||
+ // NTP
|
||||
+ "omnibox-zero-suggest-prefetching",
|
||||
+ "omnibox-mia-zps",
|
||||
+ "ntp-calendar-module",
|
||||
+ "ntp-drive-module-no-sync-requirement",
|
||||
+ "ntp-module-sign-in-requirement",
|
||||
+ "ntp-ogb-async-bar-parts",
|
||||
+ "ntp-outlook-calendar-module",
|
||||
+ "ntp-sharepoint-module",
|
||||
+ "ntp-tab-groups-module",
|
||||
+ "ntp-tab-groups-module-zero-state",
|
||||
+ "ntp-microsoft-authentication-module",
|
||||
+ "ntp-realbox-next",
|
||||
+ "ntp-next-features",
|
||||
+ "ntp-customize-chrome-auto-open",
|
||||
+
|
||||
+ // Google Account & Sync
|
||||
+ "use-sync-sandbox",
|
||||
+ "offer-migration-to-dice-users",
|
||||
+ "web-signin-leads-to-implicitly-signed-in-state",
|
||||
+ "enable-extensions-explicit-browser-signin",
|
||||
+ "enable-history-sync-optin",
|
||||
+ "sync-enable-bookmarks-in-transport-mode",
|
||||
+ "reading-list-enable-sync-transport-mode-upon-sign-in",
|
||||
+ "enable-history-sync-optin-expansion-pill",
|
||||
+ "collaboration-shared-tab-group-account-data",
|
||||
+ "enable-bookmarks-selected-type-on-signin-for-testing",
|
||||
+ "enable-cross-device-pref-tracker",
|
||||
+ "pdf-save-to-drive",
|
||||
+ "mdm-errors-for-dasher-accounts-handling",
|
||||
+ "profile-creation-decline-signin-cta-experiment",
|
||||
+ "show-profile-picker-to-all-users-experiment",
|
||||
+
|
||||
+ // Gemini Nano / Other Google models
|
||||
+ "prompt-api-for-gemini-nano",
|
||||
+ "prompt-api-for-gemini-nano-multimodal-input",
|
||||
+ "summarization-api-for-gemini-nano",
|
||||
+ "writer-api-for-gemini-nano",
|
||||
+ "rewriter-api-for-gemini-nano",
|
||||
+ "proofreader-api-for-gemini-nano",
|
||||
+ "omnibox-on-device-tail-suggestions",
|
||||
+
|
||||
+ // AI Mode
|
||||
+ "ai-mode-omnibox-entry-point",
|
||||
+ "aim-server-eligibility",
|
||||
+ "hide-aim-omnibox-entrypoint-on-user-input",
|
||||
+ "omnibox-allow-ai-mode-matches",
|
||||
+ "omnibox-aim-shortcut-typed-state",
|
||||
+ "enable-lens-search-aim-m3",
|
||||
+ "ntp-compose-entrypoint",
|
||||
+ "ntp-composebox",
|
||||
+ "composebox-uses-chrome-compose-client",
|
||||
+ "compose-selection-nudge",
|
||||
+ "contextual-tasks",
|
||||
+ "web-app-migrate-preinstalled-chat",
|
||||
+ "webui-omnibox-aim-popup",
|
||||
+
|
||||
+ // Contextual AI stuff (AI Mode entrypoints?)
|
||||
+ "contextual-search-box-uses-contextual-search-provider",
|
||||
+ "contextual-suggestions-ablate-others-when-present",
|
||||
+ "omnibox-contextual-search-on-focus-suggestions",
|
||||
+ "omnibox-contextual-suggestions",
|
||||
+ "contextual-cueing",
|
||||
+ "contextual-suggestion-ui-improvements",
|
||||
+ "contextual-tasks-context",
|
||||
+
|
||||
+ // Shopping stuff
|
||||
+ "product-specifications",
|
||||
+ "compare-confirmation-toast",
|
||||
+ "shopping-list",
|
||||
+ "shopping-alternate-server",
|
||||
+ "price-tracking-subscription-service-locale-key",
|
||||
+ "price-tracking-subscription-service-product-version",
|
||||
+ "track-by-default-mobile",
|
||||
+ "price-insights",
|
||||
+ "discount-on-navigation",
|
||||
+ "discount-autofill",
|
||||
+ "merchant-trust",
|
||||
+
|
||||
+ // History
|
||||
+ "history-embeddings",
|
||||
+ "history-embeddings-answers",
|
||||
+
|
||||
+ // Optimization Guide
|
||||
+ "optimization-guide-debug-logs",
|
||||
+ "optimization-guide-model-execution",
|
||||
+ "optimization-guide-on-device-model",
|
||||
+ "optimization-guide-personalized-fetching",
|
||||
+ "optimization-guide-push-notifications",
|
||||
+ "optimization-guide-enable-dogfood-logging",
|
||||
+ "privacy-policy-insights",
|
||||
+
|
||||
+ // Google Lens
|
||||
+ "enable-lens-overlay",
|
||||
+ "enable-lens-overlay-image-context-menu-actions",
|
||||
+ "enable-lens-overlay-updated-visuals",
|
||||
+ "enable-lens-overlay-edu-action-chip",
|
||||
+ "enable-lens-overlay-entrypoint-label-alt",
|
||||
+ "enable-lens-overlay-text-selection-context-menu-entrypoint",
|
||||
+ "lens-overlay-omnibox-entry-point",
|
||||
+ "lens-search-side-panel-default-width-change",
|
||||
+ "lens-overlay-permission-bubble-alt",
|
||||
+ "enable-lens-overlay-simplified-selection",
|
||||
+ "enable-lens-overlay-translate-button",
|
||||
+ "enable-lens-overlay-latency-optimizations",
|
||||
+ "enable-lens-overlay-translate-languages",
|
||||
+ "enable-lens-overlay-side-panel-open-in-new-tab",
|
||||
+ "enable-lens-search-side-panel-new-feedback",
|
||||
+ "enable-lens-overlay-back-to-page",
|
||||
+ "enable-lens-overlay-straight-to-srp",
|
||||
+ "enable-lens-overlay-force-empty-csb-query",
|
||||
+ "contextual-search-open-lens-action-uses-thumbnail",
|
||||
+ "lens-reinvocation-affordance",
|
||||
+ "lens-search-zero-state-csb",
|
||||
+ "lens-updated-feedback-entrypoint",
|
||||
+ "lens-video-citations",
|
||||
+ "lens-aim-suggestions",
|
||||
+ "lens-aim-gradient-suggest-background",
|
||||
+ "lens-overlay-optimization-filter",
|
||||
+ "lens-overlay-non-blocking-privacy-notice",
|
||||
+
|
||||
+ // Google Assistant
|
||||
+ "enable-assistant-dsp",
|
||||
+ "enable-assistant-stereo-input",
|
||||
+ "enable-assistant-aec",
|
||||
+
|
||||
+ // User education
|
||||
+ "ntp-middle-slot-promo-dismissal",
|
||||
+ "ntp-mobile-promo",
|
||||
+ "force-ntp-mobile-promo",
|
||||
+ "enable-educational-tip-default-browser-promo-card",
|
||||
+ "force-startup-signin-promo",
|
||||
+ "group-promo-prototype",
|
||||
+ "group-promo-prototype-cpa",
|
||||
+ "avatar-button-sync-promo",
|
||||
+ "replace-sync-promos-with-sign-in-promos-desktop",
|
||||
+ "replace-sync-promos-with-sign-in-promos",
|
||||
+ "clank-default-browser-promo-role-manager",
|
||||
+ "clank-default-browser-promo2",
|
||||
+ "policy-promotion-banner-flag",
|
||||
+ "management-promotion-banner-flag",
|
||||
+ "enable-ntp-browser-promos",
|
||||
+ "mobile-promo-on-desktop",
|
||||
+ "in-product-help-demo-mode-choice",
|
||||
+ "iph-extensions-menu-feature",
|
||||
+ "iph-extensions-request-access-button-feature",
|
||||
+
|
||||
+ // GLIC (AI agent stuff)
|
||||
+ "glic",
|
||||
+ "glic-z-order-changes",
|
||||
+ "glic-actor",
|
||||
+ "glic-detached",
|
||||
+ "glic-panel-reset-top-chrome-button",
|
||||
+ "glic-panel-reset-on-start",
|
||||
+ "glic-panel-set-position-on-drag",
|
||||
+ "glic-panel-reset-on-session-timeout",
|
||||
+ "glic-panel-reset-size-and-location-on-open",
|
||||
+ "glic-pre-warming",
|
||||
+ "glic-fre-pre-warming",
|
||||
+ "browsing-history-actor-integration-M1",
|
||||
+
|
||||
+ // Live captions
|
||||
+ "enable-headless-live-caption",
|
||||
+
|
||||
+ // Google Wallet
|
||||
+ "wallet-service-use-sandbox",
|
||||
+
|
||||
+ // Safety Hub
|
||||
+ "safety-hub",
|
||||
+ "safety-hub-magic-stack",
|
||||
+ "safety-hub-followup",
|
||||
+ "safety-hub-android-survey",
|
||||
+ "safety-hub-android-survey-v2",
|
||||
+ "safety-hub-weak-reused-passwords",
|
||||
+ "safety-hub-local-passwords-module",
|
||||
+ "safety-hub-unified-passwords-module",
|
||||
+ "safety-hub-one-off-survey",
|
||||
+ "safety-hub-services-on-start-up",
|
||||
+ "safety-hub-disruptive-notification-revocation",
|
||||
+ "safety-hub-unused-permission-revocation-for-all-surfaces",
|
||||
+
|
||||
+ // Privacy Sandbox
|
||||
+ "privacy-sandbox-internals",
|
||||
+ "privacy-sandbox-enrollment-overrides",
|
||||
+ "privacy-sandbox-ads-api-ux-enhancements",
|
||||
+ "privacy-sandbox-ad-topics-content-parity",
|
||||
+ "privacy-guide-ai-settings",
|
||||
+
|
||||
+ // Password Manager
|
||||
+ "biometric-reauth-password-filling",
|
||||
+ "password-manual-fallback-available",
|
||||
+ "save-passwords-contextual-ui",
|
||||
+ "password-form-grouped-affiliations",
|
||||
+ "password-form-clientside-classifier",
|
||||
+ "three-button-password-save-dialog",
|
||||
+ "improved-password-change-service",
|
||||
+ "fill-recovery-password",
|
||||
+ "apply-clientside-model-predictions-for-password-types",
|
||||
+ "enable-site-isolation-for-password-sites",
|
||||
+ "pwm-show-suggestions-on-autofocus",
|
||||
+ "web-authentication-passkey-upgrade",
|
||||
+
|
||||
+ // Reading Mode
|
||||
+ "read-anything-read-aloud",
|
||||
+ "read-anything-read-aloud-phrase-highlighting",
|
||||
+ "read-anything-images-via-algorithm",
|
||||
+ "read-anything-docs-integration",
|
||||
+ "read-anything-docs-load-more-button",
|
||||
+ "read-anything-read-aloud-ts-text-segmentation",
|
||||
+ "read-anything-with-readability-enabled",
|
||||
+
|
||||
+ // Autofill
|
||||
+ "reintroduce-hybrid-passkey-entry-point",
|
||||
+ "fill-on-account-select",
|
||||
+ "show-autofill-type-predictions",
|
||||
+ "autofill-more-prominent-popup",
|
||||
+ "autofill-payments-field-swapping",
|
||||
+ "autofill-show-bubbles-based-on-priorities",
|
||||
+ "enable-show-autofill-signatures",
|
||||
+ "enable-autofill-credit-card-upload",
|
||||
+ "autofill-enable-offers-in-clank-keyboard-accessory",
|
||||
+ "fedcm-autofill",
|
||||
+ "autofill-enable-ranking-formula-address-profiles",
|
||||
+ "autofill-enable-ranking-formula-credit-cards",
|
||||
+ "sync-autofill-wallet-credential-data",
|
||||
+ "autofill-enable-cvc-storage-and-filling",
|
||||
+ "autofill-enable-prefetching-risk-data-for-retrieval",
|
||||
+ "autofill-enable-fpan-risk-based-authentication",
|
||||
+ "autofill-enable-email-or-loyalty-cards-filling",
|
||||
+ "autofill-enable-loyalty-cards-filling",
|
||||
+ "autofill-enable-syncing-of-loyalty-cards",
|
||||
+ "autofill-enable-vcn-3ds-authentication",
|
||||
+ "autofill-shared-storage-server-card-data",
|
||||
+ "autofill-enable-syncing-of-pix-bank-accounts",
|
||||
+ "autofill-enable-card-benefits-for-american-express",
|
||||
+ "autofill-enable-card-benefits-sync",
|
||||
+ "autofill-sync-ewallet-accounts",
|
||||
+ "autofill-unmask-card-request-timeout",
|
||||
+ "autofill-enable-cvc-storage-and-filling-enhancement",
|
||||
+ "autofill-enable-buy-now-pay-later",
|
||||
+ "autofill-enable-buy-now-pay-later-syncing",
|
||||
+ "autofill-enable-cvc-storage-and-filling-standalone-form-enhancement",
|
||||
+ "autofill-enable-card-benefits-iph",
|
||||
+ "autofill-enable-card-info-runtime-retrieval",
|
||||
+ "autofill-enable-save-and-fill",
|
||||
+ "autofill-improved-labels",
|
||||
+ "autofill-third-party-mode-content-provider",
|
||||
+ "autofill-enable-card-benefits-for-bmo",
|
||||
+ "autofill-enable-allowlist-for-bmo-card-category-benefits",
|
||||
+ "autofill-enable-amount-extraction",
|
||||
+ "autofill-enable-amount-extraction-allowlist",
|
||||
+ "third-party-disable-chrome-autofill-settings-screen",
|
||||
+ "iph-autofill-credit-card-benefit-feature",
|
||||
+ "autofill-enable-new-fop-display-desktop",
|
||||
+ "autofill-enable-amount-extraction-testing",
|
||||
+ "autofill-vcn-enroll-strike-expiry-time",
|
||||
+ "autofill-enable-flat-rate-card-benefits-from-curinos",
|
||||
+ "autofill-enable-multiple-request-in-virtual-card-downstream-enrollment",
|
||||
+ "autofill-require-cvc-for-possible-card-update",
|
||||
+ "disable-autofill-strike-system",
|
||||
+ "autofill-enable-buy-now-pay-later-for-klarna",
|
||||
+ "autofill-enable-downstream-card-awareness-iph",
|
||||
+ "autofill-enable-buy-now-pay-later-for-externally-linked",
|
||||
+ "autofill-enable-separate-pix-preference-item",
|
||||
+ "autofill-manual-testing-data",
|
||||
+ "autofill-enable-support-for-home-and-work",
|
||||
+ "autofill-enable-support-for-name-and-email-profile",
|
||||
+ "autofill-update-context-for-web-contents",
|
||||
+ "autofill-prioritize-save-card-over-mandatory-reauth",
|
||||
+ "autofill-enable-buy-now-pay-later-updated-suggestion-second-line-string",
|
||||
+ "autofill-and-passwords-in-same-surface",
|
||||
+ "autofill-enable-ai-based-amount-extraction",
|
||||
+ "autofill-prefer-buy-now-pay-later-blocklists",
|
||||
+ "mark-all-credentials-as-leaked",
|
||||
+ "apply-clientside-model-predictions-for-otps",
|
||||
+
|
||||
+ // Add new entries above this line and categorize them accordingly.
|
||||
+});
|
||||
+
|
||||
+const base::NoDestructor<std::vector<FeatureEntry>> kHeliumFeatureEntries([] {
|
||||
+ std::vector<FeatureEntry> filtered;
|
||||
+ for (const auto& entry : kFeatureEntries) {
|
||||
+ if (!kExcludedFlags.contains(entry.internal_name)) {
|
||||
+ filtered.push_back(entry);
|
||||
+ }
|
||||
+ }
|
||||
+ return filtered;
|
||||
+}());
|
||||
+
|
||||
class FlagsStateSingleton : public flags_ui::FlagsState::Delegate {
|
||||
public:
|
||||
FlagsStateSingleton()
|
||||
: flags_state_(
|
||||
- std::make_unique<flags_ui::FlagsState>(kFeatureEntries, this)) {}
|
||||
+ std::make_unique<flags_ui::FlagsState>(*kHeliumFeatureEntries, this)) {}
|
||||
FlagsStateSingleton(const FlagsStateSingleton&) = delete;
|
||||
FlagsStateSingleton& operator=(const FlagsStateSingleton&) = delete;
|
||||
~FlagsStateSingleton() override = default;
|
||||
@@ -13666,7 +13983,7 @@ class FlagsStateSingleton : public flags
|
||||
|
||||
void RestoreDefaultState() {
|
||||
flags_state_ =
|
||||
- std::make_unique<flags_ui::FlagsState>(kFeatureEntries, this);
|
||||
+ std::make_unique<flags_ui::FlagsState>(*kHeliumFeatureEntries, this);
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -13990,7 +14307,7 @@ base::span<const FeatureEntry> GetFeatur
|
||||
!entries_for_testing->empty()) {
|
||||
return *entries_for_testing;
|
||||
}
|
||||
- return kFeatureEntries;
|
||||
+ return *kHeliumFeatureEntries;
|
||||
}
|
||||
|
||||
} // namespace testing
|
||||
@@ -0,0 +1,16 @@
|
||||
--- a/extensions/browser/extension_registrar.cc
|
||||
+++ b/extensions/browser/extension_registrar.cc
|
||||
@@ -532,9 +532,12 @@ void ExtensionRegistrar::AddComponentExt
|
||||
if (old_version.IsValid()) {
|
||||
UnregisterServiceWorkerWithRootScope(extension);
|
||||
}
|
||||
+
|
||||
+ base::flat_set<int> disable_reasons = GetDisableReasonsOnInstalled(extension);
|
||||
+
|
||||
// TODO(crbug.com/40508457): If needed, add support for Declarative Net
|
||||
// Request to component extensions and pass the ruleset install prefs here.
|
||||
- AddNewOrUpdatedExtension(extension, {}, kInstallFlagNone,
|
||||
+ AddNewOrUpdatedExtension(extension, std::move(disable_reasons), kInstallFlagNone,
|
||||
syncer::StringOrdinal(), std::string(),
|
||||
/*ruleset_install_prefs=*/{});
|
||||
return;
|
||||
@@ -0,0 +1,12 @@
|
||||
--- a/components/gcm_driver/instance_id/instance_id_impl.cc
|
||||
+++ b/components/gcm_driver/instance_id/instance_id_impl.cc
|
||||
@@ -263,9 +263,6 @@ gcm::InstanceIDHandler* InstanceIDImpl::
|
||||
}
|
||||
|
||||
void InstanceIDImpl::RunWhenReady(base::OnceClosure task) {
|
||||
- if (!delayed_task_controller_.CanRunTaskWithoutDelay())
|
||||
- delayed_task_controller_.AddTask(std::move(task));
|
||||
- else
|
||||
base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
|
||||
FROM_HERE, std::move(task));
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_model_listener.cc
|
||||
+++ b/chrome/browser/ui/tabs/saved_tab_groups/saved_tab_group_model_listener.cc
|
||||
@@ -188,17 +188,7 @@ void SavedTabGroupModelListener::OnTabSt
|
||||
@@ -193,17 +193,7 @@ void SavedTabGroupModelListener::OnTabSt
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,21 @@
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -4919,11 +4919,13 @@ const FeatureEntry::FeatureVariation kNt
|
||||
@@ -390,11 +390,11 @@ namespace about_flags {
|
||||
|
||||
namespace {
|
||||
|
||||
-const unsigned kOsAll = kOsMac | kOsWin | kOsLinux | kOsCrOS | kOsAndroid;
|
||||
-const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux | kOsCrOS;
|
||||
+const unsigned kOsAll = kOsMac | kOsWin | kOsLinux;
|
||||
+const unsigned kOsDesktop = kOsMac | kOsWin | kOsLinux;
|
||||
|
||||
#if defined(USE_AURA)
|
||||
-const unsigned kOsAura = kOsWin | kOsLinux | kOsCrOS;
|
||||
+const unsigned kOsAura = kOsWin | kOsLinux;
|
||||
#endif // USE_AURA
|
||||
|
||||
#if defined(USE_AURA)
|
||||
@@ -5200,11 +5200,13 @@ const FeatureEntry::FeatureVariation kPr
|
||||
// calculate and verify checksum.
|
||||
//
|
||||
// When adding a new choice, add it to the end of the list.
|
||||
|
||||
@@ -1,224 +0,0 @@
|
||||
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
@@ -229,6 +229,10 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
(*s_allowlist)[::prefs::kSplitViewDragAndDropEnabled] =
|
||||
settings_api::PrefType::kBoolean;
|
||||
|
||||
+ // Custom toolbar button settings.
|
||||
+ (*s_allowlist)[::prefs::kShowAvatarButton] =
|
||||
+ settings_api::PrefType::kBoolean;
|
||||
+
|
||||
// Appearance settings.
|
||||
(*s_allowlist)[::prefs::kCurrentThemeID] = settings_api::PrefType::kString;
|
||||
(*s_allowlist)[::prefs::kPinnedActions] = settings_api::PrefType::kList;
|
||||
--- a/chrome/browser/ui/actions/chrome_action_id.h
|
||||
+++ b/chrome/browser/ui/actions/chrome_action_id.h
|
||||
@@ -554,6 +554,7 @@
|
||||
#define TOOLBAR_PINNABLE_ACTION_IDS \
|
||||
E(kActionHome, IDC_HOME) \
|
||||
E(kActionForward, IDC_FORWARD) \
|
||||
+ E(kActionAvatar, IDC_SHOW_AVATAR_MENU) \
|
||||
E(kActionNewIncognitoWindow, IDC_NEW_INCOGNITO_WINDOW) \
|
||||
E(kActionSendSharedTabGroupFeedback, IDC_SEND_SHARED_TAB_GROUP_FEEDBACK) \
|
||||
E(kActionShowPasswordManager, IDC_SHOW_PASSWORD_MANAGER) \
|
||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
@@ -117,6 +117,9 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
registry->RegisterBooleanPref(prefs::kPinSplitTabButton, false,
|
||||
pref_registration_flags);
|
||||
|
||||
+ registry->RegisterBooleanPref(
|
||||
+ prefs::kShowAvatarButton, true);
|
||||
+
|
||||
registry->RegisterInt64Pref(prefs::kDefaultBrowserLastDeclined, 0);
|
||||
registry->RegisterBooleanPref(prefs::kWebAppCreateOnDesktop, true);
|
||||
registry->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true);
|
||||
--- a/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc
|
||||
+++ b/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc
|
||||
@@ -216,6 +216,7 @@ void PinnedToolbarActionsModel::UpdatePi
|
||||
void PinnedToolbarActionsModel::ResetToDefault() {
|
||||
pref_service_->ClearPref(prefs::kShowHomeButton);
|
||||
pref_service_->ClearPref(prefs::kShowForwardButton);
|
||||
+ pref_service_->ClearPref(prefs::kShowAvatarButton);
|
||||
pref_service_->ClearPref(prefs::kPinnedActions);
|
||||
}
|
||||
|
||||
@@ -229,7 +230,10 @@ bool PinnedToolbarActionsModel::IsDefaul
|
||||
const bool forward_is_default =
|
||||
pref_service_->GetDefaultPrefValue(prefs::kShowForwardButton)
|
||||
->GetBool() == pref_service_->GetBoolean(prefs::kShowForwardButton);
|
||||
- return action_are_default && home_is_default && forward_is_default;
|
||||
+ const bool avatar_is_default =
|
||||
+ pref_service_->GetDefaultPrefValue(prefs::kShowAvatarButton)
|
||||
+ ->GetBool() == pref_service_->GetBoolean(prefs::kShowAvatarButton);
|
||||
+ return action_are_default && home_is_default && forward_is_default && avatar_is_default;
|
||||
}
|
||||
|
||||
void PinnedToolbarActionsModel::MaybeMigrateExistingPinnedStates() {
|
||||
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
@@ -463,8 +463,7 @@ void ToolbarView::Init() {
|
||||
#else
|
||||
// DevTools profiles are OffTheRecord, so hide it there.
|
||||
show_avatar_toolbar_button = browser_->profile()->IsIncognitoProfile() ||
|
||||
- browser_->profile()->IsGuestSession() ||
|
||||
- browser_->profile()->IsRegularProfile();
|
||||
+ browser_->profile()->IsGuestSession();
|
||||
#endif
|
||||
|
||||
const std::string sab_value = base::CommandLine::ForCurrentProcess()->
|
||||
@@ -533,6 +532,17 @@ void ToolbarView::Init() {
|
||||
|
||||
home_->SetVisible(show_home_button_.GetValue());
|
||||
|
||||
+ show_avatar_button_.Init(
|
||||
+ prefs::kShowAvatarButton, prefs,
|
||||
+ base::BindRepeating(&ToolbarView::OnShowAvatarButtonChanged,
|
||||
+ base::Unretained(this)));
|
||||
+
|
||||
+ // avatar is always shown in incognito and guest profiles,
|
||||
+ // but in regular profiles it's managed by the kShowAvatarButton pref
|
||||
+ if (browser_->profile()->IsRegularProfile()) {
|
||||
+ avatar_->SetVisible(show_avatar_button_.GetValue());
|
||||
+ }
|
||||
+
|
||||
InitLayout();
|
||||
|
||||
for (auto* button : std::array<views::Button*, 5>{back_, forward_, reload_,
|
||||
@@ -1253,6 +1263,10 @@ void ToolbarView::OnShowHomeButtonChange
|
||||
home_->SetVisible(show_home_button_.GetValue());
|
||||
}
|
||||
|
||||
+void ToolbarView::OnShowAvatarButtonChanged() {
|
||||
+ avatar_->SetVisible(show_avatar_button_.GetValue());
|
||||
+}
|
||||
+
|
||||
void ToolbarView::OnTouchUiChanged() {
|
||||
if (display_mode_ == DisplayMode::NORMAL) {
|
||||
// Update the internal margins for touch layout.
|
||||
--- a/chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
@@ -268,6 +268,8 @@ class ToolbarView : public views::Access
|
||||
|
||||
void OnShowHomeButtonChanged();
|
||||
|
||||
+ void OnShowAvatarButtonChanged();
|
||||
+
|
||||
void OnTouchUiChanged();
|
||||
|
||||
void UpdateClipPath();
|
||||
@@ -318,6 +320,8 @@ class ToolbarView : public views::Access
|
||||
// Controls whether or not a home button should be shown on the toolbar.
|
||||
BooleanPrefMember show_home_button_;
|
||||
|
||||
+ BooleanPrefMember show_avatar_button_;
|
||||
+
|
||||
BooleanPrefMember show_chrome_labs_button_;
|
||||
|
||||
// The display mode used when laying out the toolbar.
|
||||
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar.mojom
|
||||
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar.mojom
|
||||
@@ -16,6 +16,7 @@ enum ActionId {
|
||||
kShowSearchCompanion,
|
||||
kHome,
|
||||
kForward,
|
||||
+ kAvatar,
|
||||
kNewIncognitoWindow,
|
||||
kShowPasswordManager,
|
||||
kShowPaymentMethods,
|
||||
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.cc
|
||||
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.cc
|
||||
@@ -50,6 +50,8 @@ MojoActionForChromeAction(actions::Actio
|
||||
return side_panel::customize_chrome::mojom::ActionId::kHome;
|
||||
case kActionForward:
|
||||
return side_panel::customize_chrome::mojom::ActionId::kForward;
|
||||
+ case kActionAvatar:
|
||||
+ return side_panel::customize_chrome::mojom::ActionId::kAvatar;
|
||||
case kActionNewIncognitoWindow:
|
||||
return side_panel::customize_chrome::mojom::ActionId::kNewIncognitoWindow;
|
||||
case kActionShowPasswordsBubbleOrPage:
|
||||
@@ -109,6 +111,8 @@ std::optional<actions::ActionId> ChromeA
|
||||
return kActionHome;
|
||||
case side_panel::customize_chrome::mojom::ActionId::kForward:
|
||||
return kActionForward;
|
||||
+ case side_panel::customize_chrome::mojom::ActionId::kAvatar:
|
||||
+ return kActionAvatar;
|
||||
case side_panel::customize_chrome::mojom::ActionId::kNewIncognitoWindow:
|
||||
return kActionNewIncognitoWindow;
|
||||
case side_panel::customize_chrome::mojom::ActionId::kShowPasswordManager:
|
||||
@@ -174,6 +178,10 @@ CustomizeToolbarHandler::CustomizeToolba
|
||||
prefs::kPinSplitTabButton,
|
||||
base::BindRepeating(&CustomizeToolbarHandler::OnPinSplitTabButtonChanged,
|
||||
base::Unretained(this)));
|
||||
+ pref_change_registrar_.Add(
|
||||
+ prefs::kShowAvatarButton,
|
||||
+ base::BindRepeating(&CustomizeToolbarHandler::OnShowAvatarButtonChanged,
|
||||
+ base::Unretained(this)));
|
||||
}
|
||||
|
||||
CustomizeToolbarHandler::~CustomizeToolbarHandler() = default;
|
||||
@@ -219,6 +227,19 @@ void CustomizeToolbarHandler::ListAction
|
||||
actions.push_back(std::move(home_action));
|
||||
actions.push_back(std::move(forward_action));
|
||||
|
||||
+ auto avatar_action = side_panel::customize_chrome::mojom::Action::New(
|
||||
+ MojoActionForChromeAction(kActionAvatar).value(),
|
||||
+ base::UTF16ToUTF8(l10n_util::GetStringUTF16(IDS_PROFILES_MENU_NAME)),
|
||||
+ prefs()->GetBoolean(prefs::kShowAvatarButton), false,
|
||||
+ side_panel::customize_chrome::mojom::CategoryId::kYourChrome,
|
||||
+ GURL(webui::EncodePNGAndMakeDataURI(
|
||||
+ ui::ImageModel::FromVectorIcon(
|
||||
+ vector_icons::kAccountCircleChromeRefreshIcon, icon_color_id)
|
||||
+ .Rasterize(&provider),
|
||||
+ scale_factor)));
|
||||
+
|
||||
+ actions.push_back(std::move(avatar_action));
|
||||
+
|
||||
if (base::FeatureList::IsEnabled(features::kSideBySide)) {
|
||||
auto split_tab_action = side_panel::customize_chrome::mojom::Action::New(
|
||||
MojoActionForChromeAction(kActionSplitTab).value(),
|
||||
@@ -367,6 +388,9 @@ void CustomizeToolbarHandler::PinAction(
|
||||
case kActionSplitTab:
|
||||
prefs()->SetBoolean(prefs::kPinSplitTabButton, pin);
|
||||
break;
|
||||
+ case kActionAvatar:
|
||||
+ prefs()->SetBoolean(prefs::kShowAvatarButton, pin);
|
||||
+ break;
|
||||
default:
|
||||
model_->UpdatePinnedState(chrome_action.value(), pin);
|
||||
const std::optional<std::string> metrics_name =
|
||||
@@ -420,6 +444,11 @@ void CustomizeToolbarHandler::OnPinSplit
|
||||
prefs()->GetBoolean(prefs::kPinSplitTabButton));
|
||||
}
|
||||
|
||||
+void CustomizeToolbarHandler::OnShowAvatarButtonChanged() {
|
||||
+ OnActionPinnedChanged(kActionAvatar,
|
||||
+ prefs()->GetBoolean(prefs::kShowAvatarButton));
|
||||
+}
|
||||
+
|
||||
void CustomizeToolbarHandler::OnActionItemChanged() {
|
||||
client_->NotifyActionsUpdated();
|
||||
}
|
||||
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.h
|
||||
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.h
|
||||
@@ -54,6 +54,7 @@ class CustomizeToolbarHandler
|
||||
void OnShowHomeButtonChanged();
|
||||
void OnShowForwardButtonChanged();
|
||||
void OnPinSplitTabButtonChanged();
|
||||
+ void OnShowAvatarButtonChanged();
|
||||
void OnActionItemChanged();
|
||||
|
||||
PrefService* prefs() const;
|
||||
--- a/chrome/common/pref_names.h
|
||||
+++ b/chrome/common/pref_names.h
|
||||
@@ -1341,6 +1341,10 @@ inline constexpr char kSplitViewDragAndD
|
||||
inline constexpr char kSplitViewDragAndDropNudgeUsedCount[] =
|
||||
"browser.split_view_drag_and_drop_nudge_used_count";
|
||||
|
||||
+// A boolean pref set to true if the Avatar button should be visible on the
|
||||
+// toolbar.
|
||||
+inline constexpr char kShowAvatarButton[] = "helium.browser.show_avatar_button";
|
||||
+
|
||||
// A boolean pref set to true if Gemini integration be enabled. This is managed
|
||||
// by enterprise policy.
|
||||
inline constexpr char kGeminiSettings[] = "browser.gemini_settings";
|
||||
@@ -1,234 +0,0 @@
|
||||
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
@@ -232,6 +232,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
// Custom toolbar button settings.
|
||||
(*s_allowlist)[::prefs::kShowAvatarButton] =
|
||||
settings_api::PrefType::kBoolean;
|
||||
+ (*s_allowlist)[::prefs::kShowExtensionsButton] =
|
||||
+ settings_api::PrefType::kBoolean;
|
||||
|
||||
// Appearance settings.
|
||||
(*s_allowlist)[::prefs::kCurrentThemeID] = settings_api::PrefType::kString;
|
||||
--- a/chrome/browser/ui/actions/chrome_action_id.h
|
||||
+++ b/chrome/browser/ui/actions/chrome_action_id.h
|
||||
@@ -555,6 +555,7 @@
|
||||
E(kActionHome, IDC_HOME) \
|
||||
E(kActionForward, IDC_FORWARD) \
|
||||
E(kActionAvatar, IDC_SHOW_AVATAR_MENU) \
|
||||
+ E(kActionExtensions) \
|
||||
E(kActionNewIncognitoWindow, IDC_NEW_INCOGNITO_WINDOW) \
|
||||
E(kActionSendSharedTabGroupFeedback, IDC_SEND_SHARED_TAB_GROUP_FEEDBACK) \
|
||||
E(kActionShowPasswordManager, IDC_SHOW_PASSWORD_MANAGER) \
|
||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
@@ -119,6 +119,8 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kShowAvatarButton, true);
|
||||
+ registry->RegisterBooleanPref(
|
||||
+ prefs::kShowExtensionsButton, true);
|
||||
|
||||
registry->RegisterInt64Pref(prefs::kDefaultBrowserLastDeclined, 0);
|
||||
registry->RegisterBooleanPref(prefs::kWebAppCreateOnDesktop, true);
|
||||
--- a/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc
|
||||
+++ b/chrome/browser/ui/toolbar/pinned_toolbar/pinned_toolbar_actions_model.cc
|
||||
@@ -217,6 +217,7 @@ void PinnedToolbarActionsModel::ResetToD
|
||||
pref_service_->ClearPref(prefs::kShowHomeButton);
|
||||
pref_service_->ClearPref(prefs::kShowForwardButton);
|
||||
pref_service_->ClearPref(prefs::kShowAvatarButton);
|
||||
+ pref_service_->ClearPref(prefs::kShowExtensionsButton);
|
||||
pref_service_->ClearPref(prefs::kPinnedActions);
|
||||
}
|
||||
|
||||
@@ -233,7 +234,12 @@ bool PinnedToolbarActionsModel::IsDefaul
|
||||
const bool avatar_is_default =
|
||||
pref_service_->GetDefaultPrefValue(prefs::kShowAvatarButton)
|
||||
->GetBool() == pref_service_->GetBoolean(prefs::kShowAvatarButton);
|
||||
- return action_are_default && home_is_default && forward_is_default && avatar_is_default;
|
||||
+ const bool extensions_is_default =
|
||||
+ pref_service_->GetDefaultPrefValue(prefs::kShowExtensionsButton)
|
||||
+ ->GetBool() == pref_service_->GetBoolean(prefs::kShowExtensionsButton);
|
||||
+ return action_are_default && home_is_default &&
|
||||
+ forward_is_default && avatar_is_default &&
|
||||
+ extensions_is_default;
|
||||
}
|
||||
|
||||
void PinnedToolbarActionsModel::MaybeMigrateExistingPinnedStates() {
|
||||
--- a/chrome/browser/ui/views/extensions/extensions_toolbar_container.cc
|
||||
+++ b/chrome/browser/ui/views/extensions/extensions_toolbar_container.cc
|
||||
@@ -553,7 +553,9 @@ void ExtensionsToolbarContainer::AnchorA
|
||||
|
||||
// Fix the position of widgets. Without this fix, extension-installed-bubble
|
||||
// and extension-uninstall-dialog may be out of the window border on Linux.
|
||||
- if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-extensions-menu"))
|
||||
+ if (!browser_->profile()->GetPrefs()->GetBoolean(
|
||||
+ prefs::kShowExtensionsButton) ||
|
||||
+ base::CommandLine::ForCurrentProcess()->HasSwitch("hide-extensions-menu"))
|
||||
{
|
||||
views::View* anchor_view = BrowserView::GetBrowserViewForBrowser(browser_)
|
||||
->toolbar_button_provider()->GetAppMenuButton();
|
||||
@@ -977,7 +979,9 @@ void ExtensionsToolbarContainer::UpdateC
|
||||
}
|
||||
|
||||
bool ExtensionsToolbarContainer::ShouldContainerBeVisible() const {
|
||||
- if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-extensions-menu"))
|
||||
+ if (!browser_->profile()->GetPrefs()->GetBoolean(
|
||||
+ prefs::kShowExtensionsButton) ||
|
||||
+ base::CommandLine::ForCurrentProcess()->HasSwitch("hide-extensions-menu"))
|
||||
return false;
|
||||
|
||||
// The container (and extensions-menu button) should not be visible if we have
|
||||
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
|
||||
@@ -543,6 +543,14 @@ void ToolbarView::Init() {
|
||||
avatar_->SetVisible(show_avatar_button_.GetValue());
|
||||
}
|
||||
|
||||
+ if (extensions_container_) {
|
||||
+ show_extensions_button_.Init(
|
||||
+ prefs::kShowExtensionsButton, prefs,
|
||||
+ base::BindRepeating(&ToolbarView::OnShowExtensionsButtonChanged,
|
||||
+ base::Unretained(this)));
|
||||
+ extensions_container_->SetVisible(show_extensions_button_.GetValue());
|
||||
+ }
|
||||
+
|
||||
InitLayout();
|
||||
|
||||
for (auto* button : std::array<views::Button*, 5>{back_, forward_, reload_,
|
||||
@@ -1267,6 +1275,10 @@ void ToolbarView::OnShowAvatarButtonChan
|
||||
avatar_->SetVisible(show_avatar_button_.GetValue());
|
||||
}
|
||||
|
||||
+void ToolbarView::OnShowExtensionsButtonChanged() {
|
||||
+ extensions_container_->SetVisible(show_extensions_button_.GetValue());
|
||||
+}
|
||||
+
|
||||
void ToolbarView::OnTouchUiChanged() {
|
||||
if (display_mode_ == DisplayMode::NORMAL) {
|
||||
// Update the internal margins for touch layout.
|
||||
--- a/chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.h
|
||||
@@ -270,6 +270,8 @@ class ToolbarView : public views::Access
|
||||
|
||||
void OnShowAvatarButtonChanged();
|
||||
|
||||
+ void OnShowExtensionsButtonChanged();
|
||||
+
|
||||
void OnTouchUiChanged();
|
||||
|
||||
void UpdateClipPath();
|
||||
@@ -322,6 +324,8 @@ class ToolbarView : public views::Access
|
||||
|
||||
BooleanPrefMember show_avatar_button_;
|
||||
|
||||
+ BooleanPrefMember show_extensions_button_;
|
||||
+
|
||||
BooleanPrefMember show_chrome_labs_button_;
|
||||
|
||||
// The display mode used when laying out the toolbar.
|
||||
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar.mojom
|
||||
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar.mojom
|
||||
@@ -17,6 +17,7 @@ enum ActionId {
|
||||
kHome,
|
||||
kForward,
|
||||
kAvatar,
|
||||
+ kExtensions,
|
||||
kNewIncognitoWindow,
|
||||
kShowPasswordManager,
|
||||
kShowPaymentMethods,
|
||||
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.cc
|
||||
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.cc
|
||||
@@ -52,6 +52,8 @@ MojoActionForChromeAction(actions::Actio
|
||||
return side_panel::customize_chrome::mojom::ActionId::kForward;
|
||||
case kActionAvatar:
|
||||
return side_panel::customize_chrome::mojom::ActionId::kAvatar;
|
||||
+ case kActionExtensions:
|
||||
+ return side_panel::customize_chrome::mojom::ActionId::kExtensions;
|
||||
case kActionNewIncognitoWindow:
|
||||
return side_panel::customize_chrome::mojom::ActionId::kNewIncognitoWindow;
|
||||
case kActionShowPasswordsBubbleOrPage:
|
||||
@@ -113,6 +115,8 @@ std::optional<actions::ActionId> ChromeA
|
||||
return kActionForward;
|
||||
case side_panel::customize_chrome::mojom::ActionId::kAvatar:
|
||||
return kActionAvatar;
|
||||
+ case side_panel::customize_chrome::mojom::ActionId::kExtensions:
|
||||
+ return kActionExtensions;
|
||||
case side_panel::customize_chrome::mojom::ActionId::kNewIncognitoWindow:
|
||||
return kActionNewIncognitoWindow;
|
||||
case side_panel::customize_chrome::mojom::ActionId::kShowPasswordManager:
|
||||
@@ -182,6 +186,10 @@ CustomizeToolbarHandler::CustomizeToolba
|
||||
prefs::kShowAvatarButton,
|
||||
base::BindRepeating(&CustomizeToolbarHandler::OnShowAvatarButtonChanged,
|
||||
base::Unretained(this)));
|
||||
+ pref_change_registrar_.Add(
|
||||
+ prefs::kShowExtensionsButton,
|
||||
+ base::BindRepeating(&CustomizeToolbarHandler::OnShowExtensionsButtonChanged,
|
||||
+ base::Unretained(this)));
|
||||
}
|
||||
|
||||
CustomizeToolbarHandler::~CustomizeToolbarHandler() = default;
|
||||
@@ -240,6 +248,19 @@ void CustomizeToolbarHandler::ListAction
|
||||
|
||||
actions.push_back(std::move(avatar_action));
|
||||
|
||||
+ auto extensions_action = side_panel::customize_chrome::mojom::Action::New(
|
||||
+ MojoActionForChromeAction(kActionExtensions).value(),
|
||||
+ base::UTF16ToUTF8(l10n_util::GetStringUTF16(IDS_TOOLTIP_EXTENSIONS_BUTTON)),
|
||||
+ prefs()->GetBoolean(prefs::kShowExtensionsButton), false,
|
||||
+ side_panel::customize_chrome::mojom::CategoryId::kYourChrome,
|
||||
+ GURL(webui::EncodePNGAndMakeDataURI(
|
||||
+ ui::ImageModel::FromVectorIcon(
|
||||
+ vector_icons::kExtensionChromeRefreshIcon, icon_color_id)
|
||||
+ .Rasterize(&provider),
|
||||
+ scale_factor)));
|
||||
+
|
||||
+ actions.push_back(std::move(extensions_action));
|
||||
+
|
||||
if (base::FeatureList::IsEnabled(features::kSideBySide)) {
|
||||
auto split_tab_action = side_panel::customize_chrome::mojom::Action::New(
|
||||
MojoActionForChromeAction(kActionSplitTab).value(),
|
||||
@@ -391,6 +412,9 @@ void CustomizeToolbarHandler::PinAction(
|
||||
case kActionAvatar:
|
||||
prefs()->SetBoolean(prefs::kShowAvatarButton, pin);
|
||||
break;
|
||||
+ case kActionExtensions:
|
||||
+ prefs()->SetBoolean(prefs::kShowExtensionsButton, pin);
|
||||
+ break;
|
||||
default:
|
||||
model_->UpdatePinnedState(chrome_action.value(), pin);
|
||||
const std::optional<std::string> metrics_name =
|
||||
@@ -449,6 +473,11 @@ void CustomizeToolbarHandler::OnShowAvat
|
||||
prefs()->GetBoolean(prefs::kShowAvatarButton));
|
||||
}
|
||||
|
||||
+void CustomizeToolbarHandler::OnShowExtensionsButtonChanged() {
|
||||
+ OnActionPinnedChanged(kActionExtensions,
|
||||
+ prefs()->GetBoolean(prefs::kShowExtensionsButton));
|
||||
+}
|
||||
+
|
||||
void CustomizeToolbarHandler::OnActionItemChanged() {
|
||||
client_->NotifyActionsUpdated();
|
||||
}
|
||||
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.h
|
||||
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.h
|
||||
@@ -55,6 +55,7 @@ class CustomizeToolbarHandler
|
||||
void OnShowForwardButtonChanged();
|
||||
void OnPinSplitTabButtonChanged();
|
||||
void OnShowAvatarButtonChanged();
|
||||
+ void OnShowExtensionsButtonChanged();
|
||||
void OnActionItemChanged();
|
||||
|
||||
PrefService* prefs() const;
|
||||
--- a/chrome/common/pref_names.h
|
||||
+++ b/chrome/common/pref_names.h
|
||||
@@ -1345,6 +1345,10 @@ inline constexpr char kSplitViewDragAndD
|
||||
// toolbar.
|
||||
inline constexpr char kShowAvatarButton[] = "helium.browser.show_avatar_button";
|
||||
|
||||
+// A boolean pref set to true if the Extensions button should be visible on the
|
||||
+// toolbar.
|
||||
+inline constexpr char kShowExtensionsButton[] = "helium.browser.show_extensions_button";
|
||||
+
|
||||
// A boolean pref set to true if Gemini integration be enabled. This is managed
|
||||
// by enterprise policy.
|
||||
inline constexpr char kGeminiSettings[] = "browser.gemini_settings";
|
||||
@@ -11,7 +11,7 @@
|
||||
#endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
|
||||
--- a/storage/browser/quota/quota_features.cc
|
||||
+++ b/storage/browser/quota/quota_features.cc
|
||||
@@ -43,7 +43,7 @@ BASE_FEATURE(kStaticStorageQuota,
|
||||
@@ -39,7 +39,7 @@ BASE_FEATURE(kStaticStorageQuota, base::
|
||||
|
||||
BASE_FEATURE(kIncreaseIncognitoStorageQuota,
|
||||
"IncreaseIncognitoStorageQuota",
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
--- a/components/performance_manager/features.cc
|
||||
+++ b/components/performance_manager/features.cc
|
||||
@@ -248,7 +248,7 @@ BASE_FEATURE(kRecordFreezingEligibilityU
|
||||
@@ -222,7 +222,7 @@ BASE_FEATURE(kFreezingFollowsDiscardOptO
|
||||
|
||||
BASE_FEATURE(kInfiniteTabsFreezing,
|
||||
"InfiniteTabsFreezing",
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
BASE_FEATURE(kRecordFreezingEligibilityUKM, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
-BASE_FEATURE(kInfiniteTabsFreezing, base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
+BASE_FEATURE(kInfiniteTabsFreezing, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE_PARAM(int,
|
||||
kInfiniteTabsFreezing_NumProtectedTabs,
|
||||
|
||||
@@ -0,0 +1,252 @@
|
||||
--- a/chrome/app/chrome_command_ids.h
|
||||
+++ b/chrome/app/chrome_command_ids.h
|
||||
@@ -92,9 +92,11 @@
|
||||
#define IDC_WEB_APP_MENU_APP_INFO 34063
|
||||
#define IDC_WEB_APP_UPGRADE_DIALOG 34064
|
||||
|
||||
+// Helium commands
|
||||
+#define IDC_COPY_OR_INSPECT_SHORTCUT 34080
|
||||
+
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
// Move window to other user commands
|
||||
-#define IDC_VISIT_DESKTOP_OF_LRU_USER_2 34080
|
||||
#define IDC_VISIT_DESKTOP_OF_LRU_USER_3 34081
|
||||
#define IDC_VISIT_DESKTOP_OF_LRU_USER_4 34082
|
||||
#define IDC_VISIT_DESKTOP_OF_LRU_USER_5 34083
|
||||
--- a/chrome/common/pref_names.h
|
||||
+++ b/chrome/common/pref_names.h
|
||||
@@ -1493,6 +1493,11 @@ inline constexpr char kPageColorsBlockLi
|
||||
inline constexpr char kPrefersDefaultScrollbarStyles[] =
|
||||
"settings.a11y.prefers_default_scrollbar_styles";
|
||||
|
||||
+// Boolean that indicates whether the user has enabled the keyboard shortcut
|
||||
+// for copying the current page URL to the clipboard.
|
||||
+inline constexpr char kCopyPageUrlShortcut[] =
|
||||
+ "helium.settings.a11y.copy_page_url_shortcut";
|
||||
+
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
// Boolean that indicates whether the application should show the info bar
|
||||
// asking the user to set up automatic updates when Keystone promotion is
|
||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
@@ -149,6 +149,8 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
registry->RegisterListPref(prefs::kWebRtcLocalIpsAllowedUrls);
|
||||
registry->RegisterBooleanPref(prefs::kWebRtcTextLogCollectionAllowed, false);
|
||||
|
||||
+ registry->RegisterBooleanPref(prefs::kCopyPageUrlShortcut, true);
|
||||
+
|
||||
// We need to register the type of these preferences in order to query
|
||||
// them even though they're only typically controlled via policy.
|
||||
registry->RegisterBooleanPref(policy::policy_prefs::kHideWebStoreIcon, false);
|
||||
--- a/chrome/browser/ui/browser_command_controller.cc
|
||||
+++ b/chrome/browser/ui/browser_command_controller.cc
|
||||
@@ -389,7 +389,9 @@ bool BrowserCommandController::IsReserve
|
||||
command_id == IDC_NEW_INCOGNITO_WINDOW || command_id == IDC_NEW_TAB ||
|
||||
command_id == IDC_NEW_WINDOW || command_id == IDC_RESTORE_TAB ||
|
||||
command_id == IDC_SELECT_NEXT_TAB ||
|
||||
- command_id == IDC_SELECT_PREVIOUS_TAB || command_id == IDC_EXIT;
|
||||
+ command_id == IDC_SELECT_PREVIOUS_TAB || command_id == IDC_EXIT ||
|
||||
+ command_id == IDC_COPY_OR_INSPECT_SHORTCUT || command_id == IDC_DEV_TOOLS ||
|
||||
+ command_id == IDC_DEV_TOOLS_TOGGLE || command_id == IDC_TAB_SEARCH;
|
||||
}
|
||||
|
||||
void BrowserCommandController::TabStateChanged() {
|
||||
@@ -1176,6 +1178,14 @@ bool BrowserCommandController::ExecuteCo
|
||||
case IDC_DUPLICATE_TARGET_TAB:
|
||||
DuplicateKeyboardFocusedTab(browser_);
|
||||
break;
|
||||
+ case IDC_COPY_OR_INSPECT_SHORTCUT: {
|
||||
+ PrefService* prefs = profile()->GetPrefs();
|
||||
+ bool copy = prefs->GetBoolean(prefs::kCopyPageUrlShortcut);
|
||||
+
|
||||
+ return ExecuteCommandWithDisposition(
|
||||
+ copy ? IDC_COPY_URL : IDC_DEV_TOOLS_INSPECT,
|
||||
+ disposition, time_stamp);
|
||||
+ }
|
||||
// Hosted App commands
|
||||
case IDC_COPY_URL:
|
||||
CopyURL(browser_, browser_->tab_strip_model()->GetActiveWebContents());
|
||||
@@ -1926,6 +1936,12 @@ void BrowserCommandController::UpdateCom
|
||||
|
||||
bool dev_tools_enabled = DevToolsWindow::AllowDevToolsFor(
|
||||
profile(), browser_->tab_strip_model()->GetActiveWebContents());
|
||||
+
|
||||
+ PrefService* prefs = profile()->GetPrefs();
|
||||
+ bool copy = prefs->GetBoolean(prefs::kCopyPageUrlShortcut);
|
||||
+ command_updater_.UpdateCommandEnabled(IDC_COPY_OR_INSPECT_SHORTCUT,
|
||||
+ copy || dev_tools_enabled);
|
||||
+
|
||||
command_updater_.UpdateCommandEnabled(IDC_DEV_TOOLS, dev_tools_enabled);
|
||||
command_updater_.UpdateCommandEnabled(IDC_DEV_TOOLS_CONSOLE,
|
||||
dev_tools_enabled);
|
||||
--- a/chrome/browser/ui/accelerator_table.cc
|
||||
+++ b/chrome/browser/ui/accelerator_table.cc
|
||||
@@ -269,8 +269,10 @@ const AcceleratorMapping kDevToolsAccele
|
||||
{ui::VKEY_I, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, IDC_DEV_TOOLS},
|
||||
{ui::VKEY_J, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
|
||||
IDC_DEV_TOOLS_CONSOLE},
|
||||
- {ui::VKEY_C, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
|
||||
+ {ui::VKEY_E, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
|
||||
IDC_DEV_TOOLS_INSPECT},
|
||||
+ {ui::VKEY_C, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
|
||||
+ IDC_COPY_OR_INSPECT_SHORTCUT},
|
||||
{ui::VKEY_U, ui::EF_CONTROL_DOWN, IDC_VIEW_SOURCE},
|
||||
#endif // !BUILDFLAG(IS_MAC)
|
||||
};
|
||||
--- a/chrome/browser/global_keyboard_shortcuts_mac.mm
|
||||
+++ b/chrome/browser/global_keyboard_shortcuts_mac.mm
|
||||
@@ -145,7 +145,9 @@ const std::vector<KeyboardShortcutData>&
|
||||
|
||||
{true, true, false, false, kVK_ANSI_M, IDC_SHOW_AVATAR_MENU},
|
||||
{true, false, false, true, kVK_ANSI_L, IDC_SHOW_DOWNLOADS},
|
||||
- {true, true, false, false, kVK_ANSI_C, IDC_DEV_TOOLS_INSPECT},
|
||||
+ {true, true, false, false, kVK_ANSI_I, IDC_DEV_TOOLS},
|
||||
+ {true, true, false, false, kVK_ANSI_E, IDC_DEV_TOOLS_INSPECT},
|
||||
+ {true, true, false, false, kVK_ANSI_C, IDC_COPY_OR_INSPECT_SHORTCUT},
|
||||
{true, false, false, true, kVK_ANSI_C, IDC_DEV_TOOLS_INSPECT},
|
||||
{true, false, false, true, kVK_DownArrow, IDC_FOCUS_NEXT_PANE},
|
||||
{true, false, false, true, kVK_UpArrow, IDC_FOCUS_PREVIOUS_PANE},
|
||||
--- a/chrome/browser/ui/cocoa/accelerators_cocoa.mm
|
||||
+++ b/chrome/browser/ui/cocoa/accelerators_cocoa.mm
|
||||
@@ -37,7 +37,8 @@ const struct AcceleratorMapping {
|
||||
{IDC_CUT, ui::EF_COMMAND_DOWN, ui::VKEY_X},
|
||||
{IDC_DEV_TOOLS, ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, ui::VKEY_I},
|
||||
{IDC_DEV_TOOLS_CONSOLE, ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, ui::VKEY_J},
|
||||
- {IDC_DEV_TOOLS_INSPECT, ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, ui::VKEY_C},
|
||||
+ {IDC_DEV_TOOLS_INSPECT, ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, ui::VKEY_E},
|
||||
+ {IDC_COPY_OR_INSPECT_SHORTCUT, ui::EF_COMMAND_DOWN | ui::EF_SHIFT_DOWN, ui::VKEY_C},
|
||||
{IDC_FIND, ui::EF_COMMAND_DOWN, ui::VKEY_F},
|
||||
{IDC_NEW_INCOGNITO_WINDOW, ui::EF_COMMAND_DOWN | ui::EF_SHIFT_DOWN,
|
||||
ui::VKEY_N},
|
||||
@@ -73,9 +74,6 @@ const struct AcceleratorMapping {
|
||||
// We used to define IDC_CLOSE_WINDOW here. Instead, see
|
||||
// AcceleratorForCloseWindow().
|
||||
{IDC_CLOSE_TAB, ui::EF_COMMAND_DOWN, ui::VKEY_W},
|
||||
-
|
||||
- {IDC_EMAIL_PAGE_LOCATION, ui::EF_COMMAND_DOWN | ui::EF_SHIFT_DOWN,
|
||||
- ui::VKEY_I},
|
||||
#if BUILDFLAG(ENABLE_PRINTING)
|
||||
{IDC_BASIC_PRINT, ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, ui::VKEY_P},
|
||||
#endif // ENABLE_PRINTING
|
||||
--- a/chrome/app/chrome_dll.rc
|
||||
+++ b/chrome/app/chrome_dll.rc
|
||||
@@ -49,7 +49,8 @@ BEGIN
|
||||
"W", IDC_CLOSE_WINDOW, VIRTKEY, CONTROL, SHIFT
|
||||
"I", IDC_DEV_TOOLS, VIRTKEY, CONTROL, SHIFT
|
||||
"J", IDC_DEV_TOOLS_CONSOLE, VIRTKEY, CONTROL, SHIFT
|
||||
- "C", IDC_DEV_TOOLS_INSPECT, VIRTKEY, CONTROL, SHIFT
|
||||
+ "E", IDC_DEV_TOOLS_INSPECT, VIRTKEY, CONTROL, SHIFT
|
||||
+ "C", IDC_COPY_OR_INSPECT_SHORTCUT, VIRTKEY, CONTROL, SHIFT
|
||||
VK_F12, IDC_DEV_TOOLS_TOGGLE, VIRTKEY
|
||||
"F", IDC_FIND, VIRTKEY, CONTROL
|
||||
"G", IDC_FIND_NEXT, VIRTKEY, CONTROL
|
||||
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
@@ -587,6 +587,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
|
||||
(*s_allowlist)[::prefs::kCaretBrowsingEnabled] =
|
||||
settings_api::PrefType::kBoolean;
|
||||
+ (*s_allowlist)[::prefs::kCopyPageUrlShortcut] =
|
||||
+ settings_api::PrefType::kBoolean;
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
// Accounts / Users / People.
|
||||
--- a/chrome/app/settings_strings.grdp
|
||||
+++ b/chrome/app/settings_strings.grdp
|
||||
@@ -190,6 +190,16 @@
|
||||
Shows a confirmation when you copy links, images, or videos
|
||||
</message>
|
||||
</if>
|
||||
+ <if expr="is_macosx">
|
||||
+ <message name="IDS_SETTINGS_ACCESSIBILITY_COPY_PAGE_URL_SHORTCUT" desc="Toggle in settings that allows you to enable the keyboard shortcut that copies the current page URL to the clipboard. It's enabled by default.">
|
||||
+ Enable quick page link copying with ⌘+Shift+C
|
||||
+ </message>
|
||||
+ </if>
|
||||
+ <if expr="not is_macosx">
|
||||
+ <message name="IDS_SETTINGS_ACCESSIBILITY_COPY_PAGE_URL_SHORTCUT" desc="Toggle in settings that allows you to enable the keyboard shortcut that copies the current page URL to the clipboard. It's enabled by default.">
|
||||
+ Enable quick page link copying with Ctrl+Shift+C
|
||||
+ </message>
|
||||
+ </if>
|
||||
|
||||
<!-- Appearance Page -->
|
||||
<message name="IDS_SETTINGS_APPEARANCE" desc="Name of the settings page which displays appearance preferences.">
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -282,6 +282,7 @@ void AddA11yStrings(content::WebUIDataSo
|
||||
#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
|
||||
{"axTreeFixingTitle", IDS_SETTINGS_AX_TREE_FIXING_TITLE},
|
||||
{"axTreeFixingSubtitle", IDS_SETTINGS_AX_TREE_FIXING_SUBTITLE},
|
||||
+ {"copyPageUrlShortcut", IDS_SETTINGS_ACCESSIBILITY_COPY_PAGE_URL_SHORTCUT},
|
||||
};
|
||||
html_source->AddLocalizedStrings(kLocalizedStrings);
|
||||
|
||||
--- a/chrome/browser/resources/settings/appearance_page/appearance_behavior_page.html
|
||||
+++ b/chrome/browser/resources/settings/appearance_page/appearance_behavior_page.html
|
||||
@@ -1,6 +1,11 @@
|
||||
<style include="cr-shared-style settings-shared"></style>
|
||||
<settings-section page-title="$i18n{behaviorPageTitle}">
|
||||
|
||||
+ <settings-toggle-button class="hr" id="copyPageUrlShortcut"
|
||||
+ pref="{{prefs.helium.settings.a11y.copy_page_url_shortcut}}"
|
||||
+ label="$i18n{copyPageUrlShortcut}">
|
||||
+ </settings-toggle-button>
|
||||
+
|
||||
<settings-toggle-button class="hr" id="autoPinNewTabGroups"
|
||||
pref="{{prefs.auto_pin_new_tab_groups}}"
|
||||
label="$i18n{autoPinNewTabGroups}">
|
||||
--- a/third_party/devtools-frontend/src/front_end/panels/elements/elements-meta.ts
|
||||
+++ b/third_party/devtools-frontend/src/front_end/panels/elements/elements-meta.ts
|
||||
@@ -446,11 +446,11 @@ UI.ActionRegistration.registerActionExte
|
||||
iconClass: UI.ActionRegistration.IconClass.LARGEICON_NODE_SEARCH,
|
||||
bindings: [
|
||||
{
|
||||
- shortcut: 'Ctrl+Shift+C',
|
||||
+ shortcut: 'Ctrl+Shift+E',
|
||||
platform: UI.ActionRegistration.Platforms.WINDOWS_LINUX,
|
||||
},
|
||||
{
|
||||
- shortcut: 'Meta+Shift+C',
|
||||
+ shortcut: 'Meta+Shift+E',
|
||||
platform: UI.ActionRegistration.Platforms.MAC,
|
||||
},
|
||||
],
|
||||
--- a/chrome/browser/ui/cocoa/main_menu_builder.mm
|
||||
+++ b/chrome/browser/ui/cocoa/main_menu_builder.mm
|
||||
@@ -189,6 +189,8 @@ NSMenuItem* BuildEditMenu(NSApplication*
|
||||
Item(IDS_COPY_MAC)
|
||||
.tag(IDC_CONTENT_CONTEXT_COPY)
|
||||
.action(@selector(copy:)),
|
||||
+ Item(IDS_COPY_URL)
|
||||
+ .command_id(IDC_COPY_URL),
|
||||
Item(IDS_PASTE_MAC)
|
||||
.tag(IDC_CONTENT_CONTEXT_PASTE)
|
||||
.action(@selector(paste:)),
|
||||
--- a/chrome/browser/ui/cocoa/share_menu_controller.mm
|
||||
+++ b/chrome/browser/ui/cocoa/share_menu_controller.mm
|
||||
@@ -99,12 +99,6 @@ bool CanShare() {
|
||||
// to fetch sharing services that can handle the NSURL type.
|
||||
NSArray* services = [NSSharingService
|
||||
sharingServicesForItems:@[ [NSURL URLWithString:@"https://google.com"] ]];
|
||||
- NSMenuItem* email = [[NSMenuItem alloc]
|
||||
- initWithTitle:l10n_util::GetNSString(IDS_EMAIL_LINK_MAC)
|
||||
- action:@selector(emailLink:)
|
||||
- keyEquivalent:[self keyEquivalentForMail]];
|
||||
- email.target = self;
|
||||
- [menu addItem:email];
|
||||
for (NSSharingService* service in services) {
|
||||
// Email share service causes mysterious crashes, so share directly.
|
||||
// See https://crbug.com/356643975
|
||||
@@ -298,13 +292,4 @@ bool CanShare() {
|
||||
return item;
|
||||
}
|
||||
|
||||
-- (NSString*)keyEquivalentForMail {
|
||||
- ui::Accelerator accelerator;
|
||||
- bool found = GetDefaultMacAcceleratorForCommandId(IDC_EMAIL_PAGE_LOCATION,
|
||||
- &accelerator);
|
||||
- DCHECK(found);
|
||||
- return GetKeyEquivalentAndModifierMaskFromAccelerator(accelerator)
|
||||
- .keyEquivalent;
|
||||
-}
|
||||
-
|
||||
@end
|
||||
@@ -24,7 +24,7 @@ https://github.com/uazo/cromite/blob/b2824377/build/patches/AudioBuffer-Analyser
|
||||
#endif /* CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_ */
|
||||
--- a/third_party/blink/common/features.cc
|
||||
+++ b/third_party/blink/common/features.cc
|
||||
@@ -19,6 +19,10 @@
|
||||
@@ -20,6 +20,10 @@
|
||||
|
||||
namespace blink::features {
|
||||
|
||||
@@ -79,7 +79,7 @@ https://github.com/uazo/cromite/blob/b2824377/build/patches/AudioBuffer-Analyser
|
||||
ExceptionState& exception_state) {
|
||||
--- a/third_party/blink/renderer/modules/webaudio/audio_buffer.h
|
||||
+++ b/third_party/blink/renderer/modules/webaudio/audio_buffer.h
|
||||
@@ -116,6 +116,8 @@ class MODULES_EXPORT AudioBuffer final :
|
||||
@@ -115,6 +115,8 @@ class MODULES_EXPORT AudioBuffer final :
|
||||
|
||||
std::unique_ptr<SharedAudioBuffer> CreateSharedAudioBuffer();
|
||||
|
||||
@@ -90,7 +90,7 @@ https://github.com/uazo/cromite/blob/b2824377/build/patches/AudioBuffer-Analyser
|
||||
uint32_t length,
|
||||
--- a/third_party/blink/renderer/modules/webaudio/audio_context.cc
|
||||
+++ b/third_party/blink/renderer/modules/webaudio/audio_context.cc
|
||||
@@ -850,7 +850,12 @@ double AudioContext::baseLatency() const
|
||||
@@ -863,7 +863,12 @@ double AudioContext::baseLatency() const
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(main_thread_sequence_checker_);
|
||||
DCHECK(destination());
|
||||
|
||||
@@ -106,7 +106,7 @@ https://github.com/uazo/cromite/blob/b2824377/build/patches/AudioBuffer-Analyser
|
||||
double AudioContext::outputLatency() const {
|
||||
--- a/third_party/blink/renderer/modules/webaudio/base_audio_context.cc
|
||||
+++ b/third_party/blink/renderer/modules/webaudio/base_audio_context.cc
|
||||
@@ -774,6 +774,13 @@ LocalDOMWindow* BaseAudioContext::GetWin
|
||||
@@ -776,6 +776,13 @@ LocalDOMWindow* BaseAudioContext::GetWin
|
||||
return To<LocalDOMWindow>(GetExecutionContext());
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ https://github.com/uazo/cromite/blob/b2824377/build/patches/AudioBuffer-Analyser
|
||||
|
||||
--- a/third_party/blink/renderer/modules/webaudio/offline_audio_context.cc
|
||||
+++ b/third_party/blink/renderer/modules/webaudio/offline_audio_context.cc
|
||||
@@ -375,6 +375,8 @@ void OfflineAudioContext::FireCompletion
|
||||
@@ -396,6 +396,8 @@ void OfflineAudioContext::FireCompletion
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ https://github.com/uazo/cromite/blob/b2824377/build/patches/AudioBuffer-Analyser
|
||||
|
||||
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
@@ -585,7 +585,6 @@
|
||||
@@ -622,7 +622,6 @@
|
||||
// AudioContext.playoutStats interface.
|
||||
// https://chromestatus.com/feature/5172818344148992
|
||||
name: "AudioContextPlayoutStats",
|
||||
|
||||
@@ -21,12 +21,12 @@
|
||||
#endif /* CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_ */
|
||||
--- a/components/fingerprinting_protection_filter/interventions/common/interventions_features.cc
|
||||
+++ b/components/fingerprinting_protection_filter/interventions/common/interventions_features.cc
|
||||
@@ -12,13 +12,13 @@ namespace fingerprinting_protection_inte
|
||||
@@ -10,13 +10,13 @@ namespace fingerprinting_protection_inte
|
||||
|
||||
// Whether the canvas interventions should be enabled that add noise to the
|
||||
// readback values.
|
||||
BASE_FEATURE(kCanvasNoise,
|
||||
"CanvasNoise",
|
||||
- base::FeatureState::FEATURE_DISABLED_BY_DEFAULT);
|
||||
+ base::FeatureState::FEATURE_ENABLED_BY_DEFAULT);
|
||||
-BASE_FEATURE(kCanvasNoise, base::FeatureState::FEATURE_DISABLED_BY_DEFAULT);
|
||||
+BASE_FEATURE(kCanvasNoise, base::FeatureState::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE_PARAM(bool,
|
||||
kCanvasNoiseInRegularMode,
|
||||
@@ -35,13 +35,13 @@
|
||||
- false);
|
||||
+ true);
|
||||
|
||||
bool IsCanvasInterventionsEnabledForIncognitoState(bool is_incognito) {
|
||||
if (is_incognito) {
|
||||
// [Experimental] Whether readback of canvases should be blocked.
|
||||
BASE_FEATURE(kBlockCanvasReadback,
|
||||
--- a/third_party/blink/renderer/core/canvas_interventions/canvas_interventions_helper.cc
|
||||
+++ b/third_party/blink/renderer/core/canvas_interventions/canvas_interventions_helper.cc
|
||||
@@ -132,17 +132,6 @@ bool CanvasInterventionsHelper::MaybeNoi
|
||||
static_cast<int>(high_entropy_canvas_op_types),
|
||||
canvas_op_exclusive_max);
|
||||
@@ -157,17 +157,6 @@ bool CanvasInterventionsHelper::MaybeNoi
|
||||
GetContextTypeForMetrics(execution_context)}),
|
||||
static_cast<int>(high_entropy_canvas_op_types), canvas_op_exclusive_max);
|
||||
|
||||
- AuditsIssue::ReportUserReidentificationCanvasNoisedIssue(
|
||||
- CaptureSourceLocation(execution_context), execution_context);
|
||||
@@ -57,8 +57,8 @@
|
||||
base::TimeDelta elapsed_time = base::TimeTicks::Now() - start_time;
|
||||
|
||||
UMA_HISTOGRAM_CUSTOM_MICROSECONDS_TIMES(kNoiseDurationMetricName,
|
||||
@@ -150,9 +139,6 @@ bool CanvasInterventionsHelper::MaybeNoi
|
||||
base::Milliseconds(50), 50);
|
||||
@@ -175,9 +164,6 @@ bool CanvasInterventionsHelper::MaybeNoi
|
||||
base::Milliseconds(100), 100);
|
||||
UMA_HISTOGRAM_COUNTS_1M(kCanvasSizeMetricName,
|
||||
pixmap_to_noise.width() * pixmap_to_noise.height());
|
||||
- UseCounter::Count(execution_context, WebFeature::kCanvasReadbackNoise);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#endif // COMPONENTS_HELIUM_SERVICES_PREF_NAMES_H_
|
||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
@@ -201,6 +201,8 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
@@ -208,6 +208,8 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
{
|
||||
registry->RegisterBooleanPref(prefs::kHeliumServicesEnabled, true);
|
||||
registry->RegisterStringPref(prefs::kHeliumServicesOrigin, "");
|
||||
@@ -34,7 +34,7 @@
|
||||
registry->RegisterBooleanPref(
|
||||
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc
|
||||
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
|
||||
@@ -57,6 +57,7 @@
|
||||
@@ -58,6 +58,7 @@
|
||||
#include "chrome/common/chrome_version.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "chrome/common/webui_url_constants.h"
|
||||
@@ -42,7 +42,7 @@
|
||||
#include "components/custom_handlers/protocol_handler_registry.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "components/privacy_sandbox/privacy_sandbox_features.h"
|
||||
@@ -480,6 +481,15 @@ StartupBrowserCreatorImpl::DetermineStar
|
||||
@@ -488,6 +489,15 @@ StartupBrowserCreatorImpl::DetermineStar
|
||||
LaunchResult launch_result =
|
||||
tabs.empty() ? LaunchResult::kNormally : LaunchResult::kWithGivenUrls;
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
whats_new::LogStartupType(whats_new::StartupType::kIneligible);
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -1206,6 +1206,10 @@
|
||||
@@ -1228,6 +1228,10 @@
|
||||
"META": {"sizes": {"includes": [30],}},
|
||||
"includes": [7480],
|
||||
},
|
||||
@@ -73,7 +73,7 @@
|
||||
# START ios/ section.
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -8694,6 +8694,7 @@ static_library("browser_generated_files"
|
||||
@@ -8586,6 +8586,7 @@ static_library("browser_generated_files"
|
||||
"//chrome/browser/v8_compile_hints/proto",
|
||||
"//chrome/browser/web_applications/mojom:mojom_web_apps_enum",
|
||||
"//chrome/common/request_header_integrity:buildflags",
|
||||
@@ -83,7 +83,7 @@
|
||||
"//components/webui/chrome_urls/mojom:mojo_bindings",
|
||||
--- a/chrome/chrome_paks.gni
|
||||
+++ b/chrome/chrome_paks.gni
|
||||
@@ -463,11 +463,13 @@ template("chrome_extra_paks") {
|
||||
@@ -470,11 +470,13 @@ template("chrome_extra_paks") {
|
||||
if (!is_android && !is_chromeos) {
|
||||
sources += [
|
||||
"$root_gen_dir/chrome/intro_resources.pak",
|
||||
@@ -104,12 +104,12 @@
|
||||
kChromeUIProfileInternalsHost,
|
||||
content::kChromeUIQuotaInternalsHost,
|
||||
+ kHeliumSetupHost,
|
||||
kChromeUISignInInternalsHost,
|
||||
kChromeUISiteEngagementHost,
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
kChromeUIReloadButtonHost,
|
||||
#endif
|
||||
--- a/chrome/common/webui_url_constants.h
|
||||
+++ b/chrome/common/webui_url_constants.h
|
||||
@@ -595,6 +595,8 @@ inline constexpr char kChromeUIProfilePi
|
||||
@@ -604,6 +604,8 @@ inline constexpr char kChromeUIProfilePi
|
||||
inline constexpr char kChromeUIProfilePickerStartupQuery[] = "startup";
|
||||
inline constexpr char kChromeUIProfilePickerGlicQuery[] = "glic";
|
||||
inline constexpr char kChromeUIProfilePickerUrl[] = "chrome://profile-picker/";
|
||||
@@ -120,7 +120,7 @@
|
||||
"chrome://history-sync-optin/";
|
||||
--- a/chrome/browser/ui/BUILD.gn
|
||||
+++ b/chrome/browser/ui/BUILD.gn
|
||||
@@ -162,6 +162,10 @@ static_library("ui") {
|
||||
@@ -164,6 +164,10 @@ static_library("ui") {
|
||||
"webui/net_internals/net_internals_ui.h",
|
||||
"webui/ntp_tiles_internals_ui.cc",
|
||||
"webui/ntp_tiles_internals_ui.h",
|
||||
@@ -141,7 +141,7 @@
|
||||
#include "chrome/browser/ui/webui/omnibox/omnibox_ui.h"
|
||||
#include "chrome/browser/ui/webui/policy/policy_ui.h"
|
||||
#include "chrome/browser/ui/webui/predictors/predictors_ui.h"
|
||||
@@ -415,6 +416,7 @@ void RegisterChromeWebUIConfigs() {
|
||||
@@ -419,6 +420,7 @@ void RegisterChromeWebUIConfigs() {
|
||||
#if !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(IS_ANDROID)
|
||||
map.AddWebUIConfig(std::make_unique<ManagedUserProfileNoticeUIConfig>());
|
||||
map.AddWebUIConfig(std::make_unique<IntroUIConfig>());
|
||||
@@ -496,9 +496,9 @@
|
||||
registrar.Add(prefs::kHeliumServicesOrigin, observer);
|
||||
registrar.Add(pref_name, observer);
|
||||
}
|
||||
--- a/chrome/browser/ui/browser_navigator.cc
|
||||
+++ b/chrome/browser/ui/browser_navigator.cc
|
||||
@@ -579,7 +579,8 @@ bool IsHostAllowedInIncognito(const GURL
|
||||
--- a/chrome/browser/ui/incognito_allowed_url.cc
|
||||
+++ b/chrome/browser/ui/incognito_allowed_url.cc
|
||||
@@ -48,7 +48,8 @@ bool IsHostAllowedInIncognito(const GURL
|
||||
host != chrome::kChromeUIHelpHost &&
|
||||
host != chrome::kChromeUIHistoryHost &&
|
||||
host != chrome::kChromeUIExtensionsHost &&
|
||||
@@ -510,7 +510,7 @@
|
||||
} // namespace
|
||||
--- a/chrome/browser/ui/webui/settings/search_engines_handler.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/search_engines_handler.cc
|
||||
@@ -344,7 +344,9 @@ void SearchEnginesHandler::HandleSetDefa
|
||||
@@ -349,7 +349,9 @@ void SearchEnginesHandler::HandleSetDefa
|
||||
CHECK(choice_made_location ==
|
||||
search_engines::ChoiceMadeLocation::kSearchSettings ||
|
||||
choice_made_location ==
|
||||
@@ -523,11 +523,101 @@
|
||||
|
||||
--- a/chrome/browser/favicon/favicon_utils.cc
|
||||
+++ b/chrome/browser/favicon/favicon_utils.cc
|
||||
@@ -188,6 +188,7 @@ bool ShouldThemifyFavicon(GURL url) {
|
||||
url.host_piece() != chrome::kChromeUIVersionHost &&
|
||||
url.host_piece() != chrome::kChromeUINetExportHost &&
|
||||
url.host_piece() != chrome::kChromeUINewTabHost &&
|
||||
+ url.host_piece() != chrome::kHeliumSetupHost &&
|
||||
url.host_piece() != password_manager::kChromeUIPasswordManagerHost;
|
||||
@@ -189,6 +189,7 @@ bool ShouldThemifyFavicon(GURL url) {
|
||||
url.host() != chrome::kChromeUIVersionHost &&
|
||||
url.host() != chrome::kChromeUINetExportHost &&
|
||||
url.host() != chrome::kChromeUINewTabHost &&
|
||||
+ url.host() != chrome::kHeliumSetupHost &&
|
||||
url.host() != password_manager::kChromeUIPasswordManagerHost;
|
||||
}
|
||||
|
||||
--- a/chrome/app/settings_strings.grdp
|
||||
+++ b/chrome/app/settings_strings.grdp
|
||||
@@ -1947,6 +1947,12 @@
|
||||
<message name="IDS_SETTINGS_HELIUM_SERVICES_DESCRIPTION" desc="Description of the controls available on the Helium services settings page">
|
||||
Manage what Helium services are allowed in your browser
|
||||
</message>
|
||||
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_SETUP_PENDING_TEXT" desc="Description shown in services settings when user has not completed onboarding">
|
||||
+ Helium services are not available until setup is complete to ensure your privacy and consent.
|
||||
+ </message>
|
||||
+ <message name="IDS_SETTINGS_HELIUM_SERVICES_SETUP_PENDING_BUTTON" desc="Button label directing user to complete onboarding">
|
||||
+ Complete setup
|
||||
+ </message>
|
||||
<message name="IDS_SETTINGS_HELIUM_SERVICES_TOGGLE" desc="Global toggle for enabling/disabling of all Helium services">
|
||||
Allow connecting to Helium services
|
||||
</message>
|
||||
--- 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::kHeliumServicesOrigin] =
|
||||
settings_api::PrefType::kString;
|
||||
+ (*s_allowlist)[::prefs::kHeliumServicesConsented] =
|
||||
+ settings_api::PrefType::kBoolean;
|
||||
|
||||
// Privacy Guide
|
||||
(*s_allowlist)[::prefs::kPrivacyGuideViewed] =
|
||||
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||
@@ -2,10 +2,42 @@
|
||||
.label-wrapper {
|
||||
padding: var(--cr-section-vertical-padding) 0;
|
||||
}
|
||||
+
|
||||
+ #onboarding-link {
|
||||
+ color: var(--text-color-action);
|
||||
+ text-decoration: none;
|
||||
+ }
|
||||
+
|
||||
+ #onboarding-text {
|
||||
+ display: flex;
|
||||
+ align-items: center;
|
||||
+ max-width: 350px;
|
||||
+ gap: calc(var(--cr-section-padding) * 0.8);
|
||||
+ }
|
||||
+
|
||||
+ #onboarding-notice {
|
||||
+ padding: calc(var(--cr-section-padding) / 2) var(--cr-section-padding);
|
||||
+ justify-content: space-between;
|
||||
+ }
|
||||
</style>
|
||||
|
||||
<settings-subpage page-title="$i18n{heliumServicesTitle}" route-path$="[[routePath]]">
|
||||
<div class="cr-col first">
|
||||
+ <template is="dom-if" if="[[!prefs.helium.services.user_consented.value]]">
|
||||
+ <div class="cr-row" id="onboarding-notice">
|
||||
+ <div id="onboarding-text">
|
||||
+ <cr-icon icon="cr:security" aria-hidden="true"></cr-icon>
|
||||
+ <span>$i18n{heliumServicesSetupPendingText}</span>
|
||||
+ </div>
|
||||
+ <cr-button class="action-button">
|
||||
+ <a href="chrome://setup" target="_blank" id="onboarding-link">
|
||||
+ $i18n{heliumServicesSetupPendingButton}
|
||||
+ </a>
|
||||
+ </cr-button>
|
||||
+ </div>
|
||||
+ </template>
|
||||
+
|
||||
+ <template is="dom-if" if="[[prefs.helium.services.user_consented.value]]">
|
||||
<settings-toggle-button id="servicesToggleButton"
|
||||
pref="{{prefs.helium.services.enabled}}"
|
||||
label="$i18n{heliumServicesToggle}"
|
||||
@@ -15,6 +47,7 @@
|
||||
<cr-collapse id="servicesCollapse" opened="[[prefs.helium.services.enabled.value]]">
|
||||
</cr-collapse>
|
||||
</div>
|
||||
+ </template>
|
||||
</div>
|
||||
|
||||
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -2119,6 +2119,8 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
{"securityPageDescription", IDS_SETTINGS_SECURITY_DESCRIPTION},
|
||||
{"heliumServicesTitle", IDS_SETTINGS_HELIUM_SERVICES},
|
||||
{"heliumServicesDescription", IDS_SETTINGS_HELIUM_SERVICES_DESCRIPTION},
|
||||
+ {"heliumServicesSetupPendingText", IDS_SETTINGS_HELIUM_SERVICES_SETUP_PENDING_TEXT},
|
||||
+ {"heliumServicesSetupPendingButton", IDS_SETTINGS_HELIUM_SERVICES_SETUP_PENDING_BUTTON},
|
||||
{"heliumServicesToggle", IDS_SETTINGS_HELIUM_SERVICES_TOGGLE},
|
||||
{"heliumServicesToggleDescription",
|
||||
IDS_SETTINGS_HELIUM_SERVICES_TOGGLE_DESCRIPTION},
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
--- a/chrome/common/pref_names.h
|
||||
+++ b/chrome/common/pref_names.h
|
||||
@@ -1306,6 +1306,10 @@ inline constexpr char
|
||||
"restricted_managed_guest_session_extension_cleanup_exempt_list";
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
+// A boolean pref set to true if new tabs should be created to the next of current active one,
|
||||
+// instead of tab strip end.
|
||||
+inline constexpr char kNewTabNextToActive[] = "helium.browser.new_tab_next_to_active";
|
||||
+
|
||||
// A boolean pref set to true if a Home button to open the Home pages should be
|
||||
// visible on the toolbar.
|
||||
inline constexpr char kShowHomeButton[] = "browser.show_home_button";
|
||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
@@ -113,6 +113,8 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
registry->RegisterIntegerPref(prefs::kSessionRestoreInfoBarTimesShown, 0);
|
||||
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
|
||||
|
||||
+ registry->RegisterBooleanPref(prefs::kNewTabNextToActive, false);
|
||||
+
|
||||
registry->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, true,
|
||||
pref_registration_flags);
|
||||
registry->RegisterBooleanPref(prefs::kShowHomeButton, false,
|
||||
--- a/chrome/browser/ui/tabs/tab_strip_model.cc
|
||||
+++ b/chrome/browser/ui/tabs/tab_strip_model.cc
|
||||
@@ -82,12 +82,14 @@
|
||||
#include "chrome/browser/web_applications/policy/web_app_policy_manager.h"
|
||||
#include "chrome/browser/web_applications/web_app_provider.h"
|
||||
#include "chrome/browser/web_applications/web_app_tab_helper.h"
|
||||
+#include "chrome/common/pref_names.h"
|
||||
#include "chrome/common/webui_url_constants.h"
|
||||
#include "components/commerce/core/commerce_utils.h"
|
||||
#include "components/content_settings/core/browser/host_content_settings_map.h"
|
||||
#include "components/content_settings/core/common/content_settings.h"
|
||||
#include "components/content_settings/core/common/content_settings_types.h"
|
||||
#include "components/feature_engagement/public/feature_constants.h"
|
||||
+#include "components/prefs/pref_service.h"
|
||||
#include "components/reading_list/core/reading_list_model.h"
|
||||
#include "components/tab_groups/tab_group_id.h"
|
||||
#include "components/tab_groups/tab_group_visual_data.h"
|
||||
@@ -1605,7 +1607,11 @@ void TabStripModel::AddTab(std::unique_p
|
||||
// For all other types, respect what was passed to us, normalizing -1s and
|
||||
// values that are too large.
|
||||
if (index < 0 || index > count()) {
|
||||
- index = count();
|
||||
+ if (count() >= 1 && profile_->GetPrefs()->GetBoolean(prefs::kNewTabNextToActive)) {
|
||||
+ index = active_index() + 1;
|
||||
+ } else {
|
||||
+ index = count();
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--- a/chrome/app/settings_strings.grdp
|
||||
+++ b/chrome/app/settings_strings.grdp
|
||||
@@ -270,6 +270,9 @@
|
||||
<message name="IDS_SETTINGS_COLOR_SCHEME_MODE" desc="Text of the label for selecting a color scheme mode for the browser.">
|
||||
Mode
|
||||
</message>
|
||||
+ <message name="IDS_SETTINGS_NEW_TAB_NEXT_TO_ACTIVE_BUTTON" desc="Label for the checkbox which enables or disables behaviour of opening new tabs next to current active tab.">
|
||||
+ Open new tabs next to the active tab
|
||||
+ </message>
|
||||
<message name="IDS_SETTINGS_SHOW_HOME_BUTTON" desc="Label for the checkbox which enables or disables showing the home button in the toolbar.">
|
||||
Show home button
|
||||
</message>
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -521,6 +521,7 @@ void AddAppearanceStrings(content::WebUI
|
||||
{"lightMode", IDS_NTP_CUSTOMIZE_CHROME_COLOR_SCHEME_MODE_LIGHT_LABEL},
|
||||
{"darkMode", IDS_NTP_CUSTOMIZE_CHROME_COLOR_SCHEME_MODE_DARK_LABEL},
|
||||
{"systemMode", IDS_NTP_CUSTOMIZE_CHROME_COLOR_SCHEME_MODE_SYSTEM_LABEL},
|
||||
+ {"openNewTabNextToActive", IDS_SETTINGS_NEW_TAB_NEXT_TO_ACTIVE_BUTTON},
|
||||
{"showHomeButton", IDS_SETTINGS_SHOW_HOME_BUTTON},
|
||||
{"showBookmarksBar", IDS_SETTINGS_SHOW_BOOKMARKS_BAR},
|
||||
{"allowSplitViewDragAndDrop",
|
||||
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
@@ -225,6 +225,10 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
(*s_allowlist)[::prefs::kUseCustomChromeFrame] =
|
||||
settings_api::PrefType::kBoolean;
|
||||
#endif
|
||||
+
|
||||
+ (*s_allowlist)[::prefs::kNewTabNextToActive] =
|
||||
+ settings_api::PrefType::kBoolean;
|
||||
+
|
||||
(*s_allowlist)[::prefs::kShowHomeButton] = settings_api::PrefType::kBoolean;
|
||||
(*s_allowlist)[::prefs::kShowForwardButton] =
|
||||
settings_api::PrefType::kBoolean;
|
||||
--- a/chrome/browser/resources/settings/appearance_page/appearance_behavior_page.html
|
||||
+++ b/chrome/browser/resources/settings/appearance_page/appearance_behavior_page.html
|
||||
@@ -1,6 +1,11 @@
|
||||
<style include="cr-shared-style settings-shared"></style>
|
||||
<settings-section page-title="$i18n{behaviorPageTitle}">
|
||||
|
||||
+ <settings-toggle-button id="newTabNextToActive"
|
||||
+ pref="{{prefs.helium.browser.new_tab_next_to_active}}"
|
||||
+ label="$i18n{openNewTabNextToActive}">
|
||||
+ </settings-toggle-button>
|
||||
+
|
||||
<settings-toggle-button class="hr" id="copyPageUrlShortcut"
|
||||
pref="{{prefs.helium.settings.a11y.copy_page_url_shortcut}}"
|
||||
label="$i18n{copyPageUrlShortcut}">
|
||||
@@ -10,7 +10,7 @@
|
||||
inline constexpr char kViewSourceScheme[] = "view-source";
|
||||
--- a/chrome/browser/profiles/profile_io_data.cc
|
||||
+++ b/chrome/browser/profiles/profile_io_data.cc
|
||||
@@ -38,6 +38,7 @@ bool ProfileIOData::IsHandledProtocol(co
|
||||
@@ -44,6 +44,7 @@ bool ProfileIOData::IsHandledProtocol(st
|
||||
extensions::kExtensionScheme,
|
||||
#endif
|
||||
content::kChromeUIScheme,
|
||||
@@ -62,7 +62,7 @@
|
||||
// Prevent future modification of the scheme lists. This is to prevent
|
||||
--- a/content/renderer/render_thread_impl.cc
|
||||
+++ b/content/renderer/render_thread_impl.cc
|
||||
@@ -888,10 +888,18 @@ void RenderThreadImpl::RegisterSchemes()
|
||||
@@ -879,10 +879,18 @@ void RenderThreadImpl::RegisterSchemes()
|
||||
chrome_scheme);
|
||||
WebSecurityPolicy::RegisterURLSchemeAsWebUI(chrome_scheme);
|
||||
|
||||
@@ -91,23 +91,25 @@
|
||||
url.SchemeIs(content::kChromeUIUntrustedScheme) ||
|
||||
url.SchemeIs(content::kViewSourceScheme) ||
|
||||
url.SchemeIs(url::kTraceScheme) ||
|
||||
--- a/chrome/browser/ui/browser_navigator.cc
|
||||
+++ b/chrome/browser/ui/browser_navigator.cc
|
||||
@@ -550,7 +550,8 @@ std::unique_ptr<content::WebContents> Cr
|
||||
--- a/chrome/browser/ui/incognito_allowed_url.cc
|
||||
+++ b/chrome/browser/ui/incognito_allowed_url.cc
|
||||
@@ -19,7 +19,8 @@ namespace {
|
||||
bool IsHostAllowedInIncognito(const GURL& url) {
|
||||
std::string scheme = url.scheme();
|
||||
std::string_view host = url.host_piece();
|
||||
std::string scheme = url.GetScheme();
|
||||
std::string_view host = url.host();
|
||||
- if (scheme != content::kChromeUIScheme) {
|
||||
+ if (scheme != content::kChromeUIScheme
|
||||
+ && scheme != content::kHeliumUIScheme) {
|
||||
+ if (scheme != content::kChromeUIScheme &&
|
||||
+ scheme != content::kHeliumUIScheme) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -638,6 +639,12 @@ base::WeakPtr<content::NavigationHandle>
|
||||
--- a/chrome/browser/ui/browser_navigator.cc
|
||||
+++ b/chrome/browser/ui/browser_navigator.cc
|
||||
@@ -562,6 +562,12 @@ base::WeakPtr<content::NavigationHandle>
|
||||
}
|
||||
}
|
||||
|
||||
+ if (params->url.scheme_piece() == content::kHeliumUIScheme) {
|
||||
+ if (params->url.scheme() == content::kHeliumUIScheme) {
|
||||
+ GURL::Replacements replacements;
|
||||
+ replacements.SetSchemeStr(content::kChromeUIScheme);
|
||||
+ params->url = params->url.ReplaceComponents(replacements);
|
||||
@@ -118,7 +120,7 @@
|
||||
// handling.
|
||||
--- a/chrome/browser/extensions/extension_tab_util.cc
|
||||
+++ b/chrome/browser/extensions/extension_tab_util.cc
|
||||
@@ -1299,7 +1299,8 @@ bool ExtensionTabUtil::IsKillURL(const G
|
||||
@@ -1274,7 +1274,8 @@ bool ExtensionTabUtil::IsKillURL(const G
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -130,7 +132,7 @@
|
||||
|
||||
--- a/chrome/browser/ui/browser.cc
|
||||
+++ b/chrome/browser/ui/browser.cc
|
||||
@@ -2234,6 +2234,13 @@ void Browser::SetContentsBounds(WebConte
|
||||
@@ -2240,6 +2240,13 @@ void Browser::SetContentsBounds(WebConte
|
||||
}
|
||||
|
||||
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
|
||||
@@ -144,7 +146,7 @@
|
||||
std::vector<StatusBubble*> status_bubbles = GetStatusBubbles();
|
||||
for (StatusBubble* status_bubble : status_bubbles) {
|
||||
StatusBubbleViews* status_bubble_views =
|
||||
@@ -2241,7 +2248,7 @@ void Browser::UpdateTargetURL(WebContent
|
||||
@@ -2247,7 +2254,7 @@ void Browser::UpdateTargetURL(WebContent
|
||||
ContentsWebView* anchor =
|
||||
static_cast<ContentsWebView*>(status_bubble_views->base_view());
|
||||
if (source == anchor->GetWebContents()) {
|
||||
@@ -183,9 +185,9 @@
|
||||
#include "base/threading/thread_local_storage.h"
|
||||
#include "build/build_config.h"
|
||||
+#include "content/public/common/url_constants.h"
|
||||
#include "components/url_formatter/spoof_checks/idn_spoof_checker.h"
|
||||
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
|
||||
#include "third_party/icu/source/common/unicode/uidna.h"
|
||||
#include "third_party/icu/source/common/unicode/utypes.h"
|
||||
@@ -564,6 +565,7 @@ const FormatUrlType kFormatUrlTrimAfterH
|
||||
const FormatUrlType kFormatUrlOmitFileScheme = 1 << 7;
|
||||
const FormatUrlType kFormatUrlOmitMailToScheme = 1 << 8;
|
||||
@@ -226,7 +228,7 @@
|
||||
// bitmask of FormatUrlTypes, see it for details. |unescape_rules| defines how
|
||||
--- a/chrome/browser/ui/web_applications/app_browser_controller.cc
|
||||
+++ b/chrome/browser/ui/web_applications/app_browser_controller.cc
|
||||
@@ -201,7 +201,8 @@ std::u16string AppBrowserController::For
|
||||
@@ -223,7 +223,8 @@ std::u16string AppBrowserController::For
|
||||
url_formatter::FormatUrlTypes format_types) {
|
||||
auto origin = url::Origin::Create(url);
|
||||
return url_formatter::FormatUrl(origin.opaque() ? url : origin.GetURL(),
|
||||
@@ -301,14 +303,76 @@
|
||||
bool devtools_url = (scheme == kDevToolsScheme);
|
||||
if (chrome_url || devtools_url || url::IsStandard(scheme)) {
|
||||
// Replace the about: scheme with the chrome: scheme.
|
||||
@@ -754,7 +759,9 @@ bool IsEquivalentScheme(const std::strin
|
||||
@@ -754,7 +759,11 @@ bool IsEquivalentScheme(const std::strin
|
||||
const std::string& scheme2) {
|
||||
return scheme1 == scheme2 ||
|
||||
(scheme1 == url::kAboutScheme && scheme2 == kChromeUIScheme) ||
|
||||
- (scheme1 == kChromeUIScheme && scheme2 == url::kAboutScheme);
|
||||
+ (scheme1 == kChromeUIScheme && scheme2 == url::kAboutScheme) ||
|
||||
+ (scheme1 == kHeliumUIScheme && scheme2 == url::kAboutScheme) ||
|
||||
+ (scheme1 == url::kAboutScheme && scheme2 == kHeliumUIScheme);
|
||||
+ (scheme1 == url::kAboutScheme && scheme2 == kHeliumUIScheme) ||
|
||||
+ (scheme1 == kHeliumUIScheme && scheme2 == kChromeUIScheme) ||
|
||||
+ (scheme1 == kChromeUIScheme && scheme2 == kHeliumUIScheme);
|
||||
}
|
||||
|
||||
} // namespace url_formatter
|
||||
--- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
|
||||
+++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
|
||||
@@ -372,7 +372,7 @@ std::string ChromeAutocompleteProviderCl
|
||||
std::string
|
||||
ChromeAutocompleteProviderClient::GetEmbedderRepresentationOfAboutScheme()
|
||||
const {
|
||||
- return content::kChromeUIScheme;
|
||||
+ return content::kHeliumUIScheme;
|
||||
}
|
||||
|
||||
std::vector<std::u16string> ChromeAutocompleteProviderClient::GetBuiltinURLs() {
|
||||
--- a/components/omnibox/browser/builtin_provider.cc
|
||||
+++ b/components/omnibox/browser/builtin_provider.cc
|
||||
@@ -73,7 +73,9 @@ void BuiltinProvider::DoBuiltinAutocompl
|
||||
// Include some common builtin URLs as the user types the scheme.
|
||||
for (const std::u16string& url :
|
||||
client_->GetBuiltinsToProvideAsUserTypes()) {
|
||||
- AddBuiltinMatch(url, std::u16string(), styles);
|
||||
+ DCHECK(url.starts_with(u"chrome://"));
|
||||
+ AddBuiltinMatch(std::u16string(url).replace(0, 6, u"helium"),
|
||||
+ std::u16string(), styles);
|
||||
}
|
||||
} else {
|
||||
// Match input about: or |embedderAbout| URL input against builtin URLs.
|
||||
--- a/chrome/browser/ui/browser_commands.cc
|
||||
+++ b/chrome/browser/ui/browser_commands.cc
|
||||
@@ -169,6 +169,7 @@
|
||||
#include "components/tabs/public/tab_interface.h"
|
||||
#include "components/translate/core/browser/language_state.h"
|
||||
#include "components/translate/core/browser/translate_manager.h"
|
||||
+#include "components/url_formatter/url_formatter.h"
|
||||
#include "components/user_education/common/feature_promo/feature_promo_controller.h"
|
||||
#include "components/web_modal/web_contents_modal_dialog_manager.h"
|
||||
#include "components/webapps/common/web_app_id.h"
|
||||
@@ -2441,7 +2442,12 @@ bool IsDebuggerAttachedToCurrentTab(Brow
|
||||
|
||||
void CopyURL(BrowserWindowInterface* bwi, content::WebContents* web_contents) {
|
||||
ui::ScopedClipboardWriter scw(ui::ClipboardBuffer::kCopyPaste);
|
||||
- scw.WriteText(base::UTF8ToUTF16(web_contents->GetVisibleURL().spec()));
|
||||
+ const std::u16string formatted_url =
|
||||
+ url_formatter::FormatUrl(web_contents->GetVisibleURL(),
|
||||
+ url_formatter::kFormatReplaceChromeProtocol,
|
||||
+ base::UnescapeRule::NORMAL, nullptr,
|
||||
+ nullptr, nullptr);
|
||||
+ scw.WriteText(formatted_url);
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
if (toast_features::IsEnabled(toast_features::kLinkCopiedToast)) {
|
||||
--- a/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc
|
||||
+++ b/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc
|
||||
@@ -562,7 +562,8 @@ void TabHoverCardBubbleView::UpdateCardC
|
||||
url_formatter::kFormatUrlOmitDefaults |
|
||||
url_formatter::kFormatUrlOmitHTTPS |
|
||||
url_formatter::kFormatUrlOmitTrivialSubdomains |
|
||||
- url_formatter::kFormatUrlTrimAfterHost,
|
||||
+ url_formatter::kFormatUrlTrimAfterHost |
|
||||
+ url_formatter::kFormatReplaceChromeProtocol,
|
||||
base::UnescapeRule::NORMAL, nullptr, nullptr, nullptr);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
--- a/chrome/common/chrome_features.cc
|
||||
+++ b/chrome/common/chrome_features.cc
|
||||
@@ -880,7 +880,7 @@ BASE_FEATURE(HttpsFirstBalancedMode, bas
|
||||
@@ -1181,7 +1181,7 @@ BASE_FEATURE(kHttpsFirstBalancedMode, ba
|
||||
// Automatically enables HTTPS-First Mode in a balanced configuration when
|
||||
// possible.
|
||||
BASE_FEATURE(HttpsFirstBalancedModeAutoEnable,
|
||||
BASE_FEATURE(kHttpsFirstBalancedModeAutoEnable,
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
--- a/chrome/browser/ui/browser_command_controller.cc
|
||||
+++ b/chrome/browser/ui/browser_command_controller.cc
|
||||
@@ -387,7 +387,10 @@ bool BrowserCommandController::IsReserve
|
||||
command_id == IDC_NEW_INCOGNITO_WINDOW || command_id == IDC_NEW_TAB ||
|
||||
command_id == IDC_NEW_WINDOW || command_id == IDC_RESTORE_TAB ||
|
||||
command_id == IDC_SELECT_NEXT_TAB ||
|
||||
- command_id == IDC_SELECT_PREVIOUS_TAB || command_id == IDC_EXIT;
|
||||
+ command_id == IDC_SELECT_PREVIOUS_TAB || command_id == IDC_EXIT ||
|
||||
+ command_id == IDC_COPY_URL || command_id == IDC_DEV_TOOLS ||
|
||||
+ command_id == IDC_DEV_TOOLS_INSPECT || command_id == IDC_DEV_TOOLS_TOGGLE ||
|
||||
+ command_id == IDC_DEV_TOOLS_CONSOLE;
|
||||
}
|
||||
|
||||
void BrowserCommandController::TabStateChanged() {
|
||||
@@ -16,7 +16,7 @@
|
||||
const char kChromeWebstoreApiURL[] = "trk:07:https://chromewebstore.googleapis.com/";
|
||||
|
||||
const char kAppMenuUtmSource[] = "ext_app_menu";
|
||||
@@ -72,6 +72,7 @@ GURL GetNewWebstoreLaunchURL() {
|
||||
@@ -77,6 +77,7 @@ GURL GetNewWebstoreLaunchURL() {
|
||||
}
|
||||
|
||||
GURL AppendUtmSource(const GURL& url, std::string_view utm_source_value) {
|
||||
@@ -24,7 +24,7 @@
|
||||
return net::AppendQueryParameter(url, "utm_source", utm_source_value);
|
||||
}
|
||||
|
||||
@@ -85,6 +86,8 @@ std::string GetWebstoreItemDetailURLPref
|
||||
@@ -90,6 +91,8 @@ std::string GetWebstoreItemDetailURLPref
|
||||
}
|
||||
|
||||
GURL GetWebstoreItemSnippetURL(const extensions::ExtensionId& extension_id) {
|
||||
@@ -33,7 +33,7 @@
|
||||
if (g_item_snippet_url_for_test_) {
|
||||
// Return `<base URL><extension_id>`. There is no suffix if the URL is
|
||||
// overridden by a test.
|
||||
@@ -114,9 +117,6 @@ GURL GetDefaultWebstoreUpdateUrl() {
|
||||
@@ -119,9 +122,6 @@ GURL GetDefaultWebstoreUpdateUrl() {
|
||||
}
|
||||
|
||||
GURL GetWebstoreUpdateUrl() {
|
||||
@@ -95,12 +95,12 @@
|
||||
+
|
||||
+bool CanPatchUpdateUrl(const GURL& url) {
|
||||
+ GURL chrome_webstore = GetOriginalWebstoreUpdateUrl();
|
||||
+ return chrome_webstore.host_piece() == url.host_piece();
|
||||
+ return chrome_webstore.host() == url.host();
|
||||
+}
|
||||
+
|
||||
+GURL PatchUpdateUrl(const GURL& url) {
|
||||
+ GURL chrome_webstore = GetOriginalWebstoreUpdateUrl();
|
||||
+ if (chrome_webstore.host_piece() == url.host_piece()) {
|
||||
+ if (chrome_webstore.host() == url.host()) {
|
||||
+ return GetDefaultWebstoreUpdateUrl();
|
||||
+ }
|
||||
+
|
||||
@@ -133,7 +133,7 @@
|
||||
+#endif // EXTENSIONS_COMMON_MANIFEST_URL_PATCHER_H_
|
||||
--- a/extensions/common/BUILD.gn
|
||||
+++ b/extensions/common/BUILD.gn
|
||||
@@ -457,6 +457,8 @@ static_library("common") {
|
||||
@@ -456,6 +456,8 @@ static_library("common") {
|
||||
"manifest_handlers/webview_info.h",
|
||||
"manifest_url_handlers.cc",
|
||||
"manifest_url_handlers.h",
|
||||
@@ -155,7 +155,7 @@
|
||||
static bool UpdatesFromGallery(const Extension* extension);
|
||||
--- a/chrome/browser/extensions/updater/chrome_extension_downloader_factory.cc
|
||||
+++ b/chrome/browser/extensions/updater/chrome_extension_downloader_factory.cc
|
||||
@@ -50,7 +50,7 @@ ChromeExtensionDownloaderFactory::Create
|
||||
@@ -53,7 +53,7 @@ ChromeExtensionDownloaderFactory::Create
|
||||
manifest_query_params += "&testrequest=1";
|
||||
}
|
||||
downloader->set_manifest_query_params(manifest_query_params);
|
||||
@@ -166,7 +166,7 @@
|
||||
|
||||
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
@@ -354,6 +354,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
@@ -358,6 +358,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
// Helium services page
|
||||
(*s_allowlist)[::prefs::kHeliumServicesEnabled] =
|
||||
settings_api::PrefType::kBoolean;
|
||||
@@ -174,10 +174,10 @@
|
||||
+ settings_api::PrefType::kBoolean;
|
||||
(*s_allowlist)[::prefs::kHeliumServicesOrigin] =
|
||||
settings_api::PrefType::kString;
|
||||
|
||||
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
|
||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
@@ -200,6 +200,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
@@ -211,6 +211,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
|
||||
{
|
||||
registry->RegisterBooleanPref(prefs::kHeliumServicesEnabled, true);
|
||||
@@ -187,7 +187,7 @@
|
||||
registry->RegisterBooleanPref(prefs::kHeliumServicesConsented, false);
|
||||
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||
@@ -12,6 +12,11 @@
|
||||
@@ -45,6 +45,11 @@
|
||||
</settings-toggle-button>
|
||||
<div class="cr-col">
|
||||
<cr-collapse id="servicesCollapse" opened="[[prefs.helium.services.enabled.value]]">
|
||||
@@ -198,10 +198,10 @@
|
||||
+ </settings-toggle-button>
|
||||
</cr-collapse>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -1958,6 +1958,10 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
@@ -2125,6 +2125,10 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
{"heliumServicesToggle", IDS_SETTINGS_HELIUM_SERVICES_TOGGLE},
|
||||
{"heliumServicesToggleDescription",
|
||||
IDS_SETTINGS_HELIUM_SERVICES_TOGGLE_DESCRIPTION},
|
||||
@@ -214,7 +214,7 @@
|
||||
IDS_SETTINGS_HELIUM_SERVICES_OVERRIDE_DESCRIPTION},
|
||||
--- a/chrome/app/settings_strings.grdp
|
||||
+++ b/chrome/app/settings_strings.grdp
|
||||
@@ -1915,6 +1915,12 @@
|
||||
@@ -1975,6 +1975,12 @@
|
||||
<message name="IDS_SETTINGS_HELIUM_SERVICES_TOGGLE_DESCRIPTION" desc="Description of the toggle for enabling/disabling of all Helium services">
|
||||
When enabled, Helium will be able to connect to anonymous web services to provide additional functionality. When disabled, additional features will not work.
|
||||
</message>
|
||||
@@ -286,7 +286,7 @@
|
||||
PrefChangeRegistrar& registrar, const base::RepeatingClosure& observer);
|
||||
--- a/chrome/browser/extensions/BUILD.gn
|
||||
+++ b/chrome/browser/extensions/BUILD.gn
|
||||
@@ -563,6 +563,7 @@ source_set("extensions") {
|
||||
@@ -559,6 +559,7 @@ source_set("extensions") {
|
||||
"//components/enterprise",
|
||||
"//components/guest_view/buildflags",
|
||||
"//components/guest_view/common",
|
||||
@@ -330,7 +330,7 @@
|
||||
continue;
|
||||
}
|
||||
|
||||
+ if (it.second.update_url().host_piece() == baseUrl.host_piece()) {
|
||||
+ if (it.second.update_url().host() == baseUrl.host()) {
|
||||
+ Profile* profile = Profile::FromBrowserContext(context_.get());
|
||||
+ PrefService* prefs = profile->GetPrefs();
|
||||
+
|
||||
@@ -357,7 +357,7 @@
|
||||
#include "components/update_client/update_query_params.h"
|
||||
#include "content/public/browser/browser_context.h"
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
@@ -210,9 +213,6 @@ void ExtensionUpdater::EnsureDownloaderC
|
||||
@@ -213,9 +216,6 @@ void ExtensionUpdater::EnsureDownloaderC
|
||||
if (!downloader_.get()) {
|
||||
downloader_ = downloader_factory_.Run(this);
|
||||
}
|
||||
@@ -367,7 +367,7 @@
|
||||
}
|
||||
|
||||
void ExtensionUpdater::Start() {
|
||||
@@ -231,6 +231,15 @@ void ExtensionUpdater::Start() {
|
||||
@@ -234,6 +234,15 @@ void ExtensionUpdater::Start() {
|
||||
CheckSoon();
|
||||
ScheduleNextCheck();
|
||||
}
|
||||
@@ -383,7 +383,7 @@
|
||||
}
|
||||
|
||||
void ExtensionUpdater::Stop() {
|
||||
@@ -357,7 +366,6 @@ void ExtensionUpdater::AddToDownloader(
|
||||
@@ -360,7 +369,6 @@ void ExtensionUpdater::AddToDownloader(
|
||||
int request_id,
|
||||
DownloadFetchPriority fetch_priority,
|
||||
ExtensionUpdateCheckParams* update_check_params) {
|
||||
@@ -391,7 +391,7 @@
|
||||
|
||||
// In Kiosk mode extensions are downloaded and updated by the ExternalCache.
|
||||
// Therefore we skip updates here to avoid conflicts.
|
||||
@@ -458,7 +466,7 @@ void ExtensionUpdater::CheckNow(CheckPar
|
||||
@@ -468,7 +476,7 @@ void ExtensionUpdater::CheckNow(CheckPar
|
||||
// Add fetch records for extensions that should be fetched by an update URL.
|
||||
// These extensions are not yet installed. They come from group policy
|
||||
// and external install sources.
|
||||
@@ -400,7 +400,7 @@
|
||||
PendingExtensionManager::Get(profile_);
|
||||
|
||||
ExtensionUpdateCheckParams update_check_params;
|
||||
@@ -592,7 +600,7 @@ void ExtensionUpdater::CheckNow(CheckPar
|
||||
@@ -602,7 +610,7 @@ void ExtensionUpdater::CheckNow(CheckPar
|
||||
// OnExtensionDownloadFinished for each extension that was checked.
|
||||
downloader_->StartAllPending(extension_cache_);
|
||||
|
||||
@@ -409,7 +409,7 @@
|
||||
update_check_params.priority =
|
||||
params.fetch_priority == DownloadFetchPriority::kBackground
|
||||
? ExtensionUpdateCheckParams::UpdateCheckPriority::BACKGROUND
|
||||
@@ -813,6 +821,10 @@ void ExtensionUpdater::CleanUpCrxFileIfN
|
||||
@@ -823,6 +831,10 @@ void ExtensionUpdater::CleanUpCrxFileIfN
|
||||
|
||||
bool ExtensionUpdater::CanUseUpdateService(
|
||||
const ExtensionId& extension_id) const {
|
||||
@@ -422,7 +422,7 @@
|
||||
}
|
||||
--- a/chrome/browser/extensions/webstore_installer.cc
|
||||
+++ b/chrome/browser/extensions/webstore_installer.cc
|
||||
@@ -46,6 +46,7 @@
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "components/crx_file/id_util.h"
|
||||
#include "components/download/public/common/download_url_parameters.h"
|
||||
#include "components/update_client/update_query_params.h"
|
||||
@@ -430,7 +430,7 @@
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/download_manager.h"
|
||||
#include "content/public/browser/navigation_controller.h"
|
||||
@@ -203,7 +204,7 @@ GURL WebstoreInstaller::GetWebstoreInsta
|
||||
@@ -207,7 +208,7 @@ GURL WebstoreInstaller::GetWebstoreInsta
|
||||
if (!install_source.empty())
|
||||
params.push_back(installsource_param);
|
||||
params.push_back("uc");
|
||||
@@ -452,7 +452,7 @@
|
||||
// DownloadManager::DownloadUrl callback.
|
||||
--- a/chrome/browser/extensions/extension_management.cc
|
||||
+++ b/chrome/browser/extensions/extension_management.cc
|
||||
@@ -42,6 +42,8 @@
|
||||
@@ -43,6 +43,8 @@
|
||||
#include "chrome/common/extensions/extension_constants.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "components/crx_file/id_util.h"
|
||||
@@ -461,10 +461,10 @@
|
||||
#include "components/pref_registry/pref_registry_syncable.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
@@ -116,6 +118,12 @@ ExtensionManagement::ExtensionManagement
|
||||
pref_change_callback);
|
||||
pref_change_registrar_.Add(pref_names::kExtensionUnpublishedAvailability,
|
||||
pref_change_callback);
|
||||
@@ -128,6 +130,12 @@ ExtensionManagement::ExtensionManagement
|
||||
pref_change_registrar_.Add(
|
||||
pref_names::kExtensionForceInstallWithNonMalwareViolationsEnabled,
|
||||
pref_change_callback);
|
||||
+
|
||||
+ helium::ConfigurePrefChangeRegistrarFor(
|
||||
+ prefs::kHeliumExtProxyEnabled,
|
||||
@@ -474,7 +474,7 @@
|
||||
// Note that both |global_settings_| and |default_settings_| will be null
|
||||
// before first call to Refresh(), so in order to resolve this, Refresh() must
|
||||
// be called in the initialization of ExtensionManagement.
|
||||
@@ -270,12 +278,20 @@ GURL ExtensionManagement::GetEffectiveUp
|
||||
@@ -287,12 +295,20 @@ GURL ExtensionManagement::GetEffectiveUp
|
||||
<< "Update URL cannot be overridden to be the webstore URL!";
|
||||
return update_url;
|
||||
}
|
||||
@@ -483,7 +483,7 @@
|
||||
+ const GURL& original_url = ManifestURL::GetUpdateURL(&extension);
|
||||
+ const GURL& dummy_url = extension_urls::GetDefaultWebstoreUpdateUrl();
|
||||
+
|
||||
+ if (dummy_url.host_piece() == original_url.host_piece()) {
|
||||
+ if (dummy_url.host() == original_url.host()) {
|
||||
+ return helium::GetExtensionUpdateURL(*profile_->GetPrefs());
|
||||
+ }
|
||||
+
|
||||
@@ -540,7 +540,7 @@
|
||||
void AddObserver(Observer* observer);
|
||||
--- a/chrome/browser/extensions/webstore_data_fetcher.cc
|
||||
+++ b/chrome/browser/extensions/webstore_data_fetcher.cc
|
||||
@@ -87,7 +87,8 @@ void WebstoreDataFetcher::SetMockItemSni
|
||||
@@ -90,7 +90,8 @@ void WebstoreDataFetcher::SetMockItemSni
|
||||
}
|
||||
|
||||
void WebstoreDataFetcher::Start(
|
||||
@@ -550,7 +550,7 @@
|
||||
if (g_mock_item_snippet_response_) {
|
||||
g_mock_item_snippet_response_->set_item_id(id_);
|
||||
delegate_->OnFetchItemSnippetParseSuccess(id_,
|
||||
@@ -95,7 +96,9 @@ void WebstoreDataFetcher::Start(
|
||||
@@ -98,7 +99,9 @@ void WebstoreDataFetcher::Start(
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -575,7 +575,7 @@
|
||||
max_auto_retries_ = max_retries;
|
||||
--- a/chrome/browser/extensions/webstore_standalone_installer.cc
|
||||
+++ b/chrome/browser/extensions/webstore_standalone_installer.cc
|
||||
@@ -21,6 +21,7 @@
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "chrome/browser/extensions/webstore_data_fetcher.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "components/crx_file/id_util.h"
|
||||
@@ -583,7 +583,7 @@
|
||||
#include "content/public/browser/storage_partition.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "extensions/browser/blocklist_extension_prefs.h"
|
||||
@@ -72,9 +73,12 @@ void WebstoreStandaloneInstaller::BeginI
|
||||
@@ -76,9 +77,12 @@ void WebstoreStandaloneInstaller::BeginI
|
||||
webstore_data_fetcher_ =
|
||||
std::make_unique<WebstoreDataFetcher>(this, GURL(), id_);
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
--- a/services/network/public/cpp/features.cc
|
||||
+++ b/services/network/public/cpp/features.cc
|
||||
@@ -202,7 +202,7 @@ BASE_FEATURE(kOmitCorsClientCert,
|
||||
@@ -185,7 +185,7 @@ BASE_FEATURE(kOmitCorsClientCert, base::
|
||||
|
||||
// Enables support for the `Variants` response header and reduce
|
||||
// accept-language. https://github.com/Tanych/accept-language
|
||||
BASE_FEATURE(kReduceAcceptLanguage,
|
||||
"ReduceAcceptLanguage",
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
-BASE_FEATURE(kReduceAcceptLanguage, base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
+BASE_FEATURE(kReduceAcceptLanguage, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE_PARAM(base::TimeDelta,
|
||||
kReduceAcceptLanguageCacheDuration,
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
#endif // COMPONENTS_HELIUM_SERVICES_PREF_NAMES_H_
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -8247,6 +8247,8 @@ static_library("browser") {
|
||||
@@ -8261,6 +8261,8 @@ static_library("browser") {
|
||||
deps += [
|
||||
"//components/spellcheck/browser",
|
||||
"//components/spellcheck/common",
|
||||
@@ -107,7 +107,7 @@
|
||||
if (!is_android) {
|
||||
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
@@ -358,6 +358,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
@@ -362,6 +362,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
settings_api::PrefType::kBoolean;
|
||||
(*s_allowlist)[::prefs::kHeliumBangsEnabled] =
|
||||
settings_api::PrefType::kBoolean;
|
||||
@@ -115,10 +115,10 @@
|
||||
+ settings_api::PrefType::kBoolean;
|
||||
(*s_allowlist)[::prefs::kHeliumServicesOrigin] =
|
||||
settings_api::PrefType::kString;
|
||||
|
||||
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
|
||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
@@ -202,6 +202,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
@@ -213,6 +213,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
registry->RegisterBooleanPref(prefs::kHeliumServicesEnabled, true);
|
||||
registry->RegisterBooleanPref(prefs::kHeliumBangsEnabled, true);
|
||||
registry->RegisterBooleanPref(prefs::kHeliumExtProxyEnabled, true);
|
||||
@@ -128,9 +128,9 @@
|
||||
registry->RegisterBooleanPref(prefs::kHeliumServicesConsented, false);
|
||||
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||
@@ -22,6 +22,13 @@
|
||||
label="$i18n{heliumExtProxyToggle}"
|
||||
sub-label="$i18n{heliumExtProxyToggleDescription}">
|
||||
@@ -55,6 +55,13 @@
|
||||
label="$i18n{heliumBangsToggle}"
|
||||
sub-label="$i18n{heliumBangsToggleDescription}">
|
||||
</settings-toggle-button>
|
||||
+ <if expr="use_renderer_spellchecker">
|
||||
+ <settings-toggle-button id="spellcheckToggleButton"
|
||||
@@ -141,10 +141,20 @@
|
||||
+ </if>
|
||||
</cr-collapse>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
--- a/chrome/app/settings_strings.grdp
|
||||
+++ b/chrome/app/settings_strings.grdp
|
||||
@@ -1927,6 +1927,12 @@
|
||||
@@ -1291,6 +1291,9 @@
|
||||
<message name="IDS_SETTINGS_LANGUAGES_DICTIONARY_DOWNLOAD_FAILED_HELP" desc="Error message when spell dictionary download fails more than once possibly due to a network policy or configuration.">
|
||||
Please check with your network administrator to make sure that the firewall is not blocking downloads from Google servers.
|
||||
</message>
|
||||
+ <message name="IDS_SETTINGS_LANGUAGES_DICTIONARY_DOWNLOAD_FAILED_HELP_HELIUM" desc="Error message when spell dictionary download fails more than once possibly due to a network policy or configuration.">
|
||||
+ Please check that Helium services are enabled (including spell check downloads) and make sure that the firewall is not blocking downloads from Helium servers.
|
||||
+ </message>
|
||||
</if>
|
||||
</if>
|
||||
<if expr="is_chromeos">
|
||||
@@ -1987,6 +1990,12 @@
|
||||
<message name="IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE_DESCRIPTION" desc="Description of the toggle for enabling/disabling of downloading bangs">
|
||||
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>
|
||||
@@ -159,7 +169,16 @@
|
||||
</message>
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -1959,6 +1959,9 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
@@ -1241,7 +1241,7 @@ void AddLanguagesStrings(content::WebUID
|
||||
{"languagesDictionaryDownloadError",
|
||||
IDS_SETTINGS_LANGUAGES_DICTIONARY_DOWNLOAD_FAILED},
|
||||
{"languagesDictionaryDownloadErrorHelp",
|
||||
- IDS_SETTINGS_LANGUAGES_DICTIONARY_DOWNLOAD_FAILED_HELP},
|
||||
+ IDS_SETTINGS_LANGUAGES_DICTIONARY_DOWNLOAD_FAILED_HELP_HELIUM},
|
||||
#endif
|
||||
#endif // !BUILDFLAG(IS_CHROMEOS)
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
@@ -2128,6 +2128,9 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
{"heliumBangsToggle", IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE},
|
||||
{"heliumBangsToggleDescription",
|
||||
IDS_SETTINGS_HELIUM_SERVICES_BANGS_TOGGLE_DESCRIPTION},
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
// The default implementation for most embedders returns an empty string.
|
||||
--- a/extensions/browser/updater/extension_downloader.cc
|
||||
+++ b/extensions/browser/updater/extension_downloader.cc
|
||||
@@ -352,6 +352,10 @@ void ExtensionDownloader::DoStartAllPend
|
||||
@@ -346,6 +346,10 @@ void ExtensionDownloader::DoStartAllPend
|
||||
AddToFetches(fetches_preparing, std::move(task));
|
||||
pending_tasks_.clear();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.cc
|
||||
+++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_toolbar/customize_toolbar_handler.cc
|
||||
@@ -37,15 +37,6 @@ MojoActionForChromeAction(actions::Actio
|
||||
@@ -37,28 +37,12 @@ MojoActionForChromeAction(actions::Actio
|
||||
return side_panel::customize_chrome::mojom::ActionId::kShowBookmarks;
|
||||
case kActionSidePanelShowHistoryCluster:
|
||||
return side_panel::customize_chrome::mojom::ActionId::kShowHistoryCluster;
|
||||
@@ -16,8 +16,7 @@
|
||||
case kActionHome:
|
||||
return side_panel::customize_chrome::mojom::ActionId::kHome;
|
||||
case kActionForward:
|
||||
@@ -56,13 +47,6 @@ MojoActionForChromeAction(actions::Actio
|
||||
return side_panel::customize_chrome::mojom::ActionId::kExtensions;
|
||||
return side_panel::customize_chrome::mojom::ActionId::kForward;
|
||||
case kActionNewIncognitoWindow:
|
||||
return side_panel::customize_chrome::mojom::ActionId::kNewIncognitoWindow;
|
||||
- case kActionShowPasswordsBubbleOrPage:
|
||||
@@ -30,7 +29,7 @@
|
||||
case kActionShowDownloads:
|
||||
return side_panel::customize_chrome::mojom::ActionId::kShowDownloads;
|
||||
case kActionClearBrowsingData:
|
||||
@@ -101,14 +85,6 @@ std::optional<actions::ActionId> ChromeA
|
||||
@@ -97,26 +81,12 @@ std::optional<actions::ActionId> ChromeA
|
||||
return kActionSidePanelShowBookmarks;
|
||||
case side_panel::customize_chrome::mojom::ActionId::kShowHistoryCluster:
|
||||
return kActionSidePanelShowHistoryCluster;
|
||||
@@ -45,8 +44,7 @@
|
||||
case side_panel::customize_chrome::mojom::ActionId::kHome:
|
||||
return kActionHome;
|
||||
case side_panel::customize_chrome::mojom::ActionId::kForward:
|
||||
@@ -119,12 +95,6 @@ std::optional<actions::ActionId> ChromeA
|
||||
return kActionExtensions;
|
||||
return kActionForward;
|
||||
case side_panel::customize_chrome::mojom::ActionId::kNewIncognitoWindow:
|
||||
return kActionNewIncognitoWindow;
|
||||
- case side_panel::customize_chrome::mojom::ActionId::kShowPasswordManager:
|
||||
@@ -58,7 +56,7 @@
|
||||
case side_panel::customize_chrome::mojom::ActionId::kShowDownloads:
|
||||
return kActionShowDownloads;
|
||||
case side_panel::customize_chrome::mojom::ActionId::kClearBrowsingData:
|
||||
@@ -322,16 +292,8 @@ void CustomizeToolbarHandler::ListAction
|
||||
@@ -291,16 +261,8 @@ void CustomizeToolbarHandler::ListAction
|
||||
add_action(kActionNewIncognitoWindow,
|
||||
side_panel::customize_chrome::mojom::CategoryId::kNavigation);
|
||||
|
||||
@@ -75,7 +73,7 @@
|
||||
add_action(kActionSidePanelShowHistoryCluster,
|
||||
side_panel::customize_chrome::mojom::CategoryId::kYourChrome);
|
||||
add_action(kActionShowDownloads,
|
||||
@@ -345,18 +307,12 @@ void CustomizeToolbarHandler::ListAction
|
||||
@@ -314,18 +276,12 @@ void CustomizeToolbarHandler::ListAction
|
||||
}
|
||||
add_action(kActionPrint,
|
||||
side_panel::customize_chrome::mojom::CategoryId::kTools);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
--- a/chrome/common/chrome_paths.cc
|
||||
+++ b/chrome/common/chrome_paths.cc
|
||||
@@ -154,6 +154,11 @@ bool PathProvider(int key, base::FilePat
|
||||
@@ -153,6 +153,11 @@ bool PathProvider(int key, base::FilePat
|
||||
}
|
||||
create_dir = true;
|
||||
break;
|
||||
@@ -37,7 +37,7 @@
|
||||
case chrome::DIR_USER_DOCUMENTS:
|
||||
if (!GetUserDocumentsDirectory(&cur)) {
|
||||
return false;
|
||||
@@ -483,11 +488,28 @@ bool PathProvider(int key, base::FilePat
|
||||
@@ -481,11 +486,28 @@ bool PathProvider(int key, base::FilePat
|
||||
#endif // !BUILDFLAG(IS_MAC)
|
||||
break;
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
return false;
|
||||
--- a/chrome/common/chrome_paths_mac.mm
|
||||
+++ b/chrome/common/chrome_paths_mac.mm
|
||||
@@ -111,6 +111,10 @@ bool GetDefaultUserDataDirectory(base::F
|
||||
@@ -87,6 +87,10 @@ bool GetDefaultUserDataDirectory(base::F
|
||||
return GetDefaultUserDataDirectoryForProduct(ProductDirName(), result);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
--- a/components/search_engines/template_url_prepopulate_data.cc
|
||||
+++ b/components/search_engines/template_url_prepopulate_data.cc
|
||||
@@ -258,7 +258,7 @@ std::unique_ptr<TemplateURLData> GetPrep
|
||||
const std::vector<const PrepopulatedEngine*>&
|
||||
regional_prepopulated_engines) {
|
||||
return FindPrepopulatedEngineInternal(prefs, regional_prepopulated_engines,
|
||||
- google.id,
|
||||
+ duckduckgo.id,
|
||||
/*use_first_as_fallback=*/true);
|
||||
}
|
||||
|
||||
--- a/third_party/search_engines_data/resources/definitions/regional_settings.json
|
||||
+++ b/third_party/search_engines_data/resources/definitions/regional_settings.json
|
||||
@@ -3,6 +3,19 @@
|
||||
// found in the LICENSE file.
|
||||
{
|
||||
"elements": {
|
||||
+ "ZZ": {
|
||||
+ // Default
|
||||
+ "search_engines": [
|
||||
+ "&duckduckgo",
|
||||
+ "&ecosia",
|
||||
+ "&bing",
|
||||
+ "&break_stuff_google",
|
||||
+ "&qwant",
|
||||
+ "&kagi"
|
||||
+ ]
|
||||
+ }
|
||||
+ },
|
||||
+ "elements_ignored": {
|
||||
"AE": {
|
||||
// United Arab Emirates
|
||||
"search_engines": [
|
||||
@@ -1154,7 +1167,8 @@
|
||||
"name": "kRegionalSettings",
|
||||
"export_items": false,
|
||||
"map_key_type": "country_codes::CountryId",
|
||||
- "map_aliases": {
|
||||
+ "map_aliases": {},
|
||||
+ "map_aliases_ignored": {
|
||||
"AD": "ES", // Andorra
|
||||
"AF": "ZZ", // Afghanistan
|
||||
"AG": "ZZ", // Antigua and Barbuda
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
--- a/build/config/chrome_build.gni
|
||||
+++ b/build/config/chrome_build.gni
|
||||
@@ -92,4 +92,4 @@ declare_args() {
|
||||
@@ -101,4 +101,4 @@ declare_args() {
|
||||
|
||||
# Whether to enable built-in branding assets (logos & marketing snippets) for
|
||||
# search providers in choice UIs.
|
||||
-enable_builtin_search_provider_assets = is_chrome_branded
|
||||
-enable_builtin_search_provider_assets = is_internal_chrome_branded
|
||||
+enable_builtin_search_provider_assets = true
|
||||
+25
-19
@@ -8,15 +8,15 @@
|
||||
#include "chrome/browser/signin/account_consistency_mode_manager.h"
|
||||
#include "chrome/browser/signin/account_consistency_mode_manager_factory.h"
|
||||
#include "chrome/browser/signin/chrome_signin_client_factory.h"
|
||||
@@ -84,7 +83,6 @@
|
||||
#include "components/plus_addresses/grit/plus_addresses_strings.h"
|
||||
#include "components/plus_addresses/plus_address_service.h"
|
||||
@@ -83,7 +82,6 @@
|
||||
#include "components/plus_addresses/core/browser/plus_address_service.h"
|
||||
#include "components/plus_addresses/core/common/features.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
-#include "components/regional_capabilities/regional_capabilities_service.h"
|
||||
#include "components/safe_browsing/core/common/features.h"
|
||||
#include "components/safe_browsing/core/common/hashprefix_realtime/hash_realtime_utils.h"
|
||||
#include "components/saved_tab_groups/public/features.h"
|
||||
@@ -2484,14 +2482,9 @@ void AddSearchStrings(content::WebUIData
|
||||
@@ -2662,14 +2660,9 @@ void AddSearchStrings(content::WebUIData
|
||||
html_source->AddString("searchExplanationLearnMoreURL",
|
||||
chrome::kOmniboxLearnMoreURL);
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
"saveGuestChoiceText", IDS_SEARCH_ENGINE_CHOICE_GUEST_SESSION_CHECKBOX);
|
||||
--- a/components/regional_capabilities/regional_capabilities_service.cc
|
||||
+++ b/components/regional_capabilities/regional_capabilities_service.cc
|
||||
@@ -166,6 +166,8 @@ std::pair<CountryId, LoadedCountrySource
|
||||
@@ -167,6 +167,8 @@ std::pair<CountryId, LoadedCountrySource
|
||||
// Pass `out_scope_check_outcome` to collect information about the outcome of
|
||||
// the program checks.
|
||||
Program CountryIdToProgram(const CountryId& country_id) {
|
||||
@@ -43,7 +43,24 @@
|
||||
static constexpr Program kCountryDerivedPrograms[] = {
|
||||
#if BUILDFLAG(IS_IOS)
|
||||
// Only iOS can derive Taiyaki scope directly from the country.
|
||||
@@ -332,6 +334,7 @@ RegionalCapabilitiesService::GetChoiceSc
|
||||
@@ -290,14 +292,13 @@ RegionalCapabilitiesService::GetRegional
|
||||
}
|
||||
|
||||
bool RegionalCapabilitiesService::IsInSearchEngineChoiceScreenRegion() {
|
||||
- return GetChoiceScreenEligibilityConfig().has_value();
|
||||
+ return true;
|
||||
}
|
||||
|
||||
// static
|
||||
bool RegionalCapabilitiesService::IsInSearchEngineChoiceScreenRegion(
|
||||
const country_codes::CountryId& tested_country_id) {
|
||||
- return GetSettingsForProgram(CountryIdToProgram(tested_country_id))
|
||||
- .choice_screen_eligibility_config.has_value();
|
||||
+ return true;
|
||||
}
|
||||
|
||||
bool RegionalCapabilitiesService::
|
||||
@@ -358,6 +359,7 @@ RegionalCapabilitiesService::GetChoiceSc
|
||||
}
|
||||
|
||||
bool RegionalCapabilitiesService::IsInEeaCountry() {
|
||||
@@ -51,21 +68,10 @@
|
||||
// Feature behaviour was directly based on the current country, as a
|
||||
// decentralised way to express a concept we are now framing as "program
|
||||
// settings". Here we check for the program reference directly as command line
|
||||
--- a/components/regional_capabilities/regional_capabilities_utils.cc
|
||||
+++ b/components/regional_capabilities/regional_capabilities_utils.cc
|
||||
@@ -55,7 +55,7 @@ void ShufflePrepopulatedEngines(std::vec
|
||||
} // namespace
|
||||
|
||||
bool IsEeaCountry(country_codes::CountryId country_id) {
|
||||
- return kEeaChoiceCountriesIds.contains(country_id);
|
||||
+ return true;
|
||||
}
|
||||
|
||||
std::optional<SearchEngineCountryOverride> GetSearchEngineCountryOverride() {
|
||||
--- a/components/search_engine_choice_strings.grdp
|
||||
+++ b/components/search_engine_choice_strings.grdp
|
||||
@@ -98,6 +98,10 @@
|
||||
These search engines are popular in your region
|
||||
@@ -19,6 +19,10 @@
|
||||
<ph name="SEARCH_ENGINE_NAME">$1<ex>Google</ex></ph> is now your default search engine
|
||||
</message>
|
||||
|
||||
+ <message name="IDS_SEARCH_ENGINE_CHOICE_SETTINGS_SUBTITLE_HELIUM" desc="This is the body text of a dialog where the user can change their default search engine. This string explains that the list of search engines is randomized (not in order of recommendation).">
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/chrome_repack_locales.gni
|
||||
+++ b/chrome/chrome_repack_locales.gni
|
||||
@@ -100,12 +100,6 @@ template("chrome_repack_locales") {
|
||||
@@ -99,12 +99,6 @@ template("chrome_repack_locales") {
|
||||
}
|
||||
compress = true
|
||||
}
|
||||
@@ -15,7 +15,7 @@
|
||||
[ "${root_gen_dir}/extensions/strings/extensions_strings_" ]
|
||||
--- a/components/search_engines/template_url.cc
|
||||
+++ b/components/search_engines/template_url.cc
|
||||
@@ -57,10 +57,6 @@
|
||||
@@ -58,10 +58,6 @@
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
namespace {
|
||||
|
||||
const bool kEnableBuiltinSearchProviderAssets =
|
||||
@@ -1856,18 +1852,6 @@ std::string TemplateURL::GetBuiltinDescr
|
||||
@@ -1885,18 +1881,6 @@ std::string TemplateURL::GetBuiltinDescr
|
||||
}
|
||||
|
||||
std::optional<std::u16string> TemplateURL::GetBuiltinMarketingSnippet() const {
|
||||
+1
-43
@@ -1,6 +1,6 @@
|
||||
--- a/third_party/search_engines_data/resources/definitions/prepopulated_engines.json
|
||||
+++ b/third_party/search_engines_data/resources/definitions/prepopulated_engines.json
|
||||
@@ -166,30 +166,14 @@
|
||||
@@ -170,30 +170,14 @@
|
||||
"id": 114
|
||||
},
|
||||
|
||||
@@ -35,17 +35,6 @@
|
||||
"id": 1
|
||||
},
|
||||
|
||||
--- a/components/search_engines/template_url_prepopulate_data.cc
|
||||
+++ b/components/search_engines/template_url_prepopulate_data.cc
|
||||
@@ -235,7 +235,7 @@ std::unique_ptr<TemplateURLData> GetPrep
|
||||
std::vector<const TemplateURLPrepopulateData::PrepopulatedEngine*>
|
||||
regional_prepopulated_engines) {
|
||||
return FindPrepopulatedEngineInternal(prefs, regional_prepopulated_engines,
|
||||
- google.id,
|
||||
+ duckduckgo.id,
|
||||
/*use_first_as_fallback=*/true);
|
||||
}
|
||||
|
||||
--- a/components/search_engines/search_engine_utils.cc
|
||||
+++ b/components/search_engines/search_engine_utils.cc
|
||||
@@ -35,7 +35,7 @@ SearchEngineType GetEngineType(const GUR
|
||||
@@ -57,34 +46,3 @@
|
||||
|
||||
// Now check the rest of the prepopulate data.
|
||||
for (const auto* engine : TemplateURLPrepopulateData::kAllEngines) {
|
||||
--- a/third_party/search_engines_data/resources/definitions/regional_settings.json
|
||||
+++ b/third_party/search_engines_data/resources/definitions/regional_settings.json
|
||||
@@ -3,6 +3,18 @@
|
||||
// found in the LICENSE file.
|
||||
{
|
||||
"elements": {
|
||||
+ "ZZ": {
|
||||
+ // Default
|
||||
+ "search_engines": [
|
||||
+ "&duckduckgo",
|
||||
+ "&ecosia",
|
||||
+ "&bing",
|
||||
+ "&break_stuff_google",
|
||||
+ "&qwant"
|
||||
+ ]
|
||||
+ }
|
||||
+ },
|
||||
+ "elements_ignored": {
|
||||
"AE": {
|
||||
// United Arab Emirates
|
||||
"search_engines": [
|
||||
@@ -1183,7 +1195,8 @@
|
||||
"name": "kRegionalSettings",
|
||||
"export_items": false,
|
||||
"map_key_type": "country_codes::CountryId",
|
||||
- "map_aliases": {
|
||||
+ "map_aliases": {},
|
||||
+ "map_aliases_ignored": {
|
||||
"AD": "ES", // Andorra
|
||||
"AF": "ZZ", // Afghanistan
|
||||
"AG": "ZZ", // Antigua and Barbuda
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/app/settings_strings.grdp
|
||||
+++ b/chrome/app/settings_strings.grdp
|
||||
@@ -1903,6 +1903,31 @@
|
||||
@@ -1941,6 +1941,31 @@
|
||||
<message name="IDS_SETTINGS_SECURITY_DESCRIPTION" desc="Description of the controls available on the security settings page">
|
||||
Safe Browsing (protection from dangerous sites) and other security settings
|
||||
</message>
|
||||
@@ -34,8 +34,8 @@
|
||||
Google Advanced Protection Program
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -1953,6 +1953,18 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
{"permissionsPageDescription", IDS_SETTINGS_PERMISSIONS_DESCRIPTION},
|
||||
@@ -2117,6 +2117,18 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
{"siteSettingsSublabel", IDS_SETTINGS_PERMISSIONS_DESCRIPTION},
|
||||
{"securityPageTitle", IDS_SETTINGS_SECURITY},
|
||||
{"securityPageDescription", IDS_SETTINGS_SECURITY_DESCRIPTION},
|
||||
+ {"heliumServicesTitle", IDS_SETTINGS_HELIUM_SERVICES},
|
||||
@@ -55,35 +55,38 @@
|
||||
{"advancedProtectionProgramDesc",
|
||||
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.html
|
||||
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html
|
||||
@@ -83,6 +83,11 @@
|
||||
sub-label="$i18n{permissionsPageDescription}"
|
||||
on-click="onPermissionsPageClick_"
|
||||
role-description="$i18n{subpageArrowRoleDescription}"></cr-link-row>
|
||||
+ <cr-link-row id="heliumServicesLinkRow" start-icon="cr:chrome-product"
|
||||
+ class="hr" label="$i18n{heliumServicesTitle}"
|
||||
+ sub-label="$i18n{heliumServicesDescription}"
|
||||
+ on-click="onHeliumServicesPageClick_"
|
||||
+ role-description="$i18n{subpageArrowRoleDescription}"></cr-link-row>
|
||||
<cr-toast id="deleteBrowsingDataToast" duration="5000">
|
||||
<div>[[dbdDeletionConfirmationToastLabel_]]</div>
|
||||
</cr-toast>
|
||||
@@ -115,6 +120,13 @@
|
||||
</settings-subpage>
|
||||
</template>
|
||||
@@ -67,6 +67,11 @@
|
||||
sub-label="$i18n{siteSettingsSublabel}"
|
||||
on-click="onSiteSettingsLinkRowClick_"
|
||||
role-description="$i18n{subpageArrowRoleDescription}"></cr-link-row>
|
||||
+ <cr-link-row id="heliumServicesLinkRow" start-icon="cr:chrome-product"
|
||||
+ class="hr" label="$i18n{heliumServicesTitle}"
|
||||
+ sub-label="$i18n{heliumServicesDescription}"
|
||||
+ on-click="onHeliumServicesPageClick_"
|
||||
+ role-description="$i18n{subpageArrowRoleDescription}"></cr-link-row>
|
||||
<cr-toast id="deleteBrowsingDataToast" duration="5000">
|
||||
<div>[[dbdDeletionConfirmationToastLabel_]]</div>
|
||||
</cr-toast>
|
||||
--- a/chrome/browser/resources/settings/privacy_page/privacy_page_index.html
|
||||
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page_index.html
|
||||
@@ -47,6 +47,14 @@
|
||||
</settings-privacy-page>
|
||||
</template>
|
||||
|
||||
+ <template is="dom-if" route-path="/privacy/services">
|
||||
+ <settings-subpage id="services" page-title="$i18n{heliumServicesTitle}"
|
||||
+ associated-control="[[$$('#heliumServicesLinkRow')]]">
|
||||
+ <settings-helium-services-page prefs="{{prefs}}"></settings-helium-services-page>
|
||||
+ </settings-subpage>
|
||||
+ </template>
|
||||
+ <template is="dom-if" if="[[renderView_(
|
||||
+ routes_.HELIUM_SERVICES, currentRoute, inSearchMode)]]">
|
||||
+ <settings-helium-services-page slot="view" id="heliumServices"
|
||||
+ data-parent-view-id="privacy" prefs="{{prefs}}"
|
||||
+ route-path$="[[routes_.HELIUM_SERVICES.path]]">
|
||||
+ </settings-helium-services-page>
|
||||
+ </template>
|
||||
+
|
||||
<template is="dom-if" route-path="/security">
|
||||
<settings-subpage id="security" page-title="$i18n{securityPageTitle}"
|
||||
associated-control="[[$$('#securityLinkRow')]]"
|
||||
<template is="dom-if" if="[[isAdPrivacyAvailable_]]" restamp>
|
||||
<template is="dom-if" if="[[renderView_(
|
||||
routes_.PRIVACY_SANDBOX, currentRoute, inSearchMode)]]"
|
||||
--- a/chrome/browser/resources/settings/privacy_page/privacy_page.ts
|
||||
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page.ts
|
||||
@@ -415,6 +415,12 @@ export class SettingsPrivacyPageElement
|
||||
@@ -172,6 +172,12 @@ export class SettingsPrivacyPageElement
|
||||
Router.getInstance().navigateTo(routes.SITE_SETTINGS);
|
||||
}
|
||||
|
||||
@@ -96,6 +99,27 @@
|
||||
private onSecurityPageClick_() {
|
||||
this.interactedWithPage_();
|
||||
this.metricsBrowserProxy_.recordAction(
|
||||
@@ -254,6 +260,10 @@ export class SettingsPrivacyPageElement
|
||||
override getFocusConfig() {
|
||||
const map = new Map();
|
||||
|
||||
+ if (routes.HELIUM_SERVICES) {
|
||||
+ map.set(routes.HELIUM_SERVICES.path, '#heliumServicesLinkRow');
|
||||
+ }
|
||||
+
|
||||
if (routes.COOKIES) {
|
||||
map.set(routes.COOKIES.path, '#thirdPartyCookiesLinkRow');
|
||||
}
|
||||
@@ -287,6 +297,9 @@ export class SettingsPrivacyPageElement
|
||||
override getAssociatedControlFor(childViewId: string): HTMLElement {
|
||||
let triggerId: string|null = null;
|
||||
switch (childViewId) {
|
||||
+ case 'heliumServices':
|
||||
+ triggerId = 'heliumServicesLinkRow';
|
||||
+ break;
|
||||
case 'cookies':
|
||||
triggerId = 'thirdPartyCookiesLinkRow';
|
||||
break;
|
||||
--- a/chrome/browser/resources/settings/router.ts
|
||||
+++ b/chrome/browser/resources/settings/router.ts
|
||||
@@ -32,6 +32,7 @@ export interface SettingsRoutes {
|
||||
@@ -120,22 +144,23 @@
|
||||
--- a/chrome/browser/resources/settings/BUILD.gn
|
||||
+++ b/chrome/browser/resources/settings/BUILD.gn
|
||||
@@ -156,6 +156,7 @@ build_webui("build") {
|
||||
"privacy_page/security_keys_subpage.ts",
|
||||
"privacy_page/security_page_v2.ts",
|
||||
"privacy_page/security_page.ts",
|
||||
"privacy_page/security/security_page_v2.ts",
|
||||
"privacy_page/security/security_page.ts",
|
||||
"privacy_page/security/security_page_feature_row.ts",
|
||||
+ "privacy_page/services_page.ts",
|
||||
"privacy_sandbox/privacy_sandbox_ad_measurement_subpage.ts",
|
||||
"privacy_sandbox/privacy_sandbox_fledge_subpage.ts",
|
||||
"privacy_sandbox/privacy_sandbox_interest_item.ts",
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||
@@ -0,0 +1,45 @@
|
||||
@@ -0,0 +1,47 @@
|
||||
+<style include="cr-shared-style settings-shared">
|
||||
+ .label-wrapper {
|
||||
+ padding: var(--cr-section-vertical-padding) 0;
|
||||
+ }
|
||||
+</style>
|
||||
+
|
||||
+<settings-subpage page-title="$i18n{heliumServicesTitle}" route-path$="[[routePath]]">
|
||||
+<div class="cr-col first">
|
||||
+ <settings-toggle-button id="servicesToggleButton"
|
||||
+ pref="{{prefs.helium.services.enabled}}"
|
||||
@@ -175,9 +200,10 @@
|
||||
+ />
|
||||
+ </div>
|
||||
+</div>
|
||||
+</settings-subpage>
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/resources/settings/privacy_page/services_page.ts
|
||||
@@ -0,0 +1,74 @@
|
||||
@@ -0,0 +1,67 @@
|
||||
+// 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.
|
||||
@@ -204,16 +230,9 @@
|
||||
+ }
|
||||
+
|
||||
+ static get properties() {
|
||||
+ return {
|
||||
+ prefs: {
|
||||
+ type: Object,
|
||||
+ notify: true,
|
||||
+ },
|
||||
+ };
|
||||
+ return {};
|
||||
+ }
|
||||
+
|
||||
+ declare prefs: {[key: string]: any} | undefined;
|
||||
+
|
||||
+ private toOrigin(thing: string) {
|
||||
+ try {
|
||||
+ return new URL(thing).origin;
|
||||
@@ -254,22 +273,22 @@
|
||||
+customElements.define(SettingsHeliumServicesPageElement.is, SettingsHeliumServicesPageElement);
|
||||
--- a/chrome/browser/resources/settings/lazy_load.ts
|
||||
+++ b/chrome/browser/resources/settings/lazy_load.ts
|
||||
@@ -35,6 +35,7 @@ import './privacy_sandbox/privacy_sandbo
|
||||
import './privacy_page/security_keys_subpage.js';
|
||||
import './privacy_page/security_page_v2.js';
|
||||
import './privacy_page/security_page.js';
|
||||
@@ -25,6 +25,7 @@ import './privacy_page/privacy_guide/pri
|
||||
import './privacy_page/security/security_keys_subpage.js';
|
||||
import './privacy_page/security/security_page_v2.js';
|
||||
import './privacy_page/security/security_page.js';
|
||||
+import './privacy_page/services_page.js';
|
||||
import './safety_hub/safety_hub_page.js';
|
||||
import './safety_hub/safety_hub_entry_point.js';
|
||||
import './site_settings/all_sites.js';
|
||||
@@ -212,6 +213,7 @@ export {ResetDialogPage, SettingsSecurit
|
||||
export {SetPinDialogPage, SettingsSecurityKeysSetPinDialogElement} from './privacy_page/security_keys_set_pin_dialog.js';
|
||||
export {SecurityKeysSubpageElement} from './privacy_page/security_keys_subpage.js';
|
||||
export {HttpsFirstModeSetting, SafeBrowsingSetting, SettingsSecurityPageElement} from './privacy_page/security_page.js';
|
||||
import './privacy_sandbox/privacy_sandbox_ad_measurement_subpage.js';
|
||||
import './privacy_sandbox/privacy_sandbox_fledge_subpage.js';
|
||||
import './privacy_sandbox/privacy_sandbox_interest_item.js';
|
||||
@@ -244,6 +245,7 @@ export {SecurityKeysSubpageElement} from
|
||||
export {HttpsFirstModeSetting, SafeBrowsingSetting, SettingsSecurityPageElement} from './privacy_page/security/security_page.js';
|
||||
export {SecurityPageFeatureRowElement} from './privacy_page/security/security_page_feature_row.js';
|
||||
export {SecuritySettingsBundleSetting, SettingsSecurityPageV2Element} from './privacy_page/security/security_page_v2.js';
|
||||
+export {SettingsHeliumServicesPageElement} from './privacy_page/services_page.js';
|
||||
export {SecuritySettingsBundleSetting, SettingsSecurityPageV2Element} from './privacy_page/security_page_v2.js';
|
||||
export {SettingsPrivacySandboxAdMeasurementSubpageElement} from './privacy_sandbox/privacy_sandbox_ad_measurement_subpage.js';
|
||||
export {SettingsPrivacySandboxFledgeSubpageElement} from './privacy_sandbox/privacy_sandbox_fledge_subpage.js';
|
||||
export {PrivacySandboxInterestItemElement} from './privacy_sandbox/privacy_sandbox_interest_item.js';
|
||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
@@ -14,6 +14,7 @@
|
||||
@@ -280,7 +299,7 @@
|
||||
#include "components/policy/core/common/policy_pref_names.h"
|
||||
#include "components/pref_registry/pref_registry_syncable.h"
|
||||
#include "components/prefs/pref_registry_simple.h"
|
||||
@@ -197,6 +198,11 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
@@ -204,6 +205,11 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
false);
|
||||
#endif
|
||||
|
||||
@@ -294,7 +313,7 @@
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
@@ -45,6 +45,7 @@
|
||||
@@ -46,6 +46,7 @@
|
||||
#include "components/dom_distiller/core/pref_names.h"
|
||||
#include "components/drive/drive_pref_names.h"
|
||||
#include "components/embedder_support/pref_names.h"
|
||||
@@ -302,7 +321,7 @@
|
||||
#include "components/language/core/browser/pref_names.h"
|
||||
#include "components/live_caption/pref_names.h"
|
||||
#include "components/media_router/common/pref_names.h"
|
||||
@@ -350,6 +351,12 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
@@ -354,6 +355,12 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
settings_api::PrefType::kString;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,15 +1,23 @@
|
||||
--- a/chrome/browser/ui/ui_features.cc
|
||||
+++ b/chrome/browser/ui/ui_features.cc
|
||||
@@ -137,7 +137,7 @@ BASE_FEATURE(kShowTabGroupsMacSystemMenu
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
@@ -104,14 +104,14 @@ BASE_FEATURE(kReloadSelectionModel, base
|
||||
// Enforces close tab hotkey to only close the active view of a split tab,
|
||||
// when it is the only tab in selection model.
|
||||
BASE_FEATURE(kCloseActiveTabInSplitViewViaHotkey,
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
// Add tab group colours when viewing tab groups using the top mac OS menu bar.
|
||||
BASE_FEATURE(kShowTabGroupsMacSystemMenu, base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
#endif // BUILDFLAG(IS_MAC)
|
||||
|
||||
-BASE_FEATURE(kSideBySide, "SideBySide", base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
+BASE_FEATURE(kSideBySide, "SideBySide", base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
-BASE_FEATURE(kSideBySide, base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
+BASE_FEATURE(kSideBySide, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
// The delay before showing the drop target for the side-by-side drag-and-drop
|
||||
// entrypoint.
|
||||
@@ -155,17 +155,17 @@ BASE_FEATURE_PARAM(int,
|
||||
@@ -149,17 +149,17 @@ BASE_FEATURE_PARAM(int,
|
||||
kSideBySideDropTargetMinWidth,
|
||||
&kSideBySide,
|
||||
"drop_target_min_width",
|
||||
@@ -28,28 +36,35 @@
|
||||
- 30);
|
||||
+ 10);
|
||||
BASE_FEATURE_PARAM(int,
|
||||
kSideBySideDropTargetHideForOSWidth,
|
||||
kSideBySideDropTargetForLinkTargetWidthPercentage,
|
||||
&kSideBySide,
|
||||
@@ -270,7 +270,7 @@ BASE_FEATURE_PARAM(int,
|
||||
@@ -265,7 +265,7 @@ BASE_FEATURE_PARAM(int,
|
||||
|
||||
// When enabled along with SideBySide flag, split tabs will be restored on
|
||||
// startup.
|
||||
BASE_FEATURE(kSideBySideSessionRestore,
|
||||
"SideBySideSessionRestore",
|
||||
- base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
-BASE_FEATURE(kSideBySideSessionRestore, base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
+BASE_FEATURE(kSideBySideSessionRestore, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
bool IsRestoringSplitViewEnabled() {
|
||||
return base::FeatureList::IsEnabled(features::kSideBySide) &&
|
||||
@@ -274,7 +274,7 @@ bool IsRestoringSplitViewEnabled() {
|
||||
|
||||
BASE_FEATURE(kSideBySideLinkMenuNewBadge, base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
-BASE_FEATURE(kSideBySideKeyboardShortcut, base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
+BASE_FEATURE(kSideBySideKeyboardShortcut, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
bool IsSideBySideKeyboardShortcutEnabled() {
|
||||
return base::FeatureList::IsEnabled(features::kSideBySide) &&
|
||||
--- a/chrome/browser/ui/views/frame/multi_contents_resize_area.cc
|
||||
+++ b/chrome/browser/ui/views/frame/multi_contents_resize_area.cc
|
||||
@@ -21,9 +21,9 @@
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
namespace {
|
||||
const int kHandleCornerRadius = 2;
|
||||
-const int kHandleHeight = 24;
|
||||
const int kHandleHeight = 24;
|
||||
-const int kHandlePadding = 6;
|
||||
-const int kHandleWidth = 4;
|
||||
+const int kHandleHeight = 32;
|
||||
+const int kHandlePadding = 1;
|
||||
+const int kHandlePadding = 4;
|
||||
+const int kHandleWidth = 2;
|
||||
} // namespace
|
||||
|
||||
@@ -64,7 +79,7 @@
|
||||
|
||||
namespace content {
|
||||
class WebContents;
|
||||
@@ -54,7 +53,7 @@ class MultiContentsView : public views::
|
||||
@@ -56,7 +55,7 @@ class MultiContentsView : public views::
|
||||
double end_width = 0;
|
||||
};
|
||||
|
||||
@@ -73,7 +88,7 @@
|
||||
|
||||
MultiContentsView(BrowserView* browser_view,
|
||||
std::unique_ptr<MultiContentsViewDelegate> delegate);
|
||||
@@ -164,10 +163,6 @@ class MultiContentsView : public views::
|
||||
@@ -168,10 +167,6 @@ class MultiContentsView : public views::
|
||||
return contents_container_views_[1]->contents_view();
|
||||
}
|
||||
|
||||
@@ -81,10 +96,10 @@
|
||||
- return contents_container_views_[index]->mini_toolbar();
|
||||
- }
|
||||
-
|
||||
private:
|
||||
FRIEND_TEST_ALL_PREFIXES(MultiContentsViewBrowserTest, DropTargetLayout);
|
||||
FRIEND_TEST_ALL_PREFIXES(MultiContentsViewBrowserTest, SeparatorLayout);
|
||||
@@ -265,10 +260,6 @@ class MultiContentsView : public views::
|
||||
MultiContentsBackgroundView* background_view_for_testing() const {
|
||||
return background_view_;
|
||||
}
|
||||
@@ -280,10 +275,6 @@ class MultiContentsView : public views::
|
||||
// Nullopt if not currently resizing.
|
||||
std::optional<double> initial_start_width_on_resize_;
|
||||
|
||||
@@ -108,7 +123,7 @@
|
||||
line-height: 20px;
|
||||
--- a/chrome/browser/ui/views/frame/multi_contents_view.cc
|
||||
+++ b/chrome/browser/ui/views/frame/multi_contents_view.cc
|
||||
@@ -24,7 +24,6 @@
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "chrome/browser/ui/views/frame/multi_contents_resize_area.h"
|
||||
#include "chrome/browser/ui/views/frame/multi_contents_view_delegate.h"
|
||||
#include "chrome/browser/ui/views/frame/multi_contents_view_drop_target_controller.h"
|
||||
@@ -116,7 +131,7 @@
|
||||
#include "chrome/browser/ui/views/frame/scrim_view.h"
|
||||
#include "chrome/browser/ui/views/frame/top_container_background.h"
|
||||
#include "chrome/browser/ui/views/new_tab_footer/footer_web_view.h"
|
||||
@@ -51,11 +50,7 @@ MultiContentsView::MultiContentsView(
|
||||
@@ -57,11 +56,7 @@ MultiContentsView::MultiContentsView(
|
||||
BrowserView* browser_view,
|
||||
std::unique_ptr<MultiContentsViewDelegate> delegate)
|
||||
: browser_view_(browser_view),
|
||||
@@ -129,7 +144,7 @@
|
||||
SetLayoutManager(std::make_unique<views::DelegatingLayoutManager>(this));
|
||||
SetProperty(views::kElementIdentifierKey, kMultiContentsViewElementId);
|
||||
|
||||
@@ -334,11 +329,8 @@ void MultiContentsView::OnResize(int res
|
||||
@@ -360,11 +355,8 @@ void MultiContentsView::OnResize(int res
|
||||
std::make_optional(contents_container_views_[0]->size().width());
|
||||
}
|
||||
double total_width = contents_container_views_[0]->size().width() +
|
||||
@@ -142,7 +157,7 @@
|
||||
static_cast<double>(resize_amount));
|
||||
|
||||
// If end_width is within the snap point widths, update to the snap point.
|
||||
@@ -432,11 +424,6 @@ views::ProposedLayout MultiContentsView:
|
||||
@@ -473,11 +465,6 @@ views::ProposedLayout MultiContentsView:
|
||||
gfx::Rect end_rect(resize_rect.top_right(),
|
||||
gfx::Size(widths.end_width, available_space.height()));
|
||||
|
||||
@@ -154,7 +169,7 @@
|
||||
layouts.child_layouts.emplace_back(contents_container_views_[0],
|
||||
contents_container_views_[0]->GetVisible(),
|
||||
start_rect);
|
||||
@@ -571,8 +558,10 @@ MultiContentsView::ViewWidths MultiConte
|
||||
@@ -612,8 +599,10 @@ MultiContentsView::ViewWidths MultiConte
|
||||
widths.resize_width = resize_area_->GetPreferredSize().width();
|
||||
widths.start_width =
|
||||
start_ratio_ * (available_space.width() - widths.resize_width);
|
||||
@@ -166,7 +181,7 @@
|
||||
} else {
|
||||
CHECK(!contents_container_views_[1]->GetVisible());
|
||||
widths.start_width = available_space.width();
|
||||
@@ -645,10 +634,6 @@ void MultiContentsView::SetShouldShowTop
|
||||
@@ -675,10 +664,6 @@ void MultiContentsView::SetShouldShowTop
|
||||
return;
|
||||
}
|
||||
contents_separators_.should_show_top = should_show;
|
||||
@@ -177,7 +192,7 @@
|
||||
|
||||
InvalidateLayout();
|
||||
}
|
||||
@@ -658,8 +643,6 @@ void MultiContentsView::SetShouldShowLea
|
||||
@@ -688,8 +673,6 @@ void MultiContentsView::SetShouldShowLea
|
||||
return;
|
||||
}
|
||||
contents_separators_.should_show_leading = should_show;
|
||||
@@ -186,7 +201,7 @@
|
||||
|
||||
InvalidateLayout();
|
||||
}
|
||||
@@ -669,8 +652,6 @@ void MultiContentsView::SetShouldShowTra
|
||||
@@ -699,8 +682,6 @@ void MultiContentsView::SetShouldShowTra
|
||||
return;
|
||||
}
|
||||
contents_separators_.should_show_trailing = should_show;
|
||||
@@ -197,7 +212,7 @@
|
||||
}
|
||||
--- a/chrome/browser/ui/views/frame/contents_container_view.cc
|
||||
+++ b/chrome/browser/ui/views/frame/contents_container_view.cc
|
||||
@@ -19,7 +19,6 @@
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "chrome/browser/ui/views/frame/contents_container_outline.h"
|
||||
#include "chrome/browser/ui/views/frame/contents_separator.h"
|
||||
#include "chrome/browser/ui/views/frame/contents_web_view.h"
|
||||
@@ -205,7 +220,7 @@
|
||||
#include "chrome/browser/ui/views/frame/scrim_view.h"
|
||||
#include "chrome/browser/ui/views/frame/tab_modal_dialog_host.h"
|
||||
#include "chrome/browser/ui/views/frame/top_container_view.h"
|
||||
@@ -50,10 +49,6 @@
|
||||
@@ -52,10 +51,6 @@
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
@@ -216,7 +231,7 @@
|
||||
constexpr int kNewTabFooterSeparatorHeight = 1;
|
||||
constexpr int kNewTabFooterHeight = 56;
|
||||
} // namespace
|
||||
@@ -121,14 +116,6 @@ ContentsContainerView::ContentsContainer
|
||||
@@ -133,14 +128,6 @@ ContentsContainerView::ContentsContainer
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -231,7 +246,7 @@
|
||||
view_bounds_observer_.Observe(contents_view_);
|
||||
}
|
||||
|
||||
@@ -151,112 +138,11 @@ std::vector<views::View*> ContentsContai
|
||||
@@ -163,120 +150,11 @@ std::vector<views::View*> ContentsContai
|
||||
void ContentsContainerView::UpdateBorderAndOverlay(bool is_in_split,
|
||||
bool is_active,
|
||||
bool is_highlighted) {
|
||||
@@ -296,16 +311,19 @@
|
||||
- ? content_upper_rounded_corners
|
||||
- : content_rounded_corners;
|
||||
-
|
||||
- contents_view_->SetBackgroundRadii(radii);
|
||||
- contents_view_->holder()->SetCornerRadii(radii);
|
||||
- contents_scrim_view_->SetRoundedCorners(kContentRoundedCorners);
|
||||
-
|
||||
- if (new_tab_footer_view_) {
|
||||
- new_tab_footer_view_->holder()->SetCornerRadii(
|
||||
- content_lower_rounded_corners);
|
||||
- }
|
||||
-
|
||||
- if (contents_scrim_view_->layer()->rounded_corner_radii() !=
|
||||
- kContentRoundedCorners) {
|
||||
- contents_scrim_view_->SetRoundedCorners(kContentRoundedCorners);
|
||||
- if (actor_overlay_web_view_) {
|
||||
- // ActorOverlayWebView should use the same radii as the contents view since
|
||||
- // it acts as a full transparent layer directly over the main web content.
|
||||
- actor_overlay_web_view_->holder()->SetCornerRadii(radii);
|
||||
- }
|
||||
-
|
||||
-#if BUILDFLAG(ENABLE_GLIC)
|
||||
@@ -321,6 +339,7 @@
|
||||
- devtools_web_view_->holder()->SetCornerRadii(kNoRoundedCorners);
|
||||
- devtools_scrim_view_->SetRoundedCorners(kNoRoundedCorners);
|
||||
-
|
||||
- contents_view_->SetBackgroundRadii(kNoRoundedCorners);
|
||||
- contents_view_->holder()->SetCornerRadii(kNoRoundedCorners);
|
||||
-
|
||||
- if (new_tab_footer_view_) {
|
||||
@@ -329,6 +348,10 @@
|
||||
-
|
||||
- contents_scrim_view_->SetRoundedCorners(kNoRoundedCorners);
|
||||
-
|
||||
- if (actor_overlay_web_view_) {
|
||||
- actor_overlay_web_view_->holder()->SetCornerRadii(kNoRoundedCorners);
|
||||
- }
|
||||
-
|
||||
-#if BUILDFLAG(ENABLE_GLIC)
|
||||
- if (glic_border_) {
|
||||
- glic_border_->SetRoundedCorners(kNoRoundedCorners);
|
||||
@@ -346,7 +369,7 @@
|
||||
}
|
||||
|
||||
void ContentsContainerView::Layout(PassKey pass_key) {
|
||||
@@ -270,9 +156,6 @@ void ContentsContainerView::Layout(PassK
|
||||
@@ -290,9 +168,6 @@ void ContentsContainerView::Layout(PassK
|
||||
void ContentsContainerView::OnViewBoundsChanged(View* observed_view) {
|
||||
if (observed_view == contents_view_) {
|
||||
UpdateDevToolsDockedPlacement();
|
||||
@@ -356,7 +379,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -519,30 +402,6 @@ views::ProposedLayout ContentsContainerV
|
||||
@@ -559,30 +434,6 @@ views::ProposedLayout ContentsContainerV
|
||||
non_devtools_contents_bounds, size_bounds);
|
||||
}
|
||||
|
||||
@@ -389,7 +412,7 @@
|
||||
}
|
||||
--- a/chrome/browser/ui/views/frame/contents_container_view.h
|
||||
+++ b/chrome/browser/ui/views/frame/contents_container_view.h
|
||||
@@ -70,7 +70,6 @@ class ContentsContainerView : public vie
|
||||
@@ -71,7 +71,6 @@ class ContentsContainerView : public vie
|
||||
std::vector<views::View*> GetAccessiblePanes();
|
||||
|
||||
ContentsWebView* contents_view() { return contents_view_; }
|
||||
@@ -397,7 +420,7 @@
|
||||
ScrimView* contents_scrim_view() { return contents_scrim_view_; }
|
||||
views::WebView* devtools_web_view() { return devtools_web_view_; }
|
||||
ScrimView* devtools_scrim_view() { return devtools_scrim_view_; }
|
||||
@@ -88,9 +87,6 @@ class ContentsContainerView : public vie
|
||||
@@ -94,9 +93,6 @@ class ContentsContainerView : public vie
|
||||
enterprise_watermark::WatermarkView* watermark_view() {
|
||||
return watermark_view_;
|
||||
}
|
||||
@@ -407,7 +430,7 @@
|
||||
TabModalDialogHost* web_contents_modal_dialog_host() {
|
||||
return &web_contents_modal_dialog_host_;
|
||||
}
|
||||
@@ -125,9 +121,6 @@ class ContentsContainerView : public vie
|
||||
@@ -134,9 +130,6 @@ class ContentsContainerView : public vie
|
||||
// container that holds both contents_webview and devtools_webview.
|
||||
void UpdateDevToolsDockedPlacement();
|
||||
|
||||
@@ -417,9 +440,9 @@
|
||||
// views::View:
|
||||
void ChildVisibilityChanged(View* child) override;
|
||||
void Layout(PassKey) override;
|
||||
@@ -174,10 +167,6 @@ class ContentsContainerView : public vie
|
||||
@@ -187,10 +180,6 @@ class ContentsContainerView : public vie
|
||||
// The glic browser view that renders around the web contents area.
|
||||
raw_ptr<glic::GlicBorderView> glic_border_ = nullptr;
|
||||
raw_ptr<glic::ContextSharingBorderView> glic_border_ = nullptr;
|
||||
|
||||
- raw_ptr<MultiContentsViewMiniToolbar> mini_toolbar_ = nullptr;
|
||||
-
|
||||
@@ -430,7 +453,7 @@
|
||||
|
||||
--- a/chrome/browser/ui/views/frame/multi_contents_drop_target_view.cc
|
||||
+++ b/chrome/browser/ui/views/frame/multi_contents_drop_target_view.cc
|
||||
@@ -41,11 +41,9 @@
|
||||
@@ -42,11 +42,9 @@
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -444,7 +467,7 @@
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -60,7 +58,6 @@ MultiContentsDropTargetView::MultiConten
|
||||
@@ -61,17 +59,12 @@ MultiContentsDropTargetView::MultiConten
|
||||
->SetOrientation(views::LayoutOrientation::kVertical)
|
||||
.SetMainAxisAlignment(views::LayoutAlignment::kCenter)
|
||||
.SetCrossAxisAlignment(views::LayoutAlignment::kCenter)
|
||||
@@ -452,77 +475,43 @@
|
||||
.SetDefault(
|
||||
views::kFlexBehaviorKey,
|
||||
views::FlexSpecification(views::MinimumFlexSizeRule::kScaleToZero,
|
||||
@@ -68,9 +65,6 @@ MultiContentsDropTargetView::MultiConten
|
||||
views::MaximumFlexSizeRule::kUnbounded));
|
||||
|
||||
auto inner_container = std::make_unique<views::View>();
|
||||
- inner_container->SetBackground(views::CreateLayerBasedRoundedBackground(
|
||||
- ui::kColorSysSurface3, gfx::RoundedCornersF(kInnerCornerRadius)));
|
||||
- inner_container->background()->SetInternalName(
|
||||
- "MultiContentsDropTargetView/InnerContainer");
|
||||
|
||||
- inner_container->SetBackground(views::CreateRoundedRectBackground(
|
||||
- ui::kColorSysSurface3, kInnerCornerRadius));
|
||||
-
|
||||
inner_container_layout_ =
|
||||
&inner_container->SetLayoutManager(std::make_unique<views::FlexLayout>())
|
||||
->SetOrientation(views::LayoutOrientation::kVertical)
|
||||
@@ -263,7 +257,7 @@ bool MultiContentsDropTargetView::Should
|
||||
void MultiContentsDropTargetView::OnThemeChanged() {
|
||||
views::View::OnThemeChanged();
|
||||
const SkColor primary_color =
|
||||
- GetColorProvider()->GetColor(ui::kColorSysPrimary);
|
||||
+ GetColorProvider()->GetColor(ui::kColorMenuIcon);
|
||||
const ui::ImageModel icon_image_model =
|
||||
ui::ImageModel::FromVectorIcon(kAddCircleIcon, primary_color, kIconSize);
|
||||
icon_view_->SetImage(icon_image_model);
|
||||
--- a/components/omnibox/common/omnibox_features.cc
|
||||
+++ b/components/omnibox/common/omnibox_features.cc
|
||||
@@ -386,7 +386,7 @@ BASE_FEATURE(kPreconnectNonSearchOmnibox
|
||||
// "invisible focus".
|
||||
BASE_FEATURE(kOmniboxRestoreInvisibleFocusOnly,
|
||||
"OmniboxRestoreInvisibleFocusOnly",
|
||||
- DISABLED);
|
||||
+ ENABLED);
|
||||
@@ -90,13 +83,13 @@ MultiContentsDropTargetView::MultiConten
|
||||
icon_view_->SetPaintToLayer(ui::LAYER_TEXTURED);
|
||||
icon_view_->layer()->SetFillsBoundsOpaquely(false);
|
||||
icon_view_->SetImage(ui::ImageModel::FromVectorIcon(
|
||||
- kAddCircleIcon, ui::kColorSysPrimary, kIconSize));
|
||||
+ kAddCircleIcon, ui::kColorMenuIcon, kIconSize));
|
||||
|
||||
// Enabls adding an aim shortcut in the typed state.
|
||||
BASE_FEATURE(kOmniboxAimShortcutTypedState,
|
||||
--- a/chrome/browser/ui/views/frame/browser_view_layout.cc
|
||||
+++ b/chrome/browser/ui/views/frame/browser_view_layout.cc
|
||||
@@ -872,27 +872,6 @@ void BrowserViewLayout::LayoutContentsCo
|
||||
!layout_result.side_panel_right_aligned);
|
||||
left_aligned_side_panel_separator_->SetBoundsRect(
|
||||
layout_result.separator_bounds);
|
||||
-
|
||||
- SetViewVisibility(side_panel_rounded_corner_,
|
||||
- layout_result.side_panel_visible);
|
||||
- if (layout_result.side_panel_visible) {
|
||||
- // Adjust the rounded corner bounds based on the side panel bounds.
|
||||
- const int corner_size =
|
||||
- side_panel_rounded_corner_->GetPreferredSize().width();
|
||||
-
|
||||
- const int top_separator_height = views::Separator::kThickness;
|
||||
- if (layout_result.contents_container_after_side_panel) {
|
||||
- side_panel_rounded_corner_->SetBounds(
|
||||
- layout_result.side_panel_bounds.right(),
|
||||
- layout_result.side_panel_bounds.y() - top_separator_height,
|
||||
- corner_size, corner_size);
|
||||
- } else {
|
||||
- side_panel_rounded_corner_->SetBounds(
|
||||
- layout_result.side_panel_bounds.x() - corner_size,
|
||||
- layout_result.side_panel_bounds.y() - top_separator_height,
|
||||
- corner_size, corner_size);
|
||||
- }
|
||||
- }
|
||||
}
|
||||
}
|
||||
label_ = inner_container->AddChildView(std::make_unique<views::Label>(
|
||||
l10n_util::GetStringUTF16(IDS_SPLIT_VIEW_DRAG_ENTRYPOINT_LABEL)));
|
||||
label_->SetPaintToLayer(ui::LAYER_TEXTURED);
|
||||
label_->layer()->SetFillsBoundsOpaquely(false);
|
||||
- label_->SetEnabledColor(ui::kColorSysPrimary);
|
||||
+ label_->SetEnabledColor(ui::kColorMenuIcon);
|
||||
label_->SetElideBehavior(gfx::NO_ELIDE);
|
||||
label_->SetSubpixelRenderingEnabled(false);
|
||||
|
||||
--- a/chrome/browser/ui/views/frame/browser_view.cc
|
||||
+++ b/chrome/browser/ui/views/frame/browser_view.cc
|
||||
@@ -132,7 +132,6 @@
|
||||
@@ -141,7 +141,6 @@
|
||||
#include "chrome/browser/ui/views/frame/multi_contents_view.h"
|
||||
#include "chrome/browser/ui/views/frame/multi_contents_view_delegate.h"
|
||||
#include "chrome/browser/ui/views/frame/multi_contents_view_drop_target_controller.h"
|
||||
-#include "chrome/browser/ui/views/frame/multi_contents_view_mini_toolbar.h"
|
||||
#include "chrome/browser/ui/views/frame/native_browser_frame.h"
|
||||
#include "chrome/browser/ui/views/frame/scrim_view.h"
|
||||
#include "chrome/browser/ui/views/frame/tab_modal_dialog_host.h"
|
||||
@@ -2356,12 +2355,6 @@ void BrowserView::UpdateToolbar(content:
|
||||
#include "chrome/browser/ui/views/frame/tab_strip_region_view.h"
|
||||
@@ -2281,12 +2280,6 @@ void BrowserView::UpdateToolbar(content:
|
||||
if (toolbar_) {
|
||||
toolbar_->Update(contents);
|
||||
}
|
||||
@@ -545,7 +534,7 @@
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/ui/browser.h"
|
||||
#include "chrome/browser/ui/browser_list.h"
|
||||
@@ -125,16 +124,6 @@ SplitTabMenuModel::SplitTabMenuModel(Tab
|
||||
@@ -130,16 +129,6 @@ SplitTabMenuModel::SplitTabMenuModel(Tab
|
||||
SetElementIdentifierAt(
|
||||
GetIndexOfCommandId(GetCommandIdInt(CommandId::kExitSplit)).value(),
|
||||
kExitSplitMenuItem);
|
||||
@@ -562,7 +551,7 @@
|
||||
}
|
||||
|
||||
SplitTabMenuModel::~SplitTabMenuModel() = default;
|
||||
@@ -216,9 +205,6 @@ void SplitTabMenuModel::ExecuteCommand(i
|
||||
@@ -221,9 +210,6 @@ void SplitTabMenuModel::ExecuteCommand(i
|
||||
case CommandId::kExitSplit:
|
||||
tab_strip_model_->RemoveSplit(split_id);
|
||||
break;
|
||||
@@ -572,13 +561,14 @@
|
||||
}
|
||||
|
||||
base::UmaHistogramEnumeration(
|
||||
@@ -260,10 +246,3 @@ void SplitTabMenuModel::CloseTabAtIndex(
|
||||
@@ -265,11 +251,3 @@ void SplitTabMenuModel::CloseTabAtIndex(
|
||||
index, TabCloseTypes::CLOSE_USER_GESTURE |
|
||||
TabCloseTypes::CLOSE_CREATE_HISTORICAL_TAB);
|
||||
}
|
||||
-
|
||||
-void SplitTabMenuModel::SendFeedback() {
|
||||
- Browser* const browser = GetBrowserWithTabStripModel(tab_strip_model_);
|
||||
- BrowserWindowInterface* const browser =
|
||||
- GetBrowserWithTabStripModel(tab_strip_model_);
|
||||
- CHECK(browser);
|
||||
- chrome::ShowFeedbackPage(browser, feedback::kFeedbackSourceSplitView, "", "",
|
||||
- "split_view", "");
|
||||
@@ -603,3 +593,32 @@
|
||||
|
||||
raw_ptr<TabStripModel> tab_strip_model_ = nullptr;
|
||||
|
||||
--- a/chrome/browser/ui/browser_commands.cc
|
||||
+++ b/chrome/browser/ui/browser_commands.cc
|
||||
@@ -574,8 +574,12 @@ void ReloadInternal(BrowserWindowInterfa
|
||||
WebContents* const active_contents = tab_strip_model->GetActiveWebContents();
|
||||
|
||||
std::vector<WebContents*> tabs_to_reload;
|
||||
+ const bool only_active_split_tab_selected =
|
||||
+ browser->GetTabStripModel()->IsActiveTabSplit() &&
|
||||
+ browser->GetTabStripModel()->selection_model().size() == 2;
|
||||
|
||||
- if (base::FeatureList::IsEnabled(features::kReloadSelectionModel)) {
|
||||
+ if (base::FeatureList::IsEnabled(features::kReloadSelectionModel) ||
|
||||
+ only_active_split_tab_selected) {
|
||||
tabs_to_reload.push_back(active_contents);
|
||||
} else {
|
||||
// Reloading a tab may change the selection (see crbug.com/339061099), so
|
||||
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
||||
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
|
||||
@@ -4983,8 +4983,8 @@ void RenderViewContextMenu::OpenLinkInSp
|
||||
|
||||
TabStripModel* const tab_strip_model = browser->tab_strip_model();
|
||||
tabs::TabInterface* const source_tab =
|
||||
- tabs::TabInterface::GetFromContents(source_web_contents_);
|
||||
- if (source_tab->IsSplit()) {
|
||||
+ tabs::TabInterface::MaybeGetFromContents(source_web_contents_);
|
||||
+ if (source_tab && source_tab->IsSplit()) {
|
||||
// Navigate the inactive tab to the URL
|
||||
const split_tabs::SplitTabId split_id = source_tab->GetSplit().value();
|
||||
for (tabs::TabInterface* tab :
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
--- a/components/embedder_support/user_agent_utils.cc
|
||||
+++ b/components/embedder_support/user_agent_utils.cc
|
||||
@@ -205,17 +205,12 @@ const blink::UserAgentBrandList GetUserA
|
||||
int major_version_number;
|
||||
bool parse_result = base::StringToInt(major_version, &major_version_number);
|
||||
DCHECK(parse_result);
|
||||
- std::optional<std::string> brand;
|
||||
-#if !BUILDFLAG(CHROMIUM_BRANDING)
|
||||
- brand = version_info::GetProductName();
|
||||
-#endif
|
||||
-
|
||||
std::string brand_version =
|
||||
output_version_type == blink::UserAgentBrandVersionType::kFullVersion
|
||||
? full_version
|
||||
: major_version;
|
||||
|
||||
- return GenerateBrandVersionList(major_version_number, brand, brand_version,
|
||||
+ return GenerateBrandVersionList(major_version_number, "Google Chrome", brand_version,
|
||||
output_version_type,
|
||||
additional_brand_version);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/components/update_client/update_query_params.h
|
||||
+++ b/components/update_client/update_query_params.h
|
||||
@@ -18,7 +18,7 @@ class UpdateQueryParamsDelegate;
|
||||
@@ -19,7 +19,7 @@ class UpdateQueryParamsDelegate;
|
||||
// browser process.
|
||||
class UpdateQueryParams {
|
||||
public:
|
||||
@@ -11,7 +11,7 @@
|
||||
UpdateQueryParams(const UpdateQueryParams&) = delete;
|
||||
--- a/components/update_client/update_query_params.cc
|
||||
+++ b/components/update_client/update_query_params.cc
|
||||
@@ -68,7 +68,7 @@ const char kArch[] =
|
||||
@@ -68,7 +68,7 @@ constexpr std::string_view kArch =
|
||||
#error "unknown arch"
|
||||
#endif
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
return kWebView;
|
||||
--- a/chrome/browser/extensions/updater/chrome_extension_downloader_factory.cc
|
||||
+++ b/chrome/browser/extensions/updater/chrome_extension_downloader_factory.cc
|
||||
@@ -43,7 +43,7 @@ ChromeExtensionDownloaderFactory::Create
|
||||
@@ -46,7 +46,7 @@ ChromeExtensionDownloaderFactory::Create
|
||||
}
|
||||
#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
std::string manifest_query_params =
|
||||
@@ -52,7 +52,7 @@
|
||||
if (command_line->HasSwitch(extensions::kSwitchTestRequestParam)) {
|
||||
--- a/chrome/browser/extensions/webstore_installer.cc
|
||||
+++ b/chrome/browser/extensions/webstore_installer.cc
|
||||
@@ -209,7 +209,7 @@ GURL WebstoreInstaller::GetWebstoreInsta
|
||||
@@ -213,7 +213,7 @@ GURL WebstoreInstaller::GetWebstoreInsta
|
||||
GURL url(
|
||||
url_string + "?response=redirect&" +
|
||||
update_client::UpdateQueryParams::Get(
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
--- a/chrome/common/pref_names.h
|
||||
+++ b/chrome/common/pref_names.h
|
||||
@@ -1310,6 +1310,10 @@ inline constexpr char
|
||||
// instead of tab strip end.
|
||||
inline constexpr char kNewTabNextToActive[] = "helium.browser.new_tab_next_to_active";
|
||||
|
||||
+// A boolean pref set to true if MRU (Most Recently Used) order should be used when
|
||||
+// cycling through tabs with Ctrl+Tab.
|
||||
+inline constexpr char kTabCyclingMRU[] = "helium.browser.mru_tab_cycling";
|
||||
+
|
||||
// A boolean pref set to true if a Home button to open the Home pages should be
|
||||
// visible on the toolbar.
|
||||
inline constexpr char kShowHomeButton[] = "browser.show_home_button";
|
||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
@@ -115,6 +115,8 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
|
||||
registry->RegisterBooleanPref(prefs::kNewTabNextToActive, false);
|
||||
|
||||
+ registry->RegisterBooleanPref(prefs::kTabCyclingMRU, false);
|
||||
+
|
||||
registry->RegisterBooleanPref(prefs::kHomePageIsNewTabPage, true,
|
||||
pref_registration_flags);
|
||||
registry->RegisterBooleanPref(prefs::kShowHomeButton, false,
|
||||
--- a/chrome/browser/ui/tabs/tab_strip_model.cc
|
||||
+++ b/chrome/browser/ui/tabs/tab_strip_model.cc
|
||||
@@ -1704,11 +1704,11 @@ void TabStripModel::CloseSelectedTabs()
|
||||
}
|
||||
|
||||
void TabStripModel::SelectNextTab(TabStripUserGestureDetails detail) {
|
||||
- SelectRelativeTab(TabRelativeDirection::kNext, detail);
|
||||
+ SelectRelativeTabCycle(TabRelativeDirection::kNext, detail);
|
||||
}
|
||||
|
||||
void TabStripModel::SelectPreviousTab(TabStripUserGestureDetails detail) {
|
||||
- SelectRelativeTab(TabRelativeDirection::kPrevious, detail);
|
||||
+ SelectRelativeTabCycle(TabRelativeDirection::kPrevious, detail);
|
||||
}
|
||||
|
||||
void TabStripModel::SelectLastTab(TabStripUserGestureDetails detail) {
|
||||
@@ -3710,6 +3710,18 @@ TabStripSelectionChange TabStripModel::S
|
||||
return selection;
|
||||
}
|
||||
|
||||
+void TabStripModel::SelectRelativeTabCycle(TabRelativeDirection direction,
|
||||
+ TabStripUserGestureDetails detail) {
|
||||
+ const bool enable_mru =
|
||||
+ profile_->GetPrefs()->GetBoolean(prefs::kTabCyclingMRU);
|
||||
+
|
||||
+ if (enable_mru) {
|
||||
+ SelectMRUTab(direction, detail);
|
||||
+ } else {
|
||||
+ SelectRelativeTab(direction, detail);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void TabStripModel::SelectMRUTab(TabRelativeDirection direction,
|
||||
TabStripUserGestureDetails detail) {
|
||||
if (mru_cycle_list_.empty()) {
|
||||
--- a/chrome/browser/ui/tabs/tab_strip_model.h
|
||||
+++ b/chrome/browser/ui/tabs/tab_strip_model.h
|
||||
@@ -1143,6 +1143,11 @@ class TabStripModel {
|
||||
kPrevious,
|
||||
};
|
||||
|
||||
+ // Selects either the next tab or the previous tab.
|
||||
+ // Uses MRU order if the user prefers it.
|
||||
+ void SelectRelativeTabCycle(TabRelativeDirection direction,
|
||||
+ TabStripUserGestureDetails detail);
|
||||
+
|
||||
// Selects either the most recently used tab
|
||||
// or the least recently used tab.
|
||||
void SelectMRUTab(TabRelativeDirection direction,
|
||||
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
@@ -228,6 +228,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
|
||||
(*s_allowlist)[::prefs::kNewTabNextToActive] =
|
||||
settings_api::PrefType::kBoolean;
|
||||
+ (*s_allowlist)[::prefs::kTabCyclingMRU] =
|
||||
+ settings_api::PrefType::kBoolean;
|
||||
|
||||
(*s_allowlist)[::prefs::kShowHomeButton] = settings_api::PrefType::kBoolean;
|
||||
(*s_allowlist)[::prefs::kShowForwardButton] =
|
||||
--- a/chrome/app/settings_strings.grdp
|
||||
+++ b/chrome/app/settings_strings.grdp
|
||||
@@ -273,6 +273,9 @@
|
||||
<message name="IDS_SETTINGS_NEW_TAB_NEXT_TO_ACTIVE_BUTTON" desc="Label for the checkbox which enables or disables behaviour of opening new tabs next to current active tab.">
|
||||
Open new tabs next to the active tab
|
||||
</message>
|
||||
+ <message name="IDS_SETTINGS_CYCLE_TABS_IN_MRU_ORDER" desc="Label for the checkbox which enables or disables cycling through tabs in MRU order when using Ctrl+Tab.">
|
||||
+ Cycle through tabs in most recently used order with Ctrl+Tab
|
||||
+ </message>
|
||||
<message name="IDS_SETTINGS_SHOW_HOME_BUTTON" desc="Label for the checkbox which enables or disables showing the home button in the toolbar.">
|
||||
Show home button
|
||||
</message>
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -522,6 +522,7 @@ void AddAppearanceStrings(content::WebUI
|
||||
{"darkMode", IDS_NTP_CUSTOMIZE_CHROME_COLOR_SCHEME_MODE_DARK_LABEL},
|
||||
{"systemMode", IDS_NTP_CUSTOMIZE_CHROME_COLOR_SCHEME_MODE_SYSTEM_LABEL},
|
||||
{"openNewTabNextToActive", IDS_SETTINGS_NEW_TAB_NEXT_TO_ACTIVE_BUTTON},
|
||||
+ {"cycleTabsInMRUOrder", IDS_SETTINGS_CYCLE_TABS_IN_MRU_ORDER},
|
||||
{"showHomeButton", IDS_SETTINGS_SHOW_HOME_BUTTON},
|
||||
{"showBookmarksBar", IDS_SETTINGS_SHOW_BOOKMARKS_BAR},
|
||||
{"allowSplitViewDragAndDrop",
|
||||
--- a/chrome/browser/resources/settings/appearance_page/appearance_behavior_page.html
|
||||
+++ b/chrome/browser/resources/settings/appearance_page/appearance_behavior_page.html
|
||||
@@ -6,6 +6,11 @@
|
||||
label="$i18n{openNewTabNextToActive}">
|
||||
</settings-toggle-button>
|
||||
|
||||
+ <settings-toggle-button class="hr" id="tabCyclingMRU"
|
||||
+ pref="{{prefs.helium.browser.mru_tab_cycling}}"
|
||||
+ label="$i18n{cycleTabsInMRUOrder}">
|
||||
+ </settings-toggle-button>
|
||||
+
|
||||
<settings-toggle-button class="hr" id="copyPageUrlShortcut"
|
||||
pref="{{prefs.helium.settings.a11y.copy_page_url_shortcut}}"
|
||||
label="$i18n{copyPageUrlShortcut}">
|
||||
@@ -57,7 +57,7 @@
|
||||
#endif // COMPONENTS_HELIUM_SERVICES_PREF_NAMES_H_
|
||||
--- a/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
+++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
|
||||
@@ -368,6 +368,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
@@ -366,6 +366,8 @@ const PrefsUtil::TypedPrefMap& PrefsUtil
|
||||
settings_api::PrefType::kBoolean;
|
||||
(*s_allowlist)[::prefs::kHeliumUpdateFetchingEnabled] =
|
||||
settings_api::PrefType::kBoolean;
|
||||
@@ -65,10 +65,10 @@
|
||||
+ settings_api::PrefType::kBoolean;
|
||||
(*s_allowlist)[::prefs::kHeliumServicesOrigin] =
|
||||
settings_api::PrefType::kString;
|
||||
|
||||
(*s_allowlist)[::prefs::kHeliumServicesConsented] =
|
||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
@@ -212,6 +212,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
@@ -218,6 +218,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
registry->RegisterBooleanPref(prefs::kHeliumDidOnboarding, false);
|
||||
registry->RegisterBooleanPref(prefs::kHeliumServicesConsented, false);
|
||||
registry->RegisterBooleanPref(prefs::kHeliumUpdateFetchingEnabled, true);
|
||||
@@ -96,7 +96,7 @@
|
||||
#include "components/policy/core/common/policy_pref_names.h"
|
||||
#include "components/supervised_user/core/browser/supervised_user_preferences.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
@@ -199,6 +203,7 @@ ExtensionService::ExtensionService(
|
||||
@@ -206,6 +210,7 @@ ExtensionService::ExtensionService(
|
||||
ready_(ready),
|
||||
updater_(ExtensionUpdater::Get(profile)),
|
||||
component_loader_(ComponentLoader::Get(profile_)),
|
||||
@@ -104,7 +104,7 @@
|
||||
error_controller_(error_controller),
|
||||
external_install_manager_(ExternalInstallManager::Get(profile)),
|
||||
extension_registrar_delegate_(
|
||||
@@ -272,6 +277,33 @@ ExtensionService::ExtensionService(
|
||||
@@ -279,6 +284,33 @@ ExtensionService::ExtensionService(
|
||||
prefs::kExtensionsUIDeveloperMode,
|
||||
base::BindRepeating(&ExtensionService::OnDeveloperModePrefChanged,
|
||||
base::Unretained(this)));
|
||||
@@ -217,7 +217,7 @@
|
||||
if ( bin.assetSourceRegistry instanceof Object ) {
|
||||
--- a/chrome/app/settings_strings.grdp
|
||||
+++ b/chrome/app/settings_strings.grdp
|
||||
@@ -1939,6 +1939,12 @@
|
||||
@@ -2002,6 +2002,12 @@
|
||||
<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>
|
||||
@@ -232,7 +232,7 @@
|
||||
</message>
|
||||
--- a/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||
+++ b/chrome/browser/resources/settings/privacy_page/services_page.html
|
||||
@@ -36,6 +36,11 @@
|
||||
@@ -69,6 +69,11 @@
|
||||
sub-label="$i18n{heliumUpdatesToggleDescription}">
|
||||
</settings-toggle-button>
|
||||
</if>
|
||||
@@ -243,10 +243,10 @@
|
||||
+ </settings-toggle-button>
|
||||
</cr-collapse>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -1970,6 +1970,10 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
@@ -2139,6 +2139,10 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
IDS_SETTINGS_HELIUM_SERVICES_UPDATE},
|
||||
{"heliumUpdatesToggleDescription",
|
||||
IDS_SETTINGS_HELIUM_SERVICES_UPDATE_DESCRIPTION},
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
void AddChromeApp();
|
||||
--- a/chrome/browser/extensions/component_loader.cc
|
||||
+++ b/chrome/browser/extensions/component_loader.cc
|
||||
@@ -57,6 +57,7 @@
|
||||
@@ -58,6 +58,7 @@
|
||||
#include "ui/accessibility/accessibility_features.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
#include "ash/constants/ash_features.h"
|
||||
@@ -429,6 +430,21 @@ void ComponentLoader::AddWebStoreApp() {
|
||||
@@ -430,6 +431,21 @@ void ComponentLoader::AddWebStoreApp() {
|
||||
l10n_util::GetStringUTF8(IDS_WEBSTORE_APP_DESCRIPTION));
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
void ComponentLoader::AddChromeApp() {
|
||||
AddWithNameAndDescription(
|
||||
@@ -506,6 +522,7 @@ void ComponentLoader::AddDefaultComponen
|
||||
@@ -507,6 +523,7 @@ void ComponentLoader::AddDefaultComponen
|
||||
|
||||
if (!skip_session_components) {
|
||||
AddWebStoreApp();
|
||||
@@ -71,18 +71,19 @@
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
--- a/chrome/browser/extensions/component_extensions_allowlist/allowlist.cc
|
||||
+++ b/chrome/browser/extensions/component_extensions_allowlist/allowlist.cc
|
||||
@@ -15,8 +15,10 @@
|
||||
@@ -15,9 +15,11 @@
|
||||
#include "chrome/common/buildflags.h"
|
||||
#include "chrome/common/extensions/extension_constants.h"
|
||||
#include "chrome/grit/browser_resources.h"
|
||||
+#include "components/helium_services/extension_ids.h"
|
||||
#include "extensions/buildflags/buildflags.h"
|
||||
#include "extensions/common/constants.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
+#include "third_party/ublock/resources/grit/ublock_resources.h"
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
#include "ash/keyboard/ui/grit/keyboard_resources.h"
|
||||
@@ -31,6 +33,7 @@ bool IsComponentExtensionAllowlisted(con
|
||||
@@ -34,6 +36,7 @@ bool IsComponentExtensionAllowlisted(con
|
||||
constexpr auto kAllowed = base::MakeFixedFlatSet<std::string_view>({
|
||||
extension_misc::kInAppPaymentsSupportAppId,
|
||||
extension_misc::kPdfExtensionId,
|
||||
@@ -90,7 +91,7 @@
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
extension_misc::kAssessmentAssistantExtensionId,
|
||||
extension_misc::kAccessibilityCommonExtensionId,
|
||||
@@ -86,6 +89,7 @@ bool IsComponentExtensionAllowlisted(int
|
||||
@@ -89,6 +92,7 @@ bool IsComponentExtensionAllowlisted(int
|
||||
case IDR_NETWORK_SPEECH_SYNTHESIS_MANIFEST_MV3:
|
||||
case IDR_READING_MODE_GDOCS_HELPER_MANIFEST:
|
||||
case IDR_WEBSTORE_MANIFEST:
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "extensions/browser/delayed_install_manager.h"
|
||||
#include "extensions/browser/disable_reason.h"
|
||||
#include "extensions/browser/extension_file_task_runner.h"
|
||||
@@ -248,7 +252,85 @@ void ChromeExtensionRegistrarDelegate::P
|
||||
@@ -254,7 +258,85 @@ void ChromeExtensionRegistrarDelegate::P
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
location <= mojom::ManifestLocation::kMaxValue;
|
||||
--- a/chrome/browser/chrome_content_browser_client.cc
|
||||
+++ b/chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -6321,7 +6321,8 @@ void AddChromeSchemeFactories(
|
||||
@@ -6194,7 +6194,8 @@ void AddChromeSchemeFactories(
|
||||
std::vector<std::string> allowed_webui_hosts;
|
||||
// Support for chrome:// scheme if appropriate.
|
||||
if ((extension->is_extension() || extension->is_platform_app()) &&
|
||||
@@ -82,7 +82,7 @@
|
||||
IsPolicyBlockedHostUnsafe(origin_url)) {
|
||||
if (error)
|
||||
*error = extension_misc::kPolicyBlockedScripting;
|
||||
@@ -617,7 +619,8 @@ PermissionsData::PageAccess PermissionsD
|
||||
@@ -618,7 +620,8 @@ PermissionsData::PageAccess PermissionsD
|
||||
const URLPatternSet* tab_url_patterns,
|
||||
std::string* error) const {
|
||||
runtime_lock_.AssertAcquired();
|
||||
@@ -92,7 +92,7 @@
|
||||
IsPolicyBlockedHostUnsafe(document_url)) {
|
||||
if (error)
|
||||
*error = extension_misc::kPolicyBlockedScripting;
|
||||
@@ -629,7 +632,8 @@ PermissionsData::PageAccess PermissionsD
|
||||
@@ -630,7 +633,8 @@ PermissionsData::PageAccess PermissionsD
|
||||
|
||||
if (base::FeatureList::IsEnabled(
|
||||
extensions_features::kExtensionsMenuAccessControl) &&
|
||||
@@ -104,7 +104,7 @@
|
||||
auto& context_permissions = GetContextPermissions(*context_id_);
|
||||
--- a/chrome/browser/extensions/extension_util.cc
|
||||
+++ b/chrome/browser/extensions/extension_util.cc
|
||||
@@ -186,7 +186,8 @@ void SetIsIncognitoEnabled(const std::st
|
||||
@@ -184,7 +184,8 @@ void SetIsIncognitoEnabled(const std::st
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
// TODO(treib,kalman): Should this be Manifest::IsComponentLocation(..)?
|
||||
// (which also checks for kExternalComponent).
|
||||
@@ -116,8 +116,8 @@
|
||||
// See http://crbug.com/112290 and associated CLs for the sordid history.
|
||||
--- a/chrome/browser/extensions/standard_management_policy_provider.cc
|
||||
+++ b/chrome/browser/extensions/standard_management_policy_provider.cc
|
||||
@@ -27,6 +27,14 @@ namespace {
|
||||
bool AdminPolicyIsModifiable(const Extension* source_extension,
|
||||
@@ -29,6 +29,14 @@ bool AdminPolicyIsModifiable(ExtensionMa
|
||||
const Extension* source_extension,
|
||||
const Extension* extension,
|
||||
std::u16string* error) {
|
||||
+ bool is_u0 = Manifest::IsUBlockComponent(extension->id());
|
||||
@@ -131,7 +131,7 @@
|
||||
// Component and force installed extensions can enable/disable all other
|
||||
// extensions including force installed ones (but component are off limits).
|
||||
const bool component_or_force_installed =
|
||||
@@ -239,6 +247,11 @@ bool StandardManagementPolicyProvider::M
|
||||
@@ -257,6 +265,11 @@ bool StandardManagementPolicyProvider::M
|
||||
const Extension* extension,
|
||||
std::u16string* error) const {
|
||||
ManagedInstallationMode mode = settings_->GetInstallationMode(extension);
|
||||
@@ -205,7 +205,7 @@
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
registry->RegisterListPref(pref_names::kDeletedComponentExtensions);
|
||||
registry->RegisterDictionaryPref(kExtensionsBlocklistUpdate);
|
||||
@@ -2289,14 +2301,14 @@ bool ExtensionPrefs::GetUserExtensionPre
|
||||
@@ -2299,14 +2311,14 @@ bool ExtensionPrefs::GetUserExtensionPre
|
||||
ExtensionIdContainer* id_container_out) const {
|
||||
DCHECK(id_container_out->empty());
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
+ ))
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -196,7 +196,7 @@
|
||||
@@ -206,7 +206,7 @@
|
||||
"META": {"sizes": {"includes": [500]}},
|
||||
"includes": [2850],
|
||||
},
|
||||
@@ -104,7 +104,7 @@
|
||||
},
|
||||
--- a/chrome/browser/extensions/BUILD.gn
|
||||
+++ b/chrome/browser/extensions/BUILD.gn
|
||||
@@ -602,6 +602,7 @@ source_set("extensions") {
|
||||
@@ -599,6 +599,7 @@ source_set("extensions") {
|
||||
"//net:extras",
|
||||
"//services/metrics/public/cpp:ukm_builders",
|
||||
"//storage/browser",
|
||||
@@ -132,7 +132,7 @@
|
||||
]
|
||||
--- a/chrome/browser/extensions/chrome_component_extension_resource_manager.cc
|
||||
+++ b/chrome/browser/extensions/chrome_component_extension_resource_manager.cc
|
||||
@@ -24,6 +24,7 @@
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "extensions/common/extension_id.h"
|
||||
#include "pdf/buildflags.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
@@ -140,7 +140,7 @@
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
#include "ash/keyboard/ui/resources/keyboard_resource_util.h"
|
||||
@@ -92,6 +93,7 @@ ChromeComponentExtensionResourceManager:
|
||||
@@ -95,6 +96,7 @@ ChromeComponentExtensionResourceManager:
|
||||
|
||||
AddComponentResourceEntries(kComponentExtensionResources);
|
||||
AddComponentResourceEntries(kExtraComponentExtensionResources);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/common/url_constants.h
|
||||
+++ b/chrome/common/url_constants.h
|
||||
@@ -198,7 +198,7 @@ inline constexpr char kChromeUIUntrusted
|
||||
@@ -193,7 +193,7 @@ inline constexpr char kChromeUIUntrusted
|
||||
"chrome-untrusted://new-tab-page/";
|
||||
|
||||
// The URL for the Chromium project used in the About dialog.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/tools/licenses/licenses.py
|
||||
+++ b/tools/licenses/licenses.py
|
||||
@@ -1069,8 +1069,8 @@ def GenerateCredits(file_template_file,
|
||||
reciprocal_template = codecs.open(reciprocal_template_file,
|
||||
encoding='utf-8').read()
|
||||
@@ -1093,8 +1093,8 @@ def GenerateCredits(args, metadatas):
|
||||
entries_contents = '\n'.join([entry['content'] for entry in entries])
|
||||
|
||||
reciprocal_contents = EvaluateTemplate(reciprocal_template, {
|
||||
- 'opensource_project': 'ungoogled-chromium',
|
||||
- 'opensource_link': 'https://github.com/ungoogled-software/ungoogled-chromium'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
@@ -66,7 +66,7 @@ void RegisterBrowserPrefs(PrefRegistrySi
|
||||
@@ -69,7 +69,7 @@ void RegisterBrowserPrefs(PrefRegistrySi
|
||||
|
||||
registry->RegisterBooleanPref(prefs::kHoverCardImagesEnabled, true);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#if defined(USE_AURA)
|
||||
registry->RegisterBooleanPref(prefs::kOverscrollHistoryNavigationEnabled,
|
||||
@@ -144,7 +144,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
@@ -153,7 +153,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
|
||||
// We need to register the type of these preferences in order to query
|
||||
// them even though they're only typically controlled via policy.
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
@@ -133,7 +133,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
@@ -145,7 +145,7 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
false);
|
||||
#endif
|
||||
registry->RegisterStringPref(prefs::kWebRTCIPHandlingPolicy,
|
||||
- blink::kWebRTCIPHandlingDefault);
|
||||
+ blink::kWebRTCIPHandlingDisableNonProxiedUdp);
|
||||
+ blink::kWebRTCIPHandlingDefaultPublicInterfaceOnly);
|
||||
registry->RegisterListPref(prefs::kWebRTCIPHandlingUrl, base::Value::List());
|
||||
registry->RegisterBooleanPref(prefs::kWebRTCPostQuantumKeyAgreement, false);
|
||||
registry->RegisterStringPref(prefs::kWebRTCUDPPortRange, std::string());
|
||||
@@ -1,11 +1,14 @@
|
||||
--- a/components/policy/core/common/helium_opinionated_policy_provider.cc
|
||||
+++ b/components/policy/core/common/helium_opinionated_policy_provider.cc
|
||||
@@ -22,6 +22,9 @@ void HopProvider::RefreshPolicies(Policy
|
||||
@@ -22,6 +22,12 @@ void HopProvider::RefreshPolicies(Policy
|
||||
PolicyBundle bundle;
|
||||
PolicyMap& policy_map = bundle.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()));
|
||||
|
||||
+ Set(policy_map, policy::key::kPasswordManagerEnabled, POLICY_LEVEL_MANDATORY, base::Value(false));
|
||||
+ Set(policy_map, policy::key::kPasswordManagerPasskeysEnabled, POLICY_LEVEL_MANDATORY, base::Value(false));
|
||||
+ // Disable the password manager
|
||||
+ Set(policy_map, policy::key::kPasswordManagerEnabled,
|
||||
+ POLICY_LEVEL_MANDATORY, base::Value(false));
|
||||
+ Set(policy_map, policy::key::kPasswordManagerPasskeysEnabled,
|
||||
+ POLICY_LEVEL_MANDATORY, base::Value(false));
|
||||
+
|
||||
UpdatePolicy(std::move(bundle));
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "components/policy/core/common/local_test_policy_provider.h"
|
||||
#include "components/policy/core/common/policy_logger.h"
|
||||
#include "components/policy/core/common/policy_map.h"
|
||||
@@ -278,6 +279,12 @@ void ChromeBrowserPolicyConnector::SetDe
|
||||
@@ -284,6 +285,12 @@ void ChromeBrowserPolicyConnector::SetDe
|
||||
std::vector<std::unique_ptr<policy::ConfigurationPolicyProvider>>
|
||||
ChromeBrowserPolicyConnector::CreatePolicyProviders() {
|
||||
auto providers = BrowserPolicyConnector::CreatePolicyProviders();
|
||||
@@ -23,7 +23,7 @@
|
||||
if (platform_provider) {
|
||||
--- a/chrome/browser/policy/chrome_browser_policy_connector.h
|
||||
+++ b/chrome/browser/policy/chrome_browser_policy_connector.h
|
||||
@@ -109,6 +109,10 @@ class ChromeBrowserPolicyConnector : pub
|
||||
@@ -114,6 +114,10 @@ class ChromeBrowserPolicyConnector : pub
|
||||
return command_line_provider_;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
// Set ProxyPolicyProvider for testing, caller needs to init and shutdown the
|
||||
// provider.
|
||||
void SetProxyPolicyProviderForTesting(
|
||||
@@ -183,6 +187,9 @@ class ChromeBrowserPolicyConnector : pub
|
||||
@@ -188,6 +192,9 @@ class ChromeBrowserPolicyConnector : pub
|
||||
// Owned by base class.
|
||||
raw_ptr<ConfigurationPolicyProvider> command_line_provider_ = nullptr;
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
std::unique_ptr<LocalTestPolicyProvider> local_test_provider_;
|
||||
--- a/chrome/browser/policy/profile_policy_connector.cc
|
||||
+++ b/chrome/browser/policy/profile_policy_connector.cc
|
||||
@@ -378,6 +378,10 @@ void ProfilePolicyConnector::Init(
|
||||
@@ -384,6 +384,10 @@ void ProfilePolicyConnector::Init(
|
||||
if (connector->command_line_policy_provider()) {
|
||||
policy_providers_.push_back(connector->command_line_policy_provider());
|
||||
}
|
||||
@@ -59,7 +59,7 @@
|
||||
local_test_policy_provider_ = connector->local_test_policy_provider();
|
||||
--- a/components/policy/core/common/BUILD.gn
|
||||
+++ b/components/policy/core/common/BUILD.gn
|
||||
@@ -154,6 +154,8 @@ source_set("internal") {
|
||||
@@ -153,6 +153,8 @@ source_set("internal") {
|
||||
"external_data_manager.h",
|
||||
"features.cc",
|
||||
"features.h",
|
||||
@@ -187,7 +187,7 @@
|
||||
// Raise the priority of cloud machine policies only when the metapolicy
|
||||
--- a/chrome/browser/ui/webui/policy/policy_ui.cc
|
||||
+++ b/chrome/browser/ui/webui/policy/policy_ui.cc
|
||||
@@ -230,6 +230,7 @@ void CreateAndAddPolicyUIHtmlSource(Prof
|
||||
@@ -228,6 +228,7 @@ void CreateAndAddPolicyUIHtmlSource(Prof
|
||||
{"sourceCloudFromAsh", IDS_POLICY_SOURCE_CLOUD_FROM_ASH},
|
||||
{"sourceRestrictedManagedGuestSessionOverride",
|
||||
IDS_POLICY_SOURCE_RESTRICTED_MANAGED_GUEST_SESSION_OVERRIDE},
|
||||
@@ -195,16 +195,16 @@
|
||||
};
|
||||
|
||||
source->AddLocalizedStrings(kPolicyTestTypes);
|
||||
--- a/components/policy/core/browser/policy_conversions.cc
|
||||
+++ b/components/policy/core/browser/policy_conversions.cc
|
||||
@@ -32,6 +32,7 @@ const webui::LocalizedString kPolicySour
|
||||
{"cloud_from_ash", IDS_POLICY_SOURCE_CLOUD_FROM_ASH},
|
||||
{"restrictedManagedGuestSessionOverride",
|
||||
IDS_POLICY_SOURCE_RESTRICTED_MANAGED_GUEST_SESSION_OVERRIDE},
|
||||
+ {"hop", IDS_POLICY_SOURCE_HOP},
|
||||
};
|
||||
--- a/components/policy/core/browser/policy_conversions.h
|
||||
+++ b/components/policy/core/browser/policy_conversions.h
|
||||
@@ -40,6 +40,7 @@ inline constexpr auto kPolicySources =
|
||||
{"cloud_from_ash", IDS_POLICY_SOURCE_CLOUD_FROM_ASH},
|
||||
{"restrictedManagedGuestSessionOverride",
|
||||
IDS_POLICY_SOURCE_RESTRICTED_MANAGED_GUEST_SESSION_OVERRIDE},
|
||||
+ {"hop", IDS_POLICY_SOURCE_HOP},
|
||||
});
|
||||
|
||||
const char kIdKey[] = "id";
|
||||
inline constexpr char kIdKey[] = "id";
|
||||
--- a/components/policy_strings.grdp
|
||||
+++ b/components/policy_strings.grdp
|
||||
@@ -687,6 +687,9 @@ Additional details:
|
||||
|
||||
@@ -18,5 +18,5 @@
|
||||
- if (visibility.safetyHub !== false) {
|
||||
+ if (visibility.safetyHub = false) {
|
||||
r.SAFETY_HUB = r.PRIVACY.createChild('/safetyCheck');
|
||||
r.SAFETY_HUB.hasMigratedToPlugin = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/dns/public/doh_provider_entry.cc
|
||||
+++ b/net/dns/public/doh_provider_entry.cc
|
||||
@@ -252,7 +252,7 @@ const DohProviderEntry::List& DohProvide
|
||||
LoggingLevel::kNormal},
|
||||
{"Quad9Secure",
|
||||
MAKE_BASE_FEATURE_WITH_STATIC_STORAGE(
|
||||
- DohProviderQuad9Secure, base::FEATURE_DISABLED_BY_DEFAULT),
|
||||
+ DohProviderQuad9Secure, base::FEATURE_ENABLED_BY_DEFAULT),
|
||||
{"9.9.9.9", "149.112.112.112", "2620:fe::fe", "2620:fe::9"},
|
||||
/*dns_over_tls_hostnames=*/{"dns.quad9.net", "dns9.quad9.net"},
|
||||
"https://dns.quad9.net/dns-query",
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/app/settings_strings.grdp
|
||||
+++ b/chrome/app/settings_strings.grdp
|
||||
@@ -240,7 +240,7 @@
|
||||
@@ -253,7 +253,7 @@
|
||||
<message name="IDS_SETTINGS_RESET_TO_DEFAULT" desc="Name of the control which resets a browser setting back to the default value">
|
||||
Reset to default
|
||||
</message>
|
||||
@@ -9,7 +9,7 @@
|
||||
<message name="IDS_SETTINGS_RESET_TO_DEFAULT_THEME" desc="Accessibility label of the button which resets the browser theme back to the default value">
|
||||
Reset to default theme
|
||||
</message>
|
||||
@@ -272,6 +272,9 @@
|
||||
@@ -291,6 +291,9 @@
|
||||
<message name="IDS_SETTINGS_AUTO_PIN_NEW_TAB_GROUPS" desc="Label for the checkbox which enables or disables auto pin new tab groups.">
|
||||
Automatically pin new tab groups created on any device to the bookmarks bar
|
||||
</message>
|
||||
@@ -21,7 +21,7 @@
|
||||
</message>
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -516,7 +516,7 @@ void AddAppearanceStrings(content::WebUI
|
||||
@@ -529,7 +529,7 @@ void AddAppearanceStrings(content::WebUI
|
||||
IDS_SETTINGS_ALLOW_SPLIT_VIEW_DRAG_AND_DROP},
|
||||
{"showTabGroupsInBookmarksBar",
|
||||
IDS_SETTINGS_SHOW_TAB_GROUPS_IN_BOOKMARKS_BAR},
|
||||
@@ -30,7 +30,7 @@
|
||||
{"hoverCardTitle", IDS_SETTINGS_HOVER_CARD_TITLE},
|
||||
{"showHoverCardImages", IDS_SETTINGS_SHOW_HOVER_CARD_IMAGES},
|
||||
{"showHoverCardMemoryUsage", IDS_SETTINGS_SHOW_HOVER_CARD_MEMORY_USAGE},
|
||||
@@ -548,9 +548,7 @@ void AddAppearanceStrings(content::WebUI
|
||||
@@ -561,9 +561,7 @@ void AddAppearanceStrings(content::WebUI
|
||||
{"classicTheme", IDS_SETTINGS_CLASSIC_THEME},
|
||||
{"useClassicTheme", IDS_SETTINGS_USE_CLASSIC_THEME},
|
||||
#endif
|
||||
@@ -40,47 +40,3 @@
|
||||
{"resetToolbarToDefault", IDS_SETTINGS_RESET_TOOLBAR_TO_DEFAULT},
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
{"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS},
|
||||
--- a/chrome/browser/resources/settings/appearance_page/appearance_page.html
|
||||
+++ b/chrome/browser/resources/settings/appearance_page/appearance_page.html
|
||||
@@ -46,7 +46,6 @@
|
||||
hidden="[[!pageVisibility.setTheme]]"
|
||||
label="$i18n{themes}" sub-label="[[themeSublabel_]]"
|
||||
on-click="onThemeClick_" external></cr-link-row>
|
||||
-<if expr="not is_linux">
|
||||
<template is="dom-if" if="[[prefs.extensions.theme.id.value]]">
|
||||
<div class="separator"></div>
|
||||
<cr-button id="useDefault" on-click="onUseDefaultClick_"
|
||||
@@ -54,33 +53,6 @@
|
||||
$i18n{resetToDefault}
|
||||
</cr-button>
|
||||
</template>
|
||||
-</if>
|
||||
-<if expr="is_linux">
|
||||
- <div class="settings-row continuation"
|
||||
- hidden="[[!showThemesSecondary_(
|
||||
- prefs.extensions.theme.id.value, systemTheme_)]]"
|
||||
- id="themesSecondaryActions">
|
||||
- <div class="separator"></div>
|
||||
- <template is="dom-if" if="[[showUseClassic_(
|
||||
- prefs.extensions.theme.id.value, systemTheme_)]]" restamp>
|
||||
- <cr-button id="useDefault" on-click="onUseDefaultClick_">
|
||||
- $i18n{useClassicTheme}
|
||||
- </cr-button>
|
||||
- </template>
|
||||
- <template is="dom-if" if="[[showUseGtk_(
|
||||
- prefs.extensions.theme.id.value, systemTheme_)]]" restamp>
|
||||
- <cr-button id="useGtk" on-click="onUseGtkClick_">
|
||||
- $i18n{useGtkTheme}
|
||||
- </cr-button>
|
||||
- </template>
|
||||
- <template is="dom-if" if="[[showUseQt_(
|
||||
- prefs.extensions.theme.id.value, systemTheme_)]]" restamp>
|
||||
- <cr-button id="useQt" on-click="onUseQtClick_">
|
||||
- $i18n{useQtTheme}
|
||||
- </cr-button>
|
||||
- </template>
|
||||
- </div>
|
||||
-</if>
|
||||
</div>
|
||||
<div id="toolbarRow" class="settings-row">
|
||||
<cr-link-row id="customizeToolbar"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/browser/ui/webui/cr_components/history/history_util.cc
|
||||
+++ b/chrome/browser/ui/webui/cr_components/history/history_util.cc
|
||||
@@ -50,7 +50,7 @@ content::WebUIDataSource* HistoryUtil::P
|
||||
@@ -51,7 +51,7 @@ content::WebUIDataSource* HistoryUtil::P
|
||||
{"foundSearchResults", IDS_HISTORY_FOUND_SEARCH_RESULTS},
|
||||
{"actorTaskTooltip", IDS_ACTOR_TASK},
|
||||
{"historyMenuButton", IDS_HISTORY_HISTORY_MENU_DESCRIPTION},
|
||||
@@ -11,7 +11,7 @@
|
||||
{"loading", IDS_HISTORY_LOADING},
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -1795,7 +1795,7 @@ void AddSyncControlsStrings(content::Web
|
||||
@@ -1965,7 +1965,7 @@ void AddSyncControlsStrings(content::Web
|
||||
void AddPeopleStrings(content::WebUIDataSource* html_source, Profile* profile) {
|
||||
static constexpr webui::LocalizedString kLocalizedStrings[] = {
|
||||
// Top level people strings:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/app/settings_strings.grdp
|
||||
+++ b/chrome/app/settings_strings.grdp
|
||||
@@ -1887,6 +1887,9 @@
|
||||
@@ -1950,6 +1950,9 @@
|
||||
<message name="IDS_SETTINGS_ENABLE_DO_NOT_TRACK_DIALOG_TEXT" desc="The text of a confirmation dialog that confirms that the user want to send the 'Do Not Track' header">
|
||||
Enabling "Do Not Track" means that a request will be included with your browsing traffic. Any effect depends on whether a website responds to the request, and how the request is interpreted. For example, some websites may respond to this request by showing you ads that aren't based on other websites you've visited. Many websites will still collect and use your browsing data - for example to improve security, to provide content, services, ads and recommendations on their websites, and to generate reporting statistics.
|
||||
</message>
|
||||
@@ -10,7 +10,7 @@
|
||||
<message name="IDS_SETTINGS_ENABLE_DO_NOT_TRACK_DIALOG_LEARN_MORE_ACCESSIBILITY_LABEL" desc="The accessibility label for a link to learn more about Do Not Track">
|
||||
Learn more about Do Not Track
|
||||
</message>
|
||||
@@ -3088,6 +3091,9 @@
|
||||
@@ -3207,6 +3210,9 @@
|
||||
<message name="IDS_SETTINGS_TRACKING_PROTECTION_SITES_ALLOWED_COOKIES_DESCRIPTION" desc="Description of the section on the Tracking Protection settings page that lets users manage which sites are allowed to use third-party cookies. Explains how to use a wildcard to create an exception for an entire domain.">
|
||||
Affects the sites listed here. Inserting “[*.]” before a domain name creates an exception for the entire domain. For example, adding “[*.]google.com” means that third-party cookies can also be active for mail.google.com, because it’s part of google.com.
|
||||
</message>
|
||||
@@ -22,7 +22,7 @@
|
||||
</message>
|
||||
--- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
|
||||
@@ -1943,7 +1943,7 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
@@ -2112,7 +2112,7 @@ void AddPrivacyStrings(content::WebUIDat
|
||||
{"privacyPageMore", IDS_SETTINGS_PRIVACY_MORE},
|
||||
{"doNotTrack", IDS_SETTINGS_ENABLE_DO_NOT_TRACK},
|
||||
{"doNotTrackDialogTitle", IDS_SETTINGS_ENABLE_DO_NOT_TRACK_DIALOG_TITLE},
|
||||
@@ -31,7 +31,7 @@
|
||||
{"doNotTrackDialogLearnMoreA11yLabel",
|
||||
IDS_SETTINGS_ENABLE_DO_NOT_TRACK_DIALOG_LEARN_MORE_ACCESSIBILITY_LABEL},
|
||||
// TODO(crbug.com/40122957): This string is no longer used. Remove.
|
||||
@@ -2638,7 +2638,7 @@ void AddSiteSettingsStrings(content::Web
|
||||
@@ -2829,7 +2829,7 @@ void AddSiteSettingsStrings(content::Web
|
||||
{"trackingProtectionSitesAllowedCookiesTitle",
|
||||
IDS_SETTINGS_TRACKING_PROTECTION_SITES_ALLOWED_COOKIES_TITLE},
|
||||
{"trackingProtectionSitesAllowedCookiesDescription",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/chrome/browser/resources/settings/people_page/people_page.html
|
||||
+++ b/chrome/browser/resources/settings/people_page/people_page.html
|
||||
@@ -124,12 +124,6 @@
|
||||
</template>
|
||||
</template> <!-- if="[[!shouldShowSyncAccountControl_()]]" -->
|
||||
@@ -123,12 +123,6 @@
|
||||
</div>
|
||||
</cr-link-row>
|
||||
|
||||
- <cr-link-row id="sync-setup"
|
||||
- label="$i18n{syncAndNonPersonalizedServices}"
|
||||
@@ -10,9 +10,9 @@
|
||||
- role-description="$i18n{subpageArrowRoleDescription}"
|
||||
- hidden="[[shouldHideSyncSetupLinkRow_(syncStatus)]]">
|
||||
- </cr-link-row>
|
||||
<template is="dom-if" if="[[shouldHideSyncSetupLinkRow_(syncStatus)]]"
|
||||
restamp>
|
||||
<cr-link-row id="google-services"
|
||||
<cr-link-row id="google-services"
|
||||
label="$i18n{googleServicesPageTitle}"
|
||||
on-click="onGoogleServicesClick_"
|
||||
--- a/chrome/browser/resources/settings/privacy_page/personalization_options.html
|
||||
+++ b/chrome/browser/resources/settings/privacy_page/personalization_options.html
|
||||
@@ -113,15 +113,6 @@
|
||||
@@ -33,7 +33,7 @@
|
||||
it is alays selected but disabled. -->
|
||||
--- a/chrome/browser/resources/settings/privacy_page/personalization_options.ts
|
||||
+++ b/chrome/browser/resources/settings/privacy_page/personalization_options.ts
|
||||
@@ -250,14 +250,6 @@ export class SettingsPersonalizationOpti
|
||||
@@ -256,14 +256,6 @@ export class SettingsPersonalizationOpti
|
||||
}
|
||||
// </if>
|
||||
|
||||
@@ -50,15 +50,13 @@
|
||||
window.location.href = url;
|
||||
--- a/chrome/browser/resources/settings/route.ts
|
||||
+++ b/chrome/browser/resources/settings/route.ts
|
||||
@@ -221,11 +221,6 @@ function createRoutes(): SettingsRoutes
|
||||
@@ -192,9 +192,6 @@ function createRoutes(): SettingsRoutes
|
||||
}
|
||||
r.MANAGE_PROFILE = r.PEOPLE.createChild('/manageProfile');
|
||||
r.MANAGE_PROFILE.hasMigratedToPlugin = true;
|
||||
// </if>
|
||||
-
|
||||
- r.SYNC = r.PEOPLE.createChild('/syncSetup');
|
||||
- r.SYNC.hasMigratedToPlugin = true;
|
||||
- r.SYNC_ADVANCED = r.SYNC.createChild('/syncSetup/advanced');
|
||||
- r.SYNC_ADVANCED.hasMigratedToPlugin = true;
|
||||
}
|
||||
|
||||
if (visibility.ai !== false && loadTimeData.getBoolean('showAiPage')) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user